| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class CSSStyleDeclaration; | 49 class CSSStyleDeclaration; |
| 50 class CSSComputedStyleDeclaration; | 50 class CSSComputedStyleDeclaration; |
| 51 class ContainerNode; | 51 class ContainerNode; |
| 52 class Document; | 52 class Document; |
| 53 class Element; | 53 class Element; |
| 54 class HTMLElement; | 54 class HTMLElement; |
| 55 class MutableStylePropertySet; | 55 class MutableStylePropertySet; |
| 56 class Node; | 56 class Node; |
| 57 class Position; | 57 class Position; |
| 58 class QualifiedName; | 58 class QualifiedName; |
| 59 class LayoutStyle; | 59 class ComputedStyle; |
| 60 class StylePropertySet; | 60 class StylePropertySet; |
| 61 class VisibleSelection; | 61 class VisibleSelection; |
| 62 | 62 |
| 63 class EditingStyle final : public RefCountedWillBeGarbageCollectedFinalized<Edit
ingStyle> { | 63 class EditingStyle final : public RefCountedWillBeGarbageCollectedFinalized<Edit
ingStyle> { |
| 64 public: | 64 public: |
| 65 | 65 |
| 66 enum PropertiesToInclude { AllProperties, OnlyEditingInheritableProperties,
EditingPropertiesInEffect }; | 66 enum PropertiesToInclude { AllProperties, OnlyEditingInheritableProperties,
EditingPropertiesInEffect }; |
| 67 enum ShouldPreserveWritingDirection { PreserveWritingDirection, DoNotPreserv
eWritingDirection }; | 67 enum ShouldPreserveWritingDirection { PreserveWritingDirection, DoNotPreserv
eWritingDirection }; |
| 68 enum ShouldExtractMatchingStyle { ExtractMatchingStyle, DoNotExtractMatching
Style }; | 68 enum ShouldExtractMatchingStyle { ExtractMatchingStyle, DoNotExtractMatching
Style }; |
| 69 static float NoFontDelta; | 69 static float NoFontDelta; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 DECLARE_TRACE(); | 145 DECLARE_TRACE(); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 EditingStyle(); | 148 EditingStyle(); |
| 149 EditingStyle(ContainerNode*, PropertiesToInclude); | 149 EditingStyle(ContainerNode*, PropertiesToInclude); |
| 150 EditingStyle(const Position&, PropertiesToInclude); | 150 EditingStyle(const Position&, PropertiesToInclude); |
| 151 explicit EditingStyle(const StylePropertySet*); | 151 explicit EditingStyle(const StylePropertySet*); |
| 152 EditingStyle(CSSPropertyID, const String& value); | 152 EditingStyle(CSSPropertyID, const String& value); |
| 153 void init(Node*, PropertiesToInclude); | 153 void init(Node*, PropertiesToInclude); |
| 154 void removeTextFillAndStrokeColorsIfNeeded(const LayoutStyle*); | 154 void removeTextFillAndStrokeColorsIfNeeded(const ComputedStyle*); |
| 155 void setProperty(CSSPropertyID, const String& value, bool important = false)
; | 155 void setProperty(CSSPropertyID, const String& value, bool important = false)
; |
| 156 void replaceFontSizeByKeywordIfPossible(const LayoutStyle*, CSSComputedStyle
Declaration*); | 156 void replaceFontSizeByKeywordIfPossible(const ComputedStyle*, CSSComputedSty
leDeclaration*); |
| 157 void extractFontSizeDelta(); | 157 void extractFontSizeDelta(); |
| 158 TriState triStateOfStyle(CSSStyleDeclaration* styleToCompare, ShouldIgnoreTe
xtOnlyProperties) const; | 158 TriState triStateOfStyle(CSSStyleDeclaration* styleToCompare, ShouldIgnoreTe
xtOnlyProperties) const; |
| 159 bool conflictsWithInlineStyleOfElement(HTMLElement*, EditingStyle* extracted
Style, Vector<CSSPropertyID>* conflictingProperties) const; | 159 bool conflictsWithInlineStyleOfElement(HTMLElement*, EditingStyle* extracted
Style, Vector<CSSPropertyID>* conflictingProperties) const; |
| 160 void mergeInlineAndImplicitStyleOfElement(Element*, CSSPropertyOverrideMode,
PropertiesToInclude); | 160 void mergeInlineAndImplicitStyleOfElement(Element*, CSSPropertyOverrideMode,
PropertiesToInclude); |
| 161 void mergeStyle(const StylePropertySet*, CSSPropertyOverrideMode); | 161 void mergeStyle(const StylePropertySet*, CSSPropertyOverrideMode); |
| 162 | 162 |
| 163 RefPtrWillBeMember<MutableStylePropertySet> m_mutableStyle; | 163 RefPtrWillBeMember<MutableStylePropertySet> m_mutableStyle; |
| 164 FixedPitchFontType m_fixedPitchFontType; | 164 FixedPitchFontType m_fixedPitchFontType; |
| 165 float m_fontSizeDelta; | 165 float m_fontSizeDelta; |
| 166 | 166 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 String m_applyFontSize; | 228 String m_applyFontSize; |
| 229 }; | 229 }; |
| 230 | 230 |
| 231 // FIXME: Remove these functions or make them non-global to discourage using CSS
StyleDeclaration directly. | 231 // FIXME: Remove these functions or make them non-global to discourage using CSS
StyleDeclaration directly. |
| 232 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); | 232 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); |
| 233 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); | 233 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); |
| 234 | 234 |
| 235 } // namespace blink | 235 } // namespace blink |
| 236 | 236 |
| 237 #endif // EditingStyle_h | 237 #endif // EditingStyle_h |
| OLD | NEW |