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

Unified Diff: third_party/WebKit/Source/core/html/HTMLTrackElement.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/HTMLTrackElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp b/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp
index 33c4c74fe34c09f00aa667b813e717a3b073b997..ad63ae1609959f2f60073a77d3424e3ac1b86265 100644
--- a/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp
@@ -77,11 +77,11 @@ void HTMLTrackElement::removedFrom(ContainerNode* insertionPoint) {
HTMLElement::removedFrom(insertionPoint);
}
-void HTMLTrackElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
+void HTMLTrackElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ const QualifiedName& name = params.name;
if (name == srcAttr) {
- if (!value.isEmpty())
+ if (!params.newValue.isEmpty())
scheduleLoad();
else if (m_track)
m_track->removeAllCues();
@@ -90,7 +90,7 @@ void HTMLTrackElement::parseAttribute(const QualifiedName& name,
// As the kind, label, and srclang attributes are set, changed, or removed,
// the text track must update accordingly...
} else if (name == kindAttr) {
- AtomicString lowerCaseValue = value.lower();
+ AtomicString lowerCaseValue = params.newValue.lower();
// 'missing value default' ("subtitles")
if (lowerCaseValue.isNull())
lowerCaseValue = TextTrack::subtitlesKeyword();
@@ -100,14 +100,14 @@ void HTMLTrackElement::parseAttribute(const QualifiedName& name,
track()->setKind(lowerCaseValue);
} else if (name == labelAttr) {
- track()->setLabel(value);
+ track()->setLabel(params.newValue);
} else if (name == srclangAttr) {
- track()->setLanguage(value);
+ track()->setLanguage(params.newValue);
} else if (name == idAttr) {
- track()->setId(value);
+ track()->setId(params.newValue);
}
- HTMLElement::parseAttribute(name, oldValue, value);
+ HTMLElement::parseAttribute(params);
}
const AtomicString& HTMLTrackElement::kind() {
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTrackElement.h ('k') | third_party/WebKit/Source/core/html/HTMLVideoElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698