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

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

Issue 2555413002: Revert commit# 415577 "Add grid/flex layout support for <fieldset>" (Closed)
Patch Set: 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 b01da8d3b3445e15b912267c019740df4a0fe142..f144029ab2b9147b56ac81d796c3c86b10abae28 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -1402,6 +1402,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);
@@ -1423,7 +1428,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);
@@ -2904,7 +2909,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.
}
@@ -4149,6 +4154,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())
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFieldset.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698