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

Unified Diff: chrome/renderer/resources/plugins/plugin_poster.html

Issue 1407913002: Plugin Power Saver: Fix play-icon positioning when poster specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: chrome/renderer/resources/plugins/plugin_poster.html
diff --git a/chrome/renderer/resources/plugins/plugin_poster.html b/chrome/renderer/resources/plugins/plugin_poster.html
index 4a4b90c8bd3d5af899671e193feac976007207ff..e2d018d27c8b94aedf873e28fba4d622ae3313c1 100644
--- a/chrome/renderer/resources/plugins/plugin_poster.html
+++ b/chrome/renderer/resources/plugins/plugin_poster.html
@@ -34,8 +34,9 @@
}
#plugin-icon {
- display: block;
opacity: 0.8;
+ max-height: 100%;
+ max-width: 100%;
}
#plugin-icon:hover {
@@ -52,10 +53,14 @@
#inner-container {
align-items: center;
display: flex;
+ height: 100%;
justify-content: center;
left: 0px;
+ max-height: 100%;
+ max-width: 100%;
position: absolute;
top: 0px;
+ width: 100%;
z-index: 2;
}
</style>
@@ -68,11 +73,7 @@
<div id="shielding"></div>
<div id="inner-container"
i18n-values=".style.width:visibleWidth;.style.height:visibleHeight">
- <div id="inner">
- <img id="plugin-icon" src="plugin_power_saver_play.png"
- i18n-values=".style.maxWidth:visibleWidth;
- .style.maxHeight:visibleHeight" />
- </div>
+ <img id="plugin-icon" src="plugin_power_saver_play.png" />
</div>
</div>
<script>
@@ -84,10 +85,12 @@
plugin.load();
};
- window.setPosterMargin = function(marginLeft, marginTop) {
+ window.resizePoster = function(marginLeft, marginTop, width, height) {
var container = document.getElementById('inner-container');
container.style.marginLeft = marginLeft;
container.style.marginTop = marginTop;
+ container.style.width = width;
+ container.style.height = height;
};
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698