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

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

Issue 2575423003: Fix geometry mapping issues for float under inline (Closed)
Patch Set: - Created 4 years 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.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index 5757694cf4caa5d19d02c67548108868b68b706a..3f1f9e3916d7ba01da8fb5bb71f74deef84b5fab 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -896,7 +896,8 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
// notable exceptions.
// (1) It can be used on orphaned subtrees, i.e., it can be called safely
// even when the object is not part of the primary document subtree yet.
- // (2) For normal flow elements, it just returns the parent.
+ // (2) For normal flow elements except for floating objects, it just returns
Xianzhu 2016/12/16 20:06:42 Based on https://www.w3.org/TR/CSS2/visuren.html#p
+ // the parent.
// (3) For absolute positioned elements, it will return a relative
// positioned inline. containingBlock() simply skips relpositioned inlines
// and lets an enclosing block handle the layout of the positioned object.
@@ -920,7 +921,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
bool* ancestorSkipped = nullptr,
bool* filterSkipped = nullptr) const;
// Finds the containing block as if this object is absolute-position.
- LayoutBlock* containingBlockForAbsolutePosition() const;
+ LayoutBlock* containingBlockForAbsolutePosition(
+ const LayoutBoxModelObject* ancestor = nullptr,
+ bool* ancestorSkipped = nullptr,
+ bool* filterSkipped = nullptr) const;
virtual LayoutObject* hoverAncestor() const { return parent(); }
@@ -1109,7 +1113,9 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
//
// See container() for the function that returns the containing block.
// See LayoutBlock.h for some extra explanations on containing blocks.
- LayoutBlock* containingBlock() const;
+ LayoutBlock* containingBlock(const LayoutBoxModelObject* ancestor = nullptr,
+ bool* ancestorSkipped = nullptr,
+ bool* filterSkipped = nullptr) const;
bool canContainAbsolutePositionObjects() const {
return m_style->canContainAbsolutePositionObjects() ||

Powered by Google App Engine
This is Rietveld 408576698