Changeset 154527 in webkit
- Timestamp:
- Aug 23, 2013 3:44:15 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r154518 r154527 1 2013-08-23 Eric Carlson <eric.carlson@apple.com> 2 3 [Mac] some track language tags are not recognized 4 https://bugs.webkit.org/show_bug.cgi?id=119643 5 6 Reviewed by Jer Noble. 7 8 Explicitly set caption mode to "Automatic" so the track 'default' attribute works. 9 10 * media/track/text-track-cue-is-reachable.html: 11 * media/track/text-track-is-reachable.html: 12 * media/track/track-active-cues.html: 13 * media/track/track-cue-overlap-snap-to-lines-not-set.html: 14 * media/track/track-cue-rendering-horizontal.html: 15 * media/track/track-cue-rendering-vertical.html: 16 * media/track/track-kind.html: 17 * media/track/track-large-timestamp.html: 18 * media/track/track-mode.html: 19 * media/track/track-text-track-cue-list.html: 20 * media/track/track-webvtt-tc000-empty.html: 21 * media/track/track-webvtt-tc002-bom.html: 22 * media/track/track-webvtt-tc010-no-timings.html: 23 * media/track/track-webvtt-tc027-empty-cue.html: 24 * media/track/track-webvtt-tc028-unsupported-markup.html: 25 * media/track/track-word-breaking.html: 26 * media/video-test.js: 27 (setCaptionDisplayMode): 28 1 29 2013-08-23 Filip Pizlo <fpizlo@apple.com> 2 30 -
trunk/LayoutTests/media/track/text-track-cue-is-reachable.html
r102471 r154527 38 38 } 39 39 40 setCaptionDisplayMode('Automatic'); 41 40 42 </script> 41 43 </head> -
trunk/LayoutTests/media/track/text-track-is-reachable.html
r102471 r154527 39 39 } 40 40 41 setCaptionDisplayMode('Automatic'); 42 41 43 </script> 42 44 </head> -
trunk/LayoutTests/media/track/track-active-cues.html
r125793 r154527 40 40 video.src = findMediaFile("video", "../content/test"); 41 41 } 42 43 setCaptionDisplayMode('Automatic'); 42 44 43 45 </script> -
trunk/LayoutTests/media/track/track-cue-overlap-snap-to-lines-not-set.html
r150452 r154527 66 66 } 67 67 68 setCaptionDisplayMode('Automatic'); 68 69 </script> 69 70 </head> -
trunk/LayoutTests/media/track/track-cue-rendering-horizontal.html
r150260 r154527 27 27 28 28 <script src=../video-test.js></script> 29 <script> 30 setCaptionDisplayMode('Automatic'); 31 </script> 29 32 </head> 30 33 <body onload="loaded()"> -
trunk/LayoutTests/media/track/track-cue-rendering-vertical.html
r150260 r154527 28 28 29 29 <script src=../video-test.js></script> 30 <script> 31 setCaptionDisplayMode('Automatic'); 32 </script> 30 33 </head> 31 34 <body onload="loaded()"> -
trunk/LayoutTests/media/track/track-kind.html
r117811 r154527 77 77 } 78 78 79 setCaptionDisplayMode('Automatic'); 80 79 81 </script> 80 82 </head> -
trunk/LayoutTests/media/track/track-large-timestamp.html
r113583 r154527 21 21 } 22 22 23 setCaptionDisplayMode('Automatic'); 23 24 </script> 24 25 </head> -
trunk/LayoutTests/media/track/track-mode.html
r149197 r154527 46 46 setMode("disabled"); 47 47 48 setCaptionDisplayMode('ForcedOnly'); 49 48 50 waitForEvent('cuechange', cuechange); 49 51 video.addEventListener('playing', playing); … … 87 89 } 88 90 91 setCaptionDisplayMode('Automatic'); 89 92 </script> 90 93 </head> -
trunk/LayoutTests/media/track/track-text-track-cue-list.html
r102212 r154527 32 32 } 33 33 34 setCaptionDisplayMode('Automatic'); 34 35 </script> 35 36 </head> -
trunk/LayoutTests/media/track/track-webvtt-tc000-empty.html
r102212 r154527 16 16 } 17 17 18 setCaptionDisplayMode('Automatic'); 18 19 </script> 19 20 </head> -
trunk/LayoutTests/media/track/track-webvtt-tc002-bom.html
r104624 r154527 38 38 endTest(); 39 39 } 40 41 setCaptionDisplayMode('Automatic'); 40 42 </script> 41 43 </head> -
trunk/LayoutTests/media/track/track-webvtt-tc010-no-timings.html
r102212 r154527 22 22 } 23 23 24 setCaptionDisplayMode('Automatic'); 24 25 </script> 25 26 </head> -
trunk/LayoutTests/media/track/track-webvtt-tc027-empty-cue.html
r102212 r154527 16 16 } 17 17 18 setCaptionDisplayMode('Automatic'); 18 19 </script> 19 20 </head> -
trunk/LayoutTests/media/track/track-webvtt-tc028-unsupported-markup.html
r104624 r154527 35 35 } 36 36 37 setCaptionDisplayMode('Automatic'); 37 38 </script> 38 39 </head> -
trunk/LayoutTests/media/track/track-word-breaking.html
r138282 r154527 32 32 } 33 33 34 setCaptionDisplayMode('Automatic'); 34 35 </script> 35 36 </head> -
trunk/LayoutTests/media/video-test.js
r153568 r154527 358 358 } 359 359 } 360 361 function setCaptionDisplayMode(mode) 362 { 363 if (window.internals) 364 internals.setCaptionDisplayMode(mode); 365 else 366 consoleWrite("<br><b>** This test only works in DRT! **<" + "/b><br>"); 367 368 } -
trunk/Source/WebCore/ChangeLog
r154526 r154527 1 2013-08-23 Brent Fulgham <bfulgham@apple.com> 2 3 [Windows] Unreviewed build correction. Need to force environment variable 4 to be escaped when running nmake command. 5 6 * WebCore.vcxproj/WebCoreGenerated.make: 7 8 2013-08-23 Antti Koivisto <antti@apple.com> 9 10 Use ElementTraversal some more 11 https://bugs.webkit.org/show_bug.cgi?id=120226 12 13 Reviewed by Darin Adler. 14 15 More traversal with tighter typing. 16 17 * accessibility/AccessibilityNodeObject.cpp: 18 (WebCore::AccessibilityNodeObject::canvasHasFallbackContent): 19 (WebCore::siblingWithAriaRole): 20 * accessibility/AccessibilityTable.cpp: 21 (WebCore::AccessibilityTable::isDataTable): 22 * css/CSSFontFaceSource.cpp: 23 (WebCore::CSSFontFaceSource::getFontData): 24 * dom/ContainerNode.cpp: 25 (WebCore::willRemoveChild): 26 * dom/ContainerNodeAlgorithms.h: 27 (WebCore::ChildFrameDisconnector::ChildFrameDisconnector): 28 (WebCore::ChildFrameDisconnector::collectFrameOwners): 29 (WebCore::ChildFrameDisconnector::disconnect): 1 2013-08-23 Eric Carlson <eric.carlson@apple.com> 2 3 [Mac] some track language tags are not recognized 4 https://bugs.webkit.org/show_bug.cgi?id=119643 5 6 Reviewed by Jere Noble. 7 8 No new tests, existing tests updated. 9 30 10 * html/HTMLMediaElement.cpp: 31 (WebCore::HTMLMediaElement::selectMediaResource): 32 (WebCore::HTMLMediaElement::textTrackModeChanged): 33 (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): 34 * html/HTMLObjectElement.cpp: 35 (WebCore::HTMLObjectElement::parametersForPlugin): 36 (WebCore::HTMLObjectElement::containsJavaApplet): 37 * html/HTMLParamElement.h: 38 (WebCore::isHTMLParamElement): 39 (WebCore::HTMLParamElement): 40 * html/HTMLSourceElement.h: 41 (WebCore::isHTMLSourceElement): 42 (WebCore::HTMLSourceElement): 43 * svg/SVGFontFaceElement.h: 44 (WebCore::isSVGFontFaceElement): 45 (WebCore::SVGFontFaceElement): 46 (WebCore::toSVGFontFaceElement): 47 48 2013-08-23 Andreas Kling <akling@apple.com> 49 50 Let Document keep its RenderView during render tree attach. 51 <https://webkit.org/b/120224> 52 53 Reviewed by Antti Koivisto. 54 55 Remove prehistoric code that cleared Document's renderer pointer during tree attach. 56 57 * dom/Document.cpp: 58 (WebCore::Document::attach): 59 60 2013-08-23 Darin Adler <darin@apple.com> 61 62 Reduce use of Node in HTMLTableRowsCollection, and use modern traversal idiom 63 https://bugs.webkit.org/show_bug.cgi?id=120222 64 65 Reviewed by Antti Koivisto. 66 67 * html/HTMLTableRowElement.h: 68 (WebCore::isHTMLTableRowElement): Added. 69 (WebCore::isElementOfType<HTMLTableRowElement>): Added. 70 (WebCore::toHTMLTableRowElement): Added. 71 72 * html/HTMLTableRowsCollection.cpp: 73 (WebCore::assertRowIsInTable): Refactored a bit. Changed #if as Andy Estes 74 requested during rewview and got rid of local variables. 75 (WebCore::HTMLTableRowsCollection::rowAfter): Moved a ocmment in here. 76 Changed code to traverse elements instead of nodes, and used the Traversal<> 77 template to eliminate some loops entirely. 78 (WebCore::HTMLTableRowsCollection::lastRow): Ditto. 79 (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): Changed argument 80 type from Node to HTMLTableElement. 81 (WebCore::HTMLTableRowsCollection::create): Added an assertion for the value 82 of the collection type argument, and added the typecast here needed for the 83 change above. 84 (WebCore::HTMLTableRowsCollection::virtualItemAfter): Removed the assertion 85 here that was a subset of the assertion we now have inside the rowAfter function. 86 87 * html/HTMLTableRowsCollection.h: Added FINAL. Made single-argument constructor 88 explicit. 89 90 2013-08-23 Alex Christensen <achristensen@apple.com> 91 92 Re-separating Win32 and Win64 builds. 93 https://bugs.webkit.org/show_bug.cgi?id=120178 94 95 Reviewed by Brent Fulgham. 96 97 * WebCore.vcxproj/WebCoreGenerated.make: 98 * WebCore.vcxproj/WebCoreGeneratedWinCairo.make: 99 Pass PlatformArchitecture as a command line parameter to bash scripts 100 and use PlatformArchitecture to determine which directory to delete 101 while cleaning (obj32 or obj64). 102 * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props: 103 Export PlatformArchitecture to be used by make and cmd scripts. 104 * WebCore.vcxproj/build-generated-files.sh: 105 Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64). 106 * WebCore.vcxproj/copyForwardingHeaders.cmd: 107 * WebCore.vcxproj/copyWebCoreResourceFiles.cmd: 108 Use PlatformArchitecture to determine which directory to copy to (obj32 or obj64). 109 11 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_captionDisplayMode from settings 12 if possible. 13 (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't enable a default track when preferences 14 say captions should be disabled. Don't disable an already visible track if we don't find 15 a match unless preferences say captions should be disabled. m_forcedOrAutomaticSubtitleTrackLanguage -> 16 m_subtitleTrackLanguage. 17 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): If the language of the primary 18 audio track changes, only kick off a text track recalc if caption preference are set to "automatic". 19 * html/HTMLMediaElement.h: 20 21 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: 22 (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Initialize m_characteristicsChanged 23 and m_delayCharacteristicsChangedNotification. 24 (WebCore::MediaPlayerPrivateAVFoundation::setHasVideo): Call characteristicsChanged. 25 (WebCore::MediaPlayerPrivateAVFoundation::setHasAudio): Ditto. 26 (WebCore::MediaPlayerPrivateAVFoundation::setHasClosedCaptions): Ditto. 27 (WebCore::MediaPlayerPrivateAVFoundation::characteristicsChanged): New, allows us to coalesce 28 calls to the media player when we know several characteristics may change. 29 (WebCore::MediaPlayerPrivateAVFoundation::setDelayCharacteristicsChangedNotification): Enable or 30 disable notification delay. 31 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: 32 33 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 34 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(), 35 a track may have changed so we may have a new language. 36 (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode] 37 if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old 38 QuickTime language code. 110 39 111 40 2013-08-23 Andreas Kling <akling@apple.com> -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r154525 r154527 341 341 #if ENABLE(VIDEO_TRACK) 342 342 document->registerForCaptionPreferencesChangedCallbacks(this); 343 if (document->page()) 344 m_captionDisplayMode = document->page()->group().captionPreferences()->captionDisplayMode(); 343 345 #endif 344 346 } … … 3214 3216 Page* page = document()->page(); 3215 3217 CaptionUserPreferences* captionPreferences = page? page->group().captionPreferences() : 0; 3218 CaptionUserPreferences::CaptionDisplayMode displayMode = captionPreferences ? captionPreferences->captionDisplayMode() : CaptionUserPreferences::Automatic; 3216 3219 3217 3220 // First, find the track in the group that should be enabled (if any). … … 3260 3263 // element's list of text tracks whose text track mode is showing or showing by default 3261 3264 // Let the text track mode be showing by default. 3262 defaultTrack = textTrack; 3265 if (group.kind != TrackGroup::CaptionsAndSubtitles || displayMode != CaptionUserPreferences::ForcedOnly) 3266 defaultTrack = textTrack; 3263 3267 } 3264 3268 } … … 3266 3270 if (!trackToEnable && defaultTrack) 3267 3271 trackToEnable = defaultTrack; 3268 3272 3269 3273 // If no track matches the user's preferred language, none was marked as 'default', and there is a forced subtitle track 3270 3274 // in the same language as the language of the primary audio track, enable it. … … 3272 3276 trackToEnable = forcedSubitleTrack; 3273 3277 3278 // If no track matches, don't disable an already visible track unless preferences say they all should be off. 3279 if (group.kind != TrackGroup::CaptionsAndSubtitles || displayMode != CaptionUserPreferences::ForcedOnly) { 3280 if (!trackToEnable && !defaultTrack && group.visibleTrack) 3281 trackToEnable = group.visibleTrack; 3282 } 3283 3274 3284 // If no track matches the user's preferred language and non was marked 'default', enable the first track 3275 3285 // because the user has explicitly stated a preference for this kind of track. … … 3277 3287 trackToEnable = fallbackTrack; 3278 3288 3279 if ( !defaultTrack && trackToEnable && trackToEnable != fallbackTrack && m_captionDisplayMode != CaptionUserPreferences::AlwaysOn)3280 m_ forcedOrAutomaticSubtitleTrackLanguage = trackToEnable->language();3289 if (trackToEnable) 3290 m_subtitleTrackLanguage = trackToEnable->language(); 3281 3291 else 3282 m_ forcedOrAutomaticSubtitleTrackLanguage = emptyString();3292 m_subtitleTrackLanguage = emptyString(); 3283 3293 3284 3294 if (currentlyEnabledTracks.size()) { … … 3841 3851 3842 3852 #if ENABLE(VIDEO_TRACK) 3843 if (m_ forcedOrAutomaticSubtitleTrackLanguage != m_player->languageOfPrimaryAudioTrack())3853 if (m_captionDisplayMode == CaptionUserPreferences::Automatic && m_subtitleTrackLanguage != m_player->languageOfPrimaryAudioTrack()) 3844 3854 markCaptionAndSubtitleTracksAsUnconfigured(AfterDelay); 3845 3855 #endif -
trunk/Source/WebCore/html/HTMLMediaElement.h
r154371 r154527 725 725 bool m_processingPreferenceChange : 1; 726 726 727 String m_ forcedOrAutomaticSubtitleTrackLanguage;727 String m_subtitleTrackLanguage; 728 728 float m_lastTextTrackUpdateTime; 729 729 -
trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
r152884 r154527 64 64 , m_requestedRate(1) 65 65 , m_delayCallbacks(0) 66 , m_delayCharacteristicsChangedNotification(0) 66 67 , m_mainThreadCallPending(false) 67 68 , m_assetIsPlayable(false) … … 76 77 , m_playWhenFramesAvailable(false) 77 78 , m_inbandTrackConfigurationPending(false) 79 , m_characteristicsChanged(false) 78 80 , m_seekCount(0) 79 81 { … … 329 331 if (m_cachedHasVideo != b) { 330 332 m_cachedHasVideo = b; 331 m_player->characteristicChanged();333 characteristicsChanged(); 332 334 } 333 335 } … … 337 339 if (m_cachedHasAudio != b) { 338 340 m_cachedHasAudio = b; 339 m_player->characteristicChanged();341 characteristicsChanged(); 340 342 } 341 343 } … … 345 347 if (m_cachedHasCaptions != b) { 346 348 m_cachedHasCaptions = b; 347 m_player->characteristicChanged(); 348 } 349 characteristicsChanged(); 350 } 351 } 352 353 void MediaPlayerPrivateAVFoundation::characteristicsChanged() 354 { 355 if (m_delayCharacteristicsChangedNotification) { 356 m_characteristicsChanged = true; 357 return; 358 } 359 360 m_characteristicsChanged = false; 361 m_player->characteristicChanged(); 362 } 363 364 void MediaPlayerPrivateAVFoundation::setDelayCharacteristicsChangedNotification(bool delay) 365 { 366 if (delay) { 367 m_delayCharacteristicsChangedNotification++; 368 return; 369 } 370 371 ASSERT(m_delayCharacteristicsChangedNotification); 372 m_delayCharacteristicsChangedNotification--; 373 if (!m_delayCharacteristicsChangedNotification && m_characteristicsChanged) 374 characteristicsChanged(); 349 375 } 350 376 -
trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
r152876 r154527 235 235 void setHasAudio(bool); 236 236 void setHasClosedCaptions(bool); 237 void characteristicsChanged(); 238 void setDelayCharacteristicsChangedNotification(bool); 237 239 void setDelayCallbacks(bool) const; 238 240 void setIgnoreLoadStateChanges(bool delay) { m_ignoreLoadStateChanges = delay; } … … 293 295 float m_requestedRate; 294 296 mutable int m_delayCallbacks; 297 int m_delayCharacteristicsChangedNotification; 295 298 bool m_mainThreadCallPending; 296 299 bool m_assetIsPlayable; … … 305 308 bool m_playWhenFramesAvailable; 306 309 bool m_inbandTrackConfigurationPending; 310 bool m_characteristicsChanged; 307 311 size_t m_seekCount; 308 312 }; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r154127 r154527 989 989 return; 990 990 991 setDelayCharacteristicsChangedNotification(true); 992 991 993 bool haveCCTrack = false; 992 994 bool hasCaptions = false; … … 1048 1050 sizeChanged(); 1049 1051 1050 if (!primaryAudioTrackLanguage.isNull() && primaryAudioTrackLanguage != languageOfPrimaryAudioTrack()) 1051 player()->characteristicChanged(); 1052 if (primaryAudioTrackLanguage != languageOfPrimaryAudioTrack()) 1053 characteristicsChanged(); 1054 1055 setDelayCharacteristicsChangedNotification(false); 1052 1056 } 1053 1057 … … 1499 1503 AVAssetTrack *track = [tracks objectAtIndex:0]; 1500 1504 NSString *language = [track extendedLanguageTag]; 1505 1506 // If the language code is stored as a QuickTime 5-bit packed code there aren't enough bits for a full 1507 // RFC 4646 language tag so extendedLanguageTag returns NULL. In this case languageCode will return the 1508 // ISO 639-2/T language code so check it. 1509 if (!language) 1510 language = [track languageCode]; 1501 1511 1502 1512 // Some legacy tracks have "und" as a language, treat that the same as no language at all.
Note: See TracChangeset
for help on using the changeset viewer.