[Mac] Add AudioTrack support to MediaPlayerPrivateAVFObC.
https://bugs.webkit.org/show_bug.cgi?id=122043

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/audio-track.html

Add a new class AudioTrackPrivateAVF and subclass AudioTrackPrivateAVFObjC
which are backed by a AVPlayerItemTrack. Create one of these tracks when
we are notified that the list of available tracks has changed.

* WebCore.xcodeproj/project.pbxproj:
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::setEnabled): Pass through to the AudioTrackPrivate
    so that the underlying media track can be (dis|en)abled.
* platform/graphics/avfoundation/AudioTrackPrivateAVF.h: Added.
(WebCore::AudioTrackPrivateAVF::kind): Simple getter.
(WebCore::AudioTrackPrivateAVF::id): Ditto.
(WebCore::AudioTrackPrivateAVF::label): Ditto.
(WebCore::AudioTrackPrivateAVF::language): Ditto.
(WebCore::AudioTrackPrivateAVF::setKind): Simple Setter.
(WebCore::AudioTrackPrivateAVF::setId): Ditto.
(WebCore::AudioTrackPrivateAVF::setLabel): Ditto.
(WebCore::AudioTrackPrivateAVF::setLanguage): Ditto.
(WebCore::AudioTrackPrivateAVF::AudioTrackPrivateAVF): Simple constructor.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: Added.
(WebCore::AudioTrackPrivateAVFObjC::create): Simple factory.
(WebCore::AudioTrackPrivateAVFObjC::playerItemTrack): Simple getter.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: Added.
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Call resetPropertiesFromTrack.
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): Fill out the values from
    the associated AVPlayerItemTrack and its AVAssetTrack.
(WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack): Call resetPropertiesFromTrack.
(WebCore::AudioTrackPrivateAVFObjC::setEnabled): (En|Dis)able the AVPlayerItemTrack.
(WebCore::AudioTrackPrivateAVFObjC::languageForAVAssetTrack): Refactored from
    MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Determine which tracks
    have been added or removed and notify the clients accordingly.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Refactor into
    AudioTrackPrivateAVFObjC::languageForAVAssetTrack.

LayoutTests:

* media/track/audio-track-expected.txt: Added.
* media/track/audio-track.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Mac-Lion build fix.

Use metadataItemsFromArray:withLocale: instead of
metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:
on Lion and earlier.

* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix compilation for COMPILER(MSVC) && !CPU(X86) after r156490.
https://bugs.webkit.org/show_bug.cgi?id=122102

Reviewed by Geoffrey Garen.

_AddressOfReturnAddress() is supported for all platforms of
ths Microsoft compiler, so we can use it for !CPU(X86) too.

* jit/JITOperationWrappers.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix the Windows build.

* WebFrame.cpp:
(WebFrame::pauseAnimation):
(WebFrame::pauseTransition):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r156546): media/video-no-audio.html broken
https://bugs.webkit.org/show_bug.cgi?id=122049

Reviewed by Eric Carlson.

Source/WebCore:

Now that our video elements have audio tracks, use their presence or
absense to show or hide the volume controls.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.addVideoListeners): Listen for audioTrack changes.
(Controller.prototype.removeVideoListeners): Stop listening to same.
(Controller.prototype.handleAudioTrackChange): Call this.updateHasAudio()
(Controller.prototype.handleAudioTrackAdd): Ditto.
(Controller.prototype.handleAudioTrackRemove): Ditto.
(Controller.prototype.updateHasAudio): Hide the volume controls if no
    audioTracks are present, and vice versa.

LayoutTests:

* platform/mac/TestExpectations:
* platform/mac/media/video-no-audio-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove FontTranscoder
https://bugs.webkit.org/show_bug.cgi?id=122088

Reviewed by Andreas Kling.

This overly generic class just implements mapping of backslash to yen symbol for some legacy Japanese fonts.

* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/Font.cpp:
(WebCore::useBackslashAsYenSignForFamily):
        
    Move the family set to Font.cpp.

(WebCore::Font::Font):
(WebCore::Font::operator=):
(WebCore::Font::update):
        
    Keep the cached boolean up to date.

* platform/graphics/Font.h:
(WebCore::Font::useBackslashAsYenSymbol):
        
    Use descriptive name instead of talking about "transcoding".

* platform/text/transcoder: Removed.
* platform/text/transcoder/FontTranscoder.cpp: Removed.
* platform/text/transcoder/FontTranscoder.h: Removed.
* rendering/RenderText.cpp:
(WebCore::RenderText::RenderText):
(WebCore::RenderText::computeUseBackslashAsYenSymbol):
        
    Rename for clarity. 
    Avoid unnecessary hash lookup, just check the cached bit in Font.

(WebCore::RenderText::styleDidChange):
(WebCore::RenderText::setTextInternal):
        
    "Transcoding" here was just a simple character replacement.

(WebCore::RenderText::textWithoutConvertingBackslashToYenSymbol):
        
    Renamed.

* rendering/RenderText.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix force_static_libs_as_shared in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=121961

Reviewed by Csaba Osztrogonác.

Get rid of the unused WebKit2QML library

.:

* Source/api.pri:

Source/WebKit2:

* Target.pri:
* WebKit2.pro:
* WebKit2QML.pri: Removed.

Tools:

* qmake/mkspecs/features/webkit_modules.prf:
* qmake/mkspecs/modules/webkit2qml.prf: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Changed expectation for accessibility/file-upload-button-stringvalue.html after r156532
https://bugs.webkit.org/show_bug.cgi?id=122103

Unreviewed EFL gardening.

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-09-30

* platform/efl-wk1/TestExpectations: file-upload-button-stringvalue.html fails on efl-wk1.
Unskipped accessibility/heading-level.html. It passes after r156551.
* platform/efl-wk2/accessibility/file-upload-button-stringvalue-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert a bunch of OwnPtrs on Page to std::unique_ptrs
https://bugs.webkit.org/show_bug.cgi?id=122086

Reviewed by Darin Adler.

* loader/ProgressTracker.cpp:
* loader/ProgressTracker.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setGroupName):
(WebCore::Page::initGroup):
* page/Page.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
* page/PageGroup.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r156656.
http://trac.webkit.org/changeset/156656
https://bugs.webkit.org/show_bug.cgi?id=122111

Broke several media tests (Requested by ap on #webkit).

Source/WebCore:

* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):

LayoutTests:

* platform/mac/TestExpectations:
* platform/mac/media/video-no-audio-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed test fix. Prevent crash when changing URL paths during testing.

A shared BSTR value (_bstr_t) was being reallocated outside the smart pointer, causing
it to be double-freed.

* WinLauncher/WinLauncher.cpp:
(EditProc): Be explicit about type passed to loadURL.
(loadURL): Create a shallow copy of the BSTR so we only allocate memory if needed. Use _bstr_t so
that reallocating the BSTR is done with the knowledge of the smart pointer.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
editing/execCommand/findString-diacriticals.html expects to fail
https://bugs.webkit.org/show_bug.cgi?id=122100

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-09-30
Reviewed by Alexey Proskuryakov.

Since all major platforms pass editing/execCommand/findString-diacriticals.html,
the test now globally expects "PASS" instead of "FAIL" rendering the individual
platform expectation files obsolete.

* editing/execCommand/findString-diacriticals-expected.txt: "PASS" -> "FAIL"
* platform/efl/TestExpectations: EFL passes editing/execCommand/findString-diacriticals.
* platform/gtk/editing/execCommand/findString-diacriticals-expected.txt: Removed.
* platform/mac/editing/execCommand/findString-diacriticals-expected.txt: Removed.
* platform/qt/editing/execCommand/findString-diacriticals-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, roll back in r156546 with rebaselined tests.
https://bugs.webkit.org/show_bug.cgi?id=122111

Source/WebCore:

* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
(Controller.prototype.updateHasAudio):

LayoutTests:

* platform/mac/TestExpectations:
* platform/mac/fast/hidpi/video-controls-in-hidpi-expected.png:
* platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt:
* platform/mac/fast/layers/video-layer-expected.png:
* platform/mac/fast/layers/video-layer-expected.txt:
* platform/mac/media/media-controls-clone-expected.png:
* platform/mac/media/media-controls-clone-expected.txt:
* platform/mac/media/video-no-audio-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build fix.

* WebCore.vcxproj/WebCore.vcxproj.filters: Correct malformed XML in project files.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build when building against an SDK.

Xcode helpfully prepends $(SDKROOT) to the paths in FRAMEWORK_SEARCH_PATHS when generating
the compiler command lines. It can't know to do this for the system framework search paths
we add manually via OTHER_CFLAGS though, so we need to prefix them with $(SDKROOT) ourself.

Source/WebCore:

* Configurations/WebCore.xcconfig:

Source/WebKit/mac:

* Configurations/WebKit.xcconfig:

Source/WebKit2:

* Configurations/BaseTarget.xcconfig:

Tools:

* DumpRenderTree/mac/Configurations/BaseTarget.xcconfig:
* WebKitTestRunner/Configurations/BaseTarget.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Compile errors in WebKit (via peavo@outlook.com).
https://bugs.webkit.org/show_bug.cgi?id=122106

Reviewed by Darin Adler.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add link
declarations missed in r156655.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass VM instead of JSGlobalObject to RegExp constructor.
<https://webkit.org/b/122113>

Reviewed by Darin Adler.

RegExps don't need anything from the global object during their
construction and only use it to get to the VM. Reduce loads by
simply passing the VM around instead.

JSC release binary size -= 120 bytes(!)


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Build fix after r156622. Build RenderLayerModelObject.cpp in a separate compilation unit
from the RenderLayerAllnOne file so that the scalar and vector destructors are visible to other
elements of WebCore during the build.

* WebCore.vcxproj/WebCore.vcxproj: Compile RenderLayerModelObject outside of the all-in-one file.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* rendering/RenderingAllInOne.cpp: Remove RenderLayerModelObject.cpp.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NetworkResourceLoader.messages.in should be ENABLE(NETWORK_PROCESS) guarded
https://bugs.webkit.org/show_bug.cgi?id=122110

Reviewed by Darin Adler.

* NetworkProcess/NetworkResourceLoader.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Win64 compile fix after r1256490.
https://bugs.webkit.org/show_bug.cgi?id=122117

Patch by Alex Christensen <alex.christensen@flexsim.com> on 2013-09-30
Reviewed by Michael Saboff.

* jit/JITStubsMSVC64.asm:
Implemented getHostCallReturnValue for Windows x86_64 processors.



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