From 4d49c7f04ab34686de0da5aba6f7427a151c471d Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Tue, 21 Feb 2012 15:38:06 -0800 Subject: Simplify Youtube management When we encounter youtube objects, we replace them on the fly with an element that will redirect to the youtube application. Currently, this element is a canvas, that we add to the document wrapped into a Frame. This cause some problems when we switch to have canvas elements on their own individual layer (which drastically improves performances). Note that we do support correctly composited layers into frameset/iframes on normal websites, the problems we see here are due to us creating the frame on the fly, messing with webkit's compositing logic. This CL rewrite the HTML code we insert to not use canvas and instead use normal html elements positioned via CSS. This work around the composited canvas issue as well as simplifying the code. Change-Id: Ie6043f9445e8bc191b229db9f9ff5de192d8b5db --- core/res/assets/webkit/youtube.html | 99 ++++++++++++------------------------- 1 file changed, 32 insertions(+), 67 deletions(-) (limited to 'core/res/assets/webkit') diff --git a/core/res/assets/webkit/youtube.html b/core/res/assets/webkit/youtube.html index d808bcf..8e103c1 100644 --- a/core/res/assets/webkit/youtube.html +++ b/core/res/assets/webkit/youtube.html @@ -13,94 +13,59 @@ height: 100%; padding: 0%; z-index: 10; + background-size: 100%; + background: no-repeat; + background-position: center; + } + #play { + position: absolute; + left: 50%; + top: 50%; + } + #logo { + position: absolute; + bottom: 0; + right: 0; }
- + +
-- cgit v1.1