From dc92e14357dd0e9e2a1d594a120d63aeddeb932f Mon Sep 17 00:00:00 2001 From: "charles.wei@torchmobile.com.cn" Date: Thu, 12 Apr 2012 14:55:27 +0000 Subject: [PATCH] [BlackBerry] Revert the patch for 82764 https://bugs.webkit.org/show_bug.cgi?id=83767 Reviewed by Rob Buis. Revert the patch for 82764, which is causing misfunction. The internal commit is: 800213f5 * plugins/blackberry/PluginViewBlackBerry.cpp: (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformGetValue): (WebCore::PluginView::platformDestroy): * plugins/blackberry/PluginViewPrivateBlackBerry.h: (PluginViewPrivate): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113976 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 17 +++++++++++++++ .../plugins/blackberry/PluginViewBlackBerry.cpp | 25 +++++----------------- .../blackberry/PluginViewPrivateBlackBerry.h | 2 -- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 97a065d..ee03cfc 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,20 @@ +2012-04-12 Charles Wei + + [BlackBerry] Revert the patch for 82764 + https://bugs.webkit.org/show_bug.cgi?id=83767 + + Reviewed by Rob Buis. + + Revert the patch for 82764, which is causing misfunction. + The internal commit is: 800213f5 + + * plugins/blackberry/PluginViewBlackBerry.cpp: + (WebCore::PluginView::setNPWindowIfNeeded): + (WebCore::PluginView::platformGetValue): + (WebCore::PluginView::platformDestroy): + * plugins/blackberry/PluginViewPrivateBlackBerry.h: + (PluginViewPrivate): + 2012-04-12 Kent Tamura [Chromium] Enable INPUT_TYPE_DATE diff --git a/Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp b/Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp index 9605bda..b62933d 100644 --- a/Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp +++ b/Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp @@ -2,7 +2,7 @@ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora Ltd. All rights reserved. * Copyright (C) 2009 Girish Ramakrishnan - * Copyright (C) 2011, 2012 Research In Motion Limited. All rights reserved. + * Copyright (C) 2011 Research In Motion Limited. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -966,11 +966,8 @@ void PluginView::setNPWindowIfNeeded() m_npWindow.type = NPWindowTypeDrawable; BlackBerry::Platform::Graphics::Window* window = frameView->hostWindow()->platformPageClient()->platformWindow(); - if (window) { - // Make a local copy of the window group to be sure it doesn't go out of scope while the ws_info struct exists - m_private->m_windowGroup = window->windowGroup(); - ((NPSetWindowCallbackStruct*) m_npWindow.ws_info)->windowGroup = m_private->m_windowGroup.c_str(); - } + if (window) + ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->windowGroup = window->windowGroup(); PluginView::setCurrentPluginView(this); JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); @@ -1089,12 +1086,8 @@ bool PluginView::platformGetValue(NPNVariable variable, void* value, NPError* re if (frameView) { BlackBerry::Platform::Graphics::Window *window = frameView->hostWindow()->platformPageClient()->platformWindow(); if (window) { - // Make a copy of the root group to be sure it doesn't go out of scope. - m_private->m_rootGroup = window->rootGroup(); - - // Store it into value through an indirect pointer. void** tempValue = static_cast(value); - *tempValue = reinterpret_cast(const_cast(m_private->m_rootGroup.c_str())); + *tempValue = (void*)window->rootGroup(); if (*tempValue) { *result = NPERR_NO_ERROR; @@ -1111,12 +1104,8 @@ bool PluginView::platformGetValue(NPNVariable variable, void* value, NPError* re if (frameView) { BlackBerry::Platform::Graphics::Window* window = frameView->hostWindow()->platformPageClient()->platformWindow(); if (window) { - // Make a copy of the window group to be sure it doesn't go out of scope. - m_private->m_windowGroup = window->windowGroup(); - - // Store it into value through an indirect pointer. void** tempValue = static_cast(value); - *tempValue = reinterpret_cast(const_cast(m_private->m_windowGroup.c_str())); + *tempValue = reinterpret_cast(const_cast(window->windowGroup())); if (*tempValue) { *result = NPERR_NO_ERROR; @@ -1276,10 +1265,6 @@ void PluginView::platformDestroy() if (!m_private) return; - // ws_info->windowGroup points to memory in m_private, which is about to go away (unless it is uninitialized at this point) - if (m_npWindow.ws_info) - ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->windowGroup = 0; - // This will unlock the idle (if we have locked it). m_private->preventIdle(false); diff --git a/Source/WebCore/plugins/blackberry/PluginViewPrivateBlackBerry.h b/Source/WebCore/plugins/blackberry/PluginViewPrivateBlackBerry.h index b9dd218..3f2878f 100644 --- a/Source/WebCore/plugins/blackberry/PluginViewPrivateBlackBerry.h +++ b/Source/WebCore/plugins/blackberry/PluginViewPrivateBlackBerry.h @@ -83,8 +83,6 @@ private: bool m_isBackgroundPlaying; std::string m_pluginUniquePrefix; - std::string m_windowGroup; - std::string m_rootGroup; BlackBerry::Platform::IntRectRegion m_invalidateRegion; friend class PluginView; -- 2.7.4