Commit Graph

1713 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
a8ce0ec5f9 Bug 1926031 - Use a cenum for selection controller scroll flags. r=jjaschke,masayuki
Note that the casts are ugly but they will go away sooner rather than
later.

Differential Revision: https://phabricator.services.mozilla.com/D226386
2024-10-22 09:34:27 +00:00
Hiroyuki Ikezoe
5453167f89 Bug 1813213 - Factor the dynamic toolbar bimodal height into position sticky elements stuck to the root scroll container. r=botond,geckoview-reviewers,m_kato
And kick a reflow for the sticky elements when the dynamic toolbar is hidden so that
the sticky elements' position laid out on the main-thread is properly updated there.

These stuffs are basically same as we've done for position:fixed elements.

Differential Revision: https://phabricator.services.mozilla.com/D223906
2024-10-16 04:46:20 +00:00
Emilio Cobos Álvarez
8d6c25f7a5 Bug 1829006 - Remove unnecessary restriction about opaque scrollable windows. r=dholbert
This comment doesn't make sense any more:

 * Scrollers don't use native anything.
 * Extensions can't openDialog themselves anymore.

This would allow user CSS to e.g. make PiP windows transparent. An
alternative would be to use scrolling="false" on the PiP window, but
since the restriction doesn't really seem necessary seems worth
removing.

Differential Revision: https://phabricator.services.mozilla.com/D175952
2024-10-11 11:24:09 +00:00
Emilio Cobos Álvarez
ddc243b63d Bug 1923334 - Sync window properties when root element style changes. r=jwatt
We sync window properties every time we reflow the viewport frame:

 * https://searchfox.org/mozilla-central/rev/7db217e3832e9a884be0c2300779e098f92be3fe/layout/base/PresShell.cpp#9978-9980

However that's not enough because some things that do affect the window
properties (like border-radius / background-color / color-scheme) don't
necessarily trigger reflow.

Do it whenever we set the root style, which is easier and catches all
those.

Bail out earlier in content processes because we can, puppet widgets
don't do any of that.

Differential Revision: https://phabricator.services.mozilla.com/D225153
2024-10-10 11:55:38 +00:00
Butkovits Atila
e6792fd3b6 Backed out changeset 4d3b1b385478 (bug 1829006) for causing failures at browser_startup_syncIPC.js. CLOSED TREE 2024-10-10 04:29:18 +03:00
Emilio Cobos Álvarez
8360f1778a Bug 1829006 - Remove unnecessary restriction about opaque scrollable windows. r=dholbert
This comment doesn't make sense any more:

 * Scrollers don't use native anything.
 * Extensions can't openDialog themselves anymore.

This would allow user CSS to e.g. make PiP windows transparent. An
alternative would be to use scrolling="false" on the PiP window, but
since the restriction doesn't really seem necessary seems worth
removing.

Differential Revision: https://phabricator.services.mozilla.com/D175952
2024-10-09 23:13:49 +00:00
Tamas Szentpeteri
8285dfaab8 Backed out changeset 4b1409597101 (bug 1920718) for causing bp bustages on rapl.cpp. 2024-10-08 23:27:18 +03:00
serge-sans-paille
1966f9a43c Bug 1920718 - Annotate all global variable with runtime initialization as MOZ_RUNINIT r=application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.

Differential Revision: https://phabricator.services.mozilla.com/D223341
2024-10-08 16:49:51 +00:00
Emilio Cobos Álvarez
7e3778ba99 Bug 1922956 - Further clean-up widget creation code-paths. r=win-reviewers,mac-reviewers,geckoview-reviewers,mstange,rkraesig,m_kato
This is all super-hacky (see a lot of the XXXcjones comments).

Simplify it... We never create widgets with a bare native parent but no
nsIWidget parent. Pass nsIWidgets and deal with things correctly.

There were also things that were dealing with stuff that can't happen,
like top level popups, children of PuppetWidgets, or such.

Instead of overriding Create(), let's just teach nsBaseWidget about
non-native (headless/puppet) widgets.

Remove lots of old APIs for the native window stuff that are unused
and/or unimplemented.

Differential Revision: https://phabricator.services.mozilla.com/D224613
2024-10-07 16:43:53 +00:00
Emilio Cobos Álvarez
f8a42a3842 Bug 1921903 - Ensure we don't create hidden widgets in non-macOS platforms. r=rkraesig,geckoview-reviewers,win-reviewers,m_kato
Pretty sure that we can't hit that case right now, and try with MOZ_ASSERT
agrees with me at least.

Popups don't get there. For puppet widgets, mParentWidget is provided
explicitly.

This code is all super messy and can be cleaned-up significantly.
See following patch.

Differential Revision: https://phabricator.services.mozilla.com/D224612
2024-10-07 10:15:16 +00:00
keithamus
a155da2430 Bug 1888728 - Use CloseWatcher machinery for Dialogs & Popovers r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D206170
2024-09-24 16:48:09 +00:00
David Shin
e52d21fa25 Bug 1900232: Part 5 - Add anchor-size() to sizing properties. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D222534
2024-09-23 13:58:38 +00:00
David Shin
41f83d368b Bug 1900232: Part 2 - Create one place to shim inset getters. r=firefox-style-system-reviewers,emilio
... Instead of handling `anchor()` function at each site manually.

Differential Revision: https://phabricator.services.mozilla.com/D222531
2024-09-23 13:58:37 +00:00
Masayuki Nakano
136939d338 Bug 1916141 - Make AutoPointerEventTargetUpdater guarantee that the target is an element if the event target should be so r=smaug
According to test result on tryserver, the constructor may receive text frame,
although I couldn't reproduce it with writing tests.  Then, it'll return
the text node as the mouse event target after dispatching a pointer event.
However, mouse events need to be targeted to element node.  Therefore, it's
wrong to use the frame when `aTargetContent` is specified.

Additionally, for the last resort, it should refer an inclusive ancestor element
of the target frame content if `aTargetContent` is not specified and the event
should be targeted to an element.

Finally, there is another path to set non-element node in
`PresShell::EventHandler::DispatchEventToDOM`.  The path is not the cause of
the reported case, but we should fix it too.

Differential Revision: https://phabricator.services.mozilla.com/D222091
2024-09-15 21:57:51 +00:00
Emilio Cobos Álvarez
5867a73edc Bug 1917867 - Simplify PresShell event dispatching asserts. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D221843
2024-09-12 16:50:26 +00:00
Emilio Cobos Álvarez
0b3521ccca Bug 1891335 - Compute EffectInfo updates at IntersectionObserver time. r=smaug,hiro
What goes on here is that there's a couple of unfortunate style change
sequences which end up making us not do the EffectsInfo dance correctly.

Twitter uses (maybe didn't use to, which would explain the regression) a
visibility: hidden, out-of-flow iframe for a bit (which we correctly
throttle). But then they switch to an in-flow, visible, zero-height
iframe. That we should _not_ throttle. However, we end up not getting to
the display list code at all, because nsBlockFrame decides that we don't
need to descend into an empty line[1].

It seems less error prone to re-use the IntersectionObserver timing and
computation to determine whether the iframe is visible. That completely
matches in-process iframes, too.

Removing the empty frame border and putting them on an empty line in
dom/base/test/test_bug1639328.html is enough to reproduce the issue
without this patch.

[1]: https://searchfox.org/mozilla-central/rev/fe2743c6c5c708061c7f6504b26958fcc815bb4a/layout/generic/nsBlockFrame.cpp#7569-7579

Differential Revision: https://phabricator.services.mozilla.com/D207479
2024-09-06 16:04:57 +00:00
Stanca Serban
d05e0c1dd0 Backed out changeset 80db8b7ff2af (bug 1891335) for causing mochitests failures in test_bug1639328.html. 2024-09-06 00:22:51 +03:00
Emilio Cobos Álvarez
f20aebf2fc Bug 1891335 - Compute EffectInfo updates at IntersectionObserver time. r=smaug,hiro
What goes on here is that there's a couple of unfortunate style change
sequences which end up making us not do the EffectsInfo dance correctly.

Twitter uses (maybe didn't use to, which would explain the regression) a
visibility: hidden, out-of-flow iframe for a bit (which we correctly
throttle). But then they switch to an in-flow, visible, zero-height
iframe. That we should _not_ throttle. However, we end up not getting to
the display list code at all, because nsBlockFrame decides that we don't
need to descend into an empty line[1].

It seems less error prone to re-use the IntersectionObserver timing and
computation to determine whether the iframe is visible. That completely
matches in-process iframes, too.

Removing the empty frame border and putting them on an empty line in
dom/base/test/test_bug1639328.html is enough to reproduce the issue
without this patch.

[1]: https://searchfox.org/mozilla-central/rev/fe2743c6c5c708061c7f6504b26958fcc815bb4a/layout/generic/nsBlockFrame.cpp#7569-7579

Differential Revision: https://phabricator.services.mozilla.com/D207479
2024-09-05 17:16:12 +00:00
Masayuki Nakano
d9ceb68c92 Bug 1915057 - Make HTMLEditor::NotifyRootChanged() notifies IMEStateManager of the editor root change r=smaug,m_kato
When `HTMLEditor` handles the design mode, `IMEContentObserver` observes the
`<body>` if there is.  However, web apps may remove it.  Then, we need to
recreate `IMEContentObserver` with emulating a focus move because it's difficult
to compute the difference between the old root and the new root (IME focus
notification sends all content to the parent, it's faster in most cases in this
situation). This was fixed in bug 1911010.  However, there are remaining issues
after that.

When new `<body>` or the original `<body>` is connected again,
`IMEContentObserver` does not restart to observe the new `<body>`.  So,
`IMEContentObserver` working differently after the `<body>` is even temporarily
removed.  This make it harder to reproduce reported bugs.

Additionally, if the document element is removed, `IMEContentObserver` won't
be recreated until the document gets focus again even after new root and/or
`<body>` element is connected.  This makes IME users inconvenient with such
tricky editors.

This patch makes `HTMLEditor::NotifyRootChanged` notifies `IMEStateManager`
of the editor root element change.  Then, the new method of `IMEStateManager`
updates IME enabled state and recreate `IMEContentObserver` with emulating
a focus move.

Differential Revision: https://phabricator.services.mozilla.com/D220362
2024-09-05 00:35:50 +00:00
Sean Feng
c6e6d73a26 Bug 1900426 - Implement DnD for shadow-crossing selection r=jjaschke,smaug,dom-core
This patches allows
  1. when the selection is shadow-crossing, dragging it will have the
  correct the drag image correctly displayed. It's hard to test, so
  no tests for this.

  2. The selection can now be serialized and dropped.
  `test_drag_drop_shadow_crossing_selection.html` is the test for
  this.

Differential Revision: https://phabricator.services.mozilla.com/D217318
2024-09-03 15:42:58 +00:00
Noemi Erli
9f28e0b5e5 Backed out changeset 5c6272143175 (bug 1900426) for causing bug 1915027, bug 1915620, bug 1915816 2024-08-30 16:31:30 +03:00
Sean Feng
7bd0868c67 Bug 1900426 - Implement DnD for shadow-crossing selection r=jjaschke,smaug,dom-core
This patches allows
  1. when the selection is shadow-crossing, dragging it will have the
  correct the drag image correctly displayed. It's hard to test, so
  no tests for this.

  2. The selection can now be serialized and dropped.
  `test_drag_drop_shadow_crossing_selection.html` is the test for
  this.

Differential Revision: https://phabricator.services.mozilla.com/D217318
2024-08-28 15:03:17 +00:00
Stanca Serban
781a44c0d1 Backed out changeset d77e541eb497 (bug 1900426) for causing mochitests failures in test_drag_drop_shadow_crossing_selection.html. CLOSED TREE 2024-08-27 04:23:16 +03:00
Sean Feng
882b3545b6 Bug 1900426 - Implement DnD for shadow-crossing selection r=jjaschke,smaug,dom-core
This patches allows
  1. when the selection is shadow-crossing, dragging it will have the
  correct the drag image correctly displayed. It's hard to test, so
  no tests for this.

  2. The selection can now be serialized and dropped.
  `test_drag_drop_shadow_crossing_selection.html` is the test for
  this.

Differential Revision: https://phabricator.services.mozilla.com/D217318
2024-08-26 19:09:03 +00:00
Tamas Szentpeteri
e490399751 Backed out changeset 32fba1d43e0a (bug 1900426) for causing mochitest failures on test_synthmousemove_after_dnd.html. CLOSED TREE 2024-08-26 18:12:22 +03:00
Sean Feng
4101262ed0 Bug 1900426 - Implement DnD for shadow-crossing selection r=jjaschke,smaug,dom-core
This patches allows
  1. when the selection is shadow-crossing, dragging it will have the
  correct the drag image correctly displayed. It's hard to test, so
  no tests for this.

  2. The selection can now be serialized and dropped.
  `test_drag_drop_shadow_crossing_selection.html` is the test for
  this.

Differential Revision: https://phabricator.services.mozilla.com/D217318
2024-08-26 13:51:31 +00:00
Florian Quèze
c1d775c929 Bug 1913624 - Remove expired telemetry histogram PRESSHELL_LAYOUT_TOTAL_MS_PER_TICK, r=TravisLong.
Depends on D219468

Differential Revision: https://phabricator.services.mozilla.com/D219469
2024-08-20 20:56:48 +00:00
Florian Quèze
025d945c8e Bug 1913624 - Remove expired telemetry histograms INPUT_EVENT_RESPONSE_{STARTUP,POST_STARTUP}_MS, INPUT_EVENT_QUEUED_APZ_{TOUCH_MOVE,MOUSE_MOVE,WHEEL_MS} and INPUT_EVENT_HANDLED_*_MS, r=TravisLong.
Differential Revision: https://phabricator.services.mozilla.com/D219456
2024-08-20 20:56:43 +00:00
Masayuki Nakano
a0a9b98b9b Bug 1793267 - Make PostEventHandler::CheckPointerCaptureState synthesize ePointerMove and eMouseMove if nobody captures the pointer anymore r=smaug
When an element starts capturing a pointer, pointer/mouse boundary events are
dispatched by `EventStateManager::PreHandleEvent` [1].  However, when the
capturing element loses the capture, they are not dispatched.

When the pointer capture is implicitly released, the pointer may be over another
document.  Therefore, this patch synthesizes an internal `ePointerMove` and
`eMouseMove` on the widget to make `PresShell::HandleEvent` redirects the event
to proper document under the pointer.

Unfortunately, I add 2 manual tests into WPT.  The reason is, a drag operation
across document boundary with test driver does not work even if I specify the
pointer position within the parent document coordinates.  This is same both on
Firefox and Chrome.  Additionally, writing the new tests as a mochitest won't
work too.  If I use synthesized mouse events, I see similar failure.
Additionally, when I use native events, it works, but unstable to run on CI.

1. https://searchfox.org/mozilla-central/rev/669fac9888b173c02baa4c036e980c0c204dfe02/dom/events/EventStateManager.cpp#1139-1140

Differential Revision: https://phabricator.services.mozilla.com/D218896
2024-08-20 03:42:26 +00:00
Hiroyuki Ikezoe
687a8e3aa7 Bug 1831649 - Trigger MobileViewportManager::RefreshViewportSize in the case where nsDocumentViewport boundaries changes but nsView boundaries unchanges. r=tnikkel,botond
Differential Revision: https://phabricator.services.mozilla.com/D208564
2024-08-06 07:46:23 +00:00
Jan-Niklas Jaeschke
5167ad6419 Bug 1867249, part 2: Enable SelectionNodeCache for painting. r=sefeng,dom-core,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217819
2024-08-05 15:43:27 +00:00
Jan-Niklas Jaeschke
70014fe558 Bug 1867249, part 1: Implemented new cache to determine selected nodes. r=sefeng,dom-core
Determining if a node is selected is a super-hot code path,
which at times introduces jank both in Reflow and Painting.
This is due to each node comparing its position to the range's start and end point,
which even happens several times (`nsINode::IsSelected()` and `Selection::LookupSelection()`).
In worst cases, this can lead to reflow which takes several minutes.

This patch introduces a cache which contains all fully selected nodes,
and lives throughout one `PresShell::DoReflow()` call.
Collecting all selected nodes of a selection is very fast.
The selected nodes are then stored in a hash set.
During reflow the check if a node is selected first checks the cache
if the node is fully selected, and otherwise goes through the existing
code to check if the node is partially selected.

Differential Revision: https://phabricator.services.mozilla.com/D217794
2024-08-05 15:43:27 +00:00
Masayuki Nakano
528d09c312 Bug 1904279 - Get rid of dom.w3c_pointer_events.dispatch_click_as_pointer_event pref r=smaug,pip-reviewers,search-reviewers,devtools-reviewers,urlbar-reviewers,nchevobbe,dao,jteow,mconley
Keep supporting the pref makes a lot of `click`, `auxclick` and `contextmenu`
event creators complicated (and look messy).  So, let's delete it as soon as
possible.

Differential Revision: https://phabricator.services.mozilla.com/D217225
2024-07-30 06:49:42 +00:00
Masayuki Nakano
16398887a4 Bug 1905267 - part 2: Make PresShell not use non-element event target when target frame is destroyed and the event wants Element target r=smaug
When event target frame is destroyed, `PresShell::NotifyDestroyingFrame` updates
current event target content to the frame content.  However, event target of
some DOM events need to be `Element`.  Therefore,
`PresShell::mCurrentEventTarget` needs to store at least the handling
`EventMessage` to consider whether the event target can be non-element content
node or only element node.  So, we need to make `PresShell::EventTargetInfo`
store `EventMessage`.  Then, we can make `PresShell::NotifyDestroyingFrame`
prefer inclusive ancestor element as new event target from the `EventMessage`.

Although I don't understand what's going on the reported case, but I found the
simple case when event target is changed to a `Text` with the assertion in
`PresShell::DispatchEventToDOM`.  Therefore, this patch has a new test.

Note that if target frame is a frame for element, e.g., when event target is
a focused element, `IsForbiddenDispatchingToNonElementContent` result won't
change the behavior.  Therefore, its implementation is not optimized for
non-user input events.

Differential Revision: https://phabricator.services.mozilla.com/D217205
2024-07-30 00:06:10 +00:00
Masayuki Nakano
66321dce9c Bug 1905267 - part 1: Make PresShell manage event target frame and content with a struct r=smaug
`PresShell::mCurrentEventTargetContent` may be update to non-element node
when `PresShell::mCurrentEventTargetFrame` is destroyed.  Therefore, for
avoiding it, I'd like to add `EventMessage` to the group to consider whether
the content needs to be `Element`.  However, adding new members for current
and stack would make `PresShell` members more messy.  Therefore, I'd like to
group the data with the simple struct.

Differential Revision: https://phabricator.services.mozilla.com/D217204
2024-07-30 00:06:09 +00:00
Masayuki Nakano
44aae6e962 Bug 1909577 - Make some nsFocusManager::GetFocusedElement() users use its static version instead r=emilio,credential-management-reviewers,issammani
Now, we have `nsFocusManager::GetFocusedElementStatic()` which returns focused
element if the `nsFocusManager` instance is available.  Therefore, if
`nsFocusManager::GetFocusedElement()` users do not use other methods of
`nsFocusManager`, they can use `nsFocusManager::GetFocusedElementStatic()` and
make themselves simpler.

Note that some callers return early if `nsFocusManager` is not available, but
they do not return error and `nsFocusManager` instance is available in most
time of the life time of the process.  Therefore, we can simply stop using the
early return.

Differential Revision: https://phabricator.services.mozilla.com/D217527
2024-07-25 00:33:58 +00:00
Emilio Cobos Álvarez
1513819c21 Bug 1789166 - Use content-visibility rather than display: none to hide <details> content. r=smaug
This matches the current shipping version of Chromium, and the last
version of the spec, except for the <slot> display when open, which per
spec ought to be `block`, but it's still `contents`.

animation-canceled-by-parent-details-element-being-closed.html is
invalid because content-visibility doesn't cancel animations, just
pauses them. It also times out in Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D217192
2024-07-20 17:49:39 +00:00
Stanca Serban
fd5b1ecdad Backed out changeset 48baafc34055 (bug 1789166) for causing mochitests failures. CLOSED TREE 2024-07-20 18:43:13 +03:00
Emilio Cobos Álvarez
79779b8643 Bug 1789166 - Use content-visibility rather than display: none to hide <details> content. r=smaug
This matches the current shipping version of Chromium, and the last
version of the spec, except for the <slot> display when open, which per
spec ought to be `block`, but it's still `contents`.

animation-canceled-by-parent-details-element-being-closed.html is
invalid because content-visibility doesn't cancel animations, just
pauses them. It also times out in Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D217192
2024-07-20 14:17:31 +00:00
Masayuki Nakano
793931aa6c Bug 1907967 - Make PresShell::RecordPointerLocation record mouse location and enqueue a synthetic mouse move if a drag event occurs r=smaug
During a drag session, mouse events are not fired.  Therefore, once the drag
session ends, mouse cursor may be anywhere different from the drag start
position.  Therefore, `PresShell` should update the last mouse position when it
receives drag events and needs to synthesize a mouse move after the drag session
ends to fire mouse boundary events and updating the hover state.

Differential Revision: https://phabricator.services.mozilla.com/D217080
2024-07-20 02:28:57 +00:00
Masayuki Nakano
46df5e10d3 Bug 1907967 - Change printfs for logging synthesizing mouse moves to MOZ_LOG r=smaug
I think that it should be available only in the debug build for the performance.

Differential Revision: https://phabricator.services.mozilla.com/D217079
2024-07-20 02:28:57 +00:00
Masayuki Nakano
b7d4e92909 Bug 1907967 - Rewrite PresShell::RecordPointerLocation with switch statement r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D217078
2024-07-20 02:28:56 +00:00
Jan-Niklas Jaeschke
cd139cc24d Bug 1908907 - Text Fragments: Set sequential focus to the text directive, but don't focus it. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D217100
2024-07-19 15:42:32 +00:00
Stanca Serban
b74d1bcd26 Backed out 12 changesets (bug 1831649) for causing multiple failures.
Backed out changeset 501dc3134ae1 (bug 1831649)
Backed out changeset 21235ab42839 (bug 1831649)
Backed out changeset 279fdf36aac1 (bug 1831649)
Backed out changeset 17fb50534fae (bug 1831649)
Backed out changeset b2718b2f730d (bug 1831649)
Backed out changeset a05aa1c75ece (bug 1831649)
Backed out changeset becfb23cd6b4 (bug 1831649)
Backed out changeset 2d0e7e662530 (bug 1831649)
Backed out changeset 22538f7bdc88 (bug 1831649)
Backed out changeset 4ddecb37950f (bug 1831649)
Backed out changeset 1e6ed8b78e8f (bug 1831649)
Backed out changeset 6e96a1a01c24 (bug 1831649)
2024-07-18 06:13:43 +03:00
Hiroyuki Ikezoe
e184f9d681 Bug 1831649 - Trigger MobileViewportManager::RefreshViewportSize in the case where nsDocumentViewport boundaries changes but nsView boundaries unchanges. r=tnikkel,botond
Differential Revision: https://phabricator.services.mozilla.com/D208564
2024-07-18 00:31:14 +00:00
Jan-Niklas Jaeschke
d296498d92 Bug 1906134 - Text Fragments: Ensure to scroll the first text directive on a page into the center of the view. r=emilio
Before this patch, it could happen that `PresShell::GoToAnchor()` was called while loading a document.
This method did not know about text fragments before,
and would scroll the anchor (ie., the first text directive) to the top of the view.
This was noticeable for pages that took longer to load, where the text directive was scrolled to the center first, and then to the top.

This patch saves the desired vertical scroll position as a member in `PresShell` and makes `GoToAnchor()` scroll to the center as well.

Additionally, this patch updates the test file target document to make it more mobile-friendly.

Differential Revision: https://phabricator.services.mozilla.com/D216039
2024-07-16 09:16:48 +00:00
Jan-Niklas Jaeschke
c547a4b4e6 Bug 1906895 - Text Fragments: Scroll the start container of a range into view instead of its common ancestor. r=emilio
Spec issue: https://github.com/WICG/scroll-to-text-fragment/issues/259

Differential Revision: https://phabricator.services.mozilla.com/D216147
2024-07-15 07:38:21 +00:00
Timothy Nikkel
a679a30a60 Bug 1906561. Avoid a useless call to GetTransformMatrix in PresShell::ScrollFrameIntoView. r=layout-reviewers,emilio
Since container is transformed, container->GetTransformMatrix will always just put the cross doc parent frame into parent. I checked the history when this code was written, it looks like GetTransformMatrix (via GetResultingTransformMatrix) might have go up more than one parent frame in the case of preserve 3d (combines 3d) frames. That is no longer the case, and GetTransformMatrix is a relatively heavyweight function.

Differential Revision: https://phabricator.services.mozilla.com/D215860
2024-07-10 12:00:09 +00:00
Emilio Cobos Álvarez
5f0c7d9620 Bug 1906132 - Explicitly set bresize bit when doing a measuring reflow. r=dholbert
This doesn't change behavior, but it is more explicit.

Make the two resize code-paths invalidate the same way.

Differential Revision: https://phabricator.services.mozilla.com/D215841
2024-07-05 17:50:40 +00:00
David P
805b8742ba Bug 1893119: Part 3 - Add widget to nsContentUtils::GetDragSession r=gstoll,rkraesig
Updates each client of the nsContentUtils method to get the right drag session -- the one for the widget that is currently the source or target of the drag session.
The change to nsDOMWindowUtils::DispatchDOMEventViaPresShellForTesting() supports the change to WidgetDragEvent::InitDropEffectForTests() and enabled a
large number of test fixes in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D211067
2024-07-04 07:48:04 +00:00