Commit graph

501 commits

Author SHA1 Message Date
Timothy Nikkel
9e235485ec Bug 1749286. Remove redundant calls marking remote browsers as hidden. r=miko
Remote browsers are fully hidden by default. The only place we mark them as visible is in nsDisplayRemote::CreateWebRenderCommands

https://searchfox.org/mozilla-central/rev/b3933df6e119bd6caf5d9e5868670348ec26dee3/layout/generic/nsSubDocumentFrame.cpp#1363

and we create a WebRenderUserData item there that marks the remote browser hidden in its destructor

https://searchfox.org/mozilla-central/rev/b3933df6e119bd6caf5d9e5868670348ec26dee3/gfx/layers/wr/WebRenderUserData.cpp#426

So that will mark it hidden when it's no longer visible. And in fact we destroy the WebRenderUserData table for the frame at both call sites that we are removing in this patch. So there shouldn't be any change with this patch.


I think the way this redundancy came about was because the code was first added for the layers backend in

https://hg.mozilla.org/integration/mozilla-inbound/rev/b81cf35a573e

and that of course doesn't user WebRenderUserdata so it needed to mark remote browsers hidden in its own way.

And then for webrender in

https://hg.mozilla.org/integration/mozilla-inbound/rev/ac0ad5d8e9a5

And then when FrameLayerBuilder was removed they got put together directly

https://hg.mozilla.org/mozilla-central/rev/a95f6a0cd9eb


The reason this is important is for bug 1737503. In that bug we destroy and recreate a remote iframe to handle a style change. If we mark a remote browser as hidden we will draw it as blank for one frame. So instead we want to delay this until the end of the next frame so we don't do that.

Differential Revision: https://phabricator.services.mozilla.com/D135575
2022-01-14 08:47:52 +00:00
Emilio Cobos Álvarez
9fbc18ca4c Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 17:00:36 +00:00
Butkovits Atila
4d927c1fb4 Backed out 4 changesets (bug 1733384) for causing failures at browser_windowPrompt.js. CLOSED TREE
Backed out changeset fa609fadac26 (bug 1733384)
Backed out changeset dd1936d9fe17 (bug 1733384)
Backed out changeset 1a073e40ab1a (bug 1733384)
Backed out changeset 65708a4c708f (bug 1733384)
2021-10-07 17:52:51 +03:00
Emilio Cobos Álvarez
bfdd0fcc77 Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 11:47:34 +00:00
Timothy Nikkel
708b53f06a Bug 1732600. Pass down transform to ancestor scale to child processes. r=botond
In bug 1731929 we added this value, here we give it the value we want for child processes. I think the code comments should explain it.

Differential Revision: https://phabricator.services.mozilla.com/D126629
2021-10-05 09:28:57 +00:00
Timothy Nikkel
23e5fd11c1 Bug 1730131. HitTestingTreeNode::GetRemoteDocumentScreenRect() double applies the resolution. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D125484
2021-09-14 02:33:36 +00:00
Timothy Nikkel
72553046c2 Bug 1728693. Use IsRootContentDocumentCrossProcess in nsSubDocumentFrame::BuildDisplayList. r=mattwoodrow
Not sure we even need this anymore but just doing this so I can finish the fission audit.

Added way back in bug 588407.

This shouldn't actually be any behaviour change: anything that is IsRootContentDocumentInProcess but not IsRootContentDocumentCrossProcess should be a oop if with fission (unless I'm missing a case), so we will never hit this code path, we'll hit the remote iframe path above.

Differential Revision: https://phabricator.services.mozilla.com/D124277
2021-09-03 02:22:11 +00:00
Matt Woodrow
7755c29fd8 Bug 1727423 - Remove BasicLayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123555
2021-08-25 07:35:17 +00:00
criss
58591696b7 Backed out 2 changesets (bug 1727423) for causing build bustages
Backed out changeset 9b2ca95a6527 (bug 1727423)
Backed out changeset 1f01fcbd46a8 (bug 1727423)
2021-08-25 04:41:35 +03:00
Matt Woodrow
59e71b6c78 Bug 1727423 - Remove BasicLayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123555
2021-08-25 01:04:26 +00:00
Matt Woodrow
0ee96e3fa5 Bug 1726291 - Remove FrameLayerBuilder. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D122930
2021-08-23 03:07:31 +00:00
Cosmin Sabou
b53abb88e7 Backed out changeset e111894317cc (bug 1726291) for causing assertion failures on WebRenderCommandBuilder.cpp. CLOSED TREE 2021-08-20 06:22:40 +03:00
Matt Woodrow
94015526e1 Bug 1726291 - Remove FrameLayerBuilder. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D122930
2021-08-20 02:20:39 +00:00
Timothy Nikkel
33ea672136 Bug 1724904. Send resolution to oopifs with webrender. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D122212
2021-08-10 23:42:43 +00:00
Matt Woodrow
ec9b5dd838 Bug 1720152 - Recurse into replay for dependencies, rather than using a temp surface. r=jrmuizel,bobowen,emilio
Differential Revision: https://phabricator.services.mozilla.com/D120050
2021-08-09 22:07:36 +00:00
Emilio Cobos Álvarez
f2a7c7e14e Bug 1677324 - Add the ability for subdocuments to keep painting another remote subdoc. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D121197
2021-08-01 21:45:56 +00:00
Miko Mynttinen
76c9644105 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-19 11:28:20 +00:00
Alexandru Michis
fbd939b860 Backed out 2 changesets (bug 1720804) for causing bustages.
CLOSED TREE

Backed out changeset 5278e88c6d34 (bug 1720804)
Backed out changeset 1acb4ed79b6b (bug 1720804)
2021-07-16 18:10:11 +03:00
Miko Mynttinen
ffc501ddc9 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-16 14:36:34 +00:00
Miko Mynttinen
f1d35170a6 Bug 1720803 - Merge nsDisplayItemBase and nsDisplayItem r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120039
2021-07-16 13:11:40 +00:00
Emilio Cobos Álvarez
0193e0b8c1 Bug 1716537 - Allow updating viewport dimensions on paginated subdocuments. r=mattwoodrow
As those don't have the same incremental reflow issues as root paginated
documents, and we do need this for remote iframes to update their
viewport.

Differential Revision: https://phabricator.services.mozilla.com/D119104
2021-07-08 13:21:50 +00:00
Timothy Nikkel
a29d03dbc6 Bug 1715187. Factor out the resolution from the transform we set on the WebRenderLayerScrollData in nsDisplayRemote::UpdateScrollData. r=botond,hiro
The resolutio needs to be applied on top of any other transforms on that WebRenderLayerScrollData.

Differential Revision: https://phabricator.services.mozilla.com/D118326
2021-07-08 09:48:20 +00:00
Narcis Beleuzu
935ff18b48 Backed out 2 changesets (bug 1716537) for WP failures on iframe-cross-origin-print.sub.html
Backed out changeset aa3e3f80bd68 (bug 1716537)
Backed out changeset 3226bc23c713 (bug 1716537)
2021-07-07 23:20:47 +03:00
Emilio Cobos Álvarez
4ac9da4216 Bug 1716537 - Allow updating viewport dimensions on paginated subdocuments. r=mattwoodrow
As those don't have the same incremental reflow issues as root paginated
documents, and we do need this for remote iframes to update their
viewport.

Differential Revision: https://phabricator.services.mozilla.com/D119104
2021-07-07 18:40:11 +00:00
Edgar Chen
47e66cd7d9 Bug 1716762 - Don't allow focus to move to remote iframe which is display: none; r=emilio
Make it behave the same as in-process iframe.

Differential Revision: https://phabricator.services.mozilla.com/D118002
2021-07-07 12:08:18 +00:00
Butkovits Atila
75289a99bd Backed out 2 changesets (bug 1716537) for causing failures at iframe-cross-origin-print.sub.html. CLOSED TREE
Backed out changeset ddc93b2746df (bug 1716537)
Backed out changeset 7086ac4e5818 (bug 1716537)
2021-07-06 21:42:14 +03:00
Emilio Cobos Álvarez
cb71b3d82e Bug 1716537 - Allow updating viewport dimensions on paginated subdocuments. r=mattwoodrow
As those don't have the same incremental reflow issues as root paginated
documents, and we do need this for remote iframes to update their
viewport.

Depends on D119103

Differential Revision: https://phabricator.services.mozilla.com/D119104
2021-07-06 16:54:41 +00:00
Dorel Luca
1af879103c Backed out 2 changesets (bug 1716537) for Build bustages. CLOSED TREE
Backed out changeset 0b5bfe85b344 (bug 1716537)
Backed out changeset c6561b266910 (bug 1716537)
2021-07-06 18:53:22 +03:00
Emilio Cobos Álvarez
e85773cf91 Bug 1716537 - Allow updating viewport dimensions on paginated subdocuments. r=mattwoodrow
As those don't have the same incremental reflow issues as root paginated
documents, and we do need this for remote iframes to update their
viewport.

Depends on D119103

Differential Revision: https://phabricator.services.mozilla.com/D119104
2021-07-06 15:17:44 +00:00
Miko Mynttinen
c948d7c6a9 Bug 1494676 - Always consider scrollframes with will-change: scroll active r=tnikkel
This bypasses will-change budgeting for frames will-change: scroll.

Differential Revision: https://phabricator.services.mozilla.com/D118373
2021-06-23 13:10:15 +00:00
Daniel Holbert
a945fcf496 Bug 1698987: Use GetCrossDocParentFrameInProcess() in nsSubDocumentFrame. r=tnikkel
This patch doesn't change behavior; GetCrossDocParentFrameInProcess() is just a
wrapper for GetCrossDocParentFrame(), which is what we were calling before.

The "InProcess" version of this API (which we're migrating to in this patch) is
used to annotate GetCrossDocParentFrame() callsites that have been vetted as
being OK with the fact that this API returns null at the boundary of a
cross-origin iframe, if fission is enabled.

In this patch, the two calls that I'm migrating are inside of
EndSwapDocShellsForViews, which gets called when a tab is dragged between
windows.  I'm annotating these two calls as OK, because:

- the first call is about maintaining the NS_FRAME_IN_POPUP state, which is
  used for things like the menulist-dropdown popup.  This bit doesn't need to
  be propagated across process boundaries.
- the second call is about propagating a "needs-paint" notification up to
  ancestor documents. I think we already handle paint invalidation for
  cross-process iframes properly, independent of the explicit invalidation that
  we're doing here.

Differential Revision: https://phabricator.services.mozilla.com/D108704
2021-03-16 23:54:09 +00:00
Miko Mynttinen
285b2844a7 Bug 1526970 - Part 1: Store the list of display items the frame has as a member variable instead of frame property r=mattwoodrow,emilio
Differential Revision: https://phabricator.services.mozilla.com/D104059
2021-02-24 22:22:17 +00:00
Gerald Squelart
2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Ting-Yu Lin
a43cae175a Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-26 02:47:40 +00:00
Csoregi Natalia
0492d8333a Backed out 8 changesets (bug 1686603) for causing crashtest failures. CLOSED TREE
Backed out changeset 94b5d0986d27 (bug 1686603)
Backed out changeset e7edf6fcc41d (bug 1686603)
Backed out changeset 4c9271f07178 (bug 1686603)
Backed out changeset 7013b95266ae (bug 1686603)
Backed out changeset cf7a55638aef (bug 1686603)
Backed out changeset 7717a0f2a37b (bug 1686603)
Backed out changeset c82593b13a61 (bug 1686603)
Backed out changeset fd1d95a1e706 (bug 1686603)
2021-01-26 04:32:13 +02:00
Ting-Yu Lin
ffce5ed7d6 Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-25 22:29:31 +00:00
Mats Palmgren
b41a2b9d21 Bug 1687239 part 2 - Remove plugin support from layout/. r=emilio
Note that there's still a little plugin related code in
widget/ and gfx/ etc after this.  That can be removed
once we remove plugin support from dom/ etc.
The removal from layout/ should be pretty complete though.

Differential Revision: https://phabricator.services.mozilla.com/D102140
2021-01-25 11:53:49 +00:00
Mihai Alexandru Michis
b6b2f1e5f4 Backed out 7 changesets (bug 1686603) for causing crashtest assertion failures.
CLOSED TREE

Backed out changeset 19cba7d34a7f (bug 1686603)
Backed out changeset 3a0d0155ea5e (bug 1686603)
Backed out changeset f1f672cdd0c6 (bug 1686603)
Backed out changeset 63020922e2fd (bug 1686603)
Backed out changeset 8766ce79ba5e (bug 1686603)
Backed out changeset 965dbe8de1e1 (bug 1686603)
Backed out changeset b1328ee45f43 (bug 1686603)
2021-01-21 09:21:12 +02:00
Ting-Yu Lin
d0c462cb81 Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-21 04:17:59 +00:00
Hiroyuki Ikezoe
e2617c5fcf Bug 1682200 - Apply the top level resolution for iframes in the same process of the top level document. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D100280
2021-01-11 23:52:09 +00:00
Hiroyuki Ikezoe
58f190d6a4 Bug 1682197 - Scale the offset to remote iframe in nsDisplayRemote::BuildLayer. r=mattwoodrow
When the iframe is inside a scaled container, the offset to the reference frame
needs to be scaled.

This change fixes both a rendering issue (bug 1682197) and a hit-testing issue
(bug 1682200) altogether for non WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D100218
2021-01-11 23:52:09 +00:00
Cameron McCormack
5e3e854648 Bug 1668106 - Store subdocument intrinsic size and ratio on content rather than frame. r=dholbert
This avoids a problem where we receive the IPC message from the child
with updated intrinsics before an <embed> or <object> has had its frame
constructed in the parent, and drop the update.

Differential Revision: https://phabricator.services.mozilla.com/D99304
2020-12-10 21:34:38 +00:00
Emilio Cobos Álvarez
f37aa79ebc Bug 1676188 - Send position/size updates to remote print documents at paint time. r=mattwoodrow
As there's no incremental reflow for non-print documents, we can't rely
on FinishReflow getting called.

Not ultra-pretty, better ideas welcome.

Differential Revision: https://phabricator.services.mozilla.com/D96790
2020-11-12 03:31:07 +00:00
Ting-Yu Lin
1ab07e787f Bug 1675852 Part 2 - Define extra fallback intrinsic sizes in app units. r=emilio
CSSPixel::ToAppUnits() requires computation at runtime. Since most of
the layout computations require `nscoord`, this patch defines extra
intrinsic sizes in app units.

Differential Revision: https://phabricator.services.mozilla.com/D96258
2020-11-09 20:31:57 +00:00
Ting-Yu Lin
a9354a2aef Bug 1674931 Part 5 - Remove zero-argument ReflowInput::ComputedSizeWithBorderPadding(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D95665
2020-11-03 20:07:18 +00:00
Ting-Yu Lin
8cd9090bc6 Bug 1674863 Part 2 - Use strong types to define fallback intrinsic width, height, and size. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95578
2020-11-03 19:54:44 +00:00
Ting-Yu Lin
6ef06ff583 Bug 1660122 Part 7 - Implement GetAspectRatio(). r=emilio
This patch moves the preferred aspect-ratio calculation from each
replaced elements' GetIntrinicRatio() into GetAspectRatio(), because
they share the same logic.

For nsImageFrame, the cached mIntrinsicRatio now stores only the image's
intrinsic ratio, not considering the aspect-ratio property.

This patch fixed "object-fit:contain" for canvas, image because
GetIntrinicRatio() no longer considers aspect-ratio. This also fixed
replaced elements' size when both "aspect-ratio:<ratio>" and
"contain:size" is specified.

This also makes us pass some of the aspect-ratio tests because we change
GetIntrinicRatio() into GetAspectRatio() in
nsLayoutUtils::IntrinsicForAxis() in Part5, which is used by nsBlockFrame
(via nsLayoutUtils::IntrinsicForContainer) to implement GetMinISize().

Differential Revision: https://phabricator.services.mozilla.com/D91229
2020-09-29 22:33:05 +00:00
Ting-Yu Lin
e0c2b95d53 Bug 1660122 Part 5 - Add nsIFrame::GetAspectRatio() skeleton, and adapt existing callers. r=emilio
For now, GetAspectRatio() is just an alias for GetIntrinicRatio(). In
Part 7, we're going to have GetAspectRatio() consider aspect-ratio
property so that each replaced elements only need to report their
intrinsic ratio via GetIntrinicRatio(). Non-replaced element can also
call GetAspectRatio() to get the ratio suitable to calculate layout
size.

As of this patch, all the replaced elements'
GetIntrinsicRatio() (including nsImageFrame::mIntrinsicRatio) consider
aspect-ratio properties (added in bug 1639963). This is wrong, because
it affects replaced element's content ratio. So we adapt only callers
[1] involving the computation of the frame's external sizes to retain
the behavior after Part 7.

This change shouldn't change behavior.

[1] Exceptions include 1) a caller in nsIFrame::ComputeSize() checking
the frame has no intrinsic ratio; 2) other frame classes implementing
nsIFrame::GetIntrinsicRatio() by calling their parent's
GetIntrinicRatio(). nsSubDocumentFrame::GetIntrinicRatio() is an
example.

Differential Revision: https://phabricator.services.mozilla.com/D91227
2020-09-29 22:32:50 +00:00
Ting-Yu Lin
cd2eb87c21 Bug 1660122 Part 3 - Make nsIFrame::GetIntrinsicRatio() a const method. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D91225
2020-09-29 22:32:40 +00:00
Ting-Yu Lin
09ed243e29 Bug 1660122 Part 2 - Mark more methods in nsHTMLCanvasFrame and nsSubDocumentFrame 'const'. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D91224
2020-09-29 22:32:33 +00:00