WebKit-https.git
2 years ago[GLib] Use USE(GLIB) guards in WebCore/workers/
zandobersek@gmail.com [Tue, 14 Mar 2017 08:30:32 +0000 (08:30 +0000)]
[GLib] Use USE(GLIB) guards in WebCore/workers/
https://bugs.webkit.org/show_bug.cgi?id=169595

Reviewed by Carlos Garcia Campos.

Utilize the USE(GLIB) build guards in the WorkerRunLoop and WorkerThread
class implementations to guard GLib-specific header inclusions and GLib
API invocations, instead of the more specific PLATFORM(GTK) guards.

* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::runInMode):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):

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

2 years ago[GLib] Use USE(GLIB) guards in JavaScriptCore/inspector/EventLoop.cpp
zandobersek@gmail.com [Tue, 14 Mar 2017 08:29:31 +0000 (08:29 +0000)]
[GLib] Use USE(GLIB) guards in JavaScriptCore/inspector/EventLoop.cpp
https://bugs.webkit.org/show_bug.cgi?id=169594

Reviewed by Carlos Garcia Campos.

Instead of PLATFORM(GTK) guards, utilize the USE(GLIB) build guards
to guard the GLib-specific includes and invocations in the JSC
inspector's EventLoop class implementation.

* inspector/EventLoop.cpp:
(Inspector::EventLoop::cycle):

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

2 years ago[Soup] Suppress compiler warnings in NetworkStorageSession
zandobersek@gmail.com [Tue, 14 Mar 2017 08:28:42 +0000 (08:28 +0000)]
[Soup] Suppress compiler warnings in NetworkStorageSession
https://bugs.webkit.org/show_bug.cgi?id=169593

Reviewed by Carlos Garcia Campos.

Return default-constructed Vector objects in the NetworkStorageSession's
getAllCookies() and getCookies() methods, avoiding compiler warnings.

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::getAllCookies):
(WebCore::NetworkStorageSession::getCookies):

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

2 years agoWeb Inspector: Remove unnecessary assert for Number.percentageString
webkit@devinrousso.com [Tue, 14 Mar 2017 08:28:07 +0000 (08:28 +0000)]
Web Inspector: Remove unnecessary assert for Number.percentageString
https://bugs.webkit.org/show_bug.cgi?id=169589

Reviewed by Matt Baker.

* UserInterface/Base/Utilities.js:
(Number.percentageString):

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

2 years agoUnreviewed. Fix syntax error in GTK+ API docs.
carlosgc@webkit.org [Tue, 14 Mar 2017 08:21:44 +0000 (08:21 +0000)]
Unreviewed. Fix syntax error in GTK+ API docs.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):

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

2 years agoWeb Inspector: allow the user to copy locked CSS selectors in Style - Rules
webkit@devinrousso.com [Tue, 14 Mar 2017 07:57:01 +0000 (07:57 +0000)]
Web Inspector: allow the user to copy locked CSS selectors in Style - Rules
https://bugs.webkit.org/show_bug.cgi?id=169587

Reviewed by Matt Baker.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector):

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

2 years ago[JSC][Linux] Implement VMTrap in Linux ports
utatane.tea@gmail.com [Tue, 14 Mar 2017 07:33:08 +0000 (07:33 +0000)]
[JSC][Linux] Implement VMTrap in Linux ports
https://bugs.webkit.org/show_bug.cgi?id=169436

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch port VMTrap to Linux ports.
We extract MachineContext accessors from various places (wasm/, heap/ and tools/)
and use them in all the JSC code.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::Thread::Registers::stackPointer):
(JSC::MachineThreads::Thread::Registers::framePointer):
(JSC::MachineThreads::Thread::Registers::instructionPointer):
(JSC::MachineThreads::Thread::Registers::llintPC):
* heap/MachineStackMarker.h:
* runtime/MachineContext.h: Added.
(JSC::MachineContext::stackPointer):
(JSC::MachineContext::framePointer):
(JSC::MachineContext::instructionPointer):
(JSC::MachineContext::argumentPointer<1>):
(JSC::MachineContext::argumentPointer):
(JSC::MachineContext::llintInstructionPointer):
* runtime/PlatformThread.h:
(JSC::platformThreadSignal):
* runtime/VMTraps.cpp:
(JSC::SignalContext::SignalContext):
(JSC::SignalContext::adjustPCToPointToTrappingInstruction):
* tools/CodeProfiling.cpp:
(JSC::profilingTimer):
* tools/SigillCrashAnalyzer.cpp:
(JSC::SignalContext::SignalContext):
(JSC::SignalContext::dump):
* tools/VMInspector.cpp:
* wasm/WasmFaultSignalHandler.cpp:
(JSC::Wasm::trapHandler):

Source/WTF:

Enable VMTrap mechanism for Linux and FreeBSD.

* wtf/Platform.h:

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

2 years agoRemove unused methods of ResourceRequestBase
commit-queue@webkit.org [Tue, 14 Mar 2017 06:51:23 +0000 (06:51 +0000)]
Remove unused methods of ResourceRequestBase
https://bugs.webkit.org/show_bug.cgi?id=169579

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-03-13
Reviewed by Youenn Fablet.

* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::reportUploadProgress): Deleted.
(WebCore::ResourceRequestBase::setReportUploadProgress): Deleted.
(WebCore::ResourceRequestBase::reportLoadTiming): Deleted.
(WebCore::ResourceRequestBase::setReportLoadTiming): Deleted.
(WebCore::ResourceRequestBase::reportRawHeaders): Deleted.
(WebCore::ResourceRequestBase::setReportRawHeaders): Deleted.
Remove unused code.

* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::willSendRequest):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):
Remove callers of setters that did nothing.

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

2 years agoMake RealtimeMediaSource::type an enum class
commit-queue@webkit.org [Tue, 14 Mar 2017 05:58:27 +0000 (05:58 +0000)]
Make RealtimeMediaSource::type an enum class
https://bugs.webkit.org/show_bug.cgi?id=169491

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-13
Reviewed by Sam Weinig.

No change of behavior.

* Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
(WebCore::CanvasCaptureMediaStreamTrack::Source::Source):
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::getAudioTracks):
(WebCore::MediaStream::getVideoTracks):
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::kind):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::addTrack):
* Modules/webaudio/MediaStreamAudioSource.cpp:
(WebCore::MediaStreamAudioSource::MediaStreamAudioSource):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
* platform/mediastream/CaptureDeviceManager.cpp:
(CaptureDeviceManager::bestSourcesForTypeAndConstraints):
(CaptureDeviceManager::sourceWithUID):
* platform/mediastream/MediaEndpoint.cpp:
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::AVAudioCaptureSource):
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
* platform/mock/MockMediaEndpoint.cpp:
(WebCore::MockMediaEndpoint::createMutedRemoteSource):
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
* platform/mock/MockRealtimeMediaSource.cpp:
(WebCore::MockRealtimeMediaSource::MockRealtimeMediaSource):
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):

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

2 years agoMake the HeapVerifier useful again.
mark.lam@apple.com [Tue, 14 Mar 2017 00:39:24 +0000 (00:39 +0000)]
Make the HeapVerifier useful again.
https://bugs.webkit.org/show_bug.cgi?id=161752

Reviewed by Filip Pizlo.

Resurrect the HeapVerifier.  Here's what the verifier now offers:

1. It captures the list of cells before and after GCs up to N GC cycles.
   N is set by JSC_numberOfGCCyclesToRecordForVerification.
   Currently, N defaults to 3.

   This is useful if we're debugging in lldb and want to check if a candidate
   cell pointer was observed by the GC during the last N GC cycles.  We can do
   this check buy calling HeapVerifier::checkIfRecorded() with the cell address.

   HeapVerifier::checkIfRecorded() is robust and can be used on bogus addresses.
   If the candidate cell was previously recorded by the HeapVerifier during a
   GC cycle, checkIfRecorded() will dump any useful info it has on that cell.

2. The HeapVerifier will verify that cells in its captured list after a GC are
   sane.  Some examples of cell insanity are:
   - the cell claims to belong to a different VM.
   - the cell has a NULL structureID.
   - the cell has a NULL structure.
   - the cell's structure has a NULL structureID.
   - the cell's structure has a NULL structure.
   - the cell's structure's structure has a NULL structureID.
   - the cell's structure's structure has a NULL structure.

   These are all signs of corruption or a GC bug.  The verifier will report any
   insanity it finds, and then crash with a RELEASE_ASSERT.

3. Since the HeapVerifier captures list of cells in the heap before and after GCs
   for the last N GCs, it will also automatically "trim" dead cells those list
   after the most recent GC.

   "trim" here means that the CellProfile in the HeapVerifier's lists will be
   updated to reflect that the cell is now dead.  It still keeps a record of the
   dead cell pointer and the meta data collected about it back when it was alive.
   As a result, checkIfRecorded() will also report if the candidate cell passed
   to it is a dead object from a previous GC cycle.

4. Each CellProfile captured by the HeapVerifier now track the following info:
   - the cell's HeapCell::Kind.
   - the cell's liveness.
   - if is JSCell, the cell's classInfo()->className.
   - an associated timestamp.
   - an associated stack trace.

   Currently, the timestamp is only used for the time when the cell was recorded
   by the HeapVerifier during GC.  The stack trace is currently unused.

   However, these fields are kept there so that we can instrument the VM (during
   a debugging session, which requires rebuilding the VM) and record interesting
   stack traces like that of the time of allocation of the cell.  Since
   capturing the stack traces for each cell is a very heavy weight operation,
   the HeapVerifier code does not do this by default.  Instead, we just leave
   the building blocks for doing so in place to ease future debugging efforts.

* heap/Heap.cpp:
(JSC::Heap::runBeginPhase):
(JSC::Heap::runEndPhase):
(JSC::Heap::didFinishCollection):
* heap/Heap.h:
(JSC::Heap::verifier):
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::takeLastActiveBlock): Deleted.
* heap/MarkedSpace.h:
* heap/MarkedSpaceInlines.h:
(JSC::MarkedSpace::forEachLiveCell):
* tools/CellList.cpp:
(JSC::CellList::find):
(JSC::CellList::reset):
(JSC::CellList::findCell): Deleted.
* tools/CellList.h:
(JSC::CellList::CellList):
(JSC::CellList::name):
(JSC::CellList::size):
(JSC::CellList::cells):
(JSC::CellList::add):
(JSC::CellList::reset): Deleted.
* tools/CellProfile.h:
(JSC::CellProfile::CellProfile):
(JSC::CellProfile::cell):
(JSC::CellProfile::jsCell):
(JSC::CellProfile::isJSCell):
(JSC::CellProfile::kind):
(JSC::CellProfile::isLive):
(JSC::CellProfile::isDead):
(JSC::CellProfile::setIsLive):
(JSC::CellProfile::setIsDead):
(JSC::CellProfile::timestamp):
(JSC::CellProfile::className):
(JSC::CellProfile::stackTrace):
(JSC::CellProfile::setStackTrace):
* tools/HeapVerifier.cpp:
(JSC::HeapVerifier::startGC):
(JSC::HeapVerifier::endGC):
(JSC::HeapVerifier::gatherLiveCells):
(JSC::trimDeadCellsFromList):
(JSC::HeapVerifier::trimDeadCells):
(JSC::HeapVerifier::printVerificationHeader):
(JSC::HeapVerifier::verifyCellList):
(JSC::HeapVerifier::validateCell):
(JSC::HeapVerifier::validateJSCell):
(JSC::HeapVerifier::verify):
(JSC::HeapVerifier::reportCell):
(JSC::HeapVerifier::checkIfRecorded):
(JSC::HeapVerifier::initializeGCCycle): Deleted.
(JSC::GatherCellFunctor::GatherCellFunctor): Deleted.
(JSC::GatherCellFunctor::visit): Deleted.
(JSC::GatherCellFunctor::operator()): Deleted.
(JSC::HeapVerifier::verifyButterflyIsInStorageSpace): Deleted.
* tools/HeapVerifier.h:
(JSC::HeapVerifier::GCCycle::reset):

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

2 years agoSync web-platform-tests up to revision a5b95cb31914507088a4eda16f7674bbc6f3313f
commit-queue@webkit.org [Tue, 14 Mar 2017 00:38:18 +0000 (00:38 +0000)]
Sync web-platform-tests up to revision a5b95cb31914507088a4eda16f7674bbc6f3313f
https://bugs.webkit.org/show_bug.cgi?id=169523

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-13
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* csswg-test/LICENSE.md: Added.
* csswg-test/README.md:
* csswg-test/build-css-testsuites.sh: Added.
* csswg-test/config.default.json: Added.
* csswg-test/css-grid-1/grid-items/w3c-import.log:
* csswg-test/css-grid-1/grid-model/w3c-import.log:
* csswg-test/css-scoping-1/OWNERS: Added.
* csswg-test/css-scoping-1/css-scoping-shadow-slot-style-expected.html: Added.
* csswg-test/css-scoping-1/css-scoping-shadow-slot-style.html: Added.
* csswg-test/css-scoping-1/w3c-import.log:
* csswg-test/lint: Added.
* csswg-test/lint.whitelist: Added.
* csswg-test/manifest: Added.
* csswg-test/requirements.txt: Added.
* csswg-test/serve: Added.
* csswg-test/serve.py: Added.
(main):
* csswg-test/w3c-import.log:
* resources/TestRepositories:
* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/IndexedDB/abort-in-initial-upgradeneeded.html:
* web-platform-tests/IndexedDB/close-in-upgradeneeded.html:
* web-platform-tests/IndexedDB/event-dispatch-active-flag-expected.txt: Added.
* web-platform-tests/IndexedDB/event-dispatch-active-flag.html: Added.
* web-platform-tests/IndexedDB/fire-error-event-exception-expected.txt: Added.
* web-platform-tests/IndexedDB/fire-error-event-exception.html: Added.
* web-platform-tests/IndexedDB/fire-success-event-exception-expected.txt: Added.
* web-platform-tests/IndexedDB/fire-success-event-exception.html: Added.
* web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception-expected.txt: Added.
* web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html: Added.
* web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_objectstore.htm:
* web-platform-tests/IndexedDB/idbfactory-deleteDatabase-opaque-origin-expected.txt: Added.
* web-platform-tests/IndexedDB/idbfactory-deleteDatabase-opaque-origin.html: Added.
* web-platform-tests/IndexedDB/idbfactory-open-error-properties-expected.txt: Added.
* web-platform-tests/IndexedDB/idbfactory-open-error-properties.html: Added.
* web-platform-tests/IndexedDB/idbfactory-open-opaque-origin-expected.txt: Added.
* web-platform-tests/IndexedDB/idbfactory-open-opaque-origin.html: Added.
* web-platform-tests/IndexedDB/idbfactory_deleteDatabase4-expected.txt:
* web-platform-tests/IndexedDB/idbfactory_deleteDatabase4.htm:
* web-platform-tests/IndexedDB/idbindex_get.htm:
* web-platform-tests/IndexedDB/idbindex_get4.htm:
* web-platform-tests/IndexedDB/idbindex_getKey4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex13.htm:
* web-platform-tests/IndexedDB/idbobjectstore_get4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_getKey.html:
* web-platform-tests/IndexedDB/key-conversion-exceptions.htm:
* web-platform-tests/IndexedDB/keygenerator-explicit-expected.txt: Added.
* web-platform-tests/IndexedDB/keygenerator-explicit.html: Added.
* web-platform-tests/IndexedDB/keygenerator-inject-expected.txt: Added.
* web-platform-tests/IndexedDB/keygenerator-inject.html: Added.
* web-platform-tests/IndexedDB/keypath_invalid.htm:
* web-platform-tests/IndexedDB/support.js:
(auto_fail):
(createdb_for_multiple_tests):
(indexeddb_test):
(is_transaction_active):
(spin):
(keep_alive):
* web-platform-tests/IndexedDB/transaction-abort-request-error-expected.txt: Added.
* web-platform-tests/IndexedDB/transaction-abort-request-error.html: Added.
* web-platform-tests/IndexedDB/transaction-deactivation-timing-expected.txt: Added.
* web-platform-tests/IndexedDB/transaction-deactivation-timing.html: Added.
* web-platform-tests/IndexedDB/transaction-lifetime-blocked.htm:
* web-platform-tests/IndexedDB/transaction-lifetime.htm:
* web-platform-tests/IndexedDB/upgrade-transaction-deactivation-timing-expected.txt: Added.
* web-platform-tests/IndexedDB/upgrade-transaction-deactivation-timing.html: Added.
* web-platform-tests/IndexedDB/w3c-import.log:
* web-platform-tests/IndexedDB/writer-starvation.htm:
* 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/import_export/symmetric_importKey.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt:
* web-platform-tests/XMLHttpRequest/OWNERS:
* web-platform-tests/XMLHttpRequest/README.md: Added.
* web-platform-tests/XMLHttpRequest/abort-after-receive.htm:
* web-platform-tests/XMLHttpRequest/abort-after-timeout.htm:
* web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported-expected.txt:
* web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported.htm:
* web-platform-tests/XMLHttpRequest/data-uri-expected.txt:
* web-platform-tests/XMLHttpRequest/data-uri.htm:
* web-platform-tests/XMLHttpRequest/event-abort.htm:
* web-platform-tests/XMLHttpRequest/event-load.htm:
* web-platform-tests/XMLHttpRequest/event-loadend.htm:
* web-platform-tests/XMLHttpRequest/event-loadstart-upload-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-loadstart-upload.htm: Copied from LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-progress.htm.
* web-platform-tests/XMLHttpRequest/event-loadstart.htm:
* web-platform-tests/XMLHttpRequest/event-progress.htm:
* web-platform-tests/XMLHttpRequest/event-readystatechange-loaded.htm:
* web-platform-tests/XMLHttpRequest/event-timeout.htm:
* web-platform-tests/XMLHttpRequest/event-upload-progress-crossorigin.htm:
* web-platform-tests/XMLHttpRequest/event-upload-progress.htm:
* web-platform-tests/XMLHttpRequest/getallresponseheaders-cl-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders-cl.htm: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders.htm: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive.htm:
* web-platform-tests/XMLHttpRequest/loadstart-and-state-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/loadstart-and-state.html: Added.
* web-platform-tests/XMLHttpRequest/open-after-setrequestheader-expected.txt:
* web-platform-tests/XMLHttpRequest/open-after-setrequestheader.htm:
* web-platform-tests/XMLHttpRequest/open-during-abort-event-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-during-abort-event.htm: Added.
* web-platform-tests/XMLHttpRequest/open-during-abort-processing-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-during-abort-processing.htm: Added.
* web-platform-tests/XMLHttpRequest/open-referer-expected.txt:
* web-platform-tests/XMLHttpRequest/open-referer.htm:
* web-platform-tests/XMLHttpRequest/open-send-during-abort-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-send-during-abort.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-redirected-worker-origin-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-redirected-worker-origin.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-blob-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-blob.html: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type-expected.txt:
* web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type.htm:
* web-platform-tests/XMLHttpRequest/resources/corsenabled.py:
(main):
* web-platform-tests/XMLHttpRequest/resources/delay.py:
(main):
* web-platform-tests/XMLHttpRequest/resources/echo-headers.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/header-content-length.asis: Added.
* web-platform-tests/XMLHttpRequest/resources/headers-basic.asis: Added.
* web-platform-tests/XMLHttpRequest/resources/headers.asis: Added.
* web-platform-tests/XMLHttpRequest/resources/inspect-headers.py:
(get_response):
(main):
* web-platform-tests/XMLHttpRequest/resources/redirect.py:
(main):
* web-platform-tests/XMLHttpRequest/resources/w3c-import.log:
* web-platform-tests/XMLHttpRequest/responsetext-decoding-expected.txt:
* web-platform-tests/XMLHttpRequest/responsetext-decoding.htm:
* web-platform-tests/XMLHttpRequest/send-accept-language-expected.txt:
* web-platform-tests/XMLHttpRequest/send-accept-language.htm:
* web-platform-tests/XMLHttpRequest/send-data-formdata-expected.txt:
* web-platform-tests/XMLHttpRequest/send-data-formdata.htm:
* web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt:
* web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub.htm:
* web-platform-tests/XMLHttpRequest/send-redirect-to-cors.htm:
* web-platform-tests/XMLHttpRequest/send-sync-blocks-async.htm:
* web-platform-tests/XMLHttpRequest/send-sync-timeout.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-content-type.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader.htm:
* web-platform-tests/XMLHttpRequest/status-error.htm:
* web-platform-tests/XMLHttpRequest/template-element-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/template-element.html: Added.
* web-platform-tests/XMLHttpRequest/timeout-multiple-fetches-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/timeout-multiple-fetches.html: Added.
* web-platform-tests/XMLHttpRequest/w3c-import.log:
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-reused-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-reused.html: Added.
* web-platform-tests/check_stability.py:
(replace_streams.on_write):
(replace_streams):
(Firefox.install):
(setup_log_handler.LogHandler.__init__):
(setup_log_handler.LogHandler):
(setup_log_handler.LogHandler.find_or_create_test):
(setup_log_handler.LogHandler.find_or_create_subtest):
(setup_log_handler.LogHandler.test_status):
(setup_log_handler.LogHandler.test_end):
(err_string):
(process_results):
(write_inconsistent):
(write_results):
* web-platform-tests/common/get-host-info.sub.js:
(get_host_info):
* web-platform-tests/dom/OWNERS:
* web-platform-tests/dom/lists/DOMTokenList-coverage-for-attributes-expected.txt:
* web-platform-tests/dom/lists/DOMTokenList-coverage-for-attributes.html:
* web-platform-tests/dom/nodes/Element-matches-expected.txt:
* web-platform-tests/dom/nodes/Element-matches.html:
* web-platform-tests/dom/nodes/Element-matches.js:
(interfaceCheckMatches):
(runSpecialMatchesTests):
(runInvalidSelectorTestMatches):
(runMatchesTest):
* web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt: Added.
* web-platform-tests/dom/nodes/Element-webkitMatchesSelector.html: Copied from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-matches.html.
* web-platform-tests/dom/nodes/Node-lookupNamespaceURI-expected.txt:
* web-platform-tests/dom/nodes/Node-lookupNamespaceURI.html:
* web-platform-tests/dom/nodes/w3c-import.log:
* web-platform-tests/encrypted-media/content/video_512x288_h264-360k_multikey_key1_dashinit.mp4: Added.
* web-platform-tests/fetch/OWNERS:
* web-platform-tests/fetch/README.md: Added.
* web-platform-tests/fetch/api/basic/request-referrer-expected.txt:
* web-platform-tests/fetch/api/basic/request-referrer-redirected-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-referrer-redirected-worker.html: Added.
* web-platform-tests/fetch/api/basic/request-referrer-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-referrer-worker.html: Added.
* web-platform-tests/fetch/api/basic/request-referrer.js:
(testReferrer):
* web-platform-tests/fetch/api/basic/request-upload-expected.txt:
* web-platform-tests/fetch/api/basic/request-upload-worker-expected.txt:
* web-platform-tests/fetch/api/basic/request-upload.js:
(testUpload):
* web-platform-tests/fetch/api/basic/w3c-import.log:
* web-platform-tests/fetch/api/cors/cors-expose-star-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-expose-star-worker-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-expose-star-worker.html: Added.
* web-platform-tests/fetch/api/cors/cors-expose-star.html: Added.
* web-platform-tests/fetch/api/cors/cors-expose-star.js: Added.
(sharedHeaders.string_appeared_here.promise_test):
(string_appeared_here.promise_test):
* web-platform-tests/fetch/api/cors/cors-preflight-star-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-star-worker-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-star-worker.html: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-star.html: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-star.js: Added.
(origin.location.origin.preflightTest):
* web-platform-tests/fetch/api/cors/cors-redirect-credentials-expected.txt:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials.js:
(corsRedirectCredentials):
* web-platform-tests/fetch/api/cors/w3c-import.log:
* web-platform-tests/fetch/api/headers/headers-combine-expected.txt:
* web-platform-tests/fetch/api/headers/headers-combine.html:
* web-platform-tests/fetch/api/headers/headers-record-expected.txt: Added.
* web-platform-tests/fetch/api/headers/headers-record.html: Added.
* web-platform-tests/fetch/api/headers/w3c-import.log:
* web-platform-tests/fetch/api/policies/nested-policy.js: Added.
* web-platform-tests/fetch/api/policies/nested-policy.js.headers: Added.
* web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt: Added.
* web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin.html.
* web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt: Added.
* web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin.html.
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt: Added.
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin.html.
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-worker-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin.js:
* web-platform-tests/fetch/api/policies/referrer-origin.html:
* web-platform-tests/fetch/api/policies/referrer-origin.js:
(promise_test):
* web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt: Added.
* web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin.html.
* web-platform-tests/fetch/api/policies/referrer-unsafe-url.js:
* web-platform-tests/fetch/api/policies/w3c-import.log:
* web-platform-tests/fetch/api/request/request-cache-default-conditional-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-default-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-force-cache-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-no-cache-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-no-store-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-reload-expected.txt:
* web-platform-tests/fetch/api/request/request-cache.js:
* web-platform-tests/fetch/api/request/request-headers-expected.txt:
* web-platform-tests/fetch/api/request/request-headers.html:
* web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-keepalive-quota.html: Added.
* web-platform-tests/fetch/api/request/resources/cache.py:
(main):
* web-platform-tests/fetch/api/request/w3c-import.log:
* web-platform-tests/fetch/api/resources/preflight.py:
(main):
* web-platform-tests/fetch/api/response/response-idl-expected.txt:
* web-platform-tests/fetch/api/response/response-idl.html:
* web-platform-tests/fetch/api/response/response-trailer-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-trailer.html: Added.
* web-platform-tests/fetch/api/response/w3c-import.log:
* web-platform-tests/fetch/w3c-import.log:
* web-platform-tests/html/OWNERS:
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin-0.html: Added.
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin.html:
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/w3c-import.log:
* web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-with-colon.sub-expected.txt: Added.
* web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-with-colon.sub.html: Added.
* web-platform-tests/html/browsers/history/the-location-interface/location-stringifier-expected.txt:
* web-platform-tests/html/browsers/history/the-location-interface/location-stringifier.html:
* web-platform-tests/html/browsers/history/the-location-interface/location-tojson-expected.txt: Added.
* web-platform-tests/html/browsers/history/the-location-interface/location-tojson.html: Added.
* web-platform-tests/html/browsers/history/the-location-interface/resources/post-your-protocol.html: Added.
* web-platform-tests/html/browsers/history/the-location-interface/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/offline/w3c-import.log.
* web-platform-tests/html/browsers/history/the-location-interface/w3c-import.log:
* web-platform-tests/html/browsers/offline/no-appcache-in-shared-workers-historical-expected.txt: Added.
* web-platform-tests/html/browsers/offline/no-appcache-in-shared-workers-historical.html: Added.
* web-platform-tests/html/browsers/offline/no-appcache-in-shared-workers-historical.js: Added.
(test):
* web-platform-tests/html/browsers/offline/w3c-import.log:
* web-platform-tests/html/browsers/the-window-object/support/noopener-target.html:
* web-platform-tests/html/browsers/the-window-object/window-open-noopener-expected.txt:
* web-platform-tests/html/browsers/the-window-object/window-open-noopener.html:
* web-platform-tests/html/browsers/windows/browsing-context-expected.txt: Added.
* web-platform-tests/html/browsers/windows/browsing-context-window-expected.txt: Added.
* web-platform-tests/html/browsers/windows/browsing-context-window.html: Added.
* web-platform-tests/html/browsers/windows/browsing-context.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/resources/frameElement-nested-frame.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/resources/frameElement-window-post.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/resources/post-to-opener.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/nested-browsing-contexts/w3c-import.log.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/w3c-import.log:
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent-expected.txt: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent-null-expected.txt: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent-null.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-top-expected.txt: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-top-null-expected.txt: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-top-null.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-top.html: Added.
* web-platform-tests/html/browsers/windows/noreferrer-cross-origin-close-manual.sub.html:
* web-platform-tests/html/browsers/windows/noreferrer-cross-origin-window-name-manual.sub.html: Added.
* web-platform-tests/html/browsers/windows/noreferrer-null-opener-expected.txt: Added.
* web-platform-tests/html/browsers/windows/noreferrer-null-opener.html: Added.
* web-platform-tests/html/browsers/windows/noreferrer-window-name.html:
* web-platform-tests/html/browsers/windows/resources/browsing-context-window.html: Added.
* web-platform-tests/html/browsers/windows/resources/echo-window-name.html: Added.
* web-platform-tests/html/browsers/windows/resources/nested-post-to-opener.html: Added.
* web-platform-tests/html/browsers/windows/resources/noreferrer-window-name.html: Added.
* web-platform-tests/html/browsers/windows/resources/post-to-opener.html: Added.
* web-platform-tests/html/browsers/windows/resources/target-cross-origin.sub.html: Added.
* web-platform-tests/html/browsers/windows/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/w3c-import.log.
* web-platform-tests/html/browsers/windows/resources/window-close-button.html: Added.
* web-platform-tests/html/browsers/windows/resources/window-opener.html: Added.
* web-platform-tests/html/browsers/windows/targeting-multiple-cross-origin-manual.sub.html:
* web-platform-tests/html/browsers/windows/w3c-import.log:
* web-platform-tests/html/dom/elements/elements-in-the-dom/historical-expected.txt:
* web-platform-tests/html/dom/elements/elements-in-the-dom/historical.html:
* web-platform-tests/html/dom/interfaces.html:
* web-platform-tests/html/dom/interfaces.worker-expected.txt: Added.
* web-platform-tests/html/dom/interfaces.worker.html: Added.
* web-platform-tests/html/dom/interfaces.worker.js: Added.
(doTest):
(fetchData):
(promise_test):
* web-platform-tests/html/dom/reflection.js:
* web-platform-tests/html/dom/resources/self-origin-subframe.html: Added.
* web-platform-tests/html/dom/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log.
* web-platform-tests/html/dom/self-origin.any-expected.txt: Added.
* web-platform-tests/html/dom/self-origin.any.html: Added.
* web-platform-tests/html/dom/self-origin.any.js: Added.
(test):
* web-platform-tests/html/dom/self-origin.sub-expected.txt: Added.
* web-platform-tests/html/dom/self-origin.sub.html: Added.
* web-platform-tests/html/dom/self-origin.worker-expected.txt: Added.
* web-platform-tests/html/dom/self-origin.worker.html: Added.
* web-platform-tests/html/dom/w3c-import.log:
* web-platform-tests/html/semantics/document-metadata/styling/LinkStyle.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html: Added.
* web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/w3c-import.log.
* web-platform-tests/html/semantics/embedded-content/resources/should-load.html: Added.
* web-platform-tests/html/semantics/embedded-content/resources/should-not-load.html: Added.
* web-platform-tests/html/semantics/embedded-content/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/toBlob.null-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/toBlob.null.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-ignored-in-media-element.html:
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-2.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-without-user-gesture-failed.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/navigation-changed-iframe.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html:
* web-platform-tests/html/semantics/embedded-content/the-object-element/object-ignored-in-media-element-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/object-ignored-in-media-element.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/object-in-object-fallback-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/object-in-object-fallback-2.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application.html:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html:
* web-platform-tests/html/semantics/forms/the-input-element/valueMode-expected.txt:
* web-platform-tests/html/semantics/forms/the-input-element/valueMode.html:
* web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-expected.txt:
* web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection.html:
* web-platform-tests/html/semantics/forms/the-select-element/selected-index-expected.txt:
* web-platform-tests/html/semantics/forms/the-select-element/selected-index.html:
* web-platform-tests/html/semantics/scripting-1/the-script-element/data-url-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/data-url.html:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tFoot-expected.txt:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tFoot.html:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tHead-expected.txt:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tHead.html:
* web-platform-tests/html/semantics/tabular-data/the-tr-element/insertCell-expected.txt:
* web-platform-tests/html/semantics/tabular-data/the-tr-element/insertCell.html:
* web-platform-tests/html/syntax/parsing-html-fragments/w3c-import.log:
* web-platform-tests/html/syntax/parsing/test.js:
(init_tests):
* web-platform-tests/html/webappapis/scripting/events/body-exposed-window-event-handlers-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/body-exposed-window-event-handlers.html:
* web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects-expected.txt: Added.
* web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects.html: Added.
* web-platform-tests/html/webappapis/scripting/events/event-handler-onauxclick.html:
* web-platform-tests/html/webappapis/scripting/events/event-handler-processing-algorithm-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-processing-algorithm.html:
* web-platform-tests/html/webappapis/scripting/events/resources/compiled-event-handler-settings-objects-support.html: Added.
* web-platform-tests/html/webappapis/scripting/events/resources/open-window.html: Added.
* web-platform-tests/html/webappapis/scripting/events/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/offline/w3c-import.log.
* web-platform-tests/html/webappapis/scripting/events/w3c-import.log:
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setTimeout.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-in-setInterval.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-in-setTimeout.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setTimeout.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-in-setInterval.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-in-setTimeout.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/support/syntax-error-in-setInterval.js:
(step_timeout):
* web-platform-tests/html/webappapis/scripting/processing-model-2/support/undefined-variable-in-setInterval.js:
(step_timeout):
* web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/NavigatorID-expected.txt:
* web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/NavigatorID.worker-expected.txt:
* web-platform-tests/lint.whitelist:
* web-platform-tests/media/CanvasTest.ttf: Added.
* web-platform-tests/media/w3c-import.log:
* web-platform-tests/streams/piping/general.js:
(false.promise_test):
* web-platform-tests/streams/piping/pipe-through.js:
(promise_test):
(test):
* web-platform-tests/streams/readable-byte-streams/general-expected.txt:
* web-platform-tests/streams/readable-byte-streams/general.dedicatedworker-expected.txt:
* web-platform-tests/streams/readable-byte-streams/general.js:
(test):
* web-platform-tests/streams/readable-streams/bad-underlying-sources.js:
(promise_test):
* web-platform-tests/streams/readable-streams/brand-checks-expected.txt:
* web-platform-tests/streams/readable-streams/brand-checks.dedicatedworker-expected.txt:
* web-platform-tests/streams/readable-streams/brand-checks.js:
(test):
(fakeReadableStream):
* web-platform-tests/streams/readable-streams/cancel.js:
(promise_test):
* web-platform-tests/streams/readable-streams/default-reader-expected.txt: Added.
* web-platform-tests/streams/readable-streams/default-reader.dedicatedworker-expected.txt: Added.
* web-platform-tests/streams/readable-streams/default-reader.dedicatedworker.html: Added.
* web-platform-tests/streams/readable-streams/default-reader.html: Added.
* web-platform-tests/streams/readable-streams/default-reader.js: Added.
(test):
(promise_test):
(promise_test.t.const.rs.new.ReadableStream.start):
(promise_test.t.const.rs.new.ReadableStream.cancel):
* web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/default-reader.serviceworker.https.html: Added.
* web-platform-tests/streams/readable-streams/default-reader.sharedworker-expected.txt: Added.
* web-platform-tests/streams/readable-streams/default-reader.sharedworker.html: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size-expected.txt: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.dedicatedworker-expected.txt: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.dedicatedworker.html: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.html: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.js: Added.
(promise_test):
(setupTestStream):
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https.html: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.sharedworker-expected.txt: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.sharedworker.html: Added.
* web-platform-tests/streams/readable-streams/garbage-collection-expected.txt:
* web-platform-tests/streams/readable-streams/garbage-collection.dedicatedworker-expected.txt:
* web-platform-tests/streams/readable-streams/garbage-collection.js:
(promise_test):
* web-platform-tests/streams/readable-streams/general-expected.txt:
* web-platform-tests/streams/readable-streams/general.dedicatedworker-expected.txt:
* web-platform-tests/streams/readable-streams/general.js:
(promise_test):
(test):
* web-platform-tests/streams/readable-streams/pipe-through.js:
(test):
* web-platform-tests/streams/readable-streams/w3c-import.log:
* web-platform-tests/url/OWNERS:
* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-origin-expected.txt:
* web-platform-tests/url/a-element-origin-xhtml-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/failure-expected.txt: Added.
* web-platform-tests/url/failure.html: Added.
* web-platform-tests/url/setters_tests.json:
* web-platform-tests/url/url-constructor-expected.txt:
* web-platform-tests/url/url-origin-expected.txt:
* web-platform-tests/url/url-setters-expected.txt:
* web-platform-tests/url/urltestdata.json:
* web-platform-tests/url/w3c-import.log:
* web-platform-tests/w3c-import.log:
* web-platform-tests/webrtc/rtcpeerconnection/setRemoteDescription-expected.txt: Added.
* web-platform-tests/webrtc/rtcpeerconnection/setRemoteDescription.html: Added.
* web-platform-tests/webrtc/rtcpeerconnection/w3c-import.log:

LayoutTests:

* platform/mac/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt:
* tests-options.json:

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

2 years agoJSC: fix compilation errors for MIPS
commit-queue@webkit.org [Tue, 14 Mar 2017 00:34:28 +0000 (00:34 +0000)]
JSC: fix compilation errors for MIPS
https://bugs.webkit.org/show_bug.cgi?id=168402

Patch by SKumarMetro <s.kumar@metrological.com> on 2017-03-13
Reviewed by Mark Lam.

* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::fillNops):
Added.
* assembler/MacroAssemblerMIPS.h:
Added MacroAssemblerMIPS::numGPRs and MacroAssemblerMIPS::numFPRs .
* bytecode/InlineAccess.h:
(JSC::InlineAccess::sizeForPropertyAccess):
(JSC::InlineAccess::sizeForPropertyReplace):
(JSC::InlineAccess::sizeForLengthAccess):
Added MIPS cases.

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

2 years ago[MediaStream] Move paintCurrentFrameInContext from RealtimeMediaSources to MediaPlayer
eric.carlson@apple.com [Tue, 14 Mar 2017 00:30:48 +0000 (00:30 +0000)]
[MediaStream] Move paintCurrentFrameInContext from RealtimeMediaSources to MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=169474
<rdar://problem/30976747>

Reviewed by Youenn Fablet.

Source/WebCore:

Every video capture source has extremely similar code to render the current frame to
a graphics context. Because the media player gets every video sample buffer, have it
hang onto the most recent frame so it can implement paintCurrentFrameInContext directly.
Fix an existing race condition that occasionally caused the readyState to advance to
"have enough data" before a video was ready to paint by defining a MediaStreamTrackPrivate
readyState and observing that.

No new tests, covered by existing tests. These changes uncovered a bug in
fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html, which
was updated.

* Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
(WebCore::CanvasCaptureMediaStreamTrack::Source::captureCanvas):
(WebCore::CanvasCaptureMediaStreamTrack::Source::paintCurrentFrameInContext): Deleted.
(WebCore::CanvasCaptureMediaStreamTrack::Source::currentFrameImage): Deleted.
* Modules/mediastream/CanvasCaptureMediaStreamTrack.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
Drive-by change - don't pass status to parent callback, it is a property of the layer.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Drive-by cleanup - we don't
use AVSampleBufferRenderSynchronizer so don't fail if it isn't available.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): Hang onto new frame,
invalidate cached image, update readyState.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerStatusDidChange): No more "updatePausedImage".
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Drive-by cleanup - Add an early
 return if there is no need for a layer.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer): renderingModeChanged -> updateRenderingMode.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Minor cleanup.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Renamed from renderingModeChanged,
add a bool return to signal when the mode changes.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): No more m_haveEverPlayed. Update display
mode immediately.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): No more paused image.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Only return HaveNothing, HaveMetadata,
or HaveEnoughData. Don't return HaveEnoughData until all enabled tracks are providing data and never
drop back to HaveMetadata.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateRenderingMode): Renamed from renderingModeChanged.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged): Update intrinsic
size directly.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated): No more m_hasReceivedMedia.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::readyStateChanged): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): Reset imagePainter
when active video track changes.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): Paint current
frame image.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::CurrentFramePainter::reset): New.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::shouldEnqueueVideoSampleBuffer): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updatePausedImage): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::renderingModeChanged): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::audioSamplesAvailable): Deleted.

* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::paintCurrentFrameInContext): Deleted.
(WebCore::MediaStreamPrivate::currentFrameImage): Deleted.
* platform/mediastream/MediaStreamPrivate.h:

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::endTrack): Update readyState.
(WebCore::MediaStreamTrackPrivate::clone): Clone readyState.
(WebCore::MediaStreamTrackPrivate::sourceStopped): Update readyState.
(WebCore::MediaStreamTrackPrivate::videoSampleAvailable): Ditto.
(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable): Ditto.
(WebCore::MediaStreamTrackPrivate::updateReadyState): New, update readyState and notify observers.
(WebCore::MediaStreamTrackPrivate::paintCurrentFrameInContext): Deleted.
* platform/mediastream/MediaStreamTrackPrivate.h:

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::paintCurrentFrameInContext): Deleted.
* platform/mediastream/RealtimeMediaSource.h:
(WebCore::RealtimeMediaSource::currentFrameImage): Deleted.
(WebCore::RealtimeMediaSource::paintCurrentFrameInContext): Deleted.

* platform/mediastream/mac/AVMediaCaptureSource.mm:
(-[WebCoreAVMediaCaptureSourceObserver disconnect]): Drive-by fix - clear m_callback
after calling removeNotificationObservers.
(-[WebCoreAVMediaCaptureSourceObserver removeNotificationObservers]): Drive-by fix - remove
the correct listener.
(-[WebCoreAVMediaCaptureSourceObserver endSessionInterrupted:]):

* platform/mediastream/mac/AVVideoCaptureSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::currentFrameImage): Deleted.
(WebCore::AVVideoCaptureSource::currentFrameCGImage): Deleted.
(WebCore::AVVideoCaptureSource::paintCurrentFrameInContext): Deleted.

* platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
(WebCore::drawImage): Deleted.
(WebCore::RealtimeIncomingVideoSource::currentFrameImage): Deleted.
(WebCore::RealtimeIncomingVideoSource::paintCurrentFrameInContext): Deleted.
* platform/mediastream/mac/RealtimeIncomingVideoSource.h:

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::paintCurrentFrameInContext): Deleted.
(WebCore::MockRealtimeVideoSource::currentFrameImage): Deleted.
* platform/mock/MockRealtimeVideoSource.h:

LayoutTests:

* fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled-expected.txt:
* fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html: Fix
bug uncovered by patch.

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

2 years ago[GTK][SOUP] Fix build after r213877
clopez@igalia.com [Tue, 14 Mar 2017 00:18:16 +0000 (00:18 +0000)]
[GTK][SOUP] Fix build after r213877
https://bugs.webkit.org/show_bug.cgi?id=140191

Unreviewed build fix.

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::setCookie): Add missing setCookie() declaration.

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

2 years agoSkip WebGPU tests on ios-simulator.
ryanhaddad@apple.com [Mon, 13 Mar 2017 23:05:49 +0000 (23:05 +0000)]
Skip WebGPU tests on ios-simulator.

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

2 years agoWKWebView provides no access to cookies.
beidson@apple.com [Mon, 13 Mar 2017 23:00:49 +0000 (23:00 +0000)]
WKWebView provides no access to cookies.
https://bugs.webkit.org/show_bug.cgi?id=140191

Reviewed by Tim Horton.

Source/WebCore:

Covered by API tests.

* platform/Cookie.h:

* platform/network/NetworkStorageSession.h:
* platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::setCookie):
(WebCore::NetworkStorageSession::deleteCookie):
(WebCore::nsCookiesToCookieVector):
(WebCore::NetworkStorageSession::getAllCookies):
(WebCore::NetworkStorageSession::getCookies):

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::deleteCookie):
(WebCore::NetworkStorageSession::getAllCookies):
(WebCore::NetworkStorageSession::getCookies):

Source/WebKit2:

This adds a new WKHTTPCookieManager SPI.
It follows the NSHTTPCookieStorage API but asynchronous (with completion handlers).

* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:

* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):

* UIProcess/API/APIHTTPCookieStorage.cpp: Added.
(API::HTTPCookieStorage::HTTPCookieStorage):
(API::HTTPCookieStorage::~HTTPCookieStorage):
(API::HTTPCookieStorage::cookies):
(API::HTTPCookieStorage::setCookie):
(API::HTTPCookieStorage::setCookies):
(API::HTTPCookieStorage::deleteCookie):
(API::HTTPCookieStorage::removeCookiesSinceDate):
(API::HTTPCookieStorage::setHTTPCookieAcceptPolicy):
(API::HTTPCookieStorage::getHTTPCookieAcceptPolicy):
* UIProcess/API/APIHTTPCookieStorage.h: Added.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultDataStore):
(API::WebsiteDataStore::httpCookieStorage):
* UIProcess/API/APIWebsiteDataStore.h:

* UIProcess/API/C/WKCookieManager.cpp:
(WKCookieManagerDeleteAllCookiesModifiedAfterDate):
(WKCookieManagerSetHTTPCookieAcceptPolicy):
(WKCookieManagerGetHTTPCookieAcceptPolicy):

* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreGetDefaultDataStore):

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setCookieAcceptPolicy:]):

* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore defaultDataStore]):
(-[WKWebsiteDataStore _httpCookieStorage]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

* UIProcess/API/Cocoa/WKHTTPCookieStorage.h:
* UIProcess/API/Cocoa/WKHTTPCookieStorage.mm: Added.
(coreCookiesToNSCookies):
(-[WKHTTPCookieStorage dealloc]):
(-[WKHTTPCookieStorage fetchCookies:]):
(-[WKHTTPCookieStorage fetchCookiesForURL:completionHandler:]):
(-[WKHTTPCookieStorage setCookie:completionHandler:]):
(-[WKHTTPCookieStorage deleteCookie:completionHandler:]):
(-[WKHTTPCookieStorage setCookies:forURL:mainDocumentURL:completionHandler:]):
(-[WKHTTPCookieStorage removeCookiesSinceDate:completionHandler:]):
(-[WKHTTPCookieStorage setCookieAcceptPolicy:completionHandler:]):
(kitCookiePolicyToNSCookiePolicy):
(-[WKHTTPCookieStorage fetchCookieAcceptPolicy:]):
(-[WKHTTPCookieStorage _apiObject]):
* UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h.
(WebKit::wrapper):

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::addSingleCookie):

* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
(WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
(WebKit::WebCookieManagerProxy::deleteAllCookies):
(WebKit::WebCookieManagerProxy::deleteCookie):
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManagerProxy::setCookie):
(WebKit::WebCookieManagerProxy::setCookies):
(WebKit::WebCookieManagerProxy::getAllCookies):
(WebKit::WebCookieManagerProxy::getCookies):
(WebKit::WebCookieManagerProxy::didSetCookies):
(WebKit::WebCookieManagerProxy::didGetCookies):
(WebKit::WebCookieManagerProxy::didDeleteCookies):
(WebKit::WebCookieManagerProxy::startObservingCookieChanges):
(WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
(WebKit::WebCookieManagerProxy::setCookieObserverCallback):
(WebKit::WebCookieManagerProxy::cookiesDidChange):
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::didSetHTTPCookieAcceptPolicy):
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebCookieManagerProxy.messages.in:

* UIProcess/WebFrameProxy.h:

* UIProcess/WebProcessPool.cpp:
* UIProcess/WebProcessPool.h:

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::processPoolForCookieStorageOperations):
(WebKit::WebsiteDataStore::processPools):
* UIProcess/WebsiteData/WebsiteDataStore.h:

* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::deleteCookie):
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::getAllCookies):
(WebKit::WebCookieManager::getCookies):
(WebKit::WebCookieManager::setCookie):
(WebKit::WebCookieManager::setCookies):
(WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Cookies/WebCookieManager.messages.in:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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

2 years agoFTL should not flush strict arguments unless it really needs to
fpizlo@apple.com [Mon, 13 Mar 2017 22:52:41 +0000 (22:52 +0000)]
FTL should not flush strict arguments unless it really needs to
https://bugs.webkit.org/show_bug.cgi?id=169519

Reviewed by Mark Lam.

This is a refinement that we should have done ages ago. This kills some pointless PutStacks
in DFG SSA IR. It can sometimes unlock other optimizations.

Relanding after I fixed the special cases for CreateArguments-style nodes.

* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

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

2 years agoWeb Inspector: WebSockets: color of outgoing message icon should match text color
nvasilyev@apple.com [Mon, 13 Mar 2017 22:35:29 +0000 (22:35 +0000)]
Web Inspector: WebSockets: color of outgoing message icon should match text color
https://bugs.webkit.org/show_bug.cgi?id=169512
<rdar://problem/30994284>

Reviewed by Devin Rousso.

Include SVG icon as an inline SVG element to make currentColor work.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Views/WebSocketContentView.css:
(.web-socket.content-view .outgoing .icon): Deleted.
* UserInterface/Views/WebSocketContentView.js:
(WebInspector.WebSocketContentView):
(WebInspector.WebSocketContentView.prototype.addFrame):
(WebInspector.WebSocketContentView.prototype._addRow):
(WebInspector.WebSocketContentView.prototype._timeStringFromTimestamp): Deleted.
* UserInterface/Views/WebSocketDataGridNode.js: Added.
(WebInspector.WebSocketDataGridNode.prototype.createCellContent):
(WebInspector.WebSocketDataGridNode.prototype._timeStringFromTimestamp):
(WebInspector.WebSocketDataGridNode):

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

2 years agoWeb Inspector: Event Listeners detail section is unhelpful, default should show liste...
webkit@devinrousso.com [Mon, 13 Mar 2017 22:29:47 +0000 (22:29 +0000)]
Web Inspector: Event Listeners detail section is unhelpful, default should show listeners by element rather than by event
https://bugs.webkit.org/show_bug.cgi?id=167077

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Views/EventListenerSection.js: Removed.

* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.eventListeners): Renamed to getEventListeners.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.css: Added.
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter):
(body[dir=ltr] .sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter):
(body[dir=rtl] .sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter:hover):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter:active):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners.collapsed > .header > .filter):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter > select):

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.createOption):
(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.createEventListenerSection):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByEvent):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners):
Add a filter to the Event Listeners section that changes the way in which event listeners
are grouped.  Currently supports two methods:
 - Group by Event
 - Group by Node

* UserInterface/Views/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup):
Add ability to display the event type.

* UserInterface/Views/DetailsSection.css:
(.details-section):
Drive-by fix: CSS variable was named incorrectly.

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

2 years agoWeb Inspector: Event Listeners section is missing 'once', 'passive' event listener...
webkit@devinrousso.com [Mon, 13 Mar 2017 22:27:20 +0000 (22:27 +0000)]
Web Inspector: Event Listeners section is missing 'once', 'passive' event listener flags
https://bugs.webkit.org/show_bug.cgi?id=167080

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/DOM.json:
Add "passive" and "once" items to the EventListener type.

Source/WebCore:

Test: inspector/dom/getEventListenersForNode.html

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
Add "passive" and "once" values to the EventListener protocol object when applicable.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup):
(WebInspector.EventListenerSectionGroup.prototype._type): Deleted.

LayoutTests:

Tests the result of DOMAgent.getEventListenersForNode and ensures that additional options
are passed to the frontend.

* inspector/dom/getEventListenersForNode-expected.txt: Added.
* inspector/dom/getEventListenersForNode.html: Added.

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

2 years agoRemove obsolete experimental ObjC SPI.
mark.lam@apple.com [Mon, 13 Mar 2017 22:06:20 +0000 (22:06 +0000)]
Remove obsolete experimental ObjC SPI.
https://bugs.webkit.org/show_bug.cgi?id=169569

Reviewed by Saam Barati.

* API/JSVirtualMachine.mm:
(-[JSVirtualMachine enableSigillCrashAnalyzer]): Deleted.
* API/JSVirtualMachinePrivate.h: Removed.
* JavaScriptCore.xcodeproj/project.pbxproj:

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

2 years agoResource Load Statistics: More efficient network process messaging + Fix bug in user...
wilander@apple.com [Mon, 13 Mar 2017 21:50:50 +0000 (21:50 +0000)]
Resource Load Statistics: More efficient network process messaging + Fix bug in user interaction reporting
https://bugs.webkit.org/show_bug.cgi?id=169506

Reviewed by Alex Christensen.

Source/WebCore:

Covered by previous test which now follows the code path more closely to when reporting
happens in the web process.

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
    No longer explicitly calls ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().
    Instead just calls ResourceLoadStatisticsStore::fireDataModificationHandler().
(WebCore::ResourceLoadObserver::logUserInteraction):
    Updated to call the new ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().
(WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler):
    Now takes two vectors – domainsToRemove and domainsToAdd.
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::toString):
    Added boolean field isMarkedForCookiePartitioning.
(WebCore::ResourceLoadStatistics::merge):
    Added boolean field isMarkedForCookiePartitioning.
* loader/ResourceLoadStatistics.h:
    Added boolean field isMarkedForCookiePartitioning.
* loader/ResourceLoadStatisticsStore.cpp:
(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
    Now marks statistics with isMarkedForCookiePartitioning before sending them off to
    ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().
(WebCore::ResourceLoadStatisticsStore::setShouldPartitionCookiesCallback):
    Now accepts a handler with two vectors.
(WebCore::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):
    Now the only exported version of this function is the one without arguments.
    The one internal to WebCore accepts two vectors – domainsToRemove and domainsToAdd.
    The exported one generates the two vectors and then calls the internal one.
(WebCore::ResourceLoadStatisticsStore::hasHadRecentUserInteraction):
    No longer explicitly calls ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().
* loader/ResourceLoadStatisticsStore.h:
* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::setShouldPartitionCookiesForHosts):
    Now takes two vectors – domainsToRemove and domainsToAdd.

Source/WebKit2:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::shouldPartitionCookiesForTopPrivatelyOwnedDomains):
    Now takes two vectors – domainsToRemove and domainsToAdd.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
    The message now takes two vectors – domainsToRemove and domainsToAdd.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::shouldPartitionCookiesForTopPrivatelyOwnedDomains):
    Now takes two vectors – domainsToRemove and domainsToAdd.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
    The message now takes two vectors – domainsToRemove and domainsToAdd.
* UIProcess/WebResourceLoadStatisticsManager.cpp:
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
    Now converts to the two vectors needed by
    WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler().
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::classifyResource):
    No longer explicitly calls ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().
(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
    Changed the order of two blocks to not build a vector if we are to return early.
(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
    Now calls WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler().
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
    Now takes a handler with two vectors – domainsToRemove and domainsToAdd.
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::shouldPartitionCookiesForTopPrivatelyOwnedDomains):
    Now takes two vectors – domainsToRemove and domainsToAdd.
(WebKit::WebsiteDataStore::registerSharedResourceLoadObserver):
    Now submits a handler that takes two vectors – domainsToRemove and domainsToAdd.
* UIProcess/WebsiteData/WebsiteDataStore.h:

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

2 years agoDatabase's query functions should support querying for a row with NULL value
rniwa@webkit.org [Mon, 13 Mar 2017 21:44:32 +0000 (21:44 +0000)]
Database's query functions should support querying for a row with NULL value
https://bugs.webkit.org/show_bug.cgi?id=169504

Reviewed by Antti Koivisto.

Add the support for calling select_* with one of column values set to NULL.
This feature is useful in webkit.org/b/146374 and webkit.org/b/168962.

* public/include/db.php:
(Database::prepare_params): Added $null_columns as an optional argument.
(Database::select_conditions_with_null_columns): Added. Builds up a query string by appending AND x is NULL
to match columns whose value must be NULL.
(Database::_select_update_or_insert_row):
(Database::select_rows):

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

2 years agoSource/WebCore:
dino@apple.com [Mon, 13 Mar 2017 21:36:46 +0000 (21:36 +0000)]
Source/WebCore:
Respect the runtime flag for WebGPU, default feature to off.
https://bugs.webkit.org/show_bug.cgi?id=169564
<rdar://problems/31018864>

Reviewed by Tim Horton.

Make sure WebGPU respects its runtime feature flag. Also, since
this implementation doesn't validate content, it should default
to being disabled.

Test: fast/canvas/webgpu/webgpu-runtime-flag.html

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::getContextWebGPU):

Source/WebKit2:
Respect the runtime flag for WebGPU, default feature to off, and print a warning
https://bugs.webkit.org/show_bug.cgi?id=169564
<rdar://problems/31018864>

Reviewed by Tim Horton.

Make sure WebGPU respects its runtime feature flag. Also, since
this implementation doesn't validate content, it should default
to being disabled.

* Shared/WebPreferencesDefinitions.h:

LayoutTests:
Respect the runtime flag for WebGPU, default feature to off, and print a warning
https://bugs.webkit.org/show_bug.cgi?id=169564
<rdar://problem/31018864>

Reviewed by Tim Horton.

* fast/canvas/webgpu/webgpu-runtime-flag-expected.txt: Added.
* fast/canvas/webgpu/webgpu-runtime-flag.html: Added.

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

2 years ago[GTK] install-dependencies needs to install Perl CGI modules on Debian based distros
clopez@igalia.com [Mon, 13 Mar 2017 21:26:11 +0000 (21:26 +0000)]
[GTK] install-dependencies needs to install Perl CGI modules on Debian based distros
https://bugs.webkit.org/show_bug.cgi?id=169563

Reviewed by Michael Catanzaro.

* gtk/install-dependencies:

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

2 years agoUnreviewed, fix accidental comma.
webkit@devinrousso.com [Mon, 13 Mar 2017 21:14:43 +0000 (21:14 +0000)]
Unreviewed, fix accidental comma.

* Scripts/webkitpy/common/config/contributors.json:

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

2 years agoUnreviewed, change my email.
webkit@devinrousso.com [Mon, 13 Mar 2017 21:11:41 +0000 (21:11 +0000)]
Unreviewed, change my email.

* Scripts/webkitpy/common/config/contributors.json:

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

2 years agoFix CMake build.
achristensen@apple.com [Mon, 13 Mar 2017 20:17:17 +0000 (20:17 +0000)]
Fix CMake build.

* PlatformMac.cmake:
Add new files.

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

2 years agoFix build warnings.
andersca@apple.com [Mon, 13 Mar 2017 20:16:24 +0000 (20:16 +0000)]
Fix build warnings.

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate openDocument:]):
* MiniBrowser/mac/ExtensionManagerWindowController.m:
(-[ExtensionManagerWindowController add:]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):

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

2 years agoFix more build warnings.
andersca@apple.com [Mon, 13 Mar 2017 20:08:04 +0000 (20:08 +0000)]
Fix more build warnings.

* UIProcess/mac/WKWebInspectorWKWebView.mm:
(WebKit::runOpenPanel):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSave):

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

2 years agoRemove my email from some of the watchlists
commit-queue@webkit.org [Mon, 13 Mar 2017 19:46:05 +0000 (19:46 +0000)]
Remove my email from some of the watchlists
https://bugs.webkit.org/show_bug.cgi?id=169541

Patch by Martin Robinson <mrobinson@igalia.com> on 2017-03-13
Reviewed by Manuel Rego Casasnovas.

* Scripts/webkitpy/common/config/watchlist: Remove my name from some lists.

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

2 years agoFix build warnings.
andersca@apple.com [Mon, 13 Mar 2017 19:42:05 +0000 (19:42 +0000)]
Fix build warnings.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::save):
(-[WebInspectorWindowController webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):

Source/WebKit2:

* UIProcess/mac/RemoteWebInspectorProxyMac.mm:
(WebKit::RemoteWebInspectorProxy::platformSave):

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

2 years agoUnreviewed, rolling out r213856.
commit-queue@webkit.org [Mon, 13 Mar 2017 19:36:27 +0000 (19:36 +0000)]
Unreviewed, rolling out r213856.
https://bugs.webkit.org/show_bug.cgi?id=169562

Breaks JSC stress test stress/super-property-access.js.ftl-
eager failing (Requested by mlam|g on #webkit).

Reverted changeset:

"FTL should not flush strict arguments unless it really needs
to"
https://bugs.webkit.org/show_bug.cgi?id=169519
http://trac.webkit.org/changeset/213856

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

2 years ago[JSC][Linux] Allow profilers to demangle C++ names
utatane.tea@gmail.com [Mon, 13 Mar 2017 19:09:07 +0000 (19:09 +0000)]
[JSC][Linux] Allow profilers to demangle C++ names
https://bugs.webkit.org/show_bug.cgi?id=169559

Reviewed by Michael Catanzaro.

Linux also offers dladdr & demangling feature.
Thus, we can use it to show the names in profilers.
For example, SamplingProfiler tells us the C function names.

* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::StackFrame::displayName):
* tools/CodeProfile.cpp:
(JSC::symbolName):

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

2 years ago[WTF] Clean up RunLoop and WorkQueue with Seconds and Function
utatane.tea@gmail.com [Mon, 13 Mar 2017 18:56:54 +0000 (18:56 +0000)]
[WTF] Clean up RunLoop and WorkQueue with Seconds and Function
https://bugs.webkit.org/show_bug.cgi?id=169537

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* runtime/Watchdog.cpp:
(JSC::Watchdog::startTimer):

Source/WebKit2:

* Shared/ChildProcess.cpp:
(WebKit::didCloseOnConnectionWorkQueue):
* UIProcess/Storage/LocalStorageDatabase.cpp:
* WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
(WebKit::AcceleratedSurfaceX11::resize):

Source/WTF:

This patch modernizes RunLoop and WorkQueue.

1. Use Ref<> aggressively
2. Use Seconds instead of chrono times
3. Use Function<> instead of std::function

* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
* wtf/RunLoop.h:
* wtf/WorkQueue.h:
* wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::dispatchAfter):
(WTF::WorkQueue::concurrentApply):
* wtf/generic/MainThreadGeneric.cpp:
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/generic/RunLoopGeneric.cpp:
(WTF::RunLoop::TimerBase::ScheduledTask::create):
(WTF::RunLoop::TimerBase::ScheduledTask::EarliestSchedule::operator()):
(WTF::RunLoop::populateTasks):
(WTF::RunLoop::runImpl):
(WTF::RunLoop::schedule):
(WTF::RunLoop::scheduleAndWakeUp):
(WTF::RunLoop::dispatchAfter):
(WTF::RunLoop::TimerBase::start):
* wtf/generic/WorkQueueGeneric.cpp:
(WorkQueue::dispatch):
(WorkQueue::dispatchAfter):
* wtf/glib/RunLoopGLib.cpp:
(WTF::DispatchAfterContext::DispatchAfterContext):
(WTF::RunLoop::dispatchAfter):
(WTF::RunLoop::TimerBase::updateReadyTime):
(WTF::RunLoop::TimerBase::start):
* wtf/win/WorkQueueWin.cpp:
(WTF::WorkQueue::performWorkOnRegisteredWorkThread):
(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::dispatchAfter):

Tools:

* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
(TestWebKitAPI::TEST):

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

2 years agoAllow termination of background WebProcesses that go over a given CPU usage threshold
cdumez@apple.com [Mon, 13 Mar 2017 18:09:30 +0000 (18:09 +0000)]
Allow termination of background WebProcesses that go over a given CPU usage threshold
https://bugs.webkit.org/show_bug.cgi?id=169456
<rdar://problem/30960968>

Reviewed by Andreas Kling.

Source/WebCore:

Add CPUMonitor utility class to monitor CPU usage and call a provided lambda
whenever the process exceeds the provided CPU limit over a given period of
time.

* WebCore.xcodeproj/project.pbxproj:
* platform/CPUMonitor.cpp: Added.
(WebCore::CPUMonitor::CPUMonitor):
(WebCore::CPUMonitor::setCPULimit):
(WebCore::CPUMonitor::timerFired):
* platform/CPUMonitor.h: Added.

Source/WebKit2:

Allow termination of background WebProcesses that go over a given CPU usage threshold.
This can be enabled client side via the WKPageConfigurationSetBackgroundCPULimit()
SPI. The client provides the actual CPU threshold it wants to use at page level.

If such limit is set, whenever a WebContent process has no visible pages, we start
monitoring its CPU usage over 15 minutes periods. At the end of each period, we
check if the process' average CPU usage over this period was greater than the
background CPU limit. If it greater, the WebContent process send an IPC message to
the UIProcess letting it know that it exceeded the CPU limit. The UI process will
then log a message and terminate the process unless it has any audio playing.

Once a WebProcess has been terminated, we do not let the client know until one of its
pages becomes visible again. When this happens, we call the processDidCrash
delegate and Safari will take care of reloading the tab and showing the crash
banner then. This is done because we do not want to reload content that is
using a lot of CPU while in the background.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
Add backgroundCPULimit to WebPageCreationParameters.

* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::copy):
* UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::backgroundCPULimit):
(API::PageConfiguration::setBackgroundCPULimit):
Add backgroundCPULimit to APIPageConfiguration.

* UIProcess/API/C/WKPageConfigurationRef.cpp:
(WKPageConfigurationSetBackgroundCPULimit):
* UIProcess/API/C/WKPageConfigurationRef.h:
Add SPI to set background CPU limit.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess):
Reset m_wasTerminatedDueToResourceExhaustionWhileInBackground flag
as the process was restarted.

(WebKit::WebPageProxy::dispatchActivityStateChange):
When the visibility state changes for a page that was terminated
while in the background due to exceeded CPU limit, notify the
client that the process crashed via the processDidCrash delegate.
Safari will use this delegate to reload the tab and show the crash
banner.

(WebKit::WebPageProxy::terminateProcess):
Add parameter to terminateProcess() to provide the reason. If the
page was terminated due to reaching CPU limit, set a flag so we
can delay calling processDidCrash until the page becomes visible
again.

(WebKit::WebPageProxy::creationParameters):
Set backgroundCPULimit on the WebPageCreationParameters.

* UIProcess/WebPageProxy.h:

* UIProcess/WebProcessProxy.cpp:
(WebKit::pagesCopy):
Add utility function to copy the list of pages to a Vector.

(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):
When we get an IPC message from a WebContent process to let us
know that the process exceeded the background CPU limit, we log
a message and we terminate it if it has no audio playing.

* UIProcess/WebProcessProxy.h:

* UIProcess/WebProcessProxy.messages.in:
Add DidExceedBackgroundCPULimit IPC message so the WebContent process
can let us know when it goes over the background CPU limit.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_backgroundCPULimit):
(WebKit::WebPage::setActivityState):
Notify the WebProcess whenever the activity state of a WebPage changes.
The WebProcess currently uses this information to determine when the
visibility of a page changes. This is needed as we only want to monitor
CPU usage of *background* WebContent processes (processes that have no
visible WebPage).

* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::backgroundCPULimit):

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::createWebPage):
(WebKit::WebProcess::removeWebPage):
Call updateBackgroundCPULimit() whenever a WebPage is added or removed
since the limit is per page.

(WebKit::WebProcess::updateBackgroundCPULimit):
(WebKit::WebProcess::updateBackgroundCPUMonitorState):
No-ops on other platforms than Mac at the moment.

(WebKit::WebProcess::pageActivityStateDidChange):
Call updateBackgroundCPUMonitorState() whenever the visibility of the
WebPage changes as we only monitor the CPU usage of *background* WebContent
processes.

(WebKit::WebProcess::hasVisibleWebPage):
Add utility function to determine if there is any visible WebPage in this
WebContent process. If the function returns false, then we consider the
WebContent process to be a *background* WebContent process.

* WebProcess/WebProcess.h:

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::updateBackgroundCPULimit):
Compute the WebProcess' background CPU limit given the limit set for each
of its WebPages. We use the largest (i.e. most permissive) background CPU
limit among all the pages.

(WebKit::WebProcess::updateBackgroundCPUMonitorState):
Update the state of the background CPU monitor. This is called whenever
the background CPU limit of the process changes or whenever the visibility
of a WebPage changes.

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

2 years agoFTL should not flush strict arguments unless it really needs to
fpizlo@apple.com [Mon, 13 Mar 2017 18:00:25 +0000 (18:00 +0000)]
FTL should not flush strict arguments unless it really needs to
https://bugs.webkit.org/show_bug.cgi?id=169519

Reviewed by Mark Lam.

JSTests:

This benchmark runs 3.5x faster thanks to this patch.

* microbenchmarks/strict-arguments-no-escape.js: Added.
(foo):
(bar):
(baz):

Source/JavaScriptCore:

This is a refinement that we should have done ages ago. This kills some pointless PutStacks
in DFG SSA IR. It can sometimes unlock other optimizations.

* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

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

2 years agoUpdated Swedish translation
mcatanzaro@igalia.com [Mon, 13 Mar 2017 17:54:21 +0000 (17:54 +0000)]
Updated Swedish translation
https://bugs.webkit.org/show_bug.cgi?id=169549

Patch by Josef Andersson <l10nl18nsweja@gmail.com> on 2017-03-13
Rubber-stamped by Michael Catanzaro.

* sv.po:

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

2 years agoAdd iOS plumbing to WebProcess to enable JavaScriptCore configuration and logging
msaboff@apple.com [Mon, 13 Mar 2017 17:51:53 +0000 (17:51 +0000)]
Add iOS plumbing to WebProcess to enable JavaScriptCore configuration and logging
https://bugs.webkit.org/show_bug.cgi?id=169489

Reviewed by Geoffrey Garen.

Added new preference for enabling the use of a JavaScript configuration file
in iOS builds.  The preference is used to enable the processing of the
configuration file.

(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory):
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory):
(API::WebsiteDataStore::tempDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::setJavaScriptConfigurationFileEnabledFromDefaults):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
* UIProcess/WebProcessPool.h:

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

2 years agoVersioning.
jmarcell@apple.com [Mon, 13 Mar 2017 17:40:30 +0000 (17:40 +0000)]
Versioning.

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

2 years ago[JSC] It should be possible create a label named let when parsing Statement in non...
commit-queue@webkit.org [Mon, 13 Mar 2017 17:03:19 +0000 (17:03 +0000)]
[JSC] It should be possible create a label named let when parsing Statement in non strict mode
https://bugs.webkit.org/show_bug.cgi?id=168684

Patch by Caio Lima <ticaiolima@gmail.com> on 2017-03-13
Reviewed by Saam Barati.

JSTests:

* ChakraCore/test/LetConst/DeclOutofBlock.baseline-jsc:

Source/JavaScriptCore:

This patch is fixing a Parser bug to allow define a label named
```let``` in sloppy mode when parsing a Statement.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseStatement):

LayoutTests:

* js/let-syntax-expected.txt:
* js/script-tests/let-syntax.js:
(shouldNotHaveSyntaxErrorSloopyOnly):

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

2 years agoRebaseline js/dom/global-constructors-attributes.html.
ryanhaddad@apple.com [Mon, 13 Mar 2017 16:57:55 +0000 (16:57 +0000)]
Rebaseline js/dom/global-constructors-attributes.html.

Unreviewed test gardening.

* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:

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

2 years ago[Modern Media Controls] Volume icon doesn't turn to mute when the knob is set to 0
commit-queue@webkit.org [Mon, 13 Mar 2017 16:39:08 +0000 (16:39 +0000)]
[Modern Media Controls] Volume icon doesn't turn to mute when the knob is set to 0
https://bugs.webkit.org/show_bug.cgi?id=169553
<rdar://problem/30754543>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-13
Reviewed by Eric Carlson.

Source/WebCore:

When we start changing the volume using the mouse, we record the volume at that point
and as we drag the volume slider, we set the mute button to show that the media is
muted if the volume is 0, and set the actual media volume to be the initial volume
prior to dragging. This way, when we toggle the "muted" property by pressing the
mute button, the original volume is restored.

To function correctly, this required some changed to Slider. The volume slider would
fail to update if the value set was the same as the initial value since we would use
only the "change" event to identify the end of a slider drag interaction. This was
incorrect since if the initial value and the final value while dragging the slider
were the same, no "change" event would be fired. So we now use mouse events to
identify when the slider is being dragged.

Test: media/modern-media-controls/volume-support/volume-support-drag-to-mute.html

* Modules/modern-media-controls/controls/slider.js:
(Slider.prototype.set value):
(Slider.prototype.handleEvent):
(Slider.prototype._handleMousedownEvent):
(Slider.prototype._handleInputEvent):
(Slider.prototype._handleMouseupEvent):
(Slider.prototype._handleChangeEvent): Deleted.
* Modules/modern-media-controls/controls/volume-slider.js:
(VolumeSlider):
(VolumeSlider.prototype.draw):
(VolumeSlider.prototype.handleEvent): Deleted.
* Modules/modern-media-controls/media/volume-support.js:
(VolumeSupport.prototype.controlValueWillStartChanging):
(VolumeSupport.prototype.controlValueDidChange):

LayoutTests:

Adding a new test where we drag the volume slider to 0 and ensure that the volume gets muted
and that clicking on the mute button resets the volume to be the same value as prior to the
dragging interaction.

* media/modern-media-controls/volume-support/volume-support-drag-to-mute-expected.txt: Added.
* media/modern-media-controls/volume-support/volume-support-drag-to-mute.html: Added.

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

2 years ago[Win] Compile error.
pvollan@apple.com [Mon, 13 Mar 2017 16:29:22 +0000 (16:29 +0000)]
[Win] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=169546

Reviewed by Brent Fulgham.

There is no matching constructor in the Cookie class.

* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::getRawCookies):

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

2 years ago[Win] Compile fix.
pvollan@apple.com [Mon, 13 Mar 2017 16:26:48 +0000 (16:26 +0000)]
[Win] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=169545

Reviewed by Brent Fulgham.

Fix inconsistent dll linkage warnings.

* WebKitDLL.cpp:
* WebKitDLL.h:

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

2 years ago[GTK] Remove dead code from previous autotools build in build-jsc
clopez@igalia.com [Mon, 13 Mar 2017 15:46:00 +0000 (15:46 +0000)]
[GTK] Remove dead code from previous autotools build in build-jsc
https://bugs.webkit.org/show_bug.cgi?id=169555

Reviewed by Carlos Garcia Campos.

* Scripts/build-jsc:
(buildMyProject):

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

2 years ago[WK2] Move AcceleratedSurface files under WebProcess/WebPage/CoordinatedGraphics
zandobersek@gmail.com [Mon, 13 Mar 2017 14:42:38 +0000 (14:42 +0000)]
[WK2] Move AcceleratedSurface files under WebProcess/WebPage/CoordinatedGraphics
https://bugs.webkit.org/show_bug.cgi?id=169348

Reviewed by Carlos Garcia Campos.

Move the AcceleratedSurface header and implementation files under the
WebProcess/WebPage directory since that class is not specific to the
GTK+ port.

* PlatformGTK.cmake:
* WebProcess/WebPage/AcceleratedSurface.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.cpp.
(WebKit::AcceleratedSurface::create):
(WebKit::AcceleratedSurface::AcceleratedSurface):
(WebKit::AcceleratedSurface::resize):
* WebProcess/WebPage/AcceleratedSurface.h: Renamed from Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.h.
(WebKit::AcceleratedSurface::window):
(WebKit::AcceleratedSurface::surfaceID):
(WebKit::AcceleratedSurface::shouldPaintMirrored):

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

2 years ago[cmake] [WK2] Guard flags intended for GCC-like compilers with COMPILER_IS_GCC_OR_CLANG
annulen@yandex.ru [Mon, 13 Mar 2017 14:04:37 +0000 (14:04 +0000)]
[cmake] [WK2] Guard flags intended for GCC-like compilers with COMPILER_IS_GCC_OR_CLANG
https://bugs.webkit.org/show_bug.cgi?id=169551

Reviewed by Yusuke Suzuki.

This change allows building WK2 code with MSVC.

* CMakeLists.txt:

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

2 years agoImageDecoder can be deleted while the async decoder thread is still using it
magomez@igalia.com [Mon, 13 Mar 2017 12:01:02 +0000 (12:01 +0000)]
ImageDecoder can be deleted while the async decoder thread is still using it
https://bugs.webkit.org/show_bug.cgi?id=169199

Reviewed by Carlos Garcia Campos.

Make the image decoder used by ImageSource and ImageFrameCache into a RefPtr instead of
and unique_ptr, and pass a reference to the decoder thread. This ensures that the decoder
will stay alive as long as the decoding thread is processing frames. Also, stop the async
decoding queue if a new decoder is set to ImageFrameCache.

No new tests.

* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::setDecoder):
(WebCore::ImageFrameCache::decoder):
(WebCore::ImageFrameCache::startAsyncDecodingQueue):
(WebCore::ImageFrameCache::metadata):
* platform/graphics/ImageFrameCache.h:
(WebCore::ImageFrameCache::setDecoder): Deleted.
Moved to source file so we can keep the ImageDecoder forward declaration.
(WebCore::ImageFrameCache::decoder): Deleted.
Moved to source file so we can keep the ImageDecoder forward declaration.
* platform/graphics/ImageSource.h:
* platform/graphics/cg/ImageDecoderCG.h:
(WebCore::ImageDecoder::create):
* platform/graphics/win/ImageDecoderDirect2D.h:
(WebCore::ImageDecoder::create):
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::create):
* platform/image-decoders/ImageDecoder.h:

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

2 years agoUnprefix -webkit-min-content, -webkit-max-content and -webkit-fit-content
rego@igalia.com [Mon, 13 Mar 2017 11:44:45 +0000 (11:44 +0000)]
Unprefix -webkit-min-content, -webkit-max-content and -webkit-fit-content
https://bugs.webkit.org/show_bug.cgi?id=169195

Reviewed by Sergio Villar Senin.

Based on Blink r200846 by <cbiesinger@chromium.org>.
https://src.chromium.org/viewvc/blink?revision=200846&view=revision

Source/WebCore:

This patch adds support for the unprefixed version of these properties,
while it keeps the prefixed ones working too.
-webkit-fill-available is left out of this change, as the CSS WG
is still defining the final keyword and behavior.

With this patch WebKit will be in the same situation than Blink
regarding these intrinsic sizing keywords (see http://crbug.com/245157).

Test: fast/css-intrinsic-dimensions/height-property-value.html
      fast/css-intrinsic-dimensions/width-property-value.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::init):
* css/CSSValueKeywords.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertLengthSizing):
(WebCore::StyleBuilderConverter::createGridTrackBreadth):
* css/html.css:
(fieldset):
* css/parser/CSSPropertyParser.cpp:
(WebCore::validWidthOrHeightKeyword):
(WebCore::isGridTrackFixedSized):
(WebCore::consumeGridBreadth):
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):

LayoutTests:

For most of the tests the only change is that we remove the prefix in these properties.
Additionally we're checking the behavior of both the prefixed and unprefixed versions in:
- fast/css-intrinsic-dimensions/height-property-value.html
- fast/css-intrinsic-dimensions/width-property-value.html

On top of that, a few tests from the CSS Grid Layout W3C test suite are now passing.

* TestExpectations:
* css3/flexbox/flexitem.html:
* css3/flexbox/orthogonal-writing-modes-and-intrinsic-sizing-expected.txt: Update results
as tests is now passing (it was using "min-content" already and thus failing on WebKit).
* css3/flexbox/overflow-auto-resizes-correctly.html:
* fast/css-grid-layout/fit-content-columns-expected.html:
* fast/css-grid-layout/fit-content-columns.html:
* fast/css-grid-layout/fit-content-rows-expected.html:
* fast/css-grid-layout/fit-content-rows.html:
* fast/css-grid-layout/flex-and-content-sized-resolution-columns.html:
* fast/css-grid-layout/flex-and-minmax-content-resolution-columns.html:
* fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html:
* fast/css-grid-layout/float-not-protruding-into-next-grid-item.html:
* fast/css-grid-layout/grid-auto-columns-rows-auto-flow-resolution.html:
* fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-auto-columns-rows-get-set.html:
* fast/css-grid-layout/grid-auto-columns-rows-resolution.html:
* fast/css-grid-layout/grid-auto-columns-rows-update.html:
* fast/css-grid-layout/grid-auto-fill-columns.html:
* fast/css-grid-layout/grid-auto-fill-rows.html:
* fast/css-grid-layout/grid-auto-fit-columns.html:
* fast/css-grid-layout/grid-auto-fit-rows.html:
* fast/css-grid-layout/grid-auto-repeat-intrinsic.html:
* fast/css-grid-layout/grid-automatic-minimum-for-auto-columns.html:
* fast/css-grid-layout/grid-automatic-minimum-for-auto-rows.html:
* fast/css-grid-layout/grid-change-intrinsic-size-with-auto-repeat-tracks.html:
* fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/grid-columns-rows-get-set.html:
* fast/css-grid-layout/grid-content-alignment-overflow.html:
* fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks.html:
* fast/css-grid-layout/grid-content-sized-columns-resolution.html:
* fast/css-grid-layout/grid-dynamic-updates-relayout.html:
* fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
* fast/css-grid-layout/grid-element-auto-repeat-get-set.html:
* fast/css-grid-layout/grid-element-repeat-get-set.html:
* fast/css-grid-layout/grid-grow-tracks-to-their-max.html:
* fast/css-grid-layout/grid-gutters-and-flex-content.html:
* fast/css-grid-layout/grid-gutters-and-tracks.html:
* fast/css-grid-layout/grid-gutters-get-set.html:
* fast/css-grid-layout/grid-indefinite-calculated-height-crash-expected.txt:
* fast/css-grid-layout/grid-indefinite-calculated-height-crash.html:
* fast/css-grid-layout/grid-initialize-span-one-items.html:
* fast/css-grid-layout/grid-intrinsic-maximums.html:
* fast/css-grid-layout/grid-item-addition-track-breadth-update.html:
* fast/css-grid-layout/grid-item-auto-margins-must-respect-specified-margins.html:
* fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html:
* fast/css-grid-layout/grid-item-removal-track-breadth-update.html:
* fast/css-grid-layout/grid-item-sizing-with-orthogonal-flows.html:
* fast/css-grid-layout/grid-item-spanning-and-orthogonal-flows.html:
* fast/css-grid-layout/grid-item-with-border-in-intrinsic.html:
* fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html:
* fast/css-grid-layout/grid-preferred-logical-widths.html:
* fast/css-grid-layout/grid-template-shorthand-get-set.html:
* fast/css-grid-layout/grid-update-sizes-after-distributing-all.html:
* fast/css-grid-layout/implicit-position-dynamic-change.html:
* fast/css-grid-layout/mark-as-infinitely-growable.html:
* fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html:
* fast/css-grid-layout/minmax-max-content-resolution-columns.html:
* fast/css-grid-layout/minmax-max-content-resolution-rows.html:
* fast/css-grid-layout/minmax-min-content-column-resolution-columns.html:
* fast/css-grid-layout/minmax-min-content-column-resolution-rows.html:
* fast/css-grid-layout/minmax-spanning-resolution-columns.html:
* fast/css-grid-layout/minmax-spanning-resolution-rows.html:
* fast/css-grid-layout/named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/named-grid-line-get-set.html:
* fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/non-grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/non-grid-columns-rows-get-set.html:
* fast/css-grid-layout/non-named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/non-named-grid-line-get-set.html:
* fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js:
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:
* fast/css-intrinsic-dimensions/css-tables.html:
* fast/css-intrinsic-dimensions/height-property-value-expected.txt:
* fast/css-intrinsic-dimensions/height-property-value.html:
* fast/css-intrinsic-dimensions/intrinsic-sized-absolutes.html:
* fast/css-intrinsic-dimensions/intrinsic-sized-blocks.html:
* fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes.html:
* fast/css-intrinsic-dimensions/tables.html:
* fast/css-intrinsic-dimensions/width-property-value-expected.txt:
* fast/css-intrinsic-dimensions/width-property-value.html:
* fast/events/key-events-in-editable-gridbox.html:
* fast/regions/intrinsic-sized-regions.html:
* fast/regions/overflow/overflow-scrollable-fit-complex-expected.html:
* fast/replaced/before-content-intrinsic-crash.html:
* fast/table/assert-on-min-max-content-values.html:
* imported/blink/svg/css/replaced-intrinsic-ratio-min-width-min-content.html:

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

2 years ago[WK2] Only report background WebProcesses as unresponsive in the background after...
cdumez@apple.com [Mon, 13 Mar 2017 11:16:29 +0000 (11:16 +0000)]
[WK2] Only report background WebProcesses as unresponsive in the background after 90 seconds
https://bugs.webkit.org/show_bug.cgi?id=169425
<rdar://problem/30954003>

Reviewed by Andreas Kling.

Source/WebKit2:

The background responsiveness checking was previously relying on the
isResponsive(std::function<void(bool)>) API which uses the ResponsivenessTimer
and has a timeout of 3 seconds. We believe this is too aggressive for background
tabs. Update BackgroundResponsiveTimer to stop relying on ResponsivenessTimer
and have its own timeout Timer which a delay of 90 seconds instead.

* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(-[WKObservablePageState _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webProcessIsResponsive]):
* UIProcess/BackgroundProcessResponsivenessTimer.cpp:
(WebKit::BackgroundProcessResponsivenessTimer::BackgroundProcessResponsivenessTimer):
(WebKit::BackgroundProcessResponsivenessTimer::~BackgroundProcessResponsivenessTimer):
(WebKit::BackgroundProcessResponsivenessTimer::updateState):
(WebKit::BackgroundProcessResponsivenessTimer::didReceiveBackgroundResponsivenessPong):
(WebKit::BackgroundProcessResponsivenessTimer::invalidate):
(WebKit::BackgroundProcessResponsivenessTimer::processTerminated):
(WebKit::BackgroundProcessResponsivenessTimer::responsivenessCheckTimerFired):
(WebKit::BackgroundProcessResponsivenessTimer::timeoutTimerFired):
(WebKit::BackgroundProcessResponsivenessTimer::setResponsive):
(WebKit::BackgroundProcessResponsivenessTimer::shouldBeActive):
(WebKit::BackgroundProcessResponsivenessTimer::scheduleNextResponsivenessCheck):
(WebKit::BackgroundProcessResponsivenessTimer::client):
* UIProcess/BackgroundProcessResponsivenessTimer.h:
(WebKit::BackgroundProcessResponsivenessTimer::isResponsive):
* UIProcess/ResponsivenessTimer.h:
(WebKit::ResponsivenessTimer::isResponsive):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::updateBackingStoreDiscardableState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::isResponsive):
(WebKit::WebProcessProxy::didReceiveBackgroundResponsivenessPing):
(WebKit::WebProcessProxy::processTerminated):
(WebKit::WebProcessProxy::updateBackgroundResponsivenessTimer):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::backgroundResponsivenessPing):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

Source/WTF:

* wtf/RunLoop.h:
(WTF::RunLoop::TimerBase::startRepeating):
(WTF::RunLoop::TimerBase::startOneShot):
Add overloads to RunLoop::Timer that take Seconds in parameter,
for convenience.

* wtf/Seconds.h:
(WTF::Seconds::fromHours):
(WTF::seconds_literals::operator _h):
Allow _h suffix for initializing Seconds type to hours.

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

2 years agoUnreviewed Win build fix.
pvollan@apple.com [Mon, 13 Mar 2017 11:12:47 +0000 (11:12 +0000)]
Unreviewed Win build fix.

WebCore::CookiesStrategy::addCookie has been removed, we should also remove the override.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::addCookie): Deleted.
(WebPlatformStrategies::addCookie): Deleted.
* WebCoreSupport/WebPlatformStrategies.h:

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

2 years agoWeb Automation: automation commands hang when trying to navigate go/back and it's...
carlosgc@webkit.org [Mon, 13 Mar 2017 09:21:34 +0000 (09:21 +0000)]
Web Automation: automation commands hang when trying to navigate go/back and it's not possible
https://bugs.webkit.org/show_bug.cgi?id=169407

Reviewed by Michael Catanzaro.

Trying to navigate back or forward when there are no back/forward items makes the automation commands to hang, because
navigation callback is never called. WebPageProxy returns nullptr to indicate no navigation will take place. In
that case we can consider that the operation succeeded.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::goBackInBrowsingContext):
(WebKit::WebAutomationSession::goForwardInBrowsingContext):

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

2 years agoMiniBrowser: a tab closed from javascript always closes the window
carlosgc@webkit.org [Mon, 13 Mar 2017 09:15:51 +0000 (09:15 +0000)]
MiniBrowser: a tab closed from javascript always closes the window
https://bugs.webkit.org/show_bug.cgi?id=169415

Reviewed by Michael Catanzaro.

When I implemented tabs support in MiniBrowser I forgot about web view close. We connect to the signal (only for
the active tab) and close the window. That worked when we didn't have tabs, but now we should close the tab, or
the window if it's the last tab.

* MiniBrowser/gtk/BrowserWindow.c:
(webViewClose): Destroy the window if therte's only one tab, otherwise search for the tab corresponding to the web
view and destroy it.
(browserWindowSwitchTab): Re-connect to close signal, we want to handle close on all tabs.

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

2 years agoAdd the ability to report a commit with sub-commits.
dewei_zhu@apple.com [Mon, 13 Mar 2017 09:10:29 +0000 (09:10 +0000)]
Add the ability to report a commit with sub-commits.
https://bugs.webkit.org/show_bug.cgi?id=168962

Reviewed by Ryosuke Niwa.

Introduce 'commit_ownerships' which records ownership between commits.
On existing production server, run ```
    CREATE TABLE commit_ownerships (
        commit_owner integer NOT NULL REFERENCES commits ON DELETE CASCADE,
        commit_ownee integer NOT NULL REFERENCES commits ON DELETE CASCADE,
        PRIMARY KEY (commit_owner, commit_ownee)
    );
    ALTER TABLE repositories RENAME repository_parent TO repository_owner;
    ALTER TABLE repositories DROP repository_name_must_be_unique;
    CREATE UNIQUE INDEX repository_name_owner_unique_index ON repositories (repository_owner, repository_name) WHERE repository_owner IS NOT NULL;
    CREATE UNIQUE INDEX repository_name_unique_index ON repositories (repository_name) WHERE repository_owner IS NULL;
``` to update database.
Add unit-tests to cover this change.

* init-database.sql:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* public/include/db.php:
* public/include/manifest-generator.php:
* public/include/report-processor.php:
* public/v3/models/repository.js:
(Repository):
(Repository.prototype.owner):
* server-tests/admin-reprocess-report-tests.js:
(addBuilderForReport.simpleReportWithRevisions.0.then):
(then):
* server-tests/api-manifest.js:
(then):
* server-tests/api-report-commits-tests.js:
(addSlaveForReport.sameRepositoryNameInSubCommitAndMajorCommit.then):
(then):
(addSlaveForReport.systemVersionCommitWithSubcommits.then):
(addSlaveForReport.multipleSystemVersionCommitsWithSubcommits.then):
(addSlaveForReport.systemVersionCommitWithEmptySubcommits.then):
(addSlaveForReport.systemVersionCommitAndSubcommitWithTimestamp.then):
* tools/js/database.js:

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

2 years ago[WK2][CMake] Remove the intermediate NetworkProcess_COMMON_SOURCES variable
zandobersek@gmail.com [Mon, 13 Mar 2017 08:01:16 +0000 (08:01 +0000)]
[WK2][CMake] Remove the intermediate NetworkProcess_COMMON_SOURCES variable
https://bugs.webkit.org/show_bug.cgi?id=169524

Reviewed by Michael Catanzaro.

The NetworkProcess-specific source files listed in the
NetworkProcess_COMMON_SOURCES variable definition should be directly
inlined into the list with which the WebKit2_SOURCE variable is defined.
The NetworkProcess_COMMON_SOURCES variable is appended to the
WebKit2_SOURCES variable anyway, and is not used anywhere else. The
separate variable was previously use to support configurations that
allowed disabling NetworkProcess.

* CMakeLists.txt:

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

2 years agoWebGPU remote layer hosting
dino@apple.com [Mon, 13 Mar 2017 07:54:43 +0000 (07:54 +0000)]
WebGPU remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=169539
<rdar://problem/31005380>

Reviewed by Jon Lee.

Source/WebCore:

Implement the WebProcess side of WebGPULayer hosting,
via LayerTypeWebGPULayer.

* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::operator<<): Provide nice pretty printing.
* platform/graphics/ca/PlatformCALayer.h: Add LayerTypeWebGPULayer.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Support LayerTypeWebGPULayer.
(PlatformCALayerCocoa::layerTypeForPlatformLayer):
(PlatformCALayerCocoa::PlatformCALayerCocoa):
(PlatformCALayerCocoa::commonInit):

Source/WebKit2:

Implement the host-side part of WebGPULayer.

* Shared/mac/RemoteLayerBackingStore.mm: Add support for LayerTypeWebGPULayer.
(WebKit::RemoteLayerBackingStore::drawInContext):
* Shared/mac/RemoteLayerTreeTransaction.mm: Ditto.
(WebKit::RemoteLayerTreeTransaction::description):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm: Ditto.
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm: Ditto.
(WebKit::RemoteLayerTreeHost::createLayer):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm: Ditto.
(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(WebKit::PlatformCALayerRemoteCustom::clone):

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

2 years agoUnreviewed GTK+ build fix. Adjust the Cookie constructor
zandobersek@gmail.com [Mon, 13 Mar 2017 07:33:22 +0000 (07:33 +0000)]
Unreviewed GTK+ build fix. Adjust the Cookie constructor
invocation in CookieJarSoup, using empty values for the
newly-added parameters. This should probably be revised
to determine whether meaningful values can be passed in.

* platform/network/soup/CookieJarSoup.cpp:
(WebCore::getRawCookies):

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

2 years agoUnreviewed GTK+ build fix. Use WTF::Function<> for the
zandobersek@gmail.com [Mon, 13 Mar 2017 07:30:14 +0000 (07:30 +0000)]
Unreviewed GTK+ build fix. Use WTF::Function<> for the
WebPageProxy::getContentsAsMHTMLData() parameter, fixing
configurations that support enabling ENABLE(MHTML).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getContentsAsMHTMLData):
* UIProcess/WebPageProxy.h:

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

2 years agoWebGPU: Backend - hosting WebGPU layers
jonlee@apple.com [Mon, 13 Mar 2017 07:18:33 +0000 (07:18 +0000)]
WebGPU: Backend - hosting WebGPU layers
https://bugs.webkit.org/show_bug.cgi?id=169366
<rdar://problem/30928735>

Reviewed by Dean Jackson.

* html/canvas/WebGPURenderingContext.cpp:
(WebCore::WebGPURenderingContext::create): Create the device and the
rendering context.
* platform/graphics/cocoa/GPUCommandBufferMetal.mm:
(WebCore::GPUCommandBuffer::commit):
* platform/graphics/cocoa/GPUDrawableMetal.mm:
(WebCore::GPUDrawable::release): Fix a log message
* platform/graphics/gpu/GPUCommandBuffer.cpp:
(WebCore::GPUCommandBuffer::commit): Deleted. Moved to GPUCommandBufferMetal.
* rendering/RenderLayerBacking.cpp:
(WebCore::canvasCompositingStrategy): WebGPU canvas should return CanvasAsLayerContents.

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

2 years agoRemove stubs from WebGPU front end
jonlee@apple.com [Mon, 13 Mar 2017 06:17:56 +0000 (06:17 +0000)]
Remove stubs from WebGPU front end
https://bugs.webkit.org/show_bug.cgi?id=169375

Reviewed by Dean Jackson.

Remove stubs and use the back end.
* html/canvas/WebGPUCommandBuffer.cpp:
* html/canvas/WebGPUCommandBuffer.h:
* html/canvas/WebGPUCommandQueue.cpp:
* html/canvas/WebGPUCommandQueue.h:
* html/canvas/WebGPUDepthStencilDescriptor.cpp:
(WebCore::WebGPUDepthStencilDescriptor::setDepthCompareFunction): Remove redundant clause.
* html/canvas/WebGPUDepthStencilDescriptor.h:
* html/canvas/WebGPUDepthStencilDescriptor.idl: Remove label property. Not needed yet.
* html/canvas/WebGPUDepthStencilState.cpp:
* html/canvas/WebGPUDepthStencilState.h:
* html/canvas/WebGPUEnums.cpp:
* html/canvas/WebGPUEnums.h:
* html/canvas/WebGPURenderCommandEncoder.cpp:
* html/canvas/WebGPURenderCommandEncoder.h:
* html/canvas/WebGPURenderPassAttachmentDescriptor.cpp:
* html/canvas/WebGPURenderPassAttachmentDescriptor.h:
* html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp:
* html/canvas/WebGPURenderPassColorAttachmentDescriptor.h:
* html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp:
* html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h:
* html/canvas/WebGPURenderPassDescriptor.cpp:
(WebCore::WebGPURenderPassDescriptor::colorAttachments): Uncomment code with GPURenderPassColorAttachmentDescriptor available.
* html/canvas/WebGPURenderPassDescriptor.h:
* html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:
* html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h:
* html/canvas/WebGPURenderPipelineDescriptor.cpp:
* html/canvas/WebGPURenderPipelineDescriptor.h:
* html/canvas/WebGPURenderPipelineDescriptor.idl: Remove label property. Not needed yet.
* html/canvas/WebGPURenderPipelineState.cpp:
* html/canvas/WebGPURenderPipelineState.h:

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

2 years ago[Cocoa] Incorrect availability annotations in WKUserContentController.h
mitz@apple.com [Mon, 13 Mar 2017 05:38:26 +0000 (05:38 +0000)]
[Cocoa] Incorrect availability annotations in WKUserContentController.h
https://bugs.webkit.org/show_bug.cgi?id=169536

Reviewed by Alexey Proskuryakov.

* UIProcess/API/Cocoa/WKUserContentController.h: Use WK_MAC_TBA for macOS availability.

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

2 years agoWebGPU Backend
jonlee@apple.com [Mon, 13 Mar 2017 03:40:55 +0000 (03:40 +0000)]
WebGPU Backend
https://bugs.webkit.org/show_bug.cgi?id=169535
<rdar://problem/31002364>

Patch by Dean Jackson <dino@apple.com> on 2017-03-12
Reviewed by Jon Lee.

Fill in the remainder of the WebGPU backend. This is effectively
a C++ representation of the Metal API.

* WebCore.xcodeproj/project.pbxproj:
* html/canvas/WebGPUDrawable.cpp:
(WebCore::WebGPUDrawable::WebGPUDrawable):
* html/canvas/WebGPUDrawable.h:
(WebCore::GPUDrawable::texture): Deleted.
* platform/graphics/cocoa/GPUBufferMetal.mm:
(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::platformBuffer):
* platform/graphics/cocoa/GPUCommandBufferMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
(WebCore::GPUCommandBuffer::GPUCommandBuffer):
(WebCore::GPUCommandBuffer::platformCommandBuffer):
(WebCore::GPUCommandBuffer::presentDrawable):
* platform/graphics/cocoa/GPUCommandQueueMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
(WebCore::GPUCommandQueue::GPUCommandQueue):
(WebCore::GPUCommandQueue::label):
(WebCore::GPUCommandQueue::setLabel):
(WebCore::GPUCommandQueue::platformCommandQueue):
* platform/graphics/cocoa/GPUDepthStencilDescriptorMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUTextureMetal.mm.
(WebCore::GPUDepthStencilDescriptor::GPUDepthStencilDescriptor):
(WebCore::GPUDepthStencilDescriptor::depthWriteEnabled):
(WebCore::GPUDepthStencilDescriptor::setDepthWriteEnabled):
(WebCore::GPUDepthStencilDescriptor::depthCompareFunction):
(WebCore::GPUDepthStencilDescriptor::setDepthCompareFunction):
(WebCore::GPUDepthStencilDescriptor::platformDepthStencilDescriptor):
* platform/graphics/cocoa/GPUDepthStencilStateMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
(WebCore::GPUDepthStencilState::GPUDepthStencilState):
(WebCore::GPUDepthStencilState::label):
(WebCore::GPUDepthStencilState::setLabel):
(WebCore::GPUDepthStencilState::platformDepthStencilState):
* platform/graphics/cocoa/GPUDrawableMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
(WebCore::GPUDrawable::GPUDrawable):
(WebCore::GPUDrawable::release):
(WebCore::GPUDrawable::platformDrawable):
(WebCore::GPUDrawable::platformTexture):
* platform/graphics/cocoa/GPUFunctionMetal.mm:
(WebCore::GPUFunction::GPUFunction):
(WebCore::GPUFunction::platformFunction):
* platform/graphics/cocoa/GPULibraryMetal.mm:
(WebCore::GPULibrary::GPULibrary):
(WebCore::GPULibrary::setLabel):
(WebCore::GPULibrary::platformLibrary):
* platform/graphics/cocoa/GPURenderCommandEncoderMetal.mm: Added.
(WebCore::GPURenderCommandEncoder::GPURenderCommandEncoder):
(WebCore::GPURenderCommandEncoder::setRenderPipelineState):
(WebCore::GPURenderCommandEncoder::setDepthStencilState):
(WebCore::GPURenderCommandEncoder::setVertexBuffer):
(WebCore::GPURenderCommandEncoder::setFragmentBuffer):
(WebCore::GPURenderCommandEncoder::drawPrimitives):
(WebCore::GPURenderCommandEncoder::endEncoding):
(WebCore::GPURenderCommandEncoder::platformRenderCommandEncoder):
* platform/graphics/cocoa/GPURenderPassAttachmentDescriptorMetal.mm: Added.
(WebCore::GPURenderPassAttachmentDescriptor::GPURenderPassAttachmentDescriptor):
(WebCore::GPURenderPassAttachmentDescriptor::loadAction):
(WebCore::GPURenderPassAttachmentDescriptor::setLoadAction):
(WebCore::GPURenderPassAttachmentDescriptor::storeAction):
(WebCore::GPURenderPassAttachmentDescriptor::setStoreAction):
(WebCore::GPURenderPassAttachmentDescriptor::setTexture):
(WebCore::GPURenderPassAttachmentDescriptor::platformRenderPassAttachmentDescriptor):
* platform/graphics/cocoa/GPURenderPassColorAttachmentDescriptorMetal.mm: Added.
(WebCore::GPURenderPassColorAttachmentDescriptor::create):
(WebCore::GPURenderPassColorAttachmentDescriptor::GPURenderPassColorAttachmentDescriptor):
(WebCore::GPURenderPassColorAttachmentDescriptor::clearColor):
(WebCore::GPURenderPassColorAttachmentDescriptor::setClearColor):
(WebCore::GPURenderPassColorAttachmentDescriptor::platformRenderPassColorAttachmentDescriptor):
* platform/graphics/cocoa/GPURenderPassDepthAttachmentDescriptorMetal.mm: Added.
(WebCore::GPURenderPassDepthAttachmentDescriptor::create):
(WebCore::GPURenderPassDepthAttachmentDescriptor::GPURenderPassDepthAttachmentDescriptor):
(WebCore::GPURenderPassDepthAttachmentDescriptor::clearDepth):
(WebCore::GPURenderPassDepthAttachmentDescriptor::setClearDepth):
(WebCore::GPURenderPassDepthAttachmentDescriptor::platformRenderPassDepthAttachmentDescriptor):
* platform/graphics/cocoa/GPURenderPassDescriptorMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUBufferMetal.mm.
(WebCore::GPURenderPassDescriptor::GPURenderPassDescriptor):
(WebCore::GPURenderPassDescriptor::colorAttachments):
(WebCore::GPURenderPassDescriptor::depthAttachment):
(WebCore::GPURenderPassDescriptor::platformRenderPassDescriptor):
* platform/graphics/cocoa/GPURenderPipelineColorAttachmentDescriptorMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPULibraryMetal.mm.
(WebCore::GPURenderPipelineColorAttachmentDescriptor::create):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::pixelFormat):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::setPixelFormat):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::platformRenderPipelineColorAttachmentDescriptor):
* platform/graphics/cocoa/GPURenderPipelineDescriptorMetal.mm: Added.
(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
(WebCore::GPURenderPipelineDescriptor::depthAttachmentPixelFormat):
(WebCore::GPURenderPipelineDescriptor::setDepthAttachmentPixelFormat):
(WebCore::GPURenderPipelineDescriptor::setVertexFunction):
(WebCore::GPURenderPipelineDescriptor::setFragmentFunction):
(WebCore::GPURenderPipelineDescriptor::colorAttachments):
(WebCore::GPURenderPipelineDescriptor::reset):
(WebCore::GPURenderPipelineDescriptor::platformRenderPipelineDescriptor):
* platform/graphics/cocoa/GPURenderPipelineStateMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUTextureMetal.mm.
(WebCore::GPURenderPipelineState::GPURenderPipelineState):
(WebCore::GPURenderPipelineState::label):
(WebCore::GPURenderPipelineState::setLabel):
(WebCore::GPURenderPipelineState::platformRenderPipelineState):
* platform/graphics/cocoa/GPUTextureDescriptorMetal.mm:
(WebCore::GPUTextureDescriptor::GPUTextureDescriptor):
(WebCore::GPUTextureDescriptor::platformTextureDescriptor):
* platform/graphics/cocoa/GPUTextureMetal.mm:
(WebCore::GPUTexture::GPUTexture):
(WebCore::GPUTexture::platformTexture):
* platform/graphics/gpu/GPUBuffer.cpp:
* platform/graphics/gpu/GPUBuffer.h:
* platform/graphics/gpu/GPUCommandBuffer.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
(WebCore::GPUCommandBuffer::create):
(WebCore::GPUCommandBuffer::~GPUCommandBuffer):
(WebCore::GPUCommandBuffer::commit):
(WebCore::GPUCommandBuffer::createRenderCommandEncoder):
(WebCore::GPUCommandBuffer::presentDrawable):
* platform/graphics/gpu/GPUCommandBuffer.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
* platform/graphics/gpu/GPUCommandQueue.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
(WebCore::GPUCommandQueue::create):
(WebCore::GPUCommandQueue::~GPUCommandQueue):
(WebCore::GPUCommandQueue::createCommandBuffer):
(WebCore::GPUCommandQueue::label):
(WebCore::GPUCommandQueue::setLabel):
* platform/graphics/gpu/GPUCommandQueue.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
* platform/graphics/gpu/GPUDepthStencilDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.
(WebCore::GPUDepthStencilDescriptor::create):
(WebCore::GPUDepthStencilDescriptor::~GPUDepthStencilDescriptor):
(WebCore::GPUDepthStencilDescriptor::depthWriteEnabled):
(WebCore::GPUDepthStencilDescriptor::setDepthWriteEnabled):
(WebCore::GPUDepthStencilDescriptor::depthCompareFunction):
(WebCore::GPUDepthStencilDescriptor::setDepthCompareFunction):
* platform/graphics/gpu/GPUDepthStencilDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
* platform/graphics/gpu/GPUDepthStencilState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
(WebCore::GPUDepthStencilState::create):
(WebCore::GPUDepthStencilState::~GPUDepthStencilState):
(WebCore::GPUDepthStencilState::label):
(WebCore::GPUDepthStencilState::setLabel):
* platform/graphics/gpu/GPUDepthStencilState.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::createCommandQueue):
(WebCore::GPUDevice::getFramebuffer):
* platform/graphics/gpu/GPUDevice.h:
(WebCore::GPUDevice::markLayerComposited):
(WebCore::GPUDevice::createCommandQueue): Deleted.
(WebCore::GPUDevice::getFramebuffer): Deleted.
* platform/graphics/gpu/GPUDrawable.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
(WebCore::GPUDrawable::create):
(WebCore::GPUDrawable::~GPUDrawable):
(WebCore::GPUDrawable::release):
* platform/graphics/gpu/GPUDrawable.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
* platform/graphics/gpu/GPUEnums.h: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
* platform/graphics/gpu/GPUFunction.h:
* platform/graphics/gpu/GPULibrary.cpp:
* platform/graphics/gpu/GPULibrary.h:
* platform/graphics/gpu/GPURenderCommandEncoder.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.cpp.
(WebCore::GPURenderCommandEncoder::create):
(WebCore::GPURenderCommandEncoder::~GPURenderCommandEncoder):
(WebCore::GPURenderCommandEncoder::setRenderPipelineState):
(WebCore::GPURenderCommandEncoder::setDepthStencilState):
(WebCore::GPURenderCommandEncoder::setVertexBuffer):
(WebCore::GPURenderCommandEncoder::setFragmentBuffer):
(WebCore::GPURenderCommandEncoder::drawPrimitives):
(WebCore::GPURenderCommandEncoder::endEncoding):
* platform/graphics/gpu/GPURenderCommandEncoder.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
* platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.
(WebCore::GPURenderPassAttachmentDescriptor::~GPURenderPassAttachmentDescriptor):
(WebCore::GPURenderPassAttachmentDescriptor::GPURenderPassAttachmentDescriptor):
(WebCore::GPURenderPassAttachmentDescriptor::loadAction):
(WebCore::GPURenderPassAttachmentDescriptor::setLoadAction):
(WebCore::GPURenderPassAttachmentDescriptor::storeAction):
(WebCore::GPURenderPassAttachmentDescriptor::setStoreAction):
(WebCore::GPURenderPassAttachmentDescriptor::setTexture):
* platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
* platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUDevice.cpp.
(WebCore::GPURenderPassColorAttachmentDescriptor::create):
(WebCore::GPURenderPassColorAttachmentDescriptor::GPURenderPassColorAttachmentDescriptor):
(WebCore::GPURenderPassColorAttachmentDescriptor::~GPURenderPassColorAttachmentDescriptor):
(WebCore::GPURenderPassColorAttachmentDescriptor::clearColor):
(WebCore::GPURenderPassColorAttachmentDescriptor::setClearColor):
* platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
* platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.
(WebCore::GPURenderPassDepthAttachmentDescriptor::create):
(WebCore::GPURenderPassDepthAttachmentDescriptor::GPURenderPassDepthAttachmentDescriptor):
(WebCore::GPURenderPassDepthAttachmentDescriptor::~GPURenderPassDepthAttachmentDescriptor):
(WebCore::GPURenderPassDepthAttachmentDescriptor::clearDepth):
(WebCore::GPURenderPassDepthAttachmentDescriptor::setClearDepth):
* platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
* platform/graphics/gpu/GPURenderPassDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
(WebCore::GPURenderPassDescriptor::create):
(WebCore::GPURenderPassDescriptor::~GPURenderPassDescriptor):
(WebCore::GPURenderPassDescriptor::depthAttachment):
* platform/graphics/gpu/GPURenderPassDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
* platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.
(WebCore::GPURenderPipelineColorAttachmentDescriptor::~GPURenderPipelineColorAttachmentDescriptor):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::pixelFormat):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::setPixelFormat):
* platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
* platform/graphics/gpu/GPURenderPipelineDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUDevice.cpp.
(WebCore::GPURenderPipelineDescriptor::create):
(WebCore::GPURenderPipelineDescriptor::~GPURenderPipelineDescriptor):
(WebCore::GPURenderPipelineDescriptor::depthAttachmentPixelFormat):
(WebCore::GPURenderPipelineDescriptor::setDepthAttachmentPixelFormat):
(WebCore::GPURenderPipelineDescriptor::setVertexFunction):
(WebCore::GPURenderPipelineDescriptor::setFragmentFunction):
(WebCore::GPURenderPipelineDescriptor::colorAttachments):
* platform/graphics/gpu/GPURenderPipelineDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
* platform/graphics/gpu/GPURenderPipelineState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.cpp.
(WebCore::GPURenderPipelineState::create):
(WebCore::GPURenderPipelineState::~GPURenderPipelineState):
(WebCore::GPURenderPipelineState::label):
(WebCore::GPURenderPipelineState::setLabel):
* platform/graphics/gpu/GPURenderPipelineState.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
* platform/graphics/gpu/GPUTexture.cpp:
(WebCore::GPUTexture::createFromDrawable):
(WebCore::GPUTexture::createFromExistingTexture): Deleted.
* platform/graphics/gpu/GPUTexture.h:
* platform/graphics/gpu/GPUTextureDescriptor.cpp:
* platform/graphics/gpu/GPUTextureDescriptor.h:

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

2 years agoSimple line layout: Paginated content is not painted properly when font overflows...
zalan@apple.com [Mon, 13 Mar 2017 03:16:43 +0000 (03:16 +0000)]
Simple line layout: Paginated content is not painted properly when font overflows line height.
https://bugs.webkit.org/show_bug.cgi?id=169516

Reviewed by Antti Koivisto.

Source/WebCore:

adjustLineIndexForStruts should take the IndexType::First/Last into account
when searching for the line index in a paginated context.
This also changes the the computed offset height from m_lineHeight to m_ascent + m_descent
so that we can find lines with large fonts (but small line height).

Test: fast/multicol/simple-line-layout-line-index-after-strut.html

* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::adjustLineIndexForStruts):
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
(WebCore::SimpleLineLayout::RunResolver::rangeForRect):
* rendering/SimpleLineLayoutResolver.h:

LayoutTests:

* fast/multicol/simple-line-layout-line-index-after-strut-expected.html: Added.
* fast/multicol/simple-line-layout-line-index-after-strut.html: Added.

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

2 years agoAdd full NSHTTPCookie fidelity to WebCore::Cookie.
beidson@apple.com [Mon, 13 Mar 2017 01:54:16 +0000 (01:54 +0000)]
Add full NSHTTPCookie fidelity to WebCore::Cookie.
https://bugs.webkit.org/show_bug.cgi?id=169514

Reviewed by Dean Jackson.

No new tests (Refactor, no testable behavior change for now).

* platform/Cookie.h:
(WebCore::Cookie::Cookie):
(WebCore::Cookie::encode):
(WebCore::Cookie::decode):

* platform/network/cocoa/CookieCocoa.mm:
(WebCore::portVectorFromList):
(WebCore::portStringFromVector):
(WebCore::Cookie::Cookie):
(WebCore::Cookie::operator NSHTTPCookie *):

* platform/network/mac/CookieJarMac.mm:
(WebCore::getRawCookies):

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

2 years agoTransition GenericCallback from std::function to WTF::Function.
beidson@apple.com [Mon, 13 Mar 2017 01:37:36 +0000 (01:37 +0000)]
Transition GenericCallback from std::function to WTF::Function.
https://bugs.webkit.org/show_bug.cgi?id=169530

Reviewed by Dean Jackson.

* UIProcess/GenericCallback.h:
(WebKit::GenericCallback::create):
(WebKit::GenericCallback::performCallbackWithReturnValue):
(WebKit::GenericCallback::GenericCallback):
(WebKit::CallbackMap::put):

* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
* UIProcess/WebCookieManagerProxy.h:

* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::getWebArchive):
(WebKit::WebFrameProxy::getMainResourceData):
(WebKit::WebFrameProxy::getResourceData):
* UIProcess/WebFrameProxy.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getSelectionAsWebArchiveData):
(WebKit::WebPageProxy::getMainResourceDataOfFrame):
(WebKit::WebPageProxy::getResourceDataFromFrame):
(WebKit::WebPageProxy::getWebArchiveOfFrame):
* UIProcess/WebPageProxy.h:

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::getStatistics):
* UIProcess/WebProcessPool.h:

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

2 years ago[GTK] Unbreak build with GTK+ >=3.20 after r213772
mcatanzaro@igalia.com [Mon, 13 Mar 2017 00:34:38 +0000 (00:34 +0000)]
[GTK] Unbreak build with GTK+ >=3.20 after r213772
https://bugs.webkit.org/show_bug.cgi?id=169533

Patch by Adrian Perez de Castro <aperez@igalia.com> on 2017-03-12
Reviewed by Michael Catanzaro.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRunFileChooser): Add missing cast.

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

2 years ago[GTK] Unreviewed test gardening
jfernandez@igalia.com [Mon, 13 Mar 2017 00:16:54 +0000 (00:16 +0000)]
[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=169534

Unreviewed GTK+ gardening.

Rebaseline tests:
LayoutTests/imported/w3c:

   - imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive.html

* web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive-expected.txt:

LayoutTests:

   - http/tests/xmlhttprequest/xmlhttprequest-test-custom-headers.html

* platform/gtk/TestExpectations:
   - fast/text/font-selection-font-face-parse.html [ Skip ]
* platform/gtk/http/tests/xmlhttprequest/xmlhttprequest-test-custom-headers-expected.txt:

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

2 years agoREGRESSION (r213764): Async image decoding is disabled for animated images
commit-queue@webkit.org [Sun, 12 Mar 2017 23:52:30 +0000 (23:52 +0000)]
REGRESSION (r213764): Async image decoding is disabled for animated images
https://bugs.webkit.org/show_bug.cgi?id=169529

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-03-12
Reviewed by Jon Lee.

The change r213764 causes the animated images to be decoded synchronously
because we were calling frameImageAtIndex() with an empty sizeForDrawing
but with a valid subsamplingLevel. This call is translated to be synchronous
image decoding. The fix is get the current image frame without any decoding.
This is because are sure that in the case of animated image, the current
image frame can not be deleted.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::draw):

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

2 years agoStructure::willStoreValueSlow needs to keep the property table alive until the end
fpizlo@apple.com [Sun, 12 Mar 2017 22:56:55 +0000 (22:56 +0000)]
Structure::willStoreValueSlow needs to keep the property table alive until the end
https://bugs.webkit.org/show_bug.cgi?id=169520

Reviewed by Michael Saboff.

We use pointers logically interior to `propertyTable` after doing a GC. We need to prevent the
compiler from optimizing away pointers to `propertyTable`.

* heap/HeapCell.cpp:
(JSC::HeapCell::use):
* heap/HeapCell.h:
(JSC::HeapCell::use): Introduce API for keeping a pointer alive until some point in execution.
* runtime/Structure.cpp:
(JSC::Structure::willStoreValueSlow): Use HeapCell::use() to keep the pointer alive.

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

2 years ago[GTK] File choosers should run as modal by default if possible
commit-queue@webkit.org [Sun, 12 Mar 2017 20:19:04 +0000 (20:19 +0000)]
[GTK] File choosers should run as modal by default if possible
https://bugs.webkit.org/show_bug.cgi?id=169526

Patch by Adrian Perez de Castro <aperez@igalia.com> on 2017-03-12
Reviewed by Michael Catanzaro.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRunFileChooser): If a top-level window containing the web view is found, call
gtk_native_dialog_set_modal() to configure the dialog accordingly.

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

2 years ago[iOS] Some more -respondsToSelector: checks are unnecessary
mitz@apple.com [Sun, 12 Mar 2017 18:47:35 +0000 (18:47 +0000)]
[iOS] Some more -respondsToSelector: checks are unnecessary
https://bugs.webkit.org/show_bug.cgi?id=169525

Reviewed by Tim Horton.

* Platform/spi/ios/UIKitSPI.h: Moved redeclarations of methods that are declared in the
  Apple internal SDK into the #if !USE(APPLE_INTERNAL_SDK) section.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]): Replaced unnecessary -respondsToSelector:
  check with compile-time check for the deployment target.
(-[WKWebView _computedContentInset]): Ditto.
(activeMinimumLayoutSize): Ditto.
(-[WKWebView safeAreaInsetsDidChange]): Ditto.

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

2 years ago[Readable Streams API] Implement ReadableStreamBYOBRequest respond() (closed stream...
commit-queue@webkit.org [Sun, 12 Mar 2017 17:27:48 +0000 (17:27 +0000)]
[Readable Streams API] Implement ReadableStreamBYOBRequest respond() (closed stream state)
https://bugs.webkit.org/show_bug.cgi?id=168781

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

LayoutTests/imported/w3c:

Updated WPT expectations for readable byte streams tests.

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

Source/WebCore:

Implemented ReadableStreamBYOBRequest respond() method in the case of a closed stream.

Added tests related to respond() method and updated WPT imported tests expectations.

* Modules/streams/ReadableByteStreamInternals.js:
(readableByteStreamControllerRespond): Added.
(readableByteStreamControllerRespondInternal): Added.
(readableByteStreamControllerRespondInClosedState): Added.
(readableByteStreamControllerShiftPendingPullInto): Added.
(readableByteStreamControllerInvalidateBYOBRequest): Added.
(readableByteStreamControllerCommitPullIntoDescriptor): Added.
(readableByteStreamControllerConvertPullIntoDescriptor): Added.
(readableStreamFulfillReadIntoRequest): Added.
* Modules/streams/ReadableStreamBYOBRequest.js:
(respond): Implemented.

LayoutTests:

Added new tests related to ReadableStreamBYOBRequeset respond() method.

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

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

2 years agoUnreviewed, suprress warnings in JSC B3
utatane.tea@gmail.com [Sun, 12 Mar 2017 07:54:19 +0000 (07:54 +0000)]
Unreviewed, suprress warnings in JSC B3

* b3/B3Opcode.cpp:

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

2 years agoAllow regular expressions to be used when selecting a process name in JSC config...
msaboff@apple.com [Sun, 12 Mar 2017 06:27:49 +0000 (06:27 +0000)]
Allow regular expressions to be used when selecting a process name in JSC config file
https://bugs.webkit.org/show_bug.cgi?id=169495

Reviewed by Saam Barati.

Only added regular expression selectors for unix like platforms.

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

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

2 years agoFix memory estimate for layers supporting subpixel-antialised text
simon.fraser@apple.com [Sun, 12 Mar 2017 06:21:05 +0000 (06:21 +0000)]
Fix memory estimate for layers supporting subpixel-antialised text
https://bugs.webkit.org/show_bug.cgi?id=169507
rdar://problem/30979337

Reviewed by Alexey Proskuryakov.

Deep color layers on iOS use 5 bytes per pixel, layers supporting subpixel-antialiaed
text on Mac use 8 bytes per pixel.

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::backingStoreBytesPerPixel):

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

2 years agoXMLHttpRequest: make setRequestHeader() use `, ` as separator (including a space)
commit-queue@webkit.org [Sun, 12 Mar 2017 06:07:05 +0000 (06:07 +0000)]
XMLHttpRequest: make setRequestHeader() use `, ` as separator (including a space)
https://bugs.webkit.org/show_bug.cgi?id=169285

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-11
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed.htm:
* web-platform-tests/fetch/api/headers/headers-combine.html:

Source/WebCore:

Covered by updated tests.

* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::add): Reverting back to ', '.

LayoutTests:

* http/tests/xmlhttprequest/check-combining-headers-expected.txt:
* http/tests/xmlhttprequest/check-combining-headers.html:
* http/tests/xmlhttprequest/web-apps/005.html:

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

2 years agoWeb Inspector: Add "goto arrow" to DOMNodeTreeElements in the Debugger tab
mattbaker@apple.com [Sun, 12 Mar 2017 05:02:25 +0000 (05:02 +0000)]
Web Inspector: Add "goto arrow" to DOMNodeTreeElements in the Debugger tab
https://bugs.webkit.org/show_bug.cgi?id=168752

Reviewed by Devin Rousso.

* UserInterface/Base/DOMUtilities.js:
(WebInspector.linkifyNodeReference):
(WebInspector.linkifyNodeReferenceElement):
Expose linkifying an existing element.

* UserInterface/Views/DOMNodeTreeElement.js:
(WebInspector.DOMNodeTreeElement):
(WebInspector.DOMNodeTreeElement.prototype.populateContextMenu):
Add "Reveal in DOM Tree" context menu item.

* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .details-section.dom-breakpoints .item.dom-node:not(:hover, .selected) .status .go-to-arrow):
Hide the go-to arrow unless hovering or selected.

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

2 years agoEnable async image decoding for large images
commit-queue@webkit.org [Sun, 12 Mar 2017 03:00:46 +0000 (03:00 +0000)]
Enable async image decoding for large images
https://bugs.webkit.org/show_bug.cgi?id=165039

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-03-11
Reviewed by Simon Fraser.

Source/WebCore:

When BitmapImage::draw() is called for a large image, we are going to request async
image decoding for the native image instead of drawing it. If a lower resolution
native image is available for this, it is going to be drawn. Otherwise nothing will
be drawn. In both cases, a repaint will be scheduled for the image observer. This
should improve the image first time paint and the scrolling scenarios. It also makes
the scrolling more responsive by removing the decoding step from the main thread.

For now we are going to disable the asynchronous image decoding for the webkit test
runner because drawing the image does not block the page rendering anymore. An image
can be repainted later when its frame is ready for painting. This can cause a test
to fail because the webkit test runner may capture an image for the page before painting
all the images. The asynchronous image decoding can to be explicitly enabled from
the test page. Once the specs of the image 'async' attribute and 'ready' event is
approved, this should be revisited. It is important to test what we ship and eventually
async image decoding should be enabled in the webkit test runner.

* loader/cache/CachedImage.h: Change the default of LargeImageAsyncDecoding and AnimatedImageAsyncDecoding
to be false. This change fixes a layout test which creates an CachedImage inside an ImageDocument. The
CachedImage in this case does not have a loader so getting the values of these options from the settings
which is false for the DRT/WTR did not happen.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedData): ImageSource::hasDecodingQueue() is renamed to ImageSource::hasAsyncDecodingQueue().
(WebCore::BitmapImage::frameImageAtIndex): Use String::utf8().data() instead of String::characters8().
(WebCore::BitmapImage::draw): If drawing the current frame is called while it is being
decoded, draw the current native image if the current frame was decoded but for a
different size  and and will not invoke decoding while painting. If the frame is being
decoded and there isn't a decoded frame, return without drawing but set a flag that
that this image needs a repaint.
(WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImage): Renaming a function.
(WebCore::BitmapImage::shouldUseAsyncDecodingForAnimatedImage): Ditto.
(WebCore::BitmapImage::internalStartAnimation): Use String::utf8().data() instead of String::characters8().
(WebCore::BitmapImage::advanceAnimation): Ditto.
(WebCore::BitmapImage::internalAdvanceAnimation): Ditto.
(WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex): Now this callback can be
called form the ImageFrameCache when finishing a frame of an animated image or the
frame of a large image. For large images, we need to call CachedImage::changedInRect()
if this image needs a repaint. If the decoding queue is idle, we should close it.
(WebCore::BitmapImage::isLargeImageAsyncDecodingRequired): Deleted. Function was renamed.
(WebCore::BitmapImage::isAnimatedImageAsyncDecodingRequired): Deleted. Ditto.
* platform/graphics/BitmapImage.h:

* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::~ImageFrameCache): hasDecodingQueue() was renamed to hasAsyncDecodingQueue().
(WebCore::ImageFrameCache::decodingQueue): Change the QNS of the decoding thread to be WorkQueue::QOS::Default.
WorkQueue::QOS::UserInteractive causes the scrolling thread to preempted  which can make the scrolling choppy.
(WebCore::ImageFrameCache::startAsyncDecodingQueue): hasDecodingQueue() was renamed to hasAsyncDecodingQueue().
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Ditto.
(WebCore::ImageFrameCache::isAsyncDecodingQueueIdle): A helper function to tell whether the decoding thread is idle.
(WebCore::ImageFrameCache::stopAsyncDecodingQueue): hasDecodingQueue() was renamed to hasAsyncDecodingQueue().
* platform/graphics/ImageFrameCache.h:
(WebCore::ImageFrameCache::hasAsyncDecodingQueue): Rename this function to be consistent with the rest of the functions.
(WebCore::ImageFrameCache::hasDecodingQueue): Deleted.

* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::shouldUseAsyncDecoding): Renaming a function. Change the heuristic for large images be
a little bigger than the heuristic for animated images.
(WebCore::ImageSource::isAsyncDecodingRequired): Deleted.
* platform/graphics/ImageSource.h:
(WebCore::ImageSource::hasAsyncDecodingQueue): hasDecodingQueue() was renamed to hasAsyncDecodingQueue().
(WebCore::ImageSource::isAsyncDecodingQueueIdle): A wrapper for ImageFrameCache::isAsyncDecodingQueueIdle().
(WebCore::ImageSource::hasDecodingQueue): Deleted.

* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::createFrameImageAtIndex): CGImageSourceCreateThumbnailAtIndex() returns a CGImage with
the image native size regardless of the subsamplingLevel unless kCGImageSourceSubsampleFactor is passed. Here
we are trying to see which size is smaller: the image native size or the sizeForDrawing. If we want a CGImage
with the image native size, sizeForDrawing will not passed. So we need to get the image native size with the
default subsampling and then compare it with sizeForDrawing.

Source/WebKit2:

Add WK2 preferences for setting/getting LargeImageAsyncDecoding and
AnimatedImageAsyncDecoding.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetLargeImageAsyncDecodingEnabled):
(WKPreferencesGetLargeImageAsyncDecodingEnabled):
(WKPreferencesSetAnimatedImageAsyncDecodingEnabled):
(WKPreferencesGetAnimatedImageAsyncDecodingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Tools:

Disable LargeImageAsyncDecoding for DRT/WTR.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

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

2 years agoWeb Inspector: RTL: fix broken font content view
mattbaker@apple.com [Sun, 12 Mar 2017 01:07:32 +0000 (01:07 +0000)]
Web Inspector: RTL: fix broken font content view
https://bugs.webkit.org/show_bug.cgi?id=169513

Reviewed by Brian Burg.

Add RTL support to the Font content view.

* UserInterface/Views/FontResourceContentView.css:
(.content-view.resource.font .preview > .line > .metric):
(body[dir=ltr] .content-view.resource.font .preview > .line > .metric):
(body[dir=rtl] .content-view.resource.font .preview > .line > .metric):
Compensate for the flipped z-order of the content and metric elements in
RTL by pushing metrics below the content.

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

2 years agoWebGPU prototype - Front-End
dino@apple.com [Sat, 11 Mar 2017 23:09:26 +0000 (23:09 +0000)]
WebGPU prototype - Front-End
https://bugs.webkit.org/show_bug.cgi?id=167952

Patch by Jon Lee <jonlee@apple.com> on 2017-03-11
Reviewed by Dean Jackson.

Source/JavaScriptCore:

* runtime/CommonIdentifiers.h: Add WebGPU objects.

Source/WebCore:

This patch adds all of the relevant front-end files, and builds successfully when
ENABLE(WEBGPU) is off. For the back-end components that are not yet
implemented, a stub was added with a FIXME.

* DerivedSources.make: Add all the new IDL files.
* WebCore.xcodeproj/project.pbxproj: New IDL, front-end and generated files.

JS custom bindings.
* bindings/js/JSDocumentCustom.cpp: Add WebGPU clause for getCSSCanvasContext.
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):
* bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp: Added.
* bindings/js/JSWebGPURenderingContextCustom.cpp: Added.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::isWebGPUType):
(WebCore::HTMLCanvasElement::getContextWebGPU):
(WebCore::HTMLCanvasElement::reset):
(WebCore::HTMLCanvasElement::paint):
(WebCore::HTMLCanvasElement::isGPU):
(WebCore::HTMLCanvasElement::getContextWebGPU): For release builds, switch to ASSERT_UNUSED.
* html/HTMLCanvasElement.h:
* html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::isGPU):

.cpp, .h, .idl files, wrapped in WEBGPU conditional, and enabled at runtime.
* html/canvas/WebGPUBuffer:
* html/canvas/WebGPUCommandBuffer:
* html/canvas/WebGPUCommandQueue:
* html/canvas/WebGPUDepthStencilDescriptor:
* html/canvas/WebGPUDepthStencilState:
* html/canvas/WebGPUDrawable:
* html/canvas/WebGPUEnums:
* html/canvas/WebGPUFunction:
* html/canvas/WebGPULibrary:
* html/canvas/WebGPUObject (no IDL):
* html/canvas/WebGPURenderCommandEncoder:
* html/canvas/WebGPURenderPassAttachmentDescriptor:
* html/canvas/WebGPURenderPassColorAttachmentDescriptor:
* html/canvas/WebGPURenderPassDepthAttachmentDescriptor:
* html/canvas/WebGPURenderPassDescriptor:
* html/canvas/WebGPURenderPipelineColorAttachmentDescriptor:
* html/canvas/WebGPURenderPipelineDescriptor:
* html/canvas/WebGPURenderPipelineState:
* html/canvas/WebGPURenderingContext:
* html/canvas/WebGPUTexture:
* html/canvas/WebGPUTextureDescriptor:  Add stubs.

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

2 years agoAdd Swift syntax highlighting to webkit.org
jond@apple.com [Sat, 11 Mar 2017 19:59:30 +0000 (19:59 +0000)]
Add Swift syntax highlighting to webkit.org
https://bugs.webkit.org/show_bug.cgi?id=163672

Reviewed by Matt Baker.

* wp-content/plugins/hyperlight/hyperlight/languages/swift.php: Added.

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

2 years agoRollout r213746
achristensen@apple.com [Sat, 11 Mar 2017 18:03:46 +0000 (18:03 +0000)]
Rollout r213746
https://bugs.webkit.org/show_bug.cgi?id=169497

That change broke a bunch of tests in storage/indexeddb.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Copied from WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp.
* PlatformGTK.cmake:

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

2 years agoCleanup "addCookie" and its sole user.
beidson@apple.com [Sat, 11 Mar 2017 16:44:00 +0000 (16:44 +0000)]
Cleanup "addCookie" and its sole user.
https://bugs.webkit.org/show_bug.cgi?id=169486

Reviewed by Brian Burg.

Source/WebCore:

No new tests (Refactor, no behavior change)

* WebCore.xcodeproj/project.pbxproj:

* loader/CookieJar.cpp:
(WebCore::addCookie): Deleted.
* loader/CookieJar.h:

* platform/Cookie.h:
(WebCore::Cookie::Cookie):
(WebCore::CookieHash::hash):
(WebCore::CookieHash::equal):
(WebCore::Cookie::encode):
(WebCore::Cookie::decode):

* platform/CookiesStrategy.h:

* platform/network/NetworkStorageSession.h:

* platform/network/PlatformCookieJar.h:

* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::addCookie): Deleted.

* platform/network/cocoa/CookieCocoa.mm: Copied from Source/WebCore/loader/CookieJar.h.
(WebCore::Cookie::operator NSHTTPCookie *):

* platform/network/cocoa/NetworkStorageSessionCocoa.mm: Copied from Source/WebCore/loader/CookieJar.h.
(WebCore::NetworkStorageSession::setCookies):
(WebCore::NetworkStorageSession::nsCookieStorage):

* platform/network/curl/CookieJarCurl.cpp:
(WebCore::addCookie): Deleted.

* platform/network/mac/CookieJarMac.mm:
(WebCore::deleteCookiesForHostnames):
(WebCore::deleteAllCookiesModifiedSince):
(WebCore::addCookie): Deleted.
(WebCore::cookieStorage): Deleted.

* platform/network/soup/CookieJarSoup.cpp:
(WebCore::toSoupCookie): Deleted.
(WebCore::addCookie): Deleted.

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::toSoupCookie):
(WebCore::NetworkStorageSession::setCookies):

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::addCookie): Deleted.

Source/WebKit2:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::addCookie): Deleted.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Cookie>::encode): Deleted.
(IPC::ArgumentCoder<Cookie>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::addSingleCookie):

* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::setCookies):
(WebKit::WebCookieManagerProxy::addCookie): Deleted.
* UIProcess/WebCookieManagerProxy.h:

* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::setCookies):
(WebKit::WebCookieManager::addCookie): Deleted.
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Cookies/WebCookieManager.messages.in:

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::addCookie): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

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

2 years agoREGRESSION(r213645): It made JSC tests super slow and timeout on AArch64 Linux
ossy@webkit.org [Sat, 11 Mar 2017 13:57:13 +0000 (13:57 +0000)]
REGRESSION(r213645): It made JSC tests super slow and timeout on AArch64 Linux
https://bugs.webkit.org/show_bug.cgi?id=169510

Unreviewed, disable LL_SC on Linux to unbreak this platform.

* wtf/Atomics.h:
* wtf/Platform.h:

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

2 years agoThe JITs should be able to emit fast TLS loads
fpizlo@apple.com [Sat, 11 Mar 2017 07:17:48 +0000 (07:17 +0000)]
The JITs should be able to emit fast TLS loads
https://bugs.webkit.org/show_bug.cgi?id=169483

Reviewed by Keith Miller.

Source/JavaScriptCore:

Added loadFromTLS32/64/Ptr to the MacroAssembler and added a B3 test for this.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::mrs_TPIDRRO_EL0):
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::loadFromTLSPtr):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::loadFromTLS32):
(JSC::MacroAssemblerARM64::loadFromTLS64):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::loadFromTLS32):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::loadFromTLS64):
* assembler/X86Assembler.h:
(JSC::X86Assembler::adcl_im):
(JSC::X86Assembler::addl_mr):
(JSC::X86Assembler::addl_im):
(JSC::X86Assembler::andl_im):
(JSC::X86Assembler::orl_im):
(JSC::X86Assembler::orl_rm):
(JSC::X86Assembler::subl_im):
(JSC::X86Assembler::cmpb_im):
(JSC::X86Assembler::cmpl_rm):
(JSC::X86Assembler::cmpl_im):
(JSC::X86Assembler::testb_im):
(JSC::X86Assembler::movb_i8m):
(JSC::X86Assembler::movb_rm):
(JSC::X86Assembler::movl_mr):
(JSC::X86Assembler::movq_mr):
(JSC::X86Assembler::movsxd_rr):
(JSC::X86Assembler::gs):
(JSC::X86Assembler::X86InstructionFormatter::SingleInstructionBufferWriter::memoryModRM):
* b3/testb3.cpp:
(JSC::B3::testFastTLS):
(JSC::B3::run):

Source/WTF:

Consolidated what we know about fast TLS in FastTLS.h.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FastTLS.h: Added.
(WTF::loadFastTLS):
(WTF::fastTLSOffsetForKey):
* wtf/Platform.h:
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::createAndRegisterForGetspecificDirect):
* wtf/WTFThreadData.h:
(WTF::wtfThreadData):

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

2 years agoFix watch and tv builds after r213294
achristensen@apple.com [Sat, 11 Mar 2017 06:56:12 +0000 (06:56 +0000)]
Fix watch and tv builds after r213294
https://bugs.webkit.org/show_bug.cgi?id=169508

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years agocheckpatchrelevance: Exception message is printed twice due to ScriptError handler
commit-queue@webkit.org [Sat, 11 Mar 2017 06:02:07 +0000 (06:02 +0000)]
checkpatchrelevance: Exception message is printed twice due to ScriptError handler
https://bugs.webkit.org/show_bug.cgi?id=169496

Unreviewed fix.

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-03-10

* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: Add --quiet flag to expected logs.

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

2 years agocheckpatchrelevance: Exception message is printed twice due to ScriptError handler
commit-queue@webkit.org [Sat, 11 Mar 2017 04:30:46 +0000 (04:30 +0000)]
checkpatchrelevance: Exception message is printed twice due to ScriptError handler
https://bugs.webkit.org/show_bug.cgi?id=169496

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-03-10
Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/tool/bot/patchanalysistask.py:
(PatchAnalysisTask._check_patch_relevance): Pass --quiet flag.
* Scripts/webkitpy/tool/steps/checkpatchrelevance.py:
(CheckPatchRelevance.options): Accept options.quiet to prevent duplicate output to stdout.

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

2 years agoPercentage constrained images shrinking inside blocks inside nested flex boxes
hyatt@apple.com [Sat, 11 Mar 2017 03:30:05 +0000 (03:30 +0000)]
Percentage constrained images shrinking inside blocks inside nested flex boxes
https://bugs.webkit.org/show_bug.cgi?id=169438

Reviewed by Dean Jackson.

Source/WebCore:

Added new test in fast/hidpi.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeChildPreferredLogicalWidths):
Make sure to clear out flexbox override sizes when computing preferred logical widths,
since they should not ever influence the preferred size.

LayoutTests:

* fast/hidpi/percent-height-image-nested-expected.html: Added.
* fast/hidpi/percent-height-image-nested.html: Added.
* fast/hidpi/resources/pic.jpg: Added.

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

2 years agoAdd SPI to set NSURLSessionConfiguration.allowsCellularAccess from _WKProcessPoolConf...
achristensen@apple.com [Sat, 11 Mar 2017 03:24:30 +0000 (03:24 +0000)]
Add SPI to set NSURLSessionConfiguration.allowsCellularAccess from _WKProcessPoolConfiguration
https://bugs.webkit.org/show_bug.cgi?id=169500
<rdar://problem/29599569>

Reviewed by Joseph Pecoraro.

* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::globalAllowsCellularAccess):
(WebKit::NetworkSessionCocoa::setAllowsCellularAccess):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration allowsCellularAccess]):
(-[_WKProcessPoolConfiguration setAllowsCellularAccess:]):

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

2 years agoDon't compile RemoteNetworkingContext when using NetworkSession
achristensen@apple.com [Sat, 11 Mar 2017 02:12:54 +0000 (02:12 +0000)]
Don't compile RemoteNetworkingContext when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=169497

Reviewed by Andy Estes.

RemoteNetworkingContext is only really used because PingHandle requires a NetworkingContext.
When using NetworkSession, we use PingLoad instead of PingHandle, so there's no reason to
ensure there's a RemoteNetworkingContext corresponding to new private sessions when they're never used.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Removed.
* PlatformGTK.cmake:
GTK only uses NetworkSession, so RemoteNetworkingContextSoup is no longer necessary.

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

2 years agoWebAssembly: Make more demos run
sbarati@apple.com [Sat, 11 Mar 2017 02:04:37 +0000 (02:04 +0000)]
WebAssembly: Make more demos run
https://bugs.webkit.org/show_bug.cgi?id=165510
<rdar://problem/29760310>

Reviewed by Keith Miller.

JSTests:

* wasm/Builder.js:
(export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
* wasm/js-api/wrapper-function.js: Added.
(exportImport):
(return.new.WebAssembly.Module):
(assert.throws.makeInstance):
(assert.throws.Bar):
(assert.throws):

Source/JavaScriptCore:

This patch makes another Wasm demo run:
https://kripken.github.io/BananaBread/cube2/bb.html

This patch fixes two bugs:
1. When WebAssemblyFunctionType was added, we did not properly
update the last JS type value.
2. Our code for our JS -> Wasm entrypoint was wrong. It lead to bad
code generation where we would emit B3 that would write over r12
and rbx (on x86) which is invalid since those are our pinned registers.
This patch just rewrites the entrypoint to use hand written assembler
code. I was planning on doing this anyways because it's a compile
time speed boost.

Also, this patch adds support for some new API features:
We can now export an import, either via a direct export, or via a Table and the
Element section. I've added a new class called WebAssemblyWrapperFunction that
just wraps over a JSObject that is a function. Wrapper functions have types
associated with them, so if they're re-imported, or called via call_indirect,
they can be type checked.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::webAssemblyWrapperFunctionStructure):
* runtime/JSType.h:
* wasm/JSWebAssemblyCodeBlock.h:
(JSC::JSWebAssemblyCodeBlock::wasmToJsCallStubForImport):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::createJSToWasmWrapper):
* wasm/WasmCallingConvention.h:
(JSC::Wasm::CallingConvention::headerSizeInBytes):
* wasm/js/JSWebAssemblyHelpers.h:
(JSC::isWebAssemblyHostFunction):
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
* wasm/js/JSWebAssemblyInstance.h:
(JSC::JSWebAssemblyInstance::importFunction):
(JSC::JSWebAssemblyInstance::importFunctions):
(JSC::JSWebAssemblyInstance::setImportFunction):
* wasm/js/JSWebAssemblyTable.cpp:
(JSC::JSWebAssemblyTable::JSWebAssemblyTable):
(JSC::JSWebAssemblyTable::grow):
(JSC::JSWebAssemblyTable::clearFunction):
(JSC::JSWebAssemblyTable::setFunction):
* wasm/js/JSWebAssemblyTable.h:
(JSC::JSWebAssemblyTable::getFunction):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::WebAssemblyInstanceConstructor::createInstance):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):
* wasm/js/WebAssemblyModuleRecord.h:
* wasm/js/WebAssemblyTablePrototype.cpp:
(JSC::webAssemblyTableProtoFuncGet):
(JSC::webAssemblyTableProtoFuncSet):
* wasm/js/WebAssemblyWrapperFunction.cpp: Added.
(JSC::callWebAssemblyWrapperFunction):
(JSC::WebAssemblyWrapperFunction::WebAssemblyWrapperFunction):
(JSC::WebAssemblyWrapperFunction::create):
(JSC::WebAssemblyWrapperFunction::finishCreation):
(JSC::WebAssemblyWrapperFunction::createStructure):
(JSC::WebAssemblyWrapperFunction::visitChildren):
* wasm/js/WebAssemblyWrapperFunction.h: Added.
(JSC::WebAssemblyWrapperFunction::signatureIndex):
(JSC::WebAssemblyWrapperFunction::wasmEntrypoint):
(JSC::WebAssemblyWrapperFunction::function):

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

2 years agoWeb Inspector: Only show "Break on..." menu if backend supports DOM breakpoints
mattbaker@apple.com [Sat, 11 Mar 2017 01:56:08 +0000 (01:56 +0000)]
Web Inspector: Only show "Break on..." menu if backend supports DOM breakpoints
https://bugs.webkit.org/show_bug.cgi?id=169488

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/DOMBreakpointTreeController.js:
(WebInspector.DOMBreakpointTreeController.appendBreakpointContextMenuItems):
Added assert to catch future cases where UI is being added when
backend support doesn't exist.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
Check for backend support.

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

2 years agoTurn ENABLE(MASM_PROBE) on by default for OS(DARWIN) release builds.
mark.lam@apple.com [Sat, 11 Mar 2017 01:39:44 +0000 (01:39 +0000)]
Turn ENABLE(MASM_PROBE) on by default for OS(DARWIN) release builds.
https://bugs.webkit.org/show_bug.cgi?id=169493

Reviewed by Saam Barati.

MASM_PROBE was already enabled for debug builds.  This change makes it so that we
don't have to rebuild the world every time we need to use it on a release build.

* wtf/Platform.h:

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

2 years agoJSC: BindingNode::bindValue doesn't increase the scope's reference count.
mark.lam@apple.com [Sat, 11 Mar 2017 01:38:22 +0000 (01:38 +0000)]
JSC: BindingNode::bindValue doesn't increase the scope's reference count.
https://bugs.webkit.org/show_bug.cgi?id=168546
<rdar://problem/30589551>

Reviewed by Saam Barati.

JSTests:

* stress/regress-168546.js: Added.

Source/JavaScriptCore:

We should protect the scope RegisterID with a RefPtr while it is still needed.

* bytecompiler/NodesCodegen.cpp:
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::BindingNode::bindValue):

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

2 years agoAdd new EWS queues to bot watcher's dashboard.
ryanhaddad@apple.com [Sat, 11 Mar 2017 01:13:46 +0000 (01:13 +0000)]
Add new EWS queues to bot watcher's dashboard.
https://bugs.webkit.org/show_bug.cgi?id=169485

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer): Add Bindings and JSC EWS queues.

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

2 years agoSwitch back to the Twitter API for the Tweet widget
jond@apple.com [Sat, 11 Mar 2017 01:01:19 +0000 (01:01 +0000)]
Switch back to the Twitter API for the Tweet widget
https://bugs.webkit.org/show_bug.cgi?id=168749

Reviewed by Lucas Forschler.

Updates the Twitter widget tile implementation to prefer the Twitter API to populate tweets
displayed through the widget. If the API fails for any reason, it falls back to using the
Tweet listener for updated tweets.

The Twitter API provides the benefit of embedding media and being able to display the full
URLs rather than Twitter-shortened URLs.

* wp-content/plugins/tweet-listener.php:
* wp-content/themes/webkit/style.css:
(.twitter-tile .tile-content):
(.twitter-tile.text-only):
(.twitter-tile .media):
(.twitter-tile img):
* wp-content/themes/webkit/widgets/twitter.php:

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

2 years agoWeb Inspector: popover with compositing reasons in Layers sidebar has hard to read...
commit-queue@webkit.org [Sat, 11 Mar 2017 00:59:39 +0000 (00:59 +0000)]
Web Inspector: popover with compositing reasons in Layers sidebar has hard to read layout
https://bugs.webkit.org/show_bug.cgi?id=167081

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-03-10
Reviewed by Brian Burg.

* UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
(.layer-tree-popover):
(.layer-tree-popover p):
(.layer-tree-popover ul):
(body[dir=ltr] .layer-tree-popover ul):
(body[dir=rtl] .layer-tree-popover ul):
Show `list-item-style` and make the <p> element stand out more (larger and bold).

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

2 years agoWeb Inspector: in Resources tab navigation bar, can't save the same file from context...
commit-queue@webkit.org [Sat, 11 Mar 2017 00:59:24 +0000 (00:59 +0000)]
Web Inspector: in Resources tab navigation bar, can't save the same file from context menu item more than once
https://bugs.webkit.org/show_bug.cgi?id=165665

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-03-10
Reviewed by Brian Burg.

* UserInterface/Views/ContextMenuUtilities.js:
(WebInspector.appendContextMenuItemsForSourceCode):
Force the "Save As" dialog to appear when saving, as otherwise subsequent clicks on "Save"
in the context menu will just override the previously saved file.

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