[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 14:57:28 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f0e23a6688466051ac2e828d89f76b366735c221
Author: morrita at google.com <morrita at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 26 08:27:23 2010 +0000
2010-10-26 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r70512.
http://trac.webkit.org/changeset/70512
https://bugs.webkit.org/show_bug.cgi?id=48314
crashes many tests (Requested by inferno-sec on #webkit).
* editing/spelling/spellcheck-attribute-expected.txt:
* editing/spelling/spellcheck-attribute.html:
2010-10-26 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r70512.
http://trac.webkit.org/changeset/70512
https://bugs.webkit.org/show_bug.cgi?id=48314
crashes many tests (Requested by inferno-sec on #webkit).
* dom/Element.cpp:
* dom/Element.h:
* editing/Editor.cpp:
(WebCore::markMisspellingsOrBadGrammar):
(WebCore::Editor::spellCheckingEnabledInFocusedNode):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
* editing/Editor.h:
* platform/ContextMenu.cpp:
(WebCore::ContextMenu::populate):
2010-10-26 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r70512.
http://trac.webkit.org/changeset/70512
https://bugs.webkit.org/show_bug.cgi?id=48314
crashes many tests (Requested by inferno-sec on #webkit).
* src/ContextMenuClientImpl.cpp:
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
* src/EditorClientImpl.cpp:
(WebKit::EditorClientImpl::shouldSpellcheckByDefault):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d31210c..73edd7c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-26 Sheriff Bot <webkit.review.bot at gmail.com>
+
+ Unreviewed, rolling out r70512.
+ http://trac.webkit.org/changeset/70512
+ https://bugs.webkit.org/show_bug.cgi?id=48314
+
+ crashes many tests (Requested by inferno-sec on #webkit).
+
+ * editing/spelling/spellcheck-attribute-expected.txt:
+ * editing/spelling/spellcheck-attribute.html:
+
2010-10-22 MORITA Hajime <morrita at google.com>
Reviewed by Tony Chang.
diff --git a/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt b/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt
index 4fa331d..e90ec60 100644
--- a/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt
+++ b/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt
@@ -3,13 +3,7 @@ This tests if the "spellcheck" attribute is implemented as written in its specif
PASS:test1_1
PASS:test1_2
PASS:test1_3
-PASS:test1_4
-PASS:test1_5
-PASS:test1_6
PASS:test2_1
PASS:test2_2
PASS:test2_3
-PASS:test2_4
-PASS:test2_5
-PASS:test2_6
diff --git a/LayoutTests/editing/spelling/spellcheck-attribute.html b/LayoutTests/editing/spelling/spellcheck-attribute.html
index 0e5a07e..70348c6 100644
--- a/LayoutTests/editing/spelling/spellcheck-attribute.html
+++ b/LayoutTests/editing/spelling/spellcheck-attribute.html
@@ -10,17 +10,11 @@
<label>1.1.</label><input id="test1_1" type="text"></input><br/>
<label>1.2.</label><input id="test1_2" type="text" spellcheck="true"></input><br/>
<label>1.3.</label><input id="test1_3" type="text" spellcheck="false"></input><br/>
-<label>1.4.</label><input id="test1_4" type="text" spellcheck="InvalidValue"></input><br/>
-<label>1.5.</label><input id="test1_5" type="text" spellcheck></input><br/>
-<label>1.6.</label><input id="test1_6" type="text"></input><br/>
</div>
<div spellcheck="false">
<label>2.1.</label><input id="test2_1" type="text"></input><br/>
<label>2.2.</label><input id="test2_2" type="text" spellcheck="true"></input><br/>
<label>2.3.</label><input id="test2_3" type="text" spellcheck="false"></input><br/>
-<label>2.4.</label><input id="test2_4" type="text" spellcheck="InvalidValue"></input><br/>
-<label>2.5.</label><input id="test2_5" type="text" spellcheck></input><br/>
-<label>2.6.</label><input id="test2_6" type="text"></input><br/>
</div>
</div>
<pre id="console"></pre>
@@ -43,15 +37,9 @@ function testTypingInvalidWord(id, shouldBeMarked) {
testTypingInvalidWord('test1_1', true);
testTypingInvalidWord('test1_2', true);
testTypingInvalidWord('test1_3', false);
-testTypingInvalidWord('test1_4', true);
-testTypingInvalidWord('test1_5', true);
-testTypingInvalidWord('test1_6', true);
testTypingInvalidWord('test2_1', false);
testTypingInvalidWord('test2_2', true);
testTypingInvalidWord('test2_3', false);
-testTypingInvalidWord('test2_4', false);
-testTypingInvalidWord('test2_5', true);
-testTypingInvalidWord('test2_6', false);
if (window.layoutTestController) {
layoutTestController.dumpAsText();
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8e4bfe8..e310dd0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-10-26 Sheriff Bot <webkit.review.bot at gmail.com>
+
+ Unreviewed, rolling out r70512.
+ http://trac.webkit.org/changeset/70512
+ https://bugs.webkit.org/show_bug.cgi?id=48314
+
+ crashes many tests (Requested by inferno-sec on #webkit).
+
+ * dom/Element.cpp:
+ * dom/Element.h:
+ * editing/Editor.cpp:
+ (WebCore::markMisspellingsOrBadGrammar):
+ (WebCore::Editor::spellCheckingEnabledInFocusedNode):
+ (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
+ * editing/Editor.h:
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::populate):
+
2010-10-24 MORITA Hajime <morrita at google.com>
Reviewed by Tony Chang.
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index 4c352c0..f3d388e 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -1708,37 +1708,4 @@ void Element::webkitRequestFullScreen(unsigned short flags)
}
#endif
-SpellcheckAttributeState Element::spellcheckAttributeState() const
-{
- if (!hasAttribute(HTMLNames::spellcheckAttr))
- return SpellcheckAttributeDefault;
-
- const AtomicString& value = getAttribute(HTMLNames::spellcheckAttr);
- if (equalIgnoringCase(value, "true") || equalIgnoringCase(value, ""))
- return SpellcheckAttributeTrue;
- if (equalIgnoringCase(value, "false"))
- return SpellcheckAttributeFalse;
-
- return SpellcheckAttributeDefault;
-}
-
-bool Element::isSpellCheckingEnabled() const
-{
- const Element* element = this;
- while (element) {
- switch (element->spellcheckAttributeState()) {
- case SpellcheckAttributeTrue:
- return true;
- case SpellcheckAttributeFalse:
- return false;
- case SpellcheckAttributeDefault:
- break;
- }
-
- element = element->parentElement();
- }
-
- return true;
-}
-
} // namespace WebCore
diff --git a/WebCore/dom/Element.h b/WebCore/dom/Element.h
index 67887cc..f5f170a 100644
--- a/WebCore/dom/Element.h
+++ b/WebCore/dom/Element.h
@@ -40,12 +40,6 @@ class DOMTokenList;
class ElementRareData;
class IntSize;
-enum SpellcheckAttributeState {
- SpellcheckAttributeTrue,
- SpellcheckAttributeFalse,
- SpellcheckAttributeDefault
-};
-
class Element : public ContainerNode {
public:
static PassRefPtr<Element> create(const QualifiedName&, Document*);
@@ -326,8 +320,6 @@ public:
void webkitRequestFullScreen(unsigned short flags);
#endif
- bool isSpellCheckingEnabled() const;
-
protected:
Element(const QualifiedName& tagName, Document* document, ConstructionType type)
: ContainerNode(document, type)
@@ -383,9 +375,7 @@ private:
ElementRareData* rareData() const;
ElementRareData* ensureRareData();
-
- SpellcheckAttributeState spellcheckAttributeState() const;
-
+
private:
mutable RefPtr<NamedNodeMap> m_attributeMap;
};
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 3bd4357..4d6d258 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -2524,7 +2524,7 @@ static void markMisspellingsOrBadGrammar(Editor* editor, const VisibleSelection&
if (!editableNode || !editableNode->isContentEditable())
return;
- if (!editor->isSpellCheckingEnabledInFocusedNode())
+ if (!editor->spellCheckingEnabledInFocusedNode())
return;
// Get the spell checker if it is available
@@ -2543,15 +2543,22 @@ static void markMisspellingsOrBadGrammar(Editor* editor, const VisibleSelection&
}
}
-bool Editor::isSpellCheckingEnabledInFocusedNode() const
+bool Editor::spellCheckingEnabledInFocusedNode() const
{
// Ascend the DOM tree to find a "spellcheck" attribute.
// When we find a "spellcheck" attribute, retrieve its value and return false if its value is "false".
const Node* node = frame()->document()->focusedNode();
- const Element* focusedElement = node->isElementNode() ? toElement(node) : node->parentElement();
- if (!focusedElement)
- return false;
- return focusedElement->isSpellCheckingEnabled();
+ while (node) {
+ if (node->isElementNode()) {
+ const WTF::AtomicString& value = static_cast<const Element*>(node)->getAttribute(spellcheckAttr);
+ if (equalIgnoringCase(value, "true"))
+ return true;
+ if (equalIgnoringCase(value, "false"))
+ return false;
+ }
+ node = node->parent();
+ }
+ return true;
}
void Editor::markMisspellings(const VisibleSelection& selection, RefPtr<Range>& firstMisspellingRange)
@@ -2596,7 +2603,7 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(TextCheckingOptions textCh
if (!editableNode || !editableNode->isContentEditable())
return;
- if (!isSpellCheckingEnabledInFocusedNode())
+ if (!spellCheckingEnabledInFocusedNode())
return;
// Expand the range to encompass entire paragraphs, since text checking needs that much context.
diff --git a/WebCore/editing/Editor.h b/WebCore/editing/Editor.h
index 0ad4737..df2e947 100644
--- a/WebCore/editing/Editor.h
+++ b/WebCore/editing/Editor.h
@@ -207,7 +207,7 @@ public:
Vector<String> guessesForMisspelledSelection();
Vector<String> guessesForUngrammaticalSelection();
Vector<String> guessesForMisspelledOrUngrammaticalSelection(bool& misspelled, bool& ungrammatical);
- bool isSpellCheckingEnabledInFocusedNode() const;
+ bool spellCheckingEnabledInFocusedNode() const;
void markMisspellingsAfterTypingToPosition(const VisiblePosition&);
void markMisspellings(const VisibleSelection&, RefPtr<Range>& firstMisspellingRange);
void markBadGrammar(const VisibleSelection&);
diff --git a/WebCore/platform/ContextMenu.cpp b/WebCore/platform/ContextMenu.cpp
index 369f9ce..ca1f719 100644
--- a/WebCore/platform/ContextMenu.cpp
+++ b/WebCore/platform/ContextMenu.cpp
@@ -428,7 +428,7 @@ void ContextMenu::populate()
} else { // Make an editing context menu
SelectionController* selection = frame->selection();
bool inPasswordField = selection->isInPasswordField();
- bool spellCheckingEnabled = frame->editor()->isSpellCheckingEnabledInFocusedNode();
+ bool spellCheckingEnabled = frame->editor()->spellCheckingEnabledInFocusedNode();
if (!inPasswordField && spellCheckingEnabled) {
// Consider adding spelling-related or grammar-related context menu items (never both, since a single selected range
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 60b61a3..8367446 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-26 Sheriff Bot <webkit.review.bot at gmail.com>
+
+ Unreviewed, rolling out r70512.
+ http://trac.webkit.org/changeset/70512
+ https://bugs.webkit.org/show_bug.cgi?id=48314
+
+ crashes many tests (Requested by inferno-sec on #webkit).
+
+ * src/ContextMenuClientImpl.cpp:
+ (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+ * src/EditorClientImpl.cpp:
+ (WebKit::EditorClientImpl::shouldSpellcheckByDefault):
+
2010-10-25 MORITA Hajime <morrita at google.com>
Reviewed by Tony Chang.
diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp
index d33a06b..d9ccb17 100644
--- a/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -241,7 +241,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
if (m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled()) {
data.isSpellCheckingEnabled = true;
// Spellchecking might be enabled for the field, but could be disabled on the node.
- if (m_webView->focusedWebCoreFrame()->editor()->isSpellCheckingEnabledInFocusedNode())
+ if (m_webView->focusedWebCoreFrame()->editor()->spellCheckingEnabledInFocusedNode())
data.misspelledWord = selectMisspelledWord(defaultMenu, selectedFrame);
}
}
diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp
index bc1d206..11977b6 100644
--- a/WebKit/chromium/src/EditorClientImpl.cpp
+++ b/WebKit/chromium/src/EditorClientImpl.cpp
@@ -124,7 +124,7 @@ bool EditorClientImpl::shouldSpellcheckByDefault()
const Editor* editor = frame->editor();
if (!editor)
return false;
- if (editor->isSpellCheckingEnabledInFocusedNode())
+ if (editor->spellCheckingEnabledInFocusedNode())
return true;
const Document* document = frame->document();
if (!document)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list