Unreviewed Mac WK2 gardering after r161882.

* platform/mac-wk2/fast/dynamic/012-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow MediaSessionManager to restrict media playback
https://bugs.webkit.org/show_bug.cgi?id=126780

Reviewed by Jer Noble.

Source/WebCore: 

Test: media/video-concurrent-playback.html

* WebCore.exp.in: Export functions needed by Internals.

Add HTMLMediaSession.
* WebCore.xcodeproj/project.pbxproj:
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

Add a media session object to manage HTMLMediaElement restrictions.
* html/HTMLMediaSession.cpp: Added.
* html/HTMLMediaSession.h: Added.

Move media restriction management to a MediaSession.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Use the media session to manage restrictions.
(WebCore::HTMLMediaElement::parseAttribute): Ditto.
(WebCore::HTMLMediaElement::insertedInto): Ditto.
(WebCore::HTMLMediaElement::parseAttribute): Ditto.
(WebCore::HTMLMediaElement::loadInternal): Ditto.
(WebCore::HTMLMediaElement::loadResource): Ditto.
(WebCore::HTMLMediaElement::setReadyState): Ditto.
(WebCore::HTMLMediaElement::autoplay): Ditto.
(WebCore::HTMLMediaElement::play): Ditto.
(WebCore::HTMLMediaElement::pause): Ditto
(WebCore::HTMLMediaElement::pauseInternal): Ditto
(WebCore::HTMLMediaElement::suspend): Ditto
(WebCore::HTMLMediaElement::resume): Ditto.
(WebCore::HTMLMediaElement::updatePlayState): Tell media session playback is about to start.
(WebCore::HTMLMediaElement::deliverNotification): Ditto.
(WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerIsFullscreenPermitted): Ditto.
(WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Ditto.
(WebCore::HTMLMediaElement::pausePlayback): New, allows the media session to pause playback.
* html/HTMLMediaElement.h:

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::webkitEnterFullscreen): Use the media session to manage restrictions.

* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::beginInterruption): Add logging.
(WebCore::MediaSession::endInterruption): Ditto.
(WebCore::MediaSession::pauseSession): New, allows the session manager to pause playback.
* platform/audio/MediaSession.h:

Add per-media type restrictions.
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::MediaSessionManager): Initialize restrictions.
(WebCore::MediaSessionManager::addRestriction): New.
(WebCore::MediaSessionManager::removeRestriction): New.
(WebCore::MediaSessionManager::restrictions): New.
(WebCore::MediaSessionManager::sessionWillBeginPlayback): New. If only one session if the same
    type is allowed to play, pause all others.
* platform/audio/MediaSessionManager.h:

* platform/audio/ios/MediaSessionManagerIOS.h: Added.
* platform/audio/ios/MediaSessionManagerIOS.mm: Added.
(WebCore::MediaSessionManager::sharedManager):
(WebCore::m_objcObserver):
(-[WebAVAudioSessionHelper initWithCallback:]):
(-[WebAVAudioSessionHelper dealloc]):
(-[WebAVAudioSessionHelper interruption:]):

* platform/audio/mac/AudioDestinationMac.h: Add pausePlayback.

Allow tests to set media session restrictions.
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests: 

* media/video-concurrent-playback-expected.txt: Added.
* media/video-concurrent-playback.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: protocol generator should support integer-typed declarations
https://bugs.webkit.org/show_bug.cgi?id=126828

Reviewed by Joseph Pecoraro.

Add new binding classes for parameter/ad-hoc and normal integer type declarations.

* inspector/scripts/CodeGeneratorInspector.py:
(TypeBindings.create_type_declaration_):
(TypeBindings.create_type_declaration_.PlainInteger):
(TypeBindings.create_type_declaration_.PlainInteger.resolve_inner):
(TypeBindings.create_type_declaration_.PlainInteger.request_user_runtime_cast):
(TypeBindings.create_type_declaration_.PlainInteger.request_internal_runtime_cast):
(TypeBindings.create_type_declaration_.PlainInteger.get_code_generator):
(TypeBindings.create_type_declaration_.PlainInteger.get_validator_call_text):
(TypeBindings.create_type_declaration_.PlainInteger.reduce_to_raw_type):
(TypeBindings.create_type_declaration_.PlainInteger.get_type_model):
(TypeBindings.create_type_declaration_.PlainInteger.get_setter_value_expression_pattern):
(TypeBindings.create_type_declaration_.PlainInteger.get_array_item_c_type_text):
(TypeBindings.create_type_declaration_.TypedefInteger):
(TypeBindings.create_type_declaration_.TypedefInteger.resolve_inner):
(TypeBindings.create_type_declaration_.TypedefInteger.request_user_runtime_cast):
(TypeBindings.create_type_declaration_.TypedefInteger.request_internal_runtime_cast):
(TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator):
(TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator):
(TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator.generate_type_builder):
(TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator.generate_type_builder.int):
(TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator.register_use):
(TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator.get_generate_pass_id):
(TypeBindings.create_type_declaration_.TypedefInteger.get_validator_call_text):
(TypeBindings.create_type_declaration_.TypedefInteger.reduce_to_raw_type):
(TypeBindings.create_type_declaration_.TypedefInteger.get_type_model):
(TypeBindings.create_type_declaration_.TypedefInteger.get_setter_value_expression_pattern):
(TypeBindings.create_type_declaration_.TypedefInteger.get_array_item_c_type_text):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
r161638 broke the Windows build
https://bugs.webkit.org/show_bug.cgi?id=126916

* DerivedSources.make:

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

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add missing
    exports needed for Windows build after r161899.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add uint8_t specialization for WebCore::writeLittleEndian()
https://bugs.webkit.org/show_bug.cgi?id=126924

Reviewed by Darin Adler.

Specialize WebCore::writeLittleEndian() for datatype uint8_t so as to avoid
a compiler warning when right shifting a uint8_t by 8 because the result of
such a computation is undefined.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::writeLittleEndian<uint8_t>): Added.

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