Changeset 139013 in webkit
- Timestamp:
- Jan 7, 2013, 4:39:06 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r139007 r139013 1 2013-01-07 Emil A Eklund <eae@chromium.org> 2 3 REGRESSION(SUBPIXEL_LAYOUT): el.offsetWidth < el.clientWidth for elements of a certain size 4 https://bugs.webkit.org/show_bug.cgi?id=106107 5 6 Reviewed by Levi Weintraub. 7 8 Add test for clientWidth/offsetWidth rounding. 9 10 * fast/sub-pixel/client-and-offset-width-expected.txt: Added. 11 * fast/sub-pixel/client-and-offset-width.html: Added. 12 1 13 2013-01-07 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r139008 r139013 1 2013-01-07 Emil A Eklund <eae@chromium.org> 2 3 REGRESSION(SUBPIXEL_LAYOUT): el.offsetWidth < el.clientWidth for elements of a certain size 4 https://bugs.webkit.org/show_bug.cgi?id=106107 5 6 Reviewed by Levi Weintraub. 7 8 Add overloaded pixelSnappedOffsetWidth|Height methods to 9 RenderBox that do pixel snapping with the same offset 10 as clientWidth/height to ensure consistent rounding. 11 12 Test: fast/sub-pixel/client-and-offset-width.html 13 14 * rendering/RenderBox.cpp: 15 (WebCore::RenderBox::pixelSnappedOffsetWidth): 16 (WebCore::RenderBox::pixelSnappedOffsetHeight): 17 Snap using the same offset as the clientWidth/height versions. 18 19 * rendering/RenderBox.h: 20 Remove out of date FIXME and add OVERRIDE keyword. 21 22 * rendering/RenderBoxModelObject.h: 23 Mark pixelSnappedOffsetWidth|Height as virtual. 24 1 25 2013-01-07 Adam Barth <abarth@webkit.org> 2 26 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r138838 r139013 391 391 { 392 392 return snapSizeToPixel(clientHeight(), y() + clientTop()); 393 } 394 395 int RenderBox::pixelSnappedOffsetWidth() const 396 { 397 return snapSizeToPixel(offsetWidth(), x() + clientLeft()); 398 } 399 400 int RenderBox::pixelSnappedOffsetHeight() const 401 { 402 return snapSizeToPixel(offsetHeight(), y() + clientTop()); 393 403 } 394 404 -
trunk/Source/WebCore/rendering/RenderBox.h
r138838 r139013 206 206 virtual LayoutUnit offsetHeight() const { return height(); } 207 207 208 // FIXME: The implementation for these functions will change once we move to subpixel layout. See bug 60318. 209 virtual int pixelSnappedOffsetWidth() const { return pixelSnappedWidth(); } 210 virtual int pixelSnappedOffsetHeight() const { return pixelSnappedHeight(); } 208 virtual int pixelSnappedOffsetWidth() const OVERRIDE; 209 virtual int pixelSnappedOffsetHeight() const OVERRIDE; 211 210 212 211 // More IE extensions. clientWidth and clientHeight represent the interior of an object -
trunk/Source/WebCore/rendering/RenderBoxModelObject.h
r135167 r139013 81 81 int pixelSnappedOffsetLeft() const { return roundToInt(offsetLeft()); } 82 82 int pixelSnappedOffsetTop() const { return roundToInt(offsetTop()); } 83 int pixelSnappedOffsetWidth() const;84 int pixelSnappedOffsetHeight() const;83 virtual int pixelSnappedOffsetWidth() const; 84 virtual int pixelSnappedOffsetHeight() const; 85 85 86 86 virtual void updateFromStyle() OVERRIDE;
Note:
See TracChangeset
for help on using the changeset viewer.