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

Unified Diff: third_party/WebKit/Source/core/css/mediaControls.css

Issue 2898543002: media_controls: Add UI for showing a promo bubble on a control button. (Closed)
Patch Set: .. Created 3 years, 7 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/css/mediaControls.css
diff --git a/third_party/WebKit/Source/core/css/mediaControls.css b/third_party/WebKit/Source/core/css/mediaControls.css
index 90ae832568c036e5abbd02c16065614844daab19..2b201dfe3f5c4358b042cf2ddaaf8172c8743f71 100644
--- a/third_party/WebKit/Source/core/css/mediaControls.css
+++ b/third_party/WebKit/Source/core/css/mediaControls.css
@@ -72,7 +72,7 @@ audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
position: relative;
width: 100%;
z-index: 0;
- overflow: hidden;
+ overflow: visible;
text-align: right;
bottom: auto;
height: 32px;
@@ -513,13 +513,24 @@ video::-internal-media-controls-overflow-button, audio::-internal-media-controls
color: inherit;
}
-video::-internal-media-controls-download-button, audio::-internal-media-controls-download-button {
- -webkit-appearance: -internal-media-download-button;
+video::-internal-media-controls-download-button-container, audio::-internal-media-controls-download-button-container {
display: flex;
flex: none;
+ position: relative;
box-sizing: border-box;
width: 32px;
height: 32px;
+ background-color: initial;
+ color: inherit;
+}
+
+video::-internal-media-controls-download-button, audio::-internal-media-controls-download-button {
+ -webkit-appearance: -internal-media-download-button;
+ display: flex;
+ flex: none;
+ box-sizing: border-box;
+ width: inherit;
+ height: inherit;
padding: 0px;
border-width: 0px;
margin-left: 0px;
@@ -609,3 +620,73 @@ video::cue(u) {
video::cue(i) {
font-style: italic;
}
+
+video::-internal-media-controls-promo-container {
+ display: flex;
+ flex: none;
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ box-sizing: border-box;
+ z-index: 42;
+ width: inherit;
+ height: inherit;
+ background-color: initial;
+ color: inherit;
+ pointer-events: none;
+}
+
+@keyframes -internal-media-controls-promo-throbbing {
Khushal 2017/05/20 01:48:08 For some reason, this doesn't seem to be working.
Khushal 2017/05/22 18:19:32 I figured what's going on with this one. Potential
+ 0% {transform: scale(0.5, 0.5);}
+ 50% {transform: scale(1.0, 1.0);}
+ 100% {transform: scale(0.5, 0.5);}
+}
+
+video::-internal-media-controls-promo-animation {
+ display: flex;
+ flex: none;
+ box-sizing: border-box;
+ width: inherit;
+ height: inherit;
+ border-radius: 50%;
+ background-color: #4285f4;
+ color: blue;
+ opacity: 0.4;
+ animation: -internal-media-controls-download-promo-throbbing 2s infinite;
+}
+
+video::-internal-media-controls-promo-arrow {
+ display: flex;
+ flex: none;
+ box-sizing: border-box;
+ position: absolute;
+ top: 100%;
+ left: 50%;
+ margin-left: -10px;
+ margin-top: -10px;
+ width: 0px;
+ height: 0px;
+ border-top: 10px solid transparent;
+ border-left: 10px solid transparent;
+ border-right: 10px solid transparent;
+ border-bottom: 10px solid #4285f4;
+}
+
+video::-internal-media-controls-promo-text {
+ display: inline-block;
+ flex: none;
+ position: absolute;
+ background: #5285f4;
+ color: #fff;
+ font-family: sans-serif;
+ padding: 16px;
+ top: 100%;
+ right: 0%;
+ margin-top: 10px;
+ z-index: 42;
+ border-radius: 2px;
+ font-size: 14px;
+ color: white;
+ white-space: nowrap;
+ line-height: 100%;
+}

Powered by Google App Engine
This is Rietveld 408576698