| 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/LayoutEditor.h" | 6 #include "core/inspector/LayoutEditor.h" |
| 7 | 7 |
| 8 #include "core/css/CSSComputedStyleDeclaration.h" | 8 #include "core/css/CSSComputedStyleDeclaration.h" |
| 9 #include "core/css/CSSPrimitiveValue.h" | 9 #include "core/css/CSSPrimitiveValue.h" |
| 10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } // namespace | 52 } // namespace |
| 53 | 53 |
| 54 LayoutEditor::LayoutEditor(InspectorCSSAgent* cssAgent) | 54 LayoutEditor::LayoutEditor(InspectorCSSAgent* cssAgent) |
| 55 : m_node(nullptr) | 55 : m_node(nullptr) |
| 56 , m_cssAgent(cssAgent) | 56 , m_cssAgent(cssAgent) |
| 57 , m_changingProperty(CSSPropertyInvalid) | 57 , m_changingProperty(CSSPropertyInvalid) |
| 58 , m_propertyInitialValue(0) | 58 , m_propertyInitialValue(0) |
| 59 { | 59 { |
| 60 } | 60 } |
| 61 | 61 |
| 62 DEFINE_TRACE(LayoutEditor) |
| 63 { |
| 64 visitor->trace(m_node); |
| 65 visitor->trace(m_cssAgent); |
| 66 } |
| 67 |
| 62 void LayoutEditor::setNode(Node* node) | 68 void LayoutEditor::setNode(Node* node) |
| 63 { | 69 { |
| 64 m_node = node; | 70 m_node = node; |
| 65 m_changingProperty = CSSPropertyInvalid; | 71 m_changingProperty = CSSPropertyInvalid; |
| 66 m_propertyInitialValue = 0; | 72 m_propertyInitialValue = 0; |
| 67 } | 73 } |
| 68 | 74 |
| 69 PassRefPtr<JSONObject> LayoutEditor::buildJSONInfo() const | 75 PassRefPtr<JSONObject> LayoutEditor::buildJSONInfo() const |
| 70 { | 76 { |
| 71 if (!m_node) | 77 if (!m_node) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 m_cssAgent->setCSSPropertyValue(m_node.get(), m_changingProperty, cssDel
ta + m_propertyInitialValue); | 149 m_cssAgent->setCSSPropertyValue(m_node.get(), m_changingProperty, cssDel
ta + m_propertyInitialValue); |
| 144 } | 150 } |
| 145 | 151 |
| 146 void LayoutEditor::overlayEndedPropertyChange() | 152 void LayoutEditor::overlayEndedPropertyChange() |
| 147 { | 153 { |
| 148 m_changingProperty = CSSPropertyInvalid; | 154 m_changingProperty = CSSPropertyInvalid; |
| 149 m_propertyInitialValue = 0; | 155 m_propertyInitialValue = 0; |
| 150 } | 156 } |
| 151 | 157 |
| 152 } // namespace blink | 158 } // namespace blink |
| OLD | NEW |