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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMapElement.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/HTMLMapElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMapElement.cpp b/third_party/WebKit/Source/core/html/HTMLMapElement.cpp
index 930a2c0a2343ab999893d49056ad0b8477e2468a..361d8a161dc8b8fc2abe2e08c7a573825d549be9 100644
--- a/third_party/WebKit/Source/core/html/HTMLMapElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMapElement.cpp
@@ -76,23 +76,21 @@ HTMLImageElement* HTMLMapElement::imageElement() {
return nullptr;
}
-void HTMLMapElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
+void HTMLMapElement::parseAttribute(const AttributeModificationParams& params) {
// FIXME: This logic seems wrong for XML documents.
// Either the id or name will be used depending on the order the attributes
// are parsed.
- if (name == idAttr || name == nameAttr) {
- if (name == idAttr) {
+ if (params.name == idAttr || params.name == nameAttr) {
+ if (params.name == idAttr) {
// Call base class so that hasID bit gets set.
- HTMLElement::parseAttribute(name, oldValue, value);
+ HTMLElement::parseAttribute(params);
if (document().isHTMLDocument())
return;
}
if (isConnected())
treeScope().removeImageMap(this);
- String mapName = value;
+ String mapName = params.newValue;
if (mapName[0] == '#')
mapName = mapName.substring(1);
m_name =
@@ -103,7 +101,7 @@ void HTMLMapElement::parseAttribute(const QualifiedName& name,
return;
}
- HTMLElement::parseAttribute(name, oldValue, value);
+ HTMLElement::parseAttribute(params);
}
HTMLCollection* HTMLMapElement::areas() {
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMapElement.h ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698