Changeset 66652 in webkit
- Timestamp:
- Sep 2, 2010 2:32:05 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r66651 r66652 1 2010-09-02 Jer Noble <jer.noble@apple.com> 2 3 Reviewed by Darin Adler. 4 5 WebKit should not accept PDFs as video. 6 https://bugs.webkit.org/show_bug.cgi?id=45013 7 8 The code in MediaPlayerPrivate::createQTMovie has been re-arranged. 9 First, the component disabling is done only once. In 64-bit QTKit will 10 store the list of disabled components and disable them once QTKitServer 11 starts, so there is no need to disable them repeatedly. However, 12 because of a bug in 64-bit QTKit, additional requests of the exact same 13 component description will be ignored if QTKitServer is not yet running. 14 To work around this, we must provide the exact component flags for each 15 eat/PDF and grip/PDF component we wish to disable. 16 17 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: 18 (WebCore::disableComponentsOnce): Added. 19 (WebCore::MediaPlayerPrivate::createQTMovie): Moved the component 20 disabling code into disableComponentsOnce. 21 1 22 2010-09-02 Philippe Normand <pnormand@igalia.com> 2 23 -
trunk/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
r66632 r66652 262 262 } 263 263 264 void MediaPlayerPrivate::createQTMovie(NSURL *url, NSDictionary *movieAttributes) 265 { 266 // We must disable components each time we open a movie because we cannot guarantee 267 // that the QTKitServer process hasn't disappeared on us. eat/PDF and grip/PDF 268 // components must be disabled twice since they are registered twice with different 269 // flags: 270 uint32_t componentsToDisable[9][5] = { 264 static void disableComponentsOnce() 265 { 266 static bool sComponentsDisabled = false; 267 if (sComponentsDisabled) 268 return; 269 sComponentsDisabled = true; 270 271 // eat/PDF and grip/PDF components must be disabled twice since they are registered twice 272 // with different flags. However, there is currently a bug in 64-bit QTKit (<rdar://problem/8378237>) 273 // which causes subsequent disable component requests of exactly the same type to be ignored if 274 // QTKitServer has not yet started. As a result, we must pass in exactly the flags we want to 275 // disable per component. As a failsafe, if in the future these flags change, we will disable the 276 // PDF components for a third time with a wildcard flags field: 277 uint32_t componentsToDisable[11][5] = { 271 278 {'eat ', 'TEXT', 'text', 0, 0}, 272 279 {'eat ', 'TXT ', 'text', 0, 0}, 273 280 {'eat ', 'utxt', 'text', 0, 0}, 274 281 {'eat ', 'TEXT', 'tx3g', 0, 0}, 282 {'eat ', 'PDF ', 'vide', 0x44802, 0}, 283 {'eat ', 'PDF ', 'vide', 0x45802, 0}, 275 284 {'eat ', 'PDF ', 'vide', 0, 0}, 276 {' eat ', 'PDF ', 'vide', 0, 0},277 {'grip', 'PDF ', 'appl', 0 , 0},285 {'grip', 'PDF ', 'appl', 0x844a00, 0}, 286 {'grip', 'PDF ', 'appl', 0x845a00, 0}, 278 287 {'grip', 'PDF ', 'appl', 0, 0}, 279 288 {'imdc', 'pdf ', 'appl', 0, 0}, 280 289 }; 290 281 291 for (size_t i = 0; i < sizeof(componentsToDisable)/sizeof(componentsToDisable[0]); ++i) 282 wkQTMovieDisableComponent(componentsToDisable[i]); 292 wkQTMovieDisableComponent(componentsToDisable[i]); 293 } 294 295 void MediaPlayerPrivate::createQTMovie(NSURL *url, NSDictionary *movieAttributes) 296 { 297 disableComponentsOnce(); 283 298 284 299 [[NSNotificationCenter defaultCenter] removeObserver:m_objcObserver.get()];
Note: See TracChangeset
for help on using the changeset viewer.