Changeset 17399 in webkit


Ignore:
Timestamp:
Oct 28, 2006 11:28:00 AM (18 years ago)
Author:
bdakin
Message:

WebCore:

Reviewed by Darin.

This is the WebCore half of pushing elementAtPoint and the backend
of WebElementDictionary into WebCore. Most of the changes below are
to accommodate one of the following:


-NodeInfo is now a stand-alone class called HitTestResult.

Previously it was defined in RenderObject.h, but not for
any particular reason. The WebElementDictionary
functionality that was pushed into WebCore has been pushed
specifically into the this class. In fact,
WebElementDictionary now keeps a HitTestResult as a member
varibale.


-The enumeration AccessPolicy is now called

ClipboardAccessPolicy and is defined in its own header. It
was previously defined in ClipboardMac.h, but is now
defined independently to avoid including ClipboardMac.h
from within FrameMac.h since FrameMac.h is now included in
WebElementDictionary.m in WebKit.


-Element now has a virtual target() for the sake of

NodeInfo::targetFrame()

  • WebCore.exp: Several WebCore functions are newly called from WebKit, so they have been added here.
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/objc/DOM.mm: Must include Image.h because of adjustments to ClipboardMac.
  • bridge/mac/FrameMac.h: Adjust to HitTestResult changes.
  • bridge/mac/FrameMac.mm: (WebCore::FrameMac::freeClipboard): Adjust to ClipboardAccessPolicy and HitTestResult changes. (WebCore::FrameMac::eventMayStartDrag): Same. (WebCore::FrameMac::handleMouseMoveEvent): Same. (WebCore::FrameMac::dispatchCPPEvent): Same. (WebCore::FrameMac::mayDHTMLCut): Same. (WebCore::FrameMac::mayDHTMLCopy): Same. (WebCore::FrameMac::mayDHTMLPaste): Same. (WebCore::FrameMac::tryDHTMLCut): Same (WebCore::FrameMac::tryDHTMLCopy): Same. (WebCore::FrameMac::tryDHTMLPaste): Same.
  • bridge/mac/WebCoreAXObject.mm: (-[WebCoreAXObject doAXTextMarkerForPosition:]): Adjust to HitTestResult changes. (-[WebCoreAXObject accessibilityHitTest:]): Same.
  • bridge/mac/WebCoreFrameBridge.h: Same.
  • bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge dragOperationForDraggingInfo:]): Adjust for ClipboardAccessPolicy changes. (-[WebCoreFrameBridge dragExitedWithDraggingInfo:]): Same. (-[WebCoreFrameBridge concludeDragForDraggingInfo:]): Same.
  • dom/Document.cpp: (WebCore::Document::elementFromPoint): Adjust for HitTestResult changes. (WebCore::Document::prepareMouseEvent): Same.
  • dom/Element.h: (WebCore::Element::target): Now has a virtual target()
  • html/HTMLAnchorElement.h: Same.
  • html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::mapMouseEvent): Adjust for HitTestResult changes.
  • html/HTMLAreaElement.h: Virtual target()
  • html/HTMLBaseElement.h: (WebCore::HTMLBaseElement::target): Same.
  • html/HTMLFormElement.h: Same.
  • html/HTMLLinkElement.h: Same.
  • html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::mapMouseEvent): Adjust for HitTestResult changes.
  • html/HTMLMapElement.h: Same.
  • page/Frame.cpp: (WebCore::Frame::isPointInsideSelection): Same. (WebCore::Frame::hitTestResultAtPoint): Same.
  • page/Frame.h: Same.
  • page/FrameView.cpp: (WebCore::FrameView::handleWheelEvent): Same.
  • platform/mac/ClipboardAccessPolicy.h: Added. (WebCore::):
  • platform/mac/ClipboardMac.h: Remove definition of AccessPolicy, include ClipboardAccessPolicy.h, and rename AccessPolicy to ClipboardAccessPolicy.
  • platform/mac/ClipboardMac.mm: Rename ClipboardAccessPolicy. (WebCore::ClipboardMac::ClipboardMac): (WebCore::ClipboardMac::setAccessPolicy): (WebCore::ClipboardMac::clearData): (WebCore::ClipboardMac::clearAllData): (WebCore::ClipboardMac::getData): (WebCore::ClipboardMac::setData): (WebCore::ClipboardMac::types): (WebCore::ClipboardMac::setDragImage): (WebCore::ClipboardMac::setDropEffect): (WebCore::ClipboardMac::setEffectAllowed):
  • rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): Adjust for HitTestResult changes.
  • rendering/EllipsisBox.h:
  • rendering/HitTestResult.cpp: Added. (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::~HitTestResult): (WebCore::HitTestResult::operator=): (WebCore::HitTestResult::setInnerNode): (WebCore::HitTestResult::setInnerNonSharedNode): (WebCore::HitTestResult::setURLElement): (WebCore::HitTestResult::setScrollbar): (WebCore::HitTestResult::targetFrame): (WebCore::HitTestResult::boundingBox): (WebCore::HitTestResult::isSelected): (WebCore::HitTestResult::title):
  • rendering/HitTestResult.h: Added. (WebCore::HitTestResult::readonly): (WebCore::HitTestResult::active): (WebCore::HitTestResult::mouseMove): (WebCore::HitTestResult::innerNode): (WebCore::HitTestResult::innerNonSharedNode): (WebCore::HitTestResult::point): (WebCore::HitTestResult::URLElement): (WebCore::HitTestResult::scrollbar): (WebCore::HitTestResult::setPoint): (WebCore::HitTestResult::setReadonly): (WebCore::HitTestResult::setActive): (WebCore::HitTestResult::setMouseMove):
  • rendering/InlineBox.cpp: (WebCore::InlineBox::nodeAtPoint): Adjust to HitTestResult changes.
  • rendering/InlineBox.h: Same.
  • rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::nodeAtPoint): Same.
  • rendering/InlineFlowBox.h: Same.
  • rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint): Same.
  • rendering/InlineTextBox.h: Same.
  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::isPointInScrollbar): Same. (WebCore::RenderBlock::nodeAtPoint): Same.
  • rendering/RenderBlock.h: Same.
  • rendering/RenderBox.cpp: (WebCore::RenderBox::nodeAtPoint): Same.
  • rendering/RenderBox.h: Same.
  • rendering/RenderFlow.cpp: (WebCore::RenderFlow::hitTestLines): Same.
  • rendering/RenderFlow.h: Same.
  • rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::nodeAtPoint): Same.
  • rendering/RenderForeignObject.h: Same.
  • rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::nodeAtPoint): Same.
  • rendering/RenderFrameSet.h: Same.
  • rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): Same.
  • rendering/RenderImage.h: Same.
  • rendering/RenderInline.cpp: (WebCore::RenderInline::nodeAtPoint): Same.
  • rendering/RenderInline.h: Same.
  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::autoscroll): Same. (WebCore::RenderLayer::hitTest): Same. (WebCore::RenderLayer::hitTestLayer): Same. (WebCore::RenderLayer::updateHoverActiveState): Same.
  • rendering/RenderLayer.h: Same.
  • rendering/RenderListBox.cpp: (WebCore::RenderListBox::isPointInScrollbar): Same.
  • rendering/RenderListBox.h: Same.
  • rendering/RenderObject.cpp: (WebCore::RenderObject::hitTest): Same. (WebCore::RenderObject::setInnerNode): Same. (WebCore::RenderObject::nodeAtPoint): Same.
  • rendering/RenderObject.h: Remove NodeInfo class and forward declare HitTestResult.
  • rendering/RenderPath.cpp: (WebCore::RenderPath::nodeAtPoint): Adjust to HitTestResult changes.
  • rendering/RenderPath.h: Same.
  • rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::nodeAtPoint): Same.
  • rendering/RenderSVGImage.h: Same
  • rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::nodeAtPoint): Same.
  • rendering/RenderSVGText.h: Same.
  • rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::nodeAtPoint): Same.
  • rendering/RenderTableRow.h: Same.
  • rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): Same.
  • rendering/RenderTableSection.h: Same.
  • rendering/RenderText.h: Same. (WebCore::RenderText::nodeAtPoint): Same.
  • rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::nodeAtPoint): Same.
  • rendering/RenderTextControl.h: Same.
  • rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::nodeAtPoint): Same.
  • rendering/RootInlineBox.h: Same.

WebKit:

Reviewed by Darin.

This is the WebKit half of pushing the guts of elementAtPoint and
WebElementDictionary into WebCore. Among other things, this patch
makes WebElementDictionary.m and WebHTMLView.m Objective-C++

  • MigrateHeaders.make: Add DOMElementInternal.h to the list of headers to migrate.
  • Misc/WebElementDictionary.h: Replaced DOMNode, DOMElement, and NSPoint member variables with a HitTestResult member variable.
  • Misc/WebElementDictionary.m: (addLookupKey): Formatting. (-[WebElementDictionary initWithHitTestResult:]): Constructor just takes a HitTestResult now and sets the member variable. (-[WebElementDictionary dealloc]): delete HitTestResult. (-[WebElementDictionary finalize]): Address HitTestResult. (-[WebElementDictionary _domNode]): Use HitTestResult and call into WebCore. (-[WebElementDictionary objectForKey:]): Same. (-[WebElementDictionary _webFrame]): Same. (-[WebElementDictionary _targetWebFrame]): Same. (-[WebElementDictionary _title]): Same. (-[WebElementDictionary _imageRect]): Same. (-[WebElementDictionary _isSelected]): Same.
  • WebKit.xcodeproj/project.pbxproj:
  • WebView/WebFrame.mm: (core): Convert from DOMNode* to Node* (kit): Convert from Node* to DOMNode*
  • WebView/WebFrameInternal.h: Support for the above.
  • WebView/WebHTMLView.m: (-[WebHTMLView elementAtPoint:allowShadowContent:]): Call directly into Frame.cpp to get HitTestResult.
Location:
trunk
Files:
3 added
75 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r17398 r17399  
     12006-10-28  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        This is the WebCore half of pushing elementAtPoint and the backend
     6        of WebElementDictionary into WebCore. Most of the changes below are
     7        to accommodate one of the following:
     8               
     9        -NodeInfo is now a stand-alone class called HitTestResult.
     10                Previously it was defined in RenderObject.h, but not for
     11                any particular reason. The WebElementDictionary
     12                functionality that was pushed into WebCore has been pushed
     13                specifically into the this class. In fact,
     14                WebElementDictionary now keeps a HitTestResult as a member
     15                varibale.
     16               
     17        -The enumeration AccessPolicy is now called
     18                ClipboardAccessPolicy and is defined in its own header. It
     19                was previously defined in ClipboardMac.h, but is now
     20                defined independently to avoid including ClipboardMac.h
     21                from within FrameMac.h since FrameMac.h is now included in
     22                WebElementDictionary.m in WebKit.
     23               
     24        -Element now has a virtual target() for the sake of
     25                NodeInfo::targetFrame()
     26
     27        * WebCore.exp: Several WebCore functions are newly called from
     28        WebKit, so they have been added here.
     29        * WebCore.xcodeproj/project.pbxproj:
     30        * bindings/objc/DOM.mm: Must include Image.h because of adjustments
     31        to ClipboardMac.
     32        * bridge/mac/FrameMac.h: Adjust to HitTestResult changes.
     33        * bridge/mac/FrameMac.mm:
     34        (WebCore::FrameMac::freeClipboard): Adjust to ClipboardAccessPolicy
     35        and HitTestResult changes.
     36        (WebCore::FrameMac::eventMayStartDrag): Same.
     37        (WebCore::FrameMac::handleMouseMoveEvent): Same.
     38        (WebCore::FrameMac::dispatchCPPEvent): Same.
     39        (WebCore::FrameMac::mayDHTMLCut): Same.
     40        (WebCore::FrameMac::mayDHTMLCopy): Same.
     41        (WebCore::FrameMac::mayDHTMLPaste): Same.
     42        (WebCore::FrameMac::tryDHTMLCut): Same
     43        (WebCore::FrameMac::tryDHTMLCopy): Same.
     44        (WebCore::FrameMac::tryDHTMLPaste): Same.
     45        * bridge/mac/WebCoreAXObject.mm:
     46        (-[WebCoreAXObject doAXTextMarkerForPosition:]): Adjust to
     47        HitTestResult changes.
     48        (-[WebCoreAXObject accessibilityHitTest:]): Same.
     49        * bridge/mac/WebCoreFrameBridge.h: Same.
     50        * bridge/mac/WebCoreFrameBridge.mm:
     51        (-[WebCoreFrameBridge dragOperationForDraggingInfo:]): Adjust for
     52        ClipboardAccessPolicy changes.
     53        (-[WebCoreFrameBridge dragExitedWithDraggingInfo:]): Same.
     54        (-[WebCoreFrameBridge concludeDragForDraggingInfo:]): Same.
     55        * dom/Document.cpp:
     56        (WebCore::Document::elementFromPoint): Adjust for HitTestResult
     57        changes.
     58        (WebCore::Document::prepareMouseEvent): Same.
     59        * dom/Element.h:
     60        (WebCore::Element::target): Now has a virtual target()
     61        * html/HTMLAnchorElement.h: Same.
     62        * html/HTMLAreaElement.cpp:
     63        (WebCore::HTMLAreaElement::mapMouseEvent): Adjust for HitTestResult
     64        changes.
     65        * html/HTMLAreaElement.h: Virtual target()
     66        * html/HTMLBaseElement.h:
     67        (WebCore::HTMLBaseElement::target): Same.
     68        * html/HTMLFormElement.h: Same.
     69        * html/HTMLLinkElement.h: Same.
     70        * html/HTMLMapElement.cpp:
     71        (WebCore::HTMLMapElement::mapMouseEvent): Adjust for HitTestResult
     72        changes.
     73        * html/HTMLMapElement.h: Same.
     74        * page/Frame.cpp:
     75        (WebCore::Frame::isPointInsideSelection): Same.
     76        (WebCore::Frame::hitTestResultAtPoint): Same.
     77        * page/Frame.h: Same.
     78        * page/FrameView.cpp:
     79        (WebCore::FrameView::handleWheelEvent): Same.
     80        * platform/mac/ClipboardAccessPolicy.h: Added.
     81        (WebCore::):
     82        * platform/mac/ClipboardMac.h: Remove definition of AccessPolicy,
     83        include ClipboardAccessPolicy.h, and rename AccessPolicy to
     84        ClipboardAccessPolicy.
     85        * platform/mac/ClipboardMac.mm: Rename ClipboardAccessPolicy.
     86        (WebCore::ClipboardMac::ClipboardMac):
     87        (WebCore::ClipboardMac::setAccessPolicy):
     88        (WebCore::ClipboardMac::clearData):
     89        (WebCore::ClipboardMac::clearAllData):
     90        (WebCore::ClipboardMac::getData):
     91        (WebCore::ClipboardMac::setData):
     92        (WebCore::ClipboardMac::types):
     93        (WebCore::ClipboardMac::setDragImage):
     94        (WebCore::ClipboardMac::setDropEffect):
     95        (WebCore::ClipboardMac::setEffectAllowed):
     96        * rendering/EllipsisBox.cpp:
     97        (WebCore::EllipsisBox::nodeAtPoint): Adjust for HitTestResult
     98        changes.
     99        * rendering/EllipsisBox.h:
     100        * rendering/HitTestResult.cpp: Added.
     101        (WebCore::HitTestResult::HitTestResult):
     102        (WebCore::HitTestResult::~HitTestResult):
     103        (WebCore::HitTestResult::operator=):
     104        (WebCore::HitTestResult::setInnerNode):
     105        (WebCore::HitTestResult::setInnerNonSharedNode):
     106        (WebCore::HitTestResult::setURLElement):
     107        (WebCore::HitTestResult::setScrollbar):
     108        (WebCore::HitTestResult::targetFrame):
     109        (WebCore::HitTestResult::boundingBox):
     110        (WebCore::HitTestResult::isSelected):
     111        (WebCore::HitTestResult::title):
     112        * rendering/HitTestResult.h: Added.
     113        (WebCore::HitTestResult::readonly):
     114        (WebCore::HitTestResult::active):
     115        (WebCore::HitTestResult::mouseMove):
     116        (WebCore::HitTestResult::innerNode):
     117        (WebCore::HitTestResult::innerNonSharedNode):
     118        (WebCore::HitTestResult::point):
     119        (WebCore::HitTestResult::URLElement):
     120        (WebCore::HitTestResult::scrollbar):
     121        (WebCore::HitTestResult::setPoint):
     122        (WebCore::HitTestResult::setReadonly):
     123        (WebCore::HitTestResult::setActive):
     124        (WebCore::HitTestResult::setMouseMove):
     125        * rendering/InlineBox.cpp:
     126        (WebCore::InlineBox::nodeAtPoint): Adjust to HitTestResult changes.
     127        * rendering/InlineBox.h: Same.
     128        * rendering/InlineFlowBox.cpp:
     129        (WebCore::InlineFlowBox::nodeAtPoint): Same.
     130        * rendering/InlineFlowBox.h: Same.
     131        * rendering/InlineTextBox.cpp:
     132        (WebCore::InlineTextBox::nodeAtPoint): Same.
     133        * rendering/InlineTextBox.h: Same.
     134        * rendering/RenderBlock.cpp:
     135        (WebCore::RenderBlock::isPointInScrollbar): Same.
     136        (WebCore::RenderBlock::nodeAtPoint): Same.
     137        * rendering/RenderBlock.h: Same.
     138        * rendering/RenderBox.cpp:
     139        (WebCore::RenderBox::nodeAtPoint): Same.
     140        * rendering/RenderBox.h: Same.
     141        * rendering/RenderFlow.cpp:
     142        (WebCore::RenderFlow::hitTestLines): Same.
     143        * rendering/RenderFlow.h: Same.
     144        * rendering/RenderForeignObject.cpp:
     145        (WebCore::RenderForeignObject::nodeAtPoint): Same.
     146        * rendering/RenderForeignObject.h: Same.
     147        * rendering/RenderFrameSet.cpp:
     148        (WebCore::RenderFrameSet::nodeAtPoint): Same.
     149        * rendering/RenderFrameSet.h: Same.
     150        * rendering/RenderImage.cpp:
     151        (WebCore::RenderImage::nodeAtPoint): Same.
     152        * rendering/RenderImage.h: Same.
     153        * rendering/RenderInline.cpp:
     154        (WebCore::RenderInline::nodeAtPoint): Same.
     155        * rendering/RenderInline.h: Same.
     156        * rendering/RenderLayer.cpp:
     157        (WebCore::RenderLayer::autoscroll): Same.
     158        (WebCore::RenderLayer::hitTest): Same.
     159        (WebCore::RenderLayer::hitTestLayer): Same.
     160        (WebCore::RenderLayer::updateHoverActiveState): Same.
     161        * rendering/RenderLayer.h: Same.
     162        * rendering/RenderListBox.cpp:
     163        (WebCore::RenderListBox::isPointInScrollbar): Same.
     164        * rendering/RenderListBox.h: Same.
     165        * rendering/RenderObject.cpp:
     166        (WebCore::RenderObject::hitTest): Same.
     167        (WebCore::RenderObject::setInnerNode): Same.
     168        (WebCore::RenderObject::nodeAtPoint): Same.
     169        * rendering/RenderObject.h: Remove NodeInfo class and forward
     170        declare HitTestResult.
     171        * rendering/RenderPath.cpp:
     172        (WebCore::RenderPath::nodeAtPoint): Adjust to HitTestResult
     173        changes.
     174        * rendering/RenderPath.h: Same.
     175        * rendering/RenderSVGImage.cpp:
     176        (WebCore::RenderSVGImage::nodeAtPoint): Same.
     177        * rendering/RenderSVGImage.h: Same
     178        * rendering/RenderSVGText.cpp:
     179        (WebCore::RenderSVGText::nodeAtPoint): Same.
     180        * rendering/RenderSVGText.h: Same.
     181        * rendering/RenderTableRow.cpp:
     182        (WebCore::RenderTableRow::nodeAtPoint): Same.
     183        * rendering/RenderTableRow.h: Same.
     184        * rendering/RenderTableSection.cpp:
     185        (WebCore::RenderTableSection::nodeAtPoint): Same.
     186        * rendering/RenderTableSection.h: Same.
     187        * rendering/RenderText.h: Same.
     188        (WebCore::RenderText::nodeAtPoint): Same.
     189        * rendering/RenderTextControl.cpp:
     190        (WebCore::RenderTextControl::nodeAtPoint): Same.
     191        * rendering/RenderTextControl.h: Same.
     192        * rendering/RootInlineBox.cpp:
     193        (WebCore::RootInlineBox::nodeAtPoint): Same.
     194        * rendering/RootInlineBox.h: Same.
     195
    11962006-10-27  Maciej Stachowiak  <mjs@apple.com>
    2197
  • trunk/WebCore/WebCore.exp

    r17396 r17399  
    160160__ZN7WebCore11RenderLayer18gAlignCenterAlwaysE
    161161__ZN7WebCore12AtomicString3addEPNS_10StringImplE
     162__ZN7WebCore13HitTestResultC1ERKS0_
     163__ZN7WebCore13HitTestResultC1Ebbb
     164__ZN7WebCore13HitTestResultD1Ev
     165__ZN7WebCore13HitTestResultaSERKS0_
    162166__ZN7WebCore14DocumentLoader12setCommittedEb
    163167__ZN7WebCore14DocumentLoader13attachToFrameEv
     
    182186__ZN7WebCore5Frame14scrollToAnchorERKNS_4KURLE
    183187__ZN7WebCore5Frame17setWindowHasFocusEb
     188__ZN7WebCore5Frame20hitTestResultAtPointERKNS_8IntPointEb
    184189__ZN7WebCore5Frame20setSelectionFromNoneEv
    185190__ZN7WebCore5Frame21setProhibitsScrollingEb
     
    210215__ZN7WebCore8FrameMac8keyEventEP7NSEvent
    211216__ZN7WebCore8FrameMac9mouseDownEP7NSEvent
     217__ZN7WebCore8IntPointC1ERK8_NSPoint
    212218__ZN7WebCore9FrameTree11appendChildEN3WTF10PassRefPtrINS_5FrameEEE
    213219__ZN7WebCore9FrameTree7setNameERKNS_12AtomicStringE
     
    218224__ZNK7WebCore10StringImplcvP8NSStringEv
    219225__ZNK7WebCore10StringImplcvP8NSStringEv
     226__ZNK7WebCore10StringImplcvP8NSStringEv
    220227__ZNK7WebCore11FrameLoader14documentLoaderEv
    221228__ZNK7WebCore11FrameLoader15defersCallbacksEv
     
    223230__ZNK7WebCore11FrameLoader20activeDocumentLoaderEv
    224231__ZNK7WebCore11FrameLoader21isQuickRedirectComingEv
     232__ZNK7WebCore11FrameLoader27numPendingOrLoadingRequestsEb
    225233__ZNK7WebCore11FrameLoader6clientEv
    226234__ZNK7WebCore11FrameLoader8loadTypeEv
     235__ZNK7WebCore13HitTestResult10isSelectedEv
     236__ZNK7WebCore13HitTestResult11boundingBoxEv
     237__ZNK7WebCore13HitTestResult11targetFrameEv
     238__ZNK7WebCore13HitTestResult5titleEv
    227239__ZNK7WebCore14DocumentLoader10isStoppingEv
    228240__ZNK7WebCore14DocumentLoader11frameLoaderEv
     
    258270__ZNK7WebCore5Frame8documentEv
    259271__ZNK7WebCore5Frame8referrerEv
     272__ZNK7WebCore5Frame8rendererEv
    260273__ZNK7WebCore7IntRectcv6CGRectEv
     274__ZNK7WebCore7IntRectcv7_NSRectEv
    261275__ZNK7WebCore7IntRectcv7_NSRectEv
    262276__ZNK7WebCore8FrameMac14selectionImageEb
     
    266280__ZNK7WebCore9FloatRectcv6CGRectEv
    267281__ZNK7WebCore9FloatRectcv7_NSRectEv
     282__ZNK7WebCore9FrameTree12traverseNextEPKNS_5FrameE
     283__ZNK7WebCore9FrameTree14isDescendantOfEPKNS_5FrameE
    268284__ZNK7WebCore9FrameTree20traverseNextWithWrapEb
    269285__ZNK7WebCore9FrameTree24traversePreviousWithWrapEb
     
    325341_wkSignalCFReadStreamHasBytes
    326342_wkSupportsMultipartXMixedReplace
    327 __ZNK7WebCore11FrameLoader27numPendingOrLoadingRequestsEb
    328 __ZNK7WebCore9FrameTree12traverseNextEPKNS_5FrameE
    329 __ZNK7WebCore9FrameTree14isDescendantOfEPKNS_5FrameE
    330343
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r17396 r17399  
    954954                85B498F30ADB336A00925CBB /* DOMCSSValueInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85B498F20ADB336A00925CBB /* DOMCSSValueInternal.h */; };
    955955                85B498F50ADB337A00925CBB /* DOMEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85B498F40ADB337A00925CBB /* DOMEventInternal.h */; };
    956                 85B498FB0ADB340200925CBB /* DOMNodeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85B498FA0ADB340200925CBB /* DOMNodeInternal.h */; };
     956                85B498FB0ADB340200925CBB /* DOMNodeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85B498FA0ADB340200925CBB /* DOMNodeInternal.h */; settings = {ATTRIBUTES = (); }; };
    957957                85B498FF0ADB348100925CBB /* DOMStyleSheetInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85B498FE0ADB348100925CBB /* DOMStyleSheetInternal.h */; };
    958958                85B499010ADB34B300925CBB /* DOMSVGPathSegInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85B499000ADB34B300925CBB /* DOMSVGPathSegInternal.h */; };
     
    11861186                85E711960AC5D5350053270F /* DOMDocumentTypeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711470AC5D5340053270F /* DOMDocumentTypeInternal.h */; };
    11871187                85E711970AC5D5350053270F /* DOMDOMImplementationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711480AC5D5340053270F /* DOMDOMImplementationInternal.h */; };
    1188                 85E711980AC5D5350053270F /* DOMElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711490AC5D5340053270F /* DOMElementInternal.h */; };
     1188                85E711980AC5D5350053270F /* DOMElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711490AC5D5340053270F /* DOMElementInternal.h */; settings = {ATTRIBUTES = (); }; };
    11891189                85E711990AC5D5350053270F /* DOMEntityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E7114A0AC5D5340053270F /* DOMEntityInternal.h */; };
    11901190                85E7119A0AC5D5350053270F /* DOMEntityReferenceInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E7114B0AC5D5340053270F /* DOMEntityReferenceInternal.h */; };
     
    12461246                85E711D20AC5D5350053270F /* DOMNamedNodeMapInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711830AC5D5350053270F /* DOMNamedNodeMapInternal.h */; };
    12471247                85E711D30AC5D5350053270F /* DOMNodeListInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711840AC5D5350053270F /* DOMNodeListInternal.h */; };
    1248                 85E711D40AC5D5350053270F /* DOMNotationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711850AC5D5350053270F /* DOMNotationInternal.h */; };
     1248                85E711D40AC5D5350053270F /* DOMNotationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711850AC5D5350053270F /* DOMNotationInternal.h */; settings = {ATTRIBUTES = (); }; };
    12491249                85E711D50AC5D5350053270F /* DOMProcessingInstructionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711860AC5D5350053270F /* DOMProcessingInstructionInternal.h */; };
    12501250                85E711D60AC5D5350053270F /* DOMRectInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711870AC5D5350053270F /* DOMRectInternal.h */; };
     
    13141314                93032CC809AEC34300F82A18 /* PathCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93032CC709AEC34300F82A18 /* PathCG.cpp */; };
    13151315                93032CCA09AEC34B00F82A18 /* Path.h in Headers */ = {isa = PBXBuildFile; fileRef = 93032CC909AEC34B00F82A18 /* Path.h */; };
     1316                930500200AF025D300FFF491 /* ClipboardAccessPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 9305001F0AF025D300FFF491 /* ClipboardAccessPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
    13161317                9305B24D098F1B6B00C28855 /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9305B24C098F1B6B00C28855 /* Timer.h */; settings = {ATTRIBUTES = (Private, ); }; };
    13171318                9307056C09E0AF8F00B17FE4 /* csshelper.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4786097CAAC80094C9E4 /* csshelper.h */; };
     
    13201321                930705E909E0C9F000B17FE4 /* JSCSSPrimitiveValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 930705E809E0C9F000B17FE4 /* JSCSSPrimitiveValue.cpp */; };
    13211322                930705EB09E0C9F600B17FE4 /* JSCSSPrimitiveValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 930705EA09E0C9F600B17FE4 /* JSCSSPrimitiveValue.h */; };
     1323                9307F1130AF2C8BE00DBA31A /* DOMNodeInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85B498FA0ADB340200925CBB /* DOMNodeInternal.h */; };
     1324                9307F1D70AF2D59000DBA31A /* HitTestResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9307F1D50AF2D59000DBA31A /* HitTestResult.cpp */; };
     1325                9307F1D80AF2D59000DBA31A /* HitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 9307F1D60AF2D59000DBA31A /* HitTestResult.h */; settings = {ATTRIBUTES = (Private, ); }; };
    13221326                93126F6109D7A736008D9626 /* StringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 93126F6009D7A736008D9626 /* StringHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
    13231327                9326DC0B09DAD5BE00AFC847 /* CharsetData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9326DC0A09DAD5BE00AFC847 /* CharsetData.h */; };
     
    25332537                BC1A37BF097C715F0019F3D8 /* DOMUtility.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC1A37A9097C715F0019F3D8 /* DOMUtility.mm */; };
    25342538                BC1A37C0097C715F0019F3D8 /* DOMViews.h in Headers */ = {isa = PBXBuildFile; fileRef = BC1A37AA097C715F0019F3D8 /* DOMViews.h */; settings = {ATTRIBUTES = (Private, ); }; };
    2535                 BC3FCAA90AC3DB5800BA54AD /* PlatformScrollBar.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3FCAA80AC3DB5800BA54AD /* PlatformScrollBar.h */; };
     2539                BC3FCAA90AC3DB5800BA54AD /* PlatformScrollBar.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3FCAA80AC3DB5800BA54AD /* PlatformScrollBar.h */; settings = {ATTRIBUTES = (); }; };
    25362540                BC6B7BAF0993603C0052867B /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC6B7BAE0993603C0052867B /* Image.cpp */; };
    25372541                BC6B7ECF0998AC7F0052867B /* ImageSource.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6B7ECE0998AC7F0052867B /* ImageSource.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    27332737                                1CB4214B0AF2B2CA0085AD91 /* DOMElementInternal.h in Copy Generated Headers */,
    27342738                                1CB4214C0AF2B2CA0085AD91 /* DOMHTMLElementInternal.h in Copy Generated Headers */,
     2739                                9307F1130AF2C8BE00DBA31A /* DOMNodeInternal.h in Copy Generated Headers */,
    27352740                                1CB4214D0AF2B2CA0085AD91 /* DOMRangeInternal.h in Copy Generated Headers */,
    27362741                                85B916870AEBDBC4008DD727 /* DOMHTMLFormElementPrivate.h in Copy Generated Headers */,
     
    41764181                93032CC709AEC34300F82A18 /* PathCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathCG.cpp; sourceTree = "<group>"; };
    41774182                93032CC909AEC34B00F82A18 /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Path.h; sourceTree = "<group>"; };
     4183                9305001F0AF025D300FFF491 /* ClipboardAccessPolicy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ClipboardAccessPolicy.h; sourceTree = "<group>"; };
    41784184                9305B24C098F1B6B00C28855 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = "<group>"; };
    41794185                9307059009E0C75800B17FE4 /* CSSPrimitiveValue.idl */ = {isa = PBXFileReference; explicitFileType = sourcecode; fileEncoding = 4; path = CSSPrimitiveValue.idl; sourceTree = "<group>"; };
     
    41844190                930705EA09E0C9F600B17FE4 /* JSCSSPrimitiveValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCSSPrimitiveValue.h; sourceTree = "<group>"; };
    41854191                9307061309E0CA8200B17FE4 /* DerivedSources.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = DerivedSources.make; sourceTree = "<group>"; usesTabs = 1; };
     4192                9307F1D50AF2D59000DBA31A /* HitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HitTestResult.cpp; sourceTree = "<group>"; };
     4193                9307F1D60AF2D59000DBA31A /* HitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HitTestResult.h; sourceTree = "<group>"; };
    41864194                930CAAD609C495B600229C04 /* CanvasRenderingContext2D.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasRenderingContext2D.idl; sourceTree = "<group>"; };
    41874195                930CAB8809C49EFA00229C04 /* CanvasGradient.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasGradient.idl; sourceTree = "<group>"; };
     
    63766384                                65A640F00533BB1F0085E777 /* BlockExceptions.h */,
    63776385                                65F80697054D9F86008BF776 /* BlockExceptions.mm */,
     6386                                9305001F0AF025D300FFF491 /* ClipboardAccessPolicy.h */,
    63786387                                2D90660B0665D937006B6F1A /* ClipboardMac.h */,
    63796388                                2D90660C0665D937006B6F1A /* ClipboardMac.mm */,
     
    87868795                                A8CFF04A0A154F09000A4234 /* FixedTableLayout.h */,
    87878796                                935C477409AC4D8D00A6AAB4 /* GapRects.h */,
     8797                                9307F1D50AF2D59000DBA31A /* HitTestResult.cpp */,
     8798                                9307F1D60AF2D59000DBA31A /* HitTestResult.h */,
    87888799                                A8CFF5DF0A155A05000A4234 /* InlineBox.cpp */,
    87898800                                A8CFF5DE0A155A05000A4234 /* InlineBox.h */,
     
    1046810479                                655A81BB0AEF67D4000975F0 /* WebCoreResourceLoaderImp.h in Headers */,
    1046910480                                655A81BE0AEF67E6000975F0 /* HTTPHeaderMap.h in Headers */,
     10481                                930500200AF025D300FFF491 /* ClipboardAccessPolicy.h in Headers */,
     10482                                9307F1D80AF2D59000DBA31A /* HitTestResult.h in Headers */,
    1047010483                        );
    1047110484                        runOnlyForDeploymentPostprocessing = 0;
     
    1050210515                        isa = PBXProject;
    1050310516                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
    10504                         compatibilityVersion = "Xcode 2.4";
    1050510517                        hasScannedForEncodings = 1;
    1050610518                        knownRegions = (
     
    1051610528                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
    1051710529                        projectDirPath = "";
    10518                         projectRoot = "";
    10519                         shouldCheckCompatibility = 1;
    1052010530                        targets = (
    1052110531                                93F198A508245E59001E9ABC /* WebCore */,
     
    1170511715                                654F68880AF1B7C50065BDD6 /* CachedResourceMac.mm in Sources */,
    1170611716                                655A81BC0AEF67D4000975F0 /* WebCoreResourceLoaderImp.mm in Sources */,
     11717                                9307F1D70AF2D59000DBA31A /* HitTestResult.cpp in Sources */,
    1170711718                        );
    1170811719                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/bindings/objc/DOM.mm

    r17121 r17399  
    4848#import "HTMLNames.h"
    4949#import "HTMLPlugInElement.h"
     50#import "Image.h"
    5051#import "IntRect.h"
    5152#import "NodeFilter.h"
  • trunk/WebCore/bridge/mac/FrameMac.h

    r17393 r17399  
    2727#define FrameMac_h
    2828
    29 #import "ClipboardMac.h"
     29#import "ClipboardAccessPolicy.h"
    3030#import "Frame.h"
    3131#import "IntRect.h"
     
    8585class WebScriptObject;
    8686
     87typedef unsigned int NSDragOperation;
    8788typedef int NSWritingDirection;
    8889
     
    9192namespace WebCore {
    9293
     94class ClipboardMac;
    9395class DocumentFragment;
    9496class EditorClient;
     
    338340    static NSView* documentViewForNode(Node*);
    339341   
    340     bool dispatchCPPEvent(const AtomicString &eventType, ClipboardMac::AccessPolicy policy);
     342    bool dispatchCPPEvent(const AtomicString &eventType, ClipboardAccessPolicy policy);
    341343
    342344    NSImage* imageFromRect(NSRect) const;
  • trunk/WebCore/bridge/mac/FrameMac.mm

    r17397 r17399  
    3434#import "Cache.h"
    3535#import "ClipboardEvent.h"
     36#import "ClipboardMac.h"
    3637#import "Cursor.h"
    3738#import "WebDocumentLoader.h"
     
    5960#import "Logging.h"
    6061#import "MouseEventWithHitTestResults.h"
     62#import "HitTestResult.h"
    6163#import "PlatformKeyboardEvent.h"
    6264#import "PlatformScrollBar.h"
     
    383385{
    384386    if (_dragClipboard)
    385         _dragClipboard->setAccessPolicy(ClipboardMac::Numb);
     387        _dragClipboard->setAccessPolicy(ClipboardNumb);
    386388}
    387389
     
    15571559    NSPoint loc = [event locationInWindow];
    15581560    IntPoint mouseDownPos = d->m_view->windowToContents(IntPoint(loc));
    1559     RenderObject::NodeInfo nodeInfo(true, false);
    1560     renderer()->layer()->hitTest(nodeInfo, mouseDownPos);
     1561    HitTestResult result(true, false);
     1562    renderer()->layer()->hitTest(result, mouseDownPos);
    15611563    bool srcIsDHTML;
    1562     return nodeInfo.innerNode()->renderer()->draggableNode(DHTMLFlag, UAFlag, mouseDownPos.x(), mouseDownPos.y(), srcIsDHTML);
     1564    return result.innerNode()->renderer()->draggableNode(DHTMLFlag, UAFlag, mouseDownPos.x(), mouseDownPos.y(), srcIsDHTML);
    15631565}
    15641566
     
    16171619        if (mouseDownMayStartDrag() && !_dragSrc) {
    16181620            // try to find an element that wants to be dragged
    1619             RenderObject::NodeInfo nodeInfo(true, false);
    1620             renderer()->layer()->hitTest(nodeInfo, m_mouseDownPos);
    1621             Node *node = nodeInfo.innerNode();
     1621            HitTestResult result(true, false);
     1622            renderer()->layer()->hitTest(result, m_mouseDownPos);
     1623            Node *node = result.innerNode();
    16221624            _dragSrc = (node && node->renderer()) ? node->renderer()->draggableNode(_dragSrcMayBeDHTML, _dragSrcMayBeUA, m_mouseDownPos.x(), m_mouseDownPos.y(), _dragSrcIsDHTML) : 0;
    16231625            if (!_dragSrc) {
    16241626                setMouseDownMayStartDrag(false);     // no element is draggable
    16251627            } else {
    1626                 // remember some facts about this source, while we have a NodeInfo handy
    1627                 node = nodeInfo.URLElement();
     1628                // remember some facts about this source, while we have a HitTestResult handy
     1629                node = result.URLElement();
    16281630                _dragSrcIsLink = node && node->isLink();
    16291631
    1630                 node = nodeInfo.innerNonSharedNode();
     1632                node = result.innerNonSharedNode();
    16311633                _dragSrcIsImage = node && node->renderer() && node->renderer()->isImage();
    16321634               
     
    16671669                    freeClipboard();    // would only happen if we missed a dragEnd.  Do it anyway, just
    16681670                                        // to make sure it gets numbified
    1669                     _dragClipboard = new ClipboardMac(true, pasteboard, ClipboardMac::Writable, this);
     1671                    _dragClipboard = new ClipboardMac(true, pasteboard, ClipboardWritable, this);
    16701672                   
    16711673                    // If this is drag of an element, get set up to generate a default image.  Otherwise
     
    16811683                    // Invalidate clipboard here against anymore pasteboard writing for security.  The drag
    16821684                    // image can still be changed as we drag, but not the pasteboard data.
    1683                     _dragClipboard->setAccessPolicy(ClipboardMac::ImageWritable);
     1685                    _dragClipboard->setAccessPolicy(ClipboardImageWritable);
    16841686                   
    16851687                    if (mouseDownMayStartDrag()) {
     
    17391741// Returns whether caller should continue with "the default processing", which is the same as
    17401742// the event handler NOT setting the return value to false
    1741 bool FrameMac::dispatchCPPEvent(const AtomicString &eventType, ClipboardMac::AccessPolicy policy)
     1743bool FrameMac::dispatchCPPEvent(const AtomicString &eventType, ClipboardAccessPolicy policy)
    17421744{
    17431745    Node* target = selectionController()->start().element();
     
    17491751        target = target->shadowParentNode();
    17501752   
    1751     RefPtr<ClipboardMac> clipboard = new ClipboardMac(false, [NSPasteboard generalPasteboard], (ClipboardMac::AccessPolicy)policy);
     1753    RefPtr<ClipboardMac> clipboard = new ClipboardMac(false, [NSPasteboard generalPasteboard], (ClipboardAccessPolicy)policy);
    17521754
    17531755    ExceptionCode ec = 0;
     
    17571759
    17581760    // invalidate clipboard here for security
    1759     clipboard->setAccessPolicy(ClipboardMac::Numb);
     1761    clipboard->setAccessPolicy(ClipboardNumb);
    17601762
    17611763    return !noDefaultProcessing;
     
    17691771bool FrameMac::mayDHTMLCut()
    17701772{
    1771     return mayCopy() && !dispatchCPPEvent(beforecutEvent, ClipboardMac::Numb);
     1773    return mayCopy() && !dispatchCPPEvent(beforecutEvent, ClipboardNumb);
    17721774}
    17731775
    17741776bool FrameMac::mayDHTMLCopy()
    17751777{
    1776     return mayCopy() && !dispatchCPPEvent(beforecopyEvent, ClipboardMac::Numb);
     1778    return mayCopy() && !dispatchCPPEvent(beforecopyEvent, ClipboardNumb);
    17771779}
    17781780
    17791781bool FrameMac::mayDHTMLPaste()
    17801782{
    1781     return !dispatchCPPEvent(beforepasteEvent, ClipboardMac::Numb);
     1783    return !dispatchCPPEvent(beforepasteEvent, ClipboardNumb);
    17821784}
    17831785
     
    17911793    [[NSPasteboard generalPasteboard] declareTypes:[NSArray array] owner:nil];
    17921794
    1793     return !dispatchCPPEvent(cutEvent, ClipboardMac::Writable);
     1795    return !dispatchCPPEvent(cutEvent, ClipboardWritable);
    17941796}
    17951797
     
    18031805    [[NSPasteboard generalPasteboard] declareTypes:[NSArray array] owner:nil];
    18041806
    1805     return !dispatchCPPEvent(copyEvent, ClipboardMac::Writable);
     1807    return !dispatchCPPEvent(copyEvent, ClipboardWritable);
    18061808}
    18071809
    18081810bool FrameMac::tryDHTMLPaste()
    18091811{
    1810     return !dispatchCPPEvent(pasteEvent, ClipboardMac::Readable);
     1812    return !dispatchCPPEvent(pasteEvent, ClipboardReadable);
    18111813}
    18121814
  • trunk/WebCore/bridge/mac/WebCoreAXObject.mm

    r17373 r17399  
    4343#import "HTMLNames.h"
    4444#import "HTMLSelectElement.h"
     45#import "HitTestResult.h"
    4546#import "RenderImage.h"
    4647#import "RenderListMarker.h"
     
    12631264        ourpoint = [view convertPoint:windowCoord fromView:nil];
    12641265       
    1265         RenderObject::NodeInfo nodeInfo(true, true);
    1266         renderer->layer()->hitTest(nodeInfo, IntPoint(ourpoint));
    1267         innerNode = nodeInfo.innerNode();
     1266        HitTestResult result(true, true);
     1267        renderer->layer()->hitTest(result, IntPoint(ourpoint));
     1268        innerNode = result.innerNode();
    12681269        if (!innerNode || !innerNode->renderer())
    12691270            return nil;
     
    23032304        return NSAccessibilityUnignoredAncestor(self);
    23042305   
    2305     RenderObject::NodeInfo nodeInfo(true, true);
    2306     m_renderer->layer()->hitTest(nodeInfo, IntPoint(point));
    2307     if (!nodeInfo.innerNode())
     2306    HitTestResult result(true, true);
     2307    m_renderer->layer()->hitTest(result, IntPoint(point));
     2308    if (!result.innerNode())
    23082309        return NSAccessibilityUnignoredAncestor(self);
    2309     Node* node = nodeInfo.innerNode()->shadowAncestorNode();
     2310    Node* node = result.innerNode()->shadowAncestorNode();
    23102311    RenderObject* obj = node->renderer();
    23112312    if (!obj)
  • trunk/WebCore/bridge/mac/WebCoreFrameBridge.h

    r17396 r17399  
    253253- (NSString *)renderTreeAsExternalRepresentation;
    254254
    255 - (void)getInnerNonSharedNode:(DOMNode **)innerNonSharedNode innerNode:(DOMNode **)innerNode URLElement:(DOMElement **)URLElement atPoint:(NSPoint)point allowShadowContent:(BOOL)allow;
    256255- (BOOL)isPointInsideSelection:(NSPoint)point;
    257256
  • trunk/WebCore/bridge/mac/WebCoreFrameBridge.mm

    r17396 r17399  
    3131#import "AXObjectCache.h"
    3232#import "Cache.h"
     33#import "ClipboardMac.h"
    3334#import "DOMImplementation.h"
    3435#import "DOMInternal.h"
     
    5556#import "ModifySelectionListLevel.h"
    5657#import "MoveSelectionCommand.h"
     58#import "HitTestResult.h"
    5759#import "Page.h"
    5860#import "PlugInInfoStore.h"
     
    996998}
    997999
    998 - (void)getInnerNonSharedNode:(DOMNode **)innerNonSharedNode innerNode:(DOMNode **)innerNode URLElement:(DOMElement **)URLElement atPoint:(NSPoint)point allowShadowContent:(BOOL) allow
    999 {
    1000     RenderObject *renderer = m_frame->renderer();
    1001     if (!renderer) {
    1002         *innerNonSharedNode = nil;
    1003         *innerNode = nil;
    1004         *URLElement = nil;
    1005         return;
    1006     }
    1007 
    1008     RenderObject::NodeInfo nodeInfo = m_frame->nodeInfoAtPoint(IntPoint(point), allow);
    1009     *innerNonSharedNode = [DOMNode _nodeWith:nodeInfo.innerNonSharedNode()];
    1010     *innerNode = [DOMNode _nodeWith:nodeInfo.innerNode()];
    1011     *URLElement = [DOMElement _elementWith:nodeInfo.URLElement()];
    1012 }
    1013 
    10141000- (BOOL)isPointInsideSelection:(NSPoint)point
    10151001{
     
    17441730{
    17451731    IntPoint outerPoint(point);
    1746     Node* node = m_frame->nodeInfoAtPoint(outerPoint, true).innerNode();
     1732    Node* node = m_frame->hitTestResultAtPoint(outerPoint, true).innerNode();
    17471733    if (!node)
    17481734        return VisiblePosition();
     
    19141900        RefPtr<FrameView> v = m_frame->view();
    19151901        if (v) {
    1916             ClipboardMac::AccessPolicy policy = m_frame->baseURL().isLocalFile() ? ClipboardMac::Readable : ClipboardMac::TypesReadable;
     1902            ClipboardAccessPolicy policy = m_frame->baseURL().isLocalFile() ? ClipboardReadable : ClipboardTypesReadable;
    19171903            RefPtr<ClipboardMac> clipboard = new ClipboardMac(true, [info draggingPasteboard], policy);
    19181904            NSDragOperation srcOp = [info draggingSourceOperationMask];
     
    19391925                }
    19401926            }
    1941             clipboard->setAccessPolicy(ClipboardMac::Numb);    // invalidate clipboard here for security
     1927            clipboard->setAccessPolicy(ClipboardNumb);    // invalidate clipboard here for security
    19421928            return op;
    19431929        }
     
    19521938        if (v) {
    19531939            // Sending an event can result in the destruction of the view and part.
    1954             ClipboardMac::AccessPolicy policy = m_frame->baseURL().isLocalFile() ? ClipboardMac::Readable : ClipboardMac::TypesReadable;
     1940            ClipboardAccessPolicy policy = m_frame->baseURL().isLocalFile() ? ClipboardReadable : ClipboardTypesReadable;
    19551941            RefPtr<ClipboardMac> clipboard = new ClipboardMac(true, [info draggingPasteboard], policy);
    19561942            clipboard->setSourceOperation([info draggingSourceOperationMask]);           
    19571943            v->cancelDragAndDrop(createMouseEventFromDraggingInfo([self window], info), clipboard.get());
    1958             clipboard->setAccessPolicy(ClipboardMac::Numb);    // invalidate clipboard here for security
     1944            clipboard->setAccessPolicy(ClipboardNumb);    // invalidate clipboard here for security
    19591945        }
    19601946    }
     
    19671953        if (v) {
    19681954            // Sending an event can result in the destruction of the view and part.
    1969             RefPtr<ClipboardMac> clipboard = new ClipboardMac(true, [info draggingPasteboard], ClipboardMac::Readable);
     1955            RefPtr<ClipboardMac> clipboard = new ClipboardMac(true, [info draggingPasteboard], ClipboardReadable);
    19701956            clipboard->setSourceOperation([info draggingSourceOperationMask]);
    19711957            BOOL result = v->performDragAndDrop(createMouseEventFromDraggingInfo([self window], info), clipboard.get());
    1972             clipboard->setAccessPolicy(ClipboardMac::Numb);    // invalidate clipboard here for security
     1958            clipboard->setAccessPolicy(ClipboardNumb);    // invalidate clipboard here for security
    19731959            return result;
    19741960        }
  • trunk/WebCore/dom/Document.cpp

    r17395 r17399  
    6565#include "NameNodeList.h"
    6666#include "NodeFilter.h"
     67#include "HitTestResult.h"
    6768#include "NodeIterator.h"
    6869#include "PlatformKeyboardEvent.h"
     
    677678        return 0;
    678679
    679     RenderObject::NodeInfo nodeInfo(true, true);
    680     renderer()->layer()->hitTest(nodeInfo, IntPoint(x, y));
    681 
    682     Node* n = nodeInfo.innerNode();
     680    HitTestResult result(true, true);
     681    renderer()->layer()->hitTest(result, IntPoint(x, y));
     682
     683    Node* n = result.innerNode();
    683684    while (n && !n->isElementNode())
    684685        n = n->parentNode();
     
    16741675
    16751676    assert(renderer()->isRenderView());
    1676     RenderObject::NodeInfo renderInfo(readonly, active, mouseMove);
     1677    HitTestResult renderInfo(readonly, active, mouseMove);
    16771678    renderer()->layer()->hitTest(renderInfo, point);
    16781679
  • trunk/WebCore/dom/Element.h

    r16359 r17399  
    155155
    156156    virtual bool isURLAttribute(Attribute *attr) const;
     157    virtual String target() const { return String(); }
    157158       
    158159    virtual void focus();
  • trunk/WebCore/html/HTMLAnchorElement.h

    r16760 r17399  
    8181    void setTabIndex(int);
    8282
    83     String target() const;
     83    virtual String target() const;
    8484    void setTarget(const String&);
    8585
  • trunk/WebCore/html/HTMLAreaElement.cpp

    r16451 r17399  
    2727#include "HTMLNames.h"
    2828#include "FloatRect.h"
    29 #include "IntSize.h"
     29#include "HitTestResult.h"
     30#include "RenderObject.h"
    3031
    3132using namespace std;
     
    6970}
    7071
    71 bool HTMLAreaElement::mapMouseEvent(int x, int y, const IntSize& size, RenderObject::NodeInfo& info)
     72bool HTMLAreaElement::mapMouseEvent(int x, int y, const IntSize& size, HitTestResult& info)
    7273{
    7374    if (m_lastSize != size) {
  • trunk/WebCore/html/HTMLAreaElement.h

    r14393 r17399  
    2727
    2828#include "HTMLAnchorElement.h"
     29#include "IntSize.h"
    2930#include "Path.h"
    30 #include "RenderObject.h" // for RenderObject::NodeInfo
    3131
    3232namespace WebCore {
     33
     34class HitTestResult;
    3335
    3436class HTMLAreaElement : public HTMLAnchorElement {
     
    4648    bool isDefault() const { return m_shape == Default; }
    4749
    48     bool mapMouseEvent(int x, int y, const IntSize&, RenderObject::NodeInfo&);
     50    bool mapMouseEvent(int x, int y, const IntSize&, HitTestResult&);
    4951
    5052    virtual IntRect getRect(RenderObject*) const;
     
    7173    void setTabIndex(int);
    7274
    73     String target() const;
     75    virtual String target() const;
    7476    void setTarget(const String&);
    7577
  • trunk/WebCore/html/HTMLBaseElement.h

    r14332 r17399  
    3939
    4040    String href() const { return m_href; }
    41     String target() const { return m_target; }
     41    virtual String target() const { return m_target; }
    4242
    4343    virtual void parseMappedAttribute(MappedAttribute*);
  • trunk/WebCore/html/HTMLFormElement.h

    r17177 r17399  
    9898    void setMethod(const String&);
    9999
    100     String target() const;
     100    virtual String target() const;
    101101    void setTarget(const String&);
    102102
  • trunk/WebCore/html/HTMLLinkElement.h

    r16689 r17399  
    6363    void setRev(const String&);
    6464
    65     String target() const;
     65    virtual String target() const;
    6666    void setTarget(const String&);
    6767
  • trunk/WebCore/html/HTMLMapElement.cpp

    r16451 r17399  
    2828#include "HTMLCollection.h"
    2929#include "HTMLNames.h"
     30#include "IntSize.h"
     31#include "HitTestResult.h"
    3032
    3133using namespace std;
     
    5153}
    5254
    53 bool HTMLMapElement::mapMouseEvent(int x, int y, const IntSize& size, RenderObject::NodeInfo& info)
     55bool HTMLMapElement::mapMouseEvent(int x, int y, const IntSize& size, HitTestResult& info)
    5456{
    5557    HTMLAreaElement* defaultArea = 0;
  • trunk/WebCore/html/HTMLMapElement.h

    r14393 r17399  
    2727
    2828#include "HTMLElement.h"
    29 #include "RenderObject.h" // for RenderObject::NodeInfo
    3029
    3130namespace WebCore {
     31
     32class IntSize;
     33class HitTestResult;
    3234
    3335class HTMLMapElement : public HTMLElement {
     
    4446    virtual void parseMappedAttribute(MappedAttribute*);
    4547
    46     bool mapMouseEvent(int x, int y, const IntSize&, RenderObject::NodeInfo&);
     48    bool mapMouseEvent(int x, int y, const IntSize&, HitTestResult&);
    4749
    4850    PassRefPtr<HTMLCollection> areas();
  • trunk/WebCore/page/Frame.cpp

    r17297 r17399  
    6161#include "MediaFeatureNames.h"
    6262#include "MouseEventWithHitTestResults.h"
     63#include "HitTestResult.h"
    6364#include "NodeList.h"
    6465#include "Page.h"
     
    6869#include "PluginDocument.h"
    6970#include "RenderListBox.h"
     71#include "RenderObject.h"
    7072#include "RenderPart.h"
    7173#include "RenderTextControl.h"
     
    17901792        return false;
    17911793   
    1792     RenderObject::NodeInfo nodeInfo(true, true);
    1793     document()->renderer()->layer()->hitTest(nodeInfo, point);
    1794     Node *innerNode = nodeInfo.innerNode();
     1794    HitTestResult result(true, true);
     1795    document()->renderer()->layer()->hitTest(result, point);
     1796    Node *innerNode = result.innerNode();
    17951797    if (!innerNode || !innerNode->renderer())
    17961798        return false;
     
    29232925}
    29242926
    2925 RenderObject::NodeInfo Frame::nodeInfoAtPoint(const IntPoint& point, bool allowShadowContent)
    2926 {
    2927     RenderObject::NodeInfo nodeInfo(true, true);
    2928     renderer()->layer()->hitTest(nodeInfo, point);
     2927HitTestResult Frame::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent)
     2928{
     2929    HitTestResult result(true, true);
     2930    renderer()->layer()->hitTest(result, point);
    29292931
    29302932    Node *n;
     
    29332935   
    29342936    while (true) {
    2935         n = nodeInfo.innerNode();
     2937        n = result.innerNode();
    29362938        if (!n || !n->renderer() || !n->renderer()->isWidget())
    29372939            break;
     
    29482950        widgetPoint.setY(widgetPoint.y() - absY + view->contentsY());
    29492951
    2950         RenderObject::NodeInfo widgetNodeInfo(true, true);
    2951         frame->renderer()->layer()->hitTest(widgetNodeInfo, widgetPoint);
    2952         nodeInfo = widgetNodeInfo;
     2952        HitTestResult widgetHitTestResult(true, true);
     2953        frame->renderer()->layer()->hitTest(widgetHitTestResult, widgetPoint);
     2954        result = widgetHitTestResult;
     2955        result.setPoint(widgetPoint);
    29532956    }
    29542957   
    29552958    if (!allowShadowContent) {
    2956         Node* node = nodeInfo.innerNode();
     2959        Node* node = result.innerNode();
    29572960        if (node)
    29582961            node = node->shadowAncestorNode();
    2959         nodeInfo.setInnerNode(node);
    2960         node = nodeInfo.innerNonSharedNode();
     2962        result.setInnerNode(node);
     2963        node = result.innerNonSharedNode();
    29612964        if (node)
    29622965            node = node->shadowAncestorNode();
    2963         nodeInfo.setInnerNonSharedNode(node);
    2964     }
    2965     return nodeInfo;
     2966        result.setInnerNonSharedNode(node);
     2967    }
     2968    return result;
    29662969}
    29672970
  • trunk/WebCore/page/Frame.h

    r17393 r17399  
    3434#include "KURL.h"
    3535#include "Node.h"
    36 #include "RenderObject.h"
    3736#include "RenderLayer.h"
    3837#include "ScrollBar.h"
     
    7473class Plugin;
    7574class MouseEventWithHitTestResults;
     75class HitTestResult;
    7676class Range;
    7777class RenderLayer;
     78class RenderObject;
    7879class ResourceRequest;
    7980class Selection;
     
    801802#endif
    802803
    803   RenderObject::NodeInfo nodeInfoAtPoint(const IntPoint&, bool allowShadowContent);
     804  HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent);
    804805  bool hasSelection();
    805806  String documentTypeString() const;
  • trunk/WebCore/page/FrameView.cpp

    r17095 r17399  
    4141#include "MouseEvent.h"
    4242#include "MouseEventWithHitTestResults.h"
     43#include "HitTestResult.h"
    4344#include "OverflowEvent.h"
    4445#include "PlatformKeyboardEvent.h"
     
    12391240            IntPoint vPoint = windowToContents(e.pos());
    12401241
    1241             RenderObject::NodeInfo hitTestResult(true, false);
     1242            HitTestResult hitTestResult(true, false);
    12421243            doc->renderer()->layer()->hitTest(hitTestResult, vPoint);
    12431244            Node *node = hitTestResult.innerNode();
  • trunk/WebCore/platform/mac/ClipboardMac.h

    r16479 r17399  
    3232#include "IntPoint.h"
    3333#include "Clipboard.h"
     34#include "ClipboardAccessPolicy.h"
    3435#include "CachedResourceClient.h"
    3536
     
    4950class ClipboardMac : public Clipboard, public CachedResourceClient {
    5051public:
    51     // security mechanisms
    52     typedef enum {
    53         Numb, ImageWritable, Writable, TypesReadable, Readable
    54     } AccessPolicy;
    55 
    56     ClipboardMac(bool forDragging, NSPasteboard *pasteboard, AccessPolicy policy, FrameMac *frame = 0);
     52    ClipboardMac(bool forDragging, NSPasteboard *pasteboard, ClipboardAccessPolicy policy, FrameMac *frame = 0);
    5753    virtual ~ClipboardMac();
    5854
     
    8783#endif
    8884
    89     void setAccessPolicy(AccessPolicy policy);
    90     AccessPolicy accessPolicy() const;
     85    void setAccessPolicy(ClipboardAccessPolicy);
    9186    void setDragHasStarted() { m_dragStarted = true; }
    9287   
     
    10196    CachedImage* m_dragImage;
    10297    RefPtr<Node> m_dragImageElement;
    103     AccessPolicy m_policy;
     98    ClipboardAccessPolicy m_policy;
    10499    int m_changeCount;
    105100    bool m_dragStarted;
  • trunk/WebCore/platform/mac/ClipboardMac.mm

    r16479 r17399  
    3434namespace WebCore {
    3535
    36 ClipboardMac::ClipboardMac(bool forDragging, NSPasteboard *pasteboard, AccessPolicy policy, FrameMac *frame)
     36ClipboardMac::ClipboardMac(bool forDragging, NSPasteboard *pasteboard, ClipboardAccessPolicy policy, FrameMac *frame)
    3737  : m_pasteboard(HardRetain(pasteboard)), m_forDragging(forDragging), m_dragImage(0),
    3838    m_policy(policy), m_dragStarted(false), m_frame(frame)
     
    5151}
    5252
    53 void ClipboardMac::setAccessPolicy(AccessPolicy policy)
     53void ClipboardMac::setAccessPolicy(ClipboardAccessPolicy policy)
    5454{
    5555    // once you go numb, can never go back
    56     ASSERT(m_policy != Numb || policy == Numb);
     56    ASSERT(m_policy != ClipboardNumb || policy == ClipboardNumb);
    5757    m_policy = policy;
    58 }
    59 
    60 ClipboardMac::AccessPolicy ClipboardMac::accessPolicy() const
    61 {
    62     return m_policy;
    6358}
    6459
     
    122117void ClipboardMac::clearData(const String &type)
    123118{
    124     if (m_policy != Writable) {
     119    if (m_policy != ClipboardWritable) {
    125120        return;
    126121    }
     
    135130void ClipboardMac::clearAllData()
    136131{
    137     if (m_policy != Writable) {
     132    if (m_policy != ClipboardWritable) {
    138133        return;
    139134    }
     
    146141{
    147142    success = false;
    148     if (m_policy != Readable) {
     143    if (m_policy != ClipboardReadable) {
    149144        return String();
    150145    }
     
    208203bool ClipboardMac::setData(const String &type, const String &data)
    209204{
    210     if (m_policy != Writable)
     205    if (m_policy != ClipboardWritable)
    211206        return false;
    212207    // note NSPasteboard enforces changeCount itself on writing - can't write if not the owner
     
    241236HashSet<String> ClipboardMac::types() const
    242237{
    243     if (m_policy != Readable && m_policy != TypesReadable)
     238    if (m_policy != ClipboardReadable && m_policy != ClipboardTypesReadable)
    244239        return HashSet<String>();
    245240
     
    297292void ClipboardMac::setDragImage(CachedImage* image, Node *node, const IntPoint &loc)
    298293{
    299     if (m_policy == ImageWritable || m_policy == Writable) {
     294    if (m_policy == ClipboardImageWritable || m_policy == ClipboardWritable) {
    300295        if (m_dragImage)
    301296            m_dragImage->deref(this);
     
    363358void ClipboardMac::setDropEffect(const String &s)
    364359{
    365     if (m_policy == Readable || m_policy == TypesReadable) {
     360    if (m_policy == ClipboardReadable || m_policy == ClipboardTypesReadable) {
    366361        m_dropEffect = s;
    367362    }
     
    375370void ClipboardMac::setEffectAllowed(const String &s)
    376371{
    377     if (m_policy == Writable)
     372    if (m_policy == ClipboardWritable)
    378373        m_effectAllowed = s;
    379374}
  • trunk/WebCore/rendering/EllipsisBox.cpp

    r17338 r17399  
    2525#include "Document.h"
    2626#include "GraphicsContext.h"
     27#include "HitTestResult.h"
    2728#include "TextStyle.h"
    2829
     
    6162}
    6263
    63 bool EllipsisBox::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y, int tx, int ty)
     64bool EllipsisBox::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty)
    6465{
    6566    tx += m_x;
  • trunk/WebCore/rendering/EllipsisBox.h

    r17338 r17399  
    2727namespace WebCore {
    2828
     29class HitTestResult;
     30
    2931class EllipsisBox : public InlineBox {
    3032public:
     
    3638    {
    3739    }
    38 
    39     virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
    40     virtual bool nodeAtPoint(RenderObject::NodeInfo&, int x, int y, int tx, int ty);
     40   
     41    virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
     42    virtual bool nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty);
    4143
    4244private:
  • trunk/WebCore/rendering/InlineBox.cpp

    r17338 r17399  
    2424
    2525#include "InlineFlowBox.h"
     26#include "HitTestResult.h"
    2627#include "RenderArena.h"
    2728#include "RootInlineBox.h"
     
    149150}
    150151
    151 bool InlineBox::nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx, int ty)
     152bool InlineBox::nodeAtPoint(HitTestResult& i, int x, int y, int tx, int ty)
    152153{
    153154    // Hit test all phases of replaced elements atomically, as though the replaced element established its
  • trunk/WebCore/rendering/InlineBox.h

    r17338 r17399  
    2828namespace WebCore {
    2929
     30class HitTestResult;
    3031class RootInlineBox;
    3132
     
    8283
    8384    virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
    84     virtual bool nodeAtPoint(RenderObject::NodeInfo&, int x, int y, int tx, int ty);
     85    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty);
    8586
    8687    // Overloaded new operator.
  • trunk/WebCore/rendering/InlineFlowBox.cpp

    r17338 r17399  
    2828#include "GraphicsContext.h"
    2929#include "InlineTextBox.h"
     30#include "HitTestResult.h"
     31#include "RootInlineBox.h"
    3032#include "RenderBlock.h"
    3133#include "RenderFlow.h"
     
    522524}
    523525
    524 bool InlineFlowBox::nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx, int ty)
     526bool InlineFlowBox::nodeAtPoint(HitTestResult& i, int x, int y, int tx, int ty)
    525527{
    526528    // Check children first.
  • trunk/WebCore/rendering/InlineFlowBox.h

    r17338 r17399  
    2727
    2828namespace WebCore {
     29
     30class HitTestResult;
    2931
    3032class InlineFlowBox : public InlineRunBox {
     
    7173    virtual void clearTruncation();
    7274
    73     virtual void paintBackgroundAndBorder(RenderObject::PaintInfo&, int tx, int ty);
    74     void paintBackgrounds(GraphicsContext*, const Color&, const BackgroundLayer*,
    75                           int my, int mh, int tx, int ty, int w, int h);
    76     void paintBackground(GraphicsContext*, const Color&, const BackgroundLayer*,
    77                          int my, int mh, int tx, int ty, int w, int h);
    78     virtual void paintDecorations(RenderObject::PaintInfo&, int tx, int ty, bool paintedChildren = false);
    79     virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
    80     virtual bool nodeAtPoint(RenderObject::NodeInfo&, int x, int y, int tx, int ty);
     75    virtual void paintBackgroundAndBorder(RenderObject::PaintInfo& i, int _tx, int _ty);
     76    void paintBackgrounds(GraphicsContext* p, const Color& c, const BackgroundLayer* bgLayer,
     77                          int my, int mh, int _tx, int _ty, int w, int h);
     78    void paintBackground(GraphicsContext* p, const Color& c, const BackgroundLayer* bgLayer,
     79                         int my, int mh, int _tx, int _ty, int w, int h);
     80    virtual void paintDecorations(RenderObject::PaintInfo& i, int _tx, int _ty, bool paintedChildren = false);
     81    virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
     82    virtual bool nodeAtPoint(HitTestResult&, int, int, int, int);
    8183
    8284    int marginBorderPaddingLeft();
  • trunk/WebCore/rendering/InlineTextBox.cpp

    r17391 r17399  
    2929#include "Frame.h"
    3030#include "GraphicsContext.h"
     31#include "HitTestResult.h"
    3132#include "Range.h"
    3233#include "RenderArena.h"
     
    220221}
    221222
    222 bool InlineTextBox::nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx, int ty)
     223bool InlineTextBox::nodeAtPoint(HitTestResult& i, int x, int y, int tx, int ty)
    223224{
    224225    if (isLineBreak())
  • trunk/WebCore/rendering/InlineTextBox.h

    r17391 r17399  
    3838class StringImpl;
    3939class MarkedTextUnderline;
     40class HitTestResult;
    4041class Position;
    4142
     
    7071    bool isSelected(int startPos, int endPos) const;
    7172    void selectionStartEnd(int& sPos, int& ePos);
    72 
    73     virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
    74     virtual bool nodeAtPoint(RenderObject::NodeInfo&, int x, int y, int tx, int ty);
     73   
     74    virtual void paint(RenderObject::PaintInfo& i, int tx, int ty);
     75    virtual bool nodeAtPoint(HitTestResult&, int, int, int, int);
    7576
    7677    RenderText* textObject() const;
  • trunk/WebCore/rendering/RenderBlock.cpp

    r17098 r17399  
    3030#include "GraphicsContext.h"
    3131#include "InlineTextBox.h"
     32#include "HitTestResult.h"
    3233#include "RenderTableCell.h"
    3334#include "RenderTextFragment.h"
     
    24992500}
    25002501
    2501 bool RenderBlock::isPointInScrollbar(NodeInfo& info, int _x, int _y, int _tx, int _ty)
     2502bool RenderBlock::isPointInScrollbar(HitTestResult& info, int _x, int _y, int _tx, int _ty)
    25022503{
    25032504    if (!scrollsOverflow())
     
    25292530}
    25302531
    2531 bool RenderBlock::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     2532bool RenderBlock::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    25322533{
    25332534    bool inlineFlow = isInlineFlow();
  • trunk/WebCore/rendering/RenderBlock.h

    r16678 r17399  
    199199    int leftOffset(int y) const { return leftRelOffset(y, leftOffset(), true); }
    200200
    201     virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty,
     201    virtual bool nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty,
    202202                             HitTestAction hitTestAction);
    203203
    204     virtual bool isPointInScrollbar(NodeInfo& info, int x, int y, int tx, int ty);
     204    virtual bool isPointInScrollbar(HitTestResult& info, int x, int y, int tx, int ty);
    205205
    206206    virtual VisiblePosition positionForCoordinates(int x, int y);
  • trunk/WebCore/rendering/RenderBox.cpp

    r17068 r17399  
    255255
    256256// Hit Testing
    257 bool RenderBox::nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction action)
     257bool RenderBox::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action)
    258258{
    259259    tx += m_x;
  • trunk/WebCore/rendering/RenderBox.h

    r15666 r17399  
    4444    virtual void setStyle(RenderStyle*);
    4545    virtual void paint(PaintInfo& i, int _tx, int _ty);
    46     virtual bool nodeAtPoint(NodeInfo& i, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction);
     46    virtual bool nodeAtPoint(HitTestResult& i, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction);
    4747
    4848    virtual void destroy();
  • trunk/WebCore/rendering/RenderFlow.cpp

    r17052 r17399  
    417417}
    418418
    419 bool RenderFlow::hitTestLines(NodeInfo& i, int x, int y, int tx, int ty, HitTestAction hitTestAction)
     419bool RenderFlow::hitTestLines(HitTestResult& i, int x, int y, int tx, int ty, HitTestAction hitTestAction)
    420420{
    421421    if (hitTestAction != HitTestForeground)
  • trunk/WebCore/rendering/RenderFlow.h

    r17052 r17399  
    7777   
    7878    void paintLines(PaintInfo& i, int _tx, int _ty);
    79     bool hitTestLines(NodeInfo& i, int x, int y, int tx, int ty, HitTestAction hitTestAction);
     79    bool hitTestLines(HitTestResult& i, int x, int y, int tx, int ty, HitTestAction hitTestAction);
    8080
    8181    virtual IntRect getAbsoluteRepaintRect();
  • trunk/WebCore/rendering/RenderForeignObject.cpp

    r17270 r17399  
    119119}
    120120
    121 bool RenderForeignObject::nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction hitTestAction)
     121bool RenderForeignObject::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction hitTestAction)
    122122{
    123123    AffineTransform totalTransform = absoluteTransform();
  • trunk/WebCore/rendering/RenderForeignObject.h

    r17270 r17399  
    4747    virtual void layout();
    4848
    49     virtual bool nodeAtPoint(NodeInfo&, int x, int y, int tx, int ty, HitTestAction);
     49    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
    5050
    5151 private:
  • trunk/WebCore/rendering/RenderFrameSet.cpp

    r15253 r17399  
    3434#include "TextStream.h"
    3535#include "MouseEvent.h"
     36#include "HitTestResult.h"
    3637#include "RenderFrame.h"
    3738#include "RenderView.h"
     
    7576}
    7677
    77 bool RenderFrameSet::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
     78bool RenderFrameSet::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty,
    7879                                 HitTestAction hitTestAction)
    7980{
  • trunk/WebCore/rendering/RenderFrameSet.h

    r15253 r17399  
    5555    void setResizing(bool);
    5656
    57     virtual bool nodeAtPoint(NodeInfo&, int x, int y, int tx, int ty, HitTestAction);
     57    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
    5858
    5959    HTMLFrameSetElement* element() const
  • trunk/WebCore/rendering/RenderImage.cpp

    r16697 r17399  
    3535#include "HTMLMapElement.h"
    3636#include "HTMLNames.h"
     37#include "HitTestResult.h"
    3738#include "RenderView.h"
    3839#include "TextStyle.h"
     
    311312}
    312313
    313 bool RenderImage::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     314bool RenderImage::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    314315{
    315316    bool inside = RenderReplaced::nodeAtPoint(info, _x, _y, _tx, _ty, hitTestAction);
  • trunk/WebCore/rendering/RenderImage.h

    r15839 r17399  
    6969    Image* image() { return m_cachedImage ? m_cachedImage->image() : nullImage(); }
    7070
    71     virtual bool nodeAtPoint(NodeInfo&, int x, int y, int tx, int ty, HitTestAction);
     71    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
    7272   
    7373    virtual int calcReplacedWidth() const;
  • trunk/WebCore/rendering/RenderInline.cpp

    r16250 r17399  
    336336}
    337337
    338 bool RenderInline::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
     338bool RenderInline::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty,
    339339                               HitTestAction hitTestAction)
    340340{
  • trunk/WebCore/rendering/RenderInline.h

    r16250 r17399  
    6060    virtual void paint(PaintInfo& i, int tx, int ty);
    6161
    62     virtual bool nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
     62    virtual bool nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty,
    6363                             HitTestAction hitTestAction);
    6464   
  • trunk/WebCore/rendering/RenderLayer.cpp

    r17171 r17399  
    5454#include "HTMLMarqueeElement.h"
    5555#include "HTMLNames.h"
     56#include "HitTestResult.h"
    5657#include "OverflowEvent.h"
    5758#include "PlatformMouseEvent.h"
     
    865866   
    866867    if (currentFrame->mouseDownMayStartSelect()) {
    867         RenderObject::NodeInfo renderInfo(true, false, true);
     868        HitTestResult renderInfo(true, false, true);
    868869        if (hitTest(renderInfo, currentPos)) {
    869870            VisiblePosition pos(renderInfo.innerNode()->renderer()->positionForPoint(currentPos));
     
    14711472}
    14721473
    1473 bool RenderLayer::hitTest(RenderObject::NodeInfo& info, const IntPoint& point)
     1474bool RenderLayer::hitTest(HitTestResult& info, const IntPoint& point)
    14741475{
    14751476    renderer()->document()->updateLayout();
     
    14971498}
    14981499
    1499 RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderObject::NodeInfo& info,
    1500                                        const IntPoint& mousePos, const IntRect& hitTestRect)
     1500RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& info, const IntPoint& mousePos, const IntRect& hitTestRect)
    15011501{
    15021502    // Calculate the clip rects we should use.
     
    18301830}
    18311831
    1832 void RenderLayer::updateHoverActiveState(RenderObject::NodeInfo& info)
     1832void RenderLayer::updateHoverActiveState(HitTestResult& info)
    18331833{
    18341834    // We don't update :hover/:active state when the info is marked as readonly.
  • trunk/WebCore/rendering/RenderLayer.h

    r17002 r17399  
    5252
    5353class CachedResource;
     54class HitTestResult;
    5455class RenderView;
    5556class RenderFrameSet;
     
    292293    // layers that intersect the point from front to back.
    293294    void paint(GraphicsContext*, const IntRect& damageRect, PaintRestriction = PaintRestrictionNone, RenderObject* paintingRoot = 0);
    294     bool hitTest(RenderObject::NodeInfo&, const IntPoint&);
     295    bool hitTest(HitTestResult&, const IntPoint&);
    295296
    296297    // This method figures out our layerBounds in coordinates relative to
     
    309310    IntRect absoluteBoundingBox() const;
    310311
    311     void updateHoverActiveState(RenderObject::NodeInfo& info);
     312    void updateHoverActiveState(HitTestResult&);
    312313   
    313314    IntRect repaintRect() const { return m_repaintRect; }
     
    337338    void paintLayer(RenderLayer* rootLayer, GraphicsContext*, const IntRect& paintDirtyRect,
    338339        bool haveTransparency, PaintRestriction, RenderObject* paintingRoot);
    339     RenderLayer* hitTestLayer(RenderLayer* rootLayer, RenderObject::NodeInfo&, const IntPoint&, const IntRect& hitTestRect);
     340    RenderLayer* hitTestLayer(RenderLayer* rootLayer, HitTestResult&, const IntPoint&, const IntRect& hitTestRect);
    340341    void computeScrollDimensions(bool* needHBar = 0, bool* needVBar = 0);
    341342
  • trunk/WebCore/rendering/RenderListBox.cpp

    r17331 r17399  
    3333#include "HTMLOptGroupElement.h"
    3434#include "HTMLSelectElement.h"
     35#include "HitTestResult.h"
    3536#include "PlatformScrollBar.h"
    3637#include "RenderBR.h"
     
    326327}
    327328
    328 bool RenderListBox::isPointInScrollbar(NodeInfo& info, int _x, int _y, int _tx, int _ty)
     329bool RenderListBox::isPointInScrollbar(HitTestResult& info, int _x, int _y, int _tx, int _ty)
    329330{
    330331    if (!m_vBar)
  • trunk/WebCore/rendering/RenderListBox.h

    r17002 r17399  
    4545    virtual const char* renderName() const { return "RenderListBox"; }
    4646    virtual void paintObject(PaintInfo&, int tx, int ty);
    47     virtual bool isPointInScrollbar(NodeInfo&, int x, int y, int tx, int ty);
     47    virtual bool isPointInScrollbar(HitTestResult&, int x, int y, int tx, int ty);
    4848
    4949    virtual bool scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier=1.0);
  • trunk/WebCore/rendering/RenderObject.cpp

    r17140 r17399  
    4343#include "HTMLOListElement.h"
    4444#include "KURL.h"
     45#include "HitTestResult.h"
    4546#include "Position.h"
    4647#include "RenderArena.h"
     
    25342535}
    25352536
    2536 bool RenderObject::hitTest(NodeInfo& info, int x, int y, int tx, int ty, HitTestFilter hitTestFilter)
     2537bool RenderObject::hitTest(HitTestResult& info, int x, int y, int tx, int ty, HitTestFilter hitTestFilter)
    25372538{
    25382539    bool inside = false;
     
    25572558}
    25582559
    2559 void RenderObject::setInnerNode(NodeInfo& info)
     2560void RenderObject::setInnerNode(HitTestResult& info)
    25602561{
    25612562    if (info.innerNode())
     
    25782579}
    25792580
    2580 bool RenderObject::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
     2581bool RenderObject::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty,
    25812582                               HitTestAction hitTestAction)
    25822583{
  • trunk/WebCore/rendering/RenderObject.h

    r17054 r17399  
    5858class InlineBox;
    5959class InlineFlowBox;
     60class HitTestResult;
    6061class PlatformScrollbar;
    6162class Position;
     
    491492    void collectDashboardRegions(Vector<DashboardRegionValue>&);
    492493
    493     // does a query on the rendertree and finds the innernode
    494     // and overURL for the given position
    495     // if readonly == false, it will recalc hover styles accordingly
    496     class NodeInfo {
    497     public:
    498         NodeInfo(bool readonly, bool active, bool mouseMove = false)
    499             : m_innerNode(0), m_innerNonSharedNode(0), m_innerURLElement(0),
    500               m_scrollbar(0), m_readonly(readonly), m_active(active), m_mouseMove(mouseMove)
    501             { }
    502 
    503         Node* innerNode() const { return m_innerNode; }
    504         Node* innerNonSharedNode() const { return m_innerNonSharedNode; }
    505         Element* URLElement() const { return m_innerURLElement; }
    506         PlatformScrollbar* scrollbar() const { return m_scrollbar; }
    507         bool readonly() const { return m_readonly; }
    508         bool active() const { return m_active; }
    509         bool mouseMove() const { return m_mouseMove; }
    510        
    511         void setInnerNode(Node* n) { m_innerNode = n; }
    512         void setInnerNonSharedNode(Node* n) { m_innerNonSharedNode = n; }
    513         void setURLElement(Element* n) { m_innerURLElement = n; }
    514         void setScrollbar(PlatformScrollbar* s) { m_scrollbar = s; }
    515 
    516     private:
    517         Node* m_innerNode;
    518         Node* m_innerNonSharedNode;
    519         Element* m_innerURLElement;
    520         PlatformScrollbar* m_scrollbar;
    521         bool m_readonly;
    522         bool m_active;
    523         bool m_mouseMove;
    524     };
    525 
    526494    // Used to signal a specific subrect within an object that must be repainted after
    527495    // layout is complete.
     
    533501    };
    534502   
    535     bool hitTest(NodeInfo& info, int x, int y, int tx, int ty, HitTestFilter hitTestFilter = HitTestAll);
    536     virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty,
     503    bool hitTest(HitTestResult& info, int x, int y, int tx, int ty, HitTestFilter hitTestFilter = HitTestAll);
     504    virtual bool nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty,
    537505                             HitTestAction hitTestAction);
    538     void setInnerNode(NodeInfo& info);
     506    void setInnerNode(HitTestResult& info);
    539507
    540508    virtual VisiblePosition positionForCoordinates(int x, int y);
  • trunk/WebCore/rendering/RenderPath.cpp

    r17270 r17399  
    284284}
    285285
    286 bool RenderPath::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     286bool RenderPath::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    287287{
    288288    // We only draw in the forground phase, so we only hit-test then.
  • trunk/WebCore/rendering/RenderPath.h

    r17270 r17399  
    7272    virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
    7373
    74     virtual bool nodeAtPoint(NodeInfo&, int x, int y, int tx, int ty, HitTestAction);
     74    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
    7575   
    7676    // FIXME: When the other SVG classes get pointer-events support this should be moved elsewhere
  • trunk/WebCore/rendering/RenderSVGImage.cpp

    r17270 r17399  
    206206}
    207207
    208 bool RenderSVGImage::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     208bool RenderSVGImage::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    209209{
    210210    AffineTransform totalTransform = absoluteTransform();
  • trunk/WebCore/rendering/RenderSVGImage.h

    r17270 r17399  
    5555        virtual void computeAbsoluteRepaintRect(IntRect&, bool f);
    5656
    57         virtual bool nodeAtPoint(NodeInfo&, int _x, int _y, int _tx, int _ty, HitTestAction);
     57        virtual bool nodeAtPoint(HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction);
    5858
    5959    private:
  • trunk/WebCore/rendering/RenderSVGText.cpp

    r17270 r17399  
    9696}
    9797
    98 bool RenderSVGText::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     98bool RenderSVGText::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    9999{
    100100    AffineTransform totalTransform = absoluteTransform();
  • trunk/WebCore/rendering/RenderSVGText.h

    r17270 r17399  
    4242    virtual void setLocalTransform(const AffineTransform& transform) { m_transform = transform; }
    4343    virtual void paint(PaintInfo& i, int _tx, int _ty);
    44     virtual bool nodeAtPoint(NodeInfo&, int x, int y, int tx, int ty, HitTestAction);
     44    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
    4545    virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
    4646    virtual void computeAbsoluteRepaintRect(IntRect& r, bool f);
  • trunk/WebCore/rendering/RenderTableRow.cpp

    r15421 r17399  
    139139
    140140// Hit Testing
    141 bool RenderTableRow::nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction action)
     141bool RenderTableRow::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action)
    142142{
    143143    // Table rows cannot ever be hit tested.  Effectively they do not exist.
  • trunk/WebCore/rendering/RenderTableRow.h

    r15666 r17399  
    4646    virtual void layout();
    4747    virtual IntRect getAbsoluteRepaintRect();
    48     virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction action);
     48    virtual bool nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action);
    4949
    5050    // The only time rows get a layer is when they have transparency.
  • trunk/WebCore/rendering/RenderTableSection.cpp

    r15421 r17399  
    987987
    988988// Hit Testing
    989 bool RenderTableSection::nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction action)
     989bool RenderTableSection::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action)
    990990{
    991991    // Table sections cannot ever be hit tested.  Effectively they do not exist.
  • trunk/WebCore/rendering/RenderTableSection.h

    r15666 r17399  
    112112    virtual RenderObject* removeChildNode(RenderObject* child);
    113113
    114     virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction action);
     114    virtual bool nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action);
    115115
    116116    // this gets a cell grid data structure. changing the number of
  • trunk/WebCore/rendering/RenderText.h

    r16250 r17399  
    7171    virtual void layout() { assert(false); }
    7272
    73     virtual bool nodeAtPoint(NodeInfo&, int, int, int, int, HitTestAction) { assert(false); return false; }
     73    virtual bool nodeAtPoint(HitTestResult&, int, int, int, int, HitTestAction) { assert(false); return false; }
    7474
    7575    virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
  • trunk/WebCore/rendering/RenderTextControl.cpp

    r16280 r17399  
    3131#include "HTMLTextAreaElement.h"
    3232#include "HTMLTextFieldInnerElement.h"
     33#include "HitTestResult.h"
    3334#include "RenderTheme.h"
    3435#include "SelectionController.h"
     
    345346}
    346347
    347 bool RenderTextControl::nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction hitTestAction)
     348bool RenderTextControl::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction hitTestAction)
    348349{
    349350    // If we're within the text control, we want to act as if we've hit the inner div, incase the point
  • trunk/WebCore/rendering/RenderTextControl.h

    r16567 r17399  
    4141    virtual bool canHaveChildren() const { return false; }
    4242    virtual short baselinePosition( bool, bool ) const;
    43     virtual bool nodeAtPoint(NodeInfo&, int x, int y, int tx, int ty, HitTestAction);
     43    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
    4444                             
    4545    RenderStyle* createDivStyle(RenderStyle* startStyle);
  • trunk/WebCore/rendering/RootInlineBox.cpp

    r17338 r17399  
    3131#include "FrameMac.h"
    3232#endif
     33#include "HitTestResult.h"
    3334
    3435using namespace std;
     
    142143}
    143144
    144 bool RootInlineBox::nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx, int ty)
     145bool RootInlineBox::nodeAtPoint(HitTestResult& i, int x, int y, int tx, int ty)
    145146{
    146147    if (m_ellipsisBox && object()->style()->visibility() == VISIBLE) {
  • trunk/WebCore/rendering/RootInlineBox.h

    r17338 r17399  
    3030
    3131class EllipsisBox;
     32class HitTestResult;
     33
    3234struct GapRects;
    3335
     
    8688
    8789    EllipsisBox* ellipsisBox() const { return m_ellipsisBox; }
    88     void paintEllipsisBox(RenderObject::PaintInfo&, int tx, int ty) const;
    89     bool hitTestEllipsisBox(RenderObject::NodeInfo&, int x, int y, int tx, int ty, HitTestAction, bool inBox);
     90
     91    void paintEllipsisBox(RenderObject::PaintInfo& i, int _tx, int _ty) const;
     92    bool hitTestEllipsisBox(HitTestResult& info, int _x, int _y, int _tx, int _ty,
     93                            HitTestAction hitTestAction, bool inBox);
    9094   
    9195    virtual void clearTruncation();
     
    96100#endif
    97101
    98     virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
    99     virtual bool nodeAtPoint(RenderObject::NodeInfo&, int x, int y, int tx, int ty);
     102    virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
     103    virtual bool nodeAtPoint(HitTestResult&, int, int, int, int);
    100104
    101105    bool hasSelectedChildren() const { return m_hasSelectedChildren; }
  • trunk/WebKit/ChangeLog

    r17398 r17399  
     12006-10-28  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        This is the WebKit half of pushing the guts of elementAtPoint and
     6        WebElementDictionary into WebCore. Among other things, this patch
     7        makes WebElementDictionary.m and WebHTMLView.m Objective-C++
     8
     9        * MigrateHeaders.make: Add DOMElementInternal.h to the list of
     10        headers to migrate.
     11        * Misc/WebElementDictionary.h: Replaced DOMNode, DOMElement, and
     12        NSPoint member variables with a HitTestResult member variable.
     13        * Misc/WebElementDictionary.m:
     14        (addLookupKey): Formatting.
     15        (-[WebElementDictionary initWithHitTestResult:]): Constructor just
     16        takes a HitTestResult now and sets the member variable.
     17        (-[WebElementDictionary dealloc]): delete HitTestResult.
     18        (-[WebElementDictionary finalize]): Address HitTestResult.
     19        (-[WebElementDictionary _domNode]): Use HitTestResult and call into
     20        WebCore.
     21        (-[WebElementDictionary objectForKey:]): Same.
     22        (-[WebElementDictionary _webFrame]): Same.
     23        (-[WebElementDictionary _targetWebFrame]): Same.
     24        (-[WebElementDictionary _title]): Same.
     25        (-[WebElementDictionary _imageRect]): Same.
     26        (-[WebElementDictionary _isSelected]): Same.
     27        * WebKit.xcodeproj/project.pbxproj:
     28        * WebView/WebFrame.mm:
     29        (core): Convert from DOMNode* to Node*
     30        (kit): Convert from Node* to DOMNode*
     31        * WebView/WebFrameInternal.h: Support for the above.
     32        * WebView/WebHTMLView.m:
     33        (-[WebHTMLView elementAtPoint:allowShadowContent:]): Call directly
     34        into Frame.cpp to get HitTestResult.
     35
    1362006-10-27  Maciej Stachowiak  <mjs@apple.com>
    237
  • trunk/WebKit/MigrateHeaders.make

    r17390 r17399  
    156156    $(PUBLIC_HEADERS_DIR)/DOMNamedNodeMap.h \
    157157    $(PUBLIC_HEADERS_DIR)/DOMNode.h \
     158    $(INTERNAL_HEADERS_DIR)/DOMNodeInternal.h \
    158159    $(PRIVATE_HEADERS_DIR)/DOMNodePrivate.h \
    159160    $(PUBLIC_HEADERS_DIR)/DOMNodeFilter.h \
  • trunk/WebKit/Misc/WebElementDictionary.h

    r13090 r17399  
    2929#import <Foundation/NSDictionary.h>
    3030
    31 @class DOMNode;
    32 @class DOMElement;
     31namespace WebCore {
     32    class HitTestResult;
     33}
    3334
    3435@interface WebElementDictionary : NSDictionary {
    35     DOMNode *_innerNode;
    36     DOMNode *_innerNonSharedNode;
    37     DOMElement *_URLElement;
     36    WebCore::HitTestResult* _result;
    3837    NSMutableDictionary *_cache;
    3938    NSMutableSet *_nilValues;
    40     NSPoint _point;
    4139    BOOL _cacheComplete;
    4240}
    43 - (id)initWithInnerNonSharedNode:(DOMNode *)innerNonSharedNode innerNode:(DOMNode *)innerNode URLElement:(DOMElement *)URLElement andPoint:(NSPoint)point;
     41- (id)initWithHitTestResult:(const WebCore::HitTestResult&)result;
    4442@end
  • trunk/WebKit/Misc/WebElementDictionary.m

    r17352 r17399  
    3838#import <WebKit/DOMCore.h>
    3939#import <WebKit/DOMExtensions.h>
     40#import <WebCore/FrameMac.h>
     41#import <WebCore/HitTestResult.h>
     42
     43using namespace WebCore;
    4044
    4145typedef enum {
     
    5559static void addLookupKey(NSString *key, SEL selector, WebElementTargetObject target)
    5660{
    57     WebElementMethod *elementMethod = static_cast<WebElementMethod*>(malloc(sizeof(WebElementMethod)));
     61    WebElementMethod* elementMethod = static_cast<WebElementMethod*>(malloc(sizeof(WebElementMethod)));
    5862    elementMethod->target = target;
    5963    elementMethod->selector = selector;
     
    8993}
    9094
    91 - (id)initWithInnerNonSharedNode:(DOMNode *)innerNonSharedNode innerNode:(DOMNode *)innerNode URLElement:(DOMElement *)URLElement andPoint:(NSPoint)point
     95- (id)initWithHitTestResult:(const HitTestResult&)result
    9296{
    9397    [[self class] initializeLookupTable];
    9498    [super init];
    95     _point = point;
    96     _innerNode = [innerNode retain];
    97     _innerNonSharedNode = [innerNonSharedNode retain];
    98     _URLElement = [URLElement retain];
     99    _result = new HitTestResult(result);
    99100    return self;
    100101}
     
    102103- (void)dealloc
    103104{
    104     [_innerNode release];
    105     [_innerNonSharedNode release];
    106     [_URLElement release];
     105    delete _result;
    107106    [_cache release];
    108107    [_nilValues release];
     
    110109}
    111110
     111- (void)finalize
     112{
     113    delete _result;
     114    [super finalize];
     115}
     116
    112117- (void)_fillCache
    113118{
     
    128133        [self _fillCache];
    129134    return [_cache keyEnumerator];
     135}
     136
     137- (DOMNode *)_domNode
     138{
     139    return kit(_result->innerNonSharedNode());
    130140}
    131141
     
    146156            break;
    147157        case WebElementInnerNonSharedNode:
    148             target = _innerNonSharedNode;
     158            target = [self _domNode];
    149159            break;
    150160        case WebElementInnerNode:
    151             target = _innerNode;
     161            target = kit(_result->innerNode());
    152162            break;
    153163        case WebElementURLElement:
    154             target = _URLElement;
     164            target = kit(_result->URLElement());
    155165            break;
    156166    }
     
    176186}
    177187
    178 - (DOMNode *)_domNode
    179 {
    180     return [[_innerNonSharedNode retain] autorelease];
    181 }
    182 
    183188- (WebFrame *)_webFrame
    184189{
    185     return [[_innerNonSharedNode ownerDocument] webFrame];
     190    return [[[self _domNode] ownerDocument] webFrame];
    186191}
    187192
    188193- (WebFrame *)_targetWebFrame
    189194{
    190     if (!_URLElement || ![_URLElement respondsToSelector:@selector(target)])
    191         return nil;
    192     WebFrame *webFrame = [[_innerNonSharedNode ownerDocument] webFrame];
    193     NSString *targetName = [_URLElement performSelector:@selector(target)];
    194     if ([targetName length])
    195         return [webFrame findFrameNamed:targetName];
    196     return webFrame;
     195    FrameMac* webCoreFrame = Mac(_result->targetFrame());
     196    return kit(webCoreFrame);
    197197}
    198198
    199199- (NSString *)_title
    200200{
    201     // Find the title in the nearest enclosing DOM node.
    202     // For <area> tags in image maps, walk the tree for the <area>, not the <img> using it.
    203     for (DOMNode *titleNode = _innerNode; titleNode; titleNode = [titleNode parentNode]) {
    204         if ([titleNode isKindOfClass:[DOMHTMLElement class]]) {
    205             NSString *title = [(DOMHTMLElement *)titleNode titleDisplayString];
    206             if ([title length])
    207                 return title;
    208         }
    209     }
     201    return _result->title();
     202}
     203
     204- (NSValue *)_imageRect
     205{
     206    if ([self objectForKey:WebElementImageURLKey])
     207        return [NSValue valueWithRect:_result->boundingBox()];
    210208    return nil;
    211209}
    212210
    213 - (NSValue *)_imageRect
    214 {
    215     if ([self objectForKey:WebElementImageURLKey])
    216         return [NSValue valueWithRect:[_innerNonSharedNode boundingBox]];
    217     return nil;
    218 }
    219 
    220211- (NSNumber *)_isSelected
    221212{
    222     return [NSNumber numberWithBool:[[[[_innerNonSharedNode ownerDocument] webFrame] _bridge] isPointInsideSelection:_point]];
     213    return [NSNumber numberWithBool:_result->isSelected()];
    223214}
    224215@end
  • trunk/WebKit/WebKit.xcodeproj/project.pbxproj

    r17396 r17399  
    12311231                        isa = PBXProject;
    12321232                        buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
    1233                         compatibilityVersion = "Xcode 2.4";
    12341233                        hasScannedForEncodings = 1;
    12351234                        knownRegions = (
     
    12451244                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
    12461245                        projectDirPath = "";
    1247                         projectRoot = "";
    1248                         shouldCheckCompatibility = 1;
    12491246                        targets = (
    12501247                                9398100A0824BF01008DF038 /* WebKit */,
  • trunk/WebKit/WebView/WebFrame.mm

    r17396 r17399  
    3232#import "DOMElementInternal.h"
    3333#import "DOMHTMLElementInternal.h"
     34#import "DOMNodeInternal.h"
    3435#import "DOMRangeInternal.h"
    3536#import "WebBackForwardList.h"
     
    7273#import <WebKit/DOMElement.h>
    7374#import <WebKit/DOMHTMLElement.h>
     75#import <WebKit/DOMNode.h>
    7476#import <WebKit/DOMRange.h>
    7577
     
    158160{
    159161    return [DOMElement _elementWith:element];
     162}
     163
     164Node* core(DOMNode *node)
     165{
     166    return [node _node];
     167}
     168
     169DOMNode *kit(Node* node)
     170{
     171    return [DOMNode _nodeWith:node];
    160172}
    161173
  • trunk/WebKit/WebView/WebFrameInternal.h

    r17365 r17399  
    3636
    3737@class DOMElement;
     38@class DOMNode;
    3839@class DOMRange;
    3940@class WebInspector;
     
    5354    class FrameLoader;
    5455    class HTMLElement;
     56    class Node;
    5557    class Range;
    5658}
     
    6163WebCore::Element* core(DOMElement *);
    6264DOMElement *kit(WebCore::Element*);
     65
     66WebCore::Node* core(DOMNode *);
     67DOMNode *kit(WebCore::Node*);
    6368
    6469WebCore::Document* core(DOMDocument *);
  • trunk/WebKit/WebView/WebHTMLView.m

    r17387 r17399  
    6969#import <WebCore/FloatRect.h>
    7070#import <WebCore/FrameMac.h>
     71#import <WebCore/HitTestResult.h>
    7172#import <WebCore/SelectionController.h>
    7273#import <WebCore/WebCoreTextRenderer.h>
     
    60436044- (NSDictionary *)elementAtPoint:(NSPoint)point allowShadowContent:(BOOL)allow;
    60446045{
    6045     DOMNode *innerNode = nil;
    6046     DOMNode *innerNonSharedNode = nil;
    6047     DOMElement *URLElement = nil;
    6048     [[self _bridge] getInnerNonSharedNode:&innerNonSharedNode innerNode:&innerNode URLElement:&URLElement atPoint:point allowShadowContent:allow];
    6049     NSView *innerView = [[[[innerNonSharedNode ownerDocument] webFrame] frameView] documentView];
    6050     NSPoint innerPoint = innerView ? [self convertPoint:point toView:innerView] : point;
    6051     return [[[WebElementDictionary alloc] initWithInnerNonSharedNode:innerNonSharedNode innerNode:innerNode URLElement:URLElement andPoint:innerPoint] autorelease];
     6046    Frame* frame = core([self _frame]);
     6047    HitTestResult result(true, false);
     6048    if (frame->renderer())
     6049        result = frame->hitTestResultAtPoint(IntPoint(point), allow);
     6050    return [[[WebElementDictionary alloc] initWithHitTestResult:result] autorelease];
    60526051}
    60536052
Note: See TracChangeset for help on using the changeset viewer.