Remove pixelSnapped* functions from RenderBoxModelObject/RenderBox.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Aug 2015 04:34:31 +0000 (04:34 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Aug 2015 04:34:31 +0000 (04:34 +0000)
commit57d3c139cbdaeb881f49cd0851592b30baa7f546
treea652e6231619dbd87a21fae7b890b5cb88b1b14a
parent530d271168761e76f8c6ef99219e0c3b1327614a
Remove pixelSnapped* functions from RenderBoxModelObject/RenderBox.
https://bugs.webkit.org/show_bug.cgi?id=147982

Reviewed by Simon Fraser.

RenderBoxModelObject/RenderBox::pixelSnapped* functions are misleading.
They all round to integral values, while the rest of the pixel snapping
functions round to device pixels.
This patch moves integral rounding to the callers. (Note that they all will eventually
go away as we convert additional modules to subpixel rendering (tables, scrolling etc).)

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* dom/Element.cpp:
(WebCore::Element::offsetLeft):
(WebCore::Element::offsetTop):
(WebCore::Element::offsetWidth):
(WebCore::Element::offsetHeight):
(WebCore::Element::clientWidth):
(WebCore::Element::clientHeight):
* dom/Position.cpp:
(WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::width):
(WebCore::HTMLImageElement::height):
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::defaultEventHandler):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementData):
* page/FrameView.cpp:
(WebCore::FrameView::applyPaginationToViewport):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::calculateExtendedBackgroundMode):
(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
* page/PrintContext.cpp:
(WebCore::PrintContext::pageNumberForElement):
* platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::pixelSnappedSize): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pixelSnappedClientWidth): Deleted.
(WebCore::RenderBox::pixelSnappedClientHeight): Deleted.
(WebCore::RenderBox::pixelSnappedOffsetWidth): Deleted.
(WebCore::RenderBox::pixelSnappedOffsetHeight): Deleted.
* rendering/RenderBox.h:
(WebCore::RenderBox::pixelSnappedLogicalHeight): Deleted.
(WebCore::RenderBox::pixelSnappedLogicalWidth): Deleted.
(WebCore::RenderBox::pixelSnappedSize): Deleted.
(WebCore::RenderBox::pixelSnappedBorderBoxRect): Deleted.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth): Deleted.
(WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight): Deleted.
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::pixelSnappedOffsetLeft): Deleted.
(WebCore::RenderBoxModelObject::pixelSnappedOffsetTop): Deleted.
* rendering/RenderFileUploadControl.cpp:
(WebCore::nodeWidth):
(WebCore::nodeHeight):
(WebCore::RenderFileUploadControl::maxFilenameWidth):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::perspectiveTransform):
(WebCore::RenderLayer::clampScrollOffset):
(WebCore::RenderLayer::visibleSize):
(WebCore::RenderLayer::positionOverflowControls):
(WebCore::RenderLayer::hasHorizontalOverflow):
(WebCore::RenderLayer::hasVerticalOverflow):
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
(WebCore::RenderLayer::overflowControlsIntersectRect):
(WebCore::RenderLayer::isPointInResizeControl):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
* rendering/RenderLayerBacking.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollWidth):
(WebCore::RenderListBox::scrollHeight):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::layout):
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::buttonRect):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addOverflowFromChildren):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeIntrinsicPadding):
(WebCore::RenderTableCell::paintCollapsedBorders):
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
(WebCore::RenderTableCell::paintBoxDecorations):
(WebCore::RenderTableCell::paintMask):
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::logicalHeightForRowSizing):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
(WebCore::RenderSVGRoot::computeFloatRectForRepaint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceImage.cpp
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Position.cpp
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/shadow/SpinButtonElement.cpp
Source/WebCore/inspector/InspectorOverlay.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/PrintContext.cpp
Source/WebCore/platform/graphics/LayoutRect.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderBoxModelObject.h
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderMediaControlElements.cpp
Source/WebCore/rendering/RenderScrollbar.cpp
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTableCell.cpp
Source/WebCore/rendering/RenderTableCell.h
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/RenderTreeAsText.cpp
Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
Source/WebCore/rendering/svg/RenderSVGRoot.cpp