This allows methods operating on the ranges to be moved to that struct.
To see where this leads to, consider the following reviews.
Differential Revision: https://phabricator.services.mozilla.com/D68217
--HG--
extra : moz-landing-system : lando
By using the destination DT we will use the correct offset
during playback instead of the offset of the reference target.
Differential Revision: https://phabricator.services.mozilla.com/D68495
--HG--
extra : moz-landing-system : lando
AudioWorklets are now functional for most use cases, and so it's time to allow
people to experiment.
PaintWorklets are not ready.
Differential Revision: https://phabricator.services.mozilla.com/D68320
--HG--
extra : moz-landing-system : lando
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.
This changes behavior in two ways, one of them which is not observable to
content, I believe:
* revert now re-enables the native styling. This was brought up in
https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.
This is observable to content, and I'm adding a test for it.
* We don't look at inherited styles from our ancestors when `inherit` is
specified in a non-author stylesheet. This was introduced for bug 452969 but
we don't seem to inherit background anymore for file controls or such. It
seems back then file controls used to have a text-field.
I audited forms.css and ua.css and we don't explicitly inherit
padding / border / background-color into any nested form control.
We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.
We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.
Differential Revision: https://phabricator.services.mozilla.com/D67722
--HG--
extra : moz-landing-system : lando
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.
This changes behavior in two ways, one of them which is not observable to
content, I believe:
* revert now re-enables the native styling. This was brought up in
https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.
This is observable to content, and I'm adding a test for it.
* We don't look at inherited styles from our ancestors when `inherit` is
specified in a non-author stylesheet. This was introduced for bug 452969 but
we don't seem to inherit background anymore for file controls or such. It
seems back then file controls used to have a text-field.
I audited forms.css and ua.css and we don't explicitly inherit
padding / border / background-color into any nested form control.
We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.
We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.
Differential Revision: https://phabricator.services.mozilla.com/D67722
--HG--
extra : moz-landing-system : lando
This avoids a bunch of ugly casts and void pointers, without much overhead
(unlike std::function or such).
Differential Revision: https://phabricator.services.mozilla.com/D68182
--HG--
extra : moz-landing-system : lando
Returning null from FindSVGData just means "fall back to whatever display
specifies", and that's not great.
Differential Revision: https://phabricator.services.mozilla.com/D67706
--HG--
extra : moz-landing-system : lando
Clamping of the blur radius depends on transform scale factors. This info is not available until later in the WebRender pipeline, so we need to delegate blur radius clamping to WebRender.
Differential Revision: https://phabricator.services.mozilla.com/D65804
--HG--
extra : moz-landing-system : lando
It's a one-pixel difference on the rounded corner, probably due to skia
shenanigans.
Differential Revision: https://phabricator.services.mozilla.com/D68267
--HG--
extra : moz-landing-system : lando
To get the logical content size of a frame, some callers use
GetContentRectRelativeToSelf().Size() and then convert it to
LogicalRect. We really should generalize ContentBSize(), and provide
ContentSize() for such purpose.
Differential Revision: https://phabricator.services.mozilla.com/D68065
--HG--
extra : moz-landing-system : lando
Let's make these methods more coherent and discoverable by moving them
closer to GetRect().
Differential Revision: https://phabricator.services.mozilla.com/D68064
--HG--
extra : moz-landing-system : lando
data:text/html,<input type=submit> is white-on-white when depressed with
backplating enabled on the GTK light theme, because even though the computed
background-color is white, the actual button background is themed and the color
is not white instead.
This causes problems with the unthemed appearance anyway (<input type=submit
style="-webkit-appearance: none"> and so on), but this is probably worth it
anyway.
Differential Revision: https://phabricator.services.mozilla.com/D68063
--HG--
extra : moz-landing-system : lando
This patch isn't expected to change behavior; it's just refactoring some logic
into a helper function (and inverting some conditions to hopefully make things
easier to follow & reason about).
The new function here ("NeedsFinalReflow()") is intended to be extended later
on, to add more cases where it can return false & cause the final reflow to be
skipped. (This will probably happen in bug 1492538.)
Note that this patch also moves a static helper function
"FrameHasRelativeBSizeDependency()" upwards in the file; this is required in
order to keep that function declared/defined above its first usage (which has
now moved upwards as well). This helper isn't changing at all; it's just
moving.
Differential Revision: https://phabricator.services.mozilla.com/D67917
--HG--
extra : moz-landing-system : lando
This patch should not impact behavior; it is purely a refactoring change.
In a later patch, I will add more (non-optional) members to this new class, to
cache additional data.
One happy outcome of the current patch is that CachedBAxisMeasurement's members
can now become (mostly) 'const' again, now that we can reconstruct it in-place
by virtue of it being stored in a Maybe<>.
Differential Revision: https://phabricator.services.mozilla.com/D67802
--HG--
extra : moz-landing-system : lando
This patch should not impact behavior; it is purely a rename.
The "reflow result" naming is too generic for this struct, now that I'm
planning to cache other results from flex item reflow (in later patches).
This particular struct is caching block-axis measurements (a BSize and an ascent), so let's rename it to reflect that.
Differential Revision: https://phabricator.services.mozilla.com/D67801
--HG--
extra : moz-landing-system : lando
This patch should not impact behavior; it is purely a refactoring change to do the same arithmetic in a different spot.
The content-box size is the size that we actually care about when we use this
cached data, so we might as well just store that size directly, instead of
storing the border-box size and making adjustments at usage time, which is what
we do right now.
Note that one of the usage sites had an informational NS_WARNING_ASSERTION, for
cases where the BorderPadding subtraction might drop us into negative
territory. I'm not particularly concerned with preserving that warning at this
point (in part because it's not necessarily an error when it fails, since it's
possible to make it fail with huge sizes; and in part because it's non-fatal,
which means we're not likely to notice it if it did "legitimately" fail
anyway). So I've just removed it for simplicity & consistency.
Differential Revision: https://phabricator.services.mozilla.com/D67800
--HG--
extra : moz-landing-system : lando
- Add functionality to clone adopted style sheets for printing.
- Add reftest to ensure that the document's adopted styles show in print.
- Add reftest to ensure that a shadow root's adopted styles show in print.
Differential Revision: https://phabricator.services.mozilla.com/D66517
--HG--
extra : moz-landing-system : lando
Only button / menulist-button were missing from the hard-coded if condition. I
don't think we ever want to override author padding, and this can cause compat
issues as the one in this bug.
I'm making HasAuthorSpecifiedRules fast in bug 1624080, btw.
Differential Revision: https://phabricator.services.mozilla.com/D68085
--HG--
extra : moz-landing-system : lando
Only button / menulist-button were missing from the hard-coded if condition. I
don't think we ever want to override author padding, and this can cause compat
issues as the one in this bug.
I'm making HasAuthorSpecifiedRules fast in bug 1624080, btw.
Differential Revision: https://phabricator.services.mozilla.com/D68085
--HG--
extra : moz-landing-system : lando
Converts dom.w3c_pointer_events.implicit_capture to a static pref, removes the initializer in PointerEventHandler.
Differential Revision: https://phabricator.services.mozilla.com/D67204
--HG--
extra : moz-landing-system : lando
Converts dom.vibrator.enabled, dom.vibrator.max_vibrate_ms, and dom.vibrator.max_vibrate_list_len to static prefs. Removes their init function.
Differential Revision: https://phabricator.services.mozilla.com/D67183
--HG--
extra : moz-landing-system : lando
Use finer granularity for some reftest/mochitest SCHEDULES.exclusive entries,
so that reftest-plain does not run when only crashtests are modified, and
vice versa; similarly, break up mochitest into mochitest/browser-chrome/chrome/
a11y. Use schedules-component instead of category.
Differential Revision: https://phabricator.services.mozilla.com/D60085
--HG--
extra : moz-landing-system : lando
This is no longer as important, with picture caching. Removing it
will simplify the planned changes to switch to a simpler segment
model based on nine-patch rectangles during scene building.
Differential Revision: https://phabricator.services.mozilla.com/D67792
--HG--
extra : moz-landing-system : lando
Clamping of the blur radius depends on transform scale factors. This info is not available until later in the WebRender pipeline, so we need to delegate blur radius clamping to WebRender.
Differential Revision: https://phabricator.services.mozilla.com/D65804
--HG--
extra : moz-landing-system : lando
To avoid extra copy operations, we directly construct new FlexItem at
the end of current FlexLine, and we move the item to the next line if
the previous line needs to wrap.
Differential Revision: https://phabricator.services.mozilla.com/D67266
--HG--
extra : moz-landing-system : lando
Rather than inserting FlexLines and FlexItems at the front of the array,
which is inefficient, we reverse them after they are fully constructed.
nsTArray::Reverse() (or std::reverse()) is implemented by std::swap.In
order for FlexItem to be swappable, it needs to have an assignment
operator, which needs to be able to modify FlexItem's member variables.
To achieve this, we must drop the const qualifiers for the member
variables. And conveniently, this results in a compiler-generated
assignment operator which will do the right thing.
Differential Revision: https://phabricator.services.mozilla.com/D67587
--HG--
extra : moz-landing-system : lando
Notable changes in this part.
* FirstItem() and LastItem() now returns a reference to the FlexItem (if
such an item exists). The caller is required to ensure the FlexLine is
non-empty before calling the two methods.
* Deploy range-based for-loop to iterate all FlexItem in a FlexLine via
a new Items() method.
* The bookkeeping mNumItems is no longer needed as nsTArray::Length() is
sufficient.
* Use "." instead "->" because we now store FlexItem in an nsTArray.
Differential Revision: https://phabricator.services.mozilla.com/D67264
--HG--
extra : moz-landing-system : lando
In a later part, we are going to change nsFlexLine::mItems to store in
nsTArray and remove mNumItems.
Differential Revision: https://phabricator.services.mozilla.com/D67262
--HG--
extra : moz-landing-system : lando