Commit Graph

1788 Commits

Author SHA1 Message Date
Masayuki Nakano
66ee19892a Bug 1966551 - Make PointerEventHandler::DispatchPointerFromMouseOrTouch() dispatch synthesized ePointerMove for synthesized eMouseMove if it's caused by hoverable pointer r=smaug
Currently, we don't dispatch synthesized `ePointerMove` unless it's
required for dispatch the boundary events after dispatching
`ePointerLostCapture` event [1] since Pointer Events defined that the
boundary events should be fired only when before dispatching a pointer
event.  However, it's changed, Point Events currently defines that the
boundary events should be fired if the element under the pointer is
changed without a `pointermove` [2] if and only if the pointer supports
hover.

Therefore, this patch makes `PresShell` store the last input source
whose event set the mouse location at last and
`PresShell::ProcessSynthMouseMoveEvent()` sets the input source to make
`PointerEventHandler::DispatchPointerFromMouseOrTouch()` can consider
whether it needs to dispatch pointer boundary events or not for the
pointer.

Additionally, the mochitests for the manual WPTs under
`dom/events/test/pointerevents` checks `pointerId`.  Therefore, this
patch makes `PresShell` also store the last `pointerId` and set it to
the synthesized `eMouseMove` too.

I think that this approach is **not** correct approach to fix this bug
because there could be multiple hoverable pointers, but we synthesize
pointer boundary events only for the last input device.  I think it's
enough for now because we've not supported pen well (we've not supported
the test API yet!), so, we only support only mouse input well as
hoverable inputs.  I think we should extend `PointerInfo` and make a
synthesizer of `ePointerMove` later.

Note that this patch changes 2 WPTs which both are in the scope of
Interop.

The expectation of
`pointerevent_pointer_boundary_events_after_removing_last_over_element.html`
needs to be changed for conforming to the latest spec.  I wrote this
test before the spec change and it wasn't updated when the spec is
changed. I filed this issue to interop [3].

The changes for `pointerevent_pointerout_no_pointer_movement.html` is
required for avoiding the timeout.  Gecko does not allow recursive
synthesized `eMouseMove` to prevent infinite reflow loops without moving
the mouse cursor.  However, the test expects that and that causes
requiring the hack for Chrome too.  Therefore, I split the test to
make each step run in different event loop and I removed the hack for
Chrome.

Note that this patch also removes 2 sets of mochitests for WPT manual
tests because they are now tested with the test driver [4][5] and they
fail without maintained.

1. https://searchfox.org/mozilla-central/rev/f571db8014431de31d245017e2f5457046aec4ea/dom/events/PointerEventHandler.cpp#494-503
2. https://w3c.github.io/pointerevents/#boundary-events-caused-by-layout-changes
3. https://github.com/web-platform-tests/interop/issues/961
4. https://wpt.fyi/results/pointerevents/pointerevent_boundary_events_in_capturing.html%3Fmouse?label=master&label=experimental&aligned&view=interop
5. https://wpt.fyi/results/pointerevents/pointerevent_releasepointercapture_events_to_original_target.html%3Fmouse?label=master&label=experimental&aligned&view=interop

Differential Revision: https://phabricator.services.mozilla.com/D250421
2025-05-22 05:46:55 +00:00
Jari Jalkanen
1aa916b47f Bug 1924195: Support multiple anchors with the same name. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D247785
2025-05-20 14:51:18 +00:00
Masayuki Nakano
30f94ee9e2 Bug 1966887 - Remove the assertion in EnsurePrecedingPointerRawUpdate() which checks recursive calls r=smaug
The assertion was intended to detect unexpected recursive event dispatching of
`ePointerRawUpdate`.  However, if may occur if spinning the event loop with
opening a modal dialog or synchronous XHR.  Therefore, the assertion may fail
even in the valid situations.

The crash reports are caused by synthesized `eMouseMove`.  However, it'll be
checked after getting `WidgetMousePointer*` after the removing assertion.
So, the case is correctly handled anyway.

Differential Revision: https://phabricator.services.mozilla.com/D249871
2025-05-17 13:52:45 +00:00
Masayuki Nakano
90cd469f14 Bug 1550462 - part 2: Make PresShell::HandleEvent dispatch preceding pointerrawupdate event r=smaug,dom-core,edgar
This patch tries to dispatch ePointerRawUpdate with
PresShell::EventHandler::DispatchPrecedingPointerEvent as same as usual
pointer events.

For using the path, this patch adds 2 internal events, eMouseRawUpdate
and eTouchRawUpdate which are never dispatched into the DOM because
PresShell::EventHandler::DispatchPrecedingPointerEvent will return false
for that and then the caller will stop handling the internal events.

There are 3 dispatchers of the internal raw update events.

One is PresShell::EnsurePrecedingPointerRawUpdate(). This dispatches the
internal event if and only if the coming event of PresShell::HandleEvent will
cause ePointerMove. The reason why PresShell::HandleEvent handles the
preceding raw-update event is, we should support ePointerRawUpdate events
for synthesized events for tests (in-process ones) and in the main process.
Additionally, if a pointerrawupdate event may destroy the target <iframe>.
In such ase, the following pointermove may need to be dispatched on its parent
window or another <iframe> window. Therefore, we need to dispatch the
internal raw update event before considering the target window (PresShell) and
handling the capturing element.

The others are BrowserChild::RecvRealMouseMoveEvent and
BrowserChild::RecvRealTouchMoveEvent. They dispatch the internal events
when they won't dispatch the received event immediately to coalesce with further
similar input.

For avoiding to dispatch the internal event for same source event, this adds
WidgetPointerHelper::convertToPointerRawUpdate member to check it in
PresShell::HandlePrecedingPointerRawUpdate.

Differential Revision: https://phabricator.services.mozilla.com/D243404
2025-05-16 09:53:52 +00:00
Alexandru Marc
46de26821c Revert "Bug 1550462 - part 3: Enable pointerrawupdate event r=smaug" for causing mochitest failures @ test_pointerrawupdate_event_count.html
This reverts commit eb27445e03.

Revert "Bug 1550462 - part 2: Make `PresShell::HandleEvent` dispatch preceding `pointerrawupdate` event r=smaug,dom-core,edgar"

This reverts commit 502f22686c.

Revert "Bug 1550462 - part 1: Define `pointerawupdate` event r=smaug"

This reverts commit 2b13850454.
2025-05-16 06:32:12 +00:00
Masayuki Nakano
502f22686c Bug 1550462 - part 2: Make PresShell::HandleEvent dispatch preceding pointerrawupdate event r=smaug,dom-core,edgar
This patch tries to dispatch `ePointerRawUpdate` with
`PresShell::EventHandler::DispatchPrecedingPointerEvent` as same as usual
pointer events.

For using the path, this patch adds 2 internal events, `eMouseRawUpdate`
and `eTouchRawUpdate` which are never dispatched into the DOM because
`PresShell::EventHandler::DispatchPrecedingPointerEvent` will return `false`
for that and then the caller will stop handling the internal events.

There are 3 dispatchers of the internal raw update events.

One is `PresShell::EnsurePrecedingPointerRawUpdate()`.  This dispatches the
internal event if and only if the coming event of `PresShell::HandleEvent` will
cause `ePointerMove`.  The reason why `PresShell::HandleEvent` handles the
preceding raw-update event is, we should support `ePointerRawUpdate` events
for synthesized events for tests (in-process ones) and in the main process.
Additionally, if a `pointerrawupdate` event may destroy the target `<iframe>`.
In such ase, the following `pointermove` may need to be dispatched on its parent
window or another `<iframe>` window.  Therefore, we need to dispatch the
internal raw update event before considering the target window (`PresShell`) and
handling the capturing element.

The others are `BrowserChild::RecvRealMouseMoveEvent` and
`BrowserChild::RecvRealTouchMoveEvent`.  They dispatch the internal events
when they won't dispatch the received event immediately to coalesce with further
similar input.

For avoiding to dispatch the internal event for same source event, this adds
`WidgetPointerHelper::convertToPointerRawUpdate` member to check it in
`PresShell::HandlePrecedingPointerRawUpdate`.

Differential Revision: https://phabricator.services.mozilla.com/D243404
2025-05-15 03:22:44 +00:00
Masayuki Nakano
3c9038b875 Bug 1960253 - Split the computation of target frame/content of events using coordinates from EventHandler::HandleEventUsingCoordinates r=smaug
We'll need to compute the target `PresShell` before processing the pending
pointer capture to check whether the corresponding window needs
`pointerrawupdate` events (bug 1550462).

However, current code needs to process the pending pointer capture.
Unfortunately, if we process the pending pointer capture at considering whether
we need to dispatch `pointerrawupdate` event on the target `PresShell`, the
event order may be changed in some edge cases.  For example, if web apps updates
the pointer capture element in a `gotpointercapture` or `lostpointercapture`
event listener, another processing of pending pointer capture will be done
before dispatching the following `pointermove`.  So, there are two chances to
process pending pointer capture at dispatching `pointermove` and this may be
unexpected behavior change for the most web apps which do not use
`pointerrawupdate` event listener.

For keeping the traditional behavior on the most web apps which do not listen to
`pointerrawupdate`, we need a method to compute the target without processing
the pending pointer capture.  However, it requires to return multiple nodes.
Therefore, this patch adds a new subclass of `EventTargetData` to return
multiple additional information within an `EventTargetData` from the new
computation method.

Differential Revision: https://phabricator.services.mozilla.com/D247252
2025-05-14 21:24:15 +00:00
Cristina Horotan
83b31dd55c Revert "Bug 1924195: Support multiple anchors with the same name. r=layout-reviewers,emilio" for causing build bustages at PresShell.cpp
This reverts commit 03056ee940.
2025-05-14 14:53:49 +00:00
Jari Jalkanen
03056ee940 Bug 1924195: Support multiple anchors with the same name. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D247785
2025-05-14 10:47:45 +00:00
Masayuki Nakano
69f1102665 Bug 1885232 - part 1: Make PresShell::GetOverrideClickTarget and EventStateManager::SetClickCount use pointer capturing element at dispatching the source event r=smaug
Pointer Events defines the `click`, `auxclick` and `contextmenu` target as [1]:
> 1. Let event be the click, auxclick or contextmenu event being dispatched,
> and userEvent be the user interaction event that caused the firing of event.
> 2. If userEvent is not a PointerEvent, dispatch event following the [UIEVENTS]
> spec without overriding event target and skip the remaining steps below.
> 3. If event is a contextmenu event, or userEvent was dispatched while the
> corresponding pointer was captured, then let target be the target of userEvent.

`contextmenu` case is a little bit more complicated than `click` and `auxclick`
because it's always targeted to the `pointerup` target and we don't store the
`pointerup` target and `contextmenu` is usually triggered by the native
"contextmenu" event.  Therefore, this patch fixes only the case if an element
captures the pointer at dispatching `pointerup`.

However, this standardized behavior is unfortunately different from the fixed
behavior of bug 1447993.  In the bug, we made the target as the element under
the pointer which may be a descendant of the capturing element.  Fortunately,
even after applying this patch, the reported web app works even though the
reported page has gone and the issue of the web app is still open.  For making
things safer, this patch enables the new behavior only on early beta builds and
in the nightly channel for now to get the feedback from the testers.

`test_bug1447993.html` (and `window_bug1447993.html`) keeps testing the fix of
bug 1447993 with disabling the new behavior.  Instead of the test, this patch
adds new WPT to check the standardized behavior in the same steps.  Chrome
files to target to the capturing element at touch, but the developers agree
with it's unexpected behavior [2].

1. https://w3c.github.io/pointerevents/#event-dispatch
2. https://github.com/w3c/pointerevents/issues/508#issuecomment-2180813312

Differential Revision: https://phabricator.services.mozilla.com/D218275
2025-05-10 11:12:07 +00:00
Sean Feng
59893c42dc Bug 1932150 - Allow using flat tree order for point comparing in selection r=jjaschke,smaug,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D231588
2025-05-09 18:19:00 +00:00
Serban Stanca
5691c4beb2 Revert "Bug 1932150 - Allow using flat tree order for point comparing in selection r=jjaschke,smaug,dom-core"
This reverts commit 8d55fdef16.
2025-05-08 20:00:31 +00:00
David Shin
cf4eef0470 Bug 1965228: Mark PresShell::GetAnchorPosAnchor as const. r=layout-reviewers,tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D248423
2025-05-08 18:03:56 +00:00
Sean Feng
8d55fdef16 Bug 1932150 - Allow using flat tree order for point comparing in selection r=jjaschke,smaug,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D231588
2025-05-08 13:40:01 +00:00
Atila Butkovits
da71eedf0a Revert "Bug 1932150 - Fix build bustage" for causing build bustages.
This reverts commit 0681b181d6.

Revert "Bug 1932150 - Fix lint failure" for causing Build bustage.

This reverts commit 60cc0878d3.

Revert "Bug 1932150 - Add new test cases for selection in flat tree r=smaug"

This reverts commit 3dbe5fc183.

Revert "Bug 1932150 - Make selection code to correctly iterate flattened tree r=smaug"

This reverts commit 6f7a1e4886.

Revert "Bug 1932150 - ContentSubtreeIterator #3: Fix a bug in ContentSubtreeIterator where the end container is in the light DOM of a shadow host r=jjaschke"

This reverts commit 19ce2c5806.

Revert "Bug 1932150 - ContentSubtreeIterator #2: Allow ContentSubtreeIterator to iterate nodes in flattened tree r=jjaschke"

This reverts commit d9d192bc3a.

Revert "Bug 1932150 - ContentSubtreeIterator #1: Make the end container related logic in ContentSubtreeIterator more robust r=jjaschke,smaug,dom-core"

This reverts commit 2fbde5b84d.

Revert "Bug 1932150 - Update ranges to correctly set and update nodes for flattened selection r=jjaschke,smaug,dom-core"

This reverts commit 116d26c37f.

Revert "Bug 1932150 - Allow using flat tree order for point comparing in selection r=jjaschke,smaug,dom-core"

This reverts commit 2ba73e1639.

Revert "Bug 1932150 - Fix some inconsistency about indicating whether the selection is allowed to cross the shadow boundary r=jjaschke,dom-core"

This reverts commit 793c2453f1.
2025-05-07 18:30:42 +00:00
Sean Feng
2ba73e1639 Bug 1932150 - Allow using flat tree order for point comparing in selection r=jjaschke,smaug,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D231588
2025-05-07 15:08:34 +00:00
Emilio Cobos Álvarez
6fd0095cdc Bug 1964293 - Prevent opaque background-image optimization from confusing canvas background code. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D247738
2025-05-06 23:11:18 +00:00
Jonathan Watt
28cc2effe2 Bug 1923395. Basic Anchor Positioning 'Finding an Anchor' implementation. r=dshin,emilio
Differential Revision: https://phabricator.services.mozilla.com/D246939
2025-05-05 04:16:04 +00:00
Emilio Cobos Álvarez
6db610f3ed Bug 1962381 - Sample SMIL animations along with CSS animations. r=longsonr,smaug
In order to do this and keep tests passing, we need to also recurse into
external resource docs during the refresh driver tick.

Otherwise, we fail dom/smil/test/test_smilExtDoc.xhtml. This used to
work because the SMIL controller registered with the refresh driver
directly, and resource docs share the refresh driver with the parent
doc. I think it makes sense to treat them more like subdocuments, and it
also matches svg-as-image better.

This fixes some known SMIL bugs, too, yay.

Differential Revision: https://phabricator.services.mozilla.com/D246588
2025-04-28 15:21:26 +00:00
Alexandru Marc
05265244cb Backed out changeset d1343d311328 (bug 1962381) for causing build bustages @ Document.h CLOSED TREE 2025-04-28 15:23:11 +03:00
Emilio Cobos Álvarez
ce44ec7658 Bug 1962381 - Sample SMIL animations along with CSS animations. r=longsonr,smaug
In order to do this and keep tests passing, we need to also recurse into
external resource docs during the refresh driver tick.

Otherwise, we fail dom/smil/test/test_smilExtDoc.xhtml. This used to
work because the SMIL controller registered with the refresh driver
directly, and resource docs share the refresh driver with the parent
doc. I think it makes sense to treat them more like subdocuments, and it
also matches svg-as-image better.

This fixes some known SMIL bugs, too, yay.

Differential Revision: https://phabricator.services.mozilla.com/D246588
2025-04-28 10:17:49 +00:00
Masayuki Nakano
98865fa0f4 Bug 1960499 - Make PresShell::HandleEvent handle event with AutoWeakFrame for the given frame r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D245529
2025-04-26 06:21:41 +00:00
Sean Feng
b4359a4a24 Bug 1959275 - Fix a bug where elements has overflow:hidden can't be dragged r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D245645
2025-04-21 13:41:59 +00:00
Emilio Cobos Álvarez
e94e1dd416 Bug 1960473 - Update content relevancy only once per tick. r=fredw
Otherwise we can end up with dirty frames at the end of a flush. This
doesn't fix bug 1958522 (I think we need either height: fit-content to
work, or IntersectionObserver.scrollMargin). But matches the HTML spec:

> The intent of this step is for the initial viewport proximity
> determination, which takes effect immediately, to be reflected in the
> style and layout calculation which is carried out in a previous step of
> this loop. Proximity determinations other than the initial one take
> effect at the next rendering opportunity.

Differential Revision: https://phabricator.services.mozilla.com/D245489
2025-04-21 11:08:27 +00:00
Emilio Cobos Álvarez
a17ef36279 Bug 1961469 - Simplify nsIFrame::GetContentForEvent. r=smaug
No behavior change (note that nsImageFrame inits the image map on
Init()).

Differential Revision: https://phabricator.services.mozilla.com/D246077
2025-04-19 19:21:17 +00:00
Cristina Horotan
95088967b9 Backed out changeset 2fb0417cfd2f (bug 1959275) for causing wpt failures at pointerdown-add-overflow-hidden.html. CLOSED TREE 2025-04-16 21:49:30 +03:00
Sean Feng
b9fd8b2781 Bug 1959275 - Fix a bug where elements has overflow:hidden can't be dragged r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D245645
2025-04-16 15:13:41 +00:00
Emilio Cobos Álvarez
cd5c811fe0 Bug 1959927 - Turn layout into a regular render phase. r=dshin
Run it in the right step of the rendering loop as per spec. Keep
the interruptible layout behavior by detecting whether we have any
frame with content-visibility: auto / ResizeObserver / etc around.

Also make the IntersectionObserver phase not unconditional, make it
conditional on needing layout or having scrolled.

I want to look a bit whether we can avoid flushing the whole browsing
context tree, but that is pre-existing so not touching it as part of
this work.

Differential Revision: https://phabricator.services.mozilla.com/D245214
2025-04-14 10:15:13 +00:00
Emilio Cobos Álvarez
327d527c49 Bug 1959644 - Turn paint into a regular render phase. r=smaug
This reuses the newly introduced infrastructure to track painting, and
avoids painting if rendering is suppressed (such as for view transitions
and so on).

Rendering suppression of an in-process iframe needs more work because
right now we paint in-process iframes as part of the top document's
display list.

Remove some old paint invalidation printf-debugging, which I suspect
nobody has used in years. Profiler markers are strictly better :)

Differential Revision: https://phabricator.services.mozilla.com/D245063
2025-04-11 11:22:49 +00:00
Emilio Cobos Álvarez
da2ca6b75d Bug 1958970 - Change animation event set-up to match the spec better. r=smaug,firefox-animation-reviewers,boris
Deal with events per-document like the spec. This also ensures that view
transition rendering suppressions and such work for this rendering
phase.

Differential Revision: https://phabricator.services.mozilla.com/D244670
2025-04-10 01:13:30 +00:00
Emilio Cobos Álvarez
4c0adc7d53 Bug 1958965 - Change scroll event setup to match the spec better. r=smaug
This matches the spec (plus resolution at
https://github.com/w3c/csswg-drafts/issues/11164) better, by running the
events per document.

Same comments as D244655 regarding the delayed event stuff that's going
away.

Differential Revision: https://phabricator.services.mozilla.com/D244666
2025-04-10 01:07:15 +00:00
Emilio Cobos Álvarez
65d2daefc7 Bug 1958952 - Make resize event handling more in line with the spec. r=smaug
This makes regular and visual viewport event handling happen as per
spec, on a per-document basis, in the same order as all the other
rendering steps. This is very easy to do after bug 1958942.

Note we don't need to deal with "delayed" events by hand now. Now those
are dealt with via the "rendering suppression" mechanism
Document::IsRenderingSuppressed() will return true when events are
suppressed, and schedule another rendering update when unsuppressed if
needed.

Differential Revision: https://phabricator.services.mozilla.com/D244655
2025-04-10 00:54:09 +00:00
Emilio Cobos Álvarez
cc89fb812f Bug 1958942 - Refactor how we schedule and suppress rendering phases. r=smaug
This starts some of the needed refactoring towards having proper
rendering suppression, and in general aligning better with the HTML
spec's "update the rendering" section.

Behavior changes should be minimal:

 * We suppress rendering until the pres shell is initialized rather than
   just created. This matches how autofocus already works and in general
   we don't want to forcibly flush an uninitialized presshell.

 * We handle view transition suppression more correctly in some (but not
   all) phases.

 * Some of the steps do no longer recurse manually nor check the view
   transitions suppression, as that's done centrally.

 * mAutoFocusFlushDocuments isn't tracked separately.

Follow-up work will involve changing most of the "pending resize/scroll/etc"
events to be per-document as per spec, and also implement suppression for
painting.

Differential Revision: https://phabricator.services.mozilla.com/D244372
2025-04-09 23:51:01 +00:00
Cristian Tuns
5f65588990 Backed out changeset 756680c06b2b (bug 1488953) for causing bc failures in /browser_tabdetach.js and browser_tabstrip_overflow_underflow.js CLOSED TREE 2025-04-08 00:00:53 -04:00
David Shin
85c922b0dd Bug 1923959: Resolve anchor for (max) sizes. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D240864
2025-04-08 02:29:18 +00:00
Emilio Cobos Álvarez
fa2ca93142 Bug 1488953 - Use script runner for scrollport events. r=mats
Since last time we tried this:

 * A lot of internal usage has gone away.
 * They have been successfully been unshipped from content and
   extensions.

So we should try this again.

Differential Revision: https://phabricator.services.mozilla.com/D5271
2025-04-08 01:05:15 +00:00
Hiroyuki Ikezoe
260f3989a6 Bug 1947470 - Offset the target position:fixed element by the layout scroll offset. r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D239481
2025-04-08 00:17:48 +00:00
Hiroyuki Ikezoe
66f31cb50d Bug 1947470 - Do MoveInsideAndClamp for the given position:fixed rectangle to avoid unexpected scrolling. r=dlrobertson
For safety, both of helper_scrollIntoView_bug1950744.html and
helper_scrollIntoView_bug1950744-2.html run with
layout.scroll_fixed_content_into_view_visually=true and
layout.scroll_fixed_content_into_view_visually=false because these tests
should NOT cause any scrolling regardless of the pref value.

Differential Revision: https://phabricator.services.mozilla.com/D243735
2025-04-08 00:17:48 +00:00
Florian Quèze
07610eeb7d Bug 1956726 - Migrate histograms to use Glean APIs in layout/, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D244178
2025-04-03 21:02:55 +00:00
Florian Quèze
6afb2c9c36 Bug 1956726 - Migrate histograms to use Glean APIs for WEBFONT_*, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D242767
2025-04-03 13:42:52 +00:00
Florian Quèze
4b88e75c19 Bug 1956726 - Migrate histograms to use Glean APIs in gfx/, r=chutten,jgilbert,firefox-desktop-core-reviewers ,mconley.
Differential Revision: https://phabricator.services.mozilla.com/D242765
2025-04-03 13:42:51 +00:00
Jan-Niklas Jaeschke
94f7a92240 Bug 1724299, part 1 - Implement auto-expanding details. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D241454
2025-04-02 08:22:48 +00:00
Jan-Niklas Jaeschke
a775b0b16a Bug 1761043, part 5 - hidden=until-found: Implement fragment navigation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D241451
2025-04-02 08:22:47 +00:00
Nicolas Silva
1cf52d3337 Bug 1955005 - Make the old state transaction render immediately and offscreen. r=emilio
The main goal of this patch is to ensure that we render the snapshots as
soon as the transaction is received on the WebRender to prevent another
transaction within the same vsync interval from replacing the old
state's transaction before it has had a chance to produce the snapshots.

In addition, we produce the snapshots by generating a frame that isn't
presented to the window. This is to avoid potential vsync issues from
trying to present multiple times in the same interval and avoids a fair
amount of wasted work.

Differential Revision: https://phabricator.services.mozilla.com/D242358
2025-03-25 12:35:46 +00:00
Emilio Cobos Álvarez
1cada22c31 Bug 1955697 - Simplify scrolled canvas background painting. r=mstange
Always paint the scrolled canvas background if it's CSS-specified.

Compute the canvas background upfront so we don't need to walk the
display list after the fact.

This removes the scrolled canvas background in a few cases where the old
code could prove that it was not needed due to blending, see the
comment:

    // To make layers work better, we want to avoid having a big non-scrolled
    // color background behind a scrolled transparent background. Instead, we'll
    // try to move the color background into the scrolled content by making
    // nsDisplayCanvasBackground paint it.

It's unclear if that matters for performance with webrender nowadays,
but removing it does cause significant fuzzy failures, so it will be
reintroduced in a more explicit way in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D242017
2025-03-25 08:09:57 +00:00
Emilio Cobos Álvarez
05a02479cb Bug 1955697 - Remove useless null-check, and mark a function as static. r=mstange
We always give a non-null item.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D242626
2025-03-24 18:54:34 +00:00
Emilio Cobos Álvarez
63d58a3537 Bug 1955697 - Store whether the canvas background is css-specified for both page and viewport canvases. r=mstange
No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D242625
2025-03-24 18:54:34 +00:00
Hiroyuki Ikezoe
76a338b8c0 Bug 1955158 - Make __visual__ scroll-into-view to position:fixed frames behind a pref. r=botond
And disable the pref on desktops by default, enable it on Android by
default.

Differential Revision: https://phabricator.services.mozilla.com/D242252
2025-03-20 23:23:49 +00:00
Butkovits Atila
5eef486c85 Backed out changeset 90dbec9f0f4c (bug 1955158) for causing failures at compile-event-handler-settings-objects.html. CLOSED TREE 2025-03-21 13:11:22 +02:00
Hiroyuki Ikezoe
a1e876c36c Bug 1955158 - Make __visual__ scroll-into-view to position:fixed frames behind a pref. r=botond
And disable the pref on desktops by default, enable it on Android by
default.

Differential Revision: https://phabricator.services.mozilla.com/D242252
2025-03-20 23:23:49 +00:00