| 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 17 matching lines...) Expand all Loading... |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #ifndef EditingStyle_h | 32 #ifndef EditingStyle_h |
| 33 #define EditingStyle_h | 33 #define EditingStyle_h |
| 34 | 34 |
| 35 #include "CSSPropertyNames.h" | 35 #include "CSSPropertyNames.h" |
| 36 #include "CSSValueKeywords.h" | 36 #include "CSSValueKeywords.h" |
| 37 #include "core/editing/WritingDirection.h" | 37 #include "core/editing/WritingDirection.h" |
| 38 #include "heap/Handle.h" |
| 38 #include "wtf/Forward.h" | 39 #include "wtf/Forward.h" |
| 39 #include "wtf/RefCounted.h" | 40 #include "wtf/RefCounted.h" |
| 40 #include "wtf/RefPtr.h" | 41 #include "wtf/RefPtr.h" |
| 41 #include "wtf/TriState.h" | 42 #include "wtf/TriState.h" |
| 42 #include "wtf/Vector.h" | 43 #include "wtf/Vector.h" |
| 43 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
| 44 | 45 |
| 45 namespace WebCore { | 46 namespace WebCore { |
| 46 | 47 |
| 47 class CSSStyleDeclaration; | 48 class CSSStyleDeclaration; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 void init(Node*, PropertiesToInclude); | 149 void init(Node*, PropertiesToInclude); |
| 149 void removeTextFillAndStrokeColorsIfNeeded(RenderStyle*); | 150 void removeTextFillAndStrokeColorsIfNeeded(RenderStyle*); |
| 150 void setProperty(CSSPropertyID, const String& value, bool important = false)
; | 151 void setProperty(CSSPropertyID, const String& value, bool important = false)
; |
| 151 void replaceFontSizeByKeywordIfPossible(RenderStyle*, CSSComputedStyleDeclar
ation*); | 152 void replaceFontSizeByKeywordIfPossible(RenderStyle*, CSSComputedStyleDeclar
ation*); |
| 152 void extractFontSizeDelta(); | 153 void extractFontSizeDelta(); |
| 153 TriState triStateOfStyle(CSSStyleDeclaration* styleToCompare, ShouldIgnoreTe
xtOnlyProperties) const; | 154 TriState triStateOfStyle(CSSStyleDeclaration* styleToCompare, ShouldIgnoreTe
xtOnlyProperties) const; |
| 154 bool conflictsWithInlineStyleOfElement(Element*, EditingStyle* extractedStyl
e, Vector<CSSPropertyID>* conflictingProperties) const; | 155 bool conflictsWithInlineStyleOfElement(Element*, EditingStyle* extractedStyl
e, Vector<CSSPropertyID>* conflictingProperties) const; |
| 155 void mergeInlineAndImplicitStyleOfElement(Element*, CSSPropertyOverrideMode,
PropertiesToInclude); | 156 void mergeInlineAndImplicitStyleOfElement(Element*, CSSPropertyOverrideMode,
PropertiesToInclude); |
| 156 void mergeStyle(const StylePropertySet*, CSSPropertyOverrideMode); | 157 void mergeStyle(const StylePropertySet*, CSSPropertyOverrideMode); |
| 157 | 158 |
| 158 RefPtr<MutableStylePropertySet> m_mutableStyle; | 159 RefPtrWillBePersistent<MutableStylePropertySet> m_mutableStyle; |
| 159 bool m_shouldUseFixedDefaultFontSize; | 160 bool m_shouldUseFixedDefaultFontSize; |
| 160 float m_fontSizeDelta; | 161 float m_fontSizeDelta; |
| 161 | 162 |
| 162 friend class HTMLElementEquivalent; | 163 friend class HTMLElementEquivalent; |
| 163 friend class HTMLAttributeEquivalent; | 164 friend class HTMLAttributeEquivalent; |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 class StyleChange { | 167 class StyleChange { |
| 167 public: | 168 public: |
| 168 StyleChange() | 169 StyleChange() |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 String m_applyFontSize; | 224 String m_applyFontSize; |
| 224 }; | 225 }; |
| 225 | 226 |
| 226 // FIXME: Remove these functions or make them non-global to discourage using CSS
StyleDeclaration directly. | 227 // FIXME: Remove these functions or make them non-global to discourage using CSS
StyleDeclaration directly. |
| 227 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); | 228 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); |
| 228 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); | 229 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); |
| 229 | 230 |
| 230 } // namespace WebCore | 231 } // namespace WebCore |
| 231 | 232 |
| 232 #endif // EditingStyle_h | 233 #endif // EditingStyle_h |
| OLD | NEW |