OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 } | 156 } |
157 | 157 |
158 void HTMLTextAreaElement::parseAttribute(const QualifiedName& name, const Atomic
String& oldValue, const AtomicString& value) | 158 void HTMLTextAreaElement::parseAttribute(const QualifiedName& name, const Atomic
String& oldValue, const AtomicString& value) |
159 { | 159 { |
160 if (name == rowsAttr) { | 160 if (name == rowsAttr) { |
161 unsigned rows = 0; | 161 unsigned rows = 0; |
162 if (value.isEmpty() || !parseHTMLNonNegativeInteger(value, rows) || rows
<= 0) | 162 if (value.isEmpty() || !parseHTMLNonNegativeInteger(value, rows) || rows
<= 0) |
163 rows = defaultRows; | 163 rows = defaultRows; |
164 if (m_rows != rows) { | 164 if (m_rows != rows) { |
165 m_rows = rows; | 165 m_rows = rows; |
166 if (layoutObject()) | 166 if (hasLayoutObject()) |
167 layoutObject()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInv
alidation(LayoutInvalidationReason::AttributeChanged); | 167 layoutObject()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInv
alidation(LayoutInvalidationReason::AttributeChanged); |
168 } | 168 } |
169 } else if (name == colsAttr) { | 169 } else if (name == colsAttr) { |
170 unsigned cols = 0; | 170 unsigned cols = 0; |
171 if (value.isEmpty() || !parseHTMLNonNegativeInteger(value, cols) || cols
<= 0) | 171 if (value.isEmpty() || !parseHTMLNonNegativeInteger(value, cols) || cols
<= 0) |
172 cols = defaultCols; | 172 cols = defaultCols; |
173 if (m_cols != cols) { | 173 if (m_cols != cols) { |
174 m_cols = cols; | 174 m_cols = cols; |
175 if (LayoutObject* layoutObject = this->layoutObject()) | 175 if (LayoutObject* layoutObject = this->layoutObject()) |
176 layoutObject->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInval
idation(LayoutInvalidationReason::AttributeChanged); | 176 layoutObject->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInval
idation(LayoutInvalidationReason::AttributeChanged); |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 | 673 |
674 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(const Element& s
ource) | 674 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(const Element& s
ource) |
675 { | 675 { |
676 const HTMLTextAreaElement& sourceElement = static_cast<const HTMLTextAreaEle
ment&>(source); | 676 const HTMLTextAreaElement& sourceElement = static_cast<const HTMLTextAreaEle
ment&>(source); |
677 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); | 677 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); |
678 m_isDirty = sourceElement.m_isDirty; | 678 m_isDirty = sourceElement.m_isDirty; |
679 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); | 679 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); |
680 } | 680 } |
681 | 681 |
682 } // namespace blink | 682 } // namespace blink |
OLD | NEW |