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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.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/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 36c0c435cb3067e5f18bbd6ae996939c723eeda0..791640db9e8986b96e9bacb545a22b4b5128b2c3 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -548,15 +548,15 @@ bool HTMLMediaElement::isMouseFocusable() const {
return false;
}
-void HTMLMediaElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
+void HTMLMediaElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ const QualifiedName& name = params.name;
if (name == srcAttr) {
BLINK_MEDIA_LOG << "parseAttribute(" << (void*)this
- << ", srcAttr, old=" << oldValue << ", new=" << value
- << ")";
+ << ", srcAttr, old=" << params.oldValue
+ << ", new=" << params.newValue << ")";
// Trigger a reload, as long as the 'src' attribute is present.
- if (!value.isNull()) {
+ if (!params.newValue.isNull()) {
m_ignorePreloadNone = false;
invokeLoadAlgorithm();
}
@@ -570,9 +570,11 @@ void HTMLMediaElement::parseAttribute(const QualifiedName& name,
// This attribute is an extension described in the Remote Playback API spec.
// Please see: https://w3c.github.io/remote-playback
UseCounter::count(document(), UseCounter::DisableRemotePlaybackAttribute);
- if (oldValue != value) {
- if (m_webMediaPlayer)
- m_webMediaPlayer->requestRemotePlaybackDisabled(!value.isNull());
+ if (params.oldValue != params.newValue) {
+ if (m_webMediaPlayer) {
+ m_webMediaPlayer->requestRemotePlaybackDisabled(
+ !params.newValue.isNull());
+ }
// TODO(mlamouri): there is no direct API to expose if
// disableRemotePLayback attribute has changed. It will require a direct
// access to MediaControls for the moment.
@@ -580,7 +582,7 @@ void HTMLMediaElement::parseAttribute(const QualifiedName& name,
mediaControls()->onDisableRemotePlaybackAttributeChanged();
}
} else {
- HTMLElement::parseAttribute(name, oldValue, value);
+ HTMLElement::parseAttribute(params);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.h ('k') | third_party/WebKit/Source/core/html/HTMLMetaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698