Changeset 70748 in webkit
- Timestamp:
- Oct 27, 2010 11:15:09 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r70746 r70748 1 2010-10-27 Andy Estes <aestes@apple.com> 2 3 Reviewed by Adam Barth. 4 5 r66156 broke AtlasCT library, formerly affected http://map.d.co.il/ 6 https://bugs.webkit.org/show_bug.cgi?id=45679 7 8 * fast/dom/object-embed-plugin-scripting.html: Changed classid 9 attributes to type attributes. 10 * fast/dom/object-plugin-hides-properties.html: Ditto. 11 * fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt: Added. 12 * fast/replaced/object-with-non-empty-classid-triggers-fallback.html: Added. 13 1 14 2010-10-27 Kinuko Yasuda <kinuko@chromium.org> 2 15 -
trunk/LayoutTests/fast/dom/object-embed-plugin-scripting.html
r66156 r70748 35 35 <OBJECT 36 36 id="myO" 37 classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"37 type="audio/mp4" 38 38 width = 0 height = 0 39 39 > … … 101 101 <object 102 102 name="Plugin" 103 classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"103 type="audio/mp4" 104 104 width = 0 height = 0 105 105 > -
trunk/LayoutTests/fast/dom/object-plugin-hides-properties.html
r11995 r70748 20 20 </p> 21 21 <p id="result"></p> 22 <object id="obj" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"><!-- quicktime -->22 <object id="obj" type="video/quicktime"><!-- quicktime --> 23 23 </object> 24 24 </body> -
trunk/WebCore/ChangeLog
r70745 r70748 1 2010-10-27 Andy Estes <aestes@apple.com> 2 3 Reviewed by Adam Barth. 4 5 r66156 broke AtlasCT library, formerly affected http://map.d.co.il/ 6 https://bugs.webkit.org/show_bug.cgi?id=45679 7 8 This patch removes WebKit's map of classid values to MIME types. It also 9 changes the behavior of object elements to render fallback content when 10 a non-empty classid attribute is specified, which is the behavior HTML5 11 specifies when a UA encounters a classid it doesn't understand. 12 13 Test: fast/replaced/object-with-non-empty-classid-triggers-fallback.html 14 15 * html/HTMLObjectElement.cpp: Remove serviceTypeForClassId(), 16 createClassIdToTypeMap(), and the ClassIdToTypeMap typedef. 17 (WebCore::HTMLObjectElement::updateWidget): Do not call 18 serviceTypeForClassId() when there is no type attribute, and render 19 fallback content if the classid attribute is non-empty. 20 1 21 2010-10-27 Eric Uhrhane <ericu@chromium.org> 2 22 -
trunk/WebCore/html/HTMLObjectElement.cpp
r69596 r70748 117 117 } 118 118 119 typedef HashMap<String, String, CaseFoldingHash> ClassIdToTypeMap;120 121 static ClassIdToTypeMap* createClassIdToTypeMap()122 {123 ClassIdToTypeMap* map = new ClassIdToTypeMap;124 map->add("clsid:D27CDB6E-AE6D-11CF-96B8-444553540000", "application/x-shockwave-flash");125 map->add("clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA", "audio/x-pn-realaudio-plugin");126 map->add("clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B", "video/quicktime");127 map->add("clsid:166B1BCA-3F9C-11CF-8075-444553540000", "application/x-director");128 map->add("clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6", "application/x-mplayer2");129 map->add("clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95", "application/x-mplayer2");130 return map;131 }132 133 static String serviceTypeForClassId(const String& classId)134 {135 // Return early if classId is empty (since we won't do anything below).136 // Furthermore, if classId is null, calling get() below will crash.137 if (classId.isEmpty())138 return String();139 140 static ClassIdToTypeMap* map = createClassIdToTypeMap();141 return map->get(classId);142 }143 144 119 static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramValues) 145 120 { … … 256 231 if (!isFinishedParsingChildren()) 257 232 return; 258 233 259 234 String url = this->url(); 260 261 // If the object does not specify a MIME type via a type attribute, but does262 // contain a classid attribute, try to map the classid to a MIME type.263 235 String serviceType = this->serviceType(); 264 if (serviceType.isEmpty())265 serviceType = serviceTypeForClassId(classId());266 236 267 237 // FIXME: These should be joined into a PluginParameters class. … … 292 262 return; 293 263 264 // HTML5 says that fallback content should be rendered if a non-empty 265 // classid is specified for which the UA can't find a suitable plug-in. 266 bool hasEmptyClassId = classId().isEmpty(); 267 294 268 SubframeLoader* loader = document()->frame()->loader()->subframeLoader(); 295 bool success = beforeLoadAllowedLoad && loader->requestObject(this, url, getAttribute(nameAttr), serviceType, paramNames, paramValues);269 bool success = beforeLoadAllowedLoad && hasEmptyClassId && loader->requestObject(this, url, getAttribute(nameAttr), serviceType, paramNames, paramValues); 296 270 297 271 if (!success && fallbackContent)
Note: See TracChangeset
for help on using the changeset viewer.