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 "core/inspector/InspectorHighlight.h" | 5 #include "core/inspector/InspectorHighlight.h" |
6 | 6 |
7 #include "core/dom/ClientRect.h" | 7 #include "core/dom/ClientRect.h" |
8 #include "core/dom/PseudoElement.h" | 8 #include "core/dom/PseudoElement.h" |
9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
10 #include "core/layout/LayoutBox.h" | 10 #include "core/layout/LayoutBox.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 for (size_t i = 0; i < classNameCount; ++i) { | 183 for (size_t i = 0; i < classNameCount; ++i) { |
184 const AtomicString& className = classNamesString[i]; | 184 const AtomicString& className = classNamesString[i]; |
185 if (!usedClassNames.add(className).isNewEntry) | 185 if (!usedClassNames.add(className).isNewEntry) |
186 continue; | 186 continue; |
187 classNames.append('.'); | 187 classNames.append('.'); |
188 classNames.append(className); | 188 classNames.append(className); |
189 } | 189 } |
190 } | 190 } |
191 if (pseudoElement) { | 191 if (pseudoElement) { |
192 if (pseudoElement->getPseudoId() == PseudoIdBefore) | 192 if (pseudoElement->getPseudoId() == PseudoIdBefore) |
193 classNames.appendLiteral("::before"); | 193 classNames.append("::before"); |
194 else if (pseudoElement->getPseudoId() == PseudoIdAfter) | 194 else if (pseudoElement->getPseudoId() == PseudoIdAfter) |
195 classNames.appendLiteral("::after"); | 195 classNames.append("::after"); |
196 } | 196 } |
197 if (!classNames.isEmpty()) | 197 if (!classNames.isEmpty()) |
198 elementInfo->setString("className", classNames.toString()); | 198 elementInfo->setString("className", classNames.toString()); |
199 | 199 |
200 LayoutObject* layoutObject = element->layoutObject(); | 200 LayoutObject* layoutObject = element->layoutObject(); |
201 FrameView* containingView = element->document().view(); | 201 FrameView* containingView = element->document().view(); |
202 if (!layoutObject || !containingView) | 202 if (!layoutObject || !containingView) |
203 return elementInfo; | 203 return elementInfo; |
204 | 204 |
205 // layoutObject the getBoundingClientRect() data in the tooltip | 205 // layoutObject the getBoundingClientRect() data in the tooltip |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 config.shape = Color(0, 0, 0, 0); | 445 config.shape = Color(0, 0, 0, 0); |
446 config.shapeMargin = Color(128, 128, 128, 0); | 446 config.shapeMargin = Color(128, 128, 128, 0); |
447 config.showInfo = true; | 447 config.showInfo = true; |
448 config.showRulers = true; | 448 config.showRulers = true; |
449 config.showExtensionLines = true; | 449 config.showExtensionLines = true; |
450 config.displayAsMaterial = false; | 450 config.displayAsMaterial = false; |
451 return config; | 451 return config; |
452 } | 452 } |
453 | 453 |
454 } // namespace blink | 454 } // namespace blink |
OLD | NEW |