| 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/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/InspectorTypeBuilder.h" | 9 #include "core/InspectorTypeBuilder.h" |
| 10 #include "platform/geometry/FloatQuad.h" | 10 #include "platform/geometry/FloatQuad.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 Color border; | 28 Color border; |
| 29 Color margin; | 29 Color margin; |
| 30 Color eventTarget; | 30 Color eventTarget; |
| 31 Color shape; | 31 Color shape; |
| 32 Color shapeMargin; | 32 Color shapeMargin; |
| 33 | 33 |
| 34 bool showInfo; | 34 bool showInfo; |
| 35 bool showRulers; | 35 bool showRulers; |
| 36 bool showExtensionLines; | 36 bool showExtensionLines; |
| 37 bool showLayoutEditor; | 37 bool showLayoutEditor; |
| 38 bool displayAsMaterial; |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 class CORE_EXPORT InspectorHighlight { | 41 class CORE_EXPORT InspectorHighlight { |
| 41 STACK_ALLOCATED(); | 42 STACK_ALLOCATED(); |
| 42 public: | 43 public: |
| 43 InspectorHighlight(Node*, const InspectorHighlightConfig&, bool appendElemen
tInfo); | 44 InspectorHighlight(Node*, const InspectorHighlightConfig&, bool appendElemen
tInfo); |
| 44 InspectorHighlight(); | 45 InspectorHighlight(); |
| 45 ~InspectorHighlight(); | 46 ~InspectorHighlight(); |
| 46 | 47 |
| 47 static bool getBoxModel(Node*, RefPtr<TypeBuilder::DOM::BoxModel>&); | 48 static bool getBoxModel(Node*, RefPtr<TypeBuilder::DOM::BoxModel>&); |
| 48 static InspectorHighlightConfig defaultConfig(); | 49 static InspectorHighlightConfig defaultConfig(); |
| 49 static bool buildNodeQuads(Node*, FloatQuad* content, FloatQuad* padding, Fl
oatQuad* border, FloatQuad* margin); | 50 static bool buildNodeQuads(Node*, FloatQuad* content, FloatQuad* padding, Fl
oatQuad* border, FloatQuad* margin); |
| 50 | 51 |
| 51 void appendPath(PassRefPtr<JSONArrayBase> path, const Color& fillColor, cons
t Color& outlineColor, const String& name = String()); | 52 void appendPath(PassRefPtr<JSONArrayBase> path, const Color& fillColor, cons
t Color& outlineColor, const String& name = String()); |
| 52 void appendQuad(const FloatQuad&, const Color& fillColor, const Color& outli
neColor = Color::transparent, const String& name = String()); | 53 void appendQuad(const FloatQuad&, const Color& fillColor, const Color& outli
neColor = Color::transparent, const String& name = String()); |
| 53 void appendEventTargetQuads(Node* eventTargetNode, const InspectorHighlightC
onfig&); | 54 void appendEventTargetQuads(Node* eventTargetNode, const InspectorHighlightC
onfig&); |
| 54 PassRefPtr<JSONObject> asJSONObject() const; | 55 PassRefPtr<JSONObject> asJSONObject() const; |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 void appendNodeHighlight(Node*, const InspectorHighlightConfig&); | 58 void appendNodeHighlight(Node*, const InspectorHighlightConfig&); |
| 58 void appendPathsForShapeOutside(Node*, const InspectorHighlightConfig&); | 59 void appendPathsForShapeOutside(Node*, const InspectorHighlightConfig&); |
| 59 | 60 |
| 60 RefPtr<JSONObject> m_elementInfo; | 61 RefPtr<JSONObject> m_elementInfo; |
| 61 RefPtr<JSONArray> m_highlightPaths; | 62 RefPtr<JSONArray> m_highlightPaths; |
| 62 bool m_showRulers; | 63 bool m_showRulers; |
| 63 bool m_showExtensionLines; | 64 bool m_showExtensionLines; |
| 65 bool m_displayAsMaterial; |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 } // namespace blink | 68 } // namespace blink |
| 67 | 69 |
| 68 #endif // InspectorHighlight_h | 70 #endif // InspectorHighlight_h |
| OLD | NEW |