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

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

Issue 22353004: background-color and text-decoration are not preserved when merging paragraphs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 4 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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool isEmpty() const; 104 bool isEmpty() const;
105 void setStyle(PassRefPtr<MutableStylePropertySet>); 105 void setStyle(PassRefPtr<MutableStylePropertySet>);
106 void overrideWithStyle(const StylePropertySet*); 106 void overrideWithStyle(const StylePropertySet*);
107 void clear(); 107 void clear();
108 PassRefPtr<EditingStyle> copy() const; 108 PassRefPtr<EditingStyle> copy() const;
109 PassRefPtr<EditingStyle> extractAndRemoveBlockProperties(); 109 PassRefPtr<EditingStyle> extractAndRemoveBlockProperties();
110 PassRefPtr<EditingStyle> extractAndRemoveTextDirection(); 110 PassRefPtr<EditingStyle> extractAndRemoveTextDirection();
111 void removeBlockProperties(); 111 void removeBlockProperties();
112 void removeStyleAddedByNode(Node*); 112 void removeStyleAddedByNode(Node*);
113 void removeStyleConflictingWithStyleOfNode(Node*); 113 void removeStyleConflictingWithStyleOfNode(Node*);
114 void removeNonEditingProperties();
115 void collapseTextDecorationProperties(); 114 void collapseTextDecorationProperties();
116 enum ShouldIgnoreTextOnlyProperties { IgnoreTextOnlyProperties, DoNotIgnoreT extOnlyProperties }; 115 enum ShouldIgnoreTextOnlyProperties { IgnoreTextOnlyProperties, DoNotIgnoreT extOnlyProperties };
117 TriState triStateOfStyle(EditingStyle*) const; 116 TriState triStateOfStyle(EditingStyle*) const;
118 TriState triStateOfStyle(const VisibleSelection&) const; 117 TriState triStateOfStyle(const VisibleSelection&) const;
119 bool conflictsWithInlineStyleOfElement(Element* element) const { return conf lictsWithInlineStyleOfElement(element, 0, 0); } 118 bool conflictsWithInlineStyleOfElement(Element* element) const { return conf lictsWithInlineStyleOfElement(element, 0, 0); }
120 bool conflictsWithInlineStyleOfElement(Element* element, EditingStyle* extra ctedStyle, Vector<CSSPropertyID>& conflictingProperties) const 119 bool conflictsWithInlineStyleOfElement(Element* element, EditingStyle* extra ctedStyle, Vector<CSSPropertyID>& conflictingProperties) const
121 { 120 {
122 return conflictsWithInlineStyleOfElement(element, extractedStyle, &confl ictingProperties); 121 return conflictsWithInlineStyleOfElement(element, extractedStyle, &confl ictingProperties);
123 } 122 }
124 bool conflictsWithImplicitStyleOfElement(HTMLElement*, EditingStyle* extract edStyle = 0, ShouldExtractMatchingStyle = DoNotExtractMatchingStyle) const; 123 bool conflictsWithImplicitStyleOfElement(HTMLElement*, EditingStyle* extract edStyle = 0, ShouldExtractMatchingStyle = DoNotExtractMatchingStyle) const;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 String m_applyFontSize; 231 String m_applyFontSize;
233 }; 232 };
234 233
235 // 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.
236 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID); 235 CSSValueID getIdentifierValue(CSSStyleDeclaration*, CSSPropertyID);
237 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID); 236 CSSValueID getIdentifierValue(StylePropertySet*, CSSPropertyID);
238 237
239 } // namespace WebCore 238 } // namespace WebCore
240 239
241 #endif // EditingStyle_h 240 #endif // EditingStyle_h
OLDNEW
« no previous file with comments | « LayoutTests/editing/deleting/merge-paragraph-from-span-with-style-expected.txt ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698