OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "core/inspector/InspectorHighlight.h" | 6 #include "core/inspector/InspectorHighlight.h" |
7 | 7 |
8 #include "core/dom/ClientRect.h" | 8 #include "core/dom/ClientRect.h" |
9 #include "core/dom/PseudoElement.h" | 9 #include "core/dom/PseudoElement.h" |
10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 if (!classNames.isEmpty()) | 254 if (!classNames.isEmpty()) |
255 elementInfo->setString("className", classNames.toString()); | 255 elementInfo->setString("className", classNames.toString()); |
256 | 256 |
257 LayoutObject* renderer = element->layoutObject(); | 257 LayoutObject* renderer = element->layoutObject(); |
258 FrameView* containingView = element->document().view(); | 258 FrameView* containingView = element->document().view(); |
259 if (!renderer || !containingView) | 259 if (!renderer || !containingView) |
260 return elementInfo; | 260 return elementInfo; |
261 | 261 |
262 // Render the getBoundingClientRect() data in the tooltip | 262 // Render the getBoundingClientRect() data in the tooltip |
263 // to be consistent with the rulers (see http://crbug.com/262338). | 263 // to be consistent with the rulers (see http://crbug.com/262338). |
264 RefPtrWillBeRawPtr<ClientRect> boundingBox = element->getBoundingClientRect(
); | 264 ClientRect* boundingBox = element->getBoundingClientRect(); |
265 elementInfo->setString("nodeWidth", String::number(boundingBox->width())); | 265 elementInfo->setString("nodeWidth", String::number(boundingBox->width())); |
266 elementInfo->setString("nodeHeight", String::number(boundingBox->height())); | 266 elementInfo->setString("nodeHeight", String::number(boundingBox->height())); |
267 | 267 |
268 return elementInfo; | 268 return elementInfo; |
269 } | 269 } |
270 | 270 |
271 } // namespace | 271 } // namespace |
272 | 272 |
273 InspectorHighlight::InspectorHighlight() | 273 InspectorHighlight::InspectorHighlight() |
274 : m_highlightPaths(JSONArray::create()) | 274 : m_highlightPaths(JSONArray::create()) |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 config.eventTarget = Color(128, 128, 128, 0); | 425 config.eventTarget = Color(128, 128, 128, 0); |
426 config.shape = Color(0, 0, 0, 0); | 426 config.shape = Color(0, 0, 0, 0); |
427 config.shapeMargin = Color(128, 128, 128, 0); | 427 config.shapeMargin = Color(128, 128, 128, 0); |
428 config.showInfo = true; | 428 config.showInfo = true; |
429 config.showRulers = true; | 429 config.showRulers = true; |
430 config.showExtensionLines = true; | 430 config.showExtensionLines = true; |
431 return config; | 431 return config; |
432 } | 432 } |
433 | 433 |
434 } // namespace blink | 434 } // namespace blink |
OLD | NEW |