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

Unified Diff: third_party/WebKit/Source/core/html/HTMLOptionElement.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/HTMLOptionElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
index b58afb29324312561d3c18b62621170bb802f6b1..b0816b8f7424dee271ddc1c3f15beac0aa2ea9b6 100644
--- a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
@@ -195,14 +195,14 @@ int HTMLOptionElement::listIndex() const {
return -1;
}
-void HTMLOptionElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
+void HTMLOptionElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ const QualifiedName& name = params.name;
if (name == valueAttr) {
if (HTMLDataListElement* dataList = ownerDataListElement())
dataList->optionElementChildrenChanged();
} else if (name == disabledAttr) {
- if (oldValue.isNull() != value.isNull()) {
+ if (params.oldValue.isNull() != params.newValue.isNull()) {
pseudoStateChanged(CSSSelector::PseudoDisabled);
pseudoStateChanged(CSSSelector::PseudoEnabled);
if (layoutObject())
@@ -210,13 +210,13 @@ void HTMLOptionElement::parseAttribute(const QualifiedName& name,
EnabledControlState);
}
} else if (name == selectedAttr) {
- if (oldValue.isNull() != value.isNull() && !m_isDirty)
- setSelected(!value.isNull());
+ if (params.oldValue.isNull() != params.newValue.isNull() && !m_isDirty)
+ setSelected(!params.newValue.isNull());
pseudoStateChanged(CSSSelector::PseudoDefault);
} else if (name == labelAttr) {
updateLabel();
} else {
- HTMLElement::parseAttribute(name, oldValue, value);
+ HTMLElement::parseAttribute(params);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLOptionElement.h ('k') | third_party/WebKit/Source/core/html/HTMLOutputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698