aakash_jain@apple.com [Fri, 7 Apr 2017 19:06:51 +0000 (19:06 +0000)]
Add support for test262 JavaScriptCore tests
https://bugs.webkit.org/show_bug.cgi?id=170523
Reviewed by Daniel Bates.
* BuildSlaveSupport/build.webkit.org-config/config.json: Added bot433 and bot434.
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunTest262Tests): Added class to run Test262 tests.
(RunTest262Tests.start): Added.
(RunTest262Tests.countFailures): Method to count the failures.
(Test262Factory): Added Test262 factory class.
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
(RunTest262TestsTest): Added unit tests.
(RunTest262TestsTest.assertResults): Helper method.
(RunTest262TestsTest.test_no_regressions_output): Added test case.
(test_failure_output): Same.
(test_failures_output): Same.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215108
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 19:03:59 +0000 (19:03 +0000)]
Include cstdio before using sscanf and stderr
https://bugs.webkit.org/show_bug.cgi?id=170098
Patch by Ting-Wei Lan <lantw44@gmail.com> on 2017-04-07
Reviewed by Michael Catanzaro.
* wtf/NumberOfCores.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215107
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mcatanzaro@igalia.com [Fri, 7 Apr 2017 18:52:58 +0000 (18:52 +0000)]
[GTK] Various build errors when plugin support is disabled
https://bugs.webkit.org/show_bug.cgi?id=170015
Reviewed by Carlos Garcia Campos.
.:
Allow building with ENABLE_NETSCAPE_PLUGIN_API=ON and ENABLE_X11_TARGET=OFF. This should be
possible as Carlos worked to ensure windowless plugins work properly outside X11. The GTK2
plugin process still depends on ENABLE_X11_TARGET because a plugin that uses GTK+ surely
wants to display a window, and is not going to work outside X11. (If the plugin links to
GTK+ but does not display a window, it's dumb and deserves to be broken.)
Also, make ENABLE_PLUGIN_PROCESS conditional on ENABLE_NETSCAPE_PLUGIN_API, not
ENABLE_X11_TARGET.
* Source/cmake/OptionsGTK.cmake:
Source/WebKit2:
* PluginProcess/unix/PluginControllerProxyUnix.cpp:
* UIProcess/API/gtk/WebKitWebsiteData.cpp:
(recordContainsSupportedDataTypes):
(toWebKitWebsiteDataTypes):
* UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
(toWebsiteDataTypes):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215106
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 18:49:57 +0000 (18:49 +0000)]
[JSC] Change --debug option to --debugger
https://bugs.webkit.org/show_bug.cgi?id=170587
Patch by Caio Lima <ticaiolima@gmail.com> on 2017-04-07
Reviewed by Keith Miller.
* Scripts/run-jsc:
This patch is changing the new debugger flag for Tools/Scripts/run-jsc
to --debugger to avoid shadowing --debug flag used to run JSC with
Debug build.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215105
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
wilander@apple.com [Fri, 7 Apr 2017 18:36:03 +0000 (18:36 +0000)]
WebSocket streams should have network usage attributed to correct process
https://bugs.webkit.org/show_bug.cgi?id=170322
<rdar://problem/
26413551>
Reviewed by Alex Christensen.
Source/WebCore:
Tested manually since it requires a per-app VPN.
* page/SocketProvider.cpp:
(WebCore::SocketProvider::createSocketStreamHandle):
Sends in an empty struct since it doesn't have access to
platform dependent sourceApplicationAuditData.
* platform/network/SocketStreamHandle.h:
Declaration of a per-platform struct to hold CF data for
Cocoa platforms.
* platform/network/cf/SocketStreamHandleImpl.h:
(WebCore::SocketStreamHandleImpl::create):
Now takes WebCore::SourceApplicationAuditToken which is
passed on to the constructor.
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
Now takes WebCore::SourceApplicationAuditToken which is
passed on to the streams once created.
(WebCore::SocketStreamHandleImpl::createStreams):
Now sets kCFStreamPropertySourceApplication for the two
streams.
* platform/network/curl/SocketStreamHandleImpl.h:
(WebCore::SocketStreamHandleImpl::create):
Added unused WebCore::SourceApplicationAuditToken parameter.
* platform/network/soup/SocketStreamHandleImpl.h:
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::create):
Added unused WebCore::SourceApplicationAuditToken parameter.
Source/WebKit2:
Changes here are due to the added WebCore::SourceApplicationAuditToken parameter
in WebCore::SocketStreamHandleImpl::create().
WebKit::NetworkSocketStream takes it and passes it on.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::createSocketStream):
* NetworkProcess/NetworkSocketStream.cpp:
(WebKit::NetworkSocketStream::create):
(WebKit::NetworkSocketStream::NetworkSocketStream):
* NetworkProcess/NetworkSocketStream.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215104
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sbarati@apple.com [Fri, 7 Apr 2017 18:25:14 +0000 (18:25 +0000)]
WebAssembly: Make to a compilation API that allows for multi-VM concurrent compilations of Wasm Modules
https://bugs.webkit.org/show_bug.cgi?id=170488
Reviewed by JF Bastien.
Source/JavaScriptCore:
This patch adds a class called Wasm::Module. It contains the bits from
JSWebAssemblyModule that were not VM specific. JSWebAssemblyModule
now has a Ref<Wasm::Module>. Similarly, there is now a Wasm::CodeBlock,
which owns the non-VM-specific bits that JSWebAssemblyCodeBlock used
to own.
This patch also simplifies how we verify and compile code. Wasm::Module
now has an API for both sync/async validation and compilation. This
API abstracts away how Wasm::Plan works.
This is hopefully the last patch needed before we can implement
window.postMessage for a JSWebAssemblyModule. I think all that's
needed now to implement postMessage is simply creating a new
JSWebAssemblyModule with the underlying Wasm::Module.
This patch is neutral on WasmBench.
Finally, this patch changes the promise deferred timer to
allow for new tasks to be added while we're executing
a task. Before, we'd deadlock if this happened.
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(functionTestWasmModuleFunctions):
* runtime/PromiseDeferredTimer.cpp:
(JSC::PromiseDeferredTimer::doWork):
(JSC::PromiseDeferredTimer::scheduleWorkSoon):
* runtime/PromiseDeferredTimer.h:
* wasm/WasmB3IRGenerator.cpp:
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToJs):
(JSC::Wasm::wasmToWasm):
(JSC::Wasm::exitStubGenerator): Deleted.
* wasm/WasmBinding.h:
* wasm/WasmCodeBlock.cpp: Added.
(JSC::Wasm::CodeBlock::CodeBlock):
(JSC::Wasm::CodeBlock::waitUntilFinished):
(JSC::Wasm::CodeBlock::compileAsync):
(JSC::Wasm::CodeBlock::isSafeToRun):
* wasm/WasmCodeBlock.h: Added.
(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::compilationFinished):
(JSC::Wasm::CodeBlock::runnable):
(JSC::Wasm::CodeBlock::errorMessage):
(JSC::Wasm::CodeBlock::functionImportCount):
(JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):
* wasm/WasmModule.cpp: Added.
(JSC::Wasm::Module::Module):
(JSC::Wasm::makeValidationResult):
(JSC::Wasm::Module::validateSyncImpl):
(JSC::Wasm::Module::getOrCreateCodeBlock):
(JSC::Wasm::Module::compileSync):
(JSC::Wasm::Module::makeValidationCallback):
(JSC::Wasm::Module::compileAsync):
* wasm/WasmModule.h: Added.
(JSC::Wasm::Module::create):
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):
(JSC::Wasm::Module::signatureIndexFromFunctionIndexSpace):
(JSC::Wasm::Module::moduleInformation):
(JSC::Wasm::Module::nonNullCodeBlock):
* wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::addCompletionTask):
(JSC::Wasm::Plan::prepare):
(JSC::Wasm::Plan::compileFunctions):
(JSC::Wasm::Plan::complete):
(JSC::Wasm::Plan::tryRemoveVMAndCancelIfLast):
(JSC::Wasm::Plan::cancel): Deleted.
* wasm/WasmPlan.h:
(JSC::Wasm::Plan::dontFinalize):
(JSC::Wasm::Plan::takeWasmToWasmExitStubs):
(JSC::Wasm::Plan::mode):
(JSC::Wasm::Plan::takeWasmExitStubs): Deleted.
(JSC::Wasm::Plan::vm): Deleted.
* wasm/WasmWorklist.cpp:
(JSC::Wasm::Worklist::stopAllPlansForVM):
* wasm/js/JSWebAssemblyCodeBlock.cpp:
(JSC::JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock):
(JSC::JSWebAssemblyCodeBlock::isSafeToRun):
(JSC::JSWebAssemblyCodeBlock::initialize): Deleted.
* wasm/js/JSWebAssemblyCodeBlock.h:
(JSC::JSWebAssemblyCodeBlock::create):
(JSC::JSWebAssemblyCodeBlock::functionImportCount):
(JSC::JSWebAssemblyCodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyCodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyCodeBlock::wasmToJsCallStubForImport):
(JSC::JSWebAssemblyCodeBlock::mode): Deleted.
(JSC::JSWebAssemblyCodeBlock::initialized): Deleted.
(JSC::JSWebAssemblyCodeBlock::plan): Deleted.
(JSC::JSWebAssemblyCodeBlock::runnable): Deleted.
(JSC::JSWebAssemblyCodeBlock::errorMessage): Deleted.
(JSC::JSWebAssemblyCodeBlock::setJSEntrypointCallee): Deleted.
(JSC::JSWebAssemblyCodeBlock::setWasmEntrypointCallee): Deleted.
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::finalizeCreation):
(JSC::JSWebAssemblyInstance::addUnitializedCodeBlock): Deleted.
* wasm/js/JSWebAssemblyInstance.h:
(JSC::JSWebAssemblyInstance::initialized): Deleted.
* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::createStub):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::finishCreation):
* wasm/js/JSWebAssemblyModule.h:
(JSC::JSWebAssemblyModule::moduleInformation):
(JSC::JSWebAssemblyModule::signatureIndexFromFunctionIndexSpace):
(JSC::JSWebAssemblyModule::module):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::create):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
* wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::WebAssemblyModuleConstructor::createModule):
* wasm/js/WebAssemblyPrototype.cpp:
(JSC::reject):
(JSC::webAssemblyCompileFunc):
(JSC::resolve):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::webAssemblyValidateFunc):
Source/WTF:
* wtf/SharedTask.h: Make SharedTaskFunctor forward its arguments.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215103
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Fri, 7 Apr 2017 18:15:22 +0000 (18:15 +0000)]
REGRESSION(r204512): WebSocket errors with "Failed to send WebSocket frame." if too much data is sent
https://bugs.webkit.org/show_bug.cgi?id=170463
Reviewed by Michael Catanzaro.
This only reproduces when using WebSockets to communicate with an external server.
When communicating with a local server, CFWriteStreamWrite succeeds too reliably, so
CFWriteStreamCanAcceptBytes returns true, when sometimes it doesn't when communicating
across the real internet.
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::SocketStreamHandleImpl::platformSendInternal):
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::platformSendInternal):
Returning std::nullopt means there was an error, which is not true when the socket stream
is in a state where it cannot be written to because it is actively communicating.
Returning 0 means 0 new bytes were sent, so we will try again later.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215102
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mcatanzaro@igalia.com [Fri, 7 Apr 2017 18:01:12 +0000 (18:01 +0000)]
Unreviewed, fix missing return value warning
* UIProcess/WebProcessProxy.cpp:
(WebKit::diagnosticLoggingKeyForSimulatedCrashReason):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215101
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Fri, 7 Apr 2017 17:29:40 +0000 (17:29 +0000)]
MediaSample should store video sample rotation instead of orientation
https://bugs.webkit.org/show_bug.cgi?id=170598
Reviewed by Youenn Fablet.
No new tests, no functional change.
* platform/MediaSample.h:
(WebCore::MediaSample::videoRotation):
(WebCore::MediaSample::videoOrientation): Deleted.
* platform/graphics/avfoundation/MediaSampleAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoTransformationMatrix):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::processNewFrame):
* platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
(WebCore::RealtimeIncomingVideoSource::OnFrame):
(WebCore::RealtimeIncomingVideoSource::processNewSample):
* platform/mediastream/mac/RealtimeIncomingVideoSource.h:
* platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:
(WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215099
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Fri, 7 Apr 2017 16:57:35 +0000 (16:57 +0000)]
Rebaseline additional tests after r215096.
https://bugs.webkit.org/show_bug.cgi?id=170561
<rdar://problem/7415154>
LayoutTests/imported/w3c:
* web-platform-tests/cors/allow-headers-expected.txt:
* web-platform-tests/cors/origin-expected.txt:
LayoutTests:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-self-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-self-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-self-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-self-block-expected.txt:
* http/tests/security/no-popup-from-sandbox-top-expected.txt:
* http/tests/xmlhttprequest/origin-exact-matching-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215098
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 16:22:06 +0000 (16:22 +0000)]
[CMake][Windows] WebKitGUID.lib should be built with the release CRT
https://bugs.webkit.org/show_bug.cgi?id=170593
Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-04-07
Reviewed by Brent Fulgham.
Source/cmake/OptionsWin.cmake has a trick to force using the
release CRT even for debug build configuration. But, this works
only for C++, but for C. As the result, WebKitGUID.lib is built
with the debug CRT in debug build configuration because it has C
source files.
* Source/cmake/OptionsWin.cmake: Process CMAKE_C_FLAGS_* as well as CMAKE_CXX_FLAGS_*.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215097
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Fri, 7 Apr 2017 16:02:10 +0000 (16:02 +0000)]
WebKit should percent encode single quotes in query strings
https://bugs.webkit.org/show_bug.cgi?id=170561
<rdar://problem/7415154>
Reviewed by Alex Christensen.
Source/WebCore:
Modify the characterClassTable to instruct the URLParser to convert
the single-quote character ' to %27 in URL query strings.
Tests: URLParserTest in TestWebKitAPI.
fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html
fast/frames/xss-auditor-handles-file-urls.html
http/tests/security/xssAuditor
* platform/URLParser.cpp:
Tools:
Add a test case for single-quote in the URL query string.
* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
LayoutTests:
Rebaseline tests after change.
* fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame-expected.txt:
* fast/frames/xss-auditor-handles-file-urls-expected.txt:
* http/tests/security/xssAuditor/base-href-control-char-expected.txt:
* http/tests/security/xssAuditor/base-href-expected.txt:
* http/tests/security/xssAuditor/base-href-null-char-expected.txt:
* http/tests/security/xssAuditor/base-href-scheme-relative-expected.txt:
* http/tests/security/xssAuditor/embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/embed-tag-expected.txt:
* http/tests/security/xssAuditor/embed-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/form-action-expected.txt:
* http/tests/security/xssAuditor/formaction-on-button-expected.txt:
* http/tests/security/xssAuditor/formaction-on-input-expected.txt:
* http/tests/security/xssAuditor/frameset-injection-expected.txt:
* http/tests/security/xssAuditor/full-block-base-href-expected.txt:
* http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
* http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/iframe-injection-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-more-encoding-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char-expected.txt:
* http/tests/security/xssAuditor/link-onclick-ampersand-expected.txt:
* http/tests/security/xssAuditor/link-onclick-control-char-expected.txt:
* http/tests/security/xssAuditor/link-onclick-entities-expected.txt:
* http/tests/security/xssAuditor/link-onclick-expected.txt:
* http/tests/security/xssAuditor/link-onclick-null-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/object-tag-expected.txt:
* http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/script-tag-expression-follows-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode4-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode5-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-comma-01-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-entities-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query-expected.txt:
* http/tests/security/xssAuditor/svg-animate-expected.txt:
* http/tests/security/xssAuditor/svg-script-tag-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-big5-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-sjis-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215096
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 15:24:09 +0000 (15:24 +0000)]
Improve some WebRTC flaky tests
https://bugs.webkit.org/show_bug.cgi?id=170584
Patch by Youenn Fablet <youenn@apple.com> on 2017-04-07
Reviewed by Alex Christensen.
* webrtc/libwebrtc/descriptionGetters.html:
* webrtc/video-replace-track-to-null.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215095
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Fri, 7 Apr 2017 15:05:43 +0000 (15:05 +0000)]
Text insertion cursor disappears after pressing enter
https://bugs.webkit.org/show_bug.cgi?id=169291
<rdar://problem/
30899611>
Reviewed by Tim Horton.
Source/WebCore:
Positon upstream/downstream (as the result of VisiblePosition -> canonicalPosition) require
linebox tree. In addition to regular text, we need to bail out of simple line layout on line breaks too.
Test: editing/simple-line-layout-caret-is-gone.html
* dom/Position.cpp:
(WebCore::ensureLineBoxesIfNeeded):
(WebCore::Position::upstream):
(WebCore::Position::downstream):
(WebCore::Position::getInlineBoxAndOffset):
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::ensureLineBoxes):
(WebCore::RenderLineBreak::positionForPoint):
(WebCore::RenderLineBreak::setSelectionState):
(WebCore::RenderLineBreak::collectSelectionRects):
(WebCore::ensureLineBoxes): Deleted.
* rendering/RenderLineBreak.h:
LayoutTests:
* editing/simple-line-layout-caret-is-gone-expected.txt: Added.
* editing/simple-line-layout-caret-is-gone.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215094
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 14:13:26 +0000 (14:13 +0000)]
[GTK] Fix codec name in OWR ASSERT
https://bugs.webkit.org/show_bug.cgi?id=170600
Patch by Xan Lopez <xlopez@igalia.com> on 2017-04-07
Reviewed by Carlos Garcia Campos.
* platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
(WebCore::MediaEndpointOwr::prepareMediaSession): uppercase the
codec name we are looking for, that's how they appear in the
vector.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215093
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
pvollan@apple.com [Fri, 7 Apr 2017 13:43:37 +0000 (13:43 +0000)]
Add hasVideo property to WebAVPlayerController.
https://bugs.webkit.org/show_bug.cgi?id=170545
rdar://problem/
31325182
Reviewed by Eric Carlson.
Add a new "hasVideo" property which can be used to discover if any video content is present in the playback item,
whether video content is currently enabled or not.
* platform/ios/WebAVPlayerController.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::hasVideoChanged):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215092
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
magomez@igalia.com [Fri, 7 Apr 2017 12:52:27 +0000 (12:52 +0000)]
[GTK+] Animations not played properly when using synchronous decoding
https://bugs.webkit.org/show_bug.cgi?id=170591
Reviewed by Carlos Garcia Campos.
Fix an index error when destroying decoded frames that was sometimes deleting the frame we wanted
to keep.
Covered by exitent tests.
* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::destroyDecodedData):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215091
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 12:01:00 +0000 (12:01 +0000)]
[GTK] Add message about missing codecs to ASSERT in OWR
https://bugs.webkit.org/show_bug.cgi?id=170596
Patch by Xan Lopez <xan@igalia.com> on 2017-04-07
Reviewed by Carlos Garcia Campos.
* platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
(WebCore::MediaEndpointOwr::prepareMediaSession): add a message
about the missing coded to the ASSERT.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215090
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
tpopela@redhat.com [Fri, 7 Apr 2017 11:59:28 +0000 (11:59 +0000)]
AX: Don't crash if no renderer is available for AccessibilityRenderObject
https://bugs.webkit.org/show_bug.cgi?id=170448
Reviewed by Chris Fleizach.
Don't crash or assert if no renderer is available, but early return
gracefully (as in other places in the AccessibilityRenderObject.cpp).
Spotted by running some tests through dogtail.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isOffScreen):
(WebCore::AccessibilityRenderObject::isUnvisited):
(WebCore::AccessibilityRenderObject::isVisited):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215089
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Fri, 7 Apr 2017 10:43:43 +0000 (10:43 +0000)]
[GTK] Update the priorities used in glib main loop sources
https://bugs.webkit.org/show_bug.cgi?id=170457
Reviewed by Žan Doberšek.
Source/JavaScriptCore:
* runtime/JSRunLoopTimer.cpp:
(JSC::JSRunLoopTimer::JSRunLoopTimer):
Source/WebCore:
* platform/glib/MainThreadSharedTimerGLib.cpp:
(WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::TextureMapperPlatformLayerProxy):
(WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):
Source/WebKit2:
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
(WebKit::CompositingRunLoop::CompositingRunLoop):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor):
* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::createWaylandLoopSource):
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::CompositingCoordinator):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
Source/WTF:
Add an enum to define prirorities used in different GLib main sources. It allows to give them a better name
than high, low, medium, etc., but also to document them and other GLib based ports can define their own
values without changing all the places where they are used. The default values are based on the priorities
pre-defined by GLib.
* wtf/glib/MainThreadGLib.cpp:
(WTF::MainThreadDispatcher::MainThreadDispatcher):
* wtf/glib/RunLoopGLib.cpp:
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::dispatchAfter):
(WTF::RunLoop::TimerBase::TimerBase):
* wtf/glib/RunLoopSourcePriority.h: Added.
* wtf/linux/MemoryPressureHandlerLinux.cpp:
(WTF::MemoryPressureHandler::EventFDPoller::EventFDPoller):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215088
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Fri, 7 Apr 2017 07:37:36 +0000 (07:37 +0000)]
[GCrypt] Implement AES_CBC support
https://bugs.webkit.org/show_bug.cgi?id=170550
Reviewed by Michael Catanzaro.
Implement the CryptoAlgorithmAES_CBC::platform{Encrypt,Decrypt}
functionality for configurations that use libgcrypt. This is done
by leveraging the gcry_cipher_* APIs for the AES algorithm that's
deduced appropriately from the key size and the CBC cipher mode.
Additionally, the PKCS#7 padding is implemented for each operation,
as demanded by the Web Crypto specification.
No new tests -- current ones cover this sufficiently, but are not yet
enabled due to missing platform-specific SUBTLE_CRYPTO implementations.
* crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:
(WebCore::gcryptEncrypt):
(WebCore::gcryptDecrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215087
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Fri, 7 Apr 2017 07:36:35 +0000 (07:36 +0000)]
[GCrypt] Implement raw and JWK imports and exports for EC keys
https://bugs.webkit.org/show_bug.cgi?id=170546
Reviewed by Michael Catanzaro.
Source/WebCore:
Implement import and export operations for EC keys, covering the raw
and JWK import/export types.
CryptoKeyEC::platformImportRaw() builds a public-key s-expression,
providing the curve name and the key data, and yields the gcry_sexp_t
object to the new CryptoKeyEC.
CryptoKeyEC::platformImportJWKPublic() first constructs a Vector<uint8_t>
object that contains the EC point in the uncompressed format. It then
puts that data into a newly-constructed public-key s-expression that is
then used to construct the new CryptoKeyEC object.
CryptoKeyEC::platformImportJWKPrivate() constructs the EC point data just
the same, but it also lays out the private key field element data into
the private-key s-expression that's then handed off to the CryptoKeyEC
object.
CryptoKeyEC::platformExportRaw() constructs a new EC operations context
and then uses it to retrieve the q parameter as an MPI. A Vector<uint8_t>
is retrieved from the MPI data through the extractMPIData() helper
function.
CryptoKeyEC::platformAddFieldElements() similarly uses the EC operations
context to retrieve the q parameter data, which it then splits into the
x and y field elements and Base64 URL-encodes them into a form that can
be placed in a JsonWebKey. If the key is private, the d parameter is
retrieved in the same fashion and again Base64 URL-encoded and stored
in the JsonWebKey object.
No new tests -- current ones cover this sufficiently, but are not yet
enabled due to other missing platform-specific SUBTLE_CRYPTO
implementations.
* crypto/gcrypt/CryptoKeyECGCrypt.cpp:
(WebCore::uncompressedPointSizeForCurve):
(WebCore::uncompressedFieldElementSizeForCurve):
(WebCore::extractMPIData):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformExportRaw):
(WebCore::CryptoKeyEC::platformAddFieldElements):
Source/WebCore/PAL:
Add HandleDeleter specizalizations for gcry_ctx_t and gcry_mpi_t types.
* pal/crypto/gcrypt/Handle.h:
(PAL::GCrypt::HandleDeleter<gcry_ctx_t>::operator()):
(PAL::GCrypt::HandleDeleter<gcry_mpi_t>::operator()):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215086
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Fri, 7 Apr 2017 07:35:21 +0000 (07:35 +0000)]
[GCrypt] Implement CryptoKeyRSA::generatePair()
https://bugs.webkit.org/show_bug.cgi?id=170350
Reviewed by Michael Catanzaro.
Start implementing the libgcrypt-based platform bits of CryptoKeyRSA.
Implement generatePair() by constructing a genkey s-expression
that requests a generation of an RSA key that should use a modulus
of the specified bit-length and the specified exponent. The exponent
is extracted from an uint8_t array through a helper function. The
modulus length value is checked to be at least 16, since libgcrypt
does not support generating primes of less than that length in bits.
The returned s-expression upon request will contain the data for
both the public and the private key. gcry_sexp_t handles representing
those s-expressions are then passed to CryptoKeyRSA::create() before
invoking the success callback with a new CryptoKeyPair object in a
separate ScriptExecutionContext task.
The CryptoKeyRSA constructor simply has the notImplemented() call
removed. The destructor now invokes the HandleDeleter<gcry_sexp_t>
object instance to destroy the object represented by the
m_platformKey handle.
The methods in CryptoKeyRSA.cpp are also reordered to follow the
declaration order used in the header.
No new tests -- current ones cover this sufficiently, but are not yet
enabled due to other missing platform-specific SUBTLE_CRYPTO
implementations.
* crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
(WebCore::CryptoKeyRSA::CryptoKeyRSA):
(WebCore::CryptoKeyRSA::~CryptoKeyRSA):
(WebCore::exponentVectorToUInt32):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):
(WebCore::CryptoKeyRSA::exportPkcs8):
(WebCore::CryptoKeyRSA::buildAlgorithm):
(WebCore::CryptoKeyRSA::exportData):
* crypto/keys/CryptoKeyRSA.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215085
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 03:45:32 +0000 (03:45 +0000)]
Add WKContentExtensionStore.h and WKContentExtension.h to public WebKit.h
https://bugs.webkit.org/show_bug.cgi?id=170533
Patch by Alex Christensen <achristensen@webkit.org> on 2017-04-06
Reviewed by Daniel Bates.
* Shared/API/Cocoa/WebKit.h:
In r213696 I added two public headers. All public headers in WebKit are included with
#import <WebKit/WebKit.h>
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215084
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 02:45:45 +0000 (02:45 +0000)]
[Debug] ASSERT(!throwScope.exception()) on imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html
https://bugs.webkit.org/show_bug.cgi?id=170395
<rdar://problem/
31394017>
Patch by Youenn Fablet <youenn@apple.com> on 2017-04-06
Reviewed by Mark Lam.
* bindings/js/JSDOMPromise.cpp:
(WebCore::DeferredPromise::reject): Exiting early in case of scope having an exception.
Adding an assertion to ensure this is a worker termination exception.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215083
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 02:40:46 +0000 (02:40 +0000)]
Web Inspector: Source Map Resources should show up in the Debugger Sources list
https://bugs.webkit.org/show_bug.cgi?id=170581
<rdar://problem/
31269140>
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-06
Reviewed by Matt Baker.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
Include SourceMapResources in the DebuggerSidebar's Sources tree outline.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215082
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Fri, 7 Apr 2017 00:59:57 +0000 (00:59 +0000)]
Make FontWithFeatures test font pass OTS
https://bugs.webkit.org/show_bug.cgi?id=169788
Reviewed by Tim Horton.
Tools:
OTS, or the OpenType Sanitizer, is a check which tells if fonts are properly formed.
Previously, our FontWithFeatures test font did not pass this check. This patch updates
the font to pass the checks. Now, we can use this font on other platforms, and
contribute the font to the W3C for testing the CSS Fonts level 3 spec.
* FontWithFeatures/FontWithFeatures/FontCreator.cpp:
(Generator::appendCFFTable):
(Generator::Feature::operator<):
(Generator::appendGSUBTable):
(Generator::appendOS2Table):
(Generator::appendFormat4CMAPTable):
(Generator::appendHEADTable):
(Generator::appendHHEATable):
(Generator::NameRecord::operator<):
(Generator::appendNameSubtable):
(Generator::appendNAMETable):
LayoutTests:
Updated font to the one which passes the tests.
* css3/resources/FontWithFeatures.otf:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215081
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Fri, 7 Apr 2017 00:53:31 +0000 (00:53 +0000)]
Disable flaky WebKit2.ResizeWithHiddenContentDoesNotHang
for https://bugs.webkit.org/show_bug.cgi?id=170195
* TestWebKitAPI/Tests/WebKit2Cocoa/AnimatedResize.mm:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215080
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jiewen_tan@apple.com [Fri, 7 Apr 2017 00:47:51 +0000 (00:47 +0000)]
LayoutTest crypto/subtle/aes-ctr-encrypt-malformed-parameters.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170571
Unreviewed.
* crypto/subtle/aes-ctr-encrypt-malformed-parameters-expected.txt:
* crypto/subtle/aes-ctr-encrypt-malformed-parameters.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215079
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
joepeck@webkit.org [Fri, 7 Apr 2017 00:39:43 +0000 (00:39 +0000)]
Web Inspector: Hangs when loading under SpeculativeLoad::shouldCaptureExtraNetworkLoadMetrics
https://bugs.webkit.org/show_bug.cgi?id=170575
Rubber-stamped by Brian Burg.
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::shouldCaptureExtraNetworkLoadMetrics): Deleted.
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
m_networkLoad is a wrapper around `this` as the client, so we would infinite loop here.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215078
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Fri, 7 Apr 2017 00:39:24 +0000 (00:39 +0000)]
Inaudible background tabs should become eligible for memory kill after 8 minutes
https://bugs.webkit.org/show_bug.cgi?id=170574
<rdar://problem/
31488686>
Reviewed by Gavin Barraclough.
Lower the delay for potentially marking background tabs as inactive from 60 minutes to 8 minutes.
Letting a tab misbehave in the background for an entire hour was overly charitable.
* page/PerformanceMonitor.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215077
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 7 Apr 2017 00:39:22 +0000 (00:39 +0000)]
Unreviewed, rolling out r214973.
https://bugs.webkit.org/show_bug.cgi?id=170578
Causes issues in Safari (Requested by bradee-oh on #webkit).
Reverted changeset:
"Refactor so WebsiteDataStores always have a StorageManager."
https://bugs.webkit.org/show_bug.cgi?id=170521
http://trac.webkit.org/changeset/214973
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215076
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
wenson_hsieh@apple.com [Fri, 7 Apr 2017 00:38:42 +0000 (00:38 +0000)]
Scroll offset jumps after a programmatic scroll in an overflow container with scroll snapping
https://bugs.webkit.org/show_bug.cgi?id=170560
<rdar://problem/
31484693>
Reviewed by Tim Horton.
Source/WebCore:
Test: css3/scroll-snap/scroll-snap-programmatic-overflow-scroll.html
Logic for maintaining the scroll snap state in ScrollController was previously removed from iOS when refactoring
ScrollController. This was done because scroll snapping on iOS is driven not by the ScrollController (as it is
on Mac) but rather by sending scroll snap offsets to the UI process and hooking into UIScrollView delegates to
handle retargeted scrolling.
However, on iOS, this ScrollController state is still important for the purposes of keeping the last active
snap point index in sync with the UI process when the scroll offset changes outside of a user gesture (i.e.
programmatic scrolling). Since the UI process does not get a chance to update the active snap offset during a
programmatic scroll, our last active snap offset state was only being updated to the last snap position that the
user manually scrolled to, making programmatic scrolling jump to this offset.
To fix this, we need to update scroll snap state on iOS within ScrollController. Also adds a new Layout test
that exercises programmatic scrolling in an overflow scrolling container on all platforms.
* platform/cocoa/ScrollController.mm:
(WebCore::otherScrollEventAxis):
(WebCore::ScrollController::updateScrollSnapState):
(WebCore::ScrollController::updateScrollSnapPoints):
LayoutTests:
Add a test verifying that programmatically changing the scroll offset of an overflow container does not cause the
scroll offset to jump back to the last active snap position. See WebCore ChangeLog for more details.
* css3/scroll-snap/scroll-snap-programmatic-overflow-scroll-expected.txt: Added.
* css3/scroll-snap/scroll-snap-programmatic-overflow-scroll.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215075
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Fri, 7 Apr 2017 00:36:53 +0000 (00:36 +0000)]
Fix broken link.
* demos/webgpu/index.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215074
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Fri, 7 Apr 2017 00:26:53 +0000 (00:26 +0000)]
Rename allocateStack to allocateStackByGraphColoring.
Rubber stamped by Saam Barati.
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/air/AirAllocateStack.cpp: Removed.
* b3/air/AirAllocateStack.h: Removed.
* b3/air/AirAllocateStackByGraphColoring.cpp: Copied from Source/JavaScriptCore/b3/air/AirAllocateStack.cpp.
(JSC::B3::Air::allocateStackByGraphColoring):
(JSC::B3::Air::allocateStack): Deleted.
* b3/air/AirAllocateStackByGraphColoring.h: Copied from Source/JavaScriptCore/b3/air/AirAllocateStack.h.
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::prepareForGeneration):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215073
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
msaboff@apple.com [Fri, 7 Apr 2017 00:16:18 +0000 (00:16 +0000)]
Cannot Object.seal() or Object.freeze() global "this"
https://bugs.webkit.org/show_bug.cgi?id=170549
Reviewed by Mark Lam.
JSTests:
Enabled failing tests fixed by the corresponding code change:
ChakraCore/test/LetConst/delete.js
ChakraCore/test/LetConst/dop.js
ChakraCore/test/LetConst/dop1.js
* ChakraCore.yaml:
* ChakraCore/test/LetConst/dop.baseline-jsc: Added JSC specific expected output.
* ChakraCore/test/LetConst/dop1.baseline-jsc: Added JSC specific expected output.
Source/JavaScriptCore:
Needed to implement JSProxy::isExtensible() which returns the results of calling
the same on wrapped object.
Implemented step 11 of Runtime Semantics: EvalDeclarationInstantiation from the ECMAScript
spec to properly return a TypeError object when attempting to add properties to a
non-extensible global object.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* runtime/JSProxy.cpp:
(JSC::JSProxy::isExtensible):
* runtime/JSProxy.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215072
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Fri, 7 Apr 2017 00:11:16 +0000 (00:11 +0000)]
Linear scan should run liveness only once
https://bugs.webkit.org/show_bug.cgi?id=170569
Reviewed by Keith Miller.
Source/JavaScriptCore:
Air has a longstanding design bug that Tmps from different banks are indexed independently. This
means that all of our analyses over Tmps do separate GP and FP passes. This does have some
marginal benefits (the rest of the algorithm is specialized for Bank) but it's probably net bad.
However, I don't want to think about solving that general problem.
Instead, this just makes linear scan use a UnifiedTmpLiveness that uses a single "linear"
indexing for GP and FP. This lets me avoid the much larger refactoring (which would involve
substantial changes in graph coloring) while getting the bulk of the benefit (liveness runs once,
instead of twice, for linear scan).
This patch implements a lot of plumbing to make it possible for Liveness<> to view Tmps as having
a unified indexing scheme. Tmp calls this LinearlyIndexed (to match the naming convention of
AbsolutelyIndexed and Indexed), while AirLiveness calls this UnifiedTmpLiveness. With this
change, -O1 never does any liveness analysis that uses separate GP and FP passes. I think this
eliminates any urgency from the larger Tmp indexing bug. We can probably live with graph coloring
doing separate passes.
This is a ~6% speed-up for wasm -O1 compile times. I think this means that linear scan is no
longer the longest pole in the tent.
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3VariableLiveness.h:
(JSC::B3::VariableLivenessAdapter::prepareToCompute):
* b3/air/AirAllocateRegistersByLinearScan.cpp:
(JSC::B3::Air::allocateRegistersByLinearScan):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::forEachTmp):
* b3/air/AirLiveness.h:
* b3/air/AirLivenessAdapter.h:
(JSC::B3::Air::LivenessAdapter::Actions::Actions):
(JSC::B3::Air::LivenessAdapter::LivenessAdapter):
(JSC::B3::Air::LivenessAdapter::adapter):
(JSC::B3::Air::LivenessAdapter::prepareToCompute):
(JSC::B3::Air::LivenessAdapter::actionsAt):
(JSC::B3::Air::LivenessAdapter::forEachUse):
(JSC::B3::Air::LivenessAdapter::forEachDef):
(JSC::B3::Air::TmpLivenessAdapter::numIndices):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::UnifiedTmpLivenessAdapter):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::numIndices):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsBank):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsRole):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::valueToIndex):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::indexToValue):
* b3/air/AirLivenessConstraints.h: Removed.
* b3/air/AirRegLiveness.h:
(JSC::B3::Air::RegLiveness::LocalCalc::LocalCalc):
* b3/air/AirTmp.cpp:
* b3/air/AirTmp.h:
* b3/air/AirTmpInlines.h:
(JSC::B3::Air::Tmp::LinearlyIndexed::LinearlyIndexed):
(JSC::B3::Air::Tmp::LinearlyIndexed::index):
(JSC::B3::Air::Tmp::linearlyIndexed):
(JSC::B3::Air::Tmp::indexEnd):
(JSC::B3::Air::Tmp::absoluteIndexEnd):
(JSC::B3::Air::Tmp::linearIndexEnd):
(JSC::B3::Air::Tmp::tmpForAbsoluteIndex):
(JSC::B3::Air::Tmp::tmpForLinearIndex):
* b3/air/AirTmpMap.h: Added.
(JSC::B3::Air::TmpMap::TmpMap):
(JSC::B3::Air::TmpMap::resize):
(JSC::B3::Air::TmpMap::clear):
(JSC::B3::Air::TmpMap::operator[]):
(JSC::B3::Air::TmpMap::append):
Source/WTF:
Have Liveness<> call Adapter::prepareToCompute(), since this makes it a lot easier to implement
constraint generation, since the constraint generator now gets to run after the Adapter is fully
constructed.
* wtf/IndexMap.h:
(WTF::IndexMap::append): Also make this a bit more versatile.
* wtf/Liveness.h:
(WTF::Liveness::LocalCalc::Iterable::contains):
(WTF::Liveness::Iterable::contains):
(WTF::Liveness::compute):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215071
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Fri, 7 Apr 2017 00:04:10 +0000 (00:04 +0000)]
Throttle requestAnimationFrame in cross-origin iframes to 30fps
https://bugs.webkit.org/show_bug.cgi?id=170534
Reviewed by Dan Bates.
Source/WebCore:
Add a throttling reason to ScriptedAnimationController which is NonInteractedCrossOriginFrame,
set on cross-origin iframes whose documents have never seen a user interaction. It's cleared
as soon as an interaction on this frame or a child frame is detected.
Move the initialization of the LowPowerMode throttling reason to Document::requestAnimationFrame(),
since it's more appropriate to compute NonInteractedCrossOriginFrame here than down in ScriptedAnimationController,
and best to do both in the same place.
Tests: http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html
* dom/Document.cpp:
(WebCore::Document::requestAnimationFrame):
(WebCore::Document::updateLastHandledUserGestureTimestamp):
* dom/Document.h:
(WebCore::Document::hasHadUserInteraction):
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::throttlingReasonToString):
(WebCore::ScriptedAnimationController::interval):
* dom/ScriptedAnimationController.h:
* loader/FrameLoader.cpp:
(WebCore::shouldAskForNavigationConfirmation):
LayoutTests:
* http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt: Added.
* http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html: Added.
* http/tests/frame-throttling/resources/requestAnimationFrame-frame.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215070
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Fri, 7 Apr 2017 00:01:29 +0000 (00:01 +0000)]
Use the Accelerate framework to optimize FEColorMatrix operations
https://bugs.webkit.org/show_bug.cgi?id=170518
Reviewed by Tim Horton.
On macOS and iOS, we can use the Accelerate framework (vImage) to do color matrix
math to optimize color matrix, hue rotate, saturation and luminosity to alpha filters.
Change ImageBuffer::getUnmultipliedImageData() and getPremultipliedImageData() to
return the size of the returned Uint8ClampedArray in physical pixels, because we
need to pass that to vImage.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::getImageData):
* platform/graphics/ImageBuffer.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
* platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::effectApplyAccelerated):
(WebCore::effectType):
(WebCore::FEColorMatrix::platformApplySoftware):
* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::platformApplySoftware):
* platform/graphics/win/ImageBufferDirect2D.cpp:
(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215069
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Fri, 7 Apr 2017 00:01:25 +0000 (00:01 +0000)]
Do some minor FEColorMatrix code cleanup and optimization
https://bugs.webkit.org/show_bug.cgi?id=170474
Reviewed by Dean Jackson.
Don't switch inside of a pixel processing loop; repeat the loop inside switch (filterType).
Change matrix() and saturateAndHueRotate() to dereference the source pixels once, instead
of multiple times, which is faster.
This kind of code benefits from aligning things with spaces for readability, so do so,
violating webkit style.
Add some off-by-default performance logging code.
Increases pixel processing performance from about 86ms per megapixel to 65ms per megapixel.
* platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::matrix):
(WebCore::saturateAndHueRotate):
(WebCore::effectType):
(WebCore::FEColorMatrix::platformApplySoftware):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215068
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 6 Apr 2017 23:24:44 +0000 (23:24 +0000)]
Unreviewed, rolling out r215041.
The LayoutTest for this change is failing on ios-simulator.
Reverted changeset:
"Rendering flexbox children across columns"
https://bugs.webkit.org/show_bug.cgi?id=164166
http://trac.webkit.org/changeset/215041
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215067
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 6 Apr 2017 23:11:45 +0000 (23:11 +0000)]
Unreviewed, rolling out r215046.
This change broke internal builds.
Reverted changeset:
"WebRTC tests gardening"
https://bugs.webkit.org/show_bug.cgi?id=170508
http://trac.webkit.org/changeset/215046
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215066
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 22:58:08 +0000 (22:58 +0000)]
Web Inspector: Only Capture Extra Network Load Metrics when there is a Web Inspector Frontend
https://bugs.webkit.org/show_bug.cgi?id=170525
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-06
Reviewed by Youenn Fablet.
Source/WebCore:
Covered by existing tests that when Web Inspector is open we enable collecting the extra data.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::firstFrontendCreated):
(WebCore::InspectorInstrumentation::lastFrontendDeleted):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::frontendCreated):
(WebCore::InspectorInstrumentation::frontendDeleted):
When the first frontend is created enable a new loader strategy to
collect extra network load metrics. When the last frontend is closed
disable the extra metrics.
* loader/LoaderStrategy.h:
* platform/PlatformStrategies.h:
New load strategy to enable/disable new metrics.
Source/WebKit:
* WebCoreSupport/WebResourceLoadScheduler.h:
Source/WebKit2:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Only collect extra metrics if the WebProcess this load is for has enabled
collecting extra metrics.
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::setCaptureExtraNetworkLoadMetricsEnabled):
* WebProcess/Network/WebLoaderStrategy.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled):
* NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::captureExtraNetworkLoadMetricsEnabled):
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
New bool state toggled through the loader policy.
* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::shouldCaptureExtraNetworkLoadMetrics):
* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTaskClient::shouldCaptureExtraNetworkLoadMetrics):
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::shouldCaptureExtraNetworkLoadMetrics):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadClient.h:
(WebKit::NetworkLoadClient::shouldCaptureExtraNetworkLoadMetrics):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::shouldCaptureExtraNetworkLoadMetrics):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::shouldCaptureExtraNetworkLoadMetrics):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
Default handling for network loads is to not include extra data. Thread
client messages back from the NetworkLoads / SpeculativeLoads to check
the NetworkConnectionToWebProcess state on whether or not we should collect
extra metrics.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215065
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 6 Apr 2017 22:39:15 +0000 (22:39 +0000)]
Skip a test that was accidentally enabled with r214982.
Unreviewed test gardening.
* platform/ios/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215064
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy_horton@apple.com [Thu, 6 Apr 2017 22:38:04 +0000 (22:38 +0000)]
Obj-C bindings build fails with CSS_DEVICE_ADAPTATION turned on
https://bugs.webkit.org/show_bug.cgi?id=170566
Reviewed by Simon Fraser.
* DOM/DOMCSS.mm:
(kitClass):
Use the WebCore-side enum for this, since that's actually what we're switching over.
This allows us to handle values here without adding them to the API header.
All of the other kitClass() functions work the same way.
Also, unindent for style purposes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215063
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
joepeck@webkit.org [Thu, 6 Apr 2017 22:02:04 +0000 (22:02 +0000)]
Web Inspector: Show all headers in the Request Headers section of the Resource details sidebar
https://bugs.webkit.org/show_bug.cgi?id=16531
<rdar://problem/5712895>
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
* inspector/protocol/Network.json:
Optional refined list of request headers in Metrics.
Source/WebCore:
Test: http/tests/inspector/network/resource-request-headers.html
* loader/ResourceTiming.cpp:
(WebCore::ResourceTiming::ResourceTiming):
Eliminate unnecessary data from the NetworkLoadTiming object
when it is used for ResourceTiming. This clears up some memory
that will otherwise never be used.
* platform/network/NetworkLoadMetrics.h:
(WebCore::NetworkLoadMetrics::isolatedCopy):
(WebCore::NetworkLoadMetrics::reset):
(WebCore::NetworkLoadMetrics::clearNonTimingData):
(WebCore::NetworkLoadMetrics::operator==):
(WebCore::NetworkLoadMetrics::encode):
(WebCore::NetworkLoadMetrics::decode):
Include an optional HTTPHeaderMap for a refined list of
request headers for this network load.
* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildObjectForMetrics):
Include request headers with other optional metrics data
when the load is completed.
Source/WebInspectorUI:
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.updateWithMetrics):
Update request headers if provided in metrics.
Source/WebKit2:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Include a complete list of the request headers sent for this load.
There may be headers that WebCore did not know about and developer
tools should be informed of.
LayoutTests:
* http/tests/inspector/network/resource-request-headers-expected.txt: Added.
* http/tests/inspector/network/resource-request-headers.html: Added.
* http/tests/inspector/network/resources/basic-auth.php: Added.
Test coverage for Cookie and Basic Authentication headers.
* platform/mac/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
Mark the test as expected to fail on WebKit1 CFNetwork based platforms,
and ElCapitan which uses the legacy non-NSURLSession loading path.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215062
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Thu, 6 Apr 2017 21:56:59 +0000 (21:56 +0000)]
Each build request should be associated with a repository group
https://bugs.webkit.org/show_bug.cgi?id=170528
Rubber-stamped by Chris Dumez.
Make the buildbot syncing script use the concept of repository groups so that each repository group can post
a different set of properties to buildbot. In order to do this, we associate each build request with
a repository group to use. Each triggerable's repository groups is now updated by the syncing scripts via
/api/update-triggerable just the same way the set of the supported platform, test pairs are updated.
Each repository group specifies the list of repositories, a dictionary that maps the buildbot property name
to either a string value or a repository name enclosed in < and >:
```js
"repositoryGroups": {
"webkit-svn": {
"repositories": ["WebKit", "macOS"],
"properties": {"os": "<macOS>", "wk": "<WebKit>"}
}
}
```
With this, removed the support for specifying a repository to use in generic dictionary of properties via
a dictionary with a single key of "root", "rootOptions", and "rootsExcluding". We now validate that the list of
repositories in each repository group matches exactly the ones used in buildbot properties as well as ones in
build requests.
After this patch, sync-with-buildbot.js will no longer schedule a build request without a repository group.
Run the appropriate database queries to set the repository group on each build request. Because of this change,
this patch also makes BuildbotTriggerable.prototype.syncOnce more robust against invalid build requests.
Instead of throwing an exception and exiting early, it simply skips all build requests that belong to the same
test group if the next build request to be scheduled does not specify a repository group.
* init-database.sql: Add request_repository_group column to build_requests table, and a unique constraint for
repository and group pair in triggerable_repositories table.
* public/api/update-triggerable.php:
(main): Validate and insert repository groups.
(validate_configurations): Extracted from main.
(validate_repository_groups): Added.
* public/v3/models/repository.js:
(Repository.findTopLevelByName): Added.
* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::results_internal): Include the repository group of each request in the JSON response.
* public/include/repository-group-finder.php: Added. A helper class to find the repository group for a given
triggerable for a list of repositories.
(RepositoryGroupFinder): Added.
(RepositoryGroupFinder::__construct): Added.
(RepositoryGroupFinder::find_by_repositories): Added.
(RepositoryGroupFinder::populate_map): Added.
* public/privileged-api/create-test-group.php:
(main): Each element in an array returned by ensure_commit_sets and commit_sets_from_revision_sets now contains
"set", the list of commit IDs, and "repository_group", the repository group identified for each commit set.
Use that to set the repository group in each new build request.
(commit_sets_from_revision_sets): Use RepositoryGroupFinder to find the right repository group.
(ensure_commit_sets): Ditto. There is no need to find a repository group for each commit set here since its
argument is keyed by the repository name. e.g. {"WebKit": [123, 456], "macOS": ["16A323", "16A323"]}
* public/v3/models/build-request.js:
(BuildRequest):
(BuildRequest.prototype.triggerable): Added.
(BuildRequest.prototype.repositoryGroup): Added.
(BuildRequest.constructBuildRequestsFromData): Resolve the triggerable and the repository group.
* public/v3/models/triggerable.js:
(Triggerable.prototype.name): Added.
(Triggerable.prototype.acceptedRepositories): Deleted.
(TriggerableRepositoryGroup):
(TriggerableRepositoryGroup.prototype.accepts): Added. Retruns true if the repository group
* server-tests/api-build-requests-tests.js: Added a test for getting the repository group of a build request.
* server-tests/api-manifest-tests.js: Added assertions for the repository groups.
* server-tests/api-report-tests.js:
(.emptyReport):
(.reportWithTwoLevelsOfAggregations):
* server-tests/api-update-triggerable.js: Added test cases for updating the repository groups associated with
a triggerable.
(.updateWithOSXRepositoryGroup):
(.mapRepositoriesByGroup):
* server-tests/privileged-api-create-test-group-tests.js:
(addTriggerableAndCreateTask): Add two repository groups for testing. Added assertions for repository groups
in existing test cases, and added a test case for creating a test group with two different repository groups.
* server-tests/resources/mock-data.js:
(MockData.resetV3Models): Reset TriggerableRepositoryGroup's static maps.
(MockData.emptyTriggeragbleId): Added.
(MockData.macosRepositoryId): Added.
(MockData.webkitRepositoryId): Added.
(MockData.gitWebkitRepositoryId): Added.
(MockData.addMockData): Create repository groups as needed. Renamed the "OS X" repository to "macOS" since some
tests were using the latter, and now we need mock data to be consistent across tests due to stricter checks.
(MockData.addEmptyTriggerable): Added. Used in api-update-triggerable.js.
(MockData.addMockTestGroupWithGitWebKit): Added. Used in api-build-requests-tests.js.
(MockData.addAnotherMockTestGroup): Cleanup.
(MockData.mockTestSyncConfigWithSingleBuilder): Updated the mock configuration per code changes.
(MockData.mockTestSyncConfigWithTwoBuilders): Ditto.
* server-tests/tools-buildbot-triggerable-tests.js: Updated a test case testing /api/update-triggerable to test
updating the set of repository groups in addition to the set of test, platform pairs.
(.refetchManifest): Added.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer): Now takes a set of configurations shared across syncers: repositoryGroups, slaveArgument,
and buildRequestArgument as the third argument.
(BuildbotSyncer.prototype.repositoryGroups): Added.
(BuildbotSyncer.prototype._testGroupMapForBuildRequests): Cleaned up the code to use Array.prototype.find.
Also added an assertion that the build request is associated with a repository group.
(BuildbotSyncer.prototype._propertiesForBuildRequest): Removed the support for using an arbitary property to
specify a revision in favor of explicity listing each property and repository name in a repository group.
(BuildbotSyncer._loadConfig): Removed the support for "shared", which specified the set of buildbot properties
shared across syncers, the name of properties which specifies the build slave name and build request ID. These
values are not stored as top-level properties and superseded by the concept of repository groups.
(BuildbotSyncer._parseRepositoryGroup): Parses and validates repository groups.
(BuildbotSyncer._createTestConfiguration): We no longer expect each configuration to specify a dictionary of
properties or buildRequestArgument (often inherited from shared).
(BuildbotSyncer._validateAndMergeConfig): Removed "slaveArgument" and "buildRequestArgument" from the list of
allowed proeprties in each configuration now that they're specified as top-level properties.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.updateTriggerable): Update the associated repository groups.
(BuildbotTriggerable.prototype.syncOnce): Skip test groups for which the next build request to be scheduled is
not included in the list of valid build requests.
(BuildbotTriggerable.prototype._validateRequests): Now returns the list of valid build requests, which excludes
those that lack a repository group set.
(BuildbotTriggerable.prototype._nextRequestInGroup): Extracted from _scheduleRequestIfSlaveIsAvailable. Finds
the next build request to be scheduled for the test group.
(BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Renamed from
_scheduleNextRequestInGroupIfSlaveIsAvailable. Now takes the syncer and the slave name as arguments instead of
a test group information since syncOnce now calls _nextRequestInGroup to find the next build request.
* tools/js/v3-models.js:
* unit-tests/build-request-tests.js: Fixed the test name.
* unit-tests/buildbot-syncer-tests.js: Removed tests for "rootOptions" and "rootsExcluding", and added tests
for parsing repository groups.
(sampleiOSConfig): Updated the mock configuration per code changes.
(sampleiOSConfigWithExpansions): Ditto.
(smallConfiguration): Ditto. Now returns the entire configuration instead of a single builder configuration.
Various test cases have been updated to reflect this.
(createSampleBuildRequest): Removed the git hash of WebKit to match the repository groups listed in the mock
configurations. The git hash was there to test "rootOptions", which this patch removed.
(samplePendingBuild): Removed "root_dict" from the list of properties. This was used to test "rootsExcluding"
which, again, this patch removed.
(sampleInProgressBuild): Ditto.
(sampleFinishedBuild): Ditto.
* unit-tests/resources/mock-v3-models.js:
(MockModels.inject): Added ock repository groups so that existing tests will continue to function.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215061
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Thu, 6 Apr 2017 21:35:09 +0000 (21:35 +0000)]
OptionSet options need to be powers of two
https://bugs.webkit.org/show_bug.cgi?id=170565
Reviewed by Chris Dumez.
Change Cache::Option to be powers of two.
* NetworkProcess/cache/NetworkCache.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215060
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy_horton@apple.com [Thu, 6 Apr 2017 21:12:25 +0000 (21:12 +0000)]
Follow up to r209304, remove line numbers from one more StyleRule construction
https://bugs.webkit.org/show_bug.cgi?id=170564
Reviewed by Simon Fraser.
* css/StyleRule.cpp:
(WebCore::StyleRuleViewport::StyleRuleViewport):
This one was missed in r209304.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215059
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy_horton@apple.com [Thu, 6 Apr 2017 21:11:35 +0000 (21:11 +0000)]
Remove an unused member and constructor parameter from CSSPropertyParser
https://bugs.webkit.org/show_bug.cgi?id=170562
Reviewed by Simon Fraser.
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseSingleValue):
(WebCore::CSSParser::parseValueWithVariableReferences):
* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeDeclarationValue):
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::CSSPropertyParser):
(WebCore::CSSPropertyParser::parseValue):
(WebCore::CSSPropertyParser::parseSingleValue):
* css/parser/CSSPropertyParser.h:
It is possible to get Clang to complain about the unused member, though
I'm not sure why it doesn't in the build today.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215058
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Thu, 6 Apr 2017 20:58:34 +0000 (20:58 +0000)]
B3 -O1 should generate better code than -O0
https://bugs.webkit.org/show_bug.cgi?id=170563
Reviewed by Michael Saboff.
Prior to this change, code generated by -O1 ran slower than code generated by -O0. This turned
out to be because of reduceStrength optimizations that increase live ranges and create register
pressure, which then creates problems for linear scan.
It seemed obvious that canonicalizations that help isel, constant folding, and one-for-one
strength reductions should stay. It also seemed obvious that SSA and CFG simplification are fast
and harmless. So, I focused on removing:
- CSE, which increases live ranges. This is a risky optimization when we know that we've chosen
to use a bad register allocator.
- Sophisticated strength reductions that create more code, like the insane division optimization.
- Anything that inserts basic blocks.
CSE appeared to be the cause of half of the throughput regression of -O1 but none of the compile
time. This change also reduces the running time of reduceStrength by making it not a fixpoint at
optLevel<2.
This makes wasm -O1 compile 17% faster. This makes wasm -O1 run 19% faster. This makes -O1 code
run 3% faster than -O0, and compile about 4% slower than -O0. We may yet end up choosing to use
-O0, but at least now -O1 isn't totally useless.
* b3/B3ReduceStrength.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215057
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 20:38:38 +0000 (20:38 +0000)]
LayoutTest fast/mediastream/getUserMedia-webaudio.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=167513
Patch by Youenn Fablet <youenn@apple.com> on 2017-04-06
Reviewed by Eric Carlson.
* fast/mediastream/getUserMedia-webaudio.html: Removing unecessary flaky check.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215056
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Thu, 6 Apr 2017 20:18:52 +0000 (20:18 +0000)]
Kill any WebContent process using over 16 GB of memory.
https://bugs.webkit.org/show_bug.cgi?id=170515
<rdar://problem/
29930931>
Reviewed by Antti Koivisto.
Restructure the code since it was getting out of sync with the intended behavior.
Now there's a thresholdForMemoryKill() which returns the current memory limit based
on the process status.
The memory usage policy is separated from the killing, and now only drives the
asynchronous invocations of pressure relief that occur when we pass over one of
the policy edges (now 1GB for Conservative, 2GB for Strict.)
Removed the "Panic" policy and moved the memory kill logic to shrinkOrDie().
Behavior as of this patch:
- Everyone gets killed over 16 GB.
- Inactive processes get killed over 4 GB.
- Strict memory usage policy kicks in at 2 GB.
- Conservative memory usage policy at 1 GB.
Like before, we make a best-effort attempt to free up memory before killing the process.
* wtf/MemoryPressureHandler.cpp:
(WTF::toString):
(WTF::MemoryPressureHandler::thresholdForMemoryKill):
(WTF::thresholdForPolicy):
(WTF::policyForFootprint):
(WTF::MemoryPressureHandler::shrinkOrDie):
(WTF::MemoryPressureHandler::setMemoryUsagePolicyBasedOnFootprint):
(WTF::MemoryPressureHandler::measurementTimerFired):
* wtf/MemoryPressureHandler.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215055
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Thu, 6 Apr 2017 20:03:55 +0000 (20:03 +0000)]
Simple line layout: Hittest always returns the first renderer in the block.
https://bugs.webkit.org/show_bug.cgi?id=170520
<rdar://problem/
30979175>
Reviewed by Antti Koivisto.
Source/WebCore:
This is incorrect now with <br> support (multiple renderers within the same block flow).
Test: fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point.html
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForPoint): Related fix. We don't yet support positionForPoint with multiple renderes.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::segmentForRun): Empty runs are all valid.
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::hitTestFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): This should eventually return a list of renderes.
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::flowContents):
LayoutTests:
* fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point-expected.html: Added.
* fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215054
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jond@apple.com [Thu, 6 Apr 2017 19:51:25 +0000 (19:51 +0000)]
Updates feature status for recently shipped features
https://bugs.webkit.org/show_bug.cgi?id=170359
Reviewed by Brian Burg.
Source/JavaScriptCore:
Changed "Done" status to "Supported".
* features.json:
Source/WebCore:
Added missing Gamepad entry.
Changed "Done" status to "Supported".
Also changed status from "In Development" to "Supported" for:
- CSS Grid Layout Level 1
- CSS Inline Layout Module Level 3
- CSS Scroll Snap Points Module Level 1
- CSS Color Level 4
- Fetch API
- Indexed Database 2.0
- Media Capture and Streams
- Pointer Lock
- Preload
- Input Events
* features.json:
Websites/webkit.org:
Added styles for "Supported" status.
* wp-content/themes/webkit/status.php:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215053
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jiewen_tan@apple.com [Thu, 6 Apr 2017 18:56:33 +0000 (18:56 +0000)]
[WebCrypto] Add support for AES-CTR
https://bugs.webkit.org/show_bug.cgi?id=169761
<rdar://problem/
31331321>
Reviewed by Brent Fulgham.
LayoutTests/imported/w3c:
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2-expected.txt:
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt:
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-ctr-expected.txt:
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CTR-expected.txt:
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CTR-expected.txt:
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt:
Source/WebCore:
This patch adds support for AES-CTR. Operations of AES-CTR include: encrypt, decrypt, generateKey,
importKey, exportKey, wrapKey, and unwrapKey. This implementation follows the latest WebCryptoAPI
spec: https://www.w3.org/TR/WebCryptoAPI/#aes-ctr.
Tests: crypto/subtle/aes-ctr-encrypt-malformed-parameters.html
crypto/subtle/aes-ctr-encrypt-overflow.html
crypto/subtle/aes-ctr-generate-export-key-jwk-length-128.html
crypto/subtle/aes-ctr-generate-export-key-jwk-length-192.html
crypto/subtle/aes-ctr-generate-export-key-jwk-length-256.html
crypto/subtle/aes-ctr-generate-export-raw-key.html
crypto/subtle/aes-ctr-generate-key-encrypt-decrypt.html
crypto/subtle/aes-ctr-generate-key.html
crypto/subtle/aes-ctr-import-jwk-key-length-128.html
crypto/subtle/aes-ctr-import-jwk-key-length-192.html
crypto/subtle/aes-ctr-import-jwk-key-length-256.html
crypto/subtle/aes-ctr-import-key-decrypt.html
crypto/subtle/aes-ctr-import-key-encrypt.html
crypto/subtle/aes-ctr-import-key-unwrap-jwk-key.html
crypto/subtle/aes-ctr-import-key-unwrap-raw-key.html
crypto/subtle/aes-ctr-import-key-wrap-jwk-key.html
crypto/subtle/aes-ctr-import-key-wrap-raw-key.html
crypto/subtle/aes-ctr-import-raw-key.html
crypto/workers/subtle/aes-ctr-import-key-decrypt.html
crypto/workers/subtle/aes-ctr-import-key-encrypt.html
crypto/workers/subtle/aes-ctr-import-key-unwrap-key.html
crypto/workers/subtle/aes-ctr-import-key-wrap-key.html
* CMakeLists.txt:
* DerivedSources.make:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::normalizeCryptoAlgorithmParameters):
* crypto/CryptoAlgorithmParameters.h:
* crypto/algorithms/CryptoAlgorithmAES_CTR.cpp: Added.
(WebCore::usagesAreInvalidForCryptoAlgorithmAES_CTR):
(WebCore::parametersAreValid):
(WebCore::CryptoAlgorithmAES_CTR::create):
(WebCore::CryptoAlgorithmAES_CTR::identifier):
(WebCore::CryptoAlgorithmAES_CTR::encrypt):
(WebCore::CryptoAlgorithmAES_CTR::decrypt):
(WebCore::CryptoAlgorithmAES_CTR::generateKey):
(WebCore::CryptoAlgorithmAES_CTR::importKey):
(WebCore::CryptoAlgorithmAES_CTR::exportKey):
(WebCore::CryptoAlgorithmAES_CTR::getKeyLength):
* crypto/algorithms/CryptoAlgorithmAES_CTR.h: Added.
* crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp: Added.
(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):
* crypto/mac/CryptoAlgorithmAES_CTRMac.cpp: Added.
(WebCore::bigIntegerToSize):
(WebCore::transformAES_CTR):
(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
* crypto/parameters/AesCtrParams.idl: Added.
* crypto/parameters/CryptoAlgorithmAesCtrParams.h: Added.
LayoutTests:
* crypto/subtle/aes-ctr-encrypt-malformed-parameters-expected.txt: Added.
* crypto/subtle/aes-ctr-encrypt-malformed-parameters.html: Added.
* crypto/subtle/aes-ctr-generate-export-key-jwk-length-128-expected.txt: Added.
* crypto/subtle/aes-ctr-generate-export-key-jwk-length-128.html: Added.
* crypto/subtle/aes-ctr-generate-export-key-jwk-length-192-expected.txt: Added.
* crypto/subtle/aes-ctr-generate-export-key-jwk-length-192.html: Added.
* crypto/subtle/aes-ctr-generate-export-key-jwk-length-256-expected.txt: Added.
* crypto/subtle/aes-ctr-generate-export-key-jwk-length-256.html: Added.
* crypto/subtle/aes-ctr-generate-export-raw-key-expected.txt: Added.
* crypto/subtle/aes-ctr-generate-export-raw-key.html: Added.
* crypto/subtle/aes-ctr-generate-key-encrypt-decrypt-expected.txt: Added.
* crypto/subtle/aes-ctr-generate-key-encrypt-decrypt.html: Added.
* crypto/subtle/aes-ctr-generate-key-expected.txt: Added.
* crypto/subtle/aes-ctr-generate-key.html: Added.
* crypto/subtle/aes-ctr-import-jwk-key-length-128-expected.txt: Added.
* crypto/subtle/aes-ctr-import-jwk-key-length-128.html: Added.
* crypto/subtle/aes-ctr-import-jwk-key-length-192-expected.txt: Added.
* crypto/subtle/aes-ctr-import-jwk-key-length-192.html: Added.
* crypto/subtle/aes-ctr-import-jwk-key-length-256-expected.txt: Added.
* crypto/subtle/aes-ctr-import-jwk-key-length-256.html: Added.
* crypto/subtle/aes-ctr-import-key-decrypt-expected.txt: Added.
* crypto/subtle/aes-ctr-import-key-decrypt.html: Added.
* crypto/subtle/aes-ctr-import-key-encrypt-expected.txt: Added.
* crypto/subtle/aes-ctr-import-key-encrypt.html: Added.
* crypto/subtle/aes-ctr-import-key-unwrap-jwk-key-expected.txt: Added.
* crypto/subtle/aes-ctr-import-key-unwrap-jwk-key.html: Added.
* crypto/subtle/aes-ctr-import-key-unwrap-raw-key-expected.txt: Added.
* crypto/subtle/aes-ctr-import-key-unwrap-raw-key.html: Added.
* crypto/subtle/aes-ctr-import-key-wrap-jwk-key-expected.txt: Added.
* crypto/subtle/aes-ctr-import-key-wrap-jwk-key.html: Added.
* crypto/subtle/aes-ctr-import-key-wrap-raw-key-expected.txt: Added.
* crypto/subtle/aes-ctr-import-key-wrap-raw-key.html: Added.
* crypto/subtle/aes-ctr-import-raw-key-expected.txt: Added.
* crypto/subtle/aes-ctr-import-raw-key.html: Added.
* crypto/subtle/aes-generate-key-malformed-parameters-expected.txt:
* crypto/subtle/aes-generate-key-malformed-parameters.html:
* crypto/subtle/aes-import-key-malformed-parameters-expected.txt:
* crypto/subtle/aes-import-key-malformed-parameters.html:
* crypto/workers/subtle/aes-ctr-import-key-decrypt-expected.txt: Added.
* crypto/workers/subtle/aes-ctr-import-key-decrypt.html: Added.
* crypto/workers/subtle/aes-ctr-import-key-encrypt-expected.txt: Added.
* crypto/workers/subtle/aes-ctr-import-key-encrypt.html: Added.
* crypto/workers/subtle/aes-ctr-import-key-unwrap-key-expected.txt: Added.
* crypto/workers/subtle/aes-ctr-import-key-unwrap-key.html: Added.
* crypto/workers/subtle/aes-ctr-import-key-wrap-key-expected.txt: Added.
* crypto/workers/subtle/aes-ctr-import-key-wrap-key.html: Added.
* crypto/workers/subtle/resources/aes-ctr-import-key-decrypt.js: Added.
* crypto/workers/subtle/resources/aes-ctr-import-key-encrypt.js: Added.
* crypto/workers/subtle/resources/aes-ctr-import-key-unwrap-key.js: Added.
* crypto/workers/subtle/resources/aes-ctr-import-key-wrap-key.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215051
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 6 Apr 2017 18:53:25 +0000 (18:53 +0000)]
Mark inspector/codemirror/prettyprinting-css-rules.html as flaky on release.
https://bugs.webkit.org/show_bug.cgi?id=153460
Unreviewed test gardening.
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215050
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 18:53:17 +0000 (18:53 +0000)]
WebRTC aborts when trying to sleep on a wrong thread
https://bugs.webkit.org/show_bug.cgi?id=170492
<rdar://problem/
31446377>
Patch by Youenn Fablet <youenn@apple.com> on 2017-04-06
Reviewed by Eric Carlson.
Libwebrtc network thread is set up so that it does not accept blocking calls to other threads.
as per ChannelManager::Init() in channelmanager.cc.
But rtc::Thread::SleepMs expects to block it.
Marking thread as blockable before calling SleepMs and resetting the value if needed afterwards.
* Source/webrtc/media/sctp/sctptransport.cc:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215049
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mattbaker@apple.com [Thu, 6 Apr 2017 18:50:05 +0000 (18:50 +0000)]
Web Inspector: Reorder Debugger tab sidebar panels: Scope Chain, Resource, Probes
https://bugs.webkit.org/show_bug.cgi?id=170418
<rdar://problem/
31410771>
Reviewed by Timothy Hatcher.
Maintain the sidebar panel order defined by TabContentView when adding
and removing panels.
* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView.prototype.showDetailsSidebarPanels):
Insert sidebar panel based on the panel order defined by TabContentView.
* UserInterface/Views/DebuggerTabContentView.js:
(WebInspector.DebuggerTabContentView):
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.addSidebarPanel):
Implemented as an insert at the end.
(WebInspector.Sidebar.prototype.insertSidebarPanel):
Allow inserting into the sidebar panel collection.
(WebInspector.Sidebar.prototype.removeSidebarPanel):
Remove unused return value.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215047
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 18:48:11 +0000 (18:48 +0000)]
WebRTC tests gardening
https://bugs.webkit.org/show_bug.cgi?id=170508
Patch by Youenn Fablet <youenn@apple.com> on 2017-04-06
Reviewed by Eric Carlson.
Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:
Source/WebCore:
* Configurations/FeatureDefines.xcconfig: Changing webrtc enabling for ios.
Source/WebCore/PAL:
* Configurations/FeatureDefines.xcconfig:
Source/WebKit/mac:
* Configurations/FeatureDefines.xcconfig:
Source/WebKit2:
* Configurations/FeatureDefines.xcconfig:
Tools:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
LayoutTests:
* platform/ios-wk1/TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/ios/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215046
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Thu, 6 Apr 2017 18:35:47 +0000 (18:35 +0000)]
Stop forcing CA commit when memory pressure changes.
https://bugs.webkit.org/show_bug.cgi?id=170522
<rdar://problem/
31460236>
Reviewed by Antti Koivisto.
Don't force a CA commit when reaching critical memory pressure. We're already doing a ton
of work in response to the pressure, and this was really a hack to try to react quickly on
512 MB devices which we don't support anymore.
* page/MemoryRelease.cpp:
(WebCore::releaseCriticalMemory):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215045
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Thu, 6 Apr 2017 18:32:47 +0000 (18:32 +0000)]
Implement testing mode for disk cache
https://bugs.webkit.org/show_bug.cgi?id=170547
Reviewed by Andreas Kling.
Source/WebKit2:
Disable read timeouts and cache shrinking in TestRunner to eliminate potential sources of randomness.
Cache directories are deleted by TestRunner so lack of shrinking does not consume the disk.
This is enabled by the existing WKContextUseTestingNetworkSession SPI.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::initialize):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::open):
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
LayoutTests:
Enable a few disabled tests to see how it goes.
* platform/mac-wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215044
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 17:25:10 +0000 (17:25 +0000)]
[Readable Streams API] Implement ReadableStreamBYOBRequest respondWithNewView()
https://bugs.webkit.org/show_bug.cgi?id=170339
Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-04-06
Reviewed by Youenn Fablet.
Source/WebCore:
Implemented ReadableStreamBYOBRequest respondWithNewView().
Added new tests to check respondWithNewView() behaviour.
* Modules/streams/ReadableByteStreamInternals.js:
(readableByteStreamControllerRespondWithNewView): Added.
* Modules/streams/ReadableStreamBYOBRequest.js:
(respondWithNewView): Updated.
LayoutTests:
Added new tests addressing respondWithNewView() behaviour.
* streams/readable-stream-byob-request-expected.txt: Updated.
* streams/readable-stream-byob-request.js: Added new tests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215043
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Thu, 6 Apr 2017 17:20:28 +0000 (17:20 +0000)]
[MediaStream] Host application should be able to mute and unmute media streams
https://bugs.webkit.org/show_bug.cgi?id=170519
<rdar://problem/
31174326>
Unreviewed, fix crash introduced in r214980.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream): NULL-check page.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215042
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 6 Apr 2017 16:44:22 +0000 (16:44 +0000)]
Rendering flexbox children across columns
https://bugs.webkit.org/show_bug.cgi?id=164166
<rdar://problem/
29055587>
Reviewed by Zalan Bujtas.
Source/WebCore:
Added fast/multicol/flexbox-rows.html.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustForUnsplittableChild):
Treat block-level flexboxes that occur inside block flows the same as replaced
and unsplittable elements and push them to the next page if they don't fit. We don't
update the minimum page height though, since the flexbox is not really unsplittable.
LayoutTests:
* fast/multicol/flexbox-rows-expected.html: Added.
* fast/multicol/flexbox-rows.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215041
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Thu, 6 Apr 2017 16:39:39 +0000 (16:39 +0000)]
[WK2] Add C private API to toggle invisibleAutoplayNotPermitted setting
https://bugs.webkit.org/show_bug.cgi?id=170524
<rdar://problem/
31461472>
Reviewed by Eric Carlson.
Add C private API to toggle invisibleAutoplayNotPermitted setting.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetInvisibleMediaAutoplayPermitted):
(WKPreferencesGetInvisibleMediaAutoplayPermitted):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215040
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jbedard@apple.com [Thu, 6 Apr 2017 15:58:28 +0000 (15:58 +0000)]
REGRESSION: Simulators failing to install after launch_app times out
<rdar://problem/
31478107>
Unreviewed infrastructure fix.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.launch_app._install_timeout): Raise RuntimeError, not Exception.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215039
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 15:23:53 +0000 (15:23 +0000)]
[JSC][MIPS][DFG] Use x86 generic HasOwnProperty
https://bugs.webkit.org/show_bug.cgi?id=170222
Patch by Guillaume Emont <guijemont@igalia.com> on 2017-04-06
Reviewed by Yusuke Suzuki.
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
use the X86 special version for HasOwnProperty on MIPS too.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
use the X86 special version for HasOwnProperty on MIPS too.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215038
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 09:58:18 +0000 (09:58 +0000)]
[GTK] Fix build with MEDIA_CAPTURE enabled
https://bugs.webkit.org/show_bug.cgi?id=170539
Patch by Adrian Perez de Castro <aperez@igalia.com> on 2017-04-06
Reviewed by Carlos Garcia Campos.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
(webkit_dom_html_input_element_get_capture): Add missing namespace in usage of WebCore::MediaCaptureTypeNone.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215009
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
nael.ouedraogo@crf.canon.fr [Thu, 6 Apr 2017 08:24:30 +0000 (08:24 +0000)]
[GTK] Build fails when using icecream, ccache and cmake 3.6
https://bugs.webkit.org/show_bug.cgi?id=170498
Reviewed by Michael Catanzaro.
Disable ninja response file when using icecream, ccache and cmake > 3.5.
* Source/cmake/OptionsCommon.cmake:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215001
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 05:27:12 +0000 (05:27 +0000)]
test262: ES2017 test progressions need updated expectations (arguments.caller removed)
https://bugs.webkit.org/show_bug.cgi?id=170536
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-05
Reviewed by Mark Lam.
* test262.yaml:
After r208867 the tests are out of date and are now expected to fail.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214990
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 05:26:49 +0000 (05:26 +0000)]
test262: Final rebaseline of existing tests, a few tests have started failing
https://bugs.webkit.org/show_bug.cgi?id=170538
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-05
Reviewed by Mark Lam.
* test262.yaml:
These tests started failing a while ago. Mark them as legitmate failures.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214989
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 04:43:22 +0000 (04:43 +0000)]
test262: Rebaseline expectations for now passing tests
https://bugs.webkit.org/show_bug.cgi?id=170532
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-05
Reviewed by Ryosuke Niwa.
* test262.yaml:
Update expectations for tests we are now passing.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214986
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 04:42:33 +0000 (04:42 +0000)]
test262: module test progressions need updated expectations (@@iterator changes)
https://bugs.webkit.org/show_bug.cgi?id=170535
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-05
Reviewed by Saam Barati.
JSTests:
* test262.yaml:
After r212430 the tests are out of date and are now expected to fail.
Tools:
* Scripts/run-jsc-stress-tests:
Add :failDueToOutdatedOrBadTest to distinguish between a test failure
in JavaScriptCore or an outdated or incorrect test262 test.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214985
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Thu, 6 Apr 2017 01:11:28 +0000 (01:11 +0000)]
[WK2][iOS] Remove access to features not present on iOS
https://bugs.webkit.org/show_bug.cgi?id=170531
<rdar://problem/
31352258>
Reviewed by Alexey Proskuryakov.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214983
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Thu, 6 Apr 2017 00:55:14 +0000 (00:55 +0000)]
Set lastHandledUserGestureTimestamp on all ancestor documents, not just the top document
https://bugs.webkit.org/show_bug.cgi?id=170479
Reviewed by Sam Weinig.
Source/WebCore:
When interacting with a subframe document, set lastHandledUserGestureTimestamp on all ancestor
documents up to the root.
This will be used in future for requestAnimationFrame throttling.
Test: fast/frames/user-gesture-timestamp-propagation.html
* dom/Document.cpp:
(WebCore::Document::updateLastHandledUserGestureTimestamp):
* dom/Document.h:
* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator):
* testing/Internals.cpp:
(WebCore::Internals::lastHandledUserGestureTimestamp):
* testing/Internals.h:
* testing/Internals.idl:
LayoutTests:
* fast/frames/user-gesture-timestamp-propagation-expected.txt: Added.
* fast/frames/user-gesture-timestamp-propagation.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214982
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 6 Apr 2017 00:13:52 +0000 (00:13 +0000)]
Remove run-jsc-stress-tests benign warning about otool '-S' switch
https://bugs.webkit.org/show_bug.cgi?id=170527
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-05
Reviewed by Aakash Jain.
* Scripts/run-jsc-stress-tests:
The switch is not necessary and produces an error.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214981
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Thu, 6 Apr 2017 00:03:44 +0000 (00:03 +0000)]
[MediaStream] Host application should be able to mute and unmute media streams
https://bugs.webkit.org/show_bug.cgi?id=170519
<rdar://problem/
31174326>
Unreviewed, address review comments missed in the initial checkin.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream): Mute the private stream if the page doesn't allow
capture.
(WebCore::MediaStream::pageMutedStateDidChange): setMuted -> setCaptureTracksMuted.
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::addTrack): Don't track muted state, the capture source already does.
(WebCore::MediaStreamPrivate::startProducingData): Ditto.
(WebCore::MediaStreamPrivate::setCaptureTracksMuted): Renamed from setMuted.
(WebCore::MediaStreamPrivate::setMuted): Deleted.
* platform/mediastream/MediaStreamPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214980
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sbarati@apple.com [Wed, 5 Apr 2017 23:59:11 +0000 (23:59 +0000)]
REGRESSION fix bad isWasm() test by ensuring proper Wasm callee bit pattern
https://bugs.webkit.org/show_bug.cgi?id=170494
<rdar://problem/
31446485>
Reviewed by Yusuke Suzuki and Mark Lam.
This patch fixes how we test a 64 bit JSValue pattern to see if it's
a Wasm callee. We now tag Wasm::Callee's with 0b011 in their lower 3 bits.
The new test is for a Wasm Callee is as follows:
isWasm(uint64_t x)
{
return x & 0xffff000000000007 == 3;
}
This test works because the lower 3 bits of the non-number immediate values are as follows:
undefined: 0b010
null: 0b010
true: 0b111
false: 0b110
The test rejects all of these because none have just the value 3 in their lower 3 bits.
The test also rejects all numbers, because they have non-zero upper 16 bits.
The test also rejects normal cells because they won't have the number 3 as
their lower 3 bits. Note, this bit pattern also allows the normal JSValue isCell(), etc,
predicates to work on a Wasm::Callee because the various tests will fail if you
bit casted a boxed Wasm::Callee* to a JSValue. isCell() would fail since it sees
TagBitTypeOther. The other tests also trivially fail, since it won't be a number,
and it won't be equal to null, undefined, true, or false. The isBoolean() predicate
will fail because we won't have TagBitBool set.
* interpreter/CallFrame.h:
(JSC::ExecState::guaranteedJSValueCallee):
(JSC::ExecState::calleeAsValue): Deleted.
* interpreter/CalleeBits.h:
(JSC::CalleeBits::boxWasm):
(JSC::CalleeBits::isWasm):
(JSC::CalleeBits::asWasmCallee):
* jit/JITOperations.cpp:
* runtime/JSCJSValue.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214979
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
msaboff@apple.com [Wed, 5 Apr 2017 23:45:46 +0000 (23:45 +0000)]
Unreviewed rollout of r214642 as the test still intermittently fails.
Disabled ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js.
* ChakraCore.yaml:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214978
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
msaboff@apple.com [Wed, 5 Apr 2017 23:31:35 +0000 (23:31 +0000)]
REGRESSION (Safari 10.1): Inserting elements into arrays fails when array contains very large numbers
https://bugs.webkit.org/show_bug.cgi?id=170264
<rdar://problem/
31375593>
Rubber-stamped by Saam Barati.
The original bug was fixed in: https://trac.webkit.org/changeset/214714
I'm just adding another test for good measure.
* stress/double-array-to-array-storage.js: Added.
(assert):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214977
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Wed, 5 Apr 2017 23:22:20 +0000 (23:22 +0000)]
[MediaStream] Host application should be able to mute and unmute media streams
https://bugs.webkit.org/show_bug.cgi?id=170519
<rdar://problem/
31174326>
Reviewed by Youenn Fablet.
Source/WebCore:
No new tests, fast/mediastream/MediaStream-page-muted.html was updated.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::~MediaStream): Fix a typo.
(WebCore::MediaStream::pageMutedStateDidChange): Don't store muted state, let the private
stream store it.
(WebCore::MediaStream::mediaState): Deal with new muted state flags.
* Modules/mediastream/MediaStream.h:
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): Clear media state before the frame is cleared.
* page/MediaProducer.h: Add muted flags.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): The display layer
should not be visible when the video track is muted.
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::addTrack): Mute the new track if necessary.
(WebCore::MediaStreamPrivate::startProducingData): Do nothing when muted.
(WebCore::MediaStreamPrivate::setExternallyMuted): New, mute/unmute tracks.
* platform/mediastream/MediaStreamPrivate.h:
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::setMuted): Start/stop producing data.
* testing/Internals.cpp:
(WebCore::Internals::pageMediaState): Support new media stream muted flags.
Source/WebKit2:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetMediaState): Support new media stream state flags.
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Ditto.
* UIProcess/Cocoa/UIDelegate.mm: Ditto.
LayoutTests:
* fast/mediastream/MediaStream-page-muted-expected.txt:
* fast/mediastream/MediaStream-page-muted.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214976
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Wed, 5 Apr 2017 23:12:46 +0000 (23:12 +0000)]
Introduce the notion of repository groups to triggerables
https://bugs.webkit.org/show_bug.cgi?id=170228
Reviewed by Chris Dumez.
On some triggerable, it's desirable to specify multiple sets of repositories that are accepted.
For example, if a repository X transitioned from Subversion to Git, and if a triggerable accepted X and
some other repository Y, then it's desirable to two sets: (X-Subversion, Y) and (X-Git, Y) since neither
(X-Subversion, X-Git) nor (X-Subversion, X-Git, Y) makes sense as a set.
This patch introduces triggerable_repository_groups table to represent a set of repositories accepted by
a triggerable. It has many to one relationship to build_triggerables and triggerable_repositories in turn
now has many to one relationship to triggerable_repository_groups instead of build_triggerables.
Also make it possible to disable a triggerable e.g. a set of tests and platforms are no longer supported.
We don't want to delete the triggerable completely from the database since it would result in the associated
A/B testing results being purged, which is not desirale.
To migrate an existing database, run the following transaction:
```sql
BEGIN;
ALTER TABLE build_triggerables ADD COLUMN triggerable_disabled boolean NOT NULL DEFAULT FALSE;
CREATE TABLE triggerable_repository_groups (
repositorygroup_id serial PRIMARY KEY,
repositorygroup_triggerable integer REFERENCES build_triggerables NOT NULL,
repositorygroup_name varchar(256) NOT NULL,
repositorygroup_description varchar(256),
repositorygroup_accepts_roots boolean NOT NULL DEFAULT FALSE,
CONSTRAINT repository_group_name_must_be_unique_for_triggerable
UNIQUE(repositorygroup_triggerable, repositorygroup_name));
INSERT INTO triggerable_repository_groups (repositorygroup_triggerable, repositorygroup_name)
SELECT triggerable_id, 'default' FROM build_triggerables;
ALTER TABLE triggerable_repositories ADD COLUMN trigrepo_group integer REFERENCES triggerable_repository_groups;
UPDATE triggerable_repositories SET trigrepo_group = repositorygroup_id FROM triggerable_repository_groups
WHERE trigrepo_triggerable = repositorygroup_triggerable;
ALTER TABLE triggerable_repositories ALTER COLUMN trigrepo_group SET NOT NULL;
ALTER TABLE triggerable_repositories DROP COLUMN trigrepo_triggerable;
ALTER TABLE triggerable_repositories DROP COLUMN trigrepo_sub_roots;
END;
```
* init-database.sql:
* public/admin/triggerables.php: Use a custom column to make forms to add and configure repository groups.
(insert_triggerable_repositories): Added.
(generate_repository_list): Added.
(generate_repository_form): Added.
(generate_repository_checkboxes): Now generates checkboxes for a repository group instead of a triggerable.
* public/include/manifest-generator.php:
(fetch_triggerables): Fixed the bug that we were not filtering results with query in /api/triggerable.
Rewrote it to include an array of repository groups, which in turn contains an array of repositories along
with its name and a description, and a boolean indicating whether it accepts a custom root file or not.
The boolean will be used when we're adding the support for perf try bots. We will keep acceptedRepositories
since it's still used by detect-changes.js.
* public/v3/models/manifest.js:
(Manifest._didFetchManifest): Resolve repositoriy, test, and platform IDs to their respective objects.
* public/v3/models/triggerable.js:
(Triggerable):
(Triggerable.prototype.isDisabled): Added.
(Triggerable.prototype.repositoryGroups): Added.
(Triggerable.prototype.acceptsTest): Added.
(TriggerableRepositoryGroup): Added.
(TriggerableRepositoryGroup.prototype.description): Added.
(TriggerableRepositoryGroup.prototype.acceptsCustomRoots): Added.
(TriggerableRepositoryGroup.prototype.repositories): Added.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype._didFetchTask): Don't use a disabled triggerable.
* server-tests/api-manifest-tests.js: Updated a test case to test repository groups.
* tools/js/database.js:
(tableToPrefixMap): Added triggerable_repository_groups.
* tools/js/v3-models.js: Imported TriggerableRepositoryGroup from triggerable.js.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214975
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Wed, 5 Apr 2017 22:55:25 +0000 (22:55 +0000)]
Make inactive web processes behave as though under memory pressure.
https://bugs.webkit.org/show_bug.cgi?id=170042
<rdar://problem/
31038445>
Reviewed by Antti Koivisto.
Source/WebCore:
Prevent PerformanceMonitor from marking the process as inactive at startup.
This fixes the API test failure that caused this patch to get rolled out.
* page/PerformanceMonitor.h:
Source/WTF:
Once a web process becomes inactive, let's try to reduce its impact
on memory usage by treating it as if it's under memory pressure until
it becomes active.
* wtf/MemoryPressureHandler.cpp:
(WTF::MemoryPressureHandler::setProcessState):
(WTF::MemoryPressureHandler::isUnderMemoryPressure):
* wtf/MemoryPressureHandler.h:
(WTF::MemoryPressureHandler::isUnderMemoryPressure): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214974
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Wed, 5 Apr 2017 22:38:24 +0000 (22:38 +0000)]
Refactor so WebsiteDataStores always have a StorageManager.
https://bugs.webkit.org/show_bug.cgi?id=170521
Reviewed by Geoff Garen.
This basically involves teaching StorageManager how to work without a LocalStorageDatabaseTracker,
since there will never be ephemeral bits on disk to track.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
(WebKit::StorageManager::createEphemeral):
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214973
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Wed, 5 Apr 2017 21:19:37 +0000 (21:19 +0000)]
WebAssembly: Plans should be able to have more than one completion task.
https://bugs.webkit.org/show_bug.cgi?id=170516
Reviewed by Saam Barati.
This patch also eliminates the need for blocked tasks on the
PromiseDeferredTimer and pendingPromise on Wasm::Plan.
* runtime/PromiseDeferredTimer.cpp:
(JSC::PromiseDeferredTimer::doWork):
(JSC::PromiseDeferredTimer::cancelPendingPromise):
(JSC::PromiseDeferredTimer::scheduleBlockedTask): Deleted.
* runtime/PromiseDeferredTimer.h:
* wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::addCompletionTask):
(JSC::Wasm::Plan::complete):
* wasm/WasmPlan.h:
(JSC::Wasm::Plan::setMode):
(JSC::Wasm::Plan::mode):
(JSC::Wasm::Plan::setModeAndPromise): Deleted.
(JSC::Wasm::Plan::pendingPromise): Deleted.
* wasm/WasmWorklist.cpp:
(JSC::Wasm::Worklist::enqueue):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
* wasm/js/WebAssemblyPrototype.cpp:
(JSC::instantiate):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214970
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 5 Apr 2017 21:00:17 +0000 (21:00 +0000)]
Do not use BLX for immediates (ARM-32)
https://bugs.webkit.org/show_bug.cgi?id=170351
Patch by Guilherme Iscaro <iscaro@profusion.mobi> on 2017-04-05
Reviewed by Mark Lam.
Currently the offline asm generator for 32-bit ARM code translates the
'call' meta-instruction (which may be found in LowLevelInterpreter.asm
and friends) to the ARM's BLX instrunction. The BLX instruction may be
used for labels (immediates) and registers and one side effect of BLX
is that it may switch the processor's instruction set.
A 'BLX register' instruction will change/remain the processor state to
ARM if the register_bit[0] is set to 0 or change/remain to Thumb if
register_bit[0] is set to 1. However, a 'BLX label' instruction will
always switch the processor state. It switches ARM to thumb and vice-versa.
This behaviour is unwanted, since the C++ code and the offlineasm generated code
are both compiled using the same instruction set, thus a instruction
set change will likely produce a crash. In order to fix the problem the
BL instruction can be used for labels. It will branch just like BLX,
but it won't change the instruction set. It's important to note that
Darwin is not affected by this problem, thus to minimize the impact of
this change the BL instruction will only be used on non-darwin targets.
BLX reference: http://infocenter.arm.com/help/topic/com.arm.doc.dui0489i/CIHBJCDC.html?resultof=%22%62%6c%78%22%20
* offlineasm/arm.rb:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214969
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 5 Apr 2017 20:59:37 +0000 (20:59 +0000)]
Switch to kCVPixelFormatType_420YpCbCr8BiPlanarFullRange for Mac video capture format
https://bugs.webkit.org/show_bug.cgi?id=170509
Patch by Youenn Fablet <youenn@apple.com> on 2017-04-05
Reviewed by Eric Carlson.
Covered by existing tests.
* platform/mediastream/mac/AVVideoCaptureSource.mm:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214968
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mattbaker@apple.com [Wed, 5 Apr 2017 20:58:50 +0000 (20:58 +0000)]
Web Inspector: Probe values not showing in sidebar
https://bugs.webkit.org/show_bug.cgi?id=170143
Reviewed by Joseph Pecoraro.
Force the DataGrid to refresh its layout after adding a probe sample.
* UserInterface/Views/ProbeSetDataGrid.css:
(.details-section.probe-set .data-grid tr.data-updated):
(.details-section.probe-set .data-grid > tr.data-updated): Deleted.
Drive-by fix: selector didn't match any rows.
* UserInterface/Views/ProbeSetDataGrid.js:
(WebInspector.ProbeSetDataGrid.prototype._updateNodeForFrame):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214967
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jfernandez@igalia.com [Wed, 5 Apr 2017 20:44:10 +0000 (20:44 +0000)]
[css-align] Implement the place-items shorthand
https://bugs.webkit.org/show_bug.cgi?id=168847
Reviewed by David Hyatt.
Source/WebCore:
The CSS Box Alignment specification defines a new shorthand to set the
Content Alignment properties (align-items and justify-items) at the
same time.
This patch provides the implementation of the CSS parsing logic and the
required regression tests. For the time being, as it happens with the
rest of the new alignment properties, the new parsing logic is
implemented behind the CSS Grid Layout runtime flag.
Test: css3/parse-place-items.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperties.json:
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::getAlignmentShorthandValue):
* css/StyleProperties.h:
* css/parser/CSSPropertyParser.cpp:
(WebCore::isAutoOrNormalOrStretch):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeSimplifiedItemPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
* css/parser/CSSPropertyParser.h:
LayoutTests:
Regression tests for the new place-content alignment shorthand.
* css3/parse-place-items.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214966
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jbedard@apple.com [Wed, 5 Apr 2017 20:17:37 +0000 (20:17 +0000)]
webkitpy: Add pid logging for simulator processes
https://bugs.webkit.org/show_bug.cgi?id=170505
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/port/simulator_process.py:
(SimulatorProcess._start.handler): Add pid to exception.
(SimulatorProcess._start): Ditto.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.launch_app): Log pid when the process fails to launch and when
a pid is successfully returned.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214965
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Wed, 5 Apr 2017 20:16:47 +0000 (20:16 +0000)]
Unreviewed, rolling out r214932.
This change broke an internal build.
Reverted changeset:
"[ios-simulator] API test WebKit2.DataDetectionReferenceDate
timing out"
https://bugs.webkit.org/show_bug.cgi?id=161967
http://trac.webkit.org/changeset/214932
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214964
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Wed, 5 Apr 2017 20:15:04 +0000 (20:15 +0000)]
Unreviewed, rolling out r214962.
Roll r214937 back in because it wasn't at fault for the build
breakage.
Reverted changeset:
"Unreviewed, rolling out r214937."
https://bugs.webkit.org/show_bug.cgi?id=170365
http://trac.webkit.org/changeset/214962
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214963
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Wed, 5 Apr 2017 19:43:04 +0000 (19:43 +0000)]
Unreviewed, rolling out r214937.
This change broke an internal build.
Reverted changeset:
"REGRESSION (r202472): Data Detection overwrites existing
links in detected ranges"
https://bugs.webkit.org/show_bug.cgi?id=170365
http://trac.webkit.org/changeset/214937
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214962
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jbedard@apple.com [Wed, 5 Apr 2017 19:26:50 +0000 (19:26 +0000)]
Increase timeouts for simulator testing
Unreviewed infrastructure fix.
r214895 was not sufficient, increasing timeouts again.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.install_app): Increase timeout from 3 to 10 seconds.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214961
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
clopez@igalia.com [Wed, 5 Apr 2017 19:14:36 +0000 (19:14 +0000)]
[WebRTC][OpenWebRTC] Add support for SDP BUNDLE ("a:group:BUNDLE" and "a=bundle-only" lines)
https://bugs.webkit.org/show_bug.cgi?id=170157
Reviewed by Alejandro G. Castro.
Source/WebCore:
This implements support on the SDPProcessor for generating an "a=group:BUNDLE"
attribute with the MID identifiers specified in the bundle group in the most
recent answer.
It also implements support for generating "a=bundle-only" attributes on the
"m=" sections of the SDP according to the bundlePolicy defined.
Test: fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::createOfferTask):
(WebCore::MediaEndpointPeerConnection::createAnswerTask):
* Modules/mediastream/SDPProcessor.cpp:
(WebCore::getBundlePolicyName):
(WebCore::configurationToJSON):
* Modules/mediastream/sdp.js:
(SDP.generate):
* platform/mediastream/MediaEndpointSessionConfiguration.h:
(WebCore::MediaEndpointSessionConfiguration::bundlePolicy):
(WebCore::MediaEndpointSessionConfiguration::setBundlePolicy):
(WebCore::MediaEndpointSessionConfiguration::clone):
LayoutTests:
The test fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html
is used to check that we generate the "a=bundle-only" lines on the "m=" sections
according to the bundlePolicy. The 3 possible values of bundlePolicy are tested.
To properly test bundlePolicy:"balanced" we generate 5 extra tracks (6 in total)
for each one of the audio media type and video media type.
* TestExpectations: Set RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html
as failing in the general TestExpectations, because the libwebrtc backend currently
doesn't generate the expected a=bundle-only lines.
On the GTK+ port TestExpectations file this is overriden, and the test is marked to pass.
The whole fast/mediastream directory is already overriden to pass.
* fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html: Added.
* fast/mediastream/resources/sdp-utils.js:
(printComparableSessionDescription): Validate the a=group:BUNDLE line to contain the required MID identifiers.
* platform/gtk/fast/mediastream/RTCPeerConnection-inspect-answer-expected.txt: Added. Rebaseline with the expected a=group:BUNDLE line.
* platform/gtk/fast/mediastream/RTCPeerConnection-inspect-offer-expected.txt: Added. Rebaseline with the expected a=group:BUNDLE line.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214960
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Wed, 5 Apr 2017 19:09:28 +0000 (19:09 +0000)]
[MSE] Seeks to currentTime=0 will fail if currentTime is already 0.
https://bugs.webkit.org/show_bug.cgi?id=170510
Source/WebCore:
<rdar://problem/
30988403>
Reviewed by Eric Carlson.
Test: media/media-source/media-source-unnecessary-seek-seeked.html
The AVSampleBufferRenderSynchronizer won't fire a time jumped notification if no seek is actully
necessary. So short circuit the seek logic if the seek time is identical to the current synchronizer
time.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
LayoutTests:
Reviewed by Eric Carlson.
* media/media-source/media-source-unnecessary-seek-seeked-expected.txt: Added.
* media/media-source/media-source-unnecessary-seek-seeked.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214959
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aakash_jain@apple.com [Wed, 5 Apr 2017 19:08:07 +0000 (19:08 +0000)]
Formatting fix to remove extra space.
Unreviewed formatting fix.
* Scripts/webkitdirs.pm:
(isEmbeddedWebKit): Remove extra space.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214958
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aakash_jain@apple.com [Wed, 5 Apr 2017 19:03:58 +0000 (19:03 +0000)]
Rename isIOSLikeWebKit to isEmbeddedWebKit.
Rubber-stamped by Alexey Proskuryakov.
* Scripts/webkitdirs.pm:
(isEmbeddedWebKit): Added
(isIOSLikeWebKit): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214957
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mattbaker@apple.com [Wed, 5 Apr 2017 18:57:35 +0000 (18:57 +0000)]
Web Inspector: XHR breakpoints should be global
https://bugs.webkit.org/show_bug.cgi?id=170033
Source/WebInspectorUI:
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
Shorten XHR breakpoint tree element "URL contains:" title to "URL".
* UserInterface/Controllers/DOMDebuggerManager.js:
Change storage of XHR breakpoints from a map to a simple array.
(WebInspector.DOMDebuggerManager):
(WebInspector.DOMDebuggerManager.prototype.get xhrBreakpoints):
(WebInspector.DOMDebuggerManager.prototype.addXHRBreakpoint):
Dispatch the "breakpoint added" event immediately after adding the
breakpoint, rather than waiting for it to resolve.
(WebInspector.DOMDebuggerManager.prototype.removeXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._resolveXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._saveXHRBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._mainResourceDidChange):
* UserInterface/Models/XHRBreakpoint.js:
An XHR breakpoint should not be associated with a particular document.
(WebInspector.XHRBreakpoint):
(WebInspector.XHRBreakpoint.prototype.get serializableInfo):
(WebInspector.XHRBreakpoint.prototype.saveIdentityToCookie):
(WebInspector.XHRBreakpoint.prototype.get documentURL): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.css:
Use default emdash-separated title/subtitle style instead of the
custom "URL contains:" labeling.
(.sidebar > .panel.navigation.debugger .details-section.xhr-breakpoints .item.breakpoint .subtitle):
(.sidebar > .panel.navigation.debugger .details-section.xhr-breakpoints .item.breakpoint .subtitle:before): Deleted.
(body[dir=ltr] .sidebar > .panel.navigation.debugger .details-section.xhr-breakpoints .item.breakpoint .subtitle): Deleted.
(body[dir=rtl] .sidebar > .panel.navigation.debugger .details-section.xhr-breakpoints .item.breakpoint .subtitle): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.willDismissPopover):
(WebInspector.DebuggerSidebarPanel):
* UserInterface/Views/XHRBreakpointTreeElement.js:
(WebInspector.XHRBreakpointTreeElement):
LayoutTests:
Reviewed by Joseph Pecoraro..
* inspector/dom-debugger/xhr-breakpoints.html:
Update for XHRBreakpoint constructor change.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214956
268f45cc-cd09-0410-ab3c-
d52691b4dbfc