OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class ContainerNode; | 50 class ContainerNode; |
51 class Document; | 51 class Document; |
52 class Element; | 52 class Element; |
53 class HTMLElement; | 53 class HTMLElement; |
54 class MutableStylePropertySet; | 54 class MutableStylePropertySet; |
55 class Node; | 55 class Node; |
56 class QualifiedName; | 56 class QualifiedName; |
57 class ComputedStyle; | 57 class ComputedStyle; |
58 class StylePropertySet; | 58 class StylePropertySet; |
59 | 59 |
60 class EditingStyle final : public GarbageCollectedFinalized<EditingStyle> { | 60 class EditingStyle final : public GarbageCollected<EditingStyle> { |
61 public: | 61 public: |
62 | 62 |
63 enum PropertiesToInclude { AllProperties, OnlyEditingInheritableProperties,
EditingPropertiesInEffect }; | 63 enum PropertiesToInclude { AllProperties, OnlyEditingInheritableProperties,
EditingPropertiesInEffect }; |
64 enum ShouldPreserveWritingDirection { PreserveWritingDirection, DoNotPreserv
eWritingDirection }; | 64 enum ShouldPreserveWritingDirection { PreserveWritingDirection, DoNotPreserv
eWritingDirection }; |
65 enum ShouldExtractMatchingStyle { ExtractMatchingStyle, DoNotExtractMatching
Style }; | 65 enum ShouldExtractMatchingStyle { ExtractMatchingStyle, DoNotExtractMatching
Style }; |
66 static float NoFontDelta; | 66 static float NoFontDelta; |
67 | 67 |
68 static EditingStyle* create() | 68 static EditingStyle* create() |
69 { | 69 { |
70 return new EditingStyle(); | 70 return new EditingStyle(); |
(...skipping 12 matching lines...) Expand all Loading... |
83 static EditingStyle* create(const StylePropertySet* style) | 83 static EditingStyle* create(const StylePropertySet* style) |
84 { | 84 { |
85 return new EditingStyle(style); | 85 return new EditingStyle(style); |
86 } | 86 } |
87 | 87 |
88 static EditingStyle* create(CSSPropertyID propertyID, const String& value) | 88 static EditingStyle* create(CSSPropertyID propertyID, const String& value) |
89 { | 89 { |
90 return new EditingStyle(propertyID, value); | 90 return new EditingStyle(propertyID, value); |
91 } | 91 } |
92 | 92 |
93 ~EditingStyle(); | |
94 | |
95 MutableStylePropertySet* style() { return m_mutableStyle.get(); } | 93 MutableStylePropertySet* style() { return m_mutableStyle.get(); } |
96 bool textDirection(WritingDirection&) const; | 94 bool textDirection(WritingDirection&) const; |
97 bool isEmpty() const; | 95 bool isEmpty() const; |
98 void overrideWithStyle(const StylePropertySet*); | 96 void overrideWithStyle(const StylePropertySet*); |
99 void clear(); | 97 void clear(); |
100 EditingStyle* copy() const; | 98 EditingStyle* copy() const; |
101 EditingStyle* extractAndRemoveBlockProperties(); | 99 EditingStyle* extractAndRemoveBlockProperties(); |
102 EditingStyle* extractAndRemoveTextDirection(); | 100 EditingStyle* extractAndRemoveTextDirection(); |
103 void removeBlockProperties(); | 101 void removeBlockProperties(); |
104 void removeStyleAddedByElement(Element*); | 102 void removeStyleAddedByElement(Element*); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 String m_applyFontSize; | 229 String m_applyFontSize; |
232 }; | 230 }; |
233 | 231 |
234 // FIXME: Remove these functions or make them non-global to discourage using CSS
StyleDeclaration directly. | 232 // FIXME: Remove these functions or make them non-global to discourage using CSS
StyleDeclaration directly. |
235 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); | 233 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); |
236 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); | 234 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); |
237 | 235 |
238 } // namespace blink | 236 } // namespace blink |
239 | 237 |
240 #endif // EditingStyle_h | 238 #endif // EditingStyle_h |
OLD | NEW |