Commit f2fca092 authored by rniwa@webkit.org's avatar rniwa@webkit.org

REGRESSION: Autocorrection doesn't work in DumpRenderTree

https://bugs.webkit.org/show_bug.cgi?id=113846

Reviewed by Alexey Proskuryakov.

Tools: 

The problem was that we were replacing NSSpellCheck's dictionary with our own
in DumpRenderTree but we were not adding necessary corrections to the dictionary.

Fixed the bug by having NSSpellChecker correct "mesage" and "wouldn" to "message"
and "would" respectively in DumpRenderTree.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):

LayoutTests: 

Removed failing expectations from tests that require "mesage" to be corrected to "message".

Also modified to dynamically assert the marker positions so that we may catch regressions
without pixel results (we still dump pixel results via dumpAsText(true) for sanity check).

* platform/mac/TestExpectations:
* platform/mac/editing/spelling/autocorrection-contraction-expected.png:
* platform/mac/editing/spelling/autocorrection-contraction-expected.txt:
* platform/mac/editing/spelling/click-autocorrected-word-expected.png:
* platform/mac/editing/spelling/click-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/click-autocorrected-word.html:
* platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png:
* platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/delete-into-autocorrected-word.html:
* platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png:
* platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html:
* platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png:
* platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html:
* platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png:
* platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html:
* platform/mac-wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 227f0463
2013-04-09 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION: Autocorrection doesn't work in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=113846
Reviewed by Alexey Proskuryakov.
Removed failing expectations from tests that require "mesage" to be corrected to "message".
Also modified to dynamically assert the marker positions so that we may catch regressions
without pixel results (we still dump pixel results via dumpAsText(true) for sanity check).
* platform/mac/TestExpectations:
* platform/mac/editing/spelling/autocorrection-contraction-expected.png:
* platform/mac/editing/spelling/autocorrection-contraction-expected.txt:
* platform/mac/editing/spelling/click-autocorrected-word-expected.png:
* platform/mac/editing/spelling/click-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/click-autocorrected-word.html:
* platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png:
* platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/delete-into-autocorrected-word.html:
* platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png:
* platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html:
* platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png:
* platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html:
* platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png:
* platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt:
* platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html:
* platform/mac-wk2/TestExpectations:
2013-04-08 Mihai Maerean <mmaerean@adobe.com>
Rollout r147756: performance regression
......@@ -166,6 +166,11 @@ svg/custom/use-events-crash.svg
# [WK2] [Mac] Spellcheck tests don't seem to work
webkit.org/b/105616 platform/mac/editing/spelling/removing-underline-after-accepting-autocorrection-using-punctuation.html [ Failure ]
webkit.org/b/105616 platform/mac/editing/spelling/click-autocorrected-word.html
webkit.org/b/105616 platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
webkit.org/b/105616 platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
webkit.org/b/105616 platform/mac/editing/spelling/delete-into-autocorrected-word.html
webkit.org/b/105616 platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
# [WK2] [Mac] Support drag in mouse events for WebKit2 EventSender
# <https://bugs.webkit.org/show_bug.cgi?id=68552>
......
......@@ -686,13 +686,6 @@ fast/events/dropzone-005.html
# Spelling tests that are flakey. https://bugs.webkit.org/show_bug.cgi?id=82555
editing/spelling/spellcheck-async-mutation.html
platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
platform/mac/editing/spelling/editing-word-with-marker-1.html
platform/mac/editing/spelling/delete-into-autocorrected-word.html
platform/mac/editing/spelling/click-autocorrected-word.html
platform/mac/editing/spelling/autocorrection-contraction.html
# https://bugs.webkit.org/show_bug.cgi?id=82665
http/tests/webarchive/test-css-url-encoding-shift-jis.html
......
......@@ -151,8 +151,21 @@ EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldInsertText:would replacingDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
......@@ -173,19 +186,6 @@ EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > DIV > DIV > BODY > HTML > #document to 13 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldInsertText:would replacingDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > DIV > DIV > BODY > HTML > #document to 13 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
......@@ -213,8 +213,21 @@ EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldInsertText:would replacingDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
......@@ -235,19 +248,6 @@ EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldInsertText:would replacingDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > DIV > DIV > BODY > HTML > #document to 16 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
......
......@@ -57,26 +57,19 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x36
RenderText {#text} at (0,0) size 753x36
text run at (0,0) width 753: "The test verified that if user clicks a word that is marked as autocorrected, the autocorrection underline will remain. You"
text run at (0,18) width 460: "should see phrase \"it's a message\", in which the word 'message' has blue "
text run at (460,18) width 63: "underline."
RenderBlock {P} at (0,52) size 784x54 [color=#008000]
RenderText {#text} at (0,0) size 774x54
text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
text run at (0,18) width 216: "spelling of 'mesage' several times, "
text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
text run at (0,36) width 185: "all files in ~/Library/Spelling."
RenderBlock {DIV} at (0,122) size 784x18
RenderText {#text} at (0,0) size 89x18
text run at (0,0) width 85: "it's a message"
text run at (85,0) width 4: " "
RenderText {#text} at (0,0) size 0x0
caret: position 10 of child 0 {#text} of child 5 {DIV} of body
PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
PASS markerRange.toString() is 'message'
PASS markerRange.endContainer is textNode
PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
PASS internals.markerRangeForNode(textNode, 'spelling', 0) is null
PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
PASS successfullyParsed is true
TEST COMPLETE
The test verified that if user clicks a word that is marked as autocorrected, the autocorrection underline will remain. You should see phrase "it's a message", in which the word 'message' has blue underline.
Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
it's a message 
<html>
<head>
<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
<script>
function editingTest() {
......@@ -22,6 +23,19 @@ function editingTest() {
typeCharacterCommand('e');
typeCharacterCommand(' ');
s.setBaseAndExtent(edit.firstChild, 10, edit.firstChild, 10);
if (window.testRunner) {
testRunner.dumpAsText(true);
textNode = edit.firstChild;
shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
shouldBe("markerRange.toString()", "'message'");
shouldBe("markerRange.endContainer", "textNode");
shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 0)");
shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
}
}
</script>
......@@ -39,5 +53,6 @@ remove all files in ~/Library/Spelling.</p>
<script>
runEditingTest();
</script>
<script src="../../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
......@@ -60,24 +60,19 @@ EDITING DELEGATE: shouldDeleteDOMRange:range from 14 of #text > DIV > BODY > HTM
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 612x18
text run at (0,0) width 373: "You should see phrase \"it's a message\", in which the word "
text run at (373,0) width 239: "'message' doesn't have blue underline."
RenderBlock {P} at (0,34) size 784x54 [color=#008000]
RenderText {#text} at (0,0) size 774x54
text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
text run at (0,18) width 216: "spelling of 'mesage' several times, "
text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
text run at (0,36) width 185: "all files in ~/Library/Spelling."
RenderBlock {DIV} at (0,104) size 784x18
RenderText {#text} at (0,0) size 85x18
text run at (0,0) width 85: "it's a message"
RenderText {#text} at (0,0) size 0x0
caret: position 14 of child 0 {#text} of child 5 {DIV} of body
PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
PASS markerRange.toString() is 'message'
PASS markerRange.endContainer is textNode
PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
PASS internals.markerRangeForNode(textNode, 'spelling', 0) is null
PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
PASS successfullyParsed is true
TEST COMPLETE
You should see phrase "it's a message", in which the word 'message' doesn't have blue underline.
Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
it's a message
<html>
<head>
<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
<script>
function editingTest() {
......@@ -21,6 +22,19 @@ function editingTest() {
typeCharacterCommand('e');
typeCharacterCommand(' ');
execDeleteCommand();
if (window.testRunner) {
testRunner.dumpAsText(true);
textNode = edit.firstChild;
shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
shouldBe("markerRange.toString()", "'message'");
shouldBe("markerRange.endContainer", "textNode");
shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 0)");
shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
}
}
</script>
......@@ -37,5 +51,6 @@ remove all files in ~/Library/Spelling.</p>
<script language="javascript" type="text/javascript">
runEditingTest();
</script>
<script src="../../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
......@@ -60,25 +60,24 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 608x18
text run at (0,0) width 369: "You should see phrase \"it's amessage\", in which the word "
text run at (369,0) width 239: "'message' doesn't have blue underline."
RenderBlock {P} at (0,34) size 784x54 [color=#008000]
RenderText {#text} at (0,0) size 774x54
text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
text run at (0,18) width 216: "spelling of 'mesage' several times, "
text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
text run at (0,36) width 185: "all files in ~/Library/Spelling."
RenderBlock {DIV} at (0,104) size 784x18
RenderText {#text} at (0,0) size 85x18
text run at (0,0) width 81: "it's amessage"
text run at (81,0) width 4: " "
RenderText {#text} at (0,0) size 0x0
caret: position 6 of child 0 {#text} of child 5 {DIV} of body
PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
PASS markerRange.toString() is 'message'
PASS markerRange.endContainer is textNode
PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
PASS markerRange = internals.markerRangeForNode(textNode, 'spelling', 0); markerRange.startContainer is textNode
PASS markerRange.toString() is 'amessage'
PASS markerRange.endContainer is textNode
PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
PASS internals.markerRangeForNode(textNode, 'spelling', 1) is null
PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
PASS successfullyParsed is true
TEST COMPLETE
You should see phrase "it's amessage", in which the word 'message' doesn't have blue underline.
Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
it's amessage 
<html>
<head>
<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
<script>
function editingTest() {
......@@ -23,6 +24,26 @@ function editingTest() {
var s = window.getSelection();
s.setBaseAndExtent(edit.firstChild, 6, edit.firstChild, 6);
execForwardDeleteCommand();
if (window.testRunner) {
testRunner.dumpAsText(true);
textNode = edit.firstChild;
shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
shouldBe("markerRange.toString()", "'message'");
shouldBe("markerRange.endContainer", "textNode");
shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
shouldBe("markerRange = internals.markerRangeForNode(textNode, 'spelling', 0); markerRange.startContainer", "textNode");
shouldBe("markerRange.toString()", "'amessage'");
shouldBe("markerRange.endContainer", "textNode");
shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 1)");
shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
}
}
</script>
......@@ -39,5 +60,6 @@ remove all files in ~/Library/Spelling.</p>
<script language="javascript" type="text/javascript">
runEditingTest();
</script>
<script src="../../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
......@@ -57,27 +57,19 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x36
RenderText {#text} at (0,0) size 766x36
text run at (0,0) width 653: "The test verified that if user used arrow key to move cursor into a word that is marked as autocorrected, "
text run at (653,0) width 113: "the autocorrection"
text run at (0,18) width 515: "underline will remain. You should see phrase \"it's a message\", in which the word "
text run at (515,18) width 182: "'message' has blue underline."
RenderBlock {P} at (0,52) size 784x54 [color=#008000]
RenderText {#text} at (0,0) size 774x54
text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
text run at (0,18) width 216: "spelling of 'mesage' several times, "
text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
text run at (0,36) width 185: "all files in ~/Library/Spelling."
RenderBlock {DIV} at (0,122) size 784x18
RenderText {#text} at (0,0) size 89x18
text run at (0,0) width 85: "it's a message"
text run at (85,0) width 4: " "
RenderText {#text} at (0,0) size 0x0
caret: position 14 of child 0 {#text} of child 5 {DIV} of body
PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
PASS markerRange.toString() is 'message'
PASS markerRange.endContainer is textNode
PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
PASS internals.markerRangeForNode(textNode, 'spelling', 0) is null
PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
PASS successfullyParsed is true
TEST COMPLETE
The test verified that if user used arrow key to move cursor into a word that is marked as autocorrected, the autocorrection underline will remain. You should see phrase "it's a message", in which the word 'message' has blue underline.
Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
it's a message 
<html>
<head>
<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
<script>
function editingTest() {
......@@ -21,6 +22,19 @@ function editingTest() {
typeCharacterCommand('e');
typeCharacterCommand(' ');
execMoveSelectionBackwardByCharacterCommand();
if (window.testRunner) {
testRunner.dumpAsText(true);
textNode = edit.firstChild;
shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
shouldBe("markerRange.toString()", "'message'");
shouldBe("markerRange.endContainer", "textNode");
shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 0)");
shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
}
}
</script>
......@@ -38,5 +52,6 @@ remove all files in ~/Library/Spelling.</p>
<script language="javascript" type="text/javascript">
runEditingTest();
</script>
<script src="../../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
......@@ -58,27 +58,19 @@ EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x36
RenderText {#text} at (0,0) size 741x36
text run at (0,0) width 453: "The test verified that if user moves caret to the beginning of a word that "
text run at (453,0) width 288: "is marked as autocorrected, the autocorrection"
text run at (0,18) width 328: "underline will remain. You should see phrase \"it's a "
text run at (328,18) width 369: "message\", in which the word 'message' has blue underline."
RenderBlock {P} at (0,52) size 784x54 [color=#008000]
RenderText {#text} at (0,0) size 774x54
text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
text run at (0,18) width 216: "spelling of 'mesage' several times, "
text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
text run at (0,36) width 185: "all files in ~/Library/Spelling."
RenderBlock {DIV} at (0,122) size 784x18
RenderText {#text} at (0,0) size 89x18
text run at (0,0) width 85: "it's a message"
text run at (85,0) width 4: " "
RenderText {#text} at (0,0) size 0x0
caret: position 7 of child 0 {#text} of child 5 {DIV} of body
PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
PASS markerRange.toString() is 'message'
PASS markerRange.endContainer is textNode
PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
PASS internals.markerRangeForNode(textNode, 'spelling', 0) is null
PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
PASS successfullyParsed is true
TEST COMPLETE
The test verified that if user moves caret to the beginning of a word that is marked as autocorrected, the autocorrection underline will remain. You should see phrase "it's a message", in which the word 'message' has blue underline.
Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
it's a message 
<html>
<head>
<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
<script>
var textNode;
var markerRange;
function editingTest() {
edit = document.getElementById('edit');
edit.focus();
......@@ -23,6 +26,19 @@ function editingTest() {
var s = window.getSelection();
s.setBaseAndExtent(edit.firstChild, 6, edit.firstChild, 6);
execMoveSelectionForwardByCharacterCommand();
if (window.testRunner) {
testRunner.dumpAsText(true);
textNode = edit.firstChild;
shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
shouldBe("markerRange.toString()", "'message'");
shouldBe("markerRange.endContainer", "textNode");
shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 0)");
shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
}
}
</script>
......@@ -40,5 +56,6 @@ remove all files in ~/Library/Spelling.</p>
<script language="javascript" type="text/javascript">
runEditingTest();
</script>
<script src="../../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
2013-04-09 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION: Autocorrection doesn't work in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=113846
Reviewed by Alexey Proskuryakov.
The problem was that we were replacing NSSpellCheck's dictionary with our own
in DumpRenderTree but we were not adding necessary corrections to the dictionary.
Fixed the bug by having NSSpellChecker correct "mesage" and "wouldn" to "message"
and "would" respectively in DumpRenderTree.
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):
2013-04-09 Benjamin Poulain <benjamin@webkit.org>