nsPresContext.h is only used for unit conversion, which can be done by Units.h
in a similar fashion.
PresShell.h was needed for some capturing-content stuff which can be moved out
of line.
Differential Revision: https://phabricator.services.mozilla.com/D62170
--HG--
extra : moz-landing-system : lando
And fix a bunch of fallout as we now don't include nsDocShell.h everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D62169
--HG--
extra : moz-landing-system : lando
Mostly what I was seeing come up in the .deps files from my object directory
which sounded feasible.
Differential Revision: https://phabricator.services.mozilla.com/D62167
--HG--
extra : moz-landing-system : lando
This avoids including nsFont.h and a bunch of other stuff in nsPresContext.h
Differential Revision: https://phabricator.services.mozilla.com/D62166
--HG--
extra : moz-landing-system : lando
We include it everywhere because it's included from gfxTypes.h.
This should avoid including all the generated bindings _everywhere_.
Differential Revision: https://phabricator.services.mozilla.com/D62174
--HG--
extra : moz-landing-system : lando
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.
Differential Revision: https://phabricator.services.mozilla.com/D62161
--HG--
extra : moz-landing-system : lando
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.
Differential Revision: https://phabricator.services.mozilla.com/D62161
--HG--
extra : moz-landing-system : lando
Always store the pointer in little-endian order so that the tag trick works.
Differential Revision: https://phabricator.services.mozilla.com/D61386
--HG--
extra : moz-landing-system : lando
APZ may want to know what the main thread's view of the visual viewport offset
was at the time of the last paint even if the main thread does not want APZ
to scroll to that visual viewport offset.
Differential Revision: https://phabricator.services.mozilla.com/D62093
--HG--
extra : moz-landing-system : lando
Use the manifest ID rather than the manifest path in the reftest suite_start message.
Differential Revision: https://phabricator.services.mozilla.com/D62081
--HG--
extra : moz-landing-system : lando
There were two issues with the existing code that we use to determine whether a
widget is styled or not.
First, it was using `color == Color::transparent()` instead of
`color.is_transparent()` to check for transparent backgrounds. That is not sound
as `Color::transparent()` is the literal value `rgba(0, 0, 0, 0)`, not the
`transparent` keyword, so the equality check would fail.
The other issue is that this function was early-returning false if that check
was returning false. It is a bug for this function to early-return false, as it
makes the result of the function dependent of the order of the declarations.
Differential Revision: https://phabricator.services.mozilla.com/D62060
--HG--
extra : moz-landing-system : lando
Use MozReftestInvalidate rather than onload, following the pattern of most of
the tests in layout/reftests/selection.
Differential Revision: https://phabricator.services.mozilla.com/D62139
--HG--
extra : moz-landing-system : lando
This patch is generated via
`./mach static-analysis check -f layout/generic/nsFlexContainerFrame.cpp` and
`./mach clang-format`.
Differential Revision: https://phabricator.services.mozilla.com/D62133
--HG--
extra : moz-landing-system : lando
`mIsCaretPositionChanged` is used in `UpdateShouldDisableApz()` to
determine whether to disable APZ during scrolling or pinch-zooming.
Suppose the selection is on position:static elements. When
pinch-zooming, the zoom level is changed, but the position is not. We
split `PositionChangedResult::Changed` into two separate states, and set
`mIsCaretPositionChanged` only when the position is changed.
Differential Revision: https://phabricator.services.mozilla.com/D61516
--HG--
extra : moz-landing-system : lando
Add a reftest that would fail in webrender before the corresponding
fix landed.
Ensures that there is an async zoom and that both the layout and
visual viewports have async scroll offsets. To pass, we must apply
each of the layout and visual offsets in their correct coordinate
spaces.
Differential Revision: https://phabricator.services.mozilla.com/D61788
--HG--
extra : moz-landing-system : lando
And add an assertion to ensure callers get it right. The only thing that needs
it AFAICT is the canvas frame background, so remove the border-image caller...
Differential Revision: https://phabricator.services.mozilla.com/D61950
--HG--
extra : moz-landing-system : lando
This removes nsStyleImageRequest by moving the load state to LoadData instead
(where other lazy state like the resolved URL and load id lives).
That way we can use cbindgen for more stuff (there's no blocker for using it for
all images now), and we can undo the image tracking shenanigans that I had to do
in bug 1605803 in nsImageFrame.
This removes the mDocGroup member because well, there's no real upside of that
now that quantum DOM is not a thing.
It also removes the static clones of the image requests, and the need for each
computed value instance to have its own request. These were needed because we
needed the image loader for the particular document to observe the image
changes. But we were also tracking the request -> loader for other purposes.
Instead, Now all the images get loaded with GlobalImageObserver as a listener,
which looks in the image map and forwards the notification to all the interested
loaders instead dynamically.
The style value is only responsible to load the image, and no longer tracks /
locks it. Instead, the loader does so, via the image tracker.
Differential Revision: https://phabricator.services.mozilla.com/D58519
--HG--
extra : moz-landing-system : lando
Add a reftest that would fail in webrender before the corresponding
fix landed.
Ensures that there is an async zoom and that both the layout and
visual viewports have async scroll offsets. To pass, we must apply
each of the layout and visual offsets in their correct coordinate
spaces.
Differential Revision: https://phabricator.services.mozilla.com/D61788
--HG--
extra : moz-landing-system : lando
Annotate optiontext.html for Android as slightly fuzzy, to account for
reftest rebucketing fuzzy-failure fallout. It has 0 in the lower bound
of the fuzzy annotation because not every Android has this
fuzzy-failure.
Meanwhile, bug453105.html no longer fails due to reftest rebucketing, so
I remove its fuzzy annotation.
Differential Revision: https://phabricator.services.mozilla.com/D61877
--HG--
extra : moz-landing-system : lando
Both _setup_objdir() and run_android_test() have code to set the
default test path, and _setup_objdir()'s crashtest path is wrong;
let's rely on the correct code in run_android_test() instead.
Differential Revision: https://phabricator.services.mozilla.com/D61946
--HG--
extra : moz-landing-system : lando
redundant return statement for GetCSSValuesForProperty in InspectorUtils.cpp removed
Differential Revision: https://phabricator.services.mozilla.com/D61954
--HG--
extra : moz-landing-system : lando
To avoid computing transform bounds over and over. It is generally just better.
Replace the various "overridebounds" thingies by using the "fallback" of the
transform-reference-box code which we need anyway.
Differential Revision: https://phabricator.services.mozilla.com/D61890
--HG--
extra : moz-landing-system : lando
The entire comment deleted in nsContainerFrame.cpp belongs to
FinishReflowChild(), which is already documented in the header.
Change `aChildFrame` to `aKidFrame` for ReflowChild() to match its
implementation.
Differential Revision: https://phabricator.services.mozilla.com/D61885
--HG--
extra : moz-landing-system : lando
The variables involved in the bitwise arithmetic are all of type uint8_t, so
we end up with that type automatically (no need to bother with a static_cast).
Note that we *do* need to declare the type (we can't use `auto`, or else
the compiler wants to upgrade the local variable to have a wider type --
"int", I think -- and that then produces an build warning when we pass
that variable as a uint8_t param further down).
Differential Revision: https://phabricator.services.mozilla.com/D61893
--HG--
extra : moz-landing-system : lando
I thought this would fix <input type=number style="user-select: none">, but
turns out it doesn't.
<input type=number> doesn't have the editor root as a root of the anonymous
subtree, so the current hack wouldn't work, as the anon root wouldn't have the
editable flag. So tweak the code a bit to handle stuff in a simpler way than
setting the flags after the fact, and set the NAC-root flag earlier to avoid
the mOuterWrapper->AppendChildTo(root) call forgetting about root's flags.
I had to tweak one AccessibleCaret test, but that's because it uses <textarea>
with user-select: none, and our behavior there is not particularly sane. It just
happened to work because that test-case also had a bunch of contenteditable
elements, and we stop matching this rule:
https://searchfox.org/mozilla-central/rev/220a3bd6063fcbe5ca50e88dcabdc7dee0aca448/layout/style/contenteditable.css#22
Because the anonymous div now properly matches :-moz-read-write, which made the
rule apply and the test work. See comment 4 of this bug.
I'll fix this stuff up and add some tests for our behavior here in bug 1611699.
I refactored the dragdrop tests to cover more input types, but I ended up not
being able to use them because they're dependent on the content.
Instead I added an extra test and changed the refactor so that it applies to
<input type=search>, as there's layout work going on in bug 558594, and it'd be
unfortunate to regress this there too.
Differential Revision: https://phabricator.services.mozilla.com/D61094
--HG--
extra : moz-landing-system : lando
This adds the name of the interface and method to the beginning of the exception
string when reporting the exception from Web IDL codegen, so it's clearer what
was called.
Some existing error messages are adjusted to not duplicate the information
about which method was called.
Differential Revision: https://phabricator.services.mozilla.com/D61521
--HG--
extra : moz-landing-system : lando