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

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

Issue 2560123003: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 Vector<LineContext> lineContexts; 928 Vector<LineContext> lineContexts;
929 LayoutUnit sumFlexBaseSize; 929 LayoutUnit sumFlexBaseSize;
930 double totalFlexGrow; 930 double totalFlexGrow;
931 double totalFlexShrink; 931 double totalFlexShrink;
932 double totalWeightedFlexShrink; 932 double totalWeightedFlexShrink;
933 LayoutUnit sumHypotheticalMainSize; 933 LayoutUnit sumHypotheticalMainSize;
934 934
935 PaintLayerScrollableArea::PreventRelayoutScope preventRelayoutScope( 935 PaintLayerScrollableArea::PreventRelayoutScope preventRelayoutScope(
936 layoutScope); 936 layoutScope);
937 937
938 // Fieldsets need to find their legend and position it inside the border of
939 // the object. The legend then gets skipped during normal layout. It
940 // doesn't get included in the normal layout process but is instead skipped.
941 LayoutObject* childToExclude =
942 layoutSpecialExcludedChild(relayoutChildren, layoutScope);
943 938
944 // Set up our master list of flex items. All of the rest of the algorithm 939 // Set up our master list of flex items. All of the rest of the algorithm
945 // should work off this list of a subset. 940 // should work off this list of a subset.
946 // TODO(cbiesinger): That second part is not yet true. 941 // TODO(cbiesinger): That second part is not yet true.
947 ChildLayoutType layoutType = relayoutChildren ? ForceLayout : LayoutIfNeeded; 942 ChildLayoutType layoutType = relayoutChildren ? ForceLayout : LayoutIfNeeded;
948 Vector<FlexItem> allItems; 943 Vector<FlexItem> allItems;
949 m_orderIterator.first(); 944 m_orderIterator.first();
950 for (LayoutBox* child = m_orderIterator.currentChild(); child; 945 for (LayoutBox* child = m_orderIterator.currentChild(); child;
951 child = m_orderIterator.next()) { 946 child = m_orderIterator.next()) {
952 if (childToExclude == child)
953 continue; // Skip this child, since it will be positioned by the
954 // specialized subclass (fieldsets runs).
955 947
956 if (child->isOutOfFlowPositioned()) { 948 if (child->isOutOfFlowPositioned()) {
957 // Out-of-flow children are not flex items, so we skip them here. 949 // Out-of-flow children are not flex items, so we skip them here.
958 prepareChildForPositionedLayout(*child); 950 prepareChildForPositionedLayout(*child);
959 continue; 951 continue;
960 } 952 }
961 953
962 allItems.append(constructFlexItem(*child, layoutType)); 954 allItems.append(constructFlexItem(*child, layoutType));
963 } 955 }
964 956
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 LayoutUnit originalOffset = 2171 LayoutUnit originalOffset =
2180 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 2172 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
2181 LayoutUnit newOffset = 2173 LayoutUnit newOffset =
2182 contentExtent - originalOffset - lineCrossAxisExtent; 2174 contentExtent - originalOffset - lineCrossAxisExtent;
2183 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset); 2175 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset);
2184 } 2176 }
2185 } 2177 }
2186 } 2178 }
2187 2179
2188 } // namespace blink 2180 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698