| 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 #ifndef InspectorHighlight_h | 5 #ifndef InspectorHighlight_h |
| 6 #define InspectorHighlight_h | 6 #define InspectorHighlight_h |
| 7 | 7 |
| 8 #include "core/InspectorTypeBuilder.h" | 8 #include "core/InspectorTypeBuilder.h" |
| 9 #include "platform/geometry/FloatQuad.h" | 9 #include "platform/geometry/FloatQuad.h" |
| 10 #include "platform/geometry/LayoutRect.h" | 10 #include "platform/geometry/LayoutRect.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 Color margin; | 26 Color margin; |
| 27 Color eventTarget; | 27 Color eventTarget; |
| 28 Color shape; | 28 Color shape; |
| 29 Color shapeMargin; | 29 Color shapeMargin; |
| 30 | 30 |
| 31 bool showInfo; | 31 bool showInfo; |
| 32 bool showRulers; | 32 bool showRulers; |
| 33 bool showExtensionLines; | 33 bool showExtensionLines; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 class InspectorHighlight : public NoBaseWillBeGarbageCollected<InspectorHighligh
t> { | 36 class InspectorHighlight : public NoBaseWillBeGarbageCollectedFinalized<Inspecto
rHighlight> { |
| 37 public: | 37 public: |
| 38 ~InspectorHighlight(); | 38 ~InspectorHighlight(); |
| 39 | 39 |
| 40 static PassOwnPtrWillBeRawPtr<InspectorHighlight> create(Node*, const Inspec
torHighlightConfig&, bool appendElementInfo); | 40 static PassOwnPtrWillBeRawPtr<InspectorHighlight> create(Node*, const Inspec
torHighlightConfig&, bool appendElementInfo); |
| 41 static PassOwnPtrWillBeRawPtr<InspectorHighlight> create() | 41 static PassOwnPtrWillBeRawPtr<InspectorHighlight> create() |
| 42 { | 42 { |
| 43 return adoptPtrWillBeNoop(new InspectorHighlight()); | 43 return adoptPtrWillBeNoop(new InspectorHighlight()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 static bool getBoxModel(Node*, RefPtr<TypeBuilder::DOM::BoxModel>&); | 46 static bool getBoxModel(Node*, RefPtr<TypeBuilder::DOM::BoxModel>&); |
| 47 static InspectorHighlightConfig defaultConfig(); | 47 static InspectorHighlightConfig defaultConfig(); |
| 48 | 48 |
| 49 void appendPath(PassRefPtr<JSONArrayBase> path, const Color& fillColor, cons
t Color& outlineColor); | 49 void appendPath(PassRefPtr<JSONArrayBase> path, const Color& fillColor, cons
t Color& outlineColor); |
| 50 void appendQuad(const FloatQuad&, const Color& fillColor, const Color& outli
neColor = Color::transparent); | 50 void appendQuad(const FloatQuad&, const Color& fillColor, const Color& outli
neColor = Color::transparent); |
| 51 void appendEventTargetQuads(Node* eventTargetNode, const InspectorHighlightC
onfig&); | 51 void appendEventTargetQuads(Node* eventTargetNode, const InspectorHighlightC
onfig&); |
| 52 PassRefPtr<JSONObject> asJSONObject() const; | 52 PassRefPtr<JSONObject> asJSONObject() const; |
| 53 | 53 |
| 54 DEFINE_INLINE_TRACE() { } |
| 55 |
| 54 private: | 56 private: |
| 55 InspectorHighlight(); | 57 InspectorHighlight(); |
| 56 | 58 |
| 57 bool m_showRulers; | 59 bool m_showRulers; |
| 58 bool m_showExtensionLines; | 60 bool m_showExtensionLines; |
| 59 RefPtr<JSONObject> m_elementInfo; | 61 RefPtr<JSONObject> m_elementInfo; |
| 60 RefPtr<JSONArray> m_highlightPaths; | 62 RefPtr<JSONArray> m_highlightPaths; |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 } // namespace blink | 65 } // namespace blink |
| 64 | 66 |
| 65 | 67 |
| 66 #endif // InspectorHighlight_h | 68 #endif // InspectorHighlight_h |
| OLD | NEW |