OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 | 8 |
9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
10 #include "DOMWindow.h" | 10 #include "DOMWindow.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // TODO(dglazkov): Implement this | 89 // TODO(dglazkov): Implement this |
90 NOTIMPLEMENTED(); | 90 NOTIMPLEMENTED(); |
91 } | 91 } |
92 | 92 |
93 static void invalidateNodeBoundingRect(WebViewImpl* web_view) { | 93 static void invalidateNodeBoundingRect(WebViewImpl* web_view) { |
94 // TODO(ojan): http://b/1143996 Is it important to just invalidate the rect | 94 // TODO(ojan): http://b/1143996 Is it important to just invalidate the rect |
95 // of the node region given that this is not on a critical codepath? | 95 // of the node region given that this is not on a critical codepath? |
96 // In order to do so, we'd have to take scrolling into account. | 96 // In order to do so, we'd have to take scrolling into account. |
97 const WebSize& size = web_view->size(); | 97 const WebSize& size = web_view->size(); |
98 WebRect damaged_rect(0, 0, size.width, size.height); | 98 WebRect damaged_rect(0, 0, size.width, size.height); |
99 if (web_view->GetDelegate()) | 99 if (web_view->delegate()) |
100 web_view->GetDelegate()->didInvalidateRect(damaged_rect); | 100 web_view->delegate()->didInvalidateRect(damaged_rect); |
101 } | 101 } |
102 | 102 |
103 void InspectorClientImpl::highlight(Node* node) { | 103 void InspectorClientImpl::highlight(Node* node) { |
104 // InspectorController does the actually tracking of the highlighted node | 104 // InspectorController does the actually tracking of the highlighted node |
105 // and the drawing of the highlight. Here we just make sure to invalidate | 105 // and the drawing of the highlight. Here we just make sure to invalidate |
106 // the rects of the old and new nodes. | 106 // the rects of the old and new nodes. |
107 hideHighlight(); | 107 hideHighlight(); |
108 } | 108 } |
109 | 109 |
110 void InspectorClientImpl::hideHighlight() { | 110 void InspectorClientImpl::hideHighlight() { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 default: | 228 default: |
229 NOTREACHED(); | 229 NOTREACHED(); |
230 break; | 230 break; |
231 } | 231 } |
232 data.append(entry); | 232 data.append(entry); |
233 data.append("\n"); | 233 data.append("\n"); |
234 } | 234 } |
235 inspected_web_view_->delegate()->UpdateInspectorSettings( | 235 inspected_web_view_->delegate()->UpdateInspectorSettings( |
236 webkit_glue::StringToStdWString(data)); | 236 webkit_glue::StringToStdWString(data)); |
237 } | 237 } |
OLD | NEW |