1. 27 Mar, 2013 1 commit
    • eric.carlson@apple.com's avatar
      [Mac] webkitClosedCaptionsVisible doesn't work · 92907e15
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113417
      
      Reviewed by Jer Noble.
      
      Source/WebCore: 
      
      Test: media/track/track-in-band-legacy-api.html
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Delete m_disableCaptions, it is no longer used.
      (WebCore::HTMLMediaElement::configureTextTrackGroup): Pass this to textTrackSelectionScore.
      (WebCore::HTMLMediaElement::setClosedCaptionsVisible):  Delete m_disableCaptions, it is no longer used.
      * html/HTMLMediaElement.h: Ditto.
      
      * page/CaptionUserPreferences.cpp:
      (WebCore::CaptionUserPreferences::textTrackSelectionScore): Add an HTMLMediaElement parameter.
      * page/CaptionUserPreferences.h:
      
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Return a score if the media element
          is showing captions, even if the preference says captions are disabled.
      
      LayoutTests: 
      
      * media/track/track-in-band-legacy-api-expected.txt: Added.
      * media/track/track-in-band-legacy-api.html: Added.
      
      * platform/chromium/TestExpectations: Skip new test.
      * platform/efl/TestExpectations: Ditto.
      * platform/gtk/TestExpectations: Ditto.
      * platform/mac/TestExpectations: Ditto.
      * platform/qt/TestExpectations: Ditto.
      * platform/win/TestExpectations: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92907e15
  2. 25 Mar, 2013 1 commit
  3. 22 Mar, 2013 1 commit
    • eric.carlson@apple.com's avatar
      Cleanup text track selection logic · d4e6f18f
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113062
      
      Reviewed by Jer Noble.
      
      No new tests, covered by existing tests.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Remove.
      (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't look at track attributes directly,
          use captionPreferences->textTrackSelectionScore to calculate track rank.
      (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Set m_processingPreferenceChange here
          instead of in captionPreferencesChanged.
      (WebCore::HTMLMediaElement::captionPreferencesChanged): Don't suppress calls to setClosedCaptionsVisible,
          existing code already makes sure we don't do unnecessary work.
      * html/HTMLMediaElement.h:
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Drive by cleanup, don't
          process inactive cues.
      
      * html/shadow/MediaControlsApple.cpp:
      (WebCore::MediaControlsApple::changedClosedCaptionsVisibility): Call resetTrackListMenu instead
          of updateDisplay so we only mark the menu as needing a recalculation and do the work when
          it is displayed.
      
      * page/CaptionUserPreferences.cpp:
      (WebCore::CaptionUserPreferences::shouldShowCaptions): When in testing mode, return true if
          the caption or subtitle preference has been set.
      (WebCore::CaptionUserPreferences::setShouldShowCaptions): In testing mode, clear the caption
          and subtitle preference when passed false.
      (WebCore::CaptionUserPreferences::textTrackSelectionScore): Calculate the track score based on
          track type preference and preferred language.
      (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Score a track according to
          the language presence and position in the preferred languages list.
      * page/CaptionUserPreferences.h:
      
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate track language score 
          according to user preferences.
      
      * platform/Language.cpp:
      (WebCore::indexOfBestMatchingLanguageInList): Repurposed the static bestMatchingLanguage
          function to return the location of a language in a Vector.
      (WebCore::preferredLanguageFromList): Removed.
      * platform/Language.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d4e6f18f
  4. 21 Mar, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Remove upcastPointer from ActiveDOMObject constructor · 433a0b5e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112858
      
      Patch by Russell McClellan <russell.mcclellan@gmail.com> on 2013-03-21
      Reviewed by Alexey Proskuryakov.
      
      Removed pesky argument to ActiveDOMObject constructor that is no longer
      used.
      
      No new tests (no change in behavior).
      
      * Modules/battery/BatteryManager.cpp:
      (WebCore::BatteryManager::BatteryManager):
      * Modules/filesystem/DOMFileSystem.cpp:
      (WebCore::DOMFileSystem::DOMFileSystem):
      * Modules/filesystem/FileWriter.cpp:
      (WebCore::FileWriter::FileWriter):
      * Modules/geolocation/Geolocation.cpp:
      (WebCore::Geolocation::Geolocation):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::IDBDatabase):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::IDBRequest):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::IDBTransaction):
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::MediaSource):
      * Modules/mediastream/MediaStreamTrack.cpp:
      (WebCore::MediaStreamTrack::MediaStreamTrack):
      * Modules/mediastream/RTCDTMFSender.cpp:
      (WebCore::RTCDTMFSender::RTCDTMFSender):
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::RTCPeerConnection):
      * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
      (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
      * Modules/mediastream/RTCStatsRequestImpl.cpp:
      (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
      * Modules/mediastream/RTCVoidRequestImpl.cpp:
      (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
      * Modules/networkinfo/NetworkInfoConnection.cpp:
      (WebCore::NetworkInfoConnection::NetworkInfoConnection):
      * Modules/notifications/Notification.cpp:
      (WebCore::Notification::Notification):
      * Modules/notifications/NotificationCenter.cpp:
      (WebCore::NotificationCenter::NotificationCenter):
      * Modules/speech/SpeechRecognition.cpp:
      (WebCore::SpeechRecognition::SpeechRecognition):
      * Modules/webaudio/AudioContext.cpp:
      (WebCore::AudioContext::AudioContext):
      * Modules/webdatabase/DatabaseContext.cpp:
      (WebCore::DatabaseContext::DatabaseContext):
      * Modules/websockets/WebSocket.cpp:
      (WebCore::WebSocket::WebSocket):
      * css/FontLoader.cpp:
      (WebCore::FontLoader::FontLoader):
      * dom/ActiveDOMObject.cpp:
      (WebCore::ActiveDOMObject::ActiveDOMObject):
      * dom/ActiveDOMObject.h:
      (ActiveDOMObject):
      * dom/ScriptExecutionContext.cpp:
      (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
      (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
      (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
      (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
      (WebCore::ScriptExecutionContext::didCreateActiveDOMObject):
      * dom/ScriptExecutionContext.h:
      (ScriptExecutionContext):
      (WebCore::ScriptExecutionContext::activeDOMObjects):
      * fileapi/FileReader.cpp:
      (WebCore::FileReader::FileReader):
      * html/HTMLMarqueeElement.cpp:
      (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement):
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      (WebCore::WebGLRenderingContext::WebGLRenderingContext):
      * loader/Prerenderer.cpp:
      (WebCore::Prerenderer::Prerenderer):
      * page/EventSource.cpp:
      (WebCore::EventSource::EventSource):
      * page/SuspendableTimer.cpp:
      (WebCore::SuspendableTimer::SuspendableTimer):
      * workers/AbstractWorker.cpp:
      (WebCore::AbstractWorker::AbstractWorker):
      * workers/WorkerContext.cpp:
      (WebCore::WorkerContext::hasPendingActivity):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::XMLHttpRequest):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      433a0b5e
  5. 20 Mar, 2013 1 commit
    • eric.carlson@apple.com's avatar
      Allow ports specific text track menu · 62bb7dc9
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112800
      
      Reviewed by Dean Jackson.
      
      Source/WebCore: 
      
      No new tests, existing tests updated for changes.
      
      * English.lproj/Localizable.strings: Add localizable strings for text track names.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): userPrefersCaptions -> shouldShowCaptions.
      (WebCore::HTMLMediaElement::setSelectedTextTrack): toggleTrackAtIndex -> setSelectedTextTrack.
      (WebCore::HTMLMediaElement::userPrefersCaptions): userPrefersCaptions -> shouldShowCaptions.
      (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Get preferences from CaptionUserPreferences
          instead of from Settings.
      (WebCore::HTMLMediaElement::setSelectedTextTrack): Renamed from toggleTrackAtIndex. Now takes
          a TextTrack* instead of an int.
      (WebCore::HTMLMediaElement::captionPreferencesChanged): Don't force a recalculation unless 
          captions are enabled/disabled to avoid unnecessary thrash.
      * html/HTMLMediaElement.h:
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Use the menu to track
          map instead of just the track index.
      (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Build and configure the
          menu from the menu to track map.
      (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Start with a list
          of tracks already sorted according to platform specific rules. Build a menu to track map
          so tracks are retained while the menu is visible.
      * html/shadow/MediaControlElements.h:
      
      * html/shadow/MediaControls.cpp:
      (WebCore::MediaControls::textTrackPreferencesChanged): Call closedCaptionTracksChanged so the
          track menu will be rebuilt before it is shown again.
      
      * html/track/InbandTextTrack.cpp:
      (WebCore::InbandTextTrack::containsOnlyForcedSubtitles): New, passthrough to the private track.
      (WebCore::InbandTextTrack::isMainProgramContent): Ditto.
      (WebCore::InbandTextTrack::isEasyToRead): Ditto.
      * html/track/InbandTextTrack.h:
      * html/track/TextTrack.h:
      
      * html/track/TextTrackList.cpp:
      (WebCore::TextTrackList::contains): New.
      * html/track/TextTrackList.h:
      
      * page/CaptionUserPreferences.cpp:
      (WebCore::CaptionUserPreferences::CaptionUserPreferences): Pull in from .h ditto.
      (WebCore::CaptionUserPreferences::~CaptionUserPreferences): Ditto.
      (WebCore::CaptionUserPreferences::shouldShowCaptions): Renamed from userPrefersCaptions. 
      (WebCore::CaptionUserPreferences::setShouldShowCaptions): New.
      (WebCore::CaptionUserPreferences::userPrefersCaptions): Ditto.
      (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
      (WebCore::CaptionUserPreferences::userPrefersSubtitles): Ditto.
      (WebCore::CaptionUserPreferences::setUserPrefersSubtitles): Ditto.
      (WebCore::CaptionUserPreferences::userPrefersTextDescriptions): Ditto.
      (WebCore::CaptionUserPreferences::setUserPrefersTextDescriptions): Ditto.
      (WebCore::CaptionUserPreferences::displayNameForTrack): Ditto.
      (WebCore::CaptionUserPreferences::sortedTrackListForMenu): Ditto.
      * page/CaptionUserPreferences.h:
      
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::shouldShowCaptions): Renamed from userPrefersCaptions. 
      (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): New.
      (WebCore::CaptionUserPreferences::userPrefersSubtitles): Ditto.
      (WebCore::trackDisplayName): Update logic used to build track title.
      (WebCore::CaptionUserPreferencesMac::displayNameForTrack): Call trackDisplayName.
      (WebCore::textTrackCompare): Text track title sort comparison function.
      (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): New. Sort the list of tracks
          according to title, language, and user preferences.
      
      * platform/Language.cpp:
      (WebCore::displayNameForLanguageLocale): Don't leak the CFLocale.
              
      * platform/LocalizedStrings.cpp:
      (WebCore::textTrackCountryAndLanguageMenuItemText): New.
      (WebCore::textTrackLanguageMenuItemText): Ditto.
      (WebCore::closedCaptionTrackMenuItemText): Ditto.
      (WebCore::sdhTrackMenuItemText): Ditto.
      (WebCore::easyReaderTrackMenuItemText): Ditto.
      * platform/LocalizedStrings.h:
      
      * platform/graphics/InbandTextTrackPrivate.h:
      * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
      * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
      (WebCore::InbandTextTrackPrivateAVFObjC::containsOnlyForcedSubtitles): New, return AVFoundation property.
      (WebCore::InbandTextTrackPrivateAVFObjC::isMainProgramContent): Ditto.
      (WebCore::InbandTextTrackPrivateAVFObjC::isEasyToRead): Ditto.
      
      * testing/InternalSettings.cpp:
      (WebCore::InternalSettings::setShouldDisplayTrackKind): Set setting via CaptionUserPreferences
          instead of from Settings.
      (WebCore::InternalSettings::shouldDisplayTrackKind): Get setting from CaptionUserPreferences
          instead of from Settings.
      
      Source/WebKit: 
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add new exports.
      * win/WebKit.vcproj/WebKitExports.def.in: Ditto.
      
      LayoutTests: 
      
      * media/track/track-user-preferences-expected.txt:
      * media/track/track-user-preferences.html:
      * media/video-controls-captions-trackmenu-localized.html:
      * media/video-controls-captions-trackmenu-sorted.html:
      * media/video-controls-captions-trackmenu.html:
      * platform/mac/media/video-controls-captions-trackmenu-expected.txt:
      * platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt:
      * platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62bb7dc9
  6. 14 Mar, 2013 1 commit
    • jer.noble@apple.com's avatar
      Crash in DumpRenderTree at com.apple.WebCore:... · c3419e02
      jer.noble@apple.com authored
      Crash in DumpRenderTree at com.apple.WebCore: WebCore::CaptionUserPreferences::captionPreferencesChanged + 185
      https://bugs.webkit.org/show_bug.cgi?id=112051
      
      Reviewed by Eric Carlson.
      
      No new tests; fixes a crash during media/video-controls-captions-trackmenu.html.
      
      Instead of relying on a registration system which can fail when an element's document does not have a page,
      Elements will register for captionPreferencesChanged() notifications directly with their owning Document.
      CaptionUserPreferences, in turn, will notify all Documents in its PageGroup, rather than only directly
      registered listeners.
      
      * dom/Document.cpp:
      (WebCore::Document::registerForCaptionPreferencesChangedCallbacks): Added. Notify the CaptionUserPreferences that someone
          is interested in captionPreferencesChanged notfications.
      (WebCore::Document::unregisterForCaptionPreferencesChangedCallbacks): Added.
      (WebCore::Document::captionPreferencesChanged): Added. Pass to all registered elements.
      * dom/Document.h:
      * dom/Element.h:
      (WebCore::Element::captionPreferencesChanged): Added. Empty; intended
          to be overridden by subclasses.
      * history/CachedPage.cpp:
      (WebCore::CachedPage::CachedPage): Initialize m_needsCaptionPreferenceChanged member.
      (WebCore::CachedPage::restore): Call captionPreferencesChanged() if necessary.
      * history/CachedPage.h:
      (WebCore::CachedPage::markForCaptionPreferencesChanged): Set the m_needsCaptionPreferenceChanged member.
      * history/PageCache.cpp:
      (WebCore::PageCache::markPagesForCaptionPreferencesChanged): Pass to every CachedPage.
      * history/PageCache.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Register with the Document.
      (WebCore::HTMLMediaElement::~HTMLMediaElement): Unregister with same.
      (WebCore::HTMLMediaElement::attach): Remove previous registration call.
      * html/HTMLMediaElement.h:
      * page/CaptionUserPreferences.cpp:
      (WebCore::CaptionUserPreferences::captionPreferencesChanged): Pass to the
          PageGroup.
      * page/CaptionUserPreferences.h:
      (WebCore::CaptionUserPreferences::setInterestedInCaptionPreferenceChanges):
          Empty; intended to be overridden by subclasses.
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::setInterestedInCaptionPreferenceChanges):
          Renamed from registerForPreferencesChangedCallbacks().
      (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged):
          Replace call to havePreferenceChangeListeners() with m_listeningForPreferenceChanges.
      * page/Page.cpp:
      (WebCore::Page::captionPreferencesChanged):
          Pass to every contained Document.
      * page/Page.h:
      * page/CaptionUserPreferences.cpp:
      (WebCore::CaptionUserPreferences::captionPreferencesChanged): Pass to the PageGroup.
      * page/CaptionUserPreferences.h:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::captionPreferencesChanged): Pass to every page, as well as pages in the PageCache.
      * page/PageGroup.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3419e02
  7. 13 Mar, 2013 2 commits
    • commit-queue@webkit.org's avatar
      Add the default video poster if it doesn't exist in video tag · 25fd37ef
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110263
      
      Patch by Tao Bai <michaelbai@chromium.org> on 2013-03-13
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Tests: media/video-default-poster.html
             media/video-no-default-poster.html
      
      The Android web view application could provide the default poster
      for a video that doesn't have the poster attribute.
      
      To provide the default poster, the application must set defaultVideoPosterURL
      setting and return the image in the response of that URL.
      
      The way to do this would be:
      
      A) Replace the Element::imageSourceAttributeName function with an
         Element::imageSourceURL function that returns the imageSourceURL as a
         const AtomicString&. The body will be the same as before, it will just also
         include a call to getAttribute. Also will need to revise the four classes
         that override that function.
      
      B) Add a new HTMLVideoElement::posterImageURL function that implements the
         default poster URL logic.
      
      C) Update the four functions that get the poster attribute to handle poster
         loading and display to call posterImageURL.
      
         1) HTMLVideoElement::imageSourceURL.
         2) HTMLVideoElement::setDisplayMode.
         3) HTMLVideoElement::updateDisplayState.
         4) HTMLMediaElement::getPluginProxyParams. Will need to cast to
            HTMLVideoElement after checking isVideo.
      
      * dom/Element.cpp:
      (WebCore::Element::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
      * dom/Element.h: Replace imageSourceAttributeName() with imageSourceURL()
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
      * html/HTMLEmbedElement.h: Replace imageSourceAttributeName() with imageSourceURL()
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::getPluginProxyParams): Change to use posterImageURL
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
      * html/HTMLObjectElement.h: Replace imageSourceAttributeName with imageSourceURL
      * html/HTMLVideoElement.cpp:
      (WebCore::HTMLVideoElement::HTMLVideoElement): set m_defaultPosterURL if there is such settings
      (WebCore::HTMLVideoElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
      (WebCore::HTMLVideoElement::setDisplayMode): Use imageSourceURL()
      (WebCore::HTMLVideoElement::updateDisplayState): Use imageSourceURL()
      (WebCore::HTMLVideoElement::posterImageURL): Return image source's KURL
      * html/HTMLVideoElement.h: Replace imageSourceAttributeName() with imageSourceURL() and add m_defaultPosterURL
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::updateFromElement): Use imageSourceURL()
      * page/Settings.in: Add defaultVideoPosterURL setting.
      * platform/chromium/PasteboardChromium.cpp:
      (WebCore::Pasteboard::writeImage): use imageSourceURL()
      * platform/gtk/PasteboardGtk.cpp:
      (WebCore::getURLForImageNode): use imageSourceURL()
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::absoluteImageURL): use imageSourceURL()
      * svg/SVGImageElement.cpp:
      (WebCore::SVGImageElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
      * svg/SVGImageElement.h: Replace imageSourceAttributeName() with imageSourceURL()
      * testing/InternalSettings.cpp:
      (WebCore::InternalSettings::Backup::Backup): support backup defaultVideoPosterURL.
      (WebCore::InternalSettings::Backup::restoreTo): support restore defaultVideoPosterURL.
      (WebCore::InternalSettings::setDefaultVideoPosterURL): set defaultVideoPosterURL.
      * testing/InternalSettings.h:
      (Backup): support backup defaultVideoPosterURL.
      (InternalSettings): Add setDefaultVidoePosterURL method.
      * testing/InternalSettings.idl: Add setDefaultVideoPosterURL for test purpose.
      * testing/Internals.cpp:
      (WebCore::Internals::getImageSourceURL): Add getImageSourceURL method.
      * testing/Internals.h: Add getImageSourceURL method.
      * testing/Internals.idl: Add getImageSourceURL method.
      
      LayoutTests:
      
      The Android web view application could provide the default poster
      for a video that doesn't have the poster attribute.
      
      To provide the default poster, the application must set defaultVideoPosterURL
      setting and return the image in the response of that URL.
      
      The way to do this would be:
      
      A) Replace the Element::imageSourceAttributeName function with an
         Element::imageSourceURL function that returns the imageSourceURL as a
         const AtomicString&. The body will be the same as before, it will just also
         include a call to getAttribute. Also will need to revise the four classes
         that override that function.
      
      B) Add a new HTMLVideoElement::posterImageURL function that implements the
         default poster URL logic.
      
      C) Update the four functions that get the poster attribute to handle poster
         loading and display to call posterImageURL.
      
         1) HTMLVideoElement::imageSourceURL.
         2) HTMLVideoElement::setDisplayMode.
         3) HTMLVideoElement::updateDisplayState.
         4) HTMLMediaElement::getPluginProxyParams. Will need to cast to
            HTMLVideoElement after checking isVideo.
      
      * media/video-default-poster-expected.txt: Added.
      * media/video-default-poster.html: Added.
      * media/video-no-default-poster-expected.txt: Added.
      * media/video-no-default-poster.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      25fd37ef
    • inferno@chromium.org's avatar
      Replace static_casts with to* functions for document types. · 8da49f1e
      inferno@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112225
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      to* helper functions are preferred over static_cast calls since they
      help to catch bad casts easily on the testing infrastructure.
      
      * Modules/geolocation/Geolocation.cpp:
      (WebCore::Geolocation::document):
      ....lot of files.
      
      Source/WebKit2:
      
      * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm: Remove the redundant helper.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8da49f1e
  8. 09 Mar, 2013 1 commit
    • eric.carlson@apple.com's avatar
      Enable platform code to implement text track menu · db6565c6
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=111924
      
      Reviewed by Dean Jackson.
      
      No new tests, the new code isn't enabled in any ports yet.
      
      * WebCore.xcodeproj/project.pbxproj: Add PlatformTextTrack.h and PlatformTextTrackMenu.h.
      
      * html/HTMLAudioElement.cpp:
      (WebCore::HTMLAudioElement::createForJSConstructor): scheduleLoad -> scheduleDelayedAction.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Deal with scheduleLoad to scheduleDelayedAction rename.
      (WebCore::HTMLMediaElement::parseAttribute): Ditto.
      (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
      (WebCore::HTMLMediaElement::insertedInto): Ditto.
      (WebCore::HTMLMediaElement::scheduleDelayedAction): Ditto.
      (WebCore::HTMLMediaElement::scheduleNextSourceChild): Ditto.
      (WebCore::HTMLMediaElement::loadTimerFired): Ditto.
      (WebCore::HTMLMediaElement::textTrackModeChanged): Notify platform menu of track change.
      (WebCore::HTMLMediaElement::playInternal): Deal with scheduleLoad to scheduleDelayedAction rename.
      (WebCore::HTMLMediaElement::pauseInternal): Ditto.
      (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): Ditto. Call addTrack() instead of appending
          the track directly.
      (WebCore::HTMLMediaElement::setSelectedTextTrack): Deal with platform menu changing the
          selected track.
      (WebCore::HTMLMediaElement::platformTextTracks): Return an array of PlatformTracks representing
          the current text tracks.
      (WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Notify the platform menu
          that the list of text tracks has changed.
      (WebCore::HTMLMediaElement::platformTextTrackMenu): Return the platform track menu, if any.
      (WebCore::HTMLMediaElement::closeCaptionTracksChanged):
      (WebCore::HTMLMediaElement::addTrack): Call addTrack() instead of appending the track directly.
      (WebCore::HTMLMediaElement::removeTrack): Call closeCaptionTracksChanged.
      (WebCore::HTMLMediaElement::addTextTrack): Call addTrack() instead of appending the track directly.
      (WebCore::HTMLMediaElement::didAddTrack): Ditto.
      (WebCore::HTMLMediaElement::didRemoveTrack): Deal with scheduleLoad to scheduleDelayedAction rename.
      (WebCore::HTMLMediaElement::sourceWasAdded): Ditto.
      (WebCore::HTMLMediaElement::clearMediaPlayer): Forget the platform track menu.
      (WebCore::HTMLMediaElement::resume): Deal with scheduleLoad to scheduleDelayedAction rename.
      * html/HTMLMediaElement.h:
      
      * html/track/InbandTextTrack.h: scheduleLoad -> scheduleDelayedAction.
      
      * html/track/TextTrack.cpp:
      (WebCore::TextTrack::platformTextTrack): Create a PlatformTextTrack.
      * html/track/TextTrack.h:
      
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::MediaPlayer::implementsTextTrackControls): New, player private passthrough.
      (WebCore::MediaPlayer::textTrackMenu): Ditto.
      * platform/graphics/MediaPlayer.h:
      * platform/graphics/MediaPlayerPrivate.h:
      
      * platform/graphics/PlatformTextTrack.h: Added.
      
      * platform/graphics/PlatformTextTrackMenu.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      db6565c6
  9. 07 Mar, 2013 1 commit
    • acolwell@chromium.org's avatar
      Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement · 21cefa1a
      acolwell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110623
      
      Reviewed by Kentaro Hara.
      
      Source/WebCore:
      
      Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
      
      * bindings/v8/V8GCController.cpp: Fix MinorGCWrapperVisitor so it doesn't collect ActiveDOMObjects
                                        that have pending activity.
      * html/HTMLAudioElement.h:
      (HTMLAudioElement): Removed hasPendingActivity() now that this is handled by the base class.
      * html/HTMLAudioElement.idl: Removed ActiveDOMObject annotation since HTMLMediaElement now has it.
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::hasPendingActivity): Update implementation to return true if the media
                                                       has audio and is playing. This brings the code into
                                                       compliance with the detached element behavior outlined
                                                       in the HTML5 spec.
      * html/HTMLMediaElement.idl: Added ActiveDOMObject annotation so that all derived classes are
                                   considered ActiveDOMObjects.
      
      LayoutTests:
      
      * http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal-expected.txt: Added.
      * http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html: Added.
      * http/tests/misc/resources/delete-frame-during-readystatechange-frame-with-gc-after-video-removal.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21cefa1a
  10. 06 Mar, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r144859. · 1f9ddea0
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/144859
      https://bugs.webkit.org/show_bug.cgi?id=111519
      
      Introduced a test that calls non-exist function on non-
      Chromium ports and crash on Chromium (Requested by rniwa on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-06
      
      Source/WebCore:
      
      * html/HTMLAudioElement.h:
      (WebCore::HTMLAudioElement::hasPendingActivity):
      (HTMLAudioElement):
      * html/HTMLAudioElement.idl:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::hasPendingActivity):
      * html/HTMLMediaElement.idl:
      
      LayoutTests:
      
      * http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal-expected.txt: Removed.
      * http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html: Removed.
      * http/tests/misc/resources/delete-frame-during-readystatechange-frame-with-gc-after-video-removal.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1f9ddea0
  11. 05 Mar, 2013 1 commit
  12. 04 Mar, 2013 1 commit
    • mkwst@chromium.org's avatar
      Long URLs in error messages should be shortened · d3d99564
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=111133
      
      Reviewed by Jochen Eisinger.
      
      When generating console messages, we're often copying the page's URL
      in order to add detail about where the error occurred. Generally, this
      is fine, but in edge cases (multi-meg 'data:' URLs), we're using far
      more memory than we should, and impacting performance.
      
      This patch adds an 'elidedString()' method to KURL for use in this
      sort of case; when generating console messages, we should insert the
      elided URL rather than the full URL.
      
      This shouldn't change any visible behavior; we're already visually
      eliding URLs in console messages for URLs above 150 characters. This
      patch simply changes the underlying string to ensure that no URL is
      over 1k in length to begin with.
      
      * platform/KURL.cpp:
      (WebCore::KURL::elidedString): Added.
      * platform/KURL.h:
          An exciting new method that gives you the same result as string()
          for URLs less than 1k long, and elides the middle of URLs longer
          than 1k by replacing everything but the first and last 0.5k with
          "...".
      * bindings/ScriptControllerBase.cpp:
      (WebCore::ScriptController::canExecuteScripts):
      * Modules/websockets/WebSocket.cpp:
      (WebCore::WebSocket::connect):
      (WebCore::WebSocket::send):
      * Modules/websockets/WebSocketChannel.cpp:
      (WebCore::WebSocketChannel::send):
      (WebCore::WebSocketChannel::fail):
      * bindings/ScriptControllerBase.cpp:
      (WebCore::ScriptController::canExecuteScripts):
      * dom/Document.cpp:
      (WebCore::Document::processHttpEquiv):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::executeScript):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::canPlayType):
      (WebCore::HTMLMediaElement::isSafeToLoadURL):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::submitForm):
      (WebCore::FrameLoader::loadFrameRequest):
      (WebCore::FrameLoader::commitProvisionalLoad):
      (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
      (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
      (WebCore::createWindow):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::willSendRequest):
      (WebCore::MainResourceLoader::responseReceived):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::didReceiveResponse):
      (WebCore::ApplicationCacheGroup::didFail):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::canRequest):
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::loadResource):
      (WebCore::CachedResourceLoader::printAccessDeniedMessage):
      * page/ContentSecurityPolicy.cpp:
      (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
      (WebCore::CSPDirectiveList::allowScriptNonce):
      (WebCore::CSPDirectiveList::allowPluginType):
          Use 'KURL::elidedString()' rather than 'KURL::string()'
      * loader/MixedContentChecker.cpp:
      (WebCore::MixedContentChecker::logWarning):
          Here, we're doing the same as above, but it enables us to throw
          away the asUTF8() function entirely by switching to makeString
          rather than String::format.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d3d99564
  13. 28 Feb, 2013 1 commit
    • acolwell@chromium.org's avatar
      Factor SourceBuffer methods out of MediaSourcePrivate & WebMediaSource · da1325c3
      acolwell@chromium.org authored
      into SourceBufferPrivate & WebSourceBuffer respectively.
      https://bugs.webkit.org/show_bug.cgi?id=110798
      
      Reviewed by Adam Barth, Jer Noble.
      
      Source/WebCore:
      
      No new tests. No user visible behavior has changed.
      
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::addSourceBuffer):
      (WebCore::MediaSource::removeSourceBuffer):
      * Modules/mediasource/MediaSource.h:
      (MediaSource):
      * Modules/mediasource/SourceBuffer.cpp:
      (WebCore::SourceBuffer::create):
      (WebCore):
      (WebCore::SourceBuffer::SourceBuffer):
      (WebCore::SourceBuffer::buffered):
      (WebCore::SourceBuffer::setTimestampOffset):
      (WebCore::SourceBuffer::append):
      (WebCore::SourceBuffer::abort):
      (WebCore::SourceBuffer::removedFromMediaSource):
      (WebCore::SourceBuffer::isRemoved):
      (WebCore::SourceBuffer::isOpen):
      (WebCore::SourceBuffer::isEnded):
      * Modules/mediasource/SourceBuffer.h:
      (WebCore):
      (SourceBuffer):
      * Modules/mediasource/SourceBufferList.cpp:
      (WebCore::SourceBufferList::SourceBufferList):
      (WebCore::SourceBufferList::remove):
      (WebCore::SourceBufferList::clear):
      * Modules/mediasource/SourceBufferList.h:
      (SourceBufferList):
      * html/HTMLMediaElement.cpp:
      * platform/graphics/MediaSourcePrivate.h:
      (WebCore):
      (MediaSourcePrivate):
      * platform/graphics/SourceBufferPrivate.h:
      (WebCore):
      (SourceBufferPrivate): Contains methods extracted from MediaPlayerPrivate.
      (WebCore::SourceBufferPrivate::SourceBufferPrivate):
      (WebCore::SourceBufferPrivate::~SourceBufferPrivate):
      
      Source/WebKit/chromium:
      
      * WebKit.gyp:
      * public/WebMediaSourceClient.h:
      (WebKit):
      (WebMediaSourceClient):
      * public/WebSourceBuffer.h:
      (WebKit):
      (WebSourceBuffer): Contains SourceBuffer methods extracted from WebMediaSource.
      (WebKit::WebSourceBuffer::~WebSourceBuffer):
      * src/AssertMatchingEnums.cpp:
      * src/MediaSourcePrivateImpl.cpp:
      (WebKit):
      (WebKit::MediaSourcePrivateImpl::MediaSourcePrivateImpl):
      (WebKit::MediaSourcePrivateImpl::addSourceBuffer):
      (WebKit::MediaSourcePrivateImpl::duration):
      (WebKit::MediaSourcePrivateImpl::setDuration):
      (WebKit::MediaSourcePrivateImpl::endOfStream):
      * src/MediaSourcePrivateImpl.h:
      (WebKit):
      (MediaSourcePrivateImpl): Adapts MediaSourcePrivate interface to WebMediaSourceClient.
      (WebKit::MediaSourcePrivateImpl::~MediaSourcePrivateImpl):
      * src/SourceBufferPrivateImpl.cpp:
      (WebKit):
      (WebKit::SourceBufferPrivateImpl::SourceBufferPrivateImpl):
      (WebKit::SourceBufferPrivateImpl::buffered):
      (WebKit::SourceBufferPrivateImpl::append):
      (WebKit::SourceBufferPrivateImpl::abort):
      (WebKit::SourceBufferPrivateImpl::setTimestampOffset):
      (WebKit::SourceBufferPrivateImpl::removedFromMediaSource):
      * src/SourceBufferPrivateImpl.h:
      (WebKit):
      (SourceBufferPrivateImpl): Adapts SourceBufferPrivate interface to WebSourceBuffer.
      (WebKit::SourceBufferPrivateImpl::~SourceBufferPrivateImpl):
      * src/WebMediaPlayerClientImpl.cpp:
      (WebMediaSourceClientImpl):
      (WebKit):
      (WebSourceBufferImpl): Temporary implementation of WebSourceBuffer to keep things working
                             until the Chromium side changes land.
      (WebKit::WebMediaSourceClientImpl::addSourceBuffer):
      (WebKit::WebMediaSourceClientImpl::duration):
      (WebKit::WebMediaSourceClientImpl::setDuration):
      (WebKit::WebMediaSourceClientImpl::endOfStream):
      (WebKit::WebSourceBufferImpl::WebSourceBufferImpl):
      (WebKit::WebSourceBufferImpl::buffered):
      (WebKit::WebSourceBufferImpl::append):
      (WebKit::WebSourceBufferImpl::abort):
      (WebKit::WebSourceBufferImpl::setTimestampOffset):
      (WebKit::WebSourceBufferImpl::removedFromMediaSource):
      * src/WebMediaSourceImpl.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da1325c3
  14. 25 Feb, 2013 2 commits
    • jer.noble@apple.com's avatar
      Normalize ENABLE_ENCRYPTED_MEDIA definitions across all FeatureDefines files. · 9c21925e
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=110806
      
      Source/WebCore:
      
      Reviewed by Alexey Proskuryakov.
      
      Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Fix some build errors which occurred when both ENCRYPTED_MEDIA and
      ENCRYPTED_MEDIA_V2 were enabled:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::webkitGenerateKeyRequest):
      (WebCore::HTMLMediaElement::webkitAddKey):
      * page/DOMWindow.idl:
      
      Source/WebKit/mac:
      
      Reviewed by Alexey Proskuryakov.
      
      Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2:
      
      Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
      
      Reviewed by Alexey Proskuryakov.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WTF:
      
      Reviewed by Alexey Proskuryakov.
      
      Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
      
      * wtf/FeatureDefines.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c21925e
    • jer.noble@apple.com's avatar
      AVFoundation.framework and QTKit.framework are lazy-loaded on every WebProcess launch · 5d8930ca
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=110725
      
      Reviewed by Eric Carlson.
      
      When settings are changed, do not re-query the media engines (which causes their respective
      frameworks to load). Instead, merely clear any previously loaded media engines so that
      the media engine list will be re-queried the next time installedMediaEngines() is called.
      
      (WebCore::MediaPlayer::resetMediaEngines): Renamed from requeryMediaEngines.
      * platform/graphics/MediaPlayer.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::resetMediaEngines): Ditto.
      * html/HTMLMediaElement.h:
      * page/Settings.cpp:
      (WebCore::Settings::setAVFoundationEnabled): Call renamed method.
      (WebCore::Settings::setQTKitEnabled):  Ditto.
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::installedMediaEngines): Only clear out previously queried engines.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d8930ca
  15. 22 Feb, 2013 1 commit
    • acolwell@chromium.org's avatar
      Factor MediaSource methods out of MediaPlayer & MediaPlayerPrivate and into a... · 0589fff9
      acolwell@chromium.org authored
      Factor MediaSource methods out of MediaPlayer & MediaPlayerPrivate and into a new MediaSourcePrivate interface.
      https://bugs.webkit.org/show_bug.cgi?id=109857
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      This is a simple refactor that moves MediaSource related methods out of MediaPlayer & MediaPlayerPrivate
      so that the MediaSource implementation can be updated without further polluting these interfaces.
      MediaSourcePrivate is the new WebCore interface that ports must implement to support the MediaSource API.
      
      No new tests. No user visible behavior has changed.
      
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::MediaSource):
      (WebCore::MediaSource::duration):
      (WebCore::MediaSource::setDuration):
      (WebCore::MediaSource::addSourceBuffer):
      (WebCore::MediaSource::removeSourceBuffer):
      (WebCore::MediaSource::setReadyState):
      (WebCore::MediaSource::endOfStream):
      (WebCore::MediaSource::buffered):
      (WebCore::MediaSource::append):
      (WebCore::MediaSource::abort):
      (WebCore::MediaSource::setTimestampOffset):
      (WebCore::MediaSource::setPrivateAndOpen):
      (WebCore):
      (WebCore::MediaSource::hasPendingActivity):
      (WebCore::MediaSource::stop):
      * Modules/mediasource/MediaSource.h:
      (MediaSource):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement):
      (WebCore::HTMLMediaElement::loadResource):
      (WebCore::HTMLMediaElement::createMediaPlayer):
      (WebCore::HTMLMediaElement::reportMemoryUsage):
      * html/HTMLMediaElement.h:
      (HTMLMediaElement):
      * platform/graphics/MediaPlayer.cpp:
      (NullMediaPlayerPrivate):
      (WebCore::NullMediaPlayerPrivate::load):
      (WebCore::MediaPlayer::load):
      (WebCore):
      (WebCore::MediaPlayer::loadWithNextMediaEngine):
      * platform/graphics/MediaPlayer.h:
      (WebCore):
      (MediaPlayerClient):
      (MediaPlayer):
      * platform/graphics/MediaPlayerPrivate.h:
      (MediaPlayerPrivateInterface):
      * platform/graphics/MediaSourcePrivate.h: Added.
      (WebCore):
      (MediaSourcePrivate): Contains the MediaSource methods extracted from MediaPlayer.
      (WebCore::MediaSourcePrivate::MediaSourcePrivate):
      (WebCore::MediaSourcePrivate::~MediaSourcePrivate):
      
      Source/WebKit/chromium:
      
      WebMediaSource and WebMediaSource client were created to replace the MediaSource methods in WebMediaPlayer and
      WebMediaPlayerClient. This allows the MediaSource implementation to be updated without further polluting the
      media player interfaces.
      
      * WebKit.gyp:
      * public/WebMediaPlayer.h:
      (WebMediaPlayer):
      (WebKit::WebMediaPlayer::load):
      * public/WebMediaPlayerClient.h:
      (WebKit):
      * public/WebMediaSource.h: Added.
      (WebKit):
      (WebMediaSource):
      (WebKit::WebMediaSource::~WebMediaSource):
      * public/WebMediaSourceClient.h: Added.
      (WebKit):
      (WebMediaSourceClient):
      (WebKit::WebMediaSourceClient::~WebMediaSourceClient):
      * src/AssertMatchingEnums.cpp:
      * src/WebMediaPlayerClientImpl.cpp:
      (WebKit):
      (WebMediaSourceClientImpl): Temporary WebMediaSourceClient implementation to keep things working until Chromium
                                  changes land.
      (WebKit::WebMediaSourceClientImpl::WebMediaSourceClientImpl):
      (WebKit::WebMediaSourceClientImpl::~WebMediaSourceClientImpl):
      (WebKit::WebMediaSourceClientImpl::addId):
      (WebKit::WebMediaSourceClientImpl::removeId):
      (WebKit::WebMediaSourceClientImpl::buffered):
      (WebKit::WebMediaSourceClientImpl::append):
      (WebKit::WebMediaSourceClientImpl::abort):
      (WebKit::WebMediaSourceClientImpl::duration):
      (WebKit::WebMediaSourceClientImpl::setDuration):
      (WebKit::WebMediaSourceClientImpl::endOfStream):
      (WebKit::WebMediaSourceClientImpl::setTimestampOffset):
      (WebKit::WebMediaPlayerClientImpl::sourceOpened):
      (WebKit::WebMediaPlayerClientImpl::sourceURL):
      (WebKit::WebMediaPlayerClientImpl::load):
      (WebKit::WebMediaPlayerClientImpl::loadRequested):
      (WebKit::WebMediaPlayerClientImpl::loadInternal):
      * src/WebMediaPlayerClientImpl.h:
      (WebMediaPlayerClientImpl):
      * src/WebMediaSourceImpl.cpp: Added.
      (WebKit):
      (MediaSourcePrivateImpl):
      (WebKit::MediaSourcePrivateImpl::~MediaSourcePrivateImpl):
      (WebKit::MediaSourcePrivateImpl::MediaSourcePrivateImpl):
      (WebKit::MediaSourcePrivateImpl::addId):
      (WebKit::MediaSourcePrivateImpl::removeId):
      (WebKit::MediaSourcePrivateImpl::buffered):
      (WebKit::MediaSourcePrivateImpl::append):
      (WebKit::MediaSourcePrivateImpl::abort):
      (WebKit::MediaSourcePrivateImpl::duration):
      (WebKit::MediaSourcePrivateImpl::setDuration):
      (WebKit::MediaSourcePrivateImpl::endOfStream):
      (WebKit::MediaSourcePrivateImpl::setTimestampOffset):
      (WebKit::WebMediaSourceImpl::WebMediaSourceImpl):
      (WebKit::WebMediaSourceImpl::~WebMediaSourceImpl):
      (WebKit::WebMediaSourceImpl::open):
      * src/WebMediaSourceImpl.h: Added.
      (WebKit):
      (WebMediaSourceImpl):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0589fff9
  16. 15 Feb, 2013 3 commits
    • esprehn@chromium.org's avatar
      Rename HasCustomCallbacks to HasCustomStyleCallbacks · 941a2421
      esprehn@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=109982
      
      Reviewed by Eric Seidel.
      
      Now that inside ChildFrameDisconnector we only call isFrameOwnerElement()
      on elements that report having descendants (or themselves) have connected
      frames we don't need to be as agressive about avoiding the virtual call
      to isFrameOwnerElement() which lets us rename hasCustomCallbacks to
      hasCustomStyleCallbacks to better reflect it's purpose.
      
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildFrameDisconnector::collectFrameOwners):
      * dom/Element.cpp:
      (WebCore::Element::styleForRenderer):
      (WebCore::Element::recalcStyle):
      (WebCore::Element::willRecalcStyle):
      (WebCore::Element::didRecalcStyle):
      (WebCore::Element::customStyleForRenderer):
      * dom/Node.h:
      (WebCore::Node::pseudoId):
      (WebCore::Node::hasCustomStyleCallbacks):
      (WebCore::Node::customPseudoId):
      (WebCore::Node::setHasCustomStyleCallbacks):
      * dom/PseudoElement.cpp:
      (WebCore::PseudoElement::PseudoElement):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::recalcStyle):
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::HTMLFormControlElement):
      * html/HTMLFrameOwnerElement.cpp:
      (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
      (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
      * html/HTMLFrameSetElement.cpp:
      (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::HTMLIFrameElement):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::HTMLInputElement):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement):
      * html/HTMLOptGroupElement.cpp:
      (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::HTMLOptionElement):
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
      * html/shadow/DateTimeEditElement.cpp:
      (WebCore::DateTimeEditElement::DateTimeEditElement):
      * html/shadow/TextControlInnerElements.cpp:
      (WebCore::TextControlInnerElement::TextControlInnerElement):
      (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
      * html/shadow/TextFieldDecorationElement.cpp:
      (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::SVGElement):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::SVGUseElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      941a2421
    • jer.noble@apple.com's avatar
      Add a CDMClient class which allows the CDM to query for the currently attached MediaPlayer. · 298de098
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109702
      
      Reviewed by Eric Carlson.
      
      Some CDM implementations will need to work closely with an associated
      MediaPlayer in order to generate key requests and provide keys. Add a
      client protocol to be implemented by the MediaKeys object which can
      provide access to the associated MediaPlayer if present.
      
      * Modules/encryptedmedia/CDM.cpp:
      (WebCore::CDM::CDM): Initialize the m_client ivar.
      (WebCore::CDM::mediaPlayer): Pass to the client, if present.
      * Modules/encryptedmedia/CDM.h:
      (WebCore::CDM::client): Simple getter.
      (WebCore::CDM::setClient): Simple setter.
      * Modules/encryptedmedia/MediaKeys.cpp:
      (WebCore::MediaKeys::MediaKeys): Initialize the m_mediaElement ivar
          and call setClient() on the passed in CDM.
      (WebCore::MediaKeys::setMediaElement): Simple setter.
      (WebCore::MediaKeys::cdmMediaPlayer): Retrieve the MediaPlayer from
          the m_mediaElement if present.
      * Modules/encryptedmedia/MediaKeys.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::~HTMLMediaElement): Call setMediaKeys(0)
          to clear the mediaElement in any associated MediaKeys.
      (WebCore::HTMLMediaElement::setMediaKeys): Clear the mediaElement on
          any associated MediaKeys, and set the mediaElement on the newly
          associated MediaKeys.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      298de098
    • eric.carlson@apple.com's avatar
      Crash occurs at WebCore::TextTrackList::length() when enabling closed captions in movie · 02ddfb43
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109886
      
      Reviewed by Dean Jackson.
      
      Source/WebCore: 
      
      No new tests, media/media-captions.html does not crash with this change.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Early return when
          m_textTracks is NULL.
      
      LayoutTests: 
      
      * platform/mac/TestExpectations: Remove media/media-captions.html.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02ddfb43
  17. 14 Feb, 2013 1 commit
    • jer.noble@apple.com's avatar
      EME: replace MediaKeySession.addKey() -> update() · cdfdba8b
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109461
      
      Source/WebCore:
      
      Reviewed by Eric Carlson.
      
      No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html test.
      
      In the latest draft of the Encrypted Media Spec, the addKeys() method has been replaced
      with update().
      
      * Modules/encryptedmedia/CDM.h:
      * Modules/encryptedmedia/MediaKeySession.cpp:
      (WebCore::MediaKeySession::update):
      (WebCore::MediaKeySession::addKeyTimerFired):
      * Modules/encryptedmedia/MediaKeySession.h:
      * Modules/encryptedmedia/MediaKeySession.idl:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::webkitAddKey):
      * testing/MockCDM.cpp:
      (WebCore::MockCDMSession::update):
      
      LayoutTests:
      
      Rebaseline after API change.
      
      Reviewed by Eric Carlson.
      
      * media/encrypted-media/encrypted-media-v2-syntax-expected.txt:
      * media/encrypted-media/encrypted-media-v2-syntax.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cdfdba8b
  18. 13 Feb, 2013 3 commits
    • jer.noble@apple.com's avatar
      EME: MediaPlayer::keyNeede() should return a bool indicating whether an event... · ebe4abe5
      jer.noble@apple.com authored
      EME: MediaPlayer::keyNeede() should return a bool indicating whether an event listener was triggered.
      https://bugs.webkit.org/show_bug.cgi?id=109701
      
      Reviewed by Eric Carlson.
      
      Clients of MediaPlayer may need to do cleanup if calling keyNeeded()
      results in no event listener being triggered. Return a bool (like the
      v1 equivalent keyNeeded method) to indicate this.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
      * html/HTMLMediaElement.h:
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::MediaPlayer::keyNeeded):
      * platform/graphics/MediaPlayer.h:
      (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ebe4abe5
    • zandobersek@gmail.com's avatar
      The 'global isinf/isnan' compiler quirk required when using clang with libstdc++ · 9182d475
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109325
      
      Reviewed by Anders Carlsson.
      
      Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
      two methods as they're provided by the C++ standard library being used.
      
      Source/JavaScriptCore: 
      
      * API/JSValueRef.cpp:
      (JSValueMakeNumber):
      * JSCTypedArrayStubs.h:
      (JSC):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitLoad):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::constantNaN):
      * offlineasm/cloop.rb:
      * runtime/DateConstructor.cpp:
      (JSC::dateUTC): Also include an opportunistic style fix.
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::calculateGregorianDateTime):
      (JSC::DateInstance::calculateGregorianDateTimeUTC):
      * runtime/DatePrototype.cpp:
      (JSC::dateProtoFuncGetMilliSeconds):
      (JSC::dateProtoFuncGetUTCMilliseconds):
      (JSC::setNewValueFromTimeArgs):
      (JSC::setNewValueFromDateArgs):
      (JSC::dateProtoFuncSetYear):
      * runtime/JSCJSValue.cpp:
      (JSC::JSValue::toInteger):
      * runtime/JSDateMath.cpp:
      (JSC::getUTCOffset):
      (JSC::parseDateFromNullTerminatedCharacters):
      (JSC::parseDate):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::globalFuncIsNaN):
      * runtime/MathObject.cpp:
      (JSC::mathProtoFuncMax):
      (JSC::mathProtoFuncMin):
      (JSC::mathProtoFuncPow):
      * runtime/PropertyDescriptor.cpp:
      (JSC::sameValue):
      
      Source/WebCore: 
      
      No new tests as there's no change in functionality.
      
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::setDuration):
      * Modules/webaudio/AudioBufferSourceNode.cpp:
      (WebCore::AudioBufferSourceNode::totalPitchRate):
      * Modules/webaudio/AudioParam.cpp:
      (WebCore::AudioParam::setValue):
      * Modules/webaudio/AudioParamTimeline.cpp:
      (WebCore::isValidNumber):
      * Modules/webaudio/PannerNode.cpp:
      (WebCore::fixNANs):
      * bindings/js/IDBBindingUtilities.cpp:
      (WebCore::createIDBKeyFromValue):
      * bindings/js/JSDataViewCustom.cpp:
      (WebCore::getDataViewMember):
      * bindings/js/JSGeolocationCustom.cpp:
      (WebCore::setTimeout):
      (WebCore::setMaximumAge):
      * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
      (WebCore::JSHTMLOptionsCollection::setLength):
      * bindings/js/JSWebKitPointCustom.cpp:
      (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      (GenerateParametersCheck):
      * bindings/scripts/CodeGeneratorV8.pm:
      (GenerateParametersCheck):
      * bindings/scripts/test/JS/JSFloat64Array.cpp:
      (WebCore::JSFloat64Array::getByIndex):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
      * bindings/scripts/test/V8/V8TestObj.cpp:
      (WebCore::TestObjV8Internal::classMethodWithClampCallback):
      * bindings/v8/IDBBindingUtilities.cpp:
      (WebCore::createIDBKeyFromValue):
      * bindings/v8/V8Binding.cpp:
      (WebCore::toInt32):
      (WebCore::toUInt32):
      * bindings/v8/custom/V8GeolocationCustom.cpp:
      (WebCore::createPositionOptions):
      * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
      (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
      * bindings/v8/custom/V8WebKitPointCustom.cpp:
      (WebCore::V8WebKitPoint::constructorCallbackCustom):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::convertValueToQVariant):
      * css/WebKitCSSMatrix.cpp:
      (WebCore::WebKitCSSMatrix::translate):
      (WebCore::WebKitCSSMatrix::scale):
      (WebCore::WebKitCSSMatrix::rotate):
      (WebCore::WebKitCSSMatrix::rotateAxisAngle):
      (WebCore::WebKitCSSMatrix::skewX):
      (WebCore::WebKitCSSMatrix::skewY):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::percentLoaded):
      (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
      (WebCore::HTMLMediaElement::endedPlayback):
      * html/MediaController.cpp:
      (MediaController::duration):
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      (WebCore::WebGLRenderingContext::clearColor):
      * html/track/TextTrack.cpp:
      (WebCore::TextTrack::addCue):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::setStartTime):
      (WebCore::TextTrackCue::setEndTime):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::adjustWindowRect):
      * page/WindowFeatures.cpp:
      (WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
      * platform/CalculationValue.cpp:
      (WebCore::CalculationValue::evaluate):
      * platform/Decimal.cpp:
      (WebCore::Decimal::fromDouble):
      * platform/Length.cpp:
      (WebCore::Length::nonNanCalculatedValue):
      * platform/audio/AudioResampler.cpp:
      (WebCore::AudioResampler::setRate):
      * platform/audio/DynamicsCompressorKernel.cpp:
      (WebCore::DynamicsCompressorKernel::process):
      * platform/audio/Reverb.cpp:
      (WebCore::calculateNormalizationScale):
      * platform/graphics/Font.cpp:
      (WebCore::Font::width):
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
      (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
      * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
      (LoopBlinnMathUtils):
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      (WebCore::MediaPlayerPrivateGStreamer::buffered):
      (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
      * platform/graphics/opentype/OpenTypeVerticalData.cpp:
      (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
      * platform/graphics/transforms/TransformationMatrix.cpp:
      (WebCore::clampEdgeValue):
      (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
      * platform/network/ResourceResponseBase.cpp:
      (WebCore::ResourceResponseBase::parseCacheControlDirectives):
      * rendering/RenderMediaControlsChromium.cpp:
      (WebCore::paintMediaSlider):
      (WebCore::paintMediaVolumeSlider):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::paintMediaSliderTrack):
      * svg/SVGAnimationElement.cpp:
      (WebCore::SVGAnimationElement::beginElementAt):
      (WebCore::SVGAnimationElement::endElementAt):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::setCurrentTime):
      * svg/animation/SMILTime.h:
      (WebCore::SMILTime::SMILTime):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::addBeginTime):
      (WebCore::SVGSMILElement::addEndTime):
      * xml/XPathFunctions.cpp:
      (WebCore::XPath::FunSubstring::evaluate):
      (WebCore::XPath::FunRound::round):
      * xml/XPathValue.cpp:
      (WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
      (WebCore::XPath::Value::toString):
      
      Source/WebKit/chromium: 
      
      * tests/DecimalTest.cpp:
      (TEST_F):
      
      Source/WebKit/mac: 
      
      * tests/DecimalTest.cpp:
      (TEST_F):
      
      Source/WTF: 
      
      * wtf/Compiler.h: Remove the global isinf/isnan compiler quirk definitions. They're not required anymore.
      * wtf/DateMath.cpp: Move the workaround for isinf on Solaris into the std namespace. Ditto for isinf and isnan
      when using MSVC. Stop bringing the isinf and isnan methods into the global scope when using other configurations.
      (WTF::parseDateFromNullTerminatedCharacters):
      * wtf/IntegralTypedArrayBase.h:
      (WTF::IntegralTypedArrayBase::set):
      * wtf/MathExtras.h:
      (std):
      (std::isinf):
      (wtf_fmod):
      (wtf_pow):
      (doubleToInteger):
      * wtf/MediaTime.cpp:
      (WTF::MediaTime::createWithFloat):
      (WTF::MediaTime::createWithDouble):
      * wtf/Uint8ClampedArray.h:
      (WTF::Uint8ClampedArray::set):
      
      Tools: 
      
      * DumpRenderTree/TestRunner.cpp:
      (setAppCacheMaximumSizeCallback):
      (setApplicationCacheOriginQuotaCallback):
      (setDatabaseQuotaCallback):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9182d475
    • eric.carlson@apple.com's avatar
      [Mac] Caption menu should have only one item selected · 70109507
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109730
      
      Reviewed by Dean Jackson.
      
      Source/WebCore: 
      
      No new tests, media/track/track-user-preferences.html was modified to test the changes.
      
      * CMakeLists.txt: Add CaptionUserPreferences.cpp.
      * GNUmakefile.list.am: Ditto.
      * Target.pri: Ditto.
      * WebCore.gypi: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.vcxproj/WebCore.vcxproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_processingPreferenceChange.
      (WebCore::HTMLMediaElement::configureTextTrackGroup): Only end up with one selected track when
          called because of a preferences change.
      (WebCore::HTMLMediaElement::captionPreferencesChanged): Call setClosedCaptionsVisible instead
          of calling markCaptionAndSubtitleTracksAsUnconfigured directly.
      (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Process all tracks, 
          not just track elements.
      * html/HTMLMediaElement.h:
      
      * page/CaptionUserPreferences.cpp: Added so the functionality can be tested in DRT.
      (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks):
      (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks):
      (WebCore::CaptionUserPreferences::setUserPrefersCaptions):
      (WebCore::CaptionUserPreferences::captionPreferencesChanged):
      (WebCore::CaptionUserPreferences::preferredLanguages):
      (WebCore::CaptionUserPreferences::setPreferredLanguage):
      (WebCore::CaptionUserPreferences::displayNameForTrack):
      * page/CaptionUserPreferences.h:
      
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Moved some logic
          to base class.
      (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Ditto.
      
      LayoutTests: 
      
      * media/track/track-user-preferences-expected.txt:
      * media/track/track-user-preferences.html: Update test to check for reactions to preferences.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70109507
  19. 11 Feb, 2013 1 commit
    • eric.carlson@apple.com's avatar
      [Mac] Track language selection should be sticky · b54d1c88
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109466
      
      Reviewed by Dean Jackson.
      
      .: 
      
      * Source/autotools/symbols.filter: Export PageGroup::captionPreferences and Page::initGroup.
      
      Source/WebCore: 
      
      Choosing a text track from the caption menu should make that track's language the
      preferred caption language. Turning captions off from the menu should disable captions
      in videos loaded subsequently.
      
      OS X has system support for these settings, so changes made by DRT should not change the
      settings on the user's system. Add support for all other ports in DRT only.
      
      Test: media/track/track-user-preferences.html
      
      * WebCore.exp.in: Export PageGroup::captionPreferences().
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
      (WebCore::HTMLMediaElement::attach): Ditto.
      (WebCore::HTMLMediaElement::detach): Ditto.
      (WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
      (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for 
          preferredLanguageFromList change.
      (WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
          caption language as appropriate.
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
      (WebCore::MediaControlTextTrackContainerElement::updateSizes):  Use page()->group().captionPreferences().
      
      * html/shadow/MediaControlsApple.cpp:
      (WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.
      
      * page/CaptionUserPreferences.h:
      (WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
      (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
      (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
      (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
      (WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
      (WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
      (WebCore::CaptionUserPreferences::testingMode): Ditto.
      (WebCore::CaptionUserPreferences::setTestingMode): Ditto.
      (WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.
      
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
      (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
      (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
      (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
          registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
      (WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks):  Change name from
          unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
      (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
      (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
      (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
      (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
          available from the caption preference object.
      (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
      (WebCore::PageGroup::userPrefersCaptions): Ditto.
      (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
      (WebCore::PageGroup::captionFontSizeScale): Ditto.
      * page/PageGroup.h:
      
      * platform/Language.cpp:
      (WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
          the system list.
      * platform/Language.h:
      
      * testing/Internals.cpp:
      (WebCore::Internals::resetToConsistentState): Disable caption testing mode.
      (WebCore::Internals::Internals): Enable caption testing mode so the user's system
          preferences are not modified.
      
      LayoutTests: 
      
      * media/track/track-user-preferences-expected.txt: Added.
      * media/track/track-user-preferences.html: Added.
      
      * platform/chromium/TestExpectations: Skip new test, it depends on the track menu.
      * platform/efl/TestExpectations: Ditto.
      * platform/gtk/TestExpectations: Ditto.
      * platform/qt/TestExpectations: Ditto.
      * platform/win/TestExpectations: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b54d1c88
  20. 08 Feb, 2013 3 commits
    • jer.noble@apple.com's avatar
      Bring WebKit up to speed with latest Encrypted Media spec. · 09c10fbf
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97037
      
      Reviewed by Eric Carlson.
      
      Source/JavaScriptCore:
      
      Define the ENABLE_ENCRYPTED_MEDIA_V2 setting.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore:
      
      The most recent version of the Encrypted Media Extensions spec breaks functionality out of the
      HTMLMediaElement and into new MediaKeys and MediaKeySession classes. Since the CDM functionality
      has been pulled out of the media element, we create a proxy CDM class and factory system for
      creating specific CDM key system implementations. The spec also breaks out MediaKeyEvent
      into distinct event classes, MediaKeyNeededEvent and MediaKeyMessageEvent, for needkey and
      keymessage events, respectively.
      
      Tests: media/encrypted-media/encrypted-media-v2-events.html
             media/encrypted-media/encrypted-media-v2-syntax.html
      
      CDM is a proxy class (a la MediaPlayer) for a specific CDMPrivateInterface implementation. A CDM
      implementation is registered with the CDMFactory and will be created if that implementation supports
      the key system passed into the MediaKeys constructor. CDMSession is a pure-virtual interface exposed
      by concrete CDMPrivate subclasses.  Its lifetime is owned by MediaKeySession.
      * Modules/encryptedmedia/CDM.cpp: Added.
      (WebCore::installedCDMFactories): Initialize all the known CDM subtypes. Ports will add CDM implementations here.
      (WebCore::CDM::registerCDMFactory): Registers a new CDMFactory using the passed in function pointers.
      (WebCore::CDMFactoryForKeySystem): Return the first CDM factory which supports the requested key system.
      (WebCore::CDM::supportsKeySystem): Walk the installed CDMs and ask if the given key system is supported.
      (WebCore::CDM::supportsKeySystemMIMETypeAndCodec): Ditto, with an additional MIME type and codec string.
      (WebCore::CDM::create): Simple constructor wrapper.
      (WebCore::CDM::CDM): Simple constructor; calls bestCDMForKeySystem() to create it's private implementation.
      (WebCore::CDM::~CDM): Simple destructor.
      (WebCore::CDM::createSession): Creates a new CDMSession.
      * Modules/encryptedmedia/CDM.h: Added.
      (WebCore::CDM::keySystem): Simple accessor for m_keySystem.
      (WebCore::CDMSession::CDMSession): Simple constructor.
      (WebCore::CDMSession::~CDMSession): Simple destructor.
      * Modules/encryptedmedia/CDMPrivate.h: Added.
      (WebCore::CDMPrivateInterface::CDMPrivateInterface): Simple constructor.
      (WebCore::CDMPrivateInterface::~CDMPrivateInterface): Simple destructor.
      
      The new classes, MediaKeyMessageEvent and MediaKeyNeededEvent, take distinct subsets of the initializers of
      the original MediaKeyMessageEvent.
      * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.cpp.
      (WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit): Initializer now only takes message and destinationURL
          parameters.
      (WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent): Simple constructor.
      (WebCore::MediaKeyMessageEvent::~MediaKeyMessageEvent): Simple destructor.
      (WebCore::MediaKeyMessageEvent::interfaceName): Standard interfaceName.
      * Modules/encryptedmedia/MediaKeyMessageEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
      (WebCore::MediaKeyMessageEvent::create): Simple construction wrapper.
      (WebCore::MediaKeyMessageEvent::message): Simple accessor for m_message.
      (WebCore::MediaKeyMessageEvent::destinationURL): Simple accessor for m_destinationURL.
      * Modules/encryptedmedia/MediaKeyMessageEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
      * Modules/encryptedmedia/MediaKeyNeededEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.h.
      (WebCore::MediaKeyNeededEventInit::MediaKeyNeededEventInit): Initializer now only takes initData parameter.
      (WebCore::MediaKeyNeededEvent::MediaKeyNeededEvent): Simple constructor.
      (WebCore::MediaKeyNeededEvent::~MediaKeyNeededEvent): Simple destructor.
      (WebCore::MediaKeyNeededEvent::interfaceName): Standard interfaceName.
      * Modules/encryptedmedia/MediaKeyNeededEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
      (WebCore::MediaKeyNeededEvent::create): Simple construction wrapper.
      (WebCore::MediaKeyNeededEvent::initData): Simple accessor for m_initData.
      * Modules/encryptedmedia/MediaKeyNeededEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
      
      MediaKeySession is a new class that maps keys and key requests to a given session ID:
      * Modules/encryptedmedia/MediaKeySession.cpp: Added.
      (WebCore::MediaKeySession::create): Simple construction wrapper.
      (WebCore::MediaKeySession::MediaKeySession): Simple constructor.
      (WebCore::MediaKeySession::~MediaKeySession): Simple destructor; calls close().
      (WebCore::MediaKeySession::setError): Simple setter for m_error;
      (WebCore::MediaKeySession::close): Tell the CDM to clear any saved session keys.
      (WebCore::MediaKeySession::generateKeyRequest): Start a one-shot timer, handled in keyRequestTimerFired.
      (WebCore::MediaKeySession::keyRequestTimerFired): Follow the steps in the spec; ask the CDM to generate a key request.
      (WebCore::MediaKeySession::addKey): Start a one-shot timer, handled in addKeyTimerFired.
      (WebCore::MediaKeySession::addKeyTimerFired): Follow the steps in the spec; provide the key data to the CDM.
      * Modules/encryptedmedia/MediaKeySession.h: Added.
      (WebCore::MediaKeySession::keySystem): Simple accessor for m_keySystem.
      (WebCore::MediaKeySession::sessionId): Simple accessor for m_sessionId.
      (WebCore::MediaKeySession::error): Simple accessor for m_error;
      * Modules/encryptedmedia/MediaKeySession.idl:
      
      MediaKeySession inherits from EventTarget, and must override the pure virtual functions in that class:
      * Modules/encryptedmedia/MediaKeySession.cpp: Added.
      (WebCore::MediaKeySession::interfaceName):
      * Modules/encryptedmedia/MediaKeySession.h: Added.
      (WebCore::MediaKeySession::refEventTarget):
      (WebCore::MediaKeySession::derefEventTarget):
      (WebCore::MediaKeySession::eventTargetData):
      (WebCore::MediaKeySession::ensureEventTargetData):
      (WebCore::MediaKeySession::scriptExecutionContext):
      
      MediaKeys is a new class that encapsulates a CDM and a number of key sessions:
      * Modules/encryptedmedia/MediaKeys.cpp: Added.
      (WebCore::MediaKeys::create): Throw an exception if the key system parameter is unsupported; create a CDM object
          and a new MediaKeys session.
      (WebCore::MediaKeys::MediaKeys): Simple constructor.
      (WebCore::MediaKeys::~MediaKeys): Simple destructor.
      (WebCore::MediaKeys::createSession): Follow the spec and create a new key session.
      * Modules/encryptedmedia/MediaKeys.h: Added.
      * Modules/encryptedmedia/MediaKeys.idl: Copied from Source/WebCore/html/MediaError.idl.
      
      Provide a new interface to HTMLMediaElement for MediaPlayer which does not require a sessionId or a key system:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::MediaPlayer::keyNeeded):
      
      MediaKeyError now has a systemCode parameter and member variable.
      * html/MediaKeyError.h:
      (WebCore::MediaKeyError::create): Take a systemCode parameter with a default (0) value.
      (WebCore::MediaKeyError::MediaKeyError): Ditto.
      (WebCore::MediaKeyError::systemCode): Simple accessor for m_systemCode.
      * html/MediaKeyError.idl:
      
      Add new methods to HTMLMediaElement to support MediaKeys. Support different initializer
      for the MediaKeyNeededEvent.
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::setMediaKeys): Simple setter for m_mediaKeys.
      (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): This version takes fewer parameters
          than the deprecated version.
      * html/HTMLMediaElement.h:
      (WebCore::HTMLMediaElement::mediaKeys): Simple accessor for m_mediaKeys.
      * html/HTMLMediaElement.idl: Add the mediaKeys attribute.
      
      Add an ENABLE(ENCRYPTED_MEDIA_V2) check to the existing ENABLE(ENCRYPTED_MEDIA) one:
      * html/MediaError.h:
      * html/MediaError.idl:
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::bestMediaEngineForTypeAndCodecs):
      (WebCore::MediaPlayer::supportsType):
      * platform/graphics/MediaPlayer.h:
      (WebCore::MediaPlayer::keyNeeded): This version takes fewer parameters than the
          deprecated version.
      
      Support the new version of canPlayType which takes an extra parameter:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
      (WebCore::MediaPlayerPrivateAVFoundationObjC::extendedSupportsType):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
      (WebCore::MediaPlayerPrivateQTKit::extendedSupportsType):
      
      Add a mock CDM for use within DRT and WKTR to test the MediaKeys and MediaKeySession
      APIs and events:
      * testing/Internals.cpp:
      (WebCore::Internals::initializeMockCDM): Add the MockCDM class to the CDM factories.
      * testing/Internals.h:
      * testing/Internals.idl: Add the initializeMockCDM() method.
      * testing/MockCDM.cpp: Added.
      (WebCore::MockCDM::supportsKeySystem): Only supports the 'com.webcore.mock' key system.
      (WebCore::MockCDM::supportsMIMEType): Only supports the 'video/mock' mime type.
      (WebCore::initDataPrefix): Static method which returns a Uint8Array containing 'mock'.
      (WebCore::keyPrefix): Static method which returns a Uint8Array containing 'key'.
      (WebCore::keyRequest): Static method which returns a Uint8Array containing 'request'.
      (WebCore::generateSessionId): Return a monotonically increasing number.
      (WebCore::MockCDMSession::MockCDMSession): Simple constructor.
      (WebCore::MockCDMSession::generateKeyRequest): Ignores the parameters and returns a keyRequest() array.
      (WebCore::MockCDMSession::releaseKeys): No-op.
      (WebCore::MockCDMSession::addKey): Checks that the key starts with the keyPrefix() array.
      * testing/MockCDM.h: Added.
      (WebCore::MockCDM::create):
      (WebCore::MockCDM::~MockCDM): Simple destructor.
      (WebCore::MockCDM::MockCDM): Simple constructor.
      
      Add the new classes to the built system:
      * Configurations/FeatureDefines.xcconfig:
      * DerivedSources.make:
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      
      Miscelaneous changes:
      * dom/EventNames.in: Add the two new event types, MediaKeyMessageEvent and MediaKeyNeededEvent.
      * dom/EventTargetFactory.in: Add the new EventTarget, MediaKeySession.
      * page/DOMWindow.idl: Add constructors for the new classes to the window object.
      
      Source/WTF:
      
      Define the ENABLE_ENCRYPTED_MEDIA_V2 setting.
      
      * wtf/Platform.h:
      
      LayoutTests:
      
      Added new tests for the updated Encrypted Media Extensions spec.
      
      * media/encrypted-media/encrypted-media-v2-events-expected.txt: Added.
      * media/encrypted-media/encrypted-media-v2-events.html: Added.
      * media/encrypted-media/encrypted-media-v2-syntax-expected.txt: Added.
      * media/encrypted-media/encrypted-media-v2-syntax.html: Added.
      * platform/Chromium/TestExpectations: Skip the new media/encrypted-media/ v2 tests.
      * platform/mac/media/encrypted-media/encrypted-media-can-play-type-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      09c10fbf
    • mkwst@chromium.org's avatar
      Add a new IGNORE_EXCEPTION helper to ignore ExceptionCodes when they are expected but uninteresting · 33cdf43a
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=108771
      
      Reviewed by Eric Seidel.
      
      In cases where the ExceptionCode passed into a function is completely
      ignored, this patch replaces it with a new IGNORE_EXCEPTION macro. This
      makes our expectations about possible exceptions (or lack thereof)
      explicit, rather than relying on implicit assumptions about whether a
      variable is intentionally uninitialized or not. It also removes
      knowledge about the internals of ExceptionCodes (that they're currently
      ints, for instance) from code that shouldn't care, which will help with
      future refactorings.
      
      The implementation is entirely based upon ASSERT_NO_EXCEPTION, and
      shouldn't have any visible effect on the web. As long as all the
      current tests pass, we're good.
      
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::dispatchEvent):
      (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::stop):
      * Modules/websockets/WebSocketChannel.cpp:
      (WebCore::WebSocketChannel::processBuffer):
      * dom/Document.cpp:
      (WebCore::Document::processHttpEquiv):
      * dom/ExceptionCodePlaceholder.h:
      (WebCore):
      * dom/Node.cpp:
      (WebCore::Node::normalize):
      * dom/Text.cpp:
      (WebCore::Text::replaceWholeText):
      * editing/AlternativeTextController.cpp:
      (WebCore::AlternativeTextController::insertDictatedText):
      * editing/AppendNodeCommand.cpp:
      (WebCore::AppendNodeCommand::doApply):
      (WebCore::AppendNodeCommand::doUnapply):
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
      * editing/DeleteFromTextNodeCommand.cpp:
      (WebCore::DeleteFromTextNodeCommand::doUnapply):
      * editing/Editor.cpp:
      (WebCore::dispatchEditableContentChangedEvents):
      (WebCore::Editor::applyEditingStyleToElement):
      * editing/EditorCommand.cpp:
      (WebCore::executeFormatBlock):
      * editing/FormatBlockCommand.cpp:
      (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
      * editing/InsertIntoTextNodeCommand.cpp:
      (WebCore::InsertIntoTextNodeCommand::doApply):
      (WebCore::InsertIntoTextNodeCommand::doUnapply):
      * editing/InsertListCommand.cpp:
      (WebCore::InsertListCommand::doApplyForSingleParagraph):
      * editing/InsertNodeBeforeCommand.cpp:
      (WebCore::InsertNodeBeforeCommand::doApply):
      (WebCore::InsertNodeBeforeCommand::doUnapply):
      * editing/RemoveCSSPropertyCommand.cpp:
      (WebCore::RemoveCSSPropertyCommand::doApply):
      (WebCore::RemoveCSSPropertyCommand::doUnapply):
      * editing/RemoveNodeCommand.cpp:
      (WebCore::RemoveNodeCommand::doApply):
      (WebCore::RemoveNodeCommand::doUnapply):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
      * editing/TextIterator.cpp:
      (WebCore::TextIterator::getLocationAndLengthFromRange):
      * editing/WrapContentsInDummySpanCommand.cpp:
      (WebCore::WrapContentsInDummySpanCommand::executeApply):
      (WebCore::WrapContentsInDummySpanCommand::doUnapply):
      * editing/htmlediting.cpp:
      (WebCore::comparePositions):
      * editing/markup.cpp:
      (WebCore::highestAncestorToWrapMarkup):
      * html/FTPDirectoryDocument.cpp:
      (WebCore::FTPDirectoryDocumentParser::appendEntry):
      (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
      (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
      (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::rewind):
      (WebCore::HTMLMediaElement::returnToRealtime):
      (WebCore::HTMLMediaElement::playInternal):
      (WebCore::HTMLMediaElement::percentLoaded):
      (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
      (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
      (WebCore::HTMLMediaElement::applyMediaFragmentURI):
      * html/HTMLOutputElement.cpp:
      (WebCore::HTMLOutputElement::setTextContentInternal):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::remove):
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::createTHead):
      (WebCore::HTMLTableElement::deleteTHead):
      (WebCore::HTMLTableElement::createTFoot):
      (WebCore::HTMLTableElement::deleteTFoot):
      (WebCore::HTMLTableElement::createCaption):
      (WebCore::HTMLTableElement::deleteCaption):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::setDefaultValue):
      * html/ImageDocument.cpp:
      (WebCore::ImageDocument::createDocumentStructure):
      * html/InputType.cpp:
      (WebCore::InputType::stepUpFromRenderer):
      * html/MediaController.cpp:
      (MediaController::bringElementUpToSpeed):
      (MediaController::asyncEventTimerFired):
      * html/MediaDocument.cpp:
      (WebCore::MediaDocumentParser::createDocumentStructure):
      (WebCore::MediaDocument::replaceMediaElementTimerFired):
      * html/PluginDocument.cpp:
      (WebCore::PluginDocumentParser::createDocumentStructure):
      * html/RangeInputType.cpp:
      (WebCore::RangeInputType::handleKeydownEvent):
      * html/TimeRanges.cpp:
      (TimeRanges::contain):
      (TimeRanges::nearest):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::drawImageFromRect):
      * html/shadow/MediaControlElementTypes.cpp:
      (WebCore::MediaControlSeekButtonElement::seekTimerFired):
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlPanelElement::setPosition):
      (WebCore::MediaControlPanelElement::resetPosition):
      (WebCore::MediaControlStatusDisplayElement::update):
      (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
      (WebCore::MediaControlTimelineElement::defaultEventHandler):
      * html/shadow/MediaControls.cpp:
      (WebCore::MediaControls::updateCurrentTimeDisplay):
      (WebCore::MediaControls::createTextTrackDisplay):
      * html/shadow/MediaControlsApple.cpp:
      (WebCore::MediaControlsApple::updateCurrentTimeDisplay):
      * html/shadow/MediaControlsBlackBerry.cpp:
      (WebCore::MediaControlEmbeddedPanelElement::setPosition):
      (WebCore::MediaControlEmbeddedPanelElement::resetPosition):
      (WebCore::MediaControlFullscreenTimelineElement::defaultEventHandler):
      (WebCore::MediaControlsBlackBerry::updateCurrentTimeDisplay):
      * html/shadow/MediaControlsChromium.cpp:
      (WebCore::MediaControlsChromium::updateCurrentTimeDisplay):
      * html/track/InbandTextTrack.cpp:
      (WebCore::InbandTextTrack::addGenericCue):
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
      * inspector/InspectorHistory.cpp:
      (WebCore::InspectorHistory::markUndoableState):
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::replayXHR):
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::contextMenuItemSelected):
      * page/DOMWindow.cpp:
      (WebCore::didAddStorageEventListener):
      * page/DragController.cpp:
      (WebCore::documentFragmentFromDragData):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::dispatchDragEvent):
      (WebCore::EventHandler::keyEvent):
      (WebCore::EventHandler::handleTextInputEvent):
      * page/Page.cpp:
      (WebCore::Page::findStringMatchingRanges):
      * platform/efl/RenderThemeEfl.cpp:
      (WebCore::RenderThemeEfl::paintMediaSliderTrack):
      * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
      (WebCore::MediaPlayerPrivate::percentLoaded):
      * platform/gtk/RenderThemeGtk.cpp:
      (WebCore::RenderThemeGtk::paintMediaSliderTrack):
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::getDataSelection):
      (WebCore::documentFragmentWithImageResource):
      (WebCore::Pasteboard::documentFragment):
      * platform/mac/WebVideoFullscreenHUDWindowController.mm:
      (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
      (-[WebVideoFullscreenHUDWindowController setVolume:]):
      * platform/qt/RenderThemeQt.cpp:
      (WebCore::RenderThemeQt::paintMediaSliderTrack):
      * rendering/RenderNamedFlowThread.cpp:
      (WebCore::RenderNamedFlowThread::getRanges):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::paintMediaSliderTrack):
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGTRefElement::detachTarget):
      * xml/XMLTreeViewer.cpp:
      (WebCore::XMLTreeViewer::transformDocumentToTreeView):
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      (WebCore::XMLDocumentParser::endElementNs):
      * xml/parser/XMLDocumentParserQt.cpp:
      (WebCore::XMLDocumentParser::parseEndElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33cdf43a
    • tkent@chromium.org's avatar
      Adjust usage of ENABLE flags to enable whole content · c271a5fc
      tkent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=109270
      
      Reviewed by Eric Seidel.
      
      Our common usage of ENABLE flags to enable whole content of files is:
      
      For .cpp files:
        #include "config.h"
        #if ENABLE(FOOBAR)
        #include "FooBar.h"
      
      For .h files:
        #ifndef FooBar_h
        #define FooBar_h
        #if ENABLE(FOOBAR)
      
      Fix files which have uncommon usage, and fix CodeGeneratorV8.pm so that
      it generates the common pattern. Note that CodeGeneratorJS.pm already
      generates code in this order.
      
      * bindings/scripts/CodeGeneratorV8.pm:
      (GenerateHeaderContentHeader):
      (GenerateImplementationContentHeader):
      * bindings/scripts/test/V8/V8TestCallback.cpp:
      * bindings/scripts/test/V8/V8TestCallback.h:
      * bindings/scripts/test/V8/V8TestInterface.cpp:
      * bindings/scripts/test/V8/V8TestInterface.h:
      * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
      * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
      * html/BaseMultipleFieldsDateAndTimeInputType.h:
      * html/ColorInputType.cpp:
      * html/ColorInputType.h:
      * html/DateInputType.cpp:
      * html/DateTimeInputType.cpp:
      * html/DateTimeInputType.h:
      * html/DateTimeLocalInputType.cpp:
      * html/HTMLAudioElement.cpp:
      * html/HTMLAudioElement.h:
      * html/HTMLDataListElement.cpp:
      * html/HTMLDialogElement.cpp:
      * html/HTMLDialogElement.h:
      * html/HTMLMediaElement.cpp:
      * html/HTMLMediaElement.h:
      * html/HTMLMeterElement.cpp:
      * html/HTMLProgressElement.cpp:
      * html/HTMLSourceElement.cpp:
      * html/HTMLSourceElement.h:
      * html/HTMLTrackElement.cpp:
      * html/HTMLTrackElement.h:
      * html/HTMLVideoElement.cpp:
      * html/HTMLVideoElement.h:
      * html/MonthInputType.cpp:
      * html/TimeInputType.cpp:
      * html/WeekInputType.cpp:
      * html/shadow/DateTimeFieldElement.h:
      * html/shadow/DetailsMarkerControl.cpp:
      * html/shadow/MeterShadowElement.cpp:
      * html/shadow/ProgressShadowElement.cpp:
      * rendering/RenderDetailsMarker.cpp:
      * rendering/RenderInputSpeech.cpp:
      * rendering/RenderMeter.cpp:
      * rendering/RenderProgress.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c271a5fc
  21. 05 Feb, 2013 1 commit
    • eric.carlson@apple.com's avatar
      More updates to Caption user preferences · 0908653c
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=108997
      
      Reviewed by Dean Jackson.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::captionPreferencesChanged): Give the media controls a chance
          to update for a preferences change.
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTextTrackContainerElement::updateSizes): Add optional "force update" 
          param to force font size recalc even when the video size hasn't changed.
      * html/shadow/MediaControlElements.h:
      
      * html/shadow/MediaControls.cpp:
      (WebCore::MediaControls::textTrackPreferencesChanged): New, force a font size recalc.
      * html/shadow/MediaControls.h:
      
      * html/track/TextTrackCueGeneric.cpp:
      (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Don't set width/size of cues
          that use default positioning. Use "start" as the default alignment.
      
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Set padding when the window is visible
          so it shows around the cue background.
      (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Set padding to 0 when the background
          is visible.
      (WebCore::CaptionUserPreferencesMac::windowRoundedCornerRadiusCSS): Add "px" to the border radius
          so it actually works.
      * rendering/RenderTextTrackCue.cpp:
      (WebCore::RenderTextTrackCue::layout): Special case generic cues with default style.
      (WebCore::RenderTextTrackCue::repositionGenericCue):
      * rendering/RenderTextTrackCue.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0908653c
  22. 01 Feb, 2013 1 commit
    • loislo@chromium.org's avatar
      Web Inspector: Native Memory Instrumentation: provide edge names to class... · a7d09fcf
      loislo@chromium.org authored
      Web Inspector: Native Memory Instrumentation: provide edge names to class members in all WebCore instrumented classes.
      https://bugs.webkit.org/show_bug.cgi?id=107369
      
      Reviewed by Yury Semikhatsky.
      
      It is almost mechanical change generated by a script.
      Late I'll implement name to edge name consistency check in clang plugin.
      
      * Modules/webaudio/AudioContext.cpp:
      (WebCore::AudioContext::reportMemoryUsage):
      * Modules/webaudio/AudioNode.cpp:
      (WebCore::AudioNode::reportMemoryUsage):
      * bindings/js/ScriptWrappable.h:
      (WebCore::ScriptWrappable::reportMemoryUsage):
      * bindings/v8/DOMDataStore.cpp:
      (WebCore::DOMDataStore::reportMemoryUsage):
      * bindings/v8/DOMWrapperMap.h:
      (WebCore::DOMWrapperMap::reportMemoryUsage):
      * bindings/v8/V8PerIsolateData.cpp:
      (WebCore::V8PerIsolateData::reportMemoryUsage):
      * bindings/v8/V8ValueCache.cpp:
      (WebCore::StringCache::reportMemoryUsage):
      * css/CSSBorderImageSliceValue.cpp:
      (WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage):
      * css/CSSCalculationValue.cpp:
      * css/CSSCanvasValue.cpp:
      (WebCore::CSSCanvasValue::reportDescendantMemoryUsage):
      * css/CSSCharsetRule.cpp:
      (WebCore::CSSCharsetRule::reportMemoryUsage):
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::reportMemoryUsage):
      * css/CSSCrossfadeValue.cpp:
      (WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage):
      * css/CSSCursorImageValue.cpp:
      (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
      * css/CSSFontFaceRule.cpp:
      (WebCore::CSSFontFaceRule::reportMemoryUsage):
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage):
      * css/CSSFunctionValue.cpp:
      (WebCore::CSSFunctionValue::reportDescendantMemoryUsage):
      * css/CSSGradientValue.cpp:
      (WebCore::CSSGradientColorStop::reportMemoryUsage):
      (WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
      (WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage):
      (WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage):
      * css/CSSGroupingRule.cpp:
      (WebCore::CSSGroupingRule::reportMemoryUsage):
      * css/CSSImageGeneratorValue.cpp:
      (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
      * css/CSSImageSetValue.cpp:
      (WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
      (WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage):
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::reportDescendantMemoryUsage):
      * css/CSSImportRule.cpp:
      (WebCore::CSSImportRule::reportMemoryUsage):
      * css/CSSMediaRule.cpp:
      (WebCore::CSSMediaRule::reportMemoryUsage):
      * css/CSSPageRule.cpp:
      (WebCore::CSSPageRule::reportMemoryUsage):
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::reportMemoryUsage):
      * css/CSSReflectValue.cpp:
      (WebCore::CSSReflectValue::reportDescendantMemoryUsage):
      * css/CSSRule.cpp:
      (WebCore::CSSRule::reportMemoryUsage):
      * css/CSSRuleList.cpp:
      (WebCore::StaticCSSRuleList::reportMemoryUsage):
      * css/CSSRuleList.h:
      * css/CSSSelectorList.cpp:
      (WebCore::CSSSelectorList::reportMemoryUsage):
      * css/CSSStyleRule.cpp:
      (WebCore::CSSStyleRule::reportMemoryUsage):
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::reportMemoryUsage):
      * css/CSSValue.cpp:
      (WebCore::TextCloneCSSValue::reportDescendantMemoryUsage):
      * css/CSSValueList.cpp:
      (WebCore::CSSValueList::reportDescendantMemoryUsage):
      * css/CSSVariableValue.h:
      (WebCore::CSSVariableValue::reportDescendantMemoryUsage):
      * css/FontFeatureValue.cpp:
      (WebCore::FontFeatureValue::reportDescendantMemoryUsage):
      * css/FontValue.cpp:
      (WebCore::FontValue::reportDescendantMemoryUsage):
      * css/MediaList.cpp:
      (WebCore::MediaQuerySet::reportMemoryUsage):
      (WebCore::MediaList::reportMemoryUsage):
      * css/MediaQuery.cpp:
      (WebCore::MediaQuery::reportMemoryUsage):
      * css/MediaQueryExp.cpp:
      (WebCore::MediaQueryExp::reportMemoryUsage):
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
      (WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
      (WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
      * css/RuleFeature.cpp:
      (WebCore::RuleFeatureSet::reportMemoryUsage):
      * css/RuleSet.cpp:
      (WebCore::RuleData::reportMemoryUsage):
      (WebCore::RuleSet::reportMemoryUsage):
      (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
      * css/ShadowValue.cpp:
      (WebCore::ShadowValue::reportDescendantMemoryUsage):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::reportMemoryUsage):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::MatchedProperties::reportMemoryUsage):
      (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
      (WebCore::MediaQueryResult::reportMemoryUsage):
      (WebCore::StyleResolver::reportMemoryUsage):
      * css/StyleRule.cpp:
      (WebCore::StyleRule::reportDescendantMemoryUsage):
      (WebCore::StyleRulePage::reportDescendantMemoryUsage):
      (WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
      (WebCore::StyleRuleGroup::reportDescendantMemoryUsage):
      (WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
      (WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
      (WebCore::StyleRuleViewport::reportDescendantMemoryUsage):
      * css/StyleRuleImport.cpp:
      (WebCore::StyleRuleImport::reportDescendantMemoryUsage):
      * css/StyleScopeResolver.cpp:
      (WebCore::StyleScopeResolver::reportMemoryUsage):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::reportMemoryUsage):
      * css/WebKitCSSKeyframeRule.cpp:
      (WebCore::StyleKeyframe::reportMemoryUsage):
      (WebCore::WebKitCSSKeyframeRule::reportMemoryUsage):
      * css/WebKitCSSKeyframesRule.cpp:
      (WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
      (WebCore::WebKitCSSKeyframesRule::reportMemoryUsage):
      * css/WebKitCSSSVGDocumentValue.cpp:
      (WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage):
      * css/WebKitCSSShaderValue.cpp:
      (WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
      * css/WebKitCSSViewportRule.cpp:
      (WebCore::WebKitCSSViewportRule::reportMemoryUsage):
      * dom/Attribute.h:
      (WebCore::Attribute::reportMemoryUsage):
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::reportMemoryUsage):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::reportMemoryUsage):
      * dom/ContainerNode.h:
      (ContainerNode):
      * dom/Document.cpp:
      (WebCore::Document::reportMemoryUsage):
      * dom/DocumentEventQueue.cpp:
      (WebCore::DocumentEventQueue::reportMemoryUsage):
      * dom/DocumentOrderedMap.cpp:
      (WebCore::DocumentOrderedMap::reportMemoryUsage):
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
      * dom/Element.cpp:
      (WebCore::Element::reportMemoryUsage):
      * dom/ElementAttributeData.cpp:
      (WebCore::ElementAttributeData::reportMemoryUsage):
      * dom/ElementRareData.cpp:
      (WebCore::ElementRareData::reportMemoryUsage):
      * dom/ElementShadow.cpp:
      (WebCore::ElementShadow::reportMemoryUsage):
      * dom/Event.cpp:
      (WebCore::Event::reportMemoryUsage):
      * dom/LiveNodeList.cpp:
      (WebCore::LiveNodeListBase::reportMemoryUsage):
      * dom/Node.cpp:
      (WebCore::Node::reportMemoryUsage):
      * dom/NodeRareData.cpp:
      (WebCore::NodeListsNodeData::reportMemoryUsage):
      (WebCore::NodeRareData::reportMemoryUsage):
      * dom/QualifiedName.cpp:
      (WebCore::QualifiedName::reportMemoryUsage):
      (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
      * dom/ScriptExecutionContext.cpp:
      (WebCore::ScriptExecutionContext::reportMemoryUsage):
      * dom/SecurityContext.cpp:
      (WebCore::SecurityContext::reportMemoryUsage):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::reportMemoryUsage):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::reportMemoryUsage):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::reportMemoryUsage):
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::reportMemoryUsage):
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::reportMemoryUsage):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::reportMemoryUsage):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::reportMemoryUsage):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::reportMemoryUsage):
      * inspector/HeapGraphSerializer.cpp:
      (WebCore::HeapGraphSerializer::HeapGraphSerializer):
      (WebCore::HeapGraphSerializer::reportNode):
      (WebCore::HeapGraphSerializer::reportMemoryUsage):
      * inspector/HeapGraphSerializer.h:
      (HeapGraphSerializer):
      * inspector/InspectorBaseAgent.cpp:
      (WebCore::InspectorBaseAgentInterface::reportMemoryUsage):
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::reportMemoryUsage):
      * inspector/InspectorDOMStorageAgent.cpp:
      (WebCore::InspectorDOMStorageAgent::reportMemoryUsage):
      * inspector/InspectorDOMStorageResource.cpp:
      (WebCore::InspectorDOMStorageResource::reportMemoryUsage):
      * inspector/InspectorDebuggerAgent.cpp:
      (WebCore::InspectorDebuggerAgent::reportMemoryUsage):
      (WebCore::ScriptDebugListener::Script::reportMemoryUsage):
      * inspector/InspectorMemoryAgent.cpp:
      (WebCore::InspectorMemoryAgent::reportMemoryUsage):
      * inspector/InspectorOverlay.cpp:
      (WebCore::InspectorOverlay::reportMemoryUsage):
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::reportMemoryUsage):
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::reportMemoryUsage):
      * inspector/MemoryInstrumentationImpl.cpp:
      (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
      (WebCore::MemoryInstrumentationImpl::reportMemoryUsage):
      * inspector/NetworkResourcesData.cpp:
      (WebCore::XHRReplayData::reportMemoryUsage):
      (WebCore::NetworkResourcesData::ResourceData::reportMemoryUsage):
      (WebCore::NetworkResourcesData::reportMemoryUsage):
      * loader/CachedMetadata.cpp:
      (WebCore::CachedMetadata::reportMemoryUsage):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::reportMemoryUsage):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::reportMemoryUsage):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::reportMemoryUsage):
      * loader/Prerenderer.cpp:
      (WebCore::Prerenderer::reportMemoryUsage):
      * loader/ResourceBuffer.cpp:
      (WebCore::ResourceBuffer::reportMemoryUsage):
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::reportMemoryUsage):
      * loader/SubresourceLoader.cpp:
      (WebCore::SubresourceLoader::reportMemoryUsage):
      * loader/SubstituteData.cpp:
      (WebCore::SubstituteData::reportMemoryUsage):
      * loader/cache/CachedCSSStyleSheet.cpp:
      (WebCore::CachedCSSStyleSheet::reportMemoryUsage):
      * loader/cache/CachedFont.cpp:
      (WebCore::CachedFont::reportMemoryUsage):
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::reportMemoryUsage):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::reportMemoryUsage):
      * loader/cache/CachedResourceHandle.cpp:
      (WebCore::CachedResourceHandleBase::reportMemoryUsage):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::reportMemoryUsage):
      * loader/cache/CachedSVGDocument.cpp:
      (WebCore::CachedSVGDocument::reportMemoryUsage):
      * loader/cache/CachedScript.cpp:
      (WebCore::CachedScript::reportMemoryUsage):
      * loader/cache/CachedShader.cpp:
      (WebCore::CachedShader::reportMemoryUsage):
      * loader/cache/CachedXSLStyleSheet.cpp:
      (WebCore::CachedXSLStyleSheet::reportMemoryUsage):
      * loader/cache/MemoryCache.cpp:
      (WebCore::MemoryCache::reportMemoryUsage):
      * page/DOMTimer.cpp:
      (WebCore::DOMTimer::reportMemoryUsage):
      * page/Frame.cpp:
      (WebCore::Frame::reportMemoryUsage):
      * page/Page.cpp:
      (WebCore::Page::reportMemoryUsage):
      * platform/KURL.cpp:
      (WebCore::KURL::reportMemoryUsage):
      * platform/KURLGoogle.cpp:
      (WebCore::KURLGooglePrivate::reportMemoryUsage):
      * platform/KURLWTFURLImpl.h:
      (WebCore::KURLWTFURLImpl::reportMemoryUsage):
      * platform/ScrollableArea.cpp:
      (WebCore::ScrollableArea::reportMemoryUsage):
      * platform/SharedBuffer.cpp:
      (WebCore::SharedBuffer::reportMemoryUsage):
      * platform/audio/AudioArray.h:
      (WebCore::AudioArray::reportMemoryUsage):
      * platform/audio/FFTFrame.cpp:
      (WebCore::FFTFrame::reportMemoryUsage):
      * platform/audio/HRTFDatabase.cpp:
      (WebCore::HRTFDatabase::reportMemoryUsage):
      * platform/audio/HRTFDatabaseLoader.cpp:
      (WebCore::HRTFDatabaseLoader::reportMemoryUsage):
      * platform/audio/HRTFElevation.cpp:
      (WebCore::HRTFElevation::reportMemoryUsage):
      * platform/audio/HRTFKernel.cpp:
      (WebCore::HRTFKernel::reportMemoryUsage):
      * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
      (reportMemoryUsage):
      * platform/graphics/BitmapImage.cpp:
      (WebCore::BitmapImage::reportMemoryUsage):
      (WebCore::FrameData::reportMemoryUsage):
      * platform/graphics/CrossfadeGeneratedImage.cpp:
      (WebCore::CrossfadeGeneratedImage::reportMemoryUsage):
      * platform/graphics/GeneratorGeneratedImage.cpp:
      (WebCore::GeneratorGeneratedImage::reportMemoryUsage):
      * platform/graphics/GraphicsLayer.cpp:
      (WebCore::GraphicsLayer::reportMemoryUsage):
      * platform/graphics/ImageBuffer.cpp:
      (WebCore::ImageBuffer::reportMemoryUsage):
      * platform/graphics/ImageSource.cpp:
      (WebCore::ImageSource::reportMemoryUsage):
      * platform/graphics/chromium/GraphicsLayerChromium.cpp:
      (WebCore::GraphicsLayerChromium::reportMemoryUsage):
      * platform/graphics/skia/ImageBufferSkia.cpp:
      (WebCore::ImageBufferData::reportMemoryUsage):
      * platform/graphics/skia/MemoryInstrumentationSkia.cpp:
      (reportMemoryUsage):
      * platform/graphics/skia/NativeImageSkia.cpp:
      (WebCore::NativeImageSkia::reportMemoryUsage):
      * platform/image-decoders/ImageDecoder.cpp:
      (WebCore::ImageFrame::reportMemoryUsage):
      (WebCore):
      (WebCore::ImageDecoder::reportMemoryUsage):
      * platform/image-decoders/skia/ImageDecoderSkia.cpp:
      (WebCore::ImageFrame::reportMemoryUsage):
      * platform/network/FormData.cpp:
      (WebCore::FormData::reportMemoryUsage):
      (WebCore::FormDataElement::reportMemoryUsage):
      * platform/network/ResourceRequestBase.cpp:
      (WebCore::ResourceRequestBase::reportMemoryUsageBase):
      * platform/network/ResourceResponseBase.cpp:
      (WebCore::ResourceResponseBase::reportMemoryUsage):
      * platform/network/chromium/ResourceRequest.cpp:
      (WebCore::ResourceRequest::reportMemoryUsage):
      * rendering/InlineBox.cpp:
      (WebCore::InlineBox::reportMemoryUsage):
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::reportMemoryUsage):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::reportMemoryUsage):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::reportMemoryUsage):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::reportMemoryUsage):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::reportMemoryUsage):
      (WebCore::RenderFrameSet::GridAxis::reportMemoryUsage):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::reportMemoryUsage):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::reportMemoryUsage):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::reportMemoryUsage):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::reportMemoryUsage):
      * rendering/RenderListMarker.cpp:
      (WebCore::RenderListMarker::reportMemoryUsage):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::reportMemoryUsage):
      * rendering/RenderTableCol.cpp:
      (WebCore::RenderTableCol::reportMemoryUsage):
      * rendering/RenderTableRow.cpp:
      (WebCore::RenderTableRow::reportMemoryUsage):
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::reportMemoryUsage):
      (WebCore::RenderTableSection::RowStruct::reportMemoryUsage):
      (WebCore::RenderTableSection::CellStruct::reportMemoryUsage):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::reportMemoryUsage):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::reportMemoryUsage):
      * rendering/style/DataRef.h:
      (WebCore::DataRef::reportMemoryUsage):
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::reportMemoryUsage):
      * rendering/style/StyleRareInheritedData.cpp:
      (WebCore::StyleRareInheritedData::reportMemoryUsage):
      * rendering/style/StyleRareNonInheritedData.cpp:
      (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
      * svg/SVGPaint.cpp:
      (WebCore::SVGPaint::reportDescendantMemoryUsage):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::reportMemoryUsage):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::reportMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7d09fcf
  23. 31 Jan, 2013 2 commits
    • vcarbune@chromium.org's avatar
      [Track] Closed Caption button shouldn't be visible if all the track resources have failed loading · 9fb916c7
      vcarbune@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106285
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Updated existing test cases.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::textTracksAreReady): Checked whether there are tracks not loaded
      when the algorithm began.
      (WebCore::HTMLMediaElement::textTrackReadyStateChanged): If the ready state changed to
      FailedToLoad the media controls should check whether there are other caption tracks
      and hide the button if not.
      (WebCore::HTMLMediaElement::didAddTrack): Added trigger to closedCaptionsTrackChanged.
      (WebCore::HTMLMediaElement::hasClosedCaptions): Updated check to skip tracks that
      failed to load.
      * html/shadow/MediaControls.cpp:
      (WebCore::MediaControls::reset): Used the newly added method.
      (WebCore::MediaControls::refreshClosedCaptionsButtonVisibility): Added container method for
      default behaviour for refreshing the visibility of the caption button.
      (WebCore::MediaControls::closedCaptionTracksChanged): Used the newly added method.
      (WebCore):
      * html/shadow/MediaControls.h:
      (MediaControls):
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::textTracksAreReady):
      (WebCore::HTMLMediaElement::textTrackReadyStateChanged):
      (WebCore::HTMLMediaElement::setReadyState):
      (WebCore::HTMLMediaElement::didAddTrack):
      (WebCore::HTMLMediaElement::hasClosedCaptions):
      * html/shadow/MediaControls.cpp:
      (WebCore::MediaControls::reset):
      (WebCore::MediaControls::refreshClosedCaptionsButtonVisibility):
      (WebCore::MediaControls::closedCaptionTracksChanged):
      (WebCore):
      * html/shadow/MediaControls.h:
      (MediaControls):
      
      LayoutTests:
      
      Updated tests to include improved behavior.
      
      * media/video-controls-captions-expected.txt: Updated.
      * media/video-controls-captions.html: Updated.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9fb916c7
    • inferno@chromium.org's avatar
      Use ASSERT_WITH_SECURITY_IMPLICATION to catch bad casts in DOM · fe619ea6
      inferno@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=108490
      
      Reviewed by Eric Seidel.
      
      * dom/ContainerNode.h:
      (WebCore::toContainerNode):
      * dom/Element.h:
      (WebCore::toElement):
      * dom/ShadowRoot.h:
      (WebCore::toShadowRoot):
      * dom/Text.h:
      (WebCore::toText):
      * html/HTMLElement.h:
      (HTMLElement):
      (WebCore::toHTMLElement):
      * html/HTMLFrameOwnerElement.h:
      (WebCore::toFrameOwnerElement):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::hasMediaControls):
      * html/HTMLTemplateElement.cpp:
      (WebCore::toHTMLTemplateElement):
      * html/HTMLUnknownElement.h:
      (WebCore::toHTMLUnknownElement):
      * html/shadow/InsertionPoint.h:
      (WebCore::toInsertionPoint):
      * html/shadow/MediaControlElementTypes.cpp:
      (WebCore::mediaControlElementType):
      * html/shadow/MediaControls.h:
      (WebCore::toMediaControls):
      * html/shadow/SliderThumbElement.h:
      (WebCore::toSliderThumbElement):
      * html/shadow/TextControlInnerElements.h:
      (WebCore::toInputFieldSpeechButtonElement):
      * html/shadow/TextFieldDecorationElement.h:
      (WebCore::toTextFieldDecorationElement):
      * html/track/WebVTTElement.h:
      (WebCore::toWebVTTElement):
      * mathml/MathMLElement.h:
      (WebCore::toMathMLElement):
      * page/scrolling/ScrollingStateFixedNode.h:
      (WebCore::toScrollingStateFixedNode):
      * page/scrolling/ScrollingStateScrollingNode.h:
      (WebCore::toScrollingStateScrollingNode):
      * page/scrolling/ScrollingStateStickyNode.h:
      (WebCore::toScrollingStateStickyNode):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::resize):
      * rendering/svg/SVGResources.cpp:
      (WebCore::registerPendingResource):
      (WebCore::SVGResources::buildCachedResources):
      * svg/SVGElement.h:
      (WebCore::toSVGElement):
      * svg/SVGStyledElement.h:
      (WebCore::toSVGStyledElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe619ea6
  24. 30 Jan, 2013 1 commit
    • esprehn@chromium.org's avatar
      Remove willAddAuthorShadowRoot and replace with alwaysCreateUserAgentShadowRoot · 1326ee13
      esprehn@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=108248
      
      Reviewed by Dimitri Glazkov.
      
      The only reason willAddAuthorShadowRoot exists is so that a handful of
      other elements can create the user agent shadow root right before the
      author shadow root is created. Instead of providing this generic hook
      just expose a virtual method on Element that requests this behavior.
      
      No new tests, just refactoring.
      
      * dom/Element.cpp:
      (WebCore::Element::createShadowRoot):
      * dom/Element.h:
      (Element):
      (WebCore::Element::alwaysCreateUserAgentShadowRoot): Added.
      * dom/ElementShadow.cpp:
      (WebCore::ElementShadow::addShadowRoot): Remove willAddAuthorShadowRoot notification.
      * html/HTMLButtonElement.cpp:
      * html/HTMLButtonElement.h:
      * html/HTMLFormControlElement.cpp:
      * html/HTMLFormControlElement.h:
      * html/HTMLMediaElement.cpp:
      * html/HTMLMediaElement.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1326ee13
  25. 29 Jan, 2013 2 commits
    • vcarbune@chromium.org's avatar
      Heap-use-after-free in WebCore::RenderTextTrackCue::layout · cd01ed72
      vcarbune@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=108197
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Test: media/track/track-cue-rendering-tree-is-removed-properly.html
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::textTrackRemoveCue): Ensure the display tree
      is removed when the cue is removed from the list of cues.
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::~TextTrackCue): Enfore display tree removal.
      
      LayoutTests:
      
      Added test that triggers the crash. Verified proper removal of the tree.
      
      * media/track/track-cue-rendering-tree-is-removed-properly-expected.txt: Added.
      * media/track/track-cue-rendering-tree-is-removed-properly.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd01ed72
    • esprehn@chromium.org's avatar
      Handle createShadowSubtree inside of ensureUserAgentShadowRoot · 933723d8
      esprehn@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=108116
      
      Reviewed by Dimitri Glazkov.
      
      Instead of making everyone create the UserAgentShadowRoot manually all
      over, centralize it in ensureUserAgentShadowRoot() and add a notification
      Element::didAddUserAgentShadowRoot that lets elements fill in the subtree.
      This lets us get rid of lots of code duplication.
      
      No new tests, just refactoring.
      
      * dom/Element.cpp:
      (WebCore::Element::ensureUserAgentShadowRoot):
      * dom/Element.h:
      (WebCore::Element::didAddUserAgentShadowRoot):
      (Element):
      * html/HTMLDetailsElement.cpp:
      (WebCore::DetailsSummaryElement::create):
      (WebCore::HTMLDetailsElement::create):
      (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
      * html/HTMLDetailsElement.h:
      (HTMLDetailsElement):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::create):
      (WebCore::HTMLInputElement::didAddUserAgentShadowRoot):
      * html/HTMLInputElement.h:
      (HTMLInputElement):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::willAddAuthorShadowRoot):
      (WebCore::HTMLMediaElement::createMediaControls):
      * html/HTMLMediaElement.h:
      * html/HTMLMeterElement.cpp:
      (WebCore::HTMLMeterElement::create):
      (WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
      * html/HTMLMeterElement.h:
      (HTMLMeterElement):
      * html/HTMLProgressElement.cpp:
      (WebCore::HTMLProgressElement::create):
      (WebCore::HTMLProgressElement::didAddUserAgentShadowRoot):
      * html/HTMLProgressElement.h:
      * html/HTMLSummaryElement.cpp:
      (WebCore::HTMLSummaryElement::create):
      (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
      * html/HTMLSummaryElement.h:
      (HTMLSummaryElement):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::create):
      (WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):
      * html/HTMLTextAreaElement.h:
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlPanelMuteButtonElement::create):
      (WebCore::MediaControlVolumeSliderMuteButtonElement::create):
      (WebCore::MediaControlPlayButtonElement::create):
      (WebCore::MediaControlOverlayPlayButtonElement::create):
      (WebCore::MediaControlSeekForwardButtonElement::create):
      (WebCore::MediaControlSeekBackButtonElement::create):
      (WebCore::MediaControlRewindButtonElement::create):
      (WebCore::MediaControlReturnToRealtimeButtonElement::create):
      (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
      (WebCore::MediaControlTimelineElement::create):
      (WebCore::MediaControlPanelVolumeSliderElement::create):
      (WebCore::MediaControlFullscreenVolumeSliderElement::create):
      (WebCore::MediaControlFullscreenButtonElement::create):
      (WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
      (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
      * html/shadow/MediaControlsBlackBerry.cpp:
      (WebCore::MediaControlFullscreenPlayButtonElement::create):
      (WebCore::MediaControlFullscreenFullscreenButtonElement::create):
      (WebCore::MediaControlFullscreenTimelineElement::create):
      (WebCore::MediaControlAudioMuteButtonElement::create):
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGTRefElement::create):
      * svg/SVGTRefElement.h:
      (SVGTRefElement):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::create):
      * svg/SVGUseElement.h:
      (SVGUseElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      933723d8
  26. 28 Jan, 2013 1 commit
  27. 25 Jan, 2013 2 commits
    • eric.carlson@apple.com's avatar
      Adding a text track should not make controls visible · 6ddcabed
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107956
      
      Source/WebCore: 
      
      Reviewed by Dean Jackson.
      
      Test: media/media-captions-no-controls.html
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Call updateTextTrackDisplay.
      (WebCore::HTMLMediaElement::updateTextTrackDisplay): New, call mediaControls->updateTextTrackDisplay()
          if we have controls.
      (WebCore::HTMLMediaElement::setClosedCaptionsVisible):  Call updateTextTrackDisplay.
      (WebCore::HTMLMediaElement::createMediaControls): Hide controls if they should not be 
          visible. Minor drive by cleanup.
      (WebCore::HTMLMediaElement::configureTextTrackDisplay): Drive by cleanup, pull the three lines
          from updateClosedCaptionsControls inline and delete it because this was the only caller.
      * html/HTMLMediaElement.h:
      
      LayoutTests: 
      
      Reviewed by  Dean Jackson.
      
      * media/media-captions-no-controls-expected.txt: Added.
      * media/media-captions-no-controls.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ddcabed
    • vcarbune@chromium.org's avatar
      Heap-use-after-free in WebCore::TextTrackCue::isActive · c8333e83
      vcarbune@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104594
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Test: media/track/track-remove-active-cue-crash.html
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
      (WebCore::HTMLMediaElement::textTrackAddCue):
      (WebCore::HTMLMediaElement::textTrackRemoveCue): Remove the cue
      from the active cue set as well.
      * html/HTMLMediaElement.h:
      (WebCore):
      
      LayoutTests:
      
      * media/track/track-remove-active-cue-crash-expected.txt: Added.
      * media/track/track-remove-active-cue-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c8333e83
  28. 23 Jan, 2013 1 commit
  29. 21 Jan, 2013 1 commit
    • eric.carlson@apple.com's avatar
      Support non-WebVTT cues from in-band text tracks · 6a82ee2a
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107046
      
      Reviewed by Sam Weinig.
      
      * CMakeLists.txt: Add new files.
      * GNUmakefile.list.am: Ditto.
      * Target.pri: Ditto.
      * WebCore.gypi: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Pass video size to getDisplayTree.
      
      * html/track/InbandTextTrack.cpp:
      (WebCore::InbandTextTrack::addGenericCue): New, create a generic cue if it doesn't already exist.
      (WebCore::InbandTextTrack::addWebVTTCue): Renamed from addCue.
      * html/track/InbandTextTrack.h:
      
      * html/track/TextTrack.cpp:
      (WebCore::TextTrack::hasCue): Moved from InbandTextTrack.cpp, use operator == instead of inline
          comparison so derived TextTrackCues can be compared.
      * html/track/TextTrack.h:
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::applyCSSProperties): Interface change.
      (WebCore::TextTrackCue::TextTrackCue): Don't create the display tree in the constructor, it may
          never be needed.
      (WebCore::TextTrackCue::createDisplayTree): New, create the display tree.
      (WebCore::TextTrackCue::displayTreeInternal): Display tree accessor, allows it to be created lazily.
      (WebCore::TextTrackCue::setAlign): Alignment -> CueAlignment.
      (WebCore::TextTrackCue::setIsActive): Use displayTreeInternal().
      (WebCore::TextTrackCue::getDisplayTree): Use displayTreeInternal(), pass video size to applyCSSProperties.
      (WebCore::TextTrackCue::removeDisplayTree): Use displayTreeInternal().
      (WebCore::TextTrackCue::operator==): New.
      * html/track/TextTrackCue.h:
      (WebCore::TextTrackCue::getAlignment): Alignment -> CueAlignment.
      (WebCore::TextTrackCue::operator!=): New.
      (WebCore::TextTrackCue::cueType): New, cue type identified needed by operator==.
      (WebCore::TextTrackCue::ownerDocument): New.
      
      * html/track/TextTrackCueGeneric.cpp: Added.
      (WebCore::TextTrackCueGenericBox::create):
      (WebCore::TextTrackCueGenericBox::TextTrackCueGenericBox):
      (WebCore::TextTrackCueGenericBox::applyCSSProperties):
      (WebCore:::TextTrackCue):
      (WebCore::TextTrackCueGeneric::createDisplayTree):
      (WebCore::TextTrackCueGeneric::operator==):
      * html/track/TextTrackCueGeneric.h: Added.
      (WebCore::TextTrackCueGeneric::create):
      (WebCore::TextTrackCueGeneric::~TextTrackCueGeneric):
      (WebCore::TextTrackCueGeneric::baseFontSizeRelativeToVideoHeight):
      (WebCore::TextTrackCueGeneric::setBaseFontSizeRelativeToVideoHeight):
      (WebCore::TextTrackCueGeneric::fontSizeMultiplier):
      (WebCore::TextTrackCueGeneric::setFontSizeMultiplier):
      (WebCore::TextTrackCueGeneric::fontName):
      (WebCore::TextTrackCueGeneric::setFontName):
      (WebCore::TextTrackCueGeneric::operator!=):
      (WebCore::TextTrackCueGeneric::cueType):
      
      * platform/graphics/InbandTextTrackPrivateClient.h:
      * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
      (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Copy cue attributes into GenericCueData
          struct instead of trying to convert to WebVTT settings string. Process font size,font base
          size, font name, and vertical layout attributes,
      (WebCore::InbandTextTrackPrivateAVF::processCue): Create separate cues for each attributed
          string in the array because each one can be at a different screen location.
      (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
      * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
      (InbandTextTrackPrivateAVF):
      
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Reset any partially accumulated cues
          delivered since the seek was started.
      (WebCore::MediaPlayerPrivateAVFoundation::addGenericCue): Renamed from flushCurrentCue.
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
      
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Whitespace cleanup.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Tell legible output to deliver cues
          without any additional styling needed by the internal renderer.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks):
      (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Do nothing if asked to change
          to the track that is already current.
      (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
          Check to make sure that the client callback isn't NULL.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a82ee2a