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

dpranke at chromium.org dpranke at chromium.org
Wed Dec 22 13:17:07 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 9a91c9796a72865c705b190c27adc388acddff62
Author: dpranke at chromium.org <dpranke at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 10 07:48:20 2010 +0000

    2010-09-10  Dirk Pranke  <dpranke at chromium.org>
    
            Unreviewed, rolling out r67178.
            http://trac.webkit.org/changeset/67178
            https://bugs.webkit.org/show_bug.cgi?id=45524
    
            re-roll-out patch to put original changes back in
    
            * fast/replaced/object-param-url-control-char.html:
            * fast/replaced/object-with-embed-url-param-expected.txt:
            * fast/replaced/object-with-embed-url-param.html:
    2010-09-10  Dirk Pranke  <dpranke at chromium.org>
    
            Unreviewed, rolling out r67178.
            http://trac.webkit.org/changeset/67178
            https://bugs.webkit.org/show_bug.cgi?id=45524
    
            re-roll-out patch to put original changes back in
    
            * html/HTMLObjectElement.cpp:
            (WebCore::HTMLObjectElement::parametersForPlugin):
            (WebCore::HTMLObjectElement::updateWidget):
            * loader/SubframeLoader.cpp:
            (WebCore::SubframeLoader::resourceWillUsePlugin):
            * loader/SubframeLoader.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67179 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index cc8704d..d4d641a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,17 @@
 2010-09-10  Dirk Pranke  <dpranke at chromium.org>
 
+        Unreviewed, rolling out r67178.
+        http://trac.webkit.org/changeset/67178
+        https://bugs.webkit.org/show_bug.cgi?id=45524
+
+        re-roll-out patch to put original changes back in
+
+        * fast/replaced/object-param-url-control-char.html:
+        * fast/replaced/object-with-embed-url-param-expected.txt:
+        * fast/replaced/object-with-embed-url-param.html:
+
+2010-09-10  Dirk Pranke  <dpranke at chromium.org>
+
         Reviewed by Kent Tamura.
 
         roll out r66992 and r66997 - possibly introduced a perf slowdown in chromium tests
diff --git a/LayoutTests/fast/replaced/object-param-url-control-char.html b/LayoutTests/fast/replaced/object-param-url-control-char.html
index 95590f4..9fb4b40 100644
--- a/LayoutTests/fast/replaced/object-param-url-control-char.html
+++ b/LayoutTests/fast/replaced/object-param-url-control-char.html
@@ -21,7 +21,7 @@
         </script>
     </head>
     <body>
-        <object width="0" height="0">
+        <object width="0" height="0" type="application/x-webkit-test-netscape">
             <param name="movie" value=" 
  uRl('scheme://url-with-control-char/') 
 ">
         </object>
         <p>This test verifies that a URL specified in a &lt;param&gt; of an &lt;object&gt; is parsed the same as if it was specified as the data attribute of the &lt;object&gt;. Specifically, this verifies that control characters and leading/trailing whitespace are stripped, and that a resource surrounded with url('') is understood.</p>
diff --git a/LayoutTests/fast/replaced/object-with-embed-url-param-expected.txt b/LayoutTests/fast/replaced/object-with-embed-url-param-expected.txt
index d280a75..5c011dc 100644
--- a/LayoutTests/fast/replaced/object-with-embed-url-param-expected.txt
+++ b/LayoutTests/fast/replaced/object-with-embed-url-param-expected.txt
@@ -1,7 +1,8 @@
-   
 This test verifies that the right URL is loaded when there is an <object> with a 'src' <param> and a fallback <embed>.
 
 An <object> with a 'data' @attr and a 'src' <param> should load the URL from the 'data' @attr and does.
 An <object> with a 'src' <param> should load the URL from the 'src' <param> and does.
 An <object> with no URL specified and a nested <embed> should load the URL from the 'src' @attr of the <embed> and does.
-
+An <object> with a URL specified in a 'src' <param> and a nested <embed> should load the URL from the 'src' @attr of the <embed> and does.
+An <object> with a URL specified in a 'src' <param> and a MIME type specified in a 'type' <param> should load the URL from the 'src' <param> and does.
+      
diff --git a/LayoutTests/fast/replaced/object-with-embed-url-param.html b/LayoutTests/fast/replaced/object-with-embed-url-param.html
index ec34270..96c1de8 100644
--- a/LayoutTests/fast/replaced/object-with-embed-url-param.html
+++ b/LayoutTests/fast/replaced/object-with-embed-url-param.html
@@ -9,9 +9,11 @@
             var object1Result = "";
             var object2Result = "";
             var embed3Result = "";
+            var embed4Result = "";
+            var object5Result = "";
+            var notified = false;
 
             document.addEventListener("beforeload", function(event) {
-
                 if (event.url == "")
                     return;
  
@@ -21,12 +23,19 @@
                     object2Result = (event.url == "object-param" ? "does" : "does not");
                 } else if (event.target.id == "embed3") {
                     embed3Result = (event.url == "embed-attr" ? "does" : "does not");
+                } else if (event.target.id == "embed4") {
+                    embed4Result = (event.url == "embed-attr" ? "does" : "does not");
+                } else if (event.target.id == "object5") {
+                    object5Result = (event.url == "object-param" ? "does" : "does not");
                 }
 
-                if (object1Result != "" && object2Result != "" && embed3Result != "") {
+                if (!notified && object1Result != "" && object2Result != "" && embed3Result != "" && embed4Result != "" && object5Result != "") {
                     debug("An &lt;object&gt; with a 'data' @attr and a 'src' &lt;param&gt; should load the URL from the 'data' @attr and " + object1Result + ".");
                     debug("An &lt;object&gt; with a 'src' &lt;param&gt; should load the URL from the 'src' &lt;param&gt; and " + object2Result + ".");
                     debug("An &lt;object&gt; with no URL specified and a nested &lt;embed&gt; should load the URL from the 'src' @attr of the &lt;embed&gt; and " + embed3Result + ".");
+                    debug("An &lt;object&gt; with a URL specified in a 'src' &lt;param&gt; and a nested &lt;embed&gt; should load the URL from the 'src' @attr of the &lt;embed&gt; and " + embed3Result + ".");
+                    debug("An &lt;object&gt; with a URL specified in a 'src' &lt;param&gt; and a MIME type specified in a 'type' &lt;param&gt; should load the URL from the 'src' &lt;param&gt; and " + object5Result + ".");
+                    notified = true;
                     if (window.layoutTestController)
                         layoutTestController.notifyDone();
                 }
@@ -38,18 +47,26 @@
         </script>
     </head>
     <body>
+        <p>This test verifies that the right URL is loaded when there is an &lt;object&gt; with a 'src' &lt;param&gt; and a fallback &lt;embed&gt;.</p>
+        <div id="console"></div>
         <object id="object1" type="application/x-webkit-test-netscape" data="object-attr">
-            <param id="param1" name="src" value="object-param"></param>
+            <param name="src" value="object-param"></param>
             <embed id="embed1" type="application/x-webkit-test-netscape" src="embed-attr">
         </object>
         <object id="object2" type="application/x-webkit-test-netscape">
-            <param id="param2" name="movie" value="object-param"></param>
+            <param name="movie" value="object-param"></param>
             <embed id="embed2" type="application/x-webkit-test-netscape" src="embed-attr">
         </object>
         <object id="object3">
             <embed id="embed3" type="application/x-webkit-test-netscape" src="embed-attr">
         </object>
-        <p>This test verifies that the right URL is loaded when there is an &lt;object&gt; with a 'src' &lt;param&gt; and a fallback &lt;embed&gt;.</p>
-        <div id="console"></div>
+        <object id="object4">
+            <param name="code" value="object-param"></param>
+            <embed id="embed4" type="application/x-webkit-test-netscape" src="embed-attr">
+        </object>
+        <object id="object5">
+            <param name="url" value="object-param"></param>
+            <param name="type" value="application/x-webkit-test-netscape"></param>
+        </object>
     </body>
 </html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 730308a..45d8cc3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,20 @@
 2010-09-10  Dirk Pranke  <dpranke at chromium.org>
 
+        Unreviewed, rolling out r67178.
+        http://trac.webkit.org/changeset/67178
+        https://bugs.webkit.org/show_bug.cgi?id=45524
+
+        re-roll-out patch to put original changes back in
+
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::parametersForPlugin):
+        (WebCore::HTMLObjectElement::updateWidget):
+        * loader/SubframeLoader.cpp:
+        (WebCore::SubframeLoader::resourceWillUsePlugin):
+        * loader/SubframeLoader.h:
+
+2010-09-10  Dirk Pranke  <dpranke at chromium.org>
+
         Reviewed by Kent Tamura.
 
         roll out r66992 and r66997 - possibly introduced a perf slowdown in chromium tests
diff --git a/WebCore/html/HTMLObjectElement.cpp b/WebCore/html/HTMLObjectElement.cpp
index 56a6095..e9c6f60 100644
--- a/WebCore/html/HTMLObjectElement.cpp
+++ b/WebCore/html/HTMLObjectElement.cpp
@@ -163,6 +163,7 @@ static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramV
 void HTMLObjectElement::parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramValues, String& url, String& serviceType)
 {
     HashSet<StringImpl*, CaseFoldingHash> uniqueParamNames;
+    String urlParameter;
     
     // Scan the PARAM children and store their name/value pairs.
     // Get the URL and type from the params if we don't already have them.
@@ -180,8 +181,8 @@ void HTMLObjectElement::parametersForPlugin(Vector<String>& paramNames, Vector<S
         paramValues.append(p->value());
 
         // FIXME: url adjustment does not belong in this function.
-        if (url.isEmpty() && (equalIgnoringCase(name, "src") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "code") || equalIgnoringCase(name, "url")))
-            url = deprecatedParseURL(p->value());
+        if (url.isEmpty() && urlParameter.isEmpty() && (equalIgnoringCase(name, "src") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "code") || equalIgnoringCase(name, "url")))
+            urlParameter = deprecatedParseURL(p->value());
         // FIXME: serviceType calculation does not belong in this function.
         if (serviceType.isEmpty() && equalIgnoringCase(name, "type")) {
             serviceType = p->value();
@@ -217,9 +218,15 @@ void HTMLObjectElement::parametersForPlugin(Vector<String>& paramNames, Vector<S
     
     mapDataParamToSrc(&paramNames, &paramValues);
     
-    // If we still don't have a type, try to map from a specific CLASSID to a type.
-    if (serviceType.isEmpty())
-        serviceType = serviceTypeForClassId(classId());
+    // HTML5 says that an object resource's URL is specified by the object's data
+    // attribute, not by a param element. However, for compatibility, allow the
+    // resource's URL to be given by a param named "src", "movie", "code" or "url"
+    // if we know that resource points to a plug-in.
+    if (url.isEmpty() && !urlParameter.isEmpty()) {
+        SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
+        if (loader->resourceWillUsePlugin(urlParameter, serviceType))
+            url = urlParameter;
+    }
 }
 
     
@@ -250,7 +257,12 @@ void HTMLObjectElement::updateWidget(bool onlyCreateNonNetscapePlugins)
         return;
 
     String url = this->url();
+    
+    // If the object does not specify a MIME type via a type attribute, but does
+    // contain a classid attribute, try to map the classid to a MIME type.
     String serviceType = this->serviceType();
+    if (serviceType.isEmpty())
+        serviceType = serviceTypeForClassId(classId());
 
     // FIXME: These should be joined into a PluginParameters class.
     Vector<String> paramNames;
diff --git a/WebCore/loader/SubframeLoader.cpp b/WebCore/loader/SubframeLoader.cpp
index c25b37e..d364e88 100644
--- a/WebCore/loader/SubframeLoader.cpp
+++ b/WebCore/loader/SubframeLoader.cpp
@@ -87,6 +87,15 @@ bool SubframeLoader::requestFrame(HTMLFrameOwnerElement* ownerElement, const Str
 
     return true;
 }
+    
+bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType)
+{
+    KURL completedURL;
+    if (!url.isEmpty())
+        completedURL = completeURL(url);
+    bool useFallback;
+    return shouldUsePlugin(completedURL, mimeType, false, useFallback);
+}
 
 bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const String& url, const AtomicString& frameName,
     const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
diff --git a/WebCore/loader/SubframeLoader.h b/WebCore/loader/SubframeLoader.h
index 6c3baf8..a573045 100644
--- a/WebCore/loader/SubframeLoader.h
+++ b/WebCore/loader/SubframeLoader.h
@@ -75,6 +75,8 @@ public:
     bool allowPlugins(ReasonForCallingAllowPlugins);
 
     bool containsPlugins() const { return m_containsPlugins; }
+    
+    bool resourceWillUsePlugin(const String& url, const String& mimeType);
 
 private:
     Frame* loadOrRedirectSubframe(HTMLFrameOwnerElement*, const KURL&, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list