Timeline



Mar 13, 2017:

11:51 PM Changeset in webkit [213885] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Remove unused methods of ResourceRequestBase
https://bugs.webkit.org/show_bug.cgi?id=169579

Patch by Joseph Pecoraro <Joseph Pecoraro> 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.

10:58 PM Changeset in webkit [213884] by commit-queue@webkit.org
  • 20 edits in trunk/Source/WebCore

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):

5:39 PM Changeset in webkit [213883] by mark.lam@apple.com
  • 11 edits in trunk/Source/JavaScriptCore

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.

  1. 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.

  1. 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.

  1. 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):

5:38 PM Changeset in webkit [213882] by commit-queue@webkit.org
  • 238 edits
    14 copies
    1 move
    192 adds
    1 delete in trunk/LayoutTests

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:
5:34 PM Changeset in webkit [213881] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

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.

5:30 PM Changeset in webkit [213880] by eric.carlson@apple.com
  • 20 edits in trunk

[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.

5:18 PM Changeset in webkit [213879] by clopez@igalia.com
  • 2 edits in trunk/Source/WebCore

[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.

4:05 PM Changeset in webkit [213878] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip WebGPU tests on ios-simulator.

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
4:00 PM Changeset in webkit [213877] by beidson@apple.com
  • 33 edits
    1 copy
    5 adds in trunk

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:
3:52 PM Changeset in webkit [213876] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

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):

3:35 PM Changeset in webkit [213875] by Nikita Vasilyev
  • 5 edits
    1 add in trunk/Source/WebInspectorUI

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):

3:29 PM Changeset in webkit [213874] by webkit@devinrousso.com
  • 7 edits
    1 move in trunk/Source/WebInspectorUI

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.

3:27 PM Changeset in webkit [213873] by webkit@devinrousso.com
  • 8 edits
    2 adds in trunk

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.
3:06 PM Changeset in webkit [213872] by mark.lam@apple.com
  • 3 edits
    1 delete in trunk/Source/JavaScriptCore

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:
2:50 PM Changeset in webkit [213871] by wilander@apple.com
  • 21 edits in trunk/Source

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:
2:44 PM Changeset in webkit [213870] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

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):

2:36 PM Changeset in webkit [213869] by dino@apple.com
  • 5 edits
    3 adds in trunk

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.
2:26 PM Changeset in webkit [213868] by clopez@igalia.com
  • 2 edits in trunk/Tools

[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:
2:14 PM Changeset in webkit [213867] by webkit@devinrousso.com
  • 2 edits in trunk/Tools

Unreviewed, fix accidental comma.

  • Scripts/webkitpy/common/config/contributors.json:
2:11 PM Changeset in webkit [213866] by webkit@devinrousso.com
  • 2 edits in trunk/Tools

Unreviewed, change my email.

  • Scripts/webkitpy/common/config/contributors.json:
1:17 PM Changeset in webkit [213865] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix CMake build.

  • PlatformMac.cmake:

Add new files.

1:16 PM Changeset in webkit [213864] by andersca@apple.com
  • 4 edits in trunk/Tools

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:]):

1:08 PM Changeset in webkit [213863] by andersca@apple.com
  • 3 edits in trunk/Source/WebKit2

Fix more build warnings.

  • UIProcess/mac/WKWebInspectorWKWebView.mm:

(WebKit::runOpenPanel):

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::platformSave):

12:46 PM Changeset in webkit [213862] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

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.
12:42 PM Changeset in webkit [213861] by andersca@apple.com
  • 4 edits in trunk/Source

Fix build warnings.

Source/WebKit/mac:

  • WebCoreSupport/WebInspectorClient.mm:

(WebInspectorFrontendClient::save):
(-[WebInspectorWindowController webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):

Source/WebKit2:

  • UIProcess/mac/RemoteWebInspectorProxyMac.mm:

(WebKit::RemoteWebInspectorProxy::platformSave):

12:36 PM Changeset in webkit [213860] by commit-queue@webkit.org
  • 3 edits
    1 delete in trunk

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

12:09 PM Changeset in webkit [213859] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[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):

11:56 AM Changeset in webkit [213858] by Yusuke Suzuki
  • 18 edits in trunk

[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):

11:09 AM Changeset in webkit [213857] by Chris Dumez
  • 19 edits
    2 adds in trunk/Source

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.

11:00 AM Changeset in webkit [213856] by fpizlo@apple.com
  • 3 edits
    1 add in trunk

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):

10:54 AM Changeset in webkit [213855] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

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:
10:51 AM Changeset in webkit [213854] by msaboff@apple.com
  • 8 edits in trunk/Source/WebKit2

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:
10:42 AM Changeset in webkit [213853] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.11/Source

Versioning.

10:40 AM Changeset in webkit [213852] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

10:31 AM Changeset in webkit [213851] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.11

Tag Safari-604.1.11.

10:03 AM Changeset in webkit [213850] by commit-queue@webkit.org
  • 7 edits in trunk

[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 <Caio Lima> 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):

9:57 AM Changeset in webkit [213849] by Ryan Haddad
  • 4 edits in trunk/LayoutTests

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:
9:39 AM Changeset in webkit [213848] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

[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 <Antoine Quint> 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.
9:29 AM Changeset in webkit [213847] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[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):

9:26 AM Changeset in webkit [213846] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit/win

[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:
8:46 AM Changeset in webkit [213845] by clopez@igalia.com
  • 2 edits in trunk/Tools

[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):

7:42 AM Changeset in webkit [213844] by zandobersek@gmail.com
  • 2 edits
    2 adds
    2 deletes in trunk/Source/WebKit2

[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):

7:04 AM Changeset in webkit [213843] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit2

[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:
6:26 AM Changeset in webkit [213842] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213833 - 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:
6:24 AM Changeset in webkit [213841] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Tools

Merge r213789 - 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.

6:24 AM Changeset in webkit [213840] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r213773 - 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.

5:59 AM Changeset in webkit [213839] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.16

Merge r213742 - 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):

5:56 AM Changeset in webkit [213838] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16

Merge r213711 - imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html is unreliable
https://bugs.webkit.org/show_bug.cgi?id=169465

Reviewed by Zalan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-expected.txt:

Source/WebCore:

It shows all subtests passing but that is a bug. We don't even support all the unit types.
The test occasionally fails when reloading, that failing results are actually the correct ones.

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::SizesAttributeParser):

Ensure we have correct size for the iframe before parsing 'sizes' attribute values. The interpretation of
these may depend on the iframe dimensions.

5:45 AM Changeset in webkit [213837] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r213648 - WebKit: JSC: JSObject::ensureLength doesn't check if ensureLengthSlow failed
https://bugs.webkit.org/show_bug.cgi?id=169215

Reviewed by Mark Lam.

This doesn't have a test because it would be a very complicated test.

  • runtime/JSObject.h:

(JSC::JSObject::ensureLength): If ensureLengthSlow returns false, we need to return false.

5:26 AM Changeset in webkit [213836] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r213646 - Align Document.elementFromPoint() with the CSSOM specification
https://bugs.webkit.org/show_bug.cgi?id=169403

Reviewed by Sam Weinig.

Source/WebCore:

Align Document.elementFromPoint() with the CSSOM specification:

In particular, the parameters should be mandatory and of type double.

The parameters are mandatory in both Firefox and Chrome already. Parameters
are finite floating point in Firefox and integers in Chrome.

Test: fast/dom/elementFromPoint-parameters.html

  • dom/DocumentOrShadowRoot.idl:
  • dom/TreeScope.cpp:

(WebCore::TreeScope::elementFromPoint):

  • dom/TreeScope.h:

LayoutTests:

Add layout test coverage.

  • fast/dom/elementFromPoint-parameters-expected.txt: Added.
  • fast/dom/elementFromPoint-parameters.html: Added.
  • fast/dom/non-numeric-values-numeric-parameters-expected.txt:
  • fast/dom/script-tests/non-numeric-values-numeric-parameters.js:
5:09 AM Changeset in webkit [213835] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r213638 - Correctly process the return value of gdk_drag_context_get_selected_action()

Reviewed by Carlos Garcia Campos.

It returns the action itself and not the bitmask.

  • UIProcess/gtk/DragAndDropHandler.cpp:

(WebKit::DragAndDropHandler::drop):

5:06 AM Changeset in webkit [213834] by Carlos Garcia Campos
  • 12 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r213606 - Parameter to input.setCustomValidity() should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=169332

Reviewed by Sam Weinig.

Source/WebCore:

Parameter to input.setCustomValidity() should not be nullable:

Firefox and Chrome agree with the specification so the change
should be safe.

Test: fast/forms/setCustomValidity-null-parameter.html

  • html/HTMLButtonElement.idl:
  • html/HTMLFieldSetElement.idl:
  • html/HTMLInputElement.idl:
  • html/HTMLKeygenElement.idl:
  • html/HTMLObjectElement.idl:
  • html/HTMLOutputElement.idl:
  • html/HTMLSelectElement.idl:
  • html/HTMLTextAreaElement.idl:

LayoutTests:

  • fast/forms/ValidityState-customError-expected.txt:
  • fast/forms/ValidityState-customError.html:

Rebaseline now that behavior has changed when passing null or undefined
to setCustomValidity().

  • fast/forms/setCustomValidity-null-parameter-expected.txt: Added.
  • fast/forms/setCustomValidity-null-parameter.html: Added.

Add layout test coverage.

5:01 AM Changeset in webkit [213833] by magomez@igalia.com
  • 8 edits in trunk/Source/WebCore

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:
4:45 AM Changeset in webkit [213832] by Carlos Garcia Campos
  • 9 edits
    12 deletes in releases/WebKitGTK/webkit-2.16

Merge r213593 - CSS Multicolumn should not clip columns horizontally
https://bugs.webkit.org/show_bug.cgi?id=169363

Reviewed by Sam Weinig.

Source/WebCore:

Revised multiple tests in fast/multicol.

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
Stop clipping horizontally. Section 8.1 of the spec changed from "clip" to "don't clip",
so we're changing to match the latest draft. Keep iBooks-based pagination clipping though.

LayoutTests:

  • fast/multicol/newmulticol/adjacent-spanners-expected.html:
  • fast/multicol/newmulticol/adjacent-spanners.html:
  • fast/multicol/newmulticol/clipping-expected.html:
  • fast/multicol/newmulticol/clipping.html:
  • fast/multicol/newmulticol/spanner-inline-block-expected.html:
  • fast/multicol/newmulticol/spanner-inline-block.html:
4:44 AM Changeset in webkit [213831] by Manuel Rego Casasnovas
  • 100 edits in trunk

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:
4:44 AM Changeset in webkit [213830] by Carlos Garcia Campos
  • 17 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213563 - Asynchronous image decoding should consider the drawing size if it is smaller than the size of the image
https://bugs.webkit.org/show_bug.cgi?id=168814

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

If the image destinationRect.size() is smaller than the imageSourceSize
(e.g. 3000x3000 pixels), CGImageSourceCreateThumbnailAtIndex() is slower
than CGImageSourceCreateImageAtIndex() in decoding this image. To overcome
this problem, the entry (kCGImageSourceThumbnailMaxPixelSize,
max(destinationRect.width, destinationRect.height)) is added to the options
dictionary when calling CGImageSourceCreateThumbnailAtIndex(). This will
avoid copying a large block of memory for the unscaled bitmap image.

An argument named 'sizeForDrawing' of type std::optional<IntSize> will be passed
all the way from BitmapImage to ImageDecoder. If bool(sizeForDrawing) equals
true that means we want async image decoding. Otherwise the image will be decoded
synchronously.

The subsamplingLevel argument will be passed as std::optional<SubsamplingLevel>.
to ImageFrame query functions. When combined with sizeForDrawing, the meaning of
these two arguments will be the following:
-- !bool(subsamplingLevel): No caching is required. return what is stored in ImageFrameCache.
-- bool(subsamplingLevel) && !bool(sizeForDrawing): Match subsamplingLevel only. Recache if it's different.
-- bool(subsamplingLevel) && bool(sizeForDrawing): Match both both. . Recache if one of them is different.

We are going to allow decoding the same ImageFrame for different sizeForDrawings.
The rule is a new decoding is allowed only if the maxPixelSize(sizeForDrawing) of
the last requested image decoding is less than the new request sizeForDrawing.

  • loader/cache/CachedImage.h: Add a helper function which returns the URL of a CachedImage.
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::frameImageAtIndex): Add a new argument for sizeForDrawing.
(WebCore::BitmapImage::nativeImage): Pass an empty sizeForDrawing to frameImageAtIndex(). We an image with the native size.
(WebCore::BitmapImage::nativeImageForCurrentFrame): Ditto.
(WebCore::BitmapImage::nativeImageOfSize): Ditto.
(WebCore::BitmapImage::draw): Pass the destRect.size() to internalStartAnimation().
(WebCore::BitmapImage::isAsyncDecodingRequired): A helper function to answer the question
whether the async image decoding is required. It takes into account the animated images, the
large image, and the image size.
(WebCore::BitmapImage::internalStartAnimation): If async image decoding is requested for this frame m_sizeForDraw
will be set. If internalStartAnimation() is called from startAnimation(), sizeForDraw will be empty. In this
case no async image decoding will be requested. This happens only when startAnimation() is called from outside
BitmapImage::draw().
(WebCore::BitmapImage::advanceAnimation): Change the log message.
(WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex): Ditto.

  • platform/graphics/BitmapImage.h:
  • platform/graphics/ImageFrame.cpp:

(WebCore::ImageFrame::operator=): Include m_sizeForDraw in the properties of ImageFrame.
(WebCore::maxPixelSize): Returns the maximum of the width() and the height of an IntSize.
(WebCore::ImageFrame::isBeingDecoded): Returns true if the ImageFrame is currently being decoded for a specific sizeForDrawing.
(WebCore::ImageFrame::hasValidNativeImage): Ditto.

  • platform/graphics/ImageFrame.h:

(WebCore::ImageFrame::enqueueSizeForDecoding): Adds a new sizeForDrawing; this sets the ImageFrame is being decoded for this sizeForDrawing.
(WebCore::ImageFrame::dequeueSizeForDecoding): Removes the first sizeForDrawing was enqueued; this marks this ImageFrame has finished decoding for this sizeForDrawing.
(WebCore::ImageFrame::clearSizeForDecoding): Clears the sizeForDecoding queue. Marks the ImageFrame for not being decoded.
(WebCore::ImageFrame::isEmpty): Replace Decoding::Empty by Decoding::None.
(WebCore::ImageFrame::sizeForDrawing): Returns the ImageFrame sizeForDraw.
(WebCore::ImageFrame::hasDecodedNativeImage): Returns true if the ImageFrame doesn't need decoding before drawing.
(WebCore::ImageFrame::hasValidNativeImage): Deleted. Moved to the source file.

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::setFrameNativeImageAtIndex): Take a new argument for sizeForDraw.
(WebCore::ImageFrameCache::setFrameMetadataAtIndex): When sizeForDraw is set, use the decoder to get the image
frame size. Otherwise, get the size of the nativeImage.
(WebCore::ImageFrameCache::replaceFrameNativeImageAtIndex): Take a new argument for sizeForDraw.
(WebCore::ImageFrameCache::cacheFrameNativeImageAtIndex): Ditto.
(WebCore::ImageFrameCache::startAsyncDecodingQueue): Pass the sizeForDraw as a new property of the ImageFrame.
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Store sizeForDraw in ImageFrameRequest. Delete unneeded check.
This function always receives a valid subsamplingLevel.
(WebCore::ImageFrameCache::stopAsyncDecodingQueue): Marks all the queued ImageFrames for not being decoded.
(WebCore::ImageFrameCache::frameAtIndexCacheIfNeeded): Take a new argument for sizeForDraw. If this function fixes the
properties of ImageFrame properties, keep the old sizeForDraw and/or subsamplingLevel. If a new frame is
decoded, no async image decoding will be done in this code path. So pass an empty std::optional<IntSize> to
ImageDecoder::createFrameImageAtIndex() and store std::optional<IntSize> in ImageFrame.
(WebCore::ImageFrameCache::frameMetadataAtIndex): A new helper function which takes a variable number of arguments which
will be passed to the (ImageFrame::*functor).
(WebCore::ImageFrameCache::frameMetadataAtIndexCacheIfNeeded): Make this function takes a variable number of arguments which
will be passed to the frameAtIndexCacheIfNeeded().
(WebCore::ImageFrameCache::size): Pass an Metadata, valid SubsamplingLevel and empty sizeForDraw to frameMetadataAtIndexCacheIfNeeded().
(WebCore::ImageFrameCache::sizeRespectingOrientation): Ditto.
(WebCore::ImageFrameCache::singlePixelSolidColor): Pass MetadataAndImage, empty SubsamplingLevel and empty sizeForDraw to
frameMetadataAtIndexCacheIfNeeded(); we can use the current frame image regardless of its size.
(WebCore::ImageFrameCache::frameIsBeingDecodedAtIndex): Pass the ImageFrame method as a function argument instead of
passing it as a template argument.
(WebCore::ImageFrameCache::frameIsCompleteAtIndex): Ditto.
(WebCore::ImageFrameCache::frameHasAlphaAtIndex): Ditto.
(WebCore::ImageFrameCache::frameHasImageAtIndex): Ditto.
(WebCore::ImageFrameCache::frameHasValidNativeImageAtIndex): Pass subsamplingLevel and sizeForDrawing to frameMetadataAtIndex().
(WebCore::ImageFrameCache::frameHasDecodedNativeImage): New helper function to answer the question whether an ImageFrame will need
decoding when drawing or not.
(WebCore::ImageFrameCache::frameSubsamplingLevelAtIndex): Pass the ImageFrame method as a function argument instead of
passing it as a template argument.
(WebCore::ImageFrameCache::frameSizeAtIndex): Ditto.
(WebCore::ImageFrameCache::frameBytesAtIndex): Ditto.
(WebCore::ImageFrameCache::frameDurationAtIndex): Ditto.
(WebCore::ImageFrameCache::frameOrientationAtIndex):
(WebCore::ImageFrameCache::frameImageAtIndex): Ditto.
(WebCore::ImageFrameCache::frameAtIndex): Deleted. Renamed to frameAtIndexCacheIfNeeded().

  • platform/graphics/ImageFrameCache.h:

(WebCore::ImageFrameCache::frameAtIndexCacheIfNeeded):

  • platform/graphics/ImageObserver.h: Define a virtual function for image sourceUrl().
  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::frameImageAtIndex): Take a new argument for sizeForDrawing.

  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::requestFrameAsyncDecodingAtIndex): Take a new argument for sizeForDrawing.
(WebCore::ImageSource::frameHasValidNativeImageAtIndex): Ditto.
(WebCore::ImageSource::frameHasDecodedNativeImage): New helper function.
(WebCore::ImageSource::frameImageAtIndex): Ditto.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::createImageSourceOptions): Create a dictionary with the basic image decoding options.
(WebCore::createImageSourceAsyncOptions): Create a dictionary with the basic asynchronous image decoding options.
(WebCore::appendImageSourceOption): Append the SubsamplingLevel or the MaxPixelSize option to an CGImageSource options dictionary.
(WebCore::appendImageSourceOptions): Append the SubsamplingLevel and the MaxPixelSize option to an CGImageSource options dictionary.
(WebCore::imageSourceOptions): Creates a dictionary for the synchronous image decoding options.
(WebCore::imageSourceAsyncOptions): Creates a dictionary for the asynchronous image decoding options.
(WebCore::ImageDecoder::createFrameImageAtIndex): Replace the DecodingMode argument by an std::optional<IntSize>.

  • platform/graphics/cg/ImageDecoderCG.h: Change a prototype.
  • platform/graphics/win/ImageDecoderDirect2D.cpp:

(WebCore::ImageDecoder::createFrameImageAtIndex): Replace the DecodingMode argument by an std::optional<IntSize>.

  • platform/graphics/win/ImageDecoderDirect2D.h: Change a prototype.
  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::createFrameImageAtIndex): Replace the DecodingMode argument by an std::optional<IntSize>.

  • platform/image-decoders/ImageDecoder.h: Change a prototype.
4:40 AM Changeset in webkit [213829] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.16

Merge r213546 - [URLParser] Fix file URLs that are just file:// and a Windows drive letter
https://bugs.webkit.org/show_bug.cgi?id=169242

Patch by Alex Christensen <achristensen@webkit.org> on 2017-03-07
Reviewed by Tim Horton.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

This is specified in https://url.spec.whatwg.org/#file-host-state and tested by a newly-passing
web platform test. I added the check for the windows drive quirk in the FileHost state of the
parser but I forgot it when FileHost is the terminal state.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

4:39 AM Changeset in webkit [213828] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r213534 - Simple line layout: Do not use invalid m_lastNonWhitespaceFragment while removing trailing whitespace.
https://bugs.webkit.org/show_bug.cgi?id=169288
rdar://problem/30576976

Reviewed by Antti Koivisto.

Source/WebCore:

When the current line has nothing but whitespace, m_lastNonWhitespaceFragment is invalid so
we should not use the start/end values to decide how many characters we need to revert.
This patch makes m_lastNonWhitespaceFragment optional. When it's invalid we just remove
all the runs from the current line since they are all considered whitespace runs.

Test: fast/text/simple-line-layout-line-is-all-whitespace.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::revertAllRunsOnCurrentLine):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):

LayoutTests:

  • fast/text/simple-line-layout-line-is-all-whitespace-expected.txt: Added.
  • fast/text/simple-line-layout-line-is-all-whitespace.html: Added.
4:38 AM Changeset in webkit [213827] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213522 - ShadowBlur::calculateLayerBoundingRect doesn't need to return the enclosingIntRect of layerRect
https://bugs.webkit.org/show_bug.cgi?id=168650

Patch by Fujii Hironori <Fujii Hironori> on 2017-03-07
Reviewed by Simon Fraser.

No new tests, no behavior change.

  • platform/graphics/ShadowBlur.h: Change the type of return value

from IntRect to IntSize.

  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::calculateLayerBoundingRect): Ditto.
(WebCore::ShadowBlur::drawRectShadow): Rename a variable layerRect layerSize.
(WebCore::ShadowBlur::drawInsetShadow): Ditto.
(WebCore::ShadowBlur::drawRectShadowWithoutTiling): Ditto.
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling): Ditto.
(WebCore::ShadowBlur::beginShadowLayer): Ditto.

4:38 AM Changeset in webkit [213826] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213523 - Animated GIFs fail to play in multi-column layout
https://bugs.webkit.org/show_bug.cgi?id=167901
<rdar://problem/30382262>

Reviewed by Zalan Bujtas.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeRectForRepaint):
Make sure to handle the case where we pass in a null repaintContainer and need
to cross a multicolumn flow thread -> region boundary as a result.

4:34 AM Changeset in webkit [213825] by Carlos Garcia Campos
  • 20 edits
    1 copy
    2 adds
    2 deletes in releases/WebKitGTK/webkit-2.16

Merge r213517 - Align initEvent / initCustomEvent / initMessageEvent with the latest specification
https://bugs.webkit.org/show_bug.cgi?id=169176

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Re-sync web-platform tests from upstream after:

  • web-platform-tests/dom/events/CustomEvent-expected.txt:
  • web-platform-tests/dom/events/CustomEvent.html:
  • web-platform-tests/dom/events/Event-initEvent-expected.txt:
  • web-platform-tests/dom/events/Event-initEvent.html:
  • web-platform-tests/dom/interfaces-expected.txt:
  • web-platform-tests/dom/interfaces.html:
  • web-platform-tests/html/dom/interfaces-expected.txt:
  • web-platform-tests/html/dom/interfaces.html:
  • web-platform-tests/html/dom/resources/interfaces.idl: Copied from LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces.html.
  • web-platform-tests/html/dom/resources/untested-interfaces.idl: Added.
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor-expected.txt: Removed.
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.html: Removed.
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html:

Source/WebCore:

Align initEvent / initCustomEvent / initMessageEvent with the latest specification
after:

In particular, the following changes were made:

  • initEvent: The length property now properly returns 1 instead of 3 as only the first parameter is mandatory. We were already behaving correcting the the length property value was wrong because we forgot to drop a hack from the bindings generator.
  • initCustomEvent: Make all parameters except the first optional. Previously, all parameters were mandatory so this is safe.
  • initMessageEvent: Drop the custom code and mark the first parameter as mandatory. A side effect of dropping the custom code is that null is no longer considered as valid input for the last parameter. The parameter is of type sequence<> and the new behavior is consistent with the specification and Firefox. If it turns out to break existing content, I'll make the parameter nullable in a follow-up.

No new tests, updated existing tests.

  • bindings/js/JSMessageEventCustom.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePropertiesHashTable):

  • dom/CustomEvent.idl:
  • dom/MessageEvent.idl:

LayoutTests:

Updated existing tests to reflect behavior change.

  • fast/events/init-events-expected.txt:
  • fast/events/script-tests/init-events.js:
  • fast/eventsource/eventsource-attribute-listeners.html:
4:16 AM Changeset in webkit [213824] by Chris Dumez
  • 17 edits in trunk/Source

[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.

4:12 AM Changeset in webkit [213823] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit/win

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:
4:07 AM Changeset in webkit [213822] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r213501 - Validate DOM after potentially destructive actions during parser insert operations
https://bugs.webkit.org/show_bug.cgi?id=169222
<rdar://problem/30689729>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Do not perform an insert operation if the next child's parent is no longer
part of the tree. This can happen if JavaScript runs during node removal
events and modifies the contents of the document.

This patch was inspired by a similar Blink change by Marius Mlynski:
<https://src.chromium.org/viewvc/blink?view=revision&revision=200690>

Tests: fast/parser/scriptexec-during-parserInsertBefore.html

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::executeReparentTask):
(WebCore::executeInsertAlreadyParsedChildTask):

LayoutTests:

This change merges a Blink test case from:
<https://src.chromium.org/viewvc/blink?view=revision&revision=200690>

  • fast/parser/scriptexec-during-parserInsertBefore-expected.txt: Added.
  • fast/parser/scriptexec-during-parserInsertBefore.html: Added.
4:04 AM Changeset in webkit [213821] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213493 - [CMake] SN-DBS fails to build: Cannot open include file: 'WebCoreTestSupportPrefix.h'
https://bugs.webkit.org/show_bug.cgi?id=169244

Patch by Fujii Hironori <Fujii Hironori> on 2017-03-06
Reviewed by Alex Christensen.

A distributed build system SN-DBS can not find
WebCoreTestSupportPrefix.h without an include path to it.

  • CMakeLists.txt: Add 'WebCore/testing/js' to include paths.
4:02 AM Changeset in webkit [213820] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213491 - [cairo] error C2065: 'quality': undeclared identifier since r213412
https://bugs.webkit.org/show_bug.cgi?id=169240

Patch by Fujii Hironori <Fujii Hironori> on 2017-03-06
Reviewed by Ryosuke Niwa.

  • platform/graphics/cairo/ImageBufferCairo.cpp:

(WebCore::ImageBuffer::toDataURL): Name the unnamed second argument 'quality'.

4:01 AM Changeset in webkit [213819] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Tools

Merge r213485 - [GTK] Mark WTF_Lock.ContendedLongSection and WTF_WordLock.ContendedLongSection as slow.

Unreviewed test gardening.

The ContendedShortSection version of this tests were already marked as slow.
And the ContendedLongSection version takes more or less the same time to run.
They cause time outs on the bot sometimes.

  • Scripts/run-gtk-tests:

(TestRunner):

3:58 AM Changeset in webkit [213818] by Carlos Garcia Campos
  • 11 edits in releases/WebKitGTK/webkit-2.16

Merge r213469 - Fix URLs relative to file URLs with paths beginning with Windows drive letters
https://bugs.webkit.org/show_bug.cgi?id=169178

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

Windows drives in file URLs can begin with windows drive letters, such as file:///C:/
which should not be removed when making other URLs relative to them.
See https://url.spec.whatwg.org/#file-slash-state

Covered by new API tests and newly passing web-platform-tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::copyBaseWindowsDriveLetter):
(WebCore::URLParser::copyASCIIStringUntil):
(WebCore::URLParser::parse):

  • platform/URLParser.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

LayoutTests:

  • fast/url/relative-win-expected.txt:

Some tests pass now. localhost should indeed be removed according to the latest spec.

3:48 AM Changeset in webkit [213817] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r213452 - Null pointer crash when loading module with unresolved import also as a script file
https://bugs.webkit.org/show_bug.cgi?id=168971

Reviewed by Saam Barati.

JSTests:

  • stress/re-execute-error-module.js: Added.

(shouldBe):
(async):

  • stress/resources/error-module.js: Added.

Source/JavaScriptCore:

If linking throws an error, this error should be re-thrown
when requesting the same module.

  • builtins/ModuleLoaderPrototype.js:

(globalPrivate.newRegistryEntry):

  • runtime/JSModuleRecord.cpp:

(JSC::JSModuleRecord::link):

3:45 AM Changeset in webkit [213816] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.16

Merge r213449 - [css-grid] Stretch should grow and shrink items to fit its grid area
https://bugs.webkit.org/show_bug.cgi?id=163200

Reviewed by Darin Adler.

Source/WebCore:

After some discussions the CSS WG agreed that stretch should not only
grow items, but also shrink them to fit its grid area.
That way the "min-width|height: auto" is somehow ignored for grid items.
More info at: https://github.com/w3c/csswg-drafts/issues/283

The good part is that this allows us to remove some ugly code we've
in RenderBox that was only used by Grid Layout.

For images, we'll be stretching on both axis right now, so the aspect
ratio won't be preserved. The default behavior might change in those
cases, but that should be implemented in a different patch.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalHeight):

LayoutTests:

The tests have been updated according to the new expected behavior.

  • fast/css-grid-layout/grid-container-percentage-columns.html:
  • fast/css-grid-layout/min-width-height-auto-and-margins.html:
  • fast/css-grid-layout/min-width-height-auto.html:
3:43 AM Changeset in webkit [213815] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213448 - [GTK] WebProcess from WebKitGtk+ 2.15.x SIGSEVs in GIFLZWContext::doLZW(unsigned char const*, unsigned long) at Source/WebCore/platform/image-decoders/gif/GIFImageReader.cpp:303
https://bugs.webkit.org/show_bug.cgi?id=167304

Reviewed by Carlos Garcia Campos.

Add a lock to ensure that the GIFImageReader that we are using for decoding is not deleted while
the decoding thread is using it.

No new tests.

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::clearFrameBufferCache):

3:42 AM Changeset in webkit [213814] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r213447 - Currency digits calculation in Intl.NumberFormat should call out to ICU
https://bugs.webkit.org/show_bug.cgi?id=169182

Patch by Daniel Ehrenberg <littledan@igalia.com> on 2017-03-06
Reviewed by Yusuke Suzuki.

  • runtime/IntlNumberFormat.cpp:

(JSC::computeCurrencyDigits):
(JSC::computeCurrencySortKey): Deleted.
(JSC::extractCurrencySortKey): Deleted.

3:41 AM Changeset in webkit [213813] by Carlos Garcia Campos
  • 18 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213445 - [GStreamer] Adopt nullptr
https://bugs.webkit.org/show_bug.cgi?id=123438

Patch by Vanessa Chipirrás Navalón <vchipirras@igalia.com> on 2017-03-06
Reviewed by Xabier Rodriguez-Calvar.

To adapt the code to the C++11 standard, all NULL or 0 pointers have been changed to nullptr.

  • platform/audio/gstreamer/AudioDestinationGStreamer.cpp:

(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):

  • platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:

(WebCore::AudioFileReader::handleNewDeinterleavePad):
(WebCore::AudioFileReader::plugDeinterleave):
(WebCore::AudioFileReader::decodeAudioForBusCreation):

  • platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:

(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::configureAudioBin):
(WebCore::AudioSourceProviderGStreamer::setClient):
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):

  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

(webkit_web_audio_src_init):
(webKitWebAudioSrcLoop):
(webKitWebAudioSrcChangeState):

  • platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:

(WebCore::AudioTrackPrivateGStreamer::setEnabled):

  • platform/graphics/gstreamer/GStreamerUtilities.cpp:

(WebCore::initializeGStreamer):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
(WebCore::initializeGStreamerAndRegisterWebKitElements):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::newTextSample):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContents):
Removed the unused second argument on processTableOfContentsEntry function.
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
Removed the unused second argument on this function.
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

Removed the unused second argument on processTableOfContentsEntry function.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::setMuted):
(WebCore::MediaPlayerPrivateGStreamerBase::muted):
(WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute):
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
(WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
(WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:

(WebCore::MediaPlayerPrivateGStreamerOwr::registerMediaEngine):

  • platform/graphics/gstreamer/TextCombinerGStreamer.cpp:

(webkit_text_combiner_init):
(webkitTextCombinerPadEvent):
(webkitTextCombinerRequestNewPad):
(webkitTextCombinerNew):

  • platform/graphics/gstreamer/TextSinkGStreamer.cpp:

(webkitTextSinkNew):

  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:

(WebCore::TrackPrivateBaseGStreamer::tagsChanged):
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):

  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(webkit_video_sink_init):
(webkitVideoSinkProposeAllocation):
(webkitVideoSinkNew):

  • platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:

(WebCore::VideoTrackPrivateGStreamer::setSelected):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_init):
(webKitWebSrcDispose):
(webKitWebSrcSetProperty):
(webKitWebSrcStop):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetProtocols):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(ResourceHandleStreamingClient::didFail):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webKitMediaSrcGetProtocols):

3:40 AM Changeset in webkit [213812] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.16

Merge r213440 - Avoid backing store for layers with empty text nodes in a few more cases
https://bugs.webkit.org/show_bug.cgi?id=169185

Reviewed by Dan Bernstein.

Source/WebCore:

In hasPaintingNonLayerDescendants() we can check whether the RenderText's linesBoundingBox()
is empty to avoid backing store in a few more cases. Also use containsOnlyWhitespace() rather
than isAllCollapsibleWhitespace(), because there's no need for backing store for non-selectable
whitespace text.

Covered by existing tests.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

inline-block-no-backing.html enhanced to have a layer with non-collapsible whitespace (an &nbsp;).

Rebaselined other tests.

  • compositing/backing/inline-block-no-backing-expected.txt:
  • compositing/backing/inline-block-no-backing.html:
  • compositing/iframes/page-cache-layer-tree-expected.txt:
  • css3/blending/blend-mode-clip-accelerated-blending-canvas-expected.txt:
  • platform/ios-simulator-wk2/compositing/backing/inline-block-no-backing-expected.txt:
  • platform/ios-simulator-wk2/compositing/iframes/page-cache-layer-tree-expected.txt:
3:38 AM Changeset in webkit [213811] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r213438 - Using <form> in <template> causes following <form> to get swallowed
https://bugs.webkit.org/show_bug.cgi?id=163552

Reviewed by Sam Weinig.

Source/WebCore:

As per the HTML specification [1], when finding a "form" tag in the "in body"
insertion mode, we should insert an HTML element for the token, and, if there
is no template element on the stack of open elements, set the form element
pointer to point to the element created.

We were missing the "if there is no template element on the stack of open
elements" check and setting the form element pointer unconditionally.
This patch fixes the issue.

[1] https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody:form-element-pointer-2

Test: fast/parser/form-after-template.html

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::insertHTMLFormElement):

LayoutTests:

Add layout test coverage.

  • fast/parser/form-after-template-expected.html: Added.
  • fast/parser/form-after-template.html: Added.
3:37 AM Changeset in webkit [213810] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213435 - Make some RenderLayer tree traversal in RenderLayerBacking more generic
https://bugs.webkit.org/show_bug.cgi?id=169177

Reviewed by Zalan Bujtas.

The real goal of this patch is reduce the number of callers of
RenderLayerBacking::isPaintDestinationForDescendantLayers() to one. To achieve that,
have the setContentsVisible() logic (which is really just about the CSS 'visibility' property)
do its own tree traversal which just consults layer.hasVisibleContent(). So
make descendantLayerPaintsIntoAncestor() a generic traversal function which walks
descendant layers which may paint into the target layer. The "Visible" in the name
reflects the fact that it can bypass a subtree for a layer with !hasVisibleDescendant().

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateAfterDescendants):
(WebCore::traverseVisibleNonCompositedDescendantLayers):
(WebCore::RenderLayerBacking::isPaintDestinationForDescendantLayers):
(WebCore::RenderLayerBacking::hasVisibleNonCompositedDescendants):
(WebCore::descendantLayerPaintsIntoAncestor): Deleted.

  • rendering/RenderLayerBacking.h:
3:36 AM Changeset in webkit [213809] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213429 - Clarify some terminology in RenderLayerBacking
https://bugs.webkit.org/show_bug.cgi?id=169174

Reviewed by Zalan Bujtas.

Rename some functions related to directly-composited background images and
box decorations for clarify.

Only behavior change is for canDirectlyCompositeBackgroundBackgroundImage() to check
GraphicsLayer::supportsContentsTiling(), which means that RenderLayerBacking::contentChanged()
will no longer trigger a updateGeometry() when it gets BackgroundImageChanged on non-
CoordinateGraphics platforms.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateAfterDescendants):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBoxDecorations):
(WebCore::canDirectlyCompositeBackgroundBackgroundImage):
(WebCore::hasPaintedBoxDecorationsOrBackgroundImage):
(WebCore::supportsDirectlyCompositedBoxDecorations):
(WebCore::RenderLayerBacking::paintsBoxDecorations):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::contentChanged):
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents): Deleted.
(WebCore::canCreateTiledImage): Deleted.
(WebCore::hasVisibleBoxDecorationsOrBackgroundImage): Deleted.
(WebCore::supportsDirectBoxDecorationsComposition): Deleted.

  • rendering/RenderLayerBacking.h:
3:34 AM Changeset in webkit [213808] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r213420 - Remove duplicate initialization guard in WebKit2 logging initialization
https://bugs.webkit.org/show_bug.cgi?id=169164

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-03-04
Reviewed by Dan Bernstein.

  • Platform/Logging.cpp:

(WebKit::initializeLogChannelsIfNecessary):

3:32 AM Changeset in webkit [213807] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213405 - Clean up some RenderLayerBacking code
https://bugs.webkit.org/show_bug.cgi?id=169160

Reviewed by Dean Jackson.

Modern loops in descendantLayerPaintsIntoAncestor().

Rename RenderLayerBacking::paintsChildren() to RenderLayerBacking::paintsChildRenderers() to clarify that
it refers to renderers, not RenderLayers.

Rename RenderLayerBacking::paintsNonDirectCompositedBoxDecoration() to RenderLayerBacking::paintsBoxDecorations().
"Paints" already implies non-composited.

No behavior change.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::paintsBoxDecorations):
(WebCore::RenderLayerBacking::paintsChildRenderers):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::descendantLayerPaintsIntoAncestor):
(WebCore::RenderLayerBacking::paintsNonDirectCompositedBoxDecoration): Deleted.
(WebCore::RenderLayerBacking::paintsChildren): Deleted.

  • rendering/RenderLayerBacking.h:
3:31 AM Changeset in webkit [213806] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213404 - Clean up RenderImage and a RenderImageResource function
https://bugs.webkit.org/show_bug.cgi?id=169153

Reviewed by Zalan Bujtas.

Change all calls to imageResource().cachedImage() in RenderImage to use the inline
cachedImage() function.

In RenderImage::paintReplaced(), early return after the broken image block (and no need
to test imageResource().hasImage() again in the second condition). Convert height/width to size,
which also forces us to be explicit about using flooredIntSize() when fetching the image
(perhaps this should be a roundedIntSize, but I didn't want to change behavior).

Change RenderImageResource::image() to take an IntSize, rather than int height and width.

No behavior change.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::styleDidChange):
(WebCore::RenderImage::imageChanged):
(WebCore::RenderImage::notifyFinished):
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
(WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
(WebCore::RenderImage::embeddedContentBox):

  • rendering/RenderImageResource.cpp:

(WebCore::RenderImageResource::image):

  • rendering/RenderImageResource.h:

(WebCore::RenderImageResource::image):

  • rendering/RenderImageResourceStyleImage.cpp:

(WebCore::RenderImageResourceStyleImage::image):

  • rendering/RenderImageResourceStyleImage.h:
3:28 AM Changeset in webkit [213805] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.16

Merge r213384 - [URLParser] Fix file: as a relative file URL
https://bugs.webkit.org/show_bug.cgi?id=169122

Reviewed by Tim Horton.

Source/WebCore:

This is clearly defined in https://url.spec.whatwg.org/#file-state with the EOF code point.
I got it wrong and didn't test it. It's been added to the web platform tests since we last updated.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

LayoutTests:

We don't need to skip url-setters.html any more. It used to assert before the new URLParser was enabled.

  • fast/loader/url-parse-1-expected.txt:
  • fast/url/file-expected.txt:

We used to add a strange and unnecessary :/ at the end of the URL.

3:19 AM Changeset in webkit [213804] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r213311 - We should prevent load of subframes inserted during FrameTree deconstruction
https://bugs.webkit.org/show_bug.cgi?id=169095

Reviewed by Brent Fulgham.

Source/WebCore:

When deconstructing the FrameTree, we fire the unload event in each subframe.
Such unload event handler may insert a new frame, we would previously load
such new frame which was unsafe as we would end up with an attached subframe
on a detached tree. To address the issue, we prevent new subframes from loading
while deconstructing the FrameTree and firing the unload events. This new
behavior is consistent with Chrome and should therefore be safe from a
compatibility standpoint.

Test: fast/frames/insert-frame-unload-handler.html

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::disconnectSubframes):
Update SubframeLoadingDisabler call site now that the constructor takes in
a pointer instead of a reference.

  • html/HTMLFrameOwnerElement.h:

(WebCore::SubframeLoadingDisabler::SubframeLoadingDisabler):
(WebCore::SubframeLoadingDisabler::~SubframeLoadingDisabler):
Update SubframeLoadingDisabler constructor to take in a pointer instead
of a reference, for convenience.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::detachChildren):
Prevent loads in subframes while detaching the subframes. It would be unsafe
as we copy the list of frames before iterating to fire the unload events.
Therefore, newly inserted frames would not get unloaded.

LayoutTests:

Add layout test coverage. Our behavior on this test is consistent with Chrome.

  • fast/frames/insert-frame-unload-handler-expected.txt: Added.
  • fast/frames/insert-frame-unload-handler.html: Added.
3:10 AM Changeset in webkit [213803] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/gtk/po

Merge r213288 - Unreviewed, restore inadvertently-removed non-breaking spaces in Polish translation

  • pl.po:
3:10 AM Changeset in webkit [213802] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/gtk/po

Merge r213279 - [l10n] Updated Polish translation of WebKitGTK+ for 2.16
https://bugs.webkit.org/show_bug.cgi?id=169072

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2017-03-02
Rubber-stamped by Michael Catanzaro.

  • pl.po:
3:09 AM Changeset in webkit [213801] by Carlos Garcia Campos
  • 16 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r213278 - [WK2] Keyboard menu key should show context menu
https://bugs.webkit.org/show_bug.cgi?id=72099

Source/WebCore:

Reviewed by Carlos Garcia Campos.

Show the context menu when the GtkWidget::popup-menu signal is
emitted. This signal is triggered by pressing a key (usually
the Menu key or the Shift + F10 shortcut) or it could be emitted on
WebKitWebView.

Test: fast/events/context-activated-by-key-event.html

Also could be tested by:

ManualTests/keyboard-menukey-event.html
ManualTests/win/contextmenu-key.html
ManualTests/win/contextmenu-key2.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::sendContextMenuEventForKey):
Correctly send the mouse event that used for showing the context menu.
Previously the event was immediately dispatched as it is, but this was
only the right way if some element was focused on the page. If there
was no focused element or non-empty text range then the event lacked
the right node, where it was supposed to be shown. The correct node
is determined and added to the event in the sendContextMenuEvent() so
we have to use this function to send the event.

Also use absoluteBoundingBoxRect() instead of
pixelSnappedAbsoluteClippedOverflowRect() when determining
a coordinate where to show the context menu for the currently focus
element. The latter is not returning a right box (it is bigger) which
could lead to the situation that no menu will be displayed at all,
because the HitTest won't contain the right element as the
determined coordinates could be outside of the element.

  • page/EventHandler.h:

Source/WebKit2:

Reviewed by Carlos Garcia Campos.

Show the context menu when the GtkWidget::popup-menu signal is
emitted. This signal is triggered by pressing a key (usually
the Menu key or the Shift + F10 shortcut) or it could be emitted on
WebKitWebView.

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkit_web_view_class_init):
(webkit_web_view_class_init): Update the documentation for the
context-menu signal

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBasePopupMenu): Connect to the popup-menu signal and
save the event that was used to trigger the signal. If there is no
such event create a new GdkEvent with GDK_NOTHING type.
(webkitWebViewBasePopupMenu):
(webkit_web_view_base_class_init):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleContextMenuKeyEvent):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::contextMenuForKeyEvent):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Show the context menu when the GtkWidget::popup-menu signal is
emitted. This signal is triggered by pressing a key (usually
the Menu key or the Shift + F10 shortcut) or it could be emitted on
WebKitWebView.

Reviewed by Carlos Garcia Campos.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:

(testContextMenuDefaultMenu):

  • TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:

(WebViewTest::emitPopupMenuSignal):

  • TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h:

LayoutTests:

Reviewed by Carlos Garcia Campos.

Skip the fast/events/context-activated-by-key-event.html on Mac as it
does not have a key to activate the context menu and on iOS as well.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
2:55 AM Changeset in webkit [213800] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213276 - [GTK] Crash in WebCore::CoordinatedGraphicsLayer::notifyFlushRequired
https://bugs.webkit.org/show_bug.cgi?id=166420

Reviewed by Žan Doberšek.

This is happening when closing a page that is being inspected. When CoordinatedGraphicsLayer::removeFromParent()
is called, the coordinator has already been invalidated, so all its layers were set a nullptr coordinator. I
think it's safe to simply handle m_coordinator being nullptr in notifyFlushRequired().

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::notifyFlushRequired): Return early if the coordinator is nullptr.

2:54 AM Changeset in webkit [213799] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r213275 - Incorrect RELEASE_ASSERT in JSGlobalObject::addStaticGlobals()
https://bugs.webkit.org/show_bug.cgi?id=169034

Reviewed by Mark Lam.

It should not assign to offset, but compare to offset.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::addStaticGlobals):

2:49 AM Changeset in webkit [213798] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.16

Merge r213224 - [GTK] fast/canvas/canvas-createPattern-video-loading.html makes its subsequent test timeout
https://bugs.webkit.org/show_bug.cgi?id=169019

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The timeout happens normally when the media player is deleted and the pipeline state is set to NULL. The call to
gst_element_set_state() never returns because of different deadlocks with the video sink. Sometimes the deadlock
happens with the sample mutex used by VideoRenderRequestScheduler. VideoRenderRequestScheduler::requestRender()
calls webkitVideoSinkRepaintRequested() with the lock held, that ends up calling
MediaPlayerPrivateGStreamerBase::triggerRepaint(). When rendering can't be accelerated the draw timer is
scheduled and triggerRepaint blocks until the timer is fired. If the media player is destroyed before the timer
is fired, when setting the pipeline state to NULL, other VideoRenderRequestScheduler methods can be called, like
stop() that tries to get the sample mutex that is still held by requestRender(). So, first we need to make
sure that requestRender() releases the lock before calling webkitVideoSinkRepaintRequested(). But that's not
enough, we also need to ensure that the pipeline is set to NULL state after everyting has been properly
stopped. This is currently done in ~MediaPlayerPrivateGStreamer that happens before
~MediaPlayerPrivateGStreamerBase, so gst_element_set_state() is hanging before allowing the
MediaPlayerPrivateGStreamerBase to be cleaned up. We should move the call to the end of
~MediaPlayerPrivateGStreamerBase and ensure the draw timer and mutex are properly cleaned up before.

Fixes: fast/canvas/canvas-createPattern-video-loading.html

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Do not reset pipeline here.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Stop the draw mutex and notify the
lock to ensure we unblock. Do the pipeline reset at the end.

  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(VideoRenderRequestScheduler::requestRender): Release the mutex lock before calling webkitVideoSinkRepaintRequested().

LayoutTests:

Unskip tests previously skipped because of this timeout.

  • platform/gtk/TestExpectations:
2:48 AM Changeset in webkit [213797] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WTF

Merge r213223 - [WTF] va_list is not ended in StringPrintStream
https://bugs.webkit.org/show_bug.cgi?id=169035

Reviewed by Michael Saboff.

Also fix whitespace errors while touching this file.

  • wtf/StringPrintStream.cpp:

(WTF::StringPrintStream::vprintf):
(WTF::StringPrintStream::increaseSize):

2:46 AM Changeset in webkit [213796] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213219 - [Cairo] Incorrectly determining height in GraphicsContext::roundToDevicePixels()
https://bugs.webkit.org/show_bug.cgi?id=169031

Reviewed by Carlos Garcia Campos.

We should compare if height is between -1 and 0 and not mixing height
and width together.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::roundToDevicePixels):

2:46 AM Changeset in webkit [213795] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r213218 - [GTK] Fix problems found by Coverity scan in platform's keyboard and mouse events
https://bugs.webkit.org/show_bug.cgi?id=169028

Reviewed by Carlos Garcia Campos.

  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Initialize
the m_handledByInputMethod member.

  • platform/gtk/PlatformMouseEventGtk.cpp:

(WebCore::PlatformMouseEvent::PlatformMouseEvent): Initialize the
m_modifierFlags member.

2:43 AM Changeset in webkit [213794] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r213217 - [GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=169027

Reviewed by Carlos Garcia Campos.

Initialize the lastPagePosition variable and remove an unused one

  • totalToPrint.
  • WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:

(WebKit::PrintPagesData::PrintPagesData):

2:38 AM Changeset in webkit [213793] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r213171 - Arm64 disassembler prints "ars" instead of "asr"
https://bugs.webkit.org/show_bug.cgi?id=168923

Rubber stamped by Michael Saboff.

  • disassembler/ARM64/A64DOpcode.cpp:

(JSC::ARM64Disassembler::A64DOpcodeBitfield::format):

2:37 AM Changeset in webkit [213792] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r213165 - Use of arguments in arrow function is slow
https://bugs.webkit.org/show_bug.cgi?id=168829

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/arrowfunciton-direct-arguments.js: Added.

(fn):

  • microbenchmarks/arrowfunciton-reference-arguments.js: Added.

(fn):

Source/JavaScriptCore:

Current patch improves performance access to arguments within arrow functuion
by preventing create arguments variable within arrow function, also allow to cache
arguments variable. Before arguments variable always have Dynamic resolve type, after
patch it can be ClosureVar, that increase performance of access to arguments variable
in 9 times inside of the arrow function.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):

  • runtime/JSScope.cpp:

(JSC::abstractAccess):

2:33 AM Changeset in webkit [213791] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.16

Merge r213631 - [GTK] JSC test stress/arity-check-ftl-throw.js.ftl-no-cjit-validate-sampling-profiler crashing on GTK bot
https://bugs.webkit.org/show_bug.cgi?id=160124

Reviewed by Mark Lam.

JSTests:

  • stress/spread-forward-call-varargs-stack-overflow.js:

Source/JavaScriptCore:

When performing CallVarargs, we will copy values to the stack.
Before actually copying values, we need to adjust the stackPointerRegister
to ensure copied values are in the allocated stack area.
If we do not that, OS can break the values that is stored beyond the stack
pointer. For example, signal stack can be constructed on these area, and
breaks values.

This patch fixes the crash in stress/spread-forward-call-varargs-stack-overflow.js
in Linux port. Since Linux ports use signal to suspend and resume threads,
signal handler is frequently called when enabling sampling profiler. Thus this
crash occurs.

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):

  • jit/SetupVarargsFrame.cpp:

(JSC::emitSetupVarargsFrameFastCase):

  • jit/SetupVarargsFrame.h:
2:21 AM Changeset in webkit [213790] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

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):

2:15 AM Changeset in webkit [213789] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

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.

2:10 AM Changeset in webkit [213788] by Dewei Zhu
  • 12 edits in trunk/Websites/perf.webkit.org

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:
1:01 AM Changeset in webkit [213787] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit2

[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:
12:54 AM Changeset in webkit [213786] by dino@apple.com
  • 10 edits in trunk/Source

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):

12:33 AM Changeset in webkit [213785] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

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):

12:30 AM Changeset in webkit [213784] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebKit2

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:
12:18 AM Changeset in webkit [213783] by jonlee@apple.com
  • 6 edits in trunk/Source/WebCore

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.

Mar 12, 2017:

11:17 PM Changeset in webkit [213782] by jonlee@apple.com
  • 29 edits in trunk/Source/WebCore

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:
10:38 PM Changeset in webkit [213781] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

[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.
8:40 PM Changeset in webkit [213780] by jonlee@apple.com
  • 20 edits
    35 copies
    5 adds in trunk/Source/WebCore

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:
8:16 PM Changeset in webkit [213779] by Alan Bujtas
  • 5 edits
    2 adds in trunk

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.
6:54 PM Changeset in webkit [213778] by beidson@apple.com
  • 4 edits in trunk/Source/WebCore

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):

6:37 PM Changeset in webkit [213777] by beidson@apple.com
  • 10 edits in trunk/Source/WebKit2

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:
5:34 PM Changeset in webkit [213776] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit2

[GTK] Unbreak build with GTK+ >=3.20 after r213772
https://bugs.webkit.org/show_bug.cgi?id=169533

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

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewRunFileChooser): Add missing cast.

5:16 PM Changeset in webkit [213775] by jfernandez@igalia.com
  • 5 edits in trunk/LayoutTests

[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:
4:52 PM Changeset in webkit [213774] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

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):

3:56 PM Changeset in webkit [213773] by fpizlo@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

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.

1:19 PM Changeset in webkit [213772] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[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 <Adrian Perez de Castro> 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.

11:47 AM Changeset in webkit [213771] by mitz@apple.com
  • 3 edits in trunk/Source/WebKit2

[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.

10:27 AM Changeset in webkit [213770] by commit-queue@webkit.org
  • 9 edits in trunk

[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:

Mar 11, 2017:

11:54 PM Changeset in webkit [213769] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, suprress warnings in JSC B3

  • b3/B3Opcode.cpp:
10:27 PM Changeset in webkit [213768] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

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):

10:21 PM Changeset in webkit [213767] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

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):

10:07 PM Changeset in webkit [213766] by commit-queue@webkit.org
  • 10 edits in trunk

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:
9:02 PM Changeset in webkit [213765] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

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.

7:00 PM Changeset in webkit [213764] by commit-queue@webkit.org
  • 15 edits in trunk

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):

5:07 PM Changeset in webkit [213763] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

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.

3:09 PM Changeset in webkit [213762] by dino@apple.com
  • 11 edits
    47 copies
    17 adds in trunk/Source

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.
11:59 AM Changeset in webkit [213761] by Jon Davis
  • 1 edit
    1 add in trunk/Websites/webkit.org

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.
10:03 AM Changeset in webkit [213760] by achristensen@apple.com
  • 5 edits
    1 copy in trunk/Source/WebKit2

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:
8:44 AM Changeset in webkit [213759] by beidson@apple.com
  • 31 edits
    2 copies in trunk/Source

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:
5:57 AM Changeset in webkit [213758] by Csaba Osztrogonác
  • 3 edits in trunk/Source/WTF

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:
12:56 AM Changeset in webkit [213757] by bshafiei@apple.com
  • 12 edits in tags/Safari-604.1.10

Merged r213752. rdar://problem/30990870

12:38 AM Changeset in webkit [213756] by bshafiei@apple.com
  • 12 edits in tags/Safari-604.1.9.1

Merged r213752. rdar://problem/30990870

12:36 AM Changeset in webkit [213755] by bshafiei@apple.com
  • 7 edits in tags/Safari-604.1.9.1/Source

Versioning.

12:32 AM Changeset in webkit [213754] by bshafiei@apple.com
  • 1 copy in tags/Safari-604.1.9.1

New tag.

Mar 10, 2017:

11:17 PM Changeset in webkit [213753] by fpizlo@apple.com
  • 14 edits
    1 add in trunk/Source

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):

10:56 PM Changeset in webkit [213752] by achristensen@apple.com
  • 12 edits in trunk

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:
10:02 PM Changeset in webkit [213751] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

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.
9:51 PM Changeset in webkit [213750] by jmarcell@apple.com
  • 9 edits in tags/Safari-604.1.10/Source/WebKit2

Merge r213747. rdar://problem/29599569

8:30 PM Changeset in webkit [213749] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

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.

7:30 PM Changeset in webkit [213748] by hyatt@apple.com
  • 6 edits
    3 adds in trunk

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.
7:24 PM Changeset in webkit [213747] by achristensen@apple.com
  • 9 edits in trunk/Source/WebKit2

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:]):

6:12 PM Changeset in webkit [213746] by achristensen@apple.com
  • 5 edits
    1 delete in trunk/Source/WebKit2

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.

6:04 PM Changeset in webkit [213745] by sbarati@apple.com
  • 20 edits
    1 copy
    2 adds in trunk

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.

  1. 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):

5:56 PM Changeset in webkit [213744] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

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.

5:39 PM Changeset in webkit [213743] by mark.lam@apple.com
  • 2 edits in trunk/Source/WTF

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:
5:38 PM Changeset in webkit [213742] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

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):

5:13 PM Changeset in webkit [213741] by Ryan Haddad
  • 2 edits in trunk/Tools

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.

5:01 PM Changeset in webkit [213740] by Jon Davis
  • 4 edits in trunk/Websites/webkit.org

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:
4:59 PM Changeset in webkit [213739] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

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 <Devin Rousso> 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).

4:59 PM Changeset in webkit [213738] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

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 <Devin Rousso> 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.

4:58 PM Changeset in webkit [213737] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit/win

[Win] Re-export a few symbols for backwards compatibility
https://bugs.webkit.org/show_bug.cgi?id=169490
<rdar://problem/30983623>

Reviewed by Dean Jackson.

Re-introduce a workaround that re-exports a few JavaScriptCore functions
that had been erroneously exported by WebKit in older builds. This
is needed so that we do not break certain old software still being used.

  • WebKitDLL.cpp:

(DllMain): Bind functions at startup.
(bindJavaScriptTrampoline): Find JavaScriptCore library functions and
re-export them from WebKit.dll.

  • WebKitDLL.h: Only advertise these functions when building WebKt itself.
4:46 PM Changeset in webkit [213736] by commit-queue@webkit.org
  • 18 edits in trunk

Move libwebrtc backend to using tracks
https://bugs.webkit.org/show_bug.cgi?id=169472

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

Source/ThirdParty/libwebrtc:

  • Source/webrtc/pc/rtcstatscollector.cc: Moving from using media stream to tracks.

Source/WebCore:

Covered by current test sets.

This change allows to move away from streams and use more tracks.
This allows future better alignment with the spec and better implementation of sender/receover/transceiver.

Small refactoring to use more Ref<> in WebRTC track-based code.
Added a notifyAddedTrack to notify the backend that a track was added.
For libwebrtc, this allows calling AddTrack before making the offer.
Updated mock libwebrtc backend accordingly.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::replaceTrack):
(WebCore::MediaEndpointPeerConnection::replaceTrackTask):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/PeerConnectionBackend.h:

(WebCore::PeerConnectionBackend::notifyAddedTrack):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::replaceTrack):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::create):
(WebCore::RTCRtpSender::RTCRtpSender):
(WebCore::RTCRtpSender::setTrack):

  • Modules/mediastream/RTCRtpSender.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::addTrack):
(WebCore::LibWebRTCMediaEndpoint::doCreateOffer):
(WebCore::LibWebRTCMediaEndpoint::doCreateAnswer):
(WebCore::LibWebRTCMediaEndpoint::getStats):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::doAddIceCandidate):
(WebCore::LibWebRTCPeerConnectionBackend::notifyAddedTrack):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
  • testing/MockLibWebRTCPeerConnection.cpp:

(WebCore::MockLibWebRTCPeerConnection::AddTrack):
(WebCore::MockLibWebRTCPeerConnection::RemoveTrack):
(WebCore::MockLibWebRTCPeerConnection::CreateOffer):
(WebCore::MockLibWebRTCPeerConnection::CreateAnswer):

  • testing/MockLibWebRTCPeerConnection.h:

(WebCore::MockRtpSender::MockRtpSender):
(WebCore::MockRtpSender::ssrc):
(WebCore::MockRtpSender::media_type):
(WebCore::MockRtpSender::id):
(WebCore::MockRtpSender::stream_ids):
(WebCore::MockRtpSender::GetParameters):
(WebCore::MockRtpSender::SetParameters):
(WebCore::MockRtpSender::GetDtmfSender):

LayoutTests:

4:46 PM Changeset in webkit [213735] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Mark compositing/regions/transformed-layer-inside-transformed-layer.html as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=169457

Unreviewed test gardening.

  • platform/ios-simulator-wk1/TestExpectations:
  • platform/ios-simulator/TestExpectations:
4:45 PM Changeset in webkit [213734] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r213149): scope bar items in elements sidebar have wrong padding/margin
https://bugs.webkit.org/show_bug.cgi?id=169204

Patch by Devin Rousso <Devin Rousso> on 2017-03-10
Reviewed by Brian Burg.

  • UserInterface/Views/Sidebar.css:

(.sidebar > .navigation-bar):
Replace align-content with align-items, as the former causes the child elements to fill
as much vertical space as possible instead of only using the space necessary for its content.

  • UserInterface/Views/ScopeRadioButtonNavigationItem.css:

(.scope-radio-button-navigation-item > .arrows):
Drive-by fix: ensure that the up/down arrows are not clickable, which would prevent the
<select> from showing.

4:33 PM Changeset in webkit [213733] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Simple line layout: Check how many orphans needed on the current page before breaking.
https://bugs.webkit.org/show_bug.cgi?id=169477

Reviewed by Antti Koivisto.

Source/WebCore:

Before breaking for the widows we actually need to check for orphans first.

Test: fast/multicol/simple-line-layout-orphans-and-widows.html

  • rendering/SimpleLineLayoutPagination.cpp:

(WebCore::SimpleLineLayout::computeLineBreakIndex):
(WebCore::SimpleLineLayout::adjustLinePositionsForPagination):

LayoutTests:

  • fast/multicol/simple-line-layout-orphans-and-widows-expected.html: Added.
  • fast/multicol/simple-line-layout-orphans-and-widows.html: Added.
3:47 PM Changeset in webkit [213732] by msaboff@apple.com
  • 1 edit in trunk/Source/WebKit2/ChangeLog

Cleaned up merge markers inadvertently left in the file.

2:56 PM Changeset in webkit [213731] by dino@apple.com
  • 5 edits
    5 copies
    1 add in trunk/Source/WebCore

WebGPU: Backend - Textures and TextureDescriptors
https://bugs.webkit.org/show_bug.cgi?id=169365
<rdar://problem/30928716>

Reviewed by Jon Lee with help from Anders Carlsson.

Backend implementation of textures for WebGPU, which adds
the GPUTexture and GPUTextureDescriptor classes, as well
as a creation method on GPUDevice.

  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/cocoa/GPUTextureDescriptorMetal.mm: Added.

(WebCore::GPUTextureDescriptor::GPUTextureDescriptor):
(WebCore::GPUTextureDescriptor::width):
(WebCore::GPUTextureDescriptor::setWidth):
(WebCore::GPUTextureDescriptor::height):
(WebCore::GPUTextureDescriptor::setHeight):
(WebCore::GPUTextureDescriptor::sampleCount):
(WebCore::GPUTextureDescriptor::setSampleCount):
(WebCore::GPUTextureDescriptor::textureType):
(WebCore::GPUTextureDescriptor::setTextureType):
(WebCore::GPUTextureDescriptor::storageMode):
(WebCore::GPUTextureDescriptor::setStorageMode):
(WebCore::GPUTextureDescriptor::usage):
(WebCore::GPUTextureDescriptor::setUsage):
(WebCore::GPUTextureDescriptor::platformTextureDescriptor):

  • platform/graphics/cocoa/GPUTextureMetal.mm:

(WebCore::GPUTexture::GPUTexture):
(WebCore::GPUTexture::width):
(WebCore::GPUTexture::height):
(WebCore::GPUTexture::platformTexture):

  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::createTexture):

  • platform/graphics/gpu/GPUDevice.h:
  • platform/graphics/gpu/GPUTexture.cpp:

(WebCore::GPUTexture::create):
(WebCore::GPUTexture::createFromExistingTexture):
(WebCore::GPUTexture::~GPUTexture):
(WebCore::GPUTexture::width):
(WebCore::GPUTexture::height):

  • platform/graphics/gpu/GPUTexture.h:
  • platform/graphics/gpu/GPUTextureDescriptor.cpp:

(WebCore::GPUTextureDescriptor::create):
(WebCore::GPUTextureDescriptor::~GPUTextureDescriptor):
(WebCore::GPUTextureDescriptor::width):
(WebCore::GPUTextureDescriptor::setWidth):
(WebCore::GPUTextureDescriptor::height):
(WebCore::GPUTextureDescriptor::setHeight):
(WebCore::GPUTextureDescriptor::sampleCount):
(WebCore::GPUTextureDescriptor::setSampleCount):
(WebCore::GPUTextureDescriptor::textureType):
(WebCore::GPUTextureDescriptor::setTextureType):
(WebCore::GPUTextureDescriptor::storageMode):
(WebCore::GPUTextureDescriptor::setStorageMode):
(WebCore::GPUTextureDescriptor::usage):
(WebCore::GPUTextureDescriptor::setUsage):

  • platform/graphics/gpu/GPUTextureDescriptor.h:
2:43 PM Changeset in webkit [213730] by aestes@apple.com
  • 2 edits in trunk/Tools

Skip an API test that isn't expected to pass on iOS 10.

  • TestWebKitAPI/Tests/WebKit2Cocoa/QuickLook.mm:
2:22 PM Changeset in webkit [213729] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark webrtc/libwebrtc/descriptionGetters.html as a flaky.
https://bugs.webkit.org/show_bug.cgi?id=169481

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:54 PM Changeset in webkit [213728] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WebRTC][WK2][iOS] Support com.apple.coremedia.compressionsession for more WebRTC Cases
https://bugs.webkit.org/show_bug.cgi?id=169480
<rdar://problem/30978577>

Reviewed by Youenn Fablet.

Always allow 'com.apple.coremedia.compressionsession' since it is also needed when sending
canvas data across a peer connection.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
12:25 PM Changeset in webkit [213727] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win] Scrollbars buttons have incorrect size in HiDPI.
https://bugs.webkit.org/show_bug.cgi?id=169463

Reviewed by Alex Christensen.

There seems to be a bug in DrawThemeBackground when the device context is scaled.
We can work around this by scaling the drawing rectangle instead.

  • platform/win/ScrollbarThemeWin.cpp:

(WebCore::ScrollbarThemeWin::paintButton):

12:17 PM Changeset in webkit [213726] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add bindings-ews to queue status server
https://bugs.webkit.org/show_bug.cgi?id=169307

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

  • QueueStatusServer/config/queues.py: Add "bindings-ews" to the list of ewses.
12:07 PM Changeset in webkit [213725] by aestes@apple.com
  • 8 edits
    1 add in trunk

[QuickLook] Add WKNavigationDelegate SPI to notify when a password is requested
https://bugs.webkit.org/show_bug.cgi?id=169459
<rdar://problem/30621913>

Reviewed by Alex Christensen.

Source/WebKit2:

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::didRequestPasswordForQuickLookDocument):

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::requestPasswordForQuickLookDocument):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/QuickLook.mm:

(runTest):
(TEST):
(-[QuickLookPasswordNavigationDelegate _webViewDidRequestPasswordForQuickLookDocument:]):

11:45 AM Changeset in webkit [213724] by achristensen@apple.com
  • 4 edits in trunk/Source

Fix CMake build.

Source/JavaScriptCore:

  • CMakeLists.txt:

Make more forwarding headers so we can find WasmFaultSignalHandler.h from WebProcess.cpp.

Source/WebKit/mac:

  • WebView/WebNotification.h:

Don't assume we have already included something that includes NSObject.h.

11:36 AM Changeset in webkit [213723] by Alan Bujtas
  • 6 edits in trunk

Simple line layout: Oprhan lines with visual overflow does not work properly.
https://bugs.webkit.org/show_bug.cgi?id=169409

Reviewed by Antti Koivisto.

Source/WebCore:

Add visual overflow checking for block strut. This logic is copied from RenderBlockFlow::adjustLinePositionForPagination.

Covered by existing test.

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::computeOverflow):

  • rendering/SimpleLineLayoutFunctions.h:
  • rendering/SimpleLineLayoutPagination.cpp:

(WebCore::SimpleLineLayout::setPageBreakForLine):

LayoutTests:

11:24 AM Changeset in webkit [213722] by commit-queue@webkit.org
  • 10 edits
    1 move in trunk/Tools

Add support for Bindings EWS
https://bugs.webkit.org/show_bug.cgi?id=169308

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

  • Scripts/webkitpy/common/config/ews.json: Add bindings-ews. Can test without building; should_build = False.
  • Scripts/webkitpy/common/net/bindingstestresults.py:

(BindingsTestResults.init): Removed 'errors'.
(BindingsTestResults.results_from_string): Ditto.
(BindingsTestResults.is_subset): Ditto.
(BindingsTestResults.equals): Ditto.
(BindingsTestResults.all_passed): Ditto.
(BindingsTestResults.failing_tests): Ditto.

  • Scripts/webkitpy/common/net/bindingstestresults_unittest.py:

(BindingsTestResultsTest.test_results_from_string): Removed 'errors'.
(BindingsTestResultsTest.test_results_from_string_success): Removed 'errors'.

  • Scripts/webkitpy/tool/bot/earlywarningsystemtask.py:

(EarlyWarningSystemTask.init): Add should_build parameter.
(EarlyWarningSystemTask.run): Check should_build before calling self._build().

  • Scripts/webkitpy/tool/bot/retrylogic_unittest.py: Renamed from Tools/Scripts/webkitpy/tool/bot/jscews_unittest.py.

(MockBindingsEarlyWarningSystem): Based of MockJSCEarlyWarningSystem. Mocked so we can provide test results.
(MockBindingsEarlyWarningSystem.init): Sets attributes.
(MockBindingsEarlyWarningSystem.test_results): Returns test results provided by us, instead of JSON output.
(BindingsEarlyWarningSystemTest): Class to test retry logic in below situations.
(BindingsEarlyWarningSystemTest._results_indicate_all_passed): False if None or or has failures, else True.
(BindingsEarlyWarningSystemTest._create_task):
(BindingsEarlyWarningSystemTest.test_success_case): Clean patch on clean tree.
(BindingsEarlyWarningSystemTest.test_test_failure): Red patch on clean tree.
(BindingsEarlyWarningSystemTest.test_fix): Clean patch on red tree.
(BindingsEarlyWarningSystemTest.test_ineffective_patch): Red patch on red tree.
(BindingsEarlyWarningSystemTest.test_partially_effective_patch): Red patch on redder tree.
(BindingsEarlyWarningSystemTest.test_different_test_failures_in_patch_and_tree): Red patch on red tree.

  • Scripts/webkitpy/tool/bot/patchanalysistask.py:

(PatchAnalysisTask._build_and_test_without_patch): Don't build if should_build is False (eg. on Bindings EWS).
(PatchAnalysisTask._retry_bindings_tests): Retry logic for Bindings tests.
(PatchAnalysisTask._test_patch): If tests failed on Bindings EWS, and call _retry_bindings_tests.

  • Scripts/webkitpy/tool/commands/earlywarningsystem.py:

(AbstractEarlyWarningSystem.begin_work_queue): Use BindingsTestResultsReader on Bindings EWS.
(AbstractEarlyWarningSystem._create_task): Pass should_build argument.
(AbstractEarlyWarningSystem.load_ews_classes): Add should_build argument (True by default).

  • Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:

(TestBindingsEWS): Bindings EWS class, derived from AbstractEarlyWarningSystem.
(AbstractEarlyWarningSystemTest.test_failing_bindings_tests_message): Unit test message posted to Bugzilla.
(EarlyWarningSystemTest._default_expected_logs): Not building on all ewses anymore; make build line optional.
(EarlyWarningSystemTest.test_ews_name): Add bindings-ews.

  • Scripts/webkitpy/tool/steps/checkpatchrelevance.py:

(CheckPatchRelevance): Add bindings paths.
(CheckPatchRelevance._changes_are_relevant): Cleaner way to check if we should perform this step.

  • Scripts/webkitpy/tool/steps/steps_unittest.py: Add unit tests for Bindings EWS patch relevance.

(test_patch_relevant_bindings): Test for patch relevant to bindings.
(test_patch_not_relevant_bindings): Test for patch not relevant to bindings.

11:15 AM Changeset in webkit [213721] by jmarcell@apple.com
  • 25 edits in tags/Safari-604.1.10

Merge r213715. rdar://problem/24709033

11:12 AM Changeset in webkit [213720] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.10

Tag Safari-604.1.10.

11:07 AM Changeset in webkit [213719] by Simon Fraser
  • 22 edits
    5 adds in trunk

[iOS WK2] Layer content blurry with nested perspective and transforms
https://bugs.webkit.org/show_bug.cgi?id=169457
Source/WebCore:

rdar://problem/29879484

Reviewed by Tim Horton.

We set rasterizationScale on CALayers to the same values as contentsScale, to
avoid blurry layers when CA rasterizes, which often happens with nested perspective
transforms.

However, in UI-side compositing, if the page is not zoomed, we never applied the
rasterizationScale in the UI process. This happened because the PlatformCALayerRemote
constructor set m_properties.contentsScale, but did not set the dirty bit that
triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier.
The fix is to set this dirty bit.

The rest of the changes are for testing. Internals now exposes layerIDForElement()
for returns an internal (non-stable-across-loads) layerID, which can be passed
to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects
the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary
which the test can dump as JSON, or pull values out of.

A few #pragma once cleanups also.

Tests: compositing/ios/basic-layer-properties.html

compositing/ios/rasterization-scale.html

  • testing/Internals.cpp:

(WebCore::Internals::layerIDForElement):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit2:

rdar://problem/29879484

Reviewed by Tim Horton.

We set rasterizationScale on CALayers to the same values as contentsScale, to
avoid blurry layers when CA rasterizes, which often happens with nested perspective
transforms.

However, in UI-side compositing, if the page is not zoomed, we never applied the
rasterizationScale in the UI process. This happened because the PlatformCALayerRemote
constructor set m_properties.contentsScale, but did not set the dirty bit that
triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier.
The fix is to set this dirty bit.

The rest of the changes are for testing. Internals now exposes layerIDForElement()
for returns an internal (non-stable-across-loads) layerID, which can be passed
to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects
the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary
which the test can dump as JSON, or pull values out of.

A few #pragma once cleanups also.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _propertiesOfLayerWithID:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::layerWithIDForTesting):

  • UIProcess/mac/RemoteLayerTreeHost.h:
  • UIProcess/mac/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::layerWithIDForTesting):

  • WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::PlatformCALayerRemote):

Tools:

rdar://problem/29879484

Reviewed by Tim Horton.

We set rasterizationScale on CALayers to the same values as contentsScale, to
avoid blurry layers when CA rasterizes, which often happens with nested perspective
transforms.

However, in UI-side compositing, if the page is not zoomed, we never applied the
rasterizationScale in the UI process. This happened because the PlatformCALayerRemote
constructor set m_properties.contentsScale, but did not set the dirty bit that
triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier.
The fix is to set this dirty bit.

The rest of the changes are for testing. Internals now exposes layerIDForElement()
for returns an internal (non-stable-across-loads) layerID, which can be passed
to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects
the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary
which the test can dump as JSON, or pull values out of.

A few #pragma once cleanups also.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::propertiesOfLayerWithID):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::propertiesOfLayerWithID):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::propertiesOfLayerWithID):

LayoutTests:

Reviewed by Tim Horton.

We set rasterizationScale on CALayers to the same values as contentsScale, to
avoid blurry layers when CA rasterizes, which often happens with nested perspective
transforms.

However, in UI-side compositing, if the page is not zoomed, we never applied the
rasterizationScale in the UI process. This happened because the PlatformCALayerRemote
constructor set m_properties.contentsScale, but did not set the dirty bit that
triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier.
The fix is to set this dirty bit.

The rest of the changes are for testing. Internals now exposes layerIDForElement()
for returns an internal (non-stable-across-loads) layerID, which can be passed
to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects
the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary
which the test can dump as JSON, or pull values out of.

A few #pragma once cleanups also.

  • TestExpectations:
  • compositing/ios/basic-layer-properties-expected.txt: Added.
  • compositing/ios/basic-layer-properties.html: Added.
  • compositing/ios/rasterization-scale-expected.txt: Added.
  • compositing/ios/rasterization-scale.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
11:01 AM Changeset in webkit [213718] by mark.lam@apple.com
  • 3 edits
    2 adds in trunk/Source/JavaScriptCore

[Re-landing] Implement a StackTrace utility object that can capture stack traces for debugging.
https://bugs.webkit.org/show_bug.cgi?id=169454

Reviewed by Michael Saboff.

The underlying implementation is hoisted right out of Assertions.cpp from the
implementations of WTFPrintBacktrace().

The reason we need this StackTrace object is because during heap debugging, we
sometimes want to capture the stack trace that allocated the objects of interest.
Dumping the stack trace directly to stdout (using WTFReportBacktrace()) may
perturb the execution profile sufficiently that an issue may not reproduce,
while alternatively, just capturing the stack trace and deferring printing it
till we actually need it later perturbs the execution profile less.

In addition, just capturing the stack traces (instead of printing them
immediately at each capture site) allows us to avoid polluting stdout with tons
of stack traces that may be irrelevant.

For now, we only capture the native stack trace. We'll leave capturing and
integrating the JS stack trace as an exercise for the future if we need it then.

Here's an example of how to use this StackTrace utility:

Capture a stack trace of the top 10 frames.
std::unique_ptr<StackTrace> trace(StackTrace::captureStackTrace(10));
Print the trace.
dataLog(*trace);

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • tools/StackTrace.cpp: Added.

(JSC::StackTrace::instanceSize):
(JSC::StackTrace::captureStackTrace):
(JSC::StackTrace::dump):

  • tools/StackTrace.h: Added.

(JSC::StackTrace::size):
(JSC::StackTrace::StackTrace):

10:32 AM Changeset in webkit [213717] by jmarcell@apple.com
  • 1 delete in tags/Safari-604.1.10

Deleting tag.

10:20 AM Changeset in webkit [213716] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.10

Tag Safari-604.1.10.

10:05 AM Changeset in webkit [213715] by commit-queue@webkit.org
  • 25 edits in trunk

Unreviewed, rolling out r213618.
https://bugs.webkit.org/show_bug.cgi?id=169475

Suspect this is the cause of a large memory regression
(Requested by jonlee_ on #webkit).

Reverted changeset:

"Enable async image decoding for large images"
https://bugs.webkit.org/show_bug.cgi?id=165039
http://trac.webkit.org/changeset/213618

9:49 AM Changeset in webkit [213714] by fpizlo@apple.com
  • 57 edits
    8 adds
    2 deletes in trunk

B3 should have comprehensive support for atomic operations
https://bugs.webkit.org/show_bug.cgi?id=162349

Reviewed by Keith Miller.

Source/JavaScriptCore:

This adds the following capabilities to B3:

  • Atomic weak/strong unfenced/fenced compare-and-swap
  • Atomic add/sub/or/and/xor/xchg
  • Acquire/release fencing on loads/stores
  • Fenceless load-load dependencies


This adds lowering to the following instructions on x86:

  • lock cmpxchg
  • lock xadd
  • lock add/sub/or/and/xor/xchg


This adds lowering to the following instructions on ARM64:

  • ldar and friends
  • stlr and friends
  • ldxr and friends (unfenced LL)
  • stxr and friends (unfended SC)
  • ldaxr and friends (fenced LL)
  • stlxr and friends (fenced SC)
  • eor as a fenceless load-load dependency


This does instruction selection pattern matching to ensure that weak/strong CAS and all of the
variants of fences and atomic math ops get lowered to the best possible instruction sequence.
For example, we support the Equal(AtomicStrongCAS(expected, ...), expected) pattern and a bunch
of its friends. You can say Branch(Equal(AtomicStrongCAS(expected, ...), expected)) and it will
generate the best possible branch sequence on x86 and ARM64.

B3 now knows how to model all of the kinds of fencing. It knows that acq loads are ordered with
respect to each other and with respect to rel stores, creating sequential consistency that
transcends just the acq/rel fences themselves (see Effects::fence). It knows that the phantom
fence effects may only target some abstract heaps but not others, so that load elimination and
store sinking can still operate across fences if you just tell B3 that the fence does not alias
those accesses. This makes it super easy to teach B3 that some of your heap is thread-local.
Even better, it lets you express fine-grained dependencies where the atomics that affect one
property in shared memory do not clobber non-atomics that ffect some other property in shared
memory.

One of my favorite features is Depend, which allows you to express load-load dependencies. On
x86 it lowers to nothing, while on ARM64 it lowers to eor.

This also exposes a common atomicWeakCAS API to the x86_64/ARM64 MacroAssemblers. Same for
acq/rel. JSC's 64-bit JITs are now a happy concurrency playground.

This doesn't yet expose the functionality to JS or wasm. SAB still uses the non-intrinsic
implementations of the Atomics object, for now.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::ldar):
(JSC::ARM64Assembler::ldxr):
(JSC::ARM64Assembler::ldaxr):
(JSC::ARM64Assembler::stxr):
(JSC::ARM64Assembler::stlr):
(JSC::ARM64Assembler::stlxr):
(JSC::ARM64Assembler::excepnGenerationImmMask):
(JSC::ARM64Assembler::exoticLoad):
(JSC::ARM64Assembler::storeRelease):
(JSC::ARM64Assembler::exoticStore):

  • assembler/AbstractMacroAssembler.cpp: Added.

(WTF::printInternal):

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssemblerBase::invert):

  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::loadAcq8SignedExtendTo32):
(JSC::MacroAssemblerARM64::loadAcq8):
(JSC::MacroAssemblerARM64::storeRel8):
(JSC::MacroAssemblerARM64::loadAcq16SignedExtendTo32):
(JSC::MacroAssemblerARM64::loadAcq16):
(JSC::MacroAssemblerARM64::storeRel16):
(JSC::MacroAssemblerARM64::loadAcq32):
(JSC::MacroAssemblerARM64::loadAcq64):
(JSC::MacroAssemblerARM64::storeRel32):
(JSC::MacroAssemblerARM64::storeRel64):
(JSC::MacroAssemblerARM64::loadLink8):
(JSC::MacroAssemblerARM64::loadLinkAcq8):
(JSC::MacroAssemblerARM64::storeCond8):
(JSC::MacroAssemblerARM64::storeCondRel8):
(JSC::MacroAssemblerARM64::loadLink16):
(JSC::MacroAssemblerARM64::loadLinkAcq16):
(JSC::MacroAssemblerARM64::storeCond16):
(JSC::MacroAssemblerARM64::storeCondRel16):
(JSC::MacroAssemblerARM64::loadLink32):
(JSC::MacroAssemblerARM64::loadLinkAcq32):
(JSC::MacroAssemblerARM64::storeCond32):
(JSC::MacroAssemblerARM64::storeCondRel32):
(JSC::MacroAssemblerARM64::loadLink64):
(JSC::MacroAssemblerARM64::loadLinkAcq64):
(JSC::MacroAssemblerARM64::storeCond64):
(JSC::MacroAssemblerARM64::storeCondRel64):
(JSC::MacroAssemblerARM64::atomicStrongCAS8):
(JSC::MacroAssemblerARM64::atomicStrongCAS16):
(JSC::MacroAssemblerARM64::atomicStrongCAS32):
(JSC::MacroAssemblerARM64::atomicStrongCAS64):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS8):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS16):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS32):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS64):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS8):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS16):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS32):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS64):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS8):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS16):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS32):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS64):
(JSC::MacroAssemblerARM64::depend32):
(JSC::MacroAssemblerARM64::depend64):
(JSC::MacroAssemblerARM64::loadLink):
(JSC::MacroAssemblerARM64::loadLinkAcq):
(JSC::MacroAssemblerARM64::storeCond):
(JSC::MacroAssemblerARM64::storeCondRel):
(JSC::MacroAssemblerARM64::signExtend):
(JSC::MacroAssemblerARM64::branch):
(JSC::MacroAssemblerARM64::atomicStrongCAS):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS):
(JSC::MacroAssemblerARM64::extractSimpleAddress):
(JSC::MacroAssemblerARM64::signExtend<8>):
(JSC::MacroAssemblerARM64::signExtend<16>):
(JSC::MacroAssemblerARM64::branch<64>):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::add32):
(JSC::MacroAssemblerX86Common::and32):
(JSC::MacroAssemblerX86Common::and16):
(JSC::MacroAssemblerX86Common::and8):
(JSC::MacroAssemblerX86Common::neg32):
(JSC::MacroAssemblerX86Common::neg16):
(JSC::MacroAssemblerX86Common::neg8):
(JSC::MacroAssemblerX86Common::or32):
(JSC::MacroAssemblerX86Common::or16):
(JSC::MacroAssemblerX86Common::or8):
(JSC::MacroAssemblerX86Common::sub16):
(JSC::MacroAssemblerX86Common::sub8):
(JSC::MacroAssemblerX86Common::sub32):
(JSC::MacroAssemblerX86Common::xor32):
(JSC::MacroAssemblerX86Common::xor16):
(JSC::MacroAssemblerX86Common::xor8):
(JSC::MacroAssemblerX86Common::not32):
(JSC::MacroAssemblerX86Common::not16):
(JSC::MacroAssemblerX86Common::not8):
(JSC::MacroAssemblerX86Common::store16):
(JSC::MacroAssemblerX86Common::atomicStrongCAS8):
(JSC::MacroAssemblerX86Common::atomicStrongCAS16):
(JSC::MacroAssemblerX86Common::atomicStrongCAS32):
(JSC::MacroAssemblerX86Common::branchAtomicStrongCAS8):
(JSC::MacroAssemblerX86Common::branchAtomicStrongCAS16):
(JSC::MacroAssemblerX86Common::branchAtomicStrongCAS32):
(JSC::MacroAssemblerX86Common::atomicWeakCAS8):
(JSC::MacroAssemblerX86Common::atomicWeakCAS16):
(JSC::MacroAssemblerX86Common::atomicWeakCAS32):
(JSC::MacroAssemblerX86Common::branchAtomicWeakCAS8):
(JSC::MacroAssemblerX86Common::branchAtomicWeakCAS16):
(JSC::MacroAssemblerX86Common::branchAtomicWeakCAS32):
(JSC::MacroAssemblerX86Common::atomicRelaxedWeakCAS8):
(JSC::MacroAssemblerX86Common::atomicRelaxedWeakCAS16):
(JSC::MacroAssemblerX86Common::atomicRelaxedWeakCAS32):
(JSC::MacroAssemblerX86Common::branchAtomicRelaxedWeakCAS8):
(JSC::MacroAssemblerX86Common::branchAtomicRelaxedWeakCAS16):
(JSC::MacroAssemblerX86Common::branchAtomicRelaxedWeakCAS32):
(JSC::MacroAssemblerX86Common::atomicAdd8):
(JSC::MacroAssemblerX86Common::atomicAdd16):
(JSC::MacroAssemblerX86Common::atomicAdd32):
(JSC::MacroAssemblerX86Common::atomicSub8):
(JSC::MacroAssemblerX86Common::atomicSub16):
(JSC::MacroAssemblerX86Common::atomicSub32):
(JSC::MacroAssemblerX86Common::atomicAnd8):
(JSC::MacroAssemblerX86Common::atomicAnd16):
(JSC::MacroAssemblerX86Common::atomicAnd32):
(JSC::MacroAssemblerX86Common::atomicOr8):
(JSC::MacroAssemblerX86Common::atomicOr16):
(JSC::MacroAssemblerX86Common::atomicOr32):
(JSC::MacroAssemblerX86Common::atomicXor8):
(JSC::MacroAssemblerX86Common::atomicXor16):
(JSC::MacroAssemblerX86Common::atomicXor32):
(JSC::MacroAssemblerX86Common::atomicNeg8):
(JSC::MacroAssemblerX86Common::atomicNeg16):
(JSC::MacroAssemblerX86Common::atomicNeg32):
(JSC::MacroAssemblerX86Common::atomicNot8):
(JSC::MacroAssemblerX86Common::atomicNot16):
(JSC::MacroAssemblerX86Common::atomicNot32):
(JSC::MacroAssemblerX86Common::atomicXchgAdd8):
(JSC::MacroAssemblerX86Common::atomicXchgAdd16):
(JSC::MacroAssemblerX86Common::atomicXchgAdd32):
(JSC::MacroAssemblerX86Common::atomicXchg8):
(JSC::MacroAssemblerX86Common::atomicXchg16):
(JSC::MacroAssemblerX86Common::atomicXchg32):
(JSC::MacroAssemblerX86Common::loadAcq8):
(JSC::MacroAssemblerX86Common::loadAcq8SignedExtendTo32):
(JSC::MacroAssemblerX86Common::loadAcq16):
(JSC::MacroAssemblerX86Common::loadAcq16SignedExtendTo32):
(JSC::MacroAssemblerX86Common::loadAcq32):
(JSC::MacroAssemblerX86Common::storeRel8):
(JSC::MacroAssemblerX86Common::storeRel16):
(JSC::MacroAssemblerX86Common::storeRel32):
(JSC::MacroAssemblerX86Common::storeFence):
(JSC::MacroAssemblerX86Common::loadFence):
(JSC::MacroAssemblerX86Common::replaceWithJump):
(JSC::MacroAssemblerX86Common::maxJumpReplacementSize):
(JSC::MacroAssemblerX86Common::patchableJumpSize):
(JSC::MacroAssemblerX86Common::supportsFloatingPointRounding):
(JSC::MacroAssemblerX86Common::supportsAVX):
(JSC::MacroAssemblerX86Common::updateEax1EcxFlags):
(JSC::MacroAssemblerX86Common::x86Condition):
(JSC::MacroAssemblerX86Common::atomicStrongCAS):
(JSC::MacroAssemblerX86Common::branchAtomicStrongCAS):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::add64):
(JSC::MacroAssemblerX86_64::and64):
(JSC::MacroAssemblerX86_64::neg64):
(JSC::MacroAssemblerX86_64::or64):
(JSC::MacroAssemblerX86_64::sub64):
(JSC::MacroAssemblerX86_64::xor64):
(JSC::MacroAssemblerX86_64::not64):
(JSC::MacroAssemblerX86_64::store64):
(JSC::MacroAssemblerX86_64::atomicStrongCAS64):
(JSC::MacroAssemblerX86_64::branchAtomicStrongCAS64):
(JSC::MacroAssemblerX86_64::atomicWeakCAS64):
(JSC::MacroAssemblerX86_64::branchAtomicWeakCAS64):
(JSC::MacroAssemblerX86_64::atomicRelaxedWeakCAS64):
(JSC::MacroAssemblerX86_64::branchAtomicRelaxedWeakCAS64):
(JSC::MacroAssemblerX86_64::atomicAdd64):
(JSC::MacroAssemblerX86_64::atomicSub64):
(JSC::MacroAssemblerX86_64::atomicAnd64):
(JSC::MacroAssemblerX86_64::atomicOr64):
(JSC::MacroAssemblerX86_64::atomicXor64):
(JSC::MacroAssemblerX86_64::atomicNeg64):
(JSC::MacroAssemblerX86_64::atomicNot64):
(JSC::MacroAssemblerX86_64::atomicXchgAdd64):
(JSC::MacroAssemblerX86_64::atomicXchg64):
(JSC::MacroAssemblerX86_64::loadAcq64):
(JSC::MacroAssemblerX86_64::storeRel64):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::addl_mr):
(JSC::X86Assembler::addq_mr):
(JSC::X86Assembler::addq_rm):
(JSC::X86Assembler::addq_im):
(JSC::X86Assembler::andl_mr):
(JSC::X86Assembler::andl_rm):
(JSC::X86Assembler::andw_rm):
(JSC::X86Assembler::andb_rm):
(JSC::X86Assembler::andl_im):
(JSC::X86Assembler::andw_im):
(JSC::X86Assembler::andb_im):
(JSC::X86Assembler::andq_mr):
(JSC::X86Assembler::andq_rm):
(JSC::X86Assembler::andq_im):
(JSC::X86Assembler::incq_m):
(JSC::X86Assembler::negq_m):
(JSC::X86Assembler::negl_m):
(JSC::X86Assembler::negw_m):
(JSC::X86Assembler::negb_m):
(JSC::X86Assembler::notl_m):
(JSC::X86Assembler::notw_m):
(JSC::X86Assembler::notb_m):
(JSC::X86Assembler::notq_m):
(JSC::X86Assembler::orl_mr):
(JSC::X86Assembler::orl_rm):
(JSC::X86Assembler::orw_rm):
(JSC::X86Assembler::orb_rm):
(JSC::X86Assembler::orl_im):
(JSC::X86Assembler::orw_im):
(JSC::X86Assembler::orb_im):
(JSC::X86Assembler::orq_mr):
(JSC::X86Assembler::orq_rm):
(JSC::X86Assembler::orq_im):
(JSC::X86Assembler::subl_mr):
(JSC::X86Assembler::subl_rm):
(JSC::X86Assembler::subw_rm):
(JSC::X86Assembler::subb_rm):
(JSC::X86Assembler::subl_im):
(JSC::X86Assembler::subw_im):
(JSC::X86Assembler::subb_im):
(JSC::X86Assembler::subq_mr):
(JSC::X86Assembler::subq_rm):
(JSC::X86Assembler::subq_im):
(JSC::X86Assembler::xorl_mr):
(JSC::X86Assembler::xorl_rm):
(JSC::X86Assembler::xorl_im):
(JSC::X86Assembler::xorw_rm):
(JSC::X86Assembler::xorw_im):
(JSC::X86Assembler::xorb_rm):
(JSC::X86Assembler::xorb_im):
(JSC::X86Assembler::xorq_im):
(JSC::X86Assembler::xorq_rm):
(JSC::X86Assembler::xorq_mr):
(JSC::X86Assembler::xchgb_rm):
(JSC::X86Assembler::xchgw_rm):
(JSC::X86Assembler::xchgl_rm):
(JSC::X86Assembler::xchgq_rm):
(JSC::X86Assembler::movw_im):
(JSC::X86Assembler::movq_i32m):
(JSC::X86Assembler::cmpxchgb_rm):
(JSC::X86Assembler::cmpxchgw_rm):
(JSC::X86Assembler::cmpxchgl_rm):
(JSC::X86Assembler::cmpxchgq_rm):
(JSC::X86Assembler::xaddb_rm):
(JSC::X86Assembler::xaddw_rm):
(JSC::X86Assembler::xaddl_rm):
(JSC::X86Assembler::xaddq_rm):
(JSC::X86Assembler::X86InstructionFormatter::SingleInstructionBufferWriter::memoryModRM):

  • b3/B3AtomicValue.cpp: Added.

(JSC::B3::AtomicValue::~AtomicValue):
(JSC::B3::AtomicValue::dumpMeta):
(JSC::B3::AtomicValue::cloneImpl):
(JSC::B3::AtomicValue::AtomicValue):

  • b3/B3AtomicValue.h: Added.
  • b3/B3BasicBlock.h:
  • b3/B3BlockInsertionSet.cpp:

(JSC::B3::BlockInsertionSet::BlockInsertionSet):
(JSC::B3::BlockInsertionSet::insert): Deleted.
(JSC::B3::BlockInsertionSet::insertBefore): Deleted.
(JSC::B3::BlockInsertionSet::insertAfter): Deleted.
(JSC::B3::BlockInsertionSet::execute): Deleted.

  • b3/B3BlockInsertionSet.h:
  • b3/B3Effects.cpp:

(JSC::B3::Effects::interferes):
(JSC::B3::Effects::operator==):
(JSC::B3::Effects::dump):

  • b3/B3Effects.h:

(JSC::B3::Effects::forCall):
(JSC::B3::Effects::mustExecute):

  • b3/B3EliminateCommonSubexpressions.cpp:
  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • b3/B3GenericBlockInsertionSet.h: Added.

(JSC::B3::GenericBlockInsertionSet::GenericBlockInsertionSet):
(JSC::B3::GenericBlockInsertionSet::insert):
(JSC::B3::GenericBlockInsertionSet::insertBefore):
(JSC::B3::GenericBlockInsertionSet::insertAfter):
(JSC::B3::GenericBlockInsertionSet::execute):

  • b3/B3HeapRange.h:

(JSC::B3::HeapRange::operator|):

  • b3/B3InsertionSet.cpp:

(JSC::B3::InsertionSet::insertClone):

  • b3/B3InsertionSet.h:
  • b3/B3LegalizeMemoryOffsets.cpp:
  • b3/B3LowerMacros.cpp:

(JSC::B3::lowerMacros):

  • b3/B3LowerMacrosAfterOptimizations.cpp:
  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::LowerToAir):
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::addr):
(JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode):
(JSC::B3::Air::LowerToAir::appendShift):
(JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
(JSC::B3::Air::LowerToAir::storeOpcode):
(JSC::B3::Air::LowerToAir::createStore):
(JSC::B3::Air::LowerToAir::finishAppendingInstructions):
(JSC::B3::Air::LowerToAir::newBlock):
(JSC::B3::Air::LowerToAir::splitBlock):
(JSC::B3::Air::LowerToAir::fillStackmap):
(JSC::B3::Air::LowerToAir::appendX86Div):
(JSC::B3::Air::LowerToAir::appendX86UDiv):
(JSC::B3::Air::LowerToAir::loadLinkOpcode):
(JSC::B3::Air::LowerToAir::storeCondOpcode):
(JSC::B3::Air::LowerToAir::appendCAS):
(JSC::B3::Air::LowerToAir::appendVoidAtomic):
(JSC::B3::Air::LowerToAir::appendGeneralAtomic):
(JSC::B3::Air::LowerToAir::lower):
(JSC::B3::Air::LowerToAir::lowerX86Div): Deleted.
(JSC::B3::Air::LowerToAir::lowerX86UDiv): Deleted.

  • b3/B3LowerToAir.h:
  • b3/B3MemoryValue.cpp:

(JSC::B3::MemoryValue::isLegalOffset):
(JSC::B3::MemoryValue::accessType):
(JSC::B3::MemoryValue::accessBank):
(JSC::B3::MemoryValue::accessByteSize):
(JSC::B3::MemoryValue::dumpMeta):
(JSC::B3::MemoryValue::MemoryValue):
(JSC::B3::MemoryValue::accessWidth): Deleted.

  • b3/B3MemoryValue.h:
  • b3/B3MemoryValueInlines.h: Added.

(JSC::B3::MemoryValue::isLegalOffset):
(JSC::B3::MemoryValue::requiresSimpleAddr):
(JSC::B3::MemoryValue::accessWidth):

  • b3/B3MoveConstants.cpp:
  • b3/B3NativeTraits.h: Added.
  • b3/B3Opcode.cpp:

(JSC::B3::storeOpcode):
(WTF::printInternal):

  • b3/B3Opcode.h:

(JSC::B3::isLoad):
(JSC::B3::isStore):
(JSC::B3::isLoadStore):
(JSC::B3::isAtomic):
(JSC::B3::isAtomicCAS):
(JSC::B3::isAtomicXchg):
(JSC::B3::isMemoryAccess):
(JSC::B3::signExtendOpcode):

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::dump):

  • b3/B3Procedure.h:

(JSC::B3::Procedure::hasQuirks):
(JSC::B3::Procedure::setHasQuirks):

  • b3/B3PureCSE.cpp:

(JSC::B3::pureCSE):

  • b3/B3PureCSE.h:
  • b3/B3ReduceStrength.cpp:
  • b3/B3Validate.cpp:
  • b3/B3Value.cpp:

(JSC::B3::Value::returnsBool):
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::performSubstitution):
(JSC::B3::Value::typeFor):

  • b3/B3Value.h:
  • b3/B3Width.cpp:

(JSC::B3::bestType):

  • b3/B3Width.h:

(JSC::B3::canonicalWidth):
(JSC::B3::isCanonicalWidth):
(JSC::B3::mask):

  • b3/air/AirArg.cpp:

(JSC::B3::Air::Arg::jsHash):
(JSC::B3::Air::Arg::dump):
(WTF::printInternal):

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::isAnyUse):
(JSC::B3::Air::Arg::isColdUse):
(JSC::B3::Air::Arg::cooled):
(JSC::B3::Air::Arg::isEarlyUse):
(JSC::B3::Air::Arg::isLateUse):
(JSC::B3::Air::Arg::isAnyDef):
(JSC::B3::Air::Arg::isEarlyDef):
(JSC::B3::Air::Arg::isLateDef):
(JSC::B3::Air::Arg::isZDef):
(JSC::B3::Air::Arg::simpleAddr):
(JSC::B3::Air::Arg::statusCond):
(JSC::B3::Air::Arg::isSimpleAddr):
(JSC::B3::Air::Arg::isMemory):
(JSC::B3::Air::Arg::isStatusCond):
(JSC::B3::Air::Arg::isCondition):
(JSC::B3::Air::Arg::ptr):
(JSC::B3::Air::Arg::base):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::isValidForm):
(JSC::B3::Air::Arg::forEachTmpFast):
(JSC::B3::Air::Arg::forEachTmp):
(JSC::B3::Air::Arg::asAddress):
(JSC::B3::Air::Arg::asStatusCondition):
(JSC::B3::Air::Arg::isInvertible):
(JSC::B3::Air::Arg::inverted):

  • b3/air/AirBasicBlock.cpp:

(JSC::B3::Air::BasicBlock::setSuccessors):

  • b3/air/AirBasicBlock.h:
  • b3/air/AirBlockInsertionSet.cpp: Added.

(JSC::B3::Air::BlockInsertionSet::BlockInsertionSet):
(JSC::B3::Air::BlockInsertionSet::~BlockInsertionSet):

  • b3/air/AirBlockInsertionSet.h: Added.
  • b3/air/AirDumpAsJS.cpp: Removed.
  • b3/air/AirDumpAsJS.h: Removed.
  • b3/air/AirEliminateDeadCode.cpp:

(JSC::B3::Air::eliminateDeadCode):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::prepareForGeneration):

  • b3/air/AirInstInlines.h:

(JSC::B3::Air::isAtomicStrongCASValid):
(JSC::B3::Air::isBranchAtomicStrongCASValid):
(JSC::B3::Air::isAtomicStrongCAS8Valid):
(JSC::B3::Air::isAtomicStrongCAS16Valid):
(JSC::B3::Air::isAtomicStrongCAS32Valid):
(JSC::B3::Air::isAtomicStrongCAS64Valid):
(JSC::B3::Air::isBranchAtomicStrongCAS8Valid):
(JSC::B3::Air::isBranchAtomicStrongCAS16Valid):
(JSC::B3::Air::isBranchAtomicStrongCAS32Valid):
(JSC::B3::Air::isBranchAtomicStrongCAS64Valid):

  • b3/air/AirOpcode.opcodes:
  • b3/air/AirOptimizeBlockOrder.cpp:

(JSC::B3::Air::optimizeBlockOrder):

  • b3/air/AirPadInterference.cpp:

(JSC::B3::Air::padInterference):

  • b3/air/AirSpillEverything.cpp:

(JSC::B3::Air::spillEverything):

  • b3/air/opcode_generator.rb:
  • b3/testb3.cpp:

(JSC::B3::testLoadAcq42):
(JSC::B3::testStoreRelAddLoadAcq32):
(JSC::B3::testStoreRelAddLoadAcq8):
(JSC::B3::testStoreRelAddFenceLoadAcq8):
(JSC::B3::testStoreRelAddLoadAcq16):
(JSC::B3::testStoreRelAddLoadAcq64):
(JSC::B3::testTrappingStoreElimination):
(JSC::B3::testX86LeaAddAdd):
(JSC::B3::testX86LeaAddShlLeftScale1):
(JSC::B3::testAtomicWeakCAS):
(JSC::B3::testAtomicStrongCAS):
(JSC::B3::testAtomicXchg):
(JSC::B3::testDepend32):
(JSC::B3::testDepend64):
(JSC::B3::run):

  • runtime/Options.h:

Websites/webkit.org:

Document the new opcodes!

  • docs/b3/intermediate-representation.html:
9:32 AM Changeset in webkit [213713] by jfernandez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=169470

Unreviewed GTK+ gardening. Updated test expectations after regressions r213671 and r213560.

  • platform/gtk/TestExpectations:
    • imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker.html [ Failure ]
    • imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2.html [ Failure ]
    • imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker.html [ Failure ]
    • imported/w3c/web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey.html [ Failure ]
8:01 AM Changeset in webkit [213712] by Antti Koivisto
  • 15 edits
    3 adds in trunk

Source/WebCore:
Allow the page to render before <link> stylesheet tags in body
https://bugs.webkit.org/show_bug.cgi?id=149157
<rdar://problem/24658830>

Reviewed by Simon Fraser.

Currently we block style and renderer building completely if document has any loading
stylesheets. In case a script queries something layout dependent we construct the render
tree with whatever style we have but block painting in it.

This patch changes behavior so that a loading stylesheet in body only blocks rendering for elements
that are after it. The expectation is that such stylesheets rarely affect elements before them
and the elements can be rendered without causing ugly visible styling changes.

The patch replaces the old flash-of-unstyled-content (FOUC) preventation mechanism with a more
fine-grained one. Paint blocking is now done on per-renderer basis with based on isNonFinal flag in
RenderStyle.

For stylesheets in head the behavior should be largely unchanged.

Test: http/tests/incremental/stylesheet-body-incremental-rendering.html

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::pseudoStyleRulesForElement):

  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::resolveStyle):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):

Remove the old FOUC preventation state tracking.

(WebCore::Document::shouldScheduleLayout):
(WebCore::Document::didRemoveAllPendingStylesheet):

Repaints will now get triggered by the normal style mechanism.

  • dom/Document.h:

(WebCore::Document::hasNodesWithNonFinalStyle):
(WebCore::Document::setHasNodesWithNonFinalStyle):

Track if we need to recompute the style later because non-final or unstyled elements.

(WebCore::Document::didLayoutWithPendingStylesheets): Deleted.
(WebCore::Document::hasNodesWithPlaceholderStyle): Deleted.
(WebCore::Document::setHasNodesWithPlaceholderStyle): Deleted.

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::rendererIsNeeded):

  • page/FrameView.cpp:

(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):

Don't qualify as visually non-empty if we have loading stylesheets in head (even if there is
a fouc-prevented render tree).

(WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintContents):

Instead of a global test, block painting if isNonFinal is set in the renderer's style.

  • rendering/RenderLayer.cpp:

(WebCore::shouldSuppressPaintingLayer):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresRepaint):

The isNonFinal flag prevents painting so we need to trigger repaint when it gets cleared.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::isNotFinal):
(WebCore::RenderStyle::setIsNotFinal):
(WebCore::RenderStyle::isPlaceholderStyle): Deleted.
(WebCore::RenderStyle::setIsPlaceholderStyle): Deleted.

There is no need for placeholder styles anymore. Reuse the bit for isNotFinal.

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):

  • rendering/style/StyleRareNonInheritedData.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::analyzeStyleSheetChange):
(WebCore::Style::Scope::updateActiveStyleSheets):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::TreeResolver::resolveElement):

If we have seens a loading stylesheet and don't have a renderer yet don't style the element.
In case there is a renderer or we are ignoring pending sheets, resolve the style normally
but mark it as non-final.

(WebCore::Style::makePlaceholderStyle): Deleted.

LayoutTests:
Loading in-body stylesheets should not block rendering of elements before them
https://bugs.webkit.org/show_bug.cgi?id=169345

Reviewed by Simon Fraser.

  • http/tests/incremental/resources/delayed-css.php: Added.
  • http/tests/incremental/stylesheet-body-incremental-rendering-expected.html: Added.
  • http/tests/incremental/stylesheet-body-incremental-rendering.html: Added.
7:38 AM Changeset in webkit [213711] by Antti Koivisto
  • 4 edits in trunk

imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html is unreliable
https://bugs.webkit.org/show_bug.cgi?id=169465

Reviewed by Zalan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-expected.txt:

Source/WebCore:

It shows all subtests passing but that is a bug. We don't even support all the unit types.
The test occasionally fails when reloading, that failing results are actually the correct ones.

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::SizesAttributeParser):

Ensure we have correct size for the iframe before parsing 'sizes' attribute values. The interpretation of
these may depend on the iframe dimensions.

5:47 AM Changeset in webkit [213710] by Csaba Osztrogonác
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed typo fixes after r213652.
https://bugs.webkit.org/show_bug.cgi?id=168920

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::replaceWithBreakpoint):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::replaceWithBreakpoint):

5:32 AM Changeset in webkit [213709] by Csaba Osztrogonác
  • 4 edits in trunk/Source/JavaScriptCore

Unreviewed ARM buildfix after r213652.
https://bugs.webkit.org/show_bug.cgi?id=168920

r213652 used replaceWithBrk and replaceWithBkpt names for the same
function, which was inconsistent and caused build error in ARMAssembler.

  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::replaceWithBkpt): Renamed replaceWithBrk to replaceWithBkpt.
(JSC::ARM64Assembler::replaceWithBrk): Deleted.

  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::replaceWithBkpt): Renamed replaceWithBrk to replaceWithBkpt.
(JSC::ARMAssembler::replaceWithBrk): Deleted.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::replaceWithBreakpoint):

5:02 AM Changeset in webkit [213708] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit2

[WK2] Guard GLib-specific typedefs in InjectedBundle.h with USE(GLIB)
https://bugs.webkit.org/show_bug.cgi?id=169464

Reviewed by Carlos Garcia Campos.

  • WebProcess/InjectedBundle/InjectedBundle.h: Use the more appropriate

USE(GLIB) guard for the two typedefs revolving around GModule, instead
of the PLATFORM(GTK) guard.

4:40 AM CoordinatedGraphicsSystem edited by Konstantin Tokarev
Fixed TiledBackingStore.cpp path (diff)
3:56 AM Changeset in webkit [213707] by pvollan@apple.com
  • 2 edits in trunk

Unreviewed Win64 build fix. FTL is not ready to be turned on yet.

  • Source/cmake/OptionsWin.cmake:
3:31 AM Changeset in webkit [213706] by commit-queue@webkit.org
  • 5 edits in trunk

[mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168409

Unreviewed.

Add some debugging in the hope of understanding why airplay-button.html fails once a day on bots.

Patch by Antoine Quint <Antoine Quint> on 2017-03-10

Source/WebCore:

  • Modules/modern-media-controls/controls/scheduler.js:

(const.scheduler.new.prototype.scheduleLayout):
(const.scheduler.new.prototype.unscheduleLayout):
(const.scheduler.new.prototype._requestFrameIfNeeded):
(const.scheduler.new.prototype._frameDidFire):
(const.scheduler.new.prototype._layout):

LayoutTests:

  • media/modern-media-controls/airplay-button/airplay-button-expected.txt:
  • media/modern-media-controls/airplay-button/airplay-button.html:
2:30 AM Changeset in webkit [213705] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WTF

Unreviewed AArch64 Linux buildfix after r213645.
https://bugs.webkit.org/show_bug.cgi?id=169300

  • wtf/Atomics.h: intptr_t and int64_t are typedefs for long int on Linux.

They are different types only on Darwin platforms.

12:36 AM Changeset in webkit [213704] by achristensen@apple.com
  • 6 edits in trunk

Win64 build fix.

.:

  • Source/cmake/OptionsWin.cmake:

WASM got turned on on Win64. Judging by the state of WasmMemory.cpp, I'm going to
assume this was a mistake and turn it off until someone writes a version that uses
VirtualAlloc/VirtualFree instead of mmap.
The FTL seems a bit unstable, though. This fixes the build, but more fixes are necessary.

Source/JavaScriptCore:

  • b3/B3FenceValue.h:
  • b3/B3Value.h:

Putting JS_EXPORT_PRIVATE on member functions in classes that are declared with JS_EXPORT_PRIVATE
doesn't accomplish anything except making Visual Studio mad.

  • b3/air/opcode_generator.rb:

winnt.h has naming collisions with enum values from AirOpcode.h.
For example, MemoryFence is #defined to be _mm_mfence, which is declared to be a function in emmintrin.h.
RotateLeft32 is #defined to be _rotl, which is declared to be a function in <stdlib.h>
A clean solution is just to put Opcode:: before the references to the opcode names to tell Visual Studio
that it is referring to the enum value in AirOpcode.h and not the function declaration elsewhere.

Mar 9, 2017:

11:19 PM Changeset in webkit [213703] by tpopela@redhat.com
  • 26 edits in trunk/Source/WebKit2

Unreviewed, fix documentation typos

  • UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
  • UIProcess/API/gtk/WebKitContextMenuActions.h:
  • UIProcess/API/gtk/WebKitContextMenuItem.cpp:
  • UIProcess/API/gtk/WebKitDownload.cpp:

(webkitDownloadNotifyProgress):

  • UIProcess/API/gtk/WebKitEditorState.cpp:
  • UIProcess/API/gtk/WebKitEditorState.h:
  • UIProcess/API/gtk/WebKitError.h:
  • UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
  • UIProcess/API/gtk/WebKitFindController.cpp:
  • UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:
  • UIProcess/API/gtk/WebKitHitTestResult.cpp:
  • UIProcess/API/gtk/WebKitPolicyDecision.cpp:
  • UIProcess/API/gtk/WebKitPrintOperation.h:
  • UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
  • UIProcess/API/gtk/WebKitSecurityManager.cpp:
  • UIProcess/API/gtk/WebKitSettings.cpp:

(webkit_settings_class_init):

  • UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:

(webkitUserMediaPermissionRequestAllow):

  • UIProcess/API/gtk/WebKitWebContext.cpp:
  • UIProcess/API/gtk/WebKitWebInspector.cpp:

(webkit_web_inspector_class_init):

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkit_web_view_class_init):

  • UIProcess/API/gtk/WebKitWebView.h:
  • UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
  • WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

(webkit_web_page_class_init):

9:18 PM Changeset in webkit [213702] by Ryan Haddad
  • 3 edits
    2 deletes in trunk/Source/JavaScriptCore

Unreviewed, rolling out r213695.

This change broke the Windows build.

Reverted changeset:

"Implement a StackTrace utility object that can capture stack
traces for debugging."
https://bugs.webkit.org/show_bug.cgi?id=169454
http://trac.webkit.org/changeset/213695

9:08 PM Changeset in webkit [213701] by Ryan Haddad
  • 15 edits
    3 deletes in trunk

Unreviewed, rolling out r213633.

This change caused LayoutTest imported/w3c/web-platform-
tests/html/semantics/embedded-content/the-img-
element/sizes/parse-a-sizes-attribute.html to become a flaky
failure.

Reverted changeset:

"Loading in-body stylesheets should not block rendering of
elements before them"
https://bugs.webkit.org/show_bug.cgi?id=169345
http://trac.webkit.org/changeset/213633

8:55 PM Changeset in webkit [213700] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html.

Unreviewed test gardening.

  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
7:43 PM Changeset in webkit [213699] by achristensen@apple.com
  • 4 edits in trunk/Source

Fix CMake build

  • PlatformMac.cmake:
6:37 PM Changeset in webkit [213698] by achristensen@apple.com
  • 5 edits in trunk/Source

Fix GTK build after r213696

Source/WebCore:

  • PlatformMac.cmake:

Source/WebKit2:

  • CMakeLists.txt:
  • PlatformMac.cmake:
6:00 PM Changeset in webkit [213697] by commit-queue@webkit.org
  • 29 edits
    1 add in trunk

[ESnext] Implement Object Rest - Implementing Object Rest Destructuring
https://bugs.webkit.org/show_bug.cgi?id=167962

Patch by Caio Lima <Caio Lima> on 2017-03-09
Reviewed by Keith Miller.

JSTests:

  • stress/object-rest-deconstruct.js: Added.

(let.assert):
(let.assertPropDescriptor):
(catch):
(get 3):
(foo):
(let.src.get y):
(let.src.set y):
(let.gen):

Source/JavaScriptCore:

Object Rest/Spread Destructing proposal is in stage 3[1] and this
Patch is a prototype implementation of it. A simple change over the
parser was necessary to support the new '...' token on Object Pattern
destruction rule. In the bytecode generator side, We changed the
bytecode generated on ObjectPatternNode::bindValue to store in an
array identifiers of already destructed properties, following spec draft
section[2], and then pass it as excludedNames to CopyDataProperties.
The rest destruction the calls copyDataProperties to perform the
copy of rest properties in rhs.

We also implemented CopyDataProperties as private JS global operation
on builtins/GlobalOperations.js following it's specification on [3].
It is implemented using Set object to verify if a property is on
excludedNames to keep this algorithm with O(n + m) complexity, where n

number of source's own properties and m = excludedNames.length.

As a requirement to use JSSets as constants, a change in
CodeBlock::create API was necessary, because JSSet creation can throws OOM
exception. Now, CodeBlock::finishCreation returns false if an
execption is throwed by
CodeBlock::setConstantIdentifierSetRegisters and then we return
nullptr to ScriptExecutable::newCodeBlockFor. It is responsible to
check if CodeBlock was constructed properly and then, throw OOM
exception to the correct scope.

[1] - https://github.com/sebmarkbage/ecmascript-rest-spread
[2] - http://sebmarkbage.github.io/ecmascript-rest-spread/#Rest-RuntimeSemantics-PropertyDestructuringAssignmentEvaluation
[3] - http://sebmarkbage.github.io/ecmascript-rest-spread/#AbstractOperations-CopyDataProperties

  • builtins/BuiltinNames.h:
  • builtins/GlobalOperations.js:

(globalPrivate.copyDataProperties):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setConstantIdentifierSetRegisters):

  • bytecode/CodeBlock.h:
  • bytecode/EvalCodeBlock.h:

(JSC::EvalCodeBlock::create):

  • bytecode/FunctionCodeBlock.h:

(JSC::FunctionCodeBlock::create):

  • bytecode/ModuleProgramCodeBlock.h:

(JSC::ModuleProgramCodeBlock::create):

  • bytecode/ProgramCodeBlock.h:

(JSC::ProgramCodeBlock::create):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::addSetConstant):
(JSC::UnlinkedCodeBlock::constantIdentifierSets):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitLoad):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ObjectPatternNode::bindValue):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::appendObjectPatternEntry):
(JSC::ASTBuilder::appendObjectPatternRestEntry):
(JSC::ASTBuilder::setContainsObjectRestElement):

  • parser/Nodes.h:

(JSC::ObjectPatternNode::appendEntry):
(JSC::ObjectPatternNode::setContainsRestElement):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseProperty):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::operatorStackPop):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::privateToObject):

  • runtime/JSGlobalObjectFunctions.h:
  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::newCodeBlockFor):

Source/WTF:

  • wtf/HashSet.h:

(WTF::=):

LayoutTests:

  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:
5:48 PM Changeset in webkit [213696] by achristensen@apple.com
  • 32 edits
    8 copies
    4 moves
    1 add in trunk

Expose public APIs for content filters
https://bugs.webkit.org/show_bug.cgi?id=150479

Reviewed by Brady Eidson and Geoff Garen.

Source/WebCore:

  • English.lproj/Localizable.strings:

Source/WebKit2:

This takes _WKUserContentExtensionStore and _WKUserContentFilter and turns them into the consistently-named public API
WKContentExtensionStore and WKContentExtension respectively with the same design and functionaly of the original SPI.
We also added public functions to WKUserContentController corresponding to existing private functions.

The old SPI ObjC classes are now just wrappers around the new ObjC classes, which are wrappers around C++ objects in the API namespace.

The peak-memory-reducing optimization of having NS_RELEASES_ARGUMENT in _compileContentExtensionForIdentifier is kept for Safari,
but the public API doesn't need such an optimization. The public compileContentExtensionForIdentifier will not deallocate the input
NSString during compiling.

We moved the error codes into the WKErrorDomain, which requires changing the values of the error codes and domain, but source
compiled that uses the SPI before and after should still work. Using new applications with old frameworks or vice versa will
have unexpected error codes, though.

  • Shared/API/APIObject.h:
  • Shared/API/c/WKDeprecatedFunctions.cpp:

(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveUserContentFilter):

  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • UIProcess/API/APIContentExtension.cpp: Copied from UIProcess/API/APIUserContentExtension.cpp.

(API::ContentExtension::ContentExtension):
(API::ContentExtension::~ContentExtension):
(API::UserContentExtension::UserContentExtension): Deleted.
(API::UserContentExtension::~UserContentExtension): Deleted.

  • UIProcess/API/APIContentExtension.h: Copied from UIProcess/API/APIUserContentExtension.h.
  • UIProcess/API/APIContentExtensionStore.cpp: Copied from UIProcess/API/APIUserContentExtensionStore.cpp.

(API::ContentExtensionStore::defaultStore):
(API::ContentExtensionStore::storeWithPath):
(API::ContentExtensionStore::ContentExtensionStore):
(API::ContentExtensionStore::~ContentExtensionStore):
(API::compiledToFile):
(API::createExtension):
(API::ContentExtensionStore::lookupContentExtension):
(API::ContentExtensionStore::compileContentExtension):
(API::ContentExtensionStore::removeContentExtension):
(API::ContentExtensionStore::synchronousRemoveAllContentExtensions):
(API::ContentExtensionStore::invalidateContentExtensionVersion):
(API::contentExtensionStoreErrorCategory):
(API::UserContentExtensionStore::defaultStore): Deleted.
(API::UserContentExtensionStore::storeWithPath): Deleted.
(API::UserContentExtensionStore::UserContentExtensionStore): Deleted.
(API::UserContentExtensionStore::~UserContentExtensionStore): Deleted.
(API::UserContentExtensionStore::lookupContentExtension): Deleted.
(API::UserContentExtensionStore::compileContentExtension): Deleted.
(API::UserContentExtensionStore::removeContentExtension): Deleted.
(API::UserContentExtensionStore::synchronousRemoveAllContentExtensions): Deleted.
(API::UserContentExtensionStore::invalidateContentExtensionVersion): Deleted.
(API::userContentExtensionStoreErrorCategory): Deleted.

  • UIProcess/API/APIContentExtensionStore.h: Copied from UIProcess/API/APIUserContentExtensionStore.h.

(API::make_error_code):

  • UIProcess/API/APIUserContentExtension.cpp: Removed.
  • UIProcess/API/APIUserContentExtension.h: Removed.
  • UIProcess/API/APIUserContentExtensionStore.cpp: Removed.
  • UIProcess/API/APIUserContentExtensionStore.h: Removed.
  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/WKPageGroup.cpp:
  • UIProcess/API/C/WKUserContentControllerRef.cpp:

(WKUserContentControllerAddUserContentFilter):
(WKUserContentControllerRemoveAllUserContentFilters):

  • UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:

(WKUserContentExtensionStoreGetTypeID):

  • UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm:

(API::ContentExtensionStore::defaultStorePath):
(API::UserContentExtensionStore::defaultStorePath): Deleted.

  • UIProcess/API/Cocoa/WKContentExtension.h: Copied from UIProcess/API/Cocoa/_WKUserContentFilter.h.
  • UIProcess/API/Cocoa/WKContentExtension.mm: Copied from UIProcess/API/Cocoa/_WKUserContentFilter.mm.

(-[WKContentExtension dealloc]):
(-[WKContentExtension _apiObject]):
(-[_WKUserContentFilter dealloc]): Deleted.
(-[_WKUserContentFilter _apiObject]): Deleted.

  • UIProcess/API/Cocoa/WKContentExtensionInternal.h: Copied from UIProcess/API/Cocoa/_WKUserContentFilterInternal.h.

(WebKit::wrapper):

  • UIProcess/API/Cocoa/WKContentExtensionStore.h: Copied from UIProcess/API/Cocoa/_WKUserContentExtensionStore.h.
  • UIProcess/API/Cocoa/WKContentExtensionStore.mm: Copied from UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm.

(-[WKContentExtensionStore dealloc]):
(+[WKContentExtensionStore defaultStore]):
(+[WKContentExtensionStore storeWithURL:]):
(-[WKContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[WKContentExtensionStore _compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:releasesArgument:]):
(-[WKContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[WKContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
(-[WKContentExtensionStore _apiObject]):
(-[WKContentExtensionStore _removeAllContentExtensions]):
(-[WKContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]):
(-[WKContentExtensionStore _compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore dealloc]): Deleted.
(+[_WKUserContentExtensionStore defaultStore]): Deleted.
(+[_WKUserContentExtensionStore storeWithURL:]): Deleted.
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]): Deleted.
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]): Deleted.
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]): Deleted.
(-[_WKUserContentExtensionStore _apiObject]): Deleted.
(-[_WKUserContentExtensionStore _removeAllContentExtensions]): Deleted.
(-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]): Deleted.

  • UIProcess/API/Cocoa/WKContentExtensionStoreInternal.h: Copied from UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h.

(WebKit::wrapper):

  • UIProcess/API/Cocoa/WKContentExtensionStorePrivate.h: Copied from UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h.
  • UIProcess/API/Cocoa/WKError.h:
  • UIProcess/API/Cocoa/WKError.mm:

(localizedDescriptionForErrorCode):

  • UIProcess/API/Cocoa/WKUserContentController.h:
  • UIProcess/API/Cocoa/WKUserContentController.mm:

(-[WKUserContentController addContentExtension:]):
(-[WKUserContentController removeContentExtension:]):
(-[WKUserContentController removeAllContentExtensions]):
(-[WKUserContentController _addUserContentFilter:]):
(-[WKUserContentController _removeUserContentFilter:]):
(-[WKUserContentController _removeAllUserContentFilters]):

  • UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
  • UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:

(+[_WKUserContentExtensionStore defaultStore]):
(+[_WKUserContentExtensionStore storeWithURL:]):
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore _apiObject]):
(-[_WKUserContentExtensionStore _removeAllContentExtensions]):
(-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]):
(-[_WKUserContentExtensionStore _initWithWKContentExtensionStore:]):
(-[_WKUserContentExtensionStore dealloc]): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h:

(WebKit::wrapper): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
  • UIProcess/API/Cocoa/_WKUserContentFilter.mm:

(-[_WKUserContentFilter _apiObject]):
(-[_WKUserContentFilter _initWithWKContentExtension:]):
(-[_WKUserContentFilter dealloc]): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:

(WebKit::wrapper): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentFilterPrivate.h: Added.
  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addContentExtension):
(WebKit::WebUserContentControllerProxy::removeContentExtension):
(WebKit::WebUserContentControllerProxy::removeAllContentExtensions):
(WebKit::WebUserContentControllerProxy::addUserContentExtension): Deleted.
(WebKit::WebUserContentControllerProxy::removeUserContentExtension): Deleted.
(WebKit::WebUserContentControllerProxy::removeAllUserContentExtensions): Deleted.

  • UIProcess/UserContent/WebUserContentControllerProxy.h:
  • UIProcess/WebPageGroup.cpp:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::addContentExtensions):
(WebKit::WebUserContentController::removeContentExtension):
(WebKit::WebUserContentController::removeAllContentExtensions):
(WebKit::WebUserContentController::addUserContentExtensions): Deleted.
(WebKit::WebUserContentController::removeUserContentExtension): Deleted.
(WebKit::WebUserContentController::removeAllUserContentExtensions): Deleted.

  • WebProcess/UserContent/WebUserContentController.h:
  • WebProcess/UserContent/WebUserContentController.messages.in:
  • WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:

(WebKit::blockedByContentFilterError):

Tools:

Keep the existing tests to verify that I made the wrapper classes for the old SPI work correctly.
Add new identical tests for the new API are added with the new names.
We should keep both until we migrate from and remove the old SPI.
Enum error code values and strings have changed, but the API is source compatible.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKUserContentExtensionStore.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm.

(WKUserContentExtensionStoreTest::SetUp):
(TEST_F):
(checkDomain):
(_WKUserContentExtensionStoreTest::SetUp): Deleted.

  • TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm:

(checkDomain):

5:27 PM Changeset in webkit [213695] by mark.lam@apple.com
  • 3 edits
    2 adds in trunk/Source/JavaScriptCore

Implement a StackTrace utility object that can capture stack traces for debugging.
https://bugs.webkit.org/show_bug.cgi?id=169454

Reviewed by Michael Saboff.

The underlying implementation is hoisted right out of Assertions.cpp from the
implementations of WTFPrintBacktrace().

The reason we need this StackTrace object is because during heap debugging, we
sometimes want to capture the stack trace that allocated the objects of interest.
Dumping the stack trace directly to stdout (using WTFReportBacktrace()) may
perturb the execution profile sufficiently that an issue may not reproduce,
while alternatively, just capturing the stack trace and deferring printing it
till we actually need it later perturbs the execution profile less.

In addition, just capturing the stack traces (instead of printing them
immediately at each capture site) allows us to avoid polluting stdout with tons
of stack traces that may be irrelevant.

For now, we only capture the native stack trace. We'll leave capturing and
integrating the JS stack trace as an exercise for the future if we need it then.

Here's an example of how to use this StackTrace utility:

Capture a stack trace of the top 10 frames.
std::unique_ptr<StackTrace> trace(StackTrace::captureStackTrace(10));
Print the trace.
dataLog(*trace);

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • tools/StackTrace.cpp: Added.

(JSC::StackTrace::instanceSize):
(JSC::StackTrace::captureStackTrace):
(JSC::StackTrace::dump):

  • tools/StackTrace.h: Added.

(JSC::StackTrace::StackTrace):
(JSC::StackTrace::size):

5:08 PM Changeset in webkit [213694] by dbates@webkit.org
  • 3 edits in trunk/Tools

Attempt to fix the WebKit2 test bots following <https://trac.webkit.org/changeset/213676>
(https://bugs.webkit.org/show_bug.cgi?id=169364)

Create new WebView with Credential Management enabled when the enableCredentialManagement
WebKitTestRunner option is specified.

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::viewSupportsOptions):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::viewSupportsOptions):

4:59 PM Changeset in webkit [213693] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix some debug builds after r213686

Unreviewed.

  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:

(WebKit::WebURLSchemeHandlerCocoa::WebURLSchemeHandlerCocoa): Remove the 32-bit NOT_REACHED protection for now.

4:57 PM Changeset in webkit [213692] by keith_miller@apple.com
  • 4 edits in trunk/Source

WebAssembly: Enable fast memory for WK2
https://bugs.webkit.org/show_bug.cgi?id=169437

Reviewed by Tim Horton.

Source/JavaScriptCore:

Source/WebKit2:

I forgot to do this when I enabled implemented fast memory
for wasm.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

4:53 PM Changeset in webkit [213691] by Matt Baker
  • 15 edits
    1 copy
    1 move
    5 adds in trunk

Web Inspector: Add XHR breakpoints UI
https://bugs.webkit.org/show_bug.cgi?id=168763
<rdar://problem/30952439>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/DOMDebugger.json:

Added clarifying comments to command descriptions.

Source/WebCore:

Test: inspector/dom-debugger/xhr-breakpoints.html

  • inspector/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::discardBindings):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
Don't break for XHRs when breakpoints are disabled.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New UI strings.

  • UserInterface/Controllers/DOMDebuggerManager.js:

Plumbing for XHR breakpoints. Like DOM breakpoints, they are tracked
per-page. Unlike DOM breakpoints, they have no separate "resolved"
state, and are simply added/removed as the main frame changes.

(WebInspector.DOMDebuggerManager):
(WebInspector.DOMDebuggerManager.prototype.get allRequestsBreakpoint):
(WebInspector.DOMDebuggerManager.prototype.get xhrBreakpoints):
(WebInspector.DOMDebuggerManager.prototype.isBreakpointRemovable):
(WebInspector.DOMDebuggerManager.prototype.removeDOMBreakpoint):
(WebInspector.DOMDebuggerManager.prototype.addXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype.removeXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._detachXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._updateXHRBreakpoint.breakpointUpdated):
(WebInspector.DOMDebuggerManager.prototype._updateXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._resolveXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._saveXHRBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._domBreakpointDisabledStateDidChange):
(WebInspector.DOMDebuggerManager.prototype._xhrBreakpointDisabledStateDidChange):
(WebInspector.DOMDebuggerManager.prototype._mainResourceDidChange):
(WebInspector.DOMDebuggerManager.prototype._saveBreakpoints): Deleted.
Renamed saveDOMBreakpoints.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype._pauseReasonFromPayload):
Plumbing for XHR breakpoint pause reason.

  • UserInterface/Controllers/XHRBreakpointTreeController.js: Added.

Creates the "All Requests" breakpoint, handles DOMDebuggerManager messages,
and updates an associated tree outline as XHR breakpoints are added and removed.

(WebInspector.XHRBreakpointTreeController):
(WebInspector.XHRBreakpointTreeController.prototype.revealAndSelect):
(WebInspector.XHRBreakpointTreeController.prototype.disconnect):
(WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointAdded):
(WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointRemoved):
(WebInspector.XHRBreakpointTreeController.prototype._mainResourceDidChange):
(WebInspector.XHRBreakpointTreeController.prototype._reset):

  • UserInterface/Main.html:

New files.

  • UserInterface/Models/XHRBreakpoint.js: Added.

New model class. XHR breakpoints have an associated URL, which is matched
against the request URL when deciding whether to break. An empty URL matches
all XMLHttpRequests.

(WebInspector.XHRBreakpoint):
(WebInspector.XHRBreakpoint.prototype.get documentURL):
(WebInspector.XHRBreakpoint.prototype.get url):
(WebInspector.XHRBreakpoint.prototype.get disabled):
(WebInspector.XHRBreakpoint.prototype.set disabled):
(WebInspector.XHRBreakpoint.prototype.get serializableInfo):
(WebInspector.XHRBreakpoint.prototype.saveIdentityToCookie):

  • UserInterface/Test.html:

New files.

  • UserInterface/Views/ContentView.js:

(WebInspector.ContentView.createFromRepresentedObject):
Plumbing for new represented object type, to prevent runtime assertion.

  • UserInterface/Views/DOMBreakpointTreeElement.js:

(WebInspector.DOMBreakpointTreeElement):
Reuse BreakpointTreeElement styles.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
(WebInspector.DebuggerSidebarPanel.prototype._addXHRBreakpointButtonClicked):
(WebInspector.DebuggerSidebarPanel.prototype.willDismissPopover):

  • UserInterface/Views/InputPopover.css: Added.

(.popover .input-popover-content):
(.popover .input-popover-content > .editor):
(.popover .input-popover-content > .editor > .CodeMirror):
(.popover .input-popover-content > .editor > .CodeMirror-scroll):

  • UserInterface/Views/InputPopover.js: Added.

New general purpose popover class. Style and structure lifted from
the Popover implementation used by the Probe Expressions UI. A follow-up
has been filed to switch that UI over to this new class:
https://bugs.webkit.org/show_bug.cgi?id=169428.

(WebInspector.InputPopover):
(WebInspector.InputPopover.prototype.get value):
(WebInspector.InputPopover.prototype.get result):
(WebInspector.InputPopover.prototype.show):
(WebInspector.InputPopover.prototype._presentOverTargetElement):

  • UserInterface/Views/XHRBreakpointTreeElement.js: Added.

Tree element class for XHR breakpoints. Behaves identically to
script and DOM breakpoint tree elements.

(WebInspector.XHRBreakpointTreeElement):
Reuse BreakpointTreeElement styles.
(WebInspector.XHRBreakpointTreeElement.prototype.onattach):
(WebInspector.XHRBreakpointTreeElement.prototype.ondetach):
(WebInspector.XHRBreakpointTreeElement.prototype.ondelete):
(WebInspector.XHRBreakpointTreeElement.prototype.onenter):
(WebInspector.XHRBreakpointTreeElement.prototype.onspace):
(WebInspector.XHRBreakpointTreeElement.prototype.populateContextMenu):
(WebInspector.XHRBreakpointTreeElement.prototype._statusImageElementClicked):
(WebInspector.XHRBreakpointTreeElement.prototype._statusImageElementFocused):
(WebInspector.XHRBreakpointTreeElement.prototype._statusImageElementMouseDown):
(WebInspector.XHRBreakpointTreeElement.prototype._toggleBreakpoint):
(WebInspector.XHRBreakpointTreeElement.prototype._updateStatus):

LayoutTests:

Tests for pausing on XMLHttpRequests using XHR breakpoints.

  • inspector/dom-debugger/xhr-breakpoints-expected.txt: Added.
  • inspector/dom-debugger/xhr-breakpoints.html: Added.
4:53 PM Changeset in webkit [213690] by msaboff@apple.com
  • 20 edits
    1 add in trunk/Source

Source/JavaScriptCore:
Add plumbing to WebProcess to enable JavaScriptCore configuration and logging
https://bugs.webkit.org/show_bug.cgi?id=169387

Reviewed by Filip Pizlo.

Added a helper function, processConfigFile(), to process configuration file.
Changed jsc.cpp to use that function in lieu of processing the config file
manually.

  • JavaScriptCore.xcodeproj/project.pbxproj: Made ConfigFile.h a private header file.
  • jsc.cpp:

(jscmain):

  • runtime/ConfigFile.cpp:

(JSC::processConfigFile):

  • runtime/ConfigFile.h:

Source/WebCore:
Add plumbing to WebProcess to enable JavaScriptCore configuration and logging
https://bugs.webkit.org/show_bug.cgi?id=169387

Reviewed by Filip Pizlo.

Added a forwarding header file for JavScriptCore/runtime/ConfigFile.h.

  • ForwardingHeaders/runtime/ConfigFile.h: Added.

Source/WebKit2:
<<<<<<< .mine

4:52 PM Changeset in webkit [213689] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r196271): Web Inspector: DOM element loses focus/active selection after committing an inline attribute editor in DOMTreeOutline
https://bugs.webkit.org/show_bug.cgi?id=168119
<rdar://problem/30466013>

Reviewed by Brian Burg.

Fix a regression caused by http://trac.webkit.org/changeset/196271, which
updated WebInspector.isEventTargetAnEditableField to detect the editing
scenarios used by DOMTreeElement and DataGrid. This subtly changed the
behavior of WebInspector._focusChanged, which expected all editable fields
to be backed by a CodeMirror instance.

  • UserInterface/Base/Main.js:
4:46 PM Changeset in webkit [213688] by wilander@apple.com
  • 22 edits
    2 adds in trunk

Resource Load Statistics: Remove statistics data as part of full website data removal
https://bugs.webkit.org/show_bug.cgi?id=169448

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore):

The version of this function that takes a modifiedSince parameter
checks if it is equal to or less than the start of the Unix epoch.
If so, it clears the store. This is to support clear all website
data.

  • loader/ResourceLoadObserver.h:
  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent):
(WebCore::ResourceLoadStatisticsStore::setWritePersistentStoreCallback):

  • loader/ResourceLoadStatisticsStore.h:

Added m_writePersistentStoreHandler, a setter for it, and
ResourceLoadStatisticsStore::clearInMemoryAndPersistent().

Source/WebKit2:

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStore):

Infrastructure for test.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):

Infrastructure for test.

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):

Change due to the break-out of
WebResourceLoadStatisticsStore::writeStoreToDisk().

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

Now sets m_writePersistentStoreHandler in
WebCore::ResourceLoadStatisticsStore.

(WebKit::WebResourceLoadStatisticsStore::writeStoreToDisk):

Separated out this function to make it available for the function set as
m_writePersistentStoreHandler in WebCore::ResourceLoadStatisticsStore.

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

Both WebsiteDataStore::removeData() functions now cover resource load
statistics.

Tools:

This patch adds infrastructure for the new TestRunner function
statisticsClearInMemoryAndPersistentStore().

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::statisticsClearInMemoryAndPersistentStore):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store.html: Added.
  • platform/wk2/TestExpectations:

Marked as [ Pass ] for WebKit2.

4:44 PM Changeset in webkit [213687] by mrajca@apple.com
  • 3 edits in trunk/Source/WebCore

Only consider autoplay interference in the first 10 seconds of playback.
https://bugs.webkit.org/show_bug.cgi?id=169455

Reviewed by Alex Christensen.

If the media duration is relatively long, say, 10 minutes, and you pause 5 minutes in, that's
probably not a strong indication users may not want auto-play. This patch limits interference
events to the first 10 seconds of automatic playback.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
(WebCore::HTMLMediaElement::userDidInterfereWithAutoplay):
(WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture):
(WebCore::HTMLMediaElement::pageMutedStateDidChange):

  • html/HTMLMediaElement.h:
4:38 PM Changeset in webkit [213686] by beidson@apple.com
  • 23 edits
    8 copies
    8 adds in trunk/Source

Add WKURLSchemeHandler API for handling custom protocols.
https://bugs.webkit.org/show_bug.cgi?id=169422

Reviewed by Tim Horton.

Source/WebCore:

  • platform/URLParser.cpp:

(WebCore::URLParser::maybeCanonicalizeScheme):
(WebCore::URLParser::isSpecialScheme):

  • platform/URLParser.h:

Source/WebKit2:

This introduces two new protocols to the WK2 API surface:

  • WKURLSchemeHandler
  • WKURLSchemeHandlerTask

By registering an object that conforms to the WKURLSchemeHandler protocol with a WKWebViewConfiguration an application will
be handed an object conforming to WKURLSchemeHandlerTask for each resource load in that WKWebView with a custom URL scheme.

Using that id <WKURLSchemeHandlerTask>, the application can communicate the data for the resource back to WebKit.

  • Shared/API/APIObject.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/APIURLSchemeHandlerTask.cpp:

(API::URLSchemeHandlerTask::create):
(API::URLSchemeHandlerTask::URLSchemeHandlerTask):

  • UIProcess/API/APIURLSchemeHandlerTask.h:

Add the WKURLSchemeHandler @protocol:

  • UIProcess/API/Cocoa/WKURLSchemeHandler.h: Added.

Add the WKURLSchemeHandlerTask @protocol, as well as WebKit's concrete implementation of it:

  • UIProcess/API/Cocoa/WKURLSchemeHandlerTask.h: Added.
  • UIProcess/API/Cocoa/WKURLSchemeHandlerTask.mm: Added.

(raiseExceptionIfNecessary):
(-[WKURLSchemeHandlerTaskImpl request]):
(-[WKURLSchemeHandlerTaskImpl didReceiveResponse:]):
(-[WKURLSchemeHandlerTaskImpl didReceiveData:]):
(-[WKURLSchemeHandlerTaskImpl didFinish]):
(-[WKURLSchemeHandlerTaskImpl didFailWithError:]):
(-[WKURLSchemeHandlerTaskImpl _apiObject]):

  • UIProcess/API/Cocoa/WKURLSchemeHandlerTaskInternal.h:

(WebKit::wrapper):

  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView urlSchemeHandlerForURLScheme:]):
(+[WKWebView handlesURLScheme:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:]):
(-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]):
(-[WKWebViewConfiguration _urlSchemeHandlers]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:

(WebKit::WebURLSchemeHandlerCocoa::apiHandler):

  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: Added.

(WebKit::WebURLSchemeHandlerCocoa::create):
(WebKit::WebURLSchemeHandlerCocoa::WebURLSchemeHandlerCocoa):
(WebKit::WebURLSchemeHandlerCocoa::platformStartTask):
(WebKit::WebURLSchemeHandlerCocoa::platformStopTask):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setURLSchemeHandlerForScheme):
(WebKit::WebPageProxy::urlSchemeHandlerForScheme):
(WebKit::WebPageProxy::startURLSchemeHandlerTask):
(WebKit::WebPageProxy::stopURLSchemeHandlerTask):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebURLSchemeHandler.cpp:

(WebKit::generateWebURLSchemeHandlerIdentifier):
(WebKit::WebURLSchemeHandler::WebURLSchemeHandler):
(WebKit::WebURLSchemeHandler::~WebURLSchemeHandler):
(WebKit::WebURLSchemeHandler::startTask):
(WebKit::WebURLSchemeHandler::stopTask):

  • UIProcess/WebURLSchemeHandler.h:

(WebKit::WebURLSchemeHandler::identifier):

  • UIProcess/WebURLSchemeHandlerTask.cpp: Added.

(WebKit::WebURLSchemeHandlerTask::create):
(WebKit::WebURLSchemeHandlerTask::WebURLSchemeHandlerTask):
(WebKit::WebURLSchemeHandlerTask::didReceiveResponse):
(WebKit::WebURLSchemeHandlerTask::didReceiveData):
(WebKit::WebURLSchemeHandlerTask::didComplete):
(WebKit::WebURLSchemeHandlerTask::pageDestroyed):
(WebKit::WebURLSchemeHandlerTask::stop):

  • UIProcess/WebURLSchemeHandlerTask.h: Added.

(WebKit::WebURLSchemeHandlerTask::identifier):
(WebKit::WebURLSchemeHandlerTask::request):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::remove):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::urlSchemeHandlerForScheme):
(WebKit::WebPage::registerURLSchemeHandler):
(WebKit::WebPage::urlSchemeHandlerTaskDidReceiveResponse):
(WebKit::WebPage::urlSchemeHandlerTaskDidReceiveData):
(WebKit::WebPage::urlSchemeHandlerTaskDidComplete):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp: Added.

(WebKit::WebURLSchemeHandlerProxy::WebURLSchemeHandlerProxy):
(WebKit::WebURLSchemeHandlerProxy::~WebURLSchemeHandlerProxy):
(WebKit::WebURLSchemeHandlerProxy::startNewTask):
(WebKit::WebURLSchemeHandlerProxy::taskDidReceiveResponse):
(WebKit::WebURLSchemeHandlerProxy::taskDidReceiveData):
(WebKit::WebURLSchemeHandlerProxy::taskDidComplete):

  • WebProcess/WebPage/WebURLSchemeHandlerProxy.h:

(WebKit::WebURLSchemeHandlerProxy::identifier):
(WebKit::WebURLSchemeHandlerProxy::page):

  • WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.cpp: Added.

(WebKit::WebURLSchemeHandlerTaskProxy::WebURLSchemeHandlerTaskProxy):
(WebKit::WebURLSchemeHandlerTaskProxy::startLoading):
(WebKit::WebURLSchemeHandlerTaskProxy::stopLoading):
(WebKit::WebURLSchemeHandlerTaskProxy::didReceiveResponse):
(WebKit::WebURLSchemeHandlerTaskProxy::didReceiveData):
(WebKit::WebURLSchemeHandlerTaskProxy::didComplete):

  • WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.h:

(WebKit::WebURLSchemeHandlerTaskProxy::request):

  • WebKit2.xcodeproj/project.pbxproj:
  • CMakeLists.txt:
4:16 PM Changeset in webkit [213685] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebKit2

Unreviewed follow-up to r213682.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Forward declare SPIs to address possible build errors.

4:00 PM Changeset in webkit [213684] by dino@apple.com
  • 10 edits
    4 copies in trunk

WebGPU: Backend - Buffers
https://bugs.webkit.org/show_bug.cgi?id=169451
<rdar://problem/30959168>

Reviewed by Tim Horton.

Source/WebCore:

Implement the backend for GPUBuffer, which
represents a chunk of memory that can be used
by the GPU. You create one using an ArrayBufferView.

WebKit API Test: GPUBuffer.mm

  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/cocoa/GPUBufferMetal.mm:

(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::length):
(WebCore::GPUBuffer::contents):
(WebCore::GPUBuffer::platformBuffer):

  • platform/graphics/gpu/GPUBuffer.cpp:

(WebCore::GPUBuffer::create):
(WebCore::GPUBuffer::~GPUBuffer):
(WebCore::GPUBuffer::length):
(WebCore::GPUBuffer::contents):

  • platform/graphics/gpu/GPUBuffer.h:
  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::createBufferFromData):

  • platform/graphics/gpu/GPUDevice.h:

Tools:

Test for GPUBuffer object.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/mac/GPUBuffer.mm: Added.

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm:
  • TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm:
3:58 PM Changeset in webkit [213683] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit2

WKWebView should provide a way for clients to know the specific media state.
https://bugs.webkit.org/show_bug.cgi?id=169140
<rdar://problem/30838285>

Patch by Andrew Gold <agold@apple.com> on 2017-03-09
Reviewed by Alex Christensen.

Instead of notifying the UIDelegate only when a capture begins and ends,
we now notify the UIDelegate of any change in capture state.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::mediaCaptureStateDidChange):
(API::UIClient::didBeginCaptureSession): Deleted.
(API::UIClient::didEndCaptureSession): Deleted.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::mediaCaptureStateDidChange):
(WebKit::UIDelegate::UIClient::didBeginCaptureSession): Deleted.
(WebKit::UIDelegate::UIClient::didEndCaptureSession): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::isPlayingMediaDidChange):

3:44 PM Changeset in webkit [213682] by Joseph Pecoraro
  • 31 edits
    2 adds in trunk

Web Inspector: Show HTTP protocol version and other Network Load Metrics (IP Address, Priority, Connection ID)
https://bugs.webkit.org/show_bug.cgi?id=29687
<rdar://problem/19281586>

Reviewed by Matt Baker and Brian Burg.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:

Add metrics object with optional properties to loadingFinished event.

Source/WebCore:

Test: http/tests/inspector/network/resource-metrics.html

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::toProtocol):
(WebCore::InspectorNetworkAgent::buildObjectForMetrics):
(WebCore::InspectorNetworkAgent::didFinishLoading):
Send metrics at didFinishLoading time, we do not have all of
these at didReceiveResponse time.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didFinishLoadingImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didFinishLoading):

  • inspector/InspectorNetworkAgent.h:
  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::finishedLoading):

  • loader/ResourceLoadNotifier.cpp:

(WebCore::ResourceLoadNotifier::didFinishLoad):
(WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
(WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):

  • loader/ResourceLoadNotifier.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didFinishLoading):

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::didFinishLoading):
Include or pass on NetworkLoadMetrics to Web Inspector.

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy):
(WebCore::NetworkLoadMetrics::reset):
(WebCore::NetworkLoadMetrics::operator==):
(WebCore::NetworkLoadMetrics::encode):
(WebCore::NetworkLoadMetrics::decode):
Add new optional metrics properties.

(WTF::Persistence::Coder<std::optional<WebCore::NetworkLoadPriority>>::encode):
(WTF::Persistence::Coder<std::optional<WebCore::NetworkLoadPriority>>::decode):
We never encode this but this is needed for the compiler.

  • platform/spi/cocoa/NSURLConnectionSPI.h:

New SPI for NSURLSessionTaskTransactionMetrics details.

Source/WebInspectorUI:

These columns are available in the Network DataGrids, but are
initially hidden. They can be shown by right clicking on the
table header and showing these columns. We are going to rework
the default list of visible columns later.

  • Localizations/en.lproj/localizedStrings.js:

New localized strings for data grid headers and Low/Medium/High.

  • UserInterface/Controllers/FrameResourceManager.js:

(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):

  • UserInterface/Protocol/NetworkObserver.js:

(WebInspector.NetworkObserver.prototype.loadingFinished):
Pass metrics on to the Resource.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource):
(WebInspector.Resource.displayNameForType):
(WebInspector.Resource.responseSourceFromPayload):
(WebInspector.Resource.networkPriorityFromPayload):
(WebInspector.Resource.connectionIdentifierFromPayload):
(WebInspector.Resource.prototype.get protocol):
(WebInspector.Resource.prototype.get priority):
(WebInspector.Resource.prototype.get remoteAddress):
(WebInspector.Resource.prototype.get connectionIdentifier):
(WebInspector.Resource.prototype.updateWithMetrics):
Include metrics accessors and default values.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView):
Add metrics columns if the backend may be sending them.

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ResourceTimelineDataGridNode.prototype._displayNameForPriority):
(WebInspector.ResourceTimelineDataGridNode.prototype._cachedCellContent):
Display strings for new columns.

  • UserInterface/Views/TimelineDataGridNode.js:
  • UserInterface/Views/TimelineRecordBar.js:

(WebInspector.TimelineRecordBar.prototype.refresh):
Avoid assertions if Graph column is unavailable.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.createSettings):
(WebInspector.DataGrid.prototype.setColumnVisible):
Better support for restoring user preference of initially
hidden columns which the user may have shown.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
Show the Protocol and Priority in the Resources sidebar.

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(toNetworkLoadPriority):
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

  • Shared/WebCoreArgumentCoders.h:

Additional optional metrics on NetworkLoadMetrics.

LayoutTests:

  • http/tests/inspector/network/resource-metrics-expected.txt: Added.
  • http/tests/inspector/network/resource-metrics.html: Added.
3:21 PM Changeset in webkit [213681] by Ryan Haddad
  • 1 edit
    2 adds in trunk/LayoutTests

Add iOS baseline for compositing/contents-format/subpixel-antialiased-text-traversal.

Unreviewed test gardening.

  • platform/ios-simulator/compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt: Added.
3:14 PM Changeset in webkit [213680] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

Minimal build is broken
https://bugs.webkit.org/show_bug.cgi?id=169416

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-09
Reviewed by Chris Dumez.

Since we now have some JS built-ins that are not tied to a compilation flag, we can remove compilation guards around m_vm.
We could probably remove m_vm by ensuring m_jsDOMBindingInternals appear first but this might break very easily.

  • Scripts/builtins/builtins_generate_internals_wrapper_header.py:

(generate_members):

  • Scripts/builtins/builtins_generate_internals_wrapper_implementation.py:

(BuiltinsInternalsWrapperImplementationGenerator.generate_constructor):

  • Scripts/tests/builtins/expected/WebCoreJSBuiltins.h-result:
2:49 PM Changeset in webkit [213679] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Use the right conditional.

  • Modules/applepay/ApplePayError.idl:
2:47 PM Changeset in webkit [213678] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Activate VideoToolbox when WebRTC is enabled on iOS
https://bugs.webkit.org/show_bug.cgi?id=169423

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-09
Reviewed by Jon Lee.

  • wtf/Platform.h: Activate VIDEOTOOLBOX if WEBRTC is enabled.
2:47 PM Changeset in webkit [213677] by dbates@webkit.org
  • 1 edit in trunk/Source/JavaScriptCore/ChangeLog

Guard Credential Management implementation behind a runtime enabled feature flag
https://bugs.webkit.org/show_bug.cgi?id=169364
<rdar://problem/30957425>

Reviewed by Brent Fulgham.

Add common identifiers for Credential, PasswordCredential, and SiteBoundCredential that are
needed to guard these interfaces behind a runtime enabled feature flag.

  • runtime/CommonIdentifiers.h:
2:40 PM Changeset in webkit [213676] by dbates@webkit.org
  • 30 edits in trunk

Guard Credential Management implementation behind a runtime enabled feature flag
https://bugs.webkit.org/show_bug.cgi?id=169364
<rdar://problem/30957425>

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

Add common identifiers for Credential, PasswordCredential, and SiteBoundCredential that are
needed to guard these interfaces behind a runtime enabled feature flag.

  • runtime/CommonIdentifiers.h:

Source/WebCore:

Add a runtime enabled feature flag for Credential Management (disabled by default).
Once we are happy with this feature we can enable the feature by default or remove the
the runtime enabled feature flag so as to enable it by default.

  • Modules/credentials/BasicCredential.idl: Enable only if the runtime enabled feature flag is enabled.
  • Modules/credentials/PasswordCredential.idl: Ditto.
  • Modules/credentials/SiteBoundCredential.idl: Ditto.
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setCredentialManagementEnabled): Added.
(WebCore::RuntimeEnabledFeatures::credentialManagementEnabled): Added.

Source/WebKit/mac:

Add WebKit preference for Credential Management (disabled by default).

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences credentialManagementEnabled]): Added.
(-[WebPreferences setCredentialManagementEnabled:]): Added.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add WebKit2 preference for Credential Management (disabled by default).

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetCredentialManagementEnabled): Added.
(WKPreferencesGetCredentialManagementEnabled): Added.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Add a new test option header, enableCredentialManagement, to DumpRenderTree/WebKitTestRunner
to enable Credential Management.

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestOptions.mm:

(TestOptions::TestOptions):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

LayoutTests:

  • credentials/idlharness.html: Use comment header to enable Credential Management API.
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt: Update expected results now

that we no longer expose the Credential Management API by default.

  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: Ditto.
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt: Ditto.
  • platform/mac/js/dom/global-constructors-attributes-expected.txt: Ditto.
  • platform/win/TestExpectations: For now, skip the Credential Management API tests.
2:39 PM Changeset in webkit [213675] by mark.lam@apple.com
  • 4 edits
    5 moves in trunk/Source/JavaScriptCore

Refactoring some HeapVerifier code.
https://bugs.webkit.org/show_bug.cgi?id=169443

Reviewed by Filip Pizlo.

Renamed LiveObjectData to CellProfile.
Renamed LiveObjectList to CellList.
Moved CellProfile.*, CellList.*, and HeapVerifier.* from the heap folder to the tools folder.
Updated the HeapVerifier to handle JSCells instead of just JSObjects.

This is in preparation for subsequent patches to fix up the HeapVerifier for service again.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/Heap.cpp:

(JSC::Heap::runBeginPhase):
(JSC::Heap::runEndPhase):

  • heap/HeapVerifier.cpp: Removed.
  • heap/HeapVerifier.h: Removed.
  • heap/LiveObjectData.h: Removed.
  • heap/LiveObjectList.cpp: Removed.
  • heap/LiveObjectList.h: Removed.
  • tools/CellList.cpp: Copied from Source/JavaScriptCore/heap/LiveObjectList.cpp.

(JSC::CellList::findCell):
(JSC::LiveObjectList::findObject): Deleted.

  • tools/CellList.h: Copied from Source/JavaScriptCore/heap/LiveObjectList.h.

(JSC::CellList::CellList):
(JSC::CellList::reset):
(JSC::LiveObjectList::LiveObjectList): Deleted.
(JSC::LiveObjectList::reset): Deleted.

  • tools/CellProfile.h: Copied from Source/JavaScriptCore/heap/LiveObjectData.h.

(JSC::CellProfile::CellProfile):
(JSC::LiveObjectData::LiveObjectData): Deleted.

  • tools/HeapVerifier.cpp: Copied from Source/JavaScriptCore/heap/HeapVerifier.cpp.

(JSC::GatherCellFunctor::GatherCellFunctor):
(JSC::GatherCellFunctor::visit):
(JSC::GatherCellFunctor::operator()):
(JSC::HeapVerifier::gatherLiveCells):
(JSC::HeapVerifier::cellListForGathering):
(JSC::trimDeadCellsFromList):
(JSC::HeapVerifier::trimDeadCells):
(JSC::HeapVerifier::verifyButterflyIsInStorageSpace):
(JSC::HeapVerifier::reportCell):
(JSC::HeapVerifier::checkIfRecorded):
(JSC::GatherLiveObjFunctor::GatherLiveObjFunctor): Deleted.
(JSC::GatherLiveObjFunctor::visit): Deleted.
(JSC::GatherLiveObjFunctor::operator()): Deleted.
(JSC::HeapVerifier::gatherLiveObjects): Deleted.
(JSC::HeapVerifier::liveObjectListForGathering): Deleted.
(JSC::trimDeadObjectsFromList): Deleted.
(JSC::HeapVerifier::trimDeadObjects): Deleted.
(JSC::HeapVerifier::reportObject): Deleted.

  • tools/HeapVerifier.h: Copied from Source/JavaScriptCore/heap/HeapVerifier.h.
2:37 PM Changeset in webkit [213674] by aestes@apple.com
  • 9 edits in trunk/Source/WebKit2

[iOS] Add SPI to print to a single tall PDF page
https://bugs.webkit.org/show_bug.cgi?id=169439
<rdar://problem/30120532>

Reviewed by Tim Horton.

  • Shared/PrintInfo.cpp:

(WebKit::PrintInfo::encode): Encoded snapshotFirstPage.
(WebKit::PrintInfo::decode): Decoded snapshotFirstPage.
(WebKit::PrintInfo::PrintInfo): Deleted.

  • Shared/PrintInfo.h: Initialized member variables in place instead of in a default ctor.
  • UIProcess/_WKWebViewPrintFormatter.h: Declared BOOL property snapshotFirstPage.
  • UIProcess/_WKWebViewPrintFormatter.mm:

(-[_WKWebViewPrintFormatter _setSnapshotPaperRect:]): Added to set a custom paper size.
(-[_WKWebViewPrintFormatter rectForPageAtIndex:]): Returned the custom paper rect if
snapshotFirstPage is true.

  • UIProcess/_WKWebViewPrintFormatterInternal.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _wk_pageCountForPrintFormatter:]): Computed the custom paper size to be the
smaller of the document height and the maximum PDF page height.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView _wk_pageCountForPrintFormatter:]): Changed to return a maximum page size of 1
if snapshotFirstPage is true.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::computePagesForPrintingAndDrawToPDF): Ditto.

2:34 PM Changeset in webkit [213673] by andersca@apple.com
  • 17 edits
    11 adds in trunk

Add delegate support to WebCore
https://bugs.webkit.org/show_bug.cgi?id=169427
Part of rdar://problem/28880714.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

  • DerivedSources.make:

Add idl files.

  • Modules/applepay/ApplePayError.cpp:

(WebCore::ApplePayError::create):
(WebCore::ApplePayError::ApplePayError):
(WebCore::ApplePayError::~ApplePayError):

  • Modules/applepay/ApplePayError.h:
  • Modules/applepay/ApplePayError.idl:
  • Modules/applepay/ApplePayPaymentAuthorizationResult.h:
  • Modules/applepay/ApplePayPaymentAuthorizationResult.idl:
  • Modules/applepay/ApplePayPaymentMethodUpdate.h:
  • Modules/applepay/ApplePayPaymentMethodUpdate.idl:
  • Modules/applepay/ApplePayShippingContactUpdate.h:
  • Modules/applepay/ApplePayShippingContactUpdate.idl:
  • Modules/applepay/ApplePayShippingMethodUpdate.h:
  • Modules/applepay/ApplePayShippingMethodUpdate.idl:

Add new files.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::toPaymentAuthorizationStatus):
Move this function to the top.

(WebCore::convertAndValidate):
Add new convertAndValidate functions.

(WebCore::ApplePaySession::completeShippingMethodSelection):
(WebCore::ApplePaySession::completeShippingContactSelection):
(WebCore::ApplePaySession::completePaymentMethodSelection):
(WebCore::ApplePaySession::completePayment):

  • Modules/applepay/ApplePaySession.h:
  • Modules/applepay/ApplePaySession.idl:

Implement the old functions in terms of the new functions.

  • Modules/applepay/PaymentCoordinator.cpp:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2:29 PM Changeset in webkit [213672] by yoav@yoav.ws
  • 5 edits
    5 adds in trunk

[link preload] Double downloads of preloaded CSS
https://bugs.webkit.org/show_bug.cgi?id=169274

Reviewed by Antti Koivisto.

Source/WebCore:

Avoid reloading link preloads in case of a charset mismatch.

Charset mismatch can happen for header based preloads, as they are requested before
the HTML's <meta charset> tag is processed. This change makes sure that in those
cases, we modify the resource's encoding setting instead of reloading it.

Test: http/tests/preload/single_download_preload_headers.php

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource): Initialize m_unknownCharset to be the same as the preload flag.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::hasUnknownEncoding):
(WebCore::CachedResource::setHasUnknownEncoding):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::determineRevalidationPolicy): In case of a charset
mismatch, set the encoding of the Resource instead of reloading it if the charset is unknown.

LayoutTests:

Added tests making sure that header based preloads also trigger a single download,
and that we properly handle multiple charsets for the same preloaded resource.

  • http/tests/preload/single_download_preload_headers-expected.txt: Added.
  • http/tests/preload/single_download_preload_headers.php: Added.
  • http/tests/preload/preload-encoding-expected.txt: Added.
  • http/tests/preload/preload-encoding.php: Added.
2:24 PM Changeset in webkit [213671] by jiewen_tan@apple.com
  • 21 edits
    6 copies
    23 adds in trunk

Implement PBKDF2 in WebCrypto
https://bugs.webkit.org/show_bug.cgi?id=143458
<rdar://problem/27311703>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt:

Source/WebCore:

This patch implements PBKDF2 according to the spec:
https://www.w3.org/TR/WebCryptoAPI/#pbkdf2. Supported
operations include deriveKey, deriveBits, importKey and
getKeyLength.

Tests: crypto/subtle/ecdh-import-key-derive-pbkdf2-key.html

crypto/subtle/pbkdf2-derive-bits-malformed-parametrs.html
crypto/subtle/pbkdf2-import-key-derive-bits.html
crypto/subtle/pbkdf2-import-key-derive-hmac-key.html
crypto/subtle/pbkdf2-import-key-malformed-parameters.html
crypto/subtle/pbkdf2-import-key.html
crypto/workers/subtle/pbkdf2-import-key-derive-bits.html
crypto/workers/subtle/pbkdf2-import-key-derive-hmac-key.html
crypto/workers/subtle/pbkdf2-import-key.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCryptoKeyCustom.cpp:

(WebCore::JSCryptoKey::algorithm):
Added RawKeyAlgorithm.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
A bit of reordering.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::write):
Faked implementation.

  • crypto/CryptoAlgorithmParameters.h:
  • crypto/CryptoKey.h:
  • crypto/algorithms/CryptoAlgorithmPBKDF2.cpp: Added.

(WebCore::CryptoAlgorithmPBKDF2::create):
(WebCore::CryptoAlgorithmPBKDF2::identifier):
(WebCore::CryptoAlgorithmPBKDF2::deriveBits):
(WebCore::CryptoAlgorithmPBKDF2::importKey):
(WebCore::CryptoAlgorithmPBKDF2::getKeyLength):

  • crypto/algorithms/CryptoAlgorithmPBKDF2.h: Added.
  • crypto/gnutls/CryptoAlgorithmPBKDF2GnuTLS.cpp: Added.

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/keys/CryptoKeyRaw.cpp: Added.

(WebCore::CryptoKeyRaw::CryptoKeyRaw):
(WebCore::CryptoKeyRaw::buildAlgorithm):
(WebCore::CryptoKeyRaw::exportData):

  • crypto/keys/CryptoKeyRaw.h: Added.

(WebCore::RawKeyAlgorithm::RawKeyAlgorithm):
The CryptoKey class for PBKDF2 and later on HKDF.

  • crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp: Added.

(WebCore::commonCryptoHMACAlgorithm):
(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmRegistryMac.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

  • crypto/parameters/CryptoAlgorithmPbkdf2Params.h: Added.
  • crypto/parameters/Pbkdf2Params.idl: Added.

LayoutTests:

Mark slow tests as slow.

  • crypto/subtle/derive-key-malformed-parameters.html:
  • crypto/subtle/ecdh-import-key-derive-pbkdf2-key-expected.txt: Added.
  • crypto/subtle/ecdh-import-key-derive-pbkdf2-key.html: Added.
  • crypto/subtle/pbkdf2-derive-bits-malformed-parametrs-expected.txt: Added.
  • crypto/subtle/pbkdf2-derive-bits-malformed-parametrs.html: Added.
  • crypto/subtle/pbkdf2-import-key-derive-bits-expected.txt: Added.
  • crypto/subtle/pbkdf2-import-key-derive-bits.html: Added.
  • crypto/subtle/pbkdf2-import-key-derive-hmac-key-expected.txt: Added.
  • crypto/subtle/pbkdf2-import-key-derive-hmac-key.html: Added.
  • crypto/subtle/pbkdf2-import-key-expected.txt: Added.
  • crypto/subtle/pbkdf2-import-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/pbkdf2-import-key-malformed-parameters.html: Added.
  • crypto/subtle/pbkdf2-import-key.html: Added.
  • crypto/workers/subtle/pbkdf2-import-key-derive-bits-expected.txt: Added.
  • crypto/workers/subtle/pbkdf2-import-key-derive-bits.html: Added.
  • crypto/workers/subtle/pbkdf2-import-key-derive-hmac-key-expected.txt: Added.
  • crypto/workers/subtle/pbkdf2-import-key-derive-hmac-key.html: Added.
  • crypto/workers/subtle/pbkdf2-import-key-expected.txt: Added.
  • crypto/workers/subtle/pbkdf2-import-key.html: Added.
  • crypto/workers/subtle/resources/pbkdf2-import-key-derive-bits.js: Added.
  • crypto/workers/subtle/resources/pbkdf2-import-key-derive-hmac-key.js: Added.
  • crypto/workers/subtle/resources/pbkdf2-import-key.js: Added.
2:17 PM Changeset in webkit [213670] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[Modern Media Controls] iOS: long press on play button shows the Copy menu
https://bugs.webkit.org/show_bug.cgi?id=169355
<rdar://problem/30928998>

Patch by Antoine Quint <Antoine Quint> on 2017-03-09
Reviewed by Dean Jackson.

Source/WebCore:

Disable built-in UI behavior that shows a magnifier or a copy callout when pressing
on an element for a long time. These do not make sense for media controls.

Test: media/modern-media-controls/audio/audio-controls-styles.html

  • Modules/modern-media-controls/controls/media-controls.css:

(:host):

LayoutTests:

Add a test to check that the expected properties are set as they should to disable
built-in UI behavior that shows a magnifier or a copy callout when pressing on an
element for a long time.

  • media/modern-media-controls/audio/audio-controls-styles-expected.txt: Added.
  • media/modern-media-controls/audio/audio-controls-styles.html: Added.
  • platform/mac/TestExpectations:
2:17 PM Changeset in webkit [213669] by achristensen@apple.com
  • 22 edits in trunk

[Content Extensions] Introduce if-top-url and unless-top-url
https://bugs.webkit.org/show_bug.cgi?id=169433

Reviewed by Brady Eidson.

Source/WebCore:

In r184116 I added if-domain and unless-domain to control whether a rule applies
based on the domain of the main document URL. I'm expanding this by adding if-top-url
and unless-top-url that run regular expressions on the entire main document URL so that
example.com/user1content can be distinguished from example.com/user2content.
To not add to the number of passes we make on the URLs for each load and to maintain JSON
backwards compatibility, I've made it so that if-top-url and unless-top-url can be used
instead of if-domain and unless-domain (which continue to work) but the two condition types
cannot be used together since running regular expressions on the entire main document URL
is strictly more powerful than checking the domain and subdomains.
As a minor detail, content extension regexes are by default ASCII-case-insensitive, so I've
done the same with top URL regexes, adding top-url-filter-is-case-sensitive to mirror the existing
url-filter-is-case-sensitive if the JSON author decides to make regexes case sensitive.

Covered by new API tests.

  • contentextensions/CompiledContentExtension.h:
  • contentextensions/ContentExtension.cpp:

(WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):
(WebCore::ContentExtensions::ContentExtension::topURLActions):
(WebCore::ContentExtensions::ContentExtension::cachedConditionedActions): Deleted.

  • contentextensions/ContentExtension.h:
  • contentextensions/ContentExtensionCompiler.cpp:

(WebCore::ContentExtensions::addUniversalActionsToDFA):
(WebCore::ContentExtensions::compileToBytecode):
We had three copies of compiling to bytecode that were almost the same and would've been made into three copies of the same code.
I moved them to one helper function that is called three times.
(WebCore::ContentExtensions::compileRuleList):

  • contentextensions/ContentExtensionCompiler.h:
  • contentextensions/ContentExtensionError.cpp:

(WebCore::ContentExtensions::contentExtensionErrorCategory):
Add the new error type for JSON that tries to use if-top-url and unless-top-url with if-domain and unless-domain.

  • contentextensions/ContentExtensionError.h:
  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::loadTrigger):
Parse the new values if-top-url, unless-top-url, and top-url-filter-is-case-sensitive.

  • contentextensions/ContentExtensionRule.h:

(WebCore::ContentExtensions::Trigger::~Trigger):

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):

  • contentextensions/DFABytecodeInterpreter.cpp:

(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithConditions):

  • contentextensions/DFABytecodeInterpreter.h:

Source/WebKit2:

Rename conditionedFilters to topURLFilters to reflect the fact that they are the filters
that are run on the top URL, and possibly just the domain of the top url.
I was a bit too aggressive when renaming domain* to condition* in r213533.

  • Shared/WebCompiledContentExtension.cpp:

(WebKit::WebCompiledContentExtension::conditionsApplyOnlyToDomain):
(WebKit::WebCompiledContentExtension::topURLFiltersBytecode):
(WebKit::WebCompiledContentExtension::topURLFiltersBytecodeLength):
(WebKit::WebCompiledContentExtension::conditionedFiltersBytecode): Deleted.
(WebKit::WebCompiledContentExtension::conditionedFiltersBytecodeLength): Deleted.

  • Shared/WebCompiledContentExtension.h:
  • Shared/WebCompiledContentExtensionData.cpp:

(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):

  • Shared/WebCompiledContentExtensionData.h:

(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):

  • UIProcess/API/APIUserContentExtensionStore.cpp:

(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
(API::compiledToFile):
(API::createExtension):
(API::UserContentExtensionStore::invalidateContentExtensionVersion):
(API::userContentExtensionStoreErrorCategory):

  • UIProcess/API/APIUserContentExtensionStore.h:

Increment CurrentContentExtensionFileVersion because we have changed the format of the binary on disk.
We only added 4 bytes, but that's binary incompatible and requires re-compiling any existing content extensions.

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::TEST_F):
Add tests for new functionality and new failure types.

2:07 PM Changeset in webkit [213668] by Jon Davis
  • 3 edits in trunk/Websites/webkit.org

Prevent HTML in rich link previews
https://bugs.webkit.org/show_bug.cgi?id=169435

Reviewed by Tim Horton.

  • wp-content/plugins/social-meta.php:
1:58 PM Changeset in webkit [213667] by jmarcell@apple.com
  • 4 edits in tags/Safari-604.1.9/Source

Roll out r213557. rdar://problem/30955791

1:56 PM Changeset in webkit [213666] by Nikita Vasilyev
  • 12 edits
    4 adds in trunk/Source

Web Inspector: Show individual messages in the content pane for a WebSocket
https://bugs.webkit.org/show_bug.cgi?id=169011

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Add walltime parameter and correct the description of Timestamp type.

  • inspector/protocol/Network.json:

Source/WebCore:

Add walltime parameter.

No new tests. Tests will be added in a follow up patch.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest):

Source/WebInspectorUI:

When selecting a Web Socket in Network panel or Resources, display a table
of all messages that have been sent and received.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/FrameResourceManager.js:

(WebInspector.FrameResourceManager.prototype.webSocketWillSendHandshakeRequest):
Add a walltime parameter.

(WebInspector.FrameResourceManager.prototype._webSocketFrameReceivedOrSent):
Fix a bug: masked messages are outgoing, not incoming.

  • UserInterface/Images/ArrowUp.svg: Added.
  • UserInterface/Images/gtk/ArrowUp.svg: Added.

Add an icon for outgoing messages.

  • UserInterface/Main.html:
  • UserInterface/Models/WebSocketResource.js:

(WebInspector.WebSocketResource):
(WebInspector.WebSocketResource.prototype.get walltime):
(WebInspector.WebSocketResource.prototype.addFrame):
(WebInspector.WebSocketResource.prototype._walltimeForWebSocketTimestamp):

  • UserInterface/Protocol/NetworkObserver.js:

(WebInspector.NetworkObserver.prototype.webSocketWillSendHandshakeRequest):
(WebInspector.NetworkObserver.prototype.webSocketFrameSent):
(WebInspector.NetworkObserver.prototype.webSocketFrameError):
(WebInspector.NetworkObserver):

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):

  • UserInterface/Views/ResourceClusterContentView.js:

(WebInspector.ResourceClusterContentView.prototype.get responseContentView):

  • UserInterface/Views/WebSocketContentView.css: Added.

(.web-socket.content-view > .data-grid):
(.web-socket.content-view > .data-grid table.data):
(.web-socket.content-view > .data-grid td.data-column,):
(body[dir=ltr] .web-socket.content-view > .data-grid .data-column > div):
(body[dir=rtl] .web-socket.content-view > .data-grid .data-column > div):
(.web-socket.content-view .icon):
(body[dir=ltr] .web-socket.content-view .icon):
(body[dir=rtl] .web-socket.content-view .icon):
(.web-socket.content-view .outgoing .icon):
(.web-socket.content-view .data-grid.variable-height-rows table.data tr:nth-child(odd)):
(.web-socket.content-view .data-grid table.data tr.revealed):
(.web-socket.content-view .data-grid.variable-height-rows table.data tr.outgoing):
(.web-socket.content-view .data-grid.variable-height-rows table.data tr.non-text-frame):

  • UserInterface/Views/WebSocketContentView.js: Added.

(WebInspector.WebSocketContentView):
Only show Time column when walltime is available.

(WebInspector.WebSocketContentView.textForOpcode):
(WebInspector.WebSocketContentView.prototype.shown):
(WebInspector.WebSocketContentView.prototype.hidden):
(WebInspector.WebSocketContentView.prototype.addFrame):
(WebInspector.WebSocketContentView.prototype._updateFrames):
Only render frames that haven't been rendered yet.

(WebInspector.WebSocketContentView.prototype._addRow):
(WebInspector.WebSocketContentView.prototype._timeStringFromTimestamp):

1:42 PM Changeset in webkit [213665] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][iOS] Extend WebProcess sandbox to support audio and video compression/decompression
https://bugs.webkit.org/show_bug.cgi?id=169431
<rdar://problem/30844650>

Reviewed by Youenn Fablet.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1:39 PM Changeset in webkit [213664] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix weak external symbol error.

  • heap/SlotVisitor.h:
1:28 PM Changeset in webkit [213663] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r213628.

Use 'size_t' for the function definition to match the header file. If you do not,
the 32-bit build fails..

  • crypto/gnutls/CryptoAlgorithmECDHGnuTLS.cpp:

(WebCore::CryptoAlgorithmECDH::platformDeriveBits):

1:24 PM Changeset in webkit [213662] by Wenson Hsieh
  • 4 edits in trunk/Source

[WK2] Add a UI delegate hook for custom handling of data interaction operations
https://bugs.webkit.org/show_bug.cgi?id=169430
<rdar://problem/30954654>

Reviewed by Tim Horton.

Source/WebCore:

Ensure that m_documentUnderMouse is properly cleaned up even in the case where no drag operation was performed
due to the drop bailing at the client layer.

  • page/DragController.cpp:

(WebCore::DragController::dragEnded):

Source/WebKit2:

Introduce a new SPI method on the UI delegate for clients who need to override data interaction operation behaviors.
Note that implementing this delegate method and returning YES will not propagate a drop event to the page.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1:23 PM Changeset in webkit [213661] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

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:
1:19 PM Changeset in webkit [213660] by Megan Gardner
  • 2 edits in trunk/Source/WebKit/mac

Fix DataInteraction guards
https://bugs.webkit.org/show_bug.cgi?id=169404

Reviewed by Wenson Hsieh.

  • WebCoreSupport/WebDragClient.mm:
1:18 PM Changeset in webkit [213659] by fpizlo@apple.com
  • 7 edits in trunk/Source

Source/JavaScriptCore:
std::isnan/isinf should work with WTF time classes
https://bugs.webkit.org/show_bug.cgi?id=164991

Reviewed by Darin Adler.

Changes AtomicsObject to use std::isnan() instead of operator== to detect NaN.

  • runtime/AtomicsObject.cpp:

(JSC::atomicsFuncWait):

Source/WTF:
std::isnan/isinf/isfinite should work with WTF time classes
https://bugs.webkit.org/show_bug.cgi?id=164991

Reviewed by Darin Adler.

The consensus view (see comments in https://bugs.webkit.org/show_bug.cgi?id=152045) of how
to check if something is NaN is to use std::isnan(). To be able to do that for time
classes, they need to provide their own isnan() overhload. This also provides isinf()
overloads.

  • wtf/MonotonicTime.h:

(std::isnan):
(std::isinf):

  • wtf/Seconds.h:

(std::isnan):
(std::isinf):

  • wtf/TimeWithDynamicClockType.h:

(std::isnan):
(std::isinf):

  • wtf/WallTime.h:

(std::isnan):
(std::isinf):

1:13 PM Changeset in webkit [213658] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

JSC EWS repeat the log message thrice about patch not being relevant
https://bugs.webkit.org/show_bug.cgi?id=169330

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-03-09
Reviewed by Chris Dumez.

  • Scripts/webkitpy/tool/steps/checkpatchrelevance.py:

(CheckPatchRelevance.run): Change log level to 'debug' to reduce stdout traffic.

1:05 PM Changeset in webkit [213657] by mark.lam@apple.com
  • 16 edits in trunk/Source

Use const AbstractLocker& (instead of const LockHolder&) in more places.
https://bugs.webkit.org/show_bug.cgi?id=169424

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::promoteYoungCodeBlocks):

  • heap/CodeBlockSet.h:
  • heap/CodeBlockSetInlines.h:

(JSC::CodeBlockSet::mark):

  • heap/ConservativeRoots.cpp:

(JSC::CompositeMarkHook::CompositeMarkHook):

  • heap/MachineStackMarker.cpp:

(JSC::MachineThreads::tryCopyOtherThreadStacks):

  • heap/MachineStackMarker.h:
  • profiler/ProfilerDatabase.cpp:

(JSC::Profiler::Database::ensureBytecodesFor):

  • profiler/ProfilerDatabase.h:
  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::FrameWalker):
(JSC::CFrameWalker::CFrameWalker):
(JSC::SamplingProfiler::createThreadIfNecessary):
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::start):
(JSC::SamplingProfiler::pause):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
(JSC::SamplingProfiler::clearData):
(JSC::SamplingProfiler::releaseStackTraces):

  • runtime/SamplingProfiler.h:

(JSC::SamplingProfiler::setStopWatch):

  • wasm/WasmMemory.cpp:

(JSC::Wasm::availableFastMemories):
(JSC::Wasm::activeFastMemories):
(JSC::Wasm::viewActiveFastMemories):

  • wasm/WasmMemory.h:

Source/WTF:

  • wtf/RunLoop.h:
  • wtf/generic/RunLoopGeneric.cpp:

(WTF::RunLoop::wakeUp):
(WTF::RunLoop::schedule):

12:47 PM Changeset in webkit [213656] by mrajca@apple.com
  • 15 edits in trunk

Let clients control autoplay quirks with website policies.
https://bugs.webkit.org/show_bug.cgi?id=169390

Reviewed by Wenson Hsieh.

Many sites incorrectly assume media will start off playing and display a pause button from the
start. We can trick many of these sites into updating their controls by sending a "pause"
event when we prevent a media element from playing.

We don't want this to become standard web behavior, however, since ultimately sites should adapt
to the new behavior. This patch lets clients decide which limited set of sites gets to use auto-play
quirks.

Source/WebCore:

  • html/HTMLMediaElement.cpp:

(WebCore::needsAutoplayPlayPauseEventsQuirk):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::allowsAutoplayQuirks):
(WebCore::DocumentLoader::setAllowsAutoplayQuirks):

Source/WebKit2:

  • Shared/WebsitePolicies.h:

(WebKit::WebsitePolicies::encode):
(WebKit::WebsitePolicies::decode):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/C/WKWebsitePolicies.cpp:

(WKWebsitePoliciesSetAllowsAutoplayQuirks):
(WKWebsitePoliciesGetAllowsAutoplayQuirks):

  • UIProcess/API/C/WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setAllowsAutoplayQuirks:]):
(-[_WKWebsitePolicies allowsAutoplayQuirks]):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateWebsitePolicies):

Tools:

  • TestWebKitAPI/Tests/WebKit2/autoplay-check.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:

(-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):

12:35 PM Changeset in webkit [213655] by Devin Rousso
  • 2 edits in trunk/Tools

Unreviewed, change my status to be a WebKit reviewer

  • Scripts/webkitpy/common/config/contributors.json:
11:46 AM Changeset in webkit [213654] by Jonathan Bedard
  • 9 edits in trunk/Tools

Standardize device/simulator naming conventions
https://bugs.webkit.org/show_bug.cgi?id=169083
<rdar://problem/30810466>

Reviewed by Alexey Proskuryakov.

  • Scripts/build-webkit: Document --ios-device and --simulator options.
  • Scripts/package-root:

(usage): Ditto.

  • Scripts/run-api-tests: Document --simulator option.
  • Scripts/webkitdirs.pm:

(argumentsForConfiguration): Use --ios-device by default rather than --device.
(determineXcodeSDK): Parse --ios-device and --simulator options.

  • Scripts/webkitpy/common/config/ews.json: Change port name from ios to ios-device.
  • Scripts/webkitpy/common/config/ports.py: Ditto.

(DeprecatedPort.port):
(IOSPort): Change port name from ios to ios-device.

  • Scripts/webkitpy/port/factory.py:

(platform_options): Add --simulator option.
(PortFactory): Update comment.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort): Change port name from ios to ios-device.
(IOSDevicePort.operating_system): Ditto.

11:18 AM Changeset in webkit [213653] by sbarati@apple.com
  • 5 edits
    1 add in trunk

WebAssembly: Make the Unity AngryBots demo run
https://bugs.webkit.org/show_bug.cgi?id=169268

Reviewed by Keith Miller.

JSTests:

  • wasm/function-tests/many-arguments-to-function.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.I32Const.0.I32Const.1.I32Const.2.I32Const.3.I32Const.4.I32Const.5.I32Const.6.I32Const.7.I32Const.8.I32Const.9.I32Const.10.I32Const.11.I32Const.12.I32Const.13.I32Const.14.I32Const.15.I32Const.16.I32Const.17.Call.0.Return.End.End.foo):
(i.instance.exports.f0.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.Call.Return.End.End.foo):
(i.instance.exports.f0):
(instance.exports.f0.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.Call.Return.End.End.foo):
(instance.exports.f0):

Source/JavaScriptCore:

This patch fixes three bugs:

  1. The WasmBinding code for making a JS call was off

by 1 in its stack layout code.

  1. The WasmBinding code had a "<" comparison instead

of a ">=" comparison. This would cause us to calculate
the wrong frame pointer offset.

  1. The code to reload wasm state inside B3IRGenerator didn't

properly represent its effects.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::restoreWebAssemblyGlobalState):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::WebAssemblyInstanceConstructor::createInstance):

11:08 AM Changeset in webkit [213652] by mark.lam@apple.com
  • 47 edits in trunk/Source

Make the VM Traps mechanism non-polling for the DFG and FTL.
https://bugs.webkit.org/show_bug.cgi?id=168920
<rdar://problem/30738588>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

  1. Added a ENABLE(SIGNAL_BASED_VM_TRAPS) configuration in Platform.h. This is currently only enabled for OS(DARWIN) and ENABLE(JIT).
  2. Added assembler functions for overwriting an instruction with a breakpoint.
  3. Added a new JettisonDueToVMTraps jettison reason.
  4. Added CodeBlock and DFG::CommonData utility functions for over-writing invalidation points with breakpoint instructions.
  5. The BytecodeGenerator now emits the op_check_traps bytecode unconditionally.
  6. Remove the JSC_alwaysCheckTraps option because of (4) above. For ports that don't ENABLE(SIGNAL_BASED_VM_TRAPS), we'll force Options::usePollingTraps() to always be true. This makes the VMTraps implementation fall back to using polling based traps only.
  1. Make VMTraps support signal based traps.

Some design and implementation details of signal based VM traps:

  • The implementation makes use of 2 signal handlers for SIGUSR1 and SIGTRAP.
  • VMTraps::fireTrap() will set the flag for the requested trap and instantiate a SignalSender. The SignalSender will send SIGUSR1 to the mutator thread that we want to trap, and check for the occurence of one of the following events:
  1. VMTraps::handleTraps() has been called for the requested trap, or
  1. the VM is inactive and is no longer executing any JS code. We determine this to be the case if the thread no longer owns the JSLock and the VM's entryScope is null.

Note: the thread can relinquish the JSLock while the VM's entryScope is not
null. This happens when the thread calls JSLock::dropAllLocks() before
calling a host function that may block on IO (or whatever). For our purpose,
this counts as the VM still running JS code, and VM::fireTrap() will still
be waiting.

If the SignalSender does not see either of these events, it will sleep for a
while and then re-send SIGUSR1 and check for the events again. When it sees
one of these events, it will consider the mutator to have received the trap
request.

  • The SIGUSR1 handler will try to insert breakpoints at the invalidation points in the DFG/FTL codeBlock at the top of the stack. This allows the mutator thread to break (with a SIGTRAP) exactly at an invalidation point, where it's safe to jettison the codeBlock.

Note: we cannot have the requester thread (that called VMTraps::fireTrap())
insert the breakpoint instructions itself. This is because we need the
register state of the the mutator thread (that we want to trap in) in order to
find the codeBlocks that we wish to insert the breakpoints in. Currently,
we don't have a generic way for the requester thread to get the register state
of another thread.

  • The SIGTRAP handler will check to see if it is trapping on a breakpoint at an invalidation point. If so, it will jettison the codeBlock and adjust the PC to re-execute the invalidation OSR exit off-ramp. After the OSR exit, the baseline JIT code will eventually reach an op_check_traps and call VMTraps::handleTraps().

If the handler is not trapping at an invalidation point, then it must be
observing an assertion failure (which also uses the breakpoint instruction).
In this case, the handler will defer to the default SIGTRAP handler and crash.

  • The reason we need the SignalSender is because SignalSender::send() is called from another thread in a loop, so that VMTraps::fireTrap() can return sooner. send() needs to make use of the VM pointer, and it is not guaranteed that the VM will outlive the thread. SignalSender provides the mechanism by which we can nullify the VM pointer when the VM dies so that the thread does not continue to use it.
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::replaceWithBrk):

  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::replaceWithBrk):

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::replaceWithBkpt):

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::replaceWithBkpt):

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::replaceWithJump):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::replaceWithBreakpoint):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::replaceWithBreakpoint):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::replaceWithJump):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::replaceWithBreakpoint):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::replaceWithInt3):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::jettison):
(JSC::CodeBlock::hasInstalledVMTrapBreakpoints):
(JSC::CodeBlock::installVMTrapBreakpoints):

  • bytecode/CodeBlock.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitCheckTraps):

  • dfg/DFGCommonData.cpp:

(JSC::DFG::CommonData::installVMTrapBreakpoints):
(JSC::DFG::CommonData::isVMTrapBreakpoint):

  • dfg/DFGCommonData.h:

(JSC::DFG::CommonData::hasInstalledVMTrapsBreakpoints):

  • dfg/DFGJumpReplacement.cpp:

(JSC::DFG::JumpReplacement::installVMTrapBreakpoint):

  • dfg/DFGJumpReplacement.h:

(JSC::DFG::JumpReplacement::dataLocation):

  • dfg/DFGNodeType.h:
  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::contains):

  • heap/CodeBlockSet.h:
  • heap/CodeBlockSetInlines.h:

(JSC::CodeBlockSet::iterate):

  • heap/Heap.cpp:

(JSC::Heap::forEachCodeBlockIgnoringJITPlansImpl):

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::forEachCodeBlockIgnoringJITPlans):

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::threadsListHead):

  • jit/ExecutableAllocator.cpp:

(JSC::ExecutableAllocator::isValidExecutableMemory):

  • jit/ExecutableAllocator.h:
  • profiler/ProfilerJettisonReason.cpp:

(WTF::printInternal):

  • profiler/ProfilerJettisonReason.h:
  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):

  • runtime/Options.cpp:

(JSC::overrideDefaults):

  • runtime/Options.h:
  • runtime/PlatformThread.h:

(JSC::platformThreadSignal):

  • runtime/VM.cpp:

(JSC::VM::~VM):
(JSC::VM::ensureWatchdog):
(JSC::VM::handleTraps): Deleted.
(JSC::VM::setNeedAsynchronousTerminationSupport): Deleted.

  • runtime/VM.h:

(JSC::VM::ownerThread):
(JSC::VM::traps):
(JSC::VM::handleTraps):
(JSC::VM::needTrapHandling):
(JSC::VM::needAsynchronousTerminationSupport): Deleted.

  • runtime/VMTraps.cpp:

(JSC::VMTraps::vm):
(JSC::SignalContext::SignalContext):
(JSC::SignalContext::adjustPCToPointToTrappingInstruction):
(JSC::vmIsInactive):
(JSC::findActiveVMAndStackBounds):
(JSC::handleSigusr1):
(JSC::handleSigtrap):
(JSC::installSignalHandlers):
(JSC::sanitizedTopCallFrame):
(JSC::isSaneFrame):
(JSC::VMTraps::tryInstallTrapBreakpoints):
(JSC::VMTraps::invalidateCodeBlocksOnStack):
(JSC::VMTraps::VMTraps):
(JSC::VMTraps::willDestroyVM):
(JSC::VMTraps::addSignalSender):
(JSC::VMTraps::removeSignalSender):
(JSC::VMTraps::SignalSender::willDestroyVM):
(JSC::VMTraps::SignalSender::send):
(JSC::VMTraps::fireTrap):
(JSC::VMTraps::handleTraps):

  • runtime/VMTraps.h:

(JSC::VMTraps::~VMTraps):
(JSC::VMTraps::needTrapHandling):
(JSC::VMTraps::notifyGrabAllLocks):
(JSC::VMTraps::SignalSender::SignalSender):
(JSC::VMTraps::invalidateCodeBlocksOnStack):

  • tools/VMInspector.cpp:
  • tools/VMInspector.h:

(JSC::VMInspector::getLock):
(JSC::VMInspector::iterate):

Source/WebCore:

No new tests needed. This is covered by existing tests.

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::WorkerScriptController):
(WebCore::WorkerScriptController::scheduleExecutionTermination):

Source/WTF:

Make StackBounds more useful for checking if a pointer is within stack bounds.

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::isInAllocatedMemory):

  • wtf/MetaAllocator.h:
  • wtf/Platform.h:
  • wtf/StackBounds.h:

(WTF::StackBounds::emptyBounds):
(WTF::StackBounds::StackBounds):
(WTF::StackBounds::isEmpty):
(WTF::StackBounds::contains):

11:08 AM Changeset in webkit [213651] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Add unit test to prevent breakage of EWS
https://bugs.webkit.org/show_bug.cgi?id=169385

Reviewed by Alexey Proskuryakov.

Prevent <http://trac.webkit.org/changeset/213545> from happening in the future.

  • Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:

(test_ews_name): Added.

11:02 AM Changeset in webkit [213650] by dino@apple.com
  • 8 edits
    9 copies in trunk

WebGPU: Backend - Library and Functions
https://bugs.webkit.org/show_bug.cgi?id=169371
<rdar://problem/30928792>

Reviewed by Tim Horton.

Source/WebCore:

Implement the backends for GPULibrary and GPUFunction.
A GPULibrary is created from a GPUDevice, given some
shader source code. You can then extract the GPUFunctions
from the library.

WebKitAPITests: GPULibrary and GPUFunction.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/cocoa/GPUFunctionMetal.mm:

(WebCore::GPUFunction::GPUFunction):
(WebCore::GPUFunction::name):
(WebCore::GPUFunction::platformFunction):

  • platform/graphics/cocoa/GPULibraryMetal.mm:

(WebCore::GPULibrary::GPULibrary):
(WebCore::GPULibrary::label):
(WebCore::GPULibrary::setLabel):
(WebCore::GPULibrary::functionNames):
(WebCore::GPULibrary::platformLibrary):

  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::createLibrary):

  • platform/graphics/gpu/GPUDevice.h:
  • platform/graphics/gpu/GPUFunction.cpp:

(WebCore::GPUFunction::create):
(WebCore::GPUFunction::~GPUFunction):
(WebCore::GPUFunction::GPUFunction):
(WebCore::GPUFunction::name):

  • platform/graphics/gpu/GPUFunction.h:
  • platform/graphics/gpu/GPULibrary.cpp:

(WebCore::GPULibrary::create):
(WebCore::GPULibrary::~GPULibrary):
(WebCore::GPULibrary::label):
(WebCore::GPULibrary::setLabel):
(WebCore::GPULibrary::functionNames):
(WebCore::GPULibrary::functionWithName):

  • platform/graphics/gpu/GPULibrary.h:

Tools:

Add tests for GPULibrary and GPUFunction.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm:

(TestWebKitAPI::TEST_F):
(TestWebKitAPI::TEST): Deleted.

  • TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm: Copied from Tools/TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm.

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm: Copied from Tools/TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm.

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/mac/GPUTest.h: Copied from Tools/TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm.

(TestWebKitAPI::GPU::librarySourceCode):

10:54 AM Changeset in webkit [213649] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

[WK2] Prevent app nap for the active tab
https://bugs.webkit.org/show_bug.cgi?id=169417
<rdar://problem/30876965>

Reviewed by Gavin Barraclough.

Prevent app nap for the active tab to minimize the risks of breakage.

From the AppNap documentation [1], the app is only a candidate for app nap if it not the
foreground app. However, in the Safari case, the foreground app is Safari (UIProcess) and
the same policy does not apply to our foreground WebContent process unless we explicitly
make it so. This patch addresses the issue by taking a UserActivity when the tab is
active to prevent app nap.

[1] https://developer.apple.com/library/content/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/AppNap.html

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateThrottleState):

10:53 AM Changeset in webkit [213648] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebKit: JSC: JSObject::ensureLength doesn't check if ensureLengthSlow failed
https://bugs.webkit.org/show_bug.cgi?id=169215

Reviewed by Mark Lam.

This doesn't have a test because it would be a very complicated test.

  • runtime/JSObject.h:

(JSC::JSObject::ensureLength): If ensureLengthSlow returns false, we need to return false.

10:33 AM Changeset in webkit [213647] by andersca@apple.com
  • 3 edits in trunk/Source/WebKit2

Add new delegate methods
https://bugs.webkit.org/show_bug.cgi?id=169394
Part of rdar://problem/28880714.

Reviewed by Tim Horton.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(-[WKPaymentAuthorizationViewControllerDelegate invalidate]):
(toShippingMethod):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:completion:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:completion:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:completion:]):
(WebKit::toPKPaymentAuthorizationStatus):
(WebKit::toPKPaymentErrorCode):
(WebKit::toNSError):
(WebKit::toNSErrors):
(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):

9:59 AM Changeset in webkit [213646] by Chris Dumez
  • 7 edits
    2 adds in trunk

Align Document.elementFromPoint() with the CSSOM specification
https://bugs.webkit.org/show_bug.cgi?id=169403

Reviewed by Sam Weinig.

Source/WebCore:

Align Document.elementFromPoint() with the CSSOM specification:

In particular, the parameters should be mandatory and of type double.

The parameters are mandatory in both Firefox and Chrome already. Parameters
are finite floating point in Firefox and integers in Chrome.

Test: fast/dom/elementFromPoint-parameters.html

  • dom/DocumentOrShadowRoot.idl:
  • dom/TreeScope.cpp:

(WebCore::TreeScope::elementFromPoint):

  • dom/TreeScope.h:

LayoutTests:

Add layout test coverage.

  • fast/dom/elementFromPoint-parameters-expected.txt: Added.
  • fast/dom/elementFromPoint-parameters.html: Added.
  • fast/dom/non-numeric-values-numeric-parameters-expected.txt:
  • fast/dom/script-tests/non-numeric-values-numeric-parameters.js:
9:40 AM Changeset in webkit [213645] by fpizlo@apple.com
  • 19 edits
    1 delete in trunk

WTF should make it super easy to do ARM concurrency tricks
https://bugs.webkit.org/show_bug.cgi?id=169300

Reviewed by Mark Lam.

Source/JavaScriptCore:

This changes a bunch of GC hot paths to use new concurrency APIs that lead to optimal
code on both x86 (fully leverage TSO, transactions become CAS loops) and ARM (use
dependency chains for fencing, transactions become LL/SC loops). While inspecting the
machine code, I found other opportunities for improvement, like inlining the "am I
marked" part of the marking functions.

  • heap/Heap.cpp:

(JSC::Heap::setGCDidJIT):

  • heap/HeapInlines.h:

(JSC::Heap::testAndSetMarked):

  • heap/LargeAllocation.h:

(JSC::LargeAllocation::isMarked):
(JSC::LargeAllocation::isMarkedConcurrently):
(JSC::LargeAllocation::aboutToMark):
(JSC::LargeAllocation::testAndSetMarked):

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::areMarksStaleWithDependency):
(JSC::MarkedBlock::aboutToMark):
(JSC::MarkedBlock::isMarkedConcurrently):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::testAndSetMarked):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendSlow):
(JSC::SlotVisitor::appendHiddenSlow):
(JSC::SlotVisitor::appendHiddenSlowImpl):
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
(JSC::SlotVisitor::appendUnbarriered): Deleted.
(JSC::SlotVisitor::appendHidden): Deleted.

  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::appendUnbarriered):
(JSC::SlotVisitor::appendHidden):
(JSC::SlotVisitor::append):
(JSC::SlotVisitor::appendValues):
(JSC::SlotVisitor::appendValuesHidden):

  • runtime/CustomGetterSetter.cpp:
  • runtime/JSObject.cpp:

(JSC::JSObject::visitButterflyImpl):

  • runtime/JSObject.h:

Source/WTF:

This adds Atomic<>::loadLink and Atomic<>::storeCond, available only when HAVE(LL_SC).

It abstracts loadLink/storeCond behind prepare/attempt. You can write prepare/attempt
loops whenever your loop fits into the least common denominator of LL/SC and CAS.

This modifies Atomic<>::transaction to use prepare/attempt. So, if you write your loop
using Atomic<>::transaction, then you get LL/SC for free.

Depending on the kind of transaction you are doing, you may not want to perform an LL
until you have a chance to just load the current value. Atomic<>::transaction() assumes
that you do not care to have any ordering guarantees in that case. If you think that
the transaction has a good chance of aborting this way, you want
Atomic<>::transaction() to first do a plain load. But if you don't think that such an
abort is likely, then you want to go straight to the LL. The API supports this concept
via TransactionAbortLikelihood.

Additionally, this redoes the depend/consume API to be dead simple. Dependency is
unsigned. You get a dependency on a loaded value by just saying
dependency(loadedValue). You consume the dependency by using it as a bonus index to
some pointer dereference. This is made easy with the consume<T*>(ptr, dependency)
helper. In those cases where you want to pass around both a computed value and a
dependency, there's DependencyWith<T>. But you won't need it in most cases. The loaded
value or any value computed from the loaded value is a fine input to dependency()!

This change updates a bunch of hot paths to use the new APIs. Using transaction() gives
us optimal LL/SC loops for object marking and lock acquisition.

This change also updates a bunch of hot paths to use dependency()/consume().

This is a significant Octane/splay speed-up on ARM.

  • wtf/Atomics.h:

(WTF::hasFence):
(WTF::Atomic::prepare):
(WTF::Atomic::attempt):
(WTF::Atomic::transaction):
(WTF::Atomic::transactionRelaxed):
(WTF::nullDependency):
(WTF::dependency):
(WTF::DependencyWith::DependencyWith):
(WTF::dependencyWith):
(WTF::consume):
(WTF::Atomic::tryTransactionRelaxed): Deleted.
(WTF::Atomic::tryTransaction): Deleted.
(WTF::zeroWithConsumeDependency): Deleted.
(WTF::consumeLoad): Deleted.

  • wtf/Bitmap.h:

(WTF::WordType>::get):
(WTF::WordType>::concurrentTestAndSet):
(WTF::WordType>::concurrentTestAndClear):

  • wtf/LockAlgorithm.h:

(WTF::LockAlgorithm::lockFast):
(WTF::LockAlgorithm::unlockFast):
(WTF::LockAlgorithm::unlockSlow):

  • wtf/Platform.h:

Tools:

This vastly simplifies the consume API. The new API is thoroughly tested by being used
in the GC's guts. I think that unit tests are a pain to maintain, so we shouldn't have
them unless we are legitimately worried about coverage. We're not in this case.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/Consume.cpp: Removed.
9:40 AM Changeset in webkit [213644] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: DOMTreeManager dispatches DocumentUpdated twice when the document is cleared
https://bugs.webkit.org/show_bug.cgi?id=168984

Reviewed by Timothy Hatcher.

  • UserInterface/Controllers/DOMTreeManager.js:

(WebInspector.DOMTreeManager.prototype._setDocument):
Compare old and new document values before dispatching message.

8:26 AM Changeset in webkit [213643] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit2

WKWebView should automatically respect insets from the view controller hierarchy
https://bugs.webkit.org/show_bug.cgi?id=169398
<rdar://problem/30617593>

Reviewed by Dean Jackson.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _computedContentInset]):
(activeMinimumLayoutSize):
(-[WKWebView _frameOrBoundsChanged]):
Factor insets from above us in the view controller hierarchy into our
content insets (and layout size) automatically.

8:17 AM Changeset in webkit [213642] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168409

Patch by Antoine Quint <Antoine Quint> on 2017-03-09
Reviewed by Eric Carlson.

Adding yet more logging to try to determine the cause of this test's flakiness.

  • media/modern-media-controls/airplay-button/airplay-button-expected.txt:
  • media/modern-media-controls/airplay-button/airplay-button.html:
8:10 AM Changeset in webkit [213641] by commit-queue@webkit.org
  • 10 edits in trunk

[Modern Media Controls] Fullscreen controls are difficult to drag around
https://bugs.webkit.org/show_bug.cgi?id=169412
<rdar://problem/30931892>

Patch by Antoine Quint <Antoine Quint> on 2017-03-09
Reviewed by Eric Carlson.

Source/WebCore:

Up until now, we would simply check that the event target when attempting to
initiate a drag would be the controls bar and not any of its children. This
was not so great as this would encompass also a large margin around the left,
center and right button containers as well as the time labels. We now check
that the event target is anything but an interactive element (<button> or <input>).

The existing test at media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html
has been updated to initiate dragging right between the rewind and play/pause button,
which would fail prior to this patch since this would have hit-tested within the center
button container and thus prevent dragging.

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen button.volume-down):
(.media-controls.mac.fullscreen button.volume-up):
(.media-controls.mac.fullscreen button.rewind):
(.media-controls.mac.fullscreen button.play-pause):
(.media-controls.mac.fullscreen button.forward):
(.media-controls.mac.fullscreen .buttons-container.right button):

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls.prototype._handleMousedown):

  • Modules/modern-media-controls/controls/macos-inline-media-controls.css:

(.media-controls.mac.inline > .controls-bar button):

  • Modules/modern-media-controls/controls/macos-media-controls.css:

(.media-controls.mac > .controls-bar button):

LayoutTests:

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:

Rebaseline test to account for CSS changes.

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button.html:

Change drag start coordinate to be right over a button so that it is prevented. Starting with this patch,
a drag at this coordinate would have been tolerated as being part of the left buttons container but not
part of a button in that container.

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:

Change drag start coordinate to be right between two buttons so that it would have failed prior to this
patch.

7:59 AM Changeset in webkit [213640] by commit-queue@webkit.org
  • 4 edits
    4 adds in trunk

[Modern Media Controls] Controls are not visible in fullscreen without the controls attribute
https://bugs.webkit.org/show_bug.cgi?id=169411
<rdar://problem/30931724>

Patch by Antoine Quint <Antoine Quint> on 2017-03-09
Reviewed by Eric Carlson.

Source/WebCore:

Ensure we show controls in fullscreen in the absence of the controls attribute.

Tests: media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html

media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html

  • Modules/modern-media-controls/media/controls-visibility-support.js:

(ControlsVisibilitySupport.prototype.get mediaEvents):
(ControlsVisibilitySupport.prototype._updateControls):
(ControlsVisibilitySupport):

LayoutTests:

Add two new tests to check that controls are visible in fullscreen in the absence of the controls attribute,
except if the fullscreen element is a parent element.

  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html: Added.
  • platform/ios-simulator/TestExpectations: Skip new tests on iOS since it uses platform controls.
7:25 AM Changeset in webkit [213639] by Alan Bujtas
  • 9 edits in trunk

Simple line layout: Add top level pagination support.
https://bugs.webkit.org/show_bug.cgi?id=169410
<rdar://problem/28536227>

Reviewed by Antti Koivisto.

Source/WebCore:

This patch enables top level pagination for simple line layout.

Covered by existing tests.

  • rendering/RenderMultiColumnFlowThread.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::pushLayoutStateForPagination): Pagination flag needs to be set before calling pushLayoutStateForCurrentFlowThread.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForWithReason):

  • rendering/SimpleLineLayoutCoverage.cpp:

(WebCore::SimpleLineLayout::printReason):

  • rendering/SimpleLineLayoutCoverage.h:
  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):

  • rendering/SimpleLineLayoutPagination.cpp:

(WebCore::SimpleLineLayout::computeLineTopAndBottomWithOverflow): Matching normal line layout values.
(WebCore::SimpleLineLayout::setPageBreakForLine): Logic here matches RenderBlockFlow::adjustLinePositionForPagination

LayoutTests:

6:24 AM Changeset in webkit [213638] by tpopela@redhat.com
  • 2 edits in trunk/Source/WebKit2

Correctly process the return value of gdk_drag_context_get_selected_action()

Reviewed by Carlos Garcia Campos.

It returns the action itself and not the bitmask.

  • UIProcess/gtk/DragAndDropHandler.cpp:

(WebKit::DragAndDropHandler::drop):

5:42 AM Changeset in webkit [213637] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[GTK] Use GtkFileChooserNative for open/save dialogs
https://bugs.webkit.org/show_bug.cgi?id=169278

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-03-09
Reviewed by Carlos Garcia Campos.

When building with GTK+ 3.20.0 or newer, use GtkFileChooserNative instead of GtkFileChooserDialog to allow for
better integration with the runtime environment and use native open/save dialogs. This also makes WebKitGTK+ use
portal-based load/save dialogs when running inside the Flatpak sandbox.

The existing GtkFileChooserDialog implementation will still be used when building against older versions of
GTK+, so this change does not require a new version of the toolkit.

  • UIProcess/API/gtk/WebKitWebView.cpp:

(fileChooserDialogResponseCallback):
(webkitWebViewRunFileChooser):

5:10 AM Changeset in webkit [213636] by tpopela@redhat.com
  • 2 edits in trunk/Source/WebCore

[GStreamer][MSE] Fix 'comparison between signed and unsigned integer
expressions' warning

Reviewed by Žan Doberšek.

  • platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:

(WebCore::PlaybackPipeline::flush):

2:51 AM Changeset in webkit [213635] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Add settings for controlling Styles sidebar intelligence
https://bugs.webkit.org/show_bug.cgi?id=169181

Patch by Devin Rousso <Devin Rousso> on 2017-03-09
Reviewed by Timothy Hatcher.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:

Add three new settings:

  • stylesShowInlineWarnings
  • stylesInsertNewline
  • stylesSelectOnFirstClick
  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings > .separator): Added.
(.content-view.settings > .setting-container):
(.content-view.settings > .setting-container.combined):

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.layout.createContainer):
(WebInspector.SettingsTabContentView.prototype.layout.createSeparator): Added.
(WebInspector.SettingsTabContentView.prototype.layout):

1:51 AM Changeset in webkit [213634] by pvollan@apple.com
  • 12 edits
    4 adds in trunk

Implement stroke-width CSS property.
https://bugs.webkit.org/show_bug.cgi?id=169273

Reviewed by Simon Fraser.

Source/WebCore:

Support setting text stroke width using the CSS property stroke-width, see https://drafts.fxtf.org/paint/.
Text stroke width can currently be set with the -webkit-text-stroke-width property. To make sure this still
works, I added a check to determine if the stroke-width property has been explicitly set. If it has not been
set, we fall back to the value of the -webkit-text-stroke-width property.

Tests: fast/css/stroke-width-percent.html

fast/css/stroke-width.html

  • css/CSSProperties.json:
  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyValueStrokeWidth):
(WebCore::StyleBuilderCustom::applyValueWebkitTextStrokeWidth):

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::computeOverflow):

  • rendering/TextDecorationPainter.cpp:

(WebCore::decorationColor):

  • rendering/TextPaintStyle.cpp:

(WebCore::computeTextPaintStyle):
(WebCore::computeTextSelectionPaintStyle):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::computedTextStrokeWidth):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setHasExplicitlySetStrokeWidth):
(WebCore::RenderStyle::hasExplicitlySetStrokeWidth):
(WebCore::RenderStyle::setHasExplicitlySetWebKitTextStrokeWidth):
(WebCore::RenderStyle::hasExplicitlySetWebKitTextStrokeWidth):
(WebCore::RenderStyle::InheritedFlags::operator==):

LayoutTests:

  • fast/css/stroke-width-expected.html: Added.
  • fast/css/stroke-width-percent-expected.html: Added.
  • fast/css/stroke-width-percent.html: Added.
  • fast/css/stroke-width.html: Added.
1:07 AM Changeset in webkit [213633] by Antti Koivisto
  • 15 edits
    3 adds in trunk

Source/WebCore:
Allow the page to render before <link> stylesheet tags in body
https://bugs.webkit.org/show_bug.cgi?id=149157
<rdar://problem/24658830>

Reviewed by Simon Fraser.

Currently we block style and renderer building completely if document has any loading
stylesheets. In case a script queries something layout dependent we construct the render
tree with whatever style we have but block painting in it.

This patch changes behavior so that a loading stylesheet in body only blocks rendering for elements
that are after it. The expectation is that such stylesheets rarely affect elements before them
and the elements can be rendered without causing ugly visible styling changes.

The patch replaces the old flash-of-unstyled-content (FOUC) preventation mechanism with a more
fine-grained one. Paint blocking is now done on per-renderer basis with based on isNonFinal flag in
RenderStyle.

For stylesheets in head the behavior should be largely unchanged.

Test: http/tests/incremental/stylesheet-body-incremental-rendering.html

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::pseudoStyleRulesForElement):

  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::resolveStyle):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):

Remove the old FOUC preventation state tracking.

(WebCore::Document::shouldScheduleLayout):
(WebCore::Document::didRemoveAllPendingStylesheet):

Repaints will now get triggered by the normal style mechanism.

  • dom/Document.h:

(WebCore::Document::hasNodesWithNonFinalStyle):
(WebCore::Document::setHasNodesWithNonFinalStyle):

Track if we need to recompute the style later because non-final or unstyled elements.

(WebCore::Document::didLayoutWithPendingStylesheets): Deleted.
(WebCore::Document::hasNodesWithPlaceholderStyle): Deleted.
(WebCore::Document::setHasNodesWithPlaceholderStyle): Deleted.

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::rendererIsNeeded):

  • page/FrameView.cpp:

(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):

Don't qualify as visually non-empty if we have loading stylesheets in head (even if there is
a fouc-prevented render tree).

(WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintContents):

Instead of a global test, block painting if isNonFinal is set in the renderer's style.

  • rendering/RenderLayer.cpp:

(WebCore::shouldSuppressPaintingLayer):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresRepaint):

The isNonFinal flag prevents painting so we need to trigger repaint when it gets cleared.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::isNotFinal):
(WebCore::RenderStyle::setIsNotFinal):
(WebCore::RenderStyle::isPlaceholderStyle): Deleted.
(WebCore::RenderStyle::setIsPlaceholderStyle): Deleted.

There is no need for placeholder styles anymore. Reuse the bit for isNotFinal.

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):

  • rendering/style/StyleRareNonInheritedData.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::analyzeStyleSheetChange):
(WebCore::Style::Scope::updateActiveStyleSheets):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::TreeResolver::resolveElement):

If we have seens a loading stylesheet and don't have a renderer yet don't style the element.
In case there is a renderer or we are ignoring pending sheets, resolve the style normally
but mark it as non-final.

(WebCore::Style::makePlaceholderStyle): Deleted.

LayoutTests:
Loading in-body stylesheets should not block rendering of elements before them
https://bugs.webkit.org/show_bug.cgi?id=169345

Reviewed by Simon Fraser.

  • http/tests/incremental/resources/delayed-css.php: Added.
  • http/tests/incremental/stylesheet-body-incremental-rendering-expected.html: Added.
  • http/tests/incremental/stylesheet-body-incremental-rendering.html: Added.
Note: See TracTimeline for information about the timeline view.