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

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

Issue 2549973003: Revert commit# 415577 "Add grid/flex layout support for <fieldset>" (Closed)
Patch Set: updated TestExpectations, verified that there are no changes in images Created 4 years 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/LayoutBlockFlow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index 90580735abd81b1b7186e0d19831340fb5888269..3b7f040121bcfbc793b479e13c7ffeba7ea8c472 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -1421,6 +1421,11 @@ void LayoutBlockFlow::layoutBlockChildren(bool relayoutChildren,
BlockChildrenLayoutInfo layoutInfo(this, beforeEdge, afterEdge);
MarginInfo& marginInfo = layoutInfo.marginInfo();
+ // Fieldsets need to find their legend and position it inside the border of
+ // the object.
+ // The legend then gets skipped during normal layout. The same is true for
+ // ruby text.
+ // It doesn't get included in the normal layout process but is instead skipped
LayoutObject* childToExclude =
layoutSpecialExcludedChild(relayoutChildren, layoutScope);
@@ -1442,7 +1447,7 @@ void LayoutBlockFlow::layoutBlockChildren(bool relayoutChildren,
if (childToExclude == child)
continue; // Skip this child, since it will be positioned by the
- // specialized subclass (ruby runs).
+ // specialized subclass (fieldsets and ruby runs).
updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *child);
@@ -2964,7 +2969,7 @@ void LayoutBlockFlow::addChild(LayoutObject* newChild,
LayoutBox::addChild(newChild, beforeChild);
if (madeBoxesNonInline && parent() && isAnonymousBlock() &&
- parent()->isLayoutBlock() && !parent()->createsAnonymousWrapper()) {
+ parent()->isLayoutBlock()) {
toLayoutBlock(parent())->removeLeftoverAnonymousBlock(this);
// |this| may be dead now.
}
@@ -4248,6 +4253,12 @@ void LayoutBlockFlow::createOrDestroyMultiColumnFlowThreadIfNeeded(
if (isRuby())
return;
+ // Fieldsets look for a legend special child (layoutSpecialExcludedChild()).
+ // We currently only support one special child per layout object, and the
+ // flow thread would make for a second one.
+ if (isFieldset())
+ return;
+
// Form controls are replaced content, and are therefore not supposed to
// support multicol.
if (isFileUploadControl() || isTextControl() || isListBox())

Powered by Google App Engine
This is Rietveld 408576698