Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingStyle.h

Issue 2692553002: Remove the methods of EditingStyle class moved to EditingStyleUtilities class (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 const Position&, 144 const Position&,
145 ShouldPreserveWritingDirection = DoNotPreserveWritingDirection); 145 ShouldPreserveWritingDirection = DoNotPreserveWritingDirection);
146 void mergeTypingStyle(Document*); 146 void mergeTypingStyle(Document*);
147 enum CSSPropertyOverrideMode { OverrideValues, DoNotOverrideValues }; 147 enum CSSPropertyOverrideMode { OverrideValues, DoNotOverrideValues };
148 void mergeInlineStyleOfElement(HTMLElement*, 148 void mergeInlineStyleOfElement(HTMLElement*,
149 CSSPropertyOverrideMode, 149 CSSPropertyOverrideMode,
150 PropertiesToInclude = AllProperties); 150 PropertiesToInclude = AllProperties);
151 void mergeInlineAndImplicitStyleOfElement(Element*, 151 void mergeInlineAndImplicitStyleOfElement(Element*,
152 CSSPropertyOverrideMode, 152 CSSPropertyOverrideMode,
153 PropertiesToInclude); 153 PropertiesToInclude);
154 static EditingStyle* wrappingStyleForAnnotatedSerialization(
155 ContainerNode* context);
156 static EditingStyle* wrappingStyleForSerialization(ContainerNode* context);
157 void mergeStyleFromRules(Element*); 154 void mergeStyleFromRules(Element*);
158 void mergeStyleFromRulesForSerialization(Element*); 155 void mergeStyleFromRulesForSerialization(Element*);
159 void removeStyleFromRulesAndContext(Element*, ContainerNode* context); 156 void removeStyleFromRulesAndContext(Element*, ContainerNode* context);
160 void removePropertiesInElementDefaultStyle(Element*); 157 void removePropertiesInElementDefaultStyle(Element*);
161 void addAbsolutePositioningFromElement(const Element&); 158 void addAbsolutePositioningFromElement(const Element&);
162 void forceInline(); 159 void forceInline();
163 int legacyFontSize(Document*) const; 160 int legacyFontSize(Document*) const;
164 161
165 float fontSizeDelta() const { return m_fontSizeDelta; } 162 float fontSizeDelta() const { return m_fontSizeDelta; }
166 bool hasFontSizeDelta() const { return m_fontSizeDelta != NoFontDelta; } 163 bool hasFontSizeDelta() const { return m_fontSizeDelta != NoFontDelta; }
167 164
168 void setProperty(CSSPropertyID, const String& value, bool important = false); 165 void setProperty(CSSPropertyID, const String& value, bool important = false);
169 166
170 static EditingStyle* styleAtSelectionStart(
171 const VisibleSelection&,
172 bool shouldUseBackgroundColorInEffect = false,
173 MutableStylePropertySet* styleToCheck = nullptr);
174 static WritingDirection textDirectionForSelection(
175 const VisibleSelection&,
176 EditingStyle* typingStyle,
177 bool& hasNestedOrMultipleEmbeddings);
178 static bool isEmbedOrIsolate(CSSValueID unicodeBidi) {
179 return unicodeBidi == CSSValueIsolate ||
180 unicodeBidi == CSSValueWebkitIsolate || unicodeBidi == CSSValueEmbed;
181 }
182
183 DECLARE_TRACE(); 167 DECLARE_TRACE();
184 168
185 private: 169 private:
186 EditingStyle() = default; 170 EditingStyle() = default;
187 EditingStyle(ContainerNode*, PropertiesToInclude); 171 EditingStyle(ContainerNode*, PropertiesToInclude);
188 EditingStyle(const Position&, PropertiesToInclude); 172 EditingStyle(const Position&, PropertiesToInclude);
189 explicit EditingStyle(const StylePropertySet*); 173 explicit EditingStyle(const StylePropertySet*);
190 EditingStyle(CSSPropertyID, const String& value); 174 EditingStyle(CSSPropertyID, const String& value);
191 void init(Node*, PropertiesToInclude); 175 void init(Node*, PropertiesToInclude);
192 void removeInheritedColorsIfNeeded(const ComputedStyle*); 176 void removeInheritedColorsIfNeeded(const ComputedStyle*);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 }; 254 };
271 255
272 // FIXME: Remove these functions or make them non-global to discourage using 256 // FIXME: Remove these functions or make them non-global to discourage using
273 // CSSStyleDeclaration directly. 257 // CSSStyleDeclaration directly.
274 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); 258 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID);
275 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); 259 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID);
276 260
277 } // namespace blink 261 } // namespace blink
278 262
279 #endif // EditingStyle_h 263 #endif // EditingStyle_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698