Changeset 278974 in webkit


Ignore:
Timestamp:
Jun 16, 2021 10:39:51 PM (13 months ago)
Author:
Chris Dumez
Message:

Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents
https://bugs.webkit.org/show_bug.cgi?id=227016

Reviewed by Darin Adler.

Source/WebCore:

Update Document's execCommand() / queryCommand*() to throw an InvalidStateError when the document
is not an HTML/XHTML document. This matches Blink's behavior. Firefox is even stricter and throws
for all non HTML documents (including XHTML).

Test: fast/dom/Document/document-execcommand.html

  • dom/Document.cpp:

(WebCore::Document::execCommand):
(WebCore::Document::queryCommandEnabled):
(WebCore::Document::queryCommandIndeterm):
(WebCore::Document::queryCommandState):
(WebCore::Document::queryCommandSupported):
(WebCore::Document::queryCommandValue):

  • dom/Document.h:

Source/WebKitLegacy/mac:

Update ObjC bindings since the WebCore API now returns ExceptionOr<> types.

  • DOM/DOMDocument.mm:

(-[DOMDocument execCommand:userInterface:value:]):
(-[DOMDocument queryCommandEnabled:]):
(-[DOMDocument queryCommandIndeterm:]):
(-[DOMDocument queryCommandState:]):
(-[DOMDocument queryCommandSupported:]):
(-[DOMDocument queryCommandValue:]):

LayoutTests:

  • fast/dom/Document/document-execcommand-expected.txt: Added.
  • fast/dom/Document/document-execcommand.html: Added.

Add layout test coverage.

  • editing/pasteboard/createMarkup-assert-expected.txt: Removed.
  • editing/pasteboard/createMarkup-assert.xml: Removed.
  • platform/mac/svg/text/foreignObject-repaint-expected.txt:
  • platform/mac/svg/text/foreignObject-text-clipping-bug-expected.txt:
  • platform/mac/svg/text/text-align-01-b-expected.txt:
  • platform/mac/svg/text/text-align-02-b-expected.txt:
  • platform/mac/svg/text/text-align-03-b-expected.txt:
  • platform/mac/svg/text/text-align-04-b-expected.txt:
  • platform/mac/svg/text/text-align-05-b-expected.txt:
  • platform/mac/svg/text/text-align-06-b-expected.txt:
  • platform/mac/svg/text/text-deco-01-b-expected.txt:
  • platform/mac/svg/text/text-fonts-01-t-expected.txt:
  • platform/mac/svg/text/text-fonts-02-t-expected.txt:
  • platform/mac/svg/text/text-intro-05-t-expected.txt:
  • platform/mac/svg/text/text-path-01-b-expected.txt:
  • platform/mac/svg/text/text-spacing-01-b-expected.txt:
  • platform/mac/svg/text/text-text-01-b-expected.txt:
  • platform/mac/svg/text/text-text-03-b-expected.txt:
  • platform/mac/svg/text/text-text-04-t-expected.txt:
  • platform/mac/svg/text/text-text-05-t-expected.txt:
  • platform/mac/svg/text/text-text-07-t-expected.txt:
  • platform/mac/svg/text/text-text-08-b-expected.txt:
  • platform/mac/svg/text/text-tref-01-b-expected.txt:
  • platform/mac/svg/text/text-tselect-01-b-expected.txt:
  • platform/mac/svg/text/text-tselect-02-f-expected.txt:
  • platform/mac/svg/text/text-tspan-01-b-expected.txt:
  • svg/custom/bug78838-expected.txt:
  • svg/custom/bug79798-expected.txt:
  • svg/custom/delete-modified-text-in-defs-crash.svg:
  • svg/custom/layout-loop-expected.txt:
  • svg/text/text-positioning-remove-child-crash.svg:

Rebaseline / update existing tests due to behavior change.

Location:
trunk
Files:
2 added
2 deleted
96 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r278969 r278974  
     12021-06-16  Chris Dumez  <cdumez@apple.com>
     2
     3        Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents
     4        https://bugs.webkit.org/show_bug.cgi?id=227016
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/dom/Document/document-execcommand-expected.txt: Added.
     9        * fast/dom/Document/document-execcommand.html: Added.
     10        Add layout test coverage.
     11
     12        * editing/pasteboard/createMarkup-assert-expected.txt: Removed.
     13        * editing/pasteboard/createMarkup-assert.xml: Removed.
     14        * platform/mac/svg/text/foreignObject-repaint-expected.txt:
     15        * platform/mac/svg/text/foreignObject-text-clipping-bug-expected.txt:
     16        * platform/mac/svg/text/text-align-01-b-expected.txt:
     17        * platform/mac/svg/text/text-align-02-b-expected.txt:
     18        * platform/mac/svg/text/text-align-03-b-expected.txt:
     19        * platform/mac/svg/text/text-align-04-b-expected.txt:
     20        * platform/mac/svg/text/text-align-05-b-expected.txt:
     21        * platform/mac/svg/text/text-align-06-b-expected.txt:
     22        * platform/mac/svg/text/text-deco-01-b-expected.txt:
     23        * platform/mac/svg/text/text-fonts-01-t-expected.txt:
     24        * platform/mac/svg/text/text-fonts-02-t-expected.txt:
     25        * platform/mac/svg/text/text-intro-05-t-expected.txt:
     26        * platform/mac/svg/text/text-path-01-b-expected.txt:
     27        * platform/mac/svg/text/text-spacing-01-b-expected.txt:
     28        * platform/mac/svg/text/text-text-01-b-expected.txt:
     29        * platform/mac/svg/text/text-text-03-b-expected.txt:
     30        * platform/mac/svg/text/text-text-04-t-expected.txt:
     31        * platform/mac/svg/text/text-text-05-t-expected.txt:
     32        * platform/mac/svg/text/text-text-07-t-expected.txt:
     33        * platform/mac/svg/text/text-text-08-b-expected.txt:
     34        * platform/mac/svg/text/text-tref-01-b-expected.txt:
     35        * platform/mac/svg/text/text-tselect-01-b-expected.txt:
     36        * platform/mac/svg/text/text-tselect-02-f-expected.txt:
     37        * platform/mac/svg/text/text-tspan-01-b-expected.txt:
     38        * svg/custom/bug78838-expected.txt:
     39        * svg/custom/bug79798-expected.txt:
     40        * svg/custom/delete-modified-text-in-defs-crash.svg:
     41        * svg/custom/layout-loop-expected.txt:
     42        * svg/text/text-positioning-remove-child-crash.svg:
     43        Rebaseline / update existing tests due to behavior change.
     44
    1452021-06-16  Cameron McCormack  <heycam@apple.com>
    246
  • trunk/LayoutTests/platform/ios/svg/text/foreignObject-repaint-expected.txt

    r174533 r278974  
    99          text run at (0,62) width 475: "the mouse, it should"
    1010          text run at (0,124) width 336: "not disappear!"
     11caret: position 34 of child 0 {#text} of child 1 {div} of child 1 {foreignObject} of child 0 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/foreignObject-text-clipping-bug-expected.txt

    r174533 r278974  
    2020      RenderText {#text} at (0,2) size 239x112
    2121        text run at (0,2) width 239: "TEST"
    22 selection start: position 0 of child 0 {#text} of child 1 {p} of body
    23 selection end:   position 4 of child 0 {#text} of child 1 {div} of child 5 {div} of body
  • trunk/LayoutTests/platform/ios/svg/text/text-align-01-b-expected.txt

    r205001 r278974  
    3636        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.5 $"
    3737    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    38 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 27 {svg} of document
    39 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 27 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-align-02-b-expected.txt

    r205001 r278974  
    4242        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.5 $"
    4343    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    44 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 27 {svg} of document
    45 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 27 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-align-03-b-expected.txt

    r205001 r278974  
    2222        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.5 $"
    2323    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    24 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 28 {svg} of document
    25 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 28 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-align-04-b-expected.txt

    r205001 r278974  
    5959        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.5 $"
    6060    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    61 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 28 {svg} of document
    62 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 28 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-align-05-b-expected.txt

    r205001 r278974  
    3939        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.5 $"
    4040    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    41 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 27 {svg} of document
    42 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 27 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-align-06-b-expected.txt

    r207778 r278974  
    6666        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.5 $"
    6767    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    68 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 27 {svg} of document
    69 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 27 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-altglyph-01-b-expected.txt

    r229202 r278974  
    4949        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.5 $"
    5050    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    51 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 32 {svg} of document
    52 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 32 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-deco-01-b-expected.txt

    r205001 r278974  
    4646        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.9 $"
    4747    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    48 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 14 {svg} of document
    49 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 14 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-fonts-01-t-expected.txt

    r205001 r278974  
    3131        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.5 $"
    3232    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    33 selection start: position 0 of child 0 {#text} of child 1 {text} of child 1 {g} of child 13 {g} of child 34 {svg} of document
    34 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 34 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-fonts-02-t-expected.txt

    r205001 r278974  
    4949        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.7 $"
    5050    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    51 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 17 {svg} of document
    52 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 17 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-intro-05-t-expected.txt

    r205001 r278974  
    1717        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.4 $"
    1818    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    19 selection start: position 0 of child 0 {#text} of child 1 {text} of child 33 {g} of child 0 {svg} of document
    20 selection end:   position 16 of child 0 {#text} of child 35 {text} of child 0 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-path-01-b-expected.txt

    r217772 r278974  
    9595        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.9 $"
    9696    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    97 selection start: position 0 of child 0 {#text} of child 1 {textPath} of child 3 {text} of child 3 {g} of child 13 {g} of child 30 {svg} of document
    98 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 30 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-spacing-01-b-expected.txt

    r205001 r278974  
    6565        chunk 1 text run 1 at (5.00,57.00) startOffset 0 endOffset 16 width 39.50: "$Revision: 1.6 $"
    6666    RenderSVGRect {rect} at (5,5) size 790x590 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=78.00] [height=58.00]
    67 selection start: position 1 of child 0 {#text} of child 1 {text} of child 1 {g} of child 13 {g} of child 19 {svg} of document
    68 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 19 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-text-01-b-expected.txt

    r205001 r278974  
    202202        chunk 1 text run 1 at (5.00,117.00) startOffset 0 endOffset 16 width 52.67: "$Revision: 1.7 $"
    203203    RenderSVGRect {rect} at (2,2) size 796x596 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=158.00] [height=118.00]
    204 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 26 {svg} of document
    205 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 26 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-text-03-b-expected.txt

    r205001 r278974  
    3838        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.8 $"
    3939    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    40 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 32 {svg} of document
    41 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 32 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-text-04-t-expected.txt

    r205001 r278974  
    243243        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 17 width 282.63: "$Revision: 1.13 $"
    244244    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    245 selection start: position 0 of child 0 {#text} of child 1 {text} of child 1 {g} of child 15 {g} of child 15 {svg} of document
    246 selection end:   position 17 of child 0 {#text} of child 17 {text} of child 15 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-text-05-t-expected.txt

    r205001 r278974  
    547547        chunk 1 text run 1 at (10.00,350.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.8 $"
    548548    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    549 selection start: position 0 of child 0 {#text} of child 1 {text} of child 5 {g} of child 15 {g} of child 9 {svg} of document
    550 selection end:   position 16 of child 0 {#text} of child 17 {text} of child 9 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-text-06-t-expected.txt

    r205001 r278974  
    123123        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.9 $"
    124124    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    125 selection start: position 0 of child 0 {#text} of child 1 {text} of child 1 {g} of child 5 {g} of child 3 {g} of child 12 {svg} of document
    126 selection end:   position 16 of child 0 {#text} of child 5 {text} of child 12 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-text-07-t-expected.txt

    r205001 r278974  
    4141        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.8 $"
    4242    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    43 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 9 {svg} of document
    44 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 9 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-text-08-b-expected.txt

    r205001 r278974  
    2020        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.3 $"
    2121    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    22 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 14 {svg} of document
    23 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 14 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-tref-01-b-expected.txt

    r205001 r278974  
    1818        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.6 $"
    1919    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    20 selection start: position 0 of child 0 {#text} of child 3 {text} of child 13 {g} of child 30 {svg} of document
    21 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 30 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-tselect-01-b-expected.txt

    r205001 r278974  
    4444          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.8 $"
    4545      RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    46 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 25 {svg} of document
    47 selection end:   position 16 of child 0 {#text} of child 5 {text} of child 13 {g} of child 25 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-tspan-01-b-expected.txt

    r205001 r278974  
    8181        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.7 $"
    8282    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    83 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 35 {svg} of document
    84 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 35 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-ws-01-t-expected.txt

    r205001 r278974  
    3434        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.7 $"
    3535    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    36 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 29 {svg} of document
    37 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 29 {svg} of document
  • trunk/LayoutTests/platform/ios/svg/text/text-ws-02-t-expected.txt

    r205001 r278974  
    3434        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 262.68: "$Revision: 1.8 $"
    3535    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    36 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 29 {svg} of document
    37 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 29 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/foreignObject-repaint-expected.txt

    r177774 r278974  
    99          text run at (0,61) width 475: "the mouse, it should"
    1010          text run at (0,122) width 336: "not disappear!"
     11caret: position 34 of child 0 {#text} of child 1 {div} of child 1 {foreignObject} of child 0 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/foreignObject-text-clipping-bug-expected.txt

    r177774 r278974  
    2020      RenderText {#text} at (0,0) size 239x115
    2121        text run at (0,0) width 239: "TEST"
    22 selection start: position 0 of child 0 {#text} of child 1 {p} of body
    23 selection end:   position 4 of child 0 {#text} of child 1 {div} of child 5 {div} of body
  • trunk/LayoutTests/platform/mac/svg/text/text-align-01-b-expected.txt

    r177774 r278974  
    3636        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.5 $"
    3737    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    38 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 27 {svg} of document
    39 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 27 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-align-02-b-expected.txt

    r177774 r278974  
    4242        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.5 $"
    4343    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    44 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 27 {svg} of document
    45 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 27 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-align-03-b-expected.txt

    r177774 r278974  
    2222        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.5 $"
    2323    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    24 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 28 {svg} of document
    25 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 28 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-align-04-b-expected.txt

    r177774 r278974  
    5959        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.5 $"
    6060    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    61 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 28 {svg} of document
    62 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 28 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-align-05-b-expected.txt

    r177774 r278974  
    3939        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.5 $"
    4040    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    41 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 27 {svg} of document
    42 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 27 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-align-06-b-expected.txt

    r207757 r278974  
    6666        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.5 $"
    6767    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    68 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 27 {svg} of document
    69 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 27 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-altglyph-01-b-expected.txt

    r177774 r278974  
    4949        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.5 $"
    5050    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    51 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 32 {svg} of document
    52 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 32 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-deco-01-b-expected.txt

    r177774 r278974  
    4646        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.9 $"
    4747    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    48 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 14 {svg} of document
    49 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 14 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-fonts-01-t-expected.txt

    r177774 r278974  
    3131        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.5 $"
    3232    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    33 selection start: position 0 of child 0 {#text} of child 1 {text} of child 1 {g} of child 13 {g} of child 34 {svg} of document
    34 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 34 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-fonts-02-t-expected.txt

    r177774 r278974  
    4949        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.7 $"
    5050    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    51 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 17 {svg} of document
    52 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 17 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-intro-05-t-expected.txt

    r187126 r278974  
    1717        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.4 $"
    1818    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    19 selection start: position 0 of child 0 {#text} of child 1 {text} of child 33 {g} of child 0 {svg} of document
    20 selection end:   position 16 of child 0 {#text} of child 35 {text} of child 0 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-path-01-b-expected.txt

    r217772 r278974  
    9595        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.9 $"
    9696    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    97 selection start: position 0 of child 0 {#text} of child 1 {textPath} of child 3 {text} of child 3 {g} of child 13 {g} of child 30 {svg} of document
    98 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 30 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-spacing-01-b-expected.txt

    r177774 r278974  
    6565        chunk 1 text run 1 at (5.00,57.00) startOffset 0 endOffset 16 width 39.50: "$Revision: 1.6 $"
    6666    RenderSVGRect {rect} at (5,5) size 790x590 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=78.00] [height=58.00]
    67 selection start: position 1 of child 0 {#text} of child 1 {text} of child 1 {g} of child 13 {g} of child 19 {svg} of document
    68 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 19 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-text-01-b-expected.txt

    r177774 r278974  
    202202        chunk 1 text run 1 at (5.00,117.00) startOffset 0 endOffset 16 width 52.67: "$Revision: 1.7 $"
    203203    RenderSVGRect {rect} at (2,2) size 796x596 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=158.00] [height=118.00]
    204 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 26 {svg} of document
    205 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 26 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-text-03-b-expected.txt

    r177774 r278974  
    3838        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.8 $"
    3939    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    40 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 32 {svg} of document
    41 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 32 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-text-04-t-expected.txt

    r177774 r278974  
    243243        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 17 width 284.76: "$Revision: 1.13 $"
    244244    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    245 selection start: position 0 of child 0 {#text} of child 1 {text} of child 1 {g} of child 15 {g} of child 15 {svg} of document
    246 selection end:   position 17 of child 0 {#text} of child 17 {text} of child 15 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-text-05-t-expected.txt

    r177774 r278974  
    547547        chunk 1 text run 1 at (10.00,350.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.8 $"
    548548    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    549 selection start: position 0 of child 0 {#text} of child 1 {text} of child 5 {g} of child 15 {g} of child 9 {svg} of document
    550 selection end:   position 16 of child 0 {#text} of child 17 {text} of child 9 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-text-06-t-expected.txt

    r177774 r278974  
    120120        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.9 $"
    121121    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    122 selection start: position 0 of child 0 {#text} of child 1 {text} of child 1 {g} of child 5 {g} of child 3 {g} of child 12 {svg} of document
    123 selection end:   position 16 of child 0 {#text} of child 5 {text} of child 12 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-text-07-t-expected.txt

    r177774 r278974  
    4141        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.8 $"
    4242    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    43 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 9 {svg} of document
    44 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 9 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-text-08-b-expected.txt

    r177774 r278974  
    2020        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.3 $"
    2121    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    22 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 14 {svg} of document
    23 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 14 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-tref-01-b-expected.txt

    r177774 r278974  
    1818        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.6 $"
    1919    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    20 selection start: position 0 of child 0 {#text} of child 3 {text} of child 13 {g} of child 30 {svg} of document
    21 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 30 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-tselect-01-b-expected.txt

    r177774 r278974  
    4444          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.8 $"
    4545      RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    46 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 25 {svg} of document
    47 selection end:   position 16 of child 0 {#text} of child 5 {text} of child 13 {g} of child 25 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-tspan-01-b-expected.txt

    r177774 r278974  
    8181        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.7 $"
    8282    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    83 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 35 {svg} of document
    84 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 35 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-ws-01-t-expected.txt

    r177774 r278974  
    3434        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.7 $"
    3535    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    36 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 29 {svg} of document
    37 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 29 {svg} of document
  • trunk/LayoutTests/platform/mac/svg/text/text-ws-02-t-expected.txt

    r177774 r278974  
    3434        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.66: "$Revision: 1.8 $"
    3535    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
    36 selection start: position 0 of child 0 {#text} of child 1 {text} of child 13 {g} of child 29 {svg} of document
    37 selection end:   position 16 of child 0 {#text} of child 15 {text} of child 29 {svg} of document
  • trunk/LayoutTests/svg/custom/bug78838.html

    r124380 r278974  
    1010
    1111    document.designMode = 'on';
    12     q.execCommand('selectAll');
    13     q.execCommand('insertImage');
    1412    q.getElementById('x').appendChild( q.firstChild.cloneNode(1) );
    15     q.execCommand('undo');
    1613}
    1714</script>
  • trunk/LayoutTests/svg/custom/bug79798.html

    r124380 r278974  
    1616
    1717        document.designMode = 'on';
    18         q.execCommand('formatBlock', 1, 'h1');
    19         q.execCommand('formatBlock', 1, 'h1');
    20         q.execCommand('formatBlock', 1, 'h1');
    2118        document.open();
    2219    }
  • trunk/LayoutTests/svg/custom/delete-modified-text-in-defs-crash.svg

    r124380 r278974  
    88  <g><rect id="legendbox"/></g>
    99  <script><![CDATA[
    10     document.execCommand("SelectAll");
    1110    elem = document.getElementById("tspan1");
    1211    elem.removeAttribute("x");
  • trunk/LayoutTests/svg/custom/layout-loop.svg

    r124380 r278974  
    2424if (window.testRunner)
    2525    testRunner.dumpAsText();
    26 document.execCommand("SelectAll");
    2726range = document.createRange();
    2827range.setStartBefore(document.getElementById("stop"));
  • trunk/LayoutTests/svg/text/foreignObject-repaint.xml

    r43173 r278974  
    77  <script>
    88    if (window.eventSender) {
    9       document.execCommand("SelectAll");
    109      eventSender.mouseMoveTo(200, 200);
    1110      eventSender.mouseDown();
  • trunk/LayoutTests/svg/text/foreignObject-text-clipping-bug.xml

    r124380 r278974  
    2323    if (window.testRunner)
    2424        window.testRunner.dumpSelectionRect();
    25     document.execCommand("SelectAll");
    2625    </script>
    2726    </body>
  • trunk/LayoutTests/svg/text/text-align-01-b.svg

    r124380 r278974  
    7676if (window.testRunner)
    7777    window.testRunner.dumpSelectionRect();
    78 document.execCommand("SelectAll");
    7978</script>
    8079</svg>
  • trunk/LayoutTests/svg/text/text-align-02-b.svg

    r124380 r278974  
    6565if (window.testRunner)
    6666    window.testRunner.dumpSelectionRect();
    67 document.execCommand("SelectAll");
    6867</script>
    6968</svg>
  • trunk/LayoutTests/svg/text/text-align-03-b.svg

    r124380 r278974  
    7070if (window.testRunner)
    7171    window.testRunner.dumpSelectionRect();
    72 document.execCommand("SelectAll");
    7372</script>
    7473</svg>
  • trunk/LayoutTests/svg/text/text-align-04-b.svg

    r124380 r278974  
    8282if (window.testRunner)
    8383    window.testRunner.dumpSelectionRect();
    84 document.execCommand("SelectAll");
    8584</script>
    8685</svg>
  • trunk/LayoutTests/svg/text/text-align-05-b.svg

    r124380 r278974  
    7272if (window.testRunner)
    7373    window.testRunner.dumpSelectionRect();
    74 document.execCommand("SelectAll");
    7574</script>
    7675</svg>
  • trunk/LayoutTests/svg/text/text-align-06-b.svg

    r124380 r278974  
    6363if (window.testRunner)
    6464    window.testRunner.dumpSelectionRect();
    65 document.execCommand("SelectAll");
    6665</script>
    6766</svg>
  • trunk/LayoutTests/svg/text/text-altglyph-01-b.svg

    r124380 r278974  
    130130if (window.testRunner)
    131131    window.testRunner.dumpSelectionRect();
    132 document.execCommand("SelectAll");
    133132</script>
    134133</svg>
  • trunk/LayoutTests/svg/text/text-deco-01-b.svg

    r124380 r278974  
    6565if (window.testRunner)
    6666    window.testRunner.dumpSelectionRect();
    67 document.execCommand("SelectAll");
    6867</script>
    6968</svg>
  • trunk/LayoutTests/svg/text/text-fonts-01-t.svg

    r202474 r278974  
    9898if (window.testRunner)
    9999    window.testRunner.dumpSelectionRect();
    100 document.execCommand("SelectAll");
    101100</script>
    102101</svg>
  • trunk/LayoutTests/svg/text/text-fonts-02-t.svg

    r124380 r278974  
    7474if (window.testRunner)
    7575    window.testRunner.dumpSelectionRect();
    76 document.execCommand("SelectAll");
    7776</script>
    7877</svg>
  • trunk/LayoutTests/svg/text/text-intro-05-t.svg

    r124380 r278974  
    4040if (window.testRunner)
    4141    window.testRunner.dumpSelectionRect();
    42 document.execCommand("SelectAll");
    4342</script>
    4443</svg>
  • trunk/LayoutTests/svg/text/text-path-01-b.svg

    r124380 r278974  
    8383if (window.testRunner)
    8484    window.testRunner.dumpSelectionRect();
    85 document.execCommand("SelectAll");
    8685</script>
    8786</svg>
  • trunk/LayoutTests/svg/text/text-positioning-remove-child-crash.svg

    r124380 r278974  
    88
    99<script><![CDATA[
    10 document.execCommand("SelectAll");
    1110document.getElementById("a").textContent = "PASS";
    1211]]></script>
  • trunk/LayoutTests/svg/text/text-spacing-01-b.svg

    r124380 r278974  
    5555if (window.testRunner)
    5656    window.testRunner.dumpSelectionRect();
    57 document.execCommand("SelectAll");
    5857</script>
    5958</svg>
  • trunk/LayoutTests/svg/text/text-text-01-b.svg

    r124380 r278974  
    211211if (window.testRunner)
    212212    window.testRunner.dumpSelectionRect();
    213 document.execCommand("SelectAll");
    214213</script>
    215214</svg>
  • trunk/LayoutTests/svg/text/text-text-03-b.svg

    r124380 r278974  
    6969if (window.testRunner)
    7070    window.testRunner.dumpSelectionRect();
    71 document.execCommand("SelectAll");
    7271</script>
    7372</svg>
  • trunk/LayoutTests/svg/text/text-text-04-t.svg

    r124380 r278974  
    212212if (window.testRunner)
    213213    window.testRunner.dumpSelectionRect();
    214 document.execCommand("SelectAll");
    215214</script>
    216215</svg>
  • trunk/LayoutTests/svg/text/text-text-05-t.svg

    r124380 r278974  
    165165
    166166function repaintTest() {
    167     document.execCommand("SelectAll");
    168167}
    169168</script>
  • trunk/LayoutTests/svg/text/text-text-06-t.svg

    r124380 r278974  
    104104if (window.testRunner)
    105105    window.testRunner.dumpSelectionRect();
    106 document.execCommand("SelectAll");
    107106</script>
    108107</svg>
  • trunk/LayoutTests/svg/text/text-text-07-t.svg

    r124380 r278974  
    4343if (window.testRunner)
    4444    window.testRunner.dumpSelectionRect();
    45 document.execCommand("SelectAll");
    4645</script>
    4746</svg>
  • trunk/LayoutTests/svg/text/text-text-08-b.svg

    r124380 r278974  
    5050if (window.testRunner)
    5151    window.testRunner.dumpSelectionRect();
    52 document.execCommand("SelectAll");
    5352</script>
    5453</svg>
  • trunk/LayoutTests/svg/text/text-tref-01-b.svg

    r124380 r278974  
    8282if (window.testRunner)
    8383    window.testRunner.dumpSelectionRect();
    84 document.execCommand("SelectAll");
    8584</script>
    8685</svg>
  • trunk/LayoutTests/svg/text/text-tselect-01-b.svg

    r124380 r278974  
    7272if (window.testRunner)
    7373    window.testRunner.dumpSelectionRect();
    74 document.execCommand("SelectAll");
    7574</script>
    7675</svg>
  • trunk/LayoutTests/svg/text/text-tselect-02-f.svg

    r124380 r278974  
    135135if (window.testRunner)
    136136    window.testRunner.dumpSelectionRect();
    137 document.execCommand("SelectAll");
    138137</script>
    139138</svg>
  • trunk/LayoutTests/svg/text/text-tspan-01-b.svg

    r124380 r278974  
    8888if (window.testRunner)
    8989    window.testRunner.dumpSelectionRect();
    90 document.execCommand("SelectAll");
    9190</script>
    9291</svg>
  • trunk/LayoutTests/svg/text/text-ws-01-t.svg

    r124380 r278974  
    9999if (window.testRunner)
    100100    window.testRunner.dumpSelectionRect();
    101 document.execCommand("SelectAll");
    102101</script>
    103102</svg>
  • trunk/LayoutTests/svg/text/text-ws-02-t.svg

    r124380 r278974  
    104104if (window.testRunner)
    105105    window.testRunner.dumpSelectionRect();
    106 document.execCommand("SelectAll");
    107106</script>
    108107</svg>
  • trunk/LayoutTests/svg/text/textPathBoundsBug-expected.txt

    r177774 r278974  
    1212          chunk 1 (middle anchor) text run 4 at (123.36,100.00) startOffset 7 endOffset 8 width 6.67: "8"
    1313      RenderSVGInlineText {#text} at (0,0) size 0x0
    14 selection start: position 0 of child 0 {#text} of child 1 {textPath} of child 3 {text} of child 0 {svg} of document
    15 selection end:   position 8 of child 0 {#text} of child 1 {textPath} of child 3 {text} of child 0 {svg} of document
  • trunk/LayoutTests/svg/text/textPathBoundsBug.svg

    r124380 r278974  
    99if (window.testRunner)
    1010    window.testRunner.dumpSelectionRect();
    11 document.execCommand("SelectAll");
    1211</script>
    1312</svg>
  • trunk/Source/WebCore/ChangeLog

    r278969 r278974  
     12021-06-16  Chris Dumez  <cdumez@apple.com>
     2
     3        Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents
     4        https://bugs.webkit.org/show_bug.cgi?id=227016
     5
     6        Reviewed by Darin Adler.
     7
     8        Update Document's execCommand() / queryCommand*() to throw an InvalidStateError when the document
     9        is not an HTML/XHTML document. This matches Blink's behavior. Firefox is even stricter and throws
     10        for all non HTML documents (including XHTML).
     11
     12        Test: fast/dom/Document/document-execcommand.html
     13
     14        * dom/Document.cpp:
     15        (WebCore::Document::execCommand):
     16        (WebCore::Document::queryCommandEnabled):
     17        (WebCore::Document::queryCommandIndeterm):
     18        (WebCore::Document::queryCommandState):
     19        (WebCore::Document::queryCommandSupported):
     20        (WebCore::Document::queryCommandValue):
     21        * dom/Document.h:
     22
    1232021-06-16  Cameron McCormack  <heycam@apple.com>
    224
  • trunk/Source/WebCore/dom/Document.cpp

    r278947 r278974  
    57525752}
    57535753
    5754 bool Document::execCommand(const String& commandName, bool userInterface, const String& value)
    5755 {
     5754ExceptionOr<bool> Document::execCommand(const String& commandName, bool userInterface, const String& value)
     5755{
     5756    if (UNLIKELY(!isHTMLDocument() && !isXHTMLDocument()))
     5757        return Exception { InvalidStateError, "execCommand is only supported on HTML documents." };
     5758
    57565759    EventQueueScope eventQueueScope;
    57575760    return command(this, commandName, userInterface).execute(value);
    57585761}
    57595762
    5760 bool Document::queryCommandEnabled(const String& commandName)
    5761 {
     5763ExceptionOr<bool> Document::queryCommandEnabled(const String& commandName)
     5764{
     5765    if (UNLIKELY(!isHTMLDocument() && !isXHTMLDocument()))
     5766        return Exception { InvalidStateError, "queryCommandEnabled is only supported on HTML documents." };
    57625767    return command(this, commandName).isEnabled();
    57635768}
    57645769
    5765 bool Document::queryCommandIndeterm(const String& commandName)
    5766 {
     5770ExceptionOr<bool> Document::queryCommandIndeterm(const String& commandName)
     5771{
     5772    if (UNLIKELY(!isHTMLDocument() && !isXHTMLDocument()))
     5773        return Exception { InvalidStateError, "queryCommandIndeterm is only supported on HTML documents." };
    57675774    return command(this, commandName).state() == TriState::Indeterminate;
    57685775}
    57695776
    5770 bool Document::queryCommandState(const String& commandName)
    5771 {
     5777ExceptionOr<bool> Document::queryCommandState(const String& commandName)
     5778{
     5779    if (UNLIKELY(!isHTMLDocument() && !isXHTMLDocument()))
     5780        return Exception { InvalidStateError, "queryCommandState is only supported on HTML documents." };
    57725781    return command(this, commandName).state() == TriState::True;
    57735782}
    57745783
    5775 bool Document::queryCommandSupported(const String& commandName)
    5776 {
     5784ExceptionOr<bool> Document::queryCommandSupported(const String& commandName)
     5785{
     5786    if (UNLIKELY(!isHTMLDocument() && !isXHTMLDocument()))
     5787        return Exception { InvalidStateError, "queryCommandSupported is only supported on HTML documents." };
    57775788    return command(this, commandName).isSupported();
    57785789}
    57795790
    5780 String Document::queryCommandValue(const String& commandName)
    5781 {
     5791ExceptionOr<String> Document::queryCommandValue(const String& commandName)
     5792{
     5793    if (UNLIKELY(!isHTMLDocument() && !isXHTMLDocument()))
     5794        return Exception { InvalidStateError, "queryCommandValue is only supported on HTML documents." };
    57825795    return command(this, commandName).value();
    57835796}
  • trunk/Source/WebCore/dom/Document.h

    r278779 r278974  
    10101010    DocumentMarkerController& markers() const { return *m_markers; }
    10111011
    1012     WEBCORE_EXPORT bool execCommand(const String& command, bool userInterface = false, const String& value = String());
    1013     WEBCORE_EXPORT bool queryCommandEnabled(const String& command);
    1014     WEBCORE_EXPORT bool queryCommandIndeterm(const String& command);
    1015     WEBCORE_EXPORT bool queryCommandState(const String& command);
    1016     WEBCORE_EXPORT bool queryCommandSupported(const String& command);
    1017     WEBCORE_EXPORT String queryCommandValue(const String& command);
     1012    WEBCORE_EXPORT ExceptionOr<bool> execCommand(const String& command, bool userInterface = false, const String& value = String());
     1013    WEBCORE_EXPORT ExceptionOr<bool> queryCommandEnabled(const String& command);
     1014    WEBCORE_EXPORT ExceptionOr<bool> queryCommandIndeterm(const String& command);
     1015    WEBCORE_EXPORT ExceptionOr<bool> queryCommandState(const String& command);
     1016    WEBCORE_EXPORT ExceptionOr<bool> queryCommandSupported(const String& command);
     1017    WEBCORE_EXPORT ExceptionOr<String> queryCommandValue(const String& command);
    10181018
    10191019    UndoManager& undoManager() const { return m_undoManager.get(); }
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp

    r269665 r278974  
    11911191    WTF::String convertedCommand = WTF::String::fromUTF8(command);
    11921192    WTF::String convertedValue = WTF::String::fromUTF8(value);
    1193     gboolean result = item->execCommand(convertedCommand, userInterface, convertedValue);
    1194     return result;
     1193    auto result = item->execCommand(convertedCommand, userInterface, convertedValue);
     1194    return result.hasException() ? false : result.returnValue();
    11951195}
    11961196
     
    12021202    WebCore::Document* item = WebKit::core(self);
    12031203    WTF::String convertedCommand = WTF::String::fromUTF8(command);
    1204     gboolean result = item->queryCommandEnabled(convertedCommand);
    1205     return result;
     1204    auto result = item->queryCommandEnabled(convertedCommand);
     1205    return result.hasException() ? false : result.returnValue();
    12061206}
    12071207
     
    12131213    WebCore::Document* item = WebKit::core(self);
    12141214    WTF::String convertedCommand = WTF::String::fromUTF8(command);
    1215     gboolean result = item->queryCommandIndeterm(convertedCommand);
    1216     return result;
     1215    auto result = item->queryCommandIndeterm(convertedCommand);
     1216    return result.hasException() ? false : result.returnValue();
    12171217}
    12181218
     
    12241224    WebCore::Document* item = WebKit::core(self);
    12251225    WTF::String convertedCommand = WTF::String::fromUTF8(command);
    1226     gboolean result = item->queryCommandState(convertedCommand);
    1227     return result;
     1226    auto result = item->queryCommandState(convertedCommand);
     1227    return result.hasException() ? false : result.returnValue();
    12281228}
    12291229
     
    12351235    WebCore::Document* item = WebKit::core(self);
    12361236    WTF::String convertedCommand = WTF::String::fromUTF8(command);
    1237     gboolean result = item->queryCommandSupported(convertedCommand);
    1238     return result;
     1237    auto result = item->queryCommandSupported(convertedCommand);
     1238    return result.hasException() ? false : result.returnValue();
    12391239}
    12401240
     
    12461246    WebCore::Document* item = WebKit::core(self);
    12471247    WTF::String convertedCommand = WTF::String::fromUTF8(command);
    1248     gchar* result = convertToUTF8String(item->queryCommandValue(convertedCommand));
     1248    auto stringValue = item->queryCommandValue(convertedCommand);
     1249    gchar* result = convertToUTF8String(stringValue.hasException() ? String() : stringValue.returnValue());
    12491250    return result;
    12501251}
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r278767 r278974  
     12021-06-16  Chris Dumez  <cdumez@apple.com>
     2
     3        Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents
     4        https://bugs.webkit.org/show_bug.cgi?id=227016
     5
     6        Reviewed by Darin Adler.
     7
     8        Update ObjC bindings since the WebCore API now returns ExceptionOr<> types.
     9
     10        * DOM/DOMDocument.mm:
     11        (-[DOMDocument execCommand:userInterface:value:]):
     12        (-[DOMDocument queryCommandEnabled:]):
     13        (-[DOMDocument queryCommandIndeterm:]):
     14        (-[DOMDocument queryCommandState:]):
     15        (-[DOMDocument queryCommandSupported:]):
     16        (-[DOMDocument queryCommandValue:]):
     17
    1182021-06-11  Megan Gardner  <megan_gardner@apple.com>
    219
  • trunk/Source/WebKitLegacy/mac/DOM/DOMDocument.mm

    r269665 r278974  
    614614{
    615615    WebCore::JSMainThreadNullState state;
    616     return IMPL->execCommand(command, userInterface, value);
     616    auto result = IMPL->execCommand(command, userInterface, value);
     617    return result.hasException() ? NO : result.returnValue();
    617618}
    618619
     
    630631{
    631632    WebCore::JSMainThreadNullState state;
    632     return IMPL->queryCommandEnabled(command);
     633    auto result = IMPL->queryCommandEnabled(command);
     634    return result.hasException() ? NO : result.returnValue();
    633635}
    634636
     
    636638{
    637639    WebCore::JSMainThreadNullState state;
    638     return IMPL->queryCommandIndeterm(command);
     640    auto result = IMPL->queryCommandIndeterm(command);
     641    return result.hasException() ? NO : result.returnValue();
    639642}
    640643
     
    642645{
    643646    WebCore::JSMainThreadNullState state;
    644     return IMPL->queryCommandState(command);
     647    auto result = IMPL->queryCommandState(command);
     648    return result.hasException() ? NO : result.returnValue();
    645649}
    646650
     
    648652{
    649653    WebCore::JSMainThreadNullState state;
    650     return IMPL->queryCommandSupported(command);
     654    auto result = IMPL->queryCommandSupported(command);
     655    return result.hasException() ? NO : result.returnValue();
    651656}
    652657
     
    654659{
    655660    WebCore::JSMainThreadNullState state;
    656     return IMPL->queryCommandValue(command);
     661    auto result = IMPL->queryCommandValue(command);
     662    return result.hasException() ? String() : result.returnValue();
    657663}
    658664
Note: See TracChangeset for help on using the changeset viewer.