1. 29 Oct, 2012 1 commit
    • eric.carlson@apple.com's avatar
      Support captions when PLUGIN_PROXY_FOR_VIDEO · 2d0fe4d3
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=100690
      
      Reviewed by Simon Fraser.
      
      When built with PLUGIN_PROXY_FOR_VIDEO, WebCore uses a plug-in for the media element's
      platform media engine. Update this code path so the shadow DOM elements used to display
      text tracks are created and configured correctly.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::configureMediaControls): Create media controls if necessary.
      
      * rendering/RenderEmbeddedObject.cpp:
      (WebCore::RenderEmbeddedObject::layout): Set the position and size of the shadow DOM when the
          position of the embedded element changes.
      * rendering/RenderEmbeddedObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d0fe4d3
  2. 24 Oct, 2012 1 commit
    • eric.carlson@apple.com's avatar
      Allow ports to override text track rendering style · 68e8da75
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97800
      <rdar://problem/12044964>
      
      Reviewed by Maciej Stachowiak.
      
      Source/WebCore:
      
      * WebCore.exp.in: Export new WebkitSystemInterface functions.
      * WebCore.xcodeproj/project.pbxproj: Add CaptionUserPreferences.h, CaptionUserPreferencesMac.mm,
          and CaptionUserPreferencesMac.h.
      
      * css/mediaControls.css: Rearrange the caption CSS so it is possible to style the cue window,
          background, and text independently.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_disableCaptions with theme->userPrefersCaptions().
      (WebCore::HTMLMediaElement::attach): Register for caption preferences change callbacks.
      (WebCore::HTMLMediaElement::detach): Unregister for caption preferences change callbacks.
      (WebCore::HTMLMediaElement::userPrefersCaptions): Return theme->userPrefersCaptions().
      (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Consider userPrefersCaptions().
      (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as
          un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused.
      (WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks.
      (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from
          setClosedCaptionsVisible
      * html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener.
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTextTrackContainerElement::updateSizes): Get rid of unnecessary member
          variable. Get caption font scale from theme instead of hard coding.
      * html/shadow/MediaControlElements.h:
      
      * html/track/TextTrack.cpp:
      (WebCore::TextTrack::TextTrack): Change attributes from String to AtomicString.
      (WebCore::TextTrack::isValidKindKeyword): Ditto.
      (WebCore::TextTrack::setKind): Ditto.
      (WebCore::TextTrack::setMode): Ditto.
      (WebCore::TextTrack::mode): Ditto.
      * html/track/TextTrack.h:
      (WebCore::TextTrack::create): Ditto.
      (WebCore::TextTrack::kind): Ditto.
      (WebCore::TextTrack::label): Ditto.
      (WebCore::TextTrack::setLabel): Ditto.
      (WebCore::TextTrack::language): Ditto.
      (WebCore::TextTrack::setLanguage): Ditto.
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id.
      (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the
          shadow pseudo id so it can be used elsewhere.
      (WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId.
      (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the
          shadow pseudo id so it can be used elsewhere.
      (WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto.
      (WebCore::TextTrackCue::updateDisplayTree):
      * html/track/TextTrackCue.h:
      
      * page/CaptionUserPreferences.h: Added.
      * page/CaptionUserPreferencesMac.h: Added.
      * page/CaptionUserPreferencesMac.mm: Added.
      (WebCore::userCaptionPreferencesChangedNotificationCallback):
      (WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac):
      (WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac):
      (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): New, passthrough to WKSI function.
      (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Ditto.
      (WebCore::CaptionUserPreferencesMac::captionsWindowColor): Return Color with user's caption window color preference.
      (WebCore::CaptionUserPreferencesMac::captionsBackgroundColor): Return Color with user's caption
          background color preference.
      (WebCore::CaptionUserPreferencesMac::captionsTextColor): Return Color with user's caption text color preference.
      (WebCore::CaptionUserPreferencesMac::captionsEdgeColorForTextColor): Return Color for text edge effect.
      (WebCore::CaptionUserPreferencesMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow
          or webkit-text-stroke property.
      (WebCore::CaptionUserPreferencesMac::cssColorProperty): Return a String with css to set a property
          with a color value.
      (WebCore::CaptionUserPreferencesMac::captionsTextEdgeStyle): Return a String with css to style caption
          text with the user's preferred text edge stye.
      (WebCore::CaptionUserPreferencesMac::captionsDefaultFont): Return a String with css to style caption
          text with the user's preferred font.
      (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Return a String with css to style captions
          with the user's preferred style.
      (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Return the user's preferred caption font scale.
      (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Notify listeners of caption preference change.
      (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences
          changes listener.
      (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences
          changes listener.
      (WebCore::CaptionUserPreferencesMac::updateCaptionStyleSheetOveride): New, if theme has a captions style sheet override,
          inject it into the current page group, otherwise remove injected sheet.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::captionPreferences):
      (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): New, passthrough to platform specific function
          of the same name.
      (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
      (WebCore::PageGroup::userPrefersCaptions): Ditto.
      (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
      (WebCore::PageGroup::captionFontSizeScale): Ditto.
      * page/PageGroup.h:
      
      * platform/mac/WebCoreSystemInterface.h: Updated.
      * platform/mac/WebCoreSystemInterface.mm: Ditto.
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface): Initialize new WKSI function pointers.
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      (InitWebCoreSystemInterface): Initialize new WKSI function pointers.
      
      WebKitLibraries:
      
      Update WKSI header with SPI for getting the user caption appearance preferences.
      
      * WebKitSystemInterface.h:
      
      LayoutTests:
      
      * media/track/track-cue-rendering-expected.txt: Update results for caption css changes.
      * media/track/track-cue-rendering.html:
      * platform/chromium/TestExpectations: Skip tests that need to be rebaselined.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      68e8da75
  3. 23 Oct, 2012 1 commit
  4. 18 Oct, 2012 1 commit
    • jer.noble@apple.com's avatar
      Add diagnostic logging to track per-page media engine usage. · 2d0a60ab
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=99615
      <rdar://problem/12476473>
      
      Reviewed by Eric Carlson.
      
      Add diagnostic logging triggered only once-per-page and once-per-page-per-engine.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::logMediaLoadRequest): Encapsulate diagnostic logging into single static method.
      (WebCore::HTMLMediaElement::mediaLoadingFailed): Call logMediaLoadRequest.
      (WebCore::HTMLMediaElement::setReadyState): Ditto.
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::dispatchDidCommitLoad): Reset the set of seen media engines.
      
      Add new methods to Page to track per-page media engine diagnostic info, similar to plugin diagnostic info.
      * page/Page.cpp:
      (WebCore::Page::hasSeenAnyMediaEngine):
      (WebCore::Page::hasSeenMediaEngine):
      (WebCore::Page::sawMediaEngine):
      (WebCore::Page::resetSeenMediaEngines):
      * page/Page.h:
      
      Add new static logging key definitions:
      * page/DiagnosticLoggingKeys.cpp:
      (WebCore::DiagnosticLoggingKeys::pageContainsMediaEngineKey):
      (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey):
      * page/DiagnosticLoggingKeys.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d0a60ab
  5. 12 Oct, 2012 1 commit
    • jer.noble@apple.com's avatar
      Enable ENCRYPTED_MEDIA support on Mac. · a39e5ce6
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98044
      
      Reviewed by Anders Carlsson.
      
      Source/JavaScriptCore:
      
      Enable the ENCRYPTED_MEDIA flag.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore:
      
      Enable the ENCRYPTED_MEDIA conditional on the Mac port.
      
      No new tests; Existing media/encrypted-media tests require org.w3.clearkey support, which is not implemented.
      
      * Configurations/FeatureDefines.xcconfig: Enable the ENCRYPTED_MEDIA flag.
      * DerivedSources.make: Add the MediaKeyError and MediaKeyEvent classes.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      * bindings/js/JSDictionary.cpp:
      (WebCore::JSDictionary::convertValue): Add convertValue functions for Uint8Array and MediaKeyError.
      * bindings/js/JSDictionary.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): Throw an error if no "needkey"
          handler is registered.
      * html/HTMLMediaElement.h:
      * html/HTMLMediaElement.idl: Change keySystem to DefaultIsUndefined.
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::MediaPlayer::keyNeeded): Return a bool indicating whether the process was aborted
          due to a lack of "needkey" listener.
      * platform/graphics/MediaPlayer.h:
      (WebCore::MediaPlayerClient::mediaPlayerKeyAdded): Remove unused parameter names.
      (WebCore::MediaPlayerClient::mediaPlayerKeyError): Ditto.
      (WebCore::MediaPlayerClient::mediaPlayerKeyMessage): Ditto.
      (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded): Ditto.
      * platform/graphics/MediaPlayerPrivate.h:
      (WebCore::MediaPlayerPrivateInterface::addKey): Ditto.
      (WebCore::MediaPlayerPrivateInterface::generateKeyRequest): Ditto.
      (WebCore::MediaPlayerPrivateInterface::cancelKeyRequest): Ditto.
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Call extendedSupportsType.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::extendedSupportsType): Stub. Pass through to supportsType.
      * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Call extendedSupportsType.
      (WebCore::MediaPlayerPrivateQTKit::extendedSupportsType): Stub. Pass through to supportsType.
      
      LayoutTests:
      
      Add platform specific expected results.
      
      * platform/mac/fast/events/constructors/media-key-event-constructor-expected.txt: Added.
      * platform/chromium/fast/events/constructors/media-key-event-constructor-expected.txt: Copied from
          fast/events/constructors/media-key-event-constructor-expected.txt due to chromium expected results
          search order including platform/mac.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a39e5ce6
  6. 05 Oct, 2012 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r130556 and r130564. · f583bb1a
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/130556
      http://trac.webkit.org/changeset/130564
      https://bugs.webkit.org/show_bug.cgi?id=98572
      
      The patch wasn't reviewed by a reviewer and it is breaking
      Chromium Windows (Requested by jchaffraix on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-05
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * css/mediaControls.css:
      (video::-webkit-media-text-track-container):
      (video::-webkit-media-text-track-past-nodes):
      (video::-webkit-media-text-track-future-nodes):
      (video::-webkit-media-text-track-display):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement):
      (WebCore::HTMLMediaElement::attach):
      (WebCore::HTMLMediaElement::userIsInterestedInThisLanguage):
      (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind):
      (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
      (WebCore::HTMLMediaElement::updateClosedCaptionsControls):
      * html/HTMLMediaElement.h:
      (HTMLMediaElement):
      * html/shadow/MediaControlElements.cpp:
      (WebCore):
      (WebCore::MediaControlTextTrackContainerElement::updateSizes):
      * html/shadow/MediaControlElements.h:
      (MediaControlTextTrackContainerElement):
      * html/shadow/MediaControlRootElement.cpp:
      (WebCore::MediaControlRootElement::updateTextTrackDisplay):
      * html/shadow/MediaControlRootElement.h:
      (MediaControlRootElement):
      * html/shadow/MediaControls.h:
      (MediaControls):
      * html/track/TextTrack.cpp:
      (WebCore::TextTrack::TextTrack):
      (WebCore::TextTrack::isValidKindKeyword):
      (WebCore::TextTrack::setKind):
      (WebCore::TextTrack::setMode):
      (WebCore::TextTrack::mode):
      * html/track/TextTrack.h:
      (WebCore::TextTrack::create):
      (WebCore::TextTrack::kind):
      (TextTrack):
      (WebCore::TextTrack::label):
      (WebCore::TextTrack::setLabel):
      (WebCore::TextTrack::language):
      (WebCore::TextTrack::setLanguage):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::TextTrackCueBox):
      (WebCore::TextTrackCueBox::shadowPseudoId):
      (WebCore):
      (WebCore::TextTrackCue::updateDisplayTree):
      * html/track/TextTrackCue.h:
      (TextTrackCueBox):
      (TextTrackCue):
      * platform/mac/WebCoreSystemInterface.h:
      * platform/mac/WebCoreSystemInterface.mm:
      * rendering/CaptionPreferencesChangedListener.h: Removed.
      * rendering/RenderTheme.h:
      (WebCore):
      (RenderTheme):
      * rendering/RenderThemeMac.h:
      (RenderThemeMac):
      * rendering/RenderThemeMac.mm:
      (WebCore):
      (WebCore::RenderThemeMac::RenderThemeMac):
      (WebCore::RenderThemeMac::~RenderThemeMac):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      WebKitLibraries:
      
      * WebKitSystemInterface.h:
      
      LayoutTests:
      
      * media/track/track-cue-rendering-expected.txt:
      * media/track/track-cue-rendering.html:
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f583bb1a
    • jer.noble@apple.com's avatar
      Allow ports to override text track rendering style · 0846d8de
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97800
      <rdar://problem/12044964>
      
      Patch by Eric Carlson <eric.carlson@apple.com> on 2012-10-04
      Reviewed by Silvia Pfeiffer.
      
      Source/WebCore:
      
      * WebCore.exp.in: Export new WebkitSystemInterface functions.
      * WebCore.xcodeproj/project.pbxproj: Add CaptionPreferencesChangedListener.h.
      
      * css/mediaControls.css: Rearrange the caption CSS so it is possible to style the cue window,
          background, and text independently.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_disableCaptions with theme->userPrefersCaptions().
      (WebCore::HTMLMediaElement::attach): Register for caption preferences change callbacks.
      (WebCore::HTMLMediaElement::detach): Unregister for caption preferences change callbacks.
      (WebCore::HTMLMediaElement::userPrefersCaptions): Return theme->userPrefersCaptions().
      (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Consider userPrefersCaptions().
      (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as
          un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused.
      (WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks.
      (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from
          setClosedCaptionsVisible
      * html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener.
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTextTrackContainerElement::userCaptionPreferencesChanged): New, if theme
          has a captions style sheet override, inject it into the current page group, otherwise
          remove injected sheet.
      (WebCore::MediaControlTextTrackContainerElement::updateSizes): Get rid of unnecessary member
          variable. Get caption font scale from theme instead of hard coding.
      * html/shadow/MediaControlElements.h:
      
      * html/shadow/MediaControlRootElement.cpp:
      (WebCore::MediaControlRootElement::userCaptionPreferencesChanged): New.
      (WebCore::MediaControlRootElement::updateTextTrackDisplay):
      * html/shadow/MediaControlRootElement.h: Add userCaptionPreferencesChanged, minor cleanup.
      
      * html/shadow/MediaControls.h:
      (WebCore::MediaControls::userCaptionPreferencesChanged): New.
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id.
      (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the
          shadow pseudo id so it can be used elsewhere.
      (WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId.
      (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the
          shadow pseudo id so it can be used elsewhere.
      (WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto.
      (WebCore::TextTrackCue::updateDisplayTree):
      * html/track/TextTrackCue.h:
      
      * platform/mac/WebCoreSystemInterface.h: Updated.
      * platform/mac/WebCoreSystemInterface.mm: Ditto.
      
      * rendering/CaptionPreferencesChangedListener.h: Added.
      
      * rendering/RenderTheme.h:
      (WebCore::RenderTheme::userPrefersCaptions): New, default do-nothing implementation.
      (WebCore::RenderTheme::userHasCaptionPreferences): Ditto.
      (WebCore::RenderTheme::captionFontSizeScale): Ditto.
      (WebCore::RenderTheme::captionsStyleSheetOverride): Ditto.
      (WebCore::RenderTheme::registerForCaptionPreferencesChangedCallbacks): Ditto.
      (WebCore::RenderTheme::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
      
      * rendering/RenderThemeMac.h:
      * rendering/RenderThemeMac.mm:
      (WebCore::userCaptionPreferencesChangedNotificationCallback): New, receives preference changed notifications.
      (WebCore::RenderThemeMac::RenderThemeMac): Initialize m_listeningForCaptionPreferenceNotifications.
      (WebCore::RenderThemeMac::~RenderThemeMac): Unregister for notifications if necessary.
      (WebCore::RenderThemeMac::userHasCaptionPreferences): New, passthrough to WKSI function.
      (WebCore::RenderThemeMac::userPrefersCaptions): Ditto.
      (WebCore::RenderThemeMac::captionsWindowColor): Return Color with user's caption window color preference.
      (WebCore::RenderThemeMac::captionsBackgroundColor): Return Color with user's caption
          background color preference.
      (WebCore::RenderThemeMac::captionsTextColor): Return Color with user's caption text color preference.
      (WebCore::RenderThemeMac::captionsEdgeColorForTextColor): Return Color for text edge effect.
      (WebCore::RenderThemeMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow
          or webkit-text-stroke property.
      (WebCore::RenderThemeMac::cssColorProperty): Return a String with css to set a property
          with a color value.
      (WebCore::RenderThemeMac::captionsTextEdgeStyle): Return a String with css to style caption
          text with the user's preferred text edge stye.
      (WebCore::RenderThemeMac::captionsDefaultFont): Return a String with css to style caption
          text with the user's preferred font.
      (WebCore::RenderThemeMac::captionsStyleSheetOverride): Return a String with css to style captions
          with the user's preferred style.
      (WebCore::RenderThemeMac::captionFontSizeScale): Return the user's preferred caption font scale.
      (WebCore::RenderThemeMac::captionPreferencesChanged): Notify listeners of caption preference change.
      (WebCore::RenderThemeMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences
          changes listener.
      (WebCore::RenderThemeMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences
          changes listener.
      
      Source/WebKit/mac:
      
      Add WCSI support for new WKSI caption functions.
      
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface): Initialize new WKSI function pointers.
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      (InitWebCoreSystemInterface): Initialize new WKSI function pointers.
      
      WebKitLibraries:
      
      Update WKSI header with SPI for getting the user caption appearance preferences.
      
      * WebKitSystemInterface.h:
      
      LayoutTests:
      
      * media/track/track-cue-rendering-expected.txt: Update results for caption css changes.
      * media/track/track-cue-rendering.html:
      * platform/chromium/TestExpectations: Skip tests that need to be rebaselined.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0846d8de
  7. 01 Oct, 2012 2 commits
    • rniwa@webkit.org's avatar
      Rename AssertNoEventDispatch to NoEventDispatchAssertion · 61322a1a
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98075
      
      Reviewed by Abhishek Arya.
      
      Renamed the class.
      
      * dom/ContainerNode.cpp:
      (WebCore):
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::ContainerNode::removeBetween):
      (WebCore::ContainerNode::removeChildren):
      (WebCore::ContainerNode::appendChild):
      (WebCore::ContainerNode::parserAppendChild):
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/ContainerNode.h:
      (WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
      (WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
      (WebCore::ChildNodeInsertionNotifier::notify):
      (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
      * dom/Document.cpp:
      (WebCore::Document::dispatchWindowEvent):
      (WebCore::Document::dispatchWindowLoadEvent):
      * dom/EventDispatcher.cpp:
      (WebCore::EventDispatcher::dispatchEvent):
      * dom/EventTarget.cpp:
      (WebCore::EventTarget::fireEventListeners):
      * dom/Node.cpp:
      (WebCore::Node::dispatchSubtreeModifiedEvent):
      (WebCore::Node::dispatchFocusInEvent):
      (WebCore::Node::dispatchFocusOutEvent):
      (WebCore::Node::dispatchDOMActivateEvent):
      * dom/WebKitNamedFlow.cpp:
      (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      61322a1a
    • rniwa@webkit.org's avatar
      Turn forbidEventDispatch and allowEventDispatch into a RAII object · fff704fa
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96717
      
      Reviewed by Abhishek Arya.
      
      Replaced forbidEventDispatch and allowEventDispatch by AssertNoEventDispatch.
      
      * dom/ContainerNode.cpp:
      (WebCore):
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::ContainerNode::removeBetween):
      (WebCore::ContainerNode::removeChildren):
      (WebCore::ContainerNode::appendChild):
      (WebCore::ContainerNode::parserAddChild):
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/ContainerNode.h:
      (AssertNoEventDispatch):
      (WebCore::AssertNoEventDispatch::AssertNoEventDispatch):
      (WebCore::AssertNoEventDispatch::~AssertNoEventDispatch):
      (WebCore::AssertNoEventDispatch::isEventDispatchForbidden):
      (WebCore):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
      (WebCore::ChildNodeInsertionNotifier::notify):
      (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
      * dom/Document.cpp:
      (WebCore::Document::dispatchWindowEvent):
      (WebCore::Document::dispatchWindowLoadEvent):
      * dom/EventDispatcher.cpp:
      (WebCore::EventDispatcher::dispatchEvent):
      * dom/EventTarget.cpp:
      (WebCore):
      (WebCore::EventTarget::fireEventListeners):
      * dom/EventTarget.h:
      (WebCore):
      * dom/Node.cpp:
      (WebCore::Node::dispatchSubtreeModifiedEvent):
      (WebCore::Node::dispatchFocusInEvent):
      (WebCore::Node::dispatchFocusOutEvent):
      (WebCore::Node::dispatchDOMActivateEvent):
      * dom/WebKitNamedFlow.cpp:
      (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fff704fa
  8. 21 Sep, 2012 1 commit
  9. 14 Sep, 2012 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r128673. · 6b54085e
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/128673
      https://bugs.webkit.org/show_bug.cgi?id=96847
      
      Makes plugins/document-open.html crash (Requested by jamesr_
      on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-14
      
      * dom/ContainerNode.cpp:
      (WebCore):
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::ContainerNode::removeBetween):
      (WebCore::ContainerNode::removeChildren):
      (WebCore::ContainerNode::appendChild):
      (WebCore::ContainerNode::parserAddChild):
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/ContainerNode.h:
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
      (WebCore::ChildNodeInsertionNotifier::notify):
      (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
      * dom/Document.cpp:
      (WebCore::Document::dispatchWindowEvent):
      (WebCore::Document::dispatchWindowLoadEvent):
      * dom/EventDispatcher.cpp:
      (WebCore::EventDispatcher::dispatchEvent):
      * dom/EventTarget.cpp:
      (WebCore):
      (WebCore::forbidEventDispatch):
      (WebCore::allowEventDispatch):
      (WebCore::eventDispatchForbidden):
      (WebCore::EventTarget::fireEventListeners):
      * dom/EventTarget.h:
      (WebCore):
      (WebCore::forbidEventDispatch):
      (WebCore::allowEventDispatch):
      * dom/Node.cpp:
      (WebCore::Node::dispatchSubtreeModifiedEvent):
      (WebCore::Node::dispatchFocusInEvent):
      (WebCore::Node::dispatchFocusOutEvent):
      (WebCore::Node::dispatchDOMActivateEvent):
      * dom/WebKitNamedFlow.cpp:
      (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6b54085e
    • rniwa@webkit.org's avatar
      Turn forbidEventDispatch and allowEventDispatch into a RAII object · 3f29758a
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96717
      
      Reviewed by Abhishek Arya.
      
      Replaced forbidEventDispatch and allowEventDispatch by AssertNoEventDispatch.
      
      * dom/ContainerNode.cpp:
      (WebCore):
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::ContainerNode::removeBetween):
      (WebCore::ContainerNode::removeChildren):
      (WebCore::ContainerNode::appendChild):
      (WebCore::ContainerNode::parserAddChild):
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/ContainerNode.h:
      (AssertNoEventDispatch):
      (WebCore::AssertNoEventDispatch::AssertNoEventDispatch):
      (WebCore::AssertNoEventDispatch::~AssertNoEventDispatch):
      (WebCore::AssertNoEventDispatch::isEventDispatchForbidden):
      (WebCore):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
      (WebCore::ChildNodeInsertionNotifier::notify):
      (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
      * dom/Document.cpp:
      (WebCore::Document::dispatchWindowEvent):
      (WebCore::Document::dispatchWindowLoadEvent):
      * dom/EventDispatcher.cpp:
      (WebCore::EventDispatcher::dispatchEvent):
      * dom/EventTarget.cpp:
      (WebCore):
      (WebCore::EventTarget::fireEventListeners):
      * dom/EventTarget.h:
      (WebCore):
      * dom/Node.cpp:
      (WebCore::Node::dispatchSubtreeModifiedEvent):
      (WebCore::Node::dispatchFocusInEvent):
      (WebCore::Node::dispatchFocusOutEvent):
      (WebCore::Node::dispatchDOMActivateEvent):
      * dom/WebKitNamedFlow.cpp:
      (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f29758a
  10. 12 Sep, 2012 1 commit
    • philn@webkit.org's avatar
      [GStreamer] Audio device not closed after playing sound · 7b5fda83
      philn@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=89122
      
      Reviewed by Martin Robinson.
      
      Set the GStreamer pipeline to NULL instead of PAUSED on EOS. This
      allows the audio-sink to release its connection to the audio
      device. This is done only if the Media element is not
      looping. To make the MediaPlayerPrivate layer aware of that
      information the MediaPlayerClient interface was updated with a new
      method mediaPlayerIsLooping, implemented by the HTMLMediaElement.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::mediaPlayerIsLooping): Implementation of
      MediaPlayerClient::mediaPlayerLoop, proxies to ::loop();
      * html/HTMLMediaElement.h:
      (HTMLMediaElement):
      * platform/graphics/MediaPlayer.h:
      (WebCore::MediaPlayerClient::mediaPlayerIsLooping): New method allowing
      the MediaPlayer and its backend to know if a playback loop is
      requested by the client.
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
      (WebCore::MediaPlayerPrivateGStreamer::playbackPosition): Report
      seek time or media duration if EOS was reached. These early
      returns are needed because the position query doesn't work on a
      NULL pipeline.
      (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
      Refactored to use an early return.
      (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Reset the
      seeking flag.
      (WebCore::MediaPlayerPrivateGStreamer::play): reset m_isEndReached.
      (WebCore::MediaPlayerPrivateGStreamer::pause): Don't pause on EOS.
      (WebCore::MediaPlayerPrivateGStreamer::seek): Refactor, call
      currentTime() after we're sure playbin is valid and no error occured.
      (WebCore::MediaPlayerPrivateGStreamer::paused): Fake paused state
      on EOS.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b5fda83
  11. 10 Sep, 2012 2 commits
    • jer.noble@apple.com's avatar
      Unreviewed; rolling out r128081. · 524d4c92
      jer.noble@apple.com authored
      http://trac.webkit.org/changeset/128081
      https://bugs.webkit.org/show_bug.cgi?id=96134
      
      New test http/tests/media/video-donottrack.html fails to run on Apple test bots.
      
      Source/WebCore:
      
      * html/HTMLMediaElement.cpp:
      * html/HTMLMediaElement.h:
      (HTMLMediaElement):
      * loader/FrameLoaderClient.h:
      * platform/graphics/MediaPlayer.h:
      (MediaPlayer):
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebFrameLoaderClient.h:
      * WebCoreSupport/WebFrameLoaderClient.mm:
      * WebView/WebDelegateImplementationCaching.h:
      (WebFrameLoadDelegateImplementationCache):
      * WebView/WebDelegateImplementationCaching.mm:
      * WebView/WebView.mm:
      (-[WebView _cacheFrameLoadDelegateImplementations]):
      
      Source/WebKit2:
      
      * Shared/APIClientTraits.h:
      * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
      (InjectedBundlePageLoaderClient):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      (WebFrameLoaderClient):
      * WebProcess/qt/QtBuiltinBundlePage.cpp:
      (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
      
      Tools:
      
      * DumpRenderTree/TestRunner.cpp:
      (TestRunner::TestRunner):
      (TestRunner::staticFunctions):
      * DumpRenderTree/TestRunner.h:
      (TestRunner):
      * DumpRenderTree/mac/FrameLoadDelegate.mm:
      * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::InjectedBundlePage::InjectedBundlePage):
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
      (InjectedBundlePage):
      * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
      (WTR::TestRunner::TestRunner):
      * WebKitTestRunner/InjectedBundle/TestRunner.h:
      (TestRunner):
      
      LayoutTests:
      
      * http/tests/media/resources/video-donottrack-check-donottrack.php: Removed.
      * http/tests/media/video-donottrack-expected.txt: Removed.
      * http/tests/media/video-donottrack.html: Removed.
      * platform/chromium/TestExpectations:
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      524d4c92
    • jer.noble@apple.com's avatar
      <audio> and <video> should send Do Not Track when appropriate · 2d55c01b
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96134
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Add a FrameLoaderClient function to determine whether the DNT header should be sent,
      and plumb that new function down into the MediaPlayerPrivateAVFoundationObjC class.
      
      Test: http/tests/media/video-donottrack.html
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::mediaPlayerShouldSendDoNotTrackHTTPHeader):
          Pass the question on through to the FrameLoaderClient.
      * html/HTMLMediaElement.h:
      * loader/FrameLoaderClient.h:
      (WebCore::FrameLoaderClient::shouldSendDoNotTrackHTTPHeader):
          Call through to the implementation in WebKit or WebKit2.
      * platform/graphics/MediaPlayer.h:
      (WebCore::MediaPlayerClient::mediaPlayerShouldSendDoNotTrackHTTPHeader):
          Pass the question on to the HTMLMediaElement.
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
          If we should send the DNT header, add it to the header options array
          when creating the AVAsset.
      
      Source/WebKit/mac:
      
      Add support for the shouldSendDoNotTrackHTTPHeader by passing the request
      on to the WebFrameLoadDelegate.
      
      * WebCoreSupport/WebFrameLoaderClient.h:
      * WebCoreSupport/WebFrameLoaderClient.mm:
      (WebFrameLoaderClient::shouldSendDoNotTrackHeader):
          Pass the question on to the WebFrameLoadDelegate.
      * WebView/WebDelegateImplementationCaching.h:
      (WebFrameLoadDelegateImplementationCache):
          Add an entry for the delegate's webViewShouldSendDoNotTrackHeader method.
      * WebView/WebDelegateImplementationCaching.mm:
      (CallResourceLoadDelegateReturningBoolean): Added a 0-parameter overloaded function.
      * WebView/WebView.mm:
      (-[WebView _cacheFrameLoadDelegateImplementations]): initialize the
          cached value for shouldSendDoNotTrackHeaderFunc.
      
      Source/WebKit2:
      
      Add support for the shouldSendDoNotTrackHTTPHeader by passing the request
      on to the WebFrameLoadDelegate.
      
      * Shared/APIClientTraits.cpp: Increment the interfaceSizes for
          WKBundlePageLoaderClient by the value of the new functions.
      * Shared/APIClientTraits.h: Ditto.
      * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add a new API to
          WKBundlePageLoaderClient and bump the version number.
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
      (WebKit::InjectedBundlePageLoaderClient::shouldSendDoNotTrackHTTPHeader):
          Pass the question on to the client.
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader):
          Pass the question on to the bundle.
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      * WebProcess/qt/QtBuiltinBundlePage.cpp:
      (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
          Add an entry for the new function in the Qt loader client.
      
      Tools:
      
      Add a testRunner JS API for calling setShouldSendDoNotTrackHTTPHeader to DRT and
      WTR. Add FrameLoaderClient client methods for retrieving that value.
      
      * DumpRenderTree/TestRunner.cpp:
      (setShouldSendDoNotTrackHTTPHeaderCallback): Pass through to the TestRunner.
      (TestRunner::staticFunctions): Add the setShouldSendDoNotTrackHTTPHeader function.
      * DumpRenderTree/TestRunner.h:
      (TestRunner::setShouldSendDoNotTrackHTTPHeader): Simple setter.
      (TestRunner::shouldSendDoNotTrackHTTPHeader): Simple getter.
      * DumpRenderTree/mac/FrameLoadDelegate.mm:
      (-[FrameLoadDelegate webViewShouldSendDoNotTrackHTTPHeader:]):
          Pass the question on to the TestRunner.
      * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::InjectedBundlePage::InjectedBundlePage):
          Add the setShouldSendDoNotTrackHTTPHeader client function.
      (WTR::InjectedBundlePage::shouldSendDoNotTrackHTTPHeader):
          Pass the question on to the TestRunner.
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
      * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
      * WebKitTestRunner/InjectedBundle/TestRunner.h:
      (WTR::TestRunner::shouldSendDoNotTrackHTTPHeader): Simple getter.
      (WTR::TestRunner::setShouldSendDoNotTrackHTTPHeader): Simple Setter.
      
      LayoutTests:
      
      Add a new HTTP test ensuring the DNT header is passed correctly during video tests.
      
      * http/tests/media/resources/video-donottrack-check-donottrack.php: Added.
      * http/tests/media/video-donottrack-expected.txt: Added.
      * http/tests/media/video-donottrack.html: Added.
      
      Skip the new tests on platforms which do not support it:
      * platform/chromium/TestExpectations:
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d55c01b
  12. 07 Sep, 2012 1 commit
  13. 06 Sep, 2012 1 commit
  14. 29 Aug, 2012 1 commit
    • annacc@chromium.org's avatar
      Create a toggle button for closed captions. · 7cab8d11
      annacc@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=94395
      
      Reviewed by Eric Carlson.
      
      This patch will create a button that toggles any captions or subtitles on or off.
      
      Source/WebCore:
      
      Test: media/video-controls-captions.html
      
      * css/mediaControlsChromium.css:
      (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
      New style for new button.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement):
      Initialize new variable for keeping track of user (button) disabled captions.
      
      (WebCore::HTMLMediaElement::loadTimerFired):
      Rename configureNewTextTracks() to configureTextTracks().
      
      (WebCore::HTMLMediaElement::prepareForLoad):
      Do not set closedCaptionsVisible to false, we should instead honor the
      checks for default out-of-band tracks.
      
      (WebCore::HTMLMediaElement::textTrackModeChanged):
      Rename configureNewTextTracks() to configureTextTracks().
      
      (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind):
      Add checks for when user has requested to see or not see captions.
      
      (WebCore::HTMLMediaElement::configureTextTracks):
      Rename configureNewTextTracks() to configureTextTracks().
      
      (WebCore::HTMLMediaElement::hasClosedCaptions):
      Return true if we have any caption or subtitle text tracks.
      
      (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
      Update the text track display and the closed captions button when the
      closed captions button is toggled.
      
      (WebCore::HTMLMediaElement::configureTextTrackDisplay):
      If the visibility of any text tracks has changed, update the display and
      the controls.
      
      (WebCore::HTMLMediaElement::updateClosedCaptionsControls):
      New function that updates both the text track display and the closed
      captions button.
      
      * html/HTMLMediaElement.h:
      (HTMLMediaElement):
      New function updateClosedCaptionsControls()
      
      Adding the button:
      * html/shadow/MediaControlRootElementChromium.cpp:
      (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
      (WebCore::MediaControlRootElementChromium::initializeControls):
      (WebCore::MediaControlRootElementChromium::setMediaController):
      (WebCore::MediaControlRootElementChromium::reset):
      (WebCore::MediaControlRootElementChromium::reportedError):
      (WebCore::MediaControlRootElementChromium::changedClosedCaptionsVisibility):
      (WebCore::MediaControlRootElementChromium::createTextTrackDisplay):
      * html/shadow/MediaControlRootElementChromium.h:
      (WebCore):
      (MediaControlRootElementChromium):
      
      Ensure that Linux and Windows render themes will support closed captions:
      * rendering/RenderThemeChromiumSkia.cpp:
      (WebCore):
      (WebCore::supportsClosedCaptioning):
      * rendering/RenderThemeChromiumSkia.h:
      (RenderThemeChromiumSkia):
      
      LayoutTests:
      
      * media/video-controls-captions-expected.txt: Added.
      * media/video-controls-captions.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7cab8d11
  15. 27 Aug, 2012 2 commits
    • yosin@chromium.org's avatar
      [ShadowDOM] Shadow elements in the input element should be focusable. · 77701e6f
      yosin@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=95169
      
      Reviewed by Kent Tamura.
      
      This patch introduces new virtual function HTMLElement::hasCustomFocusLogic()
      to allow input type implementations to use shadow element with focus
      navigation.
      
      No new tests. This patch doesn't change behavior.
      
      (WebCore::HTMLElement::hasCustomFocusLogic): Added to return false as
      default value.
      * html/HTMLElement.h:
      (HTMLElement): Added a declaration of hasCustomFocusLogic().
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::hasCustomFocusLogic): Added to call InputType::hasCustomFocusLogic(),
      * html/HTMLInputElement.h:
      (HTMLInputElement): Added a declaration of hasCustomFocusLogic().
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::hasCustomFocusLogic): Added to return true for "audio" and "video" elements.
      * html/HTMLMediaElement.h:
      (HTMLMediaElement): Add a declaration of hasCustomFocusLogic()
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::hasCustomFocusLogic): Added to return true.
      * html/HTMLTextAreaElement.h:
      (HTMLTextAreaElement): Add a declaration of hasCustomFocusLogic().
      * page/FocusController.cpp:
      (WebCore::hasCustomFocusLogic): Changed to call HTMLElement::hasCustomFocusLogic()
      rather than checking tag names.
      * html/InputType.cpp:
      (WebCore::InputType::hasCustomFocusLogic): Added to return true as default value.
      * html/InputType.h:
      (InputType): Added a declaration of hasCustomFocusLogic().
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77701e6f
    • annacc@chromium.org's avatar
      TextTrack modes are strings · 6a31fbc2
      annacc@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=85050
      
      Reviewed by Eric Carlson.
      
      The spec recently changed away from enumeration to string for the type
      of TextTrack mode.
      http://dev.w3.org/html5/spec/media-elements.html#texttrackmode
      
      Source/WebCore:
      
      No new tests. Updates to existing tests.
      
      * html/HTMLMediaElement.cpp:
      
      Use the new string mode rather than the old enum.  Also, TextTrack::setMode()
      no longer requires an ExceptionCode:
      (WebCore::HTMLMediaElement::loadInternal):
      (WebCore::HTMLMediaElement::textTrackModeChanged):
      (WebCore::HTMLMediaElement::textTrackKindChanged):
      (WebCore::HTMLMediaElement::addTextTrack):
      (WebCore::HTMLMediaElement::showingTrackWithSameKind):
      (WebCore::HTMLMediaElement::configureTextTrackGroup):
      (WebCore::HTMLMediaElement::configureNewTextTracks):
      (WebCore::HTMLMediaElement::configureTextTrackDisplay):
      
      * html/track/TextTrack.cpp:
      
      Update these methods to use ConstructFromLiteral for efficiency:
      (WebCore::TextTrack::subtitlesKeyword):
      (WebCore::TextTrack::captionsKeyword):
      (WebCore::TextTrack::descriptionsKeyword):
      (WebCore::TextTrack::chaptersKeyword):
      (WebCore::TextTrack::metadataKeyword):
      
      New methods to use for the mode string (replacing the enum):
      (WebCore::TextTrack::disabledKeyword):
      (WebCore::TextTrack::hiddenKeyword):
      (WebCore::TextTrack::showingKeyword):
      
      (WebCore::TextTrack::TextTrack): Initialize mode to disabled.
      (WebCore::TextTrack::setMode): Remove ExceptionCode and no longer throw an
      INVALID_ACCESS_ERR.
      (WebCore::TextTrack::mode): Return a keyword string instead of an enum.
      
      Use the new string mode rather than the old enum:
      (WebCore::TextTrack::cues):
      (WebCore::TextTrack::activeCues):
      (WebCore::TextTrack::isRendered):
      
      * html/track/TextTrack.h: Remove old enum, add new string keyword methods,
      and update mode() and setMode() accordingly.
      
      * html/track/TextTrack.idl: Remove old enum and make mode attribute be a string.
      
      Use the new string mode rather than the old enum:
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::dispatchEvent):
      (WebCore::TextTrackCue::isActive):
      
      LayoutTests:
      
      Remove check for mode constants as we are no longer using an enum:
      * media/track/track-constants-expected.txt:
      * media/track/track-constants.html:
      
      Update tests to use the new strings rather than the enums:
      * media/track/track-delete-during-setup-expected.txt:
      * media/track/track-delete-during-setup.html:
      * media/track/track-element-dom-change-crash-expected.txt:
      * media/track/track-element-dom-change-crash.html:
      * media/track/track-load-from-src-readyState.html:
      * media/track/track-mode-expected.txt:
      * media/track/track-mode-not-changed-by-new-track-expected.txt:
      * media/track/track-mode-not-changed-by-new-track.html:
      * media/track/track-mode-triggers-loading-expected.txt:
      * media/track/track-mode-triggers-loading.html:
      * media/track/track-mode.html:
      * media/track/track-texttracks-expected.txt:
      * media/track/track-texttracks.html:
      * media/video-test.js:
      (enableAllTextTracks):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a31fbc2
  16. 23 Aug, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Replace access ot HTMLMediaElement from MediaPlayerPrivateBlackBerry... · 563d08a4
      commit-queue@webkit.org authored
              Replace access ot HTMLMediaElement from MediaPlayerPrivateBlackBerry with methods in MediaPlayerClient - updated with notes from initial reviews.  https://bugs.webkit.org/show_bug.cgi?id=84291
      
              Reviewed by Eric Carlson.
      
              Code standard compliance - no functional change, so no new tests required.
      
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::mediaPlayerExitFullscreen):
              (WebCore):
              (WebCore::HTMLMediaElement::mediaPlayerIsVideo):
              (WebCore::HTMLMediaElement::mediaPlayerContentBoxRect):
              (WebCore::HTMLMediaElement::mediaPlayerSetSize):
              (WebCore::HTMLMediaElement::mediaPlayerPause):
              (WebCore::HTMLMediaElement::mediaPlayerPlay):
              (WebCore::HTMLMediaElement::mediaPlayerIsPaused):
              (WebCore::HTMLMediaElement::mediaPlayerHostWindow):
              (WebCore::HTMLMediaElement::mediaPlayerWindowClipRect):
              * html/HTMLMediaElement.h:
              (HTMLMediaElement):
              * platform/graphics/MediaPlayer.h:
              (WebCore):
              (WebCore::MediaPlayerClient::mediaPlayerExitFullscreen):
              (WebCore::MediaPlayerClient::mediaPlayerIsVideo):
              (WebCore::MediaPlayerClient::mediaPlayerContentBoxRect):
              (WebCore::MediaPlayerClient::mediaPlayerSetSize):
              (WebCore::MediaPlayerClient::mediaPlayerPause):
              (WebCore::MediaPlayerClient::mediaPlayerPlay):
              (WebCore::MediaPlayerClient::mediaPlayerIsPaused):
              (WebCore::MediaPlayerClient::mediaPlayerHostWindow):
              (WebCore::MediaPlayerClient::mediaPlayerWindowClipRect):
              * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
              (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
              (WebCore::MediaPlayerPrivate::load):
              (WebCore::MediaPlayerPrivate::paint):
              (WebCore::MediaPlayerPrivate::resizeSourceDimensions):
              (WebCore::MediaPlayerPrivate::updateStates):
              (WebCore::MediaPlayerPrivate::onPauseStateChanged):
              (WebCore::MediaPlayerPrivate::onPlayNotified):
              (WebCore::MediaPlayerPrivate::onPauseNotified):
              (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
              (WebCore::MediaPlayerPrivate::showErrorDialog):
              (WebCore::MediaPlayerPrivate::platformWindow):
              (WebCore::MediaPlayerPrivate::isElementPaused):
              (WebCore::MediaPlayerPrivate::isTabVisible):
              * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
              (MediaPlayerPrivate):
      
      Patch by John Griggs <jgriggs@rim.com> on 2012-08-23
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      563d08a4
  17. 22 Aug, 2012 1 commit
  18. 08 Aug, 2012 2 commits
    • annacc@chromium.org's avatar
      Update HTMLMediaElement to the new OO MediaSource API. · 7ed37cec
      annacc@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91775
      
      Reviewed by Eric Carlson.
      
      This patch rips out the old-style MediaSource API and allows a
      MediaSource object to be attached to HTMLMediaElement.
      http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
      
      Source/WebCore:
      
      Tests: updates to http/tests/media/media-source/*
             http/tests/media/media-source/video-media-source-add-and-remove-buffers.html
             http/tests/media/media-source/video-media-source-objects.html
      
      * html/HTMLMediaElement.cpp:
      (WebCore):
      (WebCore::HTMLMediaElement::HTMLMediaElement): Remove old style API resources.
      (WebCore::HTMLMediaElement::parseAttribute): Remove old style event attribute.
      (WebCore::HTMLMediaElement::prepareForLoad): Set source state to "closed".
      (WebCore::HTMLMediaElement::loadResource): Get MediaSource object from blob registry
          look up and, if found, set it's MediaPlayer pointer to the current MediaPlayer.
      (WebCore::HTMLMediaElement::noneSupported): Set source state to "closed".
      (WebCore::HTMLMediaElement::mediaEngineError): Set source state to "closed".
      (WebCore::HTMLMediaElement::mediaPlayerSourceOpened): Set source state to "open".
      (WebCore::HTMLMediaElement::mediaPlayerSourceURL): Change to new blob URL.
      (WebCore::HTMLMediaElement::seek): Check if source state is "closed".
      (WebCore::HTMLMediaElement::setSourceState): Helper function so that we don't have to
          keep checking for m_mediaSource.
      (WebCore::HTMLMediaElement::userCancelledLoad): Set source state to "closed".
      (WebCore::HTMLMediaElement::createMediaPlayer): If the current MediaPlayer is re-
           created, notify the MediaSource and reset its MediaPlayer.
      
      * html/HTMLMediaElement.h: Remove old style API code and add a MediaSource object.
      (HTMLMediaElement):
      * html/HTMLMediaElement.idl: Remove old style API.
      
      LayoutTests:
      
      * http/tests/media/media-source/media-source.js:
      (MediaSourceTest.SegmentHelper):
      (MediaSourceTest.SegmentHelper.prototype.addSourceBuffer):
      (MediaSourceTest.SegmentHelper.prototype.appendInitSegment):
      (MediaSourceTest.SegmentHelper.prototype.appendMediaSegment):
      (MediaSourceTest.SegmentHelper.prototype.appendUntilEndOfStream):
      (MediaSourceTest.setSrcToMediaSourceTestURL):
      (MediaSourceTest.defaultOnErrorChecks):
      (MediaSourceTest.runOnSourceOpen.eventHandlerFunction):
      (MediaSourceTest.runOnSourceOpen):
      (MediaSourceTest.logSourceState):
      (MediaSourceTest.expectSourceState):
      * http/tests/media/media-source/video-media-source-abort-expected.txt:
      * http/tests/media/media-source/video-media-source-abort.html:
      * http/tests/media/media-source/video-media-source-add-and-remove-buffers-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-ids-expected.txt.
      * http/tests/media/media-source/video-media-source-add-and-remove-buffers.html: Added.
      * http/tests/media/media-source/video-media-source-add-and-remove-ids.html: Removed.
      * http/tests/media/media-source/video-media-source-errors-expected.txt:
      * http/tests/media/media-source/video-media-source-errors.html:
      * http/tests/media/media-source/video-media-source-event-attributes-expected.txt:
      * http/tests/media/media-source/video-media-source-event-attributes.html:
      * http/tests/media/media-source/video-media-source-objects-expected.txt: Added.
      * http/tests/media/media-source/video-media-source-objects.html: Added.
      * http/tests/media/media-source/video-media-source-play-expected.txt:
      * http/tests/media/media-source/video-media-source-play.html:
      * http/tests/media/media-source/video-media-source-seek-expected.txt:
      * http/tests/media/media-source/video-media-source-seek.html:
      * http/tests/media/media-source/video-media-source-state-changes-expected.txt:
      * http/tests/media/media-source/video-media-source-state-changes.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ed37cec
    • scherkus@chromium.org's avatar
      Fire suspend event whenever network state is set to NETWORK_IDLE. · 3a838d42
      scherkus@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93052
      
      Reviewed by Eric Carlson.
      
      There was a regression in the Chromium port (http://crbug.com/139511) that revealed we didn't
      have a layout test for suspend events. Upon further investigation it appeared we also had a bug
      where we didn't fire the suspend event when a media engine reported they had completely loaded
      the media.
      
      Covered by new test http/tests/media/video-load-suspend.html.
      
      Source/WebCore:
      
      * html/HTMLMediaElement.cpp: Move firing of suspend event to changeNetworkStateFromLoadingToIdle
      (WebCore::HTMLMediaElement::setNetworkState):
      (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle):
      
      LayoutTests:
      
      * http/tests/media/video-load-suspend-expected.txt: Added.
      * http/tests/media/video-load-suspend.html: Added.
      * media/event-attributes-expected.txt: Updated to include suspend event.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a838d42
  19. 06 Aug, 2012 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r124848. · 1835005d
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/124848
      https://bugs.webkit.org/show_bug.cgi?id=93336
      
      Caused 3 tests to crash on chromium Linux32/Mac10.6/Linux
      (Requested by toyoshim on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-08-06
      
      Source/WebCore:
      
      * html/HTMLMediaElement.cpp:
      (WebCore):
      (WebCore::HTMLMediaElement::HTMLMediaElement):
      (WebCore::HTMLMediaElement::parseAttribute):
      (WebCore::HTMLMediaElement::prepareForLoad):
      (WebCore::HTMLMediaElement::loadResource):
      (WebCore::HTMLMediaElement::noneSupported):
      (WebCore::HTMLMediaElement::mediaEngineError):
      (WebCore::HTMLMediaElement::mediaPlayerSourceOpened):
      (WebCore::HTMLMediaElement::isValidSourceId):
      (WebCore::HTMLMediaElement::seek):
      (WebCore::HTMLMediaElement::webkitSourceAddId):
      (WebCore::HTMLMediaElement::webkitSourceRemoveId):
      (WebCore::HTMLMediaElement::webkitSourceBuffered):
      (WebCore::HTMLMediaElement::webkitSourceAppend):
      (WebCore::HTMLMediaElement::webkitSourceAbort):
      (WebCore::HTMLMediaElement::webkitSourceEndOfStream):
      (WebCore::HTMLMediaElement::webkitSourceState):
      (WebCore::HTMLMediaElement::setSourceState):
      (WebCore::HTMLMediaElement::userCancelledLoad):
      (WebCore::HTMLMediaElement::createMediaPlayer):
      * html/HTMLMediaElement.h:
      (HTMLMediaElement):
      * html/HTMLMediaElement.idl:
      
      LayoutTests:
      
      * http/tests/media/media-source/media-source.js:
      (MediaSourceTest.SegmentHelper):
      (MediaSourceTest.SegmentHelper.prototype.addSourceId):
      (MediaSourceTest.SegmentHelper.prototype.appendInitSegment):
      (MediaSourceTest.SegmentHelper.prototype.appendMediaSegment):
      (MediaSourceTest.SegmentHelper.prototype.appendUntilEndOfStream):
      (MediaSourceTest.setSrcToMediaSourceTestURL):
      (MediaSourceTest.defaultOnErrorChecks):
      (MediaSourceTest.runOnSourceOpen.eventHandlerFunction):
      (MediaSourceTest.runOnSourceOpen):
      (MediaSourceTest.logSourceState):
      (MediaSourceTest.expectSourceState):
      (MediaSourceTest.getSourceStateName):
      * http/tests/media/media-source/video-media-source-abort-expected.txt:
      * http/tests/media/media-source/video-media-source-abort.html:
      * http/tests/media/media-source/video-media-source-add-and-remove-buffers.html: Removed.
      * http/tests/media/media-source/video-media-source-add-and-remove-ids-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-buffers-expected.txt.
      * http/tests/media/media-source/video-media-source-add-and-remove-ids.html: Added.
      * http/tests/media/media-source/video-media-source-errors-expected.txt:
      * http/tests/media/media-source/video-media-source-errors.html:
      * http/tests/media/media-source/video-media-source-event-attributes-expected.txt:
      * http/tests/media/media-source/video-media-source-event-attributes.html:
      * http/tests/media/media-source/video-media-source-play-expected.txt:
      * http/tests/media/media-source/video-media-source-play.html:
      * http/tests/media/media-source/video-media-source-seek-expected.txt:
      * http/tests/media/media-source/video-media-source-seek.html:
      * http/tests/media/media-source/video-media-source-state-changes-expected.txt:
      * http/tests/media/media-source/video-media-source-state-changes.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1835005d
    • annacc@chromium.org's avatar
      Update HTMLMediaElement to the new OO MediaSource API. · 300bbb8c
      annacc@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91775
      
      Reviewed by Eric Carlson.
      
      This patch rips out the old-style MediaSource API and allows a
      MediaSource object to be attached to HTMLMediaElement.
      http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
      
      Source/WebCore:
      
      Test: http/tests/media/media-source/video-media-source-add-and-remove-buffers.html
      
      Tests: updates to http/tests/media/media-source/*
      
      * html/HTMLMediaElement.cpp:
      (WebCore):
      (WebCore::HTMLMediaElement::HTMLMediaElement): Remove old style API resources.
      (WebCore::HTMLMediaElement::parseAttribute): Remove old style event attributes.
      (WebCore::HTMLMediaElement::prepareForLoad): Set source state to "closed".
      (WebCore::HTMLMediaElement::loadResource): Get MediaSource object from blob registry
          look up and, if found, set it's MediaPlayer pointer to the current MediaPlayer.
      (WebCore::HTMLMediaElement::noneSupported): Set source state to "closed".
      (WebCore::HTMLMediaElement::mediaEngineError): Set source state to "closed".
      (WebCore::HTMLMediaElement::mediaPlayerSourceOpened): Set source state to "open".
      (WebCore::HTMLMediaElement::mediaPlayerSourceURL): Change to new blob URL.
      (WebCore::HTMLMediaElement::seek): Check if source state is "closed".
      (WebCore::HTMLMediaElement::setSourceState): Helper function so that we don't have to
          keep checking for m_mediaSource.
      (WebCore::HTMLMediaElement::userCancelledLoad): Set source state to "closed".
      (WebCore::HTMLMediaElement::createMediaPlayer): If the current MediaPlayer is re-
          created, notify the MediaSource and reset its MediaPlayer.
      
      * html/HTMLMediaElement.h: Remove old style API code and add a MediaSource object.
      (HTMLMediaElement):
      * html/HTMLMediaElement.idl: Remove old style API.
      
      LayoutTests:
      
      * http/tests/media/media-source/media-source.js:
      (MediaSourceTest.SegmentHelper):
      (MediaSourceTest.SegmentHelper.prototype.addSourceBuffer):
      (MediaSourceTest.SegmentHelper.prototype.appendInitSegment):
      (MediaSourceTest.SegmentHelper.prototype.appendMediaSegment):
      (MediaSourceTest.SegmentHelper.prototype.appendUntilEndOfStream):
      (MediaSourceTest.setSrcToMediaSourceTestURL):
      (MediaSourceTest.defaultOnErrorChecks):
      (MediaSourceTest.runOnSourceOpen.eventHandlerFunction):
      (MediaSourceTest.runOnSourceOpen):
      (MediaSourceTest.logSourceState):
      (MediaSourceTest.expectSourceState):
      * http/tests/media/media-source/video-media-source-abort-expected.txt:
      * http/tests/media/media-source/video-media-source-abort.html:
      * http/tests/media/media-source/video-media-source-add-and-remove-buffers-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-ids-expected.txt.
      * http/tests/media/media-source/video-media-source-add-and-remove-buffers.html: Added.
      * http/tests/media/media-source/video-media-source-add-and-remove-ids.html: Removed.
      * http/tests/media/media-source/video-media-source-errors-expected.txt:
      * http/tests/media/media-source/video-media-source-errors.html:
      * http/tests/media/media-source/video-media-source-event-attributes-expected.txt:
      * http/tests/media/media-source/video-media-source-event-attributes.html:
      * http/tests/media/media-source/video-media-source-play-expected.txt:
      * http/tests/media/media-source/video-media-source-play.html:
      * http/tests/media/media-source/video-media-source-seek-expected.txt:
      * http/tests/media/media-source/video-media-source-seek.html:
      * http/tests/media/media-source/video-media-source-state-changes-expected.txt:
      * http/tests/media/media-source/video-media-source-state-changes.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      300bbb8c
  20. 04 Aug, 2012 1 commit
  21. 30 Jul, 2012 1 commit
    • allan.jensen@nokia.com's avatar
      There is no way to tell whether an element can be activated or not · d4a972d9
      allan.jensen@nokia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=92093
      
      Reviewed by Antonio Gomes.
      
      Source/WebCore:
      
      This patch adds the willRespondToMouseClickEvents and willRespondToMouseMoveEvents
      functions, named after similar functions in the iOS fork of WebKit.
      
      Touch-adjustment will now use these two functions, which improves accuracy when
      targeting shadow-dom elements, and also means touch adjustment will prefer enabled
      form-elements over disabled ones.
      
      Test: touchadjustment/disabled-formelements.html
      
      * dom/Node.cpp:
      (WebCore::Node::willRespondToMouseMoveEvents):
      (WebCore::Node::willRespondToMouseClickEvents):
      * dom/Node.h:
      (Node):
      * editing/DeleteButton.h:
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::willRespondToMouseClickEvents):
      * html/HTMLAnchorElement.h:
      (HTMLAnchorElement):
      * html/HTMLButtonElement.cpp:
      (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
      * html/HTMLButtonElement.h:
      (HTMLButtonElement):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::willRespondToMouseClickEvents):
      * html/HTMLInputElement.h:
      (HTMLInputElement):
      * html/HTMLLabelElement.cpp:
      (WebCore::HTMLLabelElement::willRespondToMouseClickEvents):
      * html/HTMLLabelElement.h:
      (HTMLLabelElement):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::willRespondToMouseClickEvents):
      * html/HTMLMediaElement.h:
      * html/HTMLSummaryElement.cpp:
      (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
      * html/HTMLSummaryElement.h:
      (HTMLSummaryElement):
      * html/shadow/CalendarPickerElement.cpp:
      (WebCore::CalendarPickerElement::willRespondToMouseClickEvents):
      * html/shadow/CalendarPickerElement.h:
      (CalendarPickerElement):
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTimelineElement::willRespondToMouseClickEvents):
      (WebCore::MediaControlTimelineElement::setPosition):
      (WebCore::MediaControlVolumeSliderElement::willRespondToMouseMoveEvents):
      (WebCore::MediaControlVolumeSliderElement::willRespondToMouseClickEvents):
      * html/shadow/MediaControlElements.h:
      (MediaControlTimelineElement):
      (MediaControlVolumeSliderElement):
      * html/shadow/MediaControlRootElement.h:
      * html/shadow/SliderThumbElement.cpp:
      (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
      (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
      * html/shadow/SliderThumbElement.h:
      (SliderThumbElement):
      * html/shadow/TextControlInnerElements.cpp:
      (WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEvents):
      (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
      (WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
      (WebCore::SpinButtonElement::willRespondToMouseClickEvents):
      (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
      * html/shadow/TextControlInnerElements.h:
      (SearchFieldResultsButtonElement):
      (SearchFieldCancelButtonElement):
      (SpinButtonElement):
      * html/shadow/TextFieldDecorationElement.cpp:
      (WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents):
      * html/shadow/TextFieldDecorationElement.h:
      (TextFieldDecorationElement):
      * page/TouchAdjustment.cpp:
      (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
      
      LayoutTests:
      
      Tests that enabled formelements are now preferred over disabled formelements.
      
      * touchadjustment/disabled-formelements-expected.txt: Added.
      * touchadjustment/disabled-formelements.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d4a972d9
  22. 26 Jul, 2012 1 commit
    • jer.noble@apple.com's avatar
      Add diagnostic messages when media and plugins load or fail to load. · 63353b79
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=92341
      
      Reviewed by Anders Carlsson.
      
      Send diagnostic messages when a media or plugin element loads or fails to load. Include in
      the trace the media engine description, error code, or plugin mime type.
      
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::updateWidget): Send a diagnostic message.
      * html/HTMLMediaElement.cpp:
      (WebCore::stringForNetworkState): Added convenience function to stringify network states.
      (WebCore::HTMLMediaElement::mediaLoadingFailed): Send a diagnostic message.
      (WebCore::HTMLMediaElement::setReadyState): Send a diagnostic message.
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::updateWidget): Send a diagnostic message.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63353b79
  23. 24 Jul, 2012 1 commit
  24. 23 Jul, 2012 1 commit
  25. 18 Jul, 2012 1 commit
    • shinyak@chromium.org's avatar
      Element wants to have userAgentShadowRoot() · f722950c
      shinyak@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91564
      
      Reviewed by Eric Carlson.
      
      We introduce Element::userAgentShadowRoot() to return a UserAgentShadowRoot.
      It returns the oldest shadow root if any, and checks the type of ShadowRoot in debug build.
      
      Previously, we have used elementShadow()->oldestShadowRoot() to get UserAgentShadowRoot.
      The class implementor will know the oldest shadow root is UserAgentShadowRoot, but it is not
      clear for the other people. This method will make the code intention clearer.
      
      We will introduce userAgentShadowRoot to the other elements (e.g. HTMLInputElement) after this patch.
      
      No new tests, simple refactoring.
      
      * dom/Element.cpp:
      (WebCore::Element::userAgentShadowRoot):
      (WebCore):
      * dom/Element.h:
      (Element):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::createShadowSubtree):
      (WebCore::HTMLMediaElement::willAddAuthorShadowRoot):
      (WebCore::HTMLMediaElement::mediaControls):
      (WebCore::HTMLMediaElement::hasMediaControls):
      (WebCore::HTMLMediaElement::createMediaControls):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f722950c
  26. 17 Jul, 2012 1 commit
    • shinyak@chromium.org's avatar
      HTMLMediaElement should not use Element::ensureShadowRoot() · e733cfbd
      shinyak@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=77936
      
      Reviewed by Hajime Morita.
      
      Source/WebCore:
      
      a video element and an audio element add UserAgentShadowRoot dynamically, and they assume that it's the oldest ShadowRoot.
      However an AuthorShadowRoot could be added by a user before a video element and an audio element add UserAgentShadowRoot.
      It breaks the assumption that the UserAgentShadowRoot is the oldest.
      
      If the UserAgentShadowRoot is not the oldest, the AuthorShadowRoot a page author added might be ignored.
      Since the timing to add UserAgentShadowRoot is not known by a user, the fact that UserAgentShadorRoot is
      not the oldest will cause inconsistent behavior.
      
      Adding AuthorShadowRoot to a video element and an audio element is allowed by this patch.
      
      Test: fast/dom/shadow/shadowdom-for-media.html
      
      * dom/ShadowRoot.cpp:
      (WebCore::allowsAuthorShadowRoot):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::createShadowSubtree):
      (WebCore):
      (WebCore::HTMLMediaElement::willAddAuthorShadowRoot):
      (WebCore::HTMLMediaElement::createMediaControls):
      * html/HTMLMediaElement.h:
      (HTMLMediaElement):
      
      LayoutTests:
      
      Adding Shadow DOM to a video element and an audio element is allowed now.
      
      * fast/dom/shadow/shadow-disable-expected.txt:
      * fast/dom/shadow/shadow-disable.html:
      * fast/dom/shadow/shadowdom-for-media-expected.txt: Added.
      * fast/dom/shadow/shadowdom-for-media.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e733cfbd
  27. 16 Jul, 2012 2 commits
  28. 15 Jul, 2012 1 commit
    • joepeck@webkit.org's avatar
      Windowless WebView not firing JavaScript load event if there is a media element · 14f8cec9
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91331
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      In prepareForLoad we start deferring the load event. If we fall into this
      clause where the page can not start loading media we bail, potentially
      indefinitely waiting until we can start loading media. Since we can not
      be certain this will ever happen, we should stop deferring the page's
      load event.
      
      Test: WebKit1.WindowlessWebViewWithMedia TestWebKitAPI test. The only
      way this path was reachable right now is on the mac port.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      
      Tools:
      
      Test a windowless WebView loading a page with a media element. The load
      event should happen on the next spin of the run loop, but we spin check
      the page, with a timeout of 250ms.
      
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
      * TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.html: Added.
      * TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm: Added.
      (-[WindowlessWebViewWithMediaFrameLoadDelegate webView:didFinishLoadForFrame:]):
      (TestWebKitAPI::spinLoop): Spin check with timeout. Runs a block each spin to early bail.
      (TestWebKitAPI::TEST):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      14f8cec9
  29. 14 Jul, 2012 1 commit
    • eric.carlson@apple.com's avatar
      Enable AVCF hardware video decoding · 1e9da37a
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=90015
      <rdar://problem/10770317>
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      * html/HTMLMediaElement.cpp:
      (WebCore):
      (WebCore::HTMLMediaElement::mediaPlayerGraphicsDeviceAdapter): New, return the client's graphics 
          device adapter.
      * html/HTMLMediaElement.h:
      
      * page/ChromeClient.h:
      (WebCore::ChromeClient::graphicsDeviceAdapter): New.
      
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::MediaPlayer::graphicsDeviceAdapter): New, ask the media element for the graphics
          device adapter.
      * platform/graphics/MediaPlayer.h:
      
      * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Soft-link AVCFPlayerSetDirect3DDevice
          and AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey.
      
      * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 
      (WebCore::MediaPlayerPrivateAVFoundationCF::createAVAssetForURL): Pass the current d3d9
          device interface to the AVFWrapper.
      (WebCore::AVFWrapper::createAssetForURL): If the d3d9 device implements IDirect3DDevice9Ex,
          tell the AVAsset to enable hardware video decoding.
      (WebCore::AVFWrapper::createPlayer): Pass the d3d9 device to the player if it implements IDirect3DDevice9Ex.
      
      * platform/graphics/ca/win/CACFLayerTreeHost.h:
      (WebCore::CACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation.
      
      * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
      (WebCore::LegacyCACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation.
      * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
      (WebCore::WKCACFViewLayerTreeHost::graphicsDeviceAdapter): New.
      * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
      
      * platform/win/SoftLinking.h: Define SOFT_LINK_DLL_IMPORT_OPTIONAL, SOFT_LINK_LOADED_LIBRARY,
          and SOFT_LINK_VARIABLE_DLL_IMPORT_OPTIONAL.
      
      Source/WebKit/win: 
      
      * WebCoreSupport/WebChromeClient.cpp:
      (WebChromeClient::graphicsDeviceAdapter): New, return the view's graphics adapter.
      * WebCoreSupport/WebChromeClient.h:
      (WebChromeClient):
      
      * WebView.cpp:
      (WebView::graphicsDeviceAdapter): New, return the layer tree host's graphics adapter.
      * WebView.h:
      (WebCore):
      (WebView):
      
      Source/WebKit2: 
      
      * DerivedSources.make: Define HAVE_AVCF if necessary.
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit):
      (WebKit::WebChromeClient::graphicsDeviceAdapter): New, return the layer tree host's
          graphics adapter.
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      (WebChromeClient):
      * WebProcess/WebPage/LayerTreeHost.h:
      (WebCore):
      (LayerTreeHost):
      (WebKit::LayerTreeHost::graphicsDeviceAdapter): New, default implementation.
      
      * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h:
      (LayerTreeHostCAWin):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1e9da37a
  30. 12 Jul, 2012 1 commit
    • morrita@google.com's avatar
      [Shadow DOM] <video> with <shadow> crashes · 82884d07
      morrita@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=91055
      
      Reviewed by Kent Tamura.
      
      Source/WebCore:
      
      This is similar to Bug 90480, where an undesired renderer is created by
      locating an insertion point on the shadow boundary.
      
      This change adds a guard for such case by cheking whether the
      source node of each to-be-created renderer comes from the UA shadow
      tree, which is allowed to have a renderer.
      
      Test: fast/dom/shadow/insertion-point-video-crash.html
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::childShouldCreateRenderer): Added a check.
      (WebCore::HTMLMediaElement::mediaControls): Added const.
      (WebCore::HTMLMediaElement::hasMediaControls): Added const.
      * html/HTMLMediaElement.h:
      (HTMLMediaElement):
      
      LayoutTests:
      
      * fast/dom/shadow/insertion-point-video-crash-expected.txt: Added.
      * fast/dom/shadow/insertion-point-video-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82884d07
  31. 25 Jun, 2012 1 commit
  32. 22 Jun, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Add url to supportsType · 6b0622a9
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=89514
      
      Patch by Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> on 2012-06-22
      Reviewed by Eric Carlson.
      
      No new tests since there's no change on code behavior.
      
      When a blob is created as the address for a Media Stream, the MediaEngine
      will ask it's players if they support that media. However, a player built
      for MediaStream needs to know to URL to decide if it's supported or not.
      
      * dom/DOMImplementation.cpp:
      (WebCore::DOMImplementation::createDocument):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::canPlayType):
      (WebCore::HTMLMediaElement::selectNextSourceChild):
      * html/HTMLMediaElement.h:
      * platform/graphics/MediaPlayer.cpp:
      (MediaPlayerFactory):
      (WebCore::MediaPlayerFactory::MediaPlayerFactory):
      (WebCore):
      (WebCore::textPlain):
      (WebCore::bestMediaEngineForTypeAndCodecs):
      (WebCore::MediaPlayer::load):
      (WebCore::MediaPlayer::loadWithNextMediaEngine):
      (WebCore::MediaPlayer::paint):
      (WebCore::MediaPlayer::supportsType):
      * platform/graphics/MediaPlayer.h:
      (WebCore):
      * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
      (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType):
      * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
      (MediaPlayerPrivateAVFoundationCF):
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      (MediaPlayerPrivateAVFoundationObjC):
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
      * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
      (WebCore::MediaPlayerPrivate::supportsType):
      * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
      (MediaPlayerPrivate):
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
      (MediaPlayerPrivateGStreamer):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
      (MediaPlayerPrivateQTKit):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::supportsType):
      * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
      (WebCore::MediaPlayerPrivateQt::supportsType):
      * platform/graphics/qt/MediaPlayerPrivateQt.h:
      (MediaPlayerPrivateQt):
      * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
      (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType):
      * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
      (MediaPlayerPrivateQuickTimeVisualContext):
      * platform/graphics/wince/MediaPlayerPrivateWinCE.h:
      (MediaPlayerPrivate):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6b0622a9