Title: [113976] trunk/Source/WebCore
Revision
113976
Author
[email protected]
Date
2012-04-12 07:55:27 -0700 (Thu, 12 Apr 2012)

Log Message

[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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (113975 => 113976)


--- trunk/Source/WebCore/ChangeLog	2012-04-12 14:52:05 UTC (rev 113975)
+++ trunk/Source/WebCore/ChangeLog	2012-04-12 14:55:27 UTC (rev 113976)
@@ -1,3 +1,20 @@
+2012-04-12  Charles Wei  <[email protected]>
+
+        [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  <[email protected]>
 
         [Chromium] Enable INPUT_TYPE_DATE

Modified: trunk/Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp (113975 => 113976)


--- trunk/Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp	2012-04-12 14:52:05 UTC (rev 113975)
+++ trunk/Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp	2012-04-12 14:55:27 UTC (rev 113976)
@@ -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 <[email protected]>
- * 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 @@
     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 @@
         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<void**>(value);
-                *tempValue = reinterpret_cast<void*>(const_cast<char*>(m_private->m_rootGroup.c_str()));
+                *tempValue = (void*)window->rootGroup();
 
                 if (*tempValue) {
                     *result = NPERR_NO_ERROR;
@@ -1111,12 +1104,8 @@
         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<void**>(value);
-                *tempValue = reinterpret_cast<void*>(const_cast<char*>(m_private->m_windowGroup.c_str()));
+                *tempValue = reinterpret_cast<void*>(const_cast<char*>(window->windowGroup()));
 
                 if (*tempValue) {
                     *result = NPERR_NO_ERROR;
@@ -1276,10 +1265,6 @@
     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);
 

Modified: trunk/Source/WebCore/plugins/blackberry/PluginViewPrivateBlackBerry.h (113975 => 113976)


--- trunk/Source/WebCore/plugins/blackberry/PluginViewPrivateBlackBerry.h	2012-04-12 14:52:05 UTC (rev 113975)
+++ trunk/Source/WebCore/plugins/blackberry/PluginViewPrivateBlackBerry.h	2012-04-12 14:55:27 UTC (rev 113976)
@@ -83,8 +83,6 @@
     bool m_isBackgroundPlaying;
 
     std::string m_pluginUniquePrefix;
-    std::string m_windowGroup;
-    std::string m_rootGroup;
 
     BlackBerry::Platform::IntRectRegion m_invalidateRegion;
     friend class PluginView;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to