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

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

Issue 1964203004: Helper method for non-direct beforeChild in LayoutBlock::addChild(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix broken test. Use RELEASE_ASSERT. Back out unnecessary change. Created 4 years, 7 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/LayoutBlock.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.h b/third_party/WebKit/Source/core/layout/LayoutBlock.h
index 4a1b6329af80b2fafd83dd766ce1df9c5aa1d32a..c704d5c30caa83a0bcd5a120eb0d4107539762ee 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.h
@@ -146,6 +146,12 @@ protected:
RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(firstLineBox()); }
RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(lastLineBox()); }
+ // Insert a child correctly into the tree when |beforeDescendant| isn't a direct child of
+ // |this|. This happens e.g. when there's an anonymous block child of |this| and
+ // |beforeDescendant| has been reparented into that one. Such things are invisible to the DOM,
+ // and addChild() is typically called with the DOM tree (and not the layout tree) in mind.
+ void addChildBeforeDescendant(LayoutObject* newChild, LayoutObject* beforeDescendant);
+
public:
// FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to LayoutBlockFlow
virtual void deleteLineBoxTree();

Powered by Google App Engine
This is Rietveld 408576698