Commit 6b7cce94 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

EditorCommand calls setProperty with the wrong parameters.

https://bugs.webkit.org/show_bug.cgi?id=98896

Patch by Mike West <mkwst@google.com> on 2012-10-10
Reviewed by Jochen Eisinger.

EditorCommand::executeToggleStyleInList calls
StylePropertySet::setProperty with an ExceptionCode as the final
argument. This only succeeds because it's automagically cast to a bool,
which is what the method actually expects.

Implicitly passing in 'false' by dropping the parameter shouldn't change
any visible functionality; no new tests are required.

* editing/EditorCommand.cpp:
(WebCore::executeToggleStyleInList):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3ab155cb
2012-10-10 Mike West <mkwst@google.com>
EditorCommand calls setProperty with the wrong parameters.
https://bugs.webkit.org/show_bug.cgi?id=98896
Reviewed by Jochen Eisinger.
EditorCommand::executeToggleStyleInList calls
StylePropertySet::setProperty with an ExceptionCode as the final
argument. This only succeeds because it's automagically cast to a bool,
which is what the method actually expects.
Implicitly passing in 'false' by dropping the parameter shouldn't change
any visible functionality; no new tests are required.
* editing/EditorCommand.cpp:
(WebCore::executeToggleStyleInList):
2012-10-10 Mike West <mkwst@google.com>
HTMLTextFormControlElement calls setInlineStyleProperty with the wrong parameters.
......
......@@ -134,7 +134,6 @@ static bool executeApplyStyle(Frame* frame, EditorCommandSource source, EditActi
// until https://bugs.webkit.org/show_bug.cgi?id=27818 is resolved.
static bool executeToggleStyleInList(Frame* frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, CSSValue* value)
{
ExceptionCode ec = 0;
RefPtr<EditingStyle> selectionStyle = EditingStyle::styleAtSelectionStart(frame->selection()->selection());
if (!selectionStyle || !selectionStyle->style())
return false;
......@@ -153,7 +152,7 @@ static bool executeToggleStyleInList(Frame* frame, EditorCommandSource source, E
// FIXME: We shouldn't be having to convert new style into text. We should have setPropertyCSSValue.
RefPtr<StylePropertySet> newMutableStyle = StylePropertySet::create();
newMutableStyle->setProperty(propertyID, newStyle, ec);
newMutableStyle->setProperty(propertyID, newStyle);
return applyCommandToFrame(frame, source, action, newMutableStyle.get());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment