Changeset 93001 in webkit


Ignore:
Timestamp:
Aug 12, 2011 2:42:58 PM (13 years ago)
Author:
rniwa@webkit.org
Message:

Apple-style-span class seems unnecessary
https://bugs.webkit.org/show_bug.cgi?id=12248

Reviewed by Justin Garcia.

Source/WebCore:

Stop generating span or font elements with class="Apple-style-span" given WebKit's editing component
no longer depends on Apple-style-span since r92823 removed the dependency of copy and paste code on
style spans. WebKit continues to recognize Apple style spans to remove them.

Also renamed isSpanWithoutAttributesOrUnstyleStyleSpan to isSpanWithoutAttributesOrUnstyle*d*StyleSpan.

  • editing/ApplyStyleCommand.cpp:

(WebCore::isLegacyAppleStyleSpan): Renamed from isStyleSpan.
(WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan): Renamed from isSpanWithoutAttributesOr*Unstyle*StyleSpan.
(WebCore::createFontElement): No longer adds class="Apple-style-span".
(WebCore::createStyleSpanElement): Ditto.
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Calls isSpanWithoutAttributesOrUnstyleStyleSpan
instead of isUnstyledStyleSpan since there won't be any Apple style spans.
(WebCore::dummySpanAncestorForNode):
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans): Ditto.
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Ditto.
(WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
(WebCore::ApplyStyleCommand::removeCSSStyle):

  • editing/ApplyStyleCommand.h:
  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::removeStyleFromRulesAndContext): Ditto.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Calls isLegacyAppleStyleSpan instead
of isStyleSpan.
(WebCore::handleStyleSpansBeforeInsertion): Ditto.
(WebCore::ReplaceSelectionCommand::handleStyleSpans): Ditto.
(WebCore::ReplaceSelectionCommand::doApply): Ditto.

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): No longer adds class="Apple-style-span".

LayoutTests:

Rebaselined the tests because spans in these tests lost no longer have class="Apple-style-span".

  • editing/deleting/delete-br-012-expected.txt:
  • editing/deleting/delete-line-break-between-paragraphs-with-same-style-expected.txt:
  • editing/deleting/delete-select-all-001-expected.txt:
  • editing/execCommand/16049-expected.txt:
  • editing/execCommand/5685604-1.html:
  • editing/execCommand/delete-image-in-anchor-expected.txt:
  • editing/execCommand/hilitecolor-expected.txt:
  • editing/execCommand/modifyForeColorByCharacter-expected.txt:
  • editing/execCommand/query-font-size-expected.txt:
  • editing/execCommand/remove-format-multiple-elements-expected.txt:
  • editing/execCommand/script-tests/remove-format-multiple-elements.js:
  • editing/execCommand/script-tests/toggle-text-decorations.js:
  • editing/execCommand/script-tests/toggle-unlink.js:
  • editing/execCommand/toggle-style-2-expected.txt:
  • editing/execCommand/toggle-text-decorations-expected.txt:
  • editing/execCommand/toggle-unlink-expected.txt:
  • editing/inserting/5994480-2-expected.txt:
  • editing/pasteboard/5065605-expected.txt:
  • editing/pasteboard/copy-null-characters-expected.txt:
  • editing/pasteboard/copy-text-with-backgroundcolor-expected.txt:
  • editing/pasteboard/data-transfer-items-expected.txt:
  • editing/pasteboard/do-not-copy-unnecessary-styles-2-expected.txt:
  • editing/pasteboard/do-not-copy-unnecessary-styles-expected.txt:
  • editing/pasteboard/onpaste-text-html-expected.txt:
  • editing/pasteboard/paste-text-with-style-2-expected.txt:
  • editing/style/apply-font-size-to-multiple-nodes-expected.txt:
  • editing/style/block-style-004-expected.txt:
  • editing/style/block-style-005-expected.txt:
  • editing/style/block-style-006-expected.txt:
  • editing/style/fontsize-1-expected.txt:
  • editing/style/fore-color-by-name-expected.txt:
  • editing/style/highlight-insert-paragraph-expected.txt:
  • editing/style/inline-style-container-expected.txt:
  • editing/style/inline-style-extend-run-expected.txt:
  • editing/style/invalid-font-size-expected.txt:
  • editing/style/push-down-font-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-font-styles.js:
  • editing/style/style-text-node-without-editable-parent-expected.txt:
  • fast/events/ondrop-text-html-expected.txt:
  • platform/chromium-win/editing/inserting/5994480-2-expected.txt:
  • platform/gtk/editing/inserting/5994480-2-expected.txt:
Location:
trunk
Files:
50 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r92997 r93001  
     12011-08-12  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Apple-style-span class seems unnecessary
     4        https://bugs.webkit.org/show_bug.cgi?id=12248
     5
     6        Reviewed by Justin Garcia.
     7
     8        Rebaselined the tests because spans in these tests lost no longer have class="Apple-style-span".
     9
     10        * editing/deleting/delete-br-012-expected.txt:
     11        * editing/deleting/delete-line-break-between-paragraphs-with-same-style-expected.txt:
     12        * editing/deleting/delete-select-all-001-expected.txt:
     13        * editing/execCommand/16049-expected.txt:
     14        * editing/execCommand/5685604-1.html:
     15        * editing/execCommand/delete-image-in-anchor-expected.txt:
     16        * editing/execCommand/hilitecolor-expected.txt:
     17        * editing/execCommand/modifyForeColorByCharacter-expected.txt:
     18        * editing/execCommand/query-font-size-expected.txt:
     19        * editing/execCommand/remove-format-multiple-elements-expected.txt:
     20        * editing/execCommand/script-tests/remove-format-multiple-elements.js:
     21        * editing/execCommand/script-tests/toggle-text-decorations.js:
     22        * editing/execCommand/script-tests/toggle-unlink.js:
     23        * editing/execCommand/toggle-style-2-expected.txt:
     24        * editing/execCommand/toggle-text-decorations-expected.txt:
     25        * editing/execCommand/toggle-unlink-expected.txt:
     26        * editing/inserting/5994480-2-expected.txt:
     27        * editing/pasteboard/5065605-expected.txt:
     28        * editing/pasteboard/copy-null-characters-expected.txt:
     29        * editing/pasteboard/copy-text-with-backgroundcolor-expected.txt:
     30        * editing/pasteboard/data-transfer-items-expected.txt:
     31        * editing/pasteboard/do-not-copy-unnecessary-styles-2-expected.txt:
     32        * editing/pasteboard/do-not-copy-unnecessary-styles-expected.txt:
     33        * editing/pasteboard/onpaste-text-html-expected.txt:
     34        * editing/pasteboard/paste-text-with-style-2-expected.txt:
     35        * editing/style/apply-font-size-to-multiple-nodes-expected.txt:
     36        * editing/style/block-style-004-expected.txt:
     37        * editing/style/block-style-005-expected.txt:
     38        * editing/style/block-style-006-expected.txt:
     39        * editing/style/fontsize-1-expected.txt:
     40        * editing/style/fore-color-by-name-expected.txt:
     41        * editing/style/highlight-insert-paragraph-expected.txt:
     42        * editing/style/inline-style-container-expected.txt:
     43        * editing/style/inline-style-extend-run-expected.txt:
     44        * editing/style/invalid-font-size-expected.txt:
     45        * editing/style/push-down-font-styles-expected.txt:
     46        * editing/style/script-tests/inline-style-container.js:
     47        * editing/style/script-tests/inline-style-extend-run.js:
     48        * editing/style/script-tests/push-down-font-styles.js:
     49        * editing/style/style-text-node-without-editable-parent-expected.txt:
     50        * fast/events/ondrop-text-html-expected.txt:
     51        * platform/chromium-win/editing/inserting/5994480-2-expected.txt:
     52        * platform/gtk/editing/inserting/5994480-2-expected.txt:
     53
    1542011-08-12  Sadrul Habib Chowdhury  <sadrul@chromium.org>
    255
  • trunk/LayoutTests/editing/deleting/delete-br-012-expected.txt

    r67170 r93001  
    1717|   style="border-style:solid; border-color:blue;"
    1818|   <font>
    19 |     class="Apple-style-span"
    2019|     size="5"
    2120|     <#selection-caret>
  • trunk/LayoutTests/editing/deleting/delete-line-break-between-paragraphs-with-same-style-expected.txt

    r87937 r93001  
    88|     "hello world<#selection-caret>"
    99|   <span>
    10 |     class="Apple-style-span"
    1110|     style="font-family: monospace; "
    1211|     "WebKit"
  • trunk/LayoutTests/editing/deleting/delete-select-all-001-expected.txt

    r87466 r93001  
    11
    2 execDeleteCommand: <font class="Apple-style-span" size="3"><br></font>
     2execDeleteCommand: <font size="3"><br></font>
  • trunk/LayoutTests/editing/execCommand/16049-expected.txt

    r34682 r93001  
    11This tests to see if BackColor can be performed on a caret selection. The text typed afterword should have the new background color.
    2 <span class="Apple-style-span" style="background-color: rgb(0, 0, 255);">Blue</span>
     2<span style="background-color: rgb(0, 0, 255);">Blue</span>
    33
    44This tests to see if ForeColor can be performed in a plaintext-only region. The text typed afterword should not have the requested color.
  • trunk/LayoutTests/editing/execCommand/5685604-1.html

    r40560 r93001  
    2626document.execCommand("bold", false, "");
    2727
    28 expectedHTML = "The <b>second</b> and last words in this sentence should be <span class=\"Apple-style-span\" style=\"font-weight: bold;\">bold</span>.";
     28expectedHTML = "The <b>second</b> and last words in this sentence should be <span style=\"font-weight: bold;\">bold</span>.";
    2929
    3030if (div.innerHTML == expectedHTML)
  • trunk/LayoutTests/editing/execCommand/delete-image-in-anchor-expected.txt

    r78773 r93001  
    22
    33BEFORE: <a href="../resources/abe.png"><img style="display:block; margin:0px auto 10px; text-align:center;width: 60px; height: 60px;" src="../resources/abe.png" border="0"></a> <br>
    4 AFTER: <div style="text-align: center;"><font class="Apple-style-span" color="#0000ee"><u><br></u></font></div> <br>
     4AFTER: <div style="text-align: center;"><font color="#0000ee"><u><br></u></font></div> <br>
  • trunk/LayoutTests/editing/execCommand/hilitecolor-expected.txt

    r80121 r93001  
    1515| "<#selection-caret>The "
    1616| <span>
    17 |   class="Apple-style-span"
    1817|   style="background-color: red;"
    1918|   "second"
  • trunk/LayoutTests/editing/execCommand/modifyForeColorByCharacter-expected.txt

    r47608 r93001  
    22
    33"The quick brown fox jumps over the lazy dog" uses every letter in the english language.
    4 execForeColorCommand: <span id="test"><font class="Apple-style-span" color="#008000">"</font>The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
     4execForeColorCommand: <span id="test"><font color="#008000">"</font>The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
  • trunk/LayoutTests/editing/execCommand/query-font-size-expected.txt

    r68830 r93001  
    11test    html    queryCommandValue result
    2 execCommand('FontSize', -2)     <font class="Apple-style-span" size="1">test</font>     1
    3 execCommand('FontSize', -1)     <font class="Apple-style-span" size="2">test</font>     2
    4 execCommand('FontSize', 0)      <font class="Apple-style-span" size="1">test</font>     1
    5 execCommand('FontSize', 1)      <font class="Apple-style-span" size="1">test</font>     1
    6 execCommand('FontSize', 2)      <font class="Apple-style-span" size="2">test</font>     2
     2execCommand('FontSize', -2)     <font size="1">test</font>      1
     3execCommand('FontSize', -1)     <font size="2">test</font>      2
     4execCommand('FontSize', 0)      <font size="1">test</font>      1
     5execCommand('FontSize', 1)      <font size="1">test</font>      1
     6execCommand('FontSize', 2)      <font size="2">test</font>      2
    77execCommand('FontSize', 3)      test    3
    8 execCommand('FontSize', 4)      <font class="Apple-style-span" size="4">test</font>     4
    9 execCommand('FontSize', 5)      <font class="Apple-style-span" size="5">test</font>     5
    10 execCommand('FontSize', 6)      <font class="Apple-style-span" size="6">test</font>     6
    11 execCommand('FontSize', 7)      <font class="Apple-style-span" size="7">test</font>     7
    12 execCommand('FontSize', '8px')  <font class="Apple-style-span" size="7">test</font>     7
    13 execCommand('FontSize', '2px')  <font class="Apple-style-span" size="2">test</font>     2
     8execCommand('FontSize', 4)      <font size="4">test</font>      4
     9execCommand('FontSize', 5)      <font size="5">test</font>      5
     10execCommand('FontSize', 6)      <font size="6">test</font>      6
     11execCommand('FontSize', 7)      <font size="7">test</font>      7
     12execCommand('FontSize', '8px')  <font size="7">test</font>      7
     13execCommand('FontSize', '2px')  <font size="2">test</font>      2
    1414manual CSS font-size: 3px       <span style="font-size: 3px">test</span>        1
    1515manual CSS font-size: 0.2em     <span style="font-size: 0.2em">test</span>      1
     
    2020manual CSS font-size: 10px      <span style="font-size: 10px">test</span>       1
    2121monospace tests to ensure the bug 19161 does not affect queryCommandValue's values
    22 execCommand('FontSize', -2)     <font class="Apple-style-span" size="1" face="monospace">test</font>    1
    23 execCommand('FontSize', -1)     <font class="Apple-style-span" size="2" face="monospace">test</font>    2
    24 execCommand('FontSize', 0)      <font class="Apple-style-span" size="1" face="monospace">test</font>    1
    25 execCommand('FontSize', 1)      <font class="Apple-style-span" size="1" face="monospace">test</font>    1
    26 execCommand('FontSize', 2)      <font class="Apple-style-span" size="2" face="monospace">test</font>    2
    27 execCommand('FontSize', 3)      <font class="Apple-style-span" face="monospace">test</font>     3
    28 execCommand('FontSize', 4)      <font class="Apple-style-span" size="4" face="monospace">test</font>    4
    29 execCommand('FontSize', 5)      <font class="Apple-style-span" size="5" face="monospace">test</font>    5
    30 execCommand('FontSize', 6)      <font class="Apple-style-span" size="6" face="monospace">test</font>    6
    31 execCommand('FontSize', 7)      <font class="Apple-style-span" size="7" face="monospace">test</font>    7
     22execCommand('FontSize', -2)     <font size="1" face="monospace">test</font>     1
     23execCommand('FontSize', -1)     <font size="2" face="monospace">test</font>     2
     24execCommand('FontSize', 0)      <font size="1" face="monospace">test</font>     1
     25execCommand('FontSize', 1)      <font size="1" face="monospace">test</font>     1
     26execCommand('FontSize', 2)      <font size="2" face="monospace">test</font>     2
     27execCommand('FontSize', 3)      <font face="monospace">test</font>      3
     28execCommand('FontSize', 4)      <font size="4" face="monospace">test</font>     4
     29execCommand('FontSize', 5)      <font size="5" face="monospace">test</font>     5
     30execCommand('FontSize', 6)      <font size="6" face="monospace">test</font>     6
     31execCommand('FontSize', 7)      <font size="7" face="monospace">test</font>     7
  • trunk/LayoutTests/editing/execCommand/remove-format-multiple-elements-expected.txt

    r70283 r93001  
    2020PASS RemoveFormat on second word of "<font color="red"><b style="font-size: large;"><u>hello</u> world</b> WebKit</font>" yields "<font color="red"><b style="font-size: large;"><u>hello</u> </b></font>world<font color="red"> WebKit</font>"
    2121PASS RemoveFormat on second word of "<font size="5"><i><u style="font-size: small;">hello</u> world</i><font size="3"> WebKit</font></font>" yields "<font size="5"><i><u style="font-size: small;">hello</u> </i></font>world<font size="5"><font size="3"> WebKit</font></font>"
    22 PASS RemoveFormat on second word of "<sup><div style="text-decoration: underline; font-size: large;">hello <dfn style="font-size: normal;">world</dfn></div> WebKit</sup>" yields "<div><sup><font class="Apple-style-span" size="4"><u>hello </u></font></sup>world</div><sup> WebKit</sup>"
     22PASS RemoveFormat on second word of "<sup><div style="text-decoration: underline; font-size: large;">hello <dfn style="font-size: normal;">world</dfn></div> WebKit</sup>" yields "<div><sup><font size="4"><u>hello </u></font></sup>world</div><sup> WebKit</sup>"
    2323PASS successfullyParsed is true
    2424
  • trunk/LayoutTests/editing/execCommand/script-tests/remove-format-multiple-elements.js

    r70283 r93001  
    7272    selectSecondWord, '<font size="5"><i><u style="font-size: small;">hello</u> </i></font>world<font size="5"><font size="3"> WebKit</font></font>');
    7373testRemoveFormat('<sup><div style="text-decoration: underline; font-size: large;">hello <dfn style="font-size: normal;">world</dfn></div> WebKit</sup>',
    74     selectSecondWord, '<div><sup><font class="Apple-style-span" size="4"><u>hello </u></font></sup>world</div><sup> WebKit</sup>');
     74    selectSecondWord, '<div><sup><font size="4"><u>hello </u></font></sup>world</div><sup> WebKit</sup>');
    7575
    7676document.body.removeChild(testContainer);
  • trunk/LayoutTests/editing/execCommand/script-tests/toggle-text-decorations.js

    r48548 r93001  
    1818}
    1919
    20 testSingleToggle("underline", "test", "<span class=\"Apple-style-span\" style=\"text-decoration: underline;\">test</span>");
    21 testSingleToggle("underline", "<span class=\"Apple-style-span\" style=\"text-decoration: underline;\">test</span>", "test");
    22 testSingleToggle("underline", "<span class=\"Apple-style-span\" style=\"text-decoration: underline line-through overline;\">test</span>", "<span class=\"Apple-style-span\" style=\"text-decoration: overline line-through;\">test</span>");
    23 testSingleToggle("strikethrough", "test", "<span class=\"Apple-style-span\" style=\"text-decoration: line-through;\">test</span>");
    24 testSingleToggle("strikethrough", "<span class=\"Apple-style-span\" style=\"text-decoration: line-through;\">test</span>", "test");
    25 testSingleToggle("strikethrough", "<span class=\"Apple-style-span\" style=\"text-decoration: underline line-through overline;\">test</span>", "<span class=\"Apple-style-span\" style=\"text-decoration: underline overline;\">test</span>");
     20testSingleToggle("underline", "test", "<span style=\"text-decoration: underline;\">test</span>");
     21testSingleToggle("underline", "<span style=\"text-decoration: underline;\">test</span>", "test");
     22testSingleToggle("underline", "<span style=\"text-decoration: underline line-through overline;\">test</span>", "<span style=\"text-decoration: overline line-through;\">test</span>");
     23testSingleToggle("strikethrough", "test", "<span style=\"text-decoration: line-through;\">test</span>");
     24testSingleToggle("strikethrough", "<span style=\"text-decoration: line-through;\">test</span>", "test");
     25testSingleToggle("strikethrough", "<span style=\"text-decoration: underline line-through overline;\">test</span>", "<span style=\"text-decoration: underline overline;\">test</span>");
    2626
    2727document.body.removeChild(testContainer);
  • trunk/LayoutTests/editing/execCommand/script-tests/toggle-unlink.js

    r78773 r93001  
    4646testSingleToggle("unlink", 'hello <i><a href="http://webkit.org/">world</a></i>', selectAll, 'hello <i>world</i>');
    4747testSingleToggle("unlink", 'hello <a href="http://webkit.org/" style="font-weight: bold;">world</a>', selectAll, 'hello <b>world</b>');
    48 testSingleToggle("unlink", 'hello <a href="http://webkit.org/" style="color: blue;">world</a> WebKit', selectAll, 'hello <font class="Apple-style-span" color="#0000ff">world</font> WebKit');
    49 testSingleToggle("unlink", 'hello <a href="http://webkit.org/" style="color: blue; display: block;">world</a> WebKit', selectAll, 'hello <font class="Apple-style-span" color="#0000ff"><span class="Apple-style-span" style="display: block;">world</span></font> WebKit');
     48testSingleToggle("unlink", 'hello <a href="http://webkit.org/" style="color: blue;">world</a> WebKit', selectAll, 'hello <font color="#0000ff">world</font> WebKit');
     49testSingleToggle("unlink", 'hello <a href="http://webkit.org/" style="color: blue; display: block;">world</a> WebKit',
     50    selectAll, 'hello <font color="#0000ff"><span style="display: block;">world</span></font> WebKit');
    5051testSingleToggle("unlink", '<a href="http://webkit.org/" style="font-size: large;">hello world</a> WebKit',
    51     selectLastTwoWords, '<a href="http://webkit.org/" style="font-size: large;">hello </a><font class="Apple-style-span" size="4">world</font> WebKit');
     52    selectLastTwoWords, '<a href="http://webkit.org/" style="font-size: large;">hello </a><font size="4">world</font> WebKit');
    5253testSingleToggle("unlink", 'hello <a href="http://webkit.org/" style="font-size: large;">world <span style="font-size: small; ">WebKit</span> rocks</a>',
    53     selectLastTwoWords, 'hello <a href="http://webkit.org/"><font class="Apple-style-span" size="4">world </font></a><span style="font-size: small; ">WebKit</span><font class="Apple-style-span" size="4"> rocks</font>');
     54    selectLastTwoWords, 'hello <a href="http://webkit.org/"><font size="4">world </font></a><span style="font-size: small; ">WebKit</span><font size="4"> rocks</font>');
    5455testSingleToggle("unlink", 'hello <a href="http://webkit.org/" style="font-style: italic;"><b>world</b> WebKit</a>',
    5556    selectFirstTwoWords, 'hello <b style="font-style: italic; ">world</b><a href="http://webkit.org/"><i> WebKit</i></a>');
     
    5859    selectAll, '<div style="background-color: yellow; ">hello</div><div style="background-color: yellow; ">world</div>');
    5960testSingleToggle("unlink", 'hello<a href="http://webkit.org/" style="background-color: yellow;"><div>world</div></a>WebKit',
    60     selectAll, 'hello<div style="background-color: yellow; ">world</div><span class="Apple-style-span" style="background-color: yellow;">WebKit</span>');
     61    selectAll, 'hello<div style="background-color: yellow; ">world</div><span style="background-color: yellow;">WebKit</span>');
    6162testSingleToggle("unlink", '<a href="http://webkit.org/" style="font-weight: bold;"><div>hello</div><div>world WebKit</div></a>',
    6263    selectLastTwoWords, '<a href="http://webkit.org/"><div style="font-weight: bold; ">hello</div></a><div style="font-weight: bold; ">world WebKit</div>');
  • trunk/LayoutTests/editing/execCommand/toggle-style-2-expected.txt

    r78515 r93001  
    1212PASS one strikethrough command converted <u>test</u> to <u><strike>test</strike></u>
    1313PASS one underline command converted <strike>test</strike> to <u><strike>test</strike></u>
    14 FAIL 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>
    15 FAIL 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>
     14PASS one strikethrough command converted <span style="text-decoration: overline;">test</span> to <span style="text-decoration: overline;"><strike>test</strike></span>
     15PASS one underline command converted <span style="text-decoration: overline;">test</span> to <span style="text-decoration: overline;"><u>test</u></span>
    1616PASS successfullyParsed is true
    1717
  • trunk/LayoutTests/editing/execCommand/toggle-text-decorations-expected.txt

    r46251 r93001  
    44
    55
    6 PASS one underline command converted test to <span class="Apple-style-span" style="text-decoration: underline;">test</span>
    7 PASS one underline command converted <span class="Apple-style-span" style="text-decoration: underline;">test</span> to test
    8 PASS one underline command converted <span class="Apple-style-span" style="text-decoration: underline line-through overline;">test</span> to <span class="Apple-style-span" style="text-decoration: overline line-through;">test</span>
    9 PASS one strikethrough command converted test to <span class="Apple-style-span" style="text-decoration: line-through;">test</span>
    10 PASS one strikethrough command converted <span class="Apple-style-span" style="text-decoration: line-through;">test</span> to test
    11 PASS one strikethrough command converted <span class="Apple-style-span" style="text-decoration: underline line-through overline;">test</span> to <span class="Apple-style-span" style="text-decoration: underline overline;">test</span>
     6PASS one underline command converted test to <span style="text-decoration: underline;">test</span>
     7PASS one underline command converted <span style="text-decoration: underline;">test</span> to test
     8PASS one underline command converted <span style="text-decoration: underline line-through overline;">test</span> to <span style="text-decoration: overline line-through;">test</span>
     9PASS one strikethrough command converted test to <span style="text-decoration: line-through;">test</span>
     10PASS one strikethrough command converted <span style="text-decoration: line-through;">test</span> to test
     11PASS one strikethrough command converted <span style="text-decoration: underline line-through overline;">test</span> to <span style="text-decoration: underline overline;">test</span>
    1212PASS successfullyParsed is true
    1313
  • trunk/LayoutTests/editing/execCommand/toggle-unlink-expected.txt

    r78773 r93001  
    88PASS unlink on all of "hello <i><a href="http://webkit.org/">world</a></i>" yields "hello <i>world</i>"
    99PASS unlink on all of "hello <a href="http://webkit.org/" style="font-weight: bold;">world</a>" yields "hello <b>world</b>"
    10 PASS unlink on all of "hello <a href="http://webkit.org/" style="color: blue;">world</a> WebKit" yields "hello <font class="Apple-style-span" color="#0000ff">world</font> WebKit"
    11 PASS unlink on all of "hello <a href="http://webkit.org/" style="color: blue; display: block;">world</a> WebKit" yields "hello <font class="Apple-style-span" color="#0000ff"><span class="Apple-style-span" style="display: block;">world</span></font> WebKit"
    12 PASS unlink on last two words of "<a href="http://webkit.org/" style="font-size: large;">hello world</a> WebKit" yields "<a href="http://webkit.org/" style="font-size: large;">hello </a><font class="Apple-style-span" size="4">world</font> WebKit"
    13 PASS unlink on last two words of "hello <a href="http://webkit.org/" style="font-size: large;">world <span style="font-size: small; ">WebKit</span> rocks</a>" yields "hello <a href="http://webkit.org/"><font class="Apple-style-span" size="4">world </font></a><span style="font-size: small; ">WebKit</span><font class="Apple-style-span" size="4"> rocks</font>"
     10PASS unlink on all of "hello <a href="http://webkit.org/" style="color: blue;">world</a> WebKit" yields "hello <font color="#0000ff">world</font> WebKit"
     11PASS unlink on all of "hello <a href="http://webkit.org/" style="color: blue; display: block;">world</a> WebKit" yields "hello <font color="#0000ff"><span style="display: block;">world</span></font> WebKit"
     12PASS unlink on last two words of "<a href="http://webkit.org/" style="font-size: large;">hello world</a> WebKit" yields "<a href="http://webkit.org/" style="font-size: large;">hello </a><font size="4">world</font> WebKit"
     13PASS unlink on last two words of "hello <a href="http://webkit.org/" style="font-size: large;">world <span style="font-size: small; ">WebKit</span> rocks</a>" yields "hello <a href="http://webkit.org/"><font size="4">world </font></a><span style="font-size: small; ">WebKit</span><font size="4"> rocks</font>"
    1414PASS unlink on first two words of "hello <a href="http://webkit.org/" style="font-style: italic;"><b>world</b> WebKit</a>" yields "hello <b style="font-style: italic; ">world</b><a href="http://webkit.org/"><i> WebKit</i></a>"
    1515PASS unlink on all of "<a href="http://webkit.org/" style="background-color: yellow;"><div>hello</div><div>world</div></a>" yields "<div style="background-color: yellow; ">hello</div><div style="background-color: yellow; ">world</div>"
    16 PASS unlink on all of "hello<a href="http://webkit.org/" style="background-color: yellow;"><div>world</div></a>WebKit" yields "hello<div style="background-color: yellow; ">world</div><span class="Apple-style-span" style="background-color: yellow;">WebKit</span>"
     16PASS unlink on all of "hello<a href="http://webkit.org/" style="background-color: yellow;"><div>world</div></a>WebKit" yields "hello<div style="background-color: yellow; ">world</div><span style="background-color: yellow;">WebKit</span>"
    1717PASS unlink on last two words of "<a href="http://webkit.org/" style="font-weight: bold;"><div>hello</div><div>world WebKit</div></a>" yields "<a href="http://webkit.org/"><div style="font-weight: bold; ">hello</div></a><div style="font-weight: bold; ">world WebKit</div>"
    1818PASS unlink on last word of "<a href="http://webkit.org/" style="font-weight: bold;"><div style="font-weight: normal;">hello</div><div>world</div></a>" yields "<a href="http://webkit.org/"><div style="font-weight: normal; ">hello</div></a><div style="font-weight: bold; ">world</div>"
  • trunk/LayoutTests/editing/inserting/5994480-2-expected.txt

    r67170 r93001  
    1 <font class="Apple-style-span" face="'Lucida Grande'"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font>
     1<font face="'Lucida Grande'"><span style="font-size: 11px;"><br></span></font>
  • trunk/LayoutTests/editing/pasteboard/5065605-expected.txt

    r92695 r93001  
    2929This tests for a bug where text copied with Select All + Copy would lose its color.
    3030| <font>
    31 |   class="Apple-style-span"
    3231|   color="#ff0000"
    3332|   "This text should be red."
    3433| <div>
    3534|   <font>
    36 |     class="Apple-style-span"
    3735|     color="#ff0000"
    3836|     "This text should be red."
    3937| <div>
    4038|   <font>
    41 |     class="Apple-style-span"
    4239|     color="#ff0000"
    4340|     "This text should be red."
    4441|   <div>
    4542|     <font>
    46 |       class="Apple-style-span"
    4743|       color="#ff0000"
    4844|       "This text should be red.<#selection-caret>"
  • trunk/LayoutTests/editing/pasteboard/copy-null-characters-expected.txt

    r90608 r93001  
    2929|     "Copy paste me"
    3030|   <span>
    31 |     class="Apple-style-span"
    3231|     style="color: rgb(0, 128, 0); "
    3332|     "green"
  • trunk/LayoutTests/editing/pasteboard/copy-text-with-backgroundcolor-expected.txt

    r87082 r93001  
    5858|   "Red background"
    5959| <span>
    60 |   class="Apple-style-span"
    6160|   style="background-color: rgb(255, 0, 0); "
    6261|   "Red background"
     
    6766|     "Green background"
    6867|   <span>
    69 |     class="Apple-style-span"
    7068|     style="background-color: rgb(0, 128, 0); "
    7169|     "Green background"
  • trunk/LayoutTests/editing/pasteboard/data-transfer-items-expected.txt

    r92823 r93001  
    2121copy: items[0] value: Hello World!
    2222copy: items[1] value: <b>Hello World!
    23 paste: items[0] value: <span class="Apple-style-span" style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; display: inline !important; float: none; ">This file tests the basic functionality and properties of DataTransferItems. This test requires DRT.</span>
     23paste: items[0] value: <span style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; display: inline !important; float: none; ">This file tests the basic functionality and properties of DataTransferItems. This test requires DRT.</span>
    2424paste: items[1] value: This file tests the basic functionality and properties of DataTransferItems. This test requires DRT.
    2525
  • trunk/LayoutTests/editing/pasteboard/do-not-copy-unnecessary-styles-2-expected.txt

    r87082 r93001  
    44You should not see any borders:
    55| <span>
    6 |   class="Apple-style-span"
    76|   style="color: rgb(0, 0, 255); background-color: rgb(255, 255, 0); "
    87|   "Hello<#selection-caret>"
  • trunk/LayoutTests/editing/pasteboard/do-not-copy-unnecessary-styles-expected.txt

    r87082 r93001  
    44To manually this test, select the text inside the div with the border, cut and paste it back. You should not see an additional red border.
    55<div style="border: 2px solid red">
    6 <div id="test"><span class="Apple-style-span" style="background-color: rgb(187, 187, 187); ">Select this text</span><br></div>
     6<div id="test"><span style="background-color: rgb(187, 187, 187); ">Select this text</span><br></div>
    77</div>
    88</div>
  • trunk/LayoutTests/editing/pasteboard/onpaste-text-html-expected.txt

    r92823 r93001  
    11CONSOLE MESSAGE: line 21: text/plain: This test verifies that we can get text/html from the clipboard during an onpaste event.
    2 CONSOLE MESSAGE: line 23: text/html: <span class="Apple-style-span" style="color: rgb(0, 0, 0);  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; display: inline !important; float: none; ">This test verifies that we can get text/html from the clipboard during an onpaste event.<span class="Apple-converted-space"> </span></span>
     2CONSOLE MESSAGE: line 23: text/html: <span style="color: rgb(0, 0, 0);  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; display: inline !important; float: none; ">This test verifies that we can get text/html from the clipboard during an onpaste event.<span class="Apple-converted-space"> </span></span>
    33This test verifies that we can get text/html from the clipboard during an onpaste event. This test requires DRT.
    44Paste content in this div.This test verifies that we can get text/html from the clipboard during an onpaste event. 
  • trunk/LayoutTests/editing/pasteboard/paste-text-with-style-2-expected.txt

    r92695 r93001  
    1818|         "hello world<#selection-caret>"
    1919| <font>
    20 |   class="Apple-style-span"
    2120|   color="#ff0000"
    2221|   <b>
  • trunk/LayoutTests/editing/style/apply-font-size-to-multiple-nodes-expected.txt

    r67243 r93001  
    33You should see exactly one font element with size="7" and exactly one span:
    44| <font>
    5 |   class="Apple-style-span"
    65|   size="7"
    76|   "
  • trunk/LayoutTests/editing/style/block-style-004-expected.txt

    r67170 r93001  
    77execInsertParagraphCommand: <div id="test" class="editing">x</div><div id="test" class="editing"><br></div><div id="test" class="editing"><br></div>
    88execTypeCharacterCommand: <div id="test" class="editing">x</div><div id="test" class="editing"><br></div><div id="test" class="editing">x</div>
    9 execFontSizeCommand: <div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div><div id="test" class="editing"><font class="Apple-style-span" size="7"><br></font></div><div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div>
    10 execInsertParagraphCommand: <div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div><div id="test" class="editing"><font class="Apple-style-span" size="7"><br></font></div><div id="test" class="editing"><font class="Apple-style-span" size="7"><br></font></div><div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div>
     9execFontSizeCommand: <div id="test" class="editing"><font size="7">x</font></div><div id="test" class="editing"><font size="7"><br></font></div><div id="test" class="editing"><font size="7">x</font></div>
     10execInsertParagraphCommand: <div id="test" class="editing"><font size="7">x</font></div><div id="test" class="editing"><font size="7"><br></font></div><div id="test" class="editing"><font size="7"><br></font></div><div id="test" class="editing"><font size="7">x</font></div>
  • trunk/LayoutTests/editing/style/block-style-005-expected.txt

    r67170 r93001  
    66execInsertParagraphCommand: <div id="test" class="editing">x</div><div id="test" class="editing"><br></div><div id="test" class="editing"><br></div>
    77execTypeCharacterCommand: <div id="test" class="editing">x</div><div id="test" class="editing"><br></div><div id="test" class="editing">x</div>
    8 execFontSizeCommand: <div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div><div id="test" class="editing"><font class="Apple-style-span" size="7"><br></font></div><div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div>
    9 execDeleteCommand: <div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div><div id="test" class="editing"><font class="Apple-style-span" size="7"><br></font></div><div id="test" class="editing"><font class="Apple-style-span" size="7"><br></font></div>
     8execFontSizeCommand: <div id="test" class="editing"><font size="7">x</font></div><div id="test" class="editing"><font size="7"><br></font></div><div id="test" class="editing"><font size="7">x</font></div>
     9execDeleteCommand: <div id="test" class="editing"><font size="7">x</font></div><div id="test" class="editing"><font size="7"><br></font></div><div id="test" class="editing"><font size="7"><br></font></div>
  • trunk/LayoutTests/editing/style/block-style-006-expected.txt

    r67170 r93001  
    77execInsertParagraphCommand: <div id="test" class="editing">x</div><div id="test" class="editing"><br></div><div id="test" class="editing"><br></div>
    88execTypeCharacterCommand: <div id="test" class="editing">x</div><div id="test" class="editing"><br></div><div id="test" class="editing">x</div>
    9 execFontSizeCommand: <div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div><div id="test" class="editing"><font class="Apple-style-span" size="7"><br></font></div><div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div>
    10 execInsertParagraphCommand: <div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div><div id="test" class="editing"><font class="Apple-style-span" size="7"><br></font></div><div id="test" class="editing"><font class="Apple-style-span" size="7"><br></font></div><div id="test" class="editing"><font class="Apple-style-span" size="7">x</font></div>
     9execFontSizeCommand: <div id="test" class="editing"><font size="7">x</font></div><div id="test" class="editing"><font size="7"><br></font></div><div id="test" class="editing"><font size="7">x</font></div>
     10execInsertParagraphCommand: <div id="test" class="editing"><font size="7">x</font></div><div id="test" class="editing"><font size="7"><br></font></div><div id="test" class="editing"><font size="7"><br></font></div><div id="test" class="editing"><font size="7">x</font></div>
  • trunk/LayoutTests/editing/style/fontsize-1-expected.txt

    r67170 r93001  
    99type small:
    1010| <font>
    11 |   class="Apple-style-span"
    1211|   size="2"
    1312|   "small<#selection-caret>"
     
    1514fontsize 4:
    1615| <font>
    17 |   class="Apple-style-span"
    1816|   size="2"
    1917|   "small<#selection-caret>"
     
    2119type medium:
    2220| <font>
    23 |   class="Apple-style-span"
    2421|   size="2"
    2522|   "small"
    2623| <font>
    27 |   class="Apple-style-span"
    2824|   size="4"
    2925|   "medium<#selection-caret>"
     
    3127fontsize 6:
    3228| <font>
    33 |   class="Apple-style-span"
    3429|   size="2"
    3530|   "small"
    3631| <font>
    37 |   class="Apple-style-span"
    3832|   size="4"
    3933|   "medium<#selection-caret>"
     
    4135type large:
    4236| <font>
    43 |   class="Apple-style-span"
    4437|   size="2"
    4538|   "small"
    4639| <font>
    47 |   class="Apple-style-span"
    4840|   size="4"
    4941|   "medium"
    5042| <font>
    51 |   class="Apple-style-span"
    5243|   size="6"
    5344|   "large<#selection-caret>"
  • trunk/LayoutTests/editing/style/fore-color-by-name-expected.txt

    r78773 r93001  
    33| "hello "
    44| <font>
    5 |   class="Apple-style-span"
    65|   color="#ff0000"
    76|   "<#selection-anchor>world<#selection-focus>"
  • trunk/LayoutTests/editing/style/highlight-insert-paragraph-expected.txt

    r47008 r93001  
    33test
    44e
    5 <span class="Apple-style-span" style="background-color: rgb(153, 153, 255);"> test </span><div><span class="Apple-style-span" style="background-color: rgb(153, 153, 255);">e</span></div>
     5<span style="background-color: rgb(153, 153, 255);"> test </span><div><span style="background-color: rgb(153, 153, 255);">e</span></div>
  • trunk/LayoutTests/editing/style/inline-style-container-expected.txt

    r87512 r93001  
    1010PASS fontSize(4) on all of "<b><font face="Arial">hello</font></b>" yields "<b><font face="Arial" size="4">hello</font></b>"
    1111PASS fontSize(4) on all of "<font face="Arial"><i>hello</i></font>" yields "<font face="Arial" size="4"><i>hello</i></font>"
    12 PASS fontName(Arial) on all of "<b><font face="Arial">hello</font></b> world" yields "<font class="Apple-style-span" face="Arial"><b>hello</b> world</font>"
    13 PASS fontName(Arial) on all of "<font color="blue">hello</font> world" yields "<font class="Apple-style-span" face="Arial"><font color="blue">hello</font> world</font>"
    14 PASS 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>"
     12PASS fontName(Arial) on all of "<b><font face="Arial">hello</font></b> world" yields "<font face="Arial"><b>hello</b> world</font>"
     13PASS fontName(Arial) on all of "<font color="blue">hello</font> world" yields "<font face="Arial"><font color="blue">hello</font> world</font>"
     14PASS fontName(Arial) on all of "<b><u>hello</u> world</b>" yields "<b><font 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>"
    1616PASS foreColor(rgba(0, 50, 100, 0.4)) on all of "<font><u style="color:red;">hello</u></font>" yields "<font color="rgba(0, 50, 100, 0.4)"><u>hello</u></font>"
  • trunk/LayoutTests/editing/style/inline-style-extend-run-expected.txt

    r78515 r93001  
    44
    55
    6 PASS fontSize(4) on all of "hello <font size="4">world</font> WebKit" yields "<font class="Apple-style-span" size="4">hello world WebKit</font>"
    7 PASS fontName(Arial) on all of "hello <b><font face="Arial">world</font></b> WebKit" yields "<font class="Apple-style-span" face="Arial">hello <b>world</b> WebKit</font>"
     6PASS fontSize(4) on all of "hello <font size="4">world</font> WebKit" yields "<font size="4">hello world WebKit</font>"
     7PASS fontName(Arial) on all of "hello <b><font face="Arial">world</font></b> WebKit" yields "<font face="Arial">hello <b>world</b> WebKit</font>"
    88PASS italic(null) on all of "hello <u><i title="message">world </i><i>WebKit</i></u>" yields "<i>hello <u><span title="message">world </span>WebKit</u></i>"
    99PASS bold(null) on all of "hello <i><b>world</b> WebKit</i>" yields "<b>hello <i>world WebKit</i></b>"
  • trunk/LayoutTests/editing/style/invalid-font-size-expected.txt

    r70593 r93001  
    22WebKit should not crash and there should be exactly one font element with size="4"
    33| <font>
    4 |   class="Apple-style-span"
    54|   size="4"
    65|   "<#selection-anchor>hello<#selection-focus>"
  • trunk/LayoutTests/editing/style/push-down-font-styles-expected.txt

    r67170 r93001  
    55
    66Font size
    7 PASS fontsize 2 on all of "hello world" yields "<font class="Apple-style-span" size="2">hello world</font>"
    8 PASS fontsize 4 on all of "hello world" yields "<font class="Apple-style-span" size="4">hello world</font>"
    9 PASS fontsize 5 on first word of "hello world" yields "<font class="Apple-style-span" size="5">hello</font> world"
     7PASS fontsize 2 on all of "hello world" yields "<font size="2">hello world</font>"
     8PASS fontsize 4 on all of "hello world" yields "<font size="4">hello world</font>"
     9PASS fontsize 5 on first word of "hello world" yields "<font size="5">hello</font> world"
    1010PASS fontsize 3 on first word of "<font size="7">hello <div>world</div></font>" yields "hello <div style="font-size: -webkit-xxx-large; ">world</div>"
    1111PASS fontsize 3 on first word of "<font size="7"><div>hello</div><div>world</div></font>" yields "<div>hello</div><div style="font-size: -webkit-xxx-large; ">world</div>"
    1212PASS fontsize 3 on second word of "<font size="7"><div>hello</div>world</font>" yields "<div style="font-size: -webkit-xxx-large; ">hello</div>world"
    1313PASS fontsize 7 on all of "<font size="7"><div>hello</div>world</font>" yields "<font size="7"><div>hello</div>world</font>"
    14 PASS fontsize 7 on all of "<font size="3"><div>hello</div>world</font>" yields "<div><font class="Apple-style-span" size="7">hello</font></div><font class="Apple-style-span" size="7">world</font>"
    15 PASS fontsize 6 on all of "<font size="7"><div>hello</div>world</font>" yields "<div><font class="Apple-style-span" size="6">hello</font></div><font class="Apple-style-span" size="6">world</font>"
    16 PASS fontsize 5 on all of "<font size="7"><div>hello</div>world</font>" yields "<div><font class="Apple-style-span" size="5">hello</font></div><font class="Apple-style-span" size="5">world</font>"
     14PASS fontsize 7 on all of "<font size="3"><div>hello</div>world</font>" yields "<div><font size="7">hello</font></div><font size="7">world</font>"
     15PASS fontsize 6 on all of "<font size="7"><div>hello</div>world</font>" yields "<div><font size="6">hello</font></div><font size="6">world</font>"
     16PASS fontsize 5 on all of "<font size="7"><div>hello</div>world</font>" yields "<div><font size="5">hello</font></div><font size="5">world</font>"
    1717PASS fontsize 3 on all of "<font size="7"><div>hello</div>world</font>" yields "<div>hello</div>world"
    1818PASS fontsize 3 on all of "<font size="3"><div>hello</div>world</font>" yields "<font size="3"><div>hello</div>world</font>"
    19 PASS fontsize 1 on all of "<font size="3"><div>hello</div>world</font>" yields "<div><font class="Apple-style-span" size="1">hello</font></div><font class="Apple-style-span" size="1">world</font>"
     19PASS fontsize 1 on all of "<font size="3"><div>hello</div>world</font>" yields "<div><font size="1">hello</font></div><font size="1">world</font>"
    2020
    2121Font size (with CSS)
    2222PASS fontsize 7 on all of "<font size="7"><div>hello</div>world</font>" yields "<font size="7"><div>hello</div>world</font>"
    23 PASS fontsize 7 on all of "<font size="3"><div>hello</div>world</font>" yields "<div><span class="Apple-style-span" style="font-size: -webkit-xxx-large;">hello</span></div><span class="Apple-style-span" style="font-size: -webkit-xxx-large;">world</span>"
    24 PASS fontsize 6 on all of "<font size="7"><div>hello</div>world</font>" yields "<div><span class="Apple-style-span" style="font-size: xx-large;">hello</span></div><span class="Apple-style-span" style="font-size: xx-large;">world</span>"
    25 PASS fontsize 5 on all of "<font size="7"><div>hello</div>world</font>" yields "<div><span class="Apple-style-span" style="font-size: x-large;">hello</span></div><span class="Apple-style-span" style="font-size: x-large;">world</span>"
     23PASS fontsize 7 on all of "<font size="3"><div>hello</div>world</font>" yields "<div><span style="font-size: -webkit-xxx-large;">hello</span></div><span style="font-size: -webkit-xxx-large;">world</span>"
     24PASS fontsize 6 on all of "<font size="7"><div>hello</div>world</font>" yields "<div><span style="font-size: xx-large;">hello</span></div><span style="font-size: xx-large;">world</span>"
     25PASS fontsize 5 on all of "<font size="7"><div>hello</div>world</font>" yields "<div><span style="font-size: x-large;">hello</span></div><span style="font-size: x-large;">world</span>"
    2626PASS fontsize 3 on all of "<font size="7"><div>hello</div>world</font>" yields "<div>hello</div>world"
    2727PASS fontsize 3 on all of "<font size="3"><div>hello</div>world</font>" yields "<font size="3"><div>hello</div>world</font>"
    28 PASS fontsize 1 on all of "<font size="3"><div>hello</div>world</font>" yields "<div><span class="Apple-style-span" style="font-size: x-small;">hello</span></div><span class="Apple-style-span" style="font-size: x-small;">world</span>"
     28PASS fontsize 1 on all of "<font size="3"><div>hello</div>world</font>" yields "<div><span style="font-size: x-small;">hello</span></div><span style="font-size: x-small;">world</span>"
    2929
    3030Font family
    31 PASS fontname Arial on all of "hello world" yields "<font class="Apple-style-span" face="Arial">hello world</font>"
    32 PASS fontname Arial on first word of "<font face="sans-serif">hello world</font>" yields "<font class="Apple-style-span" face="Arial">hello</font><font face="sans-serif"> world</font>"
    33 PASS fontname Arial on first word of "<font face="sans-serif">hello<div>world</div></font>" yields "<font class="Apple-style-span" face="Arial">hello</font><div style="font-family: sans-serif; ">world</div>"
    34 PASS fontname Arial on second word of "<font face="sans-serif">hello<div>world</div></font>" yields "<font class="Apple-style-span" face="sans-serif">hello</font><div><font class="Apple-style-span" face="Arial">world</font></div>"
     31PASS fontname Arial on all of "hello world" yields "<font face="Arial">hello world</font>"
     32PASS fontname Arial on first word of "<font face="sans-serif">hello world</font>" yields "<font face="Arial">hello</font><font face="sans-serif"> world</font>"
     33PASS fontname Arial on first word of "<font face="sans-serif">hello<div>world</div></font>" yields "<font face="Arial">hello</font><div style="font-family: sans-serif; ">world</div>"
     34PASS fontname Arial on second word of "<font face="sans-serif">hello<div>world</div></font>" yields "<font face="sans-serif">hello</font><div><font face="Arial">world</font></div>"
    3535PASS fontname Sans-Serif on all of "<font face="sans-serif"><div>hello</div><div>world</div></font>" yields "<font face="sans-serif"><div>hello</div><div>world</div></font>"
    36 PASS fontname Arial on all of "<font face="sans-serif"><div>hello</div><div>world</div></font>" yields "<div><font class="Apple-style-span" face="Arial">hello</font></div><div><font class="Apple-style-span" face="Arial">world</font></div>"
     36PASS fontname Arial on all of "<font face="sans-serif"><div>hello</div><div>world</div></font>" yields "<div><font face="Arial">hello</font></div><div><font face="Arial">world</font></div>"
    3737
    3838Font family (with CSS)
    39 PASS fontname Arial on all of "hello world" yields "<span class="Apple-style-span" style="font-family: Arial;">hello world</span>"
    40 PASS fontname Arial on first word of "<font face="sans-serif">hello world</font>" yields "<span class="Apple-style-span" style="font-family: Arial;">hello</span><font face="sans-serif"> world</font>"
    41 PASS fontname Arial on first word of "<font face="sans-serif">hello<div>world</div></font>" yields "<span class="Apple-style-span" style="font-family: Arial;">hello</span><div style="font-family: sans-serif; ">world</div>"
    42 PASS fontname Arial on second word of "<font face="sans-serif">hello<div>world</div></font>" yields "<span class="Apple-style-span" style="font-family: sans-serif;">hello</span><div><span class="Apple-style-span" style="font-family: Arial;">world</span></div>"
     39PASS fontname Arial on all of "hello world" yields "<span style="font-family: Arial;">hello world</span>"
     40PASS fontname Arial on first word of "<font face="sans-serif">hello world</font>" yields "<span style="font-family: Arial;">hello</span><font face="sans-serif"> world</font>"
     41PASS fontname Arial on first word of "<font face="sans-serif">hello<div>world</div></font>" yields "<span style="font-family: Arial;">hello</span><div style="font-family: sans-serif; ">world</div>"
     42PASS fontname Arial on second word of "<font face="sans-serif">hello<div>world</div></font>" yields "<span style="font-family: sans-serif;">hello</span><div><span style="font-family: Arial;">world</span></div>"
    4343PASS fontname Sans-Serif on all of "<font face="sans-serif"><div>hello</div><div>world</div></font>" yields "<font face="sans-serif"><div>hello</div><div>world</div></font>"
    44 PASS fontname Arial on all of "<font face="sans-serif"><div>hello</div><div>world</div></font>" yields "<div><span class="Apple-style-span" style="font-family: Arial;">hello</span></div><div><span class="Apple-style-span" style="font-family: Arial;">world</span></div>"
     44PASS fontname Arial on all of "<font face="sans-serif"><div>hello</div><div>world</div></font>" yields "<div><span style="font-family: Arial;">hello</span></div><div><span style="font-family: Arial;">world</span></div>"
    4545PASS successfullyParsed is true
    4646
  • trunk/LayoutTests/editing/style/script-tests/inline-style-container.js

    r87512 r93001  
    2525testSingleToggle("fontSize", 4, '<b><font face="Arial">hello</font></b>', '<b><font face="Arial" size="4">hello</font></b>');
    2626testSingleToggle("fontSize", 4, '<font face="Arial"><i>hello</i></font>', '<font face="Arial" size="4"><i>hello</i></font>');
    27 testSingleToggle("fontName", "Arial", '<b><font face="Arial">hello</font></b> world', '<font class="Apple-style-span" face="Arial"><b>hello</b> world</font>');
    28 testSingleToggle("fontName", "Arial", '<font color="blue">hello</font> world', '<font class="Apple-style-span" face="Arial"><font color="blue">hello</font> world</font>');
    29 testSingleToggle("fontName", "Arial", '<b><u>hello</u> world</b>', '<b><font class="Apple-style-span" face="Arial"><u>hello</u> world</font></b>');
     27testSingleToggle("fontName", "Arial", '<b><font face="Arial">hello</font></b> world', '<font face="Arial"><b>hello</b> world</font>');
     28testSingleToggle("fontName", "Arial", '<font color="blue">hello</font> world', '<font face="Arial"><font color="blue">hello</font> world</font>');
     29testSingleToggle("fontName", "Arial", '<b><u>hello</u> world</b>', '<b><font 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>');
    3131testSingleToggle("foreColor", 'rgba(0, 50, 100, 0.4)', '<font><u style="color:red;">hello</u></font>', '<font color="rgba(0, 50, 100, 0.4)"><u>hello</u></font>');
  • trunk/LayoutTests/editing/style/script-tests/inline-style-extend-run.js

    r78515 r93001  
    1818}
    1919
    20 testSingleToggle("fontSize", 4, 'hello <font size="4">world</font> WebKit', '<font class="Apple-style-span" size="4">hello world WebKit</font>');
    21 testSingleToggle("fontName", "Arial", 'hello <b><font face="Arial">world</font></b> WebKit', '<font class="Apple-style-span" face="Arial">hello <b>world</b> WebKit</font>');
     20testSingleToggle("fontSize", 4, 'hello <font size="4">world</font> WebKit', '<font size="4">hello world WebKit</font>');
     21testSingleToggle("fontName", "Arial", 'hello <b><font face="Arial">world</font></b> WebKit', '<font face="Arial">hello <b>world</b> WebKit</font>');
    2222testSingleToggle("italic", null, 'hello <u><i title="message">world </i><i>WebKit</i></u>', '<i>hello <u><span title="message">world </span>WebKit</u></i>');
    2323testSingleToggle("bold", null, 'hello <i><b>world</b> WebKit</i>', '<b>hello <i>world WebKit</i></b>');
  • trunk/LayoutTests/editing/style/script-tests/push-down-font-styles.js

    r67170 r93001  
    5353debug("Font size");
    5454styleWithCSS = false;
    55 testSingleToggle("fontsize", 2, selectAll, 'hello world', '<font class="Apple-style-span" size="2">hello world</font>');
    56 testSingleToggle("fontsize", 4, selectAll, 'hello world', '<font class="Apple-style-span" size="4">hello world</font>');
    57 testSingleToggle("fontsize", 5, selectFirstWord, 'hello world', '<font class="Apple-style-span" size="5">hello</font> world');
     55testSingleToggle("fontsize", 2, selectAll, 'hello world', '<font size="2">hello world</font>');
     56testSingleToggle("fontsize", 4, selectAll, 'hello world', '<font size="4">hello world</font>');
     57testSingleToggle("fontsize", 5, selectFirstWord, 'hello world', '<font size="5">hello</font> world');
    5858testSingleToggle("fontsize", 3, selectFirstWord, '<font size="7">hello <div>world</div></font>', 'hello <div style="font-size: -webkit-xxx-large; ">world</div>');
    5959testSingleToggle("fontsize", 3, selectFirstWord, '<font size="7"><div>hello</div><div>world</div></font>', '<div>hello</div><div style="font-size: -webkit-xxx-large; ">world</div>');
     
    6161
    6262testSingleToggle("fontsize", 7, selectAll, '<font size="7"><div>hello</div>world</font>', '<font size="7"><div>hello</div>world</font>');
    63 testSingleToggle("fontsize", 7, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><font class="Apple-style-span" size="7">hello</font></div><font class="Apple-style-span" size="7">world</font>');
    64 testSingleToggle("fontsize", 6, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><font class="Apple-style-span" size="6">hello</font></div><font class="Apple-style-span" size="6">world</font>');
    65 testSingleToggle("fontsize", 5, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><font class="Apple-style-span" size="5">hello</font></div><font class="Apple-style-span" size="5">world</font>');
     63testSingleToggle("fontsize", 7, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><font size="7">hello</font></div><font size="7">world</font>');
     64testSingleToggle("fontsize", 6, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><font size="6">hello</font></div><font size="6">world</font>');
     65testSingleToggle("fontsize", 5, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><font size="5">hello</font></div><font size="5">world</font>');
    6666testSingleToggle("fontsize", 3, selectAll, '<font size="7"><div>hello</div>world</font>', '<div>hello</div>world');
    6767testSingleToggle("fontsize", 3, selectAll, '<font size="3"><div>hello</div>world</font>', '<font size="3"><div>hello</div>world</font>');
    68 testSingleToggle("fontsize", 1, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><font class="Apple-style-span" size="1">hello</font></div><font class="Apple-style-span" size="1">world</font>');
     68testSingleToggle("fontsize", 1, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><font size="1">hello</font></div><font size="1">world</font>');
    6969
    7070debug("");
     
    7272styleWithCSS = true;
    7373testSingleToggle("fontsize", 7, selectAll, '<font size="7"><div>hello</div>world</font>', '<font size="7"><div>hello</div>world</font>');
    74 testSingleToggle("fontsize", 7, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><span class="Apple-style-span" style="font-size: -webkit-xxx-large;">hello</span></div><span class="Apple-style-span" style="font-size: -webkit-xxx-large;">world</span>');
    75 testSingleToggle("fontsize", 6, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><span class="Apple-style-span" style="font-size: xx-large;">hello</span></div><span class="Apple-style-span" style="font-size: xx-large;">world</span>');
    76 testSingleToggle("fontsize", 5, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><span class="Apple-style-span" style="font-size: x-large;">hello</span></div><span class="Apple-style-span" style="font-size: x-large;">world</span>');
     74testSingleToggle("fontsize", 7, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><span style="font-size: -webkit-xxx-large;">hello</span></div><span style="font-size: -webkit-xxx-large;">world</span>');
     75testSingleToggle("fontsize", 6, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><span style="font-size: xx-large;">hello</span></div><span style="font-size: xx-large;">world</span>');
     76testSingleToggle("fontsize", 5, selectAll, '<font size="7"><div>hello</div>world</font>', '<div><span style="font-size: x-large;">hello</span></div><span style="font-size: x-large;">world</span>');
    7777testSingleToggle("fontsize", 3, selectAll, '<font size="7"><div>hello</div>world</font>', '<div>hello</div>world');
    7878testSingleToggle("fontsize", 3, selectAll, '<font size="3"><div>hello</div>world</font>', '<font size="3"><div>hello</div>world</font>');
    79 testSingleToggle("fontsize", 1, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><span class="Apple-style-span" style="font-size: x-small;">hello</span></div><span class="Apple-style-span" style="font-size: x-small;">world</span>');
     79testSingleToggle("fontsize", 1, selectAll, '<font size="3"><div>hello</div>world</font>', '<div><span style="font-size: x-small;">hello</span></div><span style="font-size: x-small;">world</span>');
    8080
    8181debug("");
    8282debug("Font family");
    8383styleWithCSS = false;
    84 testSingleToggle("fontname", "Arial", selectAll, 'hello world', '<font class="Apple-style-span" face="Arial">hello world</font>');
    85 testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello world</font>', '<font class="Apple-style-span" face="Arial">hello</font><font face="sans-serif"> world</font>');
    86 testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello<div>world</div></font>', '<font class="Apple-style-span" face="Arial">hello</font><div style="font-family: sans-serif; ">world</div>');
    87 testSingleToggle("fontname", "Arial", selectSecondWord, '<font face="sans-serif">hello<div>world</div></font>', '<font class="Apple-style-span" face="sans-serif">hello</font><div><font class="Apple-style-span" face="Arial">world</font></div>');
     84testSingleToggle("fontname", "Arial", selectAll, 'hello world', '<font face="Arial">hello world</font>');
     85testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello world</font>', '<font face="Arial">hello</font><font face="sans-serif"> world</font>');
     86testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello<div>world</div></font>', '<font face="Arial">hello</font><div style="font-family: sans-serif; ">world</div>');
     87testSingleToggle("fontname", "Arial", selectSecondWord, '<font face="sans-serif">hello<div>world</div></font>', '<font face="sans-serif">hello</font><div><font face="Arial">world</font></div>');
    8888testSingleToggle("fontname", "Sans-Serif", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<font face="sans-serif"><div>hello</div><div>world</div></font>');
    89 testSingleToggle("fontname", "Arial", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<div><font class="Apple-style-span" face="Arial">hello</font></div><div><font class="Apple-style-span" face="Arial">world</font></div>');
     89testSingleToggle("fontname", "Arial", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<div><font face="Arial">hello</font></div><div><font face="Arial">world</font></div>');
    9090
    9191debug("");
    9292debug("Font family (with CSS)");
    9393styleWithCSS = true;
    94 testSingleToggle("fontname", "Arial", selectAll, 'hello world', '<span class="Apple-style-span" style="font-family: Arial;">hello world</span>');
    95 testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello world</font>', '<span class="Apple-style-span" style="font-family: Arial;">hello</span><font face="sans-serif"> world</font>');
    96 testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello<div>world</div></font>', '<span class="Apple-style-span" style="font-family: Arial;">hello</span><div style="font-family: sans-serif; ">world</div>');
    97 testSingleToggle("fontname", "Arial", selectSecondWord, '<font face="sans-serif">hello<div>world</div></font>', '<span class="Apple-style-span" style="font-family: sans-serif;">hello</span><div><span class="Apple-style-span" style="font-family: Arial;">world</span></div>');
     94testSingleToggle("fontname", "Arial", selectAll, 'hello world', '<span style="font-family: Arial;">hello world</span>');
     95testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello world</font>', '<span style="font-family: Arial;">hello</span><font face="sans-serif"> world</font>');
     96testSingleToggle("fontname", "Arial", selectFirstWord, '<font face="sans-serif">hello<div>world</div></font>', '<span style="font-family: Arial;">hello</span><div style="font-family: sans-serif; ">world</div>');
     97testSingleToggle("fontname", "Arial", selectSecondWord, '<font face="sans-serif">hello<div>world</div></font>', '<span style="font-family: sans-serif;">hello</span><div><span style="font-family: Arial;">world</span></div>');
    9898testSingleToggle("fontname", "Sans-Serif", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<font face="sans-serif"><div>hello</div><div>world</div></font>');
    99 testSingleToggle("fontname", "Arial", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<div><span class="Apple-style-span" style="font-family: Arial;">hello</span></div><div><span class="Apple-style-span" style="font-family: Arial;">world</span></div>');
     99testSingleToggle("fontname", "Arial", selectAll, '<font face="sans-serif"><div>hello</div><div>world</div></font>', '<div><span style="font-family: Arial;">hello</span></div><div><span style="font-family: Arial;">world</span></div>');
    100100
    101101document.body.removeChild(testContainer);
  • trunk/LayoutTests/editing/style/style-text-node-without-editable-parent-expected.txt

    r78773 r93001  
    8383foreColor first:
    8484| <font>
    85 |   class="Apple-style-span"
    8685|   color="#0000ff"
    8786|   "<#selection-anchor>hello, <#selection-focus>"
     
    9190| "hello, "
    9291| <font>
    93 |   class="Apple-style-span"
    9492|   color="#0000ff"
    9593|   "<#selection-anchor>world<#selection-focus>"
     
    9997| "hello, world"
    10098| <font>
    101 |   class="Apple-style-span"
    10299|   color="#0000ff"
    103100|   "<#selection-anchor> WebKit<#selection-focus>"
     
    105102foreColor all:
    106103| <font>
    107 |   class="Apple-style-span"
    108104|   color="#0000ff"
    109105|   "<#selection-anchor>hello, world WebKit<#selection-focus>"
     
    111107hiliteColor first:
    112108| <span>
    113 |   class="Apple-style-span"
    114109|   style="background-color: blue;"
    115110|   "<#selection-anchor>hello, <#selection-focus>"
     
    119114| "hello, "
    120115| <span>
    121 |   class="Apple-style-span"
    122116|   style="background-color: blue;"
    123117|   "<#selection-anchor>world<#selection-focus>"
     
    127121| "hello, world"
    128122| <span>
    129 |   class="Apple-style-span"
    130123|   style="background-color: blue;"
    131124|   "<#selection-anchor> WebKit<#selection-focus>"
     
    133126hiliteColor all:
    134127| <span>
    135 |   class="Apple-style-span"
    136128|   style="background-color: blue;"
    137129|   "<#selection-anchor>hello, world WebKit<#selection-focus>"
  • trunk/LayoutTests/fast/events/ondrop-text-html-expected.txt

    r92823 r93001  
    11CONSOLE MESSAGE: line 21: text/plain: This test verifies that we can get text/html from the drag object during an ondrop event.
    2 CONSOLE MESSAGE: line 23: text/html: <span class="Apple-style-span" style="color: rgb(0, 0, 0);  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; display: inline !important; float: none; ">This test verifies that we can get text/html from the drag object during an ondrop event.<span class="Apple-converted-space"> </span></span>
     2CONSOLE MESSAGE: line 23: text/html: <span style="color: rgb(0, 0, 0);  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; display: inline !important; float: none; ">This test verifies that we can get text/html from the drag object during an ondrop event.<span class="Apple-converted-space"> </span></span>
    33This test verifies that we can get text/html from the drag object during an ondrop event. This test requires DRT.
    44PASS
  • trunk/LayoutTests/platform/chromium-win/editing/inserting/5994480-2-expected.txt

    r67170 r93001  
    1 <font class="Apple-style-span" face="Arial" size="2"><br></font>
     1<font face="Arial" size="2"><br></font>
  • trunk/LayoutTests/platform/gtk/editing/inserting/5994480-2-expected.txt

    r77388 r93001  
    1 <font class="Apple-style-span" face="'Liberation Sans'"><br></font>
     1<font face="'Liberation Sans'"><br></font>
  • trunk/Source/WebCore/ChangeLog

    r92999 r93001  
     12011-08-12  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Apple-style-span class seems unnecessary
     4        https://bugs.webkit.org/show_bug.cgi?id=12248
     5
     6        Reviewed by Justin Garcia.
     7
     8        Stop generating span or font elements with class="Apple-style-span" given WebKit's editing component
     9        no longer depends on Apple-style-span since r92823 removed the dependency of copy and paste code on
     10        style spans. WebKit continues to recognize Apple style spans to remove them.
     11
     12        Also renamed isSpanWithoutAttributesOrUnstyleStyleSpan to isSpanWithoutAttributesOrUnstyle*d*StyleSpan.
     13
     14        * editing/ApplyStyleCommand.cpp:
     15        (WebCore::isLegacyAppleStyleSpan): Renamed from isStyleSpan.
     16        (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan): Renamed from isSpanWithoutAttributesOr*Unstyle*StyleSpan.
     17        (WebCore::createFontElement): No longer adds class="Apple-style-span".
     18        (WebCore::createStyleSpanElement): Ditto.
     19        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Calls isSpanWithoutAttributesOrUnstyleStyleSpan
     20        instead of isUnstyledStyleSpan since there won't be any Apple style spans.
     21        (WebCore::dummySpanAncestorForNode):
     22        (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans): Ditto.
     23        (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Ditto.
     24        (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
     25        (WebCore::ApplyStyleCommand::removeCSSStyle):
     26        * editing/ApplyStyleCommand.h:
     27        * editing/EditingStyle.cpp:
     28        (WebCore::EditingStyle::removeStyleFromRulesAndContext): Ditto.
     29        * editing/ReplaceSelectionCommand.cpp:
     30        (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Calls isLegacyAppleStyleSpan instead
     31        of isStyleSpan.
     32        (WebCore::handleStyleSpansBeforeInsertion): Ditto.
     33        (WebCore::ReplaceSelectionCommand::handleStyleSpans): Ditto.
     34        (WebCore::ReplaceSelectionCommand::doApply): Ditto.
     35        * editing/markup.cpp:
     36        (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): No longer adds class="Apple-style-span".
     37
    1382011-08-12  Nat Duca  <nduca@chromium.org>
    239
  • trunk/Source/WebCore/editing/ApplyStyleCommand.cpp

    r92891 r93001  
    6262}
    6363
    64 bool isStyleSpan(const Node *node)
     64bool isLegacyAppleStyleSpan(const Node *node)
    6565{
    6666    if (!node || !node->isHTMLElement())
     
    9797}
    9898
    99 static inline bool isUnstyledStyleSpan(const Node* node)
    100 {
    101     return isStyleSpan(node) && hasNoAttributeOrOnlyStyleAttribute(toHTMLElement(node), StyleAttributeShouldBeEmpty);
    102 }
    103 
    104 static inline bool isSpanWithoutAttributesOrUnstyleStyleSpan(const Node* node)
     99static inline bool isSpanWithoutAttributesOrUnstyledStyleSpan(const Node* node)
    105100{
    106101    if (!node || !node->isHTMLElement() || !node->hasTagName(spanTag))
     
    124119{
    125120    RefPtr<Element> fontNode = createHTMLElement(document, fontTag);
    126     fontNode->setAttribute(classAttr, styleSpanClassString());
    127121    return fontNode.release();
    128122}
     
    131125{
    132126    RefPtr<HTMLElement> styleElement = createHTMLElement(document, spanTag);
    133     styleElement->setAttribute(classAttr, styleSpanClassString());
    134127    return styleElement.release();
    135128}
     
    407400        if (inlineStyleDecl->isEmpty()) {
    408401            removeNodeAttribute(element.get(), styleAttr);
    409             // FIXME: should this be isSpanWithoutAttributesOrUnstyleStyleSpan?  Need a test.
    410             if (isUnstyledStyleSpan(element.get()))
     402            if (isSpanWithoutAttributesOrUnstyledStyleSpan(element.get()))
    411403                unstyledSpans.append(element.release());
    412404        }
     
    420412static Node* dummySpanAncestorForNode(const Node* node)
    421413{
    422     while (node && !isStyleSpan(node))
     414    while (node && (!node->isElementNode() || !isStyleSpanOrSpanWithOnlyStyleAttribute(toElement(node))))
    423415        node = node->parentNode();
    424416   
     
    438430    for (Node* node = dummySpanAncestor->firstChild(); node; node = next) {
    439431        next = node->nextSibling();
    440         if (isUnstyledStyleSpan(node))
     432        if (isSpanWithoutAttributesOrUnstyledStyleSpan(node))
    441433            removeNodePreservingChildren(node);
    442434        node = next;
     
    525517            inlineStyle->removeProperty(CSSPropertyDirection);
    526518            setNodeAttribute(element, styleAttr, inlineStyle->cssText());
    527             // FIXME: should this be isSpanWithoutAttributesOrUnstyleStyleSpan?  Need a test.
    528             if (isUnstyledStyleSpan(element))
     519            if (isSpanWithoutAttributesOrUnstyledStyleSpan(element))
    529520                removeNodePreservingChildren(element);
    530521        }
     
    883874        removeNodeAttribute(element, attributes[i]);
    884875
    885     if (isEmptyFontTag(element) || isSpanWithoutAttributesOrUnstyleStyleSpan(element))
     876    if (isEmptyFontTag(element) || isSpanWithoutAttributesOrUnstyledStyleSpan(element))
    886877        removeNodePreservingChildren(element);
    887878
     
    911902        removeNodeAttribute(element, styleAttr);
    912903
    913     if (isSpanWithoutAttributesOrUnstyleStyleSpan(element))
     904    if (isSpanWithoutAttributesOrUnstyledStyleSpan(element))
    914905        removeNodePreservingChildren(element);
    915906
  • trunk/Source/WebCore/editing/ApplyStyleCommand.h

    r92620 r93001  
    130130};
    131131
    132 bool isStyleSpan(const Node*);
     132bool isLegacyAppleStyleSpan(const Node*);
    133133bool isStyleSpanOrSpanWithOnlyStyleAttribute(const Element*);
    134134PassRefPtr<HTMLElement> createStyleSpanElement(Document*);
  • trunk/Source/WebCore/editing/EditingStyle.cpp

    r92823 r93001  
    964964    // 3. If this element is a span and has display: inline or float: none, remove them unless they are overriden by rules.
    965965    // These rules are added by serialization code to wrap text nodes.
    966     if (isStyleSpan(element)) {
     966    if (isStyleSpanOrSpanWithOnlyStyleAttribute(element)) {
    967967        if (!styleFromMatchedRules->getPropertyCSSValue(CSSPropertyDisplay) && getIdentifierValue(m_mutableStyle.get(), CSSPropertyDisplay) == CSSValueInline)
    968968            m_mutableStyle->removeProperty(CSSPropertyDisplay);
  • trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp

    r92966 r93001  
    512512            setNodeAttribute(element, styleAttr, newInlineStyle->style()->cssText());
    513513
    514         if (isStyleSpan(element)) {
     514        // WebKit used to not add display: inline and float: none on copy.
     515        // Keep this code around for backward compatibility
     516        if (isLegacyAppleStyleSpan(element)) {
    515517            if (!element->firstChild()) {
    516518                removeNodePreservingChildren(element);
     
    617619    // Either there are no style spans in the fragment or a WebKit client has added content to the fragment
    618620    // before inserting it.  Look for and handle style spans after insertion.
    619     if (!isStyleSpan(topNode))
     621    if (!isLegacyAppleStyleSpan(topNode))
    620622        return false;
    621623
     
    648650    // so search for the top level style span instead of assuming it's at the top.
    649651    for (Node* node = m_firstNodeInserted.get(); node; node = node->traverseNextNode()) {
    650         if (isStyleSpan(node)) {
     652        if (isLegacyAppleStyleSpan(node)) {
    651653            wrappingStyleSpan = toHTMLElement(node);
    652654            break;
     
    992994
    993995    Node* blockStart = enclosingBlock(insertionPos.deprecatedNode());
    994     if ((isListElement(refNode.get()) || (isStyleSpan(refNode.get()) && isListElement(refNode->firstChild())))
     996    if ((isListElement(refNode.get()) || (isLegacyAppleStyleSpan(refNode.get()) && isListElement(refNode->firstChild())))
    995997        && blockStart->renderer()->isListItem())
    996998        refNode = insertAsListItems(refNode, blockStart, insertionPos);
  • trunk/Source/WebCore/editing/markup.cpp

    r92823 r93001  
    188188    ASSERT(propertyMissingOrEqualToNone(style, CSSPropertyTextDecoration) && propertyMissingOrEqualToNone(style, CSSPropertyWebkitTextDecorationsInEffect));
    189189    DEFINE_STATIC_LOCAL(const String, divStyle, ("<div style=\""));
    190     DEFINE_STATIC_LOCAL(const String, styleSpanOpen, ("<span class=\"" AppleStyleSpanClass "\" style=\""));
     190    DEFINE_STATIC_LOCAL(const String, styleSpanOpen, ("<span style=\""));
    191191    append(out, isBlock ? divStyle : styleSpanOpen);
    192192    appendAttributeValue(out, style->cssText(), document->isHTMLDocument());
Note: See TracChangeset for help on using the changeset viewer.