Title: [128006] trunk/Source
Revision
128006
Author
[email protected]
Date
2012-09-09 17:29:21 -0700 (Sun, 09 Sep 2012)

Log Message

Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
https://bugs.webkit.org/show_bug.cgi?id=81413

Reviewed by David Hyatt.

Source/WebCore:

Rename Node::getRect and getPixelSnappedRect to boundingBox and
pixelSnappedBoundingBox respectively.

Remove overridden getRect method from ContainerNode as it calculates the
same rect as the Node implementation but in a more complicated and
error-prone way. Also remove the getUpperLeftCorner/getLowerRightCorner
support functions as they are no longer needed.

No new tests, no change in functionality.

* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySliderThumb::elementRect):
Update to call boundingBox.

* dom/ContainerNode.cpp:
* dom/ContainerNode.h:
Remove overridden getRect method and the getUpperLeftCorner/
getLowerRightCorner support methods .

* dom/Element.cpp:
(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::updateFocusAppearance):
Update to call boundingBox.

* dom/Node.h:
* dom/Node.cpp:
(WebCore::Node::boundingBox):
Rename getRect to boundingBox.

(WebCore::Node::pixelSnappedBoundingBox):
Rename getPixelSnappedRect to pixelSnappedBoundingBox.

* html/ColorInputType.cpp:
(WebCore::ColorInputType::elementRectRelativeToRootView):
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree):
* html/shadow/CalendarPickerElement.cpp:
(WebCore::CalendarPickerElement::openPopup):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::InputFieldSpeechButtonElement::startSpeechInput):
* page/FrameView.cpp:
(WebCore::FrameView::scrollElementToRect):
(WebCore::FrameView::scrollToAnchor):
* page/SpatialNavigation.cpp:
(WebCore::nodeRectInAbsoluteCoordinates):
Update to call boundingBox/pixelSnappedBoundingBox.

Source/WebKit/chromium:

Update WebViewImpl to call boundingBox/pixelSnappedBoundingBox.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::computeBlockBounds):
(WebKit::WebViewImpl::applyAutofillSuggestions):
(WebKit::WebViewImpl::refreshAutofillPopup):

Source/WebKit/efl:

Update ewk_frame to call pixelSnappedBoundingBox.

* ewk/ewk_frame.cpp:
(ewk_frame_focused_element_geometry_get):

Source/WebKit/gtk:

Update ChromeClientGtk and webkitwebview to call pixelSnappedBoundingBox.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::mouseDidMoveOverElement):
* webkit/webkitwebview.cpp:
(getLocationForKeyboardGeneratedContextMenu):
(webkit_web_view_query_tooltip):

Source/WebKit/qt:

Update qwebelement and qwebpage to call pixelSnappedBoundingBox.

* Api/qwebelement.cpp:
(QWebElement::geometry):
(QWebElement::render):
* Api/qwebpage.cpp:
(QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):

Source/WebKit2:

Update WebPage to call pixelSnappedBoundingBox.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (128005 => 128006)


--- trunk/Source/WebCore/ChangeLog	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/ChangeLog	2012-09-10 00:29:21 UTC (rev 128006)
@@ -1,3 +1,58 @@
+2012-09-09  Emil A Eklund  <[email protected]>
+
+        Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
+        https://bugs.webkit.org/show_bug.cgi?id=81413
+
+        Reviewed by David Hyatt.
+
+        Rename Node::getRect and getPixelSnappedRect to boundingBox and
+        pixelSnappedBoundingBox respectively.
+
+        Remove overridden getRect method from ContainerNode as it calculates the
+        same rect as the Node implementation but in a more complicated and
+        error-prone way. Also remove the getUpperLeftCorner/getLowerRightCorner
+        support functions as they are no longer needed.
+
+        No new tests, no change in functionality.
+
+        * accessibility/AccessibilitySlider.cpp:
+        (WebCore::AccessibilitySliderThumb::elementRect):
+        Update to call boundingBox.
+
+        * dom/ContainerNode.cpp:
+        * dom/ContainerNode.h:
+        Remove overridden getRect method and the getUpperLeftCorner/
+        getLowerRightCorner support methods .
+
+        * dom/Element.cpp:
+        (WebCore::Element::scrollIntoView):
+        (WebCore::Element::scrollIntoViewIfNeeded):
+        (WebCore::Element::updateFocusAppearance):
+        Update to call boundingBox.
+        
+        * dom/Node.h:
+        * dom/Node.cpp:
+        (WebCore::Node::boundingBox):
+        Rename getRect to boundingBox.
+
+        (WebCore::Node::pixelSnappedBoundingBox):
+        Rename getPixelSnappedRect to pixelSnappedBoundingBox.
+        
+        * html/ColorInputType.cpp:
+        (WebCore::ColorInputType::elementRectRelativeToRootView):
+        * html/ValidationMessage.cpp:
+        (WebCore::ValidationMessage::buildBubbleTree):
+        * html/shadow/CalendarPickerElement.cpp:
+        (WebCore::CalendarPickerElement::openPopup):
+        * html/shadow/TextControlInnerElements.cpp:
+        (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollElementToRect):
+        (WebCore::FrameView::scrollToAnchor):
+        * page/SpatialNavigation.cpp:
+        (WebCore::nodeRectInAbsoluteCoordinates):
+        Update to call boundingBox/pixelSnappedBoundingBox.
+
 2012-09-09  Christopher Cameron  <[email protected]>
 
         [chromium] Do not delete texture backing structures on the main thread

Modified: trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp (128005 => 128006)


--- trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -177,7 +177,7 @@
     RenderObject* sliderRenderer = m_parent->renderer();
     if (!sliderRenderer || !sliderRenderer->isSlider())
         return LayoutRect();
-    return sliderThumbElementOf(sliderRenderer->node())->getRect();
+    return sliderThumbElementOf(sliderRenderer->node())->boundingBox();
 }
 
 bool AccessibilitySliderThumb::accessibilityIsIgnored() const

Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (128005 => 128006)


--- trunk/Source/WebCore/dom/ContainerNode.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -720,135 +720,6 @@
     }
 }
 
-bool ContainerNode::getUpperLeftCorner(FloatPoint& point) const
-{
-    if (!renderer())
-        return false;
-    // What is this code really trying to do?
-    RenderObject *o = renderer();
-    RenderObject *p = o;
-
-    if (!o->isInline() || o->isReplaced()) {
-        point = o->localToAbsolute(FloatPoint(), false, true);
-        return true;
-    }
-
-    // find the next text/image child, to get a position
-    while (o) {
-        p = o;
-        if (o->firstChild())
-            o = o->firstChild();
-        else if (o->nextSibling())
-            o = o->nextSibling();
-        else {
-            RenderObject *next = 0;
-            while (!next && o->parent()) {
-                o = o->parent();
-                next = o->nextSibling();
-            }
-            o = next;
-
-            if (!o)
-                break;
-        }
-        ASSERT(o);
-
-        if (!o->isInline() || o->isReplaced()) {
-            point = o->localToAbsolute(FloatPoint(), false, true);
-            return true;
-        }
-
-        if (p->node() && p->node() == this && o->isText() && !o->isBR() && !toRenderText(o)->firstTextBox()) {
-                // do nothing - skip unrendered whitespace that is a child or next sibling of the anchor
-        } else if ((o->isText() && !o->isBR()) || o->isReplaced()) {
-            point = FloatPoint();
-            if (o->isText() && toRenderText(o)->firstTextBox()) {
-                point.move(toRenderText(o)->linesBoundingBox().x(),
-                           toRenderText(o)->firstTextBox()->root()->lineTop());
-            } else if (o->isBox()) {
-                RenderBox* box = toRenderBox(o);
-                point.moveBy(box->location());
-            }
-            point = o->container()->localToAbsolute(point, false, true);
-            return true;
-        }
-    }
-    
-    // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be
-    // at the end of the document.  Scroll to the bottom. FIXME: who said anything about scrolling?
-    if (!o && document()->view()) {
-        point = FloatPoint(0, document()->view()->contentsHeight());
-        return true;
-    }
-    return false;
-}
-
-bool ContainerNode::getLowerRightCorner(FloatPoint& point) const
-{
-    if (!renderer())
-        return false;
-
-    RenderObject* o = renderer();
-    if (!o->isInline() || o->isReplaced()) {
-        RenderBox* box = toRenderBox(o);
-        point = o->localToAbsolute(LayoutPoint(box->size()), false, true);
-        return true;
-    }
-
-    // find the last text/image child, to get a position
-    while (o) {
-        if (o->lastChild())
-            o = o->lastChild();
-        else if (o->previousSibling())
-            o = o->previousSibling();
-        else {
-            RenderObject* prev = 0;
-            while (!prev) {
-                o = o->parent();
-                if (!o)
-                    return false;
-                prev = o->previousSibling();
-            }
-            o = prev;
-        }
-        ASSERT(o);
-        if (o->isText() || o->isReplaced()) {
-            point = FloatPoint();
-            if (o->isText()) {
-                RenderText* text = toRenderText(o);
-                IntRect linesBox = text->linesBoundingBox();
-                if (!linesBox.maxX() && !linesBox.maxY())
-                    continue;
-                point.moveBy(linesBox.maxXMaxYCorner());
-            } else {
-                RenderBox* box = toRenderBox(o);
-                point.moveBy(box->frameRect().maxXMaxYCorner());
-            }
-            point = o->container()->localToAbsolute(point, false, true);
-            return true;
-        }
-    }
-    return true;
-}
-
-LayoutRect ContainerNode::getRect() const
-{
-    FloatPoint  upperLeft, lowerRight;
-    bool foundUpperLeft = getUpperLeftCorner(upperLeft);
-    bool foundLowerRight = getLowerRightCorner(lowerRight);
-    
-    // If we've found one corner, but not the other,
-    // then we should just return a point at the corner that we did find.
-    if (foundUpperLeft != foundLowerRight) {
-        if (foundUpperLeft)
-            lowerRight = upperLeft;
-        else
-            upperLeft = lowerRight;
-    } 
-
-    return enclosingLayoutRect(FloatRect(upperLeft, lowerRight.expandedTo(upperLeft) - upperLeft));
-}
-
 void ContainerNode::setFocus(bool received)
 {
     if (focused() == received)

Modified: trunk/Source/WebCore/dom/ContainerNode.h (128005 => 128006)


--- trunk/Source/WebCore/dom/ContainerNode.h	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/dom/ContainerNode.h	2012-09-10 00:29:21 UTC (rev 128006)
@@ -75,7 +75,6 @@
 
     virtual void attach() OVERRIDE;
     virtual void detach() OVERRIDE;
-    virtual LayoutRect getRect() const OVERRIDE;
     virtual void setFocus(bool = true) OVERRIDE;
     virtual void setActive(bool active = true, bool pause = false) OVERRIDE;
     virtual void setHovered(bool = true) OVERRIDE;
@@ -132,9 +131,6 @@
 
     static void dispatchPostAttachCallbacks();
 
-    bool getUpperLeftCorner(FloatPoint&) const;
-    bool getLowerRightCorner(FloatPoint&) const;
-
     Node* m_firstChild;
     Node* m_lastChild;
 };

Modified: trunk/Source/WebCore/dom/Element.cpp (128005 => 128006)


--- trunk/Source/WebCore/dom/Element.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/dom/Element.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -283,7 +283,7 @@
     if (!renderer())
         return;
 
-    LayoutRect bounds = getRect();
+    LayoutRect bounds = boundingBox();
     // Align to the top / bottom and to the closest edge.
     if (alignToTop)
         renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways);
@@ -298,7 +298,7 @@
     if (!renderer())
         return;
 
-    LayoutRect bounds = getRect();
+    LayoutRect bounds = boundingBox();
     if (centerIfNeeded)
         renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeeded);
     else
@@ -1639,7 +1639,7 @@
             frame->selection()->revealSelection();
         }
     } else if (renderer() && !renderer()->isWidget())
-        renderer()->scrollRectToVisible(getRect());
+        renderer()->scrollRectToVisible(boundingBox());
 }
 
 void Element::blur()

Modified: trunk/Source/WebCore/dom/Node.cpp (128005 => 128006)


--- trunk/Source/WebCore/dom/Node.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/dom/Node.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -796,7 +796,7 @@
     return m_renderer && m_renderer->isBoxModelObject() ? toRenderBoxModelObject(m_renderer) : 0;
 }
 
-LayoutRect Node::getRect() const
+LayoutRect Node::boundingBox() const
 {
     if (renderer())
         return renderer()->absoluteBoundingBoxRect();

Modified: trunk/Source/WebCore/dom/Node.h (128005 => 128006)


--- trunk/Source/WebCore/dom/Node.h	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/dom/Node.h	2012-09-10 00:29:21 UTC (rev 128006)
@@ -401,8 +401,8 @@
     }
 
     virtual bool shouldUseInputMethod();
-    virtual LayoutRect getRect() const;
-    IntRect getPixelSnappedRect() const { return pixelSnappedIntRect(getRect()); }
+    virtual LayoutRect boundingBox() const;
+    IntRect pixelSnappedBoundingBox() const { return pixelSnappedIntRect(boundingBox()); }
     LayoutRect renderRect(bool* isReplaced);
     IntRect pixelSnappedRenderRect(bool* isReplaced) { return pixelSnappedIntRect(renderRect(isReplaced)); }
 

Modified: trunk/Source/WebCore/html/ColorInputType.cpp (128005 => 128006)


--- trunk/Source/WebCore/html/ColorInputType.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/html/ColorInputType.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -208,7 +208,7 @@
 
 IntRect ColorInputType::elementRectRelativeToRootView() const
 {
-    return element()->document()->view()->contentsToRootView(element()->getPixelSnappedRect());
+    return element()->document()->view()->contentsToRootView(element()->pixelSnappedBoundingBox());
 }
 
 Color ColorInputType::currentColor()

Modified: trunk/Source/WebCore/html/ValidationMessage.cpp (128005 => 128006)


--- trunk/Source/WebCore/html/ValidationMessage.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/html/ValidationMessage.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -146,7 +146,7 @@
     shadowRoot->appendChild(m_bubble.get(), ec);
     ASSERT(!ec);
     host->document()->updateLayout();
-    adjustBubblePosition(host->getRect(), m_bubble.get());
+    adjustBubblePosition(host->boundingBox(), m_bubble.get());
 
     RefPtr<HTMLDivElement> clipper = HTMLDivElement::create(doc);
     clipper->setShadowPseudoId("-webkit-validation-bubble-arrow-clipper");

Modified: trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp (128005 => 128006)


--- trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -138,7 +138,7 @@
         parameters.step = 1.0;
     else
         parameters.step = step.toDouble();
-    parameters.anchorRectInRootView = document()->view()->contentsToRootView(hostInput()->getPixelSnappedRect());
+    parameters.anchorRectInRootView = document()->view()->contentsToRootView(hostInput()->pixelSnappedBoundingBox());
     parameters.currentValue = input->value();
     // FIXME: parameters.suggestionValues and suggestionLabels will be used when we support datalist.
     m_chooser = chrome->client()->openDateTimeChooser(this, parameters);

Modified: trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp (128005 => 128006)


--- trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -425,7 +425,7 @@
     RefPtr<HTMLInputElement> input = static_cast<HTMLInputElement*>(shadowHost());
     AtomicString language = input->computeInheritedLanguage();
     String grammar = input->getAttribute(webkitgrammarAttr);
-    IntRect rect = document()->view()->contentsToRootView(getPixelSnappedRect());
+    IntRect rect = document()->view()->contentsToRootView(pixelSnappedBoundingBox());
     if (speechInput()->startRecognition(m_listenerId, rect, language, grammar, document()->securityOrigin()))
         setState(Recording);
 }

Modified: trunk/Source/WebCore/page/FrameView.cpp (128005 => 128006)


--- trunk/Source/WebCore/page/FrameView.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/page/FrameView.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -1743,7 +1743,7 @@
 {
     m_frame->document()->updateLayoutIgnorePendingStylesheets();
 
-    LayoutRect bounds = element->getRect();
+    LayoutRect bounds = element->boundingBox();
     int centeringOffsetX = (rect.width() - bounds.width()) / 2;
     int centeringOffsetY = (rect.height() - bounds.height()) / 2;
     setScrollPosition(IntPoint(bounds.x() - centeringOffsetX - rect.x(), bounds.y() - centeringOffsetY - rect.y()));
@@ -2341,7 +2341,7 @@
 
     LayoutRect rect;
     if (anchorNode != m_frame->document())
-        rect = anchorNode->getRect();
+        rect = anchorNode->boundingBox();
 
     // Scroll nested layers and frames to reveal the anchor.
     // Align to the top and to the closest side (this matches other browsers).

Modified: trunk/Source/WebCore/page/SpatialNavigation.cpp (128005 => 128006)


--- trunk/Source/WebCore/page/SpatialNavigation.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/page/SpatialNavigation.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -522,7 +522,7 @@
 
     if (node->isDocumentNode())
         return frameRectInAbsoluteCoordinates(static_cast<Document*>(node)->frame());
-    LayoutRect rect = rectToAbsoluteCoordinates(node->document()->frame(), node->getRect());
+    LayoutRect rect = rectToAbsoluteCoordinates(node->document()->frame(), node->boundingBox());
 
     // For authors that use border instead of outline in their CSS, we compensate by ignoring the border when calculating
     // the rect of the focused element.

Modified: trunk/Source/WebCore/page/TouchDisambiguation.cpp (128005 => 128006)


--- trunk/Source/WebCore/page/TouchDisambiguation.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebCore/page/TouchDisambiguation.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -58,7 +58,7 @@
             node = node->traverseNextSibling(eventNode);
             continue;
         }
-        result.unite(pixelSnappedIntRect(node->getRect()));
+        result.unite(node->pixelSnappedBoundingBox());
         node = node->traverseNextNode(eventNode);
     }
     return eventNode->document()->view()->contentsToWindow(result);

Modified: trunk/Source/WebKit/chromium/ChangeLog (128005 => 128006)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-09-10 00:29:21 UTC (rev 128006)
@@ -1,3 +1,17 @@
+2012-09-09  Emil A Eklund  <[email protected]>
+
+        Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
+        https://bugs.webkit.org/show_bug.cgi?id=81413
+
+        Reviewed by David Hyatt.
+
+        Update WebViewImpl to call boundingBox/pixelSnappedBoundingBox.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::computeBlockBounds):
+        (WebKit::WebViewImpl::applyAutofillSuggestions):
+        (WebKit::WebViewImpl::refreshAutofillPopup):
+
 2012-09-09  James Robinson  <[email protected]>
 
         [chromium] webkit_platform should only be linked into the webkit target
@@ -16924,7 +16938,7 @@
         (WebKit::WebAccessibilityObject::ariaLiveRegionBusy):
         (WebKit::WebAccessibilityObject::ariaLiveRegionRelevant):
         (WebKit::WebAccessibilityObject::ariaLiveRegionStatus):
-        (WebKit::WebAccessibilityObject::boundingBoxRect):
+        (WebKit::WebAccessibilityObject::boundingBox):
         (WebKit::WebAccessibilityObject::estimatedLoadingProgress):
         (WebKit::WebAccessibilityObject::helpText):
         (WebKit::WebAccessibilityObject::headingLevel):

Modified: trunk/Source/WebKit/chromium/src/LinkHighlight.cpp (128005 => 128006)


--- trunk/Source/WebKit/chromium/src/LinkHighlight.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/chromium/src/LinkHighlight.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -149,7 +149,7 @@
         return false;
 
     bool pathHasChanged = false;
-    FloatRect boundingRect = m_node->getPixelSnappedRect();
+    FloatRect boundingRect = m_node->pixelSnappedBoundingBox();
 
     // FIXME: If we ever use a more sophisticated highlight path, we'll need
     // to devise a way of detecting when it changes.

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (128005 => 128006)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -1016,7 +1016,7 @@
 
     // Return the bounding box in the window coordinate system.
     if (node) {
-        IntRect rect = node->Node::getPixelSnappedRect();
+        IntRect rect = node->Node::pixelSnappedBoundingBox();
         Frame* frame = node->document()->frame();
         return frame->view()->contentsToWindow(rect);
     }
@@ -3307,7 +3307,7 @@
         refreshAutofillPopup();
     } else {
         m_autofillPopupShowing = true;
-        m_autofillPopup->showInRect(focusedNode->getPixelSnappedRect(), focusedNode->ownerDocument()->view(), 0);
+        m_autofillPopup->showInRect(focusedNode->pixelSnappedBoundingBox(), focusedNode->ownerDocument()->view(), 0);
     }
 }
 
@@ -3615,7 +3615,7 @@
         return;
     }
 
-    WebRect newWidgetRect = m_autofillPopup->refresh(focusedWebCoreNode()->getPixelSnappedRect());
+    WebRect newWidgetRect = m_autofillPopup->refresh(focusedWebCoreNode()->pixelSnappedBoundingBox());
     // Let's resize the backing window if necessary.
     WebPopupMenuImpl* popupMenu = static_cast<WebPopupMenuImpl*>(m_autofillPopup->client());
     if (popupMenu && popupMenu->client()->windowRect() != newWidgetRect)

Modified: trunk/Source/WebKit/efl/ChangeLog (128005 => 128006)


--- trunk/Source/WebKit/efl/ChangeLog	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-09-10 00:29:21 UTC (rev 128006)
@@ -1,3 +1,15 @@
+2012-09-09  Emil A Eklund  <[email protected]>
+
+        Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
+        https://bugs.webkit.org/show_bug.cgi?id=81413
+
+        Reviewed by David Hyatt.
+
+        Update ewk_frame to call pixelSnappedBoundingBox.
+
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_focused_element_geometry_get):
+
 2012-09-07  Benjamin Poulain  <[email protected]>
 
         Rename the ustring() accessor to string()

Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (128005 => 128006)


--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -898,7 +898,7 @@
     WebCore::Node* focusedNode = document->focusedNode();
     if (!focusedNode)
         return false;
-    WebCore::IntRect nodeRect = focusedNode->getPixelSnappedRect();
+    WebCore::IntRect nodeRect = focusedNode->pixelSnappedBoundingBox();
     if (x)
         *x = nodeRect.x();
     if (y)

Modified: trunk/Source/WebKit/gtk/ChangeLog (128005 => 128006)


--- trunk/Source/WebKit/gtk/ChangeLog	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/gtk/ChangeLog	2012-09-10 00:29:21 UTC (rev 128006)
@@ -1,3 +1,18 @@
+2012-09-09  Emil A Eklund  <[email protected]>
+
+        Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
+        https://bugs.webkit.org/show_bug.cgi?id=81413
+
+        Reviewed by David Hyatt.
+
+        Update ChromeClientGtk and webkitwebview to call pixelSnappedBoundingBox.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::mouseDidMoveOverElement):
+        * webkit/webkitwebview.cpp:
+        (getLocationForKeyboardGeneratedContextMenu):
+        (webkit_web_view_query_tooltip):
+
 2012-09-07  Martin Robinson  <[email protected]>
 
         [GTK] Move user agent helpers to WebCore

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp (128005 => 128006)


--- trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -786,7 +786,7 @@
     if (Node* node = hit.innerNonSharedNode()) {
         Frame* frame = node->document()->frame();
         FrameView* view = frame ? frame->view() : 0;
-        m_webView->priv->tooltipArea = view ? view->contentsToWindow(node->getPixelSnappedRect()) : IntRect();
+        m_webView->priv->tooltipArea = view ? view->contentsToWindow(node->pixelSnappedBoundingBox()) : IntRect();
     } else
         m_webView->priv->tooltipArea = IntRect();
 }

Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (128005 => 128006)


--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -427,7 +427,7 @@
     if (!selection->selection().isNonOrphanedCaretOrRange()
          || (selection->selection().isCaret() && !selection->selection().isContentEditable())) {
         if (Node* focusedNode = getFocusedNode(frame))
-            return focusedNode->getPixelSnappedRect().location();
+            return focusedNode->pixelSnappedBoundingBox().location();
 
         // There was no selection and no focused node, so just put the context
         // menu into the corner of the view, offset slightly.
@@ -1608,7 +1608,7 @@
                 String title = static_cast<Element*>(titleNode)->title();
                 if (!title.isEmpty()) {
                     if (FrameView* view = coreFrame->view()) {
-                        GdkRectangle area = view->contentsToWindow(node->getPixelSnappedRect());
+                        GdkRectangle area = view->contentsToWindow(node->pixelSnappedBoundingBox());
                         gtk_tooltip_set_tip_area(tooltip, &area);
                     }
                     gtk_tooltip_set_text(tooltip, title.utf8().data());

Modified: trunk/Source/WebKit/qt/Api/qwebelement.cpp (128005 => 128006)


--- trunk/Source/WebKit/qt/Api/qwebelement.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/qt/Api/qwebelement.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -546,7 +546,7 @@
 {
     if (!m_element)
         return QRect();
-    return m_element->getPixelSnappedRect();
+    return m_element->pixelSnappedBoundingBox();
 }
 
 /*!
@@ -1454,7 +1454,7 @@
 
     view->updateLayoutAndStyleIfNeededRecursive();
 
-    IntRect rect = e->getPixelSnappedRect();
+    IntRect rect = e->pixelSnappedBoundingBox();
 
     if (rect.size().isEmpty())
         return;

Modified: trunk/Source/WebKit/qt/Api/qwebpage.cpp (128005 => 128006)


--- trunk/Source/WebKit/qt/Api/qwebpage.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/qt/Api/qwebpage.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -1577,7 +1577,7 @@
         if (!currentElement || (!isClickableElement(currentElement, 0) && !isValidFrameOwner(currentElement)))
             continue;
 
-        IntRect currentElementBoundingRect = currentElement->getPixelSnappedRect();
+        IntRect currentElementBoundingRect = currentElement->pixelSnappedBoundingBox();
         currentElementBoundingRect.intersect(touchRect);
 
         if (currentElementBoundingRect.isEmpty())

Modified: trunk/Source/WebKit/qt/ChangeLog (128005 => 128006)


--- trunk/Source/WebKit/qt/ChangeLog	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-09-10 00:29:21 UTC (rev 128006)
@@ -1,3 +1,18 @@
+2012-09-09  Emil A Eklund  <[email protected]>
+
+        Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
+        https://bugs.webkit.org/show_bug.cgi?id=81413
+
+        Reviewed by David Hyatt.
+
+        Update qwebelement and qwebpage to call pixelSnappedBoundingBox.
+
+        * Api/qwebelement.cpp:
+        (QWebElement::geometry):
+        (QWebElement::render):
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):
+
 2012-09-07  Allan Sandfeld Jensen  <[email protected]>
 
         Simplify hitTestResultAtPoint and nodesFromRect APIs

Modified: trunk/Source/WebKit2/ChangeLog (128005 => 128006)


--- trunk/Source/WebKit2/ChangeLog	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-10 00:29:21 UTC (rev 128006)
@@ -1,3 +1,15 @@
+2012-09-09  Emil A Eklund  <[email protected]>
+
+        Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
+        https://bugs.webkit.org/show_bug.cgi?id=81413
+
+        Reviewed by David Hyatt.
+
+        Update WebPage to call pixelSnappedBoundingBox.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::editorState):
+
 2012-09-08  Sam Weinig  <[email protected]>
 
         Switch to entering the sandbox directly from main(), rather than waiting for the initialization message

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (128005 => 128006)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-09-09 23:59:41 UTC (rev 128005)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-09-10 00:29:21 UTC (rev 128006)
@@ -515,7 +515,7 @@
     }
 
     if (selectionRoot)
-        result.editorRect = frame->view()->contentsToWindow(selectionRoot->getPixelSnappedRect());
+        result.editorRect = frame->view()->contentsToWindow(selectionRoot->pixelSnappedBoundingBox());
 
     RefPtr<Range> range;
     if (result.hasComposition && (range = frame->editor()->compositionRange())) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to