Commit graph

1208 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
edad6cfc6f Bug 1677324 - Keep painting the of the old remote frame when going into the bfcache until the child unsuppresses painting. r=nika
This should pretty much match our non-fission behavior. I found the
original approach of keeping the frameloader from nsSubDocumentFrame
quite hard to get green on try unfortunately, because among other
things, the new frameloader wouldn't get the right viewport sizes /
position / etc.

Differential Revision: https://phabricator.services.mozilla.com/D121198
2021-08-01 21:45:56 +00:00
Csoregi Natalia
bc4c680c8d Backed out 3 changesets (bug 1722258) for causing Bug 1722935. a=backout
Backed out changeset cf8a1175abd1 (bug 1722258)
Backed out changeset 41176d476eb7 (bug 1722258)
Backed out changeset 4149d596d03d (bug 1722258)
2021-07-29 20:19:48 +03:00
Dorel Luca
a2153c3bb7 Backed out changeset 21ac9225dd4b (bug 1718012) for WPT failures in css/css-values/viewport-units-css2-001.html. CLOSED TREE 2021-07-29 01:00:39 +03:00
Hiroyuki Ikezoe
3dc9a18f9b Bug 1718012 - Call UpdateSizesBeforeReflow only for resize reflow cases and set MobileViewportManager::mMobileViewportSize even if mDisplaySize hasn't been changed in UpdateSizesBeforeReflow. r=tnikkel
In the case of reflowing caused by full zoom changes, the mDisplaySize isn't
changed, whereas mMobileViewportSize should be changed.

Differential Revision: https://phabricator.services.mozilla.com/D120190
2021-07-28 21:04:31 +00:00
Matt Woodrow
0c782c8447 Bug 1722258 - Add FallbackRenderer to replace BasicLayerManager usage. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120921
2021-07-28 20:58:23 +00:00
Matt Woodrow
7cd494afba Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120920
2021-07-28 20:58:22 +00:00
Matt Woodrow
d3dadfe348 Bug 1722258 - Split out fallible composite-only path of PresShell::Paint. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120919
2021-07-28 20:58:22 +00:00
Sandor Molnar
307d5a322a Backed out changeset 1b29d7a6d15c (bug 1718012) for causing crashtest failures. CLOSED TREE 2021-07-28 09:24:58 +03:00
Hiroyuki Ikezoe
d1f9b6d6e9 Bug 1718012 - Call UpdateSizesBeforeReflow only for resize reflow cases and set MobileViewportManager::mMobileViewportSize even if mDisplaySize hasn't been changed in UpdateSizesBeforeReflow. r=tnikkel
In the case of reflowing caused by full zoom changes, the mDisplaySize isn't
changed, whereas mMobileViewportSize should be changed.

Differential Revision: https://phabricator.services.mozilla.com/D120190
2021-07-28 05:02:30 +00:00
Aaron Klotz
022c804b33 Bug 1690296: Add callback to notify app to fully display its dynamic toolbar; r=agi,owlish,hiro
* Per advice from Emilio on Matrix, I consolidated overflow checks into `ScrollFrameHelper::GetOverflowState()`.
* In `ScrollFrameHelper::ReflowFinished` we detect the condition requring the app to expand the toolbar.
  (Hiro, I know that you suggested a second place to detect this. If you feel that it is important enough to add that,
   we'd prefer filing a follow-up bug in Layout for that case that your team can follow up on.)
* We then propagate the notification through `PresShell`, up through `PBrowser`, through the `nsWindow`, then into the `GeckoSession`
* We invoke a new method on the `ContentDelegate`. This seemed like the reasonable delegate to use given other existing
  callbacks in the similar vein (such as going fullscreen), but let me know if this should go elsewhere.
* We update GVE and JUnit tests to test this.

Differential Revision: https://phabricator.services.mozilla.com/D120499
2021-07-27 21:50:03 +00:00
Matt Woodrow
912b7f8ef1 Bug 1721537 - Split out WindowRenderer base class from LayerManager. r=miko
Depends on D120439

Differential Revision: https://phabricator.services.mozilla.com/D120440
2021-07-22 22:58:57 +00:00
Miko Mynttinen
746fe9865a Bug 1720711 - Remove most nsDisplayItem::GetAbove() calls r=mattwoodrow
Replaces direct linked list traversals with iterators.

Differential Revision: https://phabricator.services.mozilla.com/D119985
2021-07-16 10:55:03 +00:00
Botond Ballo
b63b45d2f9 Bug 1712400 - Account for the resolution in the enclosing document when positioning and sizing the drag preview image when dragging content in a nested content process. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D119358
2021-07-10 17:23:20 +00:00
Timothy Nikkel
66292dac3b Bug 1681692. In FindViewContaining we are only crossingZoomBoundary if we start in visual coordinates. r=botond
In the most common case the first call to FindViewContaining has aRelativeToView = aView = the root view of the root content document, and we start in visual coords. Then we convert to layout coords and call FindViewContaining recusively with aRelativeToView = the root view again, aView = a child of the root view and working in layout coords. And we still satisfy the conditions to set crossingZoomBoundary to true, which is incorrect because we already crossed. We need to check that we are also in visual coords.

Differential Revision: https://phabricator.services.mozilla.com/D105438
2021-07-09 10:06:00 +00:00
Emilio Cobos Álvarez
7ee0e2d6e4 Bug 1719375 - Consider documents used-as-an-image always active. r=tnikkel
These are ticked when painted, so it is fine and it's effectively what
happened before bug 1717983 (because we didn't get into this condition:
https://hg.mozilla.org/mozilla-central/rev/cb704553fc64#l3.73).

Differential Revision: https://phabricator.services.mozilla.com/D119314
2021-07-08 12:54:48 +00:00
Emilio Cobos Álvarez
a381488865 Bug 1719571 - Don't use null as a fallback when there's no doc uri.
Differential Revision: https://phabricator.services.mozilla.com/D119387
2021-07-08 11:14:57 +00:00
Emilio Cobos Álvarez
6fc3e06d85 Bug 1719440 - Add some logging for PresShell activeness. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D119262
2021-07-07 10:30:11 +00:00
Hiroyuki Ikezoe
ba5ded4486 Bug 1700245 - Use IsAncestorFrameCrossDocInProcess in PresShell::ClearMouseCapture(nsIFrame*). r=tnikkel
Since bug 1717726 we've disallowed having remote <browser> or remote <iframe>
inside nsDeckFrame which means `captureingFrame` in ClearMouseCapture(nsIFrame*)
function will never be called in an out-of-process thus we can use
IsAncestorFrameCrossDocInProcess there.

Also add an assertions that the function gets called only with a child frame of
nsDeckFrame since this function is used only inside nsDeckFrame.

Depends on D119068

Differential Revision: https://phabricator.services.mozilla.com/D119069
2021-07-06 08:58:56 +00:00
Hiroyuki Ikezoe
1fa23c1c89 Bug 1700245 - Split PresShell::ClearMouseCapture into two functions, one takes nsIFrame, the other takes no argument. r=tnikkel
Depends on D119067

Differential Revision: https://phabricator.services.mozilla.com/D119068
2021-07-06 08:58:55 +00:00
Emilio Cobos Álvarez
0c7b4c828a Bug 1717983 - Don't consider a browser active if the tab is inactive but we're preserving layers. r=nika
GeckoView always calls preserveLayers(true) on all <browser> elements,
which causes the puppet widget to always be considered visible.

Given how the code worked before, aBrowsingContext.isActive = false
after that call would deactivate the pres shell, but after my patch it
stops doing so.

We don't really want to un-throttle the refresh driver etc just because
we're preserving layers, so propagate the state to the child process and
account for that in the logic to determine PresShell activeness.

Depends on D118703

Differential Revision: https://phabricator.services.mozilla.com/D118884
2021-07-05 17:31:49 +00:00
Emilio Cobos Álvarez
a5f4c42f89 Bug 1717983 - Improve PresShell active flag handling. r=nika
This moves the logic of whether a pres shell should be active to a
single place to make it sane to reason about, and fixes the
subdocument propagation when a BrowserChild becomes visible.

Differential Revision: https://phabricator.services.mozilla.com/D118703
2021-07-05 17:31:48 +00:00
Florian Quèze
cd399a71a2 Bug 1717991 - Remove ifdefs around code that adds profiler markers with custom marker schemas, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D118680
2021-06-25 13:28:01 +00:00
Sandor Molnar
d5946f0a7e Backed out changeset b46a490223a1 (bug 1717983) for causing android failures. CLOSED TREE 2021-06-25 03:29:08 +03:00
Emilio Cobos Álvarez
72c62d51c7 Bug 1717983 - Improve PresShell active flag handling. r=nika
This moves the logic of whether a pres shell should be active to a
single place to make it sane to reason about, and fixes the
subdocument propagation when a BrowserChild becomes visible.

Differential Revision: https://phabricator.services.mozilla.com/D118703
2021-06-24 20:50:10 +00:00
Botond Ballo
cdcdf984e4 Bug 1698693 - Convert audited calls to GetCrossDocParentFrame() to GetCrossDocParentFrameInProcess(). r=tnikkel
See bug 1698693 comment 6 and subsequent comments for the audit.

Depends on D117388

Differential Revision: https://phabricator.services.mozilla.com/D117389
2021-06-23 22:05:31 +00:00
Botond Ballo
c20a537ecd Bug 1698693 - Make the GetNearestScrollableFrame() call in GetCurrentItemAndPositionForElement() stop at the root scroll frame. r=tnikkel
See rationale in bug 1698693 comment 9.

The added flags ensure we stop at the RSF even if it's overflow:hidden,
or if the starting frame is in fixed content.

Depends on D117387

Differential Revision: https://phabricator.services.mozilla.com/D117388
2021-06-23 22:05:31 +00:00
Florian Quèze
dfeb53e219 Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 09:33:00 +00:00
Iulian Moraru
b02492de66 Backed out changeset 617a466d0cce (bug 1715257) for causing build bustages. CLOSED TREE 2021-06-17 10:58:16 +03:00
Florian Quèze
7b4906a6bd Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 06:12:10 +00:00
Emilio Cobos Álvarez
f0a9cca358 Bug 1649367 - Fix some usage of IsRootContentDocument in PresShell. r=tnikkel
This doesn't change behavior, and is consistent with the changes made in
bug 1554832 to this code.

Differential Revision: https://phabricator.services.mozilla.com/D98473
2021-06-13 09:31:17 +00:00
Kagami Sascha Rosylight
55dbc99e55 Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 23:54:06 +00:00
Butkovits Atila
53cb932555 Backed out changeset aa6c7477c4d2 (bug 1713491) for causing build bustages on nsIFrame.cpp. CLOSED TREE 2021-06-12 00:12:06 +03:00
Kagami Sascha Rosylight
9d0b659349 Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 18:53:28 +00:00
Dorel Luca
e1f4d9bb38 Backed out changeset 17e7b969b830 (bug 1713491) for Linux build bustage in gecko/dom/events/ContentEventHandler.cpp. CLOSED TREE 2021-06-11 17:52:10 +03:00
Kagami Sascha Rosylight
74760a9a0e Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 11:37:11 +00:00
Kartikaya Gupta
0cd36f6974 Bug 1694847 - Remove the expired SCROLL_INPUT_METHODS telemetry probe. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D116320
2021-05-31 21:36:35 +00:00
Timothy Nikkel
5bd54aad13 Bug 1710052. Allow repaint requests to update the resolution if the last resolution change origin was apz in addition to when the old resolution matches. r=botond
During double tap animations we can be in a situation where we get two repaint requests from every layers update. The first one comes from NotifyLayersUpdated and scroll offset update type is eNone, the second from the zoom animation ticking has scroll offset update type eUserAction and there was a layout scroll position update. Both can have some amount of aync zoom (not necessarily equal), and have the same content pres shell resolution.

We handle the eNone one first, and update the content pres shell resolution. Then for the eUserAction we check the content presshell resolution and it no longer matches, so we drop the request entirely thinking its out of date (including the scroll position update). It's not out of date of course, content hasn't done any updates, so apz has the latest info (even if it might not have a fully up to date value of the content pres shell resolution, it's value of zoom is the most up to date of anywhere).

Differential Revision: https://phabricator.services.mozilla.com/D114587
2021-05-19 02:50:52 +00:00
Emilio Cobos Álvarez
0080b2b390 Bug 1710643 - Fix encoding of the theme change kind so it doesn't crash when getting converted to JS if non-zero.
MANUAL PUSH: Fixes orange in some tests that do restricted theme
changes CLOSED TREE.
2021-05-13 01:53:38 +02:00
Emilio Cobos Álvarez
8fb52356f4 Bug 1708303 - Fix scroll-margin implementation. r=hiro
So that margin is not included in the rect for visibility calculations,
and padding and margin are accounted properly on them.

Differential Revision: https://phabricator.services.mozilla.com/D113853
2021-05-06 00:54:14 +00:00
Edgar Chen
a3ff3d48aa Bug 1709200 - Rename nsContentUtils::GetRootDocument to GetInProcessSubtreeRootDocument; r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D114177
2021-05-05 09:42:20 +00:00
Timothy Nikkel
fbca5d1be2 Bug 1708083. Schedule a paint when the presshell resolution changes. r=mattwoodrow
Surprisingly nothing actually schedules a paint when the resolution changes.

This probably wasn't a problem because when the resolution changes almost certainly something else is changing that causes a paint too (scroll position, display port, etc).

We hit this in the test I wrote for bug 1706868. We double tap zoom in. In the last RequestContentRepaint from apz to content the only thing that changes is the resolution by a small amount. If he scroll offset or display port margins changed we'd ask for a paint, but evidently they do not. Content updates it's resolution, but since it does not generate a paint apz never gets notified about this, so it thinks content has a slightly different resolution.

Then the test starts a double tap zoom out. When it notifies content of the new resolutions APZCCallbackHelper does nothing because of this line

https://searchfox.org/mozilla-central/rev/4648b6ee31c2519b1753023e4f4853b14fdd16e5/gfx/layers/apz/util/APZCCallbackHelper.cpp#335

where it detects that the content resolution and what apz thinks is the content resolution differ by too much, so it thinks the request from apz is out of date and ignores it.

Differential Revision: https://phabricator.services.mozilla.com/D113614
2021-04-28 04:32:13 +00:00
Emilio Cobos Álvarez
de258a4e58 Bug 1699844 - Make promiseDocumentFlushed handle presshell destruction correctly. r=smaug,botond
By resolving the relevant promises, instead of crashing (and if we
didn't crash we'd leave the window registered as a refresh driver
observer, which would be bad).

I wanted to reject them, since that's what we do when the page has no
pres shell, but that'd make this test fail:

   https://searchfox.org/mozilla-central/rev/d8194cbbeaec11962ed67f83aea9984bf38f7c63/dom/base/test/browser_promiseDocumentFlushed.js#165-186

For this, we modify the OneShotPostRefreshObserver API to be more
generic (and rename it OneShotManagedRefreshObserver).

We fix APZ's usage of this API, which was doing something extremely
weird (returning a refcounted object in a UniquePtr). This seems like an
artifact from recent OneShotPostRefreshObserver cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D111851
2021-04-14 19:34:23 +00:00
sotaro
044fbff5c0 Bug 1701567 - Schedule paint when PresShell becomes active r=mstange
PresShell::SetIsActive(/* aIsActive */ true) does not directly trigger rendering. On Android, there is a case that rendering of about:support is not updated when PresShell::SetIsActive(true) call is slow during Tab switch.

Differential Revision: https://phabricator.services.mozilla.com/D110682
2021-04-07 03:14:08 +00:00
Emilio Cobos Álvarez
e1a031b744 Bug 1701928 - Selection scrolling should not ignore scroll-{margin,padding}. r=hiro,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D110440
2021-04-02 12:14:19 +00:00
Emilio Cobos Álvarez
74db060beb Bug 1701807 - Partially revert the regressing bug for now, gotta find something smarter to do.
Differential Revision: https://phabricator.services.mozilla.com/D110180
2021-03-30 00:05:14 +00:00
Mark Striemer
81479b1262 Bug 1699250 - Use proton dark theme in-content r=jaws
This also fixes up various about pages.

Differential Revision: https://phabricator.services.mozilla.com/D108800
2021-03-28 18:33:05 +00:00
Butkovits Atila
71d46d5a75 Backed out 2 changesets (bug 1690333, bug 1699250) for causing failures on test_bug509732.xhtml. CLOSED TREE
Backed out changeset dcba2814dbc4 (bug 1690333)
Backed out changeset ae3a0e6dde00 (bug 1699250)
2021-03-28 21:16:58 +03:00
Mark Striemer
5c54a9a003 Bug 1699250 - Use proton dark theme in-content r=jaws
This also fixes up various about pages.

Differential Revision: https://phabricator.services.mozilla.com/D108800
2021-03-28 17:02:20 +00:00
Bogdan Tara
3b463ca0d1 Backed out changeset 421e6e333309 (bug 1699250) for browser_html_discover_view_clientid.js mochitest failures
DONTBUILD
2021-03-28 02:37:33 +02:00
Mark Striemer
3d91b0c5fb Bug 1699250 - Use proton dark theme in-content r=jaws
This also fixes up various about pages.

Differential Revision: https://phabricator.services.mozilla.com/D108800
2021-03-27 23:31:07 +00:00