Changeset 142977 in webkit


Ignore:
Timestamp:
Feb 15, 2013 2:46:33 AM (11 years ago)
Author:
allan.jensen@digia.com
Message:

Simplify hitTestResultAtPoint and nodesFromRect APIs
https://bugs.webkit.org/show_bug.cgi?id=95720

.:

Reviewed by Julien Chaffraix.

Update exported symbols.

  • Source/autotools/symbols.filter:

Source/WebCore:

Reviewed by Julien Chaffraix.

The existing API was overloaded and could be simplified by passing all the bool arguments in
a HitTestRequest argument. This should also help clarify the call as the enum values explicitely
state what they do.

  • WebCore.exp.in:
  • WebCore.order:
  • dom/Document.cpp:

(WebCore::Document::nodesFromRect):

  • dom/Document.h:

(Document):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::createContextMenu):

  • page/DragController.cpp:

(WebCore::DragController::canProcessDrag):
(WebCore::DragController::startDrag):

  • page/EventHandler.cpp:

(WebCore::EventHandler::hitTestResultAtPoint):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleGestureEvent):
(WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
(WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
(WebCore::EventHandler::handleTouchEvent):

  • page/EventHandler.h:

(WebCore):
(EventHandler):

  • page/FocusController.cpp:

(WebCore::updateFocusCandidateIfNeeded):

  • page/Frame.cpp:

(WebCore::Frame::visiblePositionForPoint):
(WebCore::Frame::documentAtPoint):

  • page/TouchDisambiguation.cpp:

(WebCore::findGoodTouchTargets):

  • rendering/HitTestRequest.h:

(WebCore::HitTestRequest::allowsFrameScrollbars):

  • testing/Internals.cpp:

(WebCore::Internals::nodesFromRect):

Source/WebKit/blackberry:

Reviewed by Julien Chaffraix.

Update calls to new API.

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::contextNode):
(BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint):
(BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
(BlackBerry::WebKit::WebPage::nodeAtDocumentPoint):
(BlackBerry::WebKit::WebPagePrivate::hitTestResult):

  • WebKitSupport/SelectionHandler.cpp:

(BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):

Source/WebKit/chromium:

Reviewed by Julien Chaffraix.

Update calls to new API.

  • src/ContextMenuClientImpl.cpp:

(WebKit::selectMisspelledWord):

  • src/FrameLoaderClientImpl.cpp:

(WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction):

  • src/WebFrameImpl.cpp:

(WebKit::WebFrameImpl::characterIndexForPoint):

  • src/WebPluginContainerImpl.cpp:

(WebKit::WebPluginContainerImpl::isRectTopmost):

  • src/WebViewImpl.cpp:

(WebKit::WebViewImpl::handleMouseDown):
(WebKit::WebViewImpl::computeBlockBounds):
(WebKit::WebViewImpl::bestTouchLinkNode):
(WebKit::WebViewImpl::hitTestResultForWindowPos):

Source/WebKit/efl:

Reviewed by Julien Chaffraix.

Update calls to new API.

  • ewk/ewk_frame.cpp:

(ewk_frame_hit_test_new):

Source/WebKit/mac:

Reviewed by Julien Chaffraix.

Update calls to new API.

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::actionDictionary):

  • WebView/WebFrame.mm:

(-[WebFrame elementAtPoint:]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView elementAtPoint:allowShadowContent:]):

Source/WebKit/qt:

Reviewed by Julien Chaffraix.

Update calls to new API.

  • WebCoreSupport/FrameLoaderClientQt.cpp:

(WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):

  • WebCoreSupport/QWebFrameAdapter.cpp:

(QWebFrameAdapter::hitTestContent):

  • WebCoreSupport/QWebPageAdapter.cpp:

(QWebPageAdapter::TouchAdjuster::findCandidatePointForTouch):
(QWebPageAdapter::handleSoftwareInputPanel):
(QWebPageAdapter::updatePositionDependentMenuActions):

Source/WebKit/win:

Reviewed by Julien Chaffraix.

Update calls to new API.

  • WebActionPropertyBag.cpp:

(WebActionPropertyBag::Read):

  • WebKit.vcproj/WebKitExports.def.in:
  • WebView.cpp:

(WebView::handleContextMenuEvent):
(WebView::elementAtPoint):

Source/WebKit/wx:

Reviewed by Julien Chaffraix.

Update calls to new API.

  • WebFrame.cpp:

(WebKit::WebFrame::HitTest):

Source/WebKit2:

Reviewed by Julien Chaffraix and Maciej Stachowiak.

Update calls to new API and update exported symbols.

  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:

(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::hitTest):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::handleContextMenuEvent):
(WebKit::WebPage::highlightPotentialActivation):
(WebKit::WebPage::findZoomableAreaForPoint):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::characterIndexForPoint):
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::shouldDelayWindowOrderingEvent):
(WebKit::WebPage::acceptsFirstMouse):

Location:
trunk
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r142879 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Update exported symbols.
     9
     10        * Source/autotools/symbols.filter:
     11
    1122013-02-08  Andrey Kosyakov  <caseq@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r142976 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        The existing API was overloaded and could be simplified by passing all the bool arguments in
     9        a HitTestRequest argument. This should also help clarify the call as the enum values explicitely
     10        state what they do.
     11
     12        * WebCore.exp.in:
     13        * WebCore.order:
     14        * dom/Document.cpp:
     15        (WebCore::Document::nodesFromRect):
     16        * dom/Document.h:
     17        (Document):
     18        * page/ContextMenuController.cpp:
     19        (WebCore::ContextMenuController::createContextMenu):
     20        * page/DragController.cpp:
     21        (WebCore::DragController::canProcessDrag):
     22        (WebCore::DragController::startDrag):
     23        * page/EventHandler.cpp:
     24        (WebCore::EventHandler::hitTestResultAtPoint):
     25        (WebCore::EventHandler::handleMousePressEvent):
     26        (WebCore::EventHandler::handleGestureEvent):
     27        (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
     28        (WebCore::EventHandler::bestClickableNodeForTouchPoint):
     29        (WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
     30        (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
     31        (WebCore::EventHandler::handleTouchEvent):
     32        * page/EventHandler.h:
     33        (WebCore):
     34        (EventHandler):
     35        * page/FocusController.cpp:
     36        (WebCore::updateFocusCandidateIfNeeded):
     37        * page/Frame.cpp:
     38        (WebCore::Frame::visiblePositionForPoint):
     39        (WebCore::Frame::documentAtPoint):
     40        * page/TouchDisambiguation.cpp:
     41        (WebCore::findGoodTouchTargets):
     42        * rendering/HitTestRequest.h:
     43        (WebCore::HitTestRequest::allowsFrameScrollbars):
     44        * testing/Internals.cpp:
     45        (WebCore::Internals::nodesFromRect):
     46
    1472013-02-14  Pavel Feldman  <pfeldman@chromium.org>
    248
  • trunk/Source/WebCore/WebCore.exp.in

    r142879 r142977  
    179179__ZN7WebCore12EventHandler16handleWheelEventERKNS_18PlatformWheelEventE
    180180__ZN7WebCore12EventHandler17scrollRecursivelyENS_15ScrollDirectionENS_17ScrollGranularityEPNS_4NodeE
    181 __ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_11LayoutPointEbbNS_17HitTestScrollbarsEjRKNS_10LayoutSizeE
     181__ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_11LayoutPointEjRKNS_10LayoutSizeE
    182182__ZN7WebCore12EventHandler21handleMousePressEventERKNS_18PlatformMouseEventE
    183183__ZN7WebCore12EventHandler23handleMouseReleaseEventERKNS_18PlatformMouseEventE
     
    14871487__ZNK7WebCore8Document11completeURLERKN3WTF6StringE
    14881488__ZNK7WebCore8Document13axObjectCacheEv
    1489 __ZNK7WebCore8Document13nodesFromRectEiijjjjbb
     1489__ZNK7WebCore8Document13nodesFromRectEiijjjjj
    14901490__ZNK7WebCore8Document14getElementByIdERKN3WTF12AtomicStringE
    14911491__ZNK7WebCore8Document31displayStringModifiedByEncodingERKN3WTF6StringE
  • trunk/Source/WebCore/WebCore.order

    r141216 r142977  
    2274922749__ZNK7WebCore4Node20traversePreviousNodeEPKS0_
    2275022750__ZN7WebCore37jsNodeIteratorPrototypeFunctionDetachEPN3JSC9ExecStateE
    22751 __ZNK7WebCore8Document13nodesFromRectEiijjjjb
     22751__ZNK7WebCore8Document13nodesFromRectEiijjjjj
    2275222752__ZNK7WebCore8Document17handleZeroPaddingERKNS_14HitTestRequestERNS_13HitTestResultE
    2275322753__ZN3WTF21ListHashSetTranslatorINS_6RefPtrIN7WebCore4NodeEEELm256ENS_7PtrHashIS4_EEE9translateERPNS_15ListHashSetNodeIS4_Lm256EEERKS4_PNS_24ListHashSetNodeAllocatorIS4_Lm256EEE
  • trunk/Source/WebCore/dom/Document.cpp

    r142885 r142977  
    13521352// * making it receive the expading size of each direction separately,
    13531353//   i.e. nodesFromRect(x, y, topSize, rightSize, bottomSize, leftSize);
    1354 PassRefPtr<NodeList> Document::nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent) const
     1354PassRefPtr<NodeList> Document::nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, HitTestRequest::HitTestRequestType hitType) const
    13551355{
    13561356    // FIXME: Share code between this, elementFromPoint and caretRangeFromPoint.
     
    13671367    LayoutPoint point = roundedLayoutPoint(FloatPoint(centerX * zoomFactor + view()->scrollX(), centerY * zoomFactor + view()->scrollY()));
    13681368
    1369     int type = HitTestRequest::ReadOnly | HitTestRequest::Active;
     1369    HitTestRequest request(hitType);
    13701370
    13711371    // When ignoreClipping is false, this method returns null for coordinates outside of the viewport.
    1372     if (ignoreClipping)
    1373         type |= HitTestRequest::IgnoreClipping;
    1374     else if (!frameView->visibleContentRect().intersects(HitTestLocation::rectForPoint(point, topPadding, rightPadding, bottomPadding, leftPadding)))
     1372    if (!request.ignoreClipping() && !frameView->visibleContentRect().intersects(HitTestLocation::rectForPoint(point, topPadding, rightPadding, bottomPadding, leftPadding)))
    13751373        return 0;
    1376     if (allowShadowContent)
    1377         type |= HitTestRequest::AllowShadowContent;
    1378 
    1379     HitTestRequest request(type);
    13801374
    13811375    // Passing a zero padding will trigger a rect hit test, however for the purposes of nodesFromRect,
  • trunk/Source/WebCore/dom/Document.h

    r142378 r142977  
    3636#include "DocumentTiming.h"
    3737#include "FocusDirection.h"
     38#include "HitTestRequest.h"
    3839#include "IconURL.h"
    3940#include "InspectorCounters.h"
     
    381382     * @param bottomPadding How much to expand the bottom of the rectangle
    382383     * @param leftPadding How much to expand the left of the rectangle
    383      * @param ignoreClipping whether or not to ignore the root scroll frame when retrieving the element.
    384      *        If false, this method returns null for coordinates outside of the viewport.
    385384     */
    386     PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding,
    387                                        unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent) const;
     385    PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY,
     386                                       unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding,
     387                                       HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active) const;
    388388    Element* elementFromPoint(int x, int y) const;
    389389    PassRefPtr<Range> caretRangeFromPoint(int x, int y);
  • trunk/Source/WebCore/page/ContextMenuController.cpp

    r142271 r142977  
    153153
    154154    if (Frame* frame = event->target()->toNode()->document()->frame())
    155         result = frame->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation(), false);
     155        result = frame->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation());
    156156
    157157    if (!result.innerNonSharedNode())
  • trunk/Source/WebCore/page/DragController.cpp

    r142375 r142977  
    561561        return false;
    562562
    563     result = m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(point, true);
     563    result = m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(point, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
    564564
    565565    if (!result.innerNonSharedNode())
     
    745745        return false;
    746746
    747     HitTestResult hitTestResult = src->eventHandler()->hitTestResultAtPoint(dragOrigin, true);
     747    HitTestResult hitTestResult = src->eventHandler()->hitTestResultAtPoint(dragOrigin, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
    748748    if (!state.m_dragSrc->contains(hitTestResult.innerNode()))
    749749        // The original node being dragged isn't under the drag origin anymore... maybe it was
  • trunk/Source/WebCore/page/EventHandler.cpp

    r142956 r142977  
    10021002#endif // ENABLE(DRAG_SUPPORT)
    10031003
    1004 HitTestResult EventHandler::hitTestResultAtPoint(const LayoutPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars, HitTestRequest::HitTestRequestType hitType, const LayoutSize& padding)
     1004HitTestResult EventHandler::hitTestResultAtPoint(const LayoutPoint& point, HitTestRequest::HitTestRequestType hitType, const LayoutSize& padding)
    10051005{
    10061006    // We always send hitTestResultAtPoint to the main frame if we have one,
     
    10131013            if (frameView && mainView) {
    10141014                IntPoint mainFramePoint = mainView->rootViewToContents(frameView->contentsToRootView(roundedIntPoint(point)));
    1015                 return mainFrame->eventHandler()->hitTestResultAtPoint(mainFramePoint, allowShadowContent, ignoreClipping, testScrollbars, hitType, padding);
     1015                return mainFrame->eventHandler()->hitTestResultAtPoint(mainFramePoint, hitType, padding);
    10161016            }
    10171017        }
     
    10221022    if (!m_frame->contentRenderer())
    10231023        return result;
    1024     if (ignoreClipping)
    1025         hitType |= HitTestRequest::IgnoreClipping;
    1026     if (allowShadowContent)
    1027         hitType |= HitTestRequest::AllowShadowContent;
     1024
    10281025    HitTestRequest request(hitType);
    10291026    m_frame->contentRenderer()->hitTest(request, result);
     
    10481045        result = widgetHitTestResult;
    10491046
    1050         if (testScrollbars == ShouldHitTestScrollbars) {
     1047        if (request.allowsFrameScrollbars()) {
    10511048            Scrollbar* eventScrollbar = view->scrollbarAtPoint(roundedIntPoint(point));
    10521049            if (eventScrollbar)
     
    10551052    }
    10561053
    1057     if (!allowShadowContent)
     1054    if (!request.allowsShadowContent())
    10581055        result.setToNonShadowAncestor();
    10591056
     
    14531450
    14541451    HitTestRequest request(HitTestRequest::Active);
    1455     // Save the document point we generate in case the window coordinate is invalidated by what happens 
     1452    // Save the document point we generate in case the window coordinate is invalidated by what happens
    14561453    // when we dispatch the event.
    14571454    LayoutPoint documentPoint = documentPointForWindowPoint(m_frame, mouseEvent.position());
     
    24572454    if ((!scrollbar && !eventTarget) || !(hitType & HitTestRequest::ReadOnly)) {
    24582455        IntPoint hitTestPoint = m_frame->view()->windowToContents(adjustedPoint);
    2459         HitTestResult result = hitTestResultAtPoint(hitTestPoint, false, false, ShouldHitTestScrollbars, hitType);
     2456        HitTestResult result = hitTestResultAtPoint(hitTestPoint, hitType | HitTestRequest::AllowFrameScrollbars);
    24602457        eventTarget = result.targetNode();
    24612458        if (!scrollbar) {
     
    25962593#if OS(ANDROID)
    25972594    IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.position());
    2598     HitTestResult result = hitTestResultAtPoint(hitTestPoint, true);
     2595    HitTestResult result = hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
    25992596    Node* innerNode = result.targetNode();
    26002597    if (!result.isLiveLink() && innerNode && (innerNode->isContentEditable() || innerNode->isTextNode())) {
     
    27382735bool EventHandler::bestClickableNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode)
    27392736{
    2740     HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
    27412737    IntPoint hitTestPoint = m_frame->view()->windowToContents(touchCenter);
    2742     HitTestResult result = hitTestResultAtPoint(hitTestPoint, /*allowShadowContent*/ true, /*ignoreClipping*/ false, DontHitTestScrollbars, hitType, touchRadius);
     2738    HitTestResult result = hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent, touchRadius);
    27432739
    27442740    IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius);
     
    27572753bool EventHandler::bestContextMenuNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode)
    27582754{
    2759     HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
    27602755    IntPoint hitTestPoint = m_frame->view()->windowToContents(touchCenter);
    2761     HitTestResult result = hitTestResultAtPoint(hitTestPoint, /*allowShadowContent*/ true, /*ignoreClipping*/ false, DontHitTestScrollbars, hitType, touchRadius);
     2756    HitTestResult result = hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent, touchRadius);
    27622757
    27632758    IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius);
     
    27682763bool EventHandler::bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntRect& targetArea, Node*& targetNode)
    27692764{
    2770     HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
    27712765    IntPoint hitTestPoint = m_frame->view()->windowToContents(touchCenter);
    2772     HitTestResult result = hitTestResultAtPoint(hitTestPoint, /*allowShadowContent*/ false, /*ignoreClipping*/ false, DontHitTestScrollbars, hitType, touchRadius);
     2766    HitTestResult result = hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active, touchRadius);
    27732767
    27742768    IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius);
     
    38633857            HitTestResult result;
    38643858            if (freshTouchEvents) {
    3865                 result = hitTestResultAtPoint(pagePoint, /*allowShadowContent*/ true, false, DontHitTestScrollbars, hitType);
     3859                result = hitTestResultAtPoint(pagePoint, hitType | HitTestRequest::AllowShadowContent);
    38663860                m_originatingTouchPointTargetKey = touchPointTargetKey;
    38673861            } else if (m_originatingTouchPointDocument.get() && m_originatingTouchPointDocument->frame()) {
     
    38973891            // We only perform a hittest on release or cancel to unset :active or :hover state.
    38983892            if (touchPointTargetKey == m_originatingTouchPointTargetKey) {
    3899                 hitTestResultAtPoint(pagePoint, /*allowShadowContent*/ true, false, DontHitTestScrollbars, hitType);
     3893                hitTestResultAtPoint(pagePoint, hitType | HitTestRequest::AllowShadowContent);
    39003894                m_originatingTouchPointTargetKey = 0;
    39013895            } else if (m_originatingTouchPointDocument.get() && m_originatingTouchPointDocument->frame()) {
  • trunk/Source/WebCore/page/EventHandler.h

    r142956 r142977  
    9292#endif // ENABLE(DRAG_SUPPORT)
    9393
    94 enum HitTestScrollbars { ShouldHitTestScrollbars, DontHitTestScrollbars };
    9594enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTrailingWhitespace };
    9695enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis };
     
    128127    void dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&);
    129128
    130     HitTestResult hitTestResultAtPoint(const LayoutPoint&, bool allowShadowContent, bool ignoreClipping = false,
    131                                        HitTestScrollbars scrollbars = DontHitTestScrollbars,
     129    HitTestResult hitTestResultAtPoint(const LayoutPoint&,
    132130                                       HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active,
    133131                                       const LayoutSize& padding = LayoutSize());
  • trunk/Source/WebCore/page/FocusController.cpp

    r141738 r142977  
    718718        LayoutUnit x = intersectionRect.x() + intersectionRect.width() / 2;
    719719        LayoutUnit y = intersectionRect.y() + intersectionRect.height() / 2;
    720         HitTestResult result = candidate.visibleNode->document()->page()->mainFrame()->eventHandler()->hitTestResultAtPoint(IntPoint(x, y), false, true);
     720        HitTestResult result = candidate.visibleNode->document()->page()->mainFrame()->eventHandler()->hitTestResultAtPoint(IntPoint(x, y), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping);
    721721        if (candidate.visibleNode->contains(result.innerNode())) {
    722722            closest = candidate;
  • trunk/Source/WebCore/page/Frame.cpp

    r141783 r142977  
    722722VisiblePosition Frame::visiblePositionForPoint(const IntPoint& framePoint)
    723723{
    724     HitTestResult result = eventHandler()->hitTestResultAtPoint(framePoint, true);
     724    HitTestResult result = eventHandler()->hitTestResultAtPoint(framePoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
    725725    Node* node = result.innerNonSharedNode();
    726726    if (!node)
     
    744744
    745745    if (contentRenderer())
    746         result = eventHandler()->hitTestResultAtPoint(pt, false);
     746        result = eventHandler()->hitTestResultAtPoint(pt);
    747747    return result.innerNode() ? result.innerNode()->document() : 0;
    748748}
  • trunk/Source/WebCore/page/TouchDisambiguation.cpp

    r141554 r142977  
    9999    IntPoint contentsPoint = mainFrame->view()->windowToContents(touchPoint);
    100100
    101     HitTestResult result = mainFrame->eventHandler()->hitTestResultAtPoint(contentsPoint, false, false, DontHitTestScrollbars, HitTestRequest::Active | HitTestRequest::ReadOnly, IntSize(padding, padding));
     101    HitTestResult result = mainFrame->eventHandler()->hitTestResultAtPoint(contentsPoint, HitTestRequest::ReadOnly | HitTestRequest::Active, IntSize(padding, padding));
    102102    const ListHashSet<RefPtr<Node> >& hitResults = result.rectBasedTestResult();
    103103
  • trunk/Source/WebCore/rendering/HitTestRequest.h

    r128677 r142977  
    3636        SVGClipContent = 1 << 6,
    3737        TouchEvent = 1 << 7,
    38         AllowShadowContent = 1 << 8
     38        AllowShadowContent = 1 << 8,
     39        AllowFrameScrollbars = 1 << 9
    3940    };
    4041
     
    5556    bool mouseEvent() const { return !touchEvent(); }
    5657    bool allowsShadowContent() const { return m_requestType & AllowShadowContent; }
     58    bool allowsFrameScrollbars() const { return m_requestType & AllowFrameScrollbars; }
    5759
    5860    // Convenience functions
  • trunk/Source/WebCore/testing/Internals.cpp

    r142879 r142977  
    13861386    }
    13871387
    1388     return document->nodesFromRect(x, y, topPadding, rightPadding, bottomPadding, leftPadding, ignoreClipping, allowShadowContent);
     1388    HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
     1389    if (ignoreClipping)
     1390        hitType |= HitTestRequest::IgnoreClipping;
     1391    if (allowShadowContent)
     1392        hitType |= HitTestRequest::AllowShadowContent;
     1393
     1394    return document->nodesFromRect(x, y, topPadding, rightPadding, bottomPadding, leftPadding, hitType);
    13891395}
    13901396
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r142882 r142977  
    27022702        contentPos = mapFromViewportToContents(m_lastMouseEvent.position());
    27032703
    2704     HitTestResult result = eventHandler->hitTestResultAtPoint(contentPos, false /*allowShadowContent*/);
     2704    HitTestResult result = eventHandler->hitTestResultAtPoint(contentPos);
    27052705    return result.innerNode();
    27062706}
     
    27732773        return 0;
    27742774
    2775     HitTestResult result = m_mainFrame->eventHandler()->hitTestResultAtPoint(documentPoint, false);
     2775    HitTestResult result = m_mainFrame->eventHandler()->hitTestResultAtPoint(documentPoint);
    27762776
    27772777    Node* node = result.innerNonSharedNode();
     
    40104010
    40114011    if (!node) {
    4012         HitTestResult result = eventHandler->hitTestResultAtPoint(mapFromViewportToContents(mouseEvent.position()), false /*allowShadowContent*/);
     4012        HitTestResult result = eventHandler->hitTestResultAtPoint(mapFromViewportToContents(mouseEvent.position()));
    40134013        node = result.innerNode();
    40144014    }
     
    49874987WebDOMNode WebPage::nodeAtDocumentPoint(const Platform::IntPoint& documentPoint)
    49884988{
    4989     HitTestResult result = d->m_mainFrame->eventHandler()->hitTestResultAtPoint(WebCore::IntPoint(documentPoint), false);
     4989    HitTestResult result = d->m_mainFrame->eventHandler()->hitTestResultAtPoint(WebCore::IntPoint(documentPoint));
    49904990    Node* node = result.innerNonSharedNode();
    49914991    return WebDOMNode(node);
     
    62456245    if (m_cachedHitTestContentPos != contentPos) {
    62466246        m_cachedHitTestContentPos = contentPos;
    6247         m_cachedHitTestResult = m_mainFrame->eventHandler()->hitTestResultAtPoint(m_cachedHitTestContentPos, true /*allowShadowContent*/);
     6247        m_cachedHitTestResult = m_mainFrame->eventHandler()->hitTestResultAtPoint(m_cachedHitTestContentPos, HitTestResult::ReadOnly | HitTestResult::Active | HitTestResult::AllowShadowContent);
    62486248    }
    62496249
  • trunk/Source/WebKit/blackberry/ChangeLog

    r142884 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Update calls to new API.
     9
     10        * Api/WebPage.cpp:
     11        (BlackBerry::WebKit::WebPagePrivate::contextNode):
     12        (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint):
     13        (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
     14        (BlackBerry::WebKit::WebPage::nodeAtDocumentPoint):
     15        (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
     16        * WebKitSupport/SelectionHandler.cpp:
     17        (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
     18
    1192013-02-14  Mike Fenton  <mifenton@rim.com>
    220
  • trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp

    r142120 r142977  
    168168    // visiblePositionAtPoint which which passes ignoreClipping=true.
    169169    // See RIM Bug #4315.
    170     HitTestResult result = frame.eventHandler()->hitTestResultAtPoint(framePoint, true /* allowShadowContent */, true /* ignoreClipping */);
     170    HitTestResult result = frame.eventHandler()->hitTestResultAtPoint(framePoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent | HitTestRequest::IgnoreClipping);
    171171
    172172    Node* node = result.innerNode();
  • trunk/Source/WebKit/chromium/ChangeLog

    r142963 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Update calls to new API.
     9
     10        * src/ContextMenuClientImpl.cpp:
     11        (WebKit::selectMisspelledWord):
     12        * src/FrameLoaderClientImpl.cpp:
     13        (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction):
     14        * src/WebFrameImpl.cpp:
     15        (WebKit::WebFrameImpl::characterIndexForPoint):
     16        * src/WebPluginContainerImpl.cpp:
     17        (WebKit::WebPluginContainerImpl::isRectTopmost):
     18        * src/WebViewImpl.cpp:
     19        (WebKit::WebViewImpl::handleMouseDown):
     20        (WebKit::WebViewImpl::computeBlockBounds):
     21        (WebKit::WebViewImpl::bestTouchLinkNode):
     22        (WebKit::WebViewImpl::hitTestResultForWindowPos):
     23
    1242013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
    225
  • trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp

    r141650 r142977  
    122122    // Selection is empty, so change the selection to the word under the cursor.
    123123    HitTestResult hitTestResult = selectedFrame->eventHandler()->
    124         hitTestResultAtPoint(selectedFrame->page()->contextMenuController()->hitTestResult().pointInInnerNodeFrame(), true);
     124        hitTestResultAtPoint(selectedFrame->page()->contextMenuController()->hitTestResult().pointInInnerNodeFrame(), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
    125125    Node* innerNode = hitTestResult.innerNode();
    126126    VisiblePosition pos(innerNode->renderer()->positionForPoint(
  • trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp

    r142549 r142977  
    10091009                    const MouseEvent* mouseEvent =
    10101010                        static_cast<const MouseEvent*>(event);
    1011                     node = m_webFrame->frame()->eventHandler()->hitTestResultAtPoint(
    1012                         mouseEvent->absoluteLocation(), false).innerNonSharedNode();
     1011                    node = m_webFrame->frame()->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation()).innerNonSharedNode();
    10131012                    break;
    10141013                }
  • trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp

    r142896 r142977  
    11821182
    11831183    IntPoint point = frame()->view()->windowToContents(webPoint);
    1184     HitTestResult result = frame()->eventHandler()->hitTestResultAtPoint(point, false);
     1184    HitTestResult result = frame()->eventHandler()->hitTestResultAtPoint(point);
    11851185    RefPtr<Range> range = frame()->rangeForPoint(result.roundedPointInInnerNodeFrame());
    11861186    if (!range)
  • trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp

    r142057 r142977  
    463463    // Make the rect we're checking (the point surrounded by padding rects) contained inside the requested rect. (Note that -1/2 is 0.)
    464464    LayoutSize padding((documentRect.width() - 1) / 2, (documentRect.height() - 1) / 2);
    465     HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(center, false, false, DontHitTestScrollbars, HitTestRequest::ReadOnly | HitTestRequest::Active, padding);
     465    HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(center, HitTestRequest::ReadOnly | HitTestRequest::Active, padding);
    466466    const HitTestResult::NodeSet& nodes = result.rectBasedTestResult();
    467467    if (nodes.size() != 1)
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r142927 r142977  
    569569        IntPoint point(event.x, event.y);
    570570        point = m_page->mainFrame()->view()->windowToContents(point);
    571         HitTestResult result(m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(point, false));
     571        HitTestResult result(m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(point));
    572572        Node* hitNode = result.innerNonSharedNode();
    573573
     
    11011101    // Use the rect-based hit test to find the node.
    11021102    IntPoint point = mainFrameImpl()->frameView()->windowToContents(IntPoint(rect.x, rect.y));
    1103     HitTestResult result = mainFrameImpl()->frame()->eventHandler()->hitTestResultAtPoint(point,
    1104             false, zoomType == FindInPage, DontHitTestScrollbars, HitTestRequest::Active | HitTestRequest::ReadOnly,
    1105             IntSize(rect.width, rect.height));
     1103    HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active
     1104            | ((zoomType == FindInPage) ? HitTestRequest::IgnoreClipping : 0);
     1105    HitTestResult result = mainFrameImpl()->frame()->eventHandler()->hitTestResultAtPoint(point, hitType, IntSize(rect.width, rect.height));
    11061106
    11071107    Node* node = result.innerNonSharedNode();
     
    12941294
    12951295    IntPoint hitTestPoint = m_page->mainFrame()->view()->windowToContents(touchEventLocation);
    1296     HitTestResult result = m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(
    1297         hitTestPoint, false, false, DontHitTestScrollbars, HitTestRequest::TouchEvent);
     1296    HitTestResult result = m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(hitTestPoint, HitTestRequest::TouchEvent);
    12981297    bestTouchNode = result.targetNode();
    12991298
     
    39553954{
    39563955    IntPoint docPoint(m_page->mainFrame()->view()->windowToContents(pos));
    3957     return m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(docPoint, false);
     3956    return m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(docPoint);
    39583957}
    39593958
  • trunk/Source/WebKit/efl/ChangeLog

    r142755 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Update calls to new API.
     9
     10        * ewk/ewk_frame.cpp:
     11        (ewk_frame_hit_test_new):
     12
    1132013-02-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    214
  • trunk/Source/WebKit/efl/ewk/ewk_frame.cpp

    r141439 r142977  
    3838#include "HTMLPlugInElement.h"
    3939#include "HistoryItem.h"
     40#include "HitTestRequest.h"
    4041#include "HitTestResult.h"
    4142#include "IntSize.h"
     
    692693
    693694    WebCore::HitTestResult result = smartData->frame->eventHandler()->hitTestResultAtPoint
    694                                         (view->windowToContents(WebCore::IntPoint(x, y)),
    695                                         /*allowShadowContent*/ false, /*ignoreClipping*/ true);
     695                                        (view->windowToContents(WebCore::IntPoint(x, y)), 
     696                                        WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::IgnoreClipping);
    696697
    697698    if (result.scrollbar())
  • trunk/Source/WebKit/mac/ChangeLog

    r142903 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Update calls to new API.
     9
     10        * WebCoreSupport/WebFrameLoaderClient.mm:
     11        (WebFrameLoaderClient::actionDictionary):
     12        * WebView/WebFrame.mm:
     13        (-[WebFrame elementAtPoint:]):
     14        * WebView/WebHTMLView.mm:
     15        (-[WebHTMLView elementAtPoint:allowShadowContent:]):
     16
    1172013-02-14  David Kilzer  <ddkilzer@apple.com>
    218
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r140793 r142977  
    13451345    if (const MouseEvent* mouseEvent = findMouseEvent(event)) {
    13461346        WebElementDictionary *element = [[WebElementDictionary alloc]
    1347             initWithHitTestResult:core(m_webFrame.get())->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation(), false)];
     1347            initWithHitTestResult:core(m_webFrame.get())->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation())];
    13481348        [result setObject:element forKey:WebActionElementKey];
    13491349        [element release];
  • trunk/Source/WebKit/mac/WebView/WebFrame.mm

    r142171 r142977  
    12171217    if (!coreFrame)
    12181218        return nil;
    1219     return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler()->hitTestResultAtPoint(IntPoint(point), false, true)] autorelease];
     1219    return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler()->hitTestResultAtPoint(IntPoint(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping)] autorelease];
    12201220}
    12211221
  • trunk/Source/WebKit/mac/WebView/WebHTMLView.mm

    r141545 r142977  
    62036203    if (!coreFrame)
    62046204        return nil;
    6205     return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler()->hitTestResultAtPoint(IntPoint(point), allow)] autorelease];
     6205    HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active
     6206        | (allow ? HitTestRequest::AllowShadowContent : 0);
     6207    return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler()->hitTestResultAtPoint(IntPoint(point), hitType)] autorelease];
    62066208}
    62076209
  • trunk/Source/WebKit/qt/ChangeLog

    r142972 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Update calls to new API.
     9
     10        * WebCoreSupport/FrameLoaderClientQt.cpp:
     11        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
     12        * WebCoreSupport/QWebFrameAdapter.cpp:
     13        (QWebFrameAdapter::hitTestContent):
     14        * WebCoreSupport/QWebPageAdapter.cpp:
     15        (QWebPageAdapter::TouchAdjuster::findCandidatePointForTouch):
     16        (QWebPageAdapter::handleSoftwareInputPanel):
     17        (QWebPageAdapter::updatePositionDependentMenuActions):
     18
    1192013-02-15  Simon Hausmann  <simon.hausmann@digia.com>
    220
  • trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r141783 r142977  
    12511251                const MouseEvent* mouseEvent =  static_cast<const MouseEvent*>(event);
    12521252                node = m_webFrame->frame->eventHandler()->hitTestResultAtPoint(
    1253                     mouseEvent->absoluteLocation(), false).innerNonSharedNode();
     1253                    mouseEvent->absoluteLocation()).innerNonSharedNode();
    12541254                break;
    12551255            }
  • trunk/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp

    r138413 r142977  
    390390        return 0;
    391391
    392     HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
     392    HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping);
    393393
    394394    if (result.scrollbar())
  • trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp

    r141233 r142977  
    430430    int y = touchPoint.y();
    431431
    432     RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding, false /*ignoreClipping*/, false /*allowShadowContent*/);
     432    RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
    433433    if (!intersectedNodes)
    434434        return IntPoint();
     
    586586            && button == Qt::LeftButton && qGuiApp->property("autoSipEnabled").toBool()) {
    587587        if (!clickCausedFocus || requestSoftwareInputPanel()) {
    588             HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos), false);
     588            HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos));
    589589            if (result.isContentEditable()) {
    590590                QEvent event(QEvent::RequestSoftwareInputPanel);
     
    928928    ASSERT(visitedWebActions);
    929929    WebCore::Frame* focusedFrame = page->focusController()->focusedOrMainFrame();
    930     HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos), /*allowShadowContent*/ false);
     930    HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos));
    931931    page->contextMenuController()->setHitTestResult(result);
    932932
  • trunk/Source/WebKit/win/ChangeLog

    r142923 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Update calls to new API.
     9
     10        * WebActionPropertyBag.cpp:
     11        (WebActionPropertyBag::Read):
     12        * WebKit.vcproj/WebKitExports.def.in:
     13        * WebView.cpp:
     14        (WebView::handleContextMenuEvent):
     15        (WebView::elementAtPoint):
     16
    1172013-02-14  Tony Chang  <tony@chromium.org>
    218
  • trunk/Source/WebKit/win/WebActionPropertyBag.cpp

    r128403 r142977  
    122122        if (const MouseEvent* mouseEvent = findMouseEvent(m_action.event())) {
    123123            V_VT(pVar) = VT_UNKNOWN;
    124             V_UNKNOWN(pVar) = WebElementPropertyBag::createInstance(m_frame->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation(), false));
     124            V_UNKNOWN(pVar) = WebElementPropertyBag::createInstance(m_frame->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation()));
    125125            return S_OK;
    126126        }
  • trunk/Source/WebKit/win/WebKit.vcproj/WebKitExports.def.in

    r142879 r142977  
    307307        ?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ
    308308        ??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z
    309         ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N0@Z
     309        ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIIII@Z
    310310        ?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z
    311311#if ENABLE(FULLSCREEN_API)
  • trunk/Source/WebKit/win/WebView.cpp

    r141545 r142977  
    13351335
    13361336    IntPoint documentPoint(m_page->mainFrame()->view()->windowToContents(coords));
    1337     HitTestResult result = m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(documentPoint, false);
     1337    HitTestResult result = m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(documentPoint);
    13381338    Frame* targetFrame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document()->frame() : m_page->focusController()->focusedOrMainFrame();
    13391339
     
    36043604    HitTestResult result = HitTestResult(webCorePoint);
    36053605    if (frame->contentRenderer())
    3606         result = frame->eventHandler()->hitTestResultAtPoint(webCorePoint, false);
     3606        result = frame->eventHandler()->hitTestResultAtPoint(webCorePoint);
    36073607    *elementDictionary = WebElementPropertyBag::createInstance(result);
    36083608    return S_OK;
  • trunk/Source/WebKit/wx/ChangeLog

    r142576 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        Update calls to new API.
     9
     10        * WebFrame.cpp:
     11        (WebKit::WebFrame::HitTest):
     12
    1132013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/Source/WebKit/wx/WebFrame.cpp

    r140718 r142977  
    691691
    692692    if (m_impl->frame->view()) {
    693         WebCore::HitTestResult result = m_impl->frame->eventHandler()->hitTestResultAtPoint(m_impl->frame->view()->windowToContents(pos), false);
     693        WebCore::HitTestResult result = m_impl->frame->eventHandler()->hitTestResultAtPoint(m_impl->frame->view()->windowToContents(pos));
    694694        if (result.innerNode()) {
    695695            domInfo.SetLink(result.absoluteLinkURL().string());
  • trunk/Source/WebKit2/ChangeLog

    r142968 r142977  
     12013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        Simplify hitTestResultAtPoint and nodesFromRect APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=95720
     5
     6        Reviewed by Julien Chaffraix and Maciej Stachowiak.
     7
     8        Update calls to new API and update exported symbols.
     9
     10        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
     11        (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
     12        * WebProcess/WebPage/WebFrame.cpp:
     13        (WebKit::WebFrame::hitTest):
     14        * WebProcess/WebPage/WebPage.cpp:
     15        (WebKit::handleContextMenuEvent):
     16        (WebKit::WebPage::highlightPotentialActivation):
     17        (WebKit::WebPage::findZoomableAreaForPoint):
     18        * WebProcess/WebPage/mac/WebPageMac.mm:
     19        (WebKit::WebPage::characterIndexForPoint):
     20        (WebKit::WebPage::performDictionaryLookupAtLocation):
     21        (WebKit::WebPage::shouldDelayWindowOrderingEvent):
     22        (WebKit::WebPage::acceptsFirstMouse):
     23
    1242013-02-14  Huang Dongsung  <luxtella@company100.net>
    225
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp

    r128403 r142977  
    9292{
    9393    if (const MouseEvent* mouseEvent = mouseEventForNavigationAction(navigationAction)) {
    94         m_hitTestResult = InjectedBundleHitTestResult::create(frame->coreFrame()->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation(), false));
     94        m_hitTestResult = InjectedBundleHitTestResult::create(frame->coreFrame()->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation()));
    9595        m_mouseButton   = mouseButtonForMouseEvent(mouseEvent);
    9696    }
  • trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp

    r142348 r142977  
    541541        return 0;
    542542
    543     return InjectedBundleHitTestResult::create(m_coreFrame->eventHandler()->hitTestResultAtPoint(point, false, true));
     543    return InjectedBundleHitTestResult::create(m_coreFrame->eventHandler()->hitTestResultAtPoint(point, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping));
    544544}
    545545
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r142017 r142977  
    15101510{
    15111511    IntPoint point = page->corePage()->mainFrame()->view()->windowToContents(platformMouseEvent.position());
    1512     HitTestResult result = page->corePage()->mainFrame()->eventHandler()->hitTestResultAtPoint(point, false);
     1512    HitTestResult result = page->corePage()->mainFrame()->eventHandler()->hitTestResultAtPoint(point);
    15131513
    15141514    Frame* frame = page->corePage()->mainFrame();
     
    17641764
    17651765#else
    1766         HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
     1766        HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping);
    17671767        adjustedNode = result.innerNode();
    17681768#endif
     
    30323032    UNUSED_PARAM(area);
    30333033    Frame* mainframe = m_mainFrame->coreFrame();
    3034     HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
     3034    HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping);
    30353035
    30363036    Node* node = result.innerNode();
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm

    r141372 r142977  
    386386        return;
    387387
    388     HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(point, false);
     388    HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(point);
    389389    frame = result.innerNonSharedNode() ? result.innerNodeFrame() : m_page->focusController()->focusedOrMainFrame();
    390390   
     
    483483    // Find the frame the point is over.
    484484    IntPoint point = roundedIntPoint(floatPoint);
    485     HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(point), false);
     485    HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(point));
    486486    frame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document()->frame() : m_page->focusController()->focusedOrMainFrame();
    487487
     
    741741
    742742#if ENABLE(DRAG_SUPPORT)
    743     HitTestResult hitResult = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(event.position()), true);
     743    HitTestResult hitResult = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(event.position()), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
    744744    if (hitResult.isSelected())
    745745        result = frame->eventHandler()->eventMayStartDrag(platform(event));
     
    754754        return;
    755755   
    756     HitTestResult hitResult = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(event.position()), true);
     756    HitTestResult hitResult = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(event.position()), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
    757757    frame->eventHandler()->setActivationEventNumber(eventNumber);
    758758#if ENABLE(DRAG_SUPPORT)
  • trunk/Source/autotools/symbols.filter

    r142879 r142977  
    222222_ZN7WebCore22RuntimeEnabledFeatures37isAuthorShadowDOMForAnyElementEnabledE;
    223223_ZN7WebCore22RuntimeEnabledFeatures20isStyleScopedEnabledE;
    224 _ZNK7WebCore8Document13nodesFromRectEiijjjjbb;
     224_ZNK7WebCore8Document13nodesFromRectEiijjjjj;
    225225_ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_8NodeListE;
    226226_ZNK7WebCore6Editor26selectionStartHasMarkerForENS_14DocumentMarker10MarkerTypeEii;
Note: See TracChangeset for help on using the changeset viewer.