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

Unified Diff: third_party/WebKit/Source/core/html/HTMLButtonElement.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/HTMLButtonElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp b/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp
index d754d004064cd717b2821d26cd21947978183fe0..7051612731172ca8fa017518a2be25828155cf6e 100644
--- a/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp
@@ -85,13 +85,12 @@ bool HTMLButtonElement::isPresentationAttribute(
return HTMLFormControlElement::isPresentationAttribute(name);
}
-void HTMLButtonElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
- if (name == typeAttr) {
- if (equalIgnoringCase(value, "reset"))
+void HTMLButtonElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ if (params.name == typeAttr) {
+ if (equalIgnoringCase(params.newValue, "reset"))
m_type = RESET;
- else if (equalIgnoringCase(value, "button"))
+ else if (equalIgnoringCase(params.newValue, "button"))
m_type = BUTTON;
else
m_type = SUBMIT;
@@ -99,10 +98,9 @@ void HTMLButtonElement::parseAttribute(const QualifiedName& name,
if (formOwner() && isConnected())
formOwner()->invalidateDefaultButtonStyle();
} else {
- if (name == formactionAttr)
- logUpdateAttributeIfIsolatedWorldAndInDocument("button", formactionAttr,
- oldValue, value);
- HTMLFormControlElement::parseAttribute(name, oldValue, value);
+ if (params.name == formactionAttr)
+ logUpdateAttributeIfIsolatedWorldAndInDocument("button", params);
+ HTMLFormControlElement::parseAttribute(params);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLButtonElement.h ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698