Changeset 78515 in webkit


Ignore:
Timestamp:
Feb 14, 2011 3:15:16 PM (13 years ago)
Author:
leviw@chromium.org
Message:

2011-02-14 Levi Weintraub <leviw@chromium.org>

Reviewed by Alexey Proskuryakov.

Strikethrough disappears when posting a message on odnoklassniki.ru
https://bugs.webkit.org/show_bug.cgi?id=53475

Changing the behavior of the strikethrough execCommand when styleWithCSS
is false. We formerly created <s> tags, which was different than both IE
and FF and caused problems with some rich text editors that would strip
out unexpected tags such as <s>.

Test: editing/execCommand/strikethrough-uses-strike-tag.html

  • editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):

2011-02-14 Levi Weintraub <leviw@chromium.org>

Reviewed by Alexey Proskuryakov.

Strikethrough disappears when posting a message on odnoklassniki.ru
https://bugs.webkit.org/show_bug.cgi?id=53475

Updating test expectations and creating a test in an attempt to prevent the
uninformed WebKit dev from switching back to using <s> tags for strikethrough.
As explained in the bug, this is bad for compatibility with various rich text
editors.

  • editing/execCommand/query-text-decoration-with-typing-style-expected.txt:
  • editing/execCommand/script-tests/strikethrough-uses-strike-tag.js: Added. (test):
  • editing/execCommand/script-tests/toggle-style-2.js:
  • editing/execCommand/strikethrough-uses-strike-tag-expected.txt: Added.
  • editing/execCommand/strikethrough-uses-strike-tag.html: Added.
  • editing/execCommand/strikethroughSelection-expected.txt:
  • editing/execCommand/toggle-style-2-expected.txt:
  • editing/style/inline-style-container-expected.txt:
  • editing/style/inline-style-extend-run-expected.txt:
  • editing/style/push-down-implicit-styles-around-list-expected.txt:
  • editing/style/push-down-implicit-styles-expected.txt:
  • editing/style/script-tests/inline-style-container.js:
  • editing/style/script-tests/inline-style-extend-run.js:
  • editing/style/script-tests/push-down-implicit-styles-around-list.js:
  • editing/style/script-tests/push-down-implicit-styles.js:
  • editing/style/style-text-node-without-editable-parent-expected.txt:
Location:
trunk
Files:
3 added
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r78510 r78515  
     12011-02-14  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        Strikethrough disappears when posting a message on odnoklassniki.ru
     6        https://bugs.webkit.org/show_bug.cgi?id=53475
     7
     8        Updating test expectations and creating a test in an attempt to prevent the
     9        uninformed WebKit dev from switching back to using <s> tags for strikethrough.
     10        As explained in the bug, this is bad for compatibility with various rich text
     11        editors.
     12
     13        * editing/execCommand/query-text-decoration-with-typing-style-expected.txt:
     14        * editing/execCommand/script-tests/strikethrough-uses-strike-tag.js: Added.
     15        (test):
     16        * editing/execCommand/script-tests/toggle-style-2.js:
     17        * editing/execCommand/strikethrough-uses-strike-tag-expected.txt: Added.
     18        * editing/execCommand/strikethrough-uses-strike-tag.html: Added.
     19        * editing/execCommand/strikethroughSelection-expected.txt:
     20        * editing/execCommand/toggle-style-2-expected.txt:
     21        * editing/style/inline-style-container-expected.txt:
     22        * editing/style/inline-style-extend-run-expected.txt:
     23        * editing/style/push-down-implicit-styles-around-list-expected.txt:
     24        * editing/style/push-down-implicit-styles-expected.txt:
     25        * editing/style/script-tests/inline-style-container.js:
     26        * editing/style/script-tests/inline-style-extend-run.js:
     27        * editing/style/script-tests/push-down-implicit-styles-around-list.js:
     28        * editing/style/script-tests/push-down-implicit-styles.js:
     29        * editing/style/style-text-node-without-editable-parent-expected.txt:
     30
    1312011-02-14  Peter Kasting  <pkasting@google.com>
    232
  • trunk/LayoutTests/editing/execCommand/query-text-decoration-with-typing-style-expected.txt

    r68059 r78515  
    7070|   "x"
    7171| "x"
    72 | <s>
     72| <strike>
    7373|   "xx<#selection-caret>"
    7474
     
    8080|   "x"
    8181| "x"
    82 | <s>
     82| <strike>
    8383|   "x<#selection-caret>x"
    8484
     
    9090|   "x"
    9191| "x"
    92 | <s>
     92| <strike>
    9393|   "x<#selection-caret>x"
    9494
     
    100100|   "x"
    101101| "x"
    102 | <s>
     102| <strike>
    103103|   "x"
    104104| "x<#selection-caret>"
    105 | <s>
     105| <strike>
    106106|   "x"
    107107
     
    113113|   "x"
    114114| "x"
    115 | <s>
     115| <strike>
    116116|   "x"
    117117| "x"
    118 | <s>
     118| <strike>
    119119|   "x<#selection-caret>"
    120120
     
    126126|   "x"
    127127| "x"
    128 | <s>
     128| <strike>
    129129|   "x"
    130130| "x"
    131 | <s>
     131| <strike>
    132132|   "x<#selection-caret>"
    133133
     
    139139|   "x"
    140140| "x"
    141 | <s>
     141| <strike>
    142142|   "x"
    143143| "x"
    144 | <s>
     144| <strike>
    145145|   "x"
    146146| "x<#selection-caret>"
  • trunk/LayoutTests/editing/execCommand/script-tests/toggle-style-2.js

    r68830 r78515  
    3131
    3232testSingleToggle("underline", "test", "<u>test</u>");
    33 testSingleToggle("underline", "<u><b><s>test</s></b></u>", "<b><s>test</s></b>");
     33testSingleToggle("underline", "<u><b><strike>test</strike></b></u>", "<b><strike>test</strike></b>");
    3434testDoubleToggle("underline", "test", "test");
    35 testSingleToggle("strikethrough", "test", "<s>test</s>");
    36 testSingleToggle("strikethrough", "<u><b><s>test</s></b></u>", "<u><b>test</b></u>");
     35testSingleToggle("strikethrough", "test", "<strike>test</strike>");
     36testSingleToggle("strikethrough", "<u><b><strike>test</strike></b></u>", "<u><b>test</b></u>");
    3737testDoubleToggle("strikethrough", "test", "test");
    3838
    39 testSingleToggle("strikethrough", "<u>test</u>", "<u><s>test</s></u>");
    40 testSingleToggle("underline", "<s>test</s>", "<u><s>test</s></u>");
     39testSingleToggle("strikethrough", "<u>test</u>", "<u><strike>test</strike></u>");
     40testSingleToggle("underline", "<strike>test</strike>", "<u><strike>test</strike></u>");
    4141
    42 testSingleToggle("strikethrough", '<span style="text-decoration: overline;">test</span>', '<span style="text-decoration: overline;"><s>test</s></span>');
     42testSingleToggle("strikethrough", '<span style="text-decoration: overline;">test</span>', '<span style="text-decoration: overline;"><strike>test</strike></span>');
    4343testSingleToggle("underline", '<span style="text-decoration: overline;">test</span>', '<span style="text-decoration: overline;"><u>test</u></span>');
    4444
  • trunk/LayoutTests/editing/execCommand/strikethroughSelection-expected.txt

    r49414 r78515  
    22
    33"The quick brown fox jumps over the lazy dog" uses every letter in the english language.
    4 execStrikethroughCommand: <span id="test"><s>"</s>The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
     4execStrikethroughCommand: <span id="test"><strike>"</strike>The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    55execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    6 execStrikethroughCommand: <span id="test"><s>"Th</s>e quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
     6execStrikethroughCommand: <span id="test"><strike>"Th</strike>e quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    77execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    8 execStrikethroughCommand: <span id="test"><s>"The </s>quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
     8execStrikethroughCommand: <span id="test"><strike>"The </strike>quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    99execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    10 execStrikethroughCommand: <span id="test"><s>"The qu</s>ick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
     10execStrikethroughCommand: <span id="test"><strike>"The qu</strike>ick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    1111execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    12 execStrikethroughCommand: <span id="test"><s>"The quic</s>k brown fox jumps over the lazy dog" uses every letter in the english language. </span>
     12execStrikethroughCommand: <span id="test"><strike>"The quic</strike>k brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    1313execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    14 execStrikethroughCommand: <span id="test"><s>"The quick </s>brown fox jumps over the lazy dog" uses every letter in the english language. </span>
     14execStrikethroughCommand: <span id="test"><strike>"The quick </strike>brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    1515execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    16 execStrikethroughCommand: <span id="test"><s>"The quick br</s>own fox jumps over the lazy dog" uses every letter in the english language. </span>
     16execStrikethroughCommand: <span id="test"><strike>"The quick br</strike>own fox jumps over the lazy dog" uses every letter in the english language. </span>
    1717execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    18 execStrikethroughCommand: <span id="test"><s>"The quick brow</s>n fox jumps over the lazy dog" uses every letter in the english language. </span>
     18execStrikethroughCommand: <span id="test"><strike>"The quick brow</strike>n fox jumps over the lazy dog" uses every letter in the english language. </span>
    1919execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    20 execStrikethroughCommand: <span id="test"><s>"The quick brown </s>fox jumps over the lazy dog" uses every letter in the english language. </span>
     20execStrikethroughCommand: <span id="test"><strike>"The quick brown </strike>fox jumps over the lazy dog" uses every letter in the english language. </span>
    2121execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    22 execStrikethroughCommand: <span id="test"><s>"The quick brown fo</s>x jumps over the lazy dog" uses every letter in the english language. </span>
     22execStrikethroughCommand: <span id="test"><strike>"The quick brown fo</strike>x jumps over the lazy dog" uses every letter in the english language. </span>
    2323execStrikethroughCommand: <span id="test">"The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
    24 execStrikethroughCommand: <span id="test"><s>"The quick brown fox </s>jumps over the lazy dog" uses every letter in the english language. </span>
     24execStrikethroughCommand: <span id="test"><strike>"The quick brown fox </strike>jumps over the lazy dog" uses every letter in the english language. </span>
  • trunk/LayoutTests/editing/execCommand/toggle-style-2-expected.txt

    r68830 r78515  
    55
    66PASS one underline command converted test to <u>test</u>
    7 PASS one underline command converted <u><b><s>test</s></b></u> to <b><s>test</s></b>
     7PASS one underline command converted <u><b><strike>test</strike></b></u> to <b><strike>test</strike></b>
    88PASS two underline commands converted test to test
    9 PASS one strikethrough command converted test to <s>test</s>
    10 PASS one strikethrough command converted <u><b><s>test</s></b></u> to <u><b>test</b></u>
     9PASS one strikethrough command converted test to <strike>test</strike>
     10PASS one strikethrough command converted <u><b><strike>test</strike></b></u> to <u><b>test</b></u>
    1111PASS two strikethrough commands converted test to test
    12 PASS one strikethrough command converted <u>test</u> to <u><s>test</s></u>
    13 PASS one underline command converted <s>test</s> to <u><s>test</s></u>
    14 FAIL one strikethrough command converted <span style="text-decoration: overline;">test</span> to <span class="Apple-style-span" style="text-decoration: overline;"><s>test</s></span>, expected <span style="text-decoration: overline;"><s>test</s></span>
     12PASS one strikethrough command converted <u>test</u> to <u><strike>test</strike></u>
     13PASS one underline command converted <strike>test</strike> to <u><strike>test</strike></u>
     14FAIL one strikethrough command converted <span style="text-decoration: overline;">test</span> to <span class="Apple-style-span" style="text-decoration: overline;"><strike>test</strike></span>, expected <span style="text-decoration: overline;"><strike>test</strike></span>
    1515FAIL one underline command converted <span style="text-decoration: overline;">test</span> to <span class="Apple-style-span" style="text-decoration: overline;"><u>test</u></span>, expected <span style="text-decoration: overline;"><u>test</u></span>
    1616PASS successfullyParsed is true
  • trunk/LayoutTests/editing/style/inline-style-container-expected.txt

    r68830 r78515  
    1414PASS fontName(Arial) on all of "<b><u>hello</u> world</b>" yields "<b><font class="Apple-style-span" face="Arial"><u>hello</u> world</font></b>"
    1515PASS foreColor(blue) on all of "<font><u style="color:red;">hello</u></font>" yields "<font color="#0000FF"><u>hello</u></font>"
    16 PASS bold(null) on all of "<u><s>hello</s> <s>world</s></u>" yields "<u><b><s>hello</s> <s>world</s></b></u>"
     16PASS bold(null) on all of "<u><strike>hello</strike> <strike>world</strike></u>" yields "<u><b><strike>hello</strike> <strike>world</strike></b></u>"
    1717PASS bold(null) on all of "<i>hello</i> <b>world</b>" yields "<b><i>hello</i> world</b>"
    18 PASS bold(null) on all of "<s><i><u>hello <b>world</b></u></i> webkit</s>" yields "<s><b><i><u>hello world</u></i> webkit</b></s>"
     18PASS bold(null) on all of "<strike><i><u>hello <b>world</b></u></i> webkit</strike>" yields "<strike><b><i><u>hello world</u></i> webkit</b></strike>"
    1919PASS bold(null) on all of "<b contenteditable="false"><span style="font-weight: normal;">hello</span> world</b> world" yields "<b contenteditable="false"><span style="font-weight: normal;">hello</span> world</b><b> world</b>"
    2020PASS bold(null) on all of "<i>hello</i> <b contenteditable="false">world</b>" yields "<b><i>hello</i> </b><b contenteditable="false">world</b>"
    21 PASS strikeThrough(null) on all of "<i>hello</i> <b><s>world</s></b> WebKit" yields "<s><i>hello</i> <b>world</b> WebKit</s>"
    22 PASS strikeThrough(null) on all of "<b><i>hello <s>world</s></i> WebKit</b>" yields "<b><s><i>hello world</i> WebKit</s></b>"
     21PASS strikeThrough(null) on all of "<i>hello</i> <b><strike>world</strike></b> WebKit" yields "<strike><i>hello</i> <b>world</b> WebKit</strike>"
     22PASS strikeThrough(null) on all of "<b><i>hello <strike>world</strike></i> WebKit</b>" yields "<b><strike><i>hello world</i> WebKit</strike></b>"
    2323
    2424styleWithCSS = true
  • trunk/LayoutTests/editing/style/inline-style-extend-run-expected.txt

    r67490 r78515  
    1010PASS bold(null) on all of "hello <i><b class="test">world</b> WebKit</i>" yields "<b>hello <i><span class="test">world</span> WebKit</i></b>"
    1111PASS bold(null) on all of "hello <b contenteditable="false">world</b> <b>WebKit </b><u><b>rocks</b></u>" yields "<b>hello </b><b contenteditable="false">world</b><b> WebKit <u>rocks</u></b>"
    12 PASS strikeThrough(null) on all of "hello <b>world <s>WebKit</s></b>" yields "<s>hello <b>world WebKit</b></s>"
    13 PASS strikeThrough(null) on all of "hello <i><s>world</s></i><b><s>WebKit</s></b> rocks" yields "<s>hello <i>world</i><b>WebKit</b> rocks</s>"
    14 PASS strikeThrough(null) on all of "hello <i><s>world</s></i> WebKit <b><s>rocks</s></b>" yields "<s>hello <i>world</i> WebKit <b>rocks</b></s>"
     12PASS strikeThrough(null) on all of "hello <b>world <strike>WebKit</strike></b>" yields "<strike>hello <b>world WebKit</b></strike>"
     13PASS strikeThrough(null) on all of "hello <i><strike>world</strike></i><b><strike>WebKit</strike></b> rocks" yields "<strike>hello <i>world</i><b>WebKit</b> rocks</strike>"
     14PASS strikeThrough(null) on all of "hello <i><strike>world</strike></i> WebKit <b><strike>rocks</strike></b>" yields "<strike>hello <i>world</i> WebKit <b>rocks</b></strike>"
    1515PASS bold(null) on all of "hello<div><i>world</i> <b>WebKit</b></div><div>rocks</div>" yields "<b>hello</b><div><b><i>world</i> WebKit</b></div><div><b>rocks</b></div>"
    1616PASS bold(null) on all of "hello<br style="display: block;"><i><b>world</b></i><br><b>WebKit</b>" yields "<b>hello<br style="display: block;"><i>world</i><br>WebKit</b>"
  • trunk/LayoutTests/editing/style/push-down-implicit-styles-around-list-expected.txt

    r66766 r78515  
    1616PASS underline on last word of <ul><li>hello</li><li style="text-decoration: underline; ">world</li></ul> yields <ul><li>hello</li><li>world</li></ul>
    1717PASS underline on first word of <u><ul><li>hello world</li><li>webkit</li></ul></u> yields <ul><li>hello<u> world</u></li><li style="text-decoration: underline; ">webkit</li></ul>
    18 PASS strikethrough on first word of <s><ul><li><s>a</s></li></ul></s> yields <ul><li>a</li></ul>
    19 PASS strikethrough on first word of <s><ul><li>hello</li><li>world</li></ul></s> yields <ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul>
     18PASS strikethrough on first word of <strike><ul><li><strike>a</strike></li></ul></strike> yields <ul><li>a</li></ul>
     19PASS strikethrough on first word of <strike><ul><li>hello</li><li>world</li></ul></strike> yields <ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul>
    2020PASS strikethrough on last word of <ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul> yields <ul><li>hello</li><li>world</li></ul>
    21 PASS strikethrough on first word of <s><ul><li>hello world</li><li>webkit</li></ul></s> yields <ul><li>hello<s> world</s></li><li style="text-decoration: line-through; ">webkit</li></ul>
     21PASS strikethrough on first word of <strike><ul><li>hello world</li><li>webkit</li></ul></strike> yields <ul><li>hello<strike> world</strike></li><li style="text-decoration: line-through; ">webkit</li></ul>
    2222PASS successfullyParsed is true
    2323
  • trunk/LayoutTests/editing/style/push-down-implicit-styles-expected.txt

    r66324 r78515  
    1010PASS bold on second word of <b><em>hello</em> <div>world</div></b> yields <em style="font-weight: bold; ">hello</em> <div>world</div>
    1111PASS bold on all of <b> <div>text</div> </b> yields  <div>text</div>
    12 PASS bold on all of <b><s><div>text</div></s></b> yields <s><div>text</div></s>
     12PASS bold on all of <b><strike><div>text</div></strike></b> yields <strike><div>text</div></strike>
    1313PASS bold on first word of <b><div>hello</div><div>world</div></b> yields <div>hello</div><div style="font-weight: bold; ">world</div>
    1414PASS bold on first word of <b><div>hello</div><div style="font-weight: normal;">world</div>webkit</b> yields <div>hello</div><div style="font-weight: normal; ">world</div><b>webkit</b>
     
    1919PASS underline on second word of <u>hello <b>world webkit</b></u> yields <u>hello</u> <b>world<u> webkit</u></b>
    2020PASS underline on second word of <u><b>hello world</b> webkit</u> yields <b><u>hello</u> world</b><u> webkit</u>
    21 PASS underline on second word of <u><s>hello world</s></u> yields <s><u>hello</u> world</s>
    22 PASS underline on second word of <u><s>hello world webkit</s></u> yields <s><u>hello</u> world<u> webkit</u></s>
    23 PASS underline on second word of <u><s>hello world</s> webkit</u> yields <s><u>hello</u> world</s><u> webkit</u>
     21PASS underline on second word of <u><strike>hello world</strike></u> yields <strike><u>hello</u> world</strike>
     22PASS underline on second word of <u><strike>hello world webkit</strike></u> yields <strike><u>hello</u> world<u> webkit</u></strike>
     23PASS underline on second word of <u><strike>hello world</strike> webkit</u> yields <strike><u>hello</u> world</strike><u> webkit</u>
    2424PASS underline on second word of <u>hello <em><code>world webkit</code></em> rocks</u> yields <u>hello</u> <em><code>world<u> webkit</u></code></em><u> rocks</u>
    25 PASS strikeThrough on all of <s style="color: blue;">hello world</s> yields <span style="color: blue;">hello world</span>
    26 PASS strikeThrough on first word of <s style="color: blue;"><div>hello</div> <b>world</b> webkit</s> yields <span style="color: blue;"><div>hello</div> <b style="text-decoration: line-through; ">world</b><s> webkit</s></span>
     25PASS strikeThrough on all of <s style="color: blue;">hello world</strike> yields <span style="color: blue;">hello world</span>
     26PASS strikeThrough on first word of <s style="color: blue;"><div>hello</div> <b>world</b> webkit</strike> yields <span style="color: blue;"><div>hello</div> <b style="text-decoration: line-through; ">world</b><strike> webkit</strike></span>
    2727PASS successfullyParsed is true
    2828
  • trunk/LayoutTests/editing/style/script-tests/inline-style-container.js

    r68830 r78515  
    2929testSingleToggle("fontName", "Arial", '<b><u>hello</u> world</b>', '<b><font class="Apple-style-span" face="Arial"><u>hello</u> world</font></b>');
    3030testSingleToggle("foreColor", 'blue', '<font><u style="color:red;">hello</u></font>', '<font color="#0000FF"><u>hello</u></font>');
    31 testSingleToggle("bold", null, '<u><s>hello</s> <s>world</s></u>', '<u><b><s>hello</s> <s>world</s></b></u>');
     31testSingleToggle("bold", null, '<u><strike>hello</strike> <strike>world</strike></u>', '<u><b><strike>hello</strike> <strike>world</strike></b></u>');
    3232testSingleToggle("bold", null, '<i>hello</i> <b>world</b>', '<b><i>hello</i> world</b>');
    33 testSingleToggle("bold", null, '<s><i><u>hello <b>world</b></u></i> webkit</s>', '<s><b><i><u>hello world</u></i> webkit</b></s>');
     33testSingleToggle("bold", null, '<strike><i><u>hello <b>world</b></u></i> webkit</strike>', '<strike><b><i><u>hello world</u></i> webkit</b></strike>');
    3434testSingleToggle("bold", null,
    3535    '<b contenteditable="false"><span style="font-weight: normal;">hello</span> world</b> world',
     
    3838    '<i>hello</i> <b contenteditable="false">world</b>',
    3939    '<b><i>hello</i> </b><b contenteditable="false">world</b>');
    40 testSingleToggle("strikeThrough", null, '<i>hello</i> <b><s>world</s></b> WebKit', '<s><i>hello</i> <b>world</b> WebKit</s>');
    41 testSingleToggle("strikeThrough", null, '<b><i>hello <s>world</s></i> WebKit</b>', '<b><s><i>hello world</i> WebKit</s></b>');
     40testSingleToggle("strikeThrough", null, '<i>hello</i> <b><strike>world</strike></b> WebKit', '<strike><i>hello</i> <b>world</b> WebKit</strike>');
     41testSingleToggle("strikeThrough", null, '<b><i>hello <strike>world</strike></i> WebKit</b>', '<b><strike><i>hello world</i> WebKit</strike></b>');
    4242
    4343debug('')
  • trunk/LayoutTests/editing/style/script-tests/inline-style-extend-run.js

    r67490 r78515  
    2424testSingleToggle("bold", null, 'hello <i><b class="test">world</b> WebKit</i>', '<b>hello <i><span class="test">world</span> WebKit</i></b>');
    2525testSingleToggle("bold", null, 'hello <b contenteditable="false">world</b> <b>WebKit </b><u><b>rocks</b></u>', '<b>hello </b><b contenteditable="false">world</b><b> WebKit <u>rocks</u></b>');
    26 testSingleToggle("strikeThrough", null, 'hello <b>world <s>WebKit</s></b>', '<s>hello <b>world WebKit</b></s>');
    27 testSingleToggle("strikeThrough", null, 'hello <i><s>world</s></i><b><s>WebKit</s></b> rocks', '<s>hello <i>world</i><b>WebKit</b> rocks</s>');
    28 testSingleToggle("strikeThrough", null, 'hello <i><s>world</s></i> WebKit <b><s>rocks</s></b>', '<s>hello <i>world</i> WebKit <b>rocks</b></s>');
     26testSingleToggle("strikeThrough", null, 'hello <b>world <strike>WebKit</strike></b>', '<strike>hello <b>world WebKit</b></strike>');
     27testSingleToggle("strikeThrough", null, 'hello <i><strike>world</strike></i><b><strike>WebKit</strike></b> rocks', '<strike>hello <i>world</i><b>WebKit</b> rocks</strike>');
     28testSingleToggle("strikeThrough", null, 'hello <i><strike>world</strike></i> WebKit <b><strike>rocks</strike></b>', '<strike>hello <i>world</i> WebKit <b>rocks</b></strike>');
    2929
    3030// block nodes and br tests
  • trunk/LayoutTests/editing/style/script-tests/push-down-implicit-styles-around-list.js

    r66764 r78515  
    4545testSingleToggle("underline", selectFirstWord, '<u><ul><li>hello world</li><li>webkit</li></ul></u>', '<ul><li>hello<u> world</u></li><li style="text-decoration: underline; ">webkit</li></ul>');
    4646
    47 testSingleToggle("strikethrough", selectFirstWord, '<s><ul><li><s>a</s></li></ul></s>', '<ul><li>a</li></ul>');
    48 testSingleToggle("strikethrough", selectFirstWord, '<s><ul><li>hello</li><li>world</li></ul></s>', '<ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul>');
     47testSingleToggle("strikethrough", selectFirstWord, '<strike><ul><li><strike>a</strike></li></ul></strike>', '<ul><li>a</li></ul>');
     48testSingleToggle("strikethrough", selectFirstWord, '<strike><ul><li>hello</li><li>world</li></ul></strike>', '<ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul>');
    4949testSingleToggle("strikethrough", selectLastWord, '<ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul>', '<ul><li>hello</li><li>world</li></ul>');
    50 testSingleToggle("strikethrough", selectFirstWord, '<s><ul><li>hello world</li><li>webkit</li></ul></s>', '<ul><li>hello<s> world</s></li><li style="text-decoration: line-through; ">webkit</li></ul>');
     50testSingleToggle("strikethrough", selectFirstWord, '<strike><ul><li>hello world</li><li>webkit</li></ul></strike>', '<ul><li>hello<strike> world</strike></li><li style="text-decoration: line-through; ">webkit</li></ul>');
    5151
    5252document.body.removeChild(testContainer);
  • trunk/LayoutTests/editing/style/script-tests/push-down-implicit-styles.js

    r66324 r78515  
    5454testSingleToggle("bold", selectSecondWord, '<b><em>hello</em> <div>world</div></b>', '<em style="font-weight: bold; ">hello</em> <div>world</div>');
    5555testSingleToggle("bold", selectAll, '<b> <div>text</div> </b>', ' <div>text</div> ');
    56 testSingleToggle("bold", selectAll, '<b><s><div>text</div></s></b>', '<s><div>text</div></s>');
     56testSingleToggle("bold", selectAll, '<b><strike><div>text</div></strike></b>', '<strike><div>text</div></strike>');
    5757testSingleToggle("bold", selectFirstWord, '<b><div>hello</div><div>world</div></b>', '<div>hello</div><div style="font-weight: bold; ">world</div>');
    5858testSingleToggle("bold", selectFirstWord, '<b><div>hello</div><div style="font-weight: normal;">world</div>webkit</b>', '<div>hello</div><div style="font-weight: normal; ">world</div><b>webkit</b>');
     
    6464testSingleToggle("underline", selectSecondWord, '<u>hello <b>world webkit</b></u>', '<u>hello</u> <b>world<u> webkit</u></b>');
    6565testSingleToggle("underline", selectSecondWord, '<u><b>hello world</b> webkit</u>', '<b><u>hello</u> world</b><u> webkit</u>');
    66 testSingleToggle("underline", selectSecondWord, '<u><s>hello world</s></u>', '<s><u>hello</u> world</s>');
    67 testSingleToggle("underline", selectSecondWord, '<u><s>hello world webkit</s></u>', '<s><u>hello</u> world<u> webkit</u></s>');
    68 testSingleToggle("underline", selectSecondWord, '<u><s>hello world</s> webkit</u>', '<s><u>hello</u> world</s><u> webkit</u>');
     66testSingleToggle("underline", selectSecondWord, '<u><strike>hello world</strike></u>', '<strike><u>hello</u> world</strike>');
     67testSingleToggle("underline", selectSecondWord, '<u><strike>hello world webkit</strike></u>', '<strike><u>hello</u> world<u> webkit</u></strike>');
     68testSingleToggle("underline", selectSecondWord, '<u><strike>hello world</strike> webkit</u>', '<strike><u>hello</u> world</strike><u> webkit</u>');
    6969testSingleToggle("underline", selectSecondWord, '<u>hello <em><code>world webkit</code></em> rocks</u>', '<u>hello</u> <em><code>world<u> webkit</u></code></em><u> rocks</u>');
    7070
    71 testSingleToggle("strikeThrough", selectAll, '<s style="color: blue;">hello world</s>', '<span style="color: blue;">hello world</span>');
    72 testSingleToggle("strikeThrough", selectFirstWord, '<s style="color: blue;"><div>hello</div> <b>world</b> webkit</s>', '<span style="color: blue;"><div>hello</div> <b style="text-decoration: line-through; ">world</b><s> webkit</s></span>');
     71testSingleToggle("strikeThrough", selectAll, '<s style="color: blue;">hello world</strike>', '<span style="color: blue;">hello world</span>');
     72testSingleToggle("strikeThrough", selectFirstWord, '<s style="color: blue;"><div>hello</div> <b>world</b> webkit</strike>', '<span style="color: blue;"><div>hello</div> <b style="text-decoration: line-through; ">world</b><strike> webkit</strike></span>');
    7373
    7474document.body.removeChild(testContainer);
  • trunk/LayoutTests/editing/style/style-text-node-without-editable-parent-expected.txt

    r64303 r78515  
    6262
    6363strikeThrough first:
    64 | <s>
     64| <strike>
    6565|   "<#selection-anchor>hello, <#selection-focus>"
    6666| "world WebKit"
     
    6868strikeThrough middle:
    6969| "hello, "
    70 | <s>
     70| <strike>
    7171|   "<#selection-anchor>world<#selection-focus>"
    7272| " WebKit"
     
    7474strikeThrough last:
    7575| "hello, world"
    76 | <s>
     76| <strike>
    7777|   "<#selection-anchor> WebKit<#selection-focus>"
    7878
    7979strikeThrough all:
    80 | <s>
     80| <strike>
    8181|   "<#selection-anchor>hello, world WebKit<#selection-focus>"
    8282
  • trunk/Source/WebCore/ChangeLog

    r78508 r78515  
     12011-02-14  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        Strikethrough disappears when posting a message on odnoklassniki.ru
     6        https://bugs.webkit.org/show_bug.cgi?id=53475
     7
     8        Changing the behavior of the strikethrough execCommand when styleWithCSS
     9        is false. We formerly created <s> tags, which was different than both IE
     10        and FF and caused problems with some rich text editors that would strip
     11        out unexpected tags such as <s>.
     12
     13        Test: editing/execCommand/strikethrough-uses-strike-tag.html
     14
     15        * editing/ApplyStyleCommand.cpp:
     16        (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
     17
    1182011-02-14  Pratik Solanki  <psolanki@apple.com>
    219
  • trunk/Source/WebCore/editing/ApplyStyleCommand.cpp

    r78417 r78515  
    18951895
    18961896    if (styleChange.applyLineThrough())
    1897         surroundNodeRangeWithElement(startNode, endNode, createHTMLElement(document(), sTag));
     1897        surroundNodeRangeWithElement(startNode, endNode, createHTMLElement(document(), strikeTag));
    18981898
    18991899    if (styleChange.applySubscript())
  • trunk/Source/WebCore/editing/EditingBoundary.h

    r72777 r78515  
    3131enum EditingBoundaryCrossingRule {
    3232    CanCrossEditingBoundary,
    33     CannotCrossEditingBoundary
     33    CannotCrossEditingBoundary,
     34    CanSkipOverEditingBoundary
    3435};
    3536
Note: See TracChangeset for help on using the changeset viewer.