WebKit-https.git
3 years agoCheck existence of a page before accessing its plugins
jiewen_tan@apple.com [Fri, 12 May 2017 20:37:54 +0000 (20:37 +0000)]
Check existence of a page before accessing its plugins
https://bugs.webkit.org/show_bug.cgi?id=171712
<rdar://problem/32007806>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: plugins/navigator-plugin-crash.html

* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::item):
(WebCore::DOMPlugin::namedItem):

LayoutTests:

* plugins/navigator-plugin-crash-expected.txt: Added.
* plugins/navigator-plugin-crash.html: Added.

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

3 years agoUnreviewed follow-up to r216776.
jbedard@apple.com [Fri, 12 May 2017 20:37:46 +0000 (20:37 +0000)]
Unreviewed follow-up to r216776.

* Scripts/webkitpy/port/base.py:
(Port.path_to_crash_logs): Raise not implemented.
* Scripts/webkitpy/port/test.py:
(TestPort.path_to_crash_logs): Return results directory as the location of crash logs.
* Scripts/webkitpy/port/win.py:
(WinPort.path_to_crash_logs): Ditto.

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

3 years agoBot watcher's dashboard shows results links twice sometimes
ap@apple.com [Fri, 12 May 2017 20:32:20 +0000 (20:32 +0000)]
Bot watcher's dashboard shows results links twice sometimes
https://bugs.webkit.org/show_bug.cgi?id=172043

Reviewed by Tim Horton.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype._presentPopoverForGenericTestFailures):

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

3 years ago[WK2][macOS] Add a mach-lookup exception for 'com.apple.analyticsd'
bfulgham@apple.com [Fri, 12 May 2017 20:27:42 +0000 (20:27 +0000)]
[WK2][macOS] Add a mach-lookup exception for 'com.apple.analyticsd'
https://bugs.webkit.org/show_bug.cgi?id=172040
<rdar://problem/31765514>

Reviewed by Alexey Proskuryakov.

* DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:

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

3 years agoAdd some logging for layer tree commits, and resize and orientation change events
simon.fraser@apple.com [Fri, 12 May 2017 20:09:25 +0000 (20:09 +0000)]
Add some logging for layer tree commits, and resize and orientation change events
https://bugs.webkit.org/show_bug.cgi?id=172041

Reviewed by Tim Horton.

Add some logging that's useful during rotation investigations.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::orientationChanged):
* page/FrameView.cpp:
(WebCore::FrameView::sendResizeEventIfNeeded):

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:]):

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

3 years agoREGRESSION (r216711): API test WKWebView.ClearAppCache is failing.
beidson@apple.com [Fri, 12 May 2017 20:09:25 +0000 (20:09 +0000)]
REGRESSION (r216711): API test WKWebView.ClearAppCache is failing.
https://bugs.webkit.org/show_bug.cgi?id=172030

Unreviewed - Test gardening, in effect...

This failure is only being seen by the bots.

I believe this test is utterly broken in the first place; when it checks the .wal file's
size that is not actually an indicator that the records were deleted.

But that isn't what's coming up as failure on the bots.

This patch is an attempt to:
1 - More forcefully clear the Website data directory of leftovers before the test starts.
2 - Give an earlier indication of the failure that the bots are seeing, to possibly reveal more.

* TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm:
(defaultWebsiteDataDirectory):
(defaultApplicationCacheDirectory):
(TEST):

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

3 years agowebkitpy: Pass directory with crash logs into CrashLogs
jbedard@apple.com [Fri, 12 May 2017 19:52:18 +0000 (19:52 +0000)]
webkitpy: Pass directory with crash logs into CrashLogs
https://bugs.webkit.org/show_bug.cgi?id=172033
<rdar://problem/32157616>

Reviewed by Daniel Bates.

Refactor CrashLogs and the callers of CrashLogs so that the port object owns
the location of crash logs.

* Scripts/webkitpy/common/system/crashlogs.py:
(CrashLogs.__init__): Pass mandatory crash_log_directory when constructing.
(CrashLogs._find_newest_log_darwin): Use self._crash_log_directory instead of
generating one.
(CrashLogs._find_newest_log_win): Use self._crash_log_directory instead of
self._results_directory.
(CrashLogs._find_all_logs_darwin): Use self._crash_log_directory instead of
generating one.
(CrashLogs._log_directory_darwin): Moved to port.
* Scripts/webkitpy/common/system/crashlogs_unittest.py: Update tests since the path
to the crash log is no longer owned by CrashLogs.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: Use the general
directory for uploading crash logs. Note that crash logs are only supported on Mac
and Windows.
* Scripts/webkitpy/port/apple.py: Remove unneeded CrashLogs import.
* Scripts/webkitpy/port/base.py:
(Port.path_to_crash_logs): Unless ports declare otherwise, crash logs are assumed
to be in the results directory.
* Scripts/webkitpy/port/darwin.py:
(DarwinPort.path_to_crash_logs): Moved from CrashLogs._log_directory_darwin.
(DarwinPort._look_for_all_crash_logs_in_log_dir): Use port specific crash log path.
(DarwinPort._get_crash_log): Ditto.
* Scripts/webkitpy/port/darwin_testcase.py:
(DarwinTest.test_crashlog_path): Test that the Darwin ports are correctly calculating
the path to crash logs.
* Scripts/webkitpy/port/ios_device.py:
(IOSDevicePort.path_to_crash_logs): Currently, crash log retrieval is undefined for iOS.
* Scripts/webkitpy/port/ios_device_unittest.py:
(IOSDeviceTest.test_crashlog_path): Currently, crash log retrieval is undefined for iOS.
* Scripts/webkitpy/port/ios_simulator.py: Remove unneeded CrashLogs import.
* Scripts/webkitpy/port/mac.py: Ditto.
* Scripts/webkitpy/port/test.py:
(TestDriver.run_test): Use port specific crash log path when retrieving crash logs.
* Scripts/webkitpy/port/win.py:
(WinPort._get_crash_log): Ditto.
* Scripts/webkitpy/tool/commands/queries.py:
(execute): Construct a port object since this is the object which owns the path to crash logs.

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

3 years ago[Readable Streams API] Add ReadableStreamBYOBReader closed getter
commit-queue@webkit.org [Fri, 12 May 2017 19:18:00 +0000 (19:18 +0000)]
[Readable Streams API] Add ReadableStreamBYOBReader closed getter
https://bugs.webkit.org/show_bug.cgi?id=172024

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-05-12
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Updated expectations.

* web-platform-tests/streams/readable-byte-streams/general-expected.txt: Updated.
* web-platform-tests/streams/readable-byte-streams/general.dedicatedworker-expected.txt: Updated.

Source/WebCore:

Added tests to check closed getter behaviour.

* Modules/streams/ReadableStreamBYOBReader.js:
(closed): Implemented.

LayoutTests:

Added tests to check closed getter behaviour.

* streams/readable-stream-byob-reader-expected.txt: Updated.
* streams/readable-stream-byob-reader.js: Updated.

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

3 years ago[Cocoa] Stop setting a status on PKPaymentRequestShippingContactUpdate when there...
aestes@apple.com [Fri, 12 May 2017 19:14:06 +0000 (19:14 +0000)]
[Cocoa] Stop setting a status on PKPaymentRequestShippingContactUpdate when there are errors
https://bugs.webkit.org/show_bug.cgi?id=172036
<rdar://problem/31587957>

Reviewed by Anders Carlsson.

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):

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

3 years agoMore aggressive memory kill limits.
akling@apple.com [Fri, 12 May 2017 18:48:07 +0000 (18:48 +0000)]
More aggressive memory kill limits.
https://bugs.webkit.org/show_bug.cgi?id=172037
<rdar://problem/31969082>

Reviewed by Michael Saboff.

Bring down the memory kill limits to 4GB for active processes, and 2GB for inactive.
Also make MemoryUsagePolicy::Strict kick in above 1.5GB.

* wtf/MemoryPressureHandler.cpp:
(WTF::MemoryPressureHandler::thresholdForMemoryKill):
(WTF::thresholdForPolicy):

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

3 years agoMediaResourceLoader shouldn't keep its HTMLMediaElement alive.
akling@apple.com [Fri, 12 May 2017 18:34:12 +0000 (18:34 +0000)]
MediaResourceLoader shouldn't keep its HTMLMediaElement alive.
https://bugs.webkit.org/show_bug.cgi?id=172032
<rdar://problem/30816144>

Reviewed by Joseph Pecoraro.

Use a WeakPtr<HTMLMediaElement> in MediaResourceLoader instead, since the loader
is retained by a NSURLSession object we hand over to AVFoundation.

This prevents AVFoundation from keeping entire documents alive outside our control.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::createWeakPtr):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::MediaResourceLoader):
(WebCore::MediaResourceLoader::requestResource):
* loader/MediaResourceLoader.h:

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

3 years agoMemory pressure response should only do sync bmalloc scavenge in sync mode.
akling@apple.com [Fri, 12 May 2017 18:21:45 +0000 (18:21 +0000)]
Memory pressure response should only do sync bmalloc scavenge in sync mode.
https://bugs.webkit.org/show_bug.cgi?id=172035

Reviewed by Michael Saboff.

Only call WTF::releaseFastMallocFreeMemory() and his threading-related friends
when releaseMemory() is invoked with Synchronous::Yes, or if it's a critical
pressure response (maintaining the behavior added in r215775.)

* page/MemoryRelease.cpp:
(WebCore::releaseMemory):

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

3 years agoCleanup: Use Ref instead of RefPtr to hold DOMWrapperWorld
dbates@webkit.org [Fri, 12 May 2017 17:54:11 +0000 (17:54 +0000)]
Cleanup: Use Ref instead of RefPtr to hold DOMWrapperWorld
https://bugs.webkit.org/show_bug.cgi?id=171988

Reviewed by Chris Dumez.

* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::JSCustomElementInterface):
(WebCore::JSCustomElementInterface::upgradeElement):
(WebCore::JSCustomElementInterface::invokeCallback):
* bindings/js/JSCustomElementInterface.h:
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::JSMutationCallback):
(WebCore::JSMutationCallback::call):
* bindings/js/JSMutationCallback.h:
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::ScheduledAction):
(WebCore::ScheduledAction::execute):
* bindings/js/ScheduledAction.h:
(WebCore::ScheduledAction::ScheduledAction):
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::DOMWindowExtension):
* page/DOMWindowExtension.h:
(WebCore::DOMWindowExtension::world):

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

3 years agoCleanup: Make QueueTaskToEventLoopFunctionPtr take JSGlobalObject&
dbates@webkit.org [Fri, 12 May 2017 17:53:18 +0000 (17:53 +0000)]
Cleanup: Make QueueTaskToEventLoopFunctionPtr take JSGlobalObject&
https://bugs.webkit.org/show_bug.cgi?id=172021

Reviewed by Mark Lam.

Source/JavaScriptCore:

Change the function alias for QueueTaskToEventLoopFunctionPtr to take JSGlobalObject&
instead of a const JSGlobalObject* as all implementations expect to be passed a non-
const, non-null JSGlobalObject object.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::queueMicrotask):
* runtime/JSGlobalObject.h:
* runtime/VM.cpp:
(JSC::VM::queueMicrotask):
* runtime/VM.h: Remove JS_EXPORT_PRIVATE annotation from queueMicrotask() as
it is only called from JavaScriptCore code.

Source/WebCore:

* bindings/js/JSDOMGlobalObjectTask.cpp: Include header JSDOMGlobalObject.h.
(WebCore::JSGlobalObjectTask::JSGlobalObjectTask): Change type of first argument from JSDOMGlobalObject*
to JSDOMGlobalObject& and update code as necessary. Also, use C++11 brace initialization syntax
for member initializer list.
* bindings/js/JSDOMGlobalObjectTask.h: Remove header JSDOMGlobalObject.h and forward declare
JSDOMGlobalObject and JSC::Microtask.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowMicrotaskCallback::create):
(WebCore::JSDOMWindowMicrotaskCallback::JSDOMWindowMicrotaskCallback): Change type of first argument
from JSDOMWindowBase* to JSDOMWindowBase& and update code as necessary. Also, use C++11 brace
initialization syntax for member initializer list.
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/js/JSWorkerGlobalScopeBase.h:

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

3 years agoMarked webrtc/closing-peerconnection.html as flaky.
jlewis3@apple.com [Fri, 12 May 2017 17:14:58 +0000 (17:14 +0000)]
Marked webrtc/closing-peerconnection.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=172034

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years ago[MediaStream] Streams while play while page is in background can get "stuck" when...
jer.noble@apple.com [Fri, 12 May 2017 16:05:38 +0000 (16:05 +0000)]
[MediaStream] Streams while play while page is in background can get "stuck" when page is forgrounded.
https://bugs.webkit.org/show_bug.cgi?id=172022

Reviewed by Youenn Fablet.

When an AVSampleBufferDisplayLayer is disconnected from the CA renderer, none of its samples will be decoded
and enqueued for rendering. Once the layer is attached to a renderer again, it's stuffed full of samples which
will never be decoded as their decode time has long passed.

Pass the visibility state of the element through to the MediaPlayer so that MediaPlayerPrivateMediaStreamAVFObjC
can flush its renderers when going from not visible -> visible.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::visibilityStateChanged):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVisible):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updatePlayer):

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

3 years agoUnreviewed Windows build fix.
pvollan@apple.com [Fri, 12 May 2017 15:37:17 +0000 (15:37 +0000)]
Unreviewed Windows build fix.

* bindings/js/JSWebGLRenderingContextCustom.cpp:

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

3 years agoStop using PassRefPtr under WebKit2/Shared
cdumez@apple.com [Fri, 12 May 2017 14:33:15 +0000 (14:33 +0000)]
Stop using PassRefPtr under WebKit2/Shared
https://bugs.webkit.org/show_bug.cgi?id=172017

Reviewed by Antti Koivisto.

* Shared/API/APIDictionary.cpp:
(API::Dictionary::add):
(API::Dictionary::set):
* Shared/API/APIDictionary.h:
* Shared/API/APISecurityOrigin.h:
(API::SecurityOrigin::createFromString):
(API::SecurityOrigin::create):
(API::SecurityOrigin::securityOrigin):
(API::SecurityOrigin::SecurityOrigin):
* Shared/API/APISerializedScriptValue.h:
(API::SerializedScriptValue::create):
(API::SerializedScriptValue::SerializedScriptValue):
* Shared/API/c/WKSharedAPICast.h:
(WebKit::ProxyingRefPtr::ProxyingRefPtr):
* Shared/APIWebArchiveResource.h:
* Shared/APIWebArchiveResource.mm:
(API::WebArchiveResource::create):
(API::WebArchiveResource::WebArchiveResource):
* Shared/AsyncRequest.h:
(WebKit::AsyncRequestMap::add):
* Shared/BlobDataFileReferenceWithSandboxExtension.cpp:
(WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension):
* Shared/BlobDataFileReferenceWithSandboxExtension.h:
* Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
(WebKit::CoordinatedBackingStoreTile::setBackBuffer):
(WebKit::CoordinatedBackingStore::updateTile):
* Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::createUpdateAtlas):
(WebKit::CoordinatedGraphicsScene::updateImageBacking):
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::getOrCreate):
* Shared/Plugins/Netscape/NetscapePluginModule.h:
* Shared/VisitedLinkTable.cpp:
(WebKit::VisitedLinkTable::setSharedMemory):
* Shared/VisitedLinkTable.h:
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setSnapshot):
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::create):
* Shared/WebContextMenuItem.h:
* Shared/WebGeolocationPosition.h:
* Shared/WebRenderLayer.cpp:
(WebKit::WebRenderLayer::create):
(WebKit::WebRenderLayer::createArrayFromLayerList):
(WebKit::WebRenderLayer::WebRenderLayer):
* Shared/WebRenderLayer.h:
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::create):
(WebKit::WebRenderObject::WebRenderObject):
* Shared/WebRenderObject.h:
* UIProcess/VisitedLinkStore.cpp:
(WebKit::VisitedLinkStore::resizeTable):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):

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

3 years ago[iOS] Use memory footprint to dynamically adjust behavior of allocators
msaboff@apple.com [Fri, 12 May 2017 14:15:08 +0000 (14:15 +0000)]
[iOS] Use memory footprint to dynamically adjust behavior of allocators
https://bugs.webkit.org/show_bug.cgi?id=171944

Reviewed by Filip Pizlo.

Source/bmalloc:

This change is iOS only.

After the scavenger thread completes scavenging, it asks the OS for how much total memory the
process is using.  This information is used to update the sleep delay for the scanvenger thread,
as well as to provide memory in use data for other parts of the system.

The scavenger sleep time is calculated using the following quadradic equation.

    scavengerSleep = 1.2*percentFreeMemory^2 - percentFreeMemory + 2

Where percentFreeMemory is between 0 and 100.  The result is constrained to the values 2 and 250.

This equation empirically works out to providing a 2ms sleep time when we have less than 10%
memory available, 30ms when 20% is available and 250ms when 50% or more is available.  In testing,
this exponentially agressive scavenging delay by itself reduced memory usage and made it much
more deterministic when used without the corresponding change in the JSC Heap.

Changed the scavenger thread to use the User Initiated QOS priority to ensure it doesn't
get starved.

Moved the non-Windows functionality of WTF::RAMSize() to new files AvailableMemory.{cpp,h}
and implemented in the function availableMemory().  That functions limits the value returned
on iOS to a maximum of 840MB as that is the jetsam soft memory limit.
Added a new API availableMemory() so that WTF::RAMSize() will use this value.

* CMakeLists.txt:
* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/BPlatform.h:
* bmalloc/Heap.cpp:
(bmalloc::Heap::Heap):
(bmalloc::Heap::updateMemoryInUseParameters):
(bmalloc::Heap::concurrentScavenge):
(bmalloc::Heap::scavenge):
* bmalloc/Heap.h:
(bmalloc::Heap::memoryFootprint):
(bmalloc::Heap::percentAvailableMemoryInUse):
* bmalloc/Sizes.h:
* bmalloc/bmalloc.h:
(bmalloc::api::availableMemory):
(bmalloc::api::memoryFootprint):
(bmalloc::api::percentAvailableMemoryInUse):
* bmalloc/AvailableMemory.cpp: Added.
(bmalloc::computeAvailableMemory):
(bmalloc::availableMemory):
* bmalloc/AvailableMemory.h: Added.

Source/JavaScriptCore:

This change is iOS only.

Added the ability to react to when memory usage is critical.  This is defined as memory
usage being above the newly added option criticalGCMemoryThreshold.  When we are in this
critical state, all collections are Full and we limit the amount of memory we allocate
between collections to 1/4th the memory above the critical threshold.

Changed the calculation of proportionalHeapSize to be based on process memory footprint
and not how big the heap is.  Also, the values of Options::smallHeapRAMFraction and
Options::mediumHeapRAMFraction are overriden so that most of the heap growth is happens
using the more agressive Options::smallHeapGrowthFactor.

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::overCriticalMemoryThreshold):
(JSC::Heap::shouldDoFullCollection):
(JSC::Heap::collectIfNecessaryOrDefer):
* heap/Heap.h:
* runtime/Options.cpp:
(JSC::overrideDefaults):
(JSC::Options::initialize):
* runtime/Options.h:

Source/WTF:

Moved the non-Windows implementation of RAMSize() to bmalloc/AvailableMemory.cpp and
called the function availableMemory().

* wtf/RAMSize.cpp:
(WTF::computeRAMSize):

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

3 years ago[GTK] After upgrading glib and glib-networking, resources with zero bytes are always...
csaavedra@igalia.com [Fri, 12 May 2017 12:58:44 +0000 (12:58 +0000)]
[GTK] After upgrading glib and glib-networking, resources with zero bytes are always identified as text/plain
https://bugs.webkit.org/show_bug.cgi?id=171058

Reviewed by Carlos Garcia Campos.

GLib-based ports have issues detecting the mimetypes of empty
files, as they are all considered to be text/plain by
glib. Replace these resources with a minimal valid file for its
type (that is, 1x1 PNG files and 1 whitespace for text files).

* fast/preloader/resources/base-image1.png:
* fast/preloader/resources/base-image2.png:
* fast/preloader/resources/base-image3.png:
* fast/preloader/resources/image1.png:
* fast/preloader/resources/link1.css:
* fast/preloader/resources/noscript-image1.png:
* fast/preloader/resources/noscript-image2.png:
* fast/preloader/resources/script1.js:
* fast/preloader/resources/style1.css:
* tables/mozilla/core/col_widths_fix_autoFixPer.html:

* platform/gtk/TestExpectations: Unskip the now passing tests.

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

3 years agoUpdating class name of a shadow host does not update the style applied by descendants...
antti@apple.com [Fri, 12 May 2017 12:31:49 +0000 (12:31 +0000)]
Updating class name of a shadow host does not update the style applied by descendants of :host()
https://bugs.webkit.org/show_bug.cgi?id=170762
<rdar://problem/31572668>

Reviewed by Ryosuke Niwa.

Source/WebCore:

We need to invalidate shadow tree style when host classes or attributes change if it may be
affected by host rules.

Test: fast/shadow-dom/css-scoping-host-class-and-attribute-mutation.html

* css/RuleSet.cpp:
(WebCore::isHostSelectorMatchingInShadowTree):
(WebCore::RuleSet::addRule):

    Check if we have :host selectors that affect shadow tree.

* css/RuleSet.h:
(WebCore::RuleSet::hasHostPseudoClassRulesMatchingInShadowTree):
* style/AttributeChangeInvalidation.cpp:
(WebCore::Style::mayBeAffectedByHostRules):
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):

    Invalidate the whole subtree if there is a class change that may affect shadow tree style.

* style/ClassChangeInvalidation.cpp:
(WebCore::Style::mayBeAffectedByHostRules):
(WebCore::Style::ClassChangeInvalidation::invalidateStyle):
* style/IdChangeInvalidation.cpp:
(WebCore::Style::mayBeAffectedByHostRules):
(WebCore::Style::IdChangeInvalidation::invalidateStyle):

    Same for classes and ids.
    This should be refactored at some point to reduce copy-code.

LayoutTests:

* fast/shadow-dom/css-scoping-host-class-and-attribute-mutation-expected.html: Added.
* fast/shadow-dom/css-scoping-host-class-and-attribute-mutation.html: Added.

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

3 years ago[WPE] Unreviewed gardening.
csaavedra@igalia.com [Fri, 12 May 2017 11:53:58 +0000 (11:53 +0000)]
[WPE] Unreviewed gardening.

ClientRect, ClientRectList were removed, PromiseRejectionEvent was
added, update global constructors attributes test expectations.

* platform/wpe/js/dom/global-constructors-attributes-expected.txt:

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

3 years ago[GTK] ASSERTION FAILED: !m_flushingLayers
carlosgc@webkit.org [Fri, 12 May 2017 11:42:48 +0000 (11:42 +0000)]
[GTK] ASSERTION FAILED: !m_flushingLayers
https://bugs.webkit.org/show_bug.cgi?id=172025

Reviewed by Žan Doberšek.

Source/WebCore:

The problem is that syncImageBacking() is calling didChangeLayerState(). All sync methods are called by
flushCompositingStateForThisLayerOnly() while flushing layers, so none of them should call didChange method that
will schedule a new flush while flushing.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncImageBacking):

LayoutTests:

* platform/gtk/TestExpectations:

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

3 years ago[GTK] GIF images are not properly loaded the first time
carlosgc@webkit.org [Fri, 12 May 2017 10:29:49 +0000 (10:29 +0000)]
[GTK] GIF images are not properly loaded the first time
https://bugs.webkit.org/show_bug.cgi?id=170432

Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore:

When the GIF image is loaded for the first time, it's always read from the network, and the decoder is usually
fetched with chunks of data. Then the data is cached in disk by the network process, so that when loaded from
the cache, the whole encoded data is available to fetch the encoder. The problem is that we are failing to
decode the image when giving chunks of data, that's why it only happens the first time loaded. If the first
chunk of data provided is enough to get some metadata, including the size, but not frame contents, the load fails
in CachedImage::addIncrementalDataBuffer() because the EncodedDataStatus reported is SizeAvailable but
Image::isNull() returns true. An Image is considered to be Null when its size is empty, and the size is
calculated always using the first frame in ImageFrameCache. Since we still don't have frames, the image is
always Null in this case. It is not expected that EncodedDataStatus returns SizeAvailable and the image is Null,
that's why it's considered an error and the load finishes with a decode error. However, the non CG ImageDecoder
has a m_size member to handle this particular case, and it's when m_size is set when EncodedDataStatus changes
to SizeAvailable. We should return the ImageEncoder size as the ImageSize when we have a decoder but
not frames yet.

Test: http/tests/images/gif-progressive-load.html

* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::size): Return ImageDecoder::size() without caching it, if frame list is empty.

LayoutTests:

* http/tests/images/gif-progressive-load-expected.html: Added.
* http/tests/images/gif-progressive-load.html: Added.

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

3 years agoThe iBooks application is not able to get current position.
pvollan@apple.com [Fri, 12 May 2017 10:08:38 +0000 (10:08 +0000)]
The iBooks application is not able to get current position.
https://bugs.webkit.org/show_bug.cgi?id=171982
rdar://problem/29318409

Reviewed by Brent Fulgham.

Geolocation requests from iBooks are currently blocked. Make an exemption from the policy for iBooks.

No new tests since we currently can't mock the iBooks application bundle ID.

* Modules/geolocation/Geolocation.cpp:
(WebCore::isRequestFromIBooks):
(WebCore::Geolocation::shouldBlockGeolocationRequests):

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

3 years ago[selectors4] css/selectors4/focus-within-006.html test from WPT is failing
rego@igalia.com [Fri, 12 May 2017 09:43:44 +0000 (09:43 +0000)]
[selectors4] css/selectors4/focus-within-006.html test from WPT is failing
https://bugs.webkit.org/show_bug.cgi?id=170900

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

The issue has been fixed in WPT repo:
https://github.com/w3c/web-platform-tests/pull/5786

This patch is importing the changes so we can close this bug on WebKit.

* web-platform-tests/css/selectors4/focus-within-006-expected.html:
* web-platform-tests/css/selectors4/focus-within-006.html:
* web-platform-tests/css/selectors4/w3c-import.log:

LayoutTests:

* TestExpectations: Remove test as it's passing now.

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

3 years ago[WPE] Add MemoryFootprintLinux to build
csaavedra@igalia.com [Fri, 12 May 2017 09:01:44 +0000 (09:01 +0000)]
[WPE] Add MemoryFootprintLinux to build

Unreviewed build fix after r216731.

* wtf/PlatformWPE.cmake:

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

3 years agoSpeedometer: Add a React.js TodoMVC implementation
commit-queue@webkit.org [Fri, 12 May 2017 09:00:44 +0000 (09:00 +0000)]
Speedometer: Add a React.js TodoMVC implementation
https://bugs.webkit.org/show_bug.cgi?id=171444

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-12
Reviewed by Ryosuke Niwa.

Adds a more recent React.js TodoMVC implemenation to Speedometer

* Speedometer/resources/todomvc/architecture-examples/react/build.min.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/react/js/app.jsx: Added.
* Speedometer/resources/todomvc/architecture-examples/react/license.md: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/classnames/LICENSE: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/classnames/bind.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/classnames/bower.json: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/classnames/dedupe.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/classnames/index.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/classnames/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/director/LICENSE: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/director/bower.json: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/director/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/react-dom/LICENSE: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/react-dom/dist/react-dom-server.min.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/react-dom/dist/react-dom.min.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/react-dom/index.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/react/LICENSE: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/react/README.md: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/react/dist/react-with-addons.min.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/react/dist/react.min.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/react/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/todomvc-app-css/index.css: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react/npm-shrinkwrap.json: Added.
* Speedometer/resources/todomvc/architecture-examples/react/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/react/yarn.lock: Added.

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

3 years agoGeolocation requests should not be blocked when the security origin is local.
pvollan@apple.com [Fri, 12 May 2017 08:08:45 +0000 (08:08 +0000)]
Geolocation requests should not be blocked when the security origin is local.
https://bugs.webkit.org/show_bug.cgi?id=171857
Source/WebCore:

rdar://problem/29318409

Reviewed by Brent Fulgham.

Geolocation requests from security origins where the url scheme is registered as local,
should not be blocked. This applies to the file url scheme, but also to other local url
schemes.

Test: fast/misc/geolocation-local-security-origin.html

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::shouldBlockGeolocationRequests):

LayoutTests:

Reviewed by Brent Fulgham.

* fast/misc/geolocation-local-security-origin-expected.txt: Added.
* fast/misc/geolocation-local-security-origin.html: Added.

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

3 years agoUnreviewed. Fix GTK+ test /webkit2/WebKitWebView/create-navigation-data after r216615.
carlosgc@webkit.org [Fri, 12 May 2017 07:50:30 +0000 (07:50 +0000)]
Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/create-navigation-data after r216615.

In r216615 the custom code for window.open() was removed. The generated code now correctly handles the optional
URL parameter using the default value "about:blank" when not provided.

* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(testWebViewCreateNavigationData):

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

3 years agoUnreviewed trivial JSCOnly buildfix after r216731.
ossy@webkit.org [Fri, 12 May 2017 07:48:33 +0000 (07:48 +0000)]
Unreviewed trivial JSCOnly buildfix after r216731.
https://bugs.webkit.org/show_bug.cgi?id=171693

* wtf/PlatformJSCOnly.cmake:

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

3 years ago[selectors4] :focus-within tests using shadow DOM don't pass on WK1
rego@igalia.com [Fri, 12 May 2017 06:58:21 +0000 (06:58 +0000)]
[selectors4] :focus-within tests using shadow DOM don't pass on WK1
https://bugs.webkit.org/show_bug.cgi?id=170935

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

The issue has been fixed modifying the tests upstream:
https://github.com/w3c/web-platform-tests/pull/5594

This patch updates "selectors4" Test Suite with the last changes
from WPT repository.
This means that this issue is fixed and at the same time some new tests
are being imported.
Two of the new imported tests are failing due to bug #47182,
anyway the -expected.txt files with FAIL messages are added.

* resources/import-expectations.json:
* web-platform-tests/css/selectors4/focus-display-none-001-expected.txt: Added.
* web-platform-tests/css/selectors4/focus-display-none-001.html: Added.
* web-platform-tests/css/selectors4/focus-within-009-expected.txt:
* web-platform-tests/css/selectors4/focus-within-009.html:
* web-platform-tests/css/selectors4/focus-within-010-expected.html: Added.
* web-platform-tests/css/selectors4/focus-within-010.html: Added.
* web-platform-tests/css/selectors4/focus-within-display-none-001-expected.txt: Added.
* web-platform-tests/css/selectors4/focus-within-display-none-001.html: Added.
* web-platform-tests/css/selectors4/focus-within-shadow-001.html:
* web-platform-tests/css/selectors4/focus-within-shadow-002.html:
* web-platform-tests/css/selectors4/focus-within-shadow-003.html:
* web-platform-tests/css/selectors4/focus-within-shadow-004.html:
* web-platform-tests/css/selectors4/focus-within-shadow-005.html:
* web-platform-tests/css/selectors4/w3c-import.log:

LayoutTests:

* platform/mac-wk1/TestExpectations: Remove tests as they're passing now.

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

3 years agoSpeedometer: Update the Ember.js TodoMVC to a more recent version
commit-queue@webkit.org [Fri, 12 May 2017 06:32:48 +0000 (06:32 +0000)]
Speedometer: Update the Ember.js TodoMVC to a more recent version
https://bugs.webkit.org/show_bug.cgi?id=171342

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Update the Ember TodoMVC app in Speedometer to latest

* Speedometer/resources/todomvc/architecture-examples/emberjs/assets/todomvc.css: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/assets/todomvc.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/assets/vendor.css: Renamed from PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/todomvc-common/base.css.
* Speedometer/resources/todomvc/architecture-examples/emberjs/assets/vendor.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower.json: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/ember-data/ember-data.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/ember-localstorage-adapter/localstorage_adapter.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/ember/ember.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/handlebars/handlebars.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/jquery/jquery.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/todomvc-common/base.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/todomvc-common/bg.png: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/crossdomain.xml: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/index.html:
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/app.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/controllers/todo_controller.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/controllers/todos_controller.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/helpers/pluralize.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/models/todo.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/router.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/views/edit_todo_view.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/views/todos_view.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/readme.md: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/robots.txt: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/.bowerrc: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/.editorconfig: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/.ember-cli: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/.gitignore: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/.jshintrc: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/.travis.yml: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/.watchmanconfig: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/README.md: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/app.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/components/.gitkeep: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/components/todo-item.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/components/todo-list.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/controllers/active.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/controllers/application.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/controllers/completed.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/helpers/gt.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/helpers/pluralize.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/instance-initializers/global.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/models/.gitkeep: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/resolver.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/router.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/routes/.gitkeep: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/routes/application.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/services/memory.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/services/repo.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/styles/app.css: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/templates/active.hbs: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/templates/application.hbs: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/templates/completed.hbs: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/templates/components/.gitkeep: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/templates/components/todo-item.hbs: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/templates/components/todo-list.hbs: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/app/templates/index.hbs: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/bower.json: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/config/environment.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/ember-cli-build.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/public/crossdomain.xml: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/public/robots.txt: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/testem.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/tests/.jshintrc: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/tests/helpers/destroy-app.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/tests/helpers/module-for-acceptance.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/tests/helpers/resolver.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/tests/helpers/start-app.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/tests/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/tests/integration/.gitkeep: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/tests/test-helper.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/tests/unit/.gitkeep: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/vendor/.gitkeep: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/vendor/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/source/vendor/index.css: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/test.html: Removed.
* Speedometer/resources/todomvc/architecture-examples/emberjs/testem.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/tests/index.html: Added.

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

3 years agoComputing optionalDefArgWidth in CheckSpecial should not consider Scratch roles
sbarati@apple.com [Fri, 12 May 2017 06:05:54 +0000 (06:05 +0000)]
Computing optionalDefArgWidth in CheckSpecial should not consider Scratch roles
https://bugs.webkit.org/show_bug.cgi?id=171962

Reviewed by Filip Pizlo.

The purpose of getting the result width is to get the width of
the result of the arithmetic. It does not care about that the
Check happens to define scratches.

* b3/B3CheckSpecial.cpp:
(JSC::B3::CheckSpecial::forEachArg):
* b3/testb3.cpp:
(JSC::B3::testCheckMul):
(JSC::B3::testCheckMulMemory):
(JSC::B3::testCheckMul64):
(JSC::B3::testCheckMulFold):
(JSC::B3::testCheckMulFoldFail):
(JSC::B3::testCheckMulArgumentAliasing64):
(JSC::B3::testCheckMulArgumentAliasing32):
(JSC::B3::testCheckMul64SShr):

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

3 years agoisValidForm for SimpleAddr should use ptr() instead of tmp()
sbarati@apple.com [Fri, 12 May 2017 06:04:07 +0000 (06:04 +0000)]
isValidForm for SimpleAddr should use ptr() instead of tmp()
https://bugs.webkit.org/show_bug.cgi?id=171992

Reviewed by Filip Pizlo.

Arg::tmp() asserts that its kind is Tmp. Inst::isValidForm for
SimpleAddr was using Arg::tmp() instead of ptr() to check
if the address Tmp isGP(). It should be using Arg::ptr() instead
of Arg::tmp() since Arg::ptr() is designed for SimpleAddr.

This patch also fixes an incorrect assertion in the ARM64
macro assembler. We were asserting various atomic ops were
only over 32/64 bit operations. However, the code was properly handling
8/16/32/64 bit ops. I changed the assertion to reflect what is
actually going on.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::ldar):
(JSC::ARM64Assembler::ldxr):
(JSC::ARM64Assembler::ldaxr):
(JSC::ARM64Assembler::stxr):
(JSC::ARM64Assembler::stlr):
(JSC::ARM64Assembler::stlxr):
* b3/air/opcode_generator.rb:
* b3/testb3.cpp:
(JSC::B3::testLoadAcq42):
(JSC::B3::testStoreRelAddLoadAcq32):
(JSC::B3::testStoreRelAddLoadAcq8):
(JSC::B3::testStoreRelAddFenceLoadAcq8):
(JSC::B3::testStoreRelAddLoadAcq16):
(JSC::B3::testStoreRelAddLoadAcq64):
(JSC::B3::testAtomicWeakCAS):
(JSC::B3::testAtomicStrongCAS):
(JSC::B3::testAtomicXchg):

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

3 years agoSpeedometer: Add a React + Redux TodoMVC implementation
commit-queue@webkit.org [Fri, 12 May 2017 05:50:32 +0000 (05:50 +0000)]
Speedometer: Add a React + Redux TodoMVC implementation
https://bugs.webkit.org/show_bug.cgi?id=171329

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Adds React and Redux TodoMVC implementation for Speedometer

* Speedometer/resources/todomvc/architecture-examples/react-redux/README.md: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/dist/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/dist/static/css/main.d43d2909.css: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/dist/static/js/main.946269ff.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/public/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/actions/index.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/actions/index.spec.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/Footer.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/Footer.spec.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/Header.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/Header.spec.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/MainSection.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/MainSection.spec.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/TodoItem.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/TodoItem.spec.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/TodoTextInput.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/components/TodoTextInput.spec.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/constants/ActionTypes.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/constants/TodoFilters.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/containers/App.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/index.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/reducers/index.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/reducers/todos.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/src/reducers/todos.spec.js: Added.
* Speedometer/resources/todomvc/architecture-examples/react-redux/yarn.lock: Added.

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

3 years ago[Win] Implement memoryFootprint for Windows
utatane.tea@gmail.com [Fri, 12 May 2017 05:21:41 +0000 (05:21 +0000)]
[Win] Implement memoryFootprint for Windows
https://bugs.webkit.org/show_bug.cgi?id=171693

Reviewed by Alex Christensen.

This patch implements memoryFootprint for Windows. In Windows, we calculate the size
of private working set. This can be done by enumerating private pages in working set.

And we also split MemoryFootprint.cpp to cocoa, linux, and win versions.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/MallocPtr.h:
(WTF::MallocPtr::operator*):
(WTF::MallocPtr::operator->):
* wtf/PlatformGTK.cmake:
* wtf/PlatformJSCOnly.cmake:
* wtf/PlatformMac.cmake:
* wtf/PlatformWin.cmake:
* wtf/cocoa/MemoryFootprintCocoa.cpp: Copied from Source/WTF/wtf/MemoryFootprint.cpp.
(WTF::memoryFootprint):
* wtf/linux/MemoryFootprintLinux.cpp: Renamed from Source/WTF/wtf/MemoryFootprint.cpp.
(WTF::forEachLine):
(WTF::memoryFootprint):
* wtf/win/MemoryFootprintWin.cpp: Added.
(WTF::memoryFootprint):

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

3 years agoDrop remaining uses of PassRefPtr in WebCore
cdumez@apple.com [Fri, 12 May 2017 05:02:38 +0000 (05:02 +0000)]
Drop remaining uses of PassRefPtr in WebCore
https://bugs.webkit.org/show_bug.cgi?id=172013

Reviewed by Yusuke Suzuki.

Source/WebCore:

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::createRootObject):
* bindings/js/ScriptController.h:
* bindings/js/ScriptControllerMac.mm:
* bridge/objc/WebScriptObject.mm:
(WebCore::createJSWrapper):
(-[WebScriptObject _setImp:originRootObject:rootObject:]):
(-[WebScriptObject _setOriginRootObject:andRootObject:]):
(-[WebScriptObject _initWithJSObject:originRootObject:rootObject:]):
* bridge/objc/WebScriptObjectPrivate.h:

Source/WebKit/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.h:
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
(WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView createPluginBindingsInstance:]):

Source/WebKit/win:

* Plugins/PluginView.cpp:
(WebCore::PluginView::bindingInstance):

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

3 years agoRenderImageResource::hasImage is redundant and RenderImageResourceStyleImage's overri...
zalan@apple.com [Fri, 12 May 2017 03:55:57 +0000 (03:55 +0000)]
RenderImageResource::hasImage is redundant and RenderImageResourceStyleImage's override is incorrect.
https://bugs.webkit.org/show_bug.cgi?id=172010
<rdar://problem/31086735>

Reviewed by Simon Fraser.

Source/WebCore:

RenderImageResourceStyleImage::hasImage() always returns true even when ::cachedImage()
returns nullptr (e.g. image is pending).
Remove it and use cachedImage() instead.

Test: fast/images/missing-content-image-crash.html

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::didAttachRenderers):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::updateIntrinsicSizeIfNeeded):
(WebCore::RenderImage::isShowingMissingOrImageError):
(WebCore::RenderImage::hasNonBitmapImage):
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
(WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
* rendering/RenderImageResource.h:
(WebCore::RenderImageResource::cachedImage):
(WebCore::RenderImageResource::hasImage): Deleted.
* rendering/RenderImageResourceStyleImage.h:
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::hasSingleSecurityOrigin):
(WebCore::SVGImageElement::didAttachRenderers):

LayoutTests:

* fast/images/missing-content-image-crash-expected.txt: Added.
* fast/images/missing-content-image-crash.html: Added.

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

3 years agoSpeedometer: Add an ES2015 (Babel + Webpack) TodoMVC implementation
commit-queue@webkit.org [Fri, 12 May 2017 03:41:09 +0000 (03:41 +0000)]
Speedometer: Add an ES2015 (Babel + Webpack) TodoMVC implementation
https://bugs.webkit.org/show_bug.cgi?id=171452

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Adds ES2015 Babel + Webpack TodoMVC implem

* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/.babelrc: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/.eslintignore: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.app.73bcc5d3c1d07180f0e3.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.app.73bcc5d3c1d07180f0e3.js.map: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.manifest.112bf70a7f3deebf1f93.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.manifest.112bf70a7f3deebf1f93.js.map: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.vendor.efaa3e0e20077c8e7471.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.vendor.efaa3e0e20077c8e7471.js.map: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/index.html: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.app.73bcc5d3c1d07180f0e3.css: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.app.73bcc5d3c1d07180f0e3.css.map: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.vendor.efaa3e0e20077c8e7471.css: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.vendor.efaa3e0e20077c8e7471.css.map: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/package.json: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/app.css: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/app.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/bootstrap.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/controller.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/controller.test.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/helpers.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/index.html: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/memory.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/model.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/store.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/template.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/todo.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/view.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/webpack.config.babel.js: Added.

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

3 years agoAX: Defer text changes until after the tree is clean if needed.
zalan@apple.com [Fri, 12 May 2017 03:18:04 +0000 (03:18 +0000)]
AX: Defer text changes until after the tree is clean if needed.
https://bugs.webkit.org/show_bug.cgi?id=171546
<rdar://problem/31934942>

Reviewed by Simon Fraser.

Source/WebCore:

While updating an accessibility object state, we might
trigger unintentional style updates. This style update could
end up destroying renderes that are still referenced by functions
on the callstack.
To avoid that, defer such changes and let AXObjectCache operate on a clean tree.

Test: accessibility/crash-when-render-tree-is-not-clean.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::labelChanged):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::deferRecomputeIsIgnored):
(WebCore::AXObjectCache::deferTextChangedIfNeeded):
(WebCore::AXObjectCache::recomputeDeferredIsIgnored): Deleted.
(WebCore::AXObjectCache::deferTextChanged): Deleted.
* accessibility/AXObjectCache.h: Decouple different type of changes.
(WebCore::AXObjectCache::deferRecomputeIsIgnored):
(WebCore::AXObjectCache::deferTextChangedIfNeeded):
(WebCore::AXObjectCache::recomputeDeferredIsIgnored): Deleted.
(WebCore::AXObjectCache::deferTextChanged): Deleted.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::deleteLines):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createAndAppendRootInlineBox):
* rendering/RenderText.cpp:
(WebCore::RenderText::setText):

LayoutTests:

* accessibility/crash-when-render-tree-is-not-clean-expected.txt: Added.
* accessibility/crash-when-render-tree-is-not-clean.html: Added.

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

3 years agoTools:
commit-queue@webkit.org [Fri, 12 May 2017 03:16:20 +0000 (03:16 +0000)]
Tools:
Allow WPT server to serve specific WebKit test
https://bugs.webkit.org/show_bug.cgi?id=171479

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Adding a new mount point to WPT server.
It points to LayoutTests/http/wpt folder and is triggered on "/WebKit" urls.

Updating the webkitpy infrastructure to launch WPT server and do test url mapping for LayoutTests/wpt tests.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.__init__):
(Manager._is_http_test):
(Manager._needs_web_platform_test):
(Manager._run_tests):
(Manager._is_web_platform_test): Deleted.
* Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
(build_routes):
(main):
* Scripts/webkitpy/port/driver.py:
(Driver):
(Driver.is_webkit_specific_web_platform_test):
(Driver.test_to_uri):
(Driver._command_from_driver_input):

LayoutTests:
Allow WPT server to serve specific WebKit tests
https://bugs.webkit.org/show_bug.cgi?id=171479

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Moving tests to ensure they are correctly runned.

* http/wpt/fetch/fetch-as-blob-expected.txt: Renamed from LayoutTests/http/tests/fetch/fetch-as-blob-expected.txt.
* http/wpt/fetch/fetch-as-blob-worker-expected.txt: Renamed from LayoutTests/http/tests/fetch/fetch-as-blob-worker-expected.txt.
* http/wpt/fetch/fetch-as-blob-worker.html: Renamed from LayoutTests/http/tests/fetch/fetch-as-blob-worker.html.
* http/wpt/fetch/fetch-as-blob.html: Renamed from LayoutTests/http/tests/fetch/fetch-as-blob.html.
* http/wpt/fetch/fetch-as-blob.js: Renamed from LayoutTests/http/tests/fetch/fetch-as-blob.js.
(promise_test):

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

3 years agoDrop remaining uses of PassRefPtr under platform/
cdumez@apple.com [Fri, 12 May 2017 03:14:58 +0000 (03:14 +0000)]
Drop remaining uses of PassRefPtr under platform/
https://bugs.webkit.org/show_bug.cgi?id=172007

Reviewed by Geoffrey Garen.

* platform/graphics/wpe/ImageWPE.cpp:
(WebCore::Image::loadPlatformResource):
* platform/ios/LegacyTileGrid.h:
* platform/ios/LegacyTileGrid.mm:
(WebCore::LegacyTileGrid::tileForIndex):
(WebCore::LegacyTileGrid::tileForPoint):
* platform/ios/LegacyTileGridTile.h:
(WebCore::LegacyTileGridTile::create):
* platform/mediastream/RTCIceCandidateDescriptor.cpp:
(WebCore::RTCIceCandidateDescriptor::create):
* platform/mediastream/RTCIceCandidateDescriptor.h:
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
* platform/mediastream/RTCSessionDescriptionDescriptor.cpp:
(WebCore::RTCSessionDescriptionDescriptor::create):
* platform/mediastream/RTCSessionDescriptionDescriptor.h:
* platform/mediastream/RTCSessionDescriptionRequest.h:
(WebCore::RTCSessionDescriptionRequest::extraData):
(WebCore::RTCSessionDescriptionRequest::setExtraData):
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
* platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
(WebCore::RealtimeMediaSourceCenterOwr::firstSource):
* platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
* platform/mock/DeviceOrientationClientMock.cpp:
(WebCore::DeviceOrientationClientMock::setOrientation):
* platform/mock/DeviceOrientationClientMock.h:
* platform/mock/GeolocationClientMock.cpp:
(WebCore::GeolocationClientMock::setPosition):
* platform/mock/GeolocationClientMock.h:
* platform/mock/RTCNotifiersMock.cpp:
(WebCore::SessionRequestNotifier::SessionRequestNotifier):
(WebCore::SessionRequestNotifier::fire):
(WebCore::VoidRequestNotifier::VoidRequestNotifier):
* platform/mock/RTCNotifiersMock.h:
* platform/mock/TimerEventBasedMock.h:
(WebCore::TimerEventBasedMock::removeEvent):
(WebCore::TimerEvent::TimerEvent):
(WebCore::TimerEvent::timerFired):
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockSourceBufferPrivateHasAudio):
(WebCore::MockSourceBufferPrivateHasVideo):
* platform/wpe/RenderThemeWPE.h:

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

3 years agoSpeedometer: Add an Inferno TodoMVC implementation
rniwa@webkit.org [Fri, 12 May 2017 03:00:00 +0000 (03:00 +0000)]
Speedometer: Add an Inferno TodoMVC implementation
https://bugs.webkit.org/show_bug.cgi?id=171411

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Adds a Inferno implem of TodoMVC to Speedometer

* Speedometer/resources/todomvc/architecture-examples/inferno/dist/bundle.js: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/node_modules/todomvc-app-css/index.css: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/node_modules/todomvc-app-css/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/node_modules/todomvc-app-css/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/node_modules/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/node_modules/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/node_modules/todomvc-common/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/node_modules/todomvc-common/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/src/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/src/index.js: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/src/item.js: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/src/model.js: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/src/share.js: Added.
* Speedometer/resources/todomvc/architecture-examples/inferno/webpack.config.js: Added.

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

3 years ago[WPE] Stop using PassRefPtr in platform/graphics/wpe
clopez@igalia.com [Fri, 12 May 2017 02:57:56 +0000 (02:57 +0000)]
[WPE] Stop using PassRefPtr in platform/graphics/wpe
https://bugs.webkit.org/show_bug.cgi?id=171977

Unreviewed build fix after r216702.

* platform/graphics/wpe/ImageWPE.cpp:
(WebCore::Image::loadPlatformResource):

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

3 years agoSpeedometer: Add an Angular 2 (4.x) TodoMVC implementation
rniwa@webkit.org [Fri, 12 May 2017 02:55:38 +0000 (02:55 +0000)]
Speedometer: Add an Angular 2 (4.x) TodoMVC implementation
https://bugs.webkit.org/show_bug.cgi?id=171343

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Add a TodoMVC Angular 2 (4.x) implem for the benchmark

* Speedometer/resources/todomvc/architecture-examples/angular/.angular-cli.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/.editorconfig: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/README.md: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/dist/assets/css/todomvc-app.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/dist/assets/css/todomvc-common.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/dist/favicon.ico: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/dist/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/dist/inline.b342d102ba4a53bf2002.bundle.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/dist/main.779eb2f1ddbe23ac61c7.bundle.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/dist/polyfills.2d45a4c73c85e24fe474.bundle.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/dist/styles.d41d8cd98f00b204e980.bundle.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/dist/vendor.b4be818cb6d8028f9192.bundle.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/e2e/app.e2e-spec.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/e2e/app.po.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/e2e/tsconfig.e2e.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/karma.conf.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/protractor.conf.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/app/app.component.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/app/app.component.html: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/app/app.component.spec.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/app/app.component.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/app/app.module.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/app/todo-data.service.spec.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/app/todo-data.service.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/app/todo.spec.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/app/todo.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/assets/.gitkeep: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/assets/css/todomvc-app.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/assets/css/todomvc-common.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/environments/environment.prod.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/environments/environment.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/favicon.ico: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/main.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/polyfills.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/styles.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/test.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/tsconfig.app.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/tsconfig.spec.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/src/typings.d.ts: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/tsconfig.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angular/tslint.json: Added.

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

3 years agoSpeedometer: Add a Vue.js TodoMVC implementation
rniwa@webkit.org [Fri, 12 May 2017 02:54:30 +0000 (02:54 +0000)]
Speedometer: Add a Vue.js TodoMVC implementation
https://bugs.webkit.org/show_bug.cgi?id=171325

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Adds a Vue.js TodoMVC implementation to Speedometer

* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/.babelrc: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/.editorconfig: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/.eslintignore: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/.eslintrc.js: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/README.md: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/config/dev.env.js: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/config/index.js: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/config/prod.env.js: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/dist/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/dist/static/css/app.677b45842d9f8b96e5b23c18969233b7.css: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/dist/static/js/app.b0e835874bc8949670d1.js: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/dist/static/js/manifest.84b2b4fceb74ab1f91f3.js: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/dist/static/js/vendor.a52517c5aa98e7fbea2e.js: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/src/App.vue: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/src/components/Todos.vue: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/src/components/todo.css: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/src/main.js: Added.
* Speedometer/resources/todomvc/architecture-examples/vuejs-cli/yarn.lock: Added.

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

3 years agoSpeedometer: Update the vanilla JavaScript TodoMVC implem to a more recent version
rniwa@webkit.org [Fri, 12 May 2017 02:53:56 +0000 (02:53 +0000)]
Speedometer: Update the vanilla JavaScript TodoMVC implem to a more recent version
https://bugs.webkit.org/show_bug.cgi?id=171306

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Update vanilla JS TodoMVC implementation to the latest.

* Speedometer/resources/todomvc/vanilla-examples/vanillajs/bower.json: Removed.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/bower_components/todomvc-common/base.css: Removed.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/bower_components/todomvc-common/base.js: Removed.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/bower_components/todomvc-common/bg.png: Removed.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/index.html:
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/app.js:
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/controller.js:
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/helpers.js:
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/model.js:
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/store.js:
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/template.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/view.js:
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/node_modules/todomvc-app-css/index.css: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/node_modules/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/node_modules/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/package.json: Added.

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

3 years agoSpeedometer: Add an ES2015 TodoMVC implementation
rniwa@webkit.org [Fri, 12 May 2017 02:52:45 +0000 (02:52 +0000)]
Speedometer: Add an ES2015 TodoMVC implementation
https://bugs.webkit.org/show_bug.cgi?id=171448

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Adds ES2015 TodoMVC implementation for Speedometer

* Speedometer/resources/todomvc/vanilla-examples/es2015/index.html: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/node_modules/todomvc-app-css/index.css: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/node_modules/todomvc-app-css/package.json: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/node_modules/todomvc-app-css/readme.md: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/node_modules/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/node_modules/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/node_modules/todomvc-common/package.json: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/node_modules/todomvc-common/readme.md: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/package.json: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/src/.jshintrc: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/src/app.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/src/controller.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/src/helpers.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/src/model.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/src/store.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/src/template.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/src/view.js: Added.

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

3 years agoSpeedometer: Add an Elm TodoMVC implementation
rniwa@webkit.org [Fri, 12 May 2017 02:50:18 +0000 (02:50 +0000)]
Speedometer: Add an Elm TodoMVC implementation
https://bugs.webkit.org/show_bug.cgi?id=171464

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Speedometer: Add Elm TodoMVC implementation

* Speedometer/resources/todomvc/functional-prog-examples/elm/Todo.elm: Added.
* Speedometer/resources/todomvc/functional-prog-examples/elm/Todo/Task.elm: Added.
* Speedometer/resources/todomvc/functional-prog-examples/elm/dist/elm.js: Added.
* Speedometer/resources/todomvc/functional-prog-examples/elm/index.html: Added.
* Speedometer/resources/todomvc/functional-prog-examples/elm/node_modules/todomvc-app-css/index.css: Added.
* Speedometer/resources/todomvc/functional-prog-examples/elm/node_modules/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/functional-prog-examples/elm/node_modules/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/functional-prog-examples/elm/package.json: Added.
* Speedometer/resources/todomvc/functional-prog-examples/elm/readme.md: Added.

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

3 years agoSpeedometer: Update the Backbone.js implementation to a more recent library version
rniwa@webkit.org [Fri, 12 May 2017 02:46:47 +0000 (02:46 +0000)]
Speedometer: Update the Backbone.js implementation to a more recent library version
https://bugs.webkit.org/show_bug.cgi?id=171305

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Updates the Backbone.js TodoMVC implementation to latest

* Speedometer/resources/todomvc/architecture-examples/backbone/bower.json: Removed.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/backbone.localStorage/backbone.localStorage.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/jquery/jquery.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/todomvc-common/base.css: Removed.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/todomvc-common/base.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/todomvc-common/bg.png: Removed.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/underscore/underscore.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/backbone/index.html:
* Speedometer/resources/todomvc/architecture-examples/backbone/js/app.js:
* Speedometer/resources/todomvc/architecture-examples/backbone/js/backbone.sync.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/js/collections/todos.js:
* Speedometer/resources/todomvc/architecture-examples/backbone/js/models/todo.js:
* Speedometer/resources/todomvc/architecture-examples/backbone/js/routers/router.js:
* Speedometer/resources/todomvc/architecture-examples/backbone/js/views/app-view.js:
* Speedometer/resources/todomvc/architecture-examples/backbone/js/views/todo-view.js:
* Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/backbone/backbone.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/backbone/backbone.js.
* Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/jquery/dist/jquery.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/todomvc-app-css/index.css: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/underscore/underscore.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/package.json: Added.

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

3 years agoSpeedometer: Add a Preact.js TodoMVC implementation
rniwa@webkit.org [Fri, 12 May 2017 02:45:36 +0000 (02:45 +0000)]
Speedometer: Add a Preact.js TodoMVC implementation
https://bugs.webkit.org/show_bug.cgi?id=171323

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Adds Preact.js TodoMVC implementation to Speedometer

* Speedometer/resources/todomvc/architecture-examples/preact/.babelrc: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/README.md: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/dist/app.js: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/dist/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/dist/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/dist/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/dist/todomvc.css: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/rollup.config.js: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/src/app/footer.js: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/src/app/index.js: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/src/app/item.js: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/src/app/model.js: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/src/app/util.js: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/src/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/src/index.js: Added.
* Speedometer/resources/todomvc/architecture-examples/preact/webpack.config.babel.js: Added.

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

3 years agoSpeedometer: Update the jQuery implementation to a more recent library version
commit-queue@webkit.org [Fri, 12 May 2017 00:55:24 +0000 (00:55 +0000)]
Speedometer: Update the jQuery implementation to a more recent library version
https://bugs.webkit.org/show_bug.cgi?id=171308

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Updates the jQuery implementation of TodoMVC to a more recent version

* Speedometer/resources/todomvc/architecture-examples/jquery/bower.json: Removed.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/handlebars/handlebars.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/jquery/jquery.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/todomvc-common/base.css: Removed.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/todomvc-common/base.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/todomvc-common/bg.png: Removed.
* Speedometer/resources/todomvc/architecture-examples/jquery/index.html:
* Speedometer/resources/todomvc/architecture-examples/jquery/js/app.js:
* Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/handlebars/dist/handlebars.js: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/jquery/dist/jquery.js: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/todomvc-app-css/index.css: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/todomvc-app-css/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/todomvc-app-css/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/todomvc-common/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/todomvc-common/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/readme.md:

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

3 years ago[iOS] Unset active media capture source when stopped capturing
commit-queue@webkit.org [Fri, 12 May 2017 00:52:45 +0000 (00:52 +0000)]
[iOS] Unset active media capture source when stopped capturing
https://bugs.webkit.org/show_bug.cgi?id=171815
<rdar://problem/32117885>

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-11
Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/ios/mediastream/getUserMedia-single-capture.html

Introducing SingleSourceFactory template class to be used by capture factories for iOS.
This class ensures that only one source is active at a time.
Update all capture sources accordingly.
Ensure sources are no longer considered as active sources when being destroyed.
Add support for mock sources and introducing m_isProducingData for them as well.

Update WebRTC outgoing source classes to handle the case of replaced track and resetting the enabled/mute
state according the new source.

Update the way we handle timestamps for audio data. We now consider that we read/write as a flow.
This allows smooth audio track replacing.

* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::~AVAudioCaptureSource):
(WebCore::AVAudioCaptureSourceFactory::setActiveSource): Deleted.
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
(WebCore::AVVideoCaptureSourceFactory::setActiveSource): Deleted.
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::stopProducingData):
(WebCore::CoreAudioCaptureSourceFactory::setActiveSource): Deleted.
* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::setSource):
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):
(WebCore::RealtimeOutgoingAudioSource::pullAudioData):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
* platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:
(WebCore::RealtimeOutgoingVideoSource::setSource):
(WebCore::RealtimeOutgoingVideoSource::sourceMutedChanged):
(WebCore::RealtimeOutgoingVideoSource::sourceEnabledChanged):
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::mockAudioCaptureSourceFactory):
(WebCore::MockRealtimeAudioSource::factory):
(WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource):
(WebCore::MockRealtimeAudioSource::startProducingData):
(WebCore::MockRealtimeAudioSource::stopProducingData):
* platform/mock/MockRealtimeAudioSource.h:
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::mockVideoCaptureSourceFactory):
(WebCore::MockRealtimeVideoSource::factory):
(WebCore::MockRealtimeVideoSource::~MockRealtimeVideoSource):
(WebCore::MockRealtimeVideoSource::startProducingData):
(WebCore::MockRealtimeVideoSource::stopProducingData):
* platform/mock/MockRealtimeVideoSource.h:
(WebCore::MockRealtimeVideoSource::~MockRealtimeVideoSource): Deleted.

LayoutTests:

Improving the existing tests for better reliability and debugability.
Updating tests to use less webkitAudioContext.

* platform/ios/mediastream/getUserMedia-single-capture-expected.txt: Added.
* platform/ios/mediastream/getUserMedia-single-capture.html: Added.
* webrtc/audio-peer-connection-webaudio.html:
* webrtc/audio-replace-track-expected.txt:
* webrtc/audio-replace-track.html:
* webrtc/peer-connection-audio-mute.html:
* webrtc/peer-connection-audio-mute2.html:
* webrtc/peer-connection-remote-audio-mute.html:
* webrtc/peer-connection-remote-audio-mute2.html:
* webrtc/routines.js:
* webrtc/video-replace-track-expected.txt:
* webrtc/video-replace-track.html:

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

3 years ago[WKWebsiteDataStore removeDataOfTypes:...] doesn't work for IndexedDB if the data...
beidson@apple.com [Fri, 12 May 2017 00:49:33 +0000 (00:49 +0000)]
[WKWebsiteDataStore removeDataOfTypes:...] doesn't work for IndexedDB if the data store has a custom IDB path.
<rdar://problem/30612463> and https://bugs.webkit.org/show_bug.cgi?id=171994

Reviewed by Andy Estes.
Informal review by Maureen Daum.

Source/WebKit2:

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::deleteWebsiteData): Instead of accessing the m_idbServers set directly, make
  the method call that creates the server on demand.
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins): Ditto.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Not only create the DatabaseProcess if necessary,
  but also notify it about the passed-in WebsiteDataStore.
(WebKit::WebProcessPool::getDatabaseProcessConnection):
(WebKit::WebProcessPool::ensureDatabaseProcess): Deleted.
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary):

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::databaseProcessParameters):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):

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

3 years agoModern Media Controls shouldn't be an experimental feature
dino@apple.com [Fri, 12 May 2017 00:47:13 +0000 (00:47 +0000)]
Modern Media Controls shouldn't be an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=172004
<rdar://problem/32146522>

Reviewed by Simon Fraser.

This is either always on or always off, so shouldn't
show up in an Experimental Features menu.

* Shared/WebPreferencesDefinitions.h: Move ModernMediaControlsEnabled
to a normal preference.

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

3 years agoFix the iOS build
timothy_horton@apple.com [Fri, 12 May 2017 00:43:05 +0000 (00:43 +0000)]
Fix the iOS build

* platform/spi/mac/NSSpellCheckerSPI.h:

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

3 years agoSpeedometer: Update the Flight.js implementation to a more recent library version
commit-queue@webkit.org [Fri, 12 May 2017 00:15:12 +0000 (00:15 +0000)]
Speedometer: Update the Flight.js implementation to a more recent library version
https://bugs.webkit.org/show_bug.cgi?id=171471

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Speedometer: Update FlightJS TodoMVC implementation

* Speedometer/resources/todomvc/dependency-examples/flight/.gitignore: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/.jshintrc: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/main.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/store.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/bower.json: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-shim.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/compose.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/index.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/logger.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/jquery/jquery.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/bg.png: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/data/stats.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/data/stats.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/data/todos.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/data/todos.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/main.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/page/app.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/app.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/store.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/ui/main_selector.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/main_selector.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/ui/new_item.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/new_item.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/ui/stats.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/stats.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/ui/todo_list.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/todo_list.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/ui/toggle_all.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/toggle_all.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/ui/with_filters.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/with_filters.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/utils.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/js/utils.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/templates/stats.html: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/templates/stats.html.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/templates/todo.html: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/app/templates/todo.html.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/index.html: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/index.html.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/depot/README.md: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/depot/depot.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/depot/depot.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/depot/depot.min.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/depot/package.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/es5-shim/LICENSE: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/es5-shim/es5-sham.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-sham.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/es5-shim/es5-sham.min.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/es5-shim/es5-shim.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/es5-shim/es5-shim.min.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/LICENSE: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/index.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/lib/advice.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/advice.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/lib/base.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/base.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/lib/component.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/component.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/lib/compose.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/lib/debug.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/debug.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/lib/logger.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/lib/registry.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/registry.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/flight/lib/utils.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/utils.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/jquery/README.md: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/jquery/dist/jquery.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/jquery/dist/jquery.min.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/jquery/package.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/memorystorage/memorystorage.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs-text/LICENSE: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs-text/README.md: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs-text/bower.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs-text/package.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs-text/text.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/text.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs/README.md: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs/package.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs/require.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/requirejs/require.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/todomvc-app-css/index.css: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/todomvc-app-css/package.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/todomvc-app-css/readme.md: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/todomvc-common/base.js: Renamed from PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.js.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/todomvc-common/package.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/todomvc-common/readme.md: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/package.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/karma.conf.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/package.json: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/readme.md: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/.jshintrc: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/fixture/footer.html: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/fixture/new_todo.html: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/fixture/toggle_all.html: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/mock/datastore.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/data/stats_spec.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/data/todos_spec.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/ui/new_item_spec.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/ui/stats_spec.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/ui/toggle_all_spec.js: Removed.
* Speedometer/resources/todomvc/dependency-examples/flight/test/test-main.js: Removed.

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

3 years agoUnreviewed, rolling out r216677.
jlewis3@apple.com [Fri, 12 May 2017 00:13:49 +0000 (00:13 +0000)]
Unreviewed, rolling out r216677.

Patch caused layout test crashes.

Reverted changeset:

"WorkerThread::stop() should call
scheduleExecutionTermination() last."
https://bugs.webkit.org/show_bug.cgi?id=171775
http://trac.webkit.org/changeset/216677

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

3 years agoSpeedometer: Update the AngularJS implementation to a more recent library version
commit-queue@webkit.org [Fri, 12 May 2017 00:12:09 +0000 (00:12 +0000)]
Speedometer: Update the AngularJS implementation to a more recent library version
https://bugs.webkit.org/show_bug.cgi?id=171307

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-11
Reviewed by Ryosuke Niwa.

Updates the AngularJS implementation of TodoMVC to 1.4.x

* Speedometer/resources/todomvc/architecture-examples/angularjs/bower.json: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/angular-mocks/angular-mocks.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/angular/angular.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/todomvc-common/base.css: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/todomvc-common/base.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/todomvc-common/bg.png: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/index.html:
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/app.js:
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/controllers/todoCtrl.js:
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/directives/todoBlur.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/directives/todoEscape.js:
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/directives/todoFocus.js:
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/services/todoStorage.js:
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/angular-resource/angular-resource.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/angular-route/angular-route.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/angular/angular.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/todomvc-app-css/index.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/todomvc-app-css/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/todomvc-app-css/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/todomvc-common/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/todomvc-common/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/readme.md:
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/config/testacular.conf.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/package.json: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/readme.md: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/unit/directivesSpec.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/unit/todoCtrlSpec.js: Removed.
* Speedometer/resources/todomvc/architecture-examples/angularjs/todomvc-index.html: Added.

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

3 years ago[CMake] Add HAVE check for regex.h
commit-queue@webkit.org [Fri, 12 May 2017 00:04:08 +0000 (00:04 +0000)]
[CMake] Add HAVE check for regex.h
https://bugs.webkit.org/show_bug.cgi?id=171950

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-11
Reviewed by Michael Catanzaro.

.:

* Source/cmake/OptionsCommon.cmake:

Source/JavaScriptCore:

* runtime/ConfigFile.cpp:
(JSC::ConfigFile::parse):

Source/ThirdParty:

* gtest/include/gtest/internal/gtest-port.h:

Source/WebCore:

No new tests. No change in behavior.

* WebCorePrefix.h:
* testing/js/WebCoreTestSupportPrefix.h:

Source/WTF:

* wtf/Platform.h:

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

3 years agoMail spins launching spell checker when typing
timothy_horton@apple.com [Thu, 11 May 2017 23:55:10 +0000 (23:55 +0000)]
Mail spins launching spell checker when typing
https://bugs.webkit.org/show_bug.cgi?id=171986
<rdar://problem/26305327>

Reviewed by Beth Dakin.

* platform/spi/mac/NSSpellCheckerSPI.h:

* WebView/WebView.mm:
(-[WebView setEditable:]):
Asynchronously pre-warm the spell checker when a WebView becomes editable.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setEditable:]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::didBecomeEditable):
(WebKit::WebViewImpl::startObservingFontPanel): Deleted.
Asynchronously pre-warm the spell checker when a WKWebView becomes editable.

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

3 years agoRemove the code for old syncing script configuration in BuildbotSyncer
rniwa@webkit.org [Thu, 11 May 2017 23:46:23 +0000 (23:46 +0000)]
Remove the code for old syncing script configuration in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=171963

Reviewed by Chris Dumez.

Removed the code for specifying {"root": ~}, {"rootOptions": [~]}, and {"rootsExcluding": [~]} in buildbot
properties in the syncing script's configurations since they are no longer used after r215061.

Also removed the support for using "arguments" as an alias to "properties", and updated the tests accordingly.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer._parseRepositoryGroup): Removed the unused code.
(BuildbotSyncer._validateAndMergeConfig): Just allow string values in properties.
(BuildbotSyncer._validateAndMergeProperties): Deleted.

* unit-tests/buildbot-syncer-tests.js:
(sampleiOSConfig): Use "properties" instead of "arguments" to specify the buildbot properties.
(sampleiOSConfigWithExpansions): Ditto.

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

3 years agoStop using PassRefPtr in platform/graphics
cdumez@apple.com [Thu, 11 May 2017 23:40:14 +0000 (23:40 +0000)]
Stop using PassRefPtr in platform/graphics
https://bugs.webkit.org/show_bug.cgi?id=171977

Reviewed by Alex Christensen.

Source/WebCore:

Stop using PassRefPtr in platform/graphics.

* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::image):
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::brokenImage):
(WebCore::CachedImage::image):
(WebCore::CachedImage::imageForRenderer):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::addImageToResources):
* platform/ScrollView.cpp:
(WebCore::ScrollView::paintPanScrollIcon):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::drawCrossfade):
* platform/graphics/FontPlatformData.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/Image.cpp:
(WebCore::Image::nullImage):
* platform/graphics/Image.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::createResourceLoader):
* platform/graphics/MediaPlayer.h:
* platform/graphics/Pattern.cpp:
(WebCore::Pattern::create):
(WebCore::Pattern::Pattern):
* platform/graphics/Pattern.h:
* platform/graphics/PlatformTextTrack.h:
(WebCore::PlatformTextTrack::create):
(WebCore::PlatformTextTrack::createOutOfBand):
(WebCore::PlatformTextTrack::captionMenuOffItem):
(WebCore::PlatformTextTrack::captionMenuAutomaticItem):
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
(WebCore::InbandMetadataTextTrackPrivateAVF::create):
(WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings):
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionOptionAVFObjC::create):
(WebCore::MediaSelectionGroupAVFObjC::create):
(WebCore::MediaSelectionGroupAVFObjC::updateOptions):
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
(WebCore::InbandTextTrackPrivateAVCF::create):
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h:
(WebCore::InbandTextTrackPrivateLegacyAVCF::create):
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::create):
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
(WebCore::InbandTextTrackPrivateAVFObjC::create):
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::create):
* platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
(WebCore::OutOfBandTextTrackPrivateAVF::create):
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::create):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createPlatformCALayer):
(WebCore::GraphicsLayerCA::createPlatformCAAnimation):
(WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
(WebCore::GraphicsLayerCA::replicatedLayerRoot):
(WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
(WebCore::GraphicsLayerCA::createBasicAnimation):
(WebCore::GraphicsLayerCA::createKeyframeAnimation):
(WebCore::GraphicsLayerCA::createSpringAnimation):
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h:
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
(PlatformCAAnimationCocoa::create):
(PlatformCAAnimationCocoa::copy):
* platform/graphics/ca/win/AbstractCACFLayerTreeHost.h:
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::create):
(WebCore::CACFLayerTreeHost::addPendingAnimatedLayer):
* platform/graphics/ca/win/CACFLayerTreeHost.h:
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(PlatformCAAnimationWin::create):
(PlatformCAAnimationWin::copy):
* platform/graphics/ca/win/PlatformCAAnimationWin.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::addAnimationForKey):
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
(WebCore::WKCACFViewLayerTreeHost::create):
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
* platform/graphics/cairo/PatternCairo.cpp:
(WebCore::Pattern::createPlatformPattern):
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::clipForPatternFilling):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/cg/PatternCG.cpp:
(WebCore::Pattern::createPlatformPattern):
* platform/graphics/filters/FEDiffuseLighting.cpp:
(WebCore::FEDiffuseLighting::FEDiffuseLighting):
(WebCore::FEDiffuseLighting::create):
(WebCore::FEDiffuseLighting::lightSource):
* platform/graphics/filters/FEDiffuseLighting.h:
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::FELighting):
(WebCore::FELighting::drawLighting):
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FESpecularLighting.cpp:
(WebCore::FESpecularLighting::FESpecularLighting):
(WebCore::FESpecularLighting::create):
(WebCore::FESpecularLighting::lightSource):
* platform/graphics/filters/FESpecularLighting.h:
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::asUnmultipliedImage):
(WebCore::FilterEffect::asPremultipliedImage):
* platform/graphics/filters/FilterEffect.h:
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::ReferenceFilterOperation::setFilterEffect):
(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::blend):
* platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::blend):
(WebCore::PassthroughFilterOperation::create):
(WebCore::ReferenceFilterOperation::create):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::create):
* platform/graphics/gpu/Texture.h:
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/ImageGStreamer.h:
(WebCore::ImageGStreamer::createImage):
(WebCore::ImageGStreamer::image):
* platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
(WebCore::InbandMetadataTextTrackPrivateGStreamer::create):
(WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue):
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
(WebCore::InbandTextTrackPrivateGStreamer::create):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
(WebCore::MediaSourceClientGStreamerMSE::enqueueSample):
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
* platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp:
* platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
(WebCore::PlaybackPipeline::enqueueSample):
* platform/graphics/gstreamer/mse/PlaybackPipeline.h:
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::loadImageFromGResource):
(WebCore::loadResourceSharedBuffer):
(WebCore::loadMissingImageIconFromTheme):
(WebCore::Image::loadPlatformResource):
* platform/graphics/harfbuzz/HarfBuzzFace.cpp:
(WebCore::FaceCacheEntry::create):
* platform/graphics/harfbuzz/HarfBuzzFace.h:
(WebCore::HarfBuzzFace::create):
* platform/graphics/mac/ImageMac.mm:
(WebCore::Image::loadPlatformResource):
* platform/graphics/opentype/OpenTypeMathData.h:
(WebCore::OpenTypeMathData::create):
* platform/graphics/texmap/BitmapTexture.h:
(WebCore::BitmapTexture::applyFilters):
* platform/graphics/texmap/BitmapTextureGL.cpp:
(WebCore::BitmapTextureGL::applyFilters):
* platform/graphics/texmap/BitmapTextureGL.h:
(WebCore::BitmapTextureGL::FilterInfo::FilterInfo):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::acquireTextureFromPool):
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::createTexture):
* platform/graphics/texmap/TextureMapperGL.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintIntoSurface):
(WebCore::commitSurface):
(WebCore::TextureMapperLayer::paintWithIntermediateSurface):
(WebCore::TextureMapperLayer::setBackingStore):
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/TextureMapperTiledBackingStore.h:
(WebCore::TextureMapperTiledBackingStore::create):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncImageBacking):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::create):
(WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
* platform/graphics/win/ImageWin.cpp:
(WebCore::Image::loadPlatformResource):
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
* platform/graphics/win/PatternDirect2D.cpp:
(WebCore::Pattern::createPlatformPattern):
* platform/graphics/win/SharedGDIObject.h:
(WebCore::SharedGDIObject::create):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* rendering/RenderImageResource.cpp:
(WebCore::RenderImageResource::image):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::drawPlatformResizerImage):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
(WebCore::SVGFEDiffuseLightingElement::build):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute):
(WebCore::SVGFESpecularLightingElement::build):
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::imageForRenderer):

Source/WebKit/win:

Build fix.

* FullscreenVideoController.cpp:
(FullscreenVideoController::enterFullscreen):
* WebKitDLL.cpp:
(loadResourceIntoBuffer):

Source/WebKit2:

Build fix.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
(WebKit::CoordinatedGraphicsScene::removeBackingStoreIfNeeded):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Cursor>::decode):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::createImageBackingIfNeeded):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::createPlatformCALayer):
(WebKit::GraphicsLayerCARemote::createPlatformCAAnimation):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::copy):

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

3 years agoREGRESSION(r216217): lldb_webkit.py no longer prints out a WTFString, StringImpl...
commit-queue@webkit.org [Thu, 11 May 2017 23:34:20 +0000 (23:34 +0000)]
REGRESSION(r216217): lldb_webkit.py no longer prints out a WTFString, StringImpl needs to handle StringImplShape change
https://bugs.webkit.org/show_bug.cgi?id=171989

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-05-11
Reviewed by Brian Burg.

* lldb/lldb_webkit.py:
(WTFStringImplProvider.get_data8):
(WTFStringImplProvider.get_data16):
m_data8 and m_data16 are now part of the superclass StringImplShape
instead of directly in StringImpl. So first get the shape by getting
index 0, and the data properties are the same offset within that.

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

3 years agoAnnotate Ref::ptr() with RETURNS_NONNULL
cdumez@apple.com [Thu, 11 May 2017 23:33:30 +0000 (23:33 +0000)]
Annotate Ref::ptr() with RETURNS_NONNULL
https://bugs.webkit.org/show_bug.cgi?id=171996

Reviewed by Andreas Kling.

Annotate Ref::ptr() with RETURNS_NONNULL as it can never return null.

* wtf/Ref.h:
(WTF::Ref::ptr): Deleted.

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

3 years agoCallers of JSString::unsafeView() should check exceptions
fpizlo@apple.com [Thu, 11 May 2017 23:05:01 +0000 (23:05 +0000)]
Callers of JSString::unsafeView() should check exceptions
https://bugs.webkit.org/show_bug.cgi?id=171995

Reviewed by Mark Lam.

unsafeView() can throw OOME. So, callers of unsafeView() should check for exceptions before trying
to access the view.

Also, I made the functions surrounding unsafeView() take ExecState* not ExecState&, to comply with
the rest of JSC.

* dfg/DFGOperations.cpp:
* jsc.cpp:
(printInternal):
(functionDebug):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncJoin):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunctionSkippingEvalEnabledCheck):
* runtime/IntlCollatorPrototype.cpp:
(JSC::IntlCollatorFuncCompare):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncJoin):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncParseFloat):
* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
* runtime/JSString.cpp:
(JSC::JSString::getPrimitiveNumber):
(JSC::JSString::toNumber):
* runtime/JSString.h:
(JSC::JSString::getIndex):
(JSC::JSRopeString::unsafeView):
(JSC::JSRopeString::viewWithUnderlyingString):
(JSC::JSString::unsafeView):
(JSC::JSString::viewWithUnderlyingString):
* runtime/JSStringJoiner.h:
(JSC::JSStringJoiner::appendWithoutSideEffects):
(JSC::JSStringJoiner::append):
* runtime/ParseInt.h:
(JSC::toStringView):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncRepeatCharacter):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncNormalize):

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

3 years agoData loss when saving a PDF form where only radio buttons/checkboxes were modified
timothy_horton@apple.com [Thu, 11 May 2017 23:03:21 +0000 (23:03 +0000)]
Data loss when saving a PDF form where only radio buttons/checkboxes were modified
https://bugs.webkit.org/show_bug.cgi?id=171991
<rdar://problem/32115945>

Reviewed by Andy Estes.

* WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFLayerControllerDelegate didChangeAnnotationState]):
Mark the PDF as dirty (so we re-encode it when asked to save) if annotations
that only PDFKit knows about change.

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

3 years agoMarked tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html as flaky.
jlewis3@apple.com [Thu, 11 May 2017 22:31:27 +0000 (22:31 +0000)]
Marked tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168937

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoRemove Vibration API
joepeck@webkit.org [Thu, 11 May 2017 21:45:55 +0000 (21:45 +0000)]
Remove Vibration API
https://bugs.webkit.org/show_bug.cgi?id=171766

Rubber-stamped by Alexey Proskuryakov.

.:

* Source/cmake/WebKitFeatures.cmake:

Source/WebCore:

* features.json:
Mark the Vibration API as removed.

* CMakeLists.txt:
* DerivedSources.cpp:
* Modules/vibration/NavigatorVibration.cpp: Removed.
* Modules/vibration/NavigatorVibration.h: Removed.
* Modules/vibration/NavigatorVibration.idl: Removed.
* Modules/vibration/Vibration.cpp: Removed.
* Modules/vibration/Vibration.h: Removed.
* Modules/vibration/VibrationClient.h: Removed.
* testing/Internals.cpp:
(WebCore::Internals::isVibrating): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

* CMakeLists.txt:
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetVibration): Deleted.
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKVibration.cpp: Removed.
* UIProcess/API/C/WKVibration.h: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::m_weakPtrFactory):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::vibration): Deleted.
* UIProcess/WebVibrationProvider.cpp: Removed.
* UIProcess/WebVibrationProvider.h: Removed.
* UIProcess/WebVibrationProxy.cpp: Removed.
* UIProcess/WebVibrationProxy.h: Removed.
* UIProcess/WebVibrationProxy.messages.in: Removed.
* WebProcess/WebCoreSupport/WebVibrationClient.cpp: Removed.
* WebProcess/WebCoreSupport/WebVibrationClient.h: Removed.
* WebProcess/WebPage/WebPage.cpp:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* platform/wpe/TestExpectations:
* vibration/cancelVibration-after-pagevisibility-changed-to-hidden-expected.txt: Removed.
* vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html: Removed.
* vibration/cancelVibration-during-pattern-vibrating-expected.txt: Removed.
* vibration/cancelVibration-during-pattern-vibrating.html: Removed.
* vibration/navigator-vibration-expected.txt: Removed.
* vibration/navigator-vibration.html: Removed.

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

3 years agoWebGLRenderingContext should implement WebGLRenderingContextBase
dino@apple.com [Thu, 11 May 2017 21:39:40 +0000 (21:39 +0000)]
WebGLRenderingContext should implement WebGLRenderingContextBase
https://bugs.webkit.org/show_bug.cgi?id=171961
<rdar://problem/32124920>

Reviewed by Sam Weinig.

Source/WebCore:

WebGLRenderingContext and WebGL2RenderingContext are both
defined to "implement" WebGLRenderingContextBase. However, we
were doing it via inheritance, which meant that some things
were not visible on the WebGLRenderingContext prototype.

Test: fast/canvas/webgl/constants-on-interface.html

* WebCore.xcodeproj/project.pbxproj: Move the Custom.cpp files
out of the GC-only area now they have real content.

* bindings/js/JSDocumentCustom.cpp: Handle the fact that we
don't use the base class from the bindings, so we need to
translate WebGL1 and WebGL2 contexts into the right JS classes.
(WebCore::JSDocument::getCSSCanvasContext):
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):

* bindings/js/JSWebGL2RenderingContextCustom.cpp: Implement the
custom methods. In this case, we don't yet expose any
extensions for WebGL 2.
(WebCore::toJS):
(WebCore::JSWebGL2RenderingContext::getExtension):

* bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Removed.

* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
(WebCore::JSWebGLRenderingContext::getExtension):

* html/canvas/WebGL2RenderingContext.h: Make some things public.
* html/canvas/WebGLRenderingContext.h: Ditto.

* html/canvas/WebGL2RenderingContext.idl: Use implements.
* html/canvas/WebGLRenderingContext.idl: Ditto.

* testing/Internals.cpp: This now takes a WebGLRenderingContext.
(WebCore::Internals::simulateWebGLContextChanged):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

New test to make sure constants from WebGLRenderingContextBase are
visible on the WebGLRenderingContext prototype.

Also, fix up some existing tests that were expecting to see
instances of WebGLRenderingContextBase.

* fast/canvas/webgl/constants-on-interface-expected.txt: Added.
* fast/canvas/webgl/constants-on-interface.html: Added.
* fast/canvas/webgl/gl-object-get-calls-expected.txt:
* fast/canvas/webgl/null-object-behaviour-expected.txt:
* fast/canvas/webgl/texImageTest-expected.txt:

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

3 years agoFixed typo errors in TestExpectations.
jlewis3@apple.com [Thu, 11 May 2017 20:58:11 +0000 (20:58 +0000)]
Fixed typo errors in TestExpectations.

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoFixed typo errors in TestExpectations.
jlewis3@apple.com [Thu, 11 May 2017 20:55:10 +0000 (20:55 +0000)]
Fixed typo errors in TestExpectations.

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoWeb Inspector: RTL: "Elements > Styles - Rules" rule and media query headers should...
nvasilyev@apple.com [Thu, 11 May 2017 20:52:19 +0000 (20:52 +0000)]
Web Inspector: RTL: "Elements > Styles - Rules" rule and media query headers should be left aligned
https://bugs.webkit.org/show_bug.cgi?id=171954
<rdar://problem/31961976>

Reviewed by Matt Baker.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header):
(.style-declaration-section.locked > .header > .locked-icon):
(.style-declaration-section > .header > .icon):
(.style-declaration-section > .header > textarea):
(.style-declaration-section.invalid-selector > .header > .icon):
(body[dir=ltr] .style-declaration-section > .header): Deleted.
(body[dir=rtl] .style-declaration-section > .header): Deleted.
(body[dir=ltr] .style-declaration-section.locked > .header > .locked-icon): Deleted.
(body[dir=rtl] .style-declaration-section.locked > .header > .locked-icon): Deleted.
(body[dir=ltr] .style-declaration-section > .header > .icon): Deleted.
(body[dir=rtl] .style-declaration-section > .header > .icon): Deleted.
(body[dir=ltr] .style-declaration-section > .header > textarea): Deleted.
(body[dir=rtl] .style-declaration-section > .header > textarea): Deleted.
Remove RTL rules.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
Set dir="ltr" so selector's textareas work correctly.

* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .rules):

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

3 years agoFix a spelling mistake in ApplePayErrorCode
aestes@apple.com [Thu, 11 May 2017 20:30:13 +0000 (20:30 +0000)]
Fix a spelling mistake in ApplePayErrorCode
https://bugs.webkit.org/show_bug.cgi?id=171981
<rdar://problem/32136567>

Reviewed by Beth Dakin.

Source/WebCore:

* Modules/applepay/ApplePayError.idl:
* Modules/applepay/PaymentRequest.h:

Source/WebKit2:

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toPKPaymentErrorCode):
(WebKit::toPKPaymentAuthorizationStatus):

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

3 years agoResource Load Statistics: Enable configuration through preferences
wilander@apple.com [Thu, 11 May 2017 20:04:03 +0000 (20:04 +0000)]
Resource Load Statistics: Enable configuration through preferences
https://bugs.webkit.org/show_bug.cgi?id=171949
<rdar://problem/31894518>

Reviewed by Alex Christensen.

Source/WebCore:

No new tests. Just an added setter.

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::setReducedTimestampResolution):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
    Added ResourceLoadStatisticsTimeToLiveUserInteraction,
    ResourceLoadStatisticsTimeToLiveCookiePartitionFree, and
    ResourceLoadStatisticsReducedTimestampResolution.
* UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm: Added.
(WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
* UIProcess/WebResourceLoadStatisticsManager.h:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
    Now calls WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded().
* WebKit2.xcodeproj/project.pbxproj:

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

3 years agoOffer SPI to notify clients that GC has happened
fpizlo@apple.com [Thu, 11 May 2017 19:59:03 +0000 (19:59 +0000)]
Offer SPI to notify clients that GC has happened
https://bugs.webkit.org/show_bug.cgi?id=171980

Reviewed by Geoffrey Garen.

Sometimes when you're programming with weak references, it's most convenient if the GC tells
you when it finishes. This adds exactly such an API. This API is called at the *flip*: the
moment when the GC knows for sure which objects are dead and has definitely not allocated any
new objects or executed any JS code. The finalization part of the flip, which is where this
callback gets called, runs on the "main" thread - i.e. some thread that is attempting to
execute JS code and holds the JS lock. This will usually run as a side-effect of some
allocation or from the runloop.

This means, for example, that if you implemented a vector of weak references and registered a
callback to prune the vector of null weak references, then aside from the callback, nobody
would ever see a null weak reference in the vector.

* API/JSHeapFinalizerPrivate.cpp: Added.
(JSContextGroupAddHeapFinalizer):
(JSContextGroupRemoveHeapFinalizer):
* API/JSHeapFinalizerPrivate.h: Added.
* API/tests/testapi.c:
(heapFinalizer):
(testMarkingConstraintsAndHeapFinalizers):
(main):
(testMarkingConstraints): Deleted.
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.cpp:
(JSC::Heap::finalize):
(JSC::Heap::addHeapFinalizerCallback):
(JSC::Heap::removeHeapFinalizerCallback):
* heap/Heap.h:
* heap/HeapFinalizerCallback.cpp: Added.
(JSC::HeapFinalizerCallback::dump):
* heap/HeapFinalizerCallback.h: Added.
(JSC::HeapFinalizerCallback::HeapFinalizerCallback):
(JSC::HeapFinalizerCallback::operator==):
(JSC::HeapFinalizerCallback::operator!=):
(JSC::HeapFinalizerCallback::operator bool):
(JSC::HeapFinalizerCallback::run):

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

3 years agoUnify hasTouchScrollableOverflow/needsCompositedScrolling concepts
commit-queue@webkit.org [Thu, 11 May 2017 18:49:30 +0000 (18:49 +0000)]
Unify hasTouchScrollableOverflow/needsCompositedScrolling concepts
https://bugs.webkit.org/show_bug.cgi?id=171974

Patch by Frederic Wang <fwang@igalia.com> on 2017-05-11
Reviewed by Simon Fraser.

This commit moves the following pattern in a single RenderLayer::usesAcceleratedScrolling function:
#if PLATFORM(IOS)
...hasTouchScrollableOverflow()...
#else
...needsCompositedScrolling()...
#endif

No new tests, behavior unchanged.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::usesAcceleratedScrolling): Introduce helper function.
* rendering/RenderLayer.h: Declare the function.
* rendering/RenderLayerBacking.cpp:
(WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling): Use the new function.
(WebCore::RenderLayerBacking::updateConfiguration): Ditto.
* rendering/RenderLayerCompositor.cpp:
(WebCore::useCoordinatedScrollingForLayer): Ditto.

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

3 years agoMarked imported/w3c/web-platform-tests/html/webappapis/timers/negative-settimeout...
jlewis3@apple.com [Thu, 11 May 2017 18:38:22 +0000 (18:38 +0000)]
Marked imported/w3c/web-platform-tests/html/webappapis/timers/negative-settimeout.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170699

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years ago[Readable Streams API] Implement ReadableStreamBYOBReader cancel()
commit-queue@webkit.org [Thu, 11 May 2017 18:32:25 +0000 (18:32 +0000)]
[Readable Streams API] Implement ReadableStreamBYOBReader cancel()
https://bugs.webkit.org/show_bug.cgi?id=171919

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-05-11
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Updated expectations.

* web-platform-tests/streams/readable-byte-streams/general-expected.txt:
* web-platform-tests/streams/readable-byte-streams/general.dedicatedworker-expected.txt:

Source/WebCore:

Implemented ReadableStreamBYOBReader cancel() method.

Added tests checking cancel().

* Modules/streams/ReadableStreamBYOBReader.js:
(cancel): Implemented.
* Modules/streams/ReadableStreamInternals.js:
(readableStreamError): Updated to support ReadableStreamBYOBReader case.

LayoutTests:

Added test cases to check cancel() behaviour.

* streams/readable-stream-byob-reader-expected.txt: Updated.
* streams/readable-stream-byob-reader.js: Updated.

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

3 years agoMarked media/media-controls-clone-crash.html as flaky.
jlewis3@apple.com [Thu, 11 May 2017 18:18:59 +0000 (18:18 +0000)]
Marked media/media-controls-clone-crash.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171978

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoJSWeakCreate/Retain/Release should take a JSContextGroupRef and not a JSContextRef
fpizlo@apple.com [Thu, 11 May 2017 18:01:43 +0000 (18:01 +0000)]
JSWeakCreate/Retain/Release should take a JSContextGroupRef and not a JSContextRef
https://bugs.webkit.org/show_bug.cgi?id=171979

Reviewed by Mark Lam.

Functions that don't execute arbitrary JS but just need access to the VM should take a
JSContextGroupRef, not a JSContextRef.

* API/JSWeakPrivate.cpp:
(JSWeakCreate):
(JSWeakRetain):
(JSWeakRelease):
* API/JSWeakPrivate.h:
* API/tests/testapi.c:
(testMarkingConstraints):

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

3 years agoStop using PassRefPtr in WebGPU code
cdumez@apple.com [Thu, 11 May 2017 17:55:42 +0000 (17:55 +0000)]
Stop using PassRefPtr in WebGPU code
https://bugs.webkit.org/show_bug.cgi?id=171965

Reviewed by Alex Christensen.

Stop using PassRefPtr in WebGPU code.

* html/canvas/WebGPUDrawable.cpp:
(WebCore::WebGPUDrawable::WebGPUDrawable):
* html/canvas/WebGPURenderingContext.cpp:
(WebCore::WebGPURenderingContext::create):
(WebCore::WebGPURenderingContext::WebGPURenderingContext):
* html/canvas/WebGPURenderingContext.h:
* html/canvas/WebGPUTexture.cpp:
(WebCore::WebGPUTexture::createFromDrawableTexture):
(WebCore::WebGPUTexture::WebGPUTexture):
* html/canvas/WebGPUTexture.h:

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

3 years agoName WebRTC Threads
commit-queue@webkit.org [Thu, 11 May 2017 17:31:56 +0000 (17:31 +0000)]
Name WebRTC Threads
https://bugs.webkit.org/show_bug.cgi?id=171975

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-11
Reviewed by Eric Carlson.

No change of behavior.

* platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
(WebCore::LibWebRTCAudioModule::LibWebRTCAudioModule): Setting audio module thread name.
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::initializePeerConnectionFactoryAndThreads): Setting signaling and networking thread names.

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

3 years agoWeb Inspector: Error trying to delete DOM breakpoints from the Debugger tab
mattbaker@apple.com [Thu, 11 May 2017 17:14:34 +0000 (17:14 +0000)]
Web Inspector: Error trying to delete DOM breakpoints from the Debugger tab
https://bugs.webkit.org/show_bug.cgi?id=171970
<rdar://problem/32129262>

Reviewed by Brian Burg.

Source/WebInspectorUI:

In the Debugger sidebar, DOM breakpoints can be cleared from a DOM node
in two ways: by using the DOM node tree element's context menu, or by
pressing the delete key while the element is selected. Each method used
a different code path, and the latter had an error which caused it to fail.

Add a `removeDOMBreakpointsForNode` method to DOMDebuggerManager to make
the operation convenient, and call it from both event handlers.

* UserInterface/Controllers/DOMBreakpointTreeController.js:
(WebInspector.DOMBreakpointTreeController.appendBreakpointContextMenuItems):
Use convenience method.

* UserInterface/Controllers/DOMDebuggerManager.js:
(WebInspector.DOMDebuggerManager.prototype.removeDOMBreakpointsForNode):
Helper function for removing all of a node's breakpoints.

* UserInterface/Views/DOMNodeTreeElement.js:
(WebInspector.DOMNodeTreeElement.prototype.ondelete):
Use convenience method.

LayoutTests:

Add test for DOMDebuggerManager.prototype.removeDOMBreakpointsForNode.

* inspector/dom-debugger/dom-breakpoints-expected.txt:
* inspector/dom-debugger/dom-breakpoints.html:

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

3 years agoLayoutTest http/tests/media/track-in-band-hls-metadata-crash.html is a flaky timeout
pvollan@apple.com [Thu, 11 May 2017 16:31:51 +0000 (16:31 +0000)]
LayoutTest http/tests/media/track-in-band-hls-metadata-crash.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167749

Reviewed by Eric Carlson.

Revert parts of r216588. The position of the 'canplaythrough' event in the event sequence
is not always the same, causing flakiness. Stop listening to the 'canplaythrough' event,
this was introduced in r216588.

* http/tests/media/track-in-band-hls-metadata-crash-expected.txt:
* http/tests/media/track-in-band-hls-metadata-crash.html:

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

3 years agoStop using PassRefPtr in platform/audio
cdumez@apple.com [Thu, 11 May 2017 16:29:57 +0000 (16:29 +0000)]
Stop using PassRefPtr in platform/audio
https://bugs.webkit.org/show_bug.cgi?id=171966

Reviewed by Ryosuke Niwa.

Stop using PassRefPtr in platform/audio.

* platform/audio/AudioBus.h:
(WebCore::AudioBus::AudioBus):
* platform/audio/AudioFileReader.h:
* platform/audio/HRTFDatabaseLoader.cpp:
(WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
* platform/audio/HRTFDatabaseLoader.h:
* platform/audio/HRTFKernel.cpp:
(WebCore::HRTFKernel::createInterpolatedKernel):
* platform/audio/HRTFKernel.h:
(WebCore::HRTFKernel::create):
* platform/audio/glib/AudioBusGLib.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
* platform/audio/ios/AudioFileReaderIOS.cpp:
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
* platform/audio/ios/AudioFileReaderIOS.h:
* platform/audio/mac/AudioBusMac.mm:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
* platform/audio/mac/AudioFileReaderMac.h:

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

3 years agoAdd WPE release bots
clopez@igalia.com [Thu, 11 May 2017 16:29:48 +0000 (16:29 +0000)]
Add WPE release bots
https://bugs.webkit.org/show_bug.cgi?id=171973

Reviewed by Žan Doberšek.

This adds a WPE Release Build bot (64-bit) and a WPE Release Test bot.
It also adds a new WPE buildbot category.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(InstallWpeDependencies):
(appendCustomBuildFlags):
(Factory.__init__):
(loadBuilderConfig):
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
* BuildSlaveSupport/build.webkit.org-config/templates/root.html:

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

3 years agoWorkerThread::stop() should call scheduleExecutionTermination() last.
mark.lam@apple.com [Thu, 11 May 2017 15:26:03 +0000 (15:26 +0000)]
WorkerThread::stop() should call scheduleExecutionTermination() last.
https://bugs.webkit.org/show_bug.cgi?id=171775
<rdar://problem/30975761>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Increased the number of frames captured in VM::nativeStackTraceOfLastThrow()
from 25 to 100.  From experience, I found that 25 is sometimes not sufficient
for our debugging needs.

Also added VM::throwingThread() to track which thread an exception was thrown in.
This may be useful if the client is entering the VM from different threads.

* runtime/ExceptionScope.cpp:
(JSC::ExceptionScope::unexpectedExceptionMessage):
(JSC::ExceptionScope::releaseAssertIsTerminatedExecutionException):
* runtime/ExceptionScope.h:
(JSC::ExceptionScope::exception):
(JSC::ExceptionScope::unexpectedExceptionMessage):
* runtime/VM.cpp:
(JSC::VM::throwException):
* runtime/VM.h:
(JSC::VM::throwingThread):
(JSC::VM::clearException):

Source/WebCore:

Currently, WorkerThread::stop() calls scheduleExecutionTermination() to terminate
JS execution first, followed by posting a cleanup task to the worker, and lastly,
it invokes terminate() on the WorkerRunLoop.

As a result, before run loop is terminate, the worker thread may observe the
TerminatedExecutionException in JS code, bail out, see another JS task to run,
re-enters the VM to run said JS code, and fails with an assertion due to the
TerminatedExecutionException still being pending on VM entry.

WorkerRunLoop::Task::performTask() already has a check to only allow a task to
run if and only if !runLoop.terminated() and the task is not a clean up task.
We'll fix the above race by ensuring that having WorkerThread::stop() terminate
the run loop before it scheduleExecutionTermination() which throws the
TerminatedExecutionException.  This way, by the time JS code unwinds out of the
VM due to the TerminatedExecutionException, runLoop.terminated() is guaranteed
to be true and thereby prevents re-entry into the VM.

This issue is covered by an existing test that I just unskipped in TestExpectations.

* bindings/js/JSDOMPromiseDeferred.cpp:
(WebCore::DeferredPromise::callFunction):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::stop):

LayoutTests:

* TestExpectations:

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

3 years agoUnreviewed GTK+ gardening. Update expectations of tests failing after r216450.
carlosgc@webkit.org [Thu, 11 May 2017 13:33:05 +0000 (13:33 +0000)]
Unreviewed GTK+ gardening. Update expectations of tests failing after r216450.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Remove notifications guards from GTK API layer
csaavedra@igalia.com [Thu, 11 May 2017 12:54:25 +0000 (12:54 +0000)]
[GTK] Remove notifications guards from GTK API layer
https://bugs.webkit.org/show_bug.cgi?id=170014

Reviewed by Michael Catanzaro.

ENABLE_NOTIFICATIONS in the GTK port is a private option and
disabling it is unsupported, hence remove its guards from the GTK API
layer.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):

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

3 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.17.2 release.
carlosgc@webkit.org [Thu, 11 May 2017 08:34:08 +0000 (08:34 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.2 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.17.2.

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

3 years agoWebAssembly: stop supporting 0xD
jfbastien@apple.com [Thu, 11 May 2017 07:56:34 +0000 (07:56 +0000)]
WebAssembly: stop supporting 0xD
https://bugs.webkit.org/show_bug.cgi?id=168788
<rdar://problem/31880922>

Reviewed by Saam Barati.

JSTests:

Test that only version 1 is supported.

* wasm/js-api/version.js: Added.

Source/JavaScriptCore:

Only version 1 is supported by other browsers, and there shouldn't
be any 0xD binaries in the wild anymore.

* wasm/WasmModuleParser.cpp:

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

3 years ago[GTK] Web Inspector: Add new GTK+ icons for resources in large sizes (32px @ 1x/2x)
commit-queue@webkit.org [Thu, 11 May 2017 07:56:16 +0000 (07:56 +0000)]
[GTK] Web Inspector: Add new GTK+ icons for resources in large sizes (32px @ 1x/2x)
https://bugs.webkit.org/show_bug.cgi?id=155802
<rdar://problem/25320686>

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-05-11
Reviewed by Carlos Garcia Campos.

Add more free icons for the Web Inspector in GTK+.

* UserInterface/Images/gtk/ClippingCSSLarge.png: Added.
* UserInterface/Images/gtk/ClippingCSSLarge@2x.png: Added.
* UserInterface/Images/gtk/ClippingGenericLarge.png: Added.
* UserInterface/Images/gtk/ClippingGenericLarge@2x.png: Added.
* UserInterface/Images/gtk/ClippingJSLarge.png: Added.
* UserInterface/Images/gtk/ClippingJSLarge@2x.png: Added.
* UserInterface/Images/gtk/DocumentCSSLarge.png: Added.
* UserInterface/Images/gtk/DocumentCSSLarge@2x.png: Added.
* UserInterface/Images/gtk/DocumentFontLarge.png: Added.
* UserInterface/Images/gtk/DocumentFontLarge@2x.png: Added.
* UserInterface/Images/gtk/DocumentGenericLarge.png: Added.
* UserInterface/Images/gtk/DocumentGenericLarge@2x.png: Added.
* UserInterface/Images/gtk/DocumentImageLarge.png: Added.
* UserInterface/Images/gtk/DocumentImageLarge@2x.png: Added.
* UserInterface/Images/gtk/DocumentJSLarge.png: Added.
* UserInterface/Images/gtk/DocumentJSLarge@2x.png: Added.
* UserInterface/Images/gtk/DocumentMarkupLarge.png: Added.
* UserInterface/Images/gtk/DocumentMarkupLarge@2x.png: Added.

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

3 years ago[GTK] JavaScript prompt uses title of page to be loaded rather than title of current...
csaavedra@igalia.com [Thu, 11 May 2017 07:55:22 +0000 (07:55 +0000)]
[GTK] JavaScript prompt uses title of page to be loaded rather than title of current page
https://bugs.webkit.org/show_bug.cgi?id=152690

Reviewed by Michael Catanzaro.

webkit_web_view_get_uri() returns the page to be loaded, use
internal api for this.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreateJavaScriptDialog):

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

3 years agoDrop custom bindings code for HTMLFormControlsCollection's named property getter
cdumez@apple.com [Thu, 11 May 2017 07:35:35 +0000 (07:35 +0000)]
Drop custom bindings code for HTMLFormControlsCollection's named property getter
https://bugs.webkit.org/show_bug.cgi?id=171964

Reviewed by Sam Weinig.

Drop custom bindings code for HTMLFormControlsCollection's named property getter as
we are able to generate it.

No new tests, no expected Web-facing behavior change.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateNamedGetter):
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::namedItemOrItems):
* html/HTMLFormControlsCollection.h:
* html/HTMLFormControlsCollection.idl:

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

3 years agoNull deref in WebPage::dictionaryPopupInfoForRange
timothy_horton@apple.com [Thu, 11 May 2017 04:53:15 +0000 (04:53 +0000)]
Null deref in WebPage::dictionaryPopupInfoForRange
https://bugs.webkit.org/show_bug.cgi?id=171959
<rdar://problem/20886282>

Reviewed by Beth Dakin.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange):
Speculative fix for non-reproducible crash when the startContainer of
the range is in an anonymous node.

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

3 years agoAnother build fix after r215633 to make the bar graphs render even when the confidenc...
rniwa@webkit.org [Thu, 11 May 2017 04:23:26 +0000 (04:23 +0000)]
Another build fix after r215633 to make the bar graphs render even when the confidence intervals aren't available.

* public/v3/components/bar-graph-group.js:
(BarGraphGroup.prototype._computeRange):

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

3 years ago[MediaStream] CoreAudioCaptureSource claims to never be muted
eric.carlson@apple.com [Thu, 11 May 2017 04:22:08 +0000 (04:22 +0000)]
[MediaStream] CoreAudioCaptureSource claims to never be muted
https://bugs.webkit.org/show_bug.cgi?id=171946
<rdar://problem/32111991>

Reviewed by Jer Noble.

* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSource::stopProducingData): Set m_muted to true.

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

3 years agoBuild fix after r215633.
rniwa@webkit.org [Thu, 11 May 2017 04:06:02 +0000 (04:06 +0000)]
Build fix after r215633.

* public/v3/models/test-group.js:
(TestGroup.prototype._computeRequestedCommitSets):
(TestGroup.prototype.requestsForCommitSet):

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