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

72132 Коммитов

Автор SHA1 Сообщение Дата
Mirko Brodesser 803698911f Bug 1624633: part 1) Move `Selection::mRanges` to `StyledRanges` struct. r=hsivonen
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
2020-03-27 11:21:25 +00:00
Jeff Muizelaar b5242e1d14 Bug 1617708. Make ClippedDrawTarget use destination DT.
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
2020-03-27 03:15:05 +00:00
Karl Tomlinson d13eef7aff Bug 1581896 allow AudioWorklet on release-or-beta behind a pref r=smaug
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
2020-03-27 03:09:06 +00:00
Hiroyuki Ikezoe 08eb278be8 Bug 1625341 - Convert the newline from windows style to unix-like style in reftests in layout/reftests/pagination/. r=TYLin
find layout/reftests/pagination -type f  | xargs sed -i 's/^r//g'

Differential Revision: https://phabricator.services.mozilla.com/D68483

--HG--
extra : moz-landing-system : lando
2020-03-27 02:07:07 +00:00
Timothy Nikkel 775e391d85 Bug 1625364. Re-enable layout/reftests/bugs/1553571-1.html on Android+webrender.
It works now, I think that bug 1613482 probably fixed this.

Differential Revision: https://phabricator.services.mozilla.com/D68494

--HG--
extra : moz-landing-system : lando
2020-03-27 01:21:12 +00:00
Glenn Watson 356d82d9f2 Bug 1624463 - Update fuzziness for android perma-fail with WR. r=Bert
Differential Revision: https://phabricator.services.mozilla.com/D68452

--HG--
extra : moz-landing-system : lando
2020-03-26 21:16:59 +00:00
Ting-Yu Lin 83f8e911be Bug 1590569 - Add a crashtest. r=emilio
This is fixed by bug 1596310.

Differential Revision: https://phabricator.services.mozilla.com/D68309

--HG--
extra : moz-landing-system : lando
2020-03-26 11:26:59 +00:00
Emilio Cobos Álvarez a214514a58 Bug 1624080 - Simplify the implementation of HasAuthorSpecifiedRules. r=heycam
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
2020-03-26 16:48:01 +00:00
Nicolas Silva d7b234f7d6 Bug 1624796 - Adjust reftest fuzziness. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D68174

--HG--
extra : moz-landing-system : lando
2020-03-26 16:43:03 +00:00
Razvan Maries 7155f2665a Backed out changeset ac0d06c0ca93 (bug 1624080) for assertion failures. CLOSED TREE 2020-03-26 16:52:18 +02:00
Emilio Cobos Álvarez c556351cd0 Bug 1624080 - Simplify the implementation of HasAuthorSpecifiedRules. r=heycam
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
2020-03-26 13:23:42 +00:00
Emilio Cobos Álvarez fcff6b1a69 Bug 1624829 - Use FunctionRef for various Enumerate* callbacks. r=edgar
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
2020-03-26 12:44:47 +00:00
Emilio Cobos Álvarez d66d0bdca0 Bug 1611848 - Properly suppress shadow dom / display: contents inside svg text. r=heycam
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
2020-03-26 00:06:53 +00:00
Timothy Nikkel 2562bd0136 Bug 1622271. Add one more pixel of fuzz to reftest for bug 1614788.
Differential Revision: https://phabricator.services.mozilla.com/D68308

--HG--
extra : moz-landing-system : lando
2020-03-26 02:59:08 +00:00
cbrewster 5c34d757d0 Bug 1618000: Part 2: Clamp blur radius based on scale factors r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D65805

--HG--
extra : moz-landing-system : lando
2020-03-26 00:00:02 +00:00
cbrewster aa9335954f Bug 1618000: Part 1: Remove blur radius clamping on Gecko-side for WR blur filters r=gfx-reviewers,nical
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
2020-03-25 23:57:53 +00:00
Emilio Cobos Álvarez 669d9fde56 Bug 1624752 - Fuzz an <input type=color> text when non-native theme is enabled.
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
2020-03-25 20:10:18 +00:00
Ting-Yu Lin b3c3bf9bc9 Bug 1624514 Part 2 - Generalize nsIFrame::ContentBSize() to be ContentSize(). r=AlaskanEmily
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
2020-03-25 18:12:25 +00:00
Ting-Yu Lin c7d2da32aa Bug 1624514 Part 1 - Move nsIFrame's methods that get various frame rects closer to GetRect(). r=AlaskanEmily
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
2020-03-25 17:47:01 +00:00
Emilio Cobos Álvarez efae1e34f4 Bug 1624655 - Don't backplate over themed backgrounds. r=morgan
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
2020-03-25 15:45:21 +00:00
Daniel Holbert 22f8be966d Bug 1624247 part 4: Refactor our existing logic for skipping some flex items' "final reflow" when they've had an earlier measuring reflow. r=TYLin
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
2020-03-25 04:52:43 +00:00
Daniel Holbert 41ef145833 Bug 1624247 part 3: Refactor CachedBAxisMeasurement to be an optional member in a more general CachedFlexItemData class. r=TYLin
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
2020-03-25 05:02:35 +00:00
Daniel Holbert 2879ef41fa Bug 1624247 part 2: Rename flex item helper-struct from CachedMeasuringReflowResult to CachedBAxisMeasurement. r=TYLin
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
2020-03-25 04:52:02 +00:00
Daniel Holbert 587b081007 Bug 1624247 part 1: When caching flex item BSize measurement, cache the content-box size instead of border-box size. r=TYLin
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
2020-03-25 04:51:39 +00:00
Mirko Brodesser 9cb24081dd Bug 1623858: part 9) Document more variables corresponding to `nsISelectionController::getDisplaySelection`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D67847

--HG--
extra : moz-landing-system : lando
2020-03-24 20:27:24 +00:00
Mirko Brodesser d8abdcf8c1 Bug 1623858: part 8) Document `nsIFrame::ComputeSelectionStyle`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D67846

--HG--
extra : moz-landing-system : lando
2020-03-24 20:25:42 +00:00
Erik Nordin ca4fa23626 Bug 1621415 - Ensure adopted styles are applied when printing r=emilio
- 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
2020-03-24 22:54:18 +00:00
Emilio Cobos Álvarez 53477db16b Bug 1624696 - Respect padding for all elements except checkbox/radio. r=spohl,mstange
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
2020-03-24 22:51:26 +00:00
Narcis Beleuzu 464f343178 Backed out changeset f3c5f5a1b35d (bug 1624696) for wpt failures on baseline-alignment-and-overflow.tentative.html . CLOSED TREE 2020-03-25 00:24:22 +02:00
Emilio Cobos Álvarez e1dadb10e3 Bug 1624696 - Respect padding for all elements except checkbox/radio. r=spohl,mstange
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
2020-03-24 21:02:12 +00:00
Kristen Wright 1991a7758d Bug 1622111 - Convert dom.w3c_pointer_events.implicit_capture to a static pref. r=njn
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
2020-03-19 00:54:31 +00:00
Kristen Wright 6c22e40a82 Bug 1622111 - Convert three dom.vibrator.* prefs to static prefs r=njn
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
2020-03-19 00:54:25 +00:00
Mirko Brodesser 1a8fa110c7 Bug 1623858: part 7) Rename and simplify `nsFrame::DisplaySelection`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D67807

--HG--
extra : moz-landing-system : lando
2020-03-24 09:16:53 +00:00
Geoff Brown d46135408b Bug 1598746 - Adjust some mochitest and reftest SCHEDULES.exclusive entries; r=ahal
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
2020-03-24 14:55:28 +00:00
Kartikaya Gupta f6825449bf Bug 1622360 - Remove rest of the RenderRootBoundary stuff. r=botond
Depends on D67866

Differential Revision: https://phabricator.services.mozilla.com/D67867

--HG--
extra : moz-landing-system : lando
2020-03-23 22:05:15 +00:00
Botond Ballo 3dfece9cbe Bug 1623476 - Use a roundish resolution in test_event_target_radius.html, to avoid rounding errors. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D67521

--HG--
extra : moz-landing-system : lando
2020-03-23 22:24:37 +00:00
Botond Ballo c8a0ab983b Bug 1623476 - Minor style fixes to test_bug370436.html. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D67517

--HG--
extra : moz-landing-system : lando
2020-03-23 22:21:12 +00:00
Botond Ballo c2743ac5d0 Bug 1623476 - Fix an incorrect assertion in PresShell about capturing content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67516

--HG--
extra : moz-landing-system : lando
2020-03-23 22:20:44 +00:00
Botond Ballo 8ee14bcbbe Bug 1623476 - Rename enum RelativeTo to DisplayportRelativeTo. r=tnikkel
This is in anticipation of introducing a struct named RelativeTo
in bug 1556556.

Differential Revision: https://phabricator.services.mozilla.com/D67515

--HG--
extra : moz-landing-system : lando
2020-03-23 22:20:11 +00:00
Botond Ballo 841ae3ad7d Bug 1623476 - Some const-correctness improvements (nsIFrame* --> const nsIFrame*) in nsLayoutUtils functions. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D67514

--HG--
extra : moz-landing-system : lando
2020-03-23 22:19:12 +00:00
Glenn Watson 18890f8aab Bug 1623791 - Remove segment gridding optimization. r=nical
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
2020-03-23 14:58:57 +00:00
Razvan Maries 3389ad3b1f Backed out 2 changesets (bug 1618000) for wrench bustages. CLOSED TREE
Backed out changeset c72b18b22267 (bug 1618000)
Backed out changeset 9bc71e7b317b (bug 1618000)
2020-03-23 21:00:24 +02:00
cbrewster 34e8ddc337 Bug 1618000: Part 2: Clamp blur radius based on scale factors r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D65805

--HG--
extra : moz-landing-system : lando
2020-03-23 18:22:32 +00:00
cbrewster 0c74db8b9e Bug 1618000: Part 1: Remove blur radius clamping on Gecko-side for WR blur filters r=gfx-reviewers,nical
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
2020-03-23 17:36:26 +00:00
Ting-Yu Lin 03638f9dbc Bug 1623225 Part 6 - Construct FlexItem directly at the end of FlexLine::Items(). r=dholbert
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
2020-03-23 17:48:02 +00:00
Ting-Yu Lin 296c9b2ecb Bug 1623225 Part 5 - Reverse FlexLines and FlexItems if the axes are reversed internally. r=dholbert
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
2020-03-23 18:06:51 +00:00
Ting-Yu Lin d72173b686 Bug 1623225 Part 4 - Store FlexLines in nsTArrays instead of LinkedLists. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D67265

--HG--
extra : moz-landing-system : lando
2020-03-23 07:24:43 +00:00
Ting-Yu Lin 452861f58d Bug 1623225 Part 3 - Store FlexItems in nsTArrays instead of LinkedLists. r=dholbert
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
2020-03-23 07:24:38 +00:00
Ting-Yu Lin 577f8e7436 Bug 1623225 Part 2 - Convert AxisTrackerFlags to an enum class. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D67263

--HG--
extra : moz-landing-system : lando
2020-03-23 07:24:31 +00:00
Ting-Yu Lin 295f74764d Bug 1623225 Part 1 - Use nsFlexLine::NumItems() to replace all the read-only direct usages of mNumItems. r=dholbert
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
2020-03-23 07:24:28 +00:00