|
Revert 93001 - 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:
TBR=rniwa@webkit.org
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95748
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+174 lines, -136 lines) |
Patch |
|
M |
LayoutTests/editing/deleting/delete-br-012-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/deleting/delete-line-break-between-paragraphs-with-same-style-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/deleting/delete-select-all-001-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/16049-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/5685604-1.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/delete-image-in-anchor-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/hilitecolor-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/modifyForeColorByCharacter-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/query-font-size-expected.txt
|
View
|
|
2 chunks |
+21 lines, -21 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/remove-format-multiple-elements-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/script-tests/remove-format-multiple-elements.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/script-tests/toggle-text-decorations.js
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/script-tests/toggle-unlink.js
|
View
|
|
1 chunk |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/toggle-style-2-expected.txt
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/toggle-text-decorations-expected.txt
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/execCommand/toggle-unlink-expected.txt
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/inserting/5994480-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/pasteboard/5065605-expected.txt
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/pasteboard/copy-null-characters-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/pasteboard/copy-text-with-backgroundcolor-expected.txt
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/pasteboard/data-transfer-items-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/pasteboard/do-not-copy-unnecessary-styles-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/pasteboard/do-not-copy-unnecessary-styles-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/pasteboard/onpaste-text-html-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/pasteboard/paste-text-with-style-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/apply-font-size-to-multiple-nodes-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/block-style-004-expected.txt
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/block-style-005-expected.txt
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/block-style-006-expected.txt
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/fontsize-1-expected.txt
|
View
|
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/fore-color-by-name-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/highlight-insert-paragraph-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/inline-style-container-expected.txt
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/inline-style-extend-run-expected.txt
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/invalid-font-size-expected.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/push-down-font-styles-expected.txt
|
View
|
|
1 chunk |
+21 lines, -21 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/script-tests/inline-style-container.js
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/script-tests/inline-style-extend-run.js
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/script-tests/push-down-font-styles.js
|
View
|
|
1 chunk |
+21 lines, -21 lines |
0 comments
|
Download
|
|
M |
LayoutTests/editing/style/style-text-node-without-editable-parent-expected.txt
|
View
|
|
5 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/fast/events/ondrop-text-html-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-win/editing/inserting/5994480-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/platform/gtk/editing/inserting/5994480-2-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/WebCore/editing/ApplyStyleCommand.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/WebCore/editing/ApplyStyleCommand.cpp
|
View
|
|
9 chunks |
+17 lines, -8 lines |
0 comments
|
Download
|
|
M |
Source/WebCore/editing/EditingStyle.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/WebCore/editing/ReplaceSelectionCommand.cpp
|
View
|
|
4 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
|
M |
Source/WebCore/editing/markup.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 1 (0 generated)
|