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

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

Issue 1320013005: Make CSSParserMode parameter not optional for MutableStylePropertySet::create() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/commands/ApplyStyleCommand.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/commands/EditorCommand.cpp
diff --git a/Source/core/editing/commands/EditorCommand.cpp b/Source/core/editing/commands/EditorCommand.cpp
index 546c0dabfb9d5008efae0e4428648de28f9ba2ae..da3e37bd9fc0582dd58f57c27d350b6c52cf3869 100644
--- a/Source/core/editing/commands/EditorCommand.cpp
+++ b/Source/core/editing/commands/EditorCommand.cpp
@@ -120,14 +120,14 @@ static bool applyCommandToFrame(LocalFrame& frame, EditorCommandSource source, E
static bool executeApplyStyle(LocalFrame& frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, const String& propertyValue)
{
- RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
+ RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
style->setProperty(propertyID, propertyValue);
return applyCommandToFrame(frame, source, action, style.get());
}
static bool executeApplyStyle(LocalFrame& frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, CSSValueID propertyValue)
{
- RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
+ RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
style->setProperty(propertyID, propertyValue);
return applyCommandToFrame(frame, source, action, style.get());
}
@@ -155,7 +155,7 @@ static bool executeToggleStyleInList(LocalFrame& frame, EditorCommandSource sour
}
// FIXME: We shouldn't be having to convert new style into text. We should have setPropertyCSSValue.
- RefPtrWillBeRawPtr<MutableStylePropertySet> newMutableStyle = MutableStylePropertySet::create();
+ RefPtrWillBeRawPtr<MutableStylePropertySet> newMutableStyle = MutableStylePropertySet::create(HTMLQuirksMode);
newMutableStyle->setProperty(propertyID, newStyle);
return applyCommandToFrame(frame, source, action, newMutableStyle.get());
}
@@ -178,7 +178,7 @@ static bool executeToggleStyle(LocalFrame& frame, EditorCommandSource source, Ed
static bool executeApplyParagraphStyle(LocalFrame& frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, const String& propertyValue)
{
- RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
+ RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
style->setProperty(propertyID, propertyValue);
// FIXME: We don't call shouldApplyStyle when the source is DOM; is there a good reason for that?
switch (source) {
@@ -610,7 +610,7 @@ static bool executeJustifyRight(LocalFrame& frame, Event*, EditorCommandSource s
static bool executeMakeTextWritingDirectionLeftToRight(LocalFrame& frame, Event*, EditorCommandSource, const String&)
{
- RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
+ RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
style->setProperty(CSSPropertyUnicodeBidi, CSSValueEmbed);
style->setProperty(CSSPropertyDirection, CSSValueLtr);
frame.editor().applyStyle(style.get(), EditActionSetWritingDirection);
@@ -619,7 +619,7 @@ static bool executeMakeTextWritingDirectionLeftToRight(LocalFrame& frame, Event*
static bool executeMakeTextWritingDirectionNatural(LocalFrame& frame, Event*, EditorCommandSource, const String&)
{
- RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
+ RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
style->setProperty(CSSPropertyUnicodeBidi, CSSValueNormal);
frame.editor().applyStyle(style.get(), EditActionSetWritingDirection);
return true;
@@ -627,7 +627,7 @@ static bool executeMakeTextWritingDirectionNatural(LocalFrame& frame, Event*, Ed
static bool executeMakeTextWritingDirectionRightToLeft(LocalFrame& frame, Event*, EditorCommandSource, const String&)
{
- RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
+ RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
style->setProperty(CSSPropertyUnicodeBidi, CSSValueEmbed);
style->setProperty(CSSPropertyDirection, CSSValueRtl);
frame.editor().applyStyle(style.get(), EditActionSetWritingDirection);
« no previous file with comments | « Source/core/editing/commands/ApplyStyleCommand.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698