Try to stop asserts in debug build.

* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r165544 and r165560.

It broke EFL/GTK/Windows build

Reverted changesets:

"Optimize hasTagName when called on an HTMLElement"
https://bugs.webkit.org/show_bug.cgi?id=130090
http://trac.webkit.org/changeset/165544

http://trac.webkit.org/changeset/165560

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r165536.

It breaks http/tests/media/media-play-stream-chunked-icy.html

Reverted changeset:

"[GStreamer] WebKit gets stalled when trying to play a stream"
https://bugs.webkit.org/show_bug.cgi?id=125926
http://trac.webkit.org/changeset/165536

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add remote control command support to MediaSession.
https://bugs.webkit.org/show_bug.cgi?id=129903

Reviewed by Eric Carlson.

Add the capability to receive remote control commands (currently iOS only) and to
pass those commands through the MediaSessionManager.

Add a new platform class which can listen for remote control commands:
* platform/RemoteCommandListener.cpp: Added.
(WebCore::RemoteCommandListener::create):
* platform/RemoteCommandListener.h: Added.
(WebCore::RemoteCommandListenerClient::~RemoteCommandListenerClient):
(WebCore::RemoteCommandListener::~RemoteCommandListener):
(WebCore::RemoteCommandListener::RemoteCommandListener):
* platform/ios/RemoteCommandListenerIOS.h: Added.
* platform/ios/RemoteCommandListenerIOS.mm: Added.
(WebCore::RemoteCommandListener::create):
(WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS):
(WebCore::RemoteCommandListenerIOS::~RemoteCommandListenerIOS):

Handle remote control command events in HTMLMediaElement and AudioDestinationMac:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* platform/audio/mac/AudioDestinationMac.h:
(WebCore::AudioDestinationMac::canReceiveRemoteControlCommands):
(WebCore::AudioDestinationMac::didReceiveRemoteControlCommand):

Pipe command events through MediaSessionManager:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::canReceiveRemoteControlCommands):
(WebCore::MediaSession::didReceivRemoteControlCommand):
* platform/audio/MediaSession.h:
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::addSession):
(WebCore::MediaSessionManager::removeSession):
(WebCore::MediaSessionManager::sessionWillBeginPlayback):
(WebCore::MediaSessionManager::didReceiveRemoteControlCommand):
(WebCore::MediaSessionManager::addClient):
(WebCore::MediaSessionManager::removeClient):
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManagerClient::~MediaSessionManagerClient):
(WebCore::MediaSessionManagerClient::MediaSessionManagerClient):

Make sessionWillBegin/EndPlayback() methods take non-const parameters:
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManager::sessionWillEndPlayback):
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManagerIOS::sessionWillBeginPlayaback):
(WebCore::MediaSessionManagerIOS::sessionWillEndPlayaback):

Add new files and export new symbols:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FTL should support IsBlah
https://bugs.webkit.org/show_bug.cgi?id=130202

Source/JavaScriptCore: 

Reviewed by Geoffrey Garen.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileIsUndefined):
(JSC::FTL::LowerDFGToLLVM::compileIsBoolean):
(JSC::FTL::LowerDFGToLLVM::compileIsNumber):
(JSC::FTL::LowerDFGToLLVM::compileIsString):
(JSC::FTL::LowerDFGToLLVM::compileIsObject):
(JSC::FTL::LowerDFGToLLVM::compileIsFunction):
(JSC::FTL::LowerDFGToLLVM::compileStoreBarrier):
(JSC::FTL::LowerDFGToLLVM::compileStoreBarrierWithNullCheck):
(JSC::FTL::LowerDFGToLLVM::isNotCellOrMisc):
(JSC::FTL::LowerDFGToLLVM::isNumber):
(JSC::FTL::LowerDFGToLLVM::isNotNumber):
(JSC::FTL::LowerDFGToLLVM::isBoolean):
* ftl/FTLOSRExitCompiler.cpp:
* tests/stress/is-undefined-exit-on-masquerader.js: Added.
(bar):
(foo):
(test):
* tests/stress/is-undefined-jettison-on-masquerader.js: Added.
(foo):
(test):
* tests/stress/is-undefined-masquerader.js: Added.
(foo):
(test):

Tools: 

Reviewed by Geoffrey Garen.
        
Running existing JSRegress tests with noInline gives us coverage for these
changes. Chances are, this will also give coverage for other interesting things
as well.

* Scripts/run-jsc-stress-tests:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WebKit2] block selection should avoid large blocks.
https://bugs.webkit.org/show_bug.cgi?id=130208
<rdar://problem/16251785>

Reviewed by Benjamin Poulain.

When creating a block selection, we should discard blocks that
are larger than most of the visible portion of the document.
This prevents the accidental selection the entire document, which
is fairly common when tapping over empty areas.

* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h: Removed selectionRects that was not really needed and
added isSelectable to indicate whether the selection can start.
(WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView hasSelectablePositionAtPoint:]): Now uses isSelectable.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation): Takes into account the userSelect property
to figure out if the element can be selected and discards blocks that are
larger than 97% of the visible area of the document.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Do not show extended background during a pinch gesture on iOS
https://bugs.webkit.org/show_bug.cgi?id=130152
-and corresponding-
<rdar://problem/16303819>

Reviewed by Simon Fraser.

This patch refactors the backgroundColor-setting logic into its own method so that 
it can be called from both _didCommitLayerTree and scrollViewDidZoom.

Only set the UIScrollView’s background color when the zoomScale is greater than or 
equal to the minimumZoomScale. Also do not set it during the zoom bounce 
animation. Otherwise, clear the background color by setting it to nil.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView updateScrollViewBackground]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView scrollViewDidZoom:]):



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