New issue
Advanced search Search tips

Issue 705073 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

GraphicsLayerUpdater::UpdateContext::compositingContainer() may be incorrect in some float under inline cases

Project Member Reported by wangxianzhu@chromium.org, Mar 24 2017

Issue description

This bug corresponds to the TODO:

  const PaintLayer* compositingContainer(const PaintLayer& layer) const {
    if (layer.stackingNode()->isStacked())
      return m_compositingStackingContext;

    // TODO(wangxianzhu, chrishtr): This is incorrect if m_compositingAncestor
    // is inline and there is any non-layer floating object between layer and
    // m_compositingAncestor. Should use the logic in PaintLayer::
    // containingLayer().
    if (layer.layoutObject().isFloatingWithNonContainingBlockParent())
      return layer.enclosingLayerWithCompositedLayerMapping(ExcludeSelf);

    return m_compositingAncestor;
  }

in the following case:

<layer id=A block>
  <inline layer composited>
    <float>
      <layer id=B block>


 
Status: Fixed (was: Assigned)
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7cd12d58b84042724fb696ba4980884cbad30e31

commit 7cd12d58b84042724fb696ba4980884cbad30e31
Author: wangxianzhu <wangxianzhu@chromium.org>
Date: Fri Mar 31 20:54:41 2017

Fix GraphicsLayerUpdater::UpdateContext::compositingContainer() for corner cases

For the following corner cases:
- parent layer is not a LayoutBlock (in case the layer or an ancestor
  LayoutObject is a floating object under the parent layer),
- the current layer is a column spanner,
the current layer's compositingContainer may escape the normal layer hierarchy.
Fallback to slow path in the cases.

Also cleanup PaintLayer::containingLayer(), and added tests.

BUG= 705732 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2787203002
Cr-Commit-Position: refs/heads/master@{#461221}

[modify] https://crrev.com/7cd12d58b84042724fb696ba4980884cbad30e31/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp
[modify] https://crrev.com/7cd12d58b84042724fb696ba4980884cbad30e31/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/7cd12d58b84042724fb696ba4980884cbad30e31/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp

Sign in to add a comment