Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Issue 2743053003: [Reland #1] Don't create layout objects for children of display-none iframes. (Closed)

Created:
3 years, 9 months ago by erikchen
Modified:
3 years, 8 months ago
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-api_chromium.org, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, eae+blinkwatch, Eric Willigers, jam, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, mac-reviews_chromium.org, mlamouri+watch-blink_chromium.org, pdr+renderingwatchlist_chromium.org, rjwright, rwlbuis, shans, sof, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Reland #1] Don't create layout objects for children of display-none iframes. The initial CL leaked DOM objects by calling documentElement()->lazyReattachIfAttached() during Document::shutdown(). This reland advances m_lifecycle to DocumentLifecycle::Stopping slightly earlier in Document::shutdown(), and then only triggers documentElement()->lazyReattachIfAttached() if the state is earlier than DocumentLifecycle::Stopping. Partial stack of the DOM leak: ... documentElement()->lazyReattachIfAttached(); blink::Document::willChangeFrameOwnerProperties()\n blink::HTMLFrameOwnerElement::setWidget()\n blink::FrameView::dispose()\n blink::Document::shutdown()\n blink::FrameLoader::prepareForCommit()\n blink::FrameLoader::commitProvisionalLoad()\n blink::DocumentLoader::commitIfReady()\n blink::DocumentLoader::processData() > Most of this CL is plumbing for FrameOwnerProperties. Interesting changes: > * LayoutView can no longer have children if its FrameOwner is "DisplayNone". > * A local frame is "DisplayNone" if and only if it has no widget [which should > correspond to the actual display:none style]. > * The DisplayNone property is propagated to remote frames via > FrameOwnerProperties. > > Spec discussion: https://github.com/whatwg/html/issues/1813 BUG=650433 Review-Url: https://codereview.chromium.org/2743053003 Cr-Commit-Position: refs/heads/master@{#460646} Committed: https://chromium.googlesource.com/chromium/src/+/85bab14c835935e79a0b63f24b47f671840373de

Patch Set 1 #

Patch Set 2 : Rebase. #

Patch Set 3 : clang format #

Patch Set 4 : Fix compile error. #

Patch Set 5 : Fix errors. #

Patch Set 6 : Remove a throttling-related DCHECK that is no longer accurate. #

Patch Set 7 : Rebase. #

Patch Set 8 : rebaseline cls. #

Patch Set 9 : update layout test expectations. #

Patch Set 10 : Rebase original CL against ToT. #

Patch Set 11 : Fix DOM object leaks. Diff this against Patch Set 10. #

Total comments: 2

Patch Set 12 : comments form esprehn. #

Patch Set 13 : Rebase against ToT. #

Patch Set 14 : rebase error. #

Patch Set 15 : rebaseline. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1221 lines, -550 lines) Patch
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/common/frame_owner_properties.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/common/frame_owner_properties.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/animations/display-none-iframe-has-no-animation.html View 1 chunk +34 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/animations/display-none-iframe-has-no-animation-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/animations/resources/frame_with_animation.html View 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/html/resources/common.js View 1 chunk +0 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/iframe-display-block-to-display-none.html View 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/iframe-display-block-to-display-none-expected.txt View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/iframe-display-none-to-display-block.html View 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/iframe-display-none-to-display-block-expected.txt View 1 2 3 4 5 6 7 10 1 chunk +41 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/shift-relative-positioned-container-with-image-addition-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -4 lines 0 comments Download
D third_party/WebKit/LayoutTests/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -72 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/iframe-display-block-to-display-none-expected.png View 1 2 3 4 5 6 7 10 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/iframe-display-none-to-display-block-expected.png View 1 2 3 4 5 6 7 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/shift-relative-positioned-container-with-image-addition-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -80 lines 0 comments Download
D third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -72 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/iframe-display-block-to-display-none-expected.png View 1 2 3 4 5 6 7 10 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/iframe-display-none-to-display-block-expected.png View 1 2 3 4 5 6 7 10 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/shift-relative-positioned-container-with-image-addition-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -94 lines 0 comments Download
D third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -82 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/spinvalidation/paint/invalidation/iframe-display-block-to-display-none-expected.png View Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/spinvalidation/paint/invalidation/iframe-display-block-to-display-none-expected.txt View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/spinvalidation/paint/invalidation/iframe-display-none-to-display-block-expected.png View Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/spinvalidation/paint/invalidation/iframe-display-none-to-display-block-expected.txt View 1 chunk +51 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/platform/linux/virtual/spinvalidation/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/stable/paint/invalidation/iframe-display-block-to-display-none-expected.txt View 1 chunk +54 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/stable/paint/invalidation/iframe-display-none-to-display-block-expected.txt View 1 chunk +67 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/platform/linux/virtual/stable/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +40 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/iframe-display-block-to-display-none-expected.png View Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/iframe-display-none-to-display-block-expected.png View Binary file 0 comments Download
A + third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +18 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/virtual/spinvalidation/paint/invalidation/iframe-display-block-to-display-none-expected.png View Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/virtual/spinvalidation/paint/invalidation/iframe-display-none-to-display-block-expected.png View Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/paint/invalidation/iframe-display-block-to-display-none-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/paint/invalidation/iframe-display-block-to-display-none-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/paint/invalidation/iframe-display-none-to-display-block-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/paint/invalidation/iframe-display-none-to-display-block-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +41 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/shift-relative-positioned-container-with-image-addition-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/iframe-display-block-to-display-none-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/iframe-display-block-to-display-none-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +46 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/iframe-display-none-to-display-block-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/iframe-display-none-to-display-block-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +51 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/shift-relative-positioned-container-with-image-addition-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +14 lines, -12 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/virtual/spinvalidation/paint/invalidation/iframe-display-block-to-display-none-expected.png View Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/virtual/spinvalidation/paint/invalidation/iframe-display-none-to-display-block-expected.png View Binary file 0 comments Download
M third_party/WebKit/LayoutTests/plugins/createScriptableObject-before-start-expected.txt View 1 chunk +0 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/iframe-display-block-to-display-none-expected.txt View 1 chunk +46 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/iframe-display-none-to-display-block-expected.txt View 1 2 3 4 5 6 7 8 10 1 chunk +51 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/shift-relative-positioned-container-with-image-addition-expected.txt View 1 2 3 4 5 6 7 10 2 chunks +14 lines, -12 lines 0 comments Download
D third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -82 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/spinvalidation/paint/invalidation/iframe-display-block-to-display-none-expected.txt View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/spinvalidation/paint/invalidation/iframe-display-none-to-display-block-expected.txt View 1 chunk +51 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/spinvalidation/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/stable/paint/invalidation/iframe-display-block-to-display-none-expected.txt View 1 chunk +54 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/stable/paint/invalidation/iframe-display-none-to-display-block-expected.txt View 1 chunk +67 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/stable/paint/invalidation/shift-relative-positioned-container-with-image-removal-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +30 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameOwner.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrameClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameElementBase.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +3 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/RemoteFrameOwner.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/RemoteFrameOwner.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrame.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +60 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameOwnerProperties.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 48 (37 generated)
erikchen
esprehn, dcheng, avi: PTAL esprehn: Please review third_party/WebKit avi: Please review content/ dcheng: Please review ...
3 years, 9 months ago (2017-03-14 23:54:41 UTC) #29
dcheng
On 2017/03/14 23:54:41, erikchen wrote: > esprehn, dcheng, avi: PTAL > > esprehn: Please review ...
3 years, 9 months ago (2017-03-15 09:25:00 UTC) #30
erikchen
On 2017/03/15 09:25:00, dcheng wrote: > On 2017/03/14 23:54:41, erikchen wrote: > > esprehn, dcheng, ...
3 years, 9 months ago (2017-03-15 21:01:20 UTC) #31
dcheng
The change LGTM, but it might be helpful to include the stack of how we ...
3 years, 9 months ago (2017-03-16 05:54:19 UTC) #32
erikchen
On 2017/03/16 05:54:19, dcheng wrote: > The change LGTM, but it might be helpful to ...
3 years, 9 months ago (2017-03-17 00:23:55 UTC) #34
erikchen
avi, esprehn: Ping.
3 years, 9 months ago (2017-03-21 00:59:56 UTC) #35
Avi (use Gerrit)
content lgtm
3 years, 9 months ago (2017-03-21 01:21:43 UTC) #36
esprehn
lgtm w/ the check fixed. https://codereview.chromium.org/2743053003/diff/200001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2743053003/diff/200001/third_party/WebKit/Source/core/dom/Document.cpp#newcode4573 third_party/WebKit/Source/core/dom/Document.cpp:4573: if (m_lifecycle.state() < DocumentLifecycle::Stopping) ...
3 years, 8 months ago (2017-03-28 21:49:24 UTC) #37
erikchen
https://codereview.chromium.org/2743053003/diff/200001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2743053003/diff/200001/third_party/WebKit/Source/core/dom/Document.cpp#newcode4573 third_party/WebKit/Source/core/dom/Document.cpp:4573: if (m_lifecycle.state() < DocumentLifecycle::Stopping) On 2017/03/28 21:49:24, esprehn wrote: ...
3 years, 8 months ago (2017-03-29 20:16:54 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2743053003/280001
3 years, 8 months ago (2017-03-30 01:31:38 UTC) #45
commit-bot: I haz the power
3 years, 8 months ago (2017-03-30 03:38:17 UTC) #48
Message was sent while issue was closed.
Committed patchset #15 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/85bab14c835935e79a0b63f24b47...

Powered by Google App Engine
This is Rietveld 408576698