This pair of methods join the sorted lists into a single list and then restore
the individual lists by rememebering where each list previously ended. However
currently the lists are restored in a differnt order which is going to cause
problems.
The patch fixes this and adds a bunch more assertions to the list management
code.
It turns out that this feature has very little test coverage so I also wrote
some test code to exercise this.
Differential Revision: https://phabricator.services.mozilla.com/D228169
This revision implements the annotation types attribute and a few of its
associated annotation types. Namely, implemented here are SpellingError,
GrammarError, DataValidationError, and Highlighted. This revision also
implements tests for this new functionality.
Differential Revision: https://phabricator.services.mozilla.com/D227893
This revision implements GetAttributeValue on UiaTextRange. It does not add
support for every UIA text attribute, but does implement eight and lays the
groundwork to implement the rest. To keep GetAttributeValue straightforward, it
mainly contains a switch statement that dispatches a templated GetAttribute
function which makes use of an templated AttributeTraits struct to determine
whether the text attribute is uniform throughout the text range. Finally, this
revision adds a bunch of tests for this new functionality.
Differential Revision: https://phabricator.services.mozilla.com/D227765
Bug 658194 introduced a hack wherein scroll messages would be extracted
from the thread's message queue early, posted back to the queue under a
different message-ID, and then immediately reextracted for processing by
the target nsWindow.
This was intended to avoid deadlocks induced by some NPAPI plugins
running in the plugin-container process. However, we don't support
NPAPI plugins at all anymore, so this should no longer be necessary.
The key word in that sentence is, of course, "should". Instead of
outright removing the hack, for now we just introduce an alternate
processing path avoiding it, and make its use dependent on a pref
(defaulted to use the new path).
Differential Revision: https://phabricator.services.mozilla.com/D226268
Extract the component of `ProcessNativeMouseWheelMessage` which identifies
the adjusted target window, for use in the alternative event flow in the
next commit.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D226732
We no longer have any plugins that accept mouse inputs. Remove the
plugin-handling case from ProcessNativeMouseWheelMessage, in preparation
for a refactor.
Differential Revision: https://phabricator.services.mozilla.com/D226860
Clean up MouseScrollHandler::SynthesizedEvent:
- Since this is a private local class, move it into the .cpp file, to
minimize the number of compilation units that need to parse it.
- Explicitly check `mSynthesizingEvent` for validity BEFORE calling
nonstatic member functions. (Previously this code would call through
`nullptr` as part of normal operation!)
- Use `UniquePtr` in preference to explicit `new` and `delete`.
Additionally:
- At the end of the file, undo the #define-poisoning of
`GetMessagePos` to allow WinMouseScrollHandler.cpp to be used in
unified builds. Adjust `moz.build` accordingly.
- Remove a now-unnecessary kungFuDeathGrip. (The event-object
immediately afterwards also holds a strong reference.)
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D226267
The semantics of the old technically-third-party MSH_MOUSEWHEEL message
were different from that of the modern WM_MOUSEWHEEL. [1] Unfortunately,
when we updated the scroll-wheel code back in Firefox 1.8/2.0, we copied
the MSH_MOUSEWHEEL semantics over into the WM_MOUSEWHEEL code. (See bug
347875.)
This has probably never caused issues, but we might as well fix it.
[1] https://devblogs.microsoft.com/oldnewthing/20080806-00/?p=21353
Differential Revision: https://phabricator.services.mozilla.com/D226266
This is being removed because:
1. It it the last remaining cram test in-tree
2. It doesn't run in any CI tasks
3. It doesn't appear to be a particularly high value test
Once this is removed, the cramtest harness can also be removed.
Differential Revision: https://phabricator.services.mozilla.com/D227868
The cram tests are slow to run and difficult to maintain. There's also
nothing they offer that we can't accomplish with pytest.
Finally, the later commits in this stack are going to break the
mechanism we were using to mock the expected results (it was relying on
tryselects caching mechanism). Rather than attempting to fix this, just
convert the tests to pytest.
Differential Revision: https://phabricator.services.mozilla.com/D227704
Wow, this one was fun to debug. I was attempting to write some Python
tests that wrap around mach.run and then validate the output (in order
to get rid of our cramtest framework). But I had an issue where any
tests that ran after an earlier test, would have the wrong arguments
set. It turns out that the earlier test hits a code path that calls into
Registrar.dispatch(). And this method is supposed to temporarily mutate
the defaults of the argument parser:
https://searchfox.org/mozilla-central/rev/0d0eef18ea91e38ddfb82a1ac5d6560a146da5c0/python/mach/mach/registrar.py#185
The problem is that it doesn't properly restore state. This is because
ArgumentParser.set_defaults mutates both, parser._defaults as well as
parser._actions (which themselves can have a default). So we need to
restore both of those. We also need to use deepcopy rather than copy or
it doesn't work. And for good measure I threw both of them into a
finally block in case parsing the arguments raises an exception that
would get caught and handled downstream (e.g a test that is testing
invalid arguments).
Differential Revision: https://phabricator.services.mozilla.com/D227679
There was an installer size regression for macOS after the previous
change. I vaguely expect that this was in part caused by moving blocks
of duplicate IPDL serialization/deserialization logic into callback
lambdas, rather than in the larger OnMessageReceived handler function,
potentially leading to less code deduplication.
This patch moves the common parts of the IPDL message deserialization,
for the parts of the message which were serialized by IPDLResolverInner,
into the IPDLAsyncReturnsCallback class.
As a side-effect of this change, things like IPDL message ID validation
and reject case handling has also been moved to generic rather than
generated code.
Differential Revision: https://phabricator.services.mozilla.com/D228099
This requires a small change to the filesystem code, as the
FileSystemManager::BeginRequest signature explicitly uses the type
outside of IPC code.
We never need to copy the request object, so using std::function applies
unnecessary restrictions.
Differential Revision: https://phabricator.services.mozilla.com/D228098
Add option to run specific subprojects (fenix/focus/geckoview_example) by adding one of the following to mozconfig:
```
ac_add_options --enable-android-subproject=fenix
ac_add_options --enable-android-subproject=focus
ac_add_options --enable-android-subproject=geckoview_example
```
Differential Revision: https://phabricator.services.mozilla.com/D218564