Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: webkit/glue/inspector_client_impl.cc

Issue 31010: Hook up inspector highlighting again. This time we use... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/glue/inspector_client_impl.cc
===================================================================
--- webkit/glue/inspector_client_impl.cc (revision 10273)
+++ webkit/glue/inspector_client_impl.cc (working copy)
@@ -105,7 +105,7 @@
inspector_web_view_ = NULL;
WebFrameImpl* frame = inspected_web_view_->main_frame();
- if (frame && frame->inspected_node())
+ if (inspected_node_)
hideHighlight();
if (inspected_web_view_->page())
@@ -145,20 +145,16 @@
}
void WebInspectorClient::highlight(Node* node) {
- WebFrameImpl* frame = inspected_web_view_->main_frame();
-
- if (frame->inspected_node())
+ if (inspected_node_)
hideHighlight();
+ inspected_node_ = node;
invalidateNodeBoundingRect(inspected_web_view_);
- frame->selectNodeFromInspector(node);
}
void WebInspectorClient::hideHighlight() {
- WebFrameImpl* frame = static_cast<WebFrameImpl*>(inspected_web_view_->GetMainFrame());
-
+ inspected_node_ = 0;
invalidateNodeBoundingRect(inspected_web_view_);
- frame->selectNodeFromInspector(NULL);
}
void WebInspectorClient::inspectedURLChanged(const String& newURL) {

Powered by Google App Engine
This is Rietveld 408576698