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

Unified Diff: Source/core/html/shadow/MediaControlElements.cpp

Issue 1018593004: Implement <video controls> dodging for text track layout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: braces Created 5 years, 9 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
« no previous file with comments | « Source/core/html/shadow/MediaControlElements.h ('k') | Source/core/html/shadow/MediaControls.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/MediaControlElements.cpp
diff --git a/Source/core/html/shadow/MediaControlElements.cpp b/Source/core/html/shadow/MediaControlElements.cpp
index ee622ee2f1a88a96a48112a0ced859d6c182be91..3e2c7537ea26df6c70a25bb2dc7c27e768fc543f 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -131,6 +131,12 @@ void MediaControlPanelElement::transitionTimerFired(Timer<MediaControlPanelEleme
stopTimer();
}
+void MediaControlPanelElement::didBecomeVisible()
+{
+ ASSERT(m_isDisplayed && m_opaque);
+ mediaElement().mediaControlsDidBecomeVisible();
+}
+
void MediaControlPanelElement::makeOpaque()
{
if (m_opaque)
@@ -139,8 +145,10 @@ void MediaControlPanelElement::makeOpaque()
setInlineStyleProperty(CSSPropertyOpacity, 1.0, CSSPrimitiveValue::CSS_NUMBER);
m_opaque = true;
- if (m_isDisplayed)
+ if (m_isDisplayed) {
show();
+ didBecomeVisible();
+ }
}
void MediaControlPanelElement::makeTransparent()
@@ -156,7 +164,12 @@ void MediaControlPanelElement::makeTransparent()
void MediaControlPanelElement::setIsDisplayed(bool isDisplayed)
{
+ if (m_isDisplayed == isDisplayed)
+ return;
+
m_isDisplayed = isDisplayed;
+ if (m_isDisplayed && m_opaque)
+ didBecomeVisible();
}
bool MediaControlPanelElement::keepEventInNode(Event* event)
« no previous file with comments | « Source/core/html/shadow/MediaControlElements.h ('k') | Source/core/html/shadow/MediaControls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698