diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-08-29 15:11:12 -0700 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2011-08-29 15:15:57 -0700 |
commit | f735537049e4e7b11d2da9549b8fe5ba15e05e93 (patch) | |
tree | 218b09a8c71ae7c9490f8ab3b097247ed139bd80 | |
parent | a53530faedfcc88c00b455e71bb3e2b738529e6a (diff) | |
download | external_webkit-f735537049e4e7b11d2da9549b8fe5ba15e05e93.zip external_webkit-f735537049e4e7b11d2da9549b8fe5ba15e05e93.tar.gz external_webkit-f735537049e4e7b11d2da9549b8fe5ba15e05e93.tar.bz2 |
Fix the null pointer crash when playing full screen video.
bug:5220693
Change-Id: I3696a8523c3328363ec9d162ef32525c7fbab930
-rw-r--r-- | Source/WebCore/html/shadow/MediaControlRootElement.cpp | 4 | ||||
-rw-r--r-- | Source/WebCore/page/FrameView.cpp | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Source/WebCore/html/shadow/MediaControlRootElement.cpp b/Source/WebCore/html/shadow/MediaControlRootElement.cpp index e063c4c..434e062 100644 --- a/Source/WebCore/html/shadow/MediaControlRootElement.cpp +++ b/Source/WebCore/html/shadow/MediaControlRootElement.cpp @@ -412,8 +412,10 @@ void MediaControlRootElement::changedVolume() void MediaControlRootElement::enteredFullscreen() { if (m_mediaElement->movieLoadType() == MediaPlayer::LiveStream || m_mediaElement->movieLoadType() == MediaPlayer::StoredStream) { +#if !PLATFORM(ANDROID) m_seekBackButton->hide(); m_seekForwardButton->hide(); +#endif } else m_rewindButton->hide(); } @@ -424,8 +426,10 @@ void MediaControlRootElement::exitedFullscreen() // when exiting fullscreen. // FIXME: Clarify naming of show/hide <http://webkit.org/b/58157> m_rewindButton->show(); +#if !PLATFORM(ANDROID) m_seekBackButton->show(); m_seekForwardButton->show(); +#endif } void MediaControlRootElement::showVolumeSlider() diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp index ee6bd6b..49a7d0c 100644 --- a/Source/WebCore/page/FrameView.cpp +++ b/Source/WebCore/page/FrameView.cpp @@ -652,6 +652,12 @@ bool FrameView::syncCompositingStateForThisFrame() // the fullScreenRenderer's graphicsLayer here: Document* document = m_frame->document(); if (isDocumentRunningFullScreenAnimation(document)) { +#if PLATFORM(ANDROID) + // We don't create an extra layer for the full screen video. + if (!document->fullScreenRenderer()->layer() + || !document->fullScreenRenderer()->layer()->backing()) + return true; +#endif RenderLayerBacking* backing = document->fullScreenRenderer()->layer()->backing(); if (GraphicsLayer* fullScreenLayer = backing->graphicsLayer()) fullScreenLayer->syncCompositingState(); |