summaryrefslogtreecommitdiff
path: root/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
commit5ef7c8a6a70875d4430752d146bdcb069605d71d (patch)
treef6256640b6c46d7da221435803cae65326817ba2 /Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
parentdecad929f578d8db641febc8740649ca6c574638 (diff)
downloadqtwebkit-5ef7c8a6a70875d4430752d146bdcb069605d71d.tar.gz
Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147)
New snapshot including various build fixes for newer Qt 5
Diffstat (limited to 'Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp')
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
index 99411f01f..4b0ffbc52 100644
--- a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
@@ -198,6 +198,11 @@ AttributeState elementSupportsAutocomplete(const Element* element)
return elementAttributeState(element, HTMLNames::autocompleteAttr);
}
+AttributeState elementSupportsSpellCheck(const Element* element)
+{
+ return elementAttributeState(element, HTMLNames::spellcheckAttr);
+}
+
AttributeState elementAttributeState(const Element* element, const QualifiedName& attributeName)
{
// First we check the input item itself. If the attribute is not defined,
@@ -231,10 +236,7 @@ bool isTextBasedContentEditableElement(Element* element)
if (!element)
return false;
- if (element->isTextFormControl() && static_cast<HTMLTextFormControlElement*>(element)->readOnly())
- return false;
-
- if (!element->isEnabledFormControl())
+ if (element->isReadOnlyFormControl() || !element->isEnabledFormControl())
return false;
if (isPopupInputField(element))
@@ -427,7 +429,7 @@ bool elementPatternMatches(const char* pattern, const HTMLInputElement* inputEle
return true;
// Is the regex specifying a character count?
- if (patternAttribute[patternString.length()] != '{' || !patternAttribute.endsWith('}'))
+ if (patternAttribute[patternString.length()] != '{' || !patternAttribute.endsWith("}"))
return false;
// Make sure the number in the regex is actually a number.