[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

mitz at apple.com mitz at apple.com
Fri Feb 26 22:16:15 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit c230cf0cbf3a7d6698173b24fa25b7ae1cd5baf0
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 9 22:23:24 2010 +0000

    <rdar://problem/7400160> Netscape plug-ins are not instantiated on property access if there are pending stylesheets
    https://bugs.webkit.org/show_bug.cgi?id=34776
    
    Reviewed by Anders Carlsson.
    
    WebCore:
    
    Tests: plugins/instance-available-before-stylesheets-loaded-object.html
           plugins/instance-available-before-stylesheets-loaded.html
    
    * html/HTMLEmbedElement.cpp:
    (WebCore::HTMLEmbedElement::renderWidgetForJSBindings): Call
    updateLayoutIgnorePendingStylesheets() before checking for a renderer.
    * html/HTMLObjectElement.cpp:
    (WebCore::HTMLObjectElement::renderWidgetForJSBindings): Ditto.
    
    LayoutTests:
    
    * plugins/instance-available-before-stylesheets-loaded-expected.txt: Added.
    * plugins/instance-available-before-stylesheets-loaded-object-expected.txt: Added.
    * plugins/instance-available-before-stylesheets-loaded-object.html: Added.
    * plugins/instance-available-before-stylesheets-loaded.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b0aa94f..fa64cc0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-09  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        <rdar://problem/7400160> Netscape plug-ins are not instantiated on property access if there are pending stylesheets
+        https://bugs.webkit.org/show_bug.cgi?id=34776
+
+        * plugins/instance-available-before-stylesheets-loaded-expected.txt: Added.
+        * plugins/instance-available-before-stylesheets-loaded-object-expected.txt: Added.
+        * plugins/instance-available-before-stylesheets-loaded-object.html: Added.
+        * plugins/instance-available-before-stylesheets-loaded.html: Added.
+
 2010-02-09  Alejandro G. Castro  <alex at igalia.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/plugins/instance-available-before-stylesheets-loaded-expected.txt b/LayoutTests/plugins/instance-available-before-stylesheets-loaded-expected.txt
new file mode 100644
index 0000000..48e4255
--- /dev/null
+++ b/LayoutTests/plugins/instance-available-before-stylesheets-loaded-expected.txt
@@ -0,0 +1,2 @@
+
+PASS: Plug-in instance available while waiting for style sheets to load
diff --git a/LayoutTests/plugins/instance-available-before-stylesheets-loaded-object-expected.txt b/LayoutTests/plugins/instance-available-before-stylesheets-loaded-object-expected.txt
new file mode 100644
index 0000000..48e4255
--- /dev/null
+++ b/LayoutTests/plugins/instance-available-before-stylesheets-loaded-object-expected.txt
@@ -0,0 +1,2 @@
+
+PASS: Plug-in instance available while waiting for style sheets to load
diff --git a/LayoutTests/plugins/instance-available-before-stylesheets-loaded-object.html b/LayoutTests/plugins/instance-available-before-stylesheets-loaded-object.html
new file mode 100644
index 0000000..ada7706
--- /dev/null
+++ b/LayoutTests/plugins/instance-available-before-stylesheets-loaded-object.html
@@ -0,0 +1,15 @@
+<link rel="stylesheet" href="data:text/css,">
+<object id="plug-in" type="application/x-webkit-test-netscape" width=100 height=100></object>
+<p id="result">
+</p>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    var plugIn = document.getElementById("plug-in");
+
+    document.getElementById("result").innerText = ("eventLoggingEnabled" in plugIn)
+        ? "PASS: Plug-in instance available while waiting for style sheets to load"
+        : "FAIL: Plug-in not instantiated on property access while waiting for style sheets to load";
+
+</script>
diff --git a/LayoutTests/plugins/instance-available-before-stylesheets-loaded.html b/LayoutTests/plugins/instance-available-before-stylesheets-loaded.html
new file mode 100644
index 0000000..cc22156
--- /dev/null
+++ b/LayoutTests/plugins/instance-available-before-stylesheets-loaded.html
@@ -0,0 +1,15 @@
+<link rel="stylesheet" href="data:text/css,">
+<embed id="plug-in" type="application/x-webkit-test-netscape" width=100 height=100></embed>
+<p id="result">
+</p>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    var plugIn = document.getElementById("plug-in");
+
+    document.getElementById("result").innerText = ("eventLoggingEnabled" in plugIn)
+        ? "PASS: Plug-in instance available while waiting for style sheets to load"
+        : "FAIL: Plug-in not instantiated on property access while waiting for style sheets to load";
+
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 49cf578..2229c69 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-09  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        <rdar://problem/7400160> Netscape plug-ins are not instantiated on property access if there are pending stylesheets
+        https://bugs.webkit.org/show_bug.cgi?id=34776
+
+        Tests: plugins/instance-available-before-stylesheets-loaded-object.html
+               plugins/instance-available-before-stylesheets-loaded.html
+
+        * html/HTMLEmbedElement.cpp:
+        (WebCore::HTMLEmbedElement::renderWidgetForJSBindings): Call
+        updateLayoutIgnorePendingStylesheets() before checking for a renderer. 
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::renderWidgetForJSBindings): Ditto.
+
 2010-02-09  Alejandro G. Castro  <alex at igalia.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/html/HTMLEmbedElement.cpp b/WebCore/html/HTMLEmbedElement.cpp
index 6c62848..eba980c 100644
--- a/WebCore/html/HTMLEmbedElement.cpp
+++ b/WebCore/html/HTMLEmbedElement.cpp
@@ -69,12 +69,8 @@ static inline RenderWidget* findWidgetRenderer(const Node* n)
 
 RenderWidget* HTMLEmbedElement::renderWidgetForJSBindings() const
 {
-    RenderWidget* renderWidget = findWidgetRenderer(this);
-    if (renderWidget && !renderWidget->widget()) {
-        document()->updateLayoutIgnorePendingStylesheets();
-        renderWidget = findWidgetRenderer(this);
-    }
-    return renderWidget;
+    document()->updateLayoutIgnorePendingStylesheets();
+    return findWidgetRenderer(this);
 }
 
 bool HTMLEmbedElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
diff --git a/WebCore/html/HTMLObjectElement.cpp b/WebCore/html/HTMLObjectElement.cpp
index 80a5efa..74fbf21 100644
--- a/WebCore/html/HTMLObjectElement.cpp
+++ b/WebCore/html/HTMLObjectElement.cpp
@@ -61,12 +61,10 @@ PassRefPtr<HTMLObjectElement> HTMLObjectElement::create(const QualifiedName& tag
 
 RenderWidget* HTMLObjectElement::renderWidgetForJSBindings() const
 {
-    RenderWidget* renderWidget = (renderer() && renderer()->isWidget()) ? toRenderWidget(renderer()) : 0;
-    if (renderWidget && !renderWidget->widget()) {
-        document()->updateLayoutIgnorePendingStylesheets();
-        renderWidget = (renderer() && renderer()->isWidget()) ? toRenderWidget(renderer()) : 0;
-    }
-    return renderWidget;
+    document()->updateLayoutIgnorePendingStylesheets();
+    if (!renderer() || !renderer()->isWidget())
+        return 0;
+    return toRenderWidget(renderer());
 }
 
 void HTMLObjectElement::parseMappedAttribute(MappedAttribute *attr)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list