Subpixel layout: Cleanup snapSizeToPixel/snapSizeToDevicePixel.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Aug 2014 05:27:41 +0000 (05:27 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Aug 2014 05:27:41 +0000 (05:27 +0000)
commit10dff070beaffe7fba43a6fa5ed35f71b0037120
tree1bc2715480941cdba4d8286604d4441c1fdc5b93
parente7095e8b19cd9a4213db27dcbc0d49f461446736
Subpixel layout: Cleanup snapSizeToPixel/snapSizeToDevicePixel.
https://bugs.webkit.org/show_bug.cgi?id=136264

Reviewed by Simon Fraser.

1. Align snapSizeToPixel()/snapSizeToDevicePixel() function names with the rest of snapping
functions. ->snappedIntSize()/snapSizeToDevicePixel().
2. Operate on LayoutSize/LayoutPoint instead of LayoutUnit/LayoutUnit to reflect functionality.

Covered by existing tests.

Source/WebCore:

* platform/LayoutUnit.h:
(WebCore::snapSizeToPixel): Deleted.
(WebCore::snapSizeToDevicePixel): Deleted.
* platform/graphics/LayoutPoint.h:
(WebCore::snappedIntSize):
(WebCore::snapSizeToDevicePixel):
(WebCore::pixelSnappedIntSize): Deleted.
* platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::pixelSnappedSize):
(WebCore::LayoutRect::pixelSnappedWidth):
(WebCore::LayoutRect::pixelSnappedHeight):
(WebCore::pixelSnappedIntRect):
(WebCore::pixelSnappedIntRectFromEdges):
(WebCore::pixelSnappedForPainting):
(WebCore::directionalPixelSnappedForPainting):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pixelSnappedClientWidth):
(WebCore::RenderBox::pixelSnappedClientHeight):
(WebCore::RenderBox::pixelSnappedOffsetWidth):
(WebCore::RenderBox::pixelSnappedOffsetHeight):
(WebCore::RenderBox::scrollWidth):
(WebCore::RenderBox::scrollHeight):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth):
(WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::scrollWidth):
(WebCore::RenderLayer::scrollHeight):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):

Tools:

* TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:
(TestWebKitAPI::TEST): Deleted.

LayoutTests:

* cssom/subpixel-offsetleft-top-width-height-values-expected.txt:
* platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/cssom/subpixel-offsetleft-top-width-height-values-expected.txt
LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/LayoutUnit.h
Source/WebCore/platform/graphics/LayoutPoint.h
Source/WebCore/platform/graphics/LayoutRect.h
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderTreeAsText.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp