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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 static EditingStyle* styleAtSelectionStart(const VisibleSelection&, bool sho uldUseBackgroundColorInEffect = false, MutableStylePropertySet* styleToCheck = n ullptr); | 138 static EditingStyle* styleAtSelectionStart(const VisibleSelection&, bool sho uldUseBackgroundColorInEffect = false, MutableStylePropertySet* styleToCheck = n ullptr); |
139 static WritingDirection textDirectionForSelection(const VisibleSelection&, E ditingStyle* typingStyle, bool& hasNestedOrMultipleEmbeddings); | 139 static WritingDirection textDirectionForSelection(const VisibleSelection&, E ditingStyle* typingStyle, bool& hasNestedOrMultipleEmbeddings); |
140 static bool isEmbedOrIsolate(CSSValueID unicodeBidi) | 140 static bool isEmbedOrIsolate(CSSValueID unicodeBidi) |
141 { | 141 { |
142 return unicodeBidi == CSSValueIsolate || unicodeBidi == CSSValueWebkitIs olate || unicodeBidi == CSSValueEmbed; | 142 return unicodeBidi == CSSValueIsolate || unicodeBidi == CSSValueWebkitIs olate || unicodeBidi == CSSValueEmbed; |
143 } | 143 } |
144 | 144 |
145 DECLARE_TRACE(); | 145 DECLARE_TRACE(); |
146 | 146 |
147 private: | 147 private: |
148 EditingStyle(); | 148 EditingStyle() { } |
yosin_UTC9
2016/06/06 01:46:33
nit: s/{ }/= default;/
| |
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 ComputedStyle*); | 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 ComputedStyle*, CSSComputedSty leDeclaration*); | 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 Member<MutableStylePropertySet> m_mutableStyle; | 163 Member<MutableStylePropertySet> m_mutableStyle; |
164 bool m_isMonospaceFont; | 164 bool m_isMonospaceFont = false; |
165 float m_fontSizeDelta; | 165 float m_fontSizeDelta = NoFontDelta; |
166 bool m_isVerticalAlign = false; | 166 bool m_isVerticalAlign = false; |
167 | 167 |
168 friend class HTMLElementEquivalent; | 168 friend class HTMLElementEquivalent; |
169 friend class HTMLAttributeEquivalent; | 169 friend class HTMLAttributeEquivalent; |
170 }; | 170 }; |
171 | 171 |
172 class StyleChange { | 172 class StyleChange { |
173 DISALLOW_NEW(); | 173 DISALLOW_NEW(); |
174 public: | 174 public: |
175 StyleChange() | 175 StyleChange() |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
230 String m_applyFontSize; | 230 String m_applyFontSize; |
231 }; | 231 }; |
232 | 232 |
233 // FIXME: Remove these functions or make them non-global to discourage using CSS StyleDeclaration directly. | 233 // FIXME: Remove these functions or make them non-global to discourage using CSS StyleDeclaration directly. |
234 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); | 234 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); |
235 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); | 235 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); |
236 | 236 |
237 } // namespace blink | 237 } // namespace blink |
238 | 238 |
239 #endif // EditingStyle_h | 239 #endif // EditingStyle_h |
OLD | NEW |