WebCore:
authorbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 21:48:20 +0000 (21:48 +0000)
committerbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 21:48:20 +0000 (21:48 +0000)
        Reviewed by Maciej.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=11461 HitTestResult
        should be split into HitTestRequest and HitTestResult

        This patch creates a new struct called HitTestRequest that holds
        the three boolean values (readonly, active, and mouseMove) that
        were formerly a part of HitTestRequest. all hitTest() and
        nodeAtPoint() functions now take a HitTestRequest in addition to
        the HitTestResult.

WebKit:
        Reviewed by Maciej.

        Small tweaks to WebKit because of http://bugs.webkit.org/
        show_bug.cgi?id=11461 HitTestResult should be split into
        HitTestRequest and HitTestResult

        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebHTMLView.m:
        (-[WebHTMLView elementAtPoint:allowShadowContent:]): The
        HitTestResult initializer now just takes a point.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17494 268f45cc-cd09-0410-ab3c-d52691b4dbfc

55 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/FrameMac.mm
WebCore/bridge/mac/WebCoreAXObject.mm
WebCore/dom/Document.cpp
WebCore/editing/SelectionController.cpp
WebCore/page/Frame.cpp
WebCore/page/FrameView.cpp
WebCore/rendering/EllipsisBox.cpp
WebCore/rendering/EllipsisBox.h
WebCore/rendering/HitTestResult.cpp
WebCore/rendering/HitTestResult.h
WebCore/rendering/InlineBox.cpp
WebCore/rendering/InlineBox.h
WebCore/rendering/InlineFlowBox.cpp
WebCore/rendering/InlineFlowBox.h
WebCore/rendering/InlineTextBox.cpp
WebCore/rendering/InlineTextBox.h
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBlock.h
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderBox.h
WebCore/rendering/RenderFlow.cpp
WebCore/rendering/RenderFlow.h
WebCore/rendering/RenderForeignObject.cpp
WebCore/rendering/RenderForeignObject.h
WebCore/rendering/RenderFrameSet.cpp
WebCore/rendering/RenderFrameSet.h
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderImage.h
WebCore/rendering/RenderInline.cpp
WebCore/rendering/RenderInline.h
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLayer.h
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderPath.cpp
WebCore/rendering/RenderPath.h
WebCore/rendering/RenderSVGImage.cpp
WebCore/rendering/RenderSVGImage.h
WebCore/rendering/RenderSVGText.cpp
WebCore/rendering/RenderSVGText.h
WebCore/rendering/RenderTableRow.cpp
WebCore/rendering/RenderTableRow.h
WebCore/rendering/RenderTableSection.cpp
WebCore/rendering/RenderTableSection.h
WebCore/rendering/RenderText.h
WebCore/rendering/RenderTextControl.cpp
WebCore/rendering/RenderTextControl.h
WebCore/rendering/RootInlineBox.cpp
WebCore/rendering/RootInlineBox.h
WebKit/ChangeLog
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebHTMLView.m

index 887a6a870126745f5a533d9f885d935d325e1b75..03ef0d2690e795ef313f5304dcb1163e4927b0ee 100644 (file)
@@ -1,3 +1,104 @@
+2006-10-31  Beth Dakin  <bdakin@apple.com>
+
+        Reviewed by Maciej.
+
+        Fix for http://bugs.webkit.org/show_bug.cgi?id=11461 HitTestResult 
+        should be split into HitTestRequest and HitTestResult
+
+        This patch creates a new struct called HitTestRequest that holds 
+        the three boolean values (readonly, active, and mouseMove) that 
+        were formerly a part of HitTestRequest. all hitTest() and 
+        nodeAtPoint() functions now take a HitTestRequest in addition to 
+        the HitTestResult.
+
+        * WebCore.exp:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bridge/mac/FrameMac.mm:
+        (WebCore::FrameMac::eventMayStartDrag):
+        (WebCore::FrameMac::handleMouseMoveEvent):
+        * bridge/mac/WebCoreAXObject.mm:
+        (-[WebCoreAXObject doAXTextMarkerForPosition:]):
+        (-[WebCoreAXObject accessibilityHitTest:]):
+        * dom/Document.cpp:
+        (WebCore::Document::elementFromPoint):
+        (WebCore::Document::prepareMouseEvent):
+        * editing/SelectionController.cpp:
+        (WebCore::SelectionController::contains):
+        * page/Frame.cpp:
+        (WebCore::Frame::hitTestResultAtPoint):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::handleWheelEvent):
+        * rendering/EllipsisBox.cpp:
+        (WebCore::EllipsisBox::nodeAtPoint):
+        * rendering/EllipsisBox.h:
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestResult::HitTestResult):
+        (WebCore::HitTestResult::operator=):
+        * rendering/HitTestResult.h:
+        * rendering/InlineBox.cpp:
+        (WebCore::InlineBox::nodeAtPoint):
+        * rendering/InlineBox.h:
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::nodeAtPoint):
+        * rendering/InlineFlowBox.h:
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::nodeAtPoint):
+        * rendering/InlineTextBox.h:
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::nodeAtPoint):
+        * rendering/RenderBlock.h:
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::nodeAtPoint):
+        * rendering/RenderBox.h:
+        * rendering/RenderFlow.cpp:
+        (WebCore::RenderFlow::hitTestLines):
+        * rendering/RenderFlow.h:
+        * rendering/RenderForeignObject.cpp:
+        (WebCore::RenderForeignObject::nodeAtPoint):
+        * rendering/RenderForeignObject.h:
+        * rendering/RenderFrameSet.cpp:
+        (WebCore::RenderFrameSet::nodeAtPoint):
+        * rendering/RenderFrameSet.h:
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::nodeAtPoint):
+        * rendering/RenderImage.h:
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::nodeAtPoint):
+        * rendering/RenderInline.h:
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::autoscroll):
+        (WebCore::RenderLayer::hitTest):
+        (WebCore::RenderLayer::hitTestLayer):
+        (WebCore::RenderLayer::updateHoverActiveState):
+        * rendering/RenderLayer.h:
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::hitTest):
+        (WebCore::RenderObject::nodeAtPoint):
+        * rendering/RenderObject.h:
+        * rendering/RenderPath.cpp:
+        (WebCore::RenderPath::nodeAtPoint):
+        * rendering/RenderPath.h:
+        * rendering/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::nodeAtPoint):
+        * rendering/RenderSVGImage.h:
+        * rendering/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::nodeAtPoint):
+        * rendering/RenderSVGText.h:
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::nodeAtPoint):
+        * rendering/RenderTableRow.h:
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::nodeAtPoint):
+        * rendering/RenderTableSection.h:
+        * rendering/RenderText.h:
+        (WebCore::RenderText::nodeAtPoint):
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::nodeAtPoint):
+        * rendering/RenderTextControl.h:
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::nodeAtPoint):
+        * rendering/RootInlineBox.h:
+
 2006-10-31  Lars Naesbye Christensen <larsnaesbye@stud.ku.dk>
 
         Reviewed by Maciej.
index 69a72d8a6ecb96931519198f612cdb1e28a1e982..6e2a9cd4699ebe9750904c899cba5855a38fe8d9 100644 (file)
@@ -158,7 +158,7 @@ __ZN7WebCore11FrameLoader9setClientEPNS_17FrameLoaderClientE
 __ZN7WebCore11RenderLayer18gAlignCenterAlwaysE
 __ZN7WebCore11selectRangeEPNS_19SelectionControllerEPNS_5RangeENS_9EAffinityEb
 __ZN7WebCore12AtomicString3addEPNS_10StringImplE
-__ZN7WebCore13HitTestResultC1ERKNS_8IntPointEbbb
+__ZN7WebCore13HitTestResultC1ERKNS_8IntPointE
 __ZN7WebCore13HitTestResultC1ERKS0_
 __ZN7WebCore13HitTestResultD1Ev
 __ZN7WebCore13HitTestResultaSERKS0_
index 1fe89d7a892dbbc4f793429f7b86e87699f2e32f..368d0b6682be9d114f19eb0fa93df7226dae87be 100644 (file)
                9307F1130AF2C8BE00DBA31A /* DOMNodeInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85B498FA0ADB340200925CBB /* DOMNodeInternal.h */; };
                9307F1D70AF2D59000DBA31A /* HitTestResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9307F1D50AF2D59000DBA31A /* HitTestResult.cpp */; };
                9307F1D80AF2D59000DBA31A /* HitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 9307F1D60AF2D59000DBA31A /* HitTestResult.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               930908910AF7EDE40081DF01 /* HitTestRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 930908900AF7EDE40081DF01 /* HitTestRequest.h */; };
                93126F6109D7A736008D9626 /* StringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 93126F6009D7A736008D9626 /* StringHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
                9326DC0B09DAD5BE00AFC847 /* CharsetData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9326DC0A09DAD5BE00AFC847 /* CharsetData.h */; };
                9326DC0C09DAD5D600AFC847 /* CharsetData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581AC09D14EE6000E61D7 /* CharsetData.cpp */; };
                9307061309E0CA8200B17FE4 /* DerivedSources.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = DerivedSources.make; sourceTree = "<group>"; usesTabs = 1; };
                9307F1D50AF2D59000DBA31A /* HitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HitTestResult.cpp; sourceTree = "<group>"; };
                9307F1D60AF2D59000DBA31A /* HitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HitTestResult.h; sourceTree = "<group>"; };
+               930908900AF7EDE40081DF01 /* HitTestRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HitTestRequest.h; sourceTree = "<group>"; };
                930CAAD609C495B600229C04 /* CanvasRenderingContext2D.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasRenderingContext2D.idl; sourceTree = "<group>"; };
                930CAB8809C49EFA00229C04 /* CanvasGradient.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasGradient.idl; sourceTree = "<group>"; };
                930CAB8F09C49F1B00229C04 /* CanvasPattern.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasPattern.idl; sourceTree = "<group>"; };
                                A8CFF0480A154F09000A4234 /* FixedTableLayout.cpp */,
                                A8CFF04A0A154F09000A4234 /* FixedTableLayout.h */,
                                935C477409AC4D8D00A6AAB4 /* GapRects.h */,
+                               930908900AF7EDE40081DF01 /* HitTestRequest.h */,
                                9307F1D50AF2D59000DBA31A /* HitTestResult.cpp */,
                                9307F1D60AF2D59000DBA31A /* HitTestResult.h */,
                                A8CFF5DF0A155A05000A4234 /* InlineBox.cpp */,
                                B2A015B80AF6CD53006BCE0E /* SVGResourceMarker.h in Headers */,
                                B2A015BA0AF6CD53006BCE0E /* SVGResourceMasker.h in Headers */,
                                B2EBDC9D0AF77E3400AE4A68 /* SVGRenderTreeAsText.h in Headers */,
+                               930908910AF7EDE40081DF01 /* HitTestRequest.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
-                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                        mainGroup = 0867D691FE84028FC02AAC07 /* WebKit */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
-                       projectRoot = "";
-                       shouldCheckCompatibility = 1;
                        targets = (
                                93F198A508245E59001E9ABC /* WebCore */,
                                DD041FBE09D9DDBE0010AF2A /* Derived Sources */,
index 3c3a7091f4ad512f7cf25a6834247d34dd876c7c..919427035a937cde7718f9a9b514c899f5506cc0 100644 (file)
@@ -55,6 +55,7 @@
 #import "HTMLInputElement.h"
 #import "HTMLNames.h"
 #import "HTMLTableCellElement.h"
+#import "HitTestRequest.h"
 #import "HitTestResult.h"
 #import "Logging.h"
 #import "MouseEventWithHitTestResults.h"
@@ -1474,9 +1475,10 @@ bool FrameMac::eventMayStartDrag(NSEvent *event) const
     }
 
     NSPoint loc = [event locationInWindow];
+    HitTestRequest request(true, false);
     IntPoint mouseDownPos = d->m_view->windowToContents(IntPoint(loc));
-    HitTestResult result(mouseDownPos, true, false);
-    renderer()->layer()->hitTest(result);
+    HitTestResult result(mouseDownPos);
+    renderer()->layer()->hitTest(request, result);
     bool srcIsDHTML;
     return result.innerNode()->renderer()->draggableNode(DHTMLFlag, UAFlag, mouseDownPos.x(), mouseDownPos.y(), srcIsDHTML);
 }
@@ -1535,8 +1537,9 @@ void FrameMac::handleMouseMoveEvent(const MouseEventWithHitTestResults& event)
         
         if (mouseDownMayStartDrag() && !_dragSrc) {
             // try to find an element that wants to be dragged
-            HitTestResult result(m_mouseDownPos, true, false);
-            renderer()->layer()->hitTest(result);
+            HitTestRequest request(true, false);
+            HitTestResult result(m_mouseDownPos);
+            renderer()->layer()->hitTest(request, result);
             Node *node = result.innerNode();
             _dragSrc = (node && node->renderer()) ? node->renderer()->draggableNode(_dragSrcMayBeDHTML, _dragSrcMayBeUA, m_mouseDownPos.x(), m_mouseDownPos.y(), _dragSrcIsDHTML) : 0;
             if (!_dragSrc) {
index ed615f4f409972ee6d403a27f9147a5c8adce730..433ed4d203a0e32e4eeaaf3a07cdd387f0ca3182 100644 (file)
@@ -41,6 +41,7 @@
 #import "HTMLMapElement.h"
 #import "HTMLNames.h"
 #import "HTMLSelectElement.h"
+#import "HitTestRequest.h"
 #import "HitTestResult.h"
 #import "RenderImage.h"
 #import "RenderListMarker.h"
@@ -1262,8 +1263,9 @@ static IntRect boundingBoxRect(RenderObject* obj)
         NSPoint windowCoord = [[view window] convertScreenToBase: point];
         ourpoint = [view convertPoint:windowCoord fromView:nil];
         
-        HitTestResult result(IntPoint(ourpoint), true, true);
-        renderer->layer()->hitTest(result);
+        HitTestRequest request(true, true);
+        HitTestResult result = HitTestResult(IntPoint(ourpoint));
+        renderer->layer()->hitTest(request, result);
         innerNode = result.innerNode();
         if (!innerNode || !innerNode->renderer())
             return nil;
@@ -2302,8 +2304,9 @@ static VisiblePosition endOfStyleRange (const VisiblePosition visiblePos)
     if (!m_renderer)
         return NSAccessibilityUnignoredAncestor(self);
     
-    HitTestResult result(IntPoint(point), true, true);
-    m_renderer->layer()->hitTest(result);
+    HitTestRequest request(true, true);
+    HitTestResult result = HitTestResult(IntPoint(point));
+    m_renderer->layer()->hitTest(request, result);
     if (!result.innerNode())
         return NSAccessibilityUnignoredAncestor(self);
     Node* node = result.innerNode()->shadowAncestorNode();
index 16dab2fd03780102f6885cab5ea2f78bc717ba7e..64c5148d3cc75b0fe8d7c5c8aa4c62d1a118001e 100644 (file)
@@ -56,6 +56,8 @@
 #include "HTMLNameCollection.h"
 #include "HTMLNames.h"
 #include "HTMLStyleElement.h"
+#include "HitTestRequest.h"
+#include "HitTestResult.h"
 #include "JSEditor.h"
 #include "KeyboardEvent.h"
 #include "Logging.h"
@@ -64,7 +66,6 @@
 #include "MutationEvent.h"
 #include "NameNodeList.h"
 #include "NodeFilter.h"
-#include "HitTestResult.h"
 #include "NodeIterator.h"
 #include "PlatformKeyboardEvent.h"
 #include "ProcessingInstruction.h"
@@ -677,8 +678,9 @@ Element* Document::elementFromPoint(int x, int y) const
     if (!renderer())
         return 0;
 
-    HitTestResult result(IntPoint(x, y), true, true);
-    renderer()->layer()->hitTest(result); 
+    HitTestRequest request(true, true);
+    HitTestResult result(IntPoint(x, y));
+    renderer()->layer()->hitTest(request, result); 
 
     Node* n = result.innerNode();
     while (n && !n->isElementNode())
@@ -1673,8 +1675,9 @@ MouseEventWithHitTestResults Document::prepareMouseEvent(bool readonly, bool act
         return MouseEventWithHitTestResults(event, 0, 0, false);
 
     assert(renderer()->isRenderView());
-    HitTestResult result(point, readonly, active, mouseMove);
-    renderer()->layer()->hitTest(result);
+    HitTestRequest request(readonly, active, mouseMove);
+    HitTestResult result(point);
+    renderer()->layer()->hitTest(request, result);
 
     if (!readonly)
         updateRendering();
index 843fac1d25def79ac6675752f3ce5434ef75d8db..d3e0b4b019137c43594abfa1c787c8f8e06dcbce 100644 (file)
@@ -34,6 +34,7 @@
 #include "Frame.h"
 #include "FrameTree.h"
 #include "GraphicsContext.h"
+#include "HitTestRequest.h"
 #include "HitTestResult.h"
 #include "RenderView.h"
 #include "TextIterator.h"
@@ -942,8 +943,9 @@ bool SelectionController::contains(const IntPoint& point)
     if (!document->renderer()) 
         return false;
     
-    HitTestResult result(point, true, true);
-    document->renderer()->layer()->hitTest(result);
+    HitTestRequest request(true, true);
+    HitTestResult result(point);
+    document->renderer()->layer()->hitTest(request, result);
     Node *innerNode = result.innerNode();
     if (!innerNode || !innerNode->renderer())
         return false;
index b7cd0c33ffbd498aa468bb010360cf0517dcb871..b541ac028ab37c52bc9a7d128d2a009bb0fa64f1 100644 (file)
@@ -53,6 +53,7 @@
 #include "HTMLNames.h"
 #include "HTMLObjectElement.h"
 #include "HTMLViewSourceDocument.h"
+#include "HitTestRequest.h"
 #include "HitTestResult.h"
 #include "IconDatabase.h"
 #include "IconLoader.h"
@@ -2795,8 +2796,9 @@ void Frame::setAutoscrollRenderer(RenderObject* renderer)
 
 HitTestResult Frame::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent)
 {
-    HitTestResult result(point, true, true);
-    renderer()->layer()->hitTest(result);
+    HitTestRequest request(true, true);
+    HitTestResult result(point);
+    renderer()->layer()->hitTest(request, result);
 
     Node *n;
     Widget *widget = 0;
@@ -2818,8 +2820,9 @@ HitTestResult Frame::hitTestResultAtPoint(const IntPoint& point, bool allowShado
         widgetPoint.setX(widgetPoint.x() - absX + view->contentsX());
         widgetPoint.setY(widgetPoint.y() - absY + view->contentsY());
 
-        HitTestResult widgetHitTestResult(widgetPoint, true, true);
-        frame->renderer()->layer()->hitTest(widgetHitTestResult);
+        HitTestRequest widgetHitTestRequest(true, true);
+        HitTestResult widgetHitTestResult(widgetPoint);
+        frame->renderer()->layer()->hitTest(widgetHitTestRequest, widgetHitTestResult);
         result = widgetHitTestResult;
     }
     
index 757d2adca2cbb1ddc3c48c4ef4e22e0d190b6e30..fca8a89a9621ae515420cc330720359c17814977 100644 (file)
 #include "HTMLFrameSetElement.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
+#include "HitTestRequest.h"
+#include "HitTestResult.h"
 #include "Image.h"
 #include "MouseEvent.h"
 #include "MouseEventWithHitTestResults.h"
-#include "HitTestResult.h"
 #include "OverflowEvent.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformScrollBar.h"
@@ -53,6 +54,7 @@
 #include "Settings.h"
 #include "cssstyleselector.h"
 
+
 #ifdef SVG_SUPPORT
 #include "XLinkNames.h"
 #include "SVGNames.h"
@@ -1241,8 +1243,9 @@ void FrameView::handleWheelEvent(PlatformWheelEvent& e)
         if (docRenderer) {
             IntPoint vPoint = windowToContents(e.pos());
 
-            HitTestResult hitTestResult(vPoint, true, false);
-            doc->renderer()->layer()->hitTest(hitTestResult); 
+            HitTestRequest hitTestRequest(true, false);
+            HitTestResult hitTestResult(vPoint);
+            doc->renderer()->layer()->hitTest(hitTestRequest, hitTestResult); 
             Node *node = hitTestResult.innerNode();
             Frame* subframe = subframeForTargetNode(node);
             if (subframe && passWheelEventToSubframe(e, subframe)) {
index 599dae790989426d8ef32b3825c9c0b9cbae8aad..f07a0cc3bda170b49007a3a43653203e1779bfef 100644 (file)
@@ -61,7 +61,7 @@ void EllipsisBox::paint(RenderObject::PaintInfo& i, int _tx, int _ty)
     }
 }
 
-bool EllipsisBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
+bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty)
 {
     tx += m_x;
     ty += m_y;
@@ -70,7 +70,7 @@ bool EllipsisBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int t
     if (m_markupBox) {
         int mtx = tx + m_width - m_markupBox->xPos();
         int mty = ty + m_baseline - (m_markupBox->yPos() + m_markupBox->baseline());
-        if (m_markupBox->nodeAtPoint(result, x, y, mtx, mty)) {
+        if (m_markupBox->nodeAtPoint(request, result, x, y, mtx, mty)) {
             object()->setInnerNode(result);
             return true;
         }
index d383c32b643bcc050d19102c8cbe790653fdf776..3b409e24c894231eebbd430a4ce188f1f70a97ef 100644 (file)
@@ -26,6 +26,7 @@
 
 namespace WebCore {
 
+class HitTestRequest;
 class HitTestResult;
 
 class EllipsisBox : public InlineBox {
@@ -39,7 +40,7 @@ public:
     }
     
     virtual void paint(RenderObject::PaintInfo&, int _tx, int _ty);
-    virtual bool nodeAtPoint(HitTestResult&, int _x, int _y, int _tx, int _ty);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int _x, int _y, int _tx, int _ty);
 
 private:
     AtomicString m_str;
index 46f103b59e0c48af5e3949b60322b900f9eeccd8..d904fd7893ac5c924deb4c027f9604e72e014661 100644 (file)
 
 namespace WebCore {
 
-HitTestResult::HitTestResult(const IntPoint& point, bool readonly, bool active, bool mouseMove)
+HitTestResult::HitTestResult(const IntPoint& point)
     : m_point(point)
-    , m_readonly(readonly)
-    , m_active(active)
-    , m_mouseMove(mouseMove)
 {
 }
 
@@ -47,9 +44,6 @@ HitTestResult::HitTestResult(const HitTestResult& other)
     , m_point(other.point())
     , m_innerURLElement(other.URLElement())
     , m_scrollbar(other.scrollbar())
-    , m_readonly(other.readonly())
-    , m_active(other.active())
-    , m_mouseMove(other.mouseMove())
 {
 }
 
@@ -64,9 +58,6 @@ HitTestResult& HitTestResult::operator=(const HitTestResult& other)
     m_point = other.point();
     m_innerURLElement = other.URLElement();
     m_scrollbar = other.scrollbar();
-    m_readonly = other.readonly();
-    m_active = other.active();
-    m_mouseMove = other.mouseMove();
     return *this;
 }
 
index 1fcf53f46ec7b8242941fbb7c41c9aaca1c31d7c..30b65e65e5466afbf8770c67e3f69a5b4b42a8f5 100644 (file)
@@ -36,17 +36,11 @@ class String;
 
 class HitTestResult {
 public:
-    HitTestResult(const IntPoint&, bool readonly, bool active, bool mouseMove = false);
+    HitTestResult(const IntPoint&);
     HitTestResult(const HitTestResult&);
     ~HitTestResult();
     HitTestResult& operator=(const HitTestResult&);
 
-    // These are not really part of the result. They are the parameters of the HitTest.
-    // They should probably be in a different structure.
-    bool readonly() const { return m_readonly; }
-    bool active() const { return m_active; }
-    bool mouseMove() const { return m_mouseMove; }
-
     Node* innerNode() const { return m_innerNode.get(); }
     Node* innerNonSharedNode() const { return m_innerNonSharedNode.get(); }
     IntPoint point() const { return m_point; }
@@ -58,9 +52,6 @@ public:
     void setPoint(const IntPoint& p) { m_point = p; }
     void setURLElement(Element*);
     void setScrollbar(PlatformScrollbar*);
-    void setReadonly(bool r) { m_readonly = r; }
-    void setActive(bool a) { m_active = a; }
-    void setMouseMove(bool m) { m_mouseMove = m; }
 
     Frame* targetFrame() const;
     IntRect boundingBox() const;
@@ -73,9 +64,6 @@ private:
     IntPoint m_point;
     RefPtr<Element> m_innerURLElement;
     RefPtr<PlatformScrollbar> m_scrollbar;
-    bool m_readonly;
-    bool m_active;
-    bool m_mouseMove;
 };
 
 } // namespace WebCore
index 2ca64c58335ff04d69e582fcfca0fc5b37b73006..1b76838a6220c78a5f296f73c4cc5304a78321a5 100644 (file)
@@ -149,12 +149,12 @@ void InlineBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
     }
 }
 
-bool InlineBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
+bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty)
 {
     // Hit test all phases of replaced elements atomically, as though the replaced element established its
     // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
     // specification.)
-    return object()->hitTest(result, x, y, tx, ty);
+    return object()->hitTest(request, result, x, y, tx, ty);
 }
 
 bool InlineBox::isChildOfParent()
index 03425a16f399aa02019c757b1f28e0413dadf491..6fc2a308e56e517fd5ee750276d6ed21e5d2b6c8 100644 (file)
@@ -27,6 +27,7 @@
 
 namespace WebCore {
 
+class HitTestRequest;
 class HitTestResult;
 class RootInlineBox;
 
@@ -82,7 +83,7 @@ public:
     virtual void adjustPosition(int dx, int dy);
 
     virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty);
 
     // Overloaded new operator.
     void* operator new(size_t, RenderArena*) throw();
index d30283134ecd8763fc48c0e6577501515d4c8157..73086dbe5bd43cfbfab1111416adf050899afb73 100644 (file)
@@ -523,11 +523,11 @@ void InlineFlowBox::shrinkBoxesWithNoTextChildren(int topPos, int bottomPos)
     }
 }
 
-bool InlineFlowBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
+bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty)
 {
     // Check children first.
     for (InlineBox* curr = lastChild(); curr; curr = curr->prevOnLine()) {
-        if (!curr->object()->layer() && curr->nodeAtPoint(result, x, y, tx, ty)) {
+        if (!curr->object()->layer() && curr->nodeAtPoint(request, result, x, y, tx, ty)) {
             object()->setInnerNode(result);
             return true;
         }
index 910843a0f8e123f220c9818565bc21d65bb4997e..2aa0b9d50dc0d9f2949e5142eec7bdfcc0b7d317 100644 (file)
@@ -27,6 +27,7 @@
 
 namespace WebCore {
 
+class HitTestRequest;
 class HitTestResult;
 
 class InlineFlowBox : public InlineRunBox {
@@ -79,7 +80,7 @@ public:
                          int my, int mh, int _tx, int _ty, int w, int h);
     virtual void paintDecorations(RenderObject::PaintInfo& i, int _tx, int _ty, bool paintedChildren = false);
     virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
-    virtual bool nodeAtPoint(HitTestResult&, int, int, int, int);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int);
 
     int marginBorderPaddingLeft();
     int marginBorderPaddingRight();
index 55a99363528d1f06dd54bc7794c1952874727dc7..1b67b49fbc216537c504f50565eb453f665a077b 100644 (file)
@@ -220,7 +220,7 @@ bool InlineTextBox::isLineBreak() const
     return object()->isBR() || (object()->style()->preserveNewline() && len() == 1 && (*textObject()->string())[start()] == '\n');
 }
 
-bool InlineTextBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
+bool InlineTextBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty)
 {
     if (isLineBreak())
         return false;
index 2847a88a9e8afe6a3746610f58e6a9dfc6f939b7..238dd403ecd5e4573d64cb4004b16d04b3e7bd33 100644 (file)
@@ -72,7 +72,7 @@ public:
     void selectionStartEnd(int& sPos, int& ePos);
     
     virtual void paint(RenderObject::PaintInfo& i, int tx, int ty);
-    virtual bool nodeAtPoint(HitTestResult&, int, int, int, int);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int);
 
     RenderText* textObject() const;
 
index 65ef840ebd900bd1ab9ddc542f6101123fea4933..5ca1688f21f72a8319d6d32fc7db040b06ea50e5 100644 (file)
@@ -2529,7 +2529,7 @@ bool RenderBlock::isPointInScrollbar(HitTestResult& result, int _x, int _y, int
     return false;    
 }
 
-bool RenderBlock::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
+bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
 {
     bool inlineFlow = isInlineFlow();
 
@@ -2567,7 +2567,7 @@ bool RenderBlock::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, in
         m_layer->subtractScrollOffset(scrolledX, scrolledY);
     if (childrenInline() && !isTable()) {
         // We have to hit-test our line boxes.
-        if (hitTestLines(result, _x, _y, scrolledX, scrolledY, hitTestAction)) {
+        if (hitTestLines(request, result, _x, _y, scrolledX, scrolledY, hitTestAction)) {
             setInnerNode(result);
             return true;
         }
@@ -2580,7 +2580,7 @@ bool RenderBlock::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, in
         for (RenderObject* child = lastChild(); child; child = child->previousSibling())
             // FIXME: We have to skip over inline flows, since they can show up inside RenderTables at the moment (a demoted inline <form> for example).  If we ever implement a
             // table-specific hit-test method (which we should do for performance reasons anyway), then we can remove this check.
-            if (!child->layer() && !child->isFloating() && !child->isInlineFlow() && child->nodeAtPoint(result, _x, _y, scrolledX, scrolledY, childHitTest)) {
+            if (!child->layer() && !child->isFloating() && !child->isInlineFlow() && child->nodeAtPoint(request, result, _x, _y, scrolledX, scrolledY, childHitTest)) {
                 setInnerNode(result);
                 return true;
             }
@@ -2596,7 +2596,7 @@ bool RenderBlock::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, in
         FloatingObject* o;
         DeprecatedPtrListIterator<FloatingObject> it(*m_floatingObjects);
         for (it.toLast(); (o = it.current()); --it)
-            if (!o->noPaint && !o->node->layer() && o->node->hitTest(result, _x, _y,
+            if (!o->noPaint && !o->node->layer() && o->node->hitTest(request, result, _x, _y,
                                      scrolledX + o->left + o->node->marginLeft() - o->node->xPos(),
                                      scrolledY + o->startY + o->node->marginTop() - o->node->yPos())) {
                 setInnerNode(result);
index 18ae57a780418fb724a3f53888bdcb8c443ce3b2..9d17006eace704bf6974e4094001b94ab60dd491 100644 (file)
@@ -187,7 +187,7 @@ public:
     int leftRelOffset(int y, int fixedOffset, bool applyTextIndent = true, int* heightRemaining = 0) const;
     int leftOffset(int y) const { return leftRelOffset(y, leftOffset(), true); }
 
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
     virtual bool isPointInScrollbar(HitTestResult&, int x, int y, int tx, int ty);
 
index b87494e0098cdbdf2c5216bf1ba7f31edc8f5d9b..bfffce7f6370ac860201b47ad3ae8fa31bfaf844 100644 (file)
@@ -254,7 +254,7 @@ int RenderBox::calcContentBoxHeight(int h) const
 }
 
 // Hit Testing
-bool RenderBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
+bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
 {
     tx += m_x;
     ty += m_y;
@@ -265,7 +265,7 @@ bool RenderBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty,
         // at the moment (a demoted inline <form> for example). If we ever implement a
         // table-specific hit-test method (which we should do for performance reasons anyway),
         // then we can remove this check.
-        if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(result, x, y, tx, ty, action)) {
+        if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(request, result, x, y, tx, ty, action)) {
             setInnerNode(result);
             return true;
         }
index 733af8b2e534db4eabe4e8171c862fb5e0f3fda0..acafb541b8227d808ee7ab69050d08790c23b229 100644 (file)
@@ -42,7 +42,7 @@ public:
 
     virtual void setStyle(RenderStyle*);
     virtual void paint(PaintInfo&, int _tx, int _ty);
-    virtual bool nodeAtPoint(HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction);
 
     virtual void destroy();
     
index b4e55fd07bb681ceaf264feab866881e650af6d8..0deaed354f048849b738e29aa65236f4eac71b06 100644 (file)
@@ -415,7 +415,7 @@ void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
     }
 }
 
-bool RenderFlow::hitTestLines(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
+bool RenderFlow::hitTestLines(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
 {
     if (hitTestAction != HitTestForeground)
         return false;
@@ -440,7 +440,7 @@ bool RenderFlow::hitTestLines(HitTestResult& result, int x, int y, int tx, int t
     // based off positions of our first line box or our last line box.
     for (InlineFlowBox* curr = lastLineBox(); curr; curr = curr->prevFlowBox()) {
         if (y >= ty + curr->root()->topOverflow() && y < ty + curr->root()->bottomOverflow()) {
-            bool inside = curr->nodeAtPoint(result, x, y, tx, ty);
+            bool inside = curr->nodeAtPoint(request, result, x, y, tx, ty);
             if (inside) {
                 setInnerNode(result);
                 return true;
index 914638aa92a9adc90756181b8794256e75be6a68..3a098c31ed0e05e655ea38d8c43dee79528671de 100644 (file)
@@ -76,7 +76,7 @@ public:
     virtual void dirtyLineBoxes(bool fullLayout, bool isRootLineBox = false);
 
     void paintLines(PaintInfo&, int tx, int ty);
-    bool hitTestLines(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    bool hitTestLines(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
     virtual IntRect getAbsoluteRepaintRect();
 
index 3605277c8fb98ed1e835911291ae37fec6b0b9ba..301c265ab2b2e40097c7a17f91bd97fd9f4b685a 100644 (file)
@@ -120,13 +120,13 @@ void RenderForeignObject::layout()
     setNeedsLayout(false);
 }
 
-bool RenderForeignObject::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
+bool RenderForeignObject::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
 {
     AffineTransform totalTransform = absoluteTransform();
     totalTransform *= translationForAttributes();
     double localX, localY;
     totalTransform.invert().map(x, y, &localX, &localY);
-    return RenderBlock::nodeAtPoint(result, static_cast<int>(localX), static_cast<int>(localY), tx, ty, hitTestAction);
+    return RenderBlock::nodeAtPoint(request, result, static_cast<int>(localX), static_cast<int>(localY), tx, ty, hitTestAction);
 }
 
 } // namespace WebCore
index c570efa91aaa9525a97c2e7235b7a308a4b9a7fd..dab662433834973f593ad5a17c0947fe0275e017 100644 (file)
@@ -46,7 +46,7 @@ public:
     virtual bool requiresLayer();
     virtual void layout();
 
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
  private:
     AffineTransform translationForAttributes();
index fa8d291088e756e4096845b3aa2d4e416d69fc95..6d55ba6a5a5118f45cc46908e12313d87febce87 100644 (file)
@@ -32,6 +32,7 @@
 #include "GraphicsContext.h"
 #include "HTMLFrameSetElement.h"
 #include "HTMLNames.h"
+#include "HitTestRequest.h"
 #include "HitTestResult.h"
 #include "MouseEvent.h"
 #include "RenderFrame.h"
@@ -76,15 +77,15 @@ RenderFrameSet::~RenderFrameSet()
       delete [] m_vSplitVar;
 }
 
-bool RenderFrameSet::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty,
-                                 HitTestAction hitTestAction)
+bool RenderFrameSet::nodeAtPoint(const HitTestRequest& request, HitTestResult& result,
+                                int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
 {
     if (hitTestAction != HitTestForeground)
         return false;
 
-    bool inside = RenderContainer::nodeAtPoint(result, _x, _y, _tx, _ty, hitTestAction) || 
+    bool inside = RenderContainer::nodeAtPoint(request, result, _x, _y, _tx, _ty, hitTestAction) || 
                   m_resizing || canResize(_x, _y);
-    if (inside && element() && !element()->noResize() && !result.readonly() && !result.innerNode()) {
+    if (inside && element() && !element()->noResize() && !request.readonly && !result.innerNode()) {
         result.setInnerNode(element());
         result.setInnerNonSharedNode(element());
     }
index 048db9e33e12dbd14b4f3e1f4c6d8f330d2d569f..c44abf16b7a302128df00b77013eb0e656ce3932 100644 (file)
@@ -52,7 +52,7 @@ public:
     bool canResize(int x, int y);
     void setResizing(bool);
 
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
     HTMLFrameSetElement* element() const { return static_cast<HTMLFrameSetElement*>(RenderContainer::element()); }
 
index 0edaf5f52a992e5106fb3641100a505cb458190a..97753f2b5dc4ea89ccea686bad172ecbd45fe3c2 100644 (file)
@@ -311,9 +311,9 @@ HTMLMapElement* RenderImage::imageMap()
     return i ? i->document()->getImageMap(i->imageMap()) : 0;
 }
 
-bool RenderImage::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
+bool RenderImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
 {
-    bool inside = RenderReplaced::nodeAtPoint(result, _x, _y, _tx, _ty, hitTestAction);
+    bool inside = RenderReplaced::nodeAtPoint(request, result, _x, _y, _tx, _ty, hitTestAction);
 
     if (inside && element()) {
         int tx = _tx + m_x;
index 66a967681624ed29e1fac6192a493742346a6610..492eb67a06194574da6a2dc6cde7c7feb0caa5fc 100644 (file)
@@ -66,7 +66,7 @@ public:
 
     Image* image() { return m_cachedImage ? m_cachedImage->image() : nullImage(); }
 
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
     virtual int calcReplacedWidth() const;
     virtual int calcReplacedHeight() const;
index 119f857a009a76f613ebfd33270c3c56bfe57895..b9918dcc1a2c0056b59789ed3c0ff35b1cffbe3f 100644 (file)
@@ -334,9 +334,10 @@ const char* RenderInline::renderName() const
     return "RenderInline";
 }
 
-bool RenderInline::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
+bool RenderInline::nodeAtPoint(const HitTestRequest& request, HitTestResult& result,
+                                int x, int y, int tx, int ty, HitTestAction hitTestAction)
 {
-    return hitTestLines(result, x, y, tx, ty, hitTestAction);
+    return hitTestLines(request, result, x, y, tx, ty, hitTestAction);
 }
 
 VisiblePosition RenderInline::positionForCoordinates(int x, int y)
index d844d868204ab600197f020aeaba844600a16553..f3ef6e1f2f2a4b987c5c4c75c31ddf9e27657459 100644 (file)
@@ -56,7 +56,7 @@ public:
 
     virtual void paint(PaintInfo&, int tx, int ty);
 
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
     virtual void calcMinMaxWidth();
 
index 23fb3b298590c19c35f96733288de8aeee7a0afe..fd7731c74fb0e2edef5cdb9d1a3204012783f616 100644 (file)
@@ -53,6 +53,7 @@
 #include "GraphicsContext.h"
 #include "HTMLMarqueeElement.h"
 #include "HTMLNames.h"
+#include "HitTestRequest.h"
 #include "HitTestResult.h"
 #include "OverflowEvent.h"
 #include "PlatformMouseEvent.h"
@@ -865,8 +866,9 @@ void RenderLayer::autoscroll()
     IntPoint currentPos = currentFrame->view()->windowToContents(currentFrame->view()->currentMousePosition());
     
     if (currentFrame->mouseDownMayStartSelect()) {
-        HitTestResult result(currentPos, true, false, true);
-        if (hitTest(result)) {
+        HitTestRequest request(true, false, true);
+        HitTestResult result(currentPos);
+        if (hitTest(request, result)) {
             VisiblePosition pos(result.innerNode()->renderer()->positionForPoint(currentPos));
             currentFrame->updateSelectionForMouseDragOverPosition(pos);
         }
@@ -1471,14 +1473,14 @@ static inline IntRect frameVisibleRect(RenderObject* renderer)
     return enclosingIntRect(renderer->document()->frame()->view()->visibleContentRect());
 }
 
-bool RenderLayer::hitTest(HitTestResult& result)
+bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result)
 {
     renderer()->document()->updateLayout();
     
     IntRect boundsRect(m_x, m_y, width(), height());
     boundsRect.intersect(frameVisibleRect(renderer()));
 
-    RenderLayer* insideLayer = hitTestLayer(this, result, boundsRect);
+    RenderLayer* insideLayer = hitTestLayer(this, request, result, boundsRect);
 
     // Now determine if the result is inside an anchor; make sure an image map wins if
     // it already set URLElement and only use the innermost.
@@ -1490,14 +1492,15 @@ bool RenderLayer::hitTest(HitTestResult& result)
     }
 
     // Next set up the correct :hover/:active state along the new chain.
-    updateHoverActiveState(result);
+    updateHoverActiveState(request, result);
     
     // Now return whether we were inside this layer (this will always be true for the root
     // layer).
     return insideLayer;
 }
 
-RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& result, const IntRect& hitTestRect)
+RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, const HitTestRequest& request,
+    HitTestResult& result, const IntRect& hitTestRect)
 {
     // Calculate the clip rects we should use.
     IntRect layerBounds;
@@ -1518,7 +1521,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& re
     // z-index.
     if (m_posZOrderList) {
         for (int i = m_posZOrderList->size() - 1; i >= 0; --i) {
-            insideLayer = m_posZOrderList->at(i)->hitTestLayer(rootLayer, result, hitTestRect);
+            insideLayer = m_posZOrderList->at(i)->hitTestLayer(rootLayer, request, result, hitTestRect);
             if (insideLayer)
                 return insideLayer;
         }
@@ -1527,7 +1530,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& re
     // Now check our overflow objects.
     if (m_overflowList) {
         for (int i = m_overflowList->size() - 1; i >= 0; --i) {
-            insideLayer = m_overflowList->at(i)->hitTestLayer(rootLayer, result, hitTestRect);
+            insideLayer = m_overflowList->at(i)->hitTestLayer(rootLayer, request, result, hitTestRect);
             if (insideLayer)
                 return insideLayer;
         }
@@ -1535,9 +1538,10 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& re
 
     // Next we want to see if the mouse pos is inside the child RenderObjects of the layer.
     if (fgRect.contains(result.point()) && 
-        renderer()->hitTest(result, result.point().x(), result.point().y(),
+        renderer()->hitTest(request, result, result.point().x(), result.point().y(),
                             layerBounds.x() - renderer()->xPos(),
-                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra(), HitTestDescendants)) {
+                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra(), 
+                            HitTestDescendants)) {
         // for positioned generated content, we might still not have a
         // node by the time we get to the layer level, since none of
         // the content in the layer has an element. So just walk up
@@ -1565,7 +1569,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& re
     // Now check our negative z-index children.
     if (m_negZOrderList) {
         for (int i = m_negZOrderList->size() - 1; i >= 0; --i) {
-            insideLayer = m_negZOrderList->at(i)->hitTestLayer(rootLayer, result, hitTestRect);
+            insideLayer = m_negZOrderList->at(i)->hitTestLayer(rootLayer, request, result, hitTestRect);
             if (insideLayer)
                 return insideLayer;
         }
@@ -1576,7 +1580,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& re
     // contain the point so mouse move events keep getting delivered when dragging outside the
     // window.
     if (bgRect.contains(result.point()) &&
-        renderer()->hitTest(result, result.point().x(), result.point().y(),
+        renderer()->hitTest(request, result, result.point().x(), result.point().y(),
                             layerBounds.x() - renderer()->xPos(),
                             layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra(),
                             HitTestSelf))
@@ -1584,7 +1588,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& re
 
     // We didn't hit any layer.  However if the mouse is down, we must always at least be inside
     // the render view.
-    if (result.active() && renderer()->isRenderView()) {
+    if (request.active && renderer()->isRenderView()) {
         renderer()->setInnerNode(result);
         return this;
     }
@@ -1829,17 +1833,17 @@ static RenderObject* commonAncestor(RenderObject* obj1, RenderObject* obj2)
     return 0;
 }
 
-void RenderLayer::updateHoverActiveState(HitTestResult& result)
+void RenderLayer::updateHoverActiveState(const HitTestRequest& request, HitTestResult& result)
 {
     // We don't update :hover/:active state when the result is marked as readonly.
-    if (result.readonly())
+    if (request.readonly)
         return;
 
     Document* doc = renderer()->document();
     if (!doc) return;
 
     Node* activeNode = doc->activeNode();
-    if (activeNode && !result.active()) {
+    if (activeNode && !request.active) {
         // We are clearing the :active chain because the mouse has been released.
         for (RenderObject* curr = activeNode->renderer(); curr; curr = curr->parent()) {
             if (curr->element() && !curr->isText())
@@ -1848,7 +1852,7 @@ void RenderLayer::updateHoverActiveState(HitTestResult& result)
         doc->setActiveNode(0);
     } else {
         Node* newActiveNode = result.innerNode();
-        if (!activeNode && newActiveNode && result.active()) {
+        if (!activeNode && newActiveNode && request.active) {
             // We are setting the :active chain and freezing it. If future moves happen, they
             // will need to reference this chain.
             for (RenderObject* curr = newActiveNode->renderer(); curr; curr = curr->parent()) {
@@ -1863,7 +1867,7 @@ void RenderLayer::updateHoverActiveState(HitTestResult& result)
     // If the mouse is down and if this is a mouse move event, we want to restrict changes in 
     // :hover/:active to only apply to elements that are in the :active chain that we froze
     // at the time the mouse went down.
-    bool mustBeInActiveChain = result.active() && result.mouseMove();
+    bool mustBeInActiveChain = request.active && request.mouseMove;
 
     // Check to see if the hovered node has changed.  If not, then we don't need to
     // do anything.  
@@ -1893,7 +1897,7 @@ void RenderLayer::updateHoverActiveState(HitTestResult& result)
     // Now set the hover state for our new object up to the root.
     for (RenderObject* curr = newHoverObj; curr; curr = curr->hoverAncestor()) {
         if (curr->element() && !curr->isText() && (!mustBeInActiveChain || curr->element()->inActiveChain())) {
-            curr->element()->setActive(result.active());
+            curr->element()->setActive(request.active);
             curr->element()->setHovered(true);
         }
     }
index 93e80d91a2e0a12136ad8d8eda8a525a98bbbd25..a69929d220846288e7e80672bb7437b6296aff03 100644 (file)
@@ -51,6 +51,7 @@
 namespace WebCore {
 
 class CachedResource;
+class HitTestRequest;
 class HitTestResult;
 class PlatformScrollbar;
 class RenderFrameSet;
@@ -317,7 +318,7 @@ public:
     // front.  The hitTest method looks for mouse events by walking
     // layers that intersect the point from front to back.
     void paint(GraphicsContext*, const IntRect& damageRect, PaintRestriction = PaintRestrictionNone, RenderObject* paintingRoot = 0);
-    bool hitTest(HitTestResult&);
+    bool hitTest(const HitTestRequest&, HitTestResult&);
 
     // This method figures out our layerBounds in coordinates relative to
     // |rootLayer}.  It also computes our background and foreground clip rects
@@ -334,7 +335,7 @@ public:
     // Returns a bounding box for this layer only.
     IntRect absoluteBoundingBox() const;
 
-    void updateHoverActiveState(HitTestResult&);
+    void updateHoverActiveState(const HitTestRequest&, HitTestResult&);
 
     IntRect repaintRect() const { return m_repaintRect; }
 
@@ -362,7 +363,7 @@ private:
 
     void paintLayer(RenderLayer* rootLayer, GraphicsContext*, const IntRect& paintDirtyRect,
                     bool haveTransparency, PaintRestriction, RenderObject* paintingRoot);
-    RenderLayer* hitTestLayer(RenderLayer* rootLayer, HitTestResult&, const IntRect& hitTestRect);
+    RenderLayer* hitTestLayer(RenderLayer* rootLayer, const HitTestRequest&, HitTestResult&, const IntRect& hitTestRect);
     void computeScrollDimensions(bool* needHBar = 0, bool* needVBar = 0);
 
     bool shouldBeOverflowOnly() const;
index 7704d3cad445bb39239ea8435bf3b71965ee29b8..defa01e653c1522e2e1998c6241b57a73211c535 100644 (file)
@@ -42,6 +42,7 @@
 #include "HTMLNames.h"
 #include "HTMLOListElement.h"
 #include "KURL.h"
+#include "HitTestRequest.h"
 #include "HitTestResult.h"
 #include "Position.h"
 #include "RenderArena.h"
@@ -2534,25 +2535,25 @@ void RenderObject::updateDragState(bool dragOn)
         continuation()->updateDragState(dragOn);
 }
 
-bool RenderObject::hitTest(HitTestResult& result, int x, int y, int tx, int ty, HitTestFilter hitTestFilter)
+bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestFilter hitTestFilter)
 {
     bool inside = false;
     if (hitTestFilter != HitTestSelf) {
         // First test the foreground layer (lines and inlines).
-        inside = nodeAtPoint(result, x, y, tx, ty, HitTestForeground);
+        inside = nodeAtPoint(request, result, x, y, tx, ty, HitTestForeground);
         
         // Test floats next.
         if (!inside)
-            inside = nodeAtPoint(result, x, y, tx, ty, HitTestFloat);
+            inside = nodeAtPoint(request, result, x, y, tx, ty, HitTestFloat);
 
         // Finally test to see if the mouse is in the background (within a child block's background).
         if (!inside)
-            inside = nodeAtPoint(result, x, y, tx, ty, HitTestChildBlockBackgrounds);
+            inside = nodeAtPoint(request, result, x, y, tx, ty, HitTestChildBlockBackgrounds);
     }
     
     // See if the mouse is inside us but not any of our descendants
     if (hitTestFilter != HitTestDescendants && !inside)
-        inside = nodeAtPoint(result, x, y, tx, ty, HitTestBlockBackground);
+        inside = nodeAtPoint(request, result, x, y, tx, ty, HitTestBlockBackground);
         
     return inside;
 }
@@ -2578,8 +2579,8 @@ void RenderObject::setInnerNode(HitTestResult& result)
     }
 }
 
-bool RenderObject::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty,
-                               HitTestAction hitTestAction)
+bool RenderObject::nodeAtPoint(const HitTestRequest& request, HitTestResult& result,
+                                int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
 {
     return false;
 }
index 64c26d9c6ba49936eac6f2aea143113460d5f318..c88c046640ee06bf3bd8c51dd081a93114943f7e 100644 (file)
@@ -57,6 +57,7 @@ class FrameView;
 class HTMLAreaElement;
 class InlineBox;
 class InlineFlowBox;
+class HitTestRequest;
 class HitTestResult;
 class PlatformScrollbar;
 class Position;
@@ -500,8 +501,8 @@ public:
         RepaintInfo(RenderObject* o, const IntRect& r) :m_object(o), m_repaintRect(r) {}
     };
     
-    bool hitTest(HitTestResult&, int x, int y, int tx, int ty, HitTestFilter hitTestFilter = HitTestAll);
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    bool hitTest(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestFilter hitTestFilter = HitTestAll);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     void setInnerNode(HitTestResult&);
 
     virtual VisiblePosition positionForCoordinates(int x, int y);
index 0990ee728027b31bf93201119ebacbaee4a8ff5b..c299656a8379b3f1f725edf31262c9379df797cc 100644 (file)
@@ -283,7 +283,7 @@ RenderPath::PointerEventsHitRules RenderPath::pointerEventsHitRules()
     return hitRules;
 }
 
-bool RenderPath::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
+bool RenderPath::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
 {
     // We only draw in the forground phase, so we only hit-test then.
     if (hitTestAction != HitTestForeground)
index a487fc625822d7ef8bccc44d7be997e2ec35e4c9..60d1b49f7f60ff4337d113171ef12a54a8cda6c4 100644 (file)
@@ -71,7 +71,7 @@ public:
  
     virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
 
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     
     // FIXME: When the other SVG classes get pointer-events support this should be moved elsewhere
     struct PointerEventsHitRules {
index 25f058add84f7d6dac3f66b434cd2f4b0f9db6d4..786a2476a6778307c516f88aed614817e2185f63 100644 (file)
@@ -205,13 +205,13 @@ void RenderSVGImage::computeAbsoluteRepaintRect(IntRect& r, bool f)
     RenderImage::computeAbsoluteRepaintRect(r, f);
 }
 
-bool RenderSVGImage::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
+bool RenderSVGImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
 {
     AffineTransform totalTransform = absoluteTransform();
     totalTransform *= translationForAttributes();
     double localX, localY;
     totalTransform.invert().map(_x + _tx, _y + _ty, &localX, &localY);
-    return RenderImage::nodeAtPoint(result, (int)localX, (int)localY, 0, 0, hitTestAction);
+    return RenderImage::nodeAtPoint(request, result, (int)localX, (int)localY, 0, 0, hitTestAction);
 }
 
 bool RenderSVGImage::requiresLayer()
index dacb37663830dc66a89a1ca91cdad4df03e1c7dc..b4f31a5cc17f7f528b0ee32488c8b78d3884b9d2 100644 (file)
@@ -54,7 +54,7 @@ namespace WebCore {
 
         virtual void computeAbsoluteRepaintRect(IntRect&, bool f);
 
-        virtual bool nodeAtPoint(HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction);
+        virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction);
 
     private:
         void translateForAttributes();
index 15bdd98f95315277688e55a9e2d60b28469e730d..64722e8959644d04d04cc07bc4869c4c06717fb8 100644 (file)
@@ -95,12 +95,12 @@ InlineBox* RenderSVGText::createInlineBox(bool makePlaceHolderBox, bool isRootLi
     return flowBox;
 }
 
-bool RenderSVGText::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
+bool RenderSVGText::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
 {
     AffineTransform totalTransform = absoluteTransform();
     double localX, localY;
     totalTransform.invert().map(_x, _y, &localX, &localY);
-    return RenderBlock::nodeAtPoint(result, (int)localX, (int)localY, _tx, _ty, hitTestAction);
+    return RenderBlock::nodeAtPoint(request, result, (int)localX, (int)localY, _tx, _ty, hitTestAction);
 }
 
 void RenderSVGText::absoluteRects(Vector<IntRect>& rects, int tx, int ty)
index 4e19fe5c1e5e1152e3775e40e0ef85cc8b7d832a..65c83d3680e5f6deb263ad38d8f693d16f2e07dc 100644 (file)
@@ -41,7 +41,7 @@ public:
     virtual AffineTransform localTransform() const { return m_transform; }
     virtual void setLocalTransform(const AffineTransform& transform) { m_transform = transform; }
     virtual void paint(PaintInfo& i, int _tx, int _ty);
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
     virtual void computeAbsoluteRepaintRect(IntRect& r, bool f);
     virtual bool requiresLayer();
index 2c57077f38f3dd8e7ca04b61f6521cf7ee262952..e669d0aecac0ee66e868ca3b9dd77c7308a514ec 100644 (file)
@@ -138,7 +138,7 @@ IntRect RenderTableRow::getAbsoluteRepaintRect()
 }
 
 // Hit Testing
-bool RenderTableRow::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
+bool RenderTableRow::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
 {
     // Table rows cannot ever be hit tested.  Effectively they do not exist.
     // Just forward to our children always.
@@ -147,7 +147,7 @@ bool RenderTableRow::nodeAtPoint(HitTestResult& result, int x, int y, int tx, in
         // at the moment (a demoted inline <form> for example). If we ever implement a
         // table-specific hit-test method (which we should do for performance reasons anyway),
         // then we can remove this check.
-        if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(result, x, y, tx, ty, action)) {
+        if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(request, result, x, y, tx, ty, action)) {
             setInnerNode(result);
             return true;
         }
index 6589b28db11d67d8937560521f3316047a93a7be..a946a3a7255c23bde5efbbe3e10622ed4bd76315 100644 (file)
@@ -45,7 +45,7 @@ public:
     virtual void position(InlineBox*) { }
     virtual void layout();
     virtual IntRect getAbsoluteRepaintRect();
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
     // The only time rows get a layer is when they have transparency.
     virtual bool requiresLayer() { return isTransparent() || hasOverflowClip(); }
index d7d470cdbe90abbf85fcee3fc449f21d1851e2cb..8a6fb442e44574923d89121d8b8733b45b1c0807 100644 (file)
@@ -986,7 +986,7 @@ RenderObject* RenderTableSection::removeChildNode(RenderObject* child)
 }
 
 // Hit Testing
-bool RenderTableSection::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
+bool RenderTableSection::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
 {
     // Table sections cannot ever be hit tested.  Effectively they do not exist.
     // Just forward to our children always.
@@ -998,7 +998,7 @@ bool RenderTableSection::nodeAtPoint(HitTestResult& result, int x, int y, int tx
         // at the moment (a demoted inline <form> for example). If we ever implement a
         // table-specific hit-test method (which we should do for performance reasons anyway),
         // then we can remove this check.
-        if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(result, x, y, tx, ty, action)) {
+        if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(request, result, x, y, tx, ty, action)) {
             setInnerNode(result);
             return true;
         }
index 5d1e4d5d7880b7898fd29a6d4903bd1a725bd928..e48adcadbef0b0ae19f5ddaf188668986973f8c9 100644 (file)
@@ -111,7 +111,7 @@ public:
 
     virtual RenderObject* removeChildNode(RenderObject* child);
 
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
     // this gets a cell grid data structure. changing the number of
     // columns is done by the table
index 01fe402fe9f815d0f431ea1faffa261c80a99a51..5a31694e3e50fc988a18cf919ab7c6b3fc3fe399 100644 (file)
@@ -70,7 +70,7 @@ public:
     virtual void paint(PaintInfo& i, int tx, int ty) { assert(false); }
     virtual void layout() { assert(false); }
 
-    virtual bool nodeAtPoint(HitTestResult&, int, int, int, int, HitTestAction) { assert(false); return false; }
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction) { assert(false); return false; }
 
     virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
     virtual void lineBoxRects(Vector<IntRect>&);
index 8bfc54a58ab8d2e9177f7925b24c53aa25785946..c7b4e4be7006c34017d237d9a0525e16871f00a4 100644 (file)
@@ -345,11 +345,11 @@ short RenderTextControl::baselinePosition(bool b, bool isRootLineBox) const
     return RenderFlexibleBox::baselinePosition(b, isRootLineBox);
 }
 
-bool RenderTextControl::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
+bool RenderTextControl::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
 {
     // If we're within the text control, we want to act as if we've hit the inner div, incase the point 
     // was on the control but not on the div (see Radar 4617841).
-    if (RenderFlexibleBox::nodeAtPoint(result, x, y, tx, ty, hitTestAction)) {
+    if (RenderFlexibleBox::nodeAtPoint(request, result, x, y, tx, ty, hitTestAction)) {
         result.setInnerNode(m_div.get());
         return true;
     }  
index 214240dca0262f1c446074b71175bb48b738ebfe..c0a0c528e488c19ea94fab7c159b928139c71bc2 100644 (file)
@@ -40,7 +40,7 @@ public:
     virtual void updateFromElement();
     virtual bool canHaveChildren() const { return false; }
     virtual short baselinePosition( bool, bool ) const;
-    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
                              
     RenderStyle* createDivStyle(RenderStyle* startStyle);
 
index 8bdf37b4de68a763b74375eac263cfddce10709b..32b520d39d88bb49b441858405db8fdf949912d9 100644 (file)
@@ -142,15 +142,15 @@ void RootInlineBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
 #endif
 }
 
-bool RootInlineBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
+bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty)
 {
     if (m_ellipsisBox && object()->style()->visibility() == VISIBLE) {
-        if (m_ellipsisBox->nodeAtPoint(result, x, y, tx, ty)) {
+        if (m_ellipsisBox->nodeAtPoint(request, result, x, y, tx, ty)) {
             object()->setInnerNode(result);
             return true;
         }
     }
-    return InlineFlowBox::nodeAtPoint(result, x, y, tx, ty);
+    return InlineFlowBox::nodeAtPoint(request, result, x, y, tx, ty);
 }
 
 void RootInlineBox::adjustPosition(int dx, int dy)
index 9001832b5dcfd67a542268c22b9a762130797cb7..b5b96683db3e95203bdd2ee0240edd4aaf08576e 100644 (file)
@@ -99,7 +99,7 @@ public:
 #endif
 
     virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
-    virtual bool nodeAtPoint(HitTestResult&, int, int, int, int);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int);
 
     bool hasSelectedChildren() const { return m_hasSelectedChildren; }
     void setHasSelectedChildren(bool b);
index cf7181f03d7db3ad7b8df84fa9bd60e5d66740b2..68cb0a0ff0736f5c0a1bc3973d9435f6920afe27 100644 (file)
@@ -1,3 +1,16 @@
+2006-10-31  Beth Dakin  <bdakin@apple.com>
+
+        Reviewed by Maciej.
+
+        Small tweaks to WebKit because of http://bugs.webkit.org/
+        show_bug.cgi?id=11461 HitTestResult should be split into 
+        HitTestRequest and HitTestResult
+
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebView/WebHTMLView.m:
+        (-[WebHTMLView elementAtPoint:allowShadowContent:]): The 
+        HitTestResult initializer now just takes a point.
+
 2006-10-31  Darin Adler  <darin@apple.com>
 
         Reviewed by Brady.
index 89019b386e996050bafb8a273277fbe23ed70099..b0022b686c15413f8a92059f44e9bdb60bd539d6 100644 (file)
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
-                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                        mainGroup = 0867D691FE84028FC02AAC07 /* WebKit */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
-                       projectRoot = "";
-                       shouldCheckCompatibility = 1;
                        targets = (
                                9398100A0824BF01008DF038 /* WebKit */,
                        );
index 92fc95c233b6b1d3fb804c119b24a5569f550b96..151b66cf5f2556b2eee295c8536ca5582eda033f 100644 (file)
@@ -6089,7 +6089,7 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 - (NSDictionary *)elementAtPoint:(NSPoint)point allowShadowContent:(BOOL)allow;
 {
     Frame* frame = core([self _frame]);
-    HitTestResult result(IntPoint(point), true, false);
+    HitTestResult result = HitTestResult(IntPoint(point));
     if (frame->renderer())
         result = frame->hitTestResultAtPoint(IntPoint(point), allow);
     return [[[WebElementDictionary alloc] initWithHitTestResult:result] autorelease];