Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp

Issue 2623513005: Introduce Element::AttributeModificationParams (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
index ce5e0ec68a37ebe2d64c9cc63a62de59e7b6b265..db8af6744e0bbcb9994a38bfaa966165909090ab 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -294,17 +294,16 @@ bool HTMLSelectElement::isPresentationAttribute(
return HTMLFormControlElementWithState::isPresentationAttribute(name);
}
-void HTMLSelectElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
- if (name == sizeAttr) {
+void HTMLSelectElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ if (params.name == sizeAttr) {
unsigned oldSize = m_size;
// Set the attribute value to a number.
// This is important since the style rules for this attribute can
// determine the appearance property.
- unsigned size = value.getString().toUInt();
+ unsigned size = params.newValue.getString().toUInt();
AtomicString attrSize = AtomicString::number(size);
- if (attrSize != value) {
+ if (attrSize != params.newValue) {
// FIXME: This is horribly factored.
if (Attribute* sizeAttribute =
ensureUniqueElementData().attributes().find(sizeAttr))
@@ -319,13 +318,13 @@ void HTMLSelectElement::parseAttribute(const QualifiedName& name,
if (!usesMenuList())
saveListboxActiveSelection();
}
- } else if (name == multipleAttr) {
- parseMultipleAttribute(value);
- } else if (name == accesskeyAttr) {
+ } else if (params.name == multipleAttr) {
+ parseMultipleAttribute(params.newValue);
+ } else if (params.name == accesskeyAttr) {
// FIXME: ignore for the moment.
//
} else {
- HTMLFormControlElementWithState::parseAttribute(name, oldValue, value);
+ HTMLFormControlElementWithState::parseAttribute(params);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSelectElement.h ('k') | third_party/WebKit/Source/core/html/HTMLSlotElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698