Storing it in the style value doesn't make much sense, specially since we store
drawing-dependent stuff there like the svg viewport size, which clearly depends
on the size of the frame.
This cache may not be very useful anymore, see the linked bug, but this unblocks
me with other style system cleanups and seems safer.
Differential Revision: https://phabricator.services.mozilla.com/D62162
--HG--
extra : moz-landing-system : lando
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
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
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
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
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
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
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
While using always the underline thickness seemed ok when I reviewed the
regressing bug, it seems it's not always fine to use the font-provided value.
At least I see the same thing as
https://bugzilla.mozilla.org/show_bug.cgi?id=1613285#c0 it in two different
(though similarly configured, in fairness) Linux machines.
Keep `auto` meaning the slightly different thing that it used to mean, and use
`from-font` for the underline thickness (though there's at least one case where
`from-font` could maybe be the `strikeOutSize`... wdyt?).
In particular, for spell-checking markers, we have a somewhat bespoke
`ComputeSelectionUnderlineHeight`...
Differential Revision: https://phabricator.services.mozilla.com/D61781
--HG--
extra : moz-landing-system : lando
Also, add an nsIFrameInlines.h include to all .cpp files who call these APIs
and who don't yet have an include for this header.
Differential Revision: https://phabricator.services.mozilla.com/D61615
--HG--
extra : moz-landing-system : lando
Breaks the dependency from Selection.h. Allows reuse for Selection
across the Shadow DOM boundary, which will require styled ranges to be
stored in `DocumentOrShadowRoot` too.
Differential Revision: https://phabricator.services.mozilla.com/D61549
--HG--
extra : moz-landing-system : lando
When our position changes from / to absolute / fixed, then we need to reframe
(most likely, at least). But in some easier cases we can just live with a reflow
plus (optionally) a containing-block update or a repaint, depending on the case.
We need to delete the normal position property when this happens and we switch
from static to relative/sticky, and also need to update the handling of
UpdateContainingBlock to avoid making decisions based on position not changing.
This will actually not cause more reframes, as one would expect, because that
optimization became somewhat obsolete by bug 1519371 (which made the
optimization exact).
Differential Revision: https://phabricator.services.mozilla.com/D61142
--HG--
extra : moz-landing-system : lando
Summary of the changes/reasons:
- LayoutTelemetryTools.h directly uses several types whose headers it needs to
include. (These includes were present in its .cpp file; I'm migrating them
from there to the .h file, and I'm adding a new include for "Saturate.h" to
provide the SaturateUint8 type.)
- LayoutTelemetryTools.cpp needs an include for MainThreadUtils.h, to provide
NS_IsMainThread().
- StaticPresData.cpp needs an include for ServoUtils.h, to provide
AssertIsMainThreadOrServoFontMetricsLocked().
- ZoomConstraintsClient.h needs a forward-decl for mozilla::dom::Document since
it uses a pointer of that type in a function-decl.
- ScrollSnap.h needs forward-decls of nsPoint/nsRect for some references to
those types in a method signature.
- nsGridContainerFrame.cpp needs an include for nsBoxLayoutState.h since it
uses that type (it instantiates a nsBoxLayoutState instance).
- nsPlaceholderFrame.cpp needs a "using" decl for the mozilla::dom namespace in
order to use the un-namespace-prefixed "Element" type.
Differential Revision: https://phabricator.services.mozilla.com/D61603
--HG--
extra : moz-landing-system : lando
Breaks the dependency from Selection.h. Allows reuse for Selection
across the Shadow DOM boundary, which will require styled ranges to be
stored in `DocumentOrShadowRoot` too.
Differential Revision: https://phabricator.services.mozilla.com/D61549
--HG--
extra : moz-landing-system : lando
This patch is generated via:
1. Manually modify gfx/2d/Types.h
2. Run the following script and clang-format.
3. Add brackets for the for loop in nsCSSRendering.cpp.
```
function rename() {
echo "Renaming $1 to $2"
rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}
rename "NS_FOR_CSS_HALF_CORNERS\(i\)" "for (const auto i : mozilla::AllPhysicalHalfCorners())"
rename "NS_FOR_CSS_HALF_CORNERS\(corner\)" "for (const auto corner : mozilla::AllPhysicalHalfCorners())"
```
Differential Revision: https://phabricator.services.mozilla.com/D61252
--HG--
extra : moz-landing-system : lando