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

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

Issue 1611413007: Remove unnecessary anonymous blocks when splitting anonymous boxes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@568387-RemovePercentHeight
Patch Set: Updated Created 4 years, 11 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.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 02862b5680802995c8ede1a25394cd3c54b7488b..cfb941d73364834f4cd148b52b28bc13bb53916f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -655,6 +655,11 @@ void LayoutBlock::collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock*
// destroyed. See crbug.com/282088
if (child->beingDestroyed())
return;
+ if (child->continuation())
+ return;
+ // Ruby elements use anonymous wrappers for ruby runs and ruby bases by design, so we don't remove them.
+ if (child->isRubyRun() || child->isRubyBase())
+ return;
parent->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::ChildAnonymousBlockChanged);
child->moveAllChildrenTo(parent, child->nextSibling(), child->hasLayer());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698