diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
commit | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch) | |
tree | 52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/WebCore/html/HTMLTextAreaElement.cpp | |
parent | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff) | |
download | qtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz |
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/WebCore/html/HTMLTextAreaElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLTextAreaElement.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/WebCore/html/HTMLTextAreaElement.cpp b/Source/WebCore/html/HTMLTextAreaElement.cpp index b5ac63390..bff7574be 100644 --- a/Source/WebCore/html/HTMLTextAreaElement.cpp +++ b/Source/WebCore/html/HTMLTextAreaElement.cpp @@ -84,8 +84,9 @@ PassRefPtr<HTMLTextAreaElement> HTMLTextAreaElement::create(const QualifiedName& void HTMLTextAreaElement::createShadowSubtree() { - ExceptionCode ec = 0; - ensureShadowRoot()->appendChild(TextControlInnerTextElement::create(document()), ec); + ASSERT(!shadowRoot()); + RefPtr<ShadowRoot> root = ShadowRoot::create(this, ShadowRoot::CreatingUserAgentShadowRoot); + root->appendChild(TextControlInnerTextElement::create(document()), ASSERT_NO_EXCEPTION); } const AtomicString& HTMLTextAreaElement::formControlType() const @@ -117,7 +118,7 @@ void HTMLTextAreaElement::childrenChanged(bool changedByParser, Node* beforeChan HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); } -void HTMLTextAreaElement::parseMappedAttribute(Attribute* attr) +void HTMLTextAreaElement::parseAttribute(Attribute* attr) { if (attr->name() == rowsAttr) { int rows = attr->value().toInt(); @@ -151,11 +152,11 @@ void HTMLTextAreaElement::parseMappedAttribute(Attribute* attr) m_wrap = wrap; if (shouldWrapText()) { - addCSSProperty(attr, CSSPropertyWhiteSpace, CSSValuePreWrap); - addCSSProperty(attr, CSSPropertyWordWrap, CSSValueBreakWord); + addCSSProperty(CSSPropertyWhiteSpace, CSSValuePreWrap); + addCSSProperty(CSSPropertyWordWrap, CSSValueBreakWord); } else { - addCSSProperty(attr, CSSPropertyWhiteSpace, CSSValuePre); - addCSSProperty(attr, CSSPropertyWordWrap, CSSValueNormal); + addCSSProperty(CSSPropertyWhiteSpace, CSSValuePre); + addCSSProperty(CSSPropertyWordWrap, CSSValueNormal); } if (renderer()) @@ -169,7 +170,7 @@ void HTMLTextAreaElement::parseMappedAttribute(Attribute* attr) } else if (attr->name() == maxlengthAttr) setNeedsValidityCheck(); else - HTMLTextFormControlElement::parseMappedAttribute(attr); + HTMLTextFormControlElement::parseAttribute(attr); } RenderObject* HTMLTextAreaElement::createRenderer(RenderArena* arena, RenderStyle*) |