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/CSSStyleRule.h" | 11 #include "core/css/CSSRuleList.h" |
12 #include "core/dom/Element.h" | 12 #include "core/dom/Element.h" |
13 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
14 #include "wtf/PassOwnPtr.h" | 14 #include "wtf/PassOwnPtr.h" |
15 #include "wtf/RefPtr.h" | 15 #include "wtf/RefPtr.h" |
16 #include "wtf/text/WTFString.h" | 16 #include "wtf/text/WTFString.h" |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 | 19 |
20 class CSSPrimitiveValue; | 20 class CSSPrimitiveValue; |
21 class InspectorCSSAgent; | 21 class InspectorCSSAgent; |
(...skipping 20 matching lines...) Expand all Loading... |
42 void previousSelector(); | 42 void previousSelector(); |
43 String currentSelectorInfo(); | 43 String currentSelectorInfo(); |
44 | 44 |
45 DECLARE_TRACE(); | 45 DECLARE_TRACE(); |
46 | 46 |
47 private: | 47 private: |
48 LayoutEditor(InspectorCSSAgent*, InspectorDOMAgent*); | 48 LayoutEditor(InspectorCSSAgent*, InspectorDOMAgent*); |
49 RefPtrWillBeRawPtr<CSSPrimitiveValue> getPropertyCSSValue(CSSPropertyID) con
st; | 49 RefPtrWillBeRawPtr<CSSPrimitiveValue> getPropertyCSSValue(CSSPropertyID) con
st; |
50 PassRefPtr<JSONObject> createValueDescription(const String&) const; | 50 PassRefPtr<JSONObject> createValueDescription(const String&) const; |
51 void appendAnchorFor(JSONArray*, const String&, const String&, const FloatPo
int&, const FloatPoint&) const; | 51 void appendAnchorFor(JSONArray*, const String&, const String&, const FloatPo
int&, const FloatPoint&) const; |
52 void initializeCSSRules(); | 52 bool setCSSPropertyValueInCurrentRule(const String&); |
| 53 bool currentStyleIsInline(); |
53 | 54 |
54 RefPtrWillBeMember<Element> m_element; | 55 RefPtrWillBeMember<Element> m_element; |
55 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; | 56 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; |
56 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; | 57 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; |
57 CSSPropertyID m_changingProperty; | 58 CSSPropertyID m_changingProperty; |
58 float m_propertyInitialValue; | 59 float m_propertyInitialValue; |
59 float m_factor; | 60 float m_factor; |
60 CSSPrimitiveValue::UnitType m_valueUnitType; | 61 CSSPrimitiveValue::UnitType m_valueUnitType; |
61 bool m_isDirty; | 62 bool m_isDirty; |
62 | 63 |
63 WillBeHeapVector<RefPtrWillBeMember<CSSStyleRule>> m_matchedRules; | 64 RefPtrWillBeRawPtr<CSSRuleList> m_matchedRules; |
64 // -1 means "inline style". | 65 // When m_currentRuleIndex == m_matchedRules.length(), current style is inli
ne style. |
65 int m_currentRuleIndex; | 66 unsigned m_currentRuleIndex; |
66 }; | 67 }; |
67 | 68 |
68 } // namespace blink | 69 } // namespace blink |
69 | 70 |
70 | 71 |
71 #endif // !defined(LayoutEditor_h) | 72 #endif // !defined(LayoutEditor_h) |
OLD | NEW |