Changeset 112758 in webkit
- Timestamp:
- Mar 30, 2012 5:57:47 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112757 r112758 1 2012-03-30 Emil A Eklund <eae@chromium.org> 2 3 Change WebKit/WebKit2 platform code to use pixel snapped values 4 https://bugs.webkit.org/show_bug.cgi?id=82549 5 6 Reviewed by Eric Seidel. 7 8 Change WebKit and WebKit2 platform code to use rounded locations and 9 pixel snapped rects and sizes. This largely avoids having to expose the 10 fractional layout types to the platform code. 11 12 No new tests. No change in functionality. 13 14 * dom/Node.h: 15 (WebCore::Node::pixelSnappedRenderRect): 16 Add pixel snapped version of renderRect 17 18 * rendering/RenderBox.h: 19 (WebCore::RenderBox::pixelSnappedFrameRect): 20 Add pixel snapped version of frameRect 21 1 22 2012-03-30 Simon Fraser <simon.fraser@apple.com> 2 23 -
trunk/Source/WebCore/dom/Node.h
r112424 r112758 380 380 IntRect getPixelSnappedRect() const { return pixelSnappedIntRect(getRect()); } 381 381 LayoutRect renderRect(bool* isReplaced); 382 IntRect pixelSnappedRenderRect(bool* isReplaced) { return pixelSnappedIntRect(renderRect(isReplaced)); } 382 383 383 384 // Returns true if the node has a non-empty bounding box in layout. -
trunk/Source/WebCore/rendering/RenderBox.h
r112756 r112758 131 131 132 132 LayoutRect frameRect() const { return m_frameRect; } 133 IntRect pixelSnappedFrameRect() const { return pixelSnappedIntRect(m_frameRect); } 133 134 void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; } 134 135 -
trunk/Source/WebKit/chromium/ChangeLog
r112754 r112758 1 2012-03-30 Emil A Eklund <eae@chromium.org> 2 3 Change WebKit/WebKit2 platform code to use pixel snapped values 4 https://bugs.webkit.org/show_bug.cgi?id=82549 5 6 Reviewed by Eric Seidel. 7 8 * src/WebAccessibilityObject.cpp: 9 (WebKit::WebAccessibilityObject::boundingBoxRect): 10 Use pixelSnappedBoundingBoxRect instead of boundingBoxRect which returns 11 a LayoutRect. 12 13 * src/WebFrameImpl.cpp: 14 (WebKit::WebFrameImpl::characterIndexForPoint): 15 Use roundedPoint instead of point for hit testing as ranges use screen 16 cordinates which are represented with pixel accuracy. 17 1 18 2012-03-30 Adam Barth <abarth@webkit.org> 2 19 -
trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp
r105295 r112758 494 494 495 495 m_private->updateBackingStore(); 496 return m_private-> boundingBoxRect();496 return m_private->pixelSnappedBoundingBoxRect(); 497 497 } 498 498 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r112690 r112758 1191 1191 IntPoint point = frame()->view()->windowToContents(webPoint); 1192 1192 HitTestResult result = frame()->eventHandler()->hitTestResultAtPoint(point, false); 1193 RefPtr<Range> range = frame()->rangeForPoint(result. point());1193 RefPtr<Range> range = frame()->rangeForPoint(result.roundedPoint()); 1194 1194 if (!range) 1195 1195 return notFound; -
trunk/Source/WebKit/mac/ChangeLog
r112720 r112758 1 2012-03-30 Emil A Eklund <eae@chromium.org> 2 3 Change WebKit/WebKit2 platform code to use pixel snapped values 4 https://bugs.webkit.org/show_bug.cgi?id=82549 5 6 Change WebKit and WebKit2 platform code to use rounded locations and 7 pixel snapped rects and sizes. This largely avoids having to expose the 8 fractional layout types to the platform code. 9 10 Reviewed by Eric Seidel. 11 12 * DOM/WebDOMOperations.mm: 13 (-[DOMNode _renderRect:]): 14 1 15 2012-03-30 Mark Pilgrim <pilgrim@chromium.org> 2 16 -
trunk/Source/WebKit/mac/DOM/WebDOMOperations.mm
r108850 r112758 132 132 - (NSRect)_renderRect:(bool *)isReplaced 133 133 { 134 return NSRect(core(self)-> renderRect(isReplaced));134 return NSRect(core(self)->pixelSnappedRenderRect(isReplaced)); 135 135 } 136 136 -
trunk/Source/WebKit/qt/Api/qwebelement.cpp
r111268 r112758 553 553 if (!m_element) 554 554 return QRect(); 555 return m_element->get Rect();555 return m_element->getPixelSnappedRect(); 556 556 } 557 557 -
trunk/Source/WebKit/qt/Api/qwebpage.cpp
r112720 r112758 1588 1588 continue; 1589 1589 1590 IntRect currentElementBoundingRect = currentElement->get Rect();1590 IntRect currentElementBoundingRect = currentElement->getPixelSnappedRect(); 1591 1591 currentElementBoundingRect.intersect(touchRect); 1592 1592 -
trunk/Source/WebKit/qt/ChangeLog
r112720 r112758 1 2012-03-30 Emil A Eklund <eae@chromium.org> 2 3 Change WebKit/WebKit2 platform code to use pixel snapped values 4 https://bugs.webkit.org/show_bug.cgi?id=82549 5 6 Reviewed by Eric Seidel. 7 8 * Api/qwebelement.cpp: 9 (QWebElement::geometry): 10 Replace getRect with getPixelSnappedRect to avoid having to expose 11 subpixel types to the platform layer. 12 13 * Api/qwebpage.cpp: 14 (QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch): 15 Use pixel snapped element rect when comparing with the touch rect as the 16 touch rect use screen cordinates which are represented with pixel 17 accuracy. 18 19 * WebCoreSupport/ChromeClientQt.h: 20 (WebCore::ChromeClientQt::scrollRectIntoView): 21 Change scrollRectIntoView to take a LayoutRect to match base class 22 interface. 23 1 24 2012-03-30 Mark Pilgrim <pilgrim@chromium.org> 2 25 -
trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r110595 r112758 172 172 virtual void setCursorHiddenUntilMouseMoves(bool) { } 173 173 174 virtual void scrollRectIntoView(const IntRect&) const { }174 virtual void scrollRectIntoView(const LayoutRect) const { } 175 175 176 176 virtual bool selectItemWritingDirectionIsNatural(); -
trunk/Source/WebKit2/ChangeLog
r112722 r112758 1 2012-03-30 Emil A Eklund <eae@chromium.org> 2 3 Change WebKit/WebKit2 platform code to use pixel snapped values 4 https://bugs.webkit.org/show_bug.cgi?id=82549 5 6 Change WebKit and WebKit2 platform code to use rounded locations and 7 pixel snapped rects and sizes. This largely avoids having to expose the 8 fractional layout types to the platform code. 9 10 Reviewed by Eric Seidel. 11 12 * Shared/WebRenderObject.cpp: 13 (WebKit::WebRenderObject::WebRenderObject): 14 * UIProcess/win/WebPopupMenuProxyWin.cpp: 15 (WebKit::WebPopupMenuProxyWin::calculatePositionAndSize): 16 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: 17 (WebKit::InjectedBundleNodeHandle::renderRect): 18 * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: 19 (WebKit::BuiltInPDFView::invalidateScrollbarRect): 20 * WebProcess/WebPage/mac/WebPageMac.mm: 21 (WebKit::WebPage::characterIndexForPoint): 22 1 23 2012-03-30 Anders Carlsson <andersca@apple.com> 2 24 -
trunk/Source/WebKit2/Shared/WebRenderObject.cpp
r110085 r112758 62 62 63 63 if (renderer->isBox()) 64 m_frameRect = toRenderBox(renderer)-> frameRect();64 m_frameRect = toRenderBox(renderer)->pixelSnappedFrameRect(); 65 65 else if (renderer->isText()) { 66 66 m_frameRect = toRenderText(renderer)->linesBoundingBox(); -
trunk/Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.cpp
r107577 r112758 402 402 monitorInfo.cbSize = sizeof(MONITORINFOEX); 403 403 ::GetMonitorInfo(monitor, &monitorInfo); 404 FloatRect screen = monitorInfo.rcWork;404 FloatRect screen = static_cast<IntRect>(monitorInfo.rcWork); 405 405 406 406 // Check that we don't go off the screen vertically -
trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
r112555 r112758 115 115 IntRect InjectedBundleNodeHandle::renderRect(bool* isReplaced) const 116 116 { 117 return m_node.get()-> renderRect(isReplaced);117 return m_node.get()->pixelSnappedRenderRect(isReplaced); 118 118 } 119 119 -
trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp
r112338 r112758 711 711 } 712 712 713 void BuiltInPDFView::invalidateScrollbarRect(Scrollbar* scrollbar, const LayoutRect& rect)713 void BuiltInPDFView::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect) 714 714 { 715 715 IntRect dirtyRect = rect; -
trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
r112338 r112758 359 359 frame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document()->frame() : m_page->focusController()->focusedOrMainFrame(); 360 360 361 RefPtr<Range> range = frame->rangeForPoint(result. point());361 RefPtr<Range> range = frame->rangeForPoint(result.roundedPoint()); 362 362 if (!range) 363 363 return;
Note: See TracChangeset
for help on using the changeset viewer.