New issue
Advanced search Search tips

Issue 920599 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 914784



Sign in to add a comment

Style unnecessarily computed for display:none iframes

Project Member Reported by futhark@chromium.org, Jan 10

Issue description

display:none iframes do not allow the layout tree to be generated, but when Squad introduced style recalc for reattachment and SetNonAttachedStyle, style computation was no longer blocked by AttachLayoutTree and the check in LayoutView::CanHaveChildren().

We should make sure ParentComputedStyle() returns null for this case to avoid computing style in display:none iframes.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f930f101b81d07cd66b0642d10c88edd1a93d2d7

commit f930f101b81d07cd66b0642d10c88edd1a93d2d7
Author: Rune Lillesveen <futhark@chromium.org>
Date: Mon Jan 14 12:31:01 2019

Don't compute style in display:none iframes.

display:none iframes do not allow the layout tree to be generated, but
when Squad introduced style recalc for reattachment and
SetNonAttachedStyle(), style computation was no longer blocked by
AttachLayoutTree and the check in LayoutView::CanHaveChildren(). This
lead to style being computed as normal in display:none iframes.

Return null from ParentComputedStyle() when ChildrenCanHaveStyle()
returns false and override ChildrenCanHaveStyle() to return false for
Document when LayoutView::CanHaveChildren() returns false.

Bug:  920599 , 914784
Change-Id: Ibb8f4033cb1347c535e0b53d3e2ab9b46aacbd4e
Reviewed-on: https://chromium-review.googlesource.com/c/1405010
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622431}
[modify] https://crrev.com/f930f101b81d07cd66b0642d10c88edd1a93d2d7/third_party/blink/renderer/core/dom/container_node.h
[modify] https://crrev.com/f930f101b81d07cd66b0642d10c88edd1a93d2d7/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/f930f101b81d07cd66b0642d10c88edd1a93d2d7/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/f930f101b81d07cd66b0642d10c88edd1a93d2d7/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/f930f101b81d07cd66b0642d10c88edd1a93d2d7/third_party/blink/renderer/core/dom/node_computed_style.h
[modify] https://crrev.com/f930f101b81d07cd66b0642d10c88edd1a93d2d7/third_party/blink/renderer/core/layout/layout_view_test.cc

Status: Fixed (was: Started)

Sign in to add a comment