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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2640053004: Fix compositingContainer for stacked inlines. (Closed)
Patch Set: none Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 77b9cddafecb866ce990f62ccc2089e1fa3b3102..f0aa7a96b7fe0b28700fff1b836a0e4373c47543 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -917,13 +917,15 @@ LayoutPoint PaintLayer::computeOffsetFromTransformedAncestor() const {
}
PaintLayer* PaintLayer::compositingContainer() const {
- // Floats have special painting order, which has complicated semantics.
- // See the comments around FloatObject::setShouldPaint.
- if (m_layoutObject->isFloating() && m_layoutObject->parent() &&
- !m_layoutObject->parent()->isLayoutBlockFlow())
- return m_layoutObject->containingBlock()->enclosingLayer();
- if (!stackingNode()->isStacked())
+ if (!stackingNode()->isStacked()) {
+ // Floats have special painting order, which has complicated semantics.
+ // See the comments around FloatObject::setShouldPaint.
+ if (m_layoutObject->isFloating() && m_layoutObject->parent() &&
+ !m_layoutObject->parent()->isLayoutBlockFlow())
+ return m_layoutObject->containingBlock()->enclosingLayer();
+
return parent();
+ }
if (PaintLayerStackingNode* ancestorStackingNode =
stackingNode()->ancestorStackingContextNode())
return ancestorStackingNode->layer();

Powered by Google App Engine
This is Rietveld 408576698