diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-09-12 11:20:44 -0700 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2011-09-12 13:20:05 -0700 |
commit | a6a655013a05dce8dd34c69e4bba05d49f5e9c4d (patch) | |
tree | ed6010fc9f3a8e624ae47521c05bb55002457a2e | |
parent | 13d9e99a89d771d44695e9ddbc28ef0811588076 (diff) | |
download | external_webkit-a6a655013a05dce8dd34c69e4bba05d49f5e9c4d.zip external_webkit-a6a655013a05dce8dd34c69e4bba05d49f5e9c4d.tar.gz external_webkit-a6a655013a05dce8dd34c69e4bba05d49f5e9c4d.tar.bz2 |
Fix the poster issue and full screen behavior html5 video
This is related to the change in https://bugs.webkit.org/show_bug.cgi?id=49481,
and it seems there is some following up discussion in this area.
We will just follow what we did from Honeycomb and work around issues for now.
bug:4523481
Change-Id: I3c2225afb078c24db423119a235266f222055431
-rw-r--r-- | Source/WebCore/dom/Document.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index 638b4ab..c8bf374 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -4870,6 +4870,11 @@ void Document::webkitCancelFullScreen() return; page()->chrome()->client()->exitFullScreenForElement(m_fullScreenElement.get()); +#if PLATFORM(ANDROID) + // The next time we try to enter full screen, we need this change to know + // we are not in full screen any more. + m_fullScreenElement = 0; +#endif } void Document::webkitWillEnterFullScreenForElement(Element* element) @@ -4878,12 +4883,21 @@ void Document::webkitWillEnterFullScreenForElement(Element* element) ASSERT(page() && page()->settings()->fullScreenEnabled()); m_fullScreenElement = element; - + +#if PLATFORM(ANDROID) + // Our approach on Poster handling is android specific: we are passing the + // poster from java side to native and we can't keep the content if the + // video element is detached and its RenderLayer object is deleted. + if(!(m_fullScreenElement->hasTagName(HTMLNames::videoTag))) { +#endif if (m_fullScreenElement != documentElement()) m_fullScreenElement->detach(); recalcStyle(Force); - +#if PLATFORM(ANDROID) + } +#endif + if (m_fullScreenRenderer) { m_fullScreenRenderer->setAnimating(true); #if USE(ACCELERATED_COMPOSITING) |