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 LayoutEditor_h | 5 #ifndef LayoutEditor_h |
6 #define LayoutEditor_h | 6 #define LayoutEditor_h |
7 | 7 |
8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/css/CSSPrimitiveValue.h" | 10 #include "core/css/CSSPrimitiveValue.h" |
11 #include "core/css/CSSRuleList.h" | 11 #include "core/css/CSSRuleList.h" |
12 #include "core/dom/Element.h" | 12 #include "core/dom/Element.h" |
13 #include "platform/JSONValues.h" | |
14 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 14 #include "platform/inspector_protocol/Values.h" |
15 #include "wtf/PassOwnPtr.h" | 15 #include "wtf/PassOwnPtr.h" |
16 #include "wtf/RefPtr.h" | 16 #include "wtf/RefPtr.h" |
17 #include "wtf/text/WTFString.h" | 17 #include "wtf/text/WTFString.h" |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
21 class CSSPrimitiveValue; | 21 class CSSPrimitiveValue; |
22 class InspectorCSSAgent; | 22 class InspectorCSSAgent; |
23 class InspectorDOMAgent; | 23 class InspectorDOMAgent; |
24 class ScriptController; | 24 class ScriptController; |
(...skipping 15 matching lines...) Expand all Loading... |
40 void overlayEndedPropertyChange(); | 40 void overlayEndedPropertyChange(); |
41 void commitChanges(); | 41 void commitChanges(); |
42 void nextSelector(); | 42 void nextSelector(); |
43 void previousSelector(); | 43 void previousSelector(); |
44 void rebuild(); | 44 void rebuild(); |
45 DECLARE_TRACE(); | 45 DECLARE_TRACE(); |
46 | 46 |
47 private: | 47 private: |
48 LayoutEditor(Element*, InspectorCSSAgent*, InspectorDOMAgent*, ScriptControl
ler*); | 48 LayoutEditor(Element*, InspectorCSSAgent*, InspectorDOMAgent*, ScriptControl
ler*); |
49 RefPtrWillBeRawPtr<CSSPrimitiveValue> getPropertyCSSValue(CSSPropertyID) con
st; | 49 RefPtrWillBeRawPtr<CSSPrimitiveValue> getPropertyCSSValue(CSSPropertyID) con
st; |
50 PassRefPtr<JSONObject> createValueDescription(const String&); | 50 PassRefPtr<protocol::DictionaryValue> createValueDescription(const String&); |
51 void appendAnchorFor(JSONArray*, const String&, const String&); | 51 void appendAnchorFor(protocol::ListValue*, const String&, const String&); |
52 bool setCSSPropertyValueInCurrentRule(const String&); | 52 bool setCSSPropertyValueInCurrentRule(const String&); |
53 void editableSelectorUpdated(bool hasChanged) const; | 53 void editableSelectorUpdated(bool hasChanged) const; |
54 void evaluateInOverlay(const String&, PassRefPtr<JSONValue>) const; | 54 void evaluateInOverlay(const String&, PassRefPtr<protocol::Value>) const; |
55 PassRefPtr<JSONObject> currentSelectorInfo(CSSStyleDeclaration*) const; | 55 PassRefPtr<protocol::DictionaryValue> currentSelectorInfo(CSSStyleDeclaratio
n*) const; |
56 bool growInside(String propertyName, CSSPrimitiveValue*); | 56 bool growInside(String propertyName, CSSPrimitiveValue*); |
57 | 57 |
58 RefPtrWillBeMember<Element> m_element; | 58 RefPtrWillBeMember<Element> m_element; |
59 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; | 59 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; |
60 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; | 60 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; |
61 RawPtrWillBeMember<ScriptController> m_scriptController; | 61 RawPtrWillBeMember<ScriptController> m_scriptController; |
62 CSSPropertyID m_changingProperty; | 62 CSSPropertyID m_changingProperty; |
63 float m_propertyInitialValue; | 63 float m_propertyInitialValue; |
64 float m_factor; | 64 float m_factor; |
65 CSSPrimitiveValue::UnitType m_valueUnitType; | 65 CSSPrimitiveValue::UnitType m_valueUnitType; |
66 bool m_isDirty; | 66 bool m_isDirty; |
67 | 67 |
68 WillBeHeapVector<RefPtrWillBeMember<CSSStyleDeclaration>> m_matchedStyles; | 68 WillBeHeapVector<RefPtrWillBeMember<CSSStyleDeclaration>> m_matchedStyles; |
69 HashMap<String, bool> m_growsInside; | 69 HashMap<String, bool> m_growsInside; |
70 unsigned m_currentRuleIndex; | 70 unsigned m_currentRuleIndex; |
71 }; | 71 }; |
72 | 72 |
73 } // namespace blink | 73 } // namespace blink |
74 | 74 |
75 | 75 |
76 #endif // !defined(LayoutEditor_h) | 76 #endif // !defined(LayoutEditor_h) |
OLD | NEW |