Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Change WebKit/WebKit2 platform code to use pixel snapped values
https://bugs.webkit.org/show_bug.cgi?id=82549 Source/WebCore: Reviewed by Eric Seidel. Change WebKit and WebKit2 platform code to use rounded locations and pixel snapped rects and sizes. This largely avoids having to expose the fractional layout types to the platform code. No new tests. No change in functionality. * dom/Node.h: (WebCore::Node::pixelSnappedRenderRect): Add pixel snapped version of renderRect * rendering/RenderBox.h: (WebCore::RenderBox::pixelSnappedFrameRect): Add pixel snapped version of frameRect Source/WebKit/chromium: Reviewed by Eric Seidel. * src/WebAccessibilityObject.cpp: (WebKit::WebAccessibilityObject::boundingBoxRect): Use pixelSnappedBoundingBoxRect instead of boundingBoxRect which returns a LayoutRect. * src/WebFrameImpl.cpp: (WebKit::WebFrameImpl::characterIndexForPoint): Use roundedPoint instead of point for hit testing as ranges use screen cordinates which are represented with pixel accuracy. Source/WebKit/mac: Change WebKit and WebKit2 platform code to use rounded locations and pixel snapped rects and sizes. This largely avoids having to expose the fractional layout types to the platform code. Reviewed by Eric Seidel. * DOM/WebDOMOperations.mm: (-[DOMNode _renderRect:]): Source/WebKit/qt: Reviewed by Eric Seidel. * Api/qwebelement.cpp: (QWebElement::geometry): Replace getRect with getPixelSnappedRect to avoid having to expose subpixel types to the platform layer. * Api/qwebpage.cpp: (QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch): Use pixel snapped element rect when comparing with the touch rect as the touch rect use screen cordinates which are represented with pixel accuracy. * WebCoreSupport/ChromeClientQt.h: (WebCore::ChromeClientQt::scrollRectIntoView): Change scrollRectIntoView to take a LayoutRect to match base class interface. Source/WebKit2: Change WebKit and WebKit2 platform code to use rounded locations and pixel snapped rects and sizes. This largely avoids having to expose the fractional layout types to the platform code. Reviewed by Eric Seidel. * Shared/WebRenderObject.cpp: (WebKit::WebRenderObject::WebRenderObject): * UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::calculatePositionAndSize): * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::renderRect): * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::invalidateScrollbarRect): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::characterIndexForPoint): Canonical link: https://commits.webkit.org/100134@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
18 changed files
with
110 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -552,7 +552,7 @@ QRect QWebElement::geometry() const | ||
{ | ||
if (!m_element) | ||
return QRect(); | ||
return m_element->getRect(); | ||
return m_element->getPixelSnappedRect(); | ||
} | ||
|
||
/*! | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters