diff options
-rw-r--r-- | webkit/glue/inspector_client_impl.cc | 14 | ||||
-rw-r--r-- | webkit/glue/inspector_client_impl.h | 4 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.h | 2 |
3 files changed, 6 insertions, 14 deletions
diff --git a/webkit/glue/inspector_client_impl.cc b/webkit/glue/inspector_client_impl.cc index 566d9f9..6684a72 100644 --- a/webkit/glue/inspector_client_impl.cc +++ b/webkit/glue/inspector_client_impl.cc @@ -105,8 +105,7 @@ void WebInspectorClient::showWindow() { void WebInspectorClient::closeWindow() { inspector_web_view_ = NULL; - if (inspected_node_) - hideHighlight(); + hideHighlight(); if (inspected_web_view_->page()) inspected_web_view_->page()->inspectorController()->setWindowVisible(false); @@ -145,15 +144,14 @@ static void invalidateNodeBoundingRect(WebViewImpl* web_view) { } void WebInspectorClient::highlight(Node* node) { - if (inspected_node_) - hideHighlight(); - - inspected_node_ = node; - invalidateNodeBoundingRect(inspected_web_view_); + // InspectorController does the actually tracking of the highlighted node + // and the drawing of the highlight. Here we just make sure to invalidate + // the rects of the old and new nodes. + hideHighlight(); } void WebInspectorClient::hideHighlight() { - inspected_node_ = 0; + // TODO: Should be able to invalidate a smaller rect. invalidateNodeBoundingRect(inspected_web_view_); } diff --git a/webkit/glue/inspector_client_impl.h b/webkit/glue/inspector_client_impl.h index 8e8e4fa..92b1ead 100644 --- a/webkit/glue/inspector_client_impl.h +++ b/webkit/glue/inspector_client_impl.h @@ -47,10 +47,6 @@ private: // The WebViewImpl of the page being inspected; gets passed to the constructor scoped_refptr<WebViewImpl> inspected_web_view_; - // The node selected in the web inspector. Used for highlighting it on the - // page. - WebCore::Node* inspected_node_; - // The WebView of the Inspector popup window WebViewImpl* inspector_web_view_; }; diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h index cefe3839..63950aa 100644 --- a/webkit/glue/webframe_impl.h +++ b/webkit/glue/webframe_impl.h @@ -222,8 +222,6 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> { WebDataSourceImpl* GetDataSourceImpl() const; WebDataSourceImpl* GetProvisionalDataSourceImpl() const; - void selectNodeFromInspector(WebCore::Node* node); - // Returns which frame has an active match. This function should only be // called on the main frame, as it is the only frame keeping track. Returned // value can be NULL if no frame has an active match. |