summaryrefslogtreecommitdiffstats
path: root/webkit/glue/inspector_client_impl.cc
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 20:19:53 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 20:19:53 +0000
commit613de4bbd1b032d05e2552c9cd58735c4a71bf0c (patch)
treece3efbe5203d7fcdb0f8eda5c6c0cd861f556629 /webkit/glue/inspector_client_impl.cc
parent6e73472fa6749ec5cfe7bbe961ca0487d0a43bb3 (diff)
downloadchromium_src-613de4bbd1b032d05e2552c9cd58735c4a71bf0c.zip
chromium_src-613de4bbd1b032d05e2552c9cd58735c4a71bf0c.tar.gz
chromium_src-613de4bbd1b032d05e2552c9cd58735c4a71bf0c.tar.bz2
Remove code that will not be necessary after https://bugs.webkit.org/show_bug.cgi?id=24307 is fixed.
Review URL: http://codereview.chromium.org/27373 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10815 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/inspector_client_impl.cc')
-rw-r--r--webkit/glue/inspector_client_impl.cc14
1 files changed, 6 insertions, 8 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_);
}