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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutInline.cpp

Issue 1991763002: Remove LayoutBlock::deleteLineBoxTree(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 middleBlock->setContinuation(cloneInline); 430 middleBlock->setContinuation(cloneInline);
431 431
432 // Now take all of the children from |beforeChild| to the end and remove 432 // Now take all of the children from |beforeChild| to the end and remove
433 // them from |this| and place them in the clone. 433 // them from |this| and place them in the clone.
434 moveChildrenToIgnoringContinuation(cloneInline, beforeChild); 434 moveChildrenToIgnoringContinuation(cloneInline, beforeChild);
435 } 435 }
436 436
437 void LayoutInline::splitFlow(LayoutObject* beforeChild, LayoutBlock* newBlockBox , 437 void LayoutInline::splitFlow(LayoutObject* beforeChild, LayoutBlock* newBlockBox ,
438 LayoutObject* newChild, LayoutBoxModelObject* oldCont) 438 LayoutObject* newChild, LayoutBoxModelObject* oldCont)
439 { 439 {
440 LayoutBlockFlow* containingBlockFlow = toLayoutBlockFlow(containingBlock());
440 LayoutBlock* pre = nullptr; 441 LayoutBlock* pre = nullptr;
441 LayoutBlock* block = containingBlock(); 442 LayoutBlock* block = containingBlockFlow;
442 443
443 // Delete our line boxes before we do the inline split into continuations. 444 // Delete our line boxes before we do the inline split into continuations.
444 block->deleteLineBoxTree(); 445 containingBlockFlow->deleteLineBoxTree();
445 446
446 bool madeNewBeforeBlock = false; 447 bool madeNewBeforeBlock = false;
447 if (block->isAnonymousBlock() && (!block->parent() || !block->parent()->crea tesAnonymousWrapper())) { 448 if (block->isAnonymousBlock() && (!block->parent() || !block->parent()->crea tesAnonymousWrapper())) {
448 // We can reuse this block and make it the preBlock of the next continua tion. 449 // We can reuse this block and make it the preBlock of the next continua tion.
449 pre = block; 450 containingBlockFlow->removePositionedObjects(nullptr);
450 pre->removePositionedObjects(nullptr); 451 containingBlockFlow->removeFloatingObjects();
451 if (pre->isLayoutBlockFlow()) 452 pre = containingBlockFlow;
452 toLayoutBlockFlow(pre)->removeFloatingObjects();
453 block = block->containingBlock(); 453 block = block->containingBlock();
454 } else { 454 } else {
455 // No anonymous block available for use. Make one. 455 // No anonymous block available for use. Make one.
456 pre = block->createAnonymousBlock(); 456 pre = block->createAnonymousBlock();
457 madeNewBeforeBlock = true; 457 madeNewBeforeBlock = true;
458 } 458 }
459 459
460 LayoutBlock* post = toLayoutBlock(pre->createAnonymousBoxWithSameTypeAs(bloc k)); 460 LayoutBlock* post = toLayoutBlock(pre->createAnonymousBoxWithSameTypeAs(bloc k));
461 461
462 LayoutObject* boxFirst = madeNewBeforeBlock ? block->firstChild() : pre->nex tSibling(); 462 LayoutObject* boxFirst = madeNewBeforeBlock ? block->firstChild() : pre->nex tSibling();
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 1360
1361 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer, PaintInvalidationReason invalidationReason) const 1361 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer, PaintInvalidationReason invalidationReason) const
1362 { 1362 {
1363 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine r, invalidationReason); 1363 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine r, invalidationReason);
1364 1364
1365 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) 1365 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
1366 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason); 1366 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason);
1367 } 1367 }
1368 1368
1369 } // namespace blink 1369 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFullScreen.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutRubyBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698