WebKit-https.git
4 years agoAdd myself to watchlist
mcatanzaro@igalia.com [Wed, 22 Apr 2015 15:05:51 +0000 (15:05 +0000)]
Add myself to watchlist
https://bugs.webkit.org/show_bug.cgi?id=144041

Reviewed by Alex Christensen.

Add myself watching CMake, GtkWebKit2PublicAPI, SoupNetwork, and WebKitGTKTranslations.

* Scripts/webkitpy/common/config/watchlist:

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

4 years ago[GTK] Gardening 21st April.
commit-queue@webkit.org [Wed, 22 Apr 2015 12:18:41 +0000 (12:18 +0000)]
[GTK] Gardening 21st April.
https://bugs.webkit.org/show_bug.cgi?id=143982.

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-04-22

* platform/gtk/TestExpectations:

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

4 years ago[GTK] MiniBrowser should use NetworkProcess by default
carlosgc@webkit.org [Wed, 22 Apr 2015 12:13:22 +0000 (12:13 +0000)]
[GTK] MiniBrowser should use NetworkProcess by default
https://bugs.webkit.org/show_bug.cgi?id=143948

Reviewed by Sergio Villar Senin.

Use WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES by default
unless MINIBROWSER_SINGLEPROCESS environment variable is present.

* MiniBrowser/gtk/main.c:
(main):

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

4 years agoRename hasOverride{Height,Width}() to hasOverrideLogicalContent{Height,Width}()
rego@igalia.com [Wed, 22 Apr 2015 10:31:24 +0000 (10:31 +0000)]
Rename hasOverride{Height,Width}() to hasOverrideLogicalContent{Height,Width}()
https://bugs.webkit.org/show_bug.cgi?id=143984

Reviewed by Darin Adler.

This patch is renaming these LayoutBox methods, because of their names
don't match with the getters and setters, which is confusing. Specially
now that we also have hasOverrideContainingBlockLogical{Height,Width}().

No new tests (this is just a refactoring).

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateRubyForJustifiedText):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::hasOverrideLogicalContentHeight):
(WebCore::RenderBox::hasOverrideLogicalContentWidth):
(WebCore::RenderBox::overrideLogicalContentWidth):
(WebCore::RenderBox::overrideLogicalContentHeight):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::contentWidthForChild):
(WebCore::contentHeightForChild):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::adjustInlineDirectionLineBounds):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 22 Apr 2015 06:46:04 +0000 (06:46 +0000)]
Versioning.

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

4 years ago[Mac][MediaSource] Crash when SourceBuffer::provideMediaData() is called re-entrantly.
jer.noble@apple.com [Wed, 22 Apr 2015 05:10:39 +0000 (05:10 +0000)]
[Mac][MediaSource] Crash when SourceBuffer::provideMediaData() is called re-entrantly.
https://bugs.webkit.org/show_bug.cgi?id=144023

Reviewed by Eric Carlson.

Fixes non-deterministic crash in media/media-source/media-source-stalled-holds-sleep-assertion.html.

Platform changes have introduced a re-entrancy to provideMediaData().  Calling
SourceBufferPrivate::enqueueSample() can result in a re-entrant call back into
SourceBuffer::provideMediaData(). To protect against this, wrap the client call
from SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples() to
SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples() in a dispatch_async() to the
main thread. This gives the original provideMediaData() a chance to finish before the next
one begins.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):

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

4 years ago[Mac] Use one playback target for all web processes
eric.carlson@apple.com [Wed, 22 Apr 2015 04:06:57 +0000 (04:06 +0000)]
[Mac] Use one playback target for all web processes
https://bugs.webkit.org/show_bug.cgi?id=144009

Reviewed by Tim Horton.

Source/WebCore:

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateWirelessPlaybackStatus): Drive-by fix to show controls when
    we show the placeholder image.

Instead of having each Page/Document pair manage access to the playback target for the videos
in a web process, put all of the logic into a new class - WebMediaSessionManager. A singleton
instance talks to the target picker and manages video element access for all web processes.
All playback target logic was removed from Document, Page, and MediaSessionManager.

* Modules/mediasession: Added.
* Modules/mediasession/WebMediaSessionManager.cpp: Added.
(WebCore::ClientState::ClientState):
(WebCore::flagsAreSet):
(WebCore::WebMediaSessionManager::WebMediaSessionManager):
(WebCore::WebMediaSessionManager::~WebMediaSessionManager):
(WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient):
(WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient):
(WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients):
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
(WebCore::WebMediaSessionManager::clientStateDidChange):
(WebCore::WebMediaSessionManager::setPlaybackTarget):
(WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange):
(WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring):
(WebCore::WebMediaSessionManager::taskTimerFired):
(WebCore::WebMediaSessionManager::find):
(WebCore::WebMediaSessionManager::forEachClient):
* Modules/mediasession/WebMediaSessionManager.h: Added.
* Modules/mediasession/WebMediaSessionManagerClient.h: Added.
(WebCore::WebMediaSessionManagerClient::~WebMediaSessionManagerClient):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::mediaState): Replaces isPlayingAudio.
(WebCore::AudioContext::isPlayingAudio): Deleted.
* Modules/webaudio/AudioContext.h:
* WebCore.xcodeproj/project.pbxproj: Added new files.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::addAudioProducer): Take a MediaProducer instead of an AudioProducer.
(WebCore::Document::removeAudioProducer):
(WebCore::Document::updateIsPlayingMedia):
(WebCore::nextPlaybackTargetClientContextId):
(WebCore::Document::addPlaybackTargetPickerClient):
(WebCore::Document::removePlaybackTargetPickerClient):
(WebCore::Document::showPlaybackTargetPicker):
(WebCore::Document::playbackTargetPickerClientStateDidChange):
(WebCore::Document::playbackTargetAvailabilityDidChange):
(WebCore::Document::setPlaybackTarget):
(WebCore::Document::setShouldPlayToPlaybackTarget):
(WebCore::Document::configurePlaybackTargetMonitoring): Deleted.
(WebCore::Document::requiresPlaybackTargetRouteMonitoring): Deleted.
(WebCore::Document::didChoosePlaybackTarget): Deleted.
* dom/Document.h:
(WebCore::Document::mediaState):
(WebCore::Document::isPlayingAudio): Deleted.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::registerWithDocument):
(WebCore::HTMLMediaSession::unregisterWithDocument):
(WebCore::HTMLMediaSession::showPlaybackTargetPicker):
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
(WebCore::HTMLMediaSession::setPlaybackTarget):
(WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
(WebCore::HTMLMediaSession::setShouldPlayToPlaybackTarget):
(WebCore::HTMLMediaSession::mediaStateDidChange):
(WebCore::HTMLMediaSession::didChoosePlaybackTarget): Deleted.
(WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted.
(WebCore::HTMLMediaSession::startPlayingToPlaybackTarget): Deleted.
(WebCore::HTMLMediaSession::stopPlayingToPlaybackTarget): Deleted.
* html/HTMLMediaSession.h:
* page/AudioProducer.h: Removed.
* page/ChromeClient.h:
* page/MediaProducer.h: Copied from Source/WebCore/page/AudioProducer.h.
(WebCore::MediaProducer::~MediaProducer):
(WebCore::AudioProducer::~AudioProducer): Deleted.
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::updateIsPlayingMedia):
(WebCore::Page::addPlaybackTargetPickerClient):
(WebCore::Page::removePlaybackTargetPickerClient):
(WebCore::Page::showPlaybackTargetPicker):
(WebCore::Page::playbackTargetPickerClientStateDidChange):
(WebCore::Page::setPlaybackTarget):
(WebCore::Page::playbackTargetAvailabilityDidChange):
(WebCore::Page::setShouldPlayToPlaybackTarget):
(WebCore::Page::playbackTarget): Deleted.
(WebCore::Page::didChoosePlaybackTarget): Deleted.
(WebCore::Page::configurePlaybackTargetMonitoring): Deleted.
* page/Page.h:
(WebCore::Page::mediaState):
(WebCore::Page::isPlayingAudio): Deleted.
(WebCore::Page::hasWirelessPlaybackTarget): Deleted.
* platform/audio/MediaSession.h:
(WebCore::MediaSession::isPlayingToWirelessPlaybackTarget):
(WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
(WebCore::MediaSessionClient::setShouldPlayToPlaybackTarget):
(WebCore::MediaSession::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaSession::stopPlayingToPlaybackTarget): Deleted.
(WebCore::MediaSessionClient::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaSessionClient::stopPlayingToPlaybackTarget): Deleted.
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::sessionWillBeginPlayback):
(WebCore::MediaSessionManager::sessionCanLoadMedia):
(WebCore::MediaSessionManager::sessionShouldBeginPlayingToWirelessPlaybackTarget): Deleted.
* platform/audio/MediaSessionManager.h:
* platform/graphics/MediaPlaybackTargetClient.h: Copied from Source/WebCore/platform/graphics/MediaPlaybackTargetPickerClient.h.
(WebCore::MediaPlaybackTargetClient::~MediaPlaybackTargetClient):
(WebCore::MediaPlaybackTargetPickerClient::~MediaPlaybackTargetPickerClient): Deleted.
* platform/graphics/MediaPlaybackTargetPicker.cpp:
(WebCore::MediaPlaybackTargetPicker::showPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPicker::startingMonitoringPlaybackTargets):
(WebCore::MediaPlaybackTargetPicker::stopMonitoringPlaybackTargets):
* platform/graphics/MediaPlaybackTargetPicker.h:
* platform/graphics/MediaPlaybackTargetPickerClient.h: Removed.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayer::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayer::stopPlayingToPlaybackTarget): Deleted.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateInterface::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateInterface::stopPlayingToPlaybackTarget): Deleted.
* platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp: Added.
(WebCore::WebMediaSessionManagerMac::singleton):
(WebCore::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
(WebCore::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
(WebCore::WebMediaSessionManagerMac::targetPicker):
* platform/graphics/avfoundation/WebMediaSessionManagerMac.h: Added.
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateAVFoundationObjC::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationObjC::stopPlayingToPlaybackTarget): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::togglePlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::stopPlayingToPlaybackTarget): Deleted.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateQTKit::togglePlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateQTKit::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateQTKit::stopPlayingToPlaybackTarget): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::isPagePlayingAudio):

Source/WebKit/mac:

Update to use WebMediaSessionManager for playback target management.

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addPlaybackTargetPickerClient):
(WebChromeClient::removePlaybackTargetPickerClient):
(WebChromeClient::showPlaybackTargetPicker):
(WebChromeClient::playbackTargetPickerClientStateDidChange):
(WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
(WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
* WebView/WebMediaPlaybackTargetPicker.h:
* WebView/WebMediaPlaybackTargetPicker.mm:
(WebMediaPlaybackTargetPicker::addPlaybackTargetPickerClient):
(WebMediaPlaybackTargetPicker::removePlaybackTargetPickerClient):
(WebMediaPlaybackTargetPicker::showPlaybackTargetPicker):
(WebMediaPlaybackTargetPicker::playbackTargetPickerClientStateDidChange):
(WebMediaPlaybackTargetPicker::setPlaybackTarget):
(WebMediaPlaybackTargetPicker::externalOutputDeviceAvailableDidChange):
(WebMediaPlaybackTargetPicker::setShouldPlayToPlaybackTarget):
(WebMediaPlaybackTargetPicker::invalidate):
(WebMediaPlaybackTargetPicker::startingMonitoringPlaybackTargets): Deleted.
(WebMediaPlaybackTargetPicker::stopMonitoringPlaybackTargets): Deleted.
(WebMediaPlaybackTargetPicker::didChoosePlaybackTarget): Deleted.
(WebMediaPlaybackTargetPicker::targetPicker): Deleted.
* WebView/WebView.mm:
(-[WebView _addPlaybackTargetPickerClient:]):
(-[WebView _removePlaybackTargetPickerClient:]):
(-[WebView _showPlaybackTargetPicker:location:hasVideo:]):
(-[WebView _playbackTargetPickerClientStateDidChange:state:]):
(-[WebView _showPlaybackTargetPicker:hasVideo:]): Deleted.
(-[WebView _startingMonitoringPlaybackTargets]): Deleted.
(-[WebView _stopMonitoringPlaybackTargets]): Deleted.
* WebView/WebViewInternal.h:

Source/WebKit2:

Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
picker.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::isPlayingMediaDidChange):
(WebKit::WebPageProxy::addPlaybackTargetPickerClient):
(WebKit::WebPageProxy::removePlaybackTargetPickerClient):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
(WebKit::WebPageProxy::setPlaybackTarget):
(WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
(WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
(WebKit::WebPageProxy::devicePickerProxy): Deleted.
(WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
(WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
(WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isPlayingAudio):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::mediaSessionManager):
(WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
* UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
(WebKit::WebMediaSessionManagerMac::singleton):
(WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
(WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
(WebKit::WebMediaSessionManagerMac::targetPicker):
* UIProcess/mac/WebMediaSessionManagerMac.h: Added.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::isPlayingMediaDidChange):
(WebKit::WebChromeClient::addPlaybackTargetPickerClient):
(WebKit::WebChromeClient::removePlaybackTargetPickerClient):
(WebKit::WebChromeClient::showPlaybackTargetPicker):
(WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
(WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
(WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected):
(WebKit::WebPage::playbackTargetAvailabilityDidChange):
(WebKit::WebPage::setShouldPlayToPlaybackTarget):

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

4 years agoUnreviewed, fix 32-bit. Forgot to make this simple change to 32_64 as well.
fpizlo@apple.com [Wed, 22 Apr 2015 03:50:41 +0000 (03:50 +0000)]
Unreviewed, fix 32-bit. Forgot to make this simple change to 32_64 as well.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

4 years agoDFG should allow Phantoms after terminals
fpizlo@apple.com [Wed, 22 Apr 2015 03:38:17 +0000 (03:38 +0000)]
DFG should allow Phantoms after terminals
https://bugs.webkit.org/show_bug.cgi?id=126778

Reviewed by Mark Lam.

It's important for us to be able to place liveness-marking nodes after nodes that do
things. These liveness-marking nodes are nops. Previously, we disallowed such nodes after
terminals. That made things awkward, especially for Switch and Branch, which may do
things that necessitate liveness markers (for example they might want to use a converted
version of a value rather than the value that was MovHinted). We previously made this
work by disallowing certain optimizations on Switch and Branch, which was probably a bad
thing.

This changes our IR to allow for the terminal to not be the last node in a block. Asking
for the terminal involves a search. DFG::validate() checks that the nodes after the
terminal are liveness markers that have no effects or checks.

This is perf-neutral but will allow more optimizations in the future. It will also make
it cleaner to fix https://bugs.webkit.org/show_bug.cgi?id=143735.

* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::replaceTerminal):
* dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::findTerminal):
(JSC::DFG::BasicBlock::terminal):
(JSC::DFG::BasicBlock::insertBeforeTerminal):
(JSC::DFG::BasicBlock::numSuccessors):
(JSC::DFG::BasicBlock::successor):
(JSC::DFG::BasicBlock::successorForCondition):
(JSC::DFG::BasicBlock::successors):
(JSC::DFG::BasicBlock::last): Deleted.
(JSC::DFG::BasicBlock::takeLast): Deleted.
(JSC::DFG::BasicBlock::insertBeforeLast): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::SuccessorsIterable): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::iterator): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::operator*): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::operator++): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::operator==): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::operator!=): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::begin): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::end): Deleted.
* dfg/DFGBasicBlockInlines.h:
(JSC::DFG::BasicBlock::appendNonTerminal):
(JSC::DFG::BasicBlock::replaceTerminal):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::linkBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::CFGSimplificationPhase::run):
(JSC::DFG::CFGSimplificationPhase::convertToJump):
(JSC::DFG::CFGSimplificationPhase::mergeBlocks):
* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
* dfg/DFGCommon.h:
(JSC::DFG::NodeAndIndex::NodeAndIndex):
(JSC::DFG::NodeAndIndex::operator!):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupBlock):
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::injectTypeConversionsInBlock):
(JSC::DFG::FixupPhase::clearPhantomsAtEnd): Deleted.
* dfg/DFGForAllKills.h:
(JSC::DFG::forAllLiveNodesAtTail):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::terminalsAreValid):
(JSC::DFG::Graph::dumpBlockHeader):
* dfg/DFGGraph.h:
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::mergeToSuccessors):
* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::run):
(JSC::DFG::LICMPhase::attemptHoist):
* dfg/DFGMovHintRemovalPhase.cpp:
* dfg/DFGNode.h:
(JSC::DFG::Node::SuccessorsIterable::SuccessorsIterable):
(JSC::DFG::Node::SuccessorsIterable::iterator::iterator):
(JSC::DFG::Node::SuccessorsIterable::iterator::operator*):
(JSC::DFG::Node::SuccessorsIterable::iterator::operator++):
(JSC::DFG::Node::SuccessorsIterable::iterator::operator==):
(JSC::DFG::Node::SuccessorsIterable::iterator::operator!=):
(JSC::DFG::Node::SuccessorsIterable::begin):
(JSC::DFG::Node::SuccessorsIterable::end):
(JSC::DFG::Node::successors):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::determineMaterializationPoints):
(JSC::DFG::ObjectAllocationSinkingPhase::placeMaterializationPoints):
(JSC::DFG::ObjectAllocationSinkingPhase::promoteSunkenFields):
* dfg/DFGPhantomRemovalPhase.cpp:
(JSC::DFG::PhantomRemovalPhase::run):
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStaticExecutionCountEstimationPhase.cpp:
(JSC::DFG::StaticExecutionCountEstimationPhase::run):
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
* tests/stress/closure-call-exit.js: Added.
(foo):

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

4 years agoWKWebsiteDataStore doesn't track and remove IndexedDB databases
andersca@apple.com [Wed, 22 Apr 2015 02:46:45 +0000 (02:46 +0000)]
WKWebsiteDataStore doesn't track and remove IndexedDB databases
https://bugs.webkit.org/show_bug.cgi?id=144032
rdar://problem/20242856

Reviewed by Tim Horton.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::fetchWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseProcess.messages.in:
* Shared/WebsiteData/WebsiteDataTypes.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::generateCallbackID):
(WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
(WebKit::DatabaseProcessProxy::fetchWebsiteData):
(WebKit::DatabaseProcessProxy::deleteWebsiteData):
(WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::DatabaseProcessProxy::didClose):
(WebKit::DatabaseProcessProxy::didFetchWebsiteData):
(WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
(WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Databases/DatabaseProcessProxy.messages.in:
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):

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

4 years agoWeb Inspector: Use String.prototype.startsWith in more places
commit-queue@webkit.org [Wed, 22 Apr 2015 02:37:07 +0000 (02:37 +0000)]
Web Inspector: Use String.prototype.startsWith in more places
https://bugs.webkit.org/show_bug.cgi?id=144025

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-21
Reviewed by Timothy Hatcher.

* UserInterface/Models/Gradient.js:
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):

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

4 years agoAdd JetStream to PerformanceTests
rniwa@webkit.org [Wed, 22 Apr 2015 02:30:22 +0000 (02:30 +0000)]
Add JetStream to PerformanceTests
https://bugs.webkit.org/show_bug.cgi?id=144024

Rubber-stamped by Filip Pizlo.

* JetStream: Added.
* JetStream/JetStream-Logo.png: Added.
* JetStream/JetStream-Logo@2x.png: Added.
* JetStream/JetStream.css: Added.
* JetStream/JetStreamDriver.js: Added.
* JetStream/LICENSE.txt: Added.
* JetStream/LLVM-test-suite-LICENSE.txt: Added.
* JetStream/Octane: Added.
* JetStream/Octane/base.js: Added.
* JetStream/Octane/code-load.js: Added.
* JetStream/Octane2: Added.
* JetStream/Octane2/base.js: Added.
* JetStream/Octane2/box2d.js: Added.
* JetStream/Octane2/code-load.js: Added.
* JetStream/Octane2/crypto.js: Added.
* JetStream/Octane2/deltablue.js: Added.
* JetStream/Octane2/earley-boyer.js: Added.
* JetStream/Octane2/gbemu-part1.js: Added.
* JetStream/Octane2/gbemu-part2.js: Added.
* JetStream/Octane2/mandreel.js: Added.
* JetStream/Octane2/navier-stokes.js: Added.
* JetStream/Octane2/pdfjs.js: Added.
* JetStream/Octane2/raytrace.js: Added.
* JetStream/Octane2/regexp.js: Added.
* JetStream/Octane2/richards.js: Added.
* JetStream/Octane2/run.js: Added.
* JetStream/Octane2/splay.js: Added.
* JetStream/Octane2/typescript-compiler.js: Added.
* JetStream/Octane2/typescript-input.js: Added.
* JetStream/Octane2/typescript.js: Added.
* JetStream/Octane2/zlib-data.js: Added.
* JetStream/Octane2/zlib.js: Added.
* JetStream/Octane2Setup.js: Added.
* JetStream/OctaneSetup.js: Added.
* JetStream/README: Added.
* JetStream/Reference.js: Added.
* JetStream/SimpleSetup.js: Added.
* JetStream/SunSpiderSetup.js: Added.
* JetStream/Swoosh.png: Added.
* JetStream/Swoosh@2x.png: Added.
* JetStream/TestingSetup.js: Added.
* JetStream/create.rb: Added.
* JetStream/docs: Added.
* JetStream/docs/JetStreamBlogPost.html: Added.
* JetStream/in-depth-TEMPLATE.html: Added.
* JetStream/index-TEMPLATE.html: Added.
* JetStream/simple: Added.
* JetStream/simple/bigfib.cpp: Added.
* JetStream/simple/bigfib.cpp.js: Added.
* JetStream/simple/container.cpp: Added.
* JetStream/simple/container.cpp.js: Added.
* JetStream/simple/dry.c: Added.
* JetStream/simple/dry.c.js: Added.
* JetStream/simple/float-mm.c: Added.
* JetStream/simple/float-mm.c.js: Added.
* JetStream/simple/gcc-loops.cpp: Added.
* JetStream/simple/gcc-loops.cpp.js: Added.
* JetStream/simple/hash-map.js: Added.
* JetStream/simple/n-body.c: Added.
* JetStream/simple/n-body.c.js: Added.
* JetStream/simple/quicksort.c: Added.
* JetStream/simple/quicksort.c.js: Added.
* JetStream/simple/towers.c: Added.
* JetStream/simple/towers.c.js: Added.
* JetStream/sunspider: Added.
* JetStream/sunspider/3d-cube.js: Added.
* JetStream/sunspider/3d-raytrace.js: Added.
* JetStream/sunspider/base64.js: Added.
* JetStream/sunspider/cordic.js: Added.
* JetStream/sunspider/crypto-aes.js: Added.
* JetStream/sunspider/crypto-md5.js: Added.
* JetStream/sunspider/crypto-sha1.js: Added.
* JetStream/sunspider/date-format-tofte.js: Added.
* JetStream/sunspider/date-format-xparb.js: Added.
* JetStream/sunspider/n-body.js: Added.
* JetStream/sunspider/regex-dna.js: Added.
* JetStream/sunspider/tagcloud.js: Added.

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

4 years agoAdd module maps for WebKit
andersca@apple.com [Wed, 22 Apr 2015 01:17:08 +0000 (01:17 +0000)]
Add module maps for WebKit
https://bugs.webkit.org/show_bug.cgi?id=144026
rdar://problem/19665428

Reviewed by Dan Bernstein.

* Configurations/WebKit.xcconfig:
* Modules/OSX.modulemap: Added.
* Modules/iOS.modulemap: Added.

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

4 years ago[iOS] When computing visible rects for tiling, stop searching at UIWindows
mmaxfield@apple.com [Wed, 22 Apr 2015 00:51:07 +0000 (00:51 +0000)]
[iOS] When computing visible rects for tiling, stop searching at UIWindows
https://bugs.webkit.org/show_bug.cgi?id=144022
<rdar://problem/18327227>

Reviewed by Simon Fraser.

[WAKWindow _visibleRectRespectingMasksToBounds:] computes a visible rect which we use
to determine which tiles to create. We do this by finding the frame of the _hostLayer,
and then walking up the CALayer hierarchy converting each rect into its parent's
coordinate system (all the while clipping to bounds if necessary). This walk up the
layer hierarchy should stop at a layer associated with a UIWindow.

* platform/ios/wak/WAKWindow.mm:
(-[WAKWindow _visibleRectRespectingMasksToBounds:]):

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

4 years ago[Cairo] Implement Path::addPath
jinwoo7.song@samsung.com [Wed, 22 Apr 2015 00:38:04 +0000 (00:38 +0000)]
[Cairo] Implement Path::addPath
https://bugs.webkit.org/show_bug.cgi?id=130580

Reviewed by Dirk Schulze.

Source/WebCore:

Add support for addPath method for ports using cairo.
This patch is originally authored by Jae Hyun Park <jaepark@webkit.org>.

Test: fast/canvas/canvas-path-addPath.html

* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::addPath): Implement addPath for cairo.

LayoutTests:

Enable addPath testcase in EFL port.

* platform/efl/TestExpectations:

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

4 years agoFix the iOS build.
timothy_horton@apple.com [Wed, 22 Apr 2015 00:24:18 +0000 (00:24 +0000)]
Fix the iOS build.

* platform/spi/cg/CoreGraphicsSPI.h:

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

4 years agoSVGAnimateElementBase::calculateAnimatedValue() asserts when reinserting an SVG anima...
commit-queue@webkit.org [Wed, 22 Apr 2015 00:13:54 +0000 (00:13 +0000)]
SVGAnimateElementBase::calculateAnimatedValue() asserts when reinserting an SVG animating element within the same animation limits
https://bugs.webkit.org/show_bug.cgi?id=143994

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-04-21
Reviewed by Simon Fraser.

Source/WebCore:

Make sure the SVG animation variables are reset cleanly such that if the
animation restarts it can rebuild its limit values reliably and correctly.

Tests: svg/animations/crash-reinsert-animate-length-same-limits.svg
       svg/animations/crash-reinsert-animate-transform-same-limits.svg

* svg/SVGAnimateElementBase.h:
* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::resetAnimatedPropertyType):
Call the base class resetAnimatedPropertyType() from the derived class.

* svg/SVGAnimationElement.h:
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::resetAnimatedPropertyType):
Make resetAnimatedPropertyType() virtual. The implementation of the base
class of this function resets the values of the animation limits. When
updateAnimation() is called, it will be forced to recalculate the animation
limits by calling calculateFromAndToValues() even if the limits have not
changed.

LayoutTests:

* svg/animations/crash-reinsert-animate-length-same-limits-expected.txt: Added.
* svg/animations/crash-reinsert-animate-length-same-limits.svg: Added.
* svg/animations/crash-reinsert-animate-transform-same-limits-expected.txt: Added.
* svg/animations/crash-reinsert-animate-transform-same-limits.svg: Added.
Make sure when removing an SVG animating element and reinserting it back
within the same animation length or transform limits, we do not crash.

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

4 years ago[EFL] Unreviewed gardening
jinwoo7.song@samsung.com [Wed, 22 Apr 2015 00:04:51 +0000 (00:04 +0000)]
[EFL] Unreviewed gardening

Update test expectations for failing tests.

* platform/efl/fast/multicol/span/span-as-immediate-columns-child-expected.png: Rebaseline after r177774.
* platform/efl/fast/multicol/span/span-as-immediate-columns-child-expected.txt: Ditto.
* platform/efl/fast/repaint/selection-ruby-rl-expected.txt: Added. Ditto.
* platform/efl/fast/text/decorations-with-text-combine-expected.png:
* platform/efl/fast/text/decorations-with-text-combine-expected.txt:
* platform/efl/mathml/opentype/horizontal-expected.txt: Rebaseline after r174540.
* platform/efl/svg/text/textPathBoundsBug-expected.png: Rebaselined after r177774.
* platform/efl/svg/text/textPathBoundsBug-expected.txt: Added. Ditto.

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

4 years agoLong pause under _takeViewSnapshot when screen updates are disabled
timothy_horton@apple.com [Tue, 21 Apr 2015 23:25:00 +0000 (23:25 +0000)]
Long pause under _takeViewSnapshot when screen updates are disabled
https://bugs.webkit.org/show_bug.cgi?id=144017
<rdar://problem/20548397>

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
the next commit, and can succeed while screen updates are disabled
without blocking.

* platform/spi/cg/CoreGraphicsSPI.h:
Add some SPI.

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

4 years agoUnreviewed, rolling out r183077.
commit-queue@webkit.org [Tue, 21 Apr 2015 23:23:55 +0000 (23:23 +0000)]
Unreviewed, rolling out r183077.
https://bugs.webkit.org/show_bug.cgi?id=144021

broke a bunch of tests, bfulgham is going to try again
(Requested by thorton on #webkit).

Reverted changeset:

"Context menu doesn't account for selection semantics"
https://bugs.webkit.org/show_bug.cgi?id=143958
http://trac.webkit.org/changeset/183077

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

4 years ago[WK2][NetworkCache] Better account of resource revalidations in efficacy logging
cdumez@apple.com [Tue, 21 Apr 2015 23:20:32 +0000 (23:20 +0000)]
[WK2][NetworkCache] Better account of resource revalidations in efficacy logging
https://bugs.webkit.org/show_bug.cgi?id=144014

Reviewed by Antti Koivisto.

Source/WebCore:

Add additional diagnostic logging key for network cache efficacy
logging.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::needsRevalidationKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Better account of resource revalidations in efficacy logging.
Prevously, resources that were in the cache but needed revalidation
were counted as retrieval successes, which is not entirely accurate.

We now distinguish "is in the cache and is directly usable" from
"is in the cache but needs revalidation". We also log how many of these
revalidations are successful.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::update):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
(WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
* NetworkProcess/cache/NetworkCacheStatistics.h:

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

4 years ago[Cocoa] Framework header postprocessing should respect additional definitions
mitz@apple.com [Tue, 21 Apr 2015 23:07:59 +0000 (23:07 +0000)]
[Cocoa] Framework header postprocessing should respect additional definitions
https://bugs.webkit.org/show_bug.cgi?id=144018

Reviewed by Anders Carlsson.

* mac/postprocess-framework-headers.sh: Read definitons from
/usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
sed.

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

4 years agoPhantomNewObject should be marked NodeMustGenerate
commit-queue@webkit.org [Tue, 21 Apr 2015 22:29:16 +0000 (22:29 +0000)]
PhantomNewObject should be marked NodeMustGenerate
https://bugs.webkit.org/show_bug.cgi?id=143974

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-21
Reviewed by Filip Pizlo.

* dfg/DFGNode.h:
(JSC::DFG::Node::convertToPhantomNewObject):
Was not properly marking NodeMustGenerate when converting.

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

4 years agoContext menu doesn't account for selection semantics
bfulgham@apple.com [Tue, 21 Apr 2015 22:01:52 +0000 (22:01 +0000)]
Context menu doesn't account for selection semantics
https://bugs.webkit.org/show_bug.cgi?id=143958
<rdar://problem/19735706>

Reviewed by Tim Horton.

Before using the default word-only selection, check with the
lookup service to see if we can get a semantically appropriate
selection.

* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
(WebCore::EventHandler::selectClosestWordFromHitTestResult):
* page/EventHandler.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):

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

4 years agoDFG Call/ConstructForwardVarargs fails to restore the stack pointer
fpizlo@apple.com [Tue, 21 Apr 2015 20:55:45 +0000 (20:55 +0000)]
DFG Call/ConstructForwardVarargs fails to restore the stack pointer
https://bugs.webkit.org/show_bug.cgi?id=144007

Reviewed by Mark Lam.

We were conditioning the stack pointer restoration on isVarargs, but we also need to do it
if isForwardVarargs.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* tests/stress/varargs-then-slow-call.js: Added.
(foo):
(bar):
(fuzz):
(baz):

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

4 years ago[EFL] Unreviewed gardening on 22th April
gyuyoung.kim@webkit.org [Tue, 21 Apr 2015 20:37:58 +0000 (20:37 +0000)]
[EFL] Unreviewed gardening on 22th April

Mark 3 compositing tests to image only failure. Additionally move
wrong categorized 2 tests to a correct place.

* platform/efl/TestExpectations:

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

4 years agoGet rid of an unneeded function from LoaderNSURLExtras.mm
andersca@apple.com [Tue, 21 Apr 2015 20:32:34 +0000 (20:32 +0000)]
Get rid of an unneeded function from LoaderNSURLExtras.mm
https://bugs.webkit.org/show_bug.cgi?id=144003

Reviewed by Chris Dumez.

Just use Vector::contains instead of vectorContainsString.

* loader/mac/LoaderNSURLExtras.mm:
(suggestedFilenameWithMIMEType):
(vectorContainsString): Deleted.

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

4 years agoRemove AllocationProfileWatchpoint node
commit-queue@webkit.org [Tue, 21 Apr 2015 20:23:50 +0000 (20:23 +0000)]
Remove AllocationProfileWatchpoint node
https://bugs.webkit.org/show_bug.cgi?id=143999

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-21
Reviewed by Filip Pizlo.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasCellOperand):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::WatchpointCollectionPhase::handle):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
* runtime/JSFunction.h:
(JSC::JSFunction::rareData):
(JSC::JSFunction::allocationProfileWatchpointSet): Deleted.

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

4 years agoMovHint should be a strong use
fpizlo@apple.com [Tue, 21 Apr 2015 20:16:18 +0000 (20:16 +0000)]
MovHint should be a strong use
https://bugs.webkit.org/show_bug.cgi?id=143734

Reviewed by Geoffrey Garen.

This disables any DCE that assumes equivalence between DFG IR uses and bytecode uses. Doing
so is a major step towards allowing more fancy DFG transformations and also probably fixing
some bugs.

Just making MovHint a strong use would also completely disable DCE. So we mitigate this by
introducing a MovHint removal phase that runs in FTL.

This is a slight slowdown on Octane/gbemu, but it's basically neutral on suite averages.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeOrigin.cpp:
(JSC::InlineCallFrame::dumpInContext):
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::fixupBlock):
* dfg/DFGDisassembler.cpp:
(JSC::DFG::Disassembler::createDumpList):
* dfg/DFGEpoch.cpp: Added.
(JSC::DFG::Epoch::dump):
* dfg/DFGEpoch.h: Added.
(JSC::DFG::Epoch::Epoch):
(JSC::DFG::Epoch::first):
(JSC::DFG::Epoch::operator!):
(JSC::DFG::Epoch::next):
(JSC::DFG::Epoch::bump):
(JSC::DFG::Epoch::operator==):
(JSC::DFG::Epoch::operator!=):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGMovHintRemovalPhase.cpp: Added.
(JSC::DFG::performMovHintRemoval):
* dfg/DFGMovHintRemovalPhase.h: Added.
* dfg/DFGNodeType.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* runtime/Options.h:

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

4 years agoUse grep instead of any in prepare-ChangeLog, to avoid Windows compatibility issues.
matthew_hanson@apple.com [Tue, 21 Apr 2015 20:06:17 +0000 (20:06 +0000)]
Use grep instead of any in prepare-ChangeLog, to avoid Windows compatibility issues.

Unreviewed build fix.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_cpp):
Use grep instead of any to determine if a string is an element of an array.

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

4 years agoFix block signatures
andersca@apple.com [Tue, 21 Apr 2015 19:30:33 +0000 (19:30 +0000)]
Fix block signatures
https://bugs.webkit.org/show_bug.cgi?id=144002

Reviewed by Andreas Kling.

Source/WebKit2:

* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
(-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
(-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):

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

4 years agoREGRESSION (r182899): icloud.com crashes
commit-queue@webkit.org [Tue, 21 Apr 2015 18:50:16 +0000 (18:50 +0000)]
REGRESSION (r182899): icloud.com crashes
https://bugs.webkit.org/show_bug.cgi?id=143960

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-21
Reviewed by Filip Pizlo.

* runtime/JSFunction.h:
(JSC::JSFunction::allocationStructure):
* tests/stress/dfg-rare-data.js: Added.
(F): Regression test

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

4 years agoPDFs still don't snapshot properly in iOS Safari
timothy_horton@apple.com [Tue, 21 Apr 2015 18:01:15 +0000 (18:01 +0000)]
PDFs still don't snapshot properly in iOS Safari
https://bugs.webkit.org/show_bug.cgi?id=143976
<rdar://problem/18283459>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didLayoutForCustomContentProvider):
* UIProcess/WebPageProxy.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
Inform the client that we've passed all reasonable layout milestones
as soon as the custom content provider has been handed its data.
WKPDFView, the only custom content provider, synchronously lays out
its subviews upon initial receipt of data, so this works fine for it.
This ensures that clients that normally depend on layout milestones firing
won't break when a custom content view is installed.

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
Fall back to renderInContext: if the custom content view is not parented
when a snapshot is requested.

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

4 years agoCrash in JSC::Interpreter::execute
msaboff@apple.com [Tue, 21 Apr 2015 17:57:15 +0000 (17:57 +0000)]
Crash in JSC::Interpreter::execute
https://bugs.webkit.org/show_bug.cgi?id=142625

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

We need to keep the FunctionExecutables in the code block for the eval flavor of
Interpreter::execute() in order to create the scope used to eval.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::jettisonFunctionDeclsAndExprs): Deleted.
* bytecode/CodeBlock.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::registerFrozenValues):

LayoutTests:

New regression test.

* js/regress-142625-expected.txt: Added.
* js/regress-142625.html: Added.
* js/script-tests/regress-142625.js: Added.

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

4 years agoMerged WKBackForwardListItem’s Internal category into the class extension in WKBackFo...
mitz@apple.com [Tue, 21 Apr 2015 17:11:44 +0000 (17:11 +0000)]
Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem _item]):
(-[WKBackForwardListItem _apiObject]):
* UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:

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

4 years agoMake Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor...
cdumez@apple.com [Tue, 21 Apr 2015 16:18:22 +0000 (16:18 +0000)]
Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
https://bugs.webkit.org/show_bug.cgi?id=143970

Reviewed by Darin Adler.

Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
constructor explicit as it copies the vector and it is easy to call it
by mistake.

Source/JavaScriptCore:

* bytecode/UnlinkedInstructionStream.cpp:
(JSC::UnlinkedInstructionStream::UnlinkedInstructionStream):
* bytecode/UnlinkedInstructionStream.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::lower):

Source/WebCore:

* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::setIndexKeys):
(WebCore::IDBDatabaseBackend::setIndexesReady):
* Modules/indexeddb/IDBDatabaseBackend.h:
* Modules/indexeddb/IDBServerConnection.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::minimumRegisterRequirements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasClasses):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
(WebCore::StackAllocator::pop):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::nextGridItem):
(WebCore::RenderGrid::GridIterator::isEmptyAreaEnough):
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::paintTypesForPaintOrder):
* rendering/style/SVGRenderStyle.h:
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::fillStrokeMarkers):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendLigatureGlyphs):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::setIndexKeys):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:

Source/WTF:

* wtf/RefCountedArray.h:
(WTF::RefCountedArray::RefCountedArray):
* wtf/Vector.h:

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

4 years agoUse ASSERT_WITH_SECURITY_IMPLICATION() for NoEventDispatchAssertion
cdumez@apple.com [Tue, 21 Apr 2015 16:16:21 +0000 (16:16 +0000)]
Use ASSERT_WITH_SECURITY_IMPLICATION() for NoEventDispatchAssertion
https://bugs.webkit.org/show_bug.cgi?id=143971

Reviewed by Darin Adler.

Use ASSERT_WITH_SECURITY_IMPLICATION() for NoEventDispatchAssertion as
firing JS events can cause arbitrary JS execution which often leads to
security bugs when event firing is forbidden. For e.g. firing events
from ActiveDOMObject::suspend() means JS can construct or destroy
ActiveDOMObjects while we are iterating over them.

* dom/ContainerNode.cpp:
(WebCore::dispatchChildInsertionEvents):
(WebCore::dispatchChildRemovalEvents):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeInsertionNotifier::notify):
* dom/Document.cpp:
(WebCore::Document::dispatchWindowEvent):
(WebCore::Document::dispatchWindowLoadEvent):
* dom/Element.cpp:
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
* dom/Node.cpp:
(WebCore::Node::dispatchSubtreeModifiedEvent):
(WebCore::Node::dispatchDOMActivateEvent):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache):
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
(WebCore::ScriptExecutionContext::stopActiveDOMObjects):
(WebCore::ScriptExecutionContext::willDestroyActiveDOMObject):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):

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

4 years agoRemove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template defin...
darin@apple.com [Tue, 21 Apr 2015 15:51:05 +0000 (15:51 +0000)]
Remove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template definitions and traits)
https://bugs.webkit.org/show_bug.cgi?id=143944

Reviewed by Andreas Kling.

Source/WebCore:

* editing/ios/DictationCommandIOS.h: Added now-needed include of PassOwnPtr.h.

Source/WTF:

* wtf/FilePrintStream.h: Removed unneeded include.
* wtf/HashTable.h: Fixed class template name in comment.
* wtf/HashTraits.h: Removed unneeded forward declaration.
* wtf/ListHashSet.h: Removed unneeded includes.
* wtf/ThreadingWin.cpp: Removed unneeded includes.
(WTF::wtfThreadEntryPoint): Changed code to use unique_ptr.
(WTF::createThreadInternal): Changed code to use make_unique and release.
* wtf/efl/RunLoopEfl.cpp: Removed unneeded includes.

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

4 years agoWeb Inspector: Make formatted nodes more consistent with formatted objects
nvasilyev@apple.com [Tue, 21 Apr 2015 13:01:18 +0000 (13:01 +0000)]
Web Inspector: Make formatted nodes more consistent with formatted objects
https://bugs.webkit.org/show_bug.cgi?id=142159

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline ol):
Keep indentation exactly two spaces of Menlo.

(.dom-tree-outline li):
(.dom-tree-outline li.parent):
(.dom-tree-outline li .html-tag.close):
(.dom-tree-outline li.parent::before):
(.dom-tree-outline:focus li.parent.selected::before):
(.dom-tree-outline li.parent.expanded::before):
(.dom-tree-outline:focus li.parent.expanded.selected::before):
* UserInterface/Views/FormattedValue.css:
(.formatted-node > .dom-tree-outline ol):
Keep indentation exactly two spaces of Menlo.

* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property > .disclosure-button):
Disclosure triangle is 13 by 13 pixels. Having it in the middle of 16 by 16
pixels block makes it look bloory on non-retina screen, because:
(16 - 13) / 2 = 1.5px. Replacing 16 with 15 fixes the problem.

* UserInterface/Views/ObjectTreeView.css:
(.object-tree:not(.lossless-preview) > :matches(.title, .object-preview)):

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

4 years ago[GTK] jhbuild should not use a branch for openwebrtc
commit-queue@webkit.org [Tue, 21 Apr 2015 09:57:38 +0000 (09:57 +0000)]
[GTK] jhbuild should not use a branch for openwebrtc
https://bugs.webkit.org/show_bug.cgi?id=143981

Patch by Philippe Normand <pnormand@igalia.com> on 2015-04-21
Reviewed by Carlos Garcia Campos.

* gtk/jhbuild.modules:

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

4 years agoREGRESSION (r177494): -webkit-mask-image: with data URI fails on non-local files
simon.fraser@apple.com [Tue, 21 Apr 2015 06:47:13 +0000 (06:47 +0000)]
REGRESSION (r177494): -webkit-mask-image: with data URI fails on non-local files
https://bugs.webkit.org/show_bug.cgi?id=141857

Reviewed by Dirk Schulze.

Source/WebCore:

r177494 regressed loading of data URIs in masks with remote content, triggering
a cross-domain error which occurs because the mask loading happened via a separate
SVGDocument.

Fix by checking for data URIs at parsing time, which is what we used to do.

Test: http/tests/css/data-uri-mask.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseMaskImage):
* svg/SVGURIReference.h:
(WebCore::SVGURIReference::isExternalURIReference):

LayoutTests:

Ref test with a masked green square. Has to be an http test to trigger the
origin checking.

* http/tests/css/data-uri-mask-expected.html: Added.
* http/tests/css/data-uri-mask.html: Added.

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

4 years agoCrash when showing Web Inspector on page with 'multipart/x-mixed-replace' main resource
cdumez@apple.com [Tue, 21 Apr 2015 06:22:57 +0000 (06:22 +0000)]
Crash when showing Web Inspector on page with 'multipart/x-mixed-replace' main resource
https://bugs.webkit.org/show_bug.cgi?id=143979
<rdar://problem/20594948>

Reviewed by Timothy Hatcher.

InspectorDOMAgent::m_document was updated only once per load, from
FrameLoader::dispatchDidCommitLoad(). However, dispatchDidCommitLoad()
is not called for follow-up multipart replacing loads. You can see this
from the following check in DocumentLoader::commitData():
    if (!isMultipartReplacingLoad())
        frameLoader()->receivedFirstData();

As a result, in the case of a 'multipart/x-mixed-replace' main resource
InspectorDOMAgent::m_document would quickly get outdated as we create
a new Document for each replacing load. This would lead to Web Inspector
code using a Document without frame and causing crashes.

This patch calls InspectorInstrumentation::frameDocumentUpdated() from
Frame::setDocument() so that InspectorDOMAgent::m_document is always up
to date.

No new tests, not easily testable as the main resource needs to be
'multipart/x-mixed-replace'.

* dom/Document.cpp:
(WebCore::Document::applyXSLTransform):
Stop calling InspectorInstrumentation::frameDocumentUpdated() here as
XSLTProcessor::createDocumentFromSource() will call Frame::setDocument()
and frameDocumentUpdated() will be called there.

* page/Frame.cpp:
(WebCore::Frame::setDocument):
Call InspectorInstrumentation::frameDocumentUpdated() to make sure
InspectorDOMAgent::m_document gets updated.

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

4 years agoWeb Inspector: Unify PrettyPrinting Tool and UserInterface resources
commit-queue@webkit.org [Tue, 21 Apr 2015 04:35:43 +0000 (04:35 +0000)]
Web Inspector: Unify PrettyPrinting Tool and UserInterface resources
https://bugs.webkit.org/show_bug.cgi?id=143969

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-20
Reviewed by Timothy Hatcher.

Have the PrettyPrinting tool just use the CodeMirror and WebInspector
resources from the relative UserInterface directory. This avoids
having duplicate resources in the tree which offered few advantages.

* Scripts/update-pretty-printer.rb: Removed.
* Tools/PrettyPrinting/CodeMirrorFormatters.js: Removed.
* Tools/PrettyPrinting/Formatter.js: Removed.
* Tools/PrettyPrinting/FormatterContentBuilder.js: Removed.
* Tools/PrettyPrinting/codemirror.css: Removed.
* Tools/PrettyPrinting/codemirror.js: Removed.
* Tools/PrettyPrinting/css.js: Removed.
* Tools/PrettyPrinting/index.html:
* Tools/PrettyPrinting/javascript.js: Removed.

* UserInterface/Views/CodeMirrorFormatters.js:
Fix style issues.

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

4 years ago[EFL] Unreviewed, update test expectations and rebaseline failing tests.
jinwoo7.song@samsung.com [Tue, 21 Apr 2015 03:48:02 +0000 (03:48 +0000)]
[EFL] Unreviewed, update test expectations and rebaseline failing tests.

Remove some expected failures from tests that are passing.
Also rebaselined failing tests.

* platform/efl/TestExpectations:
* platform/efl/fast/dom/Element/getClientRects-expected.txt: Added. Rebaselined after r177774.
* platform/efl/fast/dom/Range/getClientRects-expected.txt: Ditto.
* platform/efl/fast/line-grid/line-align-right-edges-expected.png: Rebaselined after r177128.
* platform/efl/fast/line-grid/line-align-right-edges-expected.txt: Ditto.
* platform/efl/fast/table/022-expected.png: Rebaselined after r177774.
* platform/efl/fast/table/022-expected.txt: Added. Ditto.
* platform/efl/fast/text/wbr-pre-expected.png: Rebaselined after r177774.
* platform/efl/fast/text/wbr-pre-expected.txt: Added. Ditto.

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

4 years agoPerf dashboard should have UI to set status on analysis tasks
rniwa@webkit.org [Tue, 21 Apr 2015 02:48:22 +0000 (02:48 +0000)]
Perf dashboard should have UI to set status on analysis tasks
https://bugs.webkit.org/show_bug.cgi?id=143977

Reviewed by Chris Dumez.

Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
The latter will be a useful metric once we start automatically creating analysis tasks.

* init-database.sql: Added two columns to analysis_tasks table.
* public/api/analysis-tasks.php: Include the added columns in the JSON.
* public/include/db.php:
(Database::to_database_boolean): Added.
* public/include/json-header.php:
(require_match_one_of_values): Added.
* public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
(main):
* public/v2/analysis.js:
(App.AnalysisTask.result): Added.
(App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
and we want to differentiate null from false in order to differentiate the null-ness of the value.
(App.AnalysisTask.saveStatus): Added.
(App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
* public/v2/app.css:
* public/v2/app.js:
(App.AnalysisTaskController.analysisResultOptions): Added.
(App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
(App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
been created if 'no change' is selected.
(App.AnalysisTaskController._updateChosenAnalysisResult): Added.
(App.AnalysisTaskController.actions.saveStatus): Added.
* public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
'result' and 'needed' values of the analysis task.

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

4 years agoPhantomNewObject should be marked NodeMustGenerate
commit-queue@webkit.org [Tue, 21 Apr 2015 02:37:40 +0000 (02:37 +0000)]
PhantomNewObject should be marked NodeMustGenerate
https://bugs.webkit.org/show_bug.cgi?id=143974

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-20
Reviewed by Filip Pizlo.

* dfg/DFGNodeType.h: Mark PhantomNewObject as NodeMustGenerate

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

4 years agoFix compilation error for prepare-ChangeLog running with Perl version < v5.18.2.
matthew_hanson@apple.com [Tue, 21 Apr 2015 01:48:18 +0000 (01:48 +0000)]
Fix compilation error for prepare-ChangeLog running with Perl version < v5.18.2.

Unreviewed build fix.

The any function was added to List::Utils between Perl v5.16.2 and Perl v5.18.2.
However, it has been exposed by List::MoreUtils since its inception. This patch uses
the any function exposed by List::MoreUtils for greater compatibility.

* Scripts/prepare-ChangeLog:
Use any from List::MoreUtils instead of List::Utils, as List::MoreUtils exposes
the any function in all of versions of Perl used by our infrastructure.

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

4 years agoExpose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate...
mitz@apple.com [Tue, 21 Apr 2015 00:43:23 +0000 (00:43 +0000)]
Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
https://bugs.webkit.org/show_bug.cgi?id=143973

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
delegate methods.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
property.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
useful to delegates getting an array of nodes via the new method.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.

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

4 years agoRemove unnecessary logs when resetting tests.
achristensen@apple.com [Mon, 20 Apr 2015 23:38:42 +0000 (23:38 +0000)]
Remove unnecessary logs when resetting tests.

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformResetPreferencesToConsistentValues):
In r183020 I added some logs when compiling or removing content extensions fails.
We often try to remove a content extension that does not exist, and that is not a problem.

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

4 years agoOverwrite existing files with moveFile.
achristensen@apple.com [Mon, 20 Apr 2015 23:26:44 +0000 (23:26 +0000)]
Overwrite existing files with moveFile.
https://bugs.webkit.org/show_bug.cgi?id=143968

Reviewed by Brady Eidson and Anders Carlsson.

* platform/mac/FileSystemMac.mm:
(-[WebFileManagerDelegate fileManager:shouldProceedAfterError:movingItemAtURL:toURL:]):
(WebCore::moveFile):
r182932 introduced moveFile instead of renameFile.  In order to preserve behavior, it should overwrite existing files.

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

4 years agoUnreviewed Windows build fix after r183031.
joepeck@webkit.org [Mon, 20 Apr 2015 22:53:38 +0000 (22:53 +0000)]
Unreviewed Windows build fix after r183031.

* platform/graphics/OpenGLShims.cpp:
(WebCore::lookupOpenGLFunctionAddress):
Windows needs an explicit cast converting LChar* to const char*.
Also, add a FIXME comment for sketchy behavior.

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

4 years agoCleanup some StringBuilder use
commit-queue@webkit.org [Mon, 20 Apr 2015 22:07:31 +0000 (22:07 +0000)]
Cleanup some StringBuilder use
https://bugs.webkit.org/show_bug.cgi?id=143550

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-20
Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/Symbol.cpp:
(JSC::Symbol::descriptiveString):
* runtime/TypeProfiler.cpp:
(JSC::TypeProfiler::typeInformationForExpressionAtOffset):
* runtime/TypeSet.cpp:
(JSC::TypeSet::toJSONString):
(JSC::StructureShape::propertyHash):
(JSC::StructureShape::stringRepresentation):
(JSC::StructureShape::toJSONString):

Source/WebCore:

* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::youTubeURL):
* css/CSSAnimationTriggerScrollValue.cpp:
(WebCore::CSSAnimationTriggerScrollValue::customCSSText):
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::customCSSText):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsWindowCSS):
(WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS):
(WebCore::CaptionUserPreferencesMediaAF::cssPropertyWithTextEdgeColor):
(WebCore::CaptionUserPreferencesMediaAF::colorPropertyCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
* page/EventSource.cpp:
(WebCore::EventSource::didReceiveResponse):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeCSSStyleSheet):
* platform/graphics/OpenGLShims.cpp:
(WebCore::lookupOpenGLFunctionAddress):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::generateHashedName):
* platform/text/DateTimeFormat.cpp:
(WebCore::DateTimeFormat::quoteAndAppendLiteral):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
* testing/MicroTaskTest.cpp:
(WebCore::MicroTaskTest::run):
* testing/MockContentFilterSettings.cpp:
(WebCore::MockContentFilterSettings::unblockRequestURL):

Source/WebKit2:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::buildObjectStoreStatement):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::v2RecordsTableSchema):
* Shared/Databases/IndexedDB/IDBUtilities.cpp:
(WebKit::uniqueDatabaseIdentifier):
* UIProcess/API/APIUserScript.cpp:
(API::UserScript::generateUniqueURL):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveInvalidMessage):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::combinedSecurityOriginIdentifier):

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

4 years agoprepare-ChangeLog should ignore the preceeding function when processing the removal...
matthew_hanson@apple.com [Mon, 20 Apr 2015 22:05:52 +0000 (22:05 +0000)]
prepare-ChangeLog should ignore the preceeding function when processing the removal of a function.
https://bugs.webkit.org/show_bug.cgi?id=143897

Reviewed by David Kilzer.

This is a speculative fix that addresses two issues:

1. An off-by-one error which allowed ending lines to be less than starting lines when a hunk was a pure delete.
We were determining ending lines from combined diffs using the logic: End = Start + Offset - 1.

So for a hunk like "@@ -723,10 +721,0 @@ bool foobar", we were generating the following starting/ending line pairs:
Before: (723, 729)
After: (721, 720)

Before is correct, but After should be (721, 721), since it represents the beginning and ending lines for the hunk.
Whether there are zero lines or one line in the hunk, the starting and ending line are the same.

This error was causing bad behavior on purely additive and purely subtractive hunks, but since we only refer
to After when generating ChangeLog output, the extractLineRangeBeforeChange had no visible effect on program output.

The fix is to set End to the max of Start + Offset - 1 and Start, rather than always using the former.

2. Creating git diffs from HEAD and not origin/master by default.

Hard-coding origin/master into the originalFile command has the disadvantage of causing the diff to fail entirely
when origin/master does not exist, and to do the wrong thing when determining deleted functions/methods.

* Scripts/prepare-ChangeLog:
(originalFile):
Use HEAD instead of origin/master in default Git case.

(generateFunctionLists):
Ensure that the end line is not less than the start line.

(extractLineRangeAfterChange):
Set the end line to the start line if the end line is less than the start line.

(extractLineRangeBeforeChange):
Ditto.

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

4 years agoSuppress warning in prepare-ChangeLog.
matthew_hanson@apple.com [Mon, 20 Apr 2015 22:05:50 +0000 (22:05 +0000)]
Suppress warning in prepare-ChangeLog.
https://bugs.webkit.org/show_bug.cgi?id=143882

Reviewed by David Kilzer.

Prune noisy prepare-ChangeLog output by using the List::Util::any function
instead of the deprecated smartmatch operator.

* Scripts/prepare-ChangeLog:
Import the List::Util::any function.

(get_function_line_ranges_for_cpp):
Use the any function instead of smartmatch.

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

4 years agoModify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
andersca@apple.com [Mon, 20 Apr 2015 21:48:01 +0000 (21:48 +0000)]
Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
https://bugs.webkit.org/show_bug.cgi?id=143966

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
(-[WKWebsiteDataRecord dataTypes]):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore allWebsiteDataTypes]):
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWKWebsiteDataTypes):
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(dataTypes):
(-[WK2BrowserWindowController fetchWebsiteData:]):
(-[WK2BrowserWindowController fetchAndClearWebsiteData:]):
(-[WK2BrowserWindowController clearWebsiteData:]):

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

4 years agoAdd debugging tools to test if a given pointer is a valid object and in the heap.
mark.lam@apple.com [Mon, 20 Apr 2015 21:31:21 +0000 (21:31 +0000)]
Add debugging tools to test if a given pointer is a valid object and in the heap.
https://bugs.webkit.org/show_bug.cgi?id=143910

Reviewed by Geoffrey Garen.

When doing debugging from lldb, sometimes, it is useful to be able to tell if a
purported JSObject is really a valid object in the heap or not.  We can add the
following utility functions to help:
    isValidCell(heap, candidate) - returns true if the candidate is a "live" cell in the heap.
    isInHeap(heap, candidate) - returns true if the candidate is the heap's Object space or Storage space.
    isInObjectSpace(heap, candidate) - returns true if the candidate is the heap's Object space.
    isInStorageSpace(heap, candidate) - returns true if the candidate is the heap's Storage space.

Also moved lldb callable debug utility function prototypes from
JSDollarVMPrototype.cpp to JSDollarVMPrototype.h as static members of the
JSDollarVMPrototype class.  This is so that we can conveniently #include that
file to get the prototypes when we need to call them programmatically from
instrumentation that we add while debugging an issue.

* heap/Heap.h:
(JSC::Heap::storageSpace):
* tools/JSDollarVMPrototype.cpp:
(JSC::JSDollarVMPrototype::currentThreadOwnsJSLock):
(JSC::ensureCurrentThreadOwnsJSLock):
(JSC::JSDollarVMPrototype::gc):
(JSC::functionGC):
(JSC::JSDollarVMPrototype::edenGC):
(JSC::functionEdenGC):
(JSC::JSDollarVMPrototype::isInHeap):
(JSC::JSDollarVMPrototype::isInObjectSpace):
(JSC::JSDollarVMPrototype::isInStorageSpace):
(JSC::ObjectAddressCheckFunctor::ObjectAddressCheckFunctor):
(JSC::ObjectAddressCheckFunctor::operator()):
(JSC::JSDollarVMPrototype::isValidCell):
(JSC::JSDollarVMPrototype::isValidCodeBlock):
(JSC::JSDollarVMPrototype::codeBlockForFrame):
(JSC::functionCodeBlockForFrame):
(JSC::codeBlockFromArg):
(JSC::JSDollarVMPrototype::printCallFrame):
(JSC::JSDollarVMPrototype::printStack):
(JSC::JSDollarVMPrototype::printValue):
(JSC::currentThreadOwnsJSLock): Deleted.
(JSC::gc): Deleted.
(JSC::edenGC): Deleted.
(JSC::isValidCodeBlock): Deleted.
(JSC::codeBlockForFrame): Deleted.
(JSC::printCallFrame): Deleted.
(JSC::printStack): Deleted.
(JSC::printValue): Deleted.
* tools/JSDollarVMPrototype.h:

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

4 years agoSVGFitToViewBox::viewBoxToViewTransform() has to count for zero physical width and...
commit-queue@webkit.org [Mon, 20 Apr 2015 20:43:13 +0000 (20:43 +0000)]
SVGFitToViewBox::viewBoxToViewTransform() has to count for zero physical width and height before calling SVGPreserveAspectRatio::getCTM()
https://bugs.webkit.org/show_bug.cgi?id=143903

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-04-20
Reviewed by Daniel Bates.

Source/WebCore:

Ensure that the SVG viewBoxToView transformation is always invertible.
CG path drawing functions crash if the context is transformed to non-
invertible matrix.

Tests: svg/css/crash-path-zero-height-viewbox.svg
       svg/css/crash-path-zero-width-viewbox.svg

* svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::viewBoxToViewTransform):
Do not call SVGPreserveAspectRatio::getCTM() if the physical width or the
physical height is zero.

* svg/SVGPreserveAspectRatio.cpp:
(WebCore::SVGPreserveAspectRatio::getCTM):
Ensure that we are not dividing by zero in this function.

LayoutTests:

* svg/css/crash-path-zero-height-viewbox-expected.txt: Added.
* svg/css/crash-path-zero-height-viewbox.svg: Added.
* svg/css/crash-path-zero-width-viewbox-expected.txt: Added.
* svg/css/crash-path-zero-width-viewbox.svg: Added.
Make sure if the physical width or the physical height of an SVG is zero
and a viewBox is specified, we do not crash.

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

4 years agoWeb Inspector: Improve Support for WeakSet in Console
commit-queue@webkit.org [Mon, 20 Apr 2015 20:25:56 +0000 (20:25 +0000)]
Web Inspector: Improve Support for WeakSet in Console
https://bugs.webkit.org/show_bug.cgi?id=143951

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-20
Reviewed by Darin Adler.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::subtype):
(Inspector::JSInjectedScriptHost::weakSetSize):
(Inspector::JSInjectedScriptHost::weakSetEntries):
* inspector/JSInjectedScriptHost.h:
* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetSize):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetEntries):
Treat WeakSets like special sets.

* inspector/protocol/Runtime.json:
Add a new object subtype, "weakset".

Source/WebInspectorUI:

* UserInterface/Models/NativeFunctionParameters.js:
WeakSet has the same APIs and parameters as Set for the functions it implements.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.isCollectionType):
(WebInspector.RemoteObject.prototype.isWeakCollection):
(WebInspector.RemoteObject.prototype.getCollectionEntries):
(WebInspector.RemoteObject.prototype._weakCollectionObjectGroup):
WeakSet is a weak collection.

* UserInterface/Models/ObjectPreview.js:
(WebInspector.ObjectPreview.prototype.hasSize):
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameter):
* UserInterface/Views/FormattedValue.css:
(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset):
(:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset) > .size):
(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap): Deleted.
(:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap) > .size): Deleted.
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
Treat a WeakSet like a set in more places.

LayoutTests:

* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object.html:
Update the test to include a WeakSet example.
Also rebaseline for iterator changes that landed recently.

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

4 years agoCSSParser::parseValue() copies the m_parsedProperties vector at addParsedProperties()
cdumez@apple.com [Mon, 20 Apr 2015 19:40:03 +0000 (19:40 +0000)]
CSSParser::parseValue() copies the m_parsedProperties vector at addParsedProperties()
https://bugs.webkit.org/show_bug.cgi?id=143925

Reviewed by Simon Fraser.

Update MutableStyleProperties::addParsedProperties() to use
CSSParser::ParsedPropertyVector type (i.e. Vector<CSSProperty, 256>)
instead of Vector<CSSProperty> so that the properties vector is no
longer copied unnecessarily to convert one type to the other.

* css/CSSParser.h:
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::addParsedProperties):
* css/StyleProperties.h:

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

4 years agoDisable mixed content blocking for existing WebKit1 clients
ap@apple.com [Mon, 20 Apr 2015 19:39:16 +0000 (19:39 +0000)]
Disable mixed content blocking for existing WebKit1 clients
https://bugs.webkit.org/show_bug.cgi?id=143955
rdar://problem/20177186

Reviewed by Oliver Hunt.

* Misc/WebKitVersionChecks.h:
* WebView/WebView.mm:
(shouldAllowInsecureContent):
(-[WebView _preferencesChanged:]):

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

4 years agoHashMap storing PropertyKey StringImpl* need to use IdentifierRepHash to handle Symbols
utatane.tea@gmail.com [Mon, 20 Apr 2015 19:35:28 +0000 (19:35 +0000)]
HashMap storing PropertyKey StringImpl* need to use IdentifierRepHash to handle Symbols
https://bugs.webkit.org/show_bug.cgi?id=143947

Reviewed by Darin Adler.

Type profiler has map between PropertyKey (StringImpl*) and offset.
StringImpl* is also used for Symbol PropertyKey.
So equality of hash tables is considered by interned StringImpl*'s pointer value.
To do so, use IdentifierRepHash instead of StringHash.

* runtime/SymbolTable.h:

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

4 years agoShould remove mouseForceClick and mouseForceCancelled from DOM force events
bdakin@apple.com [Mon, 20 Apr 2015 19:03:00 +0000 (19:03 +0000)]
Should remove mouseForceClick and mouseForceCancelled from DOM force events
https://bugs.webkit.org/show_bug.cgi?id=143904
-and corresponding-
rdar://problem/20578842

Reviewed by Dan Bernstein.

Source/WebCore:

After more thought and discussion, we decided to remove mouseForceClick and
mouseForceCancelled from DOM force events. mouseForceClick is confusing and
redundant. mouseForceCancelled is confusing as it is currently implemented, and
all of its functionality can be filled by exisiting events such as mouseup,
mouseout, etc.

* dom/Document.cpp:
(WebCore::Document::addListenerTypeIfNeeded):
* dom/Document.h:
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::dispatchMouseForceWillBegin):
(WebCore::Element::dispatchMouseForceClick): Deleted.
(WebCore::Element::dispatchMouseForceCancelled): Deleted.
* dom/Element.h:
* dom/Element.idl:
* dom/EventNames.h:
* html/HTMLAttributeNames.in:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
* html/HTMLBodyElement.idl:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap):
* page/DOMWindow.idl:

Source/WebKit2:

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::immediateActionDidCancel):

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

4 years agoFix content extension test flakiness.
achristensen@apple.com [Mon, 20 Apr 2015 18:48:41 +0000 (18:48 +0000)]
Fix content extension test flakiness.
https://bugs.webkit.org/show_bug.cgi?id=143950

Reviewed by Brady Eidson.

Tools:

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformResetPreferencesToConsistentValues):
Remove the TestContentExtensions if it exists.
(WTR::TestController::platformConfigureViewForTest):
Log errors in case there are any.

LayoutTests:

* platform/mac-wk2/TestExpectations:
Mark contentextensions tests as not flaky any more.

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

4 years agoImplement immediate action support for tel: and mailto: URLs
timothy_horton@apple.com [Mon, 20 Apr 2015 18:46:33 +0000 (18:46 +0000)]
Implement immediate action support for tel: and mailto: URLs
https://bugs.webkit.org/show_bug.cgi?id=143916
<rdar://problem/19721711>

Reviewed by Darin Adler.

* Shared/API/c/WKImmediateActionTypes.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _animationControllerForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForDataDetectedLink]):
(-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
Add _animationControllerForDataDetectedLink and use it when
building immediate actions for tel: and mailto: links.

* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _defaultAnimationController]):
(-[WebImmediateActionController _animationControllerForDataDetectedText]):
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):
(-[WebImmediateActionController _menuItemForDataDetectedText]): Deleted.
* WebView/WebUIDelegatePrivate.h:
Add _animationControllerForDataDetectedLink and use it when
building immediate actions for tel: and mailto: links.

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

4 years agoShould not list these tests twice.
bdakin@apple.com [Mon, 20 Apr 2015 18:45:11 +0000 (18:45 +0000)]
Should not list these tests twice.

* platform/mac-wk2/TestExpectations:

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

4 years agoSetting inline style to the same value it already has triggers a style recalc
simon.fraser@apple.com [Mon, 20 Apr 2015 18:31:45 +0000 (18:31 +0000)]
Setting inline style to the same value it already has triggers a style recalc
https://bugs.webkit.org/show_bug.cgi?id=143922

Reviewed by Antti Koivisto.

Source/WebCore:

MutableStyleProperties::setProperty() was taking the result of CSSParser::parseValue()
to mean "parsing changed the style", but it actually just means "parsing succeeded".
Add a new out param, piped through various parser functions, to indicate whether
parsing actually changed style, and instead return that from setProperty().

Add internals.startTrackingStyleRecalcs() and internals.styleRecalcCount() so
we can write tests for style recalc.

Test: fast/css/set-inline-style-recalc.html

* WebCore.xcodeproj/project.pbxproj: Let Xcode have it's way.
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::parseSimpleLengthValue):
(WebCore::parseKeywordValue):
(WebCore::parseTranslateTransformValue):
(WebCore::CSSParser::parseFontFaceValue):
(WebCore::CSSParser::parseValue):
* css/CSSParser.h:
* css/CSSProperty.h:
(WebCore::StylePropertyMetadata::operator==):
(WebCore::CSSProperty::operator==):
* css/DOMWindowCSS.cpp:
(WebCore::DOMWindowCSS::supports):
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::setProperty):
(WebCore::MutableStyleProperties::appendPrefixingVariantProperty):
(WebCore::MutableStyleProperties::addParsedProperties):
(WebCore::MutableStyleProperties::addParsedProperty):
* css/StyleProperties.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::startTrackingStyleRecalcs):
(WebCore::Document::styleRecalcCount):
* dom/Document.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
* testing/Internals.cpp:
(WebCore::Internals::startTrackingStyleRecalcs):
(WebCore::Internals::styleRecalcCount):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Test that changes inline-style (to test this bug fix), and classes (for
proactive testing) and counts style recalcs.

* fast/css/set-inline-style-recalc-expected.txt: Added.
* fast/css/set-inline-style-recalc.html: Added.

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

4 years agoCrash in StyleResolver::invalidateMatchedPropertiesCache() when using content extensions.
beidson@apple.com [Mon, 20 Apr 2015 17:14:33 +0000 (17:14 +0000)]
Crash in StyleResolver::invalidateMatchedPropertiesCache() when using content extensions.
<rdar://problem/20554405> and https://bugs.webkit.org/show_bug.cgi?id=143892

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/contentextensions/style-resolver-changed-reentrancy.html

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):

* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::addContentExtensionUserSheet): Call styleResolverChanged on a delay.
(WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet): Ditto.
(WebCore::DocumentStyleSheetCollection::styleResolverChangedTimerFired):
* dom/DocumentStyleSheetCollection.h:

LayoutTests:

* http/tests/contentextensions/resources/woff-stylesheet.css: Added.
(@font-face):
* http/tests/contentextensions/style-resolver-changed-reentrancy-expected.txt: Added.
* http/tests/contentextensions/style-resolver-changed-reentrancy.html: Added.
* http/tests/contentextensions/style-resolver-changed-reentrancy.html.json: Added.
* http/tests/resources/Ahem.woff: Added.

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

4 years agoFavicons are not always loaded.
peavo@outlook.com [Mon, 20 Apr 2015 16:49:43 +0000 (16:49 +0000)]
Favicons are not always loaded.
https://bugs.webkit.org/show_bug.cgi?id=143880

Reviewed by Darin Adler.

Source/WebCore:

If the favicon link element(s) in the document does not have a mime type,
the favicon is loaded from the domain root (/favicon.ico). If no favicon
exists at this location, the favicon loading will fail. This can be solved
by not demanding that the link element has a mime type.

Test: fast/dom/icon-url-without-mimetype.html

* loader/icon/IconController.cpp:
(WebCore::iconFromLinkElements): Return the chosen icon URL instead of a vector of URLs.
(WebCore::IconController::url):
(WebCore::iconsFromLinkElements): Deleted.

LayoutTests:

Added new test for icon link elements without mime type.

* fast/dom/icon-url-without-mimetype-expected.txt: Added.
* fast/dom/icon-url-without-mimetype.html: Added.

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

4 years agoContentextensions tests are flaky
ap@apple.com [Mon, 20 Apr 2015 16:37:37 +0000 (16:37 +0000)]
Contentextensions tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=143950

* platform/mac-wk2/TestExpectations: Marking them as such.

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

4 years agoProperly report errors from _WKUserContentExtensionStore.
achristensen@apple.com [Mon, 20 Apr 2015 16:13:07 +0000 (16:13 +0000)]
Properly report errors from _WKUserContentExtensionStore.
https://bugs.webkit.org/show_bug.cgi?id=143808

Reviewed by Darin Adler.

Source/WebKit2:

* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm:
(TEST_F):

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

4 years ago[CMake] Include ICU unconditionally on the source lists
mrobinson@webkit.org [Mon, 20 Apr 2015 15:23:45 +0000 (15:23 +0000)]
[CMake] Include ICU unconditionally on the source lists
https://bugs.webkit.org/show_bug.cgi?id=143900

Reviewed by Darin Adler.

No new tests. This is just a build file change.

* CMakeLists.txt: Integrate ICU source files, includes, and libraries into the main
sections. They are shared by all platforms.
* PlatformGTK.cmake: Eliminate build rules that are duplicated from the main CMakeLists.txt.

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

4 years agoAX: iOS: Text input field ignores value of read-only and aria-readonly attributes
cfleizach@apple.com [Mon, 20 Apr 2015 15:05:41 +0000 (15:05 +0000)]
AX: iOS: Text input field ignores value of read-only and aria-readonly attributes
https://bugs.webkit.org/show_bug.cgi?id=143946

Reviewed by Mario Sanchez Prada.

Expose an existing method for determining whether the value can be set to the iOS accessibility platform.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanSetValue]):

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

4 years ago[EFL] Unreviewed gardening
jinwoo7.song@samsung.com [Mon, 20 Apr 2015 10:48:32 +0000 (10:48 +0000)]
[EFL] Unreviewed gardening

Update test expectations for failing tests.

* platform/efl/fast/box-sizing/box-sizing-expected.png: Rebaseline after 176978.
* platform/efl/fast/box-sizing/box-sizing-expected.txt: Ditto.
* platform/efl/fast/css/image-rendering-expected.txt: Added. Rebaseline after r177774.
* platform/efl/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt:
Rebaseline after r173857.

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

4 years agoMerge TreeShared into Node.
akling@apple.com [Mon, 20 Apr 2015 09:18:26 +0000 (09:18 +0000)]
Merge TreeShared into Node.
<https://webkit.org/b/143942>

Reviewed by Darin Adler.

Node was the only remaining user of TreeShared, so just fold the class into Node.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/Node.cpp:
(WebCore::Node::Node):
(WebCore::Node::~Node):
* dom/Node.h:
(WebCore::Node::ref):
(WebCore::Node::deref):
(WebCore::Node::hasOneRef):
(WebCore::Node::refCount):
(WebCore::adopted):
(WebCore::Node::hasTreeSharedParent): Deleted.
* platform/TreeShared.h: Removed.

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

4 years ago[EFL] Unreviewed gardening
jinwoo7.song@samsung.com [Mon, 20 Apr 2015 08:31:04 +0000 (08:31 +0000)]
[EFL] Unreviewed gardening

Rebaseline after r177774.

* platform/efl/css2.1/t1508-c527-font-00-b-expected.txt: Added.

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

4 years agoAdd a rule for NetworkCache to watchlist file
commit-queue@webkit.org [Mon, 20 Apr 2015 08:29:09 +0000 (08:29 +0000)]
Add a rule for NetworkCache to watchlist file
https://bugs.webkit.org/show_bug.cgi?id=143945

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2015-04-20
Reviewed by Sergio Villar Senin.

And add myself to the list of watchers.

* Scripts/webkitpy/common/config/watchlist:

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

4 years agoImplement `Object.is`
commit-queue@webkit.org [Mon, 20 Apr 2015 07:05:41 +0000 (07:05 +0000)]
Implement `Object.is`
https://bugs.webkit.org/show_bug.cgi?id=143865

Patch by Jordan Harband <ljharb@gmail.com> on 2015-04-20
Reviewed by Darin Adler.

Source/JavaScriptCore:

Expose sameValue to JS, via Object.is
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.is

* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorIs):
* runtime/PropertyDescriptor.cpp:
(JSC::sameValue):

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/Object-is-expected.txt: Added.
* js/Object-is.html: Added.
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/Object-is.js: Added.

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

4 years agoRemove all the remaining uses of OwnPtr and PassOwnPtr in JavaScriptCore
darin@apple.com [Mon, 20 Apr 2015 06:05:26 +0000 (06:05 +0000)]
Remove all the remaining uses of OwnPtr and PassOwnPtr in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=143941

Reviewed by Gyuyoung Kim.

* API/JSCallbackObject.h: Use unique_ptr for m_callbackObjectData.
* API/JSCallbackObjectFunctions.h: Ditto.

* API/ObjCCallbackFunction.h: Use unique_ptr for the arguments to the
create function and the constructor and for m_impl.
* API/ObjCCallbackFunction.mm:
(CallbackArgumentOfClass::CallbackArgumentOfClass): Streamline this
class by using RetainPtr<Class>.
(ArgumentTypeDelegate::typeInteger): Use make_unique.
(ArgumentTypeDelegate::typeDouble): Ditto.
(ArgumentTypeDelegate::typeBool): Ditto.
(ArgumentTypeDelegate::typeVoid): Ditto.
(ArgumentTypeDelegate::typeId): Ditto.
(ArgumentTypeDelegate::typeOfClass): Ditto.
(ArgumentTypeDelegate::typeBlock): Ditto.
(ArgumentTypeDelegate::typeStruct): Ditto.
(ResultTypeDelegate::typeInteger): Ditto.
(ResultTypeDelegate::typeDouble): Ditto.
(ResultTypeDelegate::typeBool): Ditto.
(ResultTypeDelegate::typeVoid): Ditto.
(ResultTypeDelegate::typeId): Ditto.
(ResultTypeDelegate::typeOfClass): Ditto.
(ResultTypeDelegate::typeBlock): Ditto.
(ResultTypeDelegate::typeStruct): Ditto.
(JSC::ObjCCallbackFunctionImpl::ObjCCallbackFunctionImpl): Use
unique_ptr for the arguments to the constructor, m_arguments, and m_result.
Use RetainPtr<Class> for m_instanceClass.
(JSC::objCCallbackFunctionCallAsConstructor): Use nullptr instead of nil or 0
for non-Objective-C object pointer null.
(JSC::ObjCCallbackFunction::ObjCCallbackFunction): Use unique_ptr for
the arguments to the constructor and for m_impl.
(JSC::ObjCCallbackFunction::create): Use unique_ptr for arguments.
(skipNumber): Mark this static since it's local to this source file.
(objCCallbackFunctionForInvocation): Call parseObjCType without doing any
explicit adoptPtr since the types in the traits are now unique_ptr. Also use
nullptr instead of nil for JSObjectRef values.
(objCCallbackFunctionForMethod): Tweaked comment.
(objCCallbackFunctionForBlock): Use nullptr instead of 0 for JSObjectRef.

* bytecode/CallLinkInfo.h: Removed unneeded include of OwnPtr.h.

* heap/GCThread.cpp:
(JSC::GCThread::GCThread): Use unique_ptr.
* heap/GCThread.h: Use unique_ptr for arguments to the constructor and for
m_slotVisitor and m_copyVisitor.
* heap/GCThreadSharedData.cpp:
(JSC::GCThreadSharedData::GCThreadSharedData): Ditto.

* parser/SourceProvider.h: Removed unneeded include of PassOwnPtr.h.

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

4 years agoFixed a typo.
mitz@apple.com [Mon, 20 Apr 2015 04:47:25 +0000 (04:47 +0000)]
Fixed a typo.

* coding/RefPtr.html:

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

4 years agoUpdate RefPtr documentation and deprecation
darin@apple.com [Mon, 20 Apr 2015 04:42:39 +0000 (04:42 +0000)]
Update RefPtr documentation and deprecation
https://bugs.webkit.org/show_bug.cgi?id=143936

Reviewed by Andreas Kling.

Source/WTF:

* WTF.vcxproj/WTF.vcxproj: Removed PassRef.h
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.

Tools:

* Scripts/do-webcore-rename: Put in some DeprecatedPassRefPtr renames.

Websites/webkit.org:

* coding/RefPtr.html: Updated.

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

4 years agoImprove the feature.json files
benjamin@webkit.org [Mon, 20 Apr 2015 03:54:06 +0000 (03:54 +0000)]
Improve the feature.json files

* features.json:

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

4 years agoIntroduce bytecode intrinsics
utatane.tea@gmail.com [Mon, 20 Apr 2015 01:45:50 +0000 (01:45 +0000)]
Introduce bytecode intrinsics
https://bugs.webkit.org/show_bug.cgi?id=143926

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch introduces bytecode level intrinsics into builtins/*.js JS code.
When implementing functions in builtins/*.js,
sometimes we require lower level functionality.

For example, in the current Array.from, we use `result[k] = value`.
The spec requires `[[DefineOwnProperty]]` operation here.
However, usual `result[k] = value` is evaluated as `[[Set]]`. (`PutValue` => `[[Set]]`)
So if we implement `Array.prototype[k]` getter/setter, the difference is observable.

Ideally, reaching here, we would like to use put_by_val_direct bytecode.
However, there's no syntax to generate it directly.

This patch introduces bytecode level intrinsics into JSC BytecodeCompiler.
Like @call, @apply, we introduce a new node, Intrinsic.
These are generated when calling appropriate private symbols in privileged code.
AST parser detects them and generates Intrinsic nodes and
BytecodeCompiler detects them and generate required bytecodes.

Currently, Array.from implementation works fine without this patch.
This is because when the target code is builtin JS,
BytecodeGenerator emits put_by_val_direct instead of put_by_val.
This solves the above issue. However, instead of solving this issue,
it raises another issue; There's no way to emit `[[Set]]` operation.
`[[Set]]` operation is actually used in the spec (Array.from's "length" is set by `[[Set]]`).
So to implement it precisely, introducing bytecode level intrinsics is necessary.

In the subsequent fixes, we'll remove that special path emitting put_by_val_direct
for `result[k] = value` under builtin JS environment. Instead of that special handling,
use bytecode intrinsics instead. It solves problems and it is more intuitive
because written JS code in builtin works as the same to the usual JS code.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/ArrayConstructor.js:
(from):
* bytecode/BytecodeIntrinsicRegistry.cpp: Added.
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
(JSC::BytecodeIntrinsicRegistry::lookup):
* bytecode/BytecodeIntrinsicRegistry.h: Added.
* bytecompiler/NodesCodegen.cpp:
(JSC::BytecodeIntrinsicNode::emitBytecode):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putByValDirect):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeFunctionCallNode):
* parser/NodeConstructors.h:
(JSC::BytecodeIntrinsicNode::BytecodeIntrinsicNode):
* parser/Nodes.h:
(JSC::BytecodeIntrinsicNode::identifier):
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers):
* runtime/CommonIdentifiers.h:
(JSC::CommonIdentifiers::bytecodeIntrinsicRegistry):
* tests/stress/array-from-with-accessors.js: Added.
(shouldBe):

Tools:

Change cpplint to accept emit_intrinsic_XXX.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_identifier_name_in_declaration):

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

4 years ago[CMake] Synchronize variables between WebKitFeatures.cmake and cmakedonfig.h.cmake
gyuyoung.kim@webkit.org [Mon, 20 Apr 2015 01:28:34 +0000 (01:28 +0000)]
[CMake] Synchronize variables between WebKitFeatures.cmake and cmakedonfig.h.cmake
https://bugs.webkit.org/show_bug.cgi?id=143935

Reviewed by Darin Adler.

Some variables aren't defined in these files or unused variables aren't removed. This
patch cleans up it as well as fix wrong alphabet order.

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

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

4 years agoMake Builtin functions non constructible
utatane.tea@gmail.com [Sun, 19 Apr 2015 18:59:39 +0000 (18:59 +0000)]
Make Builtin functions non constructible
https://bugs.webkit.org/show_bug.cgi?id=143923

Reviewed by Darin Adler.

Builtin functions defined by builtins/*.js accidentally have [[Construct]].
According to the spec, these functions except for explicitly defined as a constructor do not have [[Construct]].
This patch fixes it. When the JS function used for a construction is builtin function, throw not a constructor error.

Ideally, returning ConstructTypeNone in JSFunction::getConstructData is enough.
However, to avoid calling getConstructData (it involves indirect call of function pointer of getConstructData), some places do not check ConstructType.
In these places, they only check the target function is JSFunction because previously JSFunction always has [[Construct]].
So in this patch, we check `isBuiltinFunction()` in those places.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::inliningCost):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setUpCall):
* runtime/JSFunction.cpp:
(JSC::JSFunction::getConstructData):
* tests/stress/builtin-function-is-construct-type-none.js: Added.
(shouldThrow):

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

4 years ago[ES6] Implement WeakSet
utatane.tea@gmail.com [Sun, 19 Apr 2015 18:08:14 +0000 (18:08 +0000)]
[ES6] Implement WeakSet
https://bugs.webkit.org/show_bug.cgi?id=142408

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch implements ES6 WeakSet.
Current implementation simply leverages WeakMapData with undefined value.
This WeakMapData should be optimized in the same manner as MapData/SetData in the subsequent patch[1].

And in this patch, we also fix WeakMap/WeakSet behavior to conform the ES6 spec.
Except for adders (WeakMap.prototype.set/WeakSet.prototype.add),
methods return false (or undefined for WeakMap.prototype.get)
when a key is not Object instead of throwing a type error.

[1]: https://bugs.webkit.org/show_bug.cgi?id=143919

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSWeakSet.cpp: Added.
(JSC::JSWeakSet::finishCreation):
(JSC::JSWeakSet::visitChildren):
* runtime/JSWeakSet.h: Added.
(JSC::JSWeakSet::createStructure):
(JSC::JSWeakSet::create):
(JSC::JSWeakSet::weakMapData):
(JSC::JSWeakSet::JSWeakSet):
* runtime/WeakMapPrototype.cpp:
(JSC::getWeakMapData):
(JSC::protoFuncWeakMapDelete):
(JSC::protoFuncWeakMapGet):
(JSC::protoFuncWeakMapHas):
* runtime/WeakSetConstructor.cpp: Added.
(JSC::WeakSetConstructor::finishCreation):
(JSC::callWeakSet):
(JSC::constructWeakSet):
(JSC::WeakSetConstructor::getConstructData):
(JSC::WeakSetConstructor::getCallData):
* runtime/WeakSetConstructor.h: Added.
(JSC::WeakSetConstructor::create):
(JSC::WeakSetConstructor::createStructure):
(JSC::WeakSetConstructor::WeakSetConstructor):
* runtime/WeakSetPrototype.cpp: Added.
(JSC::WeakSetPrototype::finishCreation):
(JSC::getWeakMapData):
(JSC::protoFuncWeakSetDelete):
(JSC::protoFuncWeakSetHas):
(JSC::protoFuncWeakSetAdd):
* runtime/WeakSetPrototype.h: Added.
(JSC::WeakSetPrototype::create):
(JSC::WeakSetPrototype::createStructure):
(JSC::WeakSetPrototype::WeakSetPrototype):
* tests/stress/weak-set-constructor-adder.js: Added.
(WeakSet.prototype.add):
* tests/stress/weak-set-constructor.js: Added.

LayoutTests:

Add basic-weakset test and fix WeakMap behavior to conform the latest spec.

* js/dom/basic-weakmap-expected.txt:
* js/dom/basic-weakset-expected.txt: Added.
* js/dom/basic-weakset.html: Added.
* js/dom/script-tests/basic-weakmap.js:
* js/dom/script-tests/basic-weakset.js: Added.

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

4 years agoRestore the WebKit.xcworkspace to the way it was before r182899,
simon.fraser@apple.com [Sun, 19 Apr 2015 16:17:09 +0000 (16:17 +0000)]
Restore the WebKit.xcworkspace to the way it was before r182899,
which inadvertently added the Source directory and a couple of source
files.

* WebKit.xcworkspace/contents.xcworkspacedata:

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

4 years agoWeb Inspector: Pass multiple arguments to classList.add and classList.remove
nvasilyev@apple.com [Sun, 19 Apr 2015 04:20:46 +0000 (04:20 +0000)]
Web Inspector: Pass multiple arguments to classList.add and classList.remove
https://bugs.webkit.org/show_bug.cgi?id=143914

classList.add and classList.remove can accept multiple arguments, use that.

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector.updateDockedState):
* UserInterface/Views/DOMTreeDataGrid.js:
(WebInspector.DOMTreeDataGrid):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.set hasChildren):
* UserInterface/Views/DatabaseContentView.js:
(WebInspector.DatabaseContentView):
* UserInterface/Views/DetailsSection.js:
(WebInspector.DetailsSection):
* UserInterface/Views/DetailsSectionPropertiesRow.js:
(WebInspector.DetailsSectionPropertiesRow):
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set classNames):
* UserInterface/Views/NavigationItem.js:
(WebInspector.NavigationItem):
* UserInterface/Views/ResourceContentView.js:
(WebInspector.ResourceContentView):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar):
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel):
* UserInterface/Views/SourceCodeTextEditor.js:
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
* UserInterface/Views/TimelineRuler.js:

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

4 years agoWeb Inspector: Make prototype pill’s background semi-transparent
nvasilyev@apple.com [Sun, 19 Apr 2015 04:19:54 +0000 (04:19 +0000)]
Web Inspector: Make prototype pill’s background semi-transparent
https://bugs.webkit.org/show_bug.cgi?id=143928

Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property.prototype-property):

(.object-tree-property.prototype-property:hover, .object-tree-property.prototype-property:focus):
Slightly highlight the prototype pill when hovering over.

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

4 years ago[Mac] Time elapsed should be right-aligned
jonlee@apple.com [Sun, 19 Apr 2015 03:29:25 +0000 (03:29 +0000)]
[Mac] Time elapsed should be right-aligned
https://bugs.webkit.org/show_bug.cgi?id=143927

Reviewed by Eric Carlson.

Current time is left-aligned, which is visually jarring when going from < 1 hour to > 1 hour.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-current-time-display): Set justify-content to flex-end.
(audio::-webkit-media-controls-time-remaining-display): Explicitly set justify-content to flex-start.

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

4 years agoFix lldb_webkit.py to show StringImpls correctly
simon.fraser@apple.com [Sat, 18 Apr 2015 22:06:19 +0000 (22:06 +0000)]
Fix lldb_webkit.py to show StringImpls correctly
https://bugs.webkit.org/show_bug.cgi?id=143920

Reviewed by Andreas Kling.

Update WTFStringImplProvider's is_8bit to use the correct bitmask.

* lldb/lldb_webkit.py:
(WTFStringImplProvider.is_8bit):

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

4 years ago[EFL] Unreviewed gardening
m.pakula@samsung.com [Sat, 18 Apr 2015 20:15:29 +0000 (20:15 +0000)]
[EFL] Unreviewed gardening

Update test expectations for failing tests.

* platform/efl/TestExpectations:
* platform/efl/fast/css/text-overflow-ellipsis-bidi-expected.txt: Rebaseline after r182620.
* platform/efl/fast/dom/focus-contenteditable-expected.txt: Ditto.
* platform/efl/fast/forms/listbox-hit-test-zoomed-expected.txt: Ditto.
* platform/efl/fast/parser/open-comment-in-textarea-expected.txt: Ditto.
* platform/efl/fast/text/international/bidi-layout-across-linebreak-expected.txt: Ditto.
* platform/efl/inspector-protocol/debugger/regress-133182-expected.txt: Rebaseline after r181810.
* platform/efl/svg/wicd/test-rightsizing-b-expected.txt: Rebaseline after r182620.

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

4 years agoREGRESSION (r181656): Animated tiled layers are missing content
simon.fraser@apple.com [Sat, 18 Apr 2015 19:39:13 +0000 (19:39 +0000)]
REGRESSION (r181656): Animated tiled layers are missing content
https://bugs.webkit.org/show_bug.cgi?id=143911
rdar://problem/20596328

Reviewed by Darin Adler.
Source/WebCore:

After r181656, all requestAnimationFrame was falling back to timers, and not
using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
fumble. As a result, GraphicsLayerUpdater (which updates tiled layers during
animations) was failing to do any updates.

Replace this confusing Optional<> code with simpler code that just forces the
clients to make a DisplayRefreshMonitor if they can, first asking
ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().

Make lots of things into references, and use C++11 initialization in some places.

Add Internals API to allow a test to get the number of layer flushes that have
occurred.

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::windowScreenDidChange):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
* dom/ScriptedAnimationController.h:
* page/ChromeClient.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor):
(WebCore::DisplayRefreshMonitor::create):
(WebCore::DisplayRefreshMonitor::addClient):
(WebCore::DisplayRefreshMonitor::removeClient):
(WebCore::DisplayRefreshMonitor::displayDidRefresh):
* platform/graphics/DisplayRefreshMonitor.h:
* platform/graphics/DisplayRefreshMonitorClient.cpp:
(WebCore::DisplayRefreshMonitorClient::~DisplayRefreshMonitorClient):
* platform/graphics/DisplayRefreshMonitorClient.h:
* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::createMonitorForClient):
(WebCore::DisplayRefreshMonitorManager::registerClient):
(WebCore::DisplayRefreshMonitorManager::unregisterClient):
(WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
(WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
* platform/graphics/DisplayRefreshMonitorManager.h:
* platform/graphics/GraphicsLayerUpdater.cpp:
(WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
(WebCore::GraphicsLayerUpdater::scheduleUpdate):
(WebCore::GraphicsLayerUpdater::screenDidChange):
(WebCore::GraphicsLayerUpdater::displayRefreshFired):
(WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
* platform/graphics/GraphicsLayerUpdater.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
(WebCore::RenderLayerCompositor::flushLayersSoon):
(WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
(WebCore::RenderLayerCompositor::startTrackingLayerFlushes):
(WebCore::RenderLayerCompositor::layerFlushCount):
* rendering/RenderLayerCompositor.h:
* testing/Internals.cpp:
(WebCore::Internals::startTrackingLayerFlushes):
(WebCore::Internals::layerFlushCount):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

After r181656, all requestAnimationFrame was falling back to timers, and not
using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
fumble.

Replace this confusing Optional<> code with simpler code that just forces the
clients to make a DisplayRefreshMonitor if they can, first asking
ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().

Make lots of things into references, and use C++11 initialization in some places.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDisplayRefreshMonitor):
* WebProcess/WebCoreSupport/WebChromeClient.h:

LayoutTests:

Test that animates a tiled layer, and checks that layer flushes occur while the
animation is running.

* compositing/animation/animation-backing-expected.txt: Added.
* compositing/animation/animation-backing.html: Added.

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

4 years agoSwipeShadow images are installed on iOS
mitz@apple.com [Sat, 18 Apr 2015 14:57:19 +0000 (14:57 +0000)]
SwipeShadow images are installed on iOS
https://bugs.webkit.org/show_bug.cgi?id=143915

Reviewed by Tim Horton.

* Configurations/WebKit.xcconfig: Added Resources/Mac/* to
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
individual patterns.
* Resources/SwipeShadow.png: Moved to mac.
* Resources/SwipeShadow@2x.png: Moved to mac.
* Resources/mac: Added.
* Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
* Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
* WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
SwipeShadow*.png into it. Updated for file moves.

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

4 years agoFix NetworkCache Statistics database bootstrapping after r182803
cdumez@apple.com [Sat, 18 Apr 2015 14:42:08 +0000 (14:42 +0000)]
Fix NetworkCache Statistics database bootstrapping after r182803
https://bugs.webkit.org/show_bug.cgi?id=143890

Reviewed by Darin Adler.

Update the NetworkCache Statistics database bootstrapping code to use
the records path instead of the version path. Also check that the
filenames in the folder are valid hashes to discard the *-body files.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::recordsPath):
(WebKit::NetworkCache::Cache::storagePath): Deleted.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
(WebKit::NetworkCache::Statistics::shrinkIfNeeded):

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

4 years agoWeb Inspector: All sans-serif font family rules should be set the same way.
jonowells@apple.com [Sat, 18 Apr 2015 04:04:39 +0000 (04:04 +0000)]
Web Inspector: All sans-serif font family rules should be set the same way.
https://bugs.webkit.org/show_bug.cgi?id=143909

Reviewed by Timothy Hatcher.

Update styles so that all uses of sans-serif font use -webkit-system-font consistently.

* UserInterface/Views/DefaultDashboardView.css:
(body.mac-platform.legacy .toolbar .dashboard.default > .item):
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property .prototype-name):
* UserInterface/Views/ObjectTreeView.css:
(.object-tree-outline li .empty-message):
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
(.timeline-overview-graph.rendering-frame > .divider > .label):

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

4 years agoClients sometimes block for 500ms in waitForPossibleGeometryUpdates
timothy_horton@apple.com [Sat, 18 Apr 2015 01:04:24 +0000 (01:04 +0000)]
Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
https://bugs.webkit.org/show_bug.cgi?id=143901
<rdar://problem/20488655>

Reviewed by Anders Carlsson.

* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForMessage):
InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
a sync message arrives while waiting, but it should also avoid waiting
if there's a sync message already in the queue when the waiting starts,
as that will have the same nasty effect.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
If a synchronous message comes in from the Web process while we're waiting,
cancel our synchronous wait for DidUpdateGeometry. This will cause the size
change to not synchronize with the Web process' painting, but that is better
than pointlessly blocking for 500ms.

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

4 years agoPossible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessage...
cdumez@apple.com [Sat, 18 Apr 2015 00:46:30 +0000 (00:46 +0000)]
Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
https://bugs.webkit.org/show_bug.cgi?id=143899
<rdar://problem/20584215>

Reviewed by Anders Carlsson.

WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
check that m_page.corePage() was non-null before dereferencing, thus
causing crashes when it is null.

* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):

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

4 years agoUse ASan poisoning to taint moved-out-of Refs
ap@apple.com [Fri, 17 Apr 2015 22:45:42 +0000 (22:45 +0000)]
Use ASan poisoning to taint moved-out-of Refs
https://bugs.webkit.org/show_bug.cgi?id=143894
rdar://problem/19443723

Reviewed by Darin Adler.

* wtf/Ref.h: (WTF::Ref::~Ref):

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

4 years agoWeb Inspector: Have better inactive window color for pixel borders
timothy@apple.com [Fri, 17 Apr 2015 22:29:19 +0000 (22:29 +0000)]
Web Inspector: Have better inactive window color for pixel borders
https://bugs.webkit.org/show_bug.cgi?id=143888

Reviewed by Joseph Pecoraro.

* UserInterface/Views/FindBanner.css:
(body.window-inactive .find-banner):
* UserInterface/Views/Main.css:
(body.window-inactive.docked.bottom):
(body.window-inactive.docked.right):
(body.window-inactive #split-content-browser):
* UserInterface/Views/NavigationBar.css:
(body.window-inactive .navigation-bar):
* UserInterface/Views/QuickConsole.css:
(body.window-inactive .quick-console):
(.quick-console.showing-log):
* UserInterface/Views/Sidebar.css:
(body.window-inactive .sidebar.left):
(body.window-inactive .sidebar.right):

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

4 years agoWebKit client should be able to add view controller for link preview.
commit-queue@webkit.org [Fri, 17 Apr 2015 22:28:05 +0000 (22:28 +0000)]
WebKit client should be able to add view controller for link preview.
https://bugs.webkit.org/show_bug.cgi?id=143686

Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
for link preview and react to the dismissal of this view controller. Also connect WKContentView to
preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
in WKUIDelegatePrivate.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2015-04-17
Reviewed by Beth Dakin.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
(-[WKContentView commitPreviewViewController:]):
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
(-[WKContentView didDismissPreviewViewController:committing:]):

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