1. 09 Apr, 2013 1 commit
    • eric.carlson@apple.com's avatar
      [Mac] user caption styles not applied to correct element · c1ce91d5
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114230
      
      Reviewed by Jer Noble.
      
      Source/WebCore: 
      
      Test: media/track/track-css-user-override.html
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive by clean-up so we don't log excessively.
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
          new member variables.
      (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Set cue font size when it is
          inserted into the tree.
      (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Update the font size of 
          all active cues.
      (WebCore::MediaControlTextTrackContainerElement::updateSizes): Set size-relative CSS properties
          after a time because this can be called during layout.
      * html/shadow/MediaControlElements.h:
      
      * html/shadow/MediaControls.cpp:
      (WebCore::MediaControls::textTrackPreferencesChanged): Call closedCaptionTracksChanged before updateSizes.
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::setFontSize): New, set the cue's font size.
      * html/track/TextTrackCue.h:
      
      * html/track/TextTrackCueGeneric.cpp:
      (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set cue properties on the cue element
          instead of on the cue box to match what we do for the "cue" pseudo element.
      (WebCore::TextTrackCueGeneric::setFontSize): New, set the cue's font size.
      * html/track/TextTrackCueGeneric.h:
      
      * html/track/TextTrackList.cpp:
      (TextTrackList::remove): Drive-by cleanup, don't ASSERT when the media element is NULL.
      
      * page/CaptionUserPreferences.cpp:
      (WebCore::CaptionUserPreferences::setCaptionsStyleSheetOverride): New, allow user CSS overrides
          to be tested in DRT.
      (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): New, generate a user style
          sheet override. Moved here from CaptionUserPreferencesMac.
      * page/CaptionUserPreferences.h:
      
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Don't ignore background color importance.
      (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Implement even when we don't 
          have the media accessibility framework so this can be tested in DRT. Apply all cue properties
          to the element used for the "cue" pseudo element.
      
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress): Drive-by cleanup, remove logging
          because this method is called so frequently and the logging is not especially useful.
      (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Only log when the ready/network
          state changes because this method is called so frequently.
      
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): Drive-by cleanup, remove logging
          because this method is called so frequently and the logging is not especially useful.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Make the logging more useful.
      
      * testing/Internals.cpp:
      (WebCore::Internals::resetToConsistentState): Reset captions style sheet override.
      (WebCore::Internals::captionsStyleSheetOverride): New, return the captions style sheet override.
      (WebCore::Internals::setCaptionsStyleSheetOverride): New, override the captions style sheet override.
      * testing/Internals.h:
      * testing/Internals.idl:
      
      LayoutTests: 
      
      * media/track/track-css-user-override-expected.txt: Added.
      * media/track/track-css-user-override.html: Added.
      * media/track/track-cue-container-rendering-position-expected.txt:
      * media/track/track-cue-container-rendering-position.html:
      * media/track/track-cue-rendering-expected.txt:
      * media/track/track-cue-rendering.html: Font size is not applied instantly when a video element is
          resized, so check after a very short delay.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1ce91d5
  2. 01 Apr, 2013 1 commit
    • vcarbune@chromium.org's avatar
      TextTrackCue Extension for WebVTT Regions · 776c2773
      vcarbune@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=109821
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      The TextTrackCue gets a new attribute and setting, regionId, which specifies
      to which region the cue belongs to. The attribute is guarded by WEBVTT_REGIONS
      and is by default disabled in ports.
      
      Test: media/track/regions-webvtt/text-track-cue-region-attribute.html
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::TextTrackCue): Added member variable for the regionId attribute.
      (WebCore):
      (WebCore::TextTrackCue::setRegionId): Setter for the regionId attribute.
      (WebCore::TextTrackCue::settingName): Added RegionId setting name.
      (WebCore::TextTrackCue::setCueSettings): Parsed the "region:" cue setting.
      * html/track/TextTrackCue.h:
      (TextTrackCue):
      (WebCore::TextTrackCue::regionId): Getter for the regionId attribute.
      * html/track/TextTrackCue.idl: Updated to match the WebVTT Regions Extension.
      
      LayoutTests:
      
      * media/track/captions-webvtt/header-regions.vtt: Updated to include cues with
      settings for which the "region:" setting should be ignored (for backwards compatibility
      regarding WebVTT rendering rules).
      * media/track/regions-webvtt/text-track-cue-region-attribute-expected.txt: Added.
      * media/track/regions-webvtt/text-track-cue-region-attribute.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      776c2773
  3. 18 Mar, 2013 1 commit
    • vcarbune@chromium.org's avatar
      Determine text direction for rendering a TextTrackCue · 770dc028
      vcarbune@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=79749
      
      Reviewed by Levi Weintraub.
      
      Source/WebCore:
      
      The rendering rules for WebVTT cues are slightly different
      depending on the directionality determined from the characters
      of the cue text. This patch implements the preliminary step
      to be able to take directionality into account.
      
      It iterates through the cue characters and setting the CSS
      directionality to the one of the first strong directional character.
      
      Test: media/track/track-cue-rendering-rtl.html
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::applyCSSProperties): Applies the determined
      direction.
      (WebCore::TextTrackCue::TextTrackCue): Sets the default value for the
      display direction.
      (WebCore::isCueParagraphSeparator): Tests for explicit unicode characters
      that are paragraph separators.
      (WebCore):
      (WebCore::TextTrackCue::determineTextDirection): Determined the direction
      by the first strong directional character found.
      (WebCore::TextTrackCue::calculateDisplayParameters): Updated.
      (WebCore::TextTrackCue::getCSSWritingDirection): Return the determined CSS
      writing direction.
      * html/track/TextTrackCue.h:
      (TextTrackCue):
      
      LayoutTests:
      
      * media/track/captions-webvtt/captions-rtl.vtt: Added.
      * media/track/track-cue-rendering-rtl-expected.txt: Added.
      * media/track/track-cue-rendering-rtl.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      770dc028
  4. 13 Mar, 2013 1 commit
  5. 11 Mar, 2013 2 commits
    • dgorbik@apple.com's avatar
      Fix build for r145397 (part 2) · b44c3dff
      dgorbik@apple.com authored
      Unreviewed.
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::getDisplayTree):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b44c3dff
    • dgorbik@apple.com's avatar
      Not all properties apply to the '::cue' pseudo-element · ba1240dc
      dgorbik@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=110705
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Background properties are not inherited and they were not applied to right elements.
      Now we apply all ::cue properties to WebVTT cue background box, which -webkit-media-text-track-all-nodes
      container was corresponding to. Now it has 'cue' pseudoId instead of '-webkit-media-text-track-all-nodes'.
      Property filtering is turned off for user agent rules so that we are still able to apply filtered rules
      to this container internally. m_cueContainer is removed because it is no longer needed.
      m_allDocumentNodes container was renamed to m_cueBackgroundBox.
      
      Existing tests modified to cover this case.
      
      * css/RuleSet.h:
      (WebCore::RuleData::propertyWhitelistType): disable filtering for UA rules.
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::sortAndTransferMatchedRules): pass the UA scope to propertyWhitelistType().
      * css/mediaControls.css: rename -webkit-media-text-track-all-nodes to 'cue'
      (video::cue):
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
      * html/shadow/MediaControlElements.h:
      (MediaControlTextTrackContainerElement):
      * html/shadow/MediaControls.cpp:
      (WebCore::MediaControls::createTextTrackDisplay):
      * html/shadow/MediaControlsChromium.cpp:
      (WebCore::MediaControlsChromium::createTextTrackDisplay):
      * html/shadow/MediaControlsGtk.cpp:
      (WebCore::MediaControlsGtk::createTextTrackDisplay):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::TextTrackCue):
      (WebCore::TextTrackCue::updateDisplayTree):
      (WebCore::TextTrackCue::getDisplayTree):
      * html/track/TextTrackCue.h:
      (WebCore::TextTrackCue::element):
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride):
      
      LayoutTests:
      
      * media/media-controls.js:
      (textTrackDisplayElement):
      * media/track/track-css-all-cues-expected.txt:
      * media/track/track-css-all-cues.html:
      * media/track/track-css-cue-lifetime.html:
      * media/track/track-css-matching-default.html:
      * media/track/track-css-matching-lang.html:
      * media/track/track-css-matching-timestamps.html:
      * media/track/track-css-matching.html:
      * media/track/track-css-property-whitelist.html:
      * media/track/track-in-band-style.html:
      * platform/mac/media/track/track-cue-rendering-horizontal-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba1240dc
  6. 06 Mar, 2013 1 commit
    • eric@webkit.org's avatar
      Replace shouldLazyAttach bool with an enum for readability · 9c6f7088
      eric@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=111503
      
      Reviewed by Dimitri Glazkov.
      
      No behavioral change.
      
      * bindings/cpp/WebDOMNodeCustom.cpp:
      (WebDOMNode::insertBefore):
      (WebDOMNode::replaceChild):
      (WebDOMNode::appendChild):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::insertBefore):
      (WebCore::JSNode::replaceChild):
      (WebCore::JSNode::appendChild):
      * bindings/v8/custom/V8NodeCustom.cpp:
      (WebCore):
      (WebCore::V8Node::insertBeforeMethodCustom):
      (WebCore::V8Node::replaceChildMethodCustom):
      (WebCore::V8Node::appendChildMethodCustom):
      * dom/ContainerNode.cpp:
      (WebCore):
      (WebCore::ContainerNode::insertBefore):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::ContainerNode::appendChild):
      (WebCore::updateTreeAfterInsertion):
      * dom/ContainerNode.h:
      (ContainerNode):
      * dom/Node.cpp:
      (WebCore::Node::insertBefore):
      (WebCore::Node::replaceChild):
      (WebCore::Node::appendChild):
      * dom/Node.h:
      (Node):
      * editing/AppendNodeCommand.cpp:
      (WebCore::AppendNodeCommand::doApply):
      * editing/InsertNodeBeforeCommand.cpp:
      (WebCore::InsertNodeBeforeCommand::doApply):
      * html/shadow/MediaControlsApple.cpp:
      (WebCore::MediaControlsApple::createControls):
      * html/shadow/MediaControlsBlackBerry.cpp:
      (WebCore::MediaControlsBlackBerry::createControls):
      * html/shadow/MediaControlsChromium.cpp:
      (WebCore::MediaControlsChromium::initializeControls):
      * html/shadow/MediaControlsChromiumAndroid.cpp:
      (WebCore::MediaControlsChromiumAndroid::createControls):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c6f7088
  7. 13 Feb, 2013 1 commit
    • 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
  8. 31 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      REGRESSION(r140231): media track layout tests crashing · 4dcd5eb1
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107579
      
      Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-31
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      We were using non-standard element names with HTMLElement, which made v8 try to cast
      WebVTTElements to HTMLUnknownElements which was not possible. Subclassing Element instead
      of HTMLElement, though this requires building HTMLElements from WebVTTElements for creating
      a DOM tree. The code has been refactored to move WebVTT node type to QuialifiedName mappings
      inside the WebVTTElement class. All WebVTTElements in the shadow dom tree now are in the
      namespace defined by 'NullAtom'. This prevents regular styles from being applied to <b>, <i>
      and similar tags. Those have to be styled separately without reusing existing QualifiedNames
      and their styles. https://bugs.webkit.org/show_bug.cgi?id=107214
      
      Unskipping tests to cover this.
      
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::checkOne):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRules):
      (WebCore::StyleResolver::canShareStyleWithElement):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree):
      (WebCore::TextTrackCue::getCueAsHTML):
      (WebCore::TextTrackCue::createCueRenderingTree):
      (WebCore::TextTrackCue::markFutureAndPastNodes):
      * html/track/TextTrackCue.h:
      (WebCore::TextTrackCue::cueShadowPseudoId):
      * html/track/WebVTTElement.cpp:
      (WebCore::nodeTypeToTagName): get a QualifiedName to use in the shadow DOM tree.
      (WebCore::WebVTTElement::WebVTTElement):
      (WebCore::WebVTTElement::create):
      (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
      (WebCore::WebVTTElement::createEquivalentHTMLElement): create an HTMLElement to use in the DOM tree.
      * html/track/WebVTTElement.h:
      (WebCore::WebVTTElement::setWebVTTNodeType):
      (WebCore::WebVTTElement::webVTTNodeType):
      (WebCore::WebVTTElement::isPastNode):
      (WebCore::WebVTTElement::setIsPastNode):
      (WebCore::WebVTTElement::voiceAttributeName):
      * html/track/WebVTTParser.cpp:
      (WebCore::tokenToNodeType): determine a WebVTT node type for the token.
      (WebCore::WebVTTParser::constructTreeFromToken):
      
      LayoutTests:
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4dcd5eb1
  9. 29 Jan, 2013 1 commit
  10. 25 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Support language WebVTT Nodes · 6be29c8f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107907
      
      Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-25
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Language stack and WebVTT language nodes are added as
      required by specs.
      
      Test: media/track/track-css-matching-lang.html
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): WebVTT language nodes should be
      spans in DOM and the lang attribute should be set for all nodes if applicable.
      * html/track/TextTrackCue.h:
      (WebCore::TextTrackCue::langElementTagName):
      (TextTrackCue):
      (WebCore::TextTrackCue::langAttributeName):
      * html/track/WebVTTParser.cpp:
      (WebCore::WebVTTParser::createDocumentFragmentFromCueText): clear the language stack in case
      we use the same parser object for multiple cues that have incorrect syntax.
      (WebCore::isLangToken):
      (WebCore):
      (WebCore::WebVTTParser::constructTreeFromToken): parse lang WebVTT objects.
      * html/track/WebVTTParser.h:
      (WebVTTParser):
      
      LayoutTests:
      
      * media/track/captions-webvtt/styling-lang.vtt: Added.
      * media/track/track-css-matching-lang-expected.txt: Added.
      * media/track/track-css-matching-lang.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6be29c8f
  11. 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
  12. 18 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Remove a TextTrack.h include from the Element.h and move WebVTT related stuff outside the Element · 98bd97a4
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107080
      
      Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-18
      Reviewed by Sam Weinig.
      
      WebVTT objects are now subclasses of the Element. This allows us to remove major WebVTT chunks of code from
      Element.h and NodeRareData. WebVTTElement is deriving from HTMLElement and not Element to prevent possible
      problems that could happen because we reuse qTags that are being used in HTML like <b>, <i> and <u>.
      
      No new tests. This is just a refactoring of the existing code.
      
      * CMakeLists.txt:
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::checkOne):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRules):
      (WebCore::StyleResolver::canShareStyleWithElement):
      * dom/Element.cpp:
      * dom/Element.h:
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::ElementRareData):
      * dom/Node.h:
      (WebCore::Node::isWebVTTElement):
      * html/track/TextTrack.h:
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree):
      (WebCore::TextTrackCue::markFutureAndPastNodes):
      * html/track/WebVTTElement.cpp: Added.
      (WebCore::WebVTTElement::create):
      (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
      * html/track/WebVTTElement.h: Added.
      (WebCore::WebVTTElement::setWebVTTNodeType):
      (WebCore::WebVTTElement::webVTTNodeType):
      (WebCore::WebVTTElement::WebVTTElement):
      (WebCore::toWebVTTElement):
      * html/track/WebVTTParser.cpp:
      (WebCore::WebVTTParser::constructTreeFromToken):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98bd97a4
  13. 15 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Implement matching by the voice attribute for WebVTT ::cue pseudo element · 22177dc9
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106762
      
      Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-15
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Implemented matching cue WebVTT elements by a voice attribute by adding a WebVTT specific voice attribute.
      For DOM trees title attribute is used instead as this is required by specs.
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): set a title argument instead of a voice attribute for the DOM tree.
      * html/track/TextTrackCue.h:
      (WebCore::TextTrackCue::voiceAttributeName):
      * html/track/WebVTTParser.cpp:
      (WebCore::WebVTTParser::constructTreeFromToken):
      
      LayoutTests:
      
      * media/track/captions-webvtt/styling.vtt:
      * media/track/track-css-matching-expected.txt:
      * media/track/track-css-matching.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22177dc9
  14. 14 Jan, 2013 3 commits
    • commit-queue@webkit.org's avatar
      Implement ID selector matching for the WebVTT ::cue pseudo element · e3c6bc9a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105481
      
      Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-14
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Implemented matching cue WebVTT elements by an identifier. Identifiers of all WebVTT nodes in the rendering tree for
      a given cue are set to match the cue identifier.
      
      Existing tests were modified to cover this case.
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::markFutureAndPastNodes):
      
      LayoutTests:
      
      * media/track/captions-webvtt/styling.vtt:
      * media/track/track-css-matching-expected.txt:
      * media/track/track-css-matching.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3c6bc9a
    • commit-queue@webkit.org's avatar
      Implement element type selectors for the WebVTT ::cue pseudo class · 2d5d0278
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105480
      
      Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-14
      Reviewed by Antti Koivisto.
      
      Source/WebCore:
      
      Implemented tag matching for the WebVTT specific tags "c" and "v". All common html tags like "b" and "i" are
      handled without any changes to the code. Creating a rendering tree and DOM tree now use different code paths.
      They both are made by cloning and modifying the tree produced by the parser. Voice tags now use spans for both
      rendering and DOM trees to conform to specs. Since this changes a lot of code little refactoring has been
      done. Removed m_hasInnerTimestamps since it is no longer needed, it doesn't affect anything. m_documentFragment
      was renamed to m_webVTTNodeTree.
      
      Existing tests were modified to cover this case.
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::TextTrackCue):
      (WebCore::TextTrackCue::setText): rename m_documentFragment to m_webVTTNodeTree
      (WebCore::TextTrackCue::createWebVTTNodeTree): parse the cue if it hasn't been parsed before.
      (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): clone and prepare a node for using in the DOM tree according to specs.
      (WebCore::TextTrackCue::getCueAsHTML): get a DOM tree for the cue.
      (WebCore::TextTrackCue::createCueRenderingTree): create a rendering tree (main tree is just being cloned for now).
      (WebCore::TextTrackCue::markFutureAndPastNodes): tightening the argument type.
      (WebCore::TextTrackCue::updateDisplayTree):
      (WebCore::TextTrackCue::getDisplayTree): code cleanup, removed m_hasInnerTimeStamps.
      * html/track/TextTrackCue.h:
      (WebCore::TextTrackCue::voiceElementTagName):
      (TextTrackCue):
      (WebCore::TextTrackCue::classElementTagName):
      * html/track/WebVTTParser.cpp:
      (WebCore::WebVTTParser::constructTreeFromToken): type of the newly created elements was changed to Element to avoid hitting
      an assertion when cloning because a cloned element will not have HTMLElement type for elements with "v" and "c" tag.
      
      LayoutTests:
      
      * media/track/captions-webvtt/styling.vtt:
      * media/track/track-css-matching-expected.txt:
      * media/track/track-css-matching.html:
      * media/track/track-webvtt-tc026-voice.html: voice elements should be spans according to specs.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d5d0278
    • esprehn@chromium.org's avatar
      Clean up WebVTTNodeType code · 6f96773c
      esprehn@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106714
      
      Reviewed by Tony Chang.
      
      There's no reason for so many methods just to compare some enums.
      The existing code can also be simplified quite a bit.
      
      No new tests, just refactoring.
      
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::checkOne):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRules):
      (WebCore::StyleResolver::canShareStyleWithElement):
      * dom/Element.cpp:
      (WebCore::Element::webVTTNodeType):
      (WebCore::Element::setWebVTTNodeType):
      * dom/Element.h:
      (Element):
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::setWebVTTNodeType):
      (WebCore::ElementRareData::webVTTNodeType):
      (ElementRareData):
      * dom/NodeRareData.h:
      (WebCore::NodeRareData::NodeRareData):
      (NodeRareData):
      * html/track/TextTrack.h:
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::markFutureAndPastNodes):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f96773c
  15. 13 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Styling disappears from the cue that's being styled by ::cue pseudo element · 3f330b37
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106723
      
      Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-13
      Reviewed by Antti Koivisto.
      
      Source/WebCore:
      
      Fixes a regression caused by r138966. Setting a pseudoId in TextTrackCue::updateDisplayTree for m_allDocumentNodes
      was triggering recalculating styles the next run loop. Now when this was removed we append the WebVTT tree after its children have
      been marked by markFutureAndPastNodes so that correct styles are set within this append call.
      
      Test: media/track/track-css-cue-lifetime.html
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::markFutureAndPastNodes): changing the type of the first argument because DocumentFragment is not a subclass
      of Element.
      (WebCore::TextTrackCue::updateDisplayTree): appending the WebVTT rendering tree after its children have been marked properly.
      * html/track/TextTrackCue.h:
      (TextTrackCue):
      
      LayoutTests:
      
      * media/track/captions-webvtt/styling-lifetime.vtt: Added.
      * media/track/track-css-cue-lifetime-expected.txt: Added.
      * media/track/track-css-cue-lifetime.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f330b37
  16. 07 Jan, 2013 1 commit
    • victor@rosedu.org's avatar
      [Track] Rendering crash · 5d76638a
      victor@rosedu.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106199
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      The browser is crashing if a text track is added through JavaScript,
      due to the fact that the containing block is not marked as inline at
      the time RenderTextTrackCue::layout() is called. The fix consists
      of ensuring that the pseudo id is set, even if the track isn't
      yet visible.
      
      Test: media/track/track-cue-inline-assertion-crash.html
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::updateDisplayTree): The pseudo-id should
      be set when the display tree is generated.
      (WebCore::TextTrackCue::getDisplayTree): Added extra check to not
      do unneccessary logic if the track will never be displayed.
      
      LayoutTests:
      
      * media/track/track-cue-inline-assertion-crash-expected.txt: Added.
      * media/track/track-cue-inline-assertion-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d76638a
  17. 04 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Implement :future pseudo class for the WebVTT ::cue pseudo element · 324b0985
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105473
      
      Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-04
      Reviewed by Antti Koivisto.
      
      Source/WebCore:
      
      This patch changes the approach of showing past/future node objects.
      Before upper-level containers were used to put past and future nodes inside. Styles were applied
      to containers. Now styles could be applied directly to nodes by using ::cue(:future).
      That allows to style future/past WebVTT nodes even if they are nested.
      
      Existing test was modified to cover new cases.
      
      * css/CSSSelector.cpp: added :future pseudo class support.
      (WebCore::CSSSelector::pseudoId):
      (WebCore::nameToPseudoTypeMap):
      (WebCore::CSSSelector::extractPseudoType):
      * css/CSSSelector.h:
      * css/SelectorChecker.cpp: ditto.
      (WebCore::SelectorChecker::checkOneSelector):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::canShareStyleWithElement): define style sharing rules for WebVTT objects.
      * css/mediaControls.css:
      (video::-webkit-media-text-track-all-nodes):
      (video::cue(:future)): added standard user-agent styles for the future nodes.
      * dom/Element.cpp: setter functions don't have an argument now because WebVTT type enum was introduced and the right type is set
      when the setter is being called.
      (WebCore::Element::setIsWebVTTNode):
      (WebCore):
      (WebCore::Element::isWebVTTFutureNode):
      (WebCore::Element::setIsWebVTTFutureNode):
      * dom/Element.h:
      (Element):
      * dom/ElementRareData.h:
      (ElementRareData):
      * dom/NodeRareData.cpp:
      (SameSizeAsNodeRareData): added a dummy enum value. Enum is integer type and is aligned in Windows when placed in the bitfield,
      so it takes more space.
      * dom/NodeRareData.h:
      (WebCore::NodeRareData::NodeRareData):
      (WebCore::NodeRareData::isWebVTTNode):
      (WebCore::NodeRareData::setIsWebVTTNode):
      (WebCore::NodeRareData::isWebVTTFutureNode):
      (WebCore::NodeRareData::setIsWebVTTFutureNode):
      (NodeRareData):
      * html/shadow/MediaControlElements.cpp:
      (WebCore):
      * html/track/TextTrack.h: add a WebVTT node object type enum.
      (TextTrack):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::allNodesShadowPseudoId):
      (WebCore::TextTrackCue::TextTrackCue):
      (WebCore::TextTrackCue::getCueAsHTML):
      (WebCore):
      (WebCore::TextTrackCue::setNodeObjectFlags): determine if the node is future or past and mark as WebVTT node.
      This combines the functionality related to marking nodes implemented before in updateDisplayTree and
      markNodesAsWebVTTNodes.
      (WebCore::TextTrackCue::updateDisplayTree):
      (WebCore::TextTrackCue::getDisplayTree):
      * html/track/TextTrackCue.h:
      (TextTrackCue):
      * html/track/WebVTTParser.cpp:
      (WebCore::WebVTTParser::constructTreeFromToken): no need to mark nodes as WebVTT nodes when parsing. This is done at the
      rendering stage later.
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): the container name has changed.
      
      LayoutTests:
      
      Modified the track css matching test to cover :future pseudo-class case.
      
      * media/track/captions-webvtt/captions-inner-timestamps.vtt: Removed.
      * media/track/captions-webvtt/styling.vtt:
      * media/track/track-css-matching-expected.txt:
      * media/track/track-css-matching.html:
      * media/track/track-cue-rendering-inner-timestamps-expected.txt: Removed.
      * media/track/track-cue-rendering-inner-timestamps.html: The test was removed because it was based on the old
      future/past nodes rendering logic.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      324b0985
  18. 02 Jan, 2013 1 commit
    • esprehn@chromium.org's avatar
      Clean up dispatchEvent overrides and overloads · f53e9e37
      esprehn@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105959
      
      Reviewed by Adam Barth.
      
      Add OVERRIDE to all dispatchEvent overrides and use "using" instead of
      reimplementing EventTarget::dispatchEvent in subclasses where having the
      virtual override of dispatchEvent hides the overloads in
      the superclass.
      
      No new tests, just refactoring.
      
      * Modules/indexeddb/IDBDatabase.h:
      (IDBDatabase):
      * Modules/indexeddb/IDBOpenDBRequest.h:
      (IDBOpenDBRequest):
      * Modules/indexeddb/IDBRequest.h:
      (IDBRequest):
      * Modules/indexeddb/IDBTransaction.h:
      (IDBTransaction):
      * dom/EventDispatchMediator.h:
      (FocusEventDispatchMediator):
      (BlurEventDispatchMediator):
      * dom/GestureEvent.h:
      (GestureEventDispatchMediator):
      * dom/KeyboardEvent.h:
      (KeyboardEventDispatchMediator):
      * dom/MouseEvent.h:
      * dom/Node.h:
      (Node):
      * dom/UIEvent.h:
      (FocusInEventDispatchMediator):
      (FocusOutEventDispatchMediator):
      * dom/WheelEvent.h:
      (WheelEventDispatchMediator):
      * html/HTMLMediaElement.h:
      * html/track/TextTrackCue.cpp:
      * html/track/TextTrackCue.h:
      (TextTrackCue):
      * page/DOMWindow.h:
      (DOMWindow):
      * svg/SVGElementInstance.h:
      (SVGElementInstance):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f53e9e37
  19. 18 Dec, 2012 1 commit
    • eric.carlson@apple.com's avatar
      Add in-band text track cues only once · 41d49216
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104593
      
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      Test: media/track/track-in-band-cues-added-once.html
      
      * html/track/InbandTextTrack.cpp:
      (WebCore::InbandTextTrack::hasCue): New.
      * html/track/InbandTextTrack.h:
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::setCueSettings): Remember the raw cue settings so they can be accessed later.
      * html/track/TextTrackCue.h:
      
      * platform/graphics/InbandTextTrackPrivateClient.h: Declare hasCue.
      
      * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
      (WebCore::InbandTextTrackPrivateAVF::processCue): Early return if m_player has been cleared.
      (WebCore::InbandTextTrackPrivateAVF::setMode): Ditto.
      
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      (WebCore::MediaPlayerPrivateAVFoundation::seek): Clear the partially accumulated cue when the seek
          starts, not when it completes.
      (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
      (WebCore::MediaPlayerPrivateAVFoundation::flushCurrentCue): Don't add a cue if it is already in the
          text track cue list.
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::clearTextTracks): Drive-by cleanup, clear the track list completely.
      
      LayoutTests:
      
      Test to ensure that in-band text track cues are not added to the the cue list more than once.
      
      * media/track/track-in-band-cues-added-once-expected.txt: Added.
      * media/track/track-in-band-cues-added-once.html: Added.
      * platform/chromium/TestExpectations:
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41d49216
  20. 17 Dec, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Implement matching cue by the class name with ::cue pseudo element · 7db073db
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104191
      
      Patch by Dima Gorbik <dgorbik@apple.com> on 2012-12-17
      Reviewed by Antti Koivisto.
      
      Source/WebCore:
      
      Implemented the ::cue() pseudo-element with an argument that may hold a simple selector list.
      This enables matching cue objects by the class name.
      
      Test: media/track/track-css-matching.html
      
      * css/CSSGrammar.y.in: support parsing the ::cue() with an argument.
      * css/CSSParser.cpp:
      (WebCore::CSSParser::detectFunctionTypeToken): tokenize the 'cue'.
      (WebCore::CSSParser::updateSpecifiersWithElementName): do not set the tag for the cue pseudo-element because
      the ::cue may match elements with different tags.
      (WebCore::CSSParser::updateSpecifiers): the behavior for the PseudoCue selector should be same as for
      unknown pseudo elements - the pseudo-element should stay on top of the selector chain.
      * css/CSSSelector.cpp: added the type detection for the new selector.
      (WebCore::CSSSelector::pseudoId):
      (WebCore::nameToPseudoTypeMap):
      (WebCore::CSSSelector::extractPseudoType):
      * css/CSSSelector.h:
      * css/RuleSet.cpp: add a new list to hold all the rulesets for the new pseudo element.
      (WebCore::RuleSet::reportMemoryUsage):
      (WebCore::RuleSet::addRule):
      (WebCore::RuleSet::shrinkToFit):
      * css/RuleSet.h:
      (RuleSet):
      (WebCore::RuleSet::cuePseudoRules):
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::checkOneSelector):
      * css/SelectorChecker.h:
      (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRules):
      * dom/Element.cpp: an addition to the rare data to be able to find out if the node is a webvtt node.
      (WebCore):
      (WebCore::Element::isWebVTTNode):
      (WebCore::Element::setIsWebVTTNode):
      (WebCore::Element::cloneDataFromElement):
      * dom/Element.h:
      (Element):
      * dom/ElementRareData.h:
      (ElementRareData):
      * dom/NodeRareData.h:
      (WebCore::NodeRareData::NodeRareData):
      (NodeRareData):
      (WebCore::NodeRareData::isWebVTTNode):
      (WebCore::NodeRareData::setIsWebVTTNode):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::markNodesAsWebVTTNodes): mark the cloned nodes as WebVTT nodes.
      (WebCore):
      (WebCore::TextTrackCue::getCueAsHTML):
      * html/track/TextTrackCue.h:
      (TextTrackCue):
      * html/track/WebVTTParser.cpp:
      (WebCore::WebVTTParser::constructTreeFromToken):
      * rendering/style/RenderStyleConstants.h:
      
      LayoutTests:
      
      Verify that ::cue pseudo-element accepts a simple-selector list that matches cue objects by the a class.
      
      * media/track/captions-webvtt/styling.vtt:
      * media/track/track-css-matching-expected.txt: Added.
      * media/track/track-css-matching.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7db073db
  21. 05 Dec, 2012 1 commit
    • commit-queue@webkit.org's avatar
      TextTrackCue's .endTime property should fire a TypeError when NaN is assigned · a0b41da6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103413
      
      Patch by Antoine Quint <graouts@apple.com> on 2012-12-05
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Check whether the new time passed to setStartTime() and setEndTime() is none of NaN or Infinity,
      otherwise throwing a TypeError.
      
      Thanks to this fix, we're no longer skipping media/track/opera/interfaces/TextTrackCue/endTime.html and
      media/track/opera/interfaces/TextTrackCue/startTime.html.
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::setStartTime):
      (WebCore::TextTrackCue::setEndTime):
      * html/track/TextTrackCue.h:
      (TextTrackCue):
      * html/track/TextTrackCue.idl:
      
      LayoutTests:
      
      Stop skipping two tests that now have new passing conditions, only held back from
      passing altogether by https://bugs.webkit.org/show_bug.cgi?id=103258.
      
      * media/track/opera/interfaces/TextTrackCue/endTime-expected.txt: Added.
      * media/track/opera/interfaces/TextTrackCue/startTime-expected.txt: Added.
      * platform/chromium/TestExpectations:
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0b41da6
  22. 15 Nov, 2012 1 commit
    • eric.carlson@apple.com's avatar
      Update computed line position algorithm · a213101e
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=93779
      
      Reviewed by Philippe Normand.
      
      Compute the position of a text track relative to rendered tracks. This is needed to position
      cues correctly when there is more than one text track.
      
      Source/WebCore: 
      
      Test: media/track/track-cue-container-rendering-position.html
      
      * html/track/TextTrack.cpp:
      (WebCore::TextTrack::invalidateTrackIndex): Invalidate both cached track indices.
      (WebCore::TextTrack::trackIndexRelativeToRenderedTracks): Return the index of the track relative
          to other rendered tracks.
      * html/track/TextTrack.h:
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::calculateComputedLinePosition): Use trackIndexRelativeToRenderedTracks()
          instead of trackIndex() so cues are positioned correctly.
      
      * html/track/TextTrackList.cpp:
      (TextTrackList::getTrackIndex): Change return type from unsigned to int.
      (TextTrackList::getTrackIndexRelativeToRenderedTracks): New.
      * html/track/TextTrackList.h:
      
      LayoutTests: 
      
      * media/track/track-cue-container-rendering-position-expected.txt: Added.
      * media/track/track-cue-container-rendering-position.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a213101e
  23. 09 Nov, 2012 1 commit
  24. 08 Nov, 2012 1 commit
    • benjamin@webkit.org's avatar
      Improve the use of AtomicString with literals · dbf9529b
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101298
      
      Reviewed by Darin Adler.
      
      Fix a bunch of cases of AtomicString with literals:
      -Do not create temporary AtomicString to perform a comparison, that is very wasteful.
      -Use the ConstructFromLiteral constructor whenever it makes sense.
      -Make "x-frame-options" static instead of creating it for each response.
      -Use ASCIILiteral() instead of AtomicString() in EventHandler, the function takes a String,
       not an AtomicString.
      
      * Modules/battery/BatteryController.cpp:
      (WebCore::BatteryController::supplementName):
      * Modules/battery/NavigatorBattery.cpp:
      (WebCore::NavigatorBattery::from):
      * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp:
      (WebCore::DraggedIsolatedFileSystem::supplementName):
      * Modules/gamepad/NavigatorGamepad.cpp:
      (WebCore::NavigatorGamepad::from):
      * Modules/geolocation/GeolocationController.cpp:
      (WebCore::GeolocationController::supplementName):
      * Modules/geolocation/NavigatorGeolocation.cpp:
      (WebCore::NavigatorGeolocation::from):
      * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
      (WebCore::DOMWindowIndexedDatabase::from):
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::directionNext):
      (WebCore::IDBCursor::directionNextUnique):
      (WebCore::IDBCursor::directionPrev):
      (WebCore::IDBCursor::directionPrevUnique):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::readyState):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::modeReadOnly):
      (WebCore::IDBTransaction::modeReadWrite):
      (WebCore::IDBTransaction::modeVersionChange):
      (WebCore::IDBTransaction::modeReadOnlyLegacy):
      (WebCore::IDBTransaction::modeReadWriteLegacy):
      * Modules/indexeddb/PageGroupIndexedDatabase.cpp:
      (WebCore::PageGroupIndexedDatabase::from):
      * Modules/intents/DOMWindowIntents.cpp:
      (WebCore::DOMWindowIntents::from):
      * Modules/mediastream/UserMediaController.cpp:
      (WebCore::UserMediaController::supplementName):
      * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
      (WebCore::NavigatorContentUtils::supplementName):
      * Modules/networkinfo/NavigatorNetworkInfoConnection.cpp:
      (WebCore::NavigatorNetworkInfoConnection::from):
      * Modules/networkinfo/NetworkInfoController.cpp:
      (WebCore::NetworkInfoController::supplementName):
      * Modules/notifications/DOMWindowNotifications.cpp:
      (WebCore::DOMWindowNotifications::from):
      * Modules/notifications/NotificationController.cpp:
      (WebCore::NotificationController::supplementName):
      * Modules/quota/DOMWindowQuota.cpp:
      (WebCore::DOMWindowQuota::from):
      * Modules/speech/SpeechRecognitionController.cpp:
      (WebCore::SpeechRecognitionController::supplementName):
      * Modules/vibration/Vibration.cpp:
      (WebCore::Vibration::supplementName):
      * accessibility/AccessibilityObject.cpp:
      (WebCore::AccessibilityObject::invalidStatus):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::ariaLiveRegionStatus):
      (WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant):
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      (WebCore::V8DOMWindow::namedSecurityCheck):
      * bindings/v8/custom/V8NodeListCustom.cpp:
      (WebCore::V8NodeList::namedPropertyGetter):
      * dom/ContextFeatures.cpp:
      (WebCore::ContextFeatures::supplementName):
      * dom/DeviceMotionController.cpp:
      (WebCore::DeviceMotionController::supplementName):
      * dom/DeviceOrientationController.cpp:
      (WebCore::DeviceOrientationController::supplementName):
      * dom/Element.cpp:
      (WebCore::Element::webkitRegionOverset):
      * dom/MutationRecord.cpp:
      * html/FileInputType.cpp:
      (WebCore::UploadButtonElement::shadowPseudoId):
      * html/FormController.cpp:
      (WebCore::SavedFormState::getReferencedFilePaths):
      (WebCore::FormKeyGenerator::formKey):
      * html/HTMLButtonElement.cpp:
      (WebCore::HTMLButtonElement::formControlType):
      * html/HTMLDetailsElement.cpp:
      (WebCore::summaryQuerySelector):
      * html/HTMLFieldSetElement.cpp:
      (WebCore::HTMLFieldSetElement::formControlType):
      * html/HTMLKeygenElement.cpp:
      (WebCore::KeygenSelectElement::shadowPseudoId):
      (WebCore::HTMLKeygenElement::formControlType):
      * html/HTMLOptGroupElement.cpp:
      (WebCore::HTMLOptGroupElement::formControlType):
      * html/HTMLOutputElement.cpp:
      (WebCore::HTMLOutputElement::formControlType):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::formControlType):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::formControlType):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::directionString):
      * html/shadow/DateTimeEditElement.cpp:
      (WebCore::DateTimeEditElement::DateTimeEditElement):
      * html/shadow/DateTimeFieldElements.cpp:
      (WebCore::DateTimeAMPMFieldElement::create):
      (WebCore::DateTimeDayFieldElement::create):
      (WebCore::DateTimeHourFieldElement::create):
      (WebCore::DateTimeMillisecondFieldElement::create):
      (WebCore::DateTimeMinuteFieldElement::create):
      (WebCore::DateTimeMonthFieldElement::create):
      (WebCore::DateTimeSecondFieldElement::create):
      (WebCore::DateTimeSymbolicMonthFieldElement::create):
      (WebCore::DateTimeWeekFieldElement::create):
      (WebCore::DateTimeYearFieldElement::create):
      * html/shadow/DetailsMarkerControl.cpp:
      (WebCore::DetailsMarkerControl::shadowPseudoId):
      * html/shadow/ImageInnerElement.cpp:
      (WebCore::ImageInnerElement::shadowPseudoId):
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlPanelElement::shadowPseudoId):
      (WebCore::MediaControlTimelineContainerElement::shadowPseudoId):
      (WebCore::MediaControlVolumeSliderContainerElement::shadowPseudoId):
      (WebCore::MediaControlStatusDisplayElement::shadowPseudoId):
      (WebCore::MediaControlPanelMuteButtonElement::shadowPseudoId):
      (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId):
      (WebCore::MediaControlPlayButtonElement::shadowPseudoId):
      (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId):
      (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId):
      (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId):
      (WebCore::MediaControlRewindButtonElement::shadowPseudoId):
      (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId):
      (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId):
      (WebCore::MediaControlTimelineElement::shadowPseudoId):
      (WebCore::MediaControlVolumeSliderElement::shadowPseudoId):
      (WebCore::MediaControlFullscreenVolumeSliderElement::shadowPseudoId):
      (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId):
      (WebCore::MediaControlFullscreenVolumeMinButtonElement::shadowPseudoId):
      (WebCore::MediaControlFullscreenVolumeMaxButtonElement::shadowPseudoId):
      (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId):
      (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId):
      (WebCore::MediaControlTextTrackContainerElement::shadowPseudoId):
      * html/shadow/MediaControlRootElement.cpp:
      (WebCore::MediaControlRootElement::shadowPseudoId):
      * html/shadow/MediaControlRootElementChromium.cpp:
      (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId):
      (WebCore::MediaControlRootElementChromium::shadowPseudoId):
      * html/shadow/MediaControlRootElementChromiumAndroid.cpp:
      (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId):
      * html/shadow/MeterShadowElement.cpp:
      (WebCore::MeterInnerElement::shadowPseudoId):
      (WebCore::MeterBarElement::shadowPseudoId):
      (WebCore::MeterValueElement::shadowPseudoId):
      * html/shadow/ProgressShadowElement.cpp:
      (WebCore::ProgressInnerElement::shadowPseudoId):
      (WebCore::ProgressBarElement::shadowPseudoId):
      (WebCore::ProgressValueElement::shadowPseudoId):
      * html/shadow/SliderThumbElement.cpp:
      (WebCore::sliderThumbShadowPseudoId):
      (WebCore::mediaSliderThumbShadowPseudoId):
      (WebCore::SliderContainerElement::shadowPseudoId):
      * html/shadow/SpinButtonElement.cpp:
      (WebCore::SpinButtonElement::shadowPseudoId):
      * html/shadow/TextControlInnerElements.cpp:
      (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
      (WebCore::SearchFieldCancelButtonElement::shadowPseudoId):
      (WebCore::InputFieldSpeechButtonElement::shadowPseudoId):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId):
      * loader/CrossOriginAccessControl.cpp:
      (WebCore::passesAccessControlCheck):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::didReceiveResponse):
      * loader/PrerendererClient.cpp:
      (WebCore::PrerendererClient::supplementName):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::updateResponseAfterRevalidation):
      * page/DOMWindowPagePopup.cpp:
      (WebCore::DOMWindowPagePopup::supplementName):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handlePasteGlobalSelection):
      (WebCore::focusDirectionForKey):
      * page/SpeechInput.cpp:
      (WebCore::SpeechInput::supplementName):
      * page/animation/CompositeAnimation.cpp:
      (WebCore::CompositeAnimation::updateKeyframeAnimations):
      * platform/graphics/FontCache.cpp:
      (WebCore::alternateFamilyName):
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::applicationOctetStream):
      (WebCore::textPlain):
      (WebCore::codecs):
      * platform/graphics/chromium/FontCacheAndroid.cpp:
      (WebCore::FontCache::getLastResortFallbackFont):
      * platform/graphics/filters/SourceAlpha.cpp:
      (WebCore::SourceAlpha::effectName):
      * platform/graphics/filters/SourceGraphic.cpp:
      (WebCore::SourceGraphic::effectName):
      * platform/graphics/mac/FontCacheMac.mm:
      (WebCore::FontCache::getSimilarFontPlatformData):
      (WebCore::FontCache::getLastResortFallbackFont):
      * platform/graphics/skia/FontCacheSkia.cpp:
      (WebCore::FontCache::getLastResortFallbackFont):
      * platform/graphics/win/FontCacheWin.cpp:
      (WebCore::FontCache::getLastResortFallbackFont):
      * platform/graphics/wx/FontCacheWx.cpp:
      (WebCore::FontCache::getSimilarFontPlatformData):
      * platform/network/ResourceResponseBase.cpp:
      (WebCore::ResourceResponseBase::setHTTPHeaderField):
      (WebCore::ResourceResponseBase::parseCacheControlDirectives):
      (WebCore::ResourceResponseBase::hasCacheValidatorFields):
      (WebCore::ResourceResponseBase::date):
      (WebCore::ResourceResponseBase::age):
      (WebCore::ResourceResponseBase::expires):
      (WebCore::ResourceResponseBase::lastModified):
      (WebCore::ResourceResponseBase::isAttachment):
      * rendering/RenderTextControlMultiLine.cpp:
      (WebCore::RenderTextControlMultiLine::getAvgCharWidth):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::getAvgCharWidth):
      (WebCore::RenderTextControlSingleLine::preferredContentWidth):
      * svg/SVGAnimateColorElement.cpp:
      (WebCore::attributeValueIsCurrentColor):
      * svg/SVGAnimateMotionElement.cpp:
      (WebCore::SVGAnimateMotionElement::rotateMode):
      * svg/SVGAnimationElement.cpp:
      (WebCore::SVGAnimationElement::setCalcMode):
      (WebCore::SVGAnimationElement::setAttributeType):
      (WebCore::SVGAnimationElement::isAdditive):
      (WebCore::SVGAnimationElement::isAccumulated):
      (WebCore::inheritsFromProperty):
      * svg/SVGFEConvolveMatrixElement.cpp:
      (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier):
      (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier):
      (WebCore::SVGFEConvolveMatrixElement::orderXIdentifier):
      (WebCore::SVGFEConvolveMatrixElement::orderYIdentifier):
      * svg/SVGFEDiffuseLightingElement.cpp:
      (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier):
      (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier):
      * svg/SVGFEDropShadowElement.cpp:
      (WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
      (WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
      * svg/SVGFEGaussianBlurElement.cpp:
      (WebCore::SVGFEGaussianBlurElement::stdDeviationXIdentifier):
      (WebCore::SVGFEGaussianBlurElement::stdDeviationYIdentifier):
      * svg/SVGFEMorphologyElement.cpp:
      (WebCore::SVGFEMorphologyElement::radiusXIdentifier):
      (WebCore::SVGFEMorphologyElement::radiusYIdentifier):
      * svg/SVGFESpecularLightingElement.cpp:
      (WebCore::SVGFESpecularLightingElement::kernelUnitLengthXIdentifier):
      (WebCore::SVGFESpecularLightingElement::kernelUnitLengthYIdentifier):
      * svg/SVGFETurbulenceElement.cpp:
      (WebCore::SVGFETurbulenceElement::baseFrequencyXIdentifier):
      (WebCore::SVGFETurbulenceElement::baseFrequencyYIdentifier):
      * svg/SVGFilterElement.cpp:
      (WebCore::SVGFilterElement::filterResXIdentifier):
      (WebCore::SVGFilterElement::filterResYIdentifier):
      * svg/SVGLangSpace.cpp:
      (WebCore::SVGLangSpace::xmlspace):
      (WebCore::SVGLangSpace::addSupportedAttributes):
      * svg/SVGMarkerElement.cpp:
      (WebCore::SVGMarkerElement::orientTypeIdentifier):
      (WebCore::SVGMarkerElement::orientAngleIdentifier):
      (WebCore::SVGMarkerElement::synchronizeOrientType):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::contentScriptType):
      (WebCore::SVGSVGElement::contentStyleType):
      * svg/SVGStyleElement.cpp:
      (WebCore::SVGStyleElement::type):
      (WebCore::SVGStyleElement::media):
      * svg/SVGTextContentElement.cpp:
      (WebCore::SVGTextContentElement::collectStyleForAttribute):
      * svg/SVGViewSpec.cpp:
      (WebCore::SVGViewSpec::viewBoxIdentifier):
      (WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
      (WebCore::SVGViewSpec::transformIdentifier):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::parseClockValue):
      (WebCore::SVGSMILElement::restart):
      (WebCore::SVGSMILElement::fill):
      (WebCore::SVGSMILElement::repeatCount):
      * testing/InternalSettings.cpp:
      (WebCore::InternalSettings::from):
      * xml/parser/XMLTreeBuilder.cpp:
      (WebCore::XMLTreeBuilder::processDOCTYPE):
      (WebCore::XMLTreeBuilder::processXMLEntity):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dbf9529b
  25. 07 Nov, 2012 3 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r133841. · 5dd41a3c
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/133841
      https://bugs.webkit.org/show_bug.cgi?id=101542
      
      Reverted patches were innocent (Requested by shinyak on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-07
      
      .:
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * dom/Element.cpp:
      (WebCore::Element::shadowPseudoId):
      * dom/Element.h:
      (Element):
      * dom/ElementRareData.cpp:
      (WebCore::ElementRareData::reportMemoryUsage):
      * dom/ElementRareData.h:
      (ElementRareData):
      * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
      * html/ColorInputType.cpp:
      (WebCore::ColorInputType::createShadowSubtree):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::updatePlaceholderText):
      * html/RangeInputType.cpp:
      (WebCore::RangeInputType::createShadowSubtree):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::createShadowSubtree):
      (WebCore::TextFieldInputType::updatePlaceholderText):
      * html/ValidationMessage.cpp:
      (WebCore::ValidationMessage::buildBubbleTree):
      * html/shadow/DateTimeEditElement.cpp:
      (WebCore::DateTimeEditBuilder::visitLiteral):
      (WebCore::DateTimeEditElement::DateTimeEditElement):
      * html/shadow/DateTimeFieldElement.cpp:
      (WebCore::DateTimeFieldElement::initialize):
      * html/shadow/DateTimeFieldElement.h:
      (DateTimeFieldElement):
      * html/shadow/PickerIndicatorElement.cpp:
      (WebCore::PickerIndicatorElement::PickerIndicatorElement):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::TextTrackCueBox):
      (WebCore::TextTrackCue::updateDisplayTree):
      * testing/Internals.cpp:
      (WebCore::Internals::setShadowPseudoId):
      
      Source/WebKit2:
      
      * win/WebKit2.def:
      * win/WebKit2CFLite.def:
      
      LayoutTests:
      
      * fast/dom/shadow/styling-pseudo-attribute-expected.html: Added.
      * fast/dom/shadow/styling-pseudo-attribute.html: Added.
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5dd41a3c
    • shinyak@chromium.org's avatar
      Unreviewed, rolling out r133428 and r133749 · 9498da9d
      shinyak@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101533
      
      These patches might cause memory regression.
      
      .:
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * dom/Element.cpp:
      (WebCore::Element::shadowPseudoId):
      (WebCore):
      (WebCore::Element::setShadowPseudoId):
      * dom/Element.h:
      (Element):
      * dom/ElementRareData.cpp:
      (WebCore::ElementRareData::reportMemoryUsage):
      * dom/ElementRareData.h:
      (ElementRareData):
      * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
      * html/ColorInputType.cpp:
      (WebCore::ColorInputType::createShadowSubtree):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::updatePlaceholderText):
      * html/RangeInputType.cpp:
      (WebCore::RangeInputType::createShadowSubtree):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::createShadowSubtree):
      (WebCore::TextFieldInputType::updatePlaceholderText):
      * html/ValidationMessage.cpp:
      (WebCore::ValidationMessage::buildBubbleTree):
      * html/shadow/DateTimeEditElement.cpp:
      (WebCore::DateTimeEditBuilder::visitLiteral):
      (WebCore::DateTimeEditElement::DateTimeEditElement):
      * html/shadow/DateTimeFieldElement.cpp:
      (WebCore::DateTimeFieldElement::initialize):
      * html/shadow/DateTimeFieldElement.h:
      (DateTimeFieldElement):
      * html/shadow/PickerIndicatorElement.cpp:
      (WebCore::PickerIndicatorElement::PickerIndicatorElement):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::TextTrackCueBox):
      (WebCore::TextTrackCue::updateDisplayTree):
      * testing/Internals.cpp:
      (WebCore::Internals::setShadowPseudoId):
      
      Source/WebKit2:
      
      * win/WebKit2.def:
      * win/WebKit2CFLite.def:
      
      LayoutTests:
      
      * fast/dom/shadow/styling-pseudo-attribute-expected.html: Removed.
      * fast/dom/shadow/styling-pseudo-attribute.html: Removed.
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9498da9d
    • shinyak@chromium.org's avatar
      [Shadow] Use setPseudo() instead of setShadowPseudoId(). · 7f13d06b
      shinyak@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101306
      
      Reviewed by Kent Tamura.
      
      .:
      
      Exposes necessary symbols.
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      We would like to remove setShadowPseudoId() and use setPseudo() instead, since ShadowDOM spec now has
      'pseudo' attribute.
      
      We change all setShadowPseudoId() invocation to setPseudo() invocation. Also, when AtomicString is not
      constructed with AtomicStringFromLiteral, we use it.
      
      No new tests, refactoring.
      
      * WebCore.exp.in:
      * dom/Element.cpp:
      * dom/Element.h:
      (Element):
      * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
      * html/ColorInputType.cpp:
      (WebCore::ColorInputType::createShadowSubtree):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::updatePlaceholderText):
      * html/RangeInputType.cpp:
      (WebCore::RangeInputType::createShadowSubtree):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::createShadowSubtree):
      (WebCore::TextFieldInputType::updatePlaceholderText):
      * html/ValidationMessage.cpp:
      (WebCore::ValidationMessage::buildBubbleTree):
      * html/shadow/DateTimeEditElement.cpp:
      (WebCore::DateTimeEditBuilder::visitLiteral):
      (WebCore::DateTimeEditElement::DateTimeEditElement):
      * html/shadow/DateTimeFieldElement.cpp:
      (WebCore::DateTimeFieldElement::initialize):
      * html/shadow/DateTimeFieldElement.h:
      (DateTimeFieldElement):
      * html/shadow/PickerIndicatorElement.cpp:
      (WebCore::PickerIndicatorElement::PickerIndicatorElement):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::TextTrackCueBox):
      (WebCore::TextTrackCue::updateDisplayTree):
      * testing/Internals.cpp:
      (WebCore::Internals::setShadowPseudoId):
      
      Source/WebKit2:
      
      Exposes necessary symbols.
      
      * win/WebKit2.def:
      * win/WebKit2CFLite.def:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f13d06b
  26. 26 Oct, 2012 1 commit
  27. 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
  28. 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
  29. 24 Sep, 2012 1 commit
    • arv@chromium.org's avatar
      DOM4 remove method · 8b0430f0
      arv@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=73885
      
      Reviewed by Ojan Vafai.
      
      This adds the DOM 4 remove method.
      
      http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-childnode-remove
      
      The remove method removes the node from its parent if it has a parent.
      
      Source/WebCore:
      
      Tests: fast/dom/Comment/remove.html
             fast/dom/DocumentType/remove.html
             fast/dom/Element/remove.html
             fast/dom/Text/remove.html
      
      * dom/CharacterData.idl:
      * dom/DocumentType.idl:
      * dom/Element.idl:
      * dom/Node.cpp:
      (WebCore::Node::remove): The spec says to do nothing if the node has no parent.
      * html/parser/HTMLTreeBuilder.cpp:
      (WebCore::HTMLTreeBuilder::processStartTagForInBody): Cleanup.
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::removeDisplayTree): No need to check parenNode twice.
      
      LayoutTests:
      
      * fast/dom/Comment/remove-expected.txt: Added.
      * fast/dom/Comment/remove.html: Added.
      * fast/dom/DocumentType/remove-expected.txt: Added.
      * fast/dom/DocumentType/remove.html: Added.
      * fast/dom/Element/remove-expected.txt: Added.
      * fast/dom/Element/remove.html: Added.
      * fast/dom/Text/remove-expected.txt: Added.
      * fast/dom/Text/remove.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8b0430f0
  30. 30 Aug, 2012 1 commit
  31. 29 Aug, 2012 1 commit
    • abarth@webkit.org's avatar
      Convert more static Strings to use ASCIILiteral · b1e7d635
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=95313
      
      Reviewed by Eric Seidel.
      
      This patch converts another swath of static strings to use ASCIILiteral
      as recommended by http://trac.webkit.org/wiki/EfficientStrings.
      
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::openKeyword):
      (WebCore):
      (WebCore::MediaSource::closedKeyword):
      (WebCore::MediaSource::endedKeyword):
      * Modules/mediasource/MediaSource.h:
      (MediaSource):
      * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
      (WebCore::customHandlersStateString):
      * Modules/notifications/Notification.cpp:
      (WebCore::Notification::permissionString):
      * accessibility/AccessibilityMediaControls.cpp:
      (WebCore::AccessibilityMediaControl::controlTypeName):
      (WebCore::AccessibilityMediaControl::title):
      (WebCore::AccessibilityMediaControlsContainer::elementTypeName):
      (WebCore::AccessibilityMediaTimeline::helpText):
      * bindings/js/JSInspectorFrontendHostCustom.cpp:
      (WebCore::JSInspectorFrontendHost::platform):
      (WebCore::JSInspectorFrontendHost::port):
      * bindings/js/ScriptEventListener.cpp:
      (WebCore::eventParameterName):
      * bindings/v8/ScriptEventListener.cpp:
      (WebCore::eventParameterName):
      * css/CSSWrapShapes.cpp:
      (WebCore::CSSWrapShapeRectangle::cssText):
      (WebCore::CSSWrapShapeCircle::cssText):
      (WebCore::CSSWrapShapeEllipse::cssText):
      (WebCore::CSSWrapShapePolygon::cssText):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::parseAuthorStyleSheet):
      * dom/Document.cpp:
      (WebCore::Document::readyState):
      * editing/MarkupAccumulator.cpp:
      (WebCore::appendCharactersReplacingEntities):
      * editing/markup.cpp:
      (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
      (WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
      (WebCore::StyledMarkupAccumulator::appendElement):
      (WebCore::createMarkup):
      * html/track/TextTrackCue.cpp:
      (WebCore::startKeyword):
      (WebCore::middleKeyword):
      (WebCore::endKeyword):
      (WebCore::verticalGrowingLeftKeyword):
      (WebCore::verticalGrowingRightKeyword):
      (WebCore::TextTrackCue::updateDisplayTree):
      (WebCore::TextTrackCue::settingName):
      * page/DiagnosticLoggingKeys.cpp:
      (WebCore::DiagnosticLoggingKeys::mediaLoadedKey):
      (WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey):
      (WebCore::DiagnosticLoggingKeys::pluginLoadedKey):
      (WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey):
      (WebCore::DiagnosticLoggingKeys::pageContainsPluginKey):
      (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey):
      (WebCore::DiagnosticLoggingKeys::passKey):
      (WebCore::DiagnosticLoggingKeys::failKey):
      (WebCore::DiagnosticLoggingKeys::noopKey):
      * page/PageVisibilityState.cpp:
      (WebCore::pageVisibilityStateString):
      * page/UserContentURLPattern.cpp:
      (WebCore::UserContentURLPattern::parse):
      * platform/KURLWTFURL.cpp:
      (WebCore::KURL::string):
      * platform/MIMETypeRegistry.cpp:
      (WebCore::defaultMIMEType):
      (WebCore::mimeTypeAssociationMap):
      * platform/network/ContentTypeParser.cpp:
      (WebCore::ContentTypeParser::parse):
      * platform/network/win/DownloadBundleWin.cpp:
      (WebCore::DownloadBundle::fileExtension):
      * storage/StorageTracker.cpp:
      (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
      * svg/SVGAnimatedBoolean.cpp:
      (WebCore::SVGAnimatedBooleanAnimator::constructFromString):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1e7d635
  32. 27 Aug, 2012 2 commits
    • 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
    • victor@rosedu.org's avatar
      Crash when trying to render empty cues · 306930f1
      victor@rosedu.org authored
      https://bugs.webkit.org/show_bug.cgi?id=94776
      
      Reviewed by Eric Carlson.
      
      Added extra safety checks.
      
      Source/WebCore:
      
      Test: media/track/track-cue-rendering-empty-cue-crash.html
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::getCueAsHTML):
      (WebCore::TextTrackCue::updateDisplayTree):
      
      LayoutTests:
      
      * media/track/track-cue-rendering-empty-cue-crash-expected.txt: Added.
      * media/track/track-cue-rendering-empty-cue-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      306930f1
  33. 22 Aug, 2012 1 commit
    • victor@rosedu.org's avatar
      Display a TextTrackCue when snap-to-lines flag is set · cf31d8fb
      victor@rosedu.org authored
      https://bugs.webkit.org/show_bug.cgi?id=79751
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      This patch implements rendering functionality for a given text track,
      following closer the exact WebVTT specification. There are two new classes
      which have been added in order to succesfully cover rendering when of a text
      track cue.
      
      RenderTextTrackCue handles the specific rendering algorithm required,
      by checking for overlaps with other boxes that are in the same
      container (these can be any other boxes, not necessarily other cues,
      the video controls, for example).
      
      TextTrackCueBox extends HTMLDivElement and is an intermediate layer
      between the renderer class and the actual cue object. Its purpose is
      to instantiate the particular renderer and cover all the default CSS
      styling that needs to be applied to the cue.
      
      The layout is done in two steps:
        - Step 1: Layout the TextTrackCue with default CSS properties set (this is
      the TextTrackCueBox decorated with the respective CSS elements)
        - Step 2: RenderTextTrackCue adjusts the box position depending on the
      parameters of the TextTrackCue object and the overlaps that may occur with
      previously positioned cues.
      
      Tests: media/track/track-cue-rendering-horizontal.html
             media/track/track-cue-rendering-vertical.html
      
      * CMakeLists.txt: Updated to include RenderTextTrackCue.
      * GNUmakefile.list.am: Updated to include RenderTextTrackCue.
      * Target.pri: Updated to include RenderTextTrackCue.
      * WebCore.gypi: Updated to include RenderTextTrackCue.
      * WebCore.vcproj/WebCore.vcproj: Updated to include RenderTextTrackCue.
      * WebCore.xcodeproj/project.pbxproj: Updated to include RenderTextTrackCue.
      * css/mediaControls.css: Removed unreliable CSS.
      (video::-webkit-media-text-track-display): Removed properties.
      * html/shadow/MediaControlElements.cpp: Updated to not use the new class.
      (RenderTextTrackContainerElement):
      (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Simplified
      the function by moving the check if track is rendered in TextTrack and used
      the TextTrackCueBox for cues.
      * html/track/TextTrack.cpp: Added a new method.
      (WebCore::TextTrack::isRendered): Method that returns whether the track should
      be rendered or not.
      (WebCore):
      * html/track/TextTrack.h: Added the isRendered method.
      (TextTrack):
      * html/track/TextTrackCue.cpp: Added several helper methods and
      the TextTrackCueBox.
      (WebCore):
      (WebCore::TextTrackCueBox::TextTrackCueBox): The TextTrackCueBox extends
      the HTMLDivElement and represents a bridge class between RenderTextTrackCue
      and TextTrackCue. This is required as the layout is done in two steps, as
      explained on top of the ChangeLog entry.
      (WebCore::TextTrackCueBox::getCue): Returns the associated TextTrackCue object.
      (WebCore::TextTrackCueBox::applyCSSProperties): Applies a part of the default CSS
      properties, as defined by section 3.5.1 of the WebVTT specification.
      (WebCore::TextTrackCueBox::shadowPseudoId): Moved the shadow pseudo id.
      (WebCore::TextTrackCueBox::createRenderer): Creates the particular renderer.
      (WebCore::TextTrackCue::TextTrackCue): Corrected the internal writing mode map.
      (WebCore::TextTrackCue::calculateComputedLinePosition): Updated the compute line
      position algorithm. This requires, however, a method to consider only rendered
      tracks (and therefore will be addressed completely in subsequent changeset).
      (WebCore::TextTrackCue::calculateDisplayParameters): Updated and corrected the
      computed display parameters to match the current specification.
      (WebCore::TextTrackCue::getDisplayTree): Update to use the TextTrackCueBox class
      and moved CSS application to the respective class.
      (WebCore::TextTrackCue::getPositionCoordinates): Added comment to specify in which
      situation this method is used and change visibility to private.
      (WebCore::TextTrackCue::getCSSWritingMode): Returns the CSS writing mode corresponding
      to the cue writing mode.
      (WebCore::TextTrackCue::getCSSSize): Returns the cue width / height (depending on the
      writing direction.
      (WebCore::TextTrackCue::getCSSPosition): Returns the default display position, that is
      used in the first layout step.
      * html/track/TextTrackCue.h:
      (WebCore):
      (TextTrackCueBox):
      (WebCore::TextTrackCueBox::create): Initialization method.
      (TextTrackCue):
      (WebCore::TextTrackCue::getWritingDirection): Helper method to return the internal
      values used to represent the writing direction.
      * rendering/RenderTextTrackCue.cpp: Added.
      (WebCore):
      (WebCore::RenderTextTrackCue::RenderTextTrackCue):
      (WebCore::RenderTextTrackCue::layout): The rendering steps, as mentioned in
      the WebVTT rendering rules. Currently, this treats only the snap-to-lines set
      case. It is implemented following closely the spec, and might be subject to
      change as discussions on various bugs evolve.
      (WebCore::RenderTextTrackCue::initializeLayoutParameters): Steps 1 - 7.
      (WebCore::RenderTextTrackCue::placeBoxInDefaultPosition): Steps 8 - 10.
      (WebCore::RenderTextTrackCue::isOutside): Inline method to check if the cue is outside.
      (WebCore::RenderTextTrackCue::isOverlapping): Inline method to check if the cue overlaps other boxes.
      (WebCore::RenderTextTrackCue::shouldSwitchDirection): Step 12.
      (WebCore::RenderTextTrackCue::moveBoxesByStep): Step 13.
      (WebCore::RenderTextTrackCue::switchDirection): Steps 15 - 18.
      (WebCore::RenderTextTrackCue::repositionCueSnapToLinesSet): Cue repositioning
      for text track cue when the snap to lines flag is set.
      (WebCore::RenderTextTrackCue::repositionCueSnapToLinesNotSet): Cue repositioning
      for text track cue when the snap to lines flag is not set. Not implemented yet.
      * rendering/RenderTextTrackCue.h: Added.
      (WebCore):
      (RenderTextTrackCue): Rendering class, handling the display of cues.
      
      LayoutTests:
      
      Test cases covering snap-to-lines horizontal and vertical positioning of cues.
      
      * media/track/captions-webvtt/captions-snap-to-lines-set.vtt: Added.
      * media/track/track-cue-rendering-horizontal.html: Added.
      * media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt: Updated.
      * media/track/track-cue-rendering-vertical.html: Added.
      * media/video-test.js: Updated to support pixel test dumps.
      * platform/chromium-linux/media/track/track-cue-rendering-horizontal-expected.png: Added.
      * platform/chromium-linux/media/track/track-cue-rendering-horizontal-expected.txt: Added.
      * platform/chromium-linux/media/track/track-cue-rendering-vertical-expected.png: Added.
      * platform/chromium-linux/media/track/track-cue-rendering-vertical-expected.txt: Added.
      * platform/chromium/TestExpectations: Marking these temporarily as IMAGE fail, as they will
      anyway require new baselines.
      * platform/mac/media/track/track-cue-rendering-horizontal-expected.png: Added.
      * platform/mac/media/track/track-cue-rendering-horizontal-expected.txt: Added.
      * platform/mac/media/track/track-cue-rendering-vertical-expected.png: Added.
      * platform/mac/media/track/track-cue-rendering-vertical-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf31d8fb