Title: [153013] trunk/Source/WebCore
Revision
153013
Author
[email protected]
Date
2013-07-22 17:05:46 -0700 (Mon, 22 Jul 2013)

Log Message

<applet> plugins are instantiated post-attach (instead of post-layout like for object and embed)
https://bugs.webkit.org/show_bug.cgi?id=118994
<rdar://problem/14511232>

Reviewed by Anders Carlsson.

Make <applet> consistent with <object> and <embed>, deferring plugin
instantiation to post-layout, so that layout is up-to-date if anything
needs it (like RenderEmbeddedObject::isReplacementObscured) during creation.

* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
Copy code from HTMLObjectElement/HTMLEmbedElement that defers plugin
creation until post-layout tasks. Java is always an NPAPI plugin, so
we should always defer if requested.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (153012 => 153013)


--- trunk/Source/WebCore/ChangeLog	2013-07-22 23:53:57 UTC (rev 153012)
+++ trunk/Source/WebCore/ChangeLog	2013-07-23 00:05:46 UTC (rev 153013)
@@ -1,3 +1,21 @@
+2013-07-22  Tim Horton  <[email protected]>
+
+        <applet> plugins are instantiated post-attach (instead of post-layout like for object and embed)
+        https://bugs.webkit.org/show_bug.cgi?id=118994
+        <rdar://problem/14511232>
+
+        Reviewed by Anders Carlsson.
+
+        Make <applet> consistent with <object> and <embed>, deferring plugin
+        instantiation to post-layout, so that layout is up-to-date if anything
+        needs it (like RenderEmbeddedObject::isReplacementObscured) during creation.
+
+        * html/HTMLAppletElement.cpp:
+        (WebCore::HTMLAppletElement::updateWidget):
+        Copy code from HTMLObjectElement/HTMLEmbedElement that defers plugin
+        creation until post-layout tasks. Java is always an NPAPI plugin, so
+        we should always defer if requested.
+
 2013-07-22  Benjamin Poulain  <[email protected]>
 
         Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()

Modified: trunk/Source/WebCore/html/HTMLAppletElement.cpp (153012 => 153013)


--- trunk/Source/WebCore/html/HTMLAppletElement.cpp	2013-07-22 23:53:57 UTC (rev 153012)
+++ trunk/Source/WebCore/html/HTMLAppletElement.cpp	2013-07-23 00:05:46 UTC (rev 153013)
@@ -91,13 +91,22 @@
     return renderPart();
 }
 
-void HTMLAppletElement::updateWidget(PluginCreationOption)
+void HTMLAppletElement::updateWidget(PluginCreationOption pluginCreationOption)
 {
     setNeedsWidgetUpdate(false);
     // FIXME: This should ASSERT isFinishedParsingChildren() instead.
     if (!isFinishedParsingChildren())
         return;
 
+    // FIXME: It's sadness that we have this special case here.
+    //        See http://trac.webkit.org/changeset/25128 and
+    //        plugins/netscape-plugin-setwindow-size.html
+    if (pluginCreationOption == CreateOnlyNonNetscapePlugins) {
+        // Ensure updateWidget() is called again during layout to create the Netscape plug-in.
+        setNeedsWidgetUpdate(true);
+        return;
+    }
+
     RenderEmbeddedObject* renderer = renderEmbeddedObject();
 
     LayoutUnit contentWidth = renderer->style()->width().isFixed() ? LayoutUnit(renderer->style()->width().value()) :
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to