diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:09:45 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:10:13 +0100 |
commit | 470286ecfe79d59df14944e5b5d34630fc739391 (patch) | |
tree | 43983212872e06cebefd2ae474418fa2908ca54c /Source/WebKit/qt/Api/qwebframe.cpp | |
parent | 23037105e948c2065da5a937d3a2396b0ff45c1e (diff) | |
download | qtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz |
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebKit/qt/Api/qwebframe.cpp')
-rw-r--r-- | Source/WebKit/qt/Api/qwebframe.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp index 0accd3362..1310348ed 100644 --- a/Source/WebKit/qt/Api/qwebframe.cpp +++ b/Source/WebKit/qt/Api/qwebframe.cpp @@ -1598,7 +1598,7 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult { if (!hitTest.innerNode()) return; - pos = hitTest.roundedPoint(); + pos = hitTest.roundedPointInInnerNodeFrame(); WebCore::TextDirection dir; title = hitTest.title(dir); linkText = hitTest.textContent(); @@ -1624,9 +1624,9 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult 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())); } @@ -1684,7 +1684,9 @@ bool QWebHitTestResult::isNull() const } /*! - 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 { @@ -1848,7 +1850,7 @@ QWebElement QWebHitTestResult::element() const } /*! - Returns the frame the hit test was executed in. + Returns the frame of the element hit. */ QWebFrame *QWebHitTestResult::frame() const { |