Changeset 67179 in webkit
- Timestamp:
- Sep 10, 2010 12:48:20 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r67178 r67179 1 2010-09-10 Dirk Pranke <dpranke@chromium.org> 2 3 Unreviewed, rolling out r67178. 4 http://trac.webkit.org/changeset/67178 5 https://bugs.webkit.org/show_bug.cgi?id=45524 6 7 re-roll-out patch to put original changes back in 8 9 * fast/replaced/object-param-url-control-char.html: 10 * fast/replaced/object-with-embed-url-param-expected.txt: 11 * fast/replaced/object-with-embed-url-param.html: 12 1 13 2010-09-10 Dirk Pranke <dpranke@chromium.org> 2 14 -
trunk/LayoutTests/fast/replaced/object-param-url-control-char.html
r67178 r67179 22 22 </head> 23 23 <body> 24 <object width="0" height="0" >24 <object width="0" height="0" type="application/x-webkit-test-netscape"> 25 25 <param name="movie" value=" 26 26 uRl('scheme://url-with-control-char/') -
trunk/LayoutTests/fast/replaced/object-with-embed-url-param-expected.txt
r67178 r67179 1 2 1 This test verifies that the right URL is loaded when there is an <object> with a 'src' <param> and a fallback <embed>. 3 2 … … 5 4 An <object> with a 'src' <param> should load the URL from the 'src' <param> and does. 6 5 An <object> with no URL specified and a nested <embed> should load the URL from the 'src' @attr of the <embed> and does. 7 6 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. 7 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. 8 -
trunk/LayoutTests/fast/replaced/object-with-embed-url-param.html
r67178 r67179 10 10 var object2Result = ""; 11 11 var embed3Result = ""; 12 var embed4Result = ""; 13 var object5Result = ""; 14 var notified = false; 12 15 13 16 document.addEventListener("beforeload", function(event) { 14 15 17 if (event.url == "") 16 18 return; … … 22 24 } else if (event.target.id == "embed3") { 23 25 embed3Result = (event.url == "embed-attr" ? "does" : "does not"); 26 } else if (event.target.id == "embed4") { 27 embed4Result = (event.url == "embed-attr" ? "does" : "does not"); 28 } else if (event.target.id == "object5") { 29 object5Result = (event.url == "object-param" ? "does" : "does not"); 24 30 } 25 31 26 if ( object1Result != "" && object2Result != "" && embed3Result != "") {32 if (!notified && object1Result != "" && object2Result != "" && embed3Result != "" && embed4Result != "" && object5Result != "") { 27 33 debug("An <object> with a 'data' @attr and a 'src' <param> should load the URL from the 'data' @attr and " + object1Result + "."); 28 34 debug("An <object> with a 'src' <param> should load the URL from the 'src' <param> and " + object2Result + "."); 29 35 debug("An <object> with no URL specified and a nested <embed> should load the URL from the 'src' @attr of the <embed> and " + embed3Result + "."); 36 debug("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 " + embed3Result + "."); 37 debug("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 " + object5Result + "."); 38 notified = true; 30 39 if (window.layoutTestController) 31 40 layoutTestController.notifyDone(); … … 39 48 </head> 40 49 <body> 50 <p>This test verifies that the right URL is loaded when there is an <object> with a 'src' <param> and a fallback <embed>.</p> 51 <div id="console"></div> 41 52 <object id="object1" type="application/x-webkit-test-netscape" data="object-attr"> 42 <param id="param1"name="src" value="object-param"></param>53 <param name="src" value="object-param"></param> 43 54 <embed id="embed1" type="application/x-webkit-test-netscape" src="embed-attr"> 44 55 </object> 45 56 <object id="object2" type="application/x-webkit-test-netscape"> 46 <param id="param2"name="movie" value="object-param"></param>57 <param name="movie" value="object-param"></param> 47 58 <embed id="embed2" type="application/x-webkit-test-netscape" src="embed-attr"> 48 59 </object> … … 50 61 <embed id="embed3" type="application/x-webkit-test-netscape" src="embed-attr"> 51 62 </object> 52 <p>This test verifies that the right URL is loaded when there is an <object> with a 'src' <param> and a fallback <embed>.</p> 53 <div id="console"></div> 63 <object id="object4"> 64 <param name="code" value="object-param"></param> 65 <embed id="embed4" type="application/x-webkit-test-netscape" src="embed-attr"> 66 </object> 67 <object id="object5"> 68 <param name="url" value="object-param"></param> 69 <param name="type" value="application/x-webkit-test-netscape"></param> 70 </object> 54 71 </body> 55 72 </html> -
trunk/WebCore/ChangeLog
r67178 r67179 1 2010-09-10 Dirk Pranke <dpranke@chromium.org> 2 3 Unreviewed, rolling out r67178. 4 http://trac.webkit.org/changeset/67178 5 https://bugs.webkit.org/show_bug.cgi?id=45524 6 7 re-roll-out patch to put original changes back in 8 9 * html/HTMLObjectElement.cpp: 10 (WebCore::HTMLObjectElement::parametersForPlugin): 11 (WebCore::HTMLObjectElement::updateWidget): 12 * loader/SubframeLoader.cpp: 13 (WebCore::SubframeLoader::resourceWillUsePlugin): 14 * loader/SubframeLoader.h: 15 1 16 2010-09-10 Dirk Pranke <dpranke@chromium.org> 2 17 -
trunk/WebCore/html/HTMLObjectElement.cpp
r67178 r67179 164 164 { 165 165 HashSet<StringImpl*, CaseFoldingHash> uniqueParamNames; 166 String urlParameter; 166 167 167 168 // Scan the PARAM children and store their name/value pairs. … … 181 182 182 183 // FIXME: url adjustment does not belong in this function. 183 if (url.isEmpty() && (equalIgnoringCase(name, "src") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "code") || equalIgnoringCase(name, "url")))184 url = deprecatedParseURL(p->value());184 if (url.isEmpty() && urlParameter.isEmpty() && (equalIgnoringCase(name, "src") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "code") || equalIgnoringCase(name, "url"))) 185 urlParameter = deprecatedParseURL(p->value()); 185 186 // FIXME: serviceType calculation does not belong in this function. 186 187 if (serviceType.isEmpty() && equalIgnoringCase(name, "type")) { … … 218 219 mapDataParamToSrc(¶mNames, ¶mValues); 219 220 220 // If we still don't have a type, try to map from a specific CLASSID to a type. 221 if (serviceType.isEmpty()) 222 serviceType = serviceTypeForClassId(classId()); 221 // HTML5 says that an object resource's URL is specified by the object's data 222 // attribute, not by a param element. However, for compatibility, allow the 223 // resource's URL to be given by a param named "src", "movie", "code" or "url" 224 // if we know that resource points to a plug-in. 225 if (url.isEmpty() && !urlParameter.isEmpty()) { 226 SubframeLoader* loader = document()->frame()->loader()->subframeLoader(); 227 if (loader->resourceWillUsePlugin(urlParameter, serviceType)) 228 url = urlParameter; 229 } 223 230 } 224 231 … … 251 258 252 259 String url = this->url(); 260 261 // If the object does not specify a MIME type via a type attribute, but does 262 // contain a classid attribute, try to map the classid to a MIME type. 253 263 String serviceType = this->serviceType(); 264 if (serviceType.isEmpty()) 265 serviceType = serviceTypeForClassId(classId()); 254 266 255 267 // FIXME: These should be joined into a PluginParameters class. -
trunk/WebCore/loader/SubframeLoader.cpp
r67178 r67179 88 88 return true; 89 89 } 90 91 bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType) 92 { 93 KURL completedURL; 94 if (!url.isEmpty()) 95 completedURL = completeURL(url); 96 bool useFallback; 97 return shouldUsePlugin(completedURL, mimeType, false, useFallback); 98 } 90 99 91 100 bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const String& url, const AtomicString& frameName, -
trunk/WebCore/loader/SubframeLoader.h
r67178 r67179 76 76 77 77 bool containsPlugins() const { return m_containsPlugins; } 78 79 bool resourceWillUsePlugin(const String& url, const String& mimeType); 78 80 79 81 private:
Note: See TracChangeset
for help on using the changeset viewer.