[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
morrita at google.com
morrita at google.com
Wed Dec 22 15:08:14 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit d165d1d062c96243dd9cafe702e994a167ee9c43
Author: morrita at google.com <morrita at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 28 10:41:58 2010 +0000
2010-10-28 MORITA Hajime <morrita at google.com>
Reviewed by Kent Tamura.
WebKit needs to expose an Element::spellcheck attribute to javascript.
https://bugs.webkit.org/show_bug.cgi?id=25536
* editing/spelling/script-tests/spelling-attribute-change.js: Added.
* editing/spelling/spelling-attribute-change-expected.txt: Added.
* editing/spelling/spelling-attribute-change.html: Added.
* fast/dom/HTMLElement/script-tests/spellcheck.js: Added.
* fast/dom/HTMLElement/spellcheck-expected.txt: Added.
* fast/dom/HTMLElement/spellcheck.html: Added.
* platform/chromium/test_expectations.txt:
* platform/gtk/Skipped:
* platform/qt/Skipped:
2010-10-27 MORITA Hajime <morrita at google.com>
Reviewed by Kent Tamura.
WebKit needs to expose an Element::spellcheck attribute to javascript.
https://bugs.webkit.org/show_bug.cgi?id=25536
Published Element.spellcheck property on IDL, implemented it.
Tests: editing/spelling/spelling-attribute-change.html
fast/dom/HTMLElement/spellcheck.html
* html/HTMLElement.cpp:
(WebCore::HTMLElement::spellcheck):
(WebCore::HTMLElement::setSpellcheck):
* html/HTMLElement.h:
* html/HTMLElement.idl:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9aee497..bbacd7f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-28 MORITA Hajime <morrita at google.com>
+
+ Reviewed by Kent Tamura.
+
+ WebKit needs to expose an Element::spellcheck attribute to javascript.
+ https://bugs.webkit.org/show_bug.cgi?id=25536
+
+ * editing/spelling/script-tests/spelling-attribute-change.js: Added.
+ * editing/spelling/spelling-attribute-change-expected.txt: Added.
+ * editing/spelling/spelling-attribute-change.html: Added.
+ * fast/dom/HTMLElement/script-tests/spellcheck.js: Added.
+ * fast/dom/HTMLElement/spellcheck-expected.txt: Added.
+ * fast/dom/HTMLElement/spellcheck.html: Added.
+ * platform/chromium/test_expectations.txt:
+ * platform/gtk/Skipped:
+ * platform/qt/Skipped:
+
2010-10-27 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/LayoutTests/editing/spelling/script-tests/spelling-attribute-change.js b/LayoutTests/editing/spelling/script-tests/spelling-attribute-change.js
new file mode 100644
index 0000000..7dbf80a
--- /dev/null
+++ b/LayoutTests/editing/spelling/script-tests/spelling-attribute-change.js
@@ -0,0 +1,86 @@
+description('Tests if the spellchecker behavior change after the spellcheck attribute changed by the script.');
+
+var parent = document.createElement("div");
+document.body.appendChild(parent);
+var sel = document.getSelection();
+
+function testSpellCheckingEnabled(target, enabled)
+{
+ target.spellcheck = enabled;
+
+ if (target.tagName == "SPAN") {
+ target.appendChild(document.createTextNode("Hello,"));
+ sel.setBaseAndExtent(target, 6, target, 6);
+ } else if (target.tagName == "INPUT" || target.tagName == "TEXTAREA") {
+ target.focus();
+ document.execCommand("InsertText", false, "Hello,");
+ }
+
+ document.execCommand("InsertText", false, 'z');
+ document.execCommand("InsertText", false, 'z');
+ document.execCommand("InsertText", false, ' ');
+
+ window.target = target;
+ shouldBe("target.spellcheck", enabled ? "true" : "false");
+ shouldBe("layoutTestController.hasSpellingMarker(6, 2)", enabled ? "true" : "false");
+}
+
+function createElement(tagName, spellcheck)
+{
+ var target = document.createElement(tagName);
+ if (tagName == "SPAN")
+ target.setAttribute("contentEditable", "true");
+ if (spellcheck)
+ target.setAttribute("spellcheck", spellcheck);
+ return target;
+}
+
+function testFor(tagName, initialAttribute, expectation)
+{
+ var target = createElement(tagName, initialAttribute);
+ parent.appendChild(target);
+
+ testSpellCheckingEnabled(target, expectation);
+ parent.innerHTML = "";
+}
+
+// default -> true
+testFor("SPAN", undefined, true);
+// default -> false
+testFor("SPAN", undefined, false);
+// true -> true
+testFor("SPAN", true, true);
+// true -> false
+testFor("SPAN", true, false);
+// false -> true
+testFor("SPAN", false, true);
+// false -> false
+testFor("SPAN", false, false);
+
+// default -> true
+testFor("INPUT", undefined, true);
+// default -> false
+testFor("INPUT", undefined, false);
+// true -> true
+testFor("INPUT", true, true);
+// true -> false
+testFor("INPUT", true, false);
+// false -> true
+testFor("INPUT", false, true);
+// false -> false
+testFor("INPUT", false, false);
+
+// default -> true
+testFor("TEXTAREA", undefined, true);
+// default -> false
+testFor("TEXTAREA", undefined, false);
+// true -> true
+testFor("TEXTAREA", true, true);
+// true -> false
+testFor("TEXTAREA", true, false);
+// false -> true
+testFor("TEXTAREA", false, true);
+// false -> false
+testFor("TEXTAREA", false, false);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/editing/spelling/spelling-attribute-change-expected.txt b/LayoutTests/editing/spelling/spelling-attribute-change-expected.txt
new file mode 100644
index 0000000..f26f4f2
--- /dev/null
+++ b/LayoutTests/editing/spelling/spelling-attribute-change-expected.txt
@@ -0,0 +1,45 @@
+Tests if the spellchecker behavior change after the spellcheck attribute changed by the script.
+
+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 target.spellcheck is false
+PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS target.spellcheck is true
+PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS target.spellcheck is false
+PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS target.spellcheck is true
+PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS target.spellcheck is false
+PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS target.spellcheck is true
+PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS target.spellcheck is false
+PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS target.spellcheck is true
+PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS target.spellcheck is false
+PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS target.spellcheck is true
+PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS target.spellcheck is false
+PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS target.spellcheck is true
+PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS target.spellcheck is false
+PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS target.spellcheck is true
+PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS target.spellcheck is false
+PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS target.spellcheck is true
+PASS layoutTestController.hasSpellingMarker(6, 2) is true
+PASS target.spellcheck is false
+PASS layoutTestController.hasSpellingMarker(6, 2) is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/editing/spelling/spelling-attribute-change.html b/LayoutTests/editing/spelling/spelling-attribute-change.html
new file mode 100644
index 0000000..4094e06
--- /dev/null
+++ b/LayoutTests/editing/spelling/spelling-attribute-change.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="resources/js-test-selection-shared.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/spelling-attribute-change.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/HTMLElement/script-tests/spellcheck.js b/LayoutTests/fast/dom/HTMLElement/script-tests/spellcheck.js
new file mode 100644
index 0000000..048963a
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLElement/script-tests/spellcheck.js
@@ -0,0 +1,103 @@
+description('Tests the spellcheck attribute.');
+
+var parent = document.createElement("div");
+document.body.appendChild(parent);
+
+function testFor(initialAttribute, initialExpectation, setValue, lastExpectation, lastAttributeExpectation)
+{
+ var target = document.createElement("span");
+ parent.appendChild(target);
+
+ window.target = target;
+ window.initialExpectation = initialExpectation;
+ window.lastExpectation = lastExpectation;
+ window.lastAttributeExpectation = lastAttributeExpectation;
+
+ if (undefined !== initialAttribute)
+ target.setAttribute("spellcheck", initialAttribute);
+ shouldBe("target.spellcheck", "initialExpectation");
+
+ if (undefined !== setValue)
+ target.spellcheck = setValue;
+ shouldBe("target.spellcheck", "lastExpectation");
+ shouldBe("target.getAttribute('spellcheck')", "lastAttributeExpectation");
+
+ parent.removeChild(target);
+}
+
+function testUsingSetAttributes()
+{
+ var target = document.createElement("span");
+ parent.appendChild(target);
+ window.target = target;
+
+ shouldBe("target.spellcheck", "true");
+ shouldBe("target.getAttribute('spellcheck')", "'true'");
+ // Set using property.
+ target.spellcheck = false;
+ shouldBe("target.spellcheck", "false");
+ shouldBe("target.getAttribute('spellcheck')", "'false'");
+ // Set using setAttribute().
+ target.setAttribute("spellcheck", "true");
+ shouldBe("target.spellcheck", "true");
+ shouldBe("target.getAttribute('spellcheck')", "'true'");
+
+ // Set using setAttribute(), valid but non canonical value.
+ target.spellcheck = false; // clear at first
+ target.setAttribute("spellcheck", "TRUE");
+ shouldBe("target.spellcheck", "true");
+ shouldBe("target.getAttribute('spellcheck')", "'TRUE'");
+ // Set using setAttribute(), invalid value.
+ target.spellcheck = false; // clear at first
+ target.setAttribute("spellcheck", "INVALID");
+ shouldBe("target.spellcheck", "true");
+ shouldBe("target.getAttribute('spellcheck')", "'INVALID'");
+
+ parent.removeChild(target);
+}
+
+testFor(undefined, true, undefined, true, null);
+testFor(undefined, true, false, false, "false");
+testFor(undefined, true, true, true, "true");
+testFor(undefined, true, 0, false, "false"); // 0 will be coerced to false
+testFor(undefined, true, 1, true, "true"); // 0 will be coerced to true
+testFor(undefined, true, "invalid", true, "true"); // string will be coerced to true
+testFor(undefined, true, "false", true, "true"); // ...even if the string is "false" (as Firefox does).
+
+testFor("true", true, undefined, true, "true");
+testFor("true", true, false, false, "false");
+testFor("true", true, true, true, "true");
+testFor("true", true, 0, false, "false");
+testFor("true", true, 1, true, "true");
+testFor("true", true, "invalid", true, "true");
+testFor("true", true, "false", true, "true");
+
+testFor("false", false, undefined, false, "false");
+testFor("false", false, false, false, "false");
+testFor("false", false, true, true, "true");
+testFor("false", false, 0, false, "false");
+testFor("false", false, 1, true, "true");
+testFor("false", false, "invalid", true, "true");
+testFor("false", false, "false", true, "true");
+
+// various initial values
+testFor("", true, undefined, true, "");
+testFor("", true, 1, true, "true");
+testFor("TRUE", true, undefined, true, "TRUE");
+testFor("TRUE", true, 1, true, "true");
+testFor("FALSE", false, undefined, false, "FALSE");
+testFor("FALSE", false, 0, false, "false");
+testFor("invalid", true, undefined, true, "invalid");
+testFor("invalid", true, 1, true, "true");
+testFor("false ", true, undefined, true, "false ");
+testFor("false ", true, 1, true, "true");
+testFor("false ", true, 0, false, "false");
+testFor("0", true, undefined, true, "0");
+testFor("0", true, 0, false, "false");
+testFor("1", true, undefined, true, "1");
+testFor("1", true, 0, false, "false");
+
+testUsingSetAttributes();
+
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/HTMLElement/spellcheck-expected.txt b/LayoutTests/fast/dom/HTMLElement/spellcheck-expected.txt
new file mode 100644
index 0000000..766fae4
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLElement/spellcheck-expected.txt
@@ -0,0 +1,127 @@
+Tests the spellcheck attribute.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is initialExpectation
+PASS target.spellcheck is lastExpectation
+PASS target.getAttribute('spellcheck') is lastAttributeExpectation
+PASS target.spellcheck is true
+FAIL target.getAttribute('spellcheck') should be true (of type string). Was null (of type object).
+PASS target.spellcheck is false
+PASS target.getAttribute('spellcheck') is 'false'
+PASS target.spellcheck is true
+PASS target.getAttribute('spellcheck') is 'true'
+PASS target.spellcheck is true
+PASS target.getAttribute('spellcheck') is 'TRUE'
+PASS target.spellcheck is true
+PASS target.getAttribute('spellcheck') is 'INVALID'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/HTMLElement/spellcheck.html b/LayoutTests/fast/dom/HTMLElement/spellcheck.html
new file mode 100644
index 0000000..7dae759
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLElement/spellcheck.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/spellcheck.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index ec64adf..e9e1f81 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -690,6 +690,7 @@ BUG23497 MAC : editing/selection/unrendered-002.html = IMAGE
BUG11577 WIN LINUX : editing/spelling/inline_spelling_markers.html = FAIL
BUG11577 WIN LINUX : editing/spelling/spellcheck-attribute.html = FAIL
BUG11577 WIN LINUX : editing/spelling/spelling-linebreak.html = FAIL
+BUG11577 WIN LINUX : editing/spelling/spelling-attribute-change.html = FAIL
// TODO(erg): Attempted to rebaseline these tests as part of the above
// 43346:43361 rebaseling from http://trac.webkit.org/changeset/43355. Turned
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 62c295c..8fd020f 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -981,6 +981,7 @@ editing/spelling/spelling-contenteditable.html
editing/spelling/spelling-textarea.html
editing/spelling/spelling-backspace-between-lines.html
editing/spelling/spelling-linebreak.html
+editing/spelling/spelling-attribute-change.html
editing/style/5065910.html
editing/style/apple-style-editable-mix.html
editing/style/block-style-001.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 4ab19b1..fe5bd46 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -2245,6 +2245,8 @@ editing/spelling/spelling-textarea.html
# https://bugs.webkit.org/show_bug.cgi?id=45435
editing/spelling/spelling-backspace-between-lines.html
+editing/spelling/spelling-attribute-change.html
+
# ============================================================================= #
# failing editing/style tests
# ============================================================================= #
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 489569f..894b832 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-10-27 MORITA Hajime <morrita at google.com>
+
+ Reviewed by Kent Tamura.
+
+ WebKit needs to expose an Element::spellcheck attribute to javascript.
+ https://bugs.webkit.org/show_bug.cgi?id=25536
+
+ Published Element.spellcheck property on IDL, implemented it.
+
+ Tests: editing/spelling/spelling-attribute-change.html
+ fast/dom/HTMLElement/spellcheck.html
+
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::spellcheck):
+ (WebCore::HTMLElement::setSpellcheck):
+ * html/HTMLElement.h:
+ * html/HTMLElement.idl:
+
2010-10-27 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/html/HTMLElement.cpp b/WebCore/html/HTMLElement.cpp
index 1483fbc..bc4bf07 100644
--- a/WebCore/html/HTMLElement.cpp
+++ b/WebCore/html/HTMLElement.cpp
@@ -725,6 +725,17 @@ void HTMLElement::setDraggable(bool value)
setAttribute(draggableAttr, value ? "true" : "false");
}
+bool HTMLElement::spellcheck() const
+{
+ return isSpellCheckingEnabled();
+}
+
+void HTMLElement::setSpellcheck(bool enable)
+{
+ setAttribute(spellcheckAttr, enable ? "true" : "false");
+}
+
+
void HTMLElement::click()
{
dispatchSimulatedClick(0, false, false);
diff --git a/WebCore/html/HTMLElement.h b/WebCore/html/HTMLElement.h
index 52e9ecf..1660e2a 100644
--- a/WebCore/html/HTMLElement.h
+++ b/WebCore/html/HTMLElement.h
@@ -66,6 +66,9 @@ public:
virtual bool draggable() const;
void setDraggable(bool);
+ bool spellcheck() const;
+ void setSpellcheck(bool);
+
void click();
virtual void accessKeyAction(bool sendToAnyElement);
diff --git a/WebCore/html/HTMLElement.idl b/WebCore/html/HTMLElement.idl
index b127c51..77423fc 100644
--- a/WebCore/html/HTMLElement.idl
+++ b/WebCore/html/HTMLElement.idl
@@ -62,6 +62,8 @@ module html {
attribute [ConvertNullToNullString] DOMString contentEditable;
readonly attribute boolean isContentEditable;
+ attribute boolean spellcheck;
+
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
readonly attribute DOMString titleDisplayString;
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list