| 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 NoBaseWillBeGarbageCollectedFinalized<Inspecto
    rHighlight> { |  36 class InspectorHighlight { | 
 |  37     STACK_ALLOCATED(); | 
|  37 public: |  38 public: | 
 |  39     InspectorHighlight(Node*, const InspectorHighlightConfig&, bool appendElemen
    tInfo); | 
 |  40     InspectorHighlight(); | 
|  38     ~InspectorHighlight(); |  41     ~InspectorHighlight(); | 
|  39  |  42  | 
|  40     static PassOwnPtrWillBeRawPtr<InspectorHighlight> create(Node*, const Inspec
    torHighlightConfig&, bool appendElementInfo); |  | 
|  41     static PassOwnPtrWillBeRawPtr<InspectorHighlight> create() |  | 
|  42     { |  | 
|  43         return adoptPtrWillBeNoop(new InspectorHighlight()); |  | 
|  44     } |  | 
|  45  |  | 
|  46     static bool getBoxModel(Node*, RefPtr<TypeBuilder::DOM::BoxModel>&); |  43     static bool getBoxModel(Node*, RefPtr<TypeBuilder::DOM::BoxModel>&); | 
|  47     static InspectorHighlightConfig defaultConfig(); |  44     static InspectorHighlightConfig defaultConfig(); | 
|  48  |  45  | 
|  49     void appendPath(PassRefPtr<JSONArrayBase> path, const Color& fillColor, cons
    t Color& outlineColor); |  46     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); |  47     void appendQuad(const FloatQuad&, const Color& fillColor, const Color& outli
    neColor = Color::transparent); | 
|  51     void appendEventTargetQuads(Node* eventTargetNode, const InspectorHighlightC
    onfig&); |  48     void appendEventTargetQuads(Node* eventTargetNode, const InspectorHighlightC
    onfig&); | 
|  52     PassRefPtr<JSONObject> asJSONObject() const; |  49     PassRefPtr<JSONObject> asJSONObject() const; | 
|  53  |  50  | 
|  54     DEFINE_INLINE_TRACE() { } |  51 private: | 
 |  52     void appendNodeHighlight(Node*, const InspectorHighlightConfig&); | 
 |  53     void appendPathsForShapeOutside(Node*, const InspectorHighlightConfig&); | 
|  55  |  54  | 
|  56 private: |  55     RefPtr<JSONObject> m_elementInfo; | 
|  57     InspectorHighlight(); |  56     RefPtr<JSONArray> m_highlightPaths; | 
|  58  |  | 
|  59     bool m_showRulers; |  57     bool m_showRulers; | 
|  60     bool m_showExtensionLines; |  58     bool m_showExtensionLines; | 
|  61     RefPtr<JSONObject> m_elementInfo; |  | 
|  62     RefPtr<JSONArray> m_highlightPaths; |  | 
|  63 }; |  59 }; | 
|  64  |  60  | 
|  65 } // namespace blink |  61 } // namespace blink | 
|  66  |  62  | 
|  67  |  | 
|  68 #endif // InspectorHighlight_h |  63 #endif // InspectorHighlight_h | 
| OLD | NEW |