Changeset 112305 in webkit
- Timestamp:
- Mar 27, 2012 1:08:07 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112304 r112305 1 2012-03-27 Joseph Pecoraro <pecoraro@apple.com> 2 3 <http://webkit.org/b/82362> Web Inspector: Provide private -[DOMNode inspect] 4 5 Reviewed by Timothy Hatcher. 6 7 No new tests, this is only an ObjC SPI. 8 9 * bindings/objc/DOM.mm: 10 * bindings/objc/DOMPrivate.h: 11 (-[DOMNode inspect]): 12 Call through to InspectorController inspect for the node. 13 14 * inspector/InspectorDOMAgent.cpp: 15 (WebCore::InspectorDOMAgent::handleMousePress): 16 (WebCore::InspectorDOMAgent::inspect): 17 Whenever we inspect an element, clear the node search. 18 The frontend already takes this approach. 19 1 20 2012-03-27 Joe Mason <jmason@rim.com> 2 21 -
trunk/Source/WebCore/bindings/objc/DOM.mm
r109663 r112305 44 44 #import "WebScriptObjectPrivate.h" 45 45 #import <wtf/HashMap.h> 46 47 #if ENABLE(INSPECTOR) 48 #import "InspectorController.h" 49 #import "Page.h" 50 #endif 46 51 47 52 #if ENABLE(SVG_DOM_OBJC_BINDINGS) … … 390 395 return kit(rects); 391 396 } 397 398 - (void)inspect 399 { 400 #if ENABLE(INSPECTOR) 401 WebCore::Node* node = core(self); 402 if (WebCore::Document* document = node->document()) { 403 if (WebCore::Page* page = document->page()) 404 page->inspectorController()->inspect(node); 405 } 406 #endif 407 } 408 392 409 @end 393 410 -
trunk/Source/WebCore/bindings/objc/DOMPrivate.h
r99099 r112305 30 30 - (NSImage *)renderedImage; 31 31 - (NSArray *)textRects; 32 - (void)inspect; 32 33 @end 33 34 -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r111574 r112305 915 915 if (m_highlightData && m_highlightData->node) { 916 916 RefPtr<Node> node = m_highlightData->node; 917 setSearchingForNode(false, 0);918 917 inspect(node.get()); 919 918 } … … 923 922 void InspectorDOMAgent::inspect(Node* node) 924 923 { 924 setSearchingForNode(false, 0); 925 925 926 if (node->nodeType() != Node::ELEMENT_NODE && node->nodeType() != Node::DOCUMENT_NODE) 926 927 node = node->parentNode();
Note: See TracChangeset
for help on using the changeset viewer.