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

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 287193013: Revert of Strip anonymous blocks when change in style removes need for them (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index e7d0a624cd4f50502d71b566e11060620fd78bd5..25c4d2a6ee51a933700af5e15b0dabfed9b9ada1 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -328,9 +328,6 @@
{
RenderBox::styleDidChange(diff, oldStyle);
- if (isFloatingOrOutOfFlowPositioned() && oldStyle && !oldStyle->isFloating() && !oldStyle->hasOutOfFlowPosition() && parent() && parent()->isRenderBlockFlow())
- toRenderBlock(parent())->removeAnonymousWrappersIfRequired();
-
RenderStyle* newStyle = style();
if (!isAnonymousBlock()) {
@@ -1078,21 +1075,6 @@
// Make sure the types of the anonymous blocks match up.
return prev->isAnonymousColumnsBlock() == next->isAnonymousColumnsBlock()
&& prev->isAnonymousColumnSpanBlock() == next->isAnonymousColumnSpanBlock();
-}
-
-void RenderBlock::removeAnonymousWrappersIfRequired()
-{
- RenderBox* child = firstChildBox();
- while (child && (child->isAnonymousBlock() || child->isFloatingOrOutOfFlowPositioned())) {
- RenderBox* next = child->nextSiblingBox();
- // A continuation means the wrappers are still required.
- if (next && next->isRenderBlock() && toRenderBlock(next)->continuation())
- return;
- if (child->isAnonymousBlock())
- collapseAnonymousBlockChild(this, toRenderBlock(child));
- // |child| may have been destroyed.
- child = next;
- }
}
void RenderBlock::collapseAnonymousBlockChild(RenderBlock* parent, RenderBlock* child)
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698