Convert hasSpellingMarker to use Internals interface.
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Mar 2012 16:59:44 +0000 (16:59 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Mar 2012 16:59:44 +0000 (16:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81300

Reviewed by Ryosuke Niwa.

.:

* Source/autotools/symbols.filter: Export a symbol for hasSpellingMarker.

Source/WebCore:

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:

Source/WebKit/gtk:

Remove DumpRenderTreeSupportGtk::webkitWebFrameSelectionHasSpellingMarker support,
since it can support in the cross-port way through the Internals interface.

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Source/WebKit/mac:

Remove hasSpellingMarker support, since it can support in the cross-port way
through the Internals interface.

* WebKit.order:
* WebView/WebFrame.mm:
* WebView/WebFramePrivate.h:

Source/WebKit/win:

Remove hasSpellingMarker interface support, since it can support in the cross-port
way through the Internals interface.

* Interfaces/IWebFramePrivate.idl:

Source/WebKit2:

* win/WebKit2.def: Export a symbol for hasSpellingMarker.

Tools:

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:

LayoutTests:

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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111405 268f45cc-cd09-0410-ab3c-d52691b4dbfc

52 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/editing/spelling/design-mode-spellcheck-off.html
LayoutTests/editing/spelling/script-tests/spellcheck-paste.js
LayoutTests/editing/spelling/script-tests/spelling-attribute-at-child.js
LayoutTests/editing/spelling/script-tests/spelling-attribute-change.js
LayoutTests/editing/spelling/script-tests/spelling-backspace-between-lines.js
LayoutTests/editing/spelling/script-tests/spelling-hasspellingmarker.js
LayoutTests/editing/spelling/spellcheck-attribute.html
LayoutTests/editing/spelling/spelling-attribute-change-expected.txt
LayoutTests/editing/spelling/spelling-backspace-between-lines-expected.txt
LayoutTests/editing/spelling/spelling-hasspellingmarker-expected.txt
LayoutTests/editing/spelling/spelling-linebreak.html
LayoutTests/platform/chromium-mac-snowleopard/editing/spelling/spelling-backspace-between-lines-expected.txt
LayoutTests/platform/chromium-win/editing/spelling/spelling-backspace-between-lines-expected.txt
LayoutTests/platform/chromium/editing/spelling/spelling-backspace-between-lines-expected.txt
LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word.html
LayoutTests/platform/mac/editing/spelling/editing-multiple-words-with-markers.html
LayoutTests/platform/mac/editing/spelling/editing-word-with-marker-1.html
LayoutTests/platform/mac/editing/spelling/editing-word-with-marker-2.html
LayoutTests/platform/mac/editing/spelling/move-cursor-around-misspelled-word.html
LayoutTests/platform/win/editing/spelling/spelling-backspace-between-lines-expected.txt
LayoutTests/platform/wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebKit.order
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebFramePrivate.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/Interfaces/IWebFramePrivate.idl
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/autotools/symbols.filter
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.h
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp

index b0aad2538212cd40f562034cfe85a9330cb66d42..abee50d2f4f04ab55b8d44b7cf4c4390aff38bd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
index ab2132a96f9cce0f92c24f0d04920fdd313ae815..14e5773c8ee46110cc34462245f2519295b476fa 100644 (file)
@@ -1,3 +1,41 @@
+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.
index e7128e5ec8fac0d74dddfea64148a3d00a19babb..9d4f80cd935eee303bf03f0203818b2161fe3c48 100644 (file)
@@ -18,7 +18,7 @@ else if (window.layoutTestController && window.eventSender) {
     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'));
index 6ab0afd98fd6cda2c4bf76267f9f7aa86f171681..d116571657a8c23f5b7d0b19e7db7ec9f6a463bb 100644 (file)
@@ -54,7 +54,7 @@ function verifyMarker(node, expectedMarked)
 
     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;
 }
 
index 0028672f0ea9ec1c15a131d02d82618c827b9304..1810c2897f53e956c422caf56936cb3f6f4ba499 100644 (file)
@@ -11,7 +11,7 @@ function childHasSpellingMarker(markup)
     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;
 }
index 7dbf80a2cc5c1b53348a350920137b5ade72ad3c..ff4eaa7b76fba3e1121bc105e789559f42ea8312 100644 (file)
@@ -22,7 +22,7 @@ function testSpellCheckingEnabled(target, enabled)
 
     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)
index d0f24174d3de67d7c877a081cc81b4b648823c5d..616f001fd2f8ad868489bdf59574828d60a2f855 100644 (file)
@@ -26,7 +26,7 @@ function testWithDelete()
 
     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);
@@ -34,7 +34,7 @@ function testWithDelete()
 
     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()
@@ -47,7 +47,7 @@ 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);
@@ -55,7 +55,7 @@ function testWithForwardDelete()
 
     shouldBe("firstLineText()", "'OKOK zz OK'");
     shouldBe("sel.anchorNode.data", "'OKOK zz OK'");
-    shouldBeTrue("layoutTestController.hasSpellingMarker(5, 2)");
+    shouldBeTrue("internals.hasSpellingMarker(document, 5, 2)");
 }
 
 testWithDelete();
index d08ddd0354177f151fa19b6db72f139edeb6833f..c107ff8bede9c367079337c3c28cf2be3d7ea661 100644 (file)
@@ -1,4 +1,4 @@
-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);
@@ -11,7 +11,7 @@ function hasMarked(markup)
     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>\");");
index 0715993dacb43eee2f7449ddfdc1d8ff63682295..79ab47adbbd280487bd9045d13eed853bab55041 100644 (file)
@@ -53,7 +53,7 @@ function testTypingInvalidWord(id, shouldBeMarked) {
     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);
index f26f4f28cdaf25615231eab0dd247f582818fa52..f8eda2c4e555349a37ecbb7594f557694a34f67f 100644 (file)
@@ -4,41 +4,41 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 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
index 416cf02faf0dd44aaae5a529aa6343479274f79b..222f569a86d0dda920c753f3146d247504389975 100644 (file)
@@ -5,16 +5,16 @@ On success, you will see a series of "PASS" messages, followed by "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
index 2b8582a2636f2191c56c24ff684847266ad52631..7aa57b5f74ad2c521dc2231fc429103547a7f387 100644 (file)
@@ -1,4 +1,4 @@
-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".
 
index f5818e6d29628ed41f4a8bdea42eff89f59ec95b..e887bfe5f25caa311292911ae28ecf1aaec1ede6 100644 (file)
@@ -34,7 +34,7 @@ function editingTest() {
 
     if (window.layoutTestController) {
         selection.setPosition(elem, 0);
-        if (layoutTestController.hasSpellingMarker(6, 2))
+        if (internals.hasSpellingMarker(document, 6, 2))
            log("PASS");
         else
            log("FAIL");
index 416cf02faf0dd44aaae5a529aa6343479274f79b..222f569a86d0dda920c753f3146d247504389975 100644 (file)
@@ -5,16 +5,16 @@ On success, you will see a series of "PASS" messages, followed by "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
index 416cf02faf0dd44aaae5a529aa6343479274f79b..222f569a86d0dda920c753f3146d247504389975 100644 (file)
@@ -5,16 +5,16 @@ On success, you will see a series of "PASS" messages, followed by "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
index 9404ad407bec0aab721f3f059c0cecf888d5bdee..c320a55149a31460ad02453ea5f74526ed38b42d 100644 (file)
@@ -5,16 +5,16 @@ On success, you will see a series of "PASS" messages, followed by "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
index 55592a855245ca9765d8b5844ecf8971a5bf3028..0909b7a6df568755c3fe78868e98f599f6ae61bb 100644 (file)
@@ -32,8 +32,8 @@ typeCharacterCommand('g');
 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>";
@@ -45,8 +45,8 @@ textarea.setSelectionRange(6, 6);
 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>";
index b12a9667f47da5ae668ca7dc7f347bc0624bd2fb..44f9a70cab021cd68d3e5cf0c5c93d73a2e78460 100644 (file)
@@ -50,8 +50,8 @@ textarea = document.getElementById('test');
 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>";
@@ -61,8 +61,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
@@ -72,8 +72,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
index 6e7dc083241e025a21b9c5f2cadac7e506faeadf..b47d9737a9c3f233cd16b0c567a9624220461342 100644 (file)
@@ -41,8 +41,8 @@ textarea = document.getElementById('test');
 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>";
@@ -53,8 +53,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
@@ -64,8 +64,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
@@ -75,8 +75,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
@@ -86,8 +86,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
@@ -97,8 +97,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
@@ -109,8 +109,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
@@ -120,8 +120,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
@@ -135,8 +135,8 @@ textarea.setSelectionRange(0,4);
 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>";
@@ -149,8 +149,8 @@ textarea.setSelectionRange(0,4);
 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>";
@@ -163,8 +163,8 @@ textarea.setSelectionRange(0,4);
 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>";
index e0e0ec8af1aa65cbff0e19dc0ecb5560e0ac0236..4fcb05016ae79ac0c1cebe22b98195f4c774c6fa 100644 (file)
@@ -41,8 +41,8 @@ resetText();
 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>";
@@ -53,8 +53,8 @@ resetText();
 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>";
index 01b68c4f46f20613f8cde00201fd92fe518ce80c..a717485807c0fbac7e0c1282b28f49b1c3d020c6 100644 (file)
@@ -33,8 +33,8 @@ typeCharacterCommand('a');
 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>";
@@ -44,8 +44,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
@@ -55,8 +55,8 @@ if (window.layoutTestController && window.layoutTestController.hasSpellingMarker
 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>";
index 01cdc52fadc5c828c944291102c40b5061949b35..aef28b8a22c6d71724fbf34ae841243f8d3bcb91 100644 (file)
@@ -5,16 +5,16 @@ On success, you will see a series of "PASS" messages, followed by "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'
-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
index afb7b6932b1cb880b2282051b8cf0bb490ede382..97700d2b597e3a5179d149fd17df0e0a3e665153 100644 (file)
@@ -910,7 +910,7 @@ editing/selection/doubleclick-inline-first-last-contenteditable.html
 # 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
index 95648953e3f566a2deb180145d1b888ab65c0762..877951e3dda16ddfe09dba08b41a80901560b450 100644 (file)
@@ -1,3 +1,23 @@
+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.
index 6207265ceaaf55c4468544a3497430c88091f21f..c826b150a072d885303e2f422f2347e0f61b82fe 100644 (file)
@@ -762,4 +762,12 @@ void Internals::setBatteryStatus(Document* document, const String& eventType, bo
 #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);
+}
+
 }
index c19c29933247858876ecda7aef5da00cc1f25174..68834605f464079a9e9c5baac7783a7211672b4d 100644 (file)
@@ -137,6 +137,8 @@ public:
     void emitInspectorDidBeginFrame();
     void emitInspectorDidCancelFrame();
 
+    bool hasSpellingMarker(Document*, int from, int length, ExceptionCode&);
+
     static const char* internalsId;
 
     InternalSettings* settings() const { return m_settings.get(); }
index d21a2c67ad52e6fbcd106ec3f9bcf382b82b09f2..dda122984a4cf5c0f941c09a1f7b04be217f832c 100644 (file)
@@ -113,6 +113,8 @@ module window {
         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
index ac85a589a7ae7a3fd91ee53489d99f2dbb93c690..8bd6988655dedfb58c6ed24be5589622dcd28f74 100644 (file)
@@ -1,3 +1,17 @@
+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
index 3f7363d3eea738e530e2a9020798e48fe259fa78..300f1db2633c69103d30646af10e63790c55c822 100644 (file)
@@ -684,13 +684,6 @@ unsigned int DumpRenderTreeSupportGtk::workerThreadCount()
 #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);
index 502ec4d841b2e79c85e8068d93e0d356bd8a1e26..69884d557aea394271249a7795f84021f788ab49 100644 (file)
@@ -116,7 +116,6 @@ public:
     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);
index 18a50f57a5db93e2277aad86f25ab0056e3adbeb..14f756be6b929ff1e3368ca40d6ac2e8c3b231b5 100644 (file)
@@ -1,3 +1,17 @@
+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
index 040ae906e6f965b5214742ebac2e3fa62abe061e..5b5849705c4504278d466b95c2fd48d411e986c8 100644 (file)
@@ -1691,7 +1691,6 @@ __ZThn8_N15WebEditorClient17getGuessesForWordERKN3WTF6StringES3_RNS0_6VectorIS1_
 __ZN15WebEditorClient17getGuessesForWordERKN3WTF6StringES3_RNS0_6VectorIS1_Lm0EEE
 __ZN3WTF6VectorINS_6StringELm0EE14shrinkCapacityEm
 __ZN15WebEditorClient34updateSpellingUIWithMisspelledWordERKN3WTF6StringE
--[WebFrame(WebPrivate) hasSpellingMarker:length:]
 -[WebFrame(WebPrivate) hasGrammarMarker:length:]
 __ZThn8_N15WebEditorClient23requestCheckingOfStringEPN7WebCore12SpellCheckerEijRKN3WTF6StringE
 __ZN15WebEditorClient23requestCheckingOfStringEPN7WebCore12SpellCheckerEijRKN3WTF6StringE
index 500e3f38040ddad201ecf63300ad26c5f3509554..44609c17862f2ec84b0f604915c69dea7a3f9331 100644 (file)
@@ -1223,14 +1223,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
     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);
index 899ceeddf1f87b03fd2f6b5f6397e521087f77ab..138a0f44937e4493ac96d77c31099ce299abb91e 100644 (file)
@@ -136,9 +136,6 @@ typedef enum {
 
 - (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.
index 7f5e49106dcc6745f8695961d56f1ae436091795..6b8787b522ebfba5b23cc58a9974388bf3964bd2 100644 (file)
@@ -1,3 +1,15 @@
+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
index 90ba4bdb9dae0fe7f4370f49e490d420c639d64e..cb7a469972846df7071c216a1b642d8945aa99d7 100644 (file)
@@ -115,8 +115,6 @@ interface IWebFramePrivate : IUnknown
 
     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);
index 9c4abc2aff6a1ad77923cf286cdf3ffc2209e7ab..20c10bf8b31de7488c33410e656044a2a0b2b5f9 100644 (file)
@@ -1,3 +1,12 @@
+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.
index 0e9658f6e624bbaf0dbb02e066a65b0d67be6d04..82388ead51aa5dc45851e1dc2586dc85564ce642 100644 (file)
@@ -232,3 +232,4 @@ EXPORTS
         ?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
index 0294dadb844606ef45d6218201a6711b63f6a238..652f182e684f54bb6aec33dab96f014ef5c5af9a 100644 (file)
@@ -122,6 +122,7 @@ _ZN7WebCore22RuntimeEnabledFeatures32setMultipleShadowSubtreesEnabledEb;
 _ZN7WebCore22RuntimeEnabledFeatures18isShadowDOMEnabledE;
 _ZNK7WebCore8Document13nodesFromRectEiijjjjb;
 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_8NodeListE;
+_ZNK7WebCore6Editor26selectionStartHasMarkerForENS_14DocumentMarker10MarkerTypeEii;
 local:
 _Z*;
 cti*;
index 9ef274ec265dce2a9723e69fcf27ca958d1fd25a..bca6843213ad9d2a6d906bda5167e2d7945ce3b0 100644 (file)
@@ -1,3 +1,30 @@
+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
index 96aeedd04cf6a55ff868b02b6fa8a6e9bae877f7..6683ce974be611f249e9a9f328451c1c1ce1eaca 100644 (file)
@@ -2034,19 +2034,6 @@ static JSValueRef abortModalCallback(JSContextRef context, JSObjectRef function,
     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)
@@ -2371,7 +2358,6 @@ JSStaticFunction* LayoutTestController::staticFunctions()
         { "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 },
index b3248d0529171a816e23d69eff64705765a499ec..5310c66e8699968408f8d7581f9f12ba1f566def 100644 (file)
@@ -328,7 +328,6 @@ public:
 
     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);
index 62e954837601ef03e2474fd96a14f6c26b1d2f69..7a159eab01e85ee12e42b80c2f66412ad0f02a26 100644 (file)
@@ -715,14 +715,6 @@ void LayoutTestController::resumeAnimations() const
         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.
index af563609659cd9895d53e8c8bbfa65ca83e384db..55a1cb826428d237dacfc83698621d43ff1b38e0 100644 (file)
@@ -132,7 +132,6 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     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);
@@ -2003,13 +2002,6 @@ void LayoutTestController::markerTextForListItem(const CppArgumentList& args, Cp
         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())
index 0f5059b2c8623546638d0162e03536b0ad59d695..53677e2dac6a826e8cd1b29577cc1fff0e43aa11 100644 (file)
@@ -385,7 +385,6 @@ public:
     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*);
index 7cde126fba3aca1c321525e41c9354af0e9525db..c281c4d1d43b41e9e566f8914ef2b0ad98c7821b 100644 (file)
@@ -726,12 +726,6 @@ void LayoutTestController::abortModal()
     notImplemented();
 }
 
-bool LayoutTestController::hasSpellingMarker(int, int)
-{
-    notImplemented();
-    return false;
-}
-
 bool LayoutTestController::hasGrammarMarker(int, int)
 {
     notImplemented();
index 06e456c07f1ba6346159049ac9eb3cd31f607957..d4e12120aa687520d71c5da2ee5fa73af3bcfb07 100644 (file)
@@ -976,11 +976,6 @@ void LayoutTestController::abortModal()
 {
 }
 
-bool LayoutTestController::hasSpellingMarker(int from, int length)
-{
-    return DumpRenderTreeSupportGtk::webkitWebFrameSelectionHasSpellingMarker(mainFrame, from, length);
-}
-
 bool LayoutTestController::hasGrammarMarker(int from, int length)
 {
     return false;
index d2675dbd0477f6a43796f89183ac096d637df480..b6155a9e46f8776c762744ddd79515a7730053a0 100644 (file)
@@ -1159,11 +1159,6 @@ void LayoutTestController::abortModal()
     [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];
index 869f263fadb2baaa2d2f16ea1e00871ecb7a157c..7365a3a15501f3dd4b8868013b86d3b8fe47f129 100644 (file)
@@ -943,12 +943,6 @@ void LayoutTestController::removeAllVisitedLinks()
     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);
index 32f61e7a02663f6bb71034ce82616f69ae621fda..a397fbaad2f7bd6427f826725b3726dd3039ef78 100644 (file)
@@ -241,7 +241,6 @@ public slots:
 
     // 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);
 
index 25483c2fddfce489594422358b9f51ae230d01f3..e639bf1d2c9250dd96073be294092b94c3f031d6 100644 (file)
@@ -1449,17 +1449,6 @@ void LayoutTestController::abortModal()
 {
 }
 
-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.
index 196959bd11aca4f32f35d7627a706882ec8293e1..fc6a2691297f5503bb20c4a29fba493a517e447a 100644 (file)
@@ -550,12 +550,6 @@ void LayoutTestController::abortModal()
 {
 }
 
-bool LayoutTestController::hasSpellingMarker(int, int)
-{
-    // FIXME: Implement
-    return false;
-}
-
 bool LayoutTestController::hasGrammarMarker(int, int)
 {
     // FIXME: Implement