Cleaning errorDescriptionForValue after r154839
https://bugs.webkit.org/show_bug.cgi?id=120531

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-30
Reviewed by Darin Adler.

Changed the assert to ASSERT_NOT_REACHED, now that r154839 has landed. errorDescriptionForValue
can assert again that the parameterized JSValue is !isEmpty().

* runtime/ExceptionHelpers.cpp:
(JSC::errorDescriptionForValue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r154891.
http://trac.webkit.org/changeset/154891
https://bugs.webkit.org/show_bug.cgi?id=120539

broke the mac build (Requested by Ossy on #webkit).

Patch by Commit Queue <commit-queue@webkit.org> on 2013-08-30

* platform/network/SynchronousLoaderClient.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix CSS_VARIABLES and CSS_DEVICE_ADAPTATION builds.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::resolveVariables):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add USE(PROTECTION_SPACE_AUTH_CALLBACK) guards to canAuthenticateAgainstProtectionSpace()
https://bugs.webkit.org/show_bug.cgi?id=120351

Reviewed by Darin Adler.

* NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
* NetworkProcess/AsynchronousNetworkLoaderClient.h:
* NetworkProcess/NetworkLoaderClient.h:
* NetworkProcess/SynchronousNetworkLoaderClient.cpp:
* NetworkProcess/SynchronousNetworkLoaderClient.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SVG error parsing empty path
https://bugs.webkit.org/show_bug.cgi?id=78980

Reviewed by Darin Adler.

Source/WebCore:

According to the spec (http://www.w3.org/TR/SVG/paths.html#PathData), path 'd' attribute can be empty.
No error should be reported in this case.

* svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::parsePathDataFromSource):
* svg/SVGPathUtilities.cpp:
(WebCore::buildPathFromString):
(WebCore::buildSVGPathByteStreamFromSVGPathSegList):
(WebCore::buildPathFromByteStream):
(WebCore::buildSVGPathSegListFromByteStream):
(WebCore::buildStringFromByteStream):
(WebCore::buildStringFromSVGPathSegList):
(WebCore::buildSVGPathByteStreamFromString):
(WebCore::buildAnimatedSVGPathByteStream):
(WebCore::addToSVGPathByteStream):

LayoutTests:

Adapt fuzz-path-parser.html and dynamic-empty-path.svg to also test empty paths.
Adjust expectations to not expect an error message for empty paths.

* platform/gtk/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt:
* platform/gtk/svg/custom/dynamic-empty-path-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt:
* platform/qt/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt:
* platform/qt/svg/custom/dynamic-empty-path-expected.txt:
* svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt:
* svg/custom/dynamic-empty-path-expected.txt:
* svg/dom/fuzz-path-parser-expected.txt:
* svg/dom/fuzz-path-parser.html: also test empty path
* svg/dom/path-parser-expected.txt:
* svg/dom/script-tests/path-parser.js: also test empty path


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Only modify numbers if they are identified by CodeMirror as a number.

https://bugs.webkit.org/show_bug.cgi?id=120484

<rdar://problem/13877085> REGRESSION: Alt-up and Alt-down don't work when cursor is in unit
<rdar://problem/13058697> PARITY: Option-Up arrow in "translate3d" should not modify number to make" translate4d"

Reviewed by Joseph Pecoraro.

* UserInterface/CodeMirrorAdditions.js:
(CodeMirror.prototype.alterNumberInRange): Correctly preserve the selection, even if it differs from
the range passed in.
(alterNumber): Find number tokens and pass those to alterNumberInRange.
(alterNumber.findNumberToken): Added. Helper.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make incrementing and decrementing numbers by 0.1 require the control key, and not near zero numbers.

https://bugs.webkit.org/show_bug.cgi?id=120492
<rdar://problem/13738935> Incrementing and decrementing numbers near zero is annoying compared to earlier releases

Reviewed by Joseph Pecoraro.

* UserInterface/CodeMirrorAdditions.js:
(alterNumber): Remove near zero check.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] [WK2] TestWebKitWebView snapshot fails
https://bugs.webkit.org/show_bug.cgi?id=120404

Patch by Brian Holt <brian.holt@samsung.com> on 2013-08-30
Reviewed by Darin Adler.

Fixed the snapshot test failure caused by GTK no longer allowing
widgets to resize.  Instead, resize the WebView by resizing the
window and waiting for the event to complete asynchronously.

* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::resizeView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] No need for Pasteboard::getDataSelection
https://bugs.webkit.org/show_bug.cgi?id=120536

Reviewed by Anders Carlsson.

* editing/Editor.h: Added some Mac-only private member functions.

* editing/mac/EditorMac.mm:
(WebCore::Editor::selectionInWebArchiveFormat): Added.
(WebCore::Editor::adjustedSelectionRange): Added.
(WebCore::attributedStringForRange): Added.
(WebCore::dataInRTFDFormat): Added.
(WebCore::dataInRTFFormat): Added.
(WebCore::Editor::dataSelectionForPasteboard): Moved the implementation
of Pasteboard::getDataSelection here, refactoring to share code with the
writeSelectionToPasteboard function.
(WebCore::Editor::writeSelectionToPasteboard): Refactored to share code
with the new function above.

* platform/Pasteboard.h: Removed getDataSelection. One less layering violation.
* platform/mac/PasteboardMac.mm: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Document style resolve should take Document&.
<https://webkit.org/b/120534>

Reviewed by Darin Adler.

Tweak Style::resolveTree(Document*) and Style::resolveForDocument(Document*) to take Document& instead.

* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveForDocument.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* style/StyleResolveTree.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make JSValue bool conversion less dangerous
https://bugs.webkit.org/show_bug.cgi?id=120505

Reviewed by Darin Adler.

Source/JavaScriptCore:

Replaces JSValue::operator bool() with a operator UnspecifiedBoolType* as
we do elsewhere.  Then fix the places where terrible type coercion was
happening.  All of the changes made had no fundamental behavioural impact
as they were coercion results that were ignored (returning undefined
after an exception).

* dfg/DFGOperations.cpp:
* interpreter/CallFrame.h:
(JSC::ExecState::hadException):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::operator UnspecifiedBoolType*):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
* runtime/PropertyDescriptor.cpp:
(JSC::PropertyDescriptor::equalTo)

Source/WTF:

Make LIKELY and UNLIKELY macros coerce to bool before
passing to expect.

* wtf/Compiler.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use Element& in StyleResolveTree
https://bugs.webkit.org/show_bug.cgi?id=120540

Reviewed by Andreas Kling.

* dom/ContainerNode.cpp:
(WebCore::attachChild):
(WebCore::detachChild):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::createRenderTree):
(WebCore::Document::detach):
* dom/Element.cpp:
(WebCore::Element::lazyReattach):
(WebCore::Element::updateExistingPseudoElement):
(WebCore::Element::createPseudoElementIfNeeded):
(WebCore::disconnectPseudoElement):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setResetStyleInheritance):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::parseAttribute):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderFallbackContent):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willRecalcStyle):
(WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
(WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
(WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::parseMultipleAttribute):
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::createContainingTable):
(WebCore::HTMLViewSourceDocument::addSpanWithClassName):
(WebCore::HTMLViewSourceDocument::addLine):
(WebCore::HTMLViewSourceDocument::finishLine):
(WebCore::HTMLViewSourceDocument::addBase):
(WebCore::HTMLViewSourceDocument::addLink):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::executeTask):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::willAttachRenderers):
(WebCore::InsertionPoint::willDetachRenderers):
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::createRenderTree):
* style/StyleResolveTree.cpp:
(WebCore::Style::attachChildren):
(WebCore::Style::attachRenderTree):
(WebCore::Style::detachChildren):
(WebCore::Style::detachRenderTree):
(WebCore::Style::resolveLocal):
(WebCore::Style::updateTextStyle):
(WebCore::Style::resolveShadowTree):
(WebCore::Style::resolveTree):
        
    Documents only ever have one child element. Remove the loop.

(WebCore::Style::detachRenderTreeInReattachMode):
(WebCore::Style::reattachRenderTree):
* style/StyleResolveTree.h:
* svg/SVGTests.cpp:
(WebCore::SVGTests::handleAttributeChange):
* xml/XMLErrors.cpp:
(WebCore::XMLErrors::insertErrorMessageBlock):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Redefine the ShapeIntervals class as a template
https://bugs.webkit.org/show_bug.cgi?id=120381

Reviewed by Alexandru Chiculita.

No new tests, this was just an internal refactoring.

The existing ShapeIntervals class has been converted into a template whose
type specifies the type of the interval's x1 and x2 horizontal endpoints
(formerly float). There were several other minor changes, all in the realm
of refactoring:

- The original type was a struct with public x1 and x2 fields. It's now a class
with x1 and x2 accessors. ASSERTS are now used to maintain the x2 >= x1 invariant.
In the original code the invariant was not checked.

- The logical comparison operators have been overloaded for ShapeInterval.
This obviates the IntervalX1Comparator class which has been removed.

- The names of the global ShapeInterval Vector set operation methods have been
changed to reflect the fact that they're now members of the template class,
rather than globals.

PolygonShape.cpp depended on the ShapeInterval class. In the one or two places
where an interval's x1 or x1 fields had been set explicitly, ShapeInterval::set()
is now used to set both fields. This also enables the invariant check mentioned
earlier. The other changes to this class are syntatic, to account for the ShapeInterval
class's changes.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/shapes/PolygonShape.cpp:
(WebCore::appendIntervalX):
(WebCore::computeXIntersections):
(WebCore::computeOverlappingEdgeXProjections):
(WebCore::PolygonShape::getExcludedIntervals):
(WebCore::PolygonShape::getIncludedIntervals):
* rendering/shapes/PolygonShape.h:
* rendering/shapes/ShapeInterval.cpp: Removed.
* rendering/shapes/ShapeInterval.h: The entire implementation is now here.
(WebCore::ShapeInterval::ShapeInterval):
(WebCore::ShapeInterval::x1):
(WebCore::ShapeInterval::x2):
(WebCore::ShapeInterval::set):
(WebCore::ShapeInterval::overlaps):
(WebCore::ShapeInterval::intersect):
(WebCore::ShapeInterval::sortVector):
(WebCore::ShapeInterval::uniteVectors):
(WebCore::ShapeInterval::intersectVectors):
(WebCore::ShapeInterval::subtractVectors):
(WebCore::operator==):
(WebCore::operator!=):
(WebCore::operator< ):
(WebCore::operator> ):
(WebCore::operator<=):
(WebCore::operator>=):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make sure remove CachedResourceClient when destructing IconLoader
https://bugs.webkit.org/show_bug.cgi?id=120541

Patch by Leo Yang <leoyang@blackberry.com> on 2013-08-30
Reviewed by Darin Adler.

It's a good practice to call CachedResource::removeClient(client)
when the client is being destructed. We need to do this for InconLoader
to prevent m_resource from keeping dangling client in case m_resource
is referenced by someone else in the future.

Found by code inspection. Just a defensive enhancement no new tests.

* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::~IconLoader):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Animate CSS Image filter() function
https://bugs.webkit.org/show_bug.cgi?id=119938

Reviewed by Simon Fraser.

Source/WebCore:

With this patch, the new introduced CSS Image function filter() can be
animated. According to the spec, just filter functions can be
interpolated.

The patch also prepares StyleImage blending for interpolation of other
generated images like gradients or cross-fade().

http://dev.w3.org/fxtf/filters/#interpolating-filter-image

Test: fast/filter-image/filter-image-animation.html

* css/CSSComputedStyleDeclaration.cpp: Reuse the code that creates a
    CSSValueList from ComputeStyle logic.
(WebCore::valueForPixel):
    For StyleRules we want to have not-adjusted length values.
(WebCore::ComputedStyleExtractor::valueForShadow):
    Add argument to switch between adjusted and not-adjusted length.
(WebCore::ComputedStyleExtractor::valueForFilter):
    Ditto.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSComputedStyleDeclaration.h:
* css/CSSFilterImageValue.h: Add helper functions
    for animating filters. We need to pass the FilterOperations for
    the image generation and the CSSValueList for StyleRule.
(WebCore::CSSFilterImageValue::filterOperations):
(WebCore::CSSFilterImageValue::setFilterOperations):
(WebCore::CSSFilterImageValue::cachedImage):
* page/animation/CSSPropertyAnimation.cpp:
    Add animation code to support animations between two filter()
    function values.
(WebCore::blendFilterOperations):
(WebCore::blendFunc):
(WebCore::filterBlend):
* rendering/style/StyleGeneratedImage.h: Add helper functions.
(WebCore::CSSFilterImageValue::imageValue):

LayoutTests:

Add tests to test animation between two filter() function values.
Furthermore, extended animation-test-helpers.js to parse all kind of CSS
image function where we support animations. CSS Image function can be
deeply nested as well now:

    -wekit-filter(-webkit-cross-fade(url(a.png), url(b.png), 50%), sepia(0.5))

Even the 50% can now be checked with a tolerance. If we should ever support
animations on nested CSS Images, the new code in animation-test-helpers.js
is prepared for it.

Fixed a bunch of tests that passed by accident or needed an update to the new
infrastructure.

* animations/resources/animation-test-helpers.js:
(parseCSSImage): For parsing of all kind of supported CSS Image functions.
    Currently supported: -webkit-cross-fade, -webkit-filter, url, none
    Still missing: linear and radial gradients (can not be animated yet).
    CSS Image functions are allowed to be nested as deep JS allows.
(parseCrossFade): Add parsing of input CSS images.
(parseFilterImage): Parse -webkit-filter image function as well as input images.
(parseFilterFunctionList): Parse filter function list. We now parse the
    function name as well. Added rudimentary support for drop-shadow and url.
(parseDeprecatedCustomFilterFunction): Special case old syntax of custom
    filter function. Shall be removed in the future.
(compareCSSImages): Compares all kind (even deep nested) CSS images.
(compareFilterFunctions): Now compare filter function names as well.
(comparePropertyValue): Use new compareCSSImages function.
* fast/filter-image/filter-image-animation-expected.txt: Added.
* fast/filter-image/filter-image-animation.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: inspector/storage-panel-dom-storage-update.html is flakey on the bots
https://bugs.webkit.org/show_bug.cgi?id=120544

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-08-30
Reviewed by Dean Jackson.

Explicitly listen for events instead of running callbacks after a delay.

* inspector/storage-panel-dom-storage-update.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [GStreamer] support in-band text tracks
https://bugs.webkit.org/show_bug.cgi?id=103771

Patch by Brendan Long <b.long@cablelabs.com> on 2013-08-30
Reviewed by Eric Carlson.

Tests: New tests added because existing tests were too specific.
   media/track/in-band/track-in-band-kate-ogg-cues-added-once.html
   media/track/in-band/track-in-band-kate-ogg-kind.html
   media/track/in-band/track-in-band-kate-ogg-language.html
   media/track/in-band/track-in-band-kate-ogg-mode.html
   media/track/in-band/track-in-band-kate-ogg-style.html
   media/track/in-band/track-in-band-kate-ogg-track-order.html
   media/track/in-band/track-in-band-srt-mkv-cues-added-once.html
   media/track/in-band/track-in-band-srt-mkv-kind.html
   media/track/in-band/track-in-band-srt-mkv-language.html
   media/track/in-band/track-in-band-srt-mkv-mode.html
   media/track/in-band/track-in-band-srt-mkv-style.html
   media/track/in-band/track-in-band-srt-mkv-track-order.html

* CMakeLists.txt: Add InbandTextTrackPrivateGStreamer, InbandGenericTextTrack, InbandWebVTTTextTrack, and TextCombinerGStreamer files.
* GNUmakefile.list.am: Same.
* PlatformEfl.cmake: Same.
* Target.pri: Same.
* WebCore.vcxproj/WebCore.vcxproj: Same.
* WebCore.vcxproj/WebCore.vcxproj.filters: Same.
* WebCore.xcodeproj/project.pbxproj: Same.
* html/track/InbandGenericTextTrack.cpp: Split out code for handling generic cues.
(WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Move from InbandTextTrack.
(WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Same.
(WebCore::GenericTextTrackCueMap::add): Same.
(WebCore::GenericTextTrackCueMap::find): Same.
(WebCore::GenericTextTrackCueMap::remove): Same.
(WebCore::InbandGenericTextTrack::create): Same.
(WebCore::InbandGenericTextTrack::updateCueFromCueData): Same.
(WebCore::InbandGenericTextTrack::addGenericCue): Same.
(WebCore::InbandGenericTextTrack::updateGenericCue): Same.
(WebCore::InbandGenericTextTrack::removeGenericCue): Same.
(WebCore::InbandGenericTextTrack::removeCue): Same.
(WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Empty.
(WebCore::InbandGenericTextTrack::~InbandGenericTextTrack): Empty.
* html/track/InbandGenericTextTrack.h: Copied from Source/WebCore/html/track/InbandTextTrack.h.
The only addition is the ASSERT_NOT_REACHED() for WebVTT cues.
* html/track/InbandTextTrack.cpp: Add label and language changed callbacks.
(WebCore::InbandTextTrack::create): Return a generic or WebVTT text track based on the private CueFormat.
(WebCore::InbandTextTrack::labelChanged): Added.
(WebCore::InbandTextTrack::languageChanged): Added.
* html/track/InbandTextTrack.h: Add label and language changed callbacks.
* html/track/InbandWebVTTTextTrack.cpp: Added, based on InbandTextTrack.
(WebCore::InbandWebVTTTextTrack::create): Same.
(WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Empty.
(WebCore::InbandWebVTTTextTrack::~InbandWebVTTTextTrack): Empty.
(WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): Sends data to a WebVTTParser.
(WebCore::InbandWebVTTTextTrack::newCuesParsed): Adds cues when WebVTTParser parses them.
(WebCore::InbandWebVTTTextTrack::fileFailedToParse): Prints a warning when WebVTTParser has a problem.
* html/track/InbandWebVTTTextTrack.h: Added.
* platform/graphics/InbandTextTrackPrivate.h:
(WebCore::InbandTextTrackPrivate::cueFormat): For determining if the track will have generic or WebVTT cues.
(WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): Pass CueFormat in the constructor.
* platform/graphics/InbandTextTrackPrivateClient.h: Same.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Pass CueFormat (Generic) to InbandTextTrackPrivate.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr specializations for GstSample and GstEvent.
* platform/graphics/gstreamer/GRefPtrGStreamer.h: Same.
* platform/graphics/gstreamer/GStreamerUtilities.h: Add WARN_MEDIA_MESSAGE.
* platform/graphics/gstreamer/GStreamerVersioning.h: Add a function to check GStreamer version at runtime.
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Added.
(WebCore::textTrackPrivateEventCallback): Watches for tag and stream start events.
(WebCore::textTrackPrivateSampleTimeoutCallback): See notifyTrackOfSample();
(WebCore::textTrackPrivateStreamTimeoutCallback): See notifyTrackOfStreamChanged();
(WebCore::textTrackPrivateTagsChangeTimeoutCallback): See notifyTrackOfTagsChanged();
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Initializes tags and stream and sets up event callback.
(WebCore::InbandTextTrackPrivateGStreamer::~InbandTextTrackPrivateGStreamer): Calls disconnect:
(WebCore::InbandTextTrackPrivateGStreamer::disconnect): Removes signal handlers and frees some memory.
(WebCore::InbandTextTrackPrivateGStreamer::handleSample): Adds samples to a list and sets up callback.
(WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Sets up callback.
(WebCore::InbandTextTrackPrivateGStreamer::tagsChanged): Same.
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): Parses all queued samples with WebVTTParser.
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Keeps track of current stream.
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Sets label and language from tags.
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Added.
(WebCore::InbandTextTrackPrivateGStreamer::create): Basic RefPtr create function.
(WebCore::InbandTextTrackPrivateGStreamer::pad): Returns the pad this track is associated with (used
to determine if a playbin text stream has already been associated with a text track).
(WebCore::InbandTextTrackPrivateGStreamer::setIndex): Sets the track index (used for sorting).
(WebCore::InbandTextTrackPrivateGStreamer::streamId): Returns the stream ID (used to handle new samples).
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateTextChangedCallback): Called for playbin "text-changed" event. See textChanged().
(WebCore::mediaPlayerPrivateTextChangeTimeoutCallback): See notifyPlayerOfText().
(WebCore::mediaPlayerPrivateNewTextSampleCallback): See newTextSample().
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_textTimerHandler.
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect text tracks (they don't necessarily
get freed here, since a script could hold a reference).
(WebCore::MediaPlayerPrivateGStreamer::textChanged): Setup callback for notifyPlayerOfText.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Create text tracks.
(WebCore::MediaPlayerPrivateGStreamer::newTextSample): Handle new samples by giving them to a text track
with a matching stream. This method is syncryonous because we need to get the stream start sticky event
immediately.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Added. This element forwards buffers from all
of its input pads, but also converts plain text to WebVTT as needed.
(webkit_text_combiner_init): Setup internal funnel.
(webkitTextCombinerPadEvent): If the caps are plain text make sure we have a webvttenv, otherwise connect
directly to the funnel.
(webkitTextCombinerRequestNewPad): Setup ghostpad and event callback.
(webkitTextCombinerReleasePad): Release pad and optional associated webvttenc.
(webkit_text_combiner_class_init): Setup pad templates and request/release pad functions.
(webkitTextCombinerNew): Returns a new WebKitTextCombiner.
* platform/graphics/gstreamer/TextCombinerGStreamer.h: Added.
* platform/graphics/gstreamer/TextSinkGStreamer.cpp: Added.
(webkit_text_sink_init): Set sync=false.
(webkitTextSinkGetProperty): Ignore sync property.
(webkitTextSinkSetProperty): Same.
(webkitTextSinkQuery): Ignore position and duration queries, forward everything else to appsink.
(webkit_text_sink_class_init): Setup property and query functions.
(webkitTextSinkNew): Return a new WebKitTextSink.
* platform/graphics/gstreamer/TextSinkGStreamer.h: Added.

LayoutTests: <https://webkit.org/b/103771> [GStreamer] support in-band text tracks

Patch by Brendan Long <b.long@cablelabs.com> on 2013-08-30
Reviewed by Eric Carlson.

* media/content/counting-subtitled-kate.ogv: Added.
* media/content/counting-subtitled-srt.mkv: Added.
* media/in-band-cues.js: Added.
* media/track/in-band/track-in-band-kate-ogg-cues-added-once-expected.txt: Added.
* media/track/in-band/track-in-band-kate-ogg-cues-added-once.html: Added.
* media/track/in-band/track-in-band-kate-ogg-kind-expected.txt: Added.
* media/track/in-band/track-in-band-kate-ogg-kind.html: Added.
* media/track/in-band/track-in-band-kate-ogg-language-expected.txt: Added.
* media/track/in-band/track-in-band-kate-ogg-language.html: Added.
* media/track/in-band/track-in-band-kate-ogg-mode-expected.txt: Added.
* media/track/in-band/track-in-band-kate-ogg-mode.html: Added.
* media/track/in-band/track-in-band-kate-ogg-style-expected.txt: Added.
* media/track/in-band/track-in-band-kate-ogg-style.html: Added.
* media/track/in-band/track-in-band-kate-ogg-track-order-expected.txt: Added.
* media/track/in-band/track-in-band-kate-ogg-track-order.html: Added.
* media/track/in-band/track-in-band-srt-mkv-cues-added-once-expected.txt: Added.
* media/track/in-band/track-in-band-srt-mkv-cues-added-once.html: Added.
* media/track/in-band/track-in-band-srt-mkv-kind-expected.txt: Added.
* media/track/in-band/track-in-band-srt-mkv-kind.html: Added.
* media/track/in-band/track-in-band-srt-mkv-language-expected.txt: Added.
* media/track/in-band/track-in-band-srt-mkv-language.html: Added.
* media/track/in-band/track-in-band-srt-mkv-mode-expected.txt: Added.
* media/track/in-band/track-in-band-srt-mkv-mode.html: Added.
* media/track/in-band/track-in-band-srt-mkv-style-expected.txt: Added.
* media/track/in-band/track-in-band-srt-mkv-style.html: Added.
* media/track/in-band/track-in-band-srt-mkv-track-order-expected.txt: Added.
* media/track/in-band/track-in-band-srt-mkv-track-order.html: Added.
* platform/mac/TestExpectations: Skip MKV and OGG tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Animations should use double for key values, not floats
https://bugs.webkit.org/show_bug.cgi?id=120547

Reviewed by Simon Fraser.

Merge https://chromium.googlesource.com/chromium/blink/+/71de046541c77120874b9bff82958ee9e0e20c7c

Some files have been renamed in the Blink port, and they have made some
improvements, but I took what applied to us.

All our existing tests passed.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::keyframeStylesForAnimation):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::parseKeyString):
* css/WebKitCSSKeyframeRule.h:
(WebCore::StyleKeyframe::getKeys):
* platform/graphics/GraphicsLayer.h:
(WebCore::AnimationValue::keyTime):
(WebCore::AnimationValue::AnimationValue):
(WebCore::FloatAnimationValue::create):
(WebCore::FloatAnimationValue::FloatAnimationValue):
(WebCore::TransformAnimationValue::create):
(WebCore::TransformAnimationValue::TransformAnimationValue):
(WebCore::FilterAnimationValue::create):
(WebCore::FilterAnimationValue::FilterAnimationValue):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
* rendering/style/KeyframeList.h:
(WebCore::KeyframeValue::KeyframeValue):
(WebCore::KeyframeValue::key):
(WebCore::KeyframeValue::setKey):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Breakpoints should have Automatically Continue Option
https://bugs.webkit.org/show_bug.cgi?id=120187

Reviewed by Timothy Hatcher.

Source/WebCore:

Tests: inspector-protocol/debugger/removeBreakpoint.html
       inspector-protocol/debugger/setBreakpoint-autoContinue.html
       inspector-protocol/debugger/setBreakpoint-column.html
       inspector-protocol/debugger/setBreakpoint-condition.html
       inspector-protocol/debugger/setBreakpoint.html

* inspector/Inspector.json:
Convert the "condition" argument of setBreakpoint and setBreakpointByUrl
to a BreakpointOptions object with optional properties. One of which
is "condition" and a new option "autoContinue".

* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::pauseIfNeeded):
Automatically continue if the breakpoint was hit and has autoContinue.

* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::buildObjectForBreakpointCookie):
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::continueToLocation):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/ScriptBreakpoint.h:
(WebCore::ScriptBreakpoint::ScriptBreakpoint):
Handle the new incoming BreakpointOptions type, and set the
autoContinue state on ScriptBreakpoints.

* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype.setBreakpointByURL):
(WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
Update old front-end to be compatible with the new API.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Breakpoint.css:
(#edit-breakpoint-popoover-auto-continue):
Misc. changes for UI.

* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.get autoContinue):
(WebInspector.Breakpoint.prototype.set autoContinue):
(WebInspector.Breakpoint.prototype.get options):
(WebInspector.Breakpoint.prototype.get info):
General maintenance of the autoContinue state.

(WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged):
(WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged):
(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
Edit Breakpoint UI for setting autoContinue state.

* UserInterface/InspectorBackend.js:
(InspectorBackendClass.prototype.registerCommand):
(InspectorBackendClass.prototype._supports):
Extension to check if a BackendCommands method supports a particular param.

* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype._setBreakpoint):
* UserInterface/InspectorBackendCommands.js:
Change to backend agent calls for the new protocol API.

LayoutTests:

* http/tests/inspector-protocol/resources/InspectorTest.js:
(InspectorTest.checkForError):
Helper for checking for, and logging, protocol error responses.

* inspector/debugger/set-breakpoint.html:
Update this test for the protocol change.

* inspector-protocol/debugger/removeBreakpoint-expected.txt: Added.
* inspector-protocol/debugger/removeBreakpoint.html: Added.
* inspector-protocol/debugger/resources/breakpoint.js: Added.
* inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added.
* inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added.
* inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html.
* inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt.
* inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added.
* inspector-protocol/debugger/setBreakpoint-condition.html: Added.
* inspector-protocol/debugger/setBreakpoint-expected.txt: Added.
* inspector-protocol/debugger/setBreakpoint.html: Added.
Protocol tests for setting breakpoints. These test different aspects of
the Debugger domain (setBreakpoint variants and removeBreakpoint).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: inspector/storage-panel-dom-storage-update.html is flakey on the bots
https://bugs.webkit.org/show_bug.cgi?id=120544

Take 2, remove some more runAfterPendingDispatches which were somehow
causing WebKit 2 tests to fail. This requires us to be a bit more
careful when running the pending handlers as well.

Unreviewed test fix.

* inspector/storage-panel-dom-storage-update.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154911 268f45cc-cd09-0410-ab3c-d52691b4dbfc