diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:09:45 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:10:13 +0100 |
commit | 470286ecfe79d59df14944e5b5d34630fc739391 (patch) | |
tree | 43983212872e06cebefd2ae474418fa2908ca54c /Source/WebCore/html/HTMLTextAreaElement.cpp | |
parent | 23037105e948c2065da5a937d3a2396b0ff45c1e (diff) | |
download | qtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz |
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/html/HTMLTextAreaElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLTextAreaElement.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/Source/WebCore/html/HTMLTextAreaElement.cpp b/Source/WebCore/html/HTMLTextAreaElement.cpp index c8c2ae972..1632927dc 100644 --- a/Source/WebCore/html/HTMLTextAreaElement.cpp +++ b/Source/WebCore/html/HTMLTextAreaElement.cpp @@ -111,7 +111,7 @@ void HTMLTextAreaElement::createShadowSubtree() const AtomicString& HTMLTextAreaElement::formControlType() const { - DEFINE_STATIC_LOCAL(const AtomicString, textarea, ("textarea")); + DEFINE_STATIC_LOCAL(const AtomicString, textarea, ("textarea", AtomicString::ConstructFromLiteral)); return textarea; } @@ -148,24 +148,24 @@ bool HTMLTextAreaElement::isPresentationAttribute(const QualifiedName& name) con return HTMLTextFormControlElement::isPresentationAttribute(name); } -void HTMLTextAreaElement::collectStyleForAttribute(const Attribute& attribute, StylePropertySet* style) +void HTMLTextAreaElement::collectStyleForPresentationAttribute(const Attribute& attribute, StylePropertySet* style) { if (attribute.name() == wrapAttr) { if (shouldWrapText()) { - addPropertyToAttributeStyle(style, CSSPropertyWhiteSpace, CSSValuePreWrap); - addPropertyToAttributeStyle(style, CSSPropertyWordWrap, CSSValueBreakWord); + addPropertyToPresentationAttributeStyle(style, CSSPropertyWhiteSpace, CSSValuePreWrap); + addPropertyToPresentationAttributeStyle(style, CSSPropertyWordWrap, CSSValueBreakWord); } else { - addPropertyToAttributeStyle(style, CSSPropertyWhiteSpace, CSSValuePre); - addPropertyToAttributeStyle(style, CSSPropertyWordWrap, CSSValueNormal); + addPropertyToPresentationAttributeStyle(style, CSSPropertyWhiteSpace, CSSValuePre); + addPropertyToPresentationAttributeStyle(style, CSSPropertyWordWrap, CSSValueNormal); } } else - HTMLTextFormControlElement::collectStyleForAttribute(attribute, style); + HTMLTextFormControlElement::collectStyleForPresentationAttribute(attribute, style); } -void HTMLTextAreaElement::parseAttribute(const Attribute& attribute) +void HTMLTextAreaElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { - if (attribute.name() == rowsAttr) { - int rows = attribute.value().toInt(); + if (name == rowsAttr) { + int rows = value.toInt(); if (rows <= 0) rows = defaultRows; if (m_rows != rows) { @@ -173,8 +173,8 @@ void HTMLTextAreaElement::parseAttribute(const Attribute& attribute) if (renderer()) renderer()->setNeedsLayoutAndPrefWidthsRecalc(); } - } else if (attribute.name() == colsAttr) { - int cols = attribute.value().toInt(); + } else if (name == colsAttr) { + int cols = value.toInt(); if (cols <= 0) cols = defaultCols; if (m_cols != cols) { @@ -182,13 +182,13 @@ void HTMLTextAreaElement::parseAttribute(const Attribute& attribute) if (renderer()) renderer()->setNeedsLayoutAndPrefWidthsRecalc(); } - } else if (attribute.name() == wrapAttr) { + } else if (name == wrapAttr) { // The virtual/physical values were a Netscape extension of HTML 3.0, now deprecated. // The soft/hard /off values are a recommendation for HTML 4 extension by IE and NS 4. WrapMethod wrap; - if (equalIgnoringCase(attribute.value(), "physical") || equalIgnoringCase(attribute.value(), "hard") || equalIgnoringCase(attribute.value(), "on")) + if (equalIgnoringCase(value, "physical") || equalIgnoringCase(value, "hard") || equalIgnoringCase(value, "on")) wrap = HardWrap; - else if (equalIgnoringCase(attribute.value(), "off")) + else if (equalIgnoringCase(value, "off")) wrap = NoWrap; else wrap = SoftWrap; @@ -197,12 +197,12 @@ void HTMLTextAreaElement::parseAttribute(const Attribute& attribute) if (renderer()) renderer()->setNeedsLayoutAndPrefWidthsRecalc(); } - } else if (attribute.name() == accesskeyAttr) { + } else if (name == accesskeyAttr) { // ignore for the moment - } else if (attribute.name() == maxlengthAttr) + } else if (name == maxlengthAttr) setNeedsValidityCheck(); else - HTMLTextFormControlElement::parseAttribute(attribute); + HTMLTextFormControlElement::parseAttribute(name, value); } RenderObject* HTMLTextAreaElement::createRenderer(RenderArena* arena, RenderStyle*) |