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

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

Issue 1997033002: Move continuation getter and setter down to LayoutBlockFlow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/LayoutInline.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
index 819e7add0bf943ef9b324ab0b70b50c44602c60b..ebec54584303173c6badac797b30233b7cdf8fbe 100644
--- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -345,8 +345,8 @@ void LayoutInline::moveChildrenToIgnoringContinuation(LayoutInline* to, LayoutOb
}
}
-void LayoutInline::splitInlines(LayoutBlock* fromBlock, LayoutBlock* toBlock,
- LayoutBlock* middleBlock, LayoutObject* beforeChild, LayoutBoxModelObject* oldCont)
+void LayoutInline::splitInlines(LayoutBlockFlow* fromBlock, LayoutBlockFlow* toBlock,
+ LayoutBlockFlow* middleBlock, LayoutObject* beforeChild, LayoutBoxModelObject* oldCont)
{
ASSERT(isDescendantOf(fromBlock));
@@ -426,15 +426,14 @@ void LayoutInline::splitInlines(LayoutBlock* fromBlock, LayoutBlock* toBlock,
moveChildrenToIgnoringContinuation(cloneInline, beforeChild);
}
-void LayoutInline::splitFlow(LayoutObject* beforeChild, LayoutBlock* newBlockBox,
+void LayoutInline::splitFlow(LayoutObject* beforeChild, LayoutBlockFlow* newBlockBox,
LayoutObject* newChild, LayoutBoxModelObject* oldCont)
{
- LayoutBlockFlow* containingBlockFlow = toLayoutBlockFlow(containingBlock());
- LayoutBlock* pre = nullptr;
- LayoutBlock* block = containingBlockFlow;
+ LayoutBlockFlow* block = toLayoutBlockFlow(containingBlock());
+ LayoutBlockFlow* pre = nullptr;
// Delete our line boxes before we do the inline split into continuations.
- containingBlockFlow->deleteLineBoxTree();
+ block->deleteLineBoxTree();
bool reusedAnonymousBlock = false;
if (block->isAnonymousBlock()) {
@@ -443,17 +442,17 @@ void LayoutInline::splitFlow(LayoutObject* beforeChild, LayoutBlock* newBlockBox
&& outerContainingBlock->isLayoutBlockFlow()
&& !outerContainingBlock->createsAnonymousWrapper()) {
// We can reuse this block and make it the preBlock of the next continuation.
- containingBlockFlow->removePositionedObjects(nullptr);
- containingBlockFlow->removeFloatingObjects();
- pre = containingBlockFlow;
- block = outerContainingBlock;
+ block->removePositionedObjects(nullptr);
+ block->removeFloatingObjects();
+ pre = block;
+ block = toLayoutBlockFlow(outerContainingBlock);
reusedAnonymousBlock = true;
}
}
if (!reusedAnonymousBlock)
- pre = block->createAnonymousBlock(); // No anonymous block available for use. Make one.
+ pre = toLayoutBlockFlow(block->createAnonymousBlock()); // No anonymous block available for use. Make one.
- LayoutBlock* post = toLayoutBlock(pre->createAnonymousBoxWithSameTypeAs(block));
+ LayoutBlockFlow* post = toLayoutBlockFlow(pre->createAnonymousBlock());
LayoutObject* boxFirst = !reusedAnonymousBlock ? block->firstChild() : pre->nextSibling();
if (!reusedAnonymousBlock)
@@ -1135,7 +1134,7 @@ void LayoutInline::updateDragState(bool dragOn)
void LayoutInline::childBecameNonInline(LayoutObject* child)
{
// We have to split the parent flow.
- LayoutBlock* newBox = containingBlock()->createAnonymousBlock();
+ LayoutBlockFlow* newBox = toLayoutBlockFlow(containingBlock()->createAnonymousBlock());
LayoutBoxModelObject* oldContinuation = continuation();
setContinuation(newBox);
LayoutObject* beforeChild = child->nextSibling();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutInline.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698