Changeset 132395 in webkit
- Timestamp:
- Oct 24, 2012 1:46:45 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r132394 r132395 1 2012-10-24 Tony Chang <tony@chromium.org> 2 3 Setting width of a flexitem causes the adjacent flex item to be displayed poorly. 4 https://bugs.webkit.org/show_bug.cgi?id=99925 5 6 Reviewed by Ojan Vafai. 7 8 Add a repaint test. The render tree should be cross platform, but due to 9 slight color differences in the grey overlay, the png can't be shared. 10 11 * css3/flexbox/repaint-during-resize-no-flex-expected.txt: Added. 12 * css3/flexbox/repaint-during-resize-no-flex.html: Added. 13 * platform/chromium-linux/css3/flexbox/repaint-during-resize-no-flex-expected.png: Added. 14 * platform/chromium/TestExpectations: 15 1 16 2012-10-24 Simon Fraser <simon.fraser@apple.com> 2 17 -
trunk/LayoutTests/platform/chromium/TestExpectations
r132394 r132395 4041 4041 webkit.org/b/99873 platform/chromium/virtual/gpu/fast/canvas/webgl/array-bounds-clamping.html [ Text ] 4042 4042 4043 webkit.org/b/99925 [ Win Mac ] css3/flexbox/repaint-during-resize-no-flex.html [ Missing ImageOnlyFailure ] 4044 4043 4045 # These tests are failing already and because of virtual test suite for deferred 4044 4046 # image decoding they need to be suppressed again. -
trunk/Source/WebCore/ChangeLog
r132394 r132395 1 2012-10-24 Tony Chang <tony@chromium.org> 2 3 Setting width of a flexitem causes the adjacent flex item to be displayed poorly. 4 https://bugs.webkit.org/show_bug.cgi?id=99925 5 6 Reviewed by Ojan Vafai. 7 8 Make sure that we always repaint when moving a child. This is similar to what RenderDeprecatedFlexibleBox does. 9 10 Test: css3/flexbox/repaint-during-resize-no-flex.html 11 12 * rendering/RenderFlexibleBox.cpp: 13 (WebCore::RenderFlexibleBox::setFlowAwareLocationForChild): Move logic for repaining into the helper method 14 for setting the location of a child. 15 (WebCore::RenderFlexibleBox::layoutColumnReverse): Remove code for repaint since it's now in setFlowAwareLocationForChild. 16 (WebCore::RenderFlexibleBox::adjustAlignmentForChild): Remove code for repaint since it's now in setFlowAwareLocationForChild. 17 1 18 2012-10-24 Simon Fraser <simon.fraser@apple.com> 2 19 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r132136 r132395 662 662 void RenderFlexibleBox::setFlowAwareLocationForChild(RenderBox* child, const LayoutPoint& location) 663 663 { 664 LayoutRect oldFrameRect = child->frameRect(); 665 664 666 if (isHorizontalFlow()) 665 667 child->setLocation(location); 666 668 else 667 669 child->setLocation(location.transposedPoint()); 670 671 // If the child moved, we have to repaint it as well as any floating/positioned 672 // descendants. An exception is if we need a layout. In this case, we know we're going to 673 // repaint ourselves (and the child) anyway. 674 // FIXME: In some cases, we might overpaint as we move a child multiple times. We could reduce 675 // overpainting by keeping track of the original position of a child and running this check on 676 // the final position. 677 if (!selfNeedsLayout() && child->checkForRepaintDuringLayout()) 678 child->repaintDuringLayoutIfMoved(oldFrameRect); 668 679 } 669 680 … … 1143 1154 mainAxisOffset -= mainAxisExtentForChild(child) + flowAwareMarginEndForChild(child); 1144 1155 1145 LayoutRect oldRect = child->frameRect();1146 1156 setFlowAwareLocationForChild(child, LayoutPoint(mainAxisOffset, crossAxisOffset + flowAwareMarginBeforeForChild(child))); 1147 if (!selfNeedsLayout() && child->checkForRepaintDuringLayout())1148 child->repaintDuringLayoutIfMoved(oldRect);1149 1157 1150 1158 mainAxisOffset -= flowAwareMarginStartForChild(child); … … 1217 1225 } 1218 1226 1219 LayoutRect oldRect = child->frameRect();1220 1227 setFlowAwareLocationForChild(child, flowAwareLocationForChild(child) + LayoutSize(0, delta)); 1221 1222 // If the child moved, we have to repaint it as well as any floating/positioned1223 // descendants. An exception is if we need a layout. In this case, we know we're going to1224 // repaint ourselves (and the child) anyway.1225 if (!selfNeedsLayout() && child->checkForRepaintDuringLayout())1226 child->repaintDuringLayoutIfMoved(oldRect);1227 1228 } 1228 1229
Note: See TracChangeset
for help on using the changeset viewer.