Changeset 128389 in webkit
- Timestamp:
- Sep 12, 2012 5:30:07 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r128388 r128389 1 2012-09-12 Julien Chaffraix <jchaffraix@webkit.org> 2 3 REGRESSION(r122501): replaced elements with percent width are wrongly size when inserted inside an auto-table layout 4 https://bugs.webkit.org/show_bug.cgi?id=95892 5 6 Reviewed by Ojan Vafai. 7 8 * fast/replaced/vertical-writing-mode-max-logical-width-replaced-expected.txt: Added. 9 * fast/replaced/vertical-writing-mode-max-logical-width-replaced.html: Added. 10 * fast/table/bad-replaced-sizing-preferred-logical-widths-expected.txt: Added. 11 * fast/table/bad-replaced-sizing-preferred-logical-widths.html: Added. 12 * fast/table/resources/iframe.html: Added. 13 1 14 2012-09-12 Brady Eidson <beidson@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r128387 r128389 1 2012-09-12 Julien Chaffraix <jchaffraix@webkit.org> 2 3 REGRESSION(r122501): replaced elements with percent width are wrongly size when inserted inside an auto-table layout 4 https://bugs.webkit.org/show_bug.cgi?id=95892 5 6 Reviewed by Ojan Vafai. 7 8 r122501 exposed an issue in how preferred logical widths are computed on replaced objects. The code relies on the 9 logical width computation methods. Unfortunately the previous code relies on the layout information, which may not 10 be up-to-date during preferred logical width computation. 11 12 Test: fast/table/bad-replaced-sizing-preferred-logical-widths.html 13 fast/replaced/vertical-writing-mode-max-logical-width.html 14 15 * rendering/RenderReplaced.cpp: 16 (WebCore::RenderReplaced::computeMaxPreferredLogicalWidth): 17 Added this helper method. The main difference with the old code is that it handles the percent logical width 18 properly before calling the old code path. This is not totally right but before forking the whole code, it's 19 better to have more evidence that forking preferred logical widths and logical width computation is the way to go. 20 21 (WebCore::RenderReplaced::computePreferredLogicalWidths): 22 Changed to call computeMaxPreferredLogicalWidth. Also fixed an existing bug in vertical-writing modes where we would 23 add the wrong paddings and borders. 24 25 * rendering/RenderReplaced.h: 26 (RenderReplaced): Added computeMaxPreferredLogicalWidth. 27 1 28 2012-09-12 Max Vujovic <mvujovic@adobe.com> 2 29 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r128201 r128389 438 438 } 439 439 440 LayoutUnit RenderReplaced::computeMaxPreferredLogicalWidth() const 441 { 442 Length logicalWidth = style()->logicalWidth(); 443 444 // We cannot resolve any percent logical width here as the available logical 445 // width may not be set on our containing block. 446 if (logicalWidth.isPercent()) 447 return intrinsicLogicalWidth(); 448 449 // FIXME: We shouldn't be calling a logical width computing function in preferred 450 // logical widths computation as the layout information is probably invalid. 451 return computeReplacedLogicalWidth(false); 452 } 453 440 454 void RenderReplaced::computePreferredLogicalWidths() 441 455 { 442 456 ASSERT(preferredLogicalWidthsDirty()); 443 457 444 LayoutUnit borderAndPadding = borderAndPadding Width();445 m_maxPreferredLogicalWidth = compute ReplacedLogicalWidth(false) + borderAndPadding;458 LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth(); 459 m_maxPreferredLogicalWidth = computeMaxPreferredLogicalWidth() + borderAndPadding; 446 460 447 461 if (style()->maxWidth().isFixed()) -
trunk/Source/WebCore/rendering/RenderReplaced.h
r123183 r128389 68 68 virtual bool canHaveChildren() const { return false; } 69 69 70 LayoutUnit computeMaxPreferredLogicalWidth() const; 70 71 virtual void computePreferredLogicalWidths(); 71 72 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { }
Note: See TracChangeset
for help on using the changeset viewer.