summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLTextAreaElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/HTMLTextAreaElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLTextAreaElement.cpp36
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*)