Title: [135449] trunk/Source/WebKit/qt
Revision
135449
Author
allan.jen...@digia.com
Date
2012-11-21 16:03:08 -0800 (Wed, 21 Nov 2012)

Log Message

Position in QWebHitTestResult does not match documentation
https://bugs.webkit.org/show_bug.cgi?id=102909

Reviewed by Simon Hausmann.

Correct documentation and simplify using the new innerNodeFrame method.

* Api/qwebframe.cpp:
(QWebHitTestResultPrivate::QWebHitTestResultPrivate):

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/Api/qwebframe.cpp (135448 => 135449)


--- trunk/Source/WebKit/qt/Api/qwebframe.cpp	2012-11-22 00:02:50 UTC (rev 135448)
+++ trunk/Source/WebKit/qt/Api/qwebframe.cpp	2012-11-22 00:03:08 UTC (rev 135449)
@@ -1598,7 +1598,6 @@
 {
     if (!hitTest.innerNode())
         return;
-    // FIXME: This should probably use roundedPointInMainFrame if it is to match the documentation of QWebHitTestResult.
     pos = hitTest.roundedPointInInnerNodeFrame();
     WebCore::TextDirection dir;
     title = hitTest.title(dir);
@@ -1625,9 +1624,9 @@
     isContentSelected = hitTest.isSelected();
     isScrollBar = hitTest.scrollbar();
 
-    if (innerNonSharedNode && innerNonSharedNode->document()
-        && innerNonSharedNode->document()->frame())
-        frame = QWebFramePrivate::kit(innerNonSharedNode->document()->frame());
+    WebCore::Frame *innerNodeFrame = hitTest.innerNodeFrame();
+    if (innerNodeFrame)
+        frame = QWebFramePrivate::kit(innerNodeFrame);
 
     enclosingBlock = QWebElement(WebCore::enclosingBlock(innerNode.get()));
 }
@@ -1685,7 +1684,9 @@
 }
 
 /*!
-    Returns the position where the hit test occured.
+    Returns the position where the hit test occured in the coordinates of frame containing the element hit.
+
+    \sa frame()
 */
 QPoint QWebHitTestResult::pos() const
 {
@@ -1849,7 +1850,7 @@
 }
 
 /*!
-    Returns the frame the hit test was executed in.
+    Returns the frame of the element hit.
 */
 QWebFrame *QWebHitTestResult::frame() const
 {

Modified: trunk/Source/WebKit/qt/ChangeLog (135448 => 135449)


--- trunk/Source/WebKit/qt/ChangeLog	2012-11-22 00:02:50 UTC (rev 135448)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-11-22 00:03:08 UTC (rev 135449)
@@ -1,5 +1,17 @@
 2012-11-21  Allan Sandfeld Jensen  <allan.jen...@digia.com>
 
+        Position in QWebHitTestResult does not match documentation
+        https://bugs.webkit.org/show_bug.cgi?id=102909
+
+        Reviewed by Simon Hausmann.
+
+        Correct documentation and simplify using the new innerNodeFrame method.
+
+        * Api/qwebframe.cpp:
+        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
+
+2012-11-21  Allan Sandfeld Jensen  <allan.jen...@digia.com>
+
         Disambiguate innerNodeFramePoint and mainFramePoint
         https://bugs.webkit.org/show_bug.cgi?id=98139
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to