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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.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 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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 Vector<LineContext> lineContexts; 930 Vector<LineContext> lineContexts;
931 LayoutUnit sumFlexBaseSize; 931 LayoutUnit sumFlexBaseSize;
932 double totalFlexGrow; 932 double totalFlexGrow;
933 double totalFlexShrink; 933 double totalFlexShrink;
934 double totalWeightedFlexShrink; 934 double totalWeightedFlexShrink;
935 LayoutUnit sumHypotheticalMainSize; 935 LayoutUnit sumHypotheticalMainSize;
936 936
937 PaintLayerScrollableArea::PreventRelayoutScope preventRelayoutScope( 937 PaintLayerScrollableArea::PreventRelayoutScope preventRelayoutScope(
938 layoutScope); 938 layoutScope);
939 939
940 // Fieldsets need to find their legend and position it inside the border of
941 // the object. The legend then gets skipped during normal layout. It
942 // doesn't get included in the normal layout process but is instead skipped.
943 LayoutObject* childToExclude =
944 layoutSpecialExcludedChild(relayoutChildren, layoutScope);
945 940
946 // Set up our master list of flex items. All of the rest of the algorithm 941 // Set up our master list of flex items. All of the rest of the algorithm
947 // should work off this list of a subset. 942 // should work off this list of a subset.
948 // TODO(cbiesinger): That second part is not yet true. 943 // TODO(cbiesinger): That second part is not yet true.
949 ChildLayoutType layoutType = relayoutChildren ? ForceLayout : LayoutIfNeeded; 944 ChildLayoutType layoutType = relayoutChildren ? ForceLayout : LayoutIfNeeded;
950 Vector<FlexItem> allItems; 945 Vector<FlexItem> allItems;
951 m_orderIterator.first(); 946 m_orderIterator.first();
952 for (LayoutBox* child = m_orderIterator.currentChild(); child; 947 for (LayoutBox* child = m_orderIterator.currentChild(); child;
953 child = m_orderIterator.next()) { 948 child = m_orderIterator.next()) {
954 if (childToExclude == child)
955 continue; // Skip this child, since it will be positioned by the
956 // specialized subclass (fieldsets runs).
957 949
958 if (child->isOutOfFlowPositioned()) { 950 if (child->isOutOfFlowPositioned()) {
959 // Out-of-flow children are not flex items, so we skip them here. 951 // Out-of-flow children are not flex items, so we skip them here.
960 prepareChildForPositionedLayout(*child); 952 prepareChildForPositionedLayout(*child);
961 continue; 953 continue;
962 } 954 }
963 955
964 allItems.append(constructFlexItem(*child, layoutType)); 956 allItems.append(constructFlexItem(*child, layoutType));
965 } 957 }
966 958
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 LayoutUnit originalOffset = 2173 LayoutUnit originalOffset =
2182 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 2174 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
2183 LayoutUnit newOffset = 2175 LayoutUnit newOffset =
2184 contentExtent - originalOffset - lineCrossAxisExtent; 2176 contentExtent - originalOffset - lineCrossAxisExtent;
2185 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset); 2177 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset);
2186 } 2178 }
2187 } 2179 }
2188 } 2180 }
2189 2181
2190 } // namespace blink 2182 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698