Changeset 142889 in webkit
- Timestamp:
- Feb 14, 2013, 9:53:16 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142886 r142889 1 2013-02-14 Tony Chang <tony@chromium.org> 2 3 Padding and border changes doesn't trigger relayout of children 4 https://bugs.webkit.org/show_bug.cgi?id=109639 5 6 Reviewed by Kent Tamura. 7 8 * fast/block/dynamic-padding-border-expected.txt: Added. 9 * fast/block/dynamic-padding-border.html: Added. 10 * fast/table/border-collapsing/cached-change-row-border-width-expected.txt: We should have been relaying 11 out the table when the border changed. The pixel results in this case is the same, but the 12 render tree shows the difference. 13 1 14 2013-02-14 Vsevolod Vlasov <vsevik@chromium.org> 2 15 -
trunk/LayoutTests/fast/table/border-collapsing/cached-change-row-border-width-expected.txt
r95852 r142889 7 7 RenderTableSection {TBODY} at (1,2) size 54x100 8 8 RenderTableRow {TR} at (0,0) size 54x50 [border: (4px solid #FFFF00)] 9 RenderTableCell {TD} at (0,2 3) size 54x4[border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1]9 RenderTableCell {TD} at (0,22) size 54x6 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1] 10 10 RenderTableRow {TR} at (0,50) size 54x50 11 11 RenderTableCell {TD} at (0,73) size 54x3 [border: (2px none #000000)] [r=1 c=0 rs=1 cs=1] -
trunk/Source/WebCore/ChangeLog
r142888 r142889 1 2013-02-14 Tony Chang <tony@chromium.org> 2 3 Padding and border changes doesn't trigger relayout of children 4 https://bugs.webkit.org/show_bug.cgi?id=109639 5 6 Reviewed by Kent Tamura. 7 8 In RenderBlock::layoutBlock, we only relayout our children if our logical width 9 changes. This misses cases where our logical width doesn't change (i.e., padding 10 or border changes), but our content width does change. 11 12 This is a more general case of bug 104997. 13 14 Test: fast/block/dynamic-padding-border.html 15 16 * rendering/RenderBox.cpp: 17 (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed. 18 (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen 19 even without border-box box sizing. 20 1 21 2013-02-14 Peter Rybin <prybin@chromium.org> 2 22 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r142816 r142889 233 233 } 234 234 235 static bool borderWidthChanged(const RenderStyle* oldStyle, const RenderStyle* newStyle) 236 { 237 return oldStyle->borderLeftWidth() != newStyle->borderLeftWidth() 238 || oldStyle->borderTopWidth() != newStyle->borderTopWidth() 239 || oldStyle->borderRightWidth() != newStyle->borderRightWidth() 240 || oldStyle->borderBottomWidth() != newStyle->borderBottomWidth(); 235 static bool borderOrPaddingLogicalWidthChanged(const RenderStyle* oldStyle, const RenderStyle* newStyle) 236 { 237 if (newStyle->isHorizontalWritingMode()) 238 return oldStyle->borderLeftWidth() != newStyle->borderLeftWidth() 239 || oldStyle->borderRightWidth() != newStyle->borderRightWidth() 240 || oldStyle->paddingLeft() != newStyle->paddingLeft() 241 || oldStyle->paddingRight() != newStyle->paddingRight(); 242 243 return oldStyle->borderTopWidth() != newStyle->borderTopWidth() 244 || oldStyle->borderBottomWidth() != newStyle->borderBottomWidth() 245 || oldStyle->paddingTop() != newStyle->paddingTop() 246 || oldStyle->paddingBottom() != newStyle->paddingBottom(); 241 247 } 242 248 … … 315 321 #endif 316 322 317 if (oldStyle && (newStyle->boxSizing() == BORDER_BOX || oldStyle->boxSizing() == BORDER_BOX) && diff == StyleDifferenceLayout 318 && (newStyle->paddingBox() != oldStyle->paddingBox() || borderWidthChanged(oldStyle, newStyle))) { 323 if (oldStyle && diff == StyleDifferenceLayout && borderOrPaddingLogicalWidthChanged(oldStyle, newStyle)) { 319 324 ASSERT(needsLayout()); 320 325 for (RenderObject* child = firstChild(); child; child = child->nextSibling())
Note:
See TracChangeset
for help on using the changeset viewer.