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

aestes at apple.com aestes at apple.com
Wed Dec 22 15:07:37 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1177849d00c20367c85e14d7c6cfd647cfe75465
Author: aestes at apple.com <aestes at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 28 06:15:09 2010 +0000

    2010-10-27  Andy Estes  <aestes at apple.com>
    
            Reviewed by Adam Barth.
    
            r66156 broke AtlasCT library, formerly affected http://map.d.co.il/
            https://bugs.webkit.org/show_bug.cgi?id=45679
    
            This patch removes WebKit's map of classid values to MIME types. It also
            changes the behavior of object elements to render fallback content when
            a non-empty classid attribute is specified, which is the behavior HTML5
            specifies when a UA encounters a classid it doesn't understand.
    
            Test: fast/replaced/object-with-non-empty-classid-triggers-fallback.html
    
            * html/HTMLObjectElement.cpp: Remove serviceTypeForClassId(),
            createClassIdToTypeMap(), and the ClassIdToTypeMap typedef.
            (WebCore::HTMLObjectElement::updateWidget): Do not call
            serviceTypeForClassId() when there is no type attribute, and render
            fallback content if the classid attribute is non-empty.
    2010-10-27  Andy Estes  <aestes at apple.com>
    
            Reviewed by Adam Barth.
    
            r66156 broke AtlasCT library, formerly affected http://map.d.co.il/
            https://bugs.webkit.org/show_bug.cgi?id=45679
    
            * fast/dom/object-embed-plugin-scripting.html: Changed classid
            attributes to type attributes.
            * fast/dom/object-plugin-hides-properties.html: Ditto.
            * fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt: Added.
            * fast/replaced/object-with-non-empty-classid-triggers-fallback.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70748 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f3f7eb3..e805752 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-27  Andy Estes  <aestes at apple.com>
+
+        Reviewed by Adam Barth.
+
+        r66156 broke AtlasCT library, formerly affected http://map.d.co.il/
+        https://bugs.webkit.org/show_bug.cgi?id=45679
+
+        * fast/dom/object-embed-plugin-scripting.html: Changed classid
+        attributes to type attributes.
+        * fast/dom/object-plugin-hides-properties.html: Ditto.
+        * fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt: Added.
+        * fast/replaced/object-with-non-empty-classid-triggers-fallback.html: Added.
+
 2010-10-27  Kinuko Yasuda  <kinuko at chromium.org>
 
         Unreviewed, updating drt_expectations.txt.
diff --git a/LayoutTests/fast/dom/object-embed-plugin-scripting.html b/LayoutTests/fast/dom/object-embed-plugin-scripting.html
index ebaf2e2..d741803 100644
--- a/LayoutTests/fast/dom/object-embed-plugin-scripting.html
+++ b/LayoutTests/fast/dom/object-embed-plugin-scripting.html
@@ -34,7 +34,7 @@ function test()
 
 <OBJECT 
     id="myO"
-    classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
+    type="audio/mp4"
     width = 0 height = 0
     >
     <PARAM name="src" value="resources/articles.m4a">
@@ -100,7 +100,7 @@ function test()
 
 <object
     name="Plugin"
-    classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
+    type="audio/mp4"
     width = 0 height = 0
     >
     <param name="src" value="resources/articles.m4a">
diff --git a/LayoutTests/fast/dom/object-plugin-hides-properties.html b/LayoutTests/fast/dom/object-plugin-hides-properties.html
index 64c5cc8..855ba84 100644
--- a/LayoutTests/fast/dom/object-plugin-hides-properties.html
+++ b/LayoutTests/fast/dom/object-plugin-hides-properties.html
@@ -19,6 +19,6 @@ the OBJECT element.
 If the test passes, you will see a "PASSED" message below.
 </p>
 <p id="result"></p>
-<object id="obj" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"><!-- quicktime -->
+<object id="obj" type="video/quicktime"><!-- quicktime -->
 </object>
 </body>
diff --git a/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt b/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt
new file mode 100644
index 0000000..b7353e5
--- /dev/null
+++ b/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt
@@ -0,0 +1,4 @@
+This tests that fallback content is rendered for objects with non-empty classid attributes. The test passes if two lines are printed below containing the work 'PASS'.
+
+object with classid attribute but no type attribute renders fallback: PASS 
+object with classid and type attributes renders fallback: PASS
diff --git a/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback.html b/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback.html
new file mode 100644
index 0000000..d6c86e2
--- /dev/null
+++ b/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback.html
@@ -0,0 +1,13 @@
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+</script>
+<p>This tests that fallback content is rendered for objects with non-empty classid attributes. The test passes if two lines are printed below containing the work 'PASS'.</p>
+<object id="obj" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
+    object with classid attribute but no type attribute renders fallback: PASS
+</object>
+<br>
+<object id="obj" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" type=application/x-webkit-test-netscape">
+    object with classid and type attributes renders fallback: PASS
+</object>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b45b65b..f6cae20 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-10-27  Andy Estes  <aestes at apple.com>
+
+        Reviewed by Adam Barth.
+
+        r66156 broke AtlasCT library, formerly affected http://map.d.co.il/
+        https://bugs.webkit.org/show_bug.cgi?id=45679
+
+        This patch removes WebKit's map of classid values to MIME types. It also
+        changes the behavior of object elements to render fallback content when
+        a non-empty classid attribute is specified, which is the behavior HTML5
+        specifies when a UA encounters a classid it doesn't understand.
+
+        Test: fast/replaced/object-with-non-empty-classid-triggers-fallback.html
+
+        * html/HTMLObjectElement.cpp: Remove serviceTypeForClassId(),
+        createClassIdToTypeMap(), and the ClassIdToTypeMap typedef.
+        (WebCore::HTMLObjectElement::updateWidget): Do not call
+        serviceTypeForClassId() when there is no type attribute, and render
+        fallback content if the classid attribute is non-empty.
+
 2010-10-27  Eric Uhrhane  <ericu at chromium.org>
 
         Reviewed by David Levin.
diff --git a/WebCore/html/HTMLObjectElement.cpp b/WebCore/html/HTMLObjectElement.cpp
index 2b51286..2b586cf 100644
--- a/WebCore/html/HTMLObjectElement.cpp
+++ b/WebCore/html/HTMLObjectElement.cpp
@@ -116,31 +116,6 @@ void HTMLObjectElement::parseMappedAttribute(Attribute* attr)
         HTMLPlugInImageElement::parseMappedAttribute(attr);
 }
 
-typedef HashMap<String, String, CaseFoldingHash> ClassIdToTypeMap;
-
-static ClassIdToTypeMap* createClassIdToTypeMap()
-{
-    ClassIdToTypeMap* map = new ClassIdToTypeMap;
-    map->add("clsid:D27CDB6E-AE6D-11CF-96B8-444553540000", "application/x-shockwave-flash");
-    map->add("clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA", "audio/x-pn-realaudio-plugin");
-    map->add("clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B", "video/quicktime");
-    map->add("clsid:166B1BCA-3F9C-11CF-8075-444553540000", "application/x-director");
-    map->add("clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6", "application/x-mplayer2");
-    map->add("clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95", "application/x-mplayer2");
-    return map;
-}
-
-static String serviceTypeForClassId(const String& classId)
-{
-    // Return early if classId is empty (since we won't do anything below).
-    // Furthermore, if classId is null, calling get() below will crash.
-    if (classId.isEmpty())
-        return String();
-    
-    static ClassIdToTypeMap* map = createClassIdToTypeMap();
-    return map->get(classId);
-}
-
 static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramValues)
 {
     // Some plugins don't understand the "data" attribute of the OBJECT tag (i.e. Real and WMP
@@ -255,14 +230,9 @@ void HTMLObjectElement::updateWidget(bool onlyCreateNonNetscapePlugins)
     // FIXME: This should ASSERT isFinishedParsingChildren() instead.
     if (!isFinishedParsingChildren())
         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 url = this->url();
     String serviceType = this->serviceType();
-    if (serviceType.isEmpty())
-        serviceType = serviceTypeForClassId(classId());
 
     // FIXME: These should be joined into a PluginParameters class.
     Vector<String> paramNames;
@@ -291,8 +261,12 @@ void HTMLObjectElement::updateWidget(bool onlyCreateNonNetscapePlugins)
     if (!renderer())
         return;
 
+    // HTML5 says that fallback content should be rendered if a non-empty
+    // classid is specified for which the UA can't find a suitable plug-in.
+    bool hasEmptyClassId = classId().isEmpty();
+
     SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
-    bool success = beforeLoadAllowedLoad && loader->requestObject(this, url, getAttribute(nameAttr), serviceType, paramNames, paramValues);
+    bool success = beforeLoadAllowedLoad && hasEmptyClassId && loader->requestObject(this, url, getAttribute(nameAttr), serviceType, paramNames, paramValues);
 
     if (!success && fallbackContent)
         renderFallbackContent();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list