[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aroben at apple.com aroben at apple.com
Wed Dec 22 15:09:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ec38209a03594a2a7f759f7fd33e12dce72519a1
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 28 16:14:34 2010 +0000

    Make PluginView retain its HTMLPlugInElement
    
    This matches WebKit/mac's WebBaseNetscapePluginView. WebCore didn't do
    this, but had a very different mechanism for implementing NPRuntime
    that didn't require it.
    
    Fixes <http://webkit.org/b/46672> <rdar://problem/8484208> Crash
    (preceded by assertion) in Node::document when running
    plugins/document-open.html in WebKit2 on Windows
    
    Reviewed by Anders Carlsson.
    
    LayoutTests:
    
    Remove plugins/document-open.html from the win-wk2 Skipped file
    
    It passes now that <http://webkit.org/b/46672> is fixed.
    
    * platform/win-wk2/Skipped:
    
    WebKit2:
    
    * WebProcess/Plugins/PluginView.cpp:
    (WebKit::PluginView::create): Moved here from the header file so that
    clients of the header file won't have to pull in HTMLPlugInElement.h.
    Changed to take a PassRefPtr<HTMLPlugInElement>.
    (WebKit::PluginView::PluginView): Changed to take a
    PassRefPtr<HTMLPlugInElement> and to use m_pluginElement later (because
    the parameter to the function will be nulled-out after assigning into
    m_pluginElement).
    (WebKit::PluginView::pluginElementNPObject): Updated for change to m_pluginElement.
    
    * WebProcess/Plugins/PluginView.h: Made m_pluginElement a RefPtr.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70781 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b962c41..6f88cf3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,15 @@
 2010-10-28  Adam Roben  <aroben at apple.com>
 
+        Remove plugins/document-open.html from the win-wk2 Skipped file
+
+        It passes now that <http://webkit.org/b/46672> is fixed.
+
+        Reviewed by Anders Carlsson.
+
+        * platform/win-wk2/Skipped:
+
+2010-10-28  Adam Roben  <aroben at apple.com>
+
         Recategorize the failure of plugins/mouse-events.html for WebKit2
 
         This should have been done in r70685.
diff --git a/LayoutTests/platform/win-wk2/Skipped b/LayoutTests/platform/win-wk2/Skipped
index 418fb92..5a6136c 100644
--- a/LayoutTests/platform/win-wk2/Skipped
+++ b/LayoutTests/platform/win-wk2/Skipped
@@ -78,9 +78,6 @@ plugins/embed-attributes-style.html
 # http://webkit.org/b/46711
 platform/win/plugins/plugin-delayed-destroy.html
 
-# http://webkit.org/b/46712
-plugins/document-open.html
-
 # http://webkit.org/b/46715
 plugins/npruntime/invoke-failure.html
 
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 75bf394..7d401d6 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,29 @@
+2010-10-28  Adam Roben  <aroben at apple.com>
+
+        Make PluginView retain its HTMLPlugInElement
+
+        This matches WebKit/mac's WebBaseNetscapePluginView. WebCore didn't do
+        this, but had a very different mechanism for implementing NPRuntime
+        that didn't require it.
+
+        Fixes <http://webkit.org/b/46672> <rdar://problem/8484208> Crash
+        (preceded by assertion) in Node::document when running
+        plugins/document-open.html in WebKit2 on Windows
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::create): Moved here from the header file so that
+        clients of the header file won't have to pull in HTMLPlugInElement.h.
+        Changed to take a PassRefPtr<HTMLPlugInElement>.
+        (WebKit::PluginView::PluginView): Changed to take a
+        PassRefPtr<HTMLPlugInElement> and to use m_pluginElement later (because
+        the parameter to the function will be nulled-out after assigning into
+        m_pluginElement).
+        (WebKit::PluginView::pluginElementNPObject): Updated for change to m_pluginElement.
+
+        * WebProcess/Plugins/PluginView.h: Made m_pluginElement a RefPtr.
+
 2010-10-28  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
         Reviewed by Andreas Kling.
diff --git a/WebKit2/WebProcess/Plugins/PluginView.cpp b/WebKit2/WebProcess/Plugins/PluginView.cpp
index f2cc9a2..ac3f344 100644
--- a/WebKit2/WebProcess/Plugins/PluginView.cpp
+++ b/WebKit2/WebProcess/Plugins/PluginView.cpp
@@ -235,12 +235,17 @@ static inline WebPage* webPage(HTMLPlugInElement* pluginElement)
 
     return webPage;
 }
-        
-PluginView::PluginView(HTMLPlugInElement* pluginElement, PassRefPtr<Plugin> plugin, const Plugin::Parameters& parameters)
+
+PassRefPtr<PluginView> PluginView::create(PassRefPtr<HTMLPlugInElement> pluginElement, PassRefPtr<Plugin> plugin, const Plugin::Parameters& parameters)
+{
+    return adoptRef(new PluginView(pluginElement, plugin, parameters));
+}
+
+PluginView::PluginView(PassRefPtr<HTMLPlugInElement> pluginElement, PassRefPtr<Plugin> plugin, const Plugin::Parameters& parameters)
     : PluginViewBase(0)
     , m_pluginElement(pluginElement)
     , m_plugin(plugin)
-    , m_webPage(webPage(pluginElement))
+    , m_webPage(webPage(m_pluginElement.get()))
     , m_parameters(parameters)
     , m_isInitialized(false)
     , m_isWaitingUntilMediaCanStart(false)
@@ -784,7 +789,7 @@ NPObject* PluginView::pluginElementNPObject()
         return 0;
 
     // FIXME: Handle JavaScript being disabled.
-    JSObject* object = frame()->script()->jsObjectForPluginElement(m_pluginElement);
+    JSObject* object = frame()->script()->jsObjectForPluginElement(m_pluginElement.get());
     ASSERT(object);
 
     return m_npRuntimeObjectMap.getOrCreateNPObject(object);
diff --git a/WebKit2/WebProcess/Plugins/PluginView.h b/WebKit2/WebProcess/Plugins/PluginView.h
index ec8dadf..5346297 100644
--- a/WebKit2/WebProcess/Plugins/PluginView.h
+++ b/WebKit2/WebProcess/Plugins/PluginView.h
@@ -47,10 +47,7 @@ namespace WebKit {
 
 class PluginView : public WebCore::PluginViewBase, WebCore::MediaCanStartListener, PluginController, WebFrame::LoadListener {
 public:
-    static PassRefPtr<PluginView> create(WebCore::HTMLPlugInElement* pluginElement, PassRefPtr<Plugin> plugin, const Plugin::Parameters& parameters)
-    {
-        return adoptRef(new PluginView(pluginElement, plugin, parameters));
-    }
+    static PassRefPtr<PluginView> create(PassRefPtr<WebCore::HTMLPlugInElement>, PassRefPtr<Plugin>, const Plugin::Parameters&);
 
     WebCore::Frame* frame();
 
@@ -68,7 +65,7 @@ public:
 #endif
 
 private:
-    PluginView(WebCore::HTMLPlugInElement*, PassRefPtr<Plugin>, const Plugin::Parameters& parameters);
+    PluginView(PassRefPtr<WebCore::HTMLPlugInElement>, PassRefPtr<Plugin>, const Plugin::Parameters& parameters);
     virtual ~PluginView();
 
     void initializePlugin();
@@ -137,7 +134,7 @@ private:
     virtual void didFinishLoad(WebFrame*);
     virtual void didFailLoad(WebFrame*, bool wasCancelled);
 
-    WebCore::HTMLPlugInElement* m_pluginElement;
+    RefPtr<WebCore::HTMLPlugInElement> m_pluginElement;
     RefPtr<Plugin> m_plugin;
     WebPage* m_webPage;
     Plugin::Parameters m_parameters;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list