Changeset 83892 in webkit
- Timestamp:
- Apr 14, 2011 1:53:21 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r83891 r83892 1 2011-04-14 Ragner Magalhaes <ragner.magalhaes@openbossa.org> 2 3 Reviewed by Antonio Gomes. 4 5 [Qt] Web Inspector does not highlight elements 6 https://bugs.webkit.org/show_bug.cgi?id=35125 7 8 We should call drawNodeHighlight() just if a highlighted node exists 9 to avoid do save()/restore() on the Graphics Context unnecessarily. 10 11 Added highlightedNode() method to check if we need to call drawNodeHighlight() 12 and only on this case do save()/restore() on the Graphics Context. 13 14 * inspector/InspectorAgent.h: 15 (WebCore::InspectorAgent::highlightedNode): 16 1 17 2011-04-14 Adrienne Walker <enne@google.com> 2 18 -
trunk/Source/WebCore/inspector/InspectorController.cpp
r83599 r83892 255 255 } 256 256 257 Node* InspectorController::highlightedNode() const 258 { 259 return m_inspectorAgent->domAgent()->highlightedNode(); 260 } 261 257 262 #if ENABLE(JAVASCRIPT_DEBUGGER) 258 263 void InspectorController::enableProfiler() -
trunk/Source/WebCore/inspector/InspectorController.h
r81673 r83892 81 81 void drawNodeHighlight(GraphicsContext&) const; 82 82 void hideHighlight(); 83 Node* highlightedNode() const; 83 84 84 85 void evaluateForTestInFrontend(long callId, const String& script); -
trunk/Source/WebCore/inspector/InspectorDOMAgent.h
r83706 r83892 135 135 void highlightFrame(ErrorString*, const String& frameId); 136 136 void hideFrameHighlight(ErrorString* error) { hideHighlight(error); } 137 Node* highlightedNode() const { return m_highlightedNode.get(); } 137 138 138 139 // Methods called from the InspectorInstrumentation. -
trunk/Source/WebKit/qt/Api/qwebframe.cpp
r83579 r83892 387 387 } 388 388 renderFrameExtras(context, layers, clip); 389 #if ENABLE(INSPECTOR) 390 if (frame->page()->inspectorController()->highlightedNode()) { 391 context->save(); 392 frame->page()->inspectorController()->drawNodeHighlight(*context); 393 context->restore(); 394 } 395 #endif 389 396 } 390 397 -
trunk/Source/WebKit/qt/ChangeLog
r83620 r83892 1 2011-01-26 Ragner Magalhaes <ragner.magalhaes@openbossa.org> 2 3 Reviewed by Antonio Gomes. 4 5 [Qt] Web Inspector does not highlight elements 6 https://bugs.webkit.org/show_bug.cgi?id=35125 7 8 Adjust Web inspector to highlight elements on the page when the mouse 9 hovers the element on DOM inspector. 10 11 * Api/qwebframe.cpp: 12 (QWebFramePrivate::renderRelativeCoords): 13 * WebCoreSupport/InspectorClientQt.cpp: 14 (WebCore::InspectorClientQt::highlight): 15 (WebCore::InspectorClientQt::hideHighlight): 16 1 17 2011-04-12 George Guo <George.Guo@nokia.com> 2 18 -
trunk/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
r82059 r83892 33 33 34 34 #include "Frame.h" 35 #include "FrameView.h" 35 36 #include "InspectorController.h" 36 37 #include "InspectorFrontend.h" … … 263 264 void InspectorClientQt::highlight(Node*) 264 265 { 265 notImplemented();266 hideHighlight(); 266 267 } 267 268 268 269 void InspectorClientQt::hideHighlight() 269 270 { 270 notImplemented(); 271 WebCore::Frame* frame = m_inspectedWebPage->d->page->mainFrame(); 272 if (frame) { 273 QRect rect = m_inspectedWebPage->mainFrame()->geometry(); 274 if (!rect.isEmpty()) 275 frame->view()->invalidateRect(rect); 276 } 271 277 } 272 278
Note: See TracChangeset
for help on using the changeset viewer.