Source/WebCore: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139
Reviewed by Julien Chaffraix.
Splits the point() method in HitTestResult into two, innerNodeFramePoint and mainFramePoint().
To do this HitTestResult no longer inherits publically from HitTestLocation, which should also
help to later separate the two classes completely.
Many of the call-sites of hitTestResultAtPoint confuses which coordinates the point is in.
These have not have been fixed in this patch, and they should be audited by the individual ports.
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::nodesFromRect):
* page/EventHandler.cpp:
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::hitTestResultAtPoint):
Set and maintain pointInMainFrame on the HitTestResult.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::HitTestResult):
Construct pointInMainFrame as a copy of pointInInnerNodeFrame. This is correct
for all hit-tests outside of the recursion in EventHandler::hitTestResultAtPoint.
(WebCore::HitTestResult::operator=):
(WebCore::HitTestResult::innerNodeFrame):
(WebCore::HitTestResult::append):
* rendering/HitTestResult.h:
(WebCore::HitTestLocation::point):
(HitTestResult):
Inherits protected now from HitTestLocation to avoid exposing the ambiguous
point() and roundedPoint() methods.
HitTestResult will be split completely from HitTestLocation in a later patch.
(WebCore::HitTestResult::isRectBasedTest):
(WebCore::HitTestResult::pointInMainFrame):
(WebCore::HitTestResult::roundedPointInMainFrame):
(WebCore::HitTestResult::setPointInMainFrame):
(WebCore::HitTestResult::pointInInnerNodeFrame):
(WebCore::HitTestResult::roundedPointInInnerNodeFrame):
(WebCore::HitTestResult::localPoint):
(WebCore::HitTestResult::setLocalPoint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):
Source/WebKit/chromium: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139
Reviewed by Julien Chaffraix.
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::mouseDidMoveOverElement):
* src/ContextMenuClientImpl.cpp:
(WebKit::selectMisspelledWord):
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::characterIndexForPoint):
Source/WebKit/efl: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139
Reviewed by Julien Chaffraix.
* ewk/ewk_frame.cpp:
(ewk_frame_hit_test_new):
Source/WebKit/gtk: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139
Reviewed by Julien Chaffraix.
Switched to using point in innerNodeFrame. While the use here seems wrong it has been
left functionally unchanged to be fixed by a later patch.
* webkit/webkithittestresult.cpp:
(WebKit::kit):
Source/WebKit/mac: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139
Reviewed by Julien Chaffraix.
Switch to using HitTestResult::innerNodeFrame and HitTestResult::innerNodeFramePoint.
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::showContextMenu):
Source/WebKit/qt: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139
Reviewed by Julien Chaffraix.
* Api/qwebframe.cpp:
(QWebHitTestResultPrivate::QWebHitTestResultPrivate):
* Api/qwebpage.cpp:
(QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):
Source/WebKit/win: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139
Reviewed by Julien Chaffraix.
* WebView.cpp:
(WebView::handleContextMenuEvent):
Source/WebKit2: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139
Reviewed by Julien Chaffraix.
Switch to using HitTestResult::innerNodeFrame and HitTestResult::innerNodeFramePoint.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::characterIndexForPoint):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed