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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormElement.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/HTMLFormElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
index d8437bee4aabd50f9b49cedace9e70beb8b08d0e..8385afdaf36d9d929e0c51b152c7117040b9b137 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
@@ -476,13 +476,12 @@ void HTMLFormElement::reset() {
m_isInResetFunction = false;
}
-void HTMLFormElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
+void HTMLFormElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ const QualifiedName& name = params.name;
if (name == actionAttr) {
- m_attributes.parseAction(value);
- logUpdateAttributeIfIsolatedWorldAndInDocument("form", actionAttr, oldValue,
- value);
+ m_attributes.parseAction(params.newValue);
+ logUpdateAttributeIfIsolatedWorldAndInDocument("form", params);
// If we're not upgrading insecure requests, and the new action attribute is
// pointing to an insecure "action" location from a secure page it is marked
@@ -496,15 +495,15 @@ void HTMLFormElement::parseAttribute(const QualifiedName& name,
UseCounter::count(document().frame(),
UseCounter::MixedContentFormPresent);
} else if (name == targetAttr) {
- m_attributes.setTarget(value);
+ m_attributes.setTarget(params.newValue);
} else if (name == methodAttr) {
- m_attributes.updateMethodType(value);
+ m_attributes.updateMethodType(params.newValue);
} else if (name == enctypeAttr) {
- m_attributes.updateEncodingType(value);
+ m_attributes.updateEncodingType(params.newValue);
} else if (name == accept_charsetAttr) {
- m_attributes.setAcceptCharset(value);
+ m_attributes.setAcceptCharset(params.newValue);
} else {
- HTMLElement::parseAttribute(name, oldValue, value);
+ HTMLElement::parseAttribute(params);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.h ('k') | third_party/WebKit/Source/core/html/HTMLFrameElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698