Need default WKNavigationDelegate behavior
https://bugs.webkit.org/show_bug.cgi?id=131944
<rdar://problem/15949822>

Reviewed by Dan Bernstein.

Port the WebKit1 default delegate behavior over.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
OSR exit should know about Int52 and Double constants
https://bugs.webkit.org/show_bug.cgi?id=131945

Reviewed by Oliver Hunt.
        
The DFG OSR exit machinery's ignorance would lead to some constants becoming
jsUndefined() after OSR exit.
        
The FTL OSR exit machinery's ignorance just meant that we would sometimes use a
stackmap constant rather than baking the constant into the OSRExit data structure.
So, not a big deal, but worth fixing.
        
Also added some helpful hacks to jsc.cpp for testing such OSR exit pathologies.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGMinifiedNode.h:
(JSC::DFG::belongsInMinifiedGraph):
(JSC::DFG::MinifiedNode::hasConstantNumber):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::tryToSetConstantExitArgument):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionOtherFalse):
(functionUndefined):
* runtime/Intrinsic.h:
* tests/stress/fold-to-double-constant-then-exit.js: Added.
(foo):
* tests/stress/fold-to-int52-constant-then-exit.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore: Unreviewed test gardening, run the repeat-out-of-bounds tests again.

* tests/stress/float32-repeat-out-of-bounds.js:
* tests/stress/int8-repeat-out-of-bounds.js:

Tools: Unreviewed test gardening, make no-eager runs run everything except eager (as opposed to
being the same as a "quick run", which is meant for genuinely slow tests).

* Scripts/run-jsc-stress-tests:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Make dynamic viewport size update content aware
https://bugs.webkit.org/show_bug.cgi?id=131874

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-21
Reviewed by Tim Horton.

When possible, adjust the scroll position based on the content on dynamic viewport resize.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::scalePage):
(WebKit::WebPage::pageDidScroll):
* WebProcess/WebPage/WebPage.h:
The scrolling heuristic are not invertible, especially the content heuristic. To have the right
behavior when doing resize without changing the page, we save the old scroll position and restore
it when the content size and scale is restored.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
On dynamic update, start by finding what node is at the center of the screen. After the layout, put that
node back in the center.

(WebKit::WebPage::updateVisibleContentRects):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
https://bugs.webkit.org/show_bug.cgi?id=131884

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-21
Reviewed by Darin Adler.

<rdar://problem/16667291>

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
Since we were only changing the minimumScale for the transition, the target scale was affected
by max-scale. This was breaking the transition from portrait to landscale.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WebKit2] Implement CSS viewport units
https://bugs.webkit.org/show_bug.cgi?id=131863
<rdar://problem/16279088>

Reviewed by Darin Adler.

* UIProcess/API/Cocoa/WKWebView.mm:
(setMinimumLayoutSizeForMinimalUI):
(-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
Add _setMinimumLayoutSizeOverrideForMinimalUI:, which pushes said size
down from the client to WebPageIOS, below.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
(WebKit::WebPage::viewportConfigurationChanged):
Update FrameView's viewport size based on the minimum layout size for minimal UI (if we have it)
or the normal minimum layout size, scaled to the page's initial scale.

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::setViewportSize):
* page/FrameView.h:
(WebCore::FrameView::viewportSize):
Add setViewportSize() and viewportSize().
If the viewport size changes, we have to do style recalc.
If we have an overridden viewport size, use it.

* rendering/RenderView.cpp:
(WebCore::RenderView::viewportSize):
* rendering/RenderView.h:
Get the size from FrameView.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[New Multicolumn] Column set drawing under horizontal scrollbar.
https://bugs.webkit.org/show_bug.cgi?id=131812.

Reviewed by Sam Weinig.


Source/WebCore: 
Added fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBlockFlow.h:
Pass in relayoutChildren as a reference boolean to checkForPaginationLogicalHeightChange.
The new columns need to be able to set it to true if the amount of available column
height ever changes, so that the RenderFlowThread and the sets get a layout call.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setColumnStylesFromPaginationMode):
Make sure that the pagination mode is set up with an auto column-fill specified. You
don't ever want to balance when you set a pagination mode on the RenderView.

LayoutTests: 
* fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb-expected.html: Added.
* fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html: Added.



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

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[New Multicolumn] vertical-rl/unsplittable-inline-block misrenders the column rule.
https://bugs.webkit.org/show_bug.cgi?id=131818

Reviewed by Anders Carlsson.
        
Patch the test to be column-fill:auto, since the other versions
of the test all had that specified already.

* fast/multicol/vertical-rl/unsplittable-inline-block.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
https://bugs.webkit.org/show_bug.cgi?id=131824

Reviewed by Dean Jackson.

Source/WebCore:
Removed support for non-separable blend modes from the CSS parser.

Covered by existing tests

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::setBlendingFiltersOnLayer):

LayoutTests:
Removed or updated tests that used non-separable blend modes in combination
with mix-blend-mode.

* css3/compositing/blend-mode-property-expected.txt:
* css3/compositing/blend-mode-property-parsing-expected.txt:
* css3/compositing/blend-mode-simple-composited.html:
* css3/compositing/blend-mode-simple.html:
* css3/compositing/script-tests/blend-mode-property-parsing.js:
* css3/compositing/script-tests/blend-mode-property.js:
* css3/compositing/svg-blend-color.html: Removed.
* css3/compositing/svg-blend-hue.html: Removed.
* css3/compositing/svg-blend-luminosity.html: Removed.
* css3/compositing/svg-blend-saturation.html: Removed.
* platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt:
* platform/mac/css3/compositing/blend-mode-simple-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another build fix.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::checkEntitlements):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't use ProcessAssertion on simulator
https://bugs.webkit.org/show_bug.cgi?id=131950

Rubber stamped by Benjamin Poulain

* UIProcess/ios/ProcessAssertion.mm:
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::setState):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] enable plug-in replacement
https://bugs.webkit.org/show_bug.cgi?id=131947

Reviewed by Jer Noble.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): initialize m_isPluginReplacementEnabled
    to true on iOS.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WebKit2] support replacements for misspelled words.
https://bugs.webkit.org/show_bug.cgi?id=131827
<rdar://problem/16319657>

Reviewed by Darin Adler.


Source/WebCore: 
Adds utility function to return the character before the current selection
and converts the nbsp to the space character.

* WebCore.exp.in:
* editing/VisibleUnits.cpp:
(WebCore::characterBeforePosition):
* editing/VisibleUnits.h:

Source/WebKit2: 
This is the second a final piece to support replacements.
It adds some entrypoints used by the keyboard code to perform
replacement when reaching the edge of a word using backspace.
I've modified the behavior of replaceSelectedText to work both
with caret or range selections.

* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView isReplaceAllowed]):
(-[WKContentView _characterBeforeCaretSelection]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::replaceSelectedText):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't use ProcessAssertion on simulator
https://bugs.webkit.org/show_bug.cgi?id=131950

Rubber stamped by Enrica Casucci

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
* UIProcess/ios/ProcessAssertion.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the tests.

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[DidFailProvisionalNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
Add policy handler to override the new default of denying loads that NSURLConnection cannot handle.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Empty RenderInline objects should not be line break objects.

https://bugs.webkit.org/show_bug.cgi?id=131861
<rdar://problem/15663617>

Reviewed by David Hyatt.

.:
* ManualTests/empty-inline-as-line-break-position.html: Added.
This issue wouldn't reproduce in WebKitTestRunner.

Source/WebCore:
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::canBreakAtThisPosition):
Don't break at this position if this is an empty RenderInline.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
topContentInset does not play well with fullscreen elements
https://bugs.webkit.org/show_bug.cgi?id=131955
-and corresponding-
<rdar://problem/16651925>

Reviewed by Sam Weinig.


Source/WebCore: 
Calling setNeedsLayout() is not sufficient when the topContentInset has changed 
dynamically. We need to perform the layout right away and update the scrollbars. 
This works completely when the inset changes due to entering/exiting fullscreen, 
but I left a FIXME behind because it is possible to change the inset dynamically 
just through the WK2 API and end up in a situation where everything looks right 
except for the scrollbars. 
* page/FrameView.cpp:
(WebCore::FrameView::topContentInsetDidChange):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::setTopContentInset):

Source/WebKit2: 
If you take an element (such as a <video>) fullscreen when you have a 
topContentInset set, there will be an inset-sized gap at the top of the fullscreen 
video.

Save and restore the topContentInset whenever the scroll position is saved and 
restored.
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::WebFullScreenManager):
(WebKit::WebFullScreenManager::saveScrollPosition):
(WebKit::WebFullScreenManager::restoreScrollPosition):
* WebProcess/FullScreen/WebFullScreenManager.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Element.matches, the standard name for webkitMatchesSelector
https://bugs.webkit.org/show_bug.cgi?id=131922

Reviewed by Andreas Kling.


Source/WebCore: 
This patch just renames webkitMatchesSelector() to matches().

* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
The Objective-C binding generator only supported ImplementedAs for getters and setters.
This adds support for the option so that Element.matches can be generated for Obj-C.

* dom/Element.cpp:
(WebCore::Element::matches):
(WebCore::Element::webkitMatchesSelector): Deleted.
* dom/Element.h:
* dom/Element.idl:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):

LayoutTests: 
Update the tests to verify both Element.matches and Element.webkitMatchesSelector

* fast/dom/SelectorAPI/attrname-case-insensitive-expected.txt:
* fast/dom/SelectorAPI/attrname-case-insensitive.html:
* fast/dom/SelectorAPI/attrname-case-sensitive-expected.txt:
* fast/dom/SelectorAPI/attrname-case-sensitive.xhtml:
* fast/dom/SelectorAPI/caseID-almost-strict-expected.txt:
* fast/dom/SelectorAPI/caseID-almost-strict.html:
* fast/dom/SelectorAPI/caseID-expected.txt:
* fast/dom/SelectorAPI/caseID-strict-expected.txt:
* fast/dom/SelectorAPI/caseID-strict.html:
* fast/dom/SelectorAPI/caseID.html:
* fast/dom/SelectorAPI/caseTag-expected.txt:
* fast/dom/SelectorAPI/caseTag.html:
* fast/dom/SelectorAPI/caseTagX-expected.txt:
* fast/dom/SelectorAPI/caseTagX.xhtml:
* fast/dom/SelectorAPI/detached-element-expected.txt:
* fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt:
* fast/dom/SelectorAPI/not-supported-namespace-in-selector.html:
* fast/dom/SelectorAPI/script-tests/detached-element.js:
* fast/dom/SelectorAPI/script-tests/undefined-null-stringify.js:
* fast/dom/SelectorAPI/script-tests/viewless-document.js:
* fast/dom/SelectorAPI/undefined-null-stringify-expected.txt:
* fast/dom/SelectorAPI/viewless-document-expected.txt:
* fast/forms/radio/radio-live-validation-style-expected.txt:
* fast/forms/radio/radio-live-validation-style.html:
* fast/harness/results.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] implement WebKitDataCue
https://bugs.webkit.org/show_bug.cgi?id=131799

Reviewed by Dean Jackson.


Source/JavaScriptCore: 
* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.

Source/WebCore: 
Tests: http/tests/media/track-in-band-hls-metadata.html
       media/track/track-datacue-value.html

* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
* DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate.

* CMakeLists.txt: Add JSDataCueCustom.cpp.
* bindings/js/JSBindingsAllInOne.cpp:
* WebCore.xcodeproj/project.pbxproj: Add new files.

* bindings/js/JSDataCueCustom.cpp: Added.
(WebCore::JSDataCue::value): 
(WebCore::JSDataCue::setValue):
(WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate
    events when paused, don't call sort on an Vector that can't be sorted.

* html/track/DataCue.cpp:
(WebCore::DataCue::DataCue): Initialize m_type.
(WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary.
(WebCore::DataCue::data): Ask the platform value for data if non-null.
(WebCore::DataCue::setData): Clear m_platformValue and m_value.
(WebCore::DataCue::isEqual): New.
(WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed
    to the constructor/set by script.
(WebCore::DataCue::setValue): Set m_value.
* html/track/DataCue.h:
* html/track/DataCue.idl:

* html/track/InbandDataTextTrack.cpp:
(WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once.
(WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration.
(WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue.
(WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary.
* html/track/InbandDataTextTrack.h:

* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead
    of VTTCue.
* html/track/InbandTextTrack.h:

* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::hasCue): Ditto.
* html/track/TextTrack.h:

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::isEqual): New, test base class equality.
* html/track/TextTrackCue.h:

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first.
* html/track/TextTrackCueGeneric.h:

* html/track/VTTCue.cpp:
(WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first.
* html/track/VTTCue.h:

* platform/SerializedPlatformRepresentation.h: Added.
(WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation):
(WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation):

* platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation.

* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added.
(WebCore::InbandMetadataTextTrackPrivateAVF::create):
(WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
(WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF):
(WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
(WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
(WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack.
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted.

Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::currentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack):
(WebCore::AVFWrapper::setCurrentTextTrack):
(WebCore::AVFWrapper::AVFWrapper):
(WebCore::AVFWrapper::processCue):
(WebCore::AVFWrapper::currentTrack): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted.
(WebCore::AVFWrapper::setCurrentTrack): Deleted.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack.
(WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack.
(WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type.
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata.
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted.

Create a JSValue representation from an AVMetadataItem.
* platform/mac/SerializedPlatformRepresentationMac.h: Added.
(WebCore::SerializedPlatformRepresentationMac::platformType):
(WebCore::SerializedPlatformRepresentationMac::nativeValue):
* platform/mac/SerializedPlatformRepresentationMac.mm: Added.
(WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac):
(WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac):
(WebCore::SerializedPlatformRepresentationMac::create):
(WebCore::SerializedPlatformRepresentationMac::data):
(WebCore::SerializedPlatformRepresentationMac::deserialize):
(WebCore::SerializedPlatformRepresentationMac::isEqual):
(WebCore::toSerializedPlatformRepresentationMac):
(WebCore::jsValueWithValueInContext):
(WebCore::jsValueWithDataInContext):
(WebCore::jsValueWithArrayInContext):
(WebCore::jsValueWithDictionaryInContext):
(WebCore::jsValueWithAVMetadataItemInContext):

Source/WebKit/mac: 
* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.

Source/WebKit2: 
* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.

Source/WTF: 
* wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE.

LayoutTests: 
* http/tests/media/resources/hls: Added.
* http/tests/media/resources/hls/metadata: Added.
* http/tests/media/resources/hls/metadata/fileSequence0.ts: Added.
* http/tests/media/resources/hls/metadata/fileSequence1.ts: Added.
* http/tests/media/resources/hls/metadata/fileSequence2.ts: Added.
* http/tests/media/resources/hls/metadata/fileSequence3.ts: Added.
* http/tests/media/resources/hls/metadata/prog_index.m3u8: Added.
* http/tests/media/track-in-band-hls-metadata-expected.txt: Added.
* http/tests/media/track-in-band-hls-metadata.html: Added.
* media/track/track-datacue-value-expected.txt: Added.
* media/track/track-datacue-value.html: Added.
* platform/efl/TestExpectations: Skip the new tests.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/js/dom/global-constructors-attributes-expected.txt: Update.
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Update.
* platform/mac/TestExpectations: Skip DataCue test on all Mac versions. Skip HLS test on 
    Mountain Lion.
* platform/win/TestExpectations: Skip the new tests.


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