Граф коммитов

9799 Коммитов

Автор SHA1 Сообщение Дата
Mark Banner 7c198e01fd Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-18 08:13:19 +00:00
Andrew McCreight c8c5c819df Bug 1514936, part 1 - Remove the outer argument to nsIFactory::createInstance. r=xpcom-reviewers,preferences-reviewers,nika,Gijs
This patch won't actually build, because a few bits of code are used
for both nsIFactory::createInstance and static components, and static
components are not fixed until the next patch.

The first place is nsLoadGroupConstructor, which uses an nsIFactory
macro to create a static component constructor. (This could be worked
around by expanding the macro to the state before this patch.)

The other issue is that nsAppShellConstructor is used in an nsIFactory
on OSX, but as a static component on all other platforms. This could
be worked around by wrapping nsAppShellConstructor in an adaptor that
passes in the extra null argument to nsAppShellConstructor.

Differential Revision: https://phabricator.services.mozilla.com/D146456
2022-05-17 20:24:19 +00:00
Sebastian Hengst c552340e0c Backed out 5 changesets (bug 1769569) for causing devtools' browser/browser_page_redirection.js to fail. CLOSED TREE
Backed out changeset 66a42eb3a366 (bug 1769569)
Backed out changeset d3cc9629cd9a (bug 1769569)
Backed out changeset edcd3dade079 (bug 1769569)
Backed out changeset 29d8dd058b7a (bug 1769569)
Backed out changeset 1aed34fdf2d3 (bug 1769569)
2022-05-17 19:49:17 +02:00
Mark Banner 5865f044db Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-17 16:50:33 +00:00
James Teh 592446771c Bug 1768219: Don't walk ancestors on all Accessibles to find an action when serialising the IPC tree. r=eeejay
This was causing a performance regression.
We now only do this for text leaf and image Accessibles, which gets us back to where we were before bug 1395181.
This means we can't support "click ancestor" on ATK.
There weren't requests for this on ATK anyway.
In future, we can probably support this using the information in the cache.

Differential Revision: https://phabricator.services.mozilla.com/D146528
2022-05-17 06:31:45 +00:00
Nika Layzell 2b307c5cea Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-13 14:16:09 +00:00
Eitan Isaacson dbd21dbf8b Bug 1768927 - Preload localized role strings and heading levels at init. r=Jamie
We can't use the StringBundle object off the main thread. We need to
pre-load all the strings we may use. This is a small set of roles. We
also need formatted heading levels, so we preload heading level 1 to 6.

Differential Revision: https://phabricator.services.mozilla.com/D146112
2022-05-13 05:00:55 +00:00
Eitan Isaacson 85225ac3d9 Bug 1768972 - Introduce FireEvent to avoid android monitor lock reentry. r=Jamie
We rely on Recv events to be called from child processes and not from
other Recv events. If this happens we risk reentry in regards to the
android monitor lock. So this patch introduces FireEvent for internal
use where secondary events need to be fired like a reorder when a new
sub-document is added.

Differential Revision: https://phabricator.services.mozilla.com/D146134
2022-05-12 22:41:44 +00:00
Eitan Isaacson 4bec8d9205 Bug 1768913 - Don't send window content changed event when loaded about:blank. r=morgan
Testing note - this enables junit tests to start and pass more reliably
when caching is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D146106
2022-05-11 22:09:12 +00:00
Morgan Reschenberg 5e491aa675 Bug 1763212: Add tests for vertical text caching r=Jamie
Depends on D143527

Differential Revision: https://phabricator.services.mozilla.com/D144893
2022-05-11 20:47:36 +00:00
Noemi Erli 45276205df Backed out 22 changesets (bug 1696894, bug 1759569, bug 1754031, bug 1759563, bug 1759572, bug 1754004) for causing leack failures CLOSED TREE
Backed out changeset 673ecd5337e1 (bug 1754004)
Backed out changeset ecbf5f3c51de (bug 1754004)
Backed out changeset fc6c39f56d21 (bug 1754004)
Backed out changeset 5b3d58fbaf9d (bug 1696894)
Backed out changeset 2e56c89cf55d (bug 1754004)
Backed out changeset b7723490f025 (bug 1754004)
Backed out changeset 1dfbf61ff5dd (bug 1754004)
Backed out changeset e73abb071bb3 (bug 1754004)
Backed out changeset f9abe4fbf501 (bug 1754004)
Backed out changeset ee7aeb631cd9 (bug 1754004)
Backed out changeset d66aacfcf983 (bug 1754004)
Backed out changeset 5c2872ad6912 (bug 1754004)
Backed out changeset e1ae48f30d2c (bug 1754004)
Backed out changeset 849b63707d7f (bug 1754004)
Backed out changeset 36563e3b1e04 (bug 1754004)
Backed out changeset ccb4be659107 (bug 1754004)
Backed out changeset 659581d4159b (bug 1754004)
Backed out changeset 611ea76d7a9c (bug 1754004)
Backed out changeset 9b24b561698c (bug 1759572)
Backed out changeset f820e0f209ff (bug 1759563)
Backed out changeset 8d82066fa181 (bug 1759569)
Backed out changeset a2835afab1ad (bug 1754031)
2022-05-11 06:16:25 +03:00
Eitan Isaacson 7e7246091a Bug 1768726 - Make RemoteAccessibleBase::BoundsWithOffset thread safe for Android. r=morgan
In Android we need to keep the remote accessible methods thread safe. That means no direct references to local accessibles, or anything DOM or layout.

We have the advantage of always being remote except for a 0 offset browser element, and no support for full page zoom.

Also removed the visual/layout viewport offset in the bounds method since
the top level doc will always have its visual and layout viewport match.

Differential Revision: https://phabricator.services.mozilla.com/D146006
2022-05-10 22:57:32 +00:00
James Teh 780d656a9c Bug 1768391: Invalidate the remote HyperText offsets cache when we mutate the tree. r=eeejay
Previously, we invalidated this cache when the reorder event arrived.
Because the mutation and the reorder event happen in separate IPDL calls, it's possible for a client call to arrive between them.
If that client call queried HyperText offsets, this could result in returning incorrect information to the client or even a parent process crash.
Now, we invalidate the cache during the mutation, so there's no possibility of an intervening client call.
It made sense to put this invalidation call in RemoteAccessibleBase, so I also moved the call to invalidate for text leaf updates into RemoteAccessibleBase so that they're both in the same class.

Differential Revision: https://phabricator.services.mozilla.com/D145845
2022-05-10 22:56:57 +00:00
Nika Layzell 728ba534f6 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-10 22:27:42 +00:00
James Teh 3a25e381f9 Bug 1766270: Null check IPCDoc() in Android DocAccessibleWrap::CacheViewportCallback. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D145847
2022-05-10 22:19:53 +00:00
James Teh be0257f0e6 Bug 1767887: Fix TextLeafPoint paragraph boundary search for the second leaf Accessible and beyond after a block. r=morgan
The code checks whether the origin is inside the block, since if not, the block ends before the origin.
However, it previously didn't handle the case where there was a leaf outside the block between the block and the origin.
An additional check has now been added to handle this case.
This required the code to be restructured somewhat, which hopefully also makes it easier to read/debug.

Differential Revision: https://phabricator.services.mozilla.com/D145867
2022-05-09 23:41:02 +00:00
Morgan Reschenberg 4e6096c73d Bug 1735101: Cache char, line coordinate info to support computing TextBounds and CharBounds in the parent process r=Jamie
Depends on D144767

Differential Revision: https://phabricator.services.mozilla.com/D143527
2022-05-09 20:30:27 +00:00
James Teh 7d2201e688 Bug 1192108: Fire focus events after mutation events but before any other events. r=eeejay
It's critical that we fire mutation events first because our RemoteAccessible tree is created thus and we can't fire events on RemoteAccessibles we haven't created yet.
Beyond that, though, focus events are of primary importance.
See the comments in EventQueue::ProcessEventQueue for the reasons.

Differential Revision: https://phabricator.services.mozilla.com/D145319
2022-05-06 23:59:43 +00:00
Cristian Tuns 3a72bf74a9 Backed out changeset a83bfbf2de62 (bug 1735101) for causing mochitest failures on browser_caching_text_bounds.js CLOSED TREE 2022-05-06 17:35:52 -04:00
Morgan Reschenberg f40daec464 Bug 1735101: Cache char, line coordinate info to support computing TextBounds and CharBounds in the parent process r=Jamie
Depends on D144767

Differential Revision: https://phabricator.services.mozilla.com/D143527
2022-05-06 20:10:59 +00:00
Noemi Erli 39469989c9 Backed out 22 changesets (bug 1759572, bug 1759563, bug 1754004, bug 1754031, bug 1759569, bug 1696894) for causing multiple failures CLOSED TREE
Backed out changeset d69647a725a1 (bug 1754004)
Backed out changeset 09fc506865d7 (bug 1754004)
Backed out changeset 648e3dd4b62f (bug 1754004)
Backed out changeset 3465158ee230 (bug 1696894)
Backed out changeset b08475bbfbd9 (bug 1754004)
Backed out changeset dfabce587a56 (bug 1754004)
Backed out changeset cebe8d5dda34 (bug 1754004)
Backed out changeset 55b4b0c9a504 (bug 1754004)
Backed out changeset e8649de9dd22 (bug 1754004)
Backed out changeset 0f480fc861c0 (bug 1754004)
Backed out changeset e515b7edd1c8 (bug 1754004)
Backed out changeset fe90db9158ac (bug 1754004)
Backed out changeset c6388d682d48 (bug 1754004)
Backed out changeset 2374420d9fed (bug 1754004)
Backed out changeset 44dfd76472aa (bug 1754004)
Backed out changeset 000fb99de0cf (bug 1754004)
Backed out changeset 0ca1856b5fc9 (bug 1754004)
Backed out changeset 10c3683b998b (bug 1754004)
Backed out changeset 4abc98ed6b99 (bug 1759572)
Backed out changeset cdd271a5af42 (bug 1759563)
Backed out changeset fadb6cc0d81c (bug 1759569)
Backed out changeset 44be9709a93e (bug 1754031)
2022-05-06 04:28:47 +03:00
Nika Layzell 0308ac11a4 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-05 23:34:21 +00:00
James Teh 65c8359c0d Bug 1766794: Lazily cache HyperText offsets for RemoteAccessibles. r=eeejay
We already had a similar cache in local HyperTextAccessible.
This improves performance significantly when walking the text attributes of a container with a large number of text leaf children, such as is encountered when using view source.
This patch unifies that cache across local and remote.
For simplicity, the cache invalidation strategy is more naive/aggressive.

Differential Revision: https://phabricator.services.mozilla.com/D145079
2022-05-05 11:14:12 +00:00
Sebastian Hengst 400d67b480 Merge autoland to mozilla-central. a=merge 2022-05-05 11:38:28 +02:00
Sebastian Hengst 7ddbeea9d6 Backed out 17 changesets (bug 1696894, bug 1754004) for causing crashes e.g. bug 1767808, and hanging Gmail (bug 1767918). a=backout DONTBUILD
Backed out changeset 63f17a06eba9 (bug 1754004)
Backed out changeset 017e1552d549 (bug 1754004)
Backed out changeset 010dfd821cf3 (bug 1696894)
Backed out changeset 96a39c2ba7a3 (bug 1754004)
Backed out changeset a147df47a0e3 (bug 1754004)
Backed out changeset 9018dd592230 (bug 1754004)
Backed out changeset 234ff9e092c2 (bug 1754004)
Backed out changeset c4f1e86992b6 (bug 1754004)
Backed out changeset 51bd50b57dd5 (bug 1754004)
Backed out changeset d95e7ad0eafa (bug 1754004)
Backed out changeset 35a69828091c (bug 1754004)
Backed out changeset 6802a4326963 (bug 1754004)
Backed out changeset e40e810e18fc (bug 1754004)
Backed out changeset 82b38c12b298 (bug 1754004)
Backed out changeset 0a6cf0817bf5 (bug 1754004)
Backed out changeset 6d8e51b3e8d7 (bug 1754004)
Backed out changeset 2059c2d0d880 (bug 1754004)
2022-05-05 11:27:42 +02:00
Butkovits Atila 7854b3ad09 Backed out changeset a81a40b250b4 (bug 1766794) for causing marionette failures. CLOSED TREE 2022-05-05 08:42:09 +03:00
James Teh 3754f65b27 Bug 1766794: Lazily cache HyperText offsets for RemoteAccessibles. r=eeejay
We already had a similar cache in local HyperTextAccessible.
This improves performance significantly when walking the text attributes of a container with a large number of text leaf children, such as is encountered when using view source.
This patch unifies that cache across local and remote.
For simplicity, the cache invalidation strategy is more naive/aggressive.

Differential Revision: https://phabricator.services.mozilla.com/D145079
2022-05-05 04:31:12 +00:00
Narcis Beleuzu d4b6401f96 Backed out changeset 337ded6c2bfd (bug 1192108) for geckoview failures on testMoveCaretAccessibilityFocus . CLOSED TREE 2022-05-05 04:17:34 +03:00
James Teh b129b887c5 Bug 1192108: Fire focus events after mutation events but before any other events. r=eeejay
It's critical that we fire mutation events first because our RemoteAccessible tree is created thus and we can't fire events on RemoteAccessibles we haven't created yet.
Beyond that, though, focus events are of primary importance.
See the comments in EventQueue::ProcessEventQueue for the reasons.

Differential Revision: https://phabricator.services.mozilla.com/D145319
2022-05-04 20:35:14 +00:00
Eitan Isaacson 83568bcd62 Bug 1765433 - P3: Get bundle and do pivot in UI thread for remote accessibles. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D144896
2022-05-04 18:00:47 +00:00
Eitan Isaacson 239896a063 Bug 1765433 - P2: Add AccessibilityNodeInfo population methods. r=Jamie
We cannot use GeckoBundle anymore because it cannot be constructed in
the UI thread. Instead, have a set of populate methods that take
arguments and set the correct fields in the AccessibilityNodeInfo, or
its optional info objects.

These fields can be called both in the Gecko and UI thread.

Differential Revision: https://phabricator.services.mozilla.com/D144895
2022-05-04 18:00:47 +00:00
James Teh 4e792c6a29 Bug 1766954: TextLeafRange: Don't call nsIFrame::RenderedText for pre-formatted text. r=eeejay
For pre-formatted text, the content text and rendered text are the same.
Therefore, there's no point calling nsIFrame::RenderedText, which is quite slow for nodes containing a large chunk of text.
This improves performance significantly when caching line start offsets for large plain text files such as logs.

Differential Revision: https://phabricator.services.mozilla.com/D145080
2022-05-04 04:18:11 +00:00
Nika Layzell 310e31989e Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-03 23:30:32 +00:00
Mike Hommey 08edf30a1b Bug 1766561 - Add missing l modifier for long formatting. r=Jamie,media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,mhowell,rkraesig,gerald,application-update-reviewers,bytesized,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144917
2022-05-03 20:49:08 +00:00
Mike Hommey f047620639 Bug 1766561 - Use proper formatting directives for LPARAM and WPARAM. r=Jamie,rkraesig
Unfortunately, while with MSVC one would use the `I` modifier to format
LPARAM/LONG_PTR, it doesn't work with clang-cl on 32-bits, because
LONG_PTR there is long, but `I` expects an int.

Differential Revision: https://phabricator.services.mozilla.com/D144916
2022-05-03 20:49:08 +00:00
Butkovits Atila d0dadcb6f5 Backed out 19 changesets (bug 1759569, bug 1754004, bug 1759563, bug 1754031, bug 1696894, bug 1759572) for causing wpt failures. CLOSED TREE
Backed out changeset 110a8dce4b5d (bug 1696894)
Backed out changeset a62dab05c6cd (bug 1754004)
Backed out changeset 7cf122f6e19f (bug 1754004)
Backed out changeset 2aa9a0a9adbc (bug 1754004)
Backed out changeset cde16b2cdbfb (bug 1754004)
Backed out changeset 452fe0a15c99 (bug 1754004)
Backed out changeset eace8d4756ef (bug 1754004)
Backed out changeset 5e1fad91e935 (bug 1754004)
Backed out changeset eb6de0b1ab8e (bug 1754004)
Backed out changeset 1ac1908ed3d0 (bug 1754004)
Backed out changeset 473cad5b22ab (bug 1754004)
Backed out changeset 1923922be138 (bug 1754004)
Backed out changeset c7966d91f89e (bug 1754004)
Backed out changeset df5ce1f6712c (bug 1754004)
Backed out changeset a3f3f9761ada (bug 1754004)
Backed out changeset c8ec86e0a33b (bug 1759572)
Backed out changeset 6c102f8e3d4a (bug 1759563)
Backed out changeset bd3a2fcf4f0c (bug 1759569)
Backed out changeset 2541d8face65 (bug 1754031)
2022-05-03 06:00:22 +03:00
Butkovits Atila c1773abb87 Backed out changeset 4e3e696ff054 (bug 1766954) for causing bustages at nsStyleStruct.h. CLOSED TREE 2022-05-03 03:43:58 +03:00
Butkovits Atila c08407380b Backed out changeset e12dbde5824b (bug 1766794) for causing build bustages. CLOSED TREE 2022-05-03 01:57:32 +03:00
James Teh 4828f4d449 Bug 1766954: TextLeafRange: Don't call nsIFrame::RenderedText for pre-formatted text. r=eeejay
For pre-formatted text, the content text and rendered text are the same.
Therefore, there's no point calling nsIFrame::RenderedText, which is quite slow for nodes containing a large chunk of text.
This improves performance significantly when caching line start offsets for large plain text files such as logs.

Differential Revision: https://phabricator.services.mozilla.com/D145080
2022-05-02 22:40:43 +00:00
James Teh 5c02aef5a0 Bug 1766794: Lazily cache HyperText offsets for RemoteAccessibles.
We already have a similar cache in local HyperTextAccessible.
Unfortunately, we can't use common code here because we don't want to waste memory having a member variable on all RemoteAccessibles, but local HyperTextAccessibles don't have mCachedFields.
This improves performance significantly when walking the text attributes of a container with a large number of text leaf children, such as is encountered when using view source.

Differential Revision: https://phabricator.services.mozilla.com/D145079
2022-05-02 22:40:43 +00:00
James Teh 9c548e5244 Bug 1767169: When processing queued cache updates, ensure Accessibles haven't been detached from the document. r=eeejay
In bug 1739560, I moved the processing of queued cache updates before the firing of mutation events.
That means that Accessibles removed from the tree might not be shut down (and thus defunct) yet, since we have this limbo "not in document" state.
Therefore, as well as skipping defunct Accessibles, we must also skip Accessibles that are no longer in the document.

Differential Revision: https://phabricator.services.mozilla.com/D145176
2022-05-02 22:38:07 +00:00
James Teh 71595ec7c0 Bug 1767173: When retrieving the cached name, set name string to void when it is empty but not explicitly set empty using alt="". r=eeejay
This distinction between void and empty exists in LocalAccessible, so we should be consistent in RemoteAccessible.
This fixes exposure of explicit-name when the name is empty.
To facilitate this, we no longer assume the name flag is not in the cache just because the name string isn't in the cache, since it could be eNoNameOnPurpose.

Differential Revision: https://phabricator.services.mozilla.com/D145179
2022-05-02 22:37:24 +00:00
Nika Layzell 7cb1970841 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-02 20:44:22 +00:00
Butkovits Atila 99ebfd6f14 Merge mozilla-central to autoland. CLOSED TREE 2022-04-29 12:59:59 +03:00
Butkovits Atila 6d3bc9da27 Merge autoland to mozilla-central. a=merge 2022-04-29 12:46:43 +03:00
Mike Hommey e55237be4d Bug 1766377 - Fix sign-compare warnings related to Windows constants. r=rkraesig,gfx-reviewers,sotaro
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/components/maintenanceservice/tests/gtest/ServiceStartInteractiveOnly.cpp(51,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
  ASSERT_EQ(GetLastError(), ERROR_ACCESS_DENIED);
  ^
obj-build/dist/include/gtest/gtest.h(1871,31): note: expanded from macro 'ASSERT_EQ'
                              ^
obj-build/dist/include/gtest/gtest.h(1855,54): note: expanded from macro 'GTEST_ASSERT_EQ'
  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/library/gtest/TestUCRTDepends.cpp(52,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
    EXPECT_EQ(GetLastError(), ERROR_FILE_NOT_FOUND);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
ipc/chromium/src/base/thread_local_win.cc(18,14): error: comparison of integers of different signs: 'base::ThreadLocalPlatform::SlotType' (aka 'int') and 'DWORD' (aka 'unsigned long') [-Werror,-Wsign-compare]
  CHECK(slot != TLS_OUT_OF_INDEXES);
        ~~~~ ^  ~~~~~~~~~~~~~~~~~~

ipc/glue/WindowsMessageLoop.cpp(381,44): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
        if (objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT) {
                                     ~~~~~ ^  ~~~~~~~~~~~~~~~~
ipc/glue/WindowsMessageLoop.cpp(381,19): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
        if (objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT) {
            ~~~~~ ^  ~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
xpcom/tests/windows/TestPoisonIOInterposer.cpp(108,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
    EXPECT_EQ(::GetLastError(), ERROR_IO_PENDING);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
gfx/thebes/gfxGDIFont.cpp(454,13): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Werror,-Wsign-compare]
    if (ret == E_PENDING) {
        ~~~ ^  ~~~~~~~~~
accessible/windows/msaa/Compatibility.cpp(120,21): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Werror,-Wsign-compare]
  if (exceptionCode == RPC_E_CANTCALLOUT_ININPUTSYNCCALL && NS_IsMainThread()) {
      ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/WinIMEHandler.cpp(166,35): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
      static_cast<DWORD>(aLParam) == OBJID_CARET) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
widget/windows/nsWindow.cpp(541,37): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
        static_cast<DWORD>(aLParam) != OBJID_CLIENT ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144692
2022-04-29 09:14:11 +00:00
Norisz Fay 6e06e2da92 Backed out 4 changesets (bug 1766377) for causing mochitest failures on HyperTextAccessible.cpp CLOSED TREE
Backed out changeset 6335511477a4 (bug 1766377)
Backed out changeset e8108d6fab9f (bug 1766377)
Backed out changeset 80d16d55c490 (bug 1766377)
Backed out changeset 1a6583d6e52e (bug 1766377)
2022-04-29 07:35:11 +03:00
James Teh acf1d4f77c Bug 1739560: Update line starts in the cache when they change. r=morgan
If text or bounds change, it's very likely that line starts have changed too, so we push an update for them.
However, if a non-rectangular text span changes its line wrapping without changing its text, the bounds might not change.
In that case, we still get a bounds cache update request; we just determine not to push bounds.
This happens a lot, though.
To limit this, we compare against the cached first line start in LocalAccessible and push an update only if it's different.

If text and bounds both change, we don't want to push two separate cache updates.
We use queued cache updates to prevent this.
This necessitated moving where we send queued cache updates so that we do it before firing mutation events, since clients might need the text to be up to date when handling those events.

Differential Revision: https://phabricator.services.mozilla.com/D144949
2022-04-29 00:44:11 +00:00
Mike Hommey 4f1f2540f6 Bug 1766377 - Fix sign-compare warnings related to IDL constants. r=anti-tracking-reviewers,necko-reviewers,kershaw,timhuang
dom/network/TCPSocket.cpp(973,38): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsISocketTransport::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsISocketTransport.h:102:3)' [-Werror,-Wsign-compare]
  if (static_cast<uint32_t>(aStatus) !=
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
dom/security/ReferrerInfo.cpp(216,26): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsIWebProgressListener::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsIWebProgressListener.h:41:3)' [-Werror,-Wsign-compare]
          rejectedReason !=
          ~~~~~~~~~~~~~~ ^
toolkit/components/antitracking/StorageAccess.cpp(175,23): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsIWebProgressListener::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsIWebProgressListener.h:41:3)' [-Werror,-Wsign-compare]
  if (aRejectedReason ==
      ~~~~~~~~~~~~~~~ ^
toolkit/components/antitracking/StorageAccess.cpp(415,26): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsIWebProgressListener::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsIWebProgressListener.h:41:3)' [-Werror,-Wsign-compare]
         aRejectedReason ==
         ~~~~~~~~~~~~~~~ ^
toolkit/components/antitracking/StorageAccess.cpp(428,26): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsIWebProgressListener::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsIWebProgressListener.h:41:3)' [-Werror,-Wsign-compare]
  return aRejectedReason ==
         ~~~~~~~~~~~~~~~ ^

Differential Revision: https://phabricator.services.mozilla.com/D144693
2022-04-29 00:43:31 +00:00
Mike Hommey c7ad9c4633 Bug 1766377 - Fix sign-compare warnings related to Windows constants. r=rkraesig,gfx-reviewers,sotaro
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/components/maintenanceservice/tests/gtest/ServiceStartInteractiveOnly.cpp(51,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
  ASSERT_EQ(GetLastError(), ERROR_ACCESS_DENIED);
  ^
obj-build/dist/include/gtest/gtest.h(1871,31): note: expanded from macro 'ASSERT_EQ'
                              ^
obj-build/dist/include/gtest/gtest.h(1855,54): note: expanded from macro 'GTEST_ASSERT_EQ'
  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/library/gtest/TestUCRTDepends.cpp(52,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
    EXPECT_EQ(GetLastError(), ERROR_FILE_NOT_FOUND);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
ipc/chromium/src/base/thread_local_win.cc(18,14): error: comparison of integers of different signs: 'base::ThreadLocalPlatform::SlotType' (aka 'int') and 'DWORD' (aka 'unsigned long') [-Werror,-Wsign-compare]
  CHECK(slot != TLS_OUT_OF_INDEXES);
        ~~~~ ^  ~~~~~~~~~~~~~~~~~~

ipc/glue/WindowsMessageLoop.cpp(381,44): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
        if (objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT) {
                                     ~~~~~ ^  ~~~~~~~~~~~~~~~~
ipc/glue/WindowsMessageLoop.cpp(381,19): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
        if (objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT) {
            ~~~~~ ^  ~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
xpcom/tests/windows/TestPoisonIOInterposer.cpp(108,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
    EXPECT_EQ(::GetLastError(), ERROR_IO_PENDING);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
gfx/thebes/gfxGDIFont.cpp(454,13): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Werror,-Wsign-compare]
    if (ret == E_PENDING) {
        ~~~ ^  ~~~~~~~~~
accessible/windows/msaa/Compatibility.cpp(120,21): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Werror,-Wsign-compare]
  if (exceptionCode == RPC_E_CANTCALLOUT_ININPUTSYNCCALL && NS_IsMainThread()) {
      ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/WinIMEHandler.cpp(166,35): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
      static_cast<DWORD>(aLParam) == OBJID_CARET) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
widget/windows/nsWindow.cpp(541,37): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
        static_cast<DWORD>(aLParam) != OBJID_CLIENT ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144692
2022-04-29 00:43:31 +00:00