Title: [153010] branches/safari-537-branch/Source/WebKit2

Diff

Modified: branches/safari-537-branch/Source/WebKit2/ChangeLog (153009 => 153010)


--- branches/safari-537-branch/Source/WebKit2/ChangeLog	2013-07-22 23:34:44 UTC (rev 153009)
+++ branches/safari-537-branch/Source/WebKit2/ChangeLog	2013-07-22 23:37:46 UTC (rev 153010)
@@ -1,5 +1,30 @@
 2013-07-22  Lucas Forschler  <[email protected]>
 
+        Merge r152866
+
+    2013-07-18  Tim Horton  <[email protected]>
+
+            [wk2] Ensure that the plugin layer is removed completely when the PluginProcess crashes
+            https://bugs.webkit.org/show_bug.cgi?id=118862
+
+            Reviewed by Anders Carlsson.
+
+            * WebProcess/Plugins/PluginView.cpp:
+            (WebKit::PluginView::PluginView):
+            Add m_pluginProcessHasCrashed.
+
+            (WebKit::PluginView::platformLayer):
+            Don't return the plugin's layer if it has crashed.
+
+            (WebKit::PluginView::pluginProcessCrashed):
+            Set m_pluginProcessHasCrashed.
+            Cause a style recalc so that we rebuild the layer tree; our layer won't be included.
+
+            * WebProcess/Plugins/PluginView.h:
+            Add m_pluginProcessHasCrashed.
+
+2013-07-22  Lucas Forschler  <[email protected]>
+
         Merge r152862
 
     2013-07-18  Alexey Proskuryakov  <[email protected]>

Modified: branches/safari-537-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (153009 => 153010)


--- branches/safari-537-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2013-07-22 23:34:44 UTC (rev 153009)
+++ branches/safari-537-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2013-07-22 23:37:46 UTC (rev 153010)
@@ -276,6 +276,7 @@
     , m_isWaitingForSynchronousInitialization(false)
     , m_isWaitingUntilMediaCanStart(false)
     , m_isBeingDestroyed(false)
+    , m_pluginProcessHasCrashed(false)
     , m_pendingURLRequestsTimer(RunLoop::main(), this, &PluginView::pendingURLRequestsTimerFired)
 #if ENABLE(NETSCAPE_PLUGIN_API)
     , m_npRuntimeObjectMap(this)
@@ -620,7 +621,7 @@
 PlatformLayer* PluginView::platformLayer() const
 {
     // The plug-in can be null here if it failed to initialize.
-    if (!m_isInitialized || !m_plugin)
+    if (!m_isInitialized || !m_plugin || m_pluginProcessHasCrashed)
         return 0;
         
     return m_plugin->pluginLayer();
@@ -1249,7 +1250,7 @@
     RenderBoxModelObject* renderer = toRenderBoxModelObject(m_pluginElement->renderer());
     if (!renderer)
         return;
-    
+
     IntRect contentRect(dirtyRect);
     contentRect.move(renderer->borderLeft() + renderer->paddingLeft(), renderer->borderTop() + renderer->paddingTop());
     renderer->repaintRectangle(contentRect);
@@ -1413,13 +1414,17 @@
 
 void PluginView::pluginProcessCrashed()
 {
+    m_pluginProcessHasCrashed = true;
+
     if (!m_pluginElement->renderer())
         return;
 
     // FIXME: The renderer could also be a RenderApplet, we should handle that.
     if (!m_pluginElement->renderer()->isEmbeddedObject())
         return;
-        
+
+    m_pluginElement->setNeedsStyleRecalc(SyntheticStyleChange);
+
     RenderEmbeddedObject* renderer = toRenderEmbeddedObject(m_pluginElement->renderer());
     renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::PluginCrashed);
     

Modified: branches/safari-537-branch/Source/WebKit2/WebProcess/Plugins/PluginView.h (153009 => 153010)


--- branches/safari-537-branch/Source/WebKit2/WebProcess/Plugins/PluginView.h	2013-07-22 23:34:44 UTC (rev 153009)
+++ branches/safari-537-branch/Source/WebKit2/WebProcess/Plugins/PluginView.h	2013-07-22 23:37:46 UTC (rev 153010)
@@ -231,6 +231,7 @@
     bool m_isWaitingForSynchronousInitialization;
     bool m_isWaitingUntilMediaCanStart;
     bool m_isBeingDestroyed;
+    bool m_pluginProcessHasCrashed;
 
     // Pending URLRequests that the plug-in has made.
     Deque<RefPtr<URLRequest>> m_pendingURLRequests;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to