[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
rniwa at webkit.org
rniwa at webkit.org
Wed Dec 22 14:29:08 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 6495d70336b45ecbfb640b09e12c66d239bba0b7
Author: rniwa at webkit.org <rniwa at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 11 18:12:33 2010 +0000
2010-10-11 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Darin Adler.
spellcheck="false" not respected in designMode
https://bugs.webkit.org/show_bug.cgi?id=39978
The bug was caused by WebKit's setting focus to html element rather than body element in design mode.
Because we disable spell-check only if ancestor nodes of the focused element had spellcheck=false,
this caused us to ignore body element's spellcheck attribute.
Fixed the bug by overriding supportsFocus in HTMLBodyElement to make body element focusable
when the parent node of body elements (namely html element) is editable.
Test: editing/spelling/design-mode-spellcheck-off.html
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::supportsFocus): Added.
* html/HTMLBodyElement.h:
2010-10-11 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Darin Adler.
spellcheck="false" not respected in designMode
https://bugs.webkit.org/show_bug.cgi?id=39978
Added a test to ensure Webkit respects spellcheck=off on body element.
Rebaselined are due to our setting the focus to body element rather than html element in design mode.
* editing/spelling/design-mode-spellcheck-off-expected.txt: Added.
* editing/spelling/design-mode-spellcheck-off.html: Added.
* editing/inserting/space-after-removeformat-expected.txt: Editing delegates change due to focus moving to body.
* platform/chromium-win/editing/inserting/editable-html-element-expected.txt: Ditto.
* platform/chromium-win/editing/selection/editable-html-element-expected.txt: Ditto.
* platform/chromium-win/editing/selection/editable-links-expected.txt: Ditto.
* platform/chromium-win/editing/selection/focus_editable_html-expected.txt: Ditto.
* platform/chromium-win/editing/style/designmode-expected.txt: Ditto.
* platform/mac/editing/inserting/editable-html-element-expected.txt: Ditto.
* platform/mac/editing/selection/designmode-no-caret-expected.txt: Ditto.
* platform/mac/editing/selection/editable-html-element-expected.txt: Ditto.
* platform/mac/editing/selection/editable-links-expected.txt: Ditto.
* platform/mac/editing/selection/focus_editable_html-expected.txt: Ditto.
* platform/mac/editing/style/designmode-expected.txt: Ditto.
* platform/qt/editing/inserting/editable-html-element-expected.txt: Ditto.
* platform/qt/editing/selection/editable-html-element-expected.txt: Ditto.
* platform/qt/editing/selection/focus_editable_html-expected.txt: Ditto.
* platform/qt/editing/style/designmode-expected.txt: Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e98b314..e06e55d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,32 @@
+2010-10-11 Ryosuke Niwa <rniwa at webkit.org>
+
+ Reviewed by Darin Adler.
+
+ spellcheck="false" not respected in designMode
+ https://bugs.webkit.org/show_bug.cgi?id=39978
+
+ Added a test to ensure Webkit respects spellcheck=off on body element.
+ Rebaselined are due to our setting the focus to body element rather than html element in design mode.
+
+ * editing/spelling/design-mode-spellcheck-off-expected.txt: Added.
+ * editing/spelling/design-mode-spellcheck-off.html: Added.
+ * editing/inserting/space-after-removeformat-expected.txt: Editing delegates change due to focus moving to body.
+ * platform/chromium-win/editing/inserting/editable-html-element-expected.txt: Ditto.
+ * platform/chromium-win/editing/selection/editable-html-element-expected.txt: Ditto.
+ * platform/chromium-win/editing/selection/editable-links-expected.txt: Ditto.
+ * platform/chromium-win/editing/selection/focus_editable_html-expected.txt: Ditto.
+ * platform/chromium-win/editing/style/designmode-expected.txt: Ditto.
+ * platform/mac/editing/inserting/editable-html-element-expected.txt: Ditto.
+ * platform/mac/editing/selection/designmode-no-caret-expected.txt: Ditto.
+ * platform/mac/editing/selection/editable-html-element-expected.txt: Ditto.
+ * platform/mac/editing/selection/editable-links-expected.txt: Ditto.
+ * platform/mac/editing/selection/focus_editable_html-expected.txt: Ditto.
+ * platform/mac/editing/style/designmode-expected.txt: Ditto.
+ * platform/qt/editing/inserting/editable-html-element-expected.txt: Ditto.
+ * platform/qt/editing/selection/editable-html-element-expected.txt: Ditto.
+ * platform/qt/editing/selection/focus_editable_html-expected.txt: Ditto.
+ * platform/qt/editing/style/designmode-expected.txt: Ditto.
+
2010-10-11 Martin Robinson <mrobinson at igalia.com>
Reviewed by Xan Lopez.
diff --git a/LayoutTests/editing/inserting/space-after-removeformat-expected.txt b/LayoutTests/editing/inserting/space-after-removeformat-expected.txt
index e79081b..2c85269 100644
--- a/LayoutTests/editing/inserting/space-after-removeformat-expected.txt
+++ b/LayoutTests/editing/inserting/space-after-removeformat-expected.txt
@@ -1,7 +1,7 @@
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 9 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
diff --git a/LayoutTests/editing/spelling/design-mode-spellcheck-off-expected.txt b/LayoutTests/editing/spelling/design-mode-spellcheck-off-expected.txt
new file mode 100644
index 0000000..aaa2a83
--- /dev/null
+++ b/LayoutTests/editing/spelling/design-mode-spellcheck-off-expected.txt
@@ -0,0 +1,4 @@
+asdf is misspelled.
+To test this manually, click "asdf" above. There should be no spelling marker for "asdf" after the click.
+
+PASS
diff --git a/LayoutTests/editing/spelling/design-mode-spellcheck-off.html b/LayoutTests/editing/spelling/design-mode-spellcheck-off.html
new file mode 100644
index 0000000..0b5ad28
--- /dev/null
+++ b/LayoutTests/editing/spelling/design-mode-spellcheck-off.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<body spellcheck="false">
+asdf is misspelled.
+<p>To test this manually, click "asdf" above. There should be no spelling marker for "asdf" after the click.</p>
+<script>
+
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+document.designMode = "on";
+
+if (document.activeElement != document.body)
+ document.body.appendChild(document.createTextNode('FAIL: active element before click is not body element'));
+else if (window.layoutTestController && window.eventSender) {
+ layoutTestController.waitUntilDone();
+
+ 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 (textInputController && textInputController.hasSpellingMarker && textInputController.hasSpellingMarker(0, 4))
+ document.body.appendChild(document.createTextNode('FAIL: spell check was invoked'));
+ else
+ document.body.appendChild(document.createTextNode('PASS'));
+ layoutTestController.notifyDone();
+ });
+
+ var x = document.body.offsetLeft + 10;
+ var y = document.body.offsetTop + 10;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ setTimeout("layoutTestController.notifyDone();document.body.appendChild(document.createTextNode('FAIL: timeout'));", 500);
+} else
+ document.body.appendChild(document.createTextNode('PASS'));
+
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/chromium-win/editing/inserting/editable-html-element-expected.txt b/LayoutTests/platform/chromium-win/editing/inserting/editable-html-element-expected.txt
index 07f83cb..e445350 100644
--- a/LayoutTests/platform/chromium-win/editing/inserting/editable-html-element-expected.txt
+++ b/LayoutTests/platform/chromium-win/editing/inserting/editable-html-element-expected.txt
@@ -1,4 +1,4 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 1 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 259 of #text > BODY > HTML > #document to 259 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/chromium-win/editing/selection/editable-html-element-expected.txt b/LayoutTests/platform/chromium-win/editing/selection/editable-html-element-expected.txt
index 9972b34..e3666bf 100644
--- a/LayoutTests/platform/chromium-win/editing/selection/editable-html-element-expected.txt
+++ b/LayoutTests/platform/chromium-win/editing/selection/editable-html-element-expected.txt
@@ -1,6 +1,10 @@
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 1 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > BODY > HTML > #document to 1 of #text > SPAN > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/chromium-win/editing/selection/editable-links-expected.txt b/LayoutTests/platform/chromium-win/editing/selection/editable-links-expected.txt
index e7c27e9..f892f26 100644
--- a/LayoutTests/platform/chromium-win/editing/selection/editable-links-expected.txt
+++ b/LayoutTests/platform/chromium-win/editing/selection/editable-links-expected.txt
@@ -1,4 +1,4 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 5 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 6 of #text > A > BODY > HTML > #document to 6 of #text > A > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/chromium-win/editing/selection/focus_editable_html-expected.txt b/LayoutTests/platform/chromium-win/editing/selection/focus_editable_html-expected.txt
index 7e2b0c6..df7d81f 100644
--- a/LayoutTests/platform/chromium-win/editing/selection/focus_editable_html-expected.txt
+++ b/LayoutTests/platform/chromium-win/editing/selection/focus_editable_html-expected.txt
@@ -1,6 +1,10 @@
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 9 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 2008x2096
RenderView at (0,0) size 785x585
diff --git a/LayoutTests/platform/chromium-win/editing/style/designmode-expected.txt b/LayoutTests/platform/chromium-win/editing/style/designmode-expected.txt
index f1163e8..0a0e6eb 100644
--- a/LayoutTests/platform/chromium-win/editing/style/designmode-expected.txt
+++ b/LayoutTests/platform/chromium-win/editing/style/designmode-expected.txt
@@ -1,4 +1,4 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 5 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt b/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt
index 3c618f8..a0af143 100644
--- a/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt
+++ b/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt
@@ -1,4 +1,4 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 1 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 259 of #text > BODY > HTML > #document to 259 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/mac/editing/selection/designmode-no-caret-expected.txt b/LayoutTests/platform/mac/editing/selection/designmode-no-caret-expected.txt
index c4faba2..98cbe77 100644
--- a/LayoutTests/platform/mac/editing/selection/designmode-no-caret-expected.txt
+++ b/LayoutTests/platform/mac/editing/selection/designmode-no-caret-expected.txt
@@ -1,4 +1,4 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 4 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
diff --git a/LayoutTests/platform/mac/editing/selection/editable-html-element-expected.txt b/LayoutTests/platform/mac/editing/selection/editable-html-element-expected.txt
index 1efd4aa..7a03084 100644
--- a/LayoutTests/platform/mac/editing/selection/editable-html-element-expected.txt
+++ b/LayoutTests/platform/mac/editing/selection/editable-html-element-expected.txt
@@ -1,6 +1,10 @@
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 1 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > BODY > HTML > #document to 1 of #text > SPAN > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/mac/editing/selection/editable-links-expected.txt b/LayoutTests/platform/mac/editing/selection/editable-links-expected.txt
index 9fa4c97..d17f26e 100644
--- a/LayoutTests/platform/mac/editing/selection/editable-links-expected.txt
+++ b/LayoutTests/platform/mac/editing/selection/editable-links-expected.txt
@@ -1,4 +1,4 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 5 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 6 of #text > A > BODY > HTML > #document to 6 of #text > A > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/mac/editing/selection/focus_editable_html-expected.txt b/LayoutTests/platform/mac/editing/selection/focus_editable_html-expected.txt
index 7e5897d..ff870a4 100644
--- a/LayoutTests/platform/mac/editing/selection/focus_editable_html-expected.txt
+++ b/LayoutTests/platform/mac/editing/selection/focus_editable_html-expected.txt
@@ -1,6 +1,10 @@
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 9 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 2008x2088
RenderView at (0,0) size 785x585
diff --git a/LayoutTests/platform/mac/editing/style/designmode-expected.txt b/LayoutTests/platform/mac/editing/style/designmode-expected.txt
index b616c14..95f1922 100644
--- a/LayoutTests/platform/mac/editing/style/designmode-expected.txt
+++ b/LayoutTests/platform/mac/editing/style/designmode-expected.txt
@@ -1,4 +1,4 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 5 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/qt/editing/inserting/editable-html-element-expected.txt b/LayoutTests/platform/qt/editing/inserting/editable-html-element-expected.txt
index c9996df..06b5ce5 100644
--- a/LayoutTests/platform/qt/editing/inserting/editable-html-element-expected.txt
+++ b/LayoutTests/platform/qt/editing/inserting/editable-html-element-expected.txt
@@ -1,4 +1,4 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 1 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 259 of #text > BODY > HTML > #document to 259 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/qt/editing/selection/editable-html-element-expected.txt b/LayoutTests/platform/qt/editing/selection/editable-html-element-expected.txt
index 6847f16..d74c514 100644
--- a/LayoutTests/platform/qt/editing/selection/editable-html-element-expected.txt
+++ b/LayoutTests/platform/qt/editing/selection/editable-html-element-expected.txt
@@ -1,6 +1,10 @@
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 1 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > BODY > HTML > #document to 1 of #text > SPAN > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/qt/editing/selection/focus_editable_html-expected.txt b/LayoutTests/platform/qt/editing/selection/focus_editable_html-expected.txt
index 83a1be3..0555766 100644
--- a/LayoutTests/platform/qt/editing/selection/focus_editable_html-expected.txt
+++ b/LayoutTests/platform/qt/editing/selection/focus_editable_html-expected.txt
@@ -1,6 +1,10 @@
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 9 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 2008x2093
RenderView at (0,0) size 800x600
diff --git a/LayoutTests/platform/qt/editing/style/designmode-expected.txt b/LayoutTests/platform/qt/editing/style/designmode-expected.txt
index ba1ea91..389601b 100644
--- a/LayoutTests/platform/qt/editing/style/designmode-expected.txt
+++ b/LayoutTests/platform/qt/editing/style/designmode-expected.txt
@@ -1,4 +1,4 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 5 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4de8459..15b2404 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-10-11 Ryosuke Niwa <rniwa at webkit.org>
+
+ Reviewed by Darin Adler.
+
+ spellcheck="false" not respected in designMode
+ https://bugs.webkit.org/show_bug.cgi?id=39978
+
+ The bug was caused by WebKit's setting focus to html element rather than body element in design mode.
+ Because we disable spell-check only if ancestor nodes of the focused element had spellcheck=false,
+ this caused us to ignore body element's spellcheck attribute.
+
+ Fixed the bug by overriding supportsFocus in HTMLBodyElement to make body element focusable
+ when the parent node of body elements (namely html element) is editable.
+
+ Test: editing/spelling/design-mode-spellcheck-off.html
+
+ * html/HTMLBodyElement.cpp:
+ (WebCore::HTMLBodyElement::supportsFocus): Added.
+ * html/HTMLBodyElement.h:
+
2010-10-11 Oliver Hunt <oliver at apple.com>
Build fix -- I thought i had killed the prior commit in time to have this be part of the commit.
diff --git a/WebCore/html/HTMLBodyElement.cpp b/WebCore/html/HTMLBodyElement.cpp
index 4090566..ac96741 100644
--- a/WebCore/html/HTMLBodyElement.cpp
+++ b/WebCore/html/HTMLBodyElement.cpp
@@ -206,6 +206,11 @@ bool HTMLBodyElement::isURLAttribute(Attribute *attr) const
return attr->name() == backgroundAttr;
}
+bool HTMLBodyElement::supportsFocus() const
+{
+ return isContentEditable() || HTMLElement::supportsFocus();
+}
+
String HTMLBodyElement::aLink() const
{
return getAttribute(alinkAttr);
diff --git a/WebCore/html/HTMLBodyElement.h b/WebCore/html/HTMLBodyElement.h
index d6ef185..df7bfec 100644
--- a/WebCore/html/HTMLBodyElement.h
+++ b/WebCore/html/HTMLBodyElement.h
@@ -77,6 +77,8 @@ private:
void createLinkDecl();
virtual bool isURLAttribute(Attribute*) const;
+
+ virtual bool supportsFocus() const;
virtual int scrollLeft() const;
virtual void setScrollLeft(int scrollLeft);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list