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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/ApplyBlockElementCommand.cpp ('k') | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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
OLDNEW
« no previous file with comments | « Source/core/editing/ApplyBlockElementCommand.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698