Changeset 117388 in webkit
- Timestamp:
- May 16, 2012 8:37:21 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117385 r117388 1 2012-05-16 Levi Weintraub <leviw@chromium.org> 2 3 Use pixelSnappedLogicalHeight for TableSection layout 4 https://bugs.webkit.org/show_bug.cgi?id=86665 5 6 Reviewed by Eric Seidel. 7 8 We do table layout using integers to ensure we follow the spec (see 9 https://trac.webkit.org/wiki/LayoutUnit for details), but were previously 10 flooring the logical height used in layoutRows. This caused us to mis- 11 calculate the intrinsic padding and grow cells beyond their proper height. 12 13 No new tests. Fully covered by existing tests with sub-pixel enabled. 14 15 * rendering/RenderBox.h: 16 (WebCore::RenderBox::pixelSnappedLogicalHeight): Added these convenience 17 methods. 18 (WebCore::RenderBox::pixelSnappedLogicalWidth): 19 * rendering/RenderTableSection.cpp: 20 (WebCore::RenderTableSection::layoutRows): 21 1 22 2012-05-16 Tony Chang <tony@chromium.org> 2 23 -
trunk/Source/WebCore/rendering/RenderBox.h
r116446 r117388 74 74 LayoutUnit logicalHeight() const { return style()->isHorizontalWritingMode() ? height() : width(); } 75 75 76 int pixelSnappedLogicalHeight() const { return style()->isHorizontalWritingMode() ? pixelSnappedHeight() : pixelSnappedWidth(); } 77 int pixelSnappedLogicalWidth() const { return style()->isHorizontalWritingMode() ? pixelSnappedWidth() : pixelSnappedHeight(); } 78 76 79 void setLogicalLeft(LayoutUnit left) 77 80 { -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r117339 r117388 619 619 int oldIntrinsicPaddingBefore = cell->intrinsicPaddingBefore(); 620 620 int oldIntrinsicPaddingAfter = cell->intrinsicPaddingAfter(); 621 int logicalHeightWithoutIntrinsicPadding = cell-> logicalHeight() - oldIntrinsicPaddingBefore - oldIntrinsicPaddingAfter;621 int logicalHeightWithoutIntrinsicPadding = cell->pixelSnappedLogicalHeight() - oldIntrinsicPaddingBefore - oldIntrinsicPaddingAfter; 622 622 623 623 int intrinsicPaddingBefore = 0;
Note: See TracChangeset
for help on using the changeset viewer.