WebKit-https.git
5 years ago[Win] Update Media Player logic for new Legible Output API
bfulgham@apple.com [Tue, 14 Jul 2015 01:11:12 +0000 (01:11 +0000)]
[Win] Update Media Player logic for new Legible Output API
https://bugs.webkit.org/show_bug.cgi?id=146922
<rdar://problem/20542574>

Reviewed by Eric Carlson.

* AVFoundationSupport.py: Check for updated AVFCF feature.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Update to call the
new 'readNativeSampleBuffer' method.
(WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): Added. This is a no-op
on Windows if it has the new AVCF API. Otherwise, it contains the same implementation
that has always been used in 'processNativeSamples'.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
(WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer): Added. Use the new
Legible Output API instead of the old CoreMedia solution if it is available.
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
(WebCore::InbandTextTrackPrivateAVCF::mediaSelectionOption):
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
(WebCore::InbandTextTrackPrivateLegacyAVCF::readNativeSampleBuffer): Add a stub implementation.
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createPlayerItem): Use the new Legible Output API if it is available.

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

5 years agoFix a typo.
rniwa@webkit.org [Tue, 14 Jul 2015 00:10:32 +0000 (00:10 +0000)]
Fix a typo.

* public/js/helper-classes.js:

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

5 years agoWeb Inspector: Uncaught exception in inspector for some ConsoleMessages
commit-queue@webkit.org [Mon, 13 Jul 2015 23:53:14 +0000 (23:53 +0000)]
Web Inspector: Uncaught exception in inspector for some ConsoleMessages
https://bugs.webkit.org/show_bug.cgi?id=146919

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-07-13
Reviewed by Brian Burg.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
The parameters list may not exist, so null check it before use.

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

5 years agoObject cycles should not prevent allocation elimination/sinking
basile_clement@apple.com [Mon, 13 Jul 2015 23:27:30 +0000 (23:27 +0000)]
Object cycles should not prevent allocation elimination/sinking
https://bugs.webkit.org/show_bug.cgi?id=143073

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch introduces a new allocation sinking phase that is able to
sink cycles, in DFGAllocationCycleSinkingPhase.cpp. This phase
supersedes the old allocation sinking phase in
DFGObjectAllocationSinkingPhase.cpp, as that previous phase was never
able to sink allocation cycles while the new phase sometimes can; see
DFGAllocationCycleSinkingPhase.cpp for details.

For now, the new sinking phase is kept behind a
JSC_enableAllocationCycleSinking flag that reverts to the old sinking
phase when false (i.e., by default). This also removes the old
JSC_enableObjectAllocationSinking flag. run-javascriptcore-tests
defaults to using the new sinking phase.

* dfg/DFGGraph.h:
(JSC::DFG::Graph::addStructureSet): Allow empty structure sets
* dfg/DFGLazyNode.cpp:
(JSC::DFG::LazyNode::dump): Prettier dump
* dfg/DFGNode.h:
(JSC::DFG::Node::cellOperand): Move to opInfo for MaterializeCreateActivation
(JSC::DFG::Node::hasStructureSet): Add MaterializeNewObject
(JSC::DFG::Node::objectMaterializationData): Move to opInfo2
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Remove unused header
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::ObjectAllocationSinkingPhase): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::run): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::performSinking): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::determineMaterializationPoints): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::placeMaterializationPoints): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::lowerNonReadingOperationsOnPhantomAllocations): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::promoteSunkenFields): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::resolve): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::createMaterialize): Deleted.
(JSC::DFG::ObjectAllocationSinkingPhase::populateMaterialize): Deleted.
* dfg/DFGObjectAllocationSinkingPhase.h:
* dfg/DFGPromotedHeapLocation.h: Add a hash and a helper function to PromotedLocationDescriptor
(JSC::DFG::PromotedLocationDescriptor::PromotedLocationDescriptor):
(JSC::DFG::PromotedLocationDescriptor::operator bool):
(JSC::DFG::PromotedLocationDescriptor::neededForMaterialization):
(JSC::DFG::PromotedLocationDescriptorHash::hash):
(JSC::DFG::PromotedLocationDescriptorHash::equal):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validateSSA): Assert that most nodes never see a phantom allocation
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileMaterializeNewObject): Use the new structureSet() operand
(JSC::FTL::DFG::LowerDFGToLLVM::compileMaterializeCreateActivation): Node has a new child
* ftl/FTLOSRExitCompiler.cpp: Handle materialization cycles
(JSC::FTL::compileStub):
* ftl/FTLOperations.cpp: Handle materialization cycles
(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):
* ftl/FTLOperations.h: Handle materialization cycles
* tests/stress/correctly-sink-object-even-though-it-dies.js: Added.
(clobber):
(foo):
* tests/stress/eliminate-object-read-over-call.js: Added.
(clobber):
(foo):
* tests/stress/materialize-object-on-edge.js: Added.
(call):
(foo):
* tests/stress/object-sinking-stress.js: Added.
(foo):
* tests/stress/sink-object-cycle.js: Added.
(clobber):
(foo):
* tests/stress/sink-object-past-put.js: Added.
(clobber):
(foo):
* tests/stress/sinkable-new-object-in-loop.js: Added.
(foo):

LayoutTests:

Add a few microbenchmarks that show performance improvement when
sinking or elimininating object cycles.

* js/regress/elidable-new-object-cycle-expected.txt: Added.
* js/regress/elidable-new-object-cycle.html: Added.
* js/regress/script-tests/elidable-new-object-cycle.js: Added.
(sumOfArithSeries):
(foo):
* js/regress/script-tests/sinkable-closure-cycle.js: Added.
(factorial.f):
(factorial):
* js/regress/script-tests/sinkable-new-object-cycle.js: Added.
(sumOfArithSeries):
(verify):
(foo):
* js/regress/sinkable-closure-cycle-expected.txt: Added.
* js/regress/sinkable-closure-cycle.html: Added.
* js/regress/sinkable-new-object-cycle-expected.txt: Added.
* js/regress/sinkable-new-object-cycle.html: Added.

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

5 years agoCleanup: Avoid extraneous increment and decrement of reference count of ScriptArgumen...
dbates@webkit.org [Mon, 13 Jul 2015 23:11:05 +0000 (23:11 +0000)]
Cleanup: Avoid extraneous increment and decrement of reference count of ScriptArguments in ConsoleClient
https://bugs.webkit.org/show_bug.cgi?id=146920

Reviewed by Brian Burg.

Remove local variable RefPtr<ScriptArguments> and copy constructor call with an argument that
was initialized with an rvalue reference. The argument itself is an lvalue reference.

* runtime/ConsoleClient.cpp:
(JSC::ConsoleClient::printConsoleMessageWithArguments):
(JSC::ConsoleClient::internalMessageWithTypeAndLevel):

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

5 years agoMedia Session: add plumbing for delivering start/end-of-interruption events
mrajca@apple.com [Mon, 13 Jul 2015 22:51:15 +0000 (22:51 +0000)]
Media Session: add plumbing for delivering start/end-of-interruption events
https://bugs.webkit.org/show_bug.cgi?id=146837

Reviewed by Tim Horton.

WebCore:
* Modules/mediasession/MediaSessionEvents.h: Renamed from MediaEventTypes.h and added new constants for
  interruption events.
* WebCore.xcodeproj/project.pbxproj: Renamed MediaEventTypes.h.
* page/Page.h: Added stub.
* page/Page.cpp: Added stub.

WebKit2: Added plumbing.
* UIProcess/API/C/WKPage.cpp:
(WKPageHandleMediaSessionInterruptionEvent):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleMediaSessionInterruptionEvent):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::handleMediaSessionInterruptionEvent):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

5 years ago[iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into...
simon.fraser@apple.com [Mon, 13 Jul 2015 22:24:10 +0000 (22:24 +0000)]
[iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into account
https://bugs.webkit.org/show_bug.cgi?id=146918
rdar://problem/9222837

Reviewed by Tim Horton.

Use as input to the viewport scaling algorithm a contents size from the FrameView
that takes overflow on the viewport renderer into account. This prevents unexpected
viewports scaling on pages that have content that overflows their expressed contents size,
but apply overflow to the <body>.

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::contentsSizeRespectingOverflow): Look for overflow:hidden on each axis of
the m_viewportRenderer, which is computed post-layout by calculateScrollbarModesForLayout()
and is used for scrollbar logic on OS X. Clip unscaledDocumentRect on each axis, and then
apply page scale.
* page/FrameView.h:

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrameDidLayout): Use contentsSizeRespectingOverflow(),
rather than raw contentsSize(), to determine scaling.

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

5 years agoUpdate JetStream version number to 1.1.
fpizlo@apple.com [Mon, 13 Jul 2015 22:09:48 +0000 (22:09 +0000)]
Update JetStream version number to 1.1.

Rubber stamped by Ryosuke Niwa.

* JetStream/create.rb:

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

5 years agoUpdate WebCore Features.json
bfulgham@apple.com [Mon, 13 Jul 2015 21:40:47 +0000 (21:40 +0000)]
Update WebCore Features.json
https://bugs.webkit.org/show_bug.cgi?id=146914

Reviewed by Benjamin Poulain.

* features.json: Update with notes for CSS Scroll Snap Points, Filter Effects,
backdrop-filters, and initial-letter.

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

5 years agoFixed the build.
mitz@apple.com [Mon, 13 Jul 2015 21:38:01 +0000 (21:38 +0000)]
Fixed the build.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreviewInWindow:]):
(-[WKContentView _unregisterPreviewInWindow:]):

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

5 years agoRemoved now-unused SPI -[WKWebView _loadRequest:withOptions:].
mitz@apple.com [Mon, 13 Jul 2015 20:50:34 +0000 (20:50 +0000)]
Removed now-unused SPI -[WKWebView _loadRequest:withOptions:].

Rubber-stamped by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _loadRequest:withOptions:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

5 years agoApps linked with a deployment target of iOS 7.x or earlier crash when using modern...
andersca@apple.com [Mon, 13 Jul 2015 20:44:35 +0000 (20:44 +0000)]
Apps linked with a deployment target of iOS 7.x or earlier crash when using modern WebKit API
https://bugs.webkit.org/show_bug.cgi?id=146913
rdar://problem/21789252

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

Make a top-level symlink from /System/Library/PrivateFrameworks/JavaScriptCore.framework to
/System/Library/Frameworks/JavaScriptCore.framework.

* JavaScriptCore.xcodeproj/project.pbxproj:

Source/WebKit2:

Make a top-level symlink from /System/Library/PrivateFrameworks/WebKit.framework to
/System/Library/Frameworks/WebKit.framework.

* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoIf Watchpoint::fire() looks at the state of the world, it should definitely see its...
fpizlo@apple.com [Mon, 13 Jul 2015 20:10:02 +0000 (20:10 +0000)]
If Watchpoint::fire() looks at the state of the world, it should definitely see its set invalidated, and maybe it should see the object of interest in the transitioned-to state
https://bugs.webkit.org/show_bug.cgi?id=146897

Reviewed by Mark Lam.

The idea is to eventually support adaptive watchpoints. An adaptive watchpoint will be
able to watch for a condition that is more fine-grained than any one watchpoint set. For
example, we might watch a singleton object to see if it ever acquires a property called
"foo". So long as it doesn't have such a property, we don't want to invalidate any code.
But if it gets that property, then we should deoptimize. Current watchpoints will
invalidate code as soon as any property is added (or deleted), because they will use the
transition watchpoint set of the singleton object's structure, and that fires anytime
there is any transition.

An adaptive watchpoint would remember the singleton object, and when it got fired, it
would check if the object's new structure has the property "foo". If not, it would check
if the object's new structure is watchable (i.e. has a valid transition watchpoint set).
If the property is missing and the structure is watchable, it would add itself to the
watchpoint set of the new structure. Otherwise, it would deoptimize.

There are two problems with this idea, and this patch fixes these problems. First, we
usually fire the transition watchpoint before we do the structure transition. This means
that if the fire() method looked at the singleton object's structure, it would see the old
structure, not the new one. It would have no way of knowing what the new structure is.
Second, inside the fire() method, the watchpoint set being invalidated still appears
valid, since we change the state after we fire all watchpoints.

This patch addresses both issues. Now, in the most important case (addPropertyTransition),
we fire the watchpoint set after we have modified the object. This is accomplished using
a deferral scope called DeferredStructureTransitionWatchpointFire. In cases where there is
no deferral, the adaptive watchpoint will conservatively resort to deoptimization because
it would find that the singleton object's structure is no longer watchable. This is
because in the absence of deferral, the singleton object would still have the original
structure, but that structure's watchpoint set would now report itself as having been
invalidated.

* bytecode/Watchpoint.cpp:
(JSC::WatchpointSet::fireAllSlow): Change the state of the set before firing all watchpoints.
(JSC::WatchpointSet::fireAllWatchpoints):
* runtime/JSObject.h:
(JSC::JSObject::putDirectInternal): Use the deferral scope.
* runtime/Structure.cpp:
(JSC::Structure::Structure): Pass the deferral scope to didTransitionFromThisStructure.
(JSC::Structure::addPropertyTransition): Pass the deferral scope to create().
(JSC::StructureFireDetail::dump): This is no longer anonymous.
(JSC::DeferredStructureTransitionWatchpointFire::DeferredStructureTransitionWatchpointFire): Start with a null structure.
(JSC::DeferredStructureTransitionWatchpointFire::~DeferredStructureTransitionWatchpointFire): Fire the watchpoint if there is a structure.
(JSC::DeferredStructureTransitionWatchpointFire::add): Add a structure. Logically this is a list of deferred things, but we assert that there only will be one (happens to be true now).
(JSC::Structure::didTransitionFromThisStructure): Defer the watchpoint firing if there is a deferral scope.
* runtime/Structure.h:
(JSC::StructureFireDetail::StructureFireDetail): Move this to the header.
* runtime/StructureInlines.h:
(JSC::Structure::create): Pass the deferral scope to the constructor.

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

5 years agoSilverlight causes tabs to hang
andersca@apple.com [Mon, 13 Jul 2015 19:54:19 +0000 (19:54 +0000)]
Silverlight causes tabs to hang
https://bugs.webkit.org/show_bug.cgi?id=146912
rdar://problem/21686508

Reviewed by Sam Weinig.

Make sure to link production builds of the legacy plug-in process against the shim on 10.11 and newer.

* Configurations/PluginProcess.xcconfig:

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

5 years agoChange MediaPlayer Media Stream method signatures to use references
bfulgham@apple.com [Mon, 13 Jul 2015 19:50:44 +0000 (19:50 +0000)]
Change MediaPlayer Media Stream method signatures to use references
https://bugs.webkit.org/show_bug.cgi?id=146839
<rdar://problem/21769035>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-13
Reviewed by Darin Adler.

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::loadWithNextMediaEngine):
* platform/graphics/MediaPlayerPrivate.h: Changed to references
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Ditto
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load): Ditto
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:

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

5 years agoGTK] Build race with -DENABLE_WAYLAND_TARGET=ON
clopez@igalia.com [Mon, 13 Jul 2015 19:11:42 +0000 (19:11 +0000)]
GTK] Build race with -DENABLE_WAYLAND_TARGET=ON
https://bugs.webkit.org/show_bug.cgi?id=146740

Reviewed by Martin Robinson.

No new tests, no behavior changes.

* PlatformGTK.cmake: platform/graphics/wayland sources should be
included into WebCore source list instead of WebCorePlatformGTK.
Also move the add_custom_command() block into if(ENABLE_WAYLAND_TARGET),
this is not strictly needed to fix this bug, but it seems cleaner.

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

5 years agoWeb Inspector: Use -apple-system-monospaced-numbers for line numbers
nvasilyev@apple.com [Mon, 13 Jul 2015 19:03:33 +0000 (19:03 +0000)]
Web Inspector: Use -apple-system-monospaced-numbers for line numbers
https://bugs.webkit.org/show_bug.cgi?id=146898

Reviewed by Timothy Hatcher.

* UserInterface/Views/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-linenumber): Decrease font-size by 1px to make 4 digit numbers fit.

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

5 years agoAdding MediaStream Engine building blocks to the code repo
commit-queue@webkit.org [Mon, 13 Jul 2015 17:59:16 +0000 (17:59 +0000)]
Adding MediaStream Engine building blocks to the code repo
https://bugs.webkit.org/show_bug.cgi?id=146789
<rdar://problem/21747025>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-13
Reviewed by Brent Fulgham.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Added.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setLoadingProgresssed):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setHasAvailableVideoFrame):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createWeakPtr):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: Added.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareToPlay):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformMedia):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pauseInternal):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paused):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsScanning):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::naturalSize):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasVideo):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAudio):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVisible):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::durationMediaTime):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seeking):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setRateDouble):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setPreservesPitch):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::networkState):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::readyState):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::maxMediaTimeSeekable):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::minMediaTimeSeekable):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::buffered):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didLoadingProgress):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setSize):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAvailableVideoFrame):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsAcceleratedRendering):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::movieLoadType):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareForRendering):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::engineDescription):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::languageOfPrimaryAudioTrack):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::shouldBePlaying):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::addDisplayLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::removeDisplayLayer):
* platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.h: Added.
* platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.mm: Added.
(WebCore::MediaStreamPrivateAVFObjC::create):
(WebCore::MediaStreamPrivateAVFObjC::MediaStreamPrivateAVFObjC):
(WebCore::MediaStreamPrivateAVFObjC::~MediaStreamPrivateAVFObjC):
(WebCore::MediaStreamPrivateAVFObjC::duration):
(WebCore::MediaStreamPrivateAVFObjC::buffered):
(WebCore::MediaStreamPrivateAVFObjC::readyState):
(WebCore::MediaStreamPrivateAVFObjC::hasAudio):
(WebCore::MediaStreamPrivateAVFObjC::hasVideo):
(WebCore::MediaStreamPrivateAVFObjC::naturalSize):
* platform/mediastream/MediaStreamPrivate.h:
(WebCore::MediaStreamPrivate::MediaStreamPrivate): Added constructor.

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

5 years ago[Win] Skip failing table-related AX tests
bfulgham@apple.com [Mon, 13 Jul 2015 17:17:02 +0000 (17:17 +0000)]
[Win] Skip failing table-related AX tests
https://bugs.webkit.org/show_bug.cgi?id=146903

* platform/win/TestExpectations:

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

5 years ago[iOS] Cancel AirPlay explicitly when exiting from full screen
eric.carlson@apple.com [Mon, 13 Jul 2015 16:54:53 +0000 (16:54 +0000)]
[iOS] Cancel AirPlay explicitly when exiting from full screen
https://bugs.webkit.org/show_bug.cgi?id=146902
<rdar://problem/20923632>

Reviewed by Brent Fulgham.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::~WebVideoFullscreenInterfaceAVKit): Call setExternalPlayback(false)
  if playing to an external screen.

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

5 years ago[Linux] SeccompFilters: handle alternate install prefixes
mcatanzaro@igalia.com [Mon, 13 Jul 2015 15:42:11 +0000 (15:42 +0000)]
[Linux] SeccompFilters: handle alternate install prefixes
https://bugs.webkit.org/show_bug.cgi?id=140065

Reviewed by Žan Doberšek.

If the install prefix is something other than /usr, e.g. /usr/local or
~/jhbuild/install, then we want to make sure to allow libraries and data
from that prefix.

* PlatformEfl.cmake:
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::SyscallPolicy::addDefaultWebProcessPolicy):

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

5 years ago[GTK] Contents not correctly laid out when the web view is not realized
carlosgc@webkit.org [Mon, 13 Jul 2015 07:44:18 +0000 (07:44 +0000)]
[GTK] Contents not correctly laid out when the web view is not realized
https://bugs.webkit.org/show_bug.cgi?id=142532

Reviewed by Darin Adler.

The problem is that we are not reporting any size until the web
view is realized, so any web view loaded in a separate tab in the
browser, will report 0x0 as the window.innerWidth,
window.innerHeight until the view is realized. Websites that use
the window.innerWidth/innerHeight during the page load to decide
how to lay out the contents will be rendered wrongly.
I haven't been able to reproduce this with unit tests, as this
requires the particular case of same window but different web
views using tabs for example.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::viewSize): Always report the drawing area
size to make usre it's in sync with the WebProcess page size.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSizeAllocate): Remove the optimization of only
report the size when it has changed, since both the redirected
window and the drawing area already do that check. Also remove the
optimization of waiting until the view is mapped to report its
size, since that's often too late for websites using the window
size during load.
(webkitWebViewBaseMap): Never report size on map, it should have
already been reported by size-allocate.

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

5 years agoWeb Inspector: Add -apple-system-monospaced-numbers to font and font-family autocomplete
timothy@apple.com [Mon, 13 Jul 2015 05:24:09 +0000 (05:24 +0000)]
Web Inspector: Add -apple-system-monospaced-numbers to font and font-family autocomplete
https://bugs.webkit.org/show_bug.cgi?id=146865

Reviewed by Daniel Bates.

* UserInterface/Models/CSSKeywordCompletions.js:

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

5 years agoWatchpoints should be removed from their owning WatchpointSet before they are fired
fpizlo@apple.com [Mon, 13 Jul 2015 02:16:17 +0000 (02:16 +0000)]
Watchpoints should be removed from their owning WatchpointSet before they are fired
https://bugs.webkit.org/show_bug.cgi?id=146895

Reviewed by Sam Weinig.

This simplifies the WatchpointSet API by making it so that when Watchpoint::fire() is
called, the Watchpoint is no longer in the set. This means that you don't have to remember
to remove it from the set's list (currently we do that implicitly as part of whatever
any particular Watchpoint::fireInternal() does), and you can now write adaptive
watchpoints that re-add themselves to a different set if they determine that the thing
they are actually watching is still intact but now needs to be watched in a different way
(like watching for whether some singleton object has a property of some name).

* bytecode/Watchpoint.cpp:
(JSC::Watchpoint::~Watchpoint): Add a comment about why this is necessary.
(JSC::Watchpoint::fire): Make this out-of-line, private, and make it assert that we're no longer on the list.
(JSC::WatchpointSet::fireAllWatchpoints): Make this remove the watchpoint from the list before firing it.
* bytecode/Watchpoint.h:
(JSC::Watchpoint::fire): Deleted. I moved this to Watchpoint.cpp.

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

5 years agoAX: WEB: VoiceOver for iOS does not read <iframe> elements during linear (swipe)...
cfleizach@apple.com [Sun, 12 Jul 2015 19:41:30 +0000 (19:41 +0000)]
AX: WEB: VoiceOver for iOS does not read <iframe> elements during linear (swipe) navigation.
https://bugs.webkit.org/show_bug.cgi?id=146861

Reviewed by Darin Adler.

Source/WebCore:

AttachmentViews exist only on WK1 so we need account for both platforms.

Test: platform/ios-simulator/accessibility/iframe-access.html

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

LayoutTests:

* platform/ios-simulator/accessibility/iframe-access-expected.txt: Added.
* platform/ios-simulator/accessibility/iframe-access.html: Added.

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

5 years ago[Streams API] Templating ReadableJSStream
youenn.fablet@crf.canon.fr [Sun, 12 Jul 2015 16:28:11 +0000 (16:28 +0000)]
[Streams API] Templating ReadableJSStream
https://bugs.webkit.org/show_bug.cgi?id=146802

Reviewed by Darin Adler.

Introducing ReadableStream::clearValues to clear queued values when cancelling and going into error state.

Introducing ReadableEnqueuingStream to handle the stream queue, as a class template.
Specialized ReadableEnqueuingStream for the purpose of ReadableJSStream (storage of JSValue with variable size).

Updated some static functions to accept a ReadableStream in lieu of the more specialized ReadableJSStream.

Covered by existing tests.

* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::changeStateToErrored):
(WebCore::ReadableStream::cancelNoCheck):
* Modules/streams/ReadableStream.h:
(WebCore::ReadableEnqueuingStream::ReadableEnqueuingStream):
(WebCore::ReadableEnqueuingStream::enqueueChunk):
(WebCore::ReadableEnqueuingStream<ChunkType>::read):
* bindings/js/ReadableJSStream.cpp:
(WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::read):
(WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::enqueueChunk):
(WebCore::createPullResultFulfilledFunction):
(WebCore::createCancelResultFulfilledFunction):
(WebCore::ReadableJSStream::ReadableJSStream):
(WebCore::ReadableJSStream::enqueue):
* bindings/js/ReadableJSStream.h:
(WebCore::ReadableJSStreamValue::create):
(WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::desiredSize):
(WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::ReadableEnqueuingStream):

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

5 years ago[EFL] Unreviewed, EFL gardening on 12th Jul.
gyuyoung.kim@webkit.org [Sun, 12 Jul 2015 06:43:52 +0000 (06:43 +0000)]
[EFL] Unreviewed, EFL gardening on 12th Jul.

Mark some ax tests and editing tests to failure since r186694 and r185692.

* platform/efl/TestExpectations:

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

5 years agoUnreviewed build fix.
bshafiei@apple.com [Sun, 12 Jul 2015 05:37:28 +0000 (05:37 +0000)]
Unreviewed build fix.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad):

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

5 years agoWeb Inspector: Inspector should be able to be docked to the bottom of a narrow window
nvasilyev@apple.com [Sun, 12 Jul 2015 04:23:21 +0000 (04:23 +0000)]
Web Inspector: Inspector should be able to be docked to the bottom of a narrow window
https://bugs.webkit.org/show_bug.cgi?id=146871

Reviewed by Timothy Hatcher.

Source/WebCore:

* inspector/InspectorFrontendClientLocal.cpp:

Source/WebInspectorUI:

* UserInterface/Views/Toolbar.css:
(@media (max-width: 539px)): Hide download button to fit search field into the screen.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.mm:

Source/WebKit2:

* UIProcess/WebInspectorProxy.cpp:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCanAttach):
* WebProcess/WebPage/WebInspector.cpp:

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

5 years agoVersioning.
bshafiei@apple.com [Sun, 12 Jul 2015 04:14:29 +0000 (04:14 +0000)]
Versioning.

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

5 years agoAdd some images for a blog post.
timothy@apple.com [Sun, 12 Jul 2015 02:59:28 +0000 (02:59 +0000)]
Add some images for a blog post.

* blog-files/inspector-elements-network-tabs.png: Added.
* blog-files/inspector-tab-bar.png: Added.
* blog-files/inspector-tab-icons.svg: Added.

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

5 years agoUnreviewed build fix, restrict APP_LINKS to just iOS.
joepeck@webkit.org [Sun, 12 Jul 2015 01:54:01 +0000 (01:54 +0000)]
Unreviewed build fix, restrict APP_LINKS to just iOS.

* wtf/Platform.h:

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

5 years agoAllow clients to opt-out of default app link link actions
joepeck@webkit.org [Sat, 11 Jul 2015 22:58:13 +0000 (22:58 +0000)]
Allow clients to opt-out of default app link link actions
https://bugs.webkit.org/show_bug.cgi?id=146883
<rdar://problem/21221902>

Reviewed by Dan Bernstein.

* UIProcess/API/APIUIClient.h:
(API::UIClient::shouldIncludeAppLinkActionsForElement):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::shouldIncludeAppLinkActionsForElement):
Plumbing for a new delegate message to ask the client if they
would like app link actions or not. Default is yes.

* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
Pass elementInfo into methods generating default actions.

(-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
When generating open actions, if the process has AppLink capabilities
ask the client if they want to include AppLink actions or fall back
to the basic Open action.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
Assistant delegate implementations forward to the UIDelegate.

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

5 years agoUpdate default link action sheets for app links
joepeck@webkit.org [Sat, 11 Jul 2015 22:58:08 +0000 (22:58 +0000)]
Update default link action sheets for app links
https://bugs.webkit.org/show_bug.cgi?id=146658
<rdar://problem/21221902>

Reviewed by Dan Bernstein.

Source/WebCore:

* English.lproj/Localizable.strings:
* platform/spi/ios/LaunchServicesSPI.h:

Source/WebKit2:

* Shared/mac/SandboxUtilities.h:
* Shared/mac/SandboxUtilities.mm: Renamed from Source/WebKit2/Shared/mac/SandboxUtilities.cpp.
(WebKit::processHasEntitlement):
* UIProcess/ApplicationStateTracker.mm:
(WebKit::applicationType):
(WebKit::hasEntitlement): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
Share a helper for checking if the current process has an entitlement.

* UIProcess/API/Cocoa/_WKElementAction.h:
* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction _elementActionWithType:title:actionHandler:]):
(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
* UIProcess/API/Cocoa/_WKElementActionInternal.h:
Add an internal way to make an element action with a standard type and regular handler.
We use this for the new standard types that don't have a default implementation.

* UIProcess/ios/WKActionSheetAssistant.mm:
(applicationHasAppLinkEntitlements):
(appLinkForURL):
Helpers checking access to app links and fetching app links.

(-[WKActionSheetAssistant _appendOpenActionsForURL:actions:]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet]):
(-[WKActionSheetAssistant defaultActionsForImageSheet]):
Create "Open in Safari" and "Open in 'App'" default actions for AppLinks,
otherwise add the normal default "Open" action.

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

5 years agoWeb Inspector: Improve runtime of pseudo-element sidebar style ordering
drousso@apple.com [Sat, 11 Jul 2015 22:29:55 +0000 (22:29 +0000)]
Web Inspector: Improve runtime of pseudo-element sidebar style ordering
https://bugs.webkit.org/show_bug.cgi?id=146866

Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.update): Determines the most specific selector and saves it to a variable.
(WebInspector.CSSRule.prototype.get mostSpecificSelector): Returns the most specific selector.
(WebInspector.CSSRule.prototype.selectorIsGreater): Compares the most specific selector to a given selector.
(WebInspector.CSSRule.prototype._determineMostSpecificSelector):
Searches through the selector list to find and return the selector that is the most specific.
(WebInspector.CSSRule):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):

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

5 years agoRemove incorrect overriding of inputAssistantItem in WKContentView.
enrica@apple.com [Sat, 11 Jul 2015 21:30:33 +0000 (21:30 +0000)]
Remove incorrect overriding of inputAssistantItem in WKContentView.
https://bugs.webkit.org/show_bug.cgi?id=146863
rdar://problem/21507154

Reviewed by Sam Weinig.

Correction to the patch in r186713.
We need to provide the inputAssistantItem from the responder.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputAccessoryView]):

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

5 years agoFix CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
benjamin@webkit.org [Sat, 11 Jul 2015 20:35:45 +0000 (20:35 +0000)]
Fix CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
https://bugs.webkit.org/show_bug.cgi?id=146879

Reviewed by Andreas Kling.

Some of my recent changes broke CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING :(

* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::prefixTreeVertexToString):
(WebCore::ContentExtensions::recursivePrint):
(WebCore::ContentExtensions::CombinedURLFilters::print):
* contentextensions/ContentExtensionsDebugging.h:
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::debugPrintDot):

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

5 years agoUnreviewed, rolling out r186689 and r186710.
cdumez@apple.com [Sat, 11 Jul 2015 20:15:39 +0000 (20:15 +0000)]
Unreviewed, rolling out r186689 and r186710.
https://bugs.webkit.org/show_bug.cgi?id=146880

May have caused a PLT regression and broken a layout test
(Requested by cdumez on #webkit).

Reverted changesets:

"[WK2] Increase the QoS of some of our WorkQueues to match the
one of our processes"
https://bugs.webkit.org/show_bug.cgi?id=146855
http://trac.webkit.org/changeset/186689

"REGRESSION (r186689?): fast/frames/frame-limit.html timeout
on Mavericks {Release,Debug} WK2 bots"
https://bugs.webkit.org/show_bug.cgi?id=146876
http://trac.webkit.org/changeset/186710

Patch by Commit Queue <commit-queue@webkit.org> on 2015-07-11

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

5 years agoRemove incorrect overriding of inputAssistantItem in WKContentView.
enrica@apple.com [Sat, 11 Jul 2015 19:02:25 +0000 (19:02 +0000)]
Remove incorrect overriding of inputAssistantItem in WKContentView.
https://bugs.webkit.org/show_bug.cgi?id=146863
rdar://problem/21507154

Reviewed by Dan Bernstein.

Removing implementation of inputAssistantItem and moving initialization
of formAccessoryView to inputAccessoryView to avoid interfering with
the keyboard handling of the assistant bar.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputAccessoryView]):
(-[WKContentView inputAssistantItem]): Deleted.
(-[WKContentView _inputAssistantItem]): Deleted.

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

5 years ago[iOS WK2] Scrolling issues on horizontally scrollable RTL pages
simon.fraser@apple.com [Sat, 11 Jul 2015 18:19:46 +0000 (18:19 +0000)]
[iOS WK2] Scrolling issues on horizontally scrollable RTL pages
https://bugs.webkit.org/show_bug.cgi?id=146872
rdar://problem/7569416

Reviewed by Sam Weinig.

Horizontally scrollable RTL pages in WebKit2 had a variety of issues: they had
a gap down the right edge, and unreachable content on the left side, focussing
form fields scrolled to the wrong location, and programmatic scrolls scrolled
to the wrong place.

Fix by plumbing the WebCore notion of scrollOrigin through to the UI process,
and using it in various places. There are three main aspects to the patch:

1. scroll origin is included in RemoteLayerTreeTransaction, and plumbed through
   to -[WKWebView _scrollToContentOffset:] for correct programmatic scrolling,
Source/WebCore:

   including zooming to focussed form elements.
2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
   rather than just conjuring up a rect with a zero origin, which makes position:fixed
   work correctly.
3. _interactionViewsContainerView (which hosts tap highlights) is positioned to
   coincide with the origin of the documentRect (i.e. at the scroll origin, which
   may not be top-left). This allows tap highlights to show in the correct location.
4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
   if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
   testing area.

* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::unobscuredContentRect):

Source/WebKit2:

   including zooming to focused form elements. The WKContentView's boundsOrigin
   is set to the scroll origin so that the view coordinates match document coordinates.
2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
   rather than just conjuring up a rect with a zero origin, which makes position:fixed
   work correctly.
3. _interactionViewsContainerView (which hosts tap highlights) is positioned to
   coincide with the origin of the documentRect (i.e. at the scroll origin, which
   may not be top-left). This allows tap highlights to show in the correct location.
4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
   if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
   testing area.

* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::scrollOrigin):
(WebKit::RemoteLayerTreeTransaction::setScrollOrigin):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::description): Dump some more info.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:scrollOrigin:]):
(-[WKWebView _scrollToContentOffset:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::requestScroll):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::requestScroll):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestScroll):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::requestScroll):
(WebKit::PageClientImpl::documentRect):
(WebKit::PageClientImpl::contentsSize): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computeCustomFixedPositionRect):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::requestScroll):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):

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

5 years agohttp/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin...
ddkilzer@apple.com [Sat, 11 Jul 2015 15:44:13 +0000 (15:44 +0000)]
http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html crashes on Windows

<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fsecurity%2FXFrameOptions%2Fx-frame-options-deny-meta-tag-parent-same-origin-deny.html>

* platform/win/TestExpectations: Mark tests as crashing:
- http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html

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

5 years agoREGRESSION (r186689?): fast/frames/frame-limit.html timeout on Mavericks {Release...
ddkilzer@apple.com [Sat, 11 Jul 2015 15:18:39 +0000 (15:18 +0000)]
REGRESSION (r186689?): fast/frames/frame-limit.html timeout on Mavericks {Release,Debug} WK2 bots

Fix tracked by: <http://webkit.org/b/146876>

* platform/mac-wk2/TestExpectations: Mark test as timing out:
- fast/frames/frame-limit.html

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

5 years agoREGRESSION (r186697): Fix Yosemite, El Capitan test results for js/dom/global-constru...
ddkilzer@apple.com [Sat, 11 Jul 2015 14:17:41 +0000 (14:17 +0000)]
REGRESSION (r186697): Fix Yosemite, El Capitan test results for js/dom/global-constructors-attributes.html

* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
- Move MediaStream results into alphabetical order to fix test
  failures.

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

5 years agoWeb Inspector: Warning icon tooltip for numbers with no units could be improved
drousso@apple.com [Sat, 11 Jul 2015 08:42:35 +0000 (08:42 +0000)]
Web Inspector: Warning icon tooltip for numbers with no units could be improved
https://bugs.webkit.org/show_bug.cgi?id=146859

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
If the property's value is incorrect and is comprised of only numbers, that must mean that the value needs
to have units (like "px") after the number.  Added another warning icon case to support this scenario.

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

5 years ago[WK2] Diagnostic logging messages are causing too much IPC
cdumez@apple.com [Sat, 11 Jul 2015 06:55:48 +0000 (06:55 +0000)]
[WK2] Diagnostic logging messages are causing too much IPC
https://bugs.webkit.org/show_bug.cgi?id=146873
<rdar://problem/21779205>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Move shouldLogAfterSampling() utility function to DiagnosticLoggingClient
so it can be easily reused.

* page/DiagnosticLoggingClient.h:
(WebCore::DiagnosticLoggingClient::shouldLogAfterSampling):

Source/WebKit2:

Diagnostic logging messages are causing too much IPC. To address the
problem, we now do the sampling of the senders' side (WebContent
process and Networking process) instead of the receiver's side
(UIProcess).

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::logDiagnosticMessage):
(WebKit::NetworkProcess::logDiagnosticMessageWithResult):
(WebKit::NetworkProcess::logDiagnosticMessageWithValue):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::logSampledDiagnosticMessage):
(WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithResult):
(WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithValue):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::logDiagnosticMessage):
(WebKit::WebPageProxy::logDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logDiagnosticMessageWithValue):
(WebKit::WebPageProxy::logSampledDiagnosticMessage):
(WebKit::WebPageProxy::logSampledDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logSampledDiagnosticMessageWithValue):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):

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

5 years agoDFG::DesiredWatchpoints should accept WatchpointSetType's that aren't necessarily...
fpizlo@apple.com [Sat, 11 Jul 2015 06:41:25 +0000 (06:41 +0000)]
DFG::DesiredWatchpoints should accept WatchpointSetType's that aren't necessarily pointers
https://bugs.webkit.org/show_bug.cgi?id=146875

Reviewed by Dan Bernstein.

In the future we'll want to add a desired watchpoint set that's something like "please
watch property 'Foo' for 'deletion' on structure 'S1'", so that the "set type" is struct
like "struct MySet { StringImpl* property; Mode mode; Structure* structure };".

This is a very mechanical change for now - all of the current users happen to use sets
that are pointer typed, so it's just a matter of moving some "*"'s around.

* dfg/DFGDesiredWatchpoints.h:
(JSC::DFG::GenericSetAdaptor::add):
(JSC::DFG::GenericSetAdaptor::hasBeenInvalidated):
(JSC::DFG::GenericDesiredWatchpoints::GenericDesiredWatchpoints):
(JSC::DFG::GenericDesiredWatchpoints::addLazily):
(JSC::DFG::GenericDesiredWatchpoints::reallyAdd):
(JSC::DFG::GenericDesiredWatchpoints::areStillValid):
(JSC::DFG::GenericDesiredWatchpoints::isWatched):
(JSC::DFG::DesiredWatchpoints::isWatched):

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

5 years agoWatchpoints should be allocated with FastMalloc
fpizlo@apple.com [Sat, 11 Jul 2015 05:52:37 +0000 (05:52 +0000)]
Watchpoints should be allocated with FastMalloc
https://bugs.webkit.org/show_bug.cgi?id=146874

Reviewed by Dan Bernstein.

This is in preparation for adding new subclasses of Watchpoint. While starting to do this
I realized that the way Watchpoints allocated themselves was unusual.

* bytecode/CodeBlockJettisoningWatchpoint.h:
(JSC::CodeBlockJettisoningWatchpoint::CodeBlockJettisoningWatchpoint): No need for the default constructor.
* bytecode/Watchpoint.h:
(JSC::Watchpoint::Watchpoint): This should be noncopyable and fast-allocated.
* dfg/DFGCommonData.h: Use a Bag<> instead of SegmentedVector<>. Bag means "malloc things but allow me to free them all at once", which is what we are doing here.
* dfg/DFGDesiredWatchpoints.h:
(JSC::DFG::GenericDesiredWatchpoints::reallyAdd): Use the Bag<> API rather than the very awkward SegmentedVector<> API.

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

5 years agoCleanup: Remove default constructor for WebCore::Pair()
dbates@webkit.org [Sat, 11 Jul 2015 03:45:19 +0000 (03:45 +0000)]
Cleanup: Remove default constructor for WebCore::Pair()
https://bugs.webkit.org/show_bug.cgi?id=146856
<rdar://problem/21773212>

Reviewed by Darin Adler.

Remove default constructor for WebCore::Pair() and the setters Pair::set{First, Second}()
since they are not used and it seems weird to keep the latter after the removal of the former.
Should it turn out that we find a use for having a default constructor and/or setters then
we can revert this change.

* css/Pair.h:
(WebCore::Pair::create): Deleted.
(WebCore::Pair::setFirst): Deleted.
(WebCore::Pair::setSecond): Deleted.
(WebCore::Pair::Pair): Deleted.

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

5 years agoAirplay button and placeholder are missing in inline controls
dino@apple.com [Sat, 11 Jul 2015 03:43:51 +0000 (03:43 +0000)]
Airplay button and placeholder are missing in inline controls
https://bugs.webkit.org/show_bug.cgi?id=146869
<rdar://problem/21555051>

Reviewed by Simon Fraser.

Fix a typo in the ENABLE that was causing the Airplay
setting (allowsAirPlayForMediaPlayback, which becomes
webkitWirelessVideoPlaybackDisabled) to default to false.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Change WIRELESS_TARGET_PLAYBACK
to WIRELESS_PLAYBACK_TARGET.

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

5 years agoAI folding of IsObjectOrNull is broken for non-object types that may be null
fpizlo@apple.com [Sat, 11 Jul 2015 03:01:20 +0000 (03:01 +0000)]
AI folding of IsObjectOrNull is broken for non-object types that may be null
https://bugs.webkit.org/show_bug.cgi?id=146867

Reviewed by Ryosuke Niwa.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): Fix the bug and add some text describing what is going on.
* tests/stress/misc-is-object-or-null.js: Added. Test for the bug.
(foo):
* tests/stress/other-is-object-or-null.js: Added. Test for a bug I almost introduced.
(foo):

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

5 years agoIt should be easy to measure total compile times.
fpizlo@apple.com [Sat, 11 Jul 2015 02:30:04 +0000 (02:30 +0000)]
It should be easy to measure total compile times.
https://bugs.webkit.org/show_bug.cgi?id=146857

Reviewed by Sam Weinig.

This gives DFG::Plan the ability to track total compile times, and return them in a map
of stats that jsc.cpp can display.

I want to do some work to bring down DFG compile times. This will help me measure whether
I'm making a difference or not.

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::~Plan):
(JSC::DFG::Plan::computeCompileTimes):
(JSC::DFG::Plan::reportCompileTimes):
(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::cancel):
(JSC::DFG::Plan::compileTimeStats):
(JSC::DFG::dumpAndVerifyGraph): Deleted.
(JSC::DFG::profilerCompilationKindForMode): Deleted.
* dfg/DFGPlan.h:
(JSC::DFG::Plan::compileTimeStats):
* jsc.cpp:
(jscmain):
* runtime/Options.h:

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

5 years ago[CoordinatedGraphics] Override primaryLayerID in CoordinatedGraphicsLayer
ryuan.choi@navercorp.com [Sat, 11 Jul 2015 00:40:19 +0000 (00:40 +0000)]
[CoordinatedGraphics] Override primaryLayerID in CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=146826

Reviewed by Gyuyoung Kim.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::id): Moved id as inline function.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
(WebCore::CoordinatedGraphicsLayer::id):

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

5 years agoUnskip some now-passing tests.
bfulgham@apple.com [Sat, 11 Jul 2015 00:40:01 +0000 (00:40 +0000)]
Unskip some now-passing tests.

* platform/mac-wk2/TestExpectations:

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

5 years agoWeb Inspector: Use -apple-system instead of -webkit-system-font
timothy@apple.com [Sat, 11 Jul 2015 00:16:19 +0000 (00:16 +0000)]
Web Inspector: Use -apple-system instead of -webkit-system-font
https://bugs.webkit.org/show_bug.cgi?id=146860

Remove explicit uses of font-family where inhertance from the body is enough.
Change -webkit-system-font to -apple-system and use -apple-system-monospaced-numbers
for DataGrid and the toolbar dashboard.

Reviewed by Sam Weinig.

* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):
* UserInterface/Views/DataGrid.css:
(.data-grid td):
* UserInterface/Views/DefaultDashboardView.css:
(.toolbar .dashboard.default > .item):
(.toolbar .dashboard.default > :matches(.time, .resourcesSize)):
(.toolbar .dashboard.default > .resourcesSize):
* UserInterface/Views/HierarchicalPathComponent.css:
(.hierarchical-path-component):
* UserInterface/Views/LogContentView.css:
(.console-messages):
* UserInterface/Views/Main.css:
(body):
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-name):
* 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):
* UserInterface/Views/SourceCodeTextEditor.css:
(.source-code.text-editor > .CodeMirror .issue-widget > .text):
* UserInterface/Views/TypeTreeView.css:
(.type-tree):

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

5 years agoExposing webkitMediaStream as MediaStream
commit-queue@webkit.org [Sat, 11 Jul 2015 00:12:19 +0000 (00:12 +0000)]
Exposing webkitMediaStream as MediaStream
https://bugs.webkit.org/show_bug.cgi?id=146813
<rdar://problem/21754383>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-10
Reviewed by Eric Carlson.

Source/WebCore:

* Modules/mediastream/MediaStream.idl: Changed interface
name from webkitMediaStream to MediaStream

LayoutTests:

* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
Changed attributes from webkitMediaStream to MediaStream
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
Ditto
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
Ditto

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

5 years agoREGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding...
bfulgham@apple.com [Sat, 11 Jul 2015 00:04:59 +0000 (00:04 +0000)]
REGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding word
https://bugs.webkit.org/show_bug.cgi?id=146695
<rdar://problem/21441466>

Reviewed by Tim Horton.

Add a new test that checks for correct mac selection behavior for editable and read-only
text fields.

* platform/mac/editing/selection/context-menu-select-editability-expected.txt: Added.
* platform/mac/editing/selection/context-menu-select-editability.html: Added.

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

5 years agoWeb Inspector: Add source links to functions logged in the console
drousso@apple.com [Fri, 10 Jul 2015 23:31:05 +0000 (23:31 +0000)]
Web Inspector: Add source links to functions logged in the console
https://bugs.webkit.org/show_bug.cgi?id=146377

Reviewed by Timothy Hatcher.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Returns a promise that contains the sourceCodeLocation if the object represents a function and has an objectId.
(WebInspector.RemoteObject.prototype._isFunction):
* UserInterface/Views/ConsoleMessageView.css:
(.console-message .console-message-location):
Added specified values for font sizing and family to ensure that all location links have the same styling.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
Now creates a link to the source code of the entered text if the message is of the type "result".
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
(WebInspector.ConsoleMessageView.prototype._createRemoteObjectIfNeeded):
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
(WebInspector.ConsoleMessageView.prototype._linkifyLocation):
(WebInspector.ConsoleMessageView.prototype._linkifyCallFrameLocation):
(WebInspector.ConsoleMessageView.prototype._linkifyCallFrame):

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

5 years ago[Mac] Unable to dismiss context menu during test runs
bfulgham@apple.com [Fri, 10 Jul 2015 23:09:59 +0000 (23:09 +0000)]
[Mac] Unable to dismiss context menu during test runs
https://bugs.webkit.org/show_bug.cgi?id=146836

Reviewed by Tim Horton.

Since Context Menus are modal, the test system would block on the displayed context menu,
causing tests to fail. Instead, we should do what WK1 was doing, which is to perform the
mouse click and generate the menu contents, but not ask AppKit to display it.

Drive-by fix: We did not handle 'escape' key presses. This is also fixed.

* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController keyDown:withModifiers:withLocation:]): Handle the 'escape' character.
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::mouseMoveTo): Keep track of the current mouse position.
(WTR::EventSendingController::contextClick): Don't emit an actual context menu invocation and then
copy the menu items. Instead, use WKBundlePageCopyContentMenuAtPointInWindow to do all the same
work without actually calling on AppKit to display the menu.
ask WebCore to do all the work EXCEPT displaying the menu.
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::keyDown): Handle the 'escape' character.

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

5 years agoUse CoreAnimation fences instead of synchronous IPC to synchronize resize
timothy_horton@apple.com [Fri, 10 Jul 2015 22:29:07 +0000 (22:29 +0000)]
Use CoreAnimation fences instead of synchronous IPC to synchronize resize
https://bugs.webkit.org/show_bug.cgi?id=146294
<rdar://problem/21090193>

Reviewed by Anders Carlsson.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate):
Tiny followup; don't touch Connection if the connection isn't valid.

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

5 years agoSource/WebCore:
commit-queue@webkit.org [Fri, 10 Jul 2015 22:04:50 +0000 (22:04 +0000)]
Source/WebCore:
Added ARIA 1.1 "cell" and "table" roles.
https://bugs.webkit.org/show_bug.cgi?id=146011
<rdar://problem/21398946>

Patch by Nan Wang <n_wang@apple.com> on 2015-07-10
Reviewed by Chris Fleizach.

Created a new role called GridCellRole to match the gridcell role,
so the previous CellRole and TableRole will match to cell and table role.
Made the changes to make sure that both GridRole and TableRole have same
behavior, as well as the circumstance for GridCellRole and CellRole.

Test: accessibility/roles-table-and-cell.html

* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
(WebCore::AccessibilityNodeObject::canSetSelectedAttribute):
* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setSelectedRows):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
(WebCore::AccessibilityRenderObject::selectedChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::roleValue):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):

LayoutTests:
Added tests for new role: table and cell.
https://bugs.webkit.org/show_bug.cgi?id=146011.

Patch by Nan Wang <n_wang@apple.com> on 2015-07-10
Reviewed by Chris Fleizach.

Added tests for table and cell role. Also modified other tests to fit the changes.

* accessibility/roles-computedRoleString-expected.txt:
* accessibility/roles-computedRoleString.html:
* accessibilit/roles-table-and-cell-expected.txt: Added.
* accessibility/roles-table-and-cell.html: Added.
* platform/mac/accessibility/aria-table-hierarchy-expected.txt:
* platform/mac/accessibility/aria-tables-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

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

5 years agoDFG fragile frozen values are fundamentally broken
fpizlo@apple.com [Fri, 10 Jul 2015 21:19:51 +0000 (21:19 +0000)]
DFG fragile frozen values are fundamentally broken
https://bugs.webkit.org/show_bug.cgi?id=146602

Reviewed by Mark Lam.

This change gets rid of the FragileValue value strength, because it was fundamentally
broken.

FragileValue was a value known to the compiler but not tracked by the GC in any way -
it wasn't marked and it wasn't weak. This was used to support AI bootstrap for OSR
must-handle values. The philosophy was that if the compiler did use the value for
optimization, it would have been strengthened to a weak value (or maybe even a strong
value, though we probably won't do that). But this was too much of a pipe dream. I've
found at least one case where the compiler did use the value, but never strengthened
it: it would happen if the value ended up in an OSR entry data expected value. Then if
we GCed, we might have killed the value, but OSR entry would still try to use it for
validation. That might have sort of just worked, but it's clearly shady.

The reason why we made must-handle values fragile and not weak is that most of the time
the values disappear from the abstract state: they are LUBed to a non-constant. If we
kept them around as weak, we'd have too many cases of the GC killing the code because
it thought that the value was somehow meaningful to the code when it was only used as a
temporary artifact of optimization.

So, it's true that it's very important for must-handle values not to automatically be
weak or strong. It's also true that the values are necessary for AI bootstrap because
we need to know what values OSR entry will require. But we shouldn't accomplish these
goals by having the compiler hold onto what are essentially dangling pointers.

This implements a better solution: instead of having InPlaceAbstractState bootstrap the
AI with must-handle values at the beginning, we now widen the valuesAtHead of the
must-handle block after AI converges. This widening is done in CFAPhase. This allows us
to see if the must-handle values are necessary at all. In most cases, the widening
takes a non-constant abstract value and simply amends something to its type based on
the type of the must-handle value, and so the must-handle value never actually shows up
in either the IR or any abstract value. In the unlikely event that the value at head is
bottom, we freeze the must-handle value. This change removes FragileValue, and this
freezing uses WeakValue as the strength. That makes sense: since the abstract value was
bottom, the must-handle value becomes integral to the IR and so it makes no sense for
the GC to keep the resulting CodeBlock alive if that must-handle value dies. This will
sometimes happen for example if you have a very long-running loop whose pre-header
allocates some object, but that pre-header appears to always exit to the optimizing JIT
because it was only profiled once in the LLInt and that profiling appears insufficient
to the DFG. In that case, we'll effectively constant-fold the references to the object
inside the loop, which is both efficient (yay constant folding!) and necessary
(otherwise we wouldn't know what the type of the variable should have been).

Testing and debugging this is complicated. So, this adds some new capabilities:

- DFG IR dumps also dump all of the FrozenValues that point to the heap along with
  their strengths, so that it's easy to see what GC objects the DFG feels are necessary
  for the compilation.

- DFG OSR entry preparation prints out the OSR entry data structures, so that it's easy
  to see what GC pointers (and other things) are used for OSR entry validation. The
  printouts are quite detailed, and should also help other kinds of OSR entry
  debugging.

- DFG::Plan now validates whether all of the GC pointers planted in the various JITCode
  data structures are also properly registered as either weak or strong pointers in the
  CodeBlock. This validation check previously failed due to fragile values ending up in
  the OSR entry data structures, both in the newly added test (dead-osr-entry-value.js)
  and in some pre-existing tests (like earley-boyer and 3d-raytrace).

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::stronglyVisitStrongReferences):
* bytecode/CodeOrigin.cpp:
(JSC::InlineCallFrame::visitAggregate):
* bytecode/Operands.h:
(JSC::Operands::operand):
(JSC::Operands::hasOperand):
* bytecode/StructureSet.cpp:
(JSC::StructureSet::dump):
(JSC::StructureSet::validateReferences):
* bytecode/StructureSet.h:
* bytecode/TrackedReferences.cpp: Added.
(JSC::TrackedReferences::TrackedReferences):
(JSC::TrackedReferences::~TrackedReferences):
(JSC::TrackedReferences::add):
(JSC::TrackedReferences::check):
(JSC::TrackedReferences::dump):
* bytecode/TrackedReferences.h: Added.
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::observeTransitions):
(JSC::DFG::AbstractValue::set):
(JSC::DFG::AbstractValue::fixTypeForRepresentation):
(JSC::DFG::AbstractValue::mergeOSREntryValue):
(JSC::DFG::AbstractValue::filter):
(JSC::DFG::AbstractValue::dumpInContext):
(JSC::DFG::AbstractValue::validateReferences):
(JSC::DFG::AbstractValue::setOSREntryValue): Deleted.
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::fullTop):
(JSC::DFG::AbstractValue::merge):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::run):
* dfg/DFGCommonData.cpp:
(JSC::DFG::CommonData::invalidate):
(JSC::DFG::CommonData::validateReferences):
* dfg/DFGCommonData.h:
(JSC::DFG::CommonData::requiredRegisterCountForExecutionAndExit):
* dfg/DFGFrozenValue.h:
(JSC::DFG::FrozenValue::FrozenValue):
(JSC::DFG::FrozenValue::strengthenTo):
(JSC::DFG::FrozenValue::pointsToHeap):
(JSC::DFG::FrozenValue::strength):
(JSC::DFG::FrozenValue::freeze):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::registerFrozenValues):
(JSC::DFG::Graph::visitChildren):
(JSC::DFG::Graph::freeze):
(JSC::DFG::Graph::freezeStrong):
(JSC::DFG::Graph::freezeFragile): Deleted.
* dfg/DFGGraph.h:
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::initialize):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::setOptimizationThresholdBasedOnCompilationResult):
(JSC::DFG::JITCode::validateReferences):
* dfg/DFGJITCode.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::addressOfDoubleConstant):
(JSC::DFG::JITCompiler::noticeOSREntry):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::branchStructurePtr):
(JSC::DFG::JITCompiler::jitCode):
(JSC::DFG::JITCompiler::noticeOSREntry): Deleted.
* dfg/DFGMinifiedGraph.cpp: Added.
(JSC::DFG::MinifiedGraph::prepareAndShrink):
(JSC::DFG::MinifiedGraph::validateReferences):
* dfg/DFGMinifiedGraph.h:
(JSC::DFG::MinifiedGraph::append):
(JSC::DFG::MinifiedGraph::prepareAndShrink): Deleted.
* dfg/DFGOSREntry.cpp:
(JSC::DFG::OSREntryData::dumpInContext):
(JSC::DFG::OSREntryData::dump):
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSREntry.h:
(JSC::DFG::getOSREntryDataBytecodeIndex):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::linkOSREntries):
(JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
* dfg/DFGStructureAbstractValue.cpp:
(JSC::DFG::StructureAbstractValue::dump):
(JSC::DFG::StructureAbstractValue::validateReferences):
* dfg/DFGStructureAbstractValue.h:
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* dfg/DFGValueStrength.cpp:
(WTF::printInternal):
* dfg/DFGValueStrength.h:
(JSC::DFG::merge):
* ftl/FTLExitPropertyValue.cpp:
(JSC::FTL::ExitPropertyValue::dump):
(JSC::FTL::ExitPropertyValue::validateReferences):
* ftl/FTLExitPropertyValue.h:
* ftl/FTLExitTimeObjectMaterialization.cpp:
(JSC::FTL::ExitTimeObjectMaterialization::dump):
(JSC::FTL::ExitTimeObjectMaterialization::validateReferences):
* ftl/FTLExitTimeObjectMaterialization.h:
* ftl/FTLExitValue.cpp:
(JSC::FTL::ExitValue::dump):
(JSC::FTL::ExitValue::validateReferences):
* ftl/FTLExitValue.h:
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::dfgCommon):
(JSC::FTL::JITCode::validateReferences):
* ftl/FTLJITCode.h:
(JSC::FTL::JITCode::handles):
(JSC::FTL::JITCode::dataSections):
* ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExit::codeLocationForRepatch):
(JSC::FTL::OSRExit::validateReferences):
* ftl/FTLOSRExit.h:
(JSC::FTL::OSRExit::considerAddingAsFrequentExitSite):
* jit/JITCode.cpp:
(JSC::JITCode::typeName):
(JSC::JITCode::validateReferences):
(JSC::JITCode::execute):
* jit/JITCode.h:
(JSC::JITCode::start):
* tests/stress/dead-osr-entry-value.js: Added.
(foo):

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

5 years agoWeb Inspector: Storage tab should have a scope bar in the sidebar
timothy@apple.com [Fri, 10 Jul 2015 21:17:47 +0000 (21:17 +0000)]
Web Inspector: Storage tab should have a scope bar in the sidebar
https://bugs.webkit.org/show_bug.cgi?id=146799

Fix a couple typos found post review.

* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):

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

5 years ago[WK2] Increase the QoS of some of our WorkQueues to match the one of our processes
cdumez@apple.com [Fri, 10 Jul 2015 21:15:44 +0000 (21:15 +0000)]
[WK2] Increase the QoS of some of our WorkQueues to match the one of our processes
https://bugs.webkit.org/show_bug.cgi?id=146855

Reviewed by Anders Carlsson.

Increase the QoS of some of our WorkQueues to match the one of our processes. For
e.g., even though the WebContent and the Networking processes have USER_UNITIATED
QoS, the IPC between them is using a WorkQueue with DEFAULT QoS. Similarly, the
WorkQueue used for network cache reads has DEFAULT QoS.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
* Platform/IPC/Connection.cpp:
(IPC::Connection::Connection):

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

5 years agoIt should be possible to run the OSR exit fuzzer
fpizlo@apple.com [Fri, 10 Jul 2015 21:12:46 +0000 (21:12 +0000)]
It should be possible to run the OSR exit fuzzer
https://bugs.webkit.org/show_bug.cgi?id=146814

Reviewed by Mark Lam.

Source/JavaScriptCore:

Fix a silly bug: the option matching was accidentally allowing a prefix match, which
always did the wrong thing for --fireOSRExitFuzzAt and --fireOSRExitFuzzAtStatic. Make
this an exact match instead.

* runtime/Options.cpp:
(JSC::Options::setOption):

Tools:

This runs a test command to detect how many static OSR exit sites it had, and then for
each exit site, it triggers three exits (earliest opportunity, last opportunity, some
middle opportunity), plus a mode where the check always exits. This is an exhaustive
search, so in the future it'll be very appropriate for cases where we have a simple test
and we want to see what happens when you eventually exit in this test.

Right now this isn't hooked into any specific tests, but I've done some spot checks on it
and it seems to do the right thing.

* Scripts/jsc-stress-test-helpers/js-osr-exit-fuzz: Added.
(fail):

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

5 years agoSerialized declaration for background-size/-webkit-mask-size should preserve identical
dbates@webkit.org [Fri, 10 Jul 2015 20:40:27 +0000 (20:40 +0000)]
Serialized declaration for background-size/-webkit-mask-size should preserve identical
values instead of coalescing them
https://bugs.webkit.org/show_bug.cgi?id=143191
<rdar://problem/21759393>

Reviewed by Darin Adler.

Source/WebCore:

Inspired by Blink r157745:
<http://src.chromium.org/viewvc/blink?view=revision&revision=157745>
And Blink r172548:
<http://src.chromium.org/viewvc/blink?view=revision&revision=172548>

Fixes an issue where identical values in a CSS declaration for properties background-size
and -webkit-mask-size would be coalesced when serialized.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillSize): Modified to create a Pair object with the appropriate
identical value encoding strategy. We only coalesce identical values when serializing the
declaration of property -webkit-background-size.
* css/Pair.h:
(WebCore::Pair::create): Added variant that takes an encoding.
(WebCore::Pair::cssText): Moved implementation of Pair::generateCSSString() to here and
modified to conditionally coalesce identical values during serialization.
(WebCore::Pair::Pair): Added variant that takes an encoding.
(WebCore::Pair::generateCSSString): Deleted; moved implementation into Pair::cssText().

LayoutTests:

Inspired by Blink r172548:
<http://src.chromium.org/viewvc/blink?view=revision&revision=172548>

Update tests and test results to ensure we serialize background-size, -webkit-mask-size
correctly when identical values are present in their declarations.

* fast/backgrounds/size/parsing-background-size-values-expected.txt:
* fast/backgrounds/size/resources/parsing-background-size-values.js:
* fast/masking/parsing-mask-expected.txt:
* fast/masking/parsing-mask.html:

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

5 years agoBidi-Isolate inlines break layout with collapsed whitespace
mmaxfield@apple.com [Fri, 10 Jul 2015 20:39:16 +0000 (20:39 +0000)]
Bidi-Isolate inlines break layout with collapsed whitespace
https://bugs.webkit.org/show_bug.cgi?id=109624
<rdar://problem/21752834>

Reviewed by David Hyatt.

Source/WebCore:

This patch changes the logic in constructBidiRunsForSegment() when it encounters an
isolate. It already has logic to create a BidiResolver for the isolated text;
however, that logic doesn't handle setting up the MidpointState at all.
Specifically, we can set the MidpointState's cursor to point to the context which
we can remember from addPlaceholderRunForIsolatedInline(). This information is
remembered in a HashMap in BidiResolver.

This patch is a partial port of Blink patch
https://src.chromium.org/viewvc/blink?view=rev&revision=159203

Here is some explanatory text regarding how we collapse spaces:

Collapsing whitespace happens in a series of phases. The first phase occurs when
we perform line breaking. Here, we keep track of sequences of whitespace which
should be collapsed, in the form of a vector of pairs of InlineIterators. We put
this knowledge into a MidpointState object.

Then, once we have a line, we run the bidi algorithm on the line (including the
whitespace). As output, the bidi algorithm calls the BidiResolver::appendRun()
callback with two InlineIterators each time it wants to create a run. Because
each renderer that we create has to be owned by exactly one DOM node,
BidiResolver::appendRun() iterates between its two InlineIterator arguments,
calling RenderBlockFlow::appendRunsForObject() on each interstitial DOM node.

This is the function where whitespace collapsing happens. The MidpointState object
keeps a cursor into its remembered whitespace sequences. Here, we simply make a
bidi run for each region in between adjacent whitespace pairs in the MidpointState
object. These bidi runs eventually get turned into leaf InlineBoxes.

The problem is that the BidiResolver::appendRun() callbacks don't occur in
string-order, but the Midpoint InlineIterator pairs are in string-order. In
particular, within a particular isolate, appendRun() gets called in string
order, but callbacks that occur for inner isolates are deferred. This means that
RenderBlockFlow::appendRunsForObject() gets confused when it looks for relevant
whitespace to skip.

Test: fast/text/bidi-isolate-whitespace-collapse.html

* platform/text/BidiResolver.h:
(WebCore::MidpointState::numMidpoints): Returning a const unsigned& is silly.
(WebCore::MidpointState::currentMidpoint): Ditto.
(WebCore::MidpointState::setCurrentMidpoint): The isolated MidpointState object
needs to be able to set its current midpoint to point to the first one inside
the isolate.
(WebCore::MidpointState::decrementNumMidpoints): Renamed from "decrease"
(WebCore::MidpointState::betweenMidpoints): This function is true iff
currentMidpoint() % 2. Instead of keeping a member variable, we can just compute
that.
(WebCore::MidpointState::reset): Deleted.
(WebCore::MidpointState::decreaseNumMidpoints): Deleted.
(WebCore::MidpointState::setBetweenMidpoints): Deleted.
* rendering/InlineIterator.h:
(WebCore::IsolateTracker::addFakeRunIfNecessary): Call
RenderBlockFlow::appendRunsForObject() to keep our MidpointState object in sync
when we pop out of the isolated object. However, we pass in a null run list,
because we don't want to append just yet (that happens when we process the
isolate).
(WebCore::InlineBidiResolver::appendRun): Update for new signature of
appendRunsForObject().
* rendering/RenderBlock.h:
(WebCore::RenderBlock::shouldSkipCreatingRunsForObject): Take a reference instead
of a pointer.
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::createRun): Ditto.
(WebCore::RenderBlockFlow::appendRunsForObject): Allow someone passing us a null
BidiRunList. In this case, we will keep the resolver's midpointState() up to date,
but won't actually emit any runs.
(WebCore::notifyResolverToResumeInIsolate): Renamed from setUp.
(WebCore::isolatedResolversMidpointState): Calculate the midpoint state for the
isolated resolver.
(WebCore::setUpResolverToResumeInIsolate): Call isolatedResolversMidpointState().
(WebCore::constructBidiRunsForSegment): Pass in the topResolver, which is
necessary for isolatedResolversMidpointState().
* rendering/line/BreakingContext.h:
(WebCore::checkMidpoints):

LayoutTests:

* fast/inline/crash-when-child-renderer-is-removed-and-line-stays-clean-expected.txt:
* fast/text/bidi-isolate-whitespace-collapse-expected.html: Added.
* fast/text/bidi-isolate-whitespace-collapse.html: Added.
* fast/text/international/embed-bidi-style-in-isolate-crash-expected.txt:
* fast/text/remove-text-node-linebox-not-dirty-crash-expected.txt:

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

5 years agoCleanup: WebCore::Pair class should use RefPtr&& instead of PassRefPtr
dbates@webkit.org [Fri, 10 Jul 2015 20:34:30 +0000 (20:34 +0000)]
Cleanup: WebCore::Pair class should use RefPtr&& instead of PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=146852

Reviewed by Anders Carlsson.

* css/CSSParser.cpp:
(WebCore::createPrimitiveValuePair): Write using a variadic template that forwards its
arguments to the appropriate Pair::create constructor.
(WebCore::CSSParser::parse4ValuesFillPosition): Use RefPtr&& instead of PassRefPtr.
(WebCore::CSSParser::parse3ValuesFillPosition): Ditto.
(WebCore::CSSParser::parseFillPosition): Use WTF::move() instead of RefPtr::release()
so that we pass a rvalue reference to RefPtr.
(WebCore::CSSParser::parseFillSize): Ditto.
(WebCore::CSSParser::parseBorderImageRepeat): Ditto.
* css/CSSParser.h:
* css/Pair.h:
(WebCore::Pair::create): Use RefPtr&& instead of PassRefPtr.
(WebCore::Pair::setFirst): Ditto.
(WebCore::Pair::setSecond): Ditto.
(WebCore::Pair::Pair): Ditto. Also substitute nullptr for 0 in the member initialization
list of the default constructor.

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

5 years agoCrash at WebCore::WebPage::innerFrameQuad.
zalan@apple.com [Fri, 10 Jul 2015 20:19:52 +0000 (20:19 +0000)]
Crash at WebCore::WebPage::innerFrameQuad.
https://bugs.webkit.org/show_bug.cgi?id=146843
rdar://problem/21501819

Reviewed by Andreas Kling.

We may end up with a null rootEditableElement() after calling Document::updateLayout().

Speculative fix. Not reproducible.

Source/WebCore:

* page/Frame.cpp: Some const cleanup.
(WebCore::Frame::visiblePositionForPoint):
* page/Frame.h:

Source/WebKit2:

* WebProcess/WebPage/WebPage.h: Some const cleanup.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::innerFrameQuad): null check assistedNode.rootEditableElement()
(WebKit::constrainPoint):
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::updateSelectionWithExtentPoint):
(WebKit::WebPage::getPositionInformation):

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

5 years agoCrash in HistoryController::updateForCommit dereferencing a null HistoryItem.
beidson@apple.com [Fri, 10 Jul 2015 19:01:51 +0000 (19:01 +0000)]
Crash in HistoryController::updateForCommit dereferencing a null HistoryItem.
<rdar://problem/21371589> and https://bugs.webkit.org/show_bug.cgi?id=146842

Reviewed by Chris Dumez.

No new tests (Unknown how to reproduce).

This patch basically rolls back part of http://trac.webkit.org/changeset/179472.

r179472 changed HistoryController::setCurrentItem() to take a reference instead of a pointer.
Unfortunately, we sometimes call setCurrentItem(nullptr).

We'd like to *not* do that, and there are assertions in place to try to catch when we do,
but in the meantime it is not valid to dereference nullptr.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadSameDocumentItem):

* loader/HistoryController.cpp:
(WebCore::HistoryController::updateForCommit):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::setCurrentItem): Take a ptr instead of a ref.
(WebCore::HistoryController::createItem):
* loader/HistoryController.h:

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

5 years ago[CSS Grid Layout] Grid item's auto-margins are not applied correctly
jfernandez@igalia.com [Fri, 10 Jul 2015 17:53:55 +0000 (17:53 +0000)]
[CSS Grid Layout] Grid item's auto-margins are not applied correctly
https://bugs.webkit.org/show_bug.cgi?id=146581

Reviewed by Darin Adler.

Source/WebCore:

Grid Layout specification states that auto-margins must prevent to apply
any Box Alignment property in that dimension. Instead, auto-margin is
applied as described in the spec.

http://dev.w3.org/csswg/css-grid/#auto-margins

Only Flexbox and Grid Layout implement vertical auto-margin alignment;
for other layout modes, auto-margin should compute as 0.

Tests: fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html
       fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html
       fast/css-grid-layout/grid-item-auto-margins-alignment.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::updateGridAlignmentAfterStyleChange):
* rendering/RenderBox.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::hasAutoMarginsInColumnAxis):
(WebCore::RenderGrid::hasAutoMarginsInRowAxis):
(WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):
(WebCore::RenderGrid::rowPositionForChild):
(WebCore::RenderGrid::columnPositionForChild):
* rendering/RenderGrid.h:

LayoutTests:

Tests to verify auto-margins alignment works as expected with grid items.

* fast/css-grid-layout/grid-item-auto-margins-alignment-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment.html: Added.

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

5 years agoAdd tests for r186649
commit-queue@webkit.org [Fri, 10 Jul 2015 17:41:51 +0000 (17:41 +0000)]
Add tests for r186649
https://bugs.webkit.org/show_bug.cgi?id=146821

Patch by Alex Christensen <achristensen@webkit.org> on 2015-07-10
Reviewed by Darin Adler.

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::compareContents):
(TestWebKitAPI::expectedIndex):
Add some larger tests to test large jumps.

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

5 years agoFix overloaded virtual function warning in ScrollbarThemeGtk.h
ossy@webkit.org [Fri, 10 Jul 2015 17:38:16 +0000 (17:38 +0000)]
Fix overloaded virtual function warning in ScrollbarThemeGtk.h
https://bugs.webkit.org/show_bug.cgi?id=145920

Reviewed by Darin Adler.

* platform/gtk/ScrollbarThemeGtk.h:

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

5 years agoAX: <details> element should allow expand/close through AX API
cfleizach@apple.com [Fri, 10 Jul 2015 16:34:32 +0000 (16:34 +0000)]
AX: <details> element should allow expand/close through AX API
https://bugs.webkit.org/show_bug.cgi?id=146549

Apply review comments from Daniel Bates.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::setIsExpanded):

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

5 years ago[iOS] Document picker has overlapping icons on iPad
jhoneycutt@apple.com [Fri, 10 Jul 2015 16:33:47 +0000 (16:33 +0000)]
[iOS] Document picker has overlapping icons on iPad
https://bugs.webkit.org/show_bug.cgi?id=146808
<rdar://problem/21251875>

Reviewed by Sam Weinig.

* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
Don't show this UI as a popover on iPad; the default is a full screen
form sheet.

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

5 years agoASSERT restoring from page cache as DocumentLoader reattaches to its Frame.
beidson@apple.com [Fri, 10 Jul 2015 15:45:04 +0000 (15:45 +0000)]
ASSERT restoring from page cache as DocumentLoader reattaches to its Frame.
<rdar://problem/21766282> and https://bugs.webkit.org/show_bug.cgi?id=146786

Reviewed by NOBODY (Fixing obvious boneheaded mistake in r186642)

No new tests (Covered by existing)

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::attachToFrame): Bail if reattaching to the current Frame,
  which happens when restoring from the page cache.

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

5 years agoVersioning.
matthew_hanson@apple.com [Fri, 10 Jul 2015 14:53:22 +0000 (14:53 +0000)]
Versioning.

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

5 years agoFix typo in LayoutTests/platform/wk2/TestExpectation.
commit-queue@webkit.org [Fri, 10 Jul 2015 12:39:59 +0000 (12:39 +0000)]
Fix typo in LayoutTests/platform/wk2/TestExpectation.
https://bugs.webkit.org/show_bug.cgi?id=146830

Unreviewed, WK2 gardening.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-07-10

* platform/wk2/TestExpectations:

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

5 years ago[GTK] ar warning when linking static libraries
mcatanzaro@igalia.com [Fri, 10 Jul 2015 12:33:18 +0000 (12:33 +0000)]
[GTK] ar warning when linking static libraries
https://bugs.webkit.org/show_bug.cgi?id=144988

Reviewed by Carlos Garcia Campos.

Do not use 'u' when calling ar. This argument conflicts with 'D' and is ignored if 'D' is
used, and 'D' is used by default if binutils is built with --enable-deterministic-archives.
Using 'u' with 'D' causes a warning to be printed when linking static libraries. At least
Fedora and Debian have recently both chosen to use --enable-deterministic-archives, so we
should either stop using 'u' or else add 'U' as well in order to disable deterministic
archives. Using 'U' should result in a somewhat faster build (at least when using the
Makefile generator), but it's unlikely that the difference is significant, so let's simply
remove 'u' until someone determines otherwise. This seems like a better option than adding
'U' so as not to foil distributions' attempts to perform deterministic builds. This also
aligns us with the behavior of upstream CMake (which has never used 'u'). This is a minor
behavior change on distributions that do not use --enable-deterministic-archives, notably
Arch and openSUSE.

* Source/cmake/OptionsCommon.cmake:

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

5 years agoUpdated Swedish translation for WebKitGTK+
commit-queue@webkit.org [Fri, 10 Jul 2015 12:30:00 +0000 (12:30 +0000)]
Updated Swedish translation for WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=146596

Patch by Josef Andersson <josef.andersson@fripost.org> on 2015-07-10
Reviewed by Carlos Garcia Campos.

* sv.po:

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

5 years ago[Planet WebKit] Update the feed url of the University of Szeged's blog.
loki@webkit.org [Fri, 10 Jul 2015 12:26:43 +0000 (12:26 +0000)]
[Planet WebKit] Update the feed url of the University of Szeged's blog.
https://bugs.webkit.org/show_bug.cgi?id=146835

Reviewed by Csaba Osztrogonác.

* config.ini:

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

5 years ago[Streams API] Fix readable-stream-tee.html
youenn.fablet@crf.canon.fr [Fri, 10 Jul 2015 06:05:45 +0000 (06:05 +0000)]
[Streams API] Fix readable-stream-tee.html
https://bugs.webkit.org/show_bug.cgi?id=146803

Reviewed by Darin Adler.

* streams/reference-implementation/readable-stream-tee.html:

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

5 years agoPlugin create can end up destroying its renderer.
zalan@apple.com [Fri, 10 Jul 2015 05:55:20 +0000 (05:55 +0000)]
Plugin create can end up destroying its renderer.
https://bugs.webkit.org/show_bug.cgi?id=146824
rdar://problem/18921429

Reviewed by Andreas Kling.

Plugins can run arbitrary code during initialization. If the plugin
happens to destroy the associated node, its renderer becomes invalid.
This patch checks whether the renderer survived the createPlugin() call.
(This WeakPtr pattern is also used in RenderWidget to avoid dangling pointers.)

Speculative fix. Not reproducible.

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):

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

5 years agoQuick fix for run_benchmark script that AppKit.NSRunningApplication does not work...
commit-queue@webkit.org [Fri, 10 Jul 2015 05:31:50 +0000 (05:31 +0000)]
Quick fix for run_benchmark script that AppKit.NSRunningApplication does not work properly
https://bugs.webkit.org/show_bug.cgi?id=146820

Patch by Dewei Zhu <dewei_zhu@apple.com> on 2015-07-09
Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver):
(OSXBrowserDriver.close_browsers):
(OSXBrowserDriver._terminiate_processes):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver):
(OSXChromeCanaryDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
(OSXFirefoxDriver):
(OSXFirefoxNightlyDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver):

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

5 years agoSource/WebCore:
mitz@apple.com [Fri, 10 Jul 2015 05:18:53 +0000 (05:18 +0000)]
Source/WebCore:
WebCore part of Track and expose policies for external URL schemes and App Links separately
https://bugs.webkit.org/show_bug.cgi?id=146822

Reviewed by Anders Carlsson.

* loader/FrameLoaderTypes.h: Added ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes,
meaning external schemes are allowed but App Links are not. The opposite state doesn’t
exist.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected): Opening a link in a new window
or in the current window should never open it as an App Link.

Source/WebKit2:
WebKit2 part of Track and expose policies for external URL schemes and App Links separately
https://bugs.webkit.org/show_bug.cgi?id=146822

Reviewed by Anders Carlsson.

* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::encode):
(WebKit::NavigationActionData::decode):
* Shared/NavigationActionData.h:
  Replaced the shouldOpenExternalURLsPolicy boolean member with a
  shouldOpenExternalURLsPolicy member whose type is ShouldOpenExternalURLsPolicy, and
  updated encoding and decoding:

* UIProcess/API/APINavigationAction.h:
  Added shouldOpenAppLinks boolean to NavigationAction::create and the constructor. It
  augments the policy in the NavigationActionData with a valude decided in the UI process.
  Replaced shouldOpenExternalURLs() with shouldOpenExternalSchemes() and
  shouldOpenAppLinks() which check the policy and the new m_shouldOpenAppLinks boolean.

* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction _shouldOpenExternalSchemes]): Getter for new property, calls through
  to the NavigationAction.
(-[WKNavigationAction _shouldOpenAppLinks]): Ditto.
(-[WKNavigationAction _shouldOpenExternalURLs]): Now deprecated and returns the
  _shouldOpenExternalSchemes value.
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new properties for the two
  policies and deprecated old property.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink): Changed to use NavigationAction::shouldOpenAppLinks, which
  encapsulates logic that used to be here.

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage): Allow App Links (if already allowed by policy).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Moved logic from tryAppLink in
  NavigationState.mm here and pass the result to NavigationAction::create.
(WebKit::WebPageProxy::decidePolicyForNewWindowAction): Allow App Links (if already allowed
  by policy).
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::loadRequest): Changed the default policy to not allow App Links (but
  still allow external schemes).

* WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
(WKBundleNavigationActionGetShouldTryAppLinks): Added this getter.
* WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h:

* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
  Added m_shouldTryAppLinks boolean member, initialized from the policy. Updated the
  initialization of m_shouldOpenExternalURLs to account for the new policy.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Pass the policy
  in the navigation data.

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

5 years agoFetching Content Security Policy report URL should respect same origin policy
dbates@webkit.org [Fri, 10 Jul 2015 05:10:18 +0000 (05:10 +0000)]
Fetching Content Security Policy report URL should respect same origin policy
https://bugs.webkit.org/show_bug.cgi?id=146754
<rdar://problem/18860259>

Reviewed by Brady Eidson.

Inspired by Blink r149791 (by Mike West <mkwst@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=149791&view=revision>

Source/WebCore:

As per <http://www.w3.org/TR/2015/CR-CSP2-20150219/#send-violation-reports>, fetching the
Content Security Policy report URL should include cookies if and only if the origin of
the protected resource is equal to the origin of the report URL.

Tests: http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.html
       http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.html
       http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.html
       http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.html
       http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.html
       http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies.html

* loader/PingLoader.cpp:
(WebCore::PingLoader::sendViolationReport):

LayoutTests:

Added additional tests for private browsing mode.

* http/tests/cookies/resources/setCookies.cgi:
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.html: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.html: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.html: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.html: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.html: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies.html: Added.
* http/tests/security/contentSecurityPolicy/resources/save-report.php:
* platform/wk2/TestExpectations: Skip private browsing mode tests in WebKit2 until we fix <https://bugs.webkit.org/show_bug.cgi?id=115274>.

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

5 years agoUse CoreAnimation fences instead of synchronous IPC to synchronize resize
timothy_horton@apple.com [Fri, 10 Jul 2015 03:45:10 +0000 (03:45 +0000)]
Use CoreAnimation fences instead of synchronous IPC to synchronize resize
https://bugs.webkit.org/show_bug.cgi?id=146294
<rdar://problem/21090193>

Reviewed by Anders Carlsson.

Because of changes in underlying frameworks, we can no longer depend on
blocking the UI process main thread to be sufficient to synchronize
UI process CA commits with commits coming from the Web process.

Instead, we have to use CoreAnimation fences to perform this synchronization.
Instead of blocking inside waitForAndDispatchImmediately, we'll end up
blocking during the CA commit.

* Platform/mac/LayerHostingContext.mm:
Use HAVE(COREANIMATION_FENCES).

* Platform/IPC/Connection.cpp:
(IPC::Connection::Connection):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::installIncomingSyncMessageCallback):
(IPC::Connection::uninstallIncomingSyncMessageCallback):
Keep track of a set of incoming sync message callbacks, and fire them
(on another queue) when a sync message arrives.

(IPC::Connection::hasIncomingSyncMessage):
* Platform/IPC/Connection.h:
Add a way to check if there are any sync messages in the queue.

* UIProcess/API/mac/WKView.mm:
(-[WKView forceAsyncDrawingAreaSizeUpdate:]):
(-[WKView waitForAsyncDrawingAreaSizeUpdate]):
These are no longer used; do nothing on 10.10+.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::updateGeometry):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
Add a MachSendRight parameter to UpdateGeometry, so that we can send along
a fence port with the geometry update if needed.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Apply the incoming fence so that geometry changes will be synchronized between processes.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
Don't wait for DidUpdateGeometry to come in if we're using fences to achieve the same thing.

(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
Create and block us on a fence and send it along with the geometry update.
If a sync message is in the incoming message queue, don't create the fence;
if a sync message comes in at any point after we've installed the fence (but
before the relevant commit completes), invalidate the fence, so that we won't
end up temorarily deadlocked waiting for the fence timeout.

* platform/cocoa/MachSendRight.h:
Export some constructors.

* platform/spi/cocoa/QuartzCoreSPI.h:
Add some SPI.

* wtf/Platform.h:
Add HAVE(COREANIMATION_FENCES)

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

5 years agoFollowup to r186647
beidson@apple.com [Fri, 10 Jul 2015 00:40:36 +0000 (00:40 +0000)]
Followup to r186647

Reviewed by NOBODY.

Thanks, EWS and commit-queue, for not catching this!

* loader/DocumentLoader.h: Add a semi-colon.

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

5 years ago[GTK] pango should be included in the default jhbuild moduleset
mcatanzaro@igalia.com [Fri, 10 Jul 2015 00:20:31 +0000 (00:20 +0000)]
[GTK] pango should be included in the default jhbuild moduleset
https://bugs.webkit.org/show_bug.cgi?id=146683

Reviewed by Martin Robinson.

Recent releases of pango 1.36 use functions that are only provided by fontconfig 2.12 when
compiled against sufficiently-new versions of fontconfig. Since we depend on both pango and
fontconfig, and pango depends on fontconfig, we must either add pango to our jhbuild
moduleset or else upgrade fontconfig to a recent unstable release (knowing that we will have
the same problem again the next time pango wants to use a new fontconfig feature), or remove
fontconfig (which would make it hard to keep tests working). On the balance, adding pango is
best.

* gtk/jhbuild-optional.modules: Remove pango
* gtk/jhbuild.modules: Add pango and update to latest 1.36.8

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

5 years agoWeb Inspector: Storage tab should have a scope bar in the sidebar
timothy@apple.com [Fri, 10 Jul 2015 00:11:09 +0000 (00:11 +0000)]
Web Inspector: Storage tab should have a scope bar in the sidebar
https://bugs.webkit.org/show_bug.cgi?id=146799

Reviewed by Mark Lam.

* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Main.html: Added StorageSidebarPanel.css.
* UserInterface/Views/StorageSidebarPanel.css: Added.
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype.hasCustomFilters):
(WebInspector.StorageSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WebInspector.StorageSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.StorageSidebarPanel.prototype._scopeBarSelectionDidChange):

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

5 years ago[GTK] Crash when spell checker returns no guesses
mcatanzaro@igalia.com [Fri, 10 Jul 2015 00:09:11 +0000 (00:09 +0000)]
[GTK] Crash when spell checker returns no guesses
https://bugs.webkit.org/show_bug.cgi?id=146805

Reviewed by Martin Robinson.

Properly handle ContextMenuItemTagNoGuessesFound in the switch statement.

* UIProcess/API/gtk/WebKitContextMenuActions.cpp:
(webkitContextMenuActionGetForContextMenuItem):

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

5 years agoREGRESSION: Inline media scrubbing always pauses the video
dino@apple.com [Fri, 10 Jul 2015 00:02:50 +0000 (00:02 +0000)]
REGRESSION: Inline media scrubbing always pauses the video
https://bugs.webkit.org/show_bug.cgi?id=146819
<rdar://problem/21572027>

Reviewed by Eric Carlson. Joseph Pecoraro also was really
helpful in diagnosing the problem.

When we moved some code from a getter/setter in the child
class to the base class, it was no longer being called due
to the bad way we were implementing inheritance. The solution
was to have the child class explicitly call into the base
class.

The much better solution would have been to rewrite everything
to use ES6 classes or, as a smaller change, assign the __proto__
directly on the child prototype. But I felt that was a bit
too risky at this point.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.extend): Describe in a comment why the extend function
is not suitable.
* Modules/mediacontrols/mediaControlsiOS.js: Add a getter/setter for
scrubbing that calls into the base Controller.

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

5 years agoWeb Inspector: Make the TabBar work better with AX
timothy@apple.com [Fri, 10 Jul 2015 00:02:41 +0000 (00:02 +0000)]
Web Inspector: Make the TabBar work better with AX
https://bugs.webkit.org/show_bug.cgi?id=146806

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TabBar.js:
(WebInspector.TabBar): Set role to tablist and drop tabIndex.
* UserInterface/Views/TabBarItem.js:
(WebInspector.TabBarItem): Set role to tab and tabIndex.
(WebInspector.TabBarItem.prototype.set selected): Toggle aria-selected.

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

5 years agoAX: <details> element should allow expand/close through AX API
cfleizach@apple.com [Thu, 9 Jul 2015 23:43:08 +0000 (23:43 +0000)]
AX: <details> element should allow expand/close through AX API
https://bugs.webkit.org/show_bug.cgi?id=146549

Reviewed by Mario Sanchez Prada.

Forgot this file with the original commit.

* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::toggleOpen):

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

5 years ago[Content Extensions] Add 3 byte jump size.
achristensen@apple.com [Thu, 9 Jul 2015 23:33:25 +0000 (23:33 +0000)]
[Content Extensions] Add 3 byte jump size.
https://bugs.webkit.org/show_bug.cgi?id=146425

Reviewed by Darin Adler.

Source/WebCore:

* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::smallestPossibleJumpSize):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::appendZeroes):
(WebCore::ContentExtensions::DFABytecodeCompiler::compile):
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::jumpSizeInBytes):
(WebCore::ContentExtensions::getJumpSize):
(WebCore::ContentExtensions::getJumpDistance):
Added DFABytecodeJumpSize::Int24.

Source/WebKit2:

* UIProcess/API/APIUserContentExtensionStore.h:
Increment CurrentContentExtensionFileVersion because of change in the bytecode.

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

5 years agoSafariViewController loads partial webpage or entirely blank webpage
andersca@apple.com [Thu, 9 Jul 2015 23:32:15 +0000 (23:32 +0000)]
SafariViewController loads partial webpage or entirely blank webpage
https://bugs.webkit.org/show_bug.cgi?id=146815
rdar://problem/21734757

Reviewed by Dan Bernstein.

* Platform/spi/ios/UIKitSPI.h:
Add _hostProcessIdentifier getter.

* UIProcess/ApplicationStateTracker.h:
Change ApplicationStateTracker to hold on to a WKContentView instead of a UIView.

* UIProcess/ApplicationStateTracker.mm:
(WebKit::applicationType):
Add a helper function that returns the type of application the web view is hosted by (regular
application, view service or extension).

(WebKit::ApplicationStateTracker::ApplicationStateTracker):
Register notifications and update m_isInBackground. For regular applications, just listen for UIApplication notifications.
For view services, walk the view controller hierarchy and find the service view controller and listen for notifications and use
BKS to find the background state of the host application. For extensions, just use BKSApplicationStateMonitor directly.

(WebKit::isViewService): Deleted.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
If we're moving out of a window, null out the state tracker.

(-[WKContentView didMoveToWindow]):
If we moved to a window, create a new state tracker.

(-[WKContentView isBackground]):
Handle a null application state.

(-[WKContentView _commonInitializationWithProcessPool:configuration:]): Deleted.
Don't create the application state here.

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

5 years agoAdd better ASSERTs to learn more about what is going wrong in DocumentLoader::detachF...
beidson@apple.com [Thu, 9 Jul 2015 23:29:33 +0000 (23:29 +0000)]
Add better ASSERTs to learn more about what is going wrong in DocumentLoader::detachFromFrame()
https://bugs.webkit.org/show_bug.cgi?id=146816

Reviewed by Alex Christensen.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::attachToFrame): Set the "has ever been attached" flag to true.
(WebCore::DocumentLoader::detachFromFrame): ASSERT m_frame is non-null, but with a message
  depending on the value of the "has ever been attached" flag.
* loader/DocumentLoader.h:

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

5 years ago[Mac, iOS] The mimeTypeCache should return a reference
bfulgham@apple.com [Thu, 9 Jul 2015 23:27:24 +0000 (23:27 +0000)]
[Mac, iOS] The mimeTypeCache should return a reference
https://bugs.webkit.org/show_bug.cgi?id=146809

Reviewed by Eric Carlson.

No new tests: No change in functionality.

Don't copy the mime type cache every time someone asks it a question. Return
by reference instead.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::mimeTypeCache):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::mimeTypeCache):
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::mimeTypeCache):

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

5 years agoWeb Inspector: Don't clear the console when navigating to a different page
drousso@apple.com [Thu, 9 Jul 2015 23:21:11 +0000 (23:21 +0000)]
Web Inspector: Don't clear the console when navigating to a different page
https://bugs.webkit.org/show_bug.cgi?id=142751

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager): No longer distinguishes from page refreshes and page navigations for console clearing.
(WebInspector.LogManager.prototype._delayedMessagesCleared):
(WebInspector.LogManager.prototype._mainResourceDidChange):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._sessionStarted):
(WebInspector.LogContentView.prototype._handleContextMenuEvent): Changed context menu keep/clear log text.
(WebInspector.LogContentView.prototype._toggleClearLogOnNavigateSetting):
(WebInspector.LogContentView.prototype._toggleClearLogOnReloadSetting): Deleted.

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

5 years agoRubber banding is broken when using a Mighty Mouse
commit-queue@webkit.org [Thu, 9 Jul 2015 23:02:41 +0000 (23:02 +0000)]
Rubber banding is broken when using a Mighty Mouse
https://bugs.webkit.org/show_bug.cgi?id=146693

Patch by Wenson Hsieh <whsieh@berkeley.edu> on 2015-07-09
Reviewed by Tim Horton.

Source/WebCore:

Sets the "constrain content edge scrolling" flag to true by default, causing scrolling
with a Mighty Mouse to not extend beyond the container's edges.

Test: platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html

* rendering/RenderLayer.cpp: Remove code that defaulted the flag to false.
(WebCore::RenderLayer::RenderLayer): Deleted.
* rendering/RenderMarquee.cpp: Added special case for marquees that allows content to scroll.
(WebCore::RenderMarquee::RenderMarquee): See above.

LayoutTests:

* platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html: Added.

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

5 years agoSymbolTable::entryFor() should do a bounds check before indexing into the localToEntr...
mark.lam@apple.com [Thu, 9 Jul 2015 22:58:05 +0000 (22:58 +0000)]
SymbolTable::entryFor() should do a bounds check before indexing into the localToEntry vector.
https://bugs.webkit.org/show_bug.cgi?id=146807

Reviewed by Filip Pizlo.

When we capture an argument by name and we use "arguments", we put all of the
arguments into the scope.  But destructured arguments are put into the scope
anonymously i.e. the SymbolTable knows that the scope offset is in use via
SymbolTable::m_maxScopeOffset, but that ScopeOffset won't appear in
SymbolTable::m_map.

The SymbolTable's m_localToEntry vector is synthesized from its m_map, and will
have a size which is based on the largest ScopeOffset in the m_map.  If we have a
scenario where the anonymous argument is at a higher ScopeOffset than all the
named arguments, then the m_localsToEntry vector will not have an entry for it
i.e. the m_localsToEntry vector will have a size that is <= the ScopeOffset of
the anonymous argument.

Hence, SymbolTable::entryFor() should ensure that the requested ScopeOffset is
within the bounds of the m_localToEntry vector before indexing into it.

* runtime/SymbolTable.cpp:
(JSC::SymbolTable::entryFor):

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