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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2642763009: Fix paint and rect mapping issues for stacked float under stacked inline (Closed)
Patch Set: 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index fae72842b367f9582de641faae9588229239546c..d2a15b0e3c817932c5aa918a06ee8d41870f30bc 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -613,10 +613,10 @@ PaintLayer* LayoutObject::enclosingLayer() const {
PaintLayer* LayoutObject::paintingLayer() const {
for (const LayoutObject* current = this; current;
- // Use containingBlock instead of paintInvalidationParent for floating
- // object to omit any self-painting layers of inline objects that don't
- // paint the floating object.
- current = current->isFloating() ? current->containingBlock()
+ // Use container instead of paintInvalidationParent for floating object
+ // to omit any self-painting layers of inline objects that don't paint
+ // the floating object.
+ current = current->isFloating() ? current->container()
: current->paintInvalidationParent()) {
if (current->hasLayer() &&
toLayoutBoxModelObject(current)->layer()->isSelfPaintingLayer()) {
@@ -2468,9 +2468,8 @@ LayoutObject* LayoutObject::container(AncestorSkipInfo* skipInfo) const {
if (pos == FixedPosition)
return containerForFixedPosition(skipInfo);
- if (pos == AbsolutePosition) {
+ if (pos == AbsolutePosition)
return containerForAbsolutePosition(skipInfo);
- }
if (isColumnSpanAll()) {
LayoutObject* multicolContainer = spannerPlaceholder()->container();
@@ -2484,8 +2483,14 @@ LayoutObject* LayoutObject::container(AncestorSkipInfo* skipInfo) const {
return multicolContainer;
}
- if (isFloating())
- return containingBlock(skipInfo);
+ if (isFloating()) {
+ for (LayoutObject* object = parent(); object; object = object->parent()) {
+ if (object->canContainFloatingObject(*this))
+ return object;
+ if (skipInfo)
+ skipInfo->update(*object);
+ }
+ }
chrishtr 2017/01/21 02:14:59 ASSERT_NOT_REACHED()
return parent();
}

Powered by Google App Engine
This is Rietveld 408576698