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

78739 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez cbc2ce24e9 Bug 1772555 - Annotate a test as fuzzy as some other neighboring tests.
MANUAL PUSH: Orange fix CLOSED TREE
2022-06-23 03:08:49 +02:00
Emilio Cobos Álvarez cbb5b58f4d Bug 1772555 - Use style interpolation code for gradients. r=nical
This ensures they're clamped on Animated -> sRGB conversion, and in the
future we'll have to implement different color spaces so we'll need to
use it anyways.

Differential Revision: https://phabricator.services.mozilla.com/D149792
2022-06-22 23:02:34 +00:00
Emilio Cobos Álvarez bd09497378 Bug 1372276 - Remove HTML menuitem. r=smaug,mconley,agi
This removes HTMLMenuItemElement and all the code and tests preffed off
by dom.menuitem.enabled.

The HTML parser changes are the result of applying the previous patch.

Differential Revision: https://phabricator.services.mozilla.com/D149979
2022-06-22 22:31:42 +00:00
Jeff Muizelaar 3847a14838 Bug 1774849 - Always use sync decoding during reftests. r=aosmond
nsImageGeometryMixin is used to redraw images with sync decoding.  Without it,
if we paint an image with non-sync decoding, we won't know that it will be
drawn differently with sync decoding and so don't have a mechanism to include
it in the invalid region.

Currently the main situation where we draw images with non-sync decoding and
then with sync decoding is during reftests. If we unconditionally use sync
decoding during reftests we don't have to worry about the situation where we
switch. This will let us resolve the problems associated with nsImageGeometryMixin.

Differential Revision: https://phabricator.services.mozilla.com/D149657
2022-06-22 18:50:35 +00:00
Iulian Moraru 0ebda972c1 Backed out changeset 003cad9bbcc6 (bug 1772555) for causing reftest failures on bugs/1315113-1.html. 2022-06-22 22:00:53 +03:00
Emilio Cobos Álvarez 827fe3a33e Bug 1772555 - Use style interpolation code for gradients. r=nical
This ensures they're clamped on Animated -> sRGB conversion, and in the
future we'll have to implement different color spaces so we'll need to
use it anyways.

Differential Revision: https://phabricator.services.mozilla.com/D149792
2022-06-22 17:00:56 +00:00
Martin Robinson f85b73bf84 Bug 1463600 - Implement CSS 'contain: style' r=emilio
Add an implementation of CSS `contain: style`. This introduces two new
data structures, the ContainStyleScope and ContainStyleScopeManager.

ContainStyleScope manages one `contain: style` "world" which has its own
counter and quote lists. The contents of these lists depend on their
parent scopes, but are not affected by their children.
ContainStyleScopeManager manages a tree of scopes starting at a root
scope which is outside of any `contain: style` element.

Scopes are stored in a hash table that is keyed off of the nsIContent
which establishes the `contain: style` scope. When modifying quote or
content lists, the ContainStyleScopeManager is responsible for finding
the appropriate `contain: style` scope to modify.

Perhaps the most complex part of this is that counters and quotes have
read access to the state of counters and quotes that are in ancestor
`contain: style` scopes. In the case of counters, USE nodes that are at
the beginning of counter lists might have a counter scope that starts in
an ancestor `contain: style` scope. When nsCounterNode::SetScope() is
called, the code may look upward in the `contain: style` scope tree to
find the start of the counter scope. In the case of quotes, the first
node in the quote list must look for the state of quotes in ancestor
`contain: style` scopes.

Differential Revision: https://phabricator.services.mozilla.com/D149508
2022-06-22 16:16:59 +00:00
Bogdan Szekely b56ae513c7 Backed out changeset 86e9449aba35 (bug 1463600) for causing xpcshell failures on test_css-properties-db.js 2022-06-22 15:35:33 +03:00
Emilio Cobos Álvarez 9fad2ec27a Bug 1775282 - Enable color-mix in high-contrast test. DONTBUILD
MANUAL PUSH: Trivial reftest manifest tweak.
2022-06-22 14:22:45 +02:00
Martin Robinson 83640bbee6 Bug 1463600 - Implement CSS 'contain: style' r=emilio
Add an implementation of CSS `contain: style`. This introduces two new
data structures, the ContainStyleScope and ContainStyleScopeManager.

ContainStyleScope manages one `contain: style` "world" which has its own
counter and quote lists. The contents of these lists depend on their
parent scopes, but are not affected by their children.
ContainStyleScopeManager manages a tree of scopes starting at a root
scope which is outside of any `contain: style` element.

Scopes are stored in a hash table that is keyed off of the nsIContent
which establishes the `contain: style` scope. When modifying quote or
content lists, the ContainStyleScopeManager is responsible for finding
the appropriate `contain: style` scope to modify.

Perhaps the most complex part of this is that counters and quotes have
read access to the state of counters and quotes that are in ancestor
`contain: style` scopes. In the case of counters, USE nodes that are at
the beginning of counter lists might have a counter scope that starts in
an ancestor `contain: style` scope. When nsCounterNode::SetScope() is
called, the code may look upward in the `contain: style` scope tree to
find the start of the counter scope. In the case of quotes, the first
node in the quote list must look for the state of quotes in ancestor
`contain: style` scopes.

Differential Revision: https://phabricator.services.mozilla.com/D149508
2022-06-22 10:42:34 +00:00
Hiroyuki Ikezoe 41c2d38055 Bug 1772640 - Use NSCoordSaturatingMultiply to avoid overflowing nscoord. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D149838
2022-06-22 01:30:29 +00:00
Emilio Cobos Álvarez 7829e5aab5 Bug 1774378 - Make select code harder to mess up. r=Gijs
Right now we rely on the menulist to be injected by hand in all the
relevant windows. Instead create it lazily, making the select code more
standalone.

The DevTools window was missing it, for example.

Differential Revision: https://phabricator.services.mozilla.com/D149620
2022-06-21 21:42:58 +00:00
Glenn Watson d784bfaee9 Bug 1775188 - Remove direct use of ClipId on stacking contexts r=gfx-reviewers,lsalzman
In future, stacking contexts, hit-tests and prims will all use
clip-chains rather than the old-style ClipId references.

Differential Revision: https://phabricator.services.mozilla.com/D149844
2022-06-21 20:23:59 +00:00
Tooru Fujisawa 3e7abb615a Bug 1774566 - Remove unnecessary 2nd parameter from ChromeUtils.import in layout/tools/reftest/manifest.jsm. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D149701
2022-06-21 11:10:15 +00:00
Ting-Yu Lin 46965e75de Bug 847368 - Reset floating first letter's reflow status before checking break-inside:avoid. r=emilio
As the comment in the moved hunk said, a floating first letter frame's
incomplete status means that there is more content to be reflowed on the line.
If the block containing the floating first letter has `break-inside:avoid`
style, the old code would call `SetInlineLineBreakBeforeAndReset()`, and the
block's parent frame would misinterpret the status as "this block needs to be
push to the next fragment" even if we are *not* in a paginated environment.
Hence the assertion "Shouldn't be incomplete if availableBSize is
UNCONSTRAINED."

To fix this bug, we can reset the float's reflow status for a first letter frame
before checking `ShouldAvoidBreakInside`.

Differential Revision: https://phabricator.services.mozilla.com/D149712
2022-06-20 23:04:50 +00:00
Razvan Cojocaru 5b663ef76f Bug 1773387 - Change local variables of type gfxSize, which actually represent scales, to MatrixScalesDouble. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D149565
2022-06-20 19:17:14 +00:00
Emilio Cobos Álvarez 4f5feacd11 Bug 1775123 - Tweak a reftest to avoid hitting too low screen resolutions.
MANUAL PUSH: Recent reftest fixup CLOSED TREE
2022-06-20 20:23:04 +02:00
Emilio Cobos Álvarez f7eb7c604f Bug 1764585 - Re-add a line accidentally removed.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2022-06-20 17:22:13 +02:00
Emilio Cobos Álvarez 5a2d3c5d54 Bug 1774946 - Check for allowed colors recursively in forced-colors mode. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D149733
2022-06-20 14:07:12 +00:00
Emilio Cobos Álvarez 3ec010c2b1 Bug 1764585 - Wait for some pref changes to take effect. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D149745
2022-06-20 13:57:09 +00:00
Daniel Holbert c75ef277a1 Bug 1774894: Remove unused function nsDisplayTableItem::UpdateForFrameBackground and its associated dead-code. r=emilio
This patch doesn't affect behavior; it's dead-code removal.

UpdateForFrameBackground is never called, and hence can be removed.

The member-var that it conditionally set, mPartHasFixedBackground, can be
assumed to be always false, and hence can be removed.

The same struct's other member-var, mDrawsBackground, is irrelevant since it's
only checked in combination with mPartHasFixedBackground, and hence can be
removed.   And with that, the local variable invalidateForAttachmentFixed can
be removed as well.

This all seems to be code that's obsoleted by our (long-ago) move to using
display lists to draw tables.

Differential Revision: https://phabricator.services.mozilla.com/D149680
2022-06-18 21:20:52 +00:00
Daniel Holbert 94532509a5 Bug 1774879 part 5: Remove ComputedStyle* param from nsDisplayBackgroundImage::AppendBackgroundItemsToTop, since all callers pass nullptr (implicitly or explicitly). r=emilio
This patch doesn't change behavior.

I was initially going to promote this param to be const (which is an
improvement that's unlocked by earlier patches this series), but in doing so
I realized the param is entirely unnecessary. So, let's just remove it.

Differential Revision: https://phabricator.services.mozilla.com/D149678
2022-06-18 21:20:51 +00:00
Ting-Yu Lin 5598d191a9 Bug 1774904 - Remove SetTruncated in ReflowInput.h. r=dholbert
SetTruncated was moved into nsReflowStatus in Bug 775624 Part 10a
https://hg.mozilla.org/mozilla-central/rev/3ea22e82b7a1b493f2f31e52ed310e6288fd9a91,
so let's remove the unused declarations in ReflowInput.h.

Differential Revision: https://phabricator.services.mozilla.com/D149686
2022-06-18 18:40:02 +00:00
Daniel Holbert fc3b960a74 Bug 1774879 part 4: Use const ComputedStyle* arg in nsCSSRendering::PaintStyleImageLayerWithSC, and update several callsites now that they can pass const variables. r=emilio
This patch doesn't change behavior; it's just a const-correctness fix.

Thanks to previous patches in this series, PaintStyleImageLayerWithSC's arg can
become const, so let's make that change and opportunistically make the same
change to the variables that callers pass in, where possible.

Differential Revision: https://phabricator.services.mozilla.com/D149677
2022-06-18 00:45:20 +00:00
Daniel Holbert 92b1de01bb Bug 1774879 part 3: Add 'const' to local var ComputedStyle pointers that we pass to DetermineBackgroundColor and IsTransparent (which now accept const). r=emilio
This patch does not affect behavior; it's just a const-correctness fix.

Differential Revision: https://phabricator.services.mozilla.com/D149676
2022-06-18 00:45:20 +00:00
Daniel Holbert b99919ed77 Bug 1774879 part 2: Use const ComputedStyle* in various places for nsDisplayBackgroundImage and its InitData struct. r=emilio
This patch doesn't change behavior; it's just a const-correctness fix.

This patch doesn't have any directly relation to the previous patch in this
series, but it's required for the next patch in this series.

Differential Revision: https://phabricator.services.mozilla.com/D149675
2022-06-18 00:45:20 +00:00
Daniel Holbert 96bee9a8c3 Bug 1774879 part 1: Use const ComputedStyle* arg in nsCSSRendering::DetermineBackgroundColor (and in two APIs it depends on). r=emilio
This patch does not change behavior; it's just a const-correctness fix.

This patch was prompted by the desire to add "const" to a ComputedStyle*
variable in a place where we happen to call DetermineBackgroundColor.  To do
that, I have to adjust DetermineBackgroundColor to accept a const arg; and that
in turn requires GetBackgroundColor to accept a const arg, which in turn
requires IsTransparent to require a const arg. Hence, fixing all three APIs
here.

I'll opportunistically add 'const' labels at callsites for these APIs in the
next patch in this series.

Differential Revision: https://phabricator.services.mozilla.com/D149674
2022-06-18 00:45:19 +00:00
Botond Ballo 5d687c962b Bug 1771503 - Disable the 'two layers that scroll together' assertion for matrices with Inf or NaN elements. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D149466
2022-06-17 23:50:49 +00:00
Daniel Holbert 730f3c1399 Bug 1774261 part 3: Rename helper function "FindElementBackground" to "FrameHasMeaningfulBackground" to better-reflect what it does. r=emilio
This patch doesn't change behavior.

The renamed function is only called once, in FindBackground, and it's used to
essentially determine whether that function should return true for aForFrame
(i.e. whether aForFrame "has a meaningful background" per the FindBackground
documentation).

Hopefully the new name is a bit clearer than "FindElementBackground". I'm not
worrying too much about having the perfect name/documentation, since there's
only one caller; but suggestions for even-better names/wording are welcome.

Differential Revision: https://phabricator.services.mozilla.com/D149339
2022-06-17 21:55:21 +00:00
Daniel Holbert cdb88a2da1 Bug 1774261 part 2: Simplify nsCSSRendering::FindBackgroundFrame to directly return its result instead of using an outparam. r=emilio
This patch doesn't change behavior.

This is similar to the previous patch in this series, but now for
FindBackgroundFrame().

Differential Revision: https://phabricator.services.mozilla.com/D149338
2022-06-17 21:55:21 +00:00
Daniel Holbert e4309c976e Bug 1774261 part 1: Simplify nsCSSRendering::FindBackground to directly return its result instead of using an outparam. r=emilio
This patch doesn't change behavior.

Before this patch, the FindBackground API returns a bool to indicate
success/failure, and sets its outparam to a non-null pointer-value on success.

This patch simplifies the API by just promoting the promoting the outparam to
be the actual return value, with nullptr as a sentinel value to indicate
failure.

(This patch adds some braces to affected/contextual if statements, too, to
match our coding style guide.)

Differential Revision: https://phabricator.services.mozilla.com/D149337
2022-06-17 21:55:20 +00:00
Daniel Holbert 4333e0ab29 Bug 1774261 part 0: Make nsCSSRendering.cpp include its own header first. r=emilio
This patch does not change behavior.

This change is per our "Foo.cpp should have Foo.h as its first include"
convention, which helps us ensure that the header (nsCSSRendering.h in this
case) has all of the includes/declarations that it needs to compile properly on
its own, and doesn't have a fragile requirement that some other header must
always be included before it.

Differential Revision: https://phabricator.services.mozilla.com/D149336
2022-06-17 21:55:20 +00:00
Iulian Moraru b9b91b3bba Backed out changeset ea2c1cabc853 (bug 1774849) for causing crashtest failures on 944353.jpg. 2022-06-17 22:56:46 +03:00
Jeff Muizelaar e2ab641934 Bug 1774849 - Always use sync decoding during reftests. r=aosmond
nsImageGeometryMixin is used to redraw images with sync decoding.  Without it,
if we paint an image with non-sync decoding, we won't know that it will be
drawn differently with sync decoding and so don't have a mechanism to include
it in the invalid region.

Currently the main situation where we draw images with non-sync decoding and
then with sync decoding is during reftests. If we unconditionally use sync
decoding during reftests we don't have to worry about the situation where we
switch. This will let us resolve the problems associated with nsImageGeometryMixin.

Differential Revision: https://phabricator.services.mozilla.com/D149657
2022-06-17 18:57:07 +00:00
Emilio Cobos Álvarez 4ee33aab52 Bug 1730763 - Fix containment and body-to-root propagation. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D149226
2022-06-17 10:42:52 +00:00
Mirko Brodesser 8d922ea417 Bug 1744524: part 1) Add JS code for the "Paste" menupopup to handle `ClipboardReadTextPaste` events created from the C++ side. r=edgar,Gijs
Implements showing a "Paste" popup at the last mouse position (which
overlapped the browser window) when a certain custom event is received.
Creating and dispatchting that event is implemented in one of the
following parts.

Differential Revision: https://phabricator.services.mozilla.com/D135333
2022-06-16 14:43:40 +00:00
Ryan VanderMeulen d0027d4880 Bug 1361577 - Remove unnecessary null check of mRG. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149521
2022-06-16 14:06:59 +00:00
Marian-Vasile Laza 1d24f09b38 Backed out changeset d70914c7f1f3 (bug 1730763) for causing web-platform reftest failures on direction-propagation-body-contain-root.html. CLOSED TREE 2022-06-16 15:53:24 +03:00
Emilio Cobos Álvarez 34e23753e7 Bug 1730763 - Fix containment and body-to-root propagation. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D149226
2022-06-16 08:08:08 +00:00
Lee Salzman 5cf73489a8 Bug 1769082 - Avoid divide-by-zero in Skia's luminosity blend mode. r=jrmuizel,gfx-reviewers
This applies a fix that is present in Skia's HW luminosity blend mode to its
CPU pipeline so that the luminosity mode no longer divides by zero, thus avoiding
infs and nans.

Differential Revision: https://phabricator.services.mozilla.com/D149030
2022-06-16 03:39:41 +00:00
Butkovits Atila 297c111411 Backed out changeset f292760857f2 (bug 1769082) for causing build bustages at SkRasterPipeline_opts. CLOSED TREE 2022-06-16 06:18:27 +03:00
Lee Salzman 09080ca408 Bug 1769082 - Avoid divide-by-zero in Skia's luminosity blend mode. r=jrmuizel,gfx-reviewers
This applies a fix that is present in Skia's HW luminosity blend mode to its
CPU pipeline so that the luminosity mode no longer divides by zero, thus avoiding
infs and nans.

Differential Revision: https://phabricator.services.mozilla.com/D149030
2022-06-16 02:31:24 +00:00
Daniel Holbert 1a8c790333 Bug 1524064: annotate crashtest 1547420-1.html as failing one extra assertion on Android. (no review, just a test-manifest update to reflect reality)
Differential Revision: https://phabricator.services.mozilla.com/D149460
2022-06-15 23:18:32 +00:00
Butkovits Atila f89aab0331 Backed out changeset d6ee5bae41b8 (bug 1773121) for causing Wr failures. CLOSED TREE 2022-06-15 21:18:46 +03:00
David Shin 6f8ed3fabe Bug 1773121 - If an element is relatively positioned, report overflow area that is a union of relative and static position. r=dholbert
With this, a relatively positioned element e.g. being offset to the left
should not decrease the scrollport size. For this, overflow area calculation
for relatively positioned elements must behave like
`nsIFrame::GetActualAndNormalOverflowAreasRelativeToParent`. We aren't
using the function directly since it's meant to be called post-reflow, and
we want to report it correctly during reflow in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D149156
2022-06-15 17:39:05 +00:00
Andrew McCreight a9465f49df Bug 1771383 - Null check mPrintObject in nsPrintJob::SetupToPrintContent(). r=emilio
We're seeing a lot of null crashes here. Maybe we're running script since
we last checked mPrintObject and the printer was disconnected or
something along those lines, so just add a null check.

Differential Revision: https://phabricator.services.mozilla.com/D149387
2022-06-15 13:34:11 +00:00
Iulian Moraru 9aa4db0c6d Backed out 2 changesets (bug 1730763) for causing multiple reftest failures. CLOSED TREE
Backed out changeset 350982d1a44d (bug 1730763)
Backed out changeset 392445118046 (bug 1730763)
2022-06-15 15:31:43 +03:00
Emilio Cobos Álvarez f66447dead Bug 1730763 - Fix typo that causes some reftests to fail.
Adjust some tests that are not expected to pass until we implement style
containment.

MANUAL PUSH: Trivial typo fix CLOSED TREE
2022-06-15 13:29:43 +02:00
Manuel Bucher 14dd2f26fc Bug 1761242 - Expose computing security flags for early hint preloader r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D144798
2022-06-15 09:59:44 +00:00
Emilio Cobos Álvarez 37f45fa980 Bug 1773924 - Simplify nsDeviceContext code dealing with DPI changes. r=jfkthame
This in-out parameter business used to be necessary (bug 1249279), but
we don't propagate the new widget scale to remote documents (which are
the common case now) and we seem to be doing just fine without that, so
I'm not sure why this would be needed anymore.

Also simplify some unit conversions while at it.

Differential Revision: https://phabricator.services.mozilla.com/D149032
2022-06-15 09:57:38 +00:00
Emilio Cobos Álvarez 662e5dc678 Bug 1730763 - Fix containment and body-to-root propagation. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D149226
2022-06-15 09:56:34 +00:00
Emilio Cobos Álvarez cce6544a41 Bug 1770063 - Prevent fallback backdrop filters on root. r=gfx-reviewers,gw
Much like https://searchfox.org/mozilla-central/rev/4519912ada795963299e4ba84c324adba762eff3/layout/painting/nsDisplayList.cpp#8418

Differential Revision: https://phabricator.services.mozilla.com/D149236
2022-06-15 08:56:58 +00:00
Botond Ballo 2c303ddd7c Bug 1773256 - Use ProjectPoint when transforming coordinates from parent to child in BrowserParent. r=tnikkel
This patch also backs out the incorrect fix for bug 1745834
(see comment 12 on the bug for an explanation).

Differential Revision: https://phabricator.services.mozilla.com/D149321
2022-06-15 05:29:52 +00:00
Ting-Yu Lin 4b73cd1e20 Bug 1739561 - Honor break-inside:avoid on flex containers. r=dholbert
Note this patch only prevents "break-inside:avoid" flex containers from being
broken when they are not at the top of their current page/column. When they are
at the top of their current page/column, this patch fails to help since
`nsContainerFrame::ShouldAvoidBreakInside()` returns `false` via the
`mIsTopOfPage` check. This is essentially bug 793686.

Differential Revision: https://phabricator.services.mozilla.com/D149318
2022-06-15 00:55:54 +00:00
Emily McDonough d891da0865 Bug 1774307 - Remove unused member of nsPageBreakFrame and make some variables in nsPageBreakFrame::Reflow const r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D149330
2022-06-15 00:34:02 +00:00
Razvan Cojocaru 92f59ee7ac Bug 1773382 - Change the return type of GetPaintedLayerScaleForFrame() to MatrixScales. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D148764
2022-06-14 21:54:55 +00:00
Emilio Cobos Álvarez d43049661f Bug 1773484 - Make viewport-relative units zoomable via "zoom text only". r=boris
They're not font relative, so it we probably want them to be zoomed.

Differential Revision: https://phabricator.services.mozilla.com/D148796
2022-06-14 08:38:11 +00:00
Boris Chiou 2b8751f919 Bug 1754897 - Part 4: Hook named scroll timelines to animation-timeline. r=emilio
Basically, animation-timeline could be
1. auto
2. none
3. <timeline-name>

We extend the <timeline-name> to cover both @scroll-timeline rule and
scroll-timeline-name property. We check @scroll-timeline rule first. If
it doesn't exist, we check scroll-timeline-name of the element itself,
the previous silbings, and their ancestors.

Differential Revision: https://phabricator.services.mozilla.com/D146358
2022-06-13 20:26:45 +00:00
Boris Chiou f1b5d17847 Bug 1754897 - Part 3: Support scroll-timeline shorthand in style system. r=emilio
Implement
"scroll-timeline: <'scroll-timeline-axis'> || <'scroll-timeline-name'>".

Differential Revision: https://phabricator.services.mozilla.com/D146020
2022-06-13 20:26:45 +00:00
Boris Chiou e9d0888406 Bug 1754897 - Part 2: Support scroll-timeline-axis longhand in style system. r=emilio
Implement "scroll-timeline-axis: block | inline | vertical | horizontal".

Differential Revision: https://phabricator.services.mozilla.com/D146019
2022-06-13 20:26:45 +00:00
Boris Chiou cd0ef479a6 Bug 1754897 - Part 1: Support scroll-timeline-name longhand in style system. r=emilio
Implement "scroll-timeline-name: none | <custom-ident>".

Differential Revision: https://phabricator.services.mozilla.com/D146018
2022-06-13 20:26:44 +00:00
Emilio Cobos Álvarez 10e96ff14e Bug 1773633 - Allow configuring OS zoom behavior. r=tnikkel
This is reasonably straight-forward and should allow us change the
desired behavior on platforms if / when we need.

Also, this adds tests for the feature by using the relevant float pref
(though we can't easily assert the full-zoom behavior because it changes
the size of the reftest window itself).

Differential Revision: https://phabricator.services.mozilla.com/D148902
2022-06-13 11:38:43 +00:00
Csoregi Natalia b5e25cb54f Backed out 2 changesets (bug 1773633) for causing failures on 1773633.html . CLOSED TREE
Backed out changeset a3f117c8f671 (bug 1773633)
Backed out changeset 5df8a7315ddb (bug 1773633)
2022-06-13 06:05:36 +03:00
Emilio Cobos Álvarez 4c091e90f9 Bug 1773633 - Avoid new reftests on android for now.
MANUAL PUSH: Orange fix CLOSED TREE
2022-06-13 03:22:11 +02:00
Emilio Cobos Álvarez 9fc2aa47fc Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-13 00:59:23 +00:00
Emilio Cobos Álvarez 3514929e87 Bug 1773633 - Allow configuring OS zoom behavior. r=tnikkel
This is reasonably straight-forward and should allow us change the
desired behavior on platforms if / when we need.

Also, this adds tests for the feature by using the relevant float pref
(though we can't easily assert the full-zoom behavior because it changes
the size of the reftest window itself).

Differential Revision: https://phabricator.services.mozilla.com/D148902
2022-06-13 00:05:00 +00:00
Noemi Erli 841e350bc4 Backed out changeset 7585591a9bad (bug 1773558) for causing failures in system-fonts.html 2022-06-12 19:02:33 +03:00
Emilio Cobos Álvarez e441089ca0 Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-12 10:48:58 +00:00
Ting-Yu Lin f8731e5b3c Bug 1599159 - Break the child block frame reflow loop if there is a break-before. r=emilio
This patch is based on Mats Palmgren's idea bug 1599159 comment 0.

When a child block frame reports inline-break-before status after being
reflowed, its size in the returned reflow output shouldn't matter because the
parent is expected to push it to the next page/column [1].

Here is the detail of the debug assertion if the workaround in fieldset frame is
removed. In nsBlockReflowContext::ReflowBlock(), it sets mReflowOutput::BSize()
to 0xdeadbeef, which is a negative number in 32-bits integer. Without the early
break of the loop in nsBlockFrame::ReflowBlockFrame(), then later in the loop we
are going to pass the negative block-size to
BlockReflowState::GetFloatAvailableSpaceForBSize(), which triggers a `aBSize>=0`
assertion further down in the callstack in nsFloatManager::GetFlowArea().

layout/reftests/pagination/fieldset-00G.html can trigger the above assertion
after removing the workaround in fieldset frame.

I don't expect this patch will change the behavior even if there are some float
elements interacting with this block. Without the early breaking out of the
loop, we still end up in [1].

[1] https://searchfox.org/mozilla-central/rev/ace2c59e6c56b2dcba25af1aa8903a5e7f9a5857/layout/generic/nsBlockFrame.cpp#4026-4035

Differential Revision: https://phabricator.services.mozilla.com/D148815
2022-06-11 05:53:36 +00:00
criss c6b2c5db61 Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell b3c13bf114 Bug 1772006 - Part 6: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-06-10 21:12:08 +00:00
Nika Layzell 2f4d6ae03e Bug 1772006 - Part 3: Support converting nsTStringRepr<T> to std::basic_string_view<T>, r=xpcom-reviewers,barret
This type was introduced in c++17, and can be used as a convenient standard
medium for passing around borrowed substring references. It can be implicitly
converted to from string literals and `const char_type*`, meaning that after
this change it can be used as a convenient catch-all type to replace seperate
overloads for `const self_type&`, `const char_type*` and `const
char_type(&)[N]`.

std::basic_string_view also provides standard implementations of some
algorithms which will be convenient for code cleanup in later parts of this
bug.

Differential Revision: https://phabricator.services.mozilla.com/D148297
2022-06-10 21:12:06 +00:00
Emily McDonough 190b75c8f6 Bug 1769161 Part 4 - Add test for unwriteable margin scaling with page-size mismatches r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D146603
2022-06-10 19:37:23 +00:00
Emily McDonough 9ea64aba13 Bug 1769161 Part 3 - Scale unwriteable margins and user-specified margins by the page-size scaling factor r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D148207
2022-06-10 19:37:22 +00:00
Emily McDonough f1d7bd684c Bug 1769161 Part 2 - Rename and document margin and sizing calculation for nsPageFrame margins. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D146602
2022-06-10 19:37:22 +00:00
Emily McDonough c381f19b0e Bug 1769161 Part 1 - Refactor scaling factor due to page-size for nsPageFrame to be in its own function. r=dholbert
This includes two versions of the function, one which takes an already-computed
page size to avoid computing this multiple times for a caller, and the other
which computes this value itself for convenience.

Differential Revision: https://phabricator.services.mozilla.com/D146601
2022-06-10 19:37:22 +00:00
Iulian Moraru def1c96ee0 Backed out changeset 1abceb4692e8 (bug 1768962) for causing reftest failures on partial-prerender-translate-9.html. 2022-06-10 16:57:23 +03:00
Nicolas Silva 4217d195e2 Bug 1768962 - Fix a bunch more partial-prerender tests to use blobs. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D146588
2022-06-10 09:27:05 +00:00
David Shin b176094a3b Bug 1767364: Return an incomplete reflow status for tables if they have next-in-flow with previously unflowed children. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D148140
2022-06-10 09:14:00 +00:00
Molnar Sandor 8b6a566d1f Backed out 4 changesets (bug 1769161) for causing mochitest failures in layout/base/tests/chrome/test_printpreview.xhtml CLOSED TREE
Backed out changeset d376decbcba0 (bug 1769161)
Backed out changeset a821b6bc4a18 (bug 1769161)
Backed out changeset 4ffac65dfc17 (bug 1769161)
Backed out changeset 616392cd1725 (bug 1769161)
2022-06-10 07:45:32 +03:00
Emily McDonough 674b8193c6 Bug 1769161 Part 4 - Add test for unwriteable margin scaling with page-size mismatches r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D146603
2022-06-09 23:51:08 +00:00
Emily McDonough 9850473d52 Bug 1769161 Part 3 - Scale unwriteable margins and user-specified margins by the page-size scaling factor r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D148207
2022-06-09 23:51:07 +00:00
Emily McDonough 07eeeab1e8 Bug 1769161 Part 2 - Rename and document margin and sizing calculation for nsPageFrame margins. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D146602
2022-06-09 23:51:07 +00:00
Emily McDonough 7011873dd9 Bug 1769161 Part 1 - Refactor scaling factor due to page-size for nsPageFrame to be in its own function. r=dholbert
This includes two versions of the function, one which takes an already-computed
page size to avoid computing this multiple times for a caller, and the other
which computes this value itself for convenience.

Differential Revision: https://phabricator.services.mozilla.com/D146601
2022-06-09 23:51:07 +00:00
Emilio Cobos Álvarez 40b88fe3ed Bug 1773342 - Treat text scale factor as an additional zoom factor, on both GTK and Windows. r=stransky,handyman
GTK already did this, sorta, in a platform-specific way: by hacking in the
scale factor in the CSS screen code. I think this is cleaner, since we have a
centralized place to compute the full zoom in nsPresContext, and that code path
is fairly well tested.

This also would make it trivial to make this text zoom rather than full zoom in
the future, if we wanted (which is probably _technically_ more correct, even
though less pretty less pretty).

This also allows us to remove some hacks where we were undoing the text scale
factor on Linux (since stuff like scrollbars already ignore full zoom).

Depends on D148675

Differential Revision: https://phabricator.services.mozilla.com/D148676
2022-06-09 23:02:11 +00:00
Joel Maher 490f3d046c Bug 1773523 - allow_xul_xbl support in manifests. r=mccr8,gbrown
Differential Revision: https://phabricator.services.mozilla.com/D148681
2022-06-09 19:01:01 +00:00
Emilio Cobos Álvarez d6c7207d17 Bug 1771262 - z-index should apply to menupopup frames. r=stransky
nsMenuPopupFrame initialized the view z-index to a hard-coded INT32_MAX, but
then reset it on restyles based on ZIndex() in SyncFrameViewProperties().

We specify z-index here, so use a consistent z-index all around:

  https://searchfox.org/mozilla-central/rev/ace2c59e6c56b2dcba25af1aa8903a5e7f9a5857/toolkit/content/xul.css#255-256

I suspect this is also causing that weird bug about menus going under other
menus on macOS (bug 1763990).

Differential Revision: https://phabricator.services.mozilla.com/D148762
2022-06-09 16:44:43 +00:00
Tiaan Louw 10dbaef1e0 Bug 1768535 - Rename :-moz-modal-dialog to :modal r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D148751
2022-06-09 08:58:52 +00:00
Razvan Cojocaru 1ef41e3cef Bug 1771533 - Audit usages of MatrixScalesDouble to see if using MatrixScales would make more sense in some cases. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D148498
2022-06-08 21:28:30 +00:00
Magnus Melin e9e3669c52 Bug 1772461 - Crash in [@ nsTreeSelection::TimedSelect]. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D148372
2022-06-08 20:19:19 +00:00
Molnar Sandor 1fc858a96d Backed out 5 changesets (bug 1761242, bug 1744822, bug 1761252) for causing browser-chrome failures in netwerk/test/browser/browser_103_assets.js CLOSED TREE
Backed out changeset 33cc08eb51b3 (bug 1744822)
Backed out changeset b70697d24e75 (bug 1761252)
Backed out changeset 4a5e10110c6a (bug 1761242)
Backed out changeset 7cda175b833d (bug 1761242)
Backed out changeset 4f5ed111093b (bug 1761242)
2022-06-08 18:56:35 +03:00
Manuel Bucher 35abf46688 Bug 1761242 - Expose computing security flags for early hint preloader r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D144798
2022-06-08 14:33:10 +00:00
Emilio Cobos Álvarez e37bef5dfb Bug 1772968 - nsPresContext::UpdateViewportScrollStylesOverride shouldn't look at retargeted elements. r=edgar
This is mostly an optimization since html/body can't have shadow roots
and we only care about comparing the fullscreen element against those,
but it also avoids the problematic codepath.

The issue is that we call UpdateViewportScrollStylesOverride() in the
middle of UnbindFromTree when the DOM state isn't quite stable.

Before my patch, we only did that once the top layer stack is empty, but
now we do it once for each element we pop, which means that we might hit
this codepath with a fullscreen element mid-unbind.

The following patch fixes it but this seemed worth doing anyways.

Differential Revision: https://phabricator.services.mozilla.com/D148491
2022-06-08 11:25:24 +00:00
Hiroyuki Ikezoe 20c48b14ce Bug 1771830 - Apply scroll snap in ScrollToShowRect in PresShell.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147708
2022-06-08 02:49:56 +00:00
Emilio Cobos Álvarez adc65b1456 Bug 1773070 - Rename/remove some eventState/s variables. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148558
2022-06-07 23:09:54 +00:00
Emilio Cobos Álvarez 12bd84f0c5 Bug 1773070 - While at it rename ContentStateChanged to ElementStateChanged, and make it take elements. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148553
2022-06-07 23:09:54 +00:00
Emilio Cobos Álvarez 255763ef57 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Emilio Cobos Álvarez e6f78c41b6 Bug 1772840 - Fix zoom handling in nsXULTooltipListener. r=mstange
If the tooltip node and the target node are in different documents, we'd
use the tooltip's CSS-to-dev-pixel scale to convert.

This is basically bug 1756323 but for XUL, I thought we wouldn't have
cross-document zoom like that but apparently I was wrong...

Differential Revision: https://phabricator.services.mozilla.com/D148402
2022-06-07 18:59:31 +00:00
Nicolas Silva 0d0c66fe9e Bug 1773024 - Initialize mShouldFlatten. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D148506
2022-06-07 15:05:09 +00:00
Nicolas Silva 0bfbdf273b Bug 1768650 - Turn off gfx.webrender.svg-images for a test. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D147051
2022-06-07 13:45:20 +00:00
David Shin 14611a24e8 Bug 1764126 - Part 4: Add parsing for linear easing function and gate it behind pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146839
2022-06-07 11:51:24 +00:00
Michael Kohler 0bdaaea795 Bug 1769086 - Update metadata for layout/xul/ files to not point to Firefox Menus component r=emilio DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D148352
2022-06-07 11:11:50 +00:00
Emilio Cobos Álvarez 23b07c1867 Bug 1694061 - Simplify XULResizerElement by removing the window resizing path which is dead code. r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D105988
2022-06-07 09:38:23 +00:00
Mats Palmgren f13e1725b3 Bug 1694056 - Remove (XUL) nsTitleBarFrame since it's no longer used. r=emilio
Depends on D105927

Differential Revision: https://phabricator.services.mozilla.com/D105928
2022-06-07 09:30:03 +00:00
Mats Palmgren de27d55d14 Bug 1590376 part 2 - Remove (XUL) nsResizerFrame since it serves no purpose anymore. r=emilio
Depends on D105926

Differential Revision: https://phabricator.services.mozilla.com/D105927
2022-06-07 09:30:02 +00:00
Mats Palmgren 6b2f046373 Bug 1590376 part 1 - Add a XULResizerElement and move all nsResizerFrame's event handling code there. r=ntim,smaug
I'm mostly moving the code verbatim, but I excluded a few bits
that handled resizers inside menu popup frames, e.g.
https://searchfox.org/mozilla-central/rev/7bb1cc6abf6634b2a20f71935e1e519e73402b63/layout/xul/nsResizerFrame.cpp#165-170
I don't think we need that functionallity anymore and it
simplifies the code to exclude it.

Differential Revision: https://phabricator.services.mozilla.com/D105926
2022-06-07 09:30:01 +00:00
Miko Mynttinen f655f6ea98 Bug 1772561 - Do not call RDLUtils::AssertDisplayItemUnmodified() in opt builds r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D148272
2022-06-06 22:32:19 +00:00
Butkovits Atila e3b4113a08 Backed out 4 changesets (bug 1694056, bug 1590376) for causing failures at test_resizer_ctrl_click.xhtml. CLOSED TREE
Backed out changeset 656906f99173 (bug 1590376)
Backed out changeset 15e9b4e9070c (bug 1694056)
Backed out changeset f137d6e73641 (bug 1590376)
Backed out changeset 00ed65f43cb2 (bug 1590376)
2022-06-07 02:12:40 +03:00
Mats Palmgren cd6ad5af43 Bug 1694056 - Remove (XUL) nsTitleBarFrame since it's no longer used. r=emilio
Depends on D105927

Differential Revision: https://phabricator.services.mozilla.com/D105928
2022-06-06 20:00:46 +00:00
Mats Palmgren 0715c66e3b Bug 1590376 part 2 - Remove (XUL) nsResizerFrame since it serves no purpose anymore. r=emilio
Depends on D105926

Differential Revision: https://phabricator.services.mozilla.com/D105927
2022-06-06 20:00:46 +00:00
Mats Palmgren 17801441dd Bug 1590376 part 1 - Add a XULResizerElement and move all nsResizerFrame's event handling code there. r=ntim,smaug
I'm mostly moving the code verbatim, but I excluded a few bits
that handled resizers inside menu popup frames, e.g.
https://searchfox.org/mozilla-central/rev/7bb1cc6abf6634b2a20f71935e1e519e73402b63/layout/xul/nsResizerFrame.cpp#165-170
I don't think we need that functionallity anymore and it
simplifies the code to exclude it.

Differential Revision: https://phabricator.services.mozilla.com/D105926
2022-06-06 20:00:45 +00:00
Emilio Cobos Álvarez fb05cda721 Bug 1772690 - Add a debug-only ComputedStyle::DumpMatchedRules(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D148336
2022-06-05 21:21:10 +00:00
Daniel Holbert 551202fc84 Bug 1772228: Use BehavesLikeInitialValueOnBlockAxis to broaden/optimimize a check in IntrinsicForAxis, and answer a TODO comment with an explanation in the code. r=emilio
The TODO comment (removed here) was correct that we could/should be using
BehavesLikeInitialValueOnBlockAxis instead of explicit `auto` / `none` checks
(since any value that behaves like the initial value will have the same
semantics as far as this code is concerned, in terms of not generating a
meaningful transferred constraint).

The explicit `minBSize == 0 check **is still needed** (or at least, it's still
useful), since 0 is trivially uninteresting as a transferred lower-bound, so
it's valid to exclude it from the guarded logic (and 0 is not handled by the
BehavesLikeInitialValueOnBlockAxis() check). In this patch I broaden it to
check IsDefinitelyZero(), though (to include 0%).

Hopefully the new code-comment and lambda make these checks clearer.

Differential Revision: https://phabricator.services.mozilla.com/D148079
2022-06-05 21:20:00 +00:00
Tim Nguyen d6f65f3847 Bug 1772668 - Move text-align-last reftests to WPT. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D148335
2022-06-04 13:00:53 +00:00
Emilio Cobos Álvarez 8adeaaa67f Bug 1343919 - Fix base URI in KeyframeEffect. r=birtles
This is the only meaningful consumer of
ServoCSSParser::GetParsingEnvironment right now, but seems worth fixing
before other folks add more.

Differential Revision: https://phabricator.services.mozilla.com/D148145
2022-06-04 12:49:12 +00:00
Emilio Cobos Álvarez b24faeba30 Bug 1750102 - Add an input-region-margin to widgets, and implement it on Linux. r=stransky
Recompute the input region when resizing the widget and so on, and use
it to check for rollups.

Depends on D148211

Differential Revision: https://phabricator.services.mozilla.com/D148222
2022-06-04 12:41:06 +00:00
Jonathan Kew f117f58e47 Bug 1771609 - patch 3 - Remove nsAutoLineIterator, as it no longer serves any useful purpose since the iterator is owned by the target frame. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147579
2022-06-03 22:05:36 +00:00
Jonathan Kew e0a3c0d3b2 Bug 1771609 - patch 2 - Cache the block's nsLineIterator in a property on nsBlockFrame, for better performance on large pages. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147578
2022-06-03 22:05:36 +00:00
Razvan Cojocaru f0ceea18e4 Bug 1767127 - Change the types of FilterInstance::m[UserSpaceToFilter|FilterSpaceToUser]SpaceScale to MatrixScalesDouble. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D148138
2022-06-03 19:55:30 +00:00
Emilio Cobos Álvarez 50fea61916 Bug 1770829 - Use ColorMix for interpolated colors in the computed style rather than ComplexColorRatios. r=barret
This among other things preserves the right color-space when
interpolating currentColor.

Differential Revision: https://phabricator.services.mozilla.com/D147512
2022-06-03 19:11:07 +00:00
Dan Robertson 9a05a09fb2 Bug 1760368 - Overscroll transform should not apply to fixed content. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D146825
2022-06-03 18:12:25 +00:00
Marian-Vasile Laza 30722837c1 Backed out changeset d2838baf9655 (bug 1750102) for causing bustages on nsStyleStruct.cpp by partially backing out 1750102. CLOSED TREE 2022-06-03 20:38:13 +03:00
Marian-Vasile Laza c7d153ca29 Backed out changeset c8b026cff732 (bug 1750102) for causing bc failures on browser_test_autoscrolling_in_extension_popup_window.js. CLOSED TREE 2022-06-03 20:12:55 +03:00
Emilio Cobos Álvarez 20e06ba3ee Bug 1750102 - Two minor style system fixups.
MANUAL PUSH: Trivial fixup CLOSED TREE
2022-06-03 12:58:31 +02:00
Emilio Cobos Álvarez c6c289ff2d Bug 1750102 - Add an input-region-margin to widgets, and implement it on Linux. r=stransky
Recompute the input region when resizing the widget and so on, and use
it to check for rollups.

Depends on D148211

Differential Revision: https://phabricator.services.mozilla.com/D148222
2022-06-03 10:39:13 +00:00
Emilio Cobos Álvarez 2bd192dbd0 Bug 1772432 - Remove nsWidgetInitData::mMouseTransparent. r=stransky
Instead, have the menu popup frame call SetWindowMouseTransparent (since
it needs to anyways to deal with dynamic changes).

Differential Revision: https://phabricator.services.mozilla.com/D148211
2022-06-03 09:41:39 +00:00
Emilio Cobos Álvarez b44d1c0376 Bug 1772432 - Clean up nsWidgetInitData. r=stransky
Use inline initializers, remove dead code, use consistent naming.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D148209
2022-06-03 09:41:39 +00:00
Botond Ballo 84fc68c001 Bug 1771822 - Do not explicitly set dom.visualviewport.enabled in tests. r=tnikkel
This pref is now enabled by default on all platforms.

Depends on D147810

Differential Revision: https://phabricator.services.mozilla.com/D147811
2022-06-02 22:57:56 +00:00
Daniel Holbert 8d68582b78 Bug 1772386: Improve a nsTableFrame code comment. r=dshin
DONTBUILD because this is just a code-comment change.

In particular, in this patch...
- I'm removing an XXXldb one-liner todo-comment which was suggesting something
  that we in fact now do. (At the time that this comment was added, we only
  checked `presContext->IsPaginated()`[1] and did not check for unconstrained
  available-bsize, but now we do.)
- I'm rewording the remaining comment for clarity and to fix some typos.
- I'm adding a reference to bug 1772383 which (now) covers the issue that the
  comment is alluding to.

[1] https://searchfox.org/mozilla-central/diff/31f1898810f733c40bfe3fd4b25295885feb2e39/layout/tables/nsTableFrame.cpp#2734

Differential Revision: https://phabricator.services.mozilla.com/D148148
2022-06-02 20:52:33 +00:00
Miko Mynttinen d4e8fb352d Bug 1764936 - Apply empty clip if clip-path creation fails r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D148134
2022-06-02 19:32:28 +00:00
Razvan Cojocaru b5f7d0c39f Bug 1767125 - Change the type of LayerActivity::mPreviousTransformScale to Maybe<MatrixScales>. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D148125
2022-06-02 16:08:43 +00:00
Emilio Cobos Álvarez 9349aeea85 Bug 1771796 - Remove -moz-scrollbar-thumb-proportional. r=dholbert
It unconditionally matches on all platforms, so it's not returning any useful information.

Depends on D147689

Differential Revision: https://phabricator.services.mozilla.com/D147690
2022-06-02 11:58:18 +00:00
Emilio Cobos Álvarez 01b3d97d6f Bug 1771796 - Remove useless rule. r=dholbert
This stylesheet uses the html namespace by default so it never matches.

Plus scrollbars already have cursor: default via scrollbars.css

Depends on D147687

Differential Revision: https://phabricator.services.mozilla.com/D147688
2022-06-02 10:50:32 +00:00
Olli Pettay 7cdb022402 Bug 1771718, let idle period be shorter when frame rate is very high, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D147643
2022-06-02 10:40:54 +00:00
Olli Pettay 1ced6a09b8 Bug 1771718, nsRefreshDriver::IsInHighRateMode(), r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D147642
2022-06-02 10:40:54 +00:00
Timothy Nikkel 61a79f8db6 Bug 1772284. Make ImageLoader::Notify profiler label not create extra variables on the stack. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D148103
2022-06-02 09:58:06 +00:00
Timothy Nikkel 4a902a6a3e Bug 1768593. Allow createImageBitmap to work on img elements whose src is an svg with no specified size of resizeWidth/Height is specified. r=lsalzman
Just need to pass the resizeWidth/Height down into SurfaceFromElement for html image elements so we can ask for a frame of the right size from the image.

We have to annotate the new test that I add as failing, just like all of the existing tests, because we don't yet support the resizeQuality option, so we fail that part of the test and pass all of the rest of it. The part that we are fixing here passes.

Differential Revision: https://phabricator.services.mozilla.com/D147739
2022-06-02 03:31:43 +00:00
Glenn Watson c6c8c98d80 Bug 1747184 - Update fuzziness on android config r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D148083
2022-06-02 02:55:50 +00:00
Razvan Cojocaru dab093953c Bug 1770289 - Change the return type of nsLayoutUtils::ComputeSuitableScaleForAnimation() to MatrixScales. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D147835
2022-06-01 23:19:11 +00:00
Dan Robertson 0f3ed8ae5d Bug 1772154 - Add section on the reftest analyzer to reftest docs. r=botond,mstange
Differential Revision: https://phabricator.services.mozilla.com/D147886
2022-06-01 23:16:22 +00:00
Tooru Fujisawa b458dbc7a5 Bug 1772103 - Use plain object for lazy getter in layout/tools/reftest/. r=dholbert
Depends on D147891

Differential Revision: https://phabricator.services.mozilla.com/D147892
2022-06-01 21:29:14 +00:00
Miko Mynttinen b6d4fd1365 Bug 1771929 - Add methods to copy nsDisplayList and nsDisplayListSet r=tnikkel
Also adds nsDisplayListSet::IsEmpty() and moves the list pointers in an array.

Differential Revision: https://phabricator.services.mozilla.com/D147765
2022-06-01 15:37:12 +00:00
Emilio Cobos Álvarez c282b046ac Bug 1771564 - Don't re-resolve styles of elements without frames (but with styles). r=dholbert
I noticed this while debugging some underinvalidation with the patch on
bug 1381071.

This doesn't change behavior effectively, since the style frame should
always have the element's style, but it allows us to not need style
resolution for:

 * display: contents
 * Any element before we flush layout for the first time.

So it seems worth it.

Differential Revision: https://phabricator.services.mozilla.com/D147556
2022-06-01 12:03:43 +00:00
MartinH 1fd222a2a4 Bug 1475232 - When next line selection moves to a valid frame without line iterator, drill down to a first selectable child with line iterator r=emilio
Also bug 1216483

The problem was that GetNextPrevLineFromeBlockFrame correctly identified the target frame but in case it was a flex/grid container, PeekOffsetForLine didn't accept it as a valid result due to a missing line iterator.

There was an existing case which handled this similarly for a table target, drilling into a first child with line iterator, but it was also incomplete.

Extended the drill condition for flex/grid and made the drilling algorithm more robust to be able to also crawl siblings and skip non-selectable elements (e.g. :before pseudoelement, contenteditable="false")

Differential Revision: https://phabricator.services.mozilla.com/D147752
2022-06-01 09:57:46 +00:00
Glenn Watson fffb5f1ec1 Bug 1771556 - Handle backdrop capture failing clip check when sub-graph is visible r=gfx-reviewers,lsalzman
This can happen when there is a long nested chain of backdrop-filters
and float inaccuracies cause the final capture primitive to be culled.

Differential Revision: https://phabricator.services.mozilla.com/D147704
2022-05-31 22:55:32 +00:00
Mike Hommey 2b227894ee Bug 1771993 - Fix warnings about whitelist/blocklist functions being deprecated in bindgen 0.59. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147695
2022-05-31 21:40:29 +00:00
Emilio Cobos Álvarez 27e31ed3bf Bug 1771571 - Fix include header mess between frame constructor / restyle manager. r=layout-reviewers,AlaskanEmily
RestyleManager includes nsPresContextInlines which includes
nsCSSFrameConstructor which includes RestyleManager.

Break the cycle, since turns out the later include is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D147560
2022-05-31 20:07:38 +00:00
Razvan Cojocaru 5370a472bc Bug 1767126 - Change the return type of AnimationValue::GetScaleValue() to MatrixScales. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D147575
2022-05-31 19:55:30 +00:00
Miko Mynttinen f551179ad1 Bug 1771754 - Improve display list logging r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D147665
2022-05-31 15:45:31 +00:00
Norisz Fay de34316215 Backed out changeset b4f7e56bdfbb (bug 1771754) for causing build bustages CLOSED TREE 2022-05-31 16:11:37 +03:00
Miko Mynttinen 3a52c4b85b Bug 1771754 - Improve display list logging r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D147665
2022-05-31 12:46:22 +00:00
Emilio Cobos Álvarez f9b1d27b17 Bug 1771792 - Remove some dead vibrancy code. r=mstange
Drive-by cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D147698
2022-05-31 10:43:29 +00:00
Masayuki Nakano 684a30f93f Bug 1771448 - part 4: Rename `HTMLEditor::GetActiveEditingHost` to `ComputeEditingHost` r=m_kato
It's currently computes the corresponding editing host from the focus node of
`Selection` with climbing up the DOM tree.  So, it does not just return a stored
element.  Therefore, some callers use it multiple times.  For avoiding it, we
should rename it to explain that it computes the editing host.

Note that I think that we should make it takes a node to compute editing host
without `Selection` for solving the case of no selection ranges.  Therefore,
I don't like to include more information into the name.

Differential Revision: https://phabricator.services.mozilla.com/D147504
2022-05-31 03:41:01 +00:00
Hiroyuki Ikezoe d2f6bd5b5c Bug 1312165 - Honor `scroll-snap-stop: always`. r=botond
Depends on D145851

Differential Revision: https://phabricator.services.mozilla.com/D145852
2022-05-31 00:45:12 +00:00
Hiroyuki Ikezoe 17647a8cc5 Bug 1312165 - Rewrite CalcSnapPoints::AddEdge with switch statement. r=botond
Depends on D145850

Differential Revision: https://phabricator.services.mozilla.com/D145851
2022-05-31 00:45:12 +00:00
Hiroyuki Ikezoe 43bb9dc340 Bug 1312165 - Parse scroll-snap-stop style and propagate it to APZ side. r=emilio,botond
Depends on D146147

Differential Revision: https://phabricator.services.mozilla.com/D145850
2022-05-31 00:45:11 +00:00
criss 9933879ba5 Backed out changeset 68b233bf0519 (bug 1771792) for causing xpcshell failures on test_css-properties-db.js . CLOSED TREE 2022-05-31 02:06:55 +03:00
Emilio Cobos Álvarez 22ec54e75f Bug 1771792 - Remove some dead vibrancy code. r=mstange
Drive-by cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D147698
2022-05-30 22:17:11 +00:00
Emilio Cobos Álvarez 1c2f2f9e15 Bug 1771764 - Remove 'static bound for ToShmem for Arc/ThinArc. r=dshin,layout-reviewers
It was only needed so that we could assert with TypeId::of::<T> that we
don't have duplicate values except for an exception.

Instead, fix the exception and remove the bound.

Differential Revision: https://phabricator.services.mozilla.com/D147669
2022-05-30 19:07:27 +00:00
Miko Mynttinen b72bc79cff Bug 1766650 - Store modified frames in display root frame RetainedDisplayListBuilder r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D144889
2022-05-30 14:20:58 +00:00
Emilio Cobos Álvarez f64de373aa Bug 1381071 - Cache computed styles objects display: none subtrees. r=boris
This reuses our existing undisplayed style generation, but in a
per-document rather than per-nsComputedDOMStyle object, which means that
we can avoid re-resolving styles of elements in display: none subtrees
much more often.

This brings the test-case in the bug to par with other browsers or
better, and is much simpler than the initial approach I tried back in
the day.

Differential Revision: https://phabricator.services.mozilla.com/D147547
2022-05-30 11:08:15 +00:00
Emilio Cobos Álvarez 8cd9847ba9 Bug 1771151 - Make modal dialog code more generic, and make it apply to fullscreen too behind a pref. r=edgar
For now, don't turn it on by default yet, because I want to wait for
more discussion in https://github.com/w3c/csswg-drafts/issues/6965 and
so on. But I think the code is simple enough to land this.

Differential Revision: https://phabricator.services.mozilla.com/D147295
2022-05-30 11:06:06 +00:00
Daniel Holbert 1b903958d4 Bug 1770273: Annotate reftest 1673510-1.html as reliably failing on win7 (instead of skipped). r=jfkthame
Based on the retriggers on Try, the test seems to always fail on this platform.
So let's mark it as failing instead of skipped, so that we find out if this
issue becomes fixed at some point.

Differential Revision: https://phabricator.services.mozilla.com/D147554
2022-05-29 02:54:52 +00:00
Emilio Cobos Álvarez 9c190fff4b Bug 1771564 - Constify ComputedStyle usage in nsComputedDOMStyle. r=dholbert
None of the consumer need to mutate styles, and this saves some ugly
const_casting on the next patch.

Doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D147555
2022-05-28 01:04:24 +00:00
Razvan Cojocaru 331a6fea02 Bug 1767124 - Change the return type of nsLayoutUtils::GetTransformToAncestorScaleExcludingAnimated to MatrixScalesDouble. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D147100
2022-05-27 19:23:33 +00:00
Emilio Cobos Álvarez c8ac345ec7 Bug 1769774 - Stop tracking painted PresShells. r=mstange
After bug 1730284 we don't use it for throttling iframes, so the only
remaining use the test-only nsIDOMWindowUtils.paintCount. None of the
tests using it rely on the empty transaction case, so we should be able
to just remove this.

Differential Revision: https://phabricator.services.mozilla.com/D146589
2022-05-27 11:12:19 +00:00
Emilio Cobos Álvarez 3483700fe2 Bug 1769580 - Add a terrible hack to avoid Netgear's <select>s from overflowing port numbers. r=dholbert
Not a fan of this, I'd rather not do this... A potential, maybe less
hacky alternative, would be to resolve text-indent by truncating rather
than rounding. That would effectively round down the 0.01px to zero.

Differential Revision: https://phabricator.services.mozilla.com/D146993
2022-05-27 09:37:57 +00:00
Karl Tomlinson b0862b31cc Bug 1771278 - remove unused nsIRollupListener::NotifyGeometryChange() r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D147408
2022-05-26 21:04:26 +00:00
Jonathan Kew aff17a41ed Bug 1770981 - Split the nsBlockFrame "line cursor" into separate cursors used for display-list building vs frame queries. r=layout-reviewers,Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D147203
2022-05-26 16:32:10 +00:00
Martin Robinson cac491e1fd Bug 1477524 - Update quotes and counters to work trough the flattened tree r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146693
2022-05-26 16:12:46 +00:00
Emilio Cobos Álvarez 7070b3d4dc Bug 1771211 - Set scrollbar mediator on nsXULScrollFrame. r=mstange
Just like the ScrollReflowInput constructor does for nsHTMLScrollFrame.

Differential Revision: https://phabricator.services.mozilla.com/D147419
2022-05-26 14:31:49 +00:00
Norisz Fay 28db98ade1 Backed out changeset ce66cc2cbb95 (bug 1477524) for causing build bustages on nsCounterManager.cpp CLOSED TREE 2022-05-26 15:24:40 +03:00
Martin Robinson 786890b5c4 Bug 1477524 - Update quotes and counters to work trough the flattened tree r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146693
2022-05-26 11:15:16 +00:00
Masayuki Nakano 971efcf6d8 Bug 1770684 - Mark `IMEStateManager::SetIMEState` and its callers in `IMEStateManager` as `MOZ_CAN_RUN_SCRIPT` r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D147071
2022-05-26 04:37:21 +00:00
Masayuki Nakano 77df1d2c4c Bug 1680611 - part 10: Mark `nsFocusManager::Flush*()` and their callers in `nsFocusManager` r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D147069
2022-05-26 04:37:21 +00:00
Masayuki Nakano 728f08af35 Bug 1680611 - part 8: Mark `nsFocusManager::Blur` and its callers in `nsFocusManager` as `MOZ_CAN_RUN_SCRIPT` r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D147067
2022-05-26 04:37:20 +00:00
Masayuki Nakano c8fc1057ba Bug 1680611 - part 2: Mark `nsFocusManager::SetFocusedWindowWithCallerType` and its callers in `nsFocusManager` as `MOZ_CAN_RUN_SCRIPT` r=smaug,media-playback-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D147061
2022-05-26 04:37:18 +00:00
Glenn Watson 5b096fbcd2 Bug 1769953 - Only force tile cache slice for root scroll bar. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D147370
2022-05-26 03:30:50 +00:00
Noemi Erli 71bfa628d4 Backed out changeset ce5bb779d929 (bug 1769953) for causing webrender failures in overflow-top-left.html CLOSED TREE 2022-05-26 06:14:14 +03:00
Glenn Watson 003c174717 Bug 1769953 - Only force tile cache slice for root scroll bar. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D147370
2022-05-25 22:06:40 +00:00
Emilio Cobos Álvarez 98d42ab61a Bug 1770372 - Notify with STATE_IS_DOCUMENT from RemotePrintJobParent. r=nika
This ensures we reject pending promises in PrintListenerAdapter.

Differential Revision: https://phabricator.services.mozilla.com/D147311
2022-05-25 20:56:01 +00:00
Cristian Tuns a089bcae5b Backed out changeset ad9f67e4e822 (bug 1769774) for causing build bustages after backout of Bug 1730284 CLOSED TREE 2022-05-25 16:10:08 -04:00
Brad Werth fc7d14a59a Bug 1752919: Make tiled images respect opacity applied as color. r=gw
This eliminates the need to determine when WebRender will apply opacity without a
filter, since it will now always apply opacity correctly for both tiled and untiled
images.

Differential Revision: https://phabricator.services.mozilla.com/D147102
2022-05-25 18:58:21 +00:00
Noemi Erli 97087de3d8 Backed out 2 changesets (bug 1730284) for causing devtools,web-platform and mochitest failures CLOSED TREE
Backed out changeset 98834b863104 (bug 1730284)
Backed out changeset 1ec157459e8c (bug 1730284)
2022-05-25 22:51:20 +03:00
Emilio Cobos Álvarez 7789efcab7 Bug 1769774 - Stop tracking painted PresShells. r=mstange
After bug 1730284 we don't use it for throttling iframes, so the only
remaining use the test-only nsIDOMWindowUtils.paintCount. None of the
tests using it rely on the empty transaction case, so we should be able
to just remove this.

Differential Revision: https://phabricator.services.mozilla.com/D146589
2022-05-25 17:55:17 +00:00
Emilio Cobos Álvarez 14feea4bf2 Bug 1730284 - Use whether the embedder element intersects the viewport to decide whether to throttle in-process iframes. r=smaug
This is more likely to be understandable by developers, matches other
browsers more closely (see bug comments), and seems more in-line with
what we do for OOP iframes.

Add a pref to not do this throttling at all (which would match Chrome),
though this is probably good enough for now.

Differential Revision: https://phabricator.services.mozilla.com/D146574
2022-05-25 17:54:22 +00:00
Emilio Cobos Álvarez 24252a4136 Bug 1766093 - Fix a test that was relying on a selectionchange event which no longer happens.
MANUAL PUSH: Trivial fix CLOSED TREE
2022-05-25 19:10:52 +02:00
Emilio Cobos Álvarez a8cfb8a96f Bug 1472602 - Sticky/relative position fixes in nsTableWrapperFrame. r=dholbert
Captions should be relatively-positioned (other browsers support this as
well). This ensures we correctly save their normal positions and thus
that the sticky scroll container knows how to reposition them correctly.

Avoid registering inner table frames with the sticky scroll container to
make the assertion sound in cases of sticky-positioned tables.

Differential Revision: https://phabricator.services.mozilla.com/D147092
2022-05-23 23:40:42 +00:00
Iulian Moraru 3fb8d69e14 Backed out changeset e3377838e213 (bug 1472602) for causing multiple failures related to StickyScrollContainer. CLOSED TREE 2022-05-24 01:14:50 +03:00
Emilio Cobos Álvarez 86ec9c28f7 Bug 1472602 - Sticky/relative position fixes in nsTableWrapperFrame. r=dholbert
Captions should be relatively-positioned (other browsers support this as
well). This ensures we correctly save their normal positions and thus
that the sticky scroll container knows how to reposition them correctly.

Avoid registering inner table frames with the sticky scroll container to
make the assertion sound in cases of sticky-positioned tables.

Differential Revision: https://phabricator.services.mozilla.com/D147092
2022-05-23 20:43:15 +00:00
Dmitrij Feller ba3866a5fc Bug 370035 - Remove the aWidget parameter from nsIDeviceContextSpec::Init.r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D145841
2022-05-23 19:34:40 +00:00
Emilio Cobos Álvarez fb32f0a2c2 Bug 1770729 - Fix IntersectionObserver overflow: clip on zero-sized elements. r=jwatt
I realized my fix in bug 1769512 (using IsEmpty()) wasn't quite correct
in this case, because IntersectionObserver preserves edge-inclusive
intersections.

Differential Revision: https://phabricator.services.mozilla.com/D147078
2022-05-23 13:52:48 +00:00
Emilio Cobos Álvarez b26548ebc1 Bug 1769512 - Fix partial prerender tests by preserving sketchy behavior.
See linked bug from the comment.

MANUAL PUSH: Trivial-ish orange fix CLOSED TREE
2022-05-23 11:10:53 +02:00
Emilio Cobos Álvarez 35afb9540a Bug 1769512 - Minor test tweaks.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2022-05-23 10:35:25 +02:00
Emilio Cobos Álvarez 99908fb968 Bug 1769512 - Implement overflow-clip-margin: <length>. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D146432
2022-05-23 07:21:43 +00:00
Timothy Nikkel f8e1f72acb Bug 1770109. Use ConvertImageRendererToDrawFlags in nsImageRenderer::BuildWebRenderDisplayItems too. r=aosmond
Depends on D146776

Differential Revision: https://phabricator.services.mozilla.com/D146777
2022-05-22 23:09:20 +00:00
Timothy Nikkel f735e4c4a1 Bug 1770109. Add FLAG_ASYNC_NOTIFY flag to ConvertImageRendererToDrawFlags. r=aosmond
This does not change anything as everywhere that uses ConvertImageRendererToDrawFlags goes through DrawImageInternal in nsLayoutUtils.cpp which adds the flag already. The next patch needs it though.

Depends on D146775

Differential Revision: https://phabricator.services.mozilla.com/D146776
2022-05-22 23:09:20 +00:00
Timothy Nikkel 76713f0357 Bug 1770109. Combine DrawResult in nsCSSRendering::BuildWebRenderDisplayItemsForStyleImageLayerWithSC. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D146775
2022-05-22 23:09:19 +00:00
Jonathan Watt 4d4c2e7754 Bug 1770539 p9 - Move nsPrintData::mPrintObject to nsPrintJob. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146980
2022-05-22 09:37:58 +00:00
Jonathan Watt 464b2f7e71 Bug 1770539 p8 - Centralize nulling out of nsPrintJob::mPrt. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146981
2022-05-22 09:37:58 +00:00
Jonathan Watt 617a76892b Bug 1770539 p7 - Move nsPrintData::mSelectionRoot to nsPrintJob. r=emilio
Depends on D146978

Differential Revision: https://phabricator.services.mozilla.com/D146979
2022-05-22 09:37:57 +00:00
Jonathan Watt 8827bc2beb Bug 1770539 p6 - Move nsPrintData::mPrintDocList to nsPrintJob. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146978
2022-05-22 09:37:57 +00:00
Jonathan Watt 224cfeb1b9 Bug 1770539 p5 - Move nsPrintData::mPreparingForPrint to nsPrintJob. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146977
2022-05-22 09:37:57 +00:00
Jonathan Watt 47516e9e83 Bug 1770539 p4 - Move nsPrintData::mNumPrintablePages to nsPrintJob. r=emilio
Depends on D146975

Differential Revision: https://phabricator.services.mozilla.com/D146976
2022-05-22 09:37:56 +00:00
Jonathan Watt db89857906 Bug 1770539 p3 - Move nsPrintData::mShrinkRatio to nsPrintJob::mShrinkToFitFactor. r=emilio
Depends on D146974

Differential Revision: https://phabricator.services.mozilla.com/D146975
2022-05-22 09:37:56 +00:00
Jonathan Watt c0b9f77a02 Bug 1770539 p2 - Move nsPrintData::mShrinkToFit to nsPrintJob. r=emilio
Depends on D146973

Differential Revision: https://phabricator.services.mozilla.com/D146974
2022-05-22 09:37:56 +00:00
Jonathan Watt 90a01d7930 Bug 1770539 p1 - Move nsPrintData::mPrintSettings to nsPrintJob. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146973
2022-05-22 09:37:55 +00:00
Razvan Cojocaru bf44f67f77 Bug 1767123 - Change the return type of nsLayoutUtils::GetTransformToAncestorScale to MatrixScalesDouble. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D146834
2022-05-22 01:36:29 +00:00
Botond Ballo f9a2c18bfe Bug 1743731 - Disable the 'two layers that scroll together' assertion for content being presented in a paginated way. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D146972
2022-05-21 17:52:44 +00:00
Emilio Cobos Álvarez 0076bed412 Bug 1770532 - Ensure options in listbox selects are not stacking contexts by default. r=dholbert
We could have a different property or something but this seems
reasonable as well probably.

Differential Revision: https://phabricator.services.mozilla.com/D146994
2022-05-21 17:23:24 +00:00
Jonathan Kew 607d119da5 Bug 1769965 - Create copies of the svg-glyph-objectvalue reftest with different zoom levels. r=emilio
This checks for CSS-vs-devicePixel confusion when setting "context-value" properties
for the stroke.

Differential Revision: https://phabricator.services.mozilla.com/D146887
2022-05-21 15:42:17 +00:00
Jonathan Kew ef035224b2 Bug 1769965 - Convert stroke properties (width, dashes) to device pixels when passing them to the gfxContext. r=emilio
This makes the context-value option for stroke width and dash properties in SVG glyphs work
consistently in non-1.0 devicePixelRatio situations (e.g. browser zoom, high-dpi displays).

Differential Revision: https://phabricator.services.mozilla.com/D146886
2022-05-21 15:42:16 +00:00
Timothy Nikkel dd3e9a6d5f Bug 1769939. Avoid a couple of unnecessary image decodes at intrinsic size in some cases. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D146687
2022-05-21 06:44:19 +00:00
Jonathan Watt ca15f68e8a Bug 1754308 p2 - Stop sending nsIPrintSettings.printerName to content processes. r=bobowen
This avoids exposing printer names to potentially compromised content processes.

The changes in bug 1770211 mean that we no longer create platform specific
nsIDeviceContextSpec instances in the content process, so we no longer need
the printer name to instantiate an nsDeviceContextSpecWin there.

Differential Revision: https://phabricator.services.mozilla.com/D146868
2022-05-20 22:51:00 +00:00
Jonathan Watt 43e1613319 Bug 1754308 p1 - Stop sending nsIPrintSettings.toFileName to content processes. r=bobowen
This avoids exposing the path to potentially compromised content processes.

The roundtripping of the toFileName value from RemotePrintJobParent's
mPrintSettings to the content process and then back to
RemotePrintJobParent::InitializePrintDevice was silly anyway.

Differential Revision: https://phabricator.services.mozilla.com/D146867
2022-05-20 22:50:59 +00:00
Cristian Tuns 92596a41e8 Backed out changeset c2e017726323 (bug 1769512) for causing multiple failures(wr and c1) CLOSED TREE 2022-05-20 14:46:22 -04:00
Emilio Cobos Álvarez f30dc9c25a Bug 1769512 - Implement overflow-clip-margin: <length>. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D146432
2022-05-20 17:43:58 +00:00
Cristian Tuns 102d589381 Backed out 2 changesets (bug 1769965) for causing reftest failures on svg-glyph-objectvalue.svg CLOSED TREE
Backed out changeset 27060af60766 (bug 1769965)
Backed out changeset 7fafe3b74c95 (bug 1769965)
2022-05-20 13:08:17 -04:00
Eitan Isaacson c42dbc8b0f Bug 1769640 - P1: Cache content AUPDP in DocAccessibleParents. r=morgan,emilio
This change allows us to remove the `FullZoom` multiplier and fixes text
bounds caclulations in a zoomed page.

Testing: The current browser scroll/bounds tests pass (with the
exception of fission iframes which were already broken).

Differential Revision: https://phabricator.services.mozilla.com/D146507
2022-05-20 16:39:50 +00:00
Emilio Cobos Álvarez 7184afff2f Bug 1738380 - Draw backgrounds of iframes with mismatched embedder color schemes. r=jwatt
In the future we might want to (also?) propagate the
prefers-color-scheme on the iframe like we do for the content/chrome
boundary / top browsing contexts, see:

 * https://github.com/w3c/csswg-drafts/issues/4772
 * https://github.com/w3c/csswg-drafts/issues/7213

Differential Revision: https://phabricator.services.mozilla.com/D146162
2022-05-20 15:20:34 +00:00
Emilio Cobos Álvarez 32f88974de Bug 1769512 - Support both negative and positive offsets in border radius adjustments. r=jwatt
Depends on D146430

Differential Revision: https://phabricator.services.mozilla.com/D146431
2022-05-20 15:16:39 +00:00
Jonathan Kew 77fb03eba1 Bug 1769965 - Create copies of the svg-glyph-objectvalue reftest with different zoom levels. r=emilio
This checks for CSS-vs-devicePixel confusion when setting "context-value" properties
for the stroke.

Differential Revision: https://phabricator.services.mozilla.com/D146887
2022-05-20 14:13:01 +00:00
Jonathan Kew 86a708eaeb Bug 1769965 - Convert stroke properties (width, dashes) to device pixels when passing them to the gfxContext. r=emilio
This makes the context-value option for stroke width and dash properties in SVG glyphs work
consistently in non-1.0 devicePixelRatio situations (e.g. browser zoom, high-dpi displays).

Differential Revision: https://phabricator.services.mozilla.com/D146886
2022-05-20 14:13:00 +00:00
Lee Salzman 7073f12599 Bug 1770088 - Enable accelerated Canvas2D on Linux nightly builds. r=aosmond,gfx-reviewers,jrmuizel
This toggles the gfx.canvas.accelerated pref for Linux nightly builds. This also
adds necessary fuzz to prevent reftest failures from showing up.

Differential Revision: https://phabricator.services.mozilla.com/D146762
2022-05-20 13:47:14 +00:00
Emilio Cobos Álvarez cfb2c25163 Bug 560067 - Ensure visibility tracking code doesn't choke on visibility:hidden images. r=tnikkel
visibility: hidden still goes into BuildDisplayListForChild (because
children might be visible), but the child itself might not be visible.

Differential Revision: https://phabricator.services.mozilla.com/D122117
2022-05-20 12:22:05 +00:00
Timothy Nikkel 2e15b2af1d Bug 1769195. Don't bother to try to do a partial draw of a background image if we haven't decoded any pixels. r=aosmond
The draw will be pointless, and it regresses one perf metric.

Differential Revision: https://phabricator.services.mozilla.com/D146685
2022-05-20 09:02:32 +00:00
Hiroyuki Ikezoe 13691c6ee7 Bug 1770287 - Drop `const Maybe<nsPoint>& aDestination` argument from scroll snap related functions. r=tnikkel
Since bug 1766192, we do `snap-scope` based on the snapped target point, so
the destination is no longer needed.

Depends on D146870

Differential Revision: https://phabricator.services.mozilla.com/D146871
2022-05-20 02:50:57 +00:00
Hiroyuki Ikezoe 2490428aae Bug 1770287 - Drop ScrollFrameHelper::ComputeOldScrollSnapInfo declaration. r=tnikkel
It was used for the old scroll snap implementation.

Differential Revision: https://phabricator.services.mozilla.com/D146870
2022-05-20 02:50:57 +00:00
Marian-Vasile Laza eb28874636 Backed out changeset b89afce8bbee (bug 1770088) for causing multiple reftest/web-platform failures. CLOSED TREE 2022-05-20 07:21:00 +03:00
Lee Salzman 91e5bb6355 Bug 1770088 - Enable accelerated Canvas2D on Linux nightly builds. r=aosmond,gfx-reviewers,jrmuizel
This toggles the gfx.canvas.accelerated pref for Linux nightly builds. This also
adds necessary fuzz to prevent reftest failures from showing up.

Differential Revision: https://phabricator.services.mozilla.com/D146762
2022-05-20 00:51:34 +00:00
Daniel Holbert 1e95c63554 Bug 1499459: Remove skip-if-win7 reftest annotation for an issue that seems to have gone away. r=emilio
skip-ink-multiline-position.html's annotation was added in bug 1705826, for
what was at-the-time a known and very common category of intermittent
test-failures on Win7 (with downloadable fonts mysteriously failing to render,
in pretty much any test that uses a downloadable font).

Based on the disappearance of intermittent-failure reports on bug 1499459, it
looks like this category of intermittent-failure has gone away entirely
(possibly due to some architectural change like WebRender), so we don't need to
skip that test (or any other test that was disabled for this reason) anymore.

Explaining the other change in this patch, for 1673510-1.html: this test's
annotation didn't directly reference this bug, but its comment ("test font
doesn't load reliably on win7") sounds like it was annotated for this exact
same issue.  However: it does actually still fail on Win7, if I remove the
skip-if annotation; but it appears to fail for a new/different reason. I spun
that off as bug 1770273, which I've referenced in reftest.list for this test.

Differential Revision: https://phabricator.services.mozilla.com/D146832
2022-05-19 23:25:07 +00:00
Emilio Cobos Álvarez 32257d0c50 Bug 1769771 - Improve DevTools support for constructable stylesheets. r=nchevobbe
These should be trivial fixes for the most part, just fixing assumptions
for constructable stylesheets which have no owner node. Since Gecko
internally also has the concept of "associated document", let's just use
that.

We don't have the authored text around for these. We could keep it
around but I'd kinda prefer we didn't have to just for devtools, since
it seems to me we already need to deal with rules not being there
(imagine e.g. an empty style element with all the rules inserted via
script with insertRule()). So returning the empty string should be
reasonable for now...

Writing some tests now...

Differential Revision: https://phabricator.services.mozilla.com/D146682
2022-05-19 22:32:28 +00:00
Boris Chiou 1f362db13a Bug 1739260 - Force to advance next band if we cannot get a suitable float available space. r=dholbert
Without this patch, the test case, floats-aspect-ratio-001.html, hangs because:

1. The initial float available space is correct, and its size is 100px x 50px.
   And the bfc element is "width: auto; height: auto; aspect-ratio: 1/1;".
   So its width and height depend on the available space.

2. And then, we try to get a new available area based on the height of
   the bfc element (note: its size is 100px x 100px). However, we get an
   invalid zero-width float available area which is occupied by the element
   with float:right (i.e. the pink one), in the first band, and the size of
   float available space is 0px x 100px. This makes the size of bfc element
   become 0px x 0px when checking `FloatAvoidingBlockFitsInAvailSpace()`.
   So it always fits in this float available area. And because we get two
   different available areas in the first band (i.e. same `aBCoord`), so we
   don't go into the break condition, and contine to get a new
   `childReflowInput`, and then go to the next iteration.

3. In the 2nd loop, we try to get a new float available space by the
   height of the bfc element (note: its size is 0px x 0px now because
   the width of current float available space is 0px), so the
   new float available space is 100px x 0px, and the bfc element fits in
   this available area, but again, we have two different available
   areas, so we still don't go into the break condition. Instead, we use
   the new available area to compute the childReflowInput for the next
   iteration, and now the size of the bfc element becomes 100px x 100px.
   And then we go back to the state of (2).

4. So the bfc element enters a resize oscillation due to the invalid
   float available space together with the aspect-ratio and auto sizes
   (i.e. "widht: auto; height: auto;") I think. And the invalid float
   available space also let |AvailableSpaceShrunk()| be unexpected because
   we hit an assertion: "ASSERTION: available space should not grow on the
   start side and shrink on the end side".

A possible way is to make sure we get a suitable float available area for
`floatAvoidingBlock`, so this can avoid the bfc element from entering
a resize oscillation.

Note:
1. bfc means block-formatting-context, and its variable name is
   `floatAvoidingBlock` in nsBlockFrame.cpp.
2. We don't need to check zere or positive inline size for the float
   available space because `AvailableSpaceShrunk()` should make sure we
   leave the loop properly.
   See https://phabricator.services.mozilla.com/D145524#4766290 for the
   the example when the inline size is exactly zero.

Besides, we also fix contain-inline-size-bfc-floats-001.html with this
patch.

Differential Revision: https://phabricator.services.mozilla.com/D145524
2022-05-19 20:48:42 +00:00
Jonathan Kew 23ba58da46 Bug 1743170 - Include deprecated macOS font family names in the font list, if available at runtime. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D146572
2022-05-19 18:42:39 +00:00
Emilio Cobos Álvarez 7a9ec57f96 Bug 1770151 - Constrain size for Wayland on SetPopupPosition if needed. r=stransky
Constraining only the pref size is almost fine. We also need to
constrain the anchor size when we're sized to the popup.

Differential Revision: https://phabricator.services.mozilla.com/D146809
2022-05-19 17:24:57 +00:00
Joel Maher 4645118c87 Bug 1392106 - remove obsolete reftest win7 conditions. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D146633
2022-05-19 12:27:29 +00:00
Jonathan Watt 981db60f5f Bug 1769999 - Remove the last of the nsPrintJob::mPrtPreview code. r=emilio
Since bug 1659432 landed, we no longer keep the nsPrintJob around across print
settings changes, only replacing the nsPrintData. Now that we throw away
everything on a settings change it doesn't make sense to have code that was
written for juggling nsPrintData objects. That code was just making things
difficult to understand.

Differential Revision: https://phabricator.services.mozilla.com/D146718
2022-05-19 09:38:19 +00:00
Nicolas Silva a7d698551f Bug 1768829 - Mark two intermittent tests. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D146694
2022-05-19 09:24:05 +00:00
Jonathan Watt 45fd50ca0f Bug 1769993 - Bring some sanity to nsPrintJob's scaling/shrink-to-fit logic. r=emilio
The comments and structure of this code no longer made much sense after the
last 20 years of churn, including those made in bug 1659432 and bug 1552785.

Differential Revision: https://phabricator.services.mozilla.com/D146717
2022-05-19 07:08:16 +00:00
Timothy Nikkel f1715f0643 Bug 1769935. Only do partial bg image drawing in content process. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D146686
2022-05-19 04:32:51 +00:00
Razvan Cojocaru ae67e4906d Bug 1767121 - Change the type of StackingContextHelper::mScale to MatrixScales. r=botond
Fix a minor typo while at it: "Inherrited" -> "Inherited".

Differential Revision: https://phabricator.services.mozilla.com/D146298
2022-05-19 01:45:52 +00:00
Mathew Hodson 097d33e519 Bug 1765063 - Disable mozCurrentTransform on early beta and earlier. r=lsalzman,gfx-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D143873
2022-05-19 01:07:54 +00:00
Hiroyuki Ikezoe 83f5fe2b35 Bug 1769897 - Ignore snap points orthogonal to the scroll snap axis. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D146656
2022-05-18 22:22:31 +00:00
Joel Maher e95ab8c641 Bug 1769842 - remove old osx annotations in reftest. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D146626
2022-05-18 18:57:11 +00:00
David Shin d1cd6ae125 Bug 1765668: Fix border offset when the `writing-mode` of an abspos element's containing block differs from its absolute containing block. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D146095
2022-05-18 18:09:33 +00:00
Iulian Moraru 7bc6abbc6e Backed out changeset 9273652dbd01 (bug 1769993) for causing mochitest-chrome failures on test_printpreview.xhtml. CLOSED TREE 2022-05-18 20:42:02 +03:00
Jonathan Watt b60432d3eb Bug 1769993 - Bring some sanity to nsPrintJob's scaling/shrink-to-fit logic. r=emilio
The comments and structure of this code no longer made much sense after the
last 20 years of churn, including those made in bug 1659432 and bug 1552785.

Differential Revision: https://phabricator.services.mozilla.com/D146717
2022-05-18 16:45:59 +00:00
Emilio Cobos Álvarez 382e03ceaf Bug 1769869 - Fix nsVideoFrame::ReflowFinished. r=jfkthame
ReflowFinished can happen with scripts allowed, so make sure not to
synchronously fire events, as they can fire content microtasks which
could destroy the frame.

Differential Revision: https://phabricator.services.mozilla.com/D146668
2022-05-18 16:33:25 +00:00
Mark Banner 3924c8914b Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-18 08:13:19 +00:00
Emilio Cobos Álvarez 46ca6e2712 Bug 1768285 - Clean up unused -moz-window-shadow values. r=jwatt
After bug 1768278 and bug 1767815 there's no more uses of the cliprounded value
in the tree (also it causes artifacts on HiDPI screens so we probably don't
want new usages).

The "sheet" value is unused, and the other values other than "default" and
"none" are only derived from "default", so they don't need to be exposed in the
style system.

Differential Revision: https://phabricator.services.mozilla.com/D145821
2022-05-17 23:20:48 +00:00