Changeset 149262 in webkit
- Timestamp:
- Apr 28, 2013 3:21:55 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r148921 r149262 1233 1233 dom/ShadowRoot.cpp 1234 1234 dom/SpaceSplitString.cpp 1235 dom/StaticHashSetNodeList.cpp1236 1235 dom/StaticNodeList.cpp 1237 1236 dom/StringCallback.cpp -
trunk/Source/WebCore/ChangeLog
r149261 r149262 1 2013-04-25 Ryosuke Niwa <rniwa@webkit.org> 2 3 StaticHashSetNodeList is unnecessary 4 https://bugs.webkit.org/show_bug.cgi?id=115219 5 6 Reviewed by Antonio Gomes. 7 8 Moved Document::nodesFromRect into Internals::nodesFromRect per 9 https://chromium.googlesource.com/chromium/blink/+/78207c5c34383fbb807bb9347deb67168f09bb04. 10 11 Also made TouchAdjustment functions use HashListSet directly instead of wrapping it inside 12 a StaticHashSetNodeList since there was no need to use the latter. 13 14 With these two changes, I deleted StaticHashSetNodeList. 15 16 * GNUmakefile.list.am: 17 * Target.pri: 18 * WebCore.exp.in: 19 * WebCore.xcodeproj/project.pbxproj: 20 * dom/Document.cpp: 21 (WebCore): 22 * dom/Document.h: 23 (Document): 24 * dom/StaticHashSetNodeList.cpp: Removed. 25 * dom/StaticHashSetNodeList.h: Removed. 26 * page/EventHandler.cpp: 27 (WebCore::EventHandler::bestClickableNodeForTouchPoint): 28 (WebCore::EventHandler::bestContextMenuNodeForTouchPoint): 29 (WebCore::EventHandler::bestZoomableAreaForTouchPoint): 30 * page/TouchAdjustment.cpp: 31 (WebCore::TouchAdjustment::compileSubtargetList): 32 (WebCore::TouchAdjustment::compileZoomableSubtargets): 33 (WebCore::findBestClickableCandidate): 34 (WebCore::findBestContextMenuCandidate): 35 (WebCore::findBestZoomableArea): 36 * page/TouchAdjustment.h: 37 (WebCore): 38 * testing/Internals.cpp: 39 (WebCore::Internals::nodesFromRect): 40 1 41 2013-04-28 Dean Jackson <dino@apple.com> 2 42 -
trunk/Source/WebCore/GNUmakefile.list.am
r149129 r149262 3074 3074 Source/WebCore/dom/SpaceSplitString.cpp \ 3075 3075 Source/WebCore/dom/SpaceSplitString.h \ 3076 Source/WebCore/dom/StaticHashSetNodeList.cpp \3077 Source/WebCore/dom/StaticHashSetNodeList.h \3078 3076 Source/WebCore/dom/StaticNodeList.cpp \ 3079 3077 Source/WebCore/dom/StaticNodeList.h \ -
trunk/Source/WebCore/Target.pri
r149007 r149262 455 455 dom/NodeTraversal.cpp \ 456 456 dom/Notation.cpp \ 457 dom/StaticHashSetNodeList.cpp \458 457 dom/OverflowEvent.cpp \ 459 458 dom/PageTransitionEvent.cpp \ … … 1684 1683 dom/NodeTraversal.h \ 1685 1684 dom/Notation.h \ 1686 dom/StaticHashSetNodeList.h \1687 1685 dom/OverflowEvent.h \ 1688 1686 dom/PageTransitionEvent.h \ -
trunk/Source/WebCore/WebCore.exp.in
r149209 r149262 258 258 __ZN7WebCore13HitTestResultC1ERKS0_ 259 259 __ZN7WebCore13HitTestResultC1ERKNS_11LayoutPointE 260 __ZN7WebCore13HitTestResultC1ERKNS_11LayoutPointEjjjj 260 261 __ZN7WebCore13HitTestResultD1Ev 261 262 __ZN7WebCore13IdentifierRep3getEPKc … … 465 466 __ZN7WebCore15GraphicsContext9translateEff 466 467 __ZN7WebCore15GraphicsContextD1Ev 468 __ZN7WebCore15HitTestLocation12rectForPointERKNS_11LayoutPointEjjjj 467 469 __ZN7WebCore15JSDOMWindowBase8commonVMEv 468 470 __ZN7WebCore15PlatformCALayer18setGeometryFlippedEb … … 1315 1317 __ZNK7WebCore13HitTestResult17isContentEditableEv 1316 1318 __ZNK7WebCore13HitTestResult18titleDisplayStringEv 1319 __ZNK7WebCore13HitTestResult19rectBasedTestResultEv 1317 1320 __ZNK7WebCore13HitTestResult5imageEv 1318 1321 __ZNK7WebCore13HitTestResult5titleERNS_13TextDirectionE … … 1477 1480 __ZNK7WebCore4Node14isDescendantOfEPKS0_ 1478 1481 __ZNK7WebCore4Node18getSubresourceURLsERN3WTF11ListHashSetINS_4KURLELm256ENS_8KURLHashEEE 1482 __ZNK7WebCore4Node28deprecatedShadowAncestorNodeEv 1479 1483 __ZNK7WebCore4Node31numberOfScopedHTMLStyleChildrenEv 1480 1484 __ZNK7WebCore4Node9nodeIndexEv … … 1554 1558 __ZNK7WebCore8Document11completeURLERKN3WTF6StringE 1555 1559 __ZNK7WebCore8Document13axObjectCacheEv 1556 __ZNK7WebCore8Document13nodesFromRectEiijjjjj1557 1560 __ZNK7WebCore8Document14getElementByIdERKN3WTF12AtomicStringE 1558 1561 __ZNK7WebCore8Document31displayStringModifiedByEncodingERKN3WTF6StringE … … 1603 1606 __ZTVN7WebCore12ChromeClientE 1604 1607 __ZTVN7WebCore14LoaderStrategyE 1608 __ZTVN7WebCore14StaticNodeListE 1605 1609 __ZTVN7WebCore15StorageStrategyE 1606 1610 __ZTVN7WebCore16DatabaseStrategyE -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r149155 r149262 5274 5274 CE7B2DB51586ABAD0098B3FA /* TextAlternativeWithRange.h in Headers */ = {isa = PBXBuildFile; fileRef = CE7B2DB11586ABAD0098B3FA /* TextAlternativeWithRange.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5275 5275 CE7B2DB61586ABAD0098B3FA /* TextAlternativeWithRange.mm in Sources */ = {isa = PBXBuildFile; fileRef = CE7B2DB21586ABAD0098B3FA /* TextAlternativeWithRange.mm */; }; 5276 CEA3949C11D45CDA003094CF /* StaticHashSetNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEA3949A11D45CDA003094CF /* StaticHashSetNodeList.cpp */; };5277 CEA3949D11D45CDA003094CF /* StaticHashSetNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = CEA3949B11D45CDA003094CF /* StaticHashSetNodeList.h */; };5278 5276 CECADFC6153778FF00E37068 /* DictationAlternative.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CECADFC2153778FF00E37068 /* DictationAlternative.cpp */; }; 5279 5277 CECADFC7153778FF00E37068 /* DictationAlternative.h in Headers */ = {isa = PBXBuildFile; fileRef = CECADFC3153778FF00E37068 /* DictationAlternative.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 12063 12061 CE7B2DB11586ABAD0098B3FA /* TextAlternativeWithRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextAlternativeWithRange.h; path = mac/TextAlternativeWithRange.h; sourceTree = "<group>"; }; 12064 12062 CE7B2DB21586ABAD0098B3FA /* TextAlternativeWithRange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TextAlternativeWithRange.mm; path = mac/TextAlternativeWithRange.mm; sourceTree = "<group>"; }; 12065 CEA3949A11D45CDA003094CF /* StaticHashSetNodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StaticHashSetNodeList.cpp; sourceTree = "<group>"; };12066 CEA3949B11D45CDA003094CF /* StaticHashSetNodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticHashSetNodeList.h; sourceTree = "<group>"; };12067 12063 CECADFC2153778FF00E37068 /* DictationAlternative.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DictationAlternative.cpp; sourceTree = "<group>"; }; 12068 12064 CECADFC3153778FF00E37068 /* DictationAlternative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DictationAlternative.h; sourceTree = "<group>"; }; … … 20561 20557 D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */, 20562 20558 D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */, 20563 CEA3949A11D45CDA003094CF /* StaticHashSetNodeList.cpp */,20564 CEA3949B11D45CDA003094CF /* StaticHashSetNodeList.h */,20565 20559 BC7FA62C0D1F0EFF00DB22A9 /* StaticNodeList.cpp */, 20566 20560 BC7FA62B0D1F0EFF00DB22A9 /* StaticNodeList.h */, … … 23508 23502 1A2E6E5A0CC55213004A2062 /* SQLValue.h in Headers */, 23509 23503 93F1996308245E59001E9ABC /* SSLKeyGenerator.h in Headers */, 23510 CEA3949D11D45CDA003094CF /* StaticHashSetNodeList.h in Headers */,23511 23504 BC7FA62D0D1F0EFF00DB22A9 /* StaticNodeList.h in Headers */, 23512 23505 A5AFB350115151A700B045CB /* StepRange.h in Headers */, … … 26575 26568 1A2E6E590CC55213004A2062 /* SQLValue.cpp in Sources */, 26576 26569 93F19AE608245E59001E9ABC /* SSLKeyGeneratorMac.cpp in Sources */, 26577 CEA3949C11D45CDA003094CF /* StaticHashSetNodeList.cpp in Sources */,26578 26570 BC7FA62E0D1F0EFF00DB22A9 /* StaticNodeList.cpp in Sources */, 26579 26571 A5AFB34F115151A700B045CB /* StepRange.cpp in Sources */, -
trunk/Source/WebCore/dom/DOMAllInOne.cpp
r143422 r149262 131 131 #include "ShadowRoot.cpp" 132 132 #include "SpaceSplitString.cpp" 133 #include "StaticHashSetNodeList.cpp"134 133 #include "StaticNodeList.cpp" 135 134 #include "StyleElement.cpp" -
trunk/Source/WebCore/dom/Document.cpp
r149185 r149262 157 157 #include "Settings.h" 158 158 #include "ShadowRoot.h" 159 #include "StaticHashSetNodeList.h"160 159 #include "StylePropertySet.h" 161 160 #include "StyleResolver.h" … … 1406 1405 return documentLoader->responseMIMEType(); 1407 1406 return String(); 1408 }1409 1410 // FIXME: We need to discuss the DOM API here at some point. Ideas:1411 // * making it receive a rect as parameter, i.e. nodesFromRect(x, y, w, h);1412 // * making it receive the expading size of each direction separately,1413 // i.e. nodesFromRect(x, y, topSize, rightSize, bottomSize, leftSize);1414 PassRefPtr<NodeList> Document::nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, HitTestRequest::HitTestRequestType hitType) const1415 {1416 // FIXME: Share code between this, elementFromPoint and caretRangeFromPoint.1417 if (!renderer())1418 return 0;1419 Frame* frame = this->frame();1420 if (!frame)1421 return 0;1422 FrameView* frameView = frame->view();1423 if (!frameView)1424 return 0;1425 1426 float zoomFactor = frame->pageZoomFactor();1427 LayoutPoint point = roundedLayoutPoint(FloatPoint(centerX * zoomFactor + view()->scrollX(), centerY * zoomFactor + view()->scrollY()));1428 1429 HitTestRequest request(hitType);1430 1431 // When ignoreClipping is false, this method returns null for coordinates outside of the viewport.1432 if (!request.ignoreClipping() && !frameView->visibleContentRect().intersects(HitTestLocation::rectForPoint(point, topPadding, rightPadding, bottomPadding, leftPadding)))1433 return 0;1434 1435 // Passing a zero padding will trigger a rect hit test, however for the purposes of nodesFromRect,1436 // we special handle this case in order to return a valid NodeList.1437 if (!topPadding && !rightPadding && !bottomPadding && !leftPadding) {1438 HitTestResult result(point);1439 return handleZeroPadding(request, result);1440 }1441 1442 HitTestResult result(point, topPadding, rightPadding, bottomPadding, leftPadding);1443 renderView()->hitTest(request, result);1444 1445 return StaticHashSetNodeList::adopt(result.rectBasedTestResult());1446 }1447 1448 PassRefPtr<NodeList> Document::handleZeroPadding(const HitTestRequest& request, HitTestResult& result) const1449 {1450 renderView()->hitTest(request, result);1451 1452 Node* node = result.innerNode();1453 if (!node)1454 return 0;1455 1456 node = node->deprecatedShadowAncestorNode();1457 ListHashSet<RefPtr<Node> > list;1458 list.add(node);1459 return StaticHashSetNodeList::adopt(list);1460 1407 } 1461 1408 -
trunk/Source/WebCore/dom/Document.h
r149185 r149262 362 362 bool cssGridLayoutEnabled() const; 363 363 364 /**365 * Retrieve all nodes that intersect a rect in the window's document, until it is fully enclosed by366 * the boundaries of a node.367 *368 * @param centerX x reference for the rectangle in CSS pixels369 * @param centerY y reference for the rectangle in CSS pixels370 * @param topPadding How much to expand the top of the rectangle371 * @param rightPadding How much to expand the right of the rectangle372 * @param bottomPadding How much to expand the bottom of the rectangle373 * @param leftPadding How much to expand the left of the rectangle374 */375 PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY,376 unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding,377 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowShadowContent) const;378 364 Element* elementFromPoint(int x, int y) const; 379 365 PassRefPtr<Range> caretRangeFromPoint(int x, int y); … … 1267 1253 void seamlessParentUpdatedStylesheets(); 1268 1254 1269 PassRefPtr<NodeList> handleZeroPadding(const HitTestRequest&, HitTestResult&) const;1270 1271 1255 void loadEventDelayTimerFired(Timer<Document>*); 1272 1256 -
trunk/Source/WebCore/page/EventHandler.cpp
r149254 r149262 80 80 #include "ShadowRoot.h" 81 81 #include "SpatialNavigation.h" 82 #include "StaticHashSetNodeList.h"83 82 #include "StyleCachedImage.h" 84 83 #include "TextEvent.h" … … 2836 2835 2837 2836 IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius); 2838 RefPtr<StaticHashSetNodeList> nodeList = StaticHashSetNodeList::adopt(result.rectBasedTestResult());2839 2837 2840 2838 // FIXME: Should be able to handle targetNode being a shadow DOM node to avoid performing uncessary hit tests … … 2842 2840 // regression in touchadjustment/html-label.html. Some refinement is required to testing/internals to 2843 2841 // handle targetNode being a shadow DOM node. 2844 bool success = findBestClickableCandidate(targetNode, targetPoint, touchCenter, touchRect, *nodeList.get());2842 bool success = findBestClickableCandidate(targetNode, targetPoint, touchCenter, touchRect, result.rectBasedTestResult()); 2845 2843 if (success && targetNode) 2846 2844 targetNode = targetNode->deprecatedShadowAncestorNode(); … … 2854 2852 2855 2853 IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius); 2856 RefPtr<StaticHashSetNodeList> nodeList = StaticHashSetNodeList::adopt(result.rectBasedTestResult()); 2857 return findBestContextMenuCandidate(targetNode, targetPoint, touchCenter, touchRect, *nodeList.get()); 2854 return findBestContextMenuCandidate(targetNode, targetPoint, touchCenter, touchRect, result.rectBasedTestResult()); 2858 2855 } 2859 2856 … … 2864 2861 2865 2862 IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius); 2866 RefPtr<StaticHashSetNodeList> nodeList = StaticHashSetNodeList::adopt(result.rectBasedTestResult()); 2867 return findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect, *nodeList.get()); 2863 return findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect, result.rectBasedTestResult()); 2868 2864 } 2869 2865 -
trunk/Source/WebCore/page/TouchAdjustment.cpp
r148545 r149262 234 234 235 235 // Compiles a list of subtargets of all the relevant target nodes. 236 void compileSubtargetList(const NodeList & intersectedNodes, SubtargetGeometryList& subtargets, NodeFilter nodeFilter, AppendSubtargetsForNode appendSubtargetsForNode)236 void compileSubtargetList(const NodeListHashSet& intersectedNodes, SubtargetGeometryList& subtargets, NodeFilter nodeFilter, AppendSubtargetsForNode appendSubtargetsForNode) 237 237 { 238 238 // Find candidates responding to tap gesture events in O(n) time. … … 245 245 // responder or have an ancestor that is a responder. 246 246 // This iteration tests all ancestors at most once by caching earlier results. 247 unsigned length = intersectedNodes.length();248 for ( unsigned i = 0; i < length; ++i) {249 Node* const node = i ntersectedNodes.item(i);247 NodeListHashSet::const_iterator end = intersectedNodes.end(); 248 for (NodeListHashSet::const_iterator it = intersectedNodes.begin(); it != end; ++it) { 249 Node* const node = it->get(); 250 250 Vector<Node*> visitedNodes; 251 251 Node* respondingNode = 0; … … 278 278 // We compile the list of component absolute quads instead of using the bounding rect 279 279 // to be able to perform better hit-testing on inline links on line-breaks. 280 length = candidates.size();280 unsigned length = candidates.size(); 281 281 for (unsigned i = 0; i < length; i++) { 282 282 Node* candidate = candidates[i]; … … 311 311 312 312 // Compiles a list of zoomable subtargets. 313 void compileZoomableSubtargets(const NodeList & intersectedNodes, SubtargetGeometryList& subtargets)314 { 315 unsigned length = intersectedNodes.length();316 for ( unsigned i = 0; i < length; ++i) {317 Node* const candidate = i ntersectedNodes.item(i);313 void compileZoomableSubtargets(const NodeListHashSet& intersectedNodes, SubtargetGeometryList& subtargets) 314 { 315 NodeListHashSet::const_iterator end = intersectedNodes.end(); 316 for (NodeListHashSet::const_iterator it = intersectedNodes.begin(); it != end; ++it) { 317 Node* const candidate = it->get(); 318 318 if (nodeIsZoomTarget(candidate)) 319 319 appendZoomableSubtargets(candidate, subtargets); … … 477 477 } // namespace TouchAdjustment 478 478 479 bool findBestClickableCandidate(Node*& targetNode, IntPoint &targetPoint, const IntPoint &touchHotspot, const IntRect &touchArea, const NodeList & nodeList)479 bool findBestClickableCandidate(Node*& targetNode, IntPoint &targetPoint, const IntPoint &touchHotspot, const IntRect &touchArea, const NodeListHashSet& nodeList) 480 480 { 481 481 IntRect targetArea; … … 485 485 } 486 486 487 bool findBestContextMenuCandidate(Node*& targetNode, IntPoint &targetPoint, const IntPoint &touchHotspot, const IntRect &touchArea, const NodeList & nodeList)487 bool findBestContextMenuCandidate(Node*& targetNode, IntPoint &targetPoint, const IntPoint &touchHotspot, const IntRect &touchArea, const NodeListHashSet& nodeList) 488 488 { 489 489 IntRect targetArea; … … 493 493 } 494 494 495 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeList & nodeList)495 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeListHashSet& nodeList) 496 496 { 497 497 IntPoint targetPoint; -
trunk/Source/WebCore/page/TouchAdjustment.h
r125898 r149262 29 29 namespace WebCore { 30 30 31 bool findBestClickableCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeList&); 32 bool findBestContextMenuCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeList&); 33 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeList&); 31 typedef ListHashSet<RefPtr<Node> > NodeListHashSet; 32 33 bool findBestClickableCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeListHashSet&); 34 bool findBestContextMenuCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeListHashSet&); 35 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint& touchHotspot, const IntRect& touchArea, const NodeListHashSet&); 34 36 // FIXME: Implement the similar functions for other gestures here as well. 35 37 -
trunk/Source/WebCore/testing/Internals.cpp
r148921 r149262 82 82 #include "RenderObject.h" 83 83 #include "RenderTreeAsText.h" 84 #include "RenderView.h" 84 85 #include "RuntimeEnabledFeatures.h" 85 86 #include "SchemeRegistry.h" … … 90 91 #include "ShadowRoot.h" 91 92 #include "SpellChecker.h" 93 #include "StaticNodeList.h" 92 94 #include "StyleSheetContents.h" 93 95 #include "TextIterator.h" … … 1415 1417 #endif 1416 1418 1417 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y, unsigned topPadding, unsigned rightPadding,1419 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding, 1418 1420 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const 1419 1421 { … … 1422 1424 return 0; 1423 1425 } 1426 1427 Frame* frame = document->frame(); 1428 FrameView* frameView = document->view(); 1429 RenderView* renderView = document->renderView(); 1430 if (!renderView) 1431 return 0; 1432 1433 float zoomFactor = frame->pageZoomFactor(); 1434 LayoutPoint point = roundedLayoutPoint(FloatPoint(centerX * zoomFactor + frameView->scrollX(), centerY * zoomFactor + frameView->scrollY())); 1424 1435 1425 1436 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active; … … 1431 1442 hitType |= HitTestRequest::AllowChildFrameContent; 1432 1443 1433 return document->nodesFromRect(x, y, topPadding, rightPadding, bottomPadding, leftPadding, hitType); 1444 HitTestRequest request(hitType); 1445 1446 // When ignoreClipping is false, this method returns null for coordinates outside of the viewport. 1447 if (!request.ignoreClipping() && !frameView->visibleContentRect().intersects(HitTestLocation::rectForPoint(point, topPadding, rightPadding, bottomPadding, leftPadding))) 1448 return 0; 1449 1450 Vector<RefPtr<Node> > matches; 1451 1452 // Need padding to trigger a rect based hit test, but we want to return a NodeList 1453 // so we special case this. 1454 if (!topPadding && !rightPadding && !bottomPadding && !leftPadding) { 1455 HitTestResult result(point); 1456 renderView->hitTest(request, result); 1457 if (result.innerNode()) 1458 matches.append(result.innerNode()->deprecatedShadowAncestorNode()); 1459 } else { 1460 HitTestResult result(point, topPadding, rightPadding, bottomPadding, leftPadding); 1461 renderView->hitTest(request, result); 1462 copyToVector(result.rectBasedTestResult(), matches); 1463 } 1464 1465 return StaticNodeList::adopt(matches); 1434 1466 } 1435 1467 -
trunk/Source/WebKit/ChangeLog
r149220 r149262 1 2013-04-25 Ryosuke Niwa <rniwa@webkit.org> 2 3 StaticHashSetNodeList is unnecessary 4 https://bugs.webkit.org/show_bug.cgi?id=115219 5 6 Reviewed by Antonio Gomes. 7 8 * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: 9 1 10 2013-04-26 Roger Fong <roger_fong@apple.com> 2 11 -
trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
r149220 r149262 114 114 ??0Mutex@WTF@@QAE@XZ 115 115 ??0ThreadCondition@WTF@@QAE@XZ 116 ??1HitTestResult@WebCore@@QAE@XZ 116 117 ??1Mutex@WTF@@QAE@XZ 117 118 ??1ThreadCondition@WTF@@QAE@XZ … … 191 192 ?getLocationAndLengthFromRange@TextIterator@WebCore@@SA_NPAVNode@2@PBVRange@2@AAI2@Z 192 193 ?inputTag@HTMLNames@WebCore@@3VQualifiedName@2@B 194 ?item@StaticNodeList@WebCore@@UBEPAVNode@2@I@Z 193 195 ?selectTag@HTMLNames@WebCore@@3VQualifiedName@2@B 194 196 #if ENABLE(INSPECTOR) … … 227 229 ?firstChild@ComposedShadowTreeWalker@WebCore@@QAEXXZ 228 230 ?lastChild@ComposedShadowTreeWalker@WebCore@@QAEXXZ 231 ?length@StaticNodeList@WebCore@@UBEIXZ 232 ?namedItem@StaticNodeList@WebCore@@UBEPAVNode@2@ABVAtomicString@WTF@@@Z 229 233 ?next@ComposedShadowTreeWalker@WebCore@@QAEXXZ 230 234 ?previous@ComposedShadowTreeWalker@WebCore@@QAEXXZ … … 304 308 ?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ 305 309 ??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z 306 ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIIII@Z307 310 ?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z 308 311 ?isContinuousSpellCheckingEnabled@Editor@WebCore@@QBE_NXZ -
trunk/Source/WebKit/win/ChangeLog
r149125 r149262 1 2013-04-25 Ryosuke Niwa <rniwa@webkit.org> 2 3 StaticHashSetNodeList is unnecessary 4 https://bugs.webkit.org/show_bug.cgi?id=115219 5 6 Reviewed by Antonio Gomes. 7 8 * WebKit.vcproj/WebKitExports.def.in: 9 1 10 2013-04-25 Joseph Pecoraro <pecoraro@apple.com> 2 11 -
trunk/Source/WebKit/win/WebKit.vcproj/WebKitExports.def.in
r148940 r149262 114 114 ??0Mutex@WTF@@QAE@XZ 115 115 ??0ThreadCondition@WTF@@QAE@XZ 116 ??1HitTestResult@WebCore@@QAE@XZ 116 117 ??1Mutex@WTF@@QAE@XZ 117 118 ??1ThreadCondition@WTF@@QAE@XZ … … 192 193 ?getLocationAndLengthFromRange@TextIterator@WebCore@@SA_NPAVNode@2@PBVRange@2@AAI2@Z 193 194 ?inputTag@HTMLNames@WebCore@@3VQualifiedName@2@B 195 ?item@StaticNodeList@WebCore@@UBEPAVNode@2@I@Z 194 196 ?selectTag@HTMLNames@WebCore@@3VQualifiedName@2@B 195 197 #if ENABLE(INSPECTOR) … … 228 230 ?firstChild@ComposedShadowTreeWalker@WebCore@@QAEXXZ 229 231 ?lastChild@ComposedShadowTreeWalker@WebCore@@QAEXXZ 232 ?length@StaticNodeList@WebCore@@UBEIXZ 233 ?namedItem@StaticNodeList@WebCore@@UBEPAVNode@2@ABVAtomicString@WTF@@@Z 230 234 ?next@ComposedShadowTreeWalker@WebCore@@QAEXXZ 231 235 ?previous@ComposedShadowTreeWalker@WebCore@@QAEXXZ … … 305 309 ?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ 306 310 ??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z 307 ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIIII@Z308 311 ?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z 309 312 ?isContinuousSpellCheckingEnabled@Editor@WebCore@@QBE_NXZ -
trunk/Source/autotools/symbols.filter
r148921 r149262 60 60 _ZN7WebCore10ClientRectC1ERKNS_7IntRectE; 61 61 _ZN7WebCore10ShadowRoot6createEPNS_7ElementERi; 62 _ZN7WebCore10RenderView7hitTestERKNS_14HitTestRequestERNS_13HitTestResultE; 62 63 _ZN7WebCore11memoryCacheEv; 63 64 _ZN7WebCore11EventTarget17toGeneratedStreamEv; … … 69 70 _ZN7WebCore12PrintContext20pageNumberForElementEPNS_7ElementERKNS_9FloatSizeE; 70 71 _ZN7WebCore12WorkerThread17workerThreadCountEv; 72 _ZN7WebCore13HitTestResultC1ERKNS_11LayoutPointE; 73 _ZN7WebCore13HitTestResultD1Ev; 71 74 _ZN7WebCore13createWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_4NodeE; 72 75 _ZN7WebCore14ClientRectListC1Ev; … … 257 260 _ZN7WebCore11FrameLoader6reloadEb; 258 261 _ZN7WebCore13toArrayBufferEN3JSC7JSValueE; 262 _ZN7WebCore13HitTestResultC1ERKNS_11LayoutPointEjjjj; 263 _ZN7WebCore15HitTestLocation12rectForPointERKNS_11LayoutPointEjjjj; 259 264 _ZN7WebCore21SerializedScriptValue6createERKN3WTF6StringE; 260 265 _ZN7WebCore21SerializedScriptValueD1Ev; … … 302 307 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10TimeRangesE; 303 308 _ZNK7WebCore10TimeRanges7nearestEd; 309 _ZNK7WebCore13HitTestResult19rectBasedTestResultEv; 310 _ZNK7WebCore4Node28deprecatedShadowAncestorNodeEv; 311 _ZNK7WebCore7IntRect10intersectsERKS0_; 312 _ZNK7WebCore8Document13nodesFromRectEiijjjjj; 313 _ZTVN7WebCore14StaticNodeListE; 304 314 305 315 local:
Note: See TracChangeset
for help on using the changeset viewer.