Changeset 85499 in webkit
- Timestamp:
- May 2, 2011 11:50:41 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r85495 r85499 1 2011-05-02 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 <rdar://problem/7972529> Images with percentage based height/max-height are missing when they are inside blocks inside tables 6 https://bugs.webkit.org/show_bug.cgi?id=58006 7 8 * fast/replaced/table-percent-height-expected.txt: Updated. 9 * fast/replaced/table-percent-height.html: Added a test case with a replaced object nested in an 10 auto-height block inside a table cell. 11 1 12 2011-05-02 Daniel Bates <dbates@webkit.org> 2 13 -
trunk/LayoutTests/fast/replaced/table-percent-height-expected.txt
r67770 r85499 1 2 1 3 2 4 … … 41 43 PASS getWidth('img-100') is '100px' 42 44 PASS getHeight('img-100') is '100px' 45 PASS getWidth('img-75-nested') is '75px' 46 PASS getHeight('img-75-nested') is '75px' 47 PASS getWidth('img-100-nested') is '100px' 48 PASS getHeight('img-100-nested') is '100px' 43 49 PASS getWidth('object-75') is '300px' 44 50 PASS getHeight('object-75') is '112px' -
trunk/LayoutTests/fast/replaced/table-percent-height.html
r67770 r85499 77 77 shouldBe("getHeight('img-100')", "'100px'"); 78 78 79 shouldBe("getWidth('img-75-nested')", "'75px'"); 80 shouldBe("getHeight('img-75-nested')", "'75px'"); 81 shouldBe("getWidth('img-100-nested')", "'100px'"); 82 shouldBe("getHeight('img-100-nested')", "'100px'"); 83 79 84 shouldBe("getWidth('object-75')", "'300px'"); 80 85 shouldBe("getHeight('object-75')", "'112px'"); … … 144 149 <table><tr><td><img id="img-100" src="resources/square-blue-100x100.png" style="height: 100%;"></td></tr></table> 145 150 151 <table><tr><td><div><img id="img-75-nested" src="resources/square-blue-100x100.png" style="height: 75%;"></div></td></tr></table> 152 <table><tr><td><div><img id="img-100-nested" src="resources/square-blue-100x100.png" style="height: 100%;"></div></td></tr></table> 153 146 154 <table><tr><td><object id="object-75" style="background-color: #00ff00; height: 75%;"></object></td></tr></table> 147 155 <table><tr><td><object id="object-100" style="background-color: #00ff00; height: 100%;"></object></td></tr></table> -
trunk/Source/WebCore/ChangeLog
r85495 r85499 1 2011-05-02 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 <rdar://problem/7972529> Images with percentage based height/max-height are missing when they are inside blocks inside tables 6 https://bugs.webkit.org/show_bug.cgi?id=58006 7 8 * rendering/RenderBox.cpp: 9 (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Expanded the scope of the fix for 10 <http://webkit.org/b/15359> from r29039 to cover not just the case of a auto-or-percent-height 11 table cell as the immediate containing block, but any case where all containing block ancestors 12 up to and including a table cell are auto-or-percent height. 13 1 14 2011-05-02 Daniel Bates <dbates@webkit.org> 2 15 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r85256 r85499 2018 2018 // FIXME: This needs to be made block-flow-aware. If the cell and image are perpendicular block-flows, this isn't right. 2019 2019 // https://bugs.webkit.org/show_bug.cgi?id=46997 2020 if (cb->isTableCell() && (cb->style()->logicalHeight().isAuto() || cb->style()->logicalHeight().isPercent())) { 2021 // Don't let table cells squeeze percent-height replaced elements 2022 // <http://bugs.webkit.org/show_bug.cgi?id=15359> 2023 availableHeight = max(availableHeight, intrinsicLogicalHeight()); 2024 return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight()); 2020 while (cb && !cb->isRenderView() && (cb->style()->logicalHeight().isAuto() || cb->style()->logicalHeight().isPercent())) { 2021 if (cb->isTableCell()) { 2022 // Don't let table cells squeeze percent-height replaced elements 2023 // <http://bugs.webkit.org/show_bug.cgi?id=15359> 2024 availableHeight = max(availableHeight, intrinsicLogicalHeight()); 2025 return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight()); 2026 } 2027 cb = cb->containingBlock(); 2025 2028 } 2026 2029
Note: See TracChangeset
for help on using the changeset viewer.