From f8c2b0a6621ad9c065862d0ca2ff032f76c35c08 Mon Sep 17 00:00:00 2001 From: "jer.noble@apple.com" Date: Thu, 19 Jan 2012 18:53:11 +0000 Subject: [PATCH] Crash at WebCore::MediaControlRootElement::makeOpaque + 97 https://bugs.webkit.org/show_bug.cgi?id=76391 Reviewed by John Sullivan. No new tests; Speculative fix for crash. Crash report data suggests this crash is occurring as the document is being closed. Check the nullity of document()->page() before deref-ing. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::makeOpaque): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105425 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 15 +++++++++++++++ Source/WebCore/html/shadow/MediaControlElements.cpp | 6 ++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index e108694..7053bf9 100755 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2012-01-16 Jer Noble + + Crash at WebCore::MediaControlRootElement::makeOpaque + 97 + https://bugs.webkit.org/show_bug.cgi?id=76391 + + Reviewed by John Sullivan. + + No new tests; Speculative fix for crash. + + Crash report data suggests this crash is occurring as the document is being + closed. Check the nullity of document()->page() before deref-ing. + + * html/shadow/MediaControlElements.cpp: + (WebCore::MediaControlPanelElement::makeOpaque): + 2012-01-19 Ken Buchanan Layout Test fast/text/international/spaces-combined-in-vertical-text.html is failing diff --git a/Source/WebCore/html/shadow/MediaControlElements.cpp b/Source/WebCore/html/shadow/MediaControlElements.cpp index d88b87f..45b9631 100644 --- a/Source/WebCore/html/shadow/MediaControlElements.cpp +++ b/Source/WebCore/html/shadow/MediaControlElements.cpp @@ -208,10 +208,12 @@ void MediaControlPanelElement::makeOpaque() { if (m_opaque) return; - + + double duration = document()->page() ? document()->page()->theme()->mediaControlsFadeInDuration() : 0; + CSSInlineStyleDeclaration* style = ensureInlineStyleDecl(); style->setProperty(CSSPropertyWebkitTransitionProperty, CSSPropertyOpacity); - style->setProperty(CSSPropertyWebkitTransitionDuration, document()->page()->theme()->mediaControlsFadeInDuration(), CSSPrimitiveValue::CSS_S); + style->setProperty(CSSPropertyWebkitTransitionDuration, duration, CSSPrimitiveValue::CSS_S); style->setProperty(CSSPropertyOpacity, 1.0, CSSPrimitiveValue::CSS_NUMBER); m_opaque = true; -- 2.7.4