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

Unified Diff: Source/core/html/HTMLVideoElement.cpp

Issue 1297983002: Update poster code as per https://html.spec.whatwg.org/#show-poster-flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« Source/core/html/HTMLMediaElement.h ('K') | « Source/core/html/HTMLVideoElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLVideoElement.cpp
diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp
index ed14340174e9d5733e4e79dfb76c4fa9e021d141..90e8df689aaf0506caddf99596c4e6201714b72f 100644
--- a/Source/core/html/HTMLVideoElement.cpp
+++ b/Source/core/html/HTMLVideoElement.cpp
@@ -52,6 +52,7 @@ using namespace HTMLNames;
inline HTMLVideoElement::HTMLVideoElement(Document& document)
: HTMLMediaElement(videoTag, document)
+ , m_displayMode(Unknown)
{
if (document.settings())
m_defaultPosterURL = AtomicString(document.settings()->defaultVideoPosterURL());
@@ -119,7 +120,7 @@ void HTMLVideoElement::parseAttribute(const QualifiedName& name, const AtomicStr
// display state, post playback the correct state will be picked up.
if (displayMode() < Video || !hasAvailableVideoFrame()) {
// Force a poster recalc by setting m_displayMode to Unknown directly before calling updateDisplayState.
- HTMLMediaElement::setDisplayMode(Unknown);
+ m_displayMode = Unknown;
updateDisplayState();
}
if (!posterImageURL().isEmpty()) {
@@ -179,7 +180,7 @@ void HTMLVideoElement::setDisplayMode(DisplayMode mode)
return;
}
- HTMLMediaElement::setDisplayMode(mode);
+ m_displayMode = mode;
if (layoutObject() && displayMode() != oldMode)
layoutObject()->updateFromElement();
« Source/core/html/HTMLMediaElement.h ('K') | « Source/core/html/HTMLVideoElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698