Changeset 95050 in webkit
- Timestamp:
- Sep 13, 2011 3:31:24 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95047 r95050 1 2011-09-13 Kiyoto Tamura <owenestea@gmail.com> 2 3 For compatibility, execCommand should support deprecated 'useCSS' alias for 'styleWithCSS' 4 https://bugs.webkit.org/show_bug.cgi?id=36683 5 6 Reviewed by Ryosuke Niwa. 7 8 Testing useCSS, the command previously unsupported by WebKit. Also, we are testing 9 styleWithCSS accepts anything that is not the boolean false or the string "false" as true. 10 Furthermore, we test that queryCommandValue/State('useCSS') return boolean false and 11 queryCommandValue/State('useStyleWithCSS') returns booleans (as opposed to 'true'/'false' 12 strings) 13 14 * editing/execCommand/style-with-css-expected.txt: Added. 15 * editing/execCommand/style-with-css.html: Added. 16 * editing/execCommand/use-css-expected.txt: Added. 17 * editing/execCommand/use-css.html: Added. 18 1 19 2011-09-13 Tim Horton <timothy_horton@apple.com> 2 20 -
trunk/Source/WebCore/ChangeLog
r95049 r95050 1 2011-09-13 Kiyoto Tamura <owenestea@gmail.com> 2 3 For compatibility, execCommand should support deprecated 'useCSS' alias for 'styleWithCSS' 4 https://bugs.webkit.org/show_bug.cgi?id=36683 5 6 Reviewed by Ryosuke Niwa. 7 8 In addition to supporting the deprecated 'useCSS', 'styleWithCSS' now accepts any argument other than 9 the boolean false or the case-insensitive string "false". This is per 10 http://aryeh.name/spec/editing/editing.html#the-stylewithcss-command 11 12 Tests: editing/execCommand/style-with-css.html 13 editing/execCommand/use-css.html 14 15 * editing/EditorCommand.cpp: 16 (WebCore::executeStyleWithCSS): 17 (WebCore::executeUseCSS): 18 (WebCore::createCommandMap): 19 1 20 2011-09-13 Anders Carlsson <andersca@apple.com> 2 21 -
trunk/Source/WebCore/editing/EditorCommand.cpp
r89293 r95050 1018 1018 static bool executeStyleWithCSS(Frame* frame, Event*, EditorCommandSource, const String& value) 1019 1019 { 1020 if (value != "false" && value != "true") 1021 return false; 1022 1023 frame->editor()->setShouldStyleWithCSS(value == "true" ? true : false); 1020 frame->editor()->setShouldStyleWithCSS(!equalIgnoringCase(value, "false")); 1021 return true; 1022 } 1023 1024 static bool executeUseCSS(Frame* frame, Event*, EditorCommandSource, const String& value) 1025 { 1026 frame->editor()->setShouldStyleWithCSS(equalIgnoringCase(value, "false")); 1024 1027 return true; 1025 1028 } … … 1535 1538 { "Unscript", { executeUnscript, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1536 1539 { "Unselect", { executeUnselect, supported, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1540 { "UseCSS", { executeUseCSS, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1537 1541 { "Yank", { executeYank, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1538 1542 { "YankAndSelect", { executeYankAndSelect, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
Note: See TracChangeset
for help on using the changeset viewer.