| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 class ContainerNode; | 50 class ContainerNode; |
| 51 class Document; | 51 class Document; |
| 52 class Element; | 52 class Element; |
| 53 class HTMLElement; | 53 class HTMLElement; |
| 54 class MutableStylePropertySet; | 54 class MutableStylePropertySet; |
| 55 class Node; | 55 class Node; |
| 56 class QualifiedName; | 56 class QualifiedName; |
| 57 class ComputedStyle; | 57 class ComputedStyle; |
| 58 class StylePropertySet; | 58 class StylePropertySet; |
| 59 | 59 |
| 60 class EditingStyle final : public GarbageCollected<EditingStyle> { | 60 class EditingStyle final : public GarbageCollectedFinalized<EditingStyle> { |
| 61 public: | 61 public: |
| 62 | 62 |
| 63 enum PropertiesToInclude { AllProperties, OnlyEditingInheritableProperties,
EditingPropertiesInEffect }; | 63 enum PropertiesToInclude { AllProperties, OnlyEditingInheritableProperties,
EditingPropertiesInEffect }; |
| 64 enum ShouldPreserveWritingDirection { PreserveWritingDirection, DoNotPreserv
eWritingDirection }; | 64 enum ShouldPreserveWritingDirection { PreserveWritingDirection, DoNotPreserv
eWritingDirection }; |
| 65 enum ShouldExtractMatchingStyle { ExtractMatchingStyle, DoNotExtractMatching
Style }; | 65 enum ShouldExtractMatchingStyle { ExtractMatchingStyle, DoNotExtractMatching
Style }; |
| 66 static float NoFontDelta; | 66 static float NoFontDelta; |
| 67 | 67 |
| 68 static EditingStyle* create() | 68 static EditingStyle* create() |
| 69 { | 69 { |
| 70 return new EditingStyle(); | 70 return new EditingStyle(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 83 static EditingStyle* create(const StylePropertySet* style) | 83 static EditingStyle* create(const StylePropertySet* style) |
| 84 { | 84 { |
| 85 return new EditingStyle(style); | 85 return new EditingStyle(style); |
| 86 } | 86 } |
| 87 | 87 |
| 88 static EditingStyle* create(CSSPropertyID propertyID, const String& value) | 88 static EditingStyle* create(CSSPropertyID propertyID, const String& value) |
| 89 { | 89 { |
| 90 return new EditingStyle(propertyID, value); | 90 return new EditingStyle(propertyID, value); |
| 91 } | 91 } |
| 92 | 92 |
| 93 ~EditingStyle(); |
| 94 |
| 93 MutableStylePropertySet* style() { return m_mutableStyle.get(); } | 95 MutableStylePropertySet* style() { return m_mutableStyle.get(); } |
| 94 bool textDirection(WritingDirection&) const; | 96 bool textDirection(WritingDirection&) const; |
| 95 bool isEmpty() const; | 97 bool isEmpty() const; |
| 96 void overrideWithStyle(const StylePropertySet*); | 98 void overrideWithStyle(const StylePropertySet*); |
| 97 void clear(); | 99 void clear(); |
| 98 EditingStyle* copy() const; | 100 EditingStyle* copy() const; |
| 99 EditingStyle* extractAndRemoveBlockProperties(); | 101 EditingStyle* extractAndRemoveBlockProperties(); |
| 100 EditingStyle* extractAndRemoveTextDirection(); | 102 EditingStyle* extractAndRemoveTextDirection(); |
| 101 void removeBlockProperties(); | 103 void removeBlockProperties(); |
| 102 void removeStyleAddedByElement(Element*); | 104 void removeStyleAddedByElement(Element*); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 String m_applyFontSize; | 231 String m_applyFontSize; |
| 230 }; | 232 }; |
| 231 | 233 |
| 232 // FIXME: Remove these functions or make them non-global to discourage using CSS
StyleDeclaration directly. | 234 // FIXME: Remove these functions or make them non-global to discourage using CSS
StyleDeclaration directly. |
| 233 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); | 235 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); |
| 234 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); | 236 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); |
| 235 | 237 |
| 236 } // namespace blink | 238 } // namespace blink |
| 237 | 239 |
| 238 #endif // EditingStyle_h | 240 #endif // EditingStyle_h |
| OLD | NEW |