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

80562 Коммитов

Автор SHA1 Сообщение Дата
Marian-Vasile Laza f078cd0274 Backed out changeset 18595f6364ea (bug 1822521) for wpt failures on popover-focus-child-dialog.html. CLOSED TREE 2023-03-20 21:17:55 +02:00
Emilio Cobos Álvarez 82623a74ae Bug 1600542 - Remove nsXULScrollFrame. r=dshin
We no longer have any use of it.

Differential Revision: https://phabricator.services.mozilla.com/D172876
2023-03-20 17:19:29 +00:00
Cathie Chen 1529996e68 Bug 1822521 - Update UA stylesheet for popover. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172700
2023-03-20 17:01:11 +00:00
Emilio Cobos Álvarez e45a136429 Bug 1600542 - Remove redundant parens in ReflowInput. r=layout-reviewers,tlouw
Just minor nit I noticed while going through the code.

Depends on D172873

Differential Revision: https://phabricator.services.mozilla.com/D172874
2023-03-20 16:42:52 +00:00
Emilio Cobos Álvarez 89006f7997 Bug 1600542 - Remove no longer used nsGridContainerFrame special-case. r=layout-reviewers,tlouw
We have no more grid items being XUL boxes.

Differential Revision: https://phabricator.services.mozilla.com/D172873
2023-03-20 16:42:52 +00:00
Nika Layzell c4bc184bac Bug 1814686 - Part 1b: Add nullable annotations to refcounted types in ipdl, r=ipc-reviewers,mccr8
Manual changes to make all refcounted types be marked as `nullable` after the
changes in part 1a. This was done without any investigation into whether the
actual types want to be nullable, in order to avoid code changes.

Differential Revision: https://phabricator.services.mozilla.com/D168889
2023-03-20 15:40:37 +00:00
Robert Longson 93304f6d11 Bug 1823290 - Check for NS_FRAME_SVG_LAYOUT directly rather than checking for an SVG frame that isn't an outer SVG frame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172960
2023-03-20 12:30:45 +00:00
Dan Robertson 30e2548477 Bug 1168182 - Bind wheel event targets to wheel transactions. r=masayuki,smaug
- Create wheel transactions for wheel events handled by APZ.
 - Group wheel events with the current wheel transaction, so that all
   wheel events in a wheel transaction are fired to the same element.
 - Store the current event target for the first event in a wheel
   transaction to be used for subsequent events.
 - Add the dom.event.wheel-event-groups.enabled preference as a feature
   flag for this behavior.

Differential Revision: https://phabricator.services.mozilla.com/D163484
2023-03-20 12:19:36 +00:00
Robert Longson b868d5195c Bug 1823268 - Give SVGImageFrame its own implementation of BuildDisplayList r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172944
2023-03-20 09:13:32 +00:00
Robert Longson 4efc5e5de1 Bug 1823269 - Simplify SVGUtils::GetCanvasTM r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172948
2023-03-19 20:53:34 +00:00
Jonathan Kew 73d344d188 Bug 1823215 - Use ElementOrArray<T> to simplify the management of glyphrun(s) in gfxTextRun. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D172940
2023-03-19 16:36:06 +00:00
Tiaan Louw 03828b4c67 Bug 1822041 - Color interpolation takes none keyword into account r=emilio,layout-reviewers
Now that the none keyword is available, we can take it into account when
interpolating colors following the rules from the spec here:

https://drafts.csswg.org/css-color-4/#interpolation-missing

Differential Revision: https://phabricator.services.mozilla.com/D172666
2023-03-19 10:09:53 +00:00
Robert Longson 7fb9adef36 Bug 1823111 - increase text-shadow reftest fuzziness slightly on Android r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D172925
2023-03-19 06:13:16 +00:00
Norisz Fay 24d202aec7 Backed out changeset 7f1f3d4b0464 (bug 1823111) as requested by dev for causing reftest failures on text-shadow.svg, dynamic-text-shadow.svg CLOSED TREE 2023-03-19 07:54:59 +02:00
Robert Longson 71bd835025 Bug 1823111 - increase fuzziness slightly on Android r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D172925
2023-03-18 22:27:01 +00:00
Marian-Vasile Laza a8ccc1f226 Backed out changeset 6dc913a054e9 (bug 1822521) for bc failures on browser_parsable_css.js. CLOSED TREE 2023-03-18 16:06:04 +02:00
Cathie Chen c289513d2f Bug 1822521 - Update UA stylesheet for popover. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172700
2023-03-18 12:56:18 +00:00
Masayuki Nakano 5b59e4aeae Bug 1384606 - part 4: Make `nsIFrame::GetFrameFromDirection` allow to return content in different native anonymous subtree if the caller wants r=emilio
The a11y module wants to traverse frames in native anonymous subtrees.
Therefore, this patch adds new option for allowing it, makes
`nsIFrame::GetFrameFromDirection` check it before comparing native anonymous
subtree root nodes, and makes `HyperTextAccessible::FindOffset` use the
option.

Differential Revision: https://phabricator.services.mozilla.com/D172759
2023-03-18 04:18:53 +00:00
Masayuki Nakano 01d2fe15e1 Bug 1384606 - part 3: Make `nsPeekOffsetStruct` and its handlers treat `bool` options with an `EnumSet` r=emilio
The constructor of `nsPeekOffsetStruct` and `nsIFrame::GetFrameFromDirection`
take too many `bool` arguments.  Therefore, adding new `bool` arguments does
not make sense.  Now, we have a useful `mozilla:EnumSet` class to treat them
with an `enum class`. Therefore, let's change `nsPeekOffsetStruct` with it.

Differential Revision: https://phabricator.services.mozilla.com/D172758
2023-03-18 04:18:53 +00:00
Masayuki Nakano 1ae8b063f9 Bug 1384606 - part 2: Add automated tests for caret browsing around form controls r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172347
2023-03-18 04:18:53 +00:00
Masayuki Nakano bf5792cbac Bug 1384606 - part 1: Make `nsIFrame::GetFrameFromDirection` treat frames in different native anonymous subtree not selectable r=emilio
It's called by `PeekOffsetFor*` and `GetPrevNextBidiLevels`, so it's used for
considering whether to put caret or move a selection range boundary.
Therefore, it should treat nodes which can be managed by `Selection` as
selectable.  In theory, even if a native anonymous subtree does not have
an independent selection, its content nodes should not be the container of
the selection range boundaries of selection outside the subtree since
Selection API shouldn't expose nodes in native anonymous subtrees.  Therefore,
it can simply treat content nodes in different anonymous subtrees are not
selectable.

Note that it's not standardized that how `Selection.modify` works with various
content nodes.
https://w3c.github.io/selection-api/#dom-selection-modify

And also Chrome cannot cross generated content like form controls with this API.
This could cause web-compat issues, but it does not make sense for caret
navigation, and anyway out of scope of this bug.  Therefore, this patch just
adds the crash test.

Differential Revision: https://phabricator.services.mozilla.com/D172204
2023-03-18 04:18:52 +00:00
Emilio Cobos Álvarez a8be8e8d20 Bug 1823020 - Set mUntransformedAnchorRect for rect-anchored popups.
I missed setting mUntransformedAnchorRect in one case, causing Wayland
popups to be wrongly positioned.

Differential Revision: https://phabricator.services.mozilla.com/D172886
2023-03-17 19:26:54 +00:00
Emilio Cobos Álvarez 39aeca9d9c Bug 1449669 - Remove IsNodeOfType. r=longsonr
Depends on D172893

Differential Revision: https://phabricator.services.mozilla.com/D172894
2023-03-17 19:22:14 +00:00
Robert Longson 6fc3d48772 Bug 1781253 - GetBoundingClientRect should return the bounding rect of the text ignoring ink overflow r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D172549
2023-03-17 19:13:45 +00:00
Robert Longson 209497bfd2 Bug 1822884 - Remove eSHAPE from IsNodeOfType and replace with IsSVGGeometryElement r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172820
2023-03-17 16:26:34 +00:00
Iulian Moraru 6f60d5fa4d Backed out 4 changesets (bug 1384606) for causing mochitest browser a11y failures on browser_text_basics.js. CLOSED TREE
Backed out changeset 6f7176c0d6a3 (bug 1384606)
Backed out changeset 19c51e735059 (bug 1384606)
Backed out changeset eb8a5705b2d3 (bug 1384606)
Backed out changeset 39b202962261 (bug 1384606)
2023-03-17 10:40:53 +02:00
Masayuki Nakano 25e942f2a0 Bug 1384606 - part 4: Make `nsIFrame::GetFrameFromDirection` allow to return content in different native anonymous subtree if the caller wants r=emilio
The a11y module wants to traverse frames in native anonymous subtrees.
Therefore, this patch adds new option for allowing it, makes
`nsIFrame::GetFrameFromDirection` check it before comparing native anonymous
subtree root nodes, and makes `HyperTextAccessible::FindOffset` use the
option.

Differential Revision: https://phabricator.services.mozilla.com/D172759
2023-03-17 06:26:03 +00:00
Masayuki Nakano 9cf5036656 Bug 1384606 - part 3: Make `nsPeekOffsetStruct` and its handlers treat `bool` options with an `EnumSet` r=emilio
The constructor of `nsPeekOffsetStruct` and `nsIFrame::GetFrameFromDirection`
take too many `bool` arguments.  Therefore, adding new `bool` arguments does
not make sense.  Now, we have a useful `mozilla:EnumSet` class to treat them
with an `enum class`. Therefore, let's change `nsPeekOffsetStruct` with it.

Differential Revision: https://phabricator.services.mozilla.com/D172758
2023-03-17 06:26:03 +00:00
Masayuki Nakano 2a1ef347fb Bug 1384606 - part 2: Add automated tests for caret browsing around form controls r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172347
2023-03-17 06:26:03 +00:00
Masayuki Nakano 458f69ffc8 Bug 1384606 - part 1: Make `nsIFrame::GetFrameFromDirection` treat frames in different native anonymous subtree not selectable r=emilio
It's called by `PeekOffsetFor*` and `GetPrevNextBidiLevels`, so it's used for
considering whether to put caret or move a selection range boundary.
Therefore, it should treat nodes which can be managed by `Selection` as
selectable.  In theory, even if a native anonymous subtree does not have
an independent selection, its content nodes should not be the container of
the selection range boundaries of selection outside the subtree since
Selection API shouldn't expose nodes in native anonymous subtrees.  Therefore,
it can simply treat content nodes in different anonymous subtrees are not
selectable.

Note that it's not standardized that how `Selection.modify` works with various
content nodes.
https://w3c.github.io/selection-api/#dom-selection-modify

And also Chrome cannot cross generated content like form controls with this API.
This could cause web-compat issues, but it does not make sense for caret
navigation, and anyway out of scope of this bug.  Therefore, this patch just
adds the crash test.

Differential Revision: https://phabricator.services.mozilla.com/D172204
2023-03-17 06:26:02 +00:00
Noemi Erli 585fe519f1 Backed out 4 changesets (bug 1384606) for causing build bustage in nsFrameSelection.h CLOSED TREE
Backed out changeset 917f487fdf0f (bug 1384606)
Backed out changeset 0782f42b2a99 (bug 1384606)
Backed out changeset 22099c5efaf6 (bug 1384606)
Backed out changeset f3a38b1eac88 (bug 1384606)
2023-03-17 06:54:59 +02:00
Masayuki Nakano c2b9c4058b Bug 1384606 - part 4: Make `nsIFrame::GetFrameFromDirection` allow to return content in different native anonymous subtree if the caller wants r=emilio
The a11y module wants to traverse frames in native anonymous subtrees.
Therefore, this patch adds new option for allowing it, makes
`nsIFrame::GetFrameFromDirection` check it before comparing native anonymous
subtree root nodes, and makes `HyperTextAccessible::FindOffset` use the
option.

Depends on D172758

Differential Revision: https://phabricator.services.mozilla.com/D172759
2023-03-17 04:22:05 +00:00
Masayuki Nakano 1387f2e7bc Bug 1384606 - part 3: Make `nsPeekOffsetStruct` and its handlers treat `bool` options with an `EnumSet` r=emilio
The constructor of `nsPeekOffsetStruct` and `nsIFrame::GetFrameFromDirection`
take too many `bool` arguments.  Therefore, adding new `bool` arguments does
not make sense.  Now, we have a useful `mozilla:EnumSet` class to treat them
with an `enum class`. Therefore, let's change `nsPeekOffsetStruct` with it.

Differential Revision: https://phabricator.services.mozilla.com/D172758
2023-03-17 04:22:05 +00:00
Masayuki Nakano 3f04e976fa Bug 1384606 - part 2: Add automated tests for caret browsing around form controls r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172347
2023-03-17 04:22:05 +00:00
Masayuki Nakano c5e00ff09c Bug 1384606 - part 1: Make `nsIFrame::GetFrameFromDirection` treat frames in different native anonymous subtree not selectable r=emilio
It's called by `PeekOffsetFor*` and `GetPrevNextBidiLevels`, so it's used for
considering whether to put caret or move a selection range boundary.
Therefore, it should treat nodes which can be managed by `Selection` as
selectable.  In theory, even if a native anonymous subtree does not have
an independent selection, its content nodes should not be the container of
the selection range boundaries of selection outside the subtree since
Selection API shouldn't expose nodes in native anonymous subtrees.  Therefore,
it can simply treat content nodes in different anonymous subtrees are not
selectable.

Note that it's not standardized that how `Selection.modify` works with various
content nodes.
https://w3c.github.io/selection-api/#dom-selection-modify

And also Chrome cannot cross generated content like form controls with this API.
This could cause web-compat issues, but it does not make sense for caret
navigation, and anyway out of scope of this bug.  Therefore, this patch just
adds the crash test.

Differential Revision: https://phabricator.services.mozilla.com/D172204
2023-03-17 04:22:04 +00:00
Ting-Yu Lin f0015a059f Bug 1270891 - Don't honor forced break properties when generating flex lines. r=dholbert
This behavior was based on the old spec. See the spec changes in
https://drafts.csswg.org/css-flexbox-1/#change-201409-algo-breaks

Differential Revision: https://phabricator.services.mozilla.com/D172697
2023-03-16 23:19:10 +00:00
John Schanck f40aea4a99 Bug 1813982 - XPCOM interface to authenticator-rs. r=keeler,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D171269
2023-03-16 21:42:21 +00:00
Emily McDonough 4f8bac149f Bug 1816570 - Clear ReflowInput's mCanHaveClassABreakpoints for subtrees that have out-of-flow roots. r=dholbert
The expectations in page-name-propagated-003.html have turned out to be wrong
now that we have more correct abspos support.

We also need to check for placeholders in block reflow to actually support
named pages causing breakpoints where in-flow frames meet placeholders for out-
of-frame siblings.

Differential Revision: https://phabricator.services.mozilla.com/D170821
2023-03-16 20:01:02 +00:00
Boris Chiou c2fa109db0 Bug 1821416 - Drop the element property usage from ScrollTimelineSet. r=emilio
We are doing the following things here:
1. Rename ScrollTimelineSet to ProgressTimelineScheduler because this
   class is used to schedule animations with progress timelines, including
   scroll timelines and view timelines.
2. Drop the element property usage and let ElementAnimationData store
   ProgressTimelineScheduler.
3. We avoid using the generated content in ScrollTimeline::Scroller.
   Instead, we use a pair of Element and PseudoStyleType to represent
   ScrollTimeline::Scroller.

We hit the assertion because the generatd content may change and so we
shouldn't use it as the ScrollTimeline::Scroller.

Differential Revision: https://phabricator.services.mozilla.com/D172610
2023-03-16 20:00:00 +00:00
Emilio Cobos Álvarez da7fa43d4a Bug 1809084 - Stop using XUL layout for menu popups. r=desktop-theme-reviewers,dao,dshin
The underlying issue here is an invalidation bug with XUL layout. When a
popup opens, we try to lay it out at full size, then post a reflow
callback to constrain it.

There's an intermediate step there where the popup might remain at full
size, and the constraining operates directly on mRect, which isn't quite
sound and doesn't update the scrollport of descendants.

Make nsMenuPopupFrame inherit from nsBlockFrame instead, doing
potentially two layout passes when constrained.

This fixes the issue at hand, and removes XUL layout from menu popups,
so it's a win-win.

To make reasoning about it a bit easier, factor out a bunch of the XUL
positioning code to be const. The mutation of mRect etc which was going
on otherwise was pretty hard to reason about.

Differential Revision: https://phabricator.services.mozilla.com/D170368
2023-03-16 19:09:14 +00:00
Tiaan Louw 1da980f4b4 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-16 11:50:55 +00:00
Emilio Cobos Álvarez f0be42621d Bug 1818036 - Reset select list at a safer time. r=layout-reviewers,tnikkel
nsBlockFrame clears its line cursor at the beginning of reflow.

This test-case triggers a mix of conditions where a line iterator /
cursor can be created in the middle of reflow because of
nsListControlFrame::DidReflow triggering scrolling:

  nsLineList_const_iterator::operator=
  nsLineIterator::nsLineIterator
  nsBlockFrame::GetLineIterator
  nsIFrame::GetFrameFromDirection
  nsFrameSelection::GetPrevNextBidiLevels
  nsFrameSelection::GetPrevNextBidiLevels
  nsCaret::GetCaretFrameForNodeOffset
  nsCaret::GetFrameAndOffset
  mozilla::AccessibleCaretManager::IsCaretDisplayableInCursorMode
  mozilla::AccessibleCaretManager::UpdateCaretsForCursorMode
  mozilla::AccessibleCaretManager::UpdateCarets
  mozilla::AccessibleCaretManager::OnScrollPositionChanged
  mozilla::AccessibleCaretEventHub::NoActionState::OnScrollPositionChanged
  mozilla::AccessibleCaretEventHub::ScrollPositionChanged
  nsDocShell::NotifyScrollObservers
  mozilla::ScrollFrameHelper::ScrollToImpl
  mozilla::ScrollFrameHelper::CompleteAsyncScroll
  mozilla::ScrollFrameHelper::ScrollToWithOrigin
  mozilla::ScrollFrameHelper::ScrollTo
  nsHTMLScrollFrame::ScrollTo
  non-virtual thunk to nsHTMLScrollFrame::ScrollTo
  ScrollToShowRect
  mozilla::PresShell::ScrollFrameIntoView
  nsListControlFrame::ScrollToFrame
  nsListControlFrame::ScrollToIndex
  nsListControlFrame::ResetList
  nsListControlFrame::DidReflow
  nsLineLayout::ReflowFrame
  nsBlockFrame::ReflowInlineFrame
  nsBlockFrame::DoReflowInlineFrames
  nsBlockFrame::ReflowInlineFrames
  nsBlockFrame::ReflowLine
  nsBlockFrame::ReflowDirtyLines
  nsBlockFrame::Reflow
  nsBlockReflowContext::ReflowBlock
  nsBlockFrame::ReflowBlockFrame
  nsBlockFrame::ReflowLine

Move the scrolling to happen at a stable state instead.

Differential Revision: https://phabricator.services.mozilla.com/D171998
2023-03-16 08:20:47 +00:00
Hiroyuki Ikezoe 7efd2879ae Bug 1822433 - Snap to the scroll destination in the case of `intended-end-position` scroll operation if there's no snap target points. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D172627
2023-03-16 07:51:01 +00:00
Timothy Nikkel ed93119be4 Bug 1820708. Fix confusion between imgIContainer flags and SVGIntegrationUtils::FLAG_SYNC_DECODE_IMAGES flag. r=firefox-svg-reviewers,longsonr
This flag is only using in one place. Here is accidentally gets put into a variable that is only to be used with imgIContainer flags. They are just untyped uint32_t which allows this to happen. Noticed this by inspection while doing something else.

Differential Revision: https://phabricator.services.mozilla.com/D171826
2023-03-16 03:31:43 +00:00
Emilio Cobos Álvarez 9900adffa0 Bug 1822578 - Make flex="1" on XUL set a zero flex basis like the flex shorthand does. r=Gijs,mconley,settings-reviewers,desktop-theme-reviewers,dao
In a setup with:

<hbox>
 <something flex="1"/>
 <something-else/>
</hbox>

Before bug 1822131 <something flex="1"> ended up with flex-basis: auto,
but was the only thing able to shrink, so <something-else> stayed the
same size.

After that bug however <something-else> is able to shrink too, so both
elements shrink. This wouldn't happen if flex="1" actually worked like
flex: 1 does.

However flex: 1 causes stuff like explicit main sizes to be
(effectively) ignored, so we need to fix up a few cases where now we'd
start flexing too much. For that, add a debug assert to
nsFlexContainerFrame to catch the would-be behavior changes here.

For the most part they're actually no-op since they're setting tiny
sizes, but preferences and devtools needed a couple real fixes.

The profile selection spacer is useless (zero-size).

Hopefully the last xul.css change I need to do :')

Differential Revision: https://phabricator.services.mozilla.com/D172704
2023-03-16 00:06:29 +00:00
Marian-Vasile Laza 3cfa044456 Backed out changeset de233af59c21 (bug 1822433) for wpt failures on scroll-snap-type-on-root-element.html. 2023-03-16 01:55:48 +02:00
Marian-Vasile Laza b1bb1b3c9b Backed out changeset 160ac6b5f726 (bug 1813481) for assertion failure on nsCSSRenderingGradients.cpp. 2023-03-16 01:50:39 +02:00
Hiroyuki Ikezoe ae7c6b87c6 Bug 1822433 - Snap to the scroll destination in the case of `intended-end-position` scroll operation if there's no snap target points. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D172627
2023-03-15 21:12:59 +00:00
Tiaan Louw a7a28cf7a6 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-15 21:10:43 +00:00
Glenn Watson 6e6cfd149f Bug 1822436 - Remove `offset` from WR border-image implementation r=gfx-reviewers,lsalzman
It's not needed, as Gecko incorporates it in to the border-image rect.

Differential Revision: https://phabricator.services.mozilla.com/D172636
2023-03-15 20:51:37 +00:00
Marian-Vasile Laza d9dcca62c0 Backed out changeset 82ff06193160 (bug 1822436) for wr wrench bustages. CLOSED TREE 2023-03-15 22:34:35 +02:00
Ting-Yu Lin 9d92df5215 Bug 1822536 - Enable offset-path:ray() for crashtest 1467519.html. r=emilio
`offset-path:ray()` is used in 1467519.html, but it is enabled only on Nightly
[1]. This patch enables the feature so that the assertion can be consistently
triggered on beta.

[1] https://searchfox.org/mozilla-central/rev/47aea2f603cc18144afcedbd604a418f11e90f9b/modules/libpref/init/StaticPrefList.yaml#8626-8627,8629

Differential Revision: https://phabricator.services.mozilla.com/D172713
2023-03-15 20:13:10 +00:00
Glenn Watson 30496845a0 Bug 1822436 - Remove `offset` from WR border-image implementation r=gfx-reviewers,lsalzman
It's not needed, as Gecko incorporates it in to the border-image rect.

Differential Revision: https://phabricator.services.mozilla.com/D172636
2023-03-15 20:01:20 +00:00
Robert Longson 4264460c99 Bug 367994 - Map all SVG styles to all non-animation SVG elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172590
2023-03-15 19:13:51 +00:00
Ting-Yu Lin 0293650697 Bug 1819239 - Add script blocker to places where we assert no layout flush. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171607
2023-03-15 17:57:38 +00:00
Cosmin Sabou f87f82e3b9 Backed out changeset 77efe6b04864 (bug 367994) for causing SVGLength animation wpt failures. CLOSED TREE 2023-03-15 17:11:05 +02:00
Robert Longson 23eb98ba93 Bug 367994 - Map all SVG styles to all non-animation SVG elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172590
2023-03-15 13:27:02 +00:00
Zach Hoffman 4f5c70443d Bug 1818151 - Record attribute dependencies within the selector list of :nth-child(... of <selector list>) r=emilio
There are separate filters for IDs, classes, attribute local names, and
element state.

Also, we invalidate siblings of elements matched against the selector
list of :nth-child(... of <selector list>) by marking matched elements
with NODE_HAS_SLOW_SELECTOR_NTH_OF.

The only remaining invalidation case invalidation case is
`:nth-child(An+B of :has())` (bug 1818155), which should not block
shipping `layout.css.nth-child-of.enabled`, because :has(...) is still
being implemented (bug 418039).

Depends on D172352

Differential Revision: https://phabricator.services.mozilla.com/D171936
2023-03-15 06:56:21 +00:00
Ting-Yu Lin 5257a41f35 Bug 1821559 - Get fieldset's baseline from fieldset content, not from legend. r=dshin
This patch is to reflect the CSSWG resolution in
https://github.com/w3c/csswg-drafts/issues/7656#issuecomment-1248617134

Differential Revision: https://phabricator.services.mozilla.com/D172529
2023-03-15 05:47:44 +00:00
Zach Hoffman 2e75c9c9f6 Bug 1480746 - Apply selector flags to the shadow root r=emilio
Because restyle events cannot be posted for non-element nodes like the
shadow root, a child's siblings are restyled directly if its parent has
NODE_HAS_SLOW_SELECTOR or NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS but that
parent is the shadow root.

Drive-by, but braces were also added to some single-line "if" statements
in RestyleManager.

Differential Revision: https://phabricator.services.mozilla.com/D172352
2023-03-14 21:23:05 +00:00
Emilio Cobos Álvarez 1cd4886d06 Bug 1822236 - Flex layoutdebug urlbar after bug 1820534. r=TYLin,layout-reviewers
I didn't run the search-and-replace on the layout-debug UI :)

Differential Revision: https://phabricator.services.mozilla.com/D172557
2023-03-14 20:20:06 +00:00
Iulian Moraru 801dae8f2c Backed out 14 changesets (bug 1607634, bug 1814683, bug 1815177, bug 1814686) for causing build bustages on MaybeStorageBase. CLOSED TREE
Backed out changeset ae1c0551cea5 (bug 1815177)
Backed out changeset a11cafaa1884 (bug 1814686)
Backed out changeset 621507521762 (bug 1814686)
Backed out changeset ad692c73e381 (bug 1814686)
Backed out changeset 3be031e503dc (bug 1607634)
Backed out changeset aebbaa145d2d (bug 1607634)
Backed out changeset 9aa1f346fe14 (bug 1607634)
Backed out changeset e3eb77ad55ca (bug 1607634)
Backed out changeset e60591e5d5cf (bug 1607634)
Backed out changeset 6e43042d204a (bug 1814683)
Backed out changeset 1706e88652d6 (bug 1814683)
Backed out changeset 6878a1590e91 (bug 1814683)
Backed out changeset b1c980c834d8 (bug 1814683)
Backed out changeset 94480b82d102 (bug 1814683)
2023-03-15 01:58:36 +02:00
Nika Layzell a07f4ca7c9 Bug 1814686 - Part 1b: Add nullable annotations to refcounted types in ipdl, r=ipc-reviewers,mccr8
Manual changes to make all refcounted types be marked as `nullable` after the
changes in part 1a. This was done without any investigation into whether the
actual types want to be nullable, in order to avoid code changes.

Differential Revision: https://phabricator.services.mozilla.com/D168889
2023-03-14 19:31:41 +00:00
Ting-Yu Lin 6ec0a1cd59 Bug 1467519 - Soften a fatal assertion in nsLayoutUtils::ComputeBSizeDependentValue(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172528
2023-03-14 18:33:00 +00:00
Emilio Cobos Álvarez 7ac1570543 Bug 1684958 - Fix test_bug877690.html.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2023-03-14 14:26:51 +01:00
Emilio Cobos Álvarez ac370758b4 Bug 1822131 - Allow XUL elements to shrink-by-default. r=dholbert
Bug 1821920 and bug 1821871 are instances of an interesting behavior
change from bug 1820534.

The default flex-basis of old XUL was auto instead of max-content,
because of this code:

  https://searchfox.org/mozilla-central/rev/af78418c4b5f2c8721d1a06486cf4cf0b33e1e8d/layout/generic/nsFlexContainerFrame.cpp#1327

So stuff that used to wrap now no longer does, in an horizontal flex
container, since xul.css prevents XUL elements from shrinking.

Per the comment, a few tests relied on this, but I believe it should
generally be safe to shrink the items. This only causes to shrink if
they have an explicit width but no min-width (including min-width:
auto).

Some tests like test_mousescroll.xhtml hit this, because they have
explicit sizes but min-width: auto ends up being 0 effectively, but I
believe we should tweak those tests instead.

Differential Revision: https://phabricator.services.mozilla.com/D172462
2023-03-14 12:22:11 +00:00
Emilio Cobos Álvarez 8d249fa588 Bug 1684958 - Support rendering content: <gradient> images. r=dholbert,devtools-reviewers
We implemented support for list-style-image anyways.

Differential Revision: https://phabricator.services.mozilla.com/D172343
2023-03-14 12:11:34 +00:00
Robert Longson 83e78c1eb5 Bug 1822261 - Simplify bounds calculation for images r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172544
2023-03-14 11:47:47 +00:00
Robert Longson e7d91b29ba Bug 1820754 - Move common webrender code into SVGUtils r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171855
2023-03-14 06:31:57 +00:00
Norisz Fay 5349e0db4d Backed out 2 changesets (bug 1384606) for causing failures on test_atcaretoffset.html CLOSED TREE
Backed out changeset bfc8cf25efac (bug 1384606)
Backed out changeset b3c0fd32af16 (bug 1384606)
2023-03-14 07:25:51 +02:00
Masayuki Nakano e9c97c71d7 Bug 1384606 - Add automated tests for caret browsing around form controls r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172347
2023-03-14 04:04:13 +00:00
Masayuki Nakano 5b8469c0d5 Bug 1384606 - Make `nsIFrame::GetFrameFromDirection` treat frames in different native anonymous subtree not selectable r=emilio
It's called by `PeekOffsetFor*` and `GetPrevNextBidiLevels`, so it's used for
considering whether to put caret or move a selection range boundary.
Therefore, it should treat nodes which can be managed by `Selection` as
selectable.  In theory, even if a native anonymous subtree does not have
an independent selection, its content nodes should not be the container of
the selection range boundaries of selection outside the subtree since
Selection API shouldn't expose nodes in native anonymous subtrees.  Therefore,
it can simply treat content nodes in different anonymous subtrees are not
selectable.

Note that it's not standardized that how `Selection.modify` works with various
content nodes.
https://w3c.github.io/selection-api/#dom-selection-modify

And also Chrome cannot cross generated content like form controls with this API.
This could cause web-compat issues, but it does not make sense for caret
navigation, and anyway out of scope of this bug.  Therefore, this patch just
adds the crash test.

Differential Revision: https://phabricator.services.mozilla.com/D172204
2023-03-14 04:04:12 +00:00
Emilio Cobos Álvarez c0f66baed0 Bug 1821603 - Fix writing-mode mismatch in visibility: collapse handling. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D172438
2023-03-13 22:19:47 +00:00
Norisz Fay 0eabfe04d0 Backed out changeset e3fb28ffc489 (bug 1822131) for causing reftest failures on 540247-1.xhtml 2023-03-14 01:20:07 +02:00
CanadaHonk 3bbca01da2 Bug 1736914 - Implement prefers-reduced-transparency media query r=geckoview-reviewers,emilio,jonalmeida,ohall
Implemented the prefers-reduced-transparency media query for all
platforms.

Windows and Mac have specific settings which are used, others (Android
and Linux/GTK) have it enabled if prefers-reduced-motion is also enabled
as there is no dedicated setting to check.

Locked behind new pref `layout.css.prefers-reduced-transparency.enabled`,
off by default always for now.

Also added new WPT tests (none previously).

Demo video: https://goose.icu/firefox_prt.mp4
Test page: https://goose.icu/prefers-reduced-transparency

Differential Revision: https://phabricator.services.mozilla.com/D172424
2023-03-13 21:30:17 +00:00
Emilio Cobos Álvarez f60d745bc2 Bug 1822131 - Allow XUL elements to shrink-by-default. r=dholbert
Bug 1821920 and bug 1821871 are instances of an interesting behavior
change from bug 1820534.

The default flex-basis of old XUL was auto instead of max-content,
because of this code:

  https://searchfox.org/mozilla-central/rev/af78418c4b5f2c8721d1a06486cf4cf0b33e1e8d/layout/generic/nsFlexContainerFrame.cpp#1327

So stuff that used to wrap now no longer does, in an horizontal flex
container, since xul.css prevents XUL elements from shrinking.

Per the comment, a few tests relied on this, but I believe it should
generally be safe to shrink the items. This only causes to shrink if
they have an explicit width but no min-width (including min-width:
auto).

Some tests like test_mousescroll.xhtml hit this, because they have
explicit sizes but min-width: auto ends up being 0 effectively, but I
believe we should tweak those tests instead.

Differential Revision: https://phabricator.services.mozilla.com/D172462
2023-03-13 20:43:34 +00:00
Robert Longson 60ec046ced Bug 1820757 - SVGImageFrame::NotifySVGChanged should not rely on the base class implementation but instead do nothing at all r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171856
2023-03-13 16:57:30 +00:00
Marian-Vasile Laza ee72efd1e9 Backed out 5 changesets (bug 1809843) for causing Cargo related build bustages. CLOSED TREE
Backed out changeset 5c494680f448 (bug 1809843)
Backed out changeset 02742b38edab (bug 1809843)
Backed out changeset 2b9b32ca8294 (bug 1809843)
Backed out changeset 56631cb02ae6 (bug 1809843)
Backed out changeset 37e35a60a71f (bug 1809843)
2023-03-13 13:53:26 +02:00
Emilio Cobos Álvarez fdabf61900 Bug 1820661 - Make image-set without valid images render nothing. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D172341
2023-03-13 11:22:06 +00:00
Kershaw Chang a60df34ad0 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-13 11:12:33 +00:00
Emilio Cobos Álvarez c15931d28e Bug 1821618 - Make norolluponanchor="true" work on Wayland moved-to-rect popups. r=stransky
Use the unstransformed anchor rect to get the right original anchor
rect.

Differential Revision: https://phabricator.services.mozilla.com/D172260
2023-03-13 07:58:12 +00:00
Csoregi Natalia af78418c4b Backed out changeset 0043ebcb10f2 (bug 1821618) for causing pop-up failures. CLOSED TREE 2023-03-12 15:32:39 +02:00
Emilio Cobos Álvarez acde6df030 Bug 1821618 - Make norolluponanchor="true" work on Wayland moved-to-rect popups. r=stransky
Use the unstransformed anchor rect to get the right original anchor
rect.

Differential Revision: https://phabricator.services.mozilla.com/D172260
2023-03-12 11:57:10 +00:00
Daniel Holbert 5e1fae40b6 Bug 1821797: Don't bother storing an unused value in nsBidiPresUtils::ProcessText's "dir" local variable. r=jfkthame
This patch doesn't change behavior.

Before this patch, we're calling GetVisualRun and storing its return value (a
BidiDirection), but really we only care about the function's outparam (captured
in 'start'), and we never use the return value.

So, let's just stop capturing the return value.  This addresses a clang-tidy
automated review nit.

Differential Revision: https://phabricator.services.mozilla.com/D172325
2023-03-11 20:12:50 +00:00
Emilio Cobos Álvarez 8f0d73d3ae Bug 1821815 - Remove some unused ServoStyleConstsInlines includes. r=boris
I noticed extremely long build times when touching that file and this
helps a bit.

Differential Revision: https://phabricator.services.mozilla.com/D172344
2023-03-11 02:00:25 +00:00
Daniel Holbert 30e124c2ef Bug 1821735 part 3: Change nsBidiPresUtils::ProcessText aBidiEngine param to a reference instead of a pointer. r=jfkthame
The function requires this arg to be non-null; and at all of the callsites,
we're working with a reference or an actual instance, so there's no reason for
us to convert to a pointer at the API boundary.

Differential Revision: https://phabricator.services.mozilla.com/D172302
2023-03-10 21:58:44 +00:00
Daniel Holbert 1f9c5e8d05 Bug 1821735 part 2: Drop 'Get' prefix from 'nsPresContext::GetBidiEngine' since it's infallible. r=jfkthame
For pointer-type getters, we have a convention that a "Get" prefix implies
"warning, this might return null" , whereas lack-of-a-"Get" implies that the
return value is guaranteed to be non-null.

In the case of this `GetBidiEngine` API, this convention doesn't directly apply
since the return value isn't pointer-typed. But it's still backed by a
dynamically-allocated resource which we dereference at the return statement,
and some of the callers take the pointer-value of what's returned and pass that
along elsewhere. So it's helpful (and more concise) to drop "Get" to convey
that yes, we're sure the returned thing is indeed a real object.

Differential Revision: https://phabricator.services.mozilla.com/D172301
2023-03-10 21:58:44 +00:00
Daniel Holbert 874d57b555 Bug 1821735 part 1: Use MakeUnique to allocate UniquePtr in nsPresContext. r=jfkthame
We were previously using foo.reset(new) which technically works, but MakeUnique
is preferred, for reasons documented in UniquePtr.h, under "There are various
benefits to using MakeUnique instead of |new| expressions."

Differential Revision: https://phabricator.services.mozilla.com/D172300
2023-03-10 21:58:43 +00:00
Jonathan Kew cdd8362576 Bug 1821469 - Ensure separator characters etc are removed before calling nsBidiPresUtils::ProcessText. r=dholbert
This used to be done within ProcessText itself, but that was semi-redundant when called from Canvas2d;
so we now consistently expect the caller to have removed unwanted separator/control characters.

Differential Revision: https://phabricator.services.mozilla.com/D172286
2023-03-10 17:56:14 +00:00
Daniel Holbert 182556a3f4 Bug 1821379 part 1: Correct an obsolete 'content-visibility' keyword in the property_database.js file used by various mochitests. r=emilio
We had 'invisible', but the correct keyword (and what we have implemented) is
'hidden'.

See list of values in the spec at
https://drafts.csswg.org/css-contain-2/#content-visibility

Differential Revision: https://phabricator.services.mozilla.com/D172135
2023-03-09 20:49:33 +00:00
Emilio Cobos Álvarez 4a50082613 Bug 1820280 - Enable chrome rules in Thunderbird's about:3pane. r=aleca,dholbert
For now a static list of URIs is probably fine. I asked Nika / Gijs if
we can do something better in any case.

We already have tests for stuff not getting exposed to content.

Differential Revision: https://phabricator.services.mozilla.com/D171641
2023-03-09 20:19:08 +00:00
Emilio Cobos Álvarez 77551e3034 Bug 1817219 - Remove ContentUrlOnImageContent telemetry. r=layout-reviewers,tnikkel
Bug 1484928 is fixed, we should've removed this then.

Differential Revision: https://phabricator.services.mozilla.com/D172106
2023-03-09 11:43:41 +00:00
Emilio Cobos Álvarez 48efee8e29 Bug 1820280 - Don't proxy some principal destruction to the main thread. r=dshin
Drive-by, but nsIPrincipal is thread-safe now.

Differential Revision: https://phabricator.services.mozilla.com/D171642
2023-03-09 10:22:35 +00:00
Emilio Cobos Álvarez 1db91054d3 Bug 1787008 - Add some dumping of load notifications to a test. r=dholbert
Seems per the logs we're hanging at the beginning of the test which is a
bit surprising. Try to see if we're failing to load any browser in
particular or we're getting an unexpected notification or what not.

Differential Revision: https://phabricator.services.mozilla.com/D172054
2023-03-08 23:01:46 +00:00
Emily McDonough 2d71b994cf Bug 1820892 - Enable layout.css.allow-mixed-page-sizes through early beta r=dholbert
This also adds some basic tests to ensure we don't just crash in this
situation.

Differential Revision: https://phabricator.services.mozilla.com/D171919
2023-03-08 21:42:19 +00:00
Jonathan Kew 29b7c0030c Bug 1820988 followup, use nsDependentSubstring in the assertion, because the text may not be null-terminated.
Differential Revision: https://phabricator.services.mozilla.com/D172042
2023-03-08 20:52:42 +00:00
Dan Robertson 85fd59cea3 Bug 1758760 - Do not expire first scrollable frame displayport. r=tnikkel,botond
Do not allow the displayport for the first scrollable frame to expire.

Differential Revision: https://phabricator.services.mozilla.com/D169861
2023-03-08 18:39:04 +00:00
Jonathan Kew d4acd4cc3e Bug 1820988 - Rename ProcessOneChar to ProcessSimpleRun, and allow it to also handle purely-LTR strings. r=emilio
This is the significant change here: extend the single-character fast-path that skips
bidi processing to also handle strings that are confirmed to have no bidi content.
In such cases, we don't need to pass the text to a Bidi engine for analysis at all.

Depends on D171988

Differential Revision: https://phabricator.services.mozilla.com/D171989
2023-03-08 18:28:09 +00:00
Jonathan Kew 126501f7b5 Bug 1820988 - Use 'using' to eliminate a bunch of explicit namespace-prefix usage in nsBidiPresUtils. r=emilio
Just to reduce visual clutter in the code, for readability.

Depends on D171987

Differential Revision: https://phabricator.services.mozilla.com/D171988
2023-03-08 18:28:09 +00:00
Jonathan Kew e746d47f7e Bug 1820988 - Handle separator characters in canvas2d TextReplaceWhitespaceCharacters, to avoid a second preprocessing of the string in ProcessText. r=gfx-reviewers,aosmond
This avoids an extra string copy/scan in ProcessText, by including the block/segment
separators it cares about in the preprocessing that's already being done to normalize
whitespace characters by the caller.

Depends on D171986

Differential Revision: https://phabricator.services.mozilla.com/D171987
2023-03-08 18:28:08 +00:00
Jonathan Kew 533e50d65c Bug 1820988 - Remove unused bidiEngine parameter to CalculateBidiClass. r=emilio
This function doesn't need a Bidi engine, it just does property lookups
via the intl API. So drop the redundant parameter.

Depends on D171985

Differential Revision: https://phabricator.services.mozilla.com/D171986
2023-03-08 18:28:08 +00:00
Jonathan Kew bf79ec48b8 Bug 1820988 - The width parameter to BidiProcessor::DrawText is not used by any implementation, so remove it. r=emilio
I guess this used to be needed somewhere, but it's long dead now.
Removing the parameter makes it clear that the caller doesn't need
to compute and pass it.

Depends on D171984

Differential Revision: https://phabricator.services.mozilla.com/D171985
2023-03-08 18:28:08 +00:00
David Shin 103218a88d Bug 1798810 - Update calculation of baseline for multicolumn containers. r=layout-reviewers,TYLin
First/Last Baseline should be from highest/lowest baseline in all columns and
spanners.

Differential Revision: https://phabricator.services.mozilla.com/D171261
2023-03-08 18:21:48 +00:00
Emilio Cobos Álvarez 097eb3703e Bug 1820534 - Move front-end to modern flexbox. r=Gijs,dao,settings-reviewers,credential-management-reviewers,sgalich,devtools-reviewers,nchevobbe
Done mostly automatically via find/replace following the conversions
specified here:

  https://groups.google.com/a/mozilla.org/g/firefox-dev/c/9sGpF1TNbLk/m/QpU3oTUuAgAJ

For the most part I think the "flex: N N" usage could be simplified to
just "flex: N", but I wanted to preserve behavior (-moz-box-flex sets
both flex-grow and flex-shrink).

I changed legacy layout to also look at the order property rather than
-moz-box-ordinal-group because it made splitters and treecols easier (we
don't need to deal with both orders).

Differential Revision: https://phabricator.services.mozilla.com/D171715
2023-03-08 16:13:57 +00:00
Cristina Horotan 5e8833a881 Backed out changeset 1e6c032825f1 (bug 1798810) for wpt failures at baseline-source-last-001.html CLOSED TREE 2023-03-08 18:29:46 +02:00
Stanca Serban 923ef223cd Backed out changeset c25af897c9bc (bug 1820534) for causing reftests and mochitests failures. 2023-03-08 17:34:42 +02:00
Emilio Cobos Álvarez 57e476145f Bug 1820534 - Move front-end to modern flexbox. r=Gijs,dao,settings-reviewers,credential-management-reviewers,sgalich,devtools-reviewers,nchevobbe
Done mostly automatically via find/replace following the conversions
specified here:

  https://groups.google.com/a/mozilla.org/g/firefox-dev/c/9sGpF1TNbLk/m/QpU3oTUuAgAJ

For the most part I think the "flex: N N" usage could be simplified to
just "flex: N", but I wanted to preserve behavior (-moz-box-flex sets
both flex-grow and flex-shrink).

I changed legacy layout to also look at the order property rather than
-moz-box-ordinal-group because it made splitters and treecols easier (we
don't need to deal with both orders).

Differential Revision: https://phabricator.services.mozilla.com/D171715
2023-03-08 14:11:35 +00:00
Emilio Cobos Álvarez 6634317253 Bug 1816672 - Deal with async root element insertions in layout. r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D171578
2023-03-08 13:55:19 +00:00
David Shin 41cd3d3d5e Bug 1798810 - Update calculation of baseline for multicolumn containers. r=layout-reviewers,TYLin
First/Last Baseline should be from highest/lowest baseline in all columns and
spanners.

Differential Revision: https://phabricator.services.mozilla.com/D171261
2023-03-08 13:33:28 +00:00
Emilio Cobos Álvarez b5ab8c533c Bug 1564526 - Remove CachedBorderImageData. r=tnikkel
See comments in the bug, which still stand.

This cache is barely hit, and when it is hit it causes correctness
issues, see bug 1815022 for a recent example.

Differential Revision: https://phabricator.services.mozilla.com/D171391
2023-03-08 12:04:03 +00:00
Boris Chiou 4fa8c3ce41 Bug 1814786 - Part 6: Create timeline objects when mutating scroll-timeline property. r=emilio
And so we can lookup the timeline from TimelineCollection.

Differential Revision: https://phabricator.services.mozilla.com/D169273
2023-03-07 23:57:55 +00:00
Boris Chiou 95a2a27769 Bug 1814786 - Part 5: Factor out the conversion between (Element, PseudoStyleType) pair and Element. r=hiro
The conversions between an element (including generated content) and the
pair of element and pseudo style type are used frequently, so perhaps it'd
better to factor them out. This patch only moves functions into
AnimationUtils.

FIXME: I suspect Gecko_UpdateAnimations() should early return for the pseudo
elements which we don't support for animations. However, this may cause
some test failures, so we keep the original implementation for now.

Differential Revision: https://phabricator.services.mozilla.com/D159111
2023-03-07 23:57:55 +00:00
Boris Chiou d548aea8a2 Bug 1814786 - Part 4: Introduce TimelineCollection and TimelineManager. r=emilio
Just like how we handle the CSSAnimation and CSSTransition. We use
TimelineCollection to store the named progress timeline objects created
by scroll-timeline-name and view-timeline-name, and reuse
ElementAnimationData to handle the life time of TimelineCollection.

Also, introduce TimelineManager to update timelines generated by CSS.

We add one test which mutates the scroll-timeline-axis to make sure we
restyle the animations associtated with the existing timelines. It will
be passed when we start to use the new framework, in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D169271
2023-03-07 23:57:54 +00:00
Boris Chiou 0d72e5e0e2 Bug 1814786 - Part 2: Factor out the tree traversal part into nsAnimationManager. r=emilio
So we can reuse it for view timeline. Also, tweak the function name a
little bit so it'd be easier to use template functions.

Differential Revision: https://phabricator.services.mozilla.com/D169270
2023-03-07 23:57:53 +00:00
Emilio Cobos Álvarez 01a41fb486 Bug 1820280 - Be consistent for which URIs we expose chrome rules. r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D171640
2023-03-07 20:22:23 +00:00
Tiaan Louw c8476cb106 Bug 1817641 - Convert RGBA to AbsoluteColor for computed/animated/resolved CSS colors r=emilio
Computed color values will not be in the correct format, closer to the
one specified by the author.  This also means that colors accross the
code are stored now as AbsoluteColor or StyleAbsoluteColor.  This allows
color space/gamut information to be available for use.

Some animation related test failures had to be changed, because colors
now has greater precision.  Animated a color now causes a lot more
animation updates, which was not initially expected.  See the bug for
discussion.

Differential Revision: https://phabricator.services.mozilla.com/D171021
2023-03-07 11:28:15 +00:00
Emilio Cobos Álvarez edc3935a21 Bug 1820634 - Actually fix crashtest assert.
MANUAL PUSH: Trivial fix CLOSED TREE
2023-03-07 15:06:00 +01:00
Emilio Cobos Álvarez 8b7ddaa4df Bug 1820634 - Fix assert that triggers in 380217-1.xhtml.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2023-03-07 13:44:57 +01:00
Robert Longson 5557a8c96c Bug 1818876 - Stop calling SVGGeometryFrame::AttributeChanged in SVGImageFrame::AttributeChanged r=dholbert
The SVGGeometryFrame::AttributeChanged does not perform any useful work for image frames and the base class nsIFrame::AttributeChanged just returns NS_OK

Differential Revision: https://phabricator.services.mozilla.com/D170994
2023-03-07 11:01:04 +00:00
Emilio Cobos Álvarez 941a0e0a1c Bug 1820634 - Remove nsTreeColFrame. r=Gijs
Layout-wise it doesn't have any special code. Only weirdness is:

 * Invalidation when size changes (we can do that with a
   ResizeObserver).

 * Weird paint retargetting to the splitter, which we can fix by using
   negative margins instead and using a regular splitter.

Differential Revision: https://phabricator.services.mozilla.com/D171768
2023-03-07 10:32:32 +00:00
Timothy Nikkel b340c8b127 Bug 1820709. Make nsImageFrame use nsDisplayListBuilder::GetImageDecodeFlags. r=emilio
This will mean we always pass FLAG_SYNC_DECODE_IF_FAST (unless we are already passing the sync decode flag). The fact that we weren't doing this already is an oversight, we want to do this for all images we paint on the normal painting path. However what makes this more important is that we folded nsImageBoxFrame into nsImageFrame recently (bug 1815229), and nsImageBoxFrame eagerly decodes all its images and keeps them decoded, and also uses FLAG_SYNC_DECODE_IF_FAST (because with multiple sized decodes eager decodes don't cover everything). So this should help us avoid regressing visually with xul images.

Differential Revision: https://phabricator.services.mozilla.com/D171828
2023-03-07 10:16:46 +00:00
Timothy Nikkel 4b73051e3b Bug 1820709. Make nsDisplayAltFeedback::CreateWebRenderCommands sync decode just like nsDisplayAltFeedback::Paint. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171827
2023-03-07 10:16:02 +00:00
Mark Banner 9bbd275235 Bug 1820593 - Convert AsyncSpellCheckTestHelper to an ES module. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D171748
2023-03-07 09:40:39 +00:00
Boris Chiou 3fb6611d01 Bug 1820071 - Make <ray-size> optional and default to 'closest-side'. r=emilio
Per the spec update, the new syntax is:
  `ray() = ray( <angle> && <ray-size>? && contain? )`
And for `<ray-size>`:
  "If no <ray-size> is specified it defaults to closest-side."

So `<ray-size>` is optional and we omit it if it's default value, for
serialization.

By the way, offset=* properties are supported only in Gecko, so we don't
need a servo function to check the preference.

Differential Revision: https://phabricator.services.mozilla.com/D171625
2023-03-07 00:02:52 +00:00
Masayuki Nakano 50bfccb021 Bug 1820445 - Clean up `Selection::SelectFrames` r=jjaschke
It's little bit messy, we can make it cleaner with using
`nsIContent::FromNode` and it do null-checks safer.

Differential Revision: https://phabricator.services.mozilla.com/D171668
2023-03-06 22:34:58 +00:00
Botond Ballo 0a75e8f45a Bug 1820338 - Further fuzzing tweaks to scrollbar sizing tests. r=rzvncj
Differential Revision: https://phabricator.services.mozilla.com/D171778
2023-03-06 21:41:38 +00:00
Mark Banner 80cc721b82 Bug 1820498 - Convert PerTestCoverageUtils to an ES module. r=marco,webdriver-reviewers,perftest-reviewers,sparky,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D171689
2023-03-06 19:13:58 +00:00
Emilio Cobos Álvarez 7fea7835ba Bug 1819936 - Move legacy -moz-box collapse to its own CSS property. r=jwatt
Make display: -moz-box's visibility: collapse handling switchable by its
own CSS property.

Longer term maybe we should switch the front-end away from visibility:
collapse altogether (there are some alternatives), but for now this will
allow to move the front-end to switch to modern `display: flex` while
keeping `visibility: collapse` work as in -moz-box.

Differential Revision: https://phabricator.services.mozilla.com/D171472
2023-03-06 11:14:40 +00:00
Robert Longson 19a4826f44 Bug 1424031 - crashtest r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171655
2023-03-06 10:33:58 +00:00
Botond Ballo 0e3c8a17ac Bug 1820338 - Adjust fuzzing on overscroll-scrollbar.html. r=rzvncj
Differential Revision: https://phabricator.services.mozilla.com/D171672
2023-03-06 06:20:45 +00:00
Masayuki Nakano 9f3a55f73d Bug 1818128 - Add logging code for Selection API calls r=smaug
It's hard to check Selection API calls from both JS and internals when we debug
web apps which has complicated `contenteditable` editor.  Therefore, I'd like to
add an ability to log Selection API calls.

This patch needs to stop some methods inlined.  Therefore, this could affect to
the performance in release builds, though.  If so, I need to work on some
optimization later.

For minimizing the impact for performance, this patch also makes them to check
the logging level before calling logging methods.  It's currently redundant
for `LogLevel::Info` case.  However, this avoids any performance impact from
changes of `MOZ_LOG` implementation and in the blocks.

Differential Revision: https://phabricator.services.mozilla.com/D170585
2023-03-05 22:38:05 +00:00
Jonathan Kew 612bf9c124 Bug 1819957 - Split out nsTextPaintStyle into its own source file. r=emilio
This lets us instantiate it on the stack in nsDisplayText::Paint.

Differential Revision: https://phabricator.services.mozilla.com/D171635
2023-03-05 22:24:10 +00:00
Robert Longson 15284d9ffb Bug 1426575 - crashtest r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171656
2023-03-05 16:19:04 +00:00
Em Zhan f1f7772453 Bug 1814469 - Implement CSS exponential functions. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D170842
2023-03-05 10:42:36 +00:00
Botond Ballo 6e20a2a104 Bug 1815372 - Introduce OuterCSSPixel to represent quantities in CSS pixels of content surrounding a scroll frame. r=dlrobertson
This is currently used mostly for calculations related to scrollbars,
which are an example of content outside the scroll frame (and in
particular not subject to the zoom of a zoomable scroll frame).

As part of this change, FrameMetrics::
CalculateCompositionBoundsInCssPixelsOfSurroundingContent() is
renamed to CalculateCompositionBoundsInOuterCSSPixels() for brevity.

Differential Revision: https://phabricator.services.mozilla.com/D171142
2023-03-03 23:57:14 +00:00
Botond Ballo e62d258cad Bug 1815372 - Add a ViewAs<>() overload for casting between scales. r=dlrobertson
Depends on D171141

Differential Revision: https://phabricator.services.mozilla.com/D171528
2023-03-03 23:57:14 +00:00
Boris Chiou f9afc9203f Bug 1818666 - Support offset-position in the style system. r=emilio
Also, we make it animatable but don't apply it to the motion transform and
don't run it on the compositor for now (so it works for getComputedStyle but
doesn't have rendering result).

Per spec: https://w3c.github.io/csswg-drafts/css-values/#calc-serialize,
we tweak the WPT to let calc() serialize the percentage first, and maintain
zero-valued terms, i.e. 0%. (We are doing the same thing as
offset-anchor, so it should be fine with other browsers.)

Besides, I tweak the serialization of shorthand a little bit so we match
the implementation of WebKit.

Differential Revision: https://phabricator.services.mozilla.com/D170972
2023-03-03 23:10:34 +00:00
Jan-Niklas Jaeschke 2b90b67acd Bug 1808565, part 2: Use `SelectionBatcher` when updating Highlights. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D171371
2023-03-03 14:59:47 +00:00
Jan-Niklas Jaeschke ebf3cd6240 Bug 1808565, part 1: Adapt `Selection` to support `StaticRange`s. r=webidl,saschanaz,masayuki,smaug
This change is necessary to support the [CSS Highlight API](https://drafts.csswg.org/css-highlight-api-1/),
which uses `Selection` internally.

To replace `nsRange` with `AbstractRange`, some sections needed to be
adapted since `nsRange`-specific features were used.
Therefore, some methods (such as `GetRangeAt()`) may only be called if
the `Selection` is *not* of type `SelectionType::eHighlight`,
as it (per spec) returns an `nsRange`.
These methods will now `MOZ_ASSERT` if called for a highlight selection.
Additional methods are implemented which return `AbstractRange`
instead and are safe to be called for every selection type.

This commit also improves support of highlight features:
- Invalidation of highlight ranges: adding/removing Ranges in-place instead of
  removing and re-adding the Selection object associated with the highlight.
- Ranges are only associated with the Selection that shares the same Document
- Fixed minor IDL issue

Differential Revision: https://phabricator.services.mozilla.com/D170582
2023-03-03 14:59:47 +00:00
Jeff Muizelaar a6407ad292 Bug 1818820. Fix drawing of some blend modes with non-complex clips. r=bas
This ensures that we have our clips pushed when we expect them to.

Differential Revision: https://phabricator.services.mozilla.com/D171492
2023-03-03 11:54:49 +00:00
Botond Ballo e3c4fb73d8 Bug 1818702 - Handle a non-default device scale correctly in ScrollThumbUtils. r=rzvncj
There were two problems:

 * The line scroll amount was queried in LayoutDevice pixels
   and used as CSS pixels without applying the device scale.

 * The thumb length was rounded in CSS pixels. To match main
   thread behaviour, it needs to be rounded in LayoutDevice
   pixels.

Differential Revision: https://phabricator.services.mozilla.com/D171435
2023-03-03 06:33:00 +00:00
Brad Werth 20f25f94b8 Bug 1819502: Turn off Windows occlusion pref for another animating crashtest. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171403
2023-03-02 20:56:20 +00:00
David Shin 7eb943bb4c Bug 1819203 - Remove identical if block introduced in D169210. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171396
2023-03-02 15:53:23 +00:00
Jonathan Kew 2a37b7c81c Bug 1819726 - Handle bidi for rb and rt boxes. r=emilio
Patch proposed by Xidorn appears to work as expected. Added testcase to WPT.

Differential Revision: https://phabricator.services.mozilla.com/D171445
2023-03-02 15:52:44 +00:00
Emilio Cobos Álvarez 94b151e6ac Bug 1818799 - Tweak a debug assert to avoid crashing on disconnected refresh drivers. r=layout-reviewers,tnikkel
This kinda papers over the issue. There's a somewhat deeper problem here
where creating an <object> element inside a static document creates a
non-print presshell / pres context / etc.

But let's address the regression for now, since this is harmless and
trivial.

Differential Revision: https://phabricator.services.mozilla.com/D171370
2023-03-02 08:58:36 +00:00
Glenn Watson 3c1aea8dd2 Bug 1811978 - Enable the new tiled rendering path, update test expectations r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D167630
2023-03-02 00:58:44 +00:00
Cristian Tuns aa39d6bc20 Merge mozilla-central to autoland on a CLOSED TREE 2023-03-01 18:03:12 -05:00
Ryan VanderMeulen fdeae6aef2 Backed out changesets 38a4e166571c and 88798511f9ec (bug 1817126) for causing bug 1819724. 2023-03-01 17:52:33 -05:00
Emilio Cobos Álvarez e18c9b7ad6 Bug 1815552 - Make positioned table parts deal correctly with switching position without being reframed. r=TYLin,layout-reviewers
While looking at the backout, I noticed table parts relied on reframing
on abspos-container-ness changes in a subtle way, see the test, which
fails with the first patch of this bug applied without these changes.

Make the NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN mean the same for table parts
as for everything else. Instead, keep the registration status on each
relevant frame class individually.

Depends on D169127

Differential Revision: https://phabricator.services.mozilla.com/D170969
2023-03-01 19:04:17 +00:00
Emilio Cobos Álvarez b953328172 Bug 1815552 - Deal with table cells in the abspos cb change optimization code-path. r=dholbert
Remove an assertion that doesn't hold if we don't reframe when switching
positions.

Differential Revision: https://phabricator.services.mozilla.com/D169127
2023-03-01 19:04:16 +00:00
Emilio Cobos Álvarez f93fd7bede Bug 1695565 - Fix appearance-cssom-001.html. r=boris
* Remove some legacy appearance aliases that other engines don't
   implement.

 * Allow to pass with unimplemented <compat-auto> values, since per the
   spec the idea of these is to get them removed, see
   https://github.com/w3c/csswg-drafts/issues/8506 for the ones we don't
   implement.

 * Also allow the `-moz-` prefix to be implemented, because we can't
   quite get rid of it (people use it to remove the <input type=number>
   buttons with -moz-appearance: textfield and so on), and the
   alternative is to implement a bunch of non-standard ::-webkit-
   pseudo-elements.

Differential Revision: https://phabricator.services.mozilla.com/D171243
2023-03-01 14:43:57 +00:00
Cristina Horotan e15f3e3295 Backed out 2 changesets (bug 1815552) for causing Bp-hybrid bustages at ComputedStyle.h on a CLOSED TREE
Backed out changeset da0f9295df91 (bug 1815552)
Backed out changeset cda1ee891058 (bug 1815552)
2023-03-01 16:05:19 +02:00
Emilio Cobos Álvarez c113dedad0 Bug 1818241 - Don't let the popup manager listen to key events for mouse-activated menubar. r=Gijs
This restores the previous behavior more precisely.

Differential Revision: https://phabricator.services.mozilla.com/D171231
2023-03-01 13:03:26 +00:00
Jonathan Kew bbb315c6c5 Bug 1818654 - Don't give up on clipping to the visible rect in nsDisplayText when selection or shadow is present. r=emilio
Although I haven't been able to reproduce the reporter's OOM crash here, I hope this will avoid
the issue; it certainly improves performance characteristics in my local build.

On the example here, my laptop happily scrolls the text field at 60fps when nothing is selected;
but if the text is selected it can only manage around 40fps, because we lose the clipping
optimization here.

With this change, it maintains 60fps regardless of whether the text is selected (or text-shadow
is present), and memory footprint is substantially reduced.

Differential Revision: https://phabricator.services.mozilla.com/D171318
2023-03-01 11:37:27 +00:00
Emilio Cobos Álvarez 029e62f738 Bug 1815552 - Make positioned table parts deal correctly with switching position without being reframed. r=TYLin,layout-reviewers
While looking at the backout, I noticed table parts relied on reframing
on abspos-container-ness changes in a subtle way, see the test, which
fails with the first patch of this bug applied without these changes.

Make the NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN mean the same for table parts
as for everything else. Instead, keep the registration status on each
relevant frame class individually.

Depends on D169127

Differential Revision: https://phabricator.services.mozilla.com/D170969
2023-03-01 10:36:54 +00:00
Emilio Cobos Álvarez f8fdfae384 Bug 1815552 - Deal with table cells in the abspos cb change optimization code-path. r=dholbert
Remove an assertion that doesn't hold if we don't reframe when switching
positions.

Differential Revision: https://phabricator.services.mozilla.com/D169127
2023-03-01 10:36:54 +00:00
Ting-Yu Lin 8661b970a1 Bug 1819211 - Revise documentation in Baseline.h. r=emilio
The documentation for these functions might be missed when these functions was
moved from nsIFrame.h to Baseline.h in
https://hg.mozilla.org/mozilla-central/rev/fbf495c37e23.

I also revise the documentation because the old ones might be wrong. Here are
some corrections.

1. An alphabetical "first"/"last" baseline should always be at the end edge
   of a margin/border/content-box.
2. SynthesizeBOffsetFromBorderBox() works when aFrame's writing-mode is
   orthogonal to aWM, but the other two functions are not.

Differential Revision: https://phabricator.services.mozilla.com/D171189
2023-03-01 03:50:04 +00:00
Ting-Yu Lin 19a0c5fb59 Bug 1819211 - Export Baseline.h under mozilla. r=emilio
It is because `Baseline` is a utility class under `namespace mozilla`.

Also change the include guard to match the coding style.
https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html#header-files

Differential Revision: https://phabricator.services.mozilla.com/D171162
2023-03-01 03:50:03 +00:00
Hiroyuki Ikezoe e458d4423f Bug 1817126 - Implement GetUnsnappedLayoutScrollRange and use it in WantAsyncScroll. r=tnikkel
Depends on D170465

Differential Revision: https://phabricator.services.mozilla.com/D170466
2023-03-01 03:11:37 +00:00
Hiroyuki Ikezoe c99ede580d Bug 1817126 - Revert bug 1745969 mainly. r=tnikkel
I didn't revert some tweaks for tests (e.g. allowing small fractional scroll
position differences) since we will end up allowing the differences until
we fixed all rounding/snapping scroll related metrics issue, bug 1774315 for
example.

Differential Revision: https://phabricator.services.mozilla.com/D170465
2023-03-01 03:11:37 +00:00
Marian-Vasile Laza 6c1f72e279 Backed out 2 changesets (bug 1817126) for wpt failures on scrollable-overflow-zero-one-axis.html. CLOSED TREE
Backed out changeset 1a1fa9a635b8 (bug 1817126)
Backed out changeset 0a1f7b5bed45 (bug 1817126)
2023-03-01 04:51:48 +02:00
Brad Werth 75eeec6a99 Bug 1768495 Part 4: Disable window occlusion tracker pref on crashtests that rely on a running compositor. r=emilio
These crashtests rely upon either a requestAnimationFrame callback or a
MozAfterPaint event. Those currently won't happen when the compositor is
paused, and on Windows these crashtests are occluded, which will now pause
the compositor. To deal with this, we disable the occlusion tracking pref
on Windows. Other platforms seem not to treat the crashtests as occluded,
so their compositors keep running.

Differential Revision: https://phabricator.services.mozilla.com/D171137
2023-02-28 23:04:54 +00:00
Hiroyuki Ikezoe bf9d5b4f09 Bug 1817126 - Implement GetUnsnappedLayoutScrollRange and use it in WantAsyncScroll. r=tnikkel
Depends on D170465

Differential Revision: https://phabricator.services.mozilla.com/D170466
2023-02-28 22:19:24 +00:00
Hiroyuki Ikezoe bf04fe1d36 Bug 1817126 - Revert bug 1745969 mainly. r=tnikkel
I didn't revert some tweaks for tests (e.g. allowing small fractional scroll
position differences) since we will end up allowing the differences until
we fixed all rounding/snapping scroll related metrics issue, bug 1774315 for
example.

Differential Revision: https://phabricator.services.mozilla.com/D170465
2023-02-28 22:19:24 +00:00
Daniel Holbert 25409964a2 Bug 1818157: Backout changeset 510d250fd545 (bug 1814398) and e44b3ab61ae4 (bug 1817212) for introducing a performance regression. CLOSED TREE 2023-02-28 11:23:00 -08:00
Sean Feng bce711cba8 Bug 1809518 - Update test_css_cross_domain.html based on the status of ORB r=farre
This test send some cross origin no-cors requests and expect
the color of the element will be changed via CSS by reading
the response of these requests.

With ORB's JS validator is enabled, some of the requests are
going to be blocked.

This patch allows the test to test the result for both ORB
enabled and ORB disabled.

Differential Revision: https://phabricator.services.mozilla.com/D169279
2023-02-28 19:46:10 +00:00
Marian-Vasile Laza c39ea4a713 Backed out 15 changesets (bug 1809518) for wpt failures on navigation-headers.https.html.
Backed out changeset d245efcf2257 (bug 1809518)
Backed out changeset 3f29ad282371 (bug 1809518)
Backed out changeset 8f77fb0ddfef (bug 1809518)
Backed out changeset b1f9dcd5f147 (bug 1809518)
Backed out changeset eda8f3ef3fdb (bug 1809518)
Backed out changeset 85f4c2ca24e0 (bug 1809518)
Backed out changeset 92b774c122c9 (bug 1809518)
Backed out changeset b6e6065c79ff (bug 1809518)
Backed out changeset 724a5c7bba6a (bug 1809518)
Backed out changeset 224ccbc28c49 (bug 1809518)
Backed out changeset cc88d68be920 (bug 1809518)
Backed out changeset c02d3f25c880 (bug 1809518)
Backed out changeset 597cb423049d (bug 1809518)
Backed out changeset ae56071e154f (bug 1809518)
Backed out changeset 563403090c7f (bug 1809518)
2023-02-28 20:42:23 +02:00
Sean Feng fc67e7f4a2 Bug 1809518 - Update test_css_cross_domain.html based on the status of ORB r=farre
This test send some cross origin no-cors requests and expect
the color of the element will be changed via CSS by reading
the response of these requests.

With ORB's JS validator is enabled, some of the requests are
going to be blocked.

This patch allows the test to test the result for both ORB
enabled and ORB disabled.

Differential Revision: https://phabricator.services.mozilla.com/D169279
2023-02-28 15:28:03 +00:00
Jonathan Kew 81d930a594 Bug 1819025 - Don't consider following join-controls when determining whether a space is collapsible. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171061
2023-02-28 09:58:36 +00:00
Hiroyuki Ikezoe 9d1e021d6b Bug 1762255 - Convert MobileViewport intrinric size to app units and use it in the comparison. r=botond,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D169288
2023-02-28 02:54:05 +00:00
Andrew McCreight d1df6bfde4 Bug 1818859 - Skip nsComputedDOMStyle in the CC when it has no outgoing edges. r=smaug DONTBUILD
At least one page creates a lot of these, and it really slows down the CC.

If the style has a black wrapper, that case is already covered
by the existing HasKnownLiveWrapper.

Differential Revision: https://phabricator.services.mozilla.com/D170970
2023-02-27 21:32:22 +00:00
Dan Robertson 73fa554e54 Bug 1743045 - Respect general.smoothScroll for programmatic scrolls. r=hiro
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D170110
2023-02-27 21:09:06 +00:00
Fred Chasen f634a8806d Bug 1793220 - Handle at-page size rules that use zero as width or height r=dholbert
Setting an at-page size where the width or height is zero is valid CSS but is unprintable, so a size with zero in it will be ignored with this change.

Differential Revision: https://phabricator.services.mozilla.com/D167624
2023-02-27 20:22:18 +00:00
Fred Chasen 42c8df00ac Bug 1793220 - Use at-page size rule as paper size when printing to PDF r=dholbert,AlaskanEmily
Adds a usePageRuleSizeAsPaperSize setting to allow overriding the default paper size when printing to a PDF file.

Print preview now checks for at-page size rules and when enabled will use that size for the previewed sheet of paper.

The preview will also return the page width and height (in inches) during its callback for the frontend to use to override the default paper settings.

Differential Revision: https://phabricator.services.mozilla.com/D160303
2023-02-27 20:22:18 +00:00
Cristina Horotan 85492923e1 Bug 1765788 - disable test_bug632379.xhtml on win for frequent failures. r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D171086
2023-02-27 14:05:00 +00:00
David Shin 2be6246f15 Bug 1772305 - Allow auto margins of abspos boxes to be negative if both in-axis insets are non-auto. r=emilio
Currently, when an inset is large enough that auto margins would distribute a
negative value, we always clamp it to zero. This works for scenarios where
at least one of the insets in the relevant axis was auto, since the spec
resolves the auto margin to be zero in this case. However, the spec does not
disallow a negative auto margin value when both insets are non-auto.

Differential Revision: https://phabricator.services.mozilla.com/D170931
2023-02-27 14:01:26 +00:00
Emilio Cobos Álvarez 22b93499fa Bug 1818811 - Make -moz-box-layout: flex default, and clean-up CSS. r=Gijs,extension-reviewers,settings-reviewers,desktop-theme-reviewers,dao
Now it's on by default everywhere, so all this is not needed. No behavior
change effectively since the xul.css bits being removed effectively achieve the
same.

Differential Revision: https://phabricator.services.mozilla.com/D170944
2023-02-27 12:41:13 +00:00
Emilio Cobos Álvarez 60d1843825 Bug 1818927 - Don't use collapsed attribute to hide thumb. r=dholbert
Explicitly set visibility on the thumb instead. This will help to remove
the thumb element altogether, potentially (and it's simpler anyhow).

Differential Revision: https://phabricator.services.mozilla.com/D171013
2023-02-27 10:03:52 +00:00
Emilio Cobos Álvarez 755b25a9cf Bug 1818927 - Remove minimal-xul.css. r=dholbert
No longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D171012
2023-02-27 10:03:51 +00:00
Emilio Cobos Álvarez 2aa048e90f Bug 1818927 - Remove XUL clickthrough attribute. r=dholbert
It only has an effect on macOS, and it's only used for
scrollbars/resizers/trees. We already hard-coded <browser>
to behave as never so do the same consistently, see bug 1519905.

This reduces noise when inspecting scrollbars (and it's simpler).

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D171011
2023-02-27 10:03:51 +00:00
Emilio Cobos Álvarez e452460ff3 Bug 1818927 - Remove unused rule from scrollbars.css. r=dholbert
value="hidden" is never set by native code on a scrollbar.

Differential Revision: https://phabricator.services.mozilla.com/D171010
2023-02-27 10:03:50 +00:00
Emilio Cobos Álvarez 90b44d9da3 Bug 1818927 - Minor consistency improvements in scrollbars.css. r=dholbert
No behavior change, just cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D171009
2023-02-27 10:03:50 +00:00
Emilio Cobos Álvarez 382eca8d53 Bug 1818927 - Move scrollbar-related rules from minimal-xul.css to scrollbars.css. r=dholbert
No behavior change, both these sheets get loaded in all pages
unconditionally, and the new order matches the order they get
loaded in.

Differential Revision: https://phabricator.services.mozilla.com/D171008
2023-02-27 10:03:50 +00:00
Norisz Fay feb7ac30db Backed out 6 changesets (bug 1818927) for causing bc failurs on browser_parsable_css.js CLOSED TREE
Backed out changeset 02c5f8c116b5 (bug 1818927)
Backed out changeset 6cf817fdd398 (bug 1818927)
Backed out changeset 0f0342ee4149 (bug 1818927)
Backed out changeset 4f944842cde4 (bug 1818927)
Backed out changeset 08ad4bea30d6 (bug 1818927)
Backed out changeset f50bb20ae41d (bug 1818927)
2023-02-27 02:49:46 +02:00
Emilio Cobos Álvarez 4bc0213723 Bug 1818927 - Don't use collapsed attribute to hide thumb. r=dholbert
Explicitly set visibility on the thumb instead. This will help to remove
the thumb element altogether, potentially (and it's simpler anyhow).

Differential Revision: https://phabricator.services.mozilla.com/D171013
2023-02-26 23:09:21 +00:00
Emilio Cobos Álvarez 7d1f38cdfa Bug 1818927 - Remove minimal-xul.css. r=dholbert
No longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D171012
2023-02-26 23:09:20 +00:00
Emilio Cobos Álvarez 8d3a1d6473 Bug 1818927 - Remove XUL clickthrough attribute. r=dholbert
It only has an effect on macOS, and it's only used for
scrollbars/resizers/trees. We already hard-coded <browser>
to behave as never so do the same consistently, see bug 1519905.

This reduces noise when inspecting scrollbars (and it's simpler).

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D171011
2023-02-26 23:09:20 +00:00
Emilio Cobos Álvarez 048ea76691 Bug 1818927 - Remove unused rule from scrollbars.css. r=dholbert
value="hidden" is never set by native code on a scrollbar.

Differential Revision: https://phabricator.services.mozilla.com/D171010
2023-02-26 23:09:19 +00:00
Emilio Cobos Álvarez dd7501e5be Bug 1818927 - Minor consistency improvements in scrollbars.css. r=dholbert
No behavior change, just cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D171009
2023-02-26 23:09:19 +00:00
Emilio Cobos Álvarez 70c054eacf Bug 1818927 - Move scrollbar-related rules from minimal-xul.css to scrollbars.css. r=dholbert
No behavior change, both these sheets get loaded in all pages
unconditionally, and the new order matches the order they get
loaded in.

Differential Revision: https://phabricator.services.mozilla.com/D171008
2023-02-26 23:09:19 +00:00
Jonathan Kew 0489bf676d Bug 1818924 - Adjust fuzzy annotation for Android. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D171018
2023-02-26 21:12:22 +00:00
Emilio Cobos Álvarez 3380aefce2 Bug 1818329 - Don't reject negative resolutions either. r=layout-reviewers,jfkthame
This unveils an issue with image-set() tests, which expect 0x to not
parse (inconsistently with media queries).

Fix the test, since the spec doesn't restrict the range of <resolution>
values (and more importantly, it shouldn't allow open ranges).

Differential Revision: https://phabricator.services.mozilla.com/D170762
2023-02-26 00:15:25 +00:00
Emilio Cobos Álvarez 1c9b0d5648 Bug 1818329 - Don't reject negative values at parse time in media features. r=dshin
Clean-up some other test expectations while at it.

Differential Revision: https://phabricator.services.mozilla.com/D170677
2023-02-26 00:15:24 +00:00
CanadaHonk d17b6e45fc Bug 1818598 - Fix parsing nested image-set funcs as valid r=layout-reviewers,emilio
Nested image-set CSS functions should fail to parse as per spec.

WPT tests (2 newly pass):
a2154e3f97/css/css-images/image-set/image-set-parsing.html (L223-L239)

Differential Revision: https://phabricator.services.mozilla.com/D170829
2023-02-25 23:53:02 +00:00
Stanca Serban a3a9112d4d Backed out 2 changesets (bug 1818329) for causing wpt failures in image-set-parsing.html. CLOSED TREE
Backed out changeset 01c1a2d4f4fd (bug 1818329)
Backed out changeset 6c3a6a328d47 (bug 1818329)
2023-02-26 01:34:12 +02:00
Jonathan Kew e8346384e4 Bug 1818412 - Add reftest. r=emilio
This fails with current trunk: the top half-glyph (on the pink background) fails to render,
because we incorrectly determine it is outside the cliprect and skip painting it:
https://treeherder.mozilla.org/jobs?repo=try&revision=70a0539bf9d09330c2fd3b5e08c2aeba90d90b1d

With the fix, it's all good:
https://treeherder.mozilla.org/jobs?repo=try&revision=67675d089b315661696512be61436e83144ed64c

Differential Revision: https://phabricator.services.mozilla.com/D170971
2023-02-25 20:59:45 +00:00
Emilio Cobos Álvarez 48e93a14bc Bug 1818329 - Don't reject negative resolutions either. r=layout-reviewers,jfkthame
This unveils an issue with image-set() tests, which expect 0x to not
parse (inconsistently with media queries).

Fix the test, since the spec doesn't restrict the range of <resolution>
values (and more importantly, it shouldn't allow open ranges).

Differential Revision: https://phabricator.services.mozilla.com/D170762
2023-02-25 17:59:18 +00:00
Emilio Cobos Álvarez cdc7d10ad9 Bug 1818329 - Don't reject negative values at parse time in media features. r=dshin
Clean-up some other test expectations while at it.

Differential Revision: https://phabricator.services.mozilla.com/D170677
2023-02-25 17:59:18 +00:00
Noemi Erli d521cb7246 Backed out 2 changesets (bug 1818329) for causing wpt failures
Backed out changeset af4cdf10aafd (bug 1818329)
Backed out changeset 8c7eb3fca5a8 (bug 1818329)
2023-02-25 07:41:14 +02:00
Emilio Cobos Álvarez c8200e7d27 Bug 1818851 - Minor cleanups to table classes. r=TYLin
Remove redundant virtual keywords, and initialize stuff in the declaration
when possible.

Differential Revision: https://phabricator.services.mozilla.com/D170968
2023-02-25 00:42:48 +00:00
Emilio Cobos Álvarez 0a87908520 Bug 1818329 - Don't reject negative resolutions either. r=layout-reviewers,jfkthame
This unveils an issue with image-set() tests, which expect 0x to not
parse (inconsistently with media queries).

Fix the test, since the spec doesn't restrict the range of <resolution>
values (and more importantly, it shouldn't allow open ranges).

Differential Revision: https://phabricator.services.mozilla.com/D170762
2023-02-24 23:33:39 +00:00
Emilio Cobos Álvarez de9beb6e1a Bug 1818329 - Don't reject negative values at parse time in media features. r=dshin
Clean-up some other test expectations while at it.

Differential Revision: https://phabricator.services.mozilla.com/D170677
2023-02-24 23:33:39 +00:00
Emilio Cobos Álvarez d1e323970c Bug 1818241 - Don't handle keyboard shortcuts on menubar if it wasn't activated by key. r=Gijs
This seems to match Windows' and our old behavior (which activated the
menuitems but not the menubar).

Differential Revision: https://phabricator.services.mozilla.com/D170940
2023-02-24 23:20:54 +00:00
Otto Länd bdc241ec27 Bug 1818026: apply code formatting via Lando
# ignore-this-changeset
2023-02-24 21:12:41 +00:00
Gijs Kruitbosch c9fd9bf2af Bug 1818026 - stop loading page style actor stuff for every process all the time, r=mconley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D170498
2023-02-24 21:09:36 +00:00
Cristian Tuns 55c2060892 Backed out 4 changesets (bug 1818026) for causing build bustages on Loader.cpp CLOSED TREE
Backed out changeset 31e30c051015 (bug 1818026)
Backed out changeset 1fbedd7a8a26 (bug 1818026)
Backed out changeset a5be1aaa8f65 (bug 1818026)
Backed out changeset 1976d91a52b2 (bug 1818026)
2023-02-24 14:32:44 -05:00
Otto Länd c8ac872fc5 Bug 1818026: apply code formatting via Lando
# ignore-this-changeset
2023-02-24 19:20:26 +00:00
Gijs Kruitbosch f93bae09b6 Bug 1818026 - stop loading page style actor stuff for every process all the time, r=mconley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D170498
2023-02-24 17:57:04 +00:00
Emilio Cobos Álvarez d822650349 Bug 1818417 - Tweak nsFontFaceLoader destruction to be more consistent. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D170744
2023-02-24 17:37:23 +00:00
David Shin e9eaa316b3 Bug 1815729: Replace `GetCaretBaseline` with `GetCaretBlockAxisMetrics`. r=emilio
Callers of `GetCaretBaseline` just use it to get offset and size of the caret, so
refactor the shared logic. In the call sites, delay conversion of logical to physical
rect to reduce variable shuffling.

Differential Revision: https://phabricator.services.mozilla.com/D169210
2023-02-24 17:26:44 +00:00
Cosmin Sabou 86da4d63eb Backed out changeset fa64d4d68a0c (bug 1818329) for causing wpt reftest failures on mq-negative-range-001.html. CLOSED TREE 2023-02-24 18:39:42 +02:00
Cosmin Sabou fd67d5ee44 Backed out 3 changesets (bug 1818026) for causing mochitest plain failures on test_SVGStyleElement.xhtml.
Backed out changeset 808a73bbb614 (bug 1818026)
Backed out changeset 9b7dbaeb6deb (bug 1818026)
Backed out changeset 62e5f2fd2775 (bug 1818026)
2023-02-24 16:08:12 +02:00
Cosmin Sabou 71a67276df Backed out changeset 89c458212f3c (bug 1818329) for causing wpt reftest failures on image-set-invalid-resolution-rendering-2.html 2023-02-24 15:55:07 +02:00
Gijs Kruitbosch 103c6447de Bug 1818026 - stop loading page style actor stuff for every process all the time, r=mconley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D170498
2023-02-24 09:07:47 +00:00
Marian-Vasile Laza 6d27462158 Backed out changeset 52cdbb4f0be0 (bug 1815552) for wpt failure on position-sticky-container.html. CLOSED TREE 2023-02-24 02:10:45 +02:00
Emilio Cobos Álvarez 9873096897 Bug 1818329 - Don't reject negative resolutions either. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D170762
2023-02-23 22:49:04 +00:00
Emilio Cobos Álvarez 101f17ccd3 Bug 1818329 - Don't reject negative values at parse time in media features. r=dshin
Clean-up some other test expectations while at it.

Differential Revision: https://phabricator.services.mozilla.com/D170677
2023-02-23 22:48:24 +00:00
Emilio Cobos Álvarez a5f06461fa Bug 1818591 - Remove -moz-box special-casing of min-size properties. r=dholbert
This is the only -moz-box special-case that isn't related to the
visibility: collapse behavior.

After this is done, we can put the collapse behavior in a chrome-only
property, and remove the -moz-box display values and migrate the
-moz-box properties to modern flexbox automatically.

Differential Revision: https://phabricator.services.mozilla.com/D170813
2023-02-23 22:47:20 +00:00
Emilio Cobos Álvarez 920956fac9 Bug 1815552 - Deal with table cells in the abspos cb change optimization code-path. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D169127
2023-02-23 22:33:27 +00:00
Emilio Cobos Álvarez ef73e7c47c Bug 1767561 - Deal with inert much like we deal with visibility: hidden. r=Jamie
Needs tests but this should do.

Differential Revision: https://phabricator.services.mozilla.com/D170752
2023-02-23 19:56:47 +00:00
David Shin f5a42005e2 Bug 1811311 - Part 3: Refactor `GetNaturalBaselineBOffset` to return `Maybe<nscoord>`. r=layout-reviewers,emilio
Changed from returning `bool` & taking an out parameter.

Differential Revision: https://phabricator.services.mozilla.com/D168998
2023-02-23 14:53:27 +00:00
David Shin e02d078c12 Bug 1811311 - Part 2: Extract `SynthesizeBaselineBOffsetFrom*` out of `nsIFrame`. r=emilio
These functions work fine as static functions, and `nsIFrame` is pretty overloaded.

Differential Revision: https://phabricator.services.mozilla.com/D167991
2023-02-23 14:53:27 +00:00
David Shin 5c7c22165f Bug 1811311 - Part 1: Unite baseline-related functions in `nsIFrame` into one. r=emilio
Before, there existed 3 virtual functions that calculated baselines:

- `GetLogicalBaseline`
- `GetVerticalAlignBaseline`
- `GetNaturalBaselineBOffset`

Each of them had slightly different behaviours:

- `GetLogicalBaseline` would synthesize a baseline if there is no baseline.
  Others would simply return `false`.
- `GetNaturalBaselineBOffset` requires the caller to pick which of first/last
  baseline to calculate. Others pick on on their own.
- `GetNaturalBaselineBOffset`'s result can be either offset from border box
   start/end edge, depending on the caller-supplied baseline. Others always
   return offset from border box start edge.

Now:

- `GetNaturalBaselineBOffset` is the sole virtual function.
- `GetLogicalBaseline` exists to support its use, with 2 virtual helper functions:
  - `SynthesizeFallbackBaseline` to generate a baseline for elements that
    doesn't have one.
  - `GetBaselineSharingGroup` to preserve the default baseline picking behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D167990
2023-02-23 14:53:26 +00:00
Emilio Cobos Álvarez 0179d6715f Bug 1818432 - Provide intrinsic size from theme for xul images that are themed but don't have any images. r=tnikkel,layout-reviewers
This restores previous behavior of <xul:image>.

Differential Revision: https://phabricator.services.mozilla.com/D170743
2023-02-23 12:49:12 +00:00
Jonathan Kew 89530bf362 Bug 1818172 - Use nsTextFrame::ResolveSelections and a SelectionRangeIterator to optimize PaintTextSelectionDecorations. r=emilio
With this, the old SelectionIterator that expects a per-character array of
SelectionDetails pointers is no longer used anywhere.

Differential Revision: https://phabricator.services.mozilla.com/D170588
2023-02-23 11:14:27 +00:00
Jonathan Kew cc1e7449f8 Bug 1816927 - Improve performance of nsTextFrame::PaintTextWithSelectionColors on very large textframes. r=emilio
This significantly improves performance and reduces memory usage when painting a very long textframe
with some or all of the text selected.

Differential Revision: https://phabricator.services.mozilla.com/D170530
2023-02-23 09:36:13 +00:00
Csoregi Natalia 47428da2d3 Backed out 8 changesets (bug 1809518) for causing fetch related failures. CLOSED TREE
Backed out changeset b448bddfa364 (bug 1809518)
Backed out changeset ce3a811a4522 (bug 1809518)
Backed out changeset f5add471e7f9 (bug 1809518)
Backed out changeset d2e6d1734eec (bug 1809518)
Backed out changeset 2299a5bdc7a9 (bug 1809518)
Backed out changeset 3eb92dc5aac9 (bug 1809518)
Backed out changeset 3061e4fbf237 (bug 1809518)
Backed out changeset 678468cb98cd (bug 1809518)
2023-02-23 04:33:37 +02:00
Csoregi Natalia dd188e11f2 Backed out changeset 05981db2f726 (bug 1743045) for causing failures on test_group_scrollend.html. CLOSED TREE 2023-02-23 04:23:40 +02:00
Brad Werth 4a8b9977c8 Bug 1815140 Part 1: Make Grid dom object an idempotent property of its frame. r=emilio
This ensures that repeated calls to Element::GetGridFragments will return
an array of idempotent Grid objects for each fragment. This is
accomplished by making the Grid object hold a WeakFrame back to its
originating frame, and updating a property on construction and
destruction.

Differential Revision: https://phabricator.services.mozilla.com/D169724
2023-02-23 01:07:34 +00:00
Hiroyuki Ikezoe 98ea9b2281 Bug 1663444 - Expand the clip rect for async zoom container including the dynamic toolbar area. r=geckoview-reviewers,owlish,botond
Differential Revision: https://phabricator.services.mozilla.com/D168638
2023-02-23 00:05:09 +00:00
Emily McDonough 543eb5e869 Bug 1804794 - Do not allow CSS named page breaks except in specific subtrees. r=dholbert
This currently only includes block frames, grid containers, and flex
containers, and the document and pagination frames. It is possible more frames
will need to be added or more advanced checks in the future.

This adds some related tests to ignoring some subtrees, but are expected fails
until bug 1816570 is fixed.

Differential Revision: https://phabricator.services.mozilla.com/D169018
2023-02-22 23:49:51 +00:00
Dan Robertson 8ac30ce878 Bug 1743045 - Respect general.smoothScroll for programmatic scrolls. r=hiro
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D170110
2023-02-22 23:26:18 +00:00
David Shin 7b3603ea6c Bug 1815936 - In flexbox baseline calculation, ensure that the offset originates from border-start. r=dholbert
`GetNaturalBaselineBOffset` returns the offset originating from border-end for
last baselines.

Differential Revision: https://phabricator.services.mozilla.com/D169362
2023-02-22 20:19:24 +00:00
Sean Feng 26cf8d4e56 Bug 1809518 - Update test_css_cross_domain.html based on the status of ORB r=farre
This test send some cross origin no-cors requests and expect
the color of the element will be changed via CSS by reading
the response of these requests.

With ORB's JS validator is enabled, some of the requests are
going to be blocked.

This patch allows the test to test the result for both ORB
enabled and ORB disabled.

Differential Revision: https://phabricator.services.mozilla.com/D169279
2023-02-22 20:17:03 +00:00
Daniel Holbert d79c824a60 Bug 1816574 - Force fit the content in nested multicol when ReflowConfig::mForceAuto is true. r=emilio
The testcase was originated from D169662 written by Daniel Holbert, which was
discovered by fuzzer in bug 1756202.

Note that the crashtest that hangs the browser might not always be reproducible
locally. It is reproducible on "Linux 18.04 x64 WebRender tsan opt" build on
try.

Differential Revision: https://phabricator.services.mozilla.com/D170532
2023-02-22 19:21:04 +00:00
Iulian Moraru a6d122dc1c Backed out changeset 2ddeecc9100b (bug 1168182) for causing mochitest failures on test_wheel_scroll.html. CLOSED TREE 2023-02-22 21:32:15 +02:00
Dan Robertson e03ea6d72f Bug 1168182 - Bind wheel event targets to wheel transactions. r=masayuki,smaug
- Create wheel transactions for wheel events handled by APZ.
 - Group wheel events with the current wheel transaction, so that all
   wheel events in a wheel transaction are fired to the same element.
 - Store the current event target for the first event in a wheel
   transaction to be used for subsequent events.
 - Add the dom.event.wheel-event-groups.enabled preference as a feature
   flag for this behavior.

Differential Revision: https://phabricator.services.mozilla.com/D163484
2023-02-22 16:57:05 +00:00
Cristian Tuns ef9fa152c1 Backed out 8 changesets (bug 1809518) for causing build bustages on JSOracleChild.h CLOSED TREE
Backed out changeset 1057c5d5a0a5 (bug 1809518)
Backed out changeset 1ddffd079624 (bug 1809518)
Backed out changeset 3f43f1cd3e8b (bug 1809518)
Backed out changeset 16bd31105745 (bug 1809518)
Backed out changeset d86c04497104 (bug 1809518)
Backed out changeset 25a5bf657f5c (bug 1809518)
Backed out changeset bf67b8c14aa0 (bug 1809518)
Backed out changeset 5cc0653b2072 (bug 1809518)
2023-02-22 12:20:40 -05:00
Sean Feng 781c33c9ad Bug 1809518 - Update test_css_cross_domain.html based on the status of ORB r=farre
This test send some cross origin no-cors requests and expect
the color of the element will be changed via CSS by reading
the response of these requests.

With ORB's JS validator is enabled, some of the requests are
going to be blocked.

This patch allows the test to test the result for both ORB
enabled and ORB disabled.

Differential Revision: https://phabricator.services.mozilla.com/D169279
2023-02-22 14:07:47 +00:00
Emilio Cobos Álvarez 4238513610 Bug 1818141 - Update image when going from non-null to null XUL image request. r=tnikkel
Otherwise we end up with a stale intrinsic size.

Differential Revision: https://phabricator.services.mozilla.com/D170594
2023-02-22 12:50:23 +00:00
Butkovits Atila 9159bcd837 Backed out changeset 70a0f82267f1 (bug 1804794) for causing build bustages at ReflowInput.cpp. CLOSED TREE 2023-02-22 06:48:12 +02:00
Emily McDonough 75a6f4f11e Bug 1804794 - Do not allow CSS named page breaks except in specific subtrees. r=dholbert
This currently only includes block frames, grid containers, and flex
containers, and the document and pagination frames. It is possible more frames
will need to be added or more advanced checks in the future.

This adds some related tests to ignoring some subtrees, but are expected fails
until bug 1816570 is fixed.

Differential Revision: https://phabricator.services.mozilla.com/D169018
2023-02-22 02:29:31 +00:00
Ting-Yu Lin cb1b4fb0eb Bug 1811548 Part 2 - Provide size overrides when creating ReflowInput for an overflow container flex item. r=dholbert
Testcase 001 and 002 test row-oriented and column-oriented flex container,
respectively. The "a" and "b" variant test `box-sizing:border-box` and
`box-sizing:content-box`, respectively.

Differential Revision: https://phabricator.services.mozilla.com/D170035
2023-02-22 01:34:07 +00:00
Ting-Yu Lin d9b85a4a49 Bug 1811548 Part 1 - Don't evaluate physical available size when aContainerSize is provided. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D170034
2023-02-22 01:34:07 +00:00
Butkovits Atila d434d2fc49 Backed out changeset c33204e69e49 (bug 1743045) for causing failures at scroll-behavior-3.html. CLOSED TREE 2023-02-22 01:15:14 +02:00
Dan Robertson 69572ca871 Bug 1743045 - Respect general.smoothScroll for programmatic scrolls. r=hiro
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D170110
2023-02-21 22:02:11 +00:00
Daniel Holbert 9c55e73579 Bug 709398: Add crashtest for this no-longer-reproducible bug. (no review, crashtest-only)
Differential Revision: https://phabricator.services.mozilla.com/D170511
2023-02-21 19:14:22 +00:00
Gregory Pappas 83ee50a1c3 Bug 637597 - Un-random the test for bug 637597 because it doesn't reproduce anymore r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D170418
2023-02-21 18:33:21 +00:00
Lee Salzman f7cb3c64f6 Bug 1817873 - Use line join for closed single line paths. r=aosmond
If we choose to accelerate a single line path, we need to take care not to use
the line cap when the path is closed. When the path is closed, we need to use
the line join instead.

Differential Revision: https://phabricator.services.mozilla.com/D170469
2023-02-21 18:03:37 +00:00
Emilio Cobos Álvarez a228002bd2 Bug 1815229 - Remove nsImageBoxFrame. r=tnikkel,layout-reviewers
nsImageFrame has support for displaying style URIs / an owned image
request, so use it.

The main behavior difference is that we don't fire `load` / `error`
events for those images anymore, but I don't see any event listener for
those around, so I think they can go.

Differential Revision: https://phabricator.services.mozilla.com/D168958
2023-02-21 17:36:11 +00:00