Changeset 123842 in webkit
- Timestamp:
- Jul 27, 2012 12:27:44 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r123841 r123842 1 2012-07-27 Tony Chang <tony@chromium.org> 2 3 changing -webkit-order should change the paint order of flex items 4 https://bugs.webkit.org/show_bug.cgi?id=92041 5 6 Reviewed by Ojan Vafai. 7 8 Use a ref test since this is testing paint behavior. 9 10 * css3/flexbox/order-painting-expected.html: Added. 11 * css3/flexbox/order-painting.html: Added. 12 1 13 2012-07-27 Csaba Osztrogonác <ossy@webkit.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r123840 r123842 1 2012-07-27 Tony Chang <tony@chromium.org> 2 3 changing -webkit-order should change the paint order of flex items 4 https://bugs.webkit.org/show_bug.cgi?id=92041 5 6 Reviewed by Ojan Vafai. 7 8 Override paintChildren and use the flex order iterator to determine the order to paint the children. 9 10 Test: css3/flexbox/order-painting.html 11 12 * rendering/RenderFlexibleBox.cpp: 13 (WebCore::RenderFlexibleBox::layoutBlock): Save a reference to the order iterator. 14 (WebCore::RenderFlexibleBox::paintChildren): 15 * rendering/RenderFlexibleBox.h: 16 (RenderFlexibleBox): Hold a reference to the order iterator so we don't have to recreate it at paint time. 17 Also mark all the virtual methods with OVERRIDE. 18 1 19 2012-07-26 Sheriff Bot <webkit.review.bot@gmail.com> 2 20 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r123783 r123842 260 260 OrderHashSet orderValues; 261 261 computeMainAxisPreferredSizes(relayoutChildren, orderValues); 262 OrderIterator flexIterator(this, orderValues);263 layoutFlexItems( flexIterator, lineContexts);262 m_orderIterator = adoptPtr(new OrderIterator(this, orderValues)); 263 layoutFlexItems(*m_orderIterator, lineContexts); 264 264 265 265 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); 266 266 computeLogicalHeight(); 267 repositionLogicalHeightDependentFlexItems( flexIterator, lineContexts, oldClientAfterEdge);267 repositionLogicalHeightDependentFlexItems(*m_orderIterator, lineContexts, oldClientAfterEdge); 268 268 269 269 if (size() != previousSize) … … 288 288 289 289 setNeedsLayout(false); 290 } 291 292 void RenderFlexibleBox::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect) 293 { 294 ASSERT(m_orderIterator); 295 296 for (RenderBox* child = m_orderIterator->first(); child; child = m_orderIterator->next()) { 297 if (!paintChild(child, paintInfo, paintOffset, paintInfoForChild, usePrintRect)) 298 return; 299 } 290 300 } 291 301 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
r120780 r123842 33 33 34 34 #include "RenderBlock.h" 35 #include <wtf/OwnPtr.h> 35 36 36 37 namespace WebCore { … … 41 42 virtual ~RenderFlexibleBox(); 42 43 43 virtual const char* renderName() const ;44 virtual const char* renderName() const OVERRIDE; 44 45 45 virtual bool isFlexibleBox() const { return true; } 46 virtual void computePreferredLogicalWidths(); 47 virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0); 46 virtual bool isFlexibleBox() const OVERRIDE { return true; } 47 virtual void computePreferredLogicalWidths() OVERRIDE; 48 virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) OVERRIDE; 49 50 virtual void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) OVERRIDE; 48 51 49 52 bool isHorizontalFlow() const; … … 133 136 void flipForRightToLeftColumn(OrderIterator&); 134 137 void flipForWrapReverse(OrderIterator&, const WTF::Vector<LineContext>&, LayoutUnit crossAxisStartEdge); 138 139 OwnPtr<OrderIterator> m_orderIterator; 135 140 }; 136 141
Note: See TracChangeset
for help on using the changeset viewer.