+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ * Source/autotools/symbols.filter: Export a symbol for hasSpellingMarker.
+
2012-03-19 Tony Chang <tony@chromium.org>
clean up gitignore
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Adjust hasSpellingMarker tests to use Internals instead of LayoutTestController
+ interface.
+
+ * editing/spelling/design-mode-spellcheck-off.html:
+ * editing/spelling/script-tests/spellcheck-paste.js:
+ (verifyMarker):
+ * editing/spelling/script-tests/spelling-attribute-at-child.js:
+ (childHasSpellingMarker):
+ * editing/spelling/script-tests/spelling-attribute-change.js:
+ (testSpellCheckingEnabled):
+ * editing/spelling/script-tests/spelling-backspace-between-lines.js:
+ (testWithDelete):
+ (testWithForwardDelete):
+ * editing/spelling/script-tests/spelling-hasspellingmarker.js:
+ (hasMarked):
+ * editing/spelling/spellcheck-attribute.html:
+ * editing/spelling/spelling-attribute-change-expected.txt:
+ * editing/spelling/spelling-backspace-between-lines-expected.txt:
+ * editing/spelling/spelling-hasspellingmarker-expected.txt:
+ * editing/spelling/spelling-linebreak.html:
+ * platform/chromium-mac-snowleopard/editing/spelling/spelling-backspace-between-lines-expected.txt:
+ * platform/chromium-win/editing/spelling/spelling-backspace-between-lines-expected.txt:
+ * platform/chromium/editing/spelling/spelling-backspace-between-lines-expected.txt:
+ * platform/mac/editing/spelling/delete-into-misspelled-word.html:
+ * platform/mac/editing/spelling/editing-multiple-words-with-markers.html:
+ * platform/mac/editing/spelling/editing-word-with-marker-1.html:
+ * platform/mac/editing/spelling/editing-word-with-marker-2.html:
+ * platform/mac/editing/spelling/move-cursor-around-misspelled-word.html:
+ * platform/win/editing/spelling/spelling-backspace-between-lines-expected.txt:
+ * platform/wk2/Skipped:
+
2012-03-20 Ádám Kallai <kadam@inf.u-szeged.hu>
[Qt] Unreviewed. Added new platform expectations.
document.body.addEventListener('mousedown', function() {
if (document.activeElement != document.body)
document.body.appendChild(document.createTextNode('FAIL: active element after click is not body element'));
- else if (layoutTestController.hasSpellingMarker(0, 4))
+ else if (internals.hasSpellingMarker(document, 0, 4))
document.body.appendChild(document.createTextNode('FAIL: spell check was invoked'));
else
document.body.appendChild(document.createTextNode('PASS'));
var ok = true;
for (var i = 0; ok && i < expectedMarked.length; ++i)
- ok = layoutTestController.hasSpellingMarker(expectedMarked[i][0], expectedMarked[i][1]);
+ ok = internals.hasSpellingMarker(document, expectedMarked[i][0], expectedMarked[i][1]);
return ok;
}
document.execCommand("InsertText", false, 'z');
document.execCommand("InsertText", false, 'z');
document.execCommand("InsertText", false, ' ');
- var marked = layoutTestController.hasSpellingMarker(1, 2);
+ var marked = internals.hasSpellingMarker(document, 1, 2);
root.innerHTML = "";
return marked;
}
window.target = target;
shouldBe("target.spellcheck", enabled ? "true" : "false");
- shouldBe("layoutTestController.hasSpellingMarker(6, 2)", enabled ? "true" : "false");
+ shouldBe("internals.hasSpellingMarker(document, 6, 2)", enabled ? "true" : "false");
}
function createElement(tagName, spellcheck)
shouldBe("firstLineText()", "'OK'");
shouldBe("sel.anchorNode.data", "'OK zz OK'");
- shouldBeTrue("layoutTestController.hasSpellingMarker(3, 2)");
+ shouldBeTrue("internals.hasSpellingMarker(document, 3, 2)");
sel.modify("move", "left", "lineboundary");
document.execCommand("Delete", false);
shouldBe("sel.anchorNode.data", "'OKOK zz OK'");
shouldBe("firstLineText()", "'OKOK zz OK'");
- shouldBeTrue("layoutTestController.hasSpellingMarker(5, 2)");
+ shouldBeTrue("internals.hasSpellingMarker(document, 5, 2)");
}
function testWithForwardDelete()
shouldBe("firstLineText()", "'OK'");
shouldBe("sel.anchorNode.data", "'OK zz OK'");
- shouldBeTrue("layoutTestController.hasSpellingMarker(3, 2)");
+ shouldBeTrue("internals.hasSpellingMarker(document, 3, 2)");
sel.modify("move", "left", "line");
document.execCommand("ForwardDelete", false);
shouldBe("firstLineText()", "'OKOK zz OK'");
shouldBe("sel.anchorNode.data", "'OKOK zz OK'");
- shouldBeTrue("layoutTestController.hasSpellingMarker(5, 2)");
+ shouldBeTrue("internals.hasSpellingMarker(document, 5, 2)");
}
testWithDelete();
-description('This tests Layouttestcontroller.hasSpellingMarker works for differnt type of elements.');
+description('This tests internals.hasSpellingMarker works for differnt type of elements.');
var parent = document.createElement("div");
document.body.appendChild(parent);
document.execCommand("InsertText", false, 'z');
document.execCommand("InsertText", false, ' ');
- return layoutTestController.hasSpellingMarker(0, 2);
+ return internals.hasSpellingMarker(document, 0, 2);
}
shouldBeTrue("hasMarked(\"<textarea id='test' cols='80' rows='10'></textarea>\");");
document.execCommand("InsertText", false, 'z');
document.execCommand("InsertText", false, 'z');
document.execCommand("InsertText", false, ' ');
- if (shouldBeMarked == layoutTestController.hasSpellingMarker(0, 2))
+ if (shouldBeMarked == internals.hasSpellingMarker(document, 0, 2))
log("PASS:" + id);
else
log("FAIL:" + id);
PASS target.spellcheck is true
-PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS internals.hasSpellingMarker(document, 6, 2) is true
PASS target.spellcheck is false
-PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS internals.hasSpellingMarker(document, 6, 2) is false
PASS target.spellcheck is true
-PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS internals.hasSpellingMarker(document, 6, 2) is true
PASS target.spellcheck is false
-PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS internals.hasSpellingMarker(document, 6, 2) is false
PASS target.spellcheck is true
-PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS internals.hasSpellingMarker(document, 6, 2) is true
PASS target.spellcheck is false
-PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS internals.hasSpellingMarker(document, 6, 2) is false
PASS target.spellcheck is true
-PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS internals.hasSpellingMarker(document, 6, 2) is true
PASS target.spellcheck is false
-PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS internals.hasSpellingMarker(document, 6, 2) is false
PASS target.spellcheck is true
-PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS internals.hasSpellingMarker(document, 6, 2) is true
PASS target.spellcheck is false
-PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS internals.hasSpellingMarker(document, 6, 2) is false
PASS target.spellcheck is true
-PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS internals.hasSpellingMarker(document, 6, 2) is true
PASS target.spellcheck is false
-PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS internals.hasSpellingMarker(document, 6, 2) is false
PASS target.spellcheck is true
-PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS internals.hasSpellingMarker(document, 6, 2) is true
PASS target.spellcheck is false
-PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS internals.hasSpellingMarker(document, 6, 2) is false
PASS target.spellcheck is true
-PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS internals.hasSpellingMarker(document, 6, 2) is true
PASS target.spellcheck is false
-PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS internals.hasSpellingMarker(document, 6, 2) is false
PASS target.spellcheck is true
-PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS internals.hasSpellingMarker(document, 6, 2) is true
PASS target.spellcheck is false
-PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS internals.hasSpellingMarker(document, 6, 2) is false
PASS successfullyParsed is true
TEST COMPLETE
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS sel.anchorNode.data is 'OKOK zz OK'
PASS firstLineText() is 'OKOK zz OK'
-PASS layoutTestController.hasSpellingMarker(5, 2) is true
+PASS internals.hasSpellingMarker(document, 5, 2) is true
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS firstLineText() is 'OKOK zz OK'
PASS sel.anchorNode.data is 'OKOK zz OK'
-PASS layoutTestController.hasSpellingMarker(5, 2) is true
+PASS internals.hasSpellingMarker(document, 5, 2) is true
PASS successfullyParsed is true
TEST COMPLETE
-This tests Layouttestcontroller.hasSpellingMarker works for differnt type of elements.
+This tests internals.hasSpellingMarker works for differnt type of elements.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
if (window.layoutTestController) {
selection.setPosition(elem, 0);
- if (layoutTestController.hasSpellingMarker(6, 2))
+ if (internals.hasSpellingMarker(document, 6, 2))
log("PASS");
else
log("FAIL");
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS sel.anchorNode.data is 'OKOK zz OK'
PASS firstLineText() is 'OKOK zz OK'
-PASS layoutTestController.hasSpellingMarker(5, 2) is true
+PASS internals.hasSpellingMarker(document, 5, 2) is true
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS firstLineText() is 'OKOK zz OK'
PASS sel.anchorNode.data is 'OKOK zz OK'
-PASS layoutTestController.hasSpellingMarker(5, 2) is true
+PASS internals.hasSpellingMarker(document, 5, 2) is true
PASS successfullyParsed is true
TEST COMPLETE
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS sel.anchorNode.data is 'OKOK zz OK'
PASS firstLineText() is 'OKOK zz OK'
-PASS layoutTestController.hasSpellingMarker(5, 2) is true
+PASS internals.hasSpellingMarker(document, 5, 2) is true
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS firstLineText() is 'OKOK zz OK'
PASS sel.anchorNode.data is 'OKOK zz OK'
-PASS layoutTestController.hasSpellingMarker(5, 2) is true
+PASS internals.hasSpellingMarker(document, 5, 2) is true
PASS successfullyParsed is true
TEST COMPLETE
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS sel.anchorNode.data is 'OK zz OK'
PASS firstLineText() is 'OKOK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS firstLineText() is 'OKOK zz OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS successfullyParsed is true
TEST COMPLETE
typeCharacterCommand('a');
typeCharacterCommand(' ');
execDeleteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,8) == 1) {
document.getElementById('console').innerHTML = 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = "FAILURE. The word 'meagesga' does not have underline.<br>";
textarea.focus();
typeCharacterCommand(' ');
execForwardDeleteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,8) == 1) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' does not have underline.<br>";
resetText();
textarea.setSelectionRange(11, 20);
execDeleteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,4) == 0 && window.layoutTestController.hasSpellingMarker(11,4) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,4) == 0 && window.internals.hasSpellingMarker(document, 11,4) == 0) {
document.getElementById('console').innerHTML = 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = "FAILURE. The word 'meagesga' has underline.<br>";
resetText();
textarea.setSelectionRange(11, 16);
execDeleteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,4) == 0 && window.layoutTestController.hasSpellingMarker(11,8) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,4) == 0 && window.internals.hasSpellingMarker(document, 11,8) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagmeagesga' has underline.<br>";
resetText();
textarea.setSelectionRange(15, 20);
execDeleteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,8) == 0 && window.layoutTestController.hasSpellingMarker(15,4) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,8) == 0 && window.internals.hasSpellingMarker(document, 15,4) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesgaesga' has underline.<br>";
textarea.focus();
textarea.setSelectionRange(14, 15);
execDeleteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,7) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,7) == 0) {
document.getElementById('console').innerHTML = 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = "FAILURE. The word 'meagesg' has underline.<br>";
resetText();
textarea.setSelectionRange(6, 6);
execForwardDeleteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(6,8) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 6,8) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'ameagesga' has underline.<br>";
resetText();
textarea.setSelectionRange(7, 7);
execForwardDeleteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,7) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,7) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'eagesga' has underline.<br>";
resetText();
textarea.setSelectionRange(10, 10);
typeCharacterCommand(' ');
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,3) == 0 && window.layoutTestController.hasSpellingMarker(11,5) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,3) == 0 && window.internals.hasSpellingMarker(document, 11,5) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The segment 'mea gesga' has underline.<br>";
resetText();
textarea.setSelectionRange(10, 13);
execDeleteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,5) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,5) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meaga' has underline.<br>";
resetText();
textarea.setSelectionRange(10, 13);
typeCharacterCommand(' ');
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,3) == 0 && window.layoutTestController.hasSpellingMarker(11,2) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,3) == 0 && window.internals.hasSpellingMarker(document, 11,2) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The segment 'mea ga' has underline.<br>";
resetText();
textarea.setSelectionRange(7, 7);
typeCharacterCommand('a');
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(8,8) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 8,8) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'ameagesga' has underline.<br>";
resetText();
textarea.setSelectionRange(15, 15);
typeCharacterCommand('a');
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,8) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,8) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesgaa' has underline.<br>";
execCopyCommand();
textarea.setSelectionRange(7, 7);
execPasteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(11,8) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 11,8) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' has underline.<br>";
execCopyCommand();
textarea.setSelectionRange(15, 15);
execPasteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,8) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,8) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' has underline.<br>";
execCopyCommand();
textarea.setSelectionRange(10, 10);
execPasteCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,3) == 0 && window.layoutTestController.hasSpellingMarker(15,5) == 0) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,3) == 0 && window.internals.hasSpellingMarker(document, 15,5) == 0) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meait\'sgesga' has underline.<br>";
textarea = document.getElementById('test');
textarea.setSelectionRange(7,7);
typeCharacterCommand(' ');
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(8,8) == 1) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 8,8) == 1) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' doesn't have underline.<br>";
textarea = document.getElementById('test');
textarea.setSelectionRange(15,15);
typeCharacterCommand(' ');
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,8) == 1) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' doesn't have underline.<br>";
typeCharacterCommand(' ');
execMoveSelectionBackwardByCharacterCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,8) == 1) {
document.getElementById('console').innerHTML = 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = "FAILURE. The word 'meagesga' does not have misspell underline.<br>";
textarea = document.getElementById('test');
textarea.setSelectionRange(10, 10);
textarea.focus();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,8) == 1) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' does not have misspell underline.<br>";
textarea.setSelectionRange(6, 6);
textarea.focus();
execMoveSelectionForwardByCharacterCommand();
-if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
- if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+if (window.internals && window.internals.hasSpellingMarker) {
+ if (window.internals.hasSpellingMarker(document, 7,8) == 1) {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
} else {
document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' does not have misspell underline.<br>";
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS sel.anchorNode.data is 'OKOK zz OK'
PASS firstLineText() is 'OKOK zz OK'
-FAIL layoutTestController.hasSpellingMarker(5, 2) should be true. Was false.
+FAIL internals.hasSpellingMarker(document, 5, 2) should be true. Was false.
PASS firstLineText() is 'OK'
PASS sel.anchorNode.data is 'OK zz OK'
-PASS layoutTestController.hasSpellingMarker(3, 2) is true
+PASS internals.hasSpellingMarker(document, 3, 2) is true
PASS firstLineText() is 'OKOK zz OK'
PASS sel.anchorNode.data is 'OKOK zz OK'
-FAIL layoutTestController.hasSpellingMarker(5, 2) should be true. Was false.
+FAIL internals.hasSpellingMarker(document, 5, 2) should be true. Was false.
PASS successfullyParsed is true
TEST COMPLETE
# WebKitTestRunner needs layoutTestController.pageProperty
printing/page-rule-selection.html
-# WebKitTestRunner needs layoutTestController.hasSpellingMarker
+# WebKitTestRunner needs internals.hasSpellingMarker
editing/spelling/design-mode-spellcheck-off.html
editing/spelling/spellcheck-attribute.html
editing/spelling/spelling-attribute-at-child.html
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove hasSpellingMarker functions, because it is able to work in the
+ cross-port way through the Internals interface.
+
+ No new tests, since we are improving here the infra-structure
+ for testing a specific method.
+
+ * testing/Internals.cpp:
+ (WebCore::Internals::hasSpellingMarker):
+ (WebCore):
+ * testing/Internals.h:
+ (Internals):
+ * testing/Internals.idl:
+
2012-03-20 Dan Bernstein <mitz@apple.com>
Build fix.
#endif
}
+bool Internals::hasSpellingMarker(Document* document, int from, int length, ExceptionCode&)
+{
+ if (!document || !document->frame())
+ return 0;
+
+ return document->frame()->editor()->selectionStartHasMarkerFor(DocumentMarker::Spelling, from, length);
+}
+
}
void emitInspectorDidBeginFrame();
void emitInspectorDidCancelFrame();
+ bool hasSpellingMarker(Document*, int from, int length, ExceptionCode&);
+
static const char* internalsId;
InternalSettings* settings() const { return m_settings.get(); }
void emitInspectorDidBeginFrame();
void emitInspectorDidCancelFrame();
+ boolean hasSpellingMarker(in Document document, in long from, in long length) raises (DOMException);
+
readonly attribute InternalSettings settings;
#if defined(ENABLE_BATTERY_STATUS) && ENABLE_BATTERY_STATUS
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove DumpRenderTreeSupportGtk::webkitWebFrameSelectionHasSpellingMarker support,
+ since it can support in the cross-port way through the Internals interface.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
2012-03-19 Adam Barth <abarth@webkit.org>
Remove support for "magic" iframe
#endif
}
-bool DumpRenderTreeSupportGtk::webkitWebFrameSelectionHasSpellingMarker(WebKitWebFrame *frame, gint from, gint length)
-{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), FALSE);
-
- return core(frame)->editor()->selectionStartHasMarkerFor(DocumentMarker::Spelling, from, length);
-}
-
bool DumpRenderTreeSupportGtk::findString(WebKitWebView* webView, const gchar* targetString, WebKitFindOptions findOptions)
{
return core(webView)->findString(String::fromUTF8(targetString), findOptions);
static void whiteListAccessFromOrigin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains);
static void resetOriginAccessWhiteLists();
static unsigned int workerThreadCount();
- static bool webkitWebFrameSelectionHasSpellingMarker(WebKitWebFrame*, gint from, gint length);
static void resetGeolocationClientMock(WebKitWebView*);
static void setMockGeolocationPermission(WebKitWebView*, bool allowed);
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove hasSpellingMarker support, since it can support in the cross-port way
+ through the Internals interface.
+
+ * WebKit.order:
+ * WebView/WebFrame.mm:
+ * WebView/WebFramePrivate.h:
+
2012-03-19 Adam Barth <abarth@webkit.org>
Remove support for "magic" iframe
__ZN15WebEditorClient17getGuessesForWordERKN3WTF6StringES3_RNS0_6VectorIS1_Lm0EEE
__ZN3WTF6VectorINS_6StringELm0EE14shrinkCapacityEm
__ZN15WebEditorClient34updateSpellingUIWithMisspelledWordERKN3WTF6StringE
--[WebFrame(WebPrivate) hasSpellingMarker:length:]
-[WebFrame(WebPrivate) hasGrammarMarker:length:]
__ZThn8_N15WebEditorClient23requestCheckingOfStringEPN7WebCore12SpellCheckerEijRKN3WTF6StringE
__ZN15WebEditorClient23requestCheckingOfStringEPN7WebCore12SpellCheckerEijRKN3WTF6StringE
return coreFrame->layerTreeAsText();
}
-- (BOOL)hasSpellingMarker:(int)from length:(int)length
-{
- Frame* coreFrame = core(self);
- if (!coreFrame)
- return NO;
- return coreFrame->editor()->selectionStartHasMarkerFor(DocumentMarker::Spelling, from, length);
-}
-
- (BOOL)hasGrammarMarker:(int)from length:(int)length
{
Frame* coreFrame = core(self);
- (NSString*)_layerTreeAsText;
-// Returns whether there is a spelling marker in the specified range of the focused node.
-- (BOOL)hasSpellingMarker:(int)location length:(int)length;
-
- (BOOL)hasGrammarMarker:(int)from length:(int)length;
// The top of the accessibility tree.
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove hasSpellingMarker interface support, since it can support in the cross-port
+ way through the Internals interface.
+
+ * Interfaces/IWebFramePrivate.idl:
+
2012-03-19 Adam Barth <abarth@webkit.org>
Remove support for "magic" iframe
HRESULT loadPlainTextString([in] BSTR string, [in] BSTR url);
- HRESULT hasSpellingMarker([in] UINT from, [in] UINT length, [out, retval] BOOL* result);
-
HRESULT clearOpener();
HRESULT setTextDirection([in] BSTR direction);
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ * win/WebKit2.def: Export a symbol for hasSpellingMarker.
+
2012-03-20 Antaryami Pandia <antaryami.pandia@motorola.com>
[GTK] [WK2] Add javascript clipboard functionality settings to WebKit2 GTK+ API.
?view@Document@WebCore@@QBEPAVFrameView@2@XZ
?willDetachPage@FrameDestructionObserver@WebCore@@UAEXXZ
?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N@Z
+ ?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z
_ZN7WebCore22RuntimeEnabledFeatures18isShadowDOMEnabledE;
_ZNK7WebCore8Document13nodesFromRectEiijjjjb;
_ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_8NodeListE;
+_ZNK7WebCore6Editor26selectionStartHasMarkerForENS_14DocumentMarker10MarkerTypeEii;
local:
_Z*;
cti*;
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove hasSpellingMarker functions, because it is able to work in the
+ cross-port way through the Internals interface.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController):
+ * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ (LayoutTestController):
+ * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+
2012-03-20 Csaba Osztrogonác <ossy@webkit.org>
Add new Qt-WK2 performance tester bot to build.webkit.org
return JSValueMakeUndefined(context);
}
-static JSValueRef hasSpellingMarkerCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount != 2)
- return JSValueMakeUndefined(context);
-
- int from = JSValueToNumber(context, arguments[0], 0);
- int length = JSValueToNumber(context, arguments[1], 0);
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- bool ok = controller->hasSpellingMarker(from, length);
-
- return JSValueMakeBoolean(context, ok);
-}
-
static JSValueRef hasGrammarMarkerCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount != 2)
{ "originsWithApplicationCache", originsWithApplicationCacheCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "goBack", goBackCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "grantDesktopNotificationPermission", grantDesktopNotificationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "hasSpellingMarker", hasSpellingMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "hasGrammarMarker", hasGrammarMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "ignoreDesktopNotificationPermissionRequests", ignoreDesktopNotificationPermissionRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isCommandEnabled", isCommandEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
void abortModal();
- bool hasSpellingMarker(int from, int length);
bool hasGrammarMarker(int from, int length);
void dumpConfigurationForViewport(int deviceDPI, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight);
mainFrame->animation()->resumeAnimations();
}
-bool LayoutTestController::hasSpellingMarker(int from, int length)
-{
- if (!mainFrame)
- return false;
-
- return mainFrame->editor()->selectionStartHasMarkerFor(WebCore::DocumentMarker::Spelling, from, length);
-}
-
void LayoutTestController::setSerializeHTTPLoads(bool)
{
// FIXME: Implement if needed for https://bugs.webkit.org/show_bug.cgi?id=50758.
bindMethod("execCommand", &LayoutTestController::execCommand);
bindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors);
bindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission);
- bindMethod("hasSpellingMarker", &LayoutTestController::hasSpellingMarker);
bindMethod("findString", &LayoutTestController::findString);
bindMethod("isCommandEnabled", &LayoutTestController::isCommandEnabled);
bindMethod("hasCustomPageSizeStyle", &LayoutTestController::hasCustomPageSizeStyle);
result->set(element.document().frame()->markerTextForListItem(element).utf8());
}
-void LayoutTestController::hasSpellingMarker(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
- return;
- result->set(m_shell->webView()->mainFrame()->selectionStartHasSpellingMarkerFor(arguments[0].toInt32(), arguments[1].toInt32()));
-}
-
void LayoutTestController::findString(const CppArgumentList& arguments, CppVariant* result)
{
if (arguments.size() < 1 || !arguments[0].isString())
void loseCompositorContext(const CppArgumentList& args, CppVariant* result);
void markerTextForListItem(const CppArgumentList&, CppVariant*);
- void hasSpellingMarker(const CppArgumentList&, CppVariant*);
void findString(const CppArgumentList&, CppVariant*);
void setMinimumTimerInterval(const CppArgumentList&, CppVariant*);
notImplemented();
}
-bool LayoutTestController::hasSpellingMarker(int, int)
-{
- notImplemented();
- return false;
-}
-
bool LayoutTestController::hasGrammarMarker(int, int)
{
notImplemented();
{
}
-bool LayoutTestController::hasSpellingMarker(int from, int length)
-{
- return DumpRenderTreeSupportGtk::webkitWebFrameSelectionHasSpellingMarker(mainFrame, from, length);
-}
-
bool LayoutTestController::hasGrammarMarker(int from, int length)
{
return false;
[NSApp abortModal];
}
-bool LayoutTestController::hasSpellingMarker(int from, int length)
-{
- return [mainFrame hasSpellingMarker:from length:length];
-}
-
bool LayoutTestController::hasGrammarMarker(int from, int length)
{
return [mainFrame hasGrammarMarker:from length:length];
DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks(true);
}
-bool LayoutTestController::hasSpellingMarker(int, int)
-{
- // FIXME: Implement.
- return false;
-}
-
void LayoutTestController::addURLToRedirect(const QString& origin, const QString& destination)
{
DumpRenderTreeSupportQt::addURLToRedirect(origin, destination);
// Empty stub method to keep parity with object model exposed by global LayoutTestController.
void abortModal() {}
- bool hasSpellingMarker(int from, int length);
void addURLToRedirect(const QString& origin, const QString& destination);
{
}
-bool LayoutTestController::hasSpellingMarker(int from, int length)
-{
- COMPtr<IWebFramePrivate> framePrivate(Query, frame);
- if (!framePrivate)
- return false;
- BOOL ret = FALSE;
- if (FAILED(framePrivate->hasSpellingMarker(from, length, &ret)))
- return false;
- return ret;
-}
-
bool LayoutTestController::hasGrammarMarker(int from, int length)
{
// FIXME: Implement this.
{
}
-bool LayoutTestController::hasSpellingMarker(int, int)
-{
- // FIXME: Implement
- return false;
-}
-
bool LayoutTestController::hasGrammarMarker(int, int)
{
// FIXME: Implement