Changeset 117721 in webkit


Ignore:
Timestamp:
May 20, 2012 6:47:16 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Unsupported commands should have queryCommandValue() = "", not false
https://bugs.webkit.org/show_bug.cgi?id=86964

Patch by Joe Thomas <joethomas@motorola.com> on 2012-05-20
Reviewed by Ryosuke Niwa.

queryCommandValue for unsupported commands should return empty string.
The specification related to this can be located at http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#methods-to-query-and-execute-commands

Source/WebCore:

Test: editing/execCommand/queryCommandValue-unsupported-commands.html

  • dom/Document.idl:

LayoutTests:

  • editing/execCommand/queryCommandValue-unsupported-commands-expected.txt: Added.
  • editing/execCommand/queryCommandValue-unsupported-commands.html: Added.
  • editing/execCommand/use-css-expected.txt:
  • editing/execCommand/use-css.html:
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r117717 r117721  
     12012-05-20  Joe Thomas  <joethomas@motorola.com>
     2
     3        Unsupported commands should have queryCommandValue() = "", not false
     4        https://bugs.webkit.org/show_bug.cgi?id=86964
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        queryCommandValue for unsupported commands should return empty string.
     9        The specification related to this can be located at http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#methods-to-query-and-execute-commands
     10
     11        * editing/execCommand/queryCommandValue-unsupported-commands-expected.txt: Added.
     12        * editing/execCommand/queryCommandValue-unsupported-commands.html: Added.
     13        * editing/execCommand/use-css-expected.txt:
     14        * editing/execCommand/use-css.html:
     15
    1162012-05-20  Philippe Normand  <pnormand@igalia.com>
    217
  • trunk/LayoutTests/editing/execCommand/use-css-expected.txt

    r95050 r117721  
    1010PASS useCSS changed the state successfully
    1111PASS queryCommandState('useCSS') returns false
    12 PASS queryCommandValue('useCSS') returns false
     12PASS queryCommandValue('useCSS') returns ''
    1313PASS one underline command converted test to <span style="text-decoration: underline;">test</span>
    1414PASS successfullyParsed is true
  • trunk/LayoutTests/editing/execCommand/use-css.html

    r99258 r117721  
    4646    testFailed("queryCommandState('useCSS') should return boolean false");
    4747
    48 if (document.queryCommandValue('useCSS') === false)
    49     testPassed("queryCommandValue('useCSS') returns false");
     48if (document.queryCommandValue('useCSS') === "")
     49    testPassed("queryCommandValue('useCSS') returns ''");
    5050else
    51     testFailed("queryCommandValue('useCSS') should return boolean false");
     51    testFailed("queryCommandValue('useCSS') should return string ''");
    5252
    5353testSingleToggle("underline", "test", "<span style=\"text-decoration: underline;\">test</span>");
  • trunk/Source/WebCore/ChangeLog

    r117719 r117721  
     12012-05-20  Joe Thomas  <joethomas@motorola.com>
     2
     3        Unsupported commands should have queryCommandValue() = "", not false
     4        https://bugs.webkit.org/show_bug.cgi?id=86964
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        queryCommandValue for unsupported commands should return empty string.
     9        The specification related to this can be located at http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#methods-to-query-and-execute-commands
     10
     11        Test: editing/execCommand/queryCommandValue-unsupported-commands.html
     12
     13        * dom/Document.idl:
     14
    1152012-05-20  Kentaro Hara  <haraken@chromium.org>
    216
  • trunk/Source/WebCore/dom/Document.idl

    r111028 r117721  
    142142        boolean            queryCommandState(in [Optional=DefaultIsUndefined] DOMString command);
    143143        boolean            queryCommandSupported(in [Optional=DefaultIsUndefined] DOMString command);
    144         [TreatReturnedNullStringAs=False] DOMString queryCommandValue(in [Optional=DefaultIsUndefined] DOMString command);
     144        DOMString          queryCommandValue(in [Optional=DefaultIsUndefined] DOMString command);
    145145
    146146        // Moved down from HTMLDocument
Note: See TracChangeset for help on using the changeset viewer.