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

Unified Diff: Source/core/editing/EditorCommand.cpp

Issue 15864004: Move create() methods from StylePropertySet to MutableStylePropertySet. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/Editor.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditorCommand.cpp
diff --git a/Source/core/editing/EditorCommand.cpp b/Source/core/editing/EditorCommand.cpp
index fb0de000a152442bb7faf51ad5e21d1bf6657c0f..c0572b436c934bc7f9e119cbb5da09b734f2c7a2 100644
--- a/Source/core/editing/EditorCommand.cpp
+++ b/Source/core/editing/EditorCommand.cpp
@@ -118,14 +118,14 @@ static bool applyCommandToFrame(Frame* frame, EditorCommandSource source, EditAc
static bool executeApplyStyle(Frame* frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, const String& propertyValue)
{
- RefPtr<StylePropertySet> style = StylePropertySet::create();
+ RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
style->setProperty(propertyID, propertyValue);
return applyCommandToFrame(frame, source, action, style.get());
}
static bool executeApplyStyle(Frame* frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, int propertyValue)
{
- RefPtr<StylePropertySet> style = StylePropertySet::create();
+ RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
style->setProperty(propertyID, propertyValue);
return applyCommandToFrame(frame, source, action, style.get());
}
@@ -152,7 +152,7 @@ static bool executeToggleStyleInList(Frame* frame, EditorCommandSource source, E
newStyle = value->cssText();
// FIXME: We shouldn't be having to convert new style into text. We should have setPropertyCSSValue.
- RefPtr<StylePropertySet> newMutableStyle = StylePropertySet::create();
+ RefPtr<MutableStylePropertySet> newMutableStyle = MutableStylePropertySet::create();
newMutableStyle->setProperty(propertyID, newStyle);
return applyCommandToFrame(frame, source, action, newMutableStyle.get());
}
@@ -175,7 +175,7 @@ static bool executeToggleStyle(Frame* frame, EditorCommandSource source, EditAct
static bool executeApplyParagraphStyle(Frame* frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, const String& propertyValue)
{
- RefPtr<StylePropertySet> style = StylePropertySet::create();
+ RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
style->setProperty(propertyID, propertyValue);
// FIXME: We don't call shouldApplyStyle when the source is DOM; is there a good reason for that?
switch (source) {
@@ -588,7 +588,7 @@ static bool executeJustifyRight(Frame* frame, Event*, EditorCommandSource source
static bool executeMakeTextWritingDirectionLeftToRight(Frame* frame, Event*, EditorCommandSource, const String&)
{
- RefPtr<StylePropertySet> style = StylePropertySet::create();
+ RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
style->setProperty(CSSPropertyUnicodeBidi, CSSValueEmbed);
style->setProperty(CSSPropertyDirection, CSSValueLtr);
frame->editor()->applyStyle(style.get(), EditActionSetWritingDirection);
@@ -597,7 +597,7 @@ static bool executeMakeTextWritingDirectionLeftToRight(Frame* frame, Event*, Edi
static bool executeMakeTextWritingDirectionNatural(Frame* frame, Event*, EditorCommandSource, const String&)
{
- RefPtr<StylePropertySet> style = StylePropertySet::create();
+ RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
style->setProperty(CSSPropertyUnicodeBidi, CSSValueNormal);
frame->editor()->applyStyle(style.get(), EditActionSetWritingDirection);
return true;
@@ -605,7 +605,7 @@ static bool executeMakeTextWritingDirectionNatural(Frame* frame, Event*, EditorC
static bool executeMakeTextWritingDirectionRightToLeft(Frame* frame, Event*, EditorCommandSource, const String&)
{
- RefPtr<StylePropertySet> style = StylePropertySet::create();
+ RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
style->setProperty(CSSPropertyUnicodeBidi, CSSValueEmbed);
style->setProperty(CSSPropertyDirection, CSSValueRtl);
frame->editor()->applyStyle(style.get(), EditActionSetWritingDirection);
« no previous file with comments | « Source/core/editing/Editor.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698