Timeline



Jun 9, 2017:

10:24 PM Changeset in webkit [218048] by Chris Dumez
  • 13 edits in trunk/Source/WebCore

Use WTF::Function instead of std::function in indexeddb code
https://bugs.webkit.org/show_bug.cgi?id=173198

Reviewed by Sam Weinig.

Use WTF::Function instead of std::function in indexeddb code to avoid copying.

  • Modules/indexeddb/IDBFactory.cpp:

(WebCore::IDBFactory::getAllDatabaseNames):

  • Modules/indexeddb/IDBFactory.h:
  • Modules/indexeddb/client/IDBConnectionProxy.cpp:

(WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNames):

  • Modules/indexeddb/client/IDBConnectionProxy.h:
  • Modules/indexeddb/client/IDBConnectionToServer.cpp:

(WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNames):

  • Modules/indexeddb/client/IDBConnectionToServer.h:
  • Modules/indexeddb/client/TransactionOperation.h:

(WebCore::IDBClient::TransactionOperation::doComplete):

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
(WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):

  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::storeCallbackOrFireError):
(WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::createIndex):
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
(WebCore::IDBServer::UniqueIDBDatabase::getCount):
(WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
(WebCore::IDBServer::UniqueIDBDatabase::openCursor):
(WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
10:19 PM Changeset in webkit [218047] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval):

10:11 PM Changeset in webkit [218046] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit2

Crash inside WebKit::PluginView::getAuthenticationInfo
https://bugs.webkit.org/show_bug.cgi?id=173083
<rdar://problem/32513144>

Address Darin's review comment.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::getAuthenticationInfo):

10:11 PM Changeset in webkit [218045] by yoav@yoav.ws
  • 2 edits in trunk/Source/WebCore

[preload] Fix builds with ENABLE_VIDEO_TRACK set to false
https://bugs.webkit.org/show_bug.cgi?id=173221

Reviewed by Chris Dumez.

https://bugs.webkit.org/show_bug.cgi?id=173047 introduced a build error for builds with video track support disabled.
This fixes that build issue.

No new tests since there's no functional change.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::as):

10:08 PM Changeset in webkit [218044] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

IsInShadowTreeFlag does not get updated for a non-container node
https://bugs.webkit.org/show_bug.cgi?id=173084

Address Darin's review comment.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyNodeInsertedIntoDocument):
(WebCore::notifyNodeInsertedIntoTree):
(WebCore::notifyNodeRemovedFromDocument):

9:38 PM Changeset in webkit [218043] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Fixed building with the macOS 10.13 Apple Internal SDK when targeting macOS 10.12.

  • platform/spi/mac/AVFoundationSPI.h:
9:35 PM Changeset in webkit [218042] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r217258): Misspelled variable names
https://bugs.webkit.org/show_bug.cgi?id=173189

Reviewed by Joseph Pecoraro.

  • UserInterface/Base/Main.js:

(WebInspector.tabContentViewClassForRepresentedObject):

  • UserInterface/Views/ResourceIcons.css:

(.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon):
(.large .resource-icon.resource-type-stylesheet .icon): Deleted.

9:32 PM Changeset in webkit [218041] by beidson@apple.com
  • 5 edits
    3 adds in trunk

Crash when IndexedDB's getAll is used inside a Web Worker.
https://bugs.webkit.org/show_bug.cgi?id=172434

Reviewed by Andy Estes.

Source/WebCore:

Test: storage/indexeddb/modern/worker-getall.html

  • Modules/indexeddb/IDBGetAllResult.cpp:

(WebCore::IDBGetAllResult::IDBGetAllResult): Add an isolated-copying constructor.
(WebCore::IDBGetAllResult::isolatedCopy):

  • Modules/indexeddb/IDBGetAllResult.h:
  • Modules/indexeddb/shared/IDBResultData.cpp:

(WebCore::IDBResultData::isolatedCopy): Actually copy the IDBGetAllResult.

LayoutTests:

  • storage/indexeddb/modern/resources/worker-getall.js: Added.
  • storage/indexeddb/modern/worker-getall-expected.txt: Added.
  • storage/indexeddb/modern/worker-getall.html: Added.
9:30 PM Changeset in webkit [218040] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed attempt to fix Mac build after r218039.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::loadDataURL):

  • platform/network/DataURLDecoder.h:
9:07 PM Changeset in webkit [218039] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Use WTF::Function instead of std::function in DataURLDecoder
https://bugs.webkit.org/show_bug.cgi?id=173194

Reviewed by Sam Weinig.

Use WTF::Function instead of std::function in DataURLDecoder to avoid copying.

  • platform/network/DataURLDecoder.cpp:

(WebCore::DataURLDecoder::DecodeTask::DecodeTask):
(WebCore::DataURLDecoder::createDecodeTask):

  • platform/network/DataURLDecoder.h:
7:51 PM Changeset in webkit [218038] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Image should clear its ImageObserver* when CachedImage releases the last reference to its RefCounted<ImageObserver>
https://bugs.webkit.org/show_bug.cgi?id=173077

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

Before dereferencing ImageObserver, CachedImage::clearImage() should check
whether it is the only object that holds a reference to this ImageObserver.
And if this is true, m_image have to clear its raw pointer to the deleted
ImageObserver by calling m_image->setImageObserver(nullptr).

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::setBodyDataFrom):
(WebCore::CachedImage::CachedImageObserver::CachedImageObserver):
(WebCore::CachedImage::clearImage):

  • loader/cache/CachedImage.h:
7:11 PM Changeset in webkit [218037] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Attempt to fix layout test failures following <https://trac.webkit.org/changeset/218028/webkit>
(https://bugs.webkit.org/show_bug.cgi?id=158121)
<rdar://problem/26012994>

For now, if we do not have a frame then consider the document a secure context. One way this can happen
is the page accesses a frame that was removed from the document as demonstrated by the test:
fast/dom/Window/property-access-on-cached-window-after-frame-removed.html. Treating a frameless
document as a secure context also matches Blink's implementation:
<https://chromium.googlesource.com/chromium/src/+/fc202b2b1174f5732f7b9e63a6c46fd01ac2be02/third_party/WebKit/Source/core/dom/Document.cpp#4079>.

  • dom/Document.cpp:

(WebCore::Document::isSecureContext):

6:14 PM Changeset in webkit [218036] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.25.1

Tag Safari-604.1.25.1.

6:14 PM Changeset in webkit [218035] by matthew_hanson@apple.com
  • 1 delete in tags/Safari-604.1.25.1

Remove tag.

6:12 PM Changeset in webkit [218034] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.25.1/safari-604.1.25-branch

Tag Safari-604.1.25.1.

6:07 PM Changeset in webkit [218033] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.25.1

Tag Safari-604.1.25.1.

5:56 PM Changeset in webkit [218032] by matthew_hanson@apple.com
  • 36 edits
    13 deletes in tags/Safari-604.1.25

Cherry-pick r218009. rdar://problem/32677465

5:37 PM Changeset in webkit [218031] by Ryan Haddad
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r218003.

This change caused assertion failures in existing LayoutTests.

Reverted changeset:

"Image should clear its ImageObserver* when CachedImage
releases the last reference to its RefCounted<ImageObserver>"
https://bugs.webkit.org/show_bug.cgi?id=173077
http://trac.webkit.org/changeset/218003

5:08 PM Changeset in webkit [218030] by jiewen_tan@apple.com
  • 6 edits in trunk/Source/WebCore

[WebCrypto] Remove unsupported CryptoAlgorithmIdentifier
https://bugs.webkit.org/show_bug.cgi?id=173128
<rdar://problem/32666826>

Reviewed by Brent Fulgham.

This patch remove AES_CMAC, DH and CONCAT as they are not implemented and not recommended
by the spec. Hence there is no plan to support them in short term.

No change of behaviour.

  • bindings/js/JSCryptoAlgorithmDictionary.cpp:

(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::supportExportKeyThrow):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::read):

  • crypto/CryptoAlgorithmIdentifier.h:
  • crypto/keys/CryptoKeyAES.cpp:

(WebCore::CryptoKeyAES::isValidAESAlgorithm):

5:00 PM Changeset in webkit [218029] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/mediastream/getUserMedia-grant-persistency3.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173188

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:56 PM Changeset in webkit [218028] by dbates@webkit.org
  • 12 edits in trunk/Source/WebCore

Implement W3C Secure Contexts Draft Specification
https://bugs.webkit.org/show_bug.cgi?id=158121
<rdar://problem/26012994>

Reviewed by Alex Christensen.

Part 2

Implements the Secure Contexts spec., <https://w3c.github.io/webappsec-secure-contexts/> (Editor's
Draft, 17 November 2016) except for the allow-secure-context sandbox flag and restrictions on window.opener
as the former is at risk of being dropped from the specification and the latter is being discussed in
<https://github.com/w3c/webappsec-secure-contexts/issues/42>. We are not making use of the Secure
Contexts functionality at the moment. We will make use of it in a subsequent commit.

  • dom/Document.cpp:

(WebCore::Document::isSecureContext): Added,

  • dom/Document.h:
  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::isSecureContext): Deleted; moved to class SecurityContext.

  • dom/SecurityContext.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::isSecureContext): Added.

  • page/DOMWindow.h:
  • page/SecurityOrigin.cpp:

(WebCore::isLoopbackIPAddress): Convenience function to determine whether the host portion
of the specified URL is a valid loopback address.
(WebCore::shouldTreatAsPotentionallyTrustworthy): Implements the "Is origin potentially trustworthy?"
algorithm from the Secure Context specification.
(WebCore::SecurityOrigin::SecurityOrigin): Compute whether this origin is potentially trustworthy.
Also, use C++ brace initialization syntax in member initialization list.

  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::isPotentionallyTrustworthy): Added.

  • page/WindowOrWorkerGlobalScope.idl: Expose attribute isSecureContext. Fix style nit; remove

period from a comment that is not meant to be a complete sentence.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::isSecureContext): Added.

  • workers/WorkerGlobalScope.h:
4:38 PM Changeset in webkit [218027] by dbates@webkit.org
  • 13 edits in trunk/Source/WebCore

Implement W3C Secure Contexts Draft Specification
https://bugs.webkit.org/show_bug.cgi?id=158121
<rdar://problem/26012994>

Reviewed by Chris Dumez.

Part 1

Teach the bindings code generator to generate a runtime check for an interface, attribute or
function annotated with the extended attribute [SecureContext]. For now, the runtime check
(ScriptExecutionContext::isSecureContext()) always returns true. We will flesh out the
implementation of this runtime check in a subsequent commit.

  • bindings/scripts/CodeGeneratorJS.pm:

(NeedsRuntimeCheck):
(GenerateRuntimeEnableConditionalString):
Generate a runtime check for an interface, attribute, or function that is annotated with
the extended attribute [SecureContext].

  • bindings/scripts/IDLAttributes.json: Update JSON now that we support SecureContext.
  • bindings/scripts/preprocess-idls.pl:

(GenerateConstructorAttributes): Add the SecureContext extended attribute to a constructor,
if applicable.

  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:

(WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
(WebCore::IDLAttribute<JSTestGenerateIsReachable>::cast):
(WebCore::jsTestGenerateIsReachableASecretAttributeGetter):
(WebCore::jsTestGenerateIsReachableASecretAttribute):

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResultBody):
(WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResult):
(WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBooleanBody):
(WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBoolean):
(WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBoolean):

  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::JSTestNodePrototype::finishCreation):
(WebCore::jsTestNodePrototypeFunctionCalculateSecretResultBody):
(WebCore::jsTestNodePrototypeFunctionCalculateSecretResult):
(WebCore::jsTestNodePrototypeFunctionGetSecretBooleanBody):
(WebCore::jsTestNodePrototypeFunctionGetSecretBoolean):
(WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBoolean):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::JSTestObjPrototype::finishCreation):
(WebCore::jsTestObjPrototypeFunctionCalculateSecretResultBody):
(WebCore::jsTestObjPrototypeFunctionCalculateSecretResult):
(WebCore::jsTestObjPrototypeFunctionGetSecretBooleanBody):
(WebCore::jsTestObjPrototypeFunctionGetSecretBoolean):
(WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBoolean):
Update expected results.

  • bindings/scripts/test/TestGenerateIsReachable.idl:
  • bindings/scripts/test/TestGlobalObject.idl:
  • bindings/scripts/test/TestNode.idl:
  • bindings/scripts/test/TestObj.idl:

Add test cases.

  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::isSecureContext): Added. For now, always returns true.
We will implement this function in a subsequent commit.

4:13 PM Changeset in webkit [218026] by dbates@webkit.org
  • 2 edits in trunk/LayoutTests

CSP: Apply img-src directive to favicon loads
https://bugs.webkit.org/show_bug.cgi?id=172733

Remove CONSOLE MESSAGE line from expected result that I inadvertently left in from an earlier iteration
of the test that did not call testRunner.queueReload(). Calling testRunner.queueReload() clears out
any emitted console messages. The dump of the resource load callbacks is sufficient to ensure that
the favicon was blocked as expected.

  • http/tests/security/contentSecurityPolicy/block-favicon-expected.txt:
3:45 PM Changeset in webkit [218025] by Darin Adler
  • 4 edits in trunk/LayoutTests

REGRESSION: LayoutTest js/intl-datetimeformat.html is failing
https://bugs.webkit.org/show_bug.cgi?id=172720

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-06-09
Reviewed by Darin Adler.

Reenable DateTimeFormat tests, allowing for some variation in the
formatting of time zone names.

  • js/intl-datetimeformat-expected.txt:
  • js/script-tests/intl-datetimeformat.js:
  • platform/mac/TestExpectations:
3:38 PM Changeset in webkit [218024] by Chris Dumez
  • 9 edits in trunk/Source/WebKit2

Use WTF::Function instead of std::function in NetworkProcess code
https://bugs.webkit.org/show_bug.cgi?id=173182

Reviewed by Alex Christensen.

Use WTF::Function instead of std::function in NetworkProcess code to avoid
unnecessary copying.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/cache/NetworkCacheIOChannel.h:
  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:

(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:

(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSyncInThread):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/NetworkCacheStatistics.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::clearNSURLCache):
(WebKit::NetworkProcess::clearDiskCache):

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::clearDiskCache):

3:35 PM Changeset in webkit [218023] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit2

REGRESSION (r213584): WeChat app can not switch to next text field
https://bugs.webkit.org/show_bug.cgi?id=173183
<rdar://problem/32323478>

Reviewed by Wenson Hsieh.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/InputViewUpdateDeferrer.mm:

(WebKit::InputViewUpdateDeferrer::~InputViewUpdateDeferrer):
It turns out that _endIgnoringReloadInputViews doesn't actually perform
the update if there was one ignored. It does, however, return whether
there was a change ignored, and we can force an update.

This remains untestable without sizable additional API test infrastructure
for the same reasons as the original patch.

3:16 PM Changeset in webkit [218022] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Make sure we protect |this| in lambdas in WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver()
https://bugs.webkit.org/show_bug.cgi?id=173174
<rdar://problem/32598919>

Reviewed by Darin Adler.

Follow-up fix to r218006, which caused a crash on the bots. We cannot WTFMove() protectedThis
here because the callback gets called several times.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

3:09 PM Changeset in webkit [218021] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

Crash in -[WKWebView _initializeWithConfiguration:]
https://bugs.webkit.org/show_bug.cgi?id=173126
<rdar://problem/32664993>

Reviewed by Darin Adler.

Follow up to previous fix; when setting NSString properties, store a copy of
the string rather than the NSString itself.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _overrideContentSecurityPolicy]):
(-[WKWebViewConfiguration _setOverrideContentSecurityPolicy:]):
(-[WKWebViewConfiguration _setMediaContentTypesRequiringHardwareSupport:]):

2:59 PM Changeset in webkit [218020] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Web Inspector: Web inspector does not show non-shadow children of an element with a shadow root (e.g. <video>)
https://bugs.webkit.org/show_bug.cgi?id=173121
<rdar://problem/30948943>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-06-09
Reviewed by Matt Baker.

Source/WebInspectorUI:

  • UserInterface/Models/DOMNode.js:

(WebInspector.DOMNode):
Only populate _children when we have both the shadowRoots and
actual children payloads. Backends always send shadowRoots but
only send children when requested. So if we have shadowRoots
but expect actual children, don't populate _children until we
request the child nodes.

LayoutTests:

  • inspector/dom/shadow-and-non-shadow-children-expected.txt: Added.
  • inspector/dom/shadow-and-non-shadow-children.html: Added.
2:53 PM Changeset in webkit [218019] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

LayoutTest fast/images/animated-image-different-dest-size.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170203

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

Instead of using setTimeout(), listen to the webkitImageFrameReady event
to know relaibly when to draw the next frame of an animated image to a
canvas.

  • fast/images/animated-image-different-dest-size.html:
  • platform/mac-wk2/TestExpectations:
2:25 PM Changeset in webkit [218018] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Skipped layout test svg/animations/svglength-element-removed-crash.svg.
https://bugs.webkit.org/show_bug.cgi?id=173178

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
2:09 PM Changeset in webkit [218017] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

Use WTF::Function instead of std::function in StorageManager
https://bugs.webkit.org/show_bug.cgi?id=173177

Reviewed by Brady Eidson.

Use WTF::Function instead of std::function in StorageManager. This eliminates some
potential implicit copying of captured variables, which is important here because
we pass those lambdas to other threads.

  • UIProcess/Storage/StorageManager.cpp:

(WebKit::StorageManager::getSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):

  • UIProcess/Storage/StorageManager.h:
1:55 PM Changeset in webkit [218016] by jer.noble@apple.com
  • 8 edits in trunk/Source/WebCore

Media elements are allowed to continue to load media data after navigation
https://bugs.webkit.org/show_bug.cgi?id=173179

Reviewed by Eric Carlson.

Deny media sessions the ability to load media data when suspended.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::isSuspended):

  • Modules/webaudio/AudioContext.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::isSuspended):

  • html/HTMLMediaElement.h:
  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::isSuspended):

  • platform/audio/PlatformMediaSession.h:

(WebCore::PlatformMediaSessionClient::isSuspended):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):

1:45 PM Changeset in webkit [218015] by dbates@webkit.org
  • 16 edits
    4 adds in trunk

CSP: Apply img-src directive to favicon loads
https://bugs.webkit.org/show_bug.cgi?id=172733
<rdar://problem/32082654>

Reviewed by Brady Eidson.

Source/WebCore:

Differentiate favicon requests from raw resources requests so that we can apply the Content
Security Policy to favicon requests.

Tests: http/tests/security/contentSecurityPolicy/allow-favicon.html

http/tests/security/contentSecurityPolicy/block-favicon.html

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResourceContent): Keep our current behavior and treat a
favicon resource analogous to a raw resource.
(WebCore::InspectorPageAgent::cachedResourceType): Ditto.

  • loader/LinkLoader.cpp:

(WebCore::createLinkPreloadResourceClient): Now that we differentiate between a favicon
and a raw resource we add favicons to the list of unsupported <link as="..."> types. This
makes the list of handled request destination types more closely match the list of valid types
documented in <https://fetch.spec.whatwg.org/#concept-request-destination> (24 May 2017).

  • loader/ResourceLoadInfo.cpp:

(WebCore::toResourceType): Keep our current behavior and treat a favicon resource analogous
to a raw resource.

  • loader/SubresourceLoader.cpp:

(WebCore::logResourceLoaded): Ditto.

  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::CachedRawResource): Update for renaming.

  • loader/cache/CachedRawResource.h:

(isType): Ditto.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::defaultPriorityForResourceType): Keep our current behavior and treat
a favicon resource analogous to a raw resource.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isMainOrMediaOrFaviconOrRawResource): Renamed; formerly named isMainOrMediaOrRawResource.
Also return true if the this resource is a favicon.
(WebCore::CachedResource::ignoreForRequestCount): Keep our current behavior and treat a
favicon resource analogous to a raw resource.
(WebCore::CachedResource::isMainOrMediaOrRawResource): Deleted; renamed to isMainOrMediaOrFaviconOrRawResource.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource): Keep our current behavior and treat a favicon resource analogous
to a raw resource.
(WebCore::CachedResourceLoader::requestFavicon): Added.
(WebCore::contentTypeFromResourceType): Keep our current behavior and treat a favicon
resource analogous to a raw resource.
(WebCore::CachedResourceLoader::checkInsecureContent): Ditto.
(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy): Check if the favicon is
allowed by the CSP of the page.
(WebCore::CachedResourceLoader::determineRevalidationPolicy): Update for renaming.

  • loader/cache/CachedResourceLoader.h:
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::startLoading): Substitute call CachedResourceLoader::requestFavicon() for CachedResourceLoader::requestRawResource()
and remove comment about ContentSecurityPolicyImposition::DoPolicyCheck being a placeholder. This is no longer the
case. This resource request option is now meaningful as we want to apply the CSP of the page with respect to the
request for the favicon.

Source/WebKit2:

Return 0 seconds for the maximum buffering time for favicons (no change in behavior).

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::maximumBufferingTime):

LayoutTests:

Adds tests to ensure the CSP policy is applied to favicon loads.

  • http/tests/security/contentSecurityPolicy/allow-favicon-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/allow-favicon.html: Added.
  • http/tests/security/contentSecurityPolicy/block-favicon-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/block-favicon.html: Added.
  • platform/wk2/TestExpectations: Skip the tests until we fix <https://bugs.webkit.org/show_bug.cgi?id=115809>.
1:10 PM Changeset in webkit [218014] by Wenson Hsieh
  • 25 edits in trunk

[iOS DnD] Add a hook to perform two-step drops in editable content
https://bugs.webkit.org/show_bug.cgi?id=172992
<rdar://problem/32590174>

Reviewed by Tim Horton.

Source/WebCore:

Adds hooks in DragController::concludeEditDrag to give the client layer a chance to perform custom handling when
dropping in editable content.
Tests: DataInteractionTests.InjectedBundleOverridePerformTwoStepDrop

DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop

  • loader/EmptyClients.cpp:
  • page/DragController.cpp:

(WebCore::DragController::concludeEditDrag):

  • page/EditorClient.h:

Source/WebKit/ios:

Add an empty implementation of performTwoStepDrop for WebDefaultUIKitDelegate. See WebCore ChangeLogs.

  • DefaultDelegates/WebDefaultUIKitDelegate.m:

(-[WebDefaultUIKitDelegate performTwoStepDrop:atDestination:isMove:]):

  • WebView/WebUIKitDelegate.h:

Source/WebKit/mac:

Adds a new SPI to WebUIKitDelegate to allow WK1 clients to override default drop behavior. Returning YES from
-performTwoStepDrop:atDestination:isMove: will prevent content from being inserted on drop in WebKit; otherwise,
returning NO will continue with default WebKit behavior.

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::performTwoStepDrop):

Source/WebKit/win:

Add a stub implementation for performTwoStepDrop on Windows.

  • WebCoreSupport/WebEditorClient.h:

Source/WebKit2:

Add plumbing to support an injected bundle hook for overriding two-step drops. See WebCore ChangeLog.

  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:

(API::InjectedBundle::EditorClient::performTwoStepDrop):

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
  • WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):

  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:

(WebKit::InjectedBundlePageEditorClient::performTwoStepDrop):

  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::performTwoStepDrop):

  • WebProcess/WebCoreSupport/WebEditorClient.h:

Tools:

Adds 2 new API tests to cover using the injected editing bundle to override performTwoStepDrop.
Tests: DataInteractionTests.InjectedBundleOverridePerformTwoStepDrop

DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegatePlugIn.mm:

(-[BundleEditingDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:performTwoStepDrop:atDestination:isMove:]):

Allow the BundleOverridePerformTwoStepDrop bundle parameter to determine whether or not two-step drops should
be overridden. Currently, this is overridden to just return true.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::InjectedBundlePage):

12:47 PM Changeset in webkit [218013] by Ryan Haddad
  • 1 edit
    1 add in trunk/LayoutTests

Add a result file for js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5-short.html.
https://bugs.webkit.org/show_bug.cgi?id=161156

Unreviewed test gardening.

  • js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5-short-expected.txt: Added.
12:41 PM Changeset in webkit [218012] by Chris Dumez
  • 5 edits in trunk/Source

Update Thread::create() to take in a WTF::Function instead of a std::function
https://bugs.webkit.org/show_bug.cgi?id=173175

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • API/tests/CompareAndSwapTest.cpp:

(testCompareAndSwap):

Source/WTF:

Update Thread::create() to take in a WTF::Function instead of a std::function. Unlike
std::function, WTF:Function is not copyable and does not make implicit copies of captured
variables. Doing captures such as [string = string.isolatedCopy()] when passing an
std::function to another thread has lead to bugs in the past due to implicit copying of
the captured string.

  • wtf/Threading.cpp:

(WTF::Thread::create):

  • wtf/Threading.h:
12:40 PM Changeset in webkit [218011] by Brent Fulgham
  • 7 edits in trunk/Source/WebKit2

Use Function rather than std::function for thread safety in WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=173172

Reviewed by Chris Dumez.
<rdar://problem/32679311>

Remove a few more instances of std::function in the WebsiteDataStore, and WTFMove completion handler to
avoid unnecessary copies.

  • Shared/WebsiteData/WebsiteDataType.h: Remove redundant WebsiteDataType from name.
  • UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:

(WebKit::toWebsiteDataType): Update for revised name.
(WebKit::toWKWebsiteDataTypes): Ditto.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): ASSERT that
this function, as well as its completion handler, are getting called from the main thread.
(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData): Ditto.
(WebKit::WebProcessProxy::fetchWebsiteData): Move the completionHandler.
(WebKit::WebProcessProxy::deleteWebsiteData): Ditto.
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins): Ditto.

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

(WebKit::WebsiteDataStore::fetchData): Switch to Function, and move completion handler.
(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains): Ditto.
(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData): Ditto.
(WebKit::WebsiteDataStore::removeData): Ditto.
(WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains): Ditto.

  • UIProcess/WebsiteData/WebsiteDataStore.h:
12:00 PM Changeset in webkit [218010] by matthew_hanson@apple.com
  • 36 edits
    13 deletes in branches/safari-604.1.25-branch

Cherry-pick r218009. rdar://problem/32677465

11:56 AM Changeset in webkit [218009] by matthew_hanson@apple.com
  • 36 edits
    13 deletes in trunk

Revert r217955. rdar://problem/21125708

11:56 AM Changeset in webkit [218008] by matthew_hanson@apple.com
  • 7 edits in trunk/Source

Versioning.

11:55 AM Changeset in webkit [218007] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[DFG] Add verboseDFGOSRExit
https://bugs.webkit.org/show_bug.cgi?id=173156

Reviewed by Saam Barati.

This patch adds verboseDFGOSRExit which is similar to verboseFTLOSRExit.

  • dfg/DFGOSRExitCompiler.cpp:
  • runtime/Options.h:
11:52 AM Changeset in webkit [218006] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Make sure we protect |this| in lambdas in WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver()
https://bugs.webkit.org/show_bug.cgi?id=173174
<rdar://problem/32598919>

Reviewed by Darin Adler.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

11:46 AM Changeset in webkit [218005] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC][MIPS] Add MacroAssemblerMIPS::xor32(Address, RegisterID) implementation
https://bugs.webkit.org/show_bug.cgi?id=173170

Patch by Guillaume Emont <guijemont@igalia.com> on 2017-06-09
Reviewed by Yusuke Suzuki.

MIPS does not build since r217711 because it is missing this
implementation. This patch fixes the build.

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::xor32):

11:42 AM Changeset in webkit [218004] by Konstantin Tokarev
  • 3 edits in trunk/Source/WebCore

[MediaFoundation] Volume controls of different media elements should be independent
https://bugs.webkit.org/show_bug.cgi?id=172967

Based on patch by Vitaly Slobodin <vitaliy.slobodin@gmail.com>
Reviewed by Alex Christensen.

IMFSimpleAudioVolume interface controls master volume of the
application. We should use IMFAudioStreamVolume interface instead.

No new tests needed.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
(WebCore::MediaPlayerPrivateMediaFoundation::setAllChannelVolumes):
(WebCore::MediaPlayerPrivateMediaFoundation::setVolume):
(WebCore::MediaPlayerPrivateMediaFoundation::setMuted):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
11:38 AM Changeset in webkit [218003] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Image should clear its ImageObserver* when CachedImage releases the last reference to its RefCounted<ImageObserver>
https://bugs.webkit.org/show_bug.cgi?id=173077

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

Before dereferencing ImageObserver, CachedImage::clearImage() should check
whether it is the only object that holds a reference to this ImageObserver.
And if this is true, m_image have to clear its raw pointer to the deleted
ImageObserver by calling m_image->setImageObserver(nullptr).

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::setBodyDataFrom):
(WebCore::CachedImage::CachedImageObserver::CachedImageObserver):
(WebCore::CachedImage::clearImage):

  • loader/cache/CachedImage.h:
11:32 AM Changeset in webkit [218002] by Chris Dumez
  • 4 edits in trunk/Source/WebKit2

Avoid some ref counting churn in WebResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=173168

Reviewed by Brent Fulgham.

Move the protectedThis around instead of ref'ing it every time we capture it
in a lambda. Also add a missing protectedThis in WebResourceLoadStatisticsStore::removeDataRecords()
which likely fixes crashes.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):

11:28 AM Changeset in webkit [218001] by Jonathan Bedard
  • 2 edits in trunk/LayoutTests

[ios-sim] Cleaning-up timeouts WebKit1
https://bugs.webkit.org/show_bug.cgi?id=173169

Unreviewed test gardening.

The intention of this change is to allow the iOS WK1 bots to finish their
test runs. Because these tests are being gardened based on the output of
bots, there will likely be follow-up fixes.

  • platform/ios-wk1/TestExpectations: Skip tests timing out in iOS WK1.
10:59 AM Changeset in webkit [218000] by commit-queue@webkit.org
  • 8 edits in trunk

Add flag allow-popups-to-escape-sandbox to iframe sandbox
https://bugs.webkit.org/show_bug.cgi?id=158875

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-09
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update expected results for iframe popup escaping tests.

  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1-expected.txt: This test passes.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2-expected.txt: This test passes.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3-expected.txt: Remove error message from text expectation.

Source/WebCore:

This patch adds support for the iframe@allow-popups-to-escape-sandbox attribute.
This allows to pass more W3C Web Platform tests.

Tests: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html

imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html

  • dom/SecurityContext.cpp: Add allow-popups-to-escape-sandbox flag.

(WebCore::SecurityContext::isSupportedSandboxPolicy):
(WebCore::SecurityContext::parseSandboxPolicy):

  • dom/SecurityContext.h: Ditto.
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Do not force sandbox flags when we have allow-popups-to-escape-sandbox.
(WebCore::createWindow): Ditto.

10:57 AM Changeset in webkit [217999] by jer.noble@apple.com
  • 14 edits
    2 adds in trunk

[iOS] Video occasionally mixes with other system audio instead of interrupting
https://bugs.webkit.org/show_bug.cgi?id=173127

Reviewed by Eric Carlson.

Source/WebCore:

Tests: platform/mac/audio-session-category-video-track-change.html

When an HTMLMediaElement's tracks change their enabled state, make sure to update
the PlatformMediaElement, for canProduceAudio() may have changed.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):

  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp:

(PlatformMediaSessionManager::updateSessionState):

The rest of the changes in this revision are to allow the above to be testable.

  • page/Settings.cpp:
  • page/Settings.h:
  • platform/audio/AudioSession.h:
  • platform/audio/mac/AudioSessionMac.cpp:

(WebCore::AudioSession::category):
(WebCore::AudioSession::setCategory):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShouldManageAudioSessionCategory):

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

(WebCore::Internals::audioSessionCategory):

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

LayoutTests:

  • platform/mac/media/audio-session-category-video-track-change-expected.txt: Added.
  • platform/mac/media/audio-session-category-video-track-change.html: Added.
10:54 AM Changeset in webkit [217998] by Chris Dumez
  • 4 edits in trunk/Source/WTF

Update WorkQueue::concurrentApply() to take a WTF::Function instead of an std::function
https://bugs.webkit.org/show_bug.cgi?id=173165

Reviewed by Saam Barati.

Update WorkQueue::concurrentApply() to take a WTF::Function instead of an std::function
as std::function has issues with regards to thread safety.

  • wtf/WorkQueue.h:
  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::WorkQueue::concurrentApply):

10:52 AM Changeset in webkit [217997] by Chris Dumez
  • 8 edits
    2 adds in trunk

CSS transitions added while page is not visible do not start when the page becomes visible
https://bugs.webkit.org/show_bug.cgi?id=173166
<rdar://problem/32250351>

Reviewed by Darin Adler.

Source/WebCore:

CSS transitions added while page is not visible would not start when the page becomes
visible. The issue was that when CompositeAnimation::updateTransitions() was called
while the page is hidden (and animations are therefore suspended), it would not
populate m_transations with ImplicitAnimation objects. We would therefore have later
no transitions to resume when the page becomes visible later on. This patch updates
CompositeAnimation::updateTransitions() to properly populate m_transitions and instead
pause the ImplicitAnimation it creates if animations are currently suspended. This
behavior is more consistent with the one of CompositeAnimation::updateKeyframeAnimations().

I also needed to update ImplicitAnimation::animate() to not restart a paused animation
if the animation is currently paused. This is similar to what is done in
KeyframeAnimation::animate(). Without this, the paused ImplicitAnimation we add to
m_transition would incorrectly get unpaused while the page is still hidden and the
animations are still supposed to be suspended. This issue was showing when running the
test I am adding in this patch.

Test: fast/animation/css-animation-resuming-when-visible.html

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::updateTransitions):

  • page/animation/ImplicitAnimation.cpp:

(WebCore::ImplicitAnimation::animate):
(WebCore::ImplicitAnimation::reset):

  • page/animation/ImplicitAnimation.h:

LayoutTests:

Add layout test coverage.

  • fast/animation/css-animation-resuming-when-visible-expected.txt: Added.
  • fast/animation/css-animation-resuming-when-visible.html: Added.
10:48 AM Changeset in webkit [217996] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

Add SubresourceIntegrity as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=173164

Patch by Sam Weinig <sam@webkit.org> on 2017-06-09
Reviewed by Darin Adler.

  • Shared/WebPreferencesDefinitions.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):
Add SubresourceIntegrity to the list of experimental features. Also, sort the experimental features
as requested by the comment above it.

10:44 AM Changeset in webkit [217995] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] FTL does not require dlfcn
https://bugs.webkit.org/show_bug.cgi?id=173143

Reviewed by Darin Adler.

We no longer use LLVM library. Thus, dlfcn.h is not necessary.
Also, ProcessID is not used in FTLLowerDFGToB3.cpp.

  • ftl/FTLLowerDFGToB3.cpp:
10:01 AM Changeset in webkit [217994] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, Use FALLTHROUGH

  • loader/LinkLoader.cpp:

(WebCore::createLinkPreloadResourceClient):

9:55 AM Changeset in webkit [217993] by Yusuke Suzuki
  • 4 edits in trunk/Source/JavaScriptCore

[DFG] Add --verboseDFGFailure
https://bugs.webkit.org/show_bug.cgi?id=173155

Reviewed by Sam Weinig.

Similar to verboseFTLFailure, JSC should have verboseDFGFailure flag to show DFG failures quickly.

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::verboseCapabilities):
(JSC::DFG::debugFail):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
9:48 AM Changeset in webkit [217992] by matthew_hanson@apple.com
  • 14 edits in branches/safari-604.1.25-branch

<rdar://problem/32621736> Seed 2: Disable WebKit features we don't want to ship after branching

9:38 AM Changeset in webkit [217991] by Chris Dumez
  • 4 edits in trunk/Source/WebKit2

Make sure |this| is protected in lambda capture in WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
https://bugs.webkit.org/show_bug.cgi?id=173163

Reviewed by Brent Fulgham.

Make sure |this| is protected in lambda capture in WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
or it may end up getting destroyed before the lambda executing and crash when calling m_statisticsQueue->dispatch().

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):

9:35 AM Changeset in webkit [217990] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604.1.25-branch/Source

Versioning.

9:19 AM Changeset in webkit [217989] by matthew_hanson@apple.com
  • 1 copy in branches/safari-604.1.25-branch

New branch.

9:19 AM Changeset in webkit [217988] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[Win64] Build error when compiling PaintHooks.asm.
https://bugs.webkit.org/show_bug.cgi?id=173132

Reviewed by Brent Fulgham.

There seems to be too many include paths on the command line for ml64. According to the documentation,
a maximum of 10 /I options is allowed. Create a separate static library for asm files, in order to
avoid all the include paths.

  • PlatformWin.cmake:
9:18 AM Changeset in webkit [217987] by matthew_hanson@apple.com
  • 1 delete in branches/safari-604.1.25-bran

Remove incorrectly named branch.

9:18 AM Changeset in webkit [217986] by matthew_hanson@apple.com
  • 1 copy in branches/safari-604.1.25-bran

New branch.

9:14 AM Changeset in webkit [217985] by eric.carlson@apple.com
  • 10 edits
    2 adds in trunk

fast/mediastream/MediaStream-page-muted.html times out and asserts
https://bugs.webkit.org/show_bug.cgi?id=170355
<rdar://problem/31376041>

Source/WebCore:

MediaStream and MediaStreamTrack need to prevent JS wrapper collection while it is possible
to fire an event or event listeners won't be notified.

Reviewed by Chris Dumez.

Test: fast/mediastream/media-stream-wrapper-collected.html

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::MediaStream): Initialize ActiveDOMObject.
(WebCore::MediaStream::stop): New.
(WebCore::MediaStream::activeDOMObjectName): Ditto.
(WebCore::MediaStream::canSuspendForDocumentSuspension): Ditto.
(WebCore::MediaStream::hasPendingActivity): Ditto, prevent collection if there
are registered event listeners.
(WebCore::MediaStream::contextDestroyed): Deleted.

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/MediaStream.idl:
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::hasPendingActivity): Prevent collection if there
are registered event listeners.

  • Modules/mediastream/MediaStreamTrack.h:
  • testing/Internals.cpp:

(WebCore::Internals::removeMediaStreamTrack): stream.removeTrack doesn't generate a 'removetrack'
event, so call private method that does.

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

LayoutTests:

Reviewed by Chris Dumez.

  • fast/mediastream/media-stream-wrapper-collected-expected.txt: Added.
  • fast/mediastream/media-stream-wrapper-collected.html: Added.
9:13 AM Changeset in webkit [217984] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[CoordinatedGraphics] Remove unneeded interfaces in PageClient
https://bugs.webkit.org/show_bug.cgi?id=173149

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-09
Reviewed by Michael Catanzaro.

  • UIProcess/PageClient.h:
9:11 AM Changeset in webkit [217983] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Fix test linter reported errors
https://bugs.webkit.org/show_bug.cgi?id=173160

Unreviewed gardening.

webrtc/audio-peer-connection-webaudio.html failed ambiguity checks, it typically fails

in release and times out in debug, but it could have bother outcomes in both build
configurations, so removing the first instance seems like the right approach.
See: https://bugs.webkit.org/show_bug.cgi?id=169110

https://bugs.webkit.org/show_bug.cgi?id=131218 no longer crashing
https://bugs.webkit.org/show_bug.cgi?id=131216 no longer crashing
https://bugs.webkit.org/show_bug.cgi?id=119255 no longer flaky, stablized at r195130.

Linter is now quiet, aside from non-existent path errors,
which I think is tracked by https://bugs.webkit.org/show_bug.cgi?id=172471

Patch by Charlie Turner <cturner@igalia.com> on 2017-06-09

  • platform/gtk/TestExpectations:
8:55 AM Changeset in webkit [217982] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.25

Tag Safari-604.1.25.

8:00 AM Changeset in webkit [217981] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Drop OS(DARWIN) for VM_TAG_FOR_WEBASSEMBLY_MEMORY
https://bugs.webkit.org/show_bug.cgi?id=173147

Reviewed by JF Bastien.

Because this value becomes -1 in non-Darwin environments.
Thus, we do not need to use OS(DARWIN) here.

  • wasm/WasmMemory.cpp:
5:53 AM Changeset in webkit [217980] by Claudio Saavedra
  • 1 edit
    1 add in trunk/LayoutTests

[GTK] Add baseline for media/media-fullscreen-inline-expected.html

Unreviewed gardening.

mediaElement.webkitSupportsPresentationMode is only present with
VIDEO_PRESENTATION_MODE enabled, and this option is only enabled
for Cocoa builds. Add a baseline without this property.

  • platform/gtk/media/media-fullscreen-inline-expected.txt: Added.
5:18 AM Changeset in webkit [217979] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Use WTF::Function instead of std::function in SpeculativeLoadManager::ExpiringEntry
https://bugs.webkit.org/show_bug.cgi?id=173125

Reviewed by Antti Koivisto.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::ExpiringEntry::ExpiringEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):

4:44 AM Changeset in webkit [217978] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Unskip passing userscripts tests

Unreviewed gardening.

  • platform/wpe/TestExpectations:
4:00 AM Changeset in webkit [217977] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[cURL] Remove a call to Windows API
https://bugs.webkit.org/show_bug.cgi?id=172079

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-09
Reviewed by Yusuke Suzuki.

  • platform/network/curl/CurlDownload.cpp:

(WebCore::CurlDownload::moveFileToDestination):

  • platform/win/FileSystemWin.cpp:

(WebCore::moveFile):

3:52 AM Changeset in webkit [217976] by magomez@igalia.com
  • 3 edits in trunk/Source/WebCore

[GTK][WPE] Fix alpha premultiplying when using cairo to draw the video frames
https://bugs.webkit.org/show_bug.cgi?id=173097

Reviewed by Carlos Garcia Campos.

We need to premultiply alpha when creating a cairo surface from a GStreamer video frame, if the frame
has an alpha component. Currently this is wrongly done in VideoSinkGStreamer, as it assumes that every
frame is going to be rendered with cairo, which is not the case when using accelerated compositing.
The premultiply must happen inside ImageGStreamerCairo, which is where we know that the frame is
going to be rendered with cairo, and where the premultiply can be performed when gstreamer-gl is
enabled as well.

Covered by existent tests.

  • platform/graphics/gstreamer/ImageGStreamerCairo.cpp:

(ImageGStreamer::ImageGStreamer):

  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(webkitVideoSinkRequestRender):

3:39 AM Changeset in webkit [217975] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Use WTF::getCurrentProcessID() instead of getpid()
https://bugs.webkit.org/show_bug.cgi?id=173130

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-09
Reviewed by Tim Horton.

  • UIProcess/API/APIProcessPoolConfiguration.h:
2:59 AM Changeset in webkit [217974] by Claudio Saavedra
  • 2 edits in trunk/Source/WebKit2

struct does not accept initializer-form if member has initializers in GCC 4.9

Unreviewed speculative build fix.

Remove the default initializers for DeniedRequest struct,
since it's only initialized in one place, to keep gcc 4.9
happy.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
2:09 AM Changeset in webkit [217973] by zandobersek@gmail.com
  • 10 edits
    48 adds in trunk

[WPE] Enable ENCRYPTED_MEDIA for build-webkit builds
https://bugs.webkit.org/show_bug.cgi?id=173103

Reviewed by Xabier Rodriguez-Calvar.

.:

  • Source/cmake/OptionsWPE.cmake: Expose the ENABLE_ENCRYPTED_MEDIA

configuration option, keeping it disabled by default.

LayoutTests/imported/w3c:

  • web-platform-tests/encrypted-media/idlharness-expected.txt:

Update the idlharness.html baseline. All the test cases pass.

Source/WebCore:

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
Pass the ParsedContentType's mime type string to the explicit ContentType
constructor and assign that to the MediaEngineSupportParameters' type
member.

Tools:

  • Scripts/webkitperl/FeatureList.pm: Enable ENCRYPTED_MEDIA flag

when building the WPE port through build-webkit.

LayoutTests:

Enable the imported W3C tests covering Encrypted Media API for the WPE port,
but only tests that use the ClearKey key system. WPE-specific baselines for
those tests are also added, despite the test cases universally failing. This
will allow us to spot any change in behavior that's introduced.

  • platform/wpe/TestExpectations: Skip tests that test PlayReady or Widevine key systems.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-check-initdata-type-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-session-closed-event-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-invalid-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-multiple-sessions-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-destroy-persistent-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-usage-record-events-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-usage-record-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-usage-record-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-readyState-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-immediately-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-two-videos-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-requestmediakeysystemaccess-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-reset-src-after-setmediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-playback-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-resetting-src-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-at-same-time-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-different-mediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-to-multiple-video-elements-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysession-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysystemaccess-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-unique-origin-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-update-disallowed-input-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-update-non-ascii-input-expected.txt: Added.
1:59 AM Changeset in webkit [217972] by rniwa@webkit.org
  • 12 edits in trunk/Source/WebCore

Move TreeScope::adoptIfNeeded to Node and rename it to setTreeScopeRecursively
https://bugs.webkit.org/show_bug.cgi?id=173129

Reviewed by Antti Koivisto.

Renamed TreeScope::adoptIfNeeded to setTreeScopeRecursively and moved to Node.

The old name was really confusing because due to the existence of Document::adoptNode, a DOM API,
which removes the adopted node from its parent if there was one before adopting the node.
Most confusingly, this function called TreeScope::adoptIfNeeded.

Also inlined the tree scope check to avoid calling to moveTreeToNewScope when there is nothing to do.

This patch effectively reverts r104528.

No new tests. Existing tests cover this.

  • dom/Attr.cpp:

(WebCore::Attr::detachFromElementWithValue):
(WebCore::Attr::attachToElement):

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::replaceAllChildren):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck):
(WebCore::ContainerNode::parserAppendChild):

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::addChildNodesToDeletionQueue):

  • dom/Document.cpp:

(WebCore::Document::adoptNode):

  • dom/Element.cpp:

(WebCore::Element::ensureAttr):

  • dom/Node.cpp:

(WebCore::DidMoveToNewDocumentAssertionScope): Added. The old assertion wasn't sufficient when
HTMLTemplateElement made a recursive call to setTreeScopeRecursively.
(WebCore::DidMoveToNewDocumentAssertionScope::DidMoveToNewDocumentAssertionScope):
(WebCore::DidMoveToNewDocumentAssertionScope::~DidMoveToNewDocumentAssertionScope):
(WebCore::DidMoveToNewDocumentAssertionScope::didRecieveCall):
(WebCore::moveNodeToNewDocument): Moved from TreeScope. Calls to incrementReferencingNodeCount
and decrementReferencingNodeCount to Node::didMoveToNewDocument. This function is now eliminated
in a release build.
(WebCore::moveShadowTreeToNewDocument): Moved from TreeScope.
(WebCore::Node::moveTreeToNewScope): Ditto.
(WebCore::Node::didMoveToNewDocument): See the description for moveNodeToNewDocument above.

  • dom/Node.h:

(WebCore::Node::isParsingChildrenFinished): Moved to avoid having its own protected section.
(WebCore::Node::setIsParsingChildrenFinished): Ditto.
(WebCore::Node::clearIsParsingChildrenFinished): Ditto.
(WebCore::Node::setTreeScopeRecursively): Moved from TreeScope::adoptIfNeeded.

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::~ShadowRoot):

  • dom/TreeScope.cpp:

(WebCore::TreeScope::adoptIfNeeded): Deleted.
(WebCore::TreeScope::moveTreeToNewScope): Deleted.
(WebCore::TreeScope::ensureDidMoveToNewDocumentWasCalled): Deleted.
(WebCore::TreeScope::moveNodeToNewDocument): Deleted.
(WebCore::TreeScope::moveShadowTreeToNewDocument): Deleted.

  • dom/TreeScope.h:
  • html/HTMLTemplateElement.cpp:

(WebCore::HTMLTemplateElement::didMoveToNewDocument):

1:58 AM Changeset in webkit [217971] by Yusuke Suzuki
  • 19 edits
    1 copy
    1 add in trunk/Source

[GTK] Add kinetic scrolling
https://bugs.webkit.org/show_bug.cgi?id=155750

Patch by Adrien Plazas <aplazas@igalia.com> on 2017-06-09
Reviewed by Carlos Garcia Campos.

Patch by Adrien Plazas and Yusuke Suzuki.

Source/WebCore:

Add the ScrollAnimationKinetic scrolling animation allowing to perform momentum scrolling; it is based on GTK+'s
GtkKineticScrolling type.

Add the notion of phase, momentum phase and swipe velocity to PlatformWheelEvent.

Depending on whether the scrolling ended normally or triggered a swipe, the scroll animator will either compute
the swipe velocity from the previous scrolling events or use the one from the swipe gesture to initiate the
momentum scrolling.

  • PlatformGTK.cmake:
  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::setHasPreciseScrollingDeltas):
(WebCore::PlatformWheelEvent::phase):
(WebCore::PlatformWheelEvent::momentumPhase):
(WebCore::PlatformWheelEvent::isTransitioningToMomentumScroll):

  • platform/ScrollAnimation.h:

(WebCore::ScrollAnimation::scroll):
(WebCore::ScrollAnimation::updateVisibleLengths):
(WebCore::ScrollAnimation::setCurrentPosition):

  • platform/ScrollAnimationKinetic.cpp: Added.

(WebCore::ScrollAnimationKinetic::PerAxisData::PerAxisData):
(WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll):
(WebCore::ScrollAnimationKinetic::ScrollAnimationKinetic):
(WebCore::ScrollAnimationKinetic::~ScrollAnimationKinetic):
(WebCore::ScrollAnimationKinetic::stop):
(WebCore::ScrollAnimationKinetic::start):
(WebCore::ScrollAnimationKinetic::animationTimerFired):

  • platform/ScrollAnimationKinetic.h: Copied from Source/WebCore/platform/ScrollAnimation.h.
  • platform/gtk/PlatformWheelEventGtk.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent):
(WebCore::PlatformWheelEvent::swipeVelocity):

  • platform/gtk/ScrollAnimatorGtk.cpp:

(WebCore::ScrollAnimatorGtk::ScrollAnimatorGtk):
(WebCore::ScrollAnimatorGtk::ensureSmoothScrollingAnimation):
(WebCore::ScrollAnimatorGtk::scroll):
(WebCore::ScrollAnimatorGtk::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorGtk::computeVelocity):
(WebCore::ScrollAnimatorGtk::handleWheelEvent):
(WebCore::ScrollAnimatorGtk::willEndLiveResize):
(WebCore::ScrollAnimatorGtk::updatePosition):
(WebCore::ScrollAnimatorGtk::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorGtk::didAddHorizontalScrollbar):

  • platform/gtk/ScrollAnimatorGtk.h:

Source/WebKit2:

Add the notion of phase and momentum phase to WebWheelEvent.

Make WebWheelEvent manage the 'is_stop' attribute of GdkEventScroll to create the corresponding WebWheelEvent
with the correct phases and deltas.

Make GestureController manage swipes to create the corresponding WebWheelEvent with the correct phases and
deltas.

  • Shared/NativeWebWheelEvent.h:
  • Shared/WebEvent.h:
  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):

  • Shared/WebWheelEvent.cpp:

(WebKit::WebWheelEvent::WebWheelEvent):
(WebKit::WebWheelEvent::encode):
(WebKit::WebWheelEvent::decode):

  • Shared/gtk/NativeWebWheelEventGtk.cpp:

(WebKit::NativeWebWheelEvent::NativeWebWheelEvent):

  • Shared/gtk/WebEventFactory.cpp:

(WebKit::WebEventFactory::createWebWheelEvent):

  • Shared/gtk/WebEventFactory.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::shouldProcessWheelEventNow):

  • UIProcess/WebPageProxy.h:
  • UIProcess/gtk/GestureController.cpp:

(WebKit::GestureController::GestureController):
(WebKit::GestureController::handleEvent):
(WebKit::GestureController::isProcessingGestures):
(WebKit::createScrollEvent):
(WebKit::GestureController::DragGesture::startDrag):
(WebKit::GestureController::DragGesture::handleDrag):
(WebKit::GestureController::DragGesture::begin):
(WebKit::GestureController::DragGesture::end):
(WebKit::GestureController::SwipeGesture::startMomentumScroll):
(WebKit::GestureController::SwipeGesture::swipe):
(WebKit::GestureController::SwipeGesture::SwipeGesture):

  • UIProcess/gtk/GestureController.h:
1:49 AM Changeset in webkit [217970] by zandobersek@gmail.com
  • 4 edits in trunk

[WPE] Enable MEDIA_SOURCE for build-webkit builds
https://bugs.webkit.org/show_bug.cgi?id=173136

Reviewed by Xabier Rodriguez-Calvar.

Tools:

  • Scripts/webkitperl/FeatureList.pm: Enable the MEDIA_SOURCE feature for WPE.

LayoutTests:

  • platform/wpe/TestExpectations: Enable the media/media-source/ layout tests

for the WPE port, adding half a dozen failure or timeout expectations for
tests that are currently failing.

1:47 AM Changeset in webkit [217969] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[GCrypt] ECDSA signing results can be smaller than the EC key size
https://bugs.webkit.org/show_bug.cgi?id=171535

Reviewed by Jiewen Tan.

The libgcrypt-based implementation of the ECDSA signing operation does not
properly address the resulting r and s integers that do not potentially
match the EC key in terms of size.

To address that, the retrieved MPI data for both integers is handled depending
on the size of said data. Strictly requiring an amount of bytes that matches
the key data size N, we simply take the last N bytes if the MPI data is equal
or larger than N in size. If smaller, we first append enough zero bytes to the
output Vector object before attaching the MPI data in whole so that the amount
of appended bytes matches N.

No new tests -- covers an implementation detail that is not trivial to test,
but can rely sufficiently on existing tests.

  • crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp:

(WebCore::extractECDSASignatureInteger):
(WebCore::gcryptSign):

1:21 AM Changeset in webkit [217968] by commit-queue@webkit.org
  • 8 edits in trunk/Source

Reduce compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=172078

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-09
Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • runtime/IntlDateTimeFormat.h:

Source/WebCore:

  • platform/network/curl/CookieJarCurl.cpp:

(WebCore::addMatchingCurlCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostnames):
(WebCore::deleteCookiesForHostname): Deleted.

  • platform/network/curl/CurlDownload.cpp:

(WebCore::CurlDownloadManager::downloadThread):
(WebCore::CurlDownload::didReceiveHeader):

  • platform/network/curl/CurlDownload.h:

(WebCore::CurlDownloadListener::didReceiveDataOfLength):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::WebCoreSynchronousLoader::didReceiveResponse):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):

  • platform/network/curl/SocketStreamHandleImplCurl.cpp:

(WebCore::createCopy):
(WebCore::SocketStreamHandleImpl::readData):

1:05 AM Changeset in webkit [217967] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

Crash in -[WKWebView _initializeWithConfiguration:]
https://bugs.webkit.org/show_bug.cgi?id=173126

Reviewed by Antti Koivisto.

Crash occurs when passing an autoreleased NSString into _setMediaContentTypesRequiringHardwareSupport.
The ivar should be a RetainPtr rather than a bare NSString *.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _mediaContentTypesRequiringHardwareSupport]):

1:03 AM Changeset in webkit [217966] by calvaris@igalia.com
  • 19 edits in trunk

[GStreamer][EME] Remove the legacy code that was not even official and is deprecated
https://bugs.webkit.org/show_bug.cgi?id=173096

Reviewed by Žan Doberšek.

.:

  • Source/cmake/OptionsWPE.cmake: Remove LEGACY_ENCRYPTED_MEDIA support

Source/WebCore:

We are removing the LEGACY_ENCRYPTED_MEDIA code that we was not
official, is deprecated and we are not planning to support it
anymore in any way.

This also helps implementing current ENCRYPTED_MEDIA in a cleaner
way.

  • platform/GStreamer.cmake:
  • platform/graphics/gstreamer/GStreamerUtilities.cpp:
  • platform/graphics/gstreamer/GStreamerUtilities.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::registerWebKitGStreamerElements):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
(WebCore::extractEventsAndSystemsFromMessage): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::needKey): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::setCDMSession): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::keyAdded): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::receivedGenerateKeyRequest): Deleted.
(WebCore::keySystemIdToUuid): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::createSession): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::dispatchDecryptionKey): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:
  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::AppendPipeline):
(WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
(WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
(WebCore::appendPipelineElementMessageCallback): Deleted.
(WebCore::AppendPipeline::dispatchPendingDecryptionKey): Deleted.
(WebCore::AppendPipeline::dispatchDecryptionKey): Deleted.
(WebCore::AppendPipeline::handleElementMessage): Deleted.

  • platform/graphics/gstreamer/mse/AppendPipeline.h:
  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::dispatchDecryptionKey): Deleted.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

LayoutTests:

  • platform/gtk/TestExpectations: Mark legacy tests as deprecated
1:02 AM Changeset in webkit [217965] by commit-queue@webkit.org
  • 6 edits in trunk

AX: Media Controls: Missing labels for the Time Labels.
https://bugs.webkit.org/show_bug.cgi?id=171715
<rdar://problem/32009214>

Patch by Aaron Chu <aaron_chu@apple.com> on 2017-06-09
Reviewed by Antoine Quint.

Source/WebCore:

Added aria-label to describe time labels in media controls.

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

(Slider.prototype.set inputAccessibleLabel):
(Slider.prototype._formatTime): Deleted.

  • Modules/modern-media-controls/controls/time-label.js:

(TimeLabel.prototype.commitProperty):

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

(formatTimeToString):

LayoutTests:

Modified existing test case to accommodate testing for time label description.

  • media/modern-media-controls/time-label/time-label.html:

Jun 8, 2017:

11:12 PM Changeset in webkit [217964] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix unused parameter warning after r217955.

  • platform/graphics/FontFamilySpecificationNull.h:

(WebCore::FontFamilySpecificationNull::fontRanges):

10:26 PM Changeset in webkit [217963] by Carlos Garcia Campos
  • 7 edits in trunk

[GTK] Use API::FormClient instead of the C API in WebKitFormClient
https://bugs.webkit.org/show_bug.cgi?id=173098

Reviewed by Žan Doberšek.

Source/WebKit2:

  • UIProcess/API/gtk/WebKitFormClient.cpp:

(attachFormClientToView):
(willSubmitForm): Deleted.

  • UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:

(webkitFormSubmissionRequestCreate):
(webkit_form_submission_request_get_text_fields):

  • UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

(webkitWebPageCreate):

Tools:

Fix memory leak and runtime warning when running /webkit2/WebKitWebView/submit-form. The web extension is
assuming that all tests containing forms define ids for the form elements like
/webkit2/WebKitWebExtension/form-controls-associated-signal does.

  • TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:

(formControlsAssociatedCallback):

10:25 PM Changeset in webkit [217962] by yoav@yoav.ws
  • 21 edits in trunk

[preload] Mandatory as value and related spec alignments
https://bugs.webkit.org/show_bug.cgi?id=173047

Reviewed by Dean Jackson.

Source/WebCore:

Align preload's implementation according to latest spec changes: as is mandatory and "fetch" replaces the previous empty as value,
onerror no longer fires for invalid as values, and the IDL for as reflects only valid values, to enable feature detection.

Related standard discussions:
https://github.com/w3c/preload/issues/80
https://github.com/whatwg/fetch/pull/547
https://github.com/whatwg/fetch/pull/549
https://github.com/whatwg/html/pull/2588

No new tests but modified existing ones as well as their expectations.

  • html/HTMLLinkElement.cpp: Add "enumerated attribute" reflection methods to as.

(WebCore::HTMLLinkElement::setAs):
(WebCore::HTMLLinkElement::as):

  • html/HTMLLinkElement.h:
  • html/HTMLLinkElement.idl:
  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::loadLinksFromHeader): preloadIfNeeded signature change.
(WebCore::LinkLoader::resourceTypeFromAsAttribute): Replace the empty value by "fetch".
(WebCore::LinkLoader::preloadIfNeeded): Change the signature, as a LinkLoaderClient is no longer needed, since we don't fire error
events from inside the function.
(WebCore::LinkLoader::loadLink): preloadIfNeeded signature change.

  • loader/LinkLoader.h: preloadIfNeeded signature change.

LayoutTests:

Fix tests and expectations to this patch's changes: as is mandatory and "fetch" replaces the previous empty as value,
onerror no longer fires for invalid as values, and the IDL for as reflects only valid values, to enable feature detection.

  • http/tests/fetch/redirectmode-and-preload.html:
  • http/tests/preload/download_resources-expected.txt:
  • http/tests/preload/download_resources.html:
  • http/tests/preload/download_resources_from_header_iframe-expected.txt:
  • http/tests/preload/onerror_event-expected.txt:
  • http/tests/preload/onerror_event.html:
  • http/tests/preload/onload_event-expected.txt:
  • http/tests/preload/onload_event.html:
  • http/tests/preload/preloadscanner_download_resources.html:
  • http/tests/preload/resources/download_resources_from_header.php:
  • http/tests/preload/resources/nph-invalid_resources_from_header.pl:
  • http/tests/preload/single_download_preload.html:
  • http/tests/preload/single_download_preload_headers.php:
  • imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt: PProgressions related to correct reflection.
10:24 PM Changeset in webkit [217961] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] Use API::Findclient instead of the C API in WebKitFindController
https://bugs.webkit.org/show_bug.cgi?id=173095

Reviewed by Žan Doberšek.

  • UIProcess/API/gtk/WebKitFindController.cpp:

(getPage):
(webkitFindControllerDispose):
(webkitFindControllerConstructed):
(webkit_find_controller_class_init):

10:22 PM Changeset in webkit [217960] by Carlos Garcia Campos
  • 10 edits
    1 delete in trunk/Source/WebKit2

[GTK] Get rid of custom marshallers of signals
https://bugs.webkit.org/show_bug.cgi?id=173094

Reviewed by Žan Doberšek.

Use g_cclosure_marshal_generic instead.

  • PlatformGTK.cmake:
  • UIProcess/API/gtk/WebKitBackForwardList.cpp:
  • UIProcess/API/gtk/WebKitDownload.cpp:

(webkit_download_class_init):

  • UIProcess/API/gtk/WebKitFaviconDatabase.cpp:

(webkit_favicon_database_class_init):

  • UIProcess/API/gtk/WebKitWebInspector.cpp:

(webkit_web_inspector_class_init):

  • UIProcess/API/gtk/WebKitWebResource.cpp:

(webkit_web_resource_class_init):

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkit_web_view_class_init):

  • UIProcess/API/gtk/webkit2marshal.list: Removed.
  • WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

(webkit_web_page_class_init):

7:59 PM Changeset in webkit [217959] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[iOS] LowPowerModeNotifier notifies client on non-main thread
https://bugs.webkit.org/show_bug.cgi?id=173115
<rdar://problem/32644703>

Reviewed by Ryosuke Niwa.

Update iOS's implementation of the LowPowerModeNotifier to make sure
we notify the client of low power mode changes on the main thread.

  • platform/ios/LowPowerModeNotifierIOS.mm:

(-[WebLowPowerModeObserver _didReceiveLowPowerModeChange]):

7:13 PM Changeset in webkit [217958] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

Crash inside InsertNodeBeforeCommand via InsertParagraphSeparatorCommand
https://bugs.webkit.org/show_bug.cgi?id=173085
Source/WebCore:

<rdar://problem/32575059>

Reviewed by Wenson Hsieh.

The crash was caused by the condition to check for special cases failing when visiblePos is null.
Exit early in these extreme cases.

Also replaced the use of deprecatedNode and deprecatedEditingOffset to modern idioms.

Test: editing/inserting/insert-horizontal-rule-in-empty-document-crash.html

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

LayoutTests:

Reviewed by Wenson Hsieh.

Added a regresion test.

  • editing/inserting/insert-horizontal-rule-in-empty-document-crash-expected.txt: Added.
  • editing/inserting/insert-horizontal-rule-in-empty-document-crash.html: Added.
7:09 PM Changeset in webkit [217957] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

The tree scope of an Attr node inside a shadow tree does not updated upon detach.
https://bugs.webkit.org/show_bug.cgi?id=173122

Reviewed by Chris Dumez.

Source/WebCore:

The crash was caused by the tree scope of an Attr detached from an element inside a shadow root
not getting updated.

Test: fast/dom/detaching-attr-node-in-shadow-tree-crash.html

  • dom/Attr.cpp:

(WebCore::Attr::~Attr): Added assertions.
(WebCore::Attr::detachFromElementWithValue): Fixed the bug by adopting Attr to Document.
(WebCore::Attr::attachToElement): Moved the adoptIfNeeded call here from attachAttributeNodeIfNeeded.

  • dom/Element.cpp:

(WebCore::Element::attachAttributeNodeIfNeeded):

LayoutTests:

Added a regression test which hits the newly added assertion.

  • fast/dom/detaching-attr-node-in-shadow-tree-crash-expected.txt: Added.
  • fast/dom/detaching-attr-node-in-shadow-tree-crash.html: Added.
5:46 PM Changeset in webkit [217956] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

Crash under -[WKWebView _updateVisibleContentRects]
https://bugs.webkit.org/show_bug.cgi?id=173123
rdar://problem/32650112

Reviewed by Tim Horton.

Make sure the WKWebView is valid in places where we dispatch_async or use
a pre-commit handler.

Speculative fix for a rare crasher.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _isValid]):
(-[WKWebView _addUpdateVisibleContentRectPreCommitHandler]):
(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):

5:31 PM Changeset in webkit [217955] by mmaxfield@apple.com
  • 36 edits
    13 adds in trunk

[Cocoa] Expand system-ui to include every item in the Core Text cascade list
https://bugs.webkit.org/show_bug.cgi?id=173043
<rdar://problem/21125708>

Reviewed by Simon Fraser.

Source/WebCore:

The concept of the system font on Cocoa platforms represents the entire Core Text cascade list.
However, previously, WebKit only represented system-ui by pulling out the first item in the Core
Text cascade list. Instead, we should make all text rendered with "system-ui" match what the
platform would natively render.

Previously, we walked through the strings in the font-family property and looked them up one by
one. However, now we want to abstract this idea of a font family to possibly hold a
CTFontDescriptorRef instead of a string. This way, we expand a font-family list of ["fontA",
"system-ui", "fontB"] to ["fontA", ... a bunch of CTFontDescriptorRefs ..., "FontB"]. We can
then modify the consumer of this object to have two codepaths: the old string-based codepath,
and a new, platform-specific codepath which simply embeds the CTFontDesriptorRefs inside a Font
object.

We don't want to simply pull out the family name from each item in the Core Text fallback list
because that is a lossy translation. There is more information in these font descriptors which
cannot be represented by CSS. Therefore, we must keep the descriptors alive and add the new
codepath for them.

We also don't want to run the CSS font matching algorithm on each member of the Core Text
fallback list because it may yield different results from Core Text's font matching algorithm.
Our goal is to draw text as closely as possible to the system APIs. If we ran it, we may find
a font which is closer to the requested traits, but it would look out of place on the system.

Tests: fast/text/system-font-fallback-emoji.html

fast/text/system-font-fallback.html

  • WebCore.xcodeproj/project.pbxproj:
  • page/MemoryRelease.cpp:

(WebCore::releaseNoncriticalMemory):

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::realizeNextFallback): The consumer of our new data type. Now uses WTF::visit().
(WebCore::FontCascadeFonts::realizeFallbackRangesAt): Now that the number of items to test
against the current character is larger than the number of strings in the font-family list,
we need to update the existing code to use the correct value.

  • platform/graphics/FontDescription.cpp: Default implementation for non-Cocoa ports.

(WebCore::FontDescription::invalidateCaches):
(WebCore::FontCascadeDescription::effectiveFamilyCount):
(WebCore::FontCascadeDescription::effectiveFamilyAt):

  • platform/graphics/FontDescription.h: Our new data type is a Variant of AtomicString and a

platform-specific class. Cocoa uses a class that holds a CTFontDescriptorRef and other ports
use an empty non-constructable class.

  • platform/graphics/FontFamilySpecificationNull.h: Added. The empty non-constructable

class.
(WebCore::FontFamilySpecificationNull::fontRanges):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::platformInit): Changing the system language will change the system font
fallback list, so we need to listen to this notification. This also matters for
FontCache::systemFallbackForCharacters(), so we should build off the same callback we are
already using for font installation.
(WebCore::invalidateFontCache):

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp: Added. The platform-specific creation of

our CTFontDescriptorRefs. We hold them cached in a SystemFontDatabase.
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParameters):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::isHashTableDeletedValue):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator==):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash):
(WebCore::SystemFontDatabase::singleton):
(WebCore::SystemFontDatabase::systemFontCascadeList):
(WebCore::SystemFontDatabase::clear):
(WebCore::SystemFontDatabase::SystemFontDatabase):
(WebCore::SystemFontDatabase::applyWeightAndItalics):
(WebCore::SystemFontDatabase::computeCascadeList):
(WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::hash):
(WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::equal):
(WebCore::isSystemFontString):
(WebCore::systemFontParameters):
(WebCore::FontDescription::invalidateCaches):
(WebCore::FontCascadeDescription::effectiveFamilyCount): We don't store the result of this
because it would probably be a bad idea to increase the size of every single FontCascade just
in case it might ask for the system font. Most fonts never mention system-ui. Because it's so
rare, we can just recalculate the result of this as necessary. This shouldn't be slow because
the results are cached.
(WebCore::FontCascadeDescription::effectiveFamilyAt):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: Added.

(WebCore::FontFamilySpecificationCoreText::fontRanges): Create a FontRanges from a
CTFontDescriptorRef.

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.h: Added.

(WebCore::FontFamilySpecificationCoreText::FontFamilySpecificationCoreText):

  • platform/graphics/ios/FontCacheIOS.mm: Delete the old handling for system-ui.

(WebCore::platformFontWithFamilySpecialCase):
(WebCore::baseSystemFontDescriptor): Deleted.
(WebCore::systemFontModificationAttributes): Deleted.
(WebCore::systemFontDescriptor): Deleted.

  • platform/graphics/mac/FontCacheMac.mm: Ditto.

(WebCore::platformFontWithFamilySpecialCase):
(WebCore::toNSFontWeight): Deleted.

LayoutTests:

Rebaseline tests which use non-English text in form controls

  • fast/text/system-font-fallback-emoji-expected.txt: Added.
  • fast/text/system-font-fallback-emoji.html: Added.
  • fast/text/system-font-fallback-expected.html: Added.
  • fast/text/system-font-fallback.html: Added.
  • platform/mac-elcapitan/fast/forms/listbox-bidi-align-expected.png: Added.
  • platform/mac-elcapitan/fast/forms/listbox-bidi-align-expected.txt:
  • platform/mac-elcapitan/fast/forms/search-rtl-expected.png: Added.
  • platform/mac-elcapitan/fast/forms/search-rtl-expected.txt:
  • platform/mac-elcapitan/fast/forms/searchfield-heights-expected.png: Added.
  • platform/mac-elcapitan/fast/forms/searchfield-heights-expected.txt:
  • platform/mac-elcapitan/fast/forms/visual-hebrew-text-field-expected.txt:
  • platform/mac-elcapitan/fast/text/drawBidiText-expected.png: Added.
  • platform/mac-elcapitan/fast/text/drawBidiText-expected.txt:
  • platform/mac-elcapitan/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png: Added.
  • platform/mac-elcapitan/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
  • platform/mac/TestExpectations:
  • platform/mac/fast/css/rtl-ordering-expected.png:
  • platform/mac/fast/css/rtl-ordering-expected.txt:
  • platform/mac/fast/forms/listbox-bidi-align-expected.png:
  • platform/mac/fast/forms/listbox-bidi-align-expected.txt:
  • platform/mac/fast/forms/listbox-hit-test-zoomed-expected.png:
  • platform/mac/fast/forms/listbox-hit-test-zoomed-expected.txt:
  • platform/mac/fast/forms/search-rtl-expected.png:
  • platform/mac/fast/forms/search-rtl-expected.txt:
  • platform/mac/fast/forms/searchfield-heights-expected.txt:
  • platform/mac/fast/forms/select-visual-hebrew-expected.png:
  • platform/mac/fast/forms/select-visual-hebrew-expected.txt:
  • platform/mac/fast/forms/visual-hebrew-text-field-expected.png:
  • platform/mac/fast/forms/visual-hebrew-text-field-expected.txt:
  • platform/mac/fast/text/drawBidiText-expected.png:
  • platform/mac/fast/text/drawBidiText-expected.txt:
  • platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png:
  • platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
  • platform/mac/fast/text/updateNewFont-expected.png:
  • platform/mac/fast/text/updateNewFont-expected.txt:
4:05 PM Changeset in webkit [217954] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Update Timer to take a WTF::Function instead of a std::function
https://bugs.webkit.org/show_bug.cgi?id=173113

Reviewed by Brady Eidson.

Update Timer to take a WTF::Function instead of a std::function as we prefer
to use WTF::Function in WebKit.

  • platform/GenericTaskQueue.cpp:

(WebCore::TaskDispatcher<Timer>::sharedTimer):

  • platform/Timer.h:

(WebCore::Timer::Timer):
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):

3:36 PM Changeset in webkit [217953] by clopez@igalia.com
  • 3 edits in trunk/Source/WebCore

[WebRTC] enableMockMediaEndpoint() is only used for the OpenWebRTC backend.
https://bugs.webkit.org/show_bug.cgi?id=173108

Reviewed by Eric Carlson.

Covered by existing tests.

  • testing/Internals.cpp:

(WebCore::Internals::Internals):
(WebCore::Internals::enableMockMediaEndpoint):

  • testing/Internals.h:
3:24 PM Changeset in webkit [217952] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[Cocoa] JSWrapperMap leaks for all JSContexts
https://bugs.webkit.org/show_bug.cgi?id=173110
<rdar://problem/32602198>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-06-08
Reviewed by Geoffrey Garen.

  • API/JSContext.mm:

(-[JSContext ensureWrapperMap]):
Ensure this allocation gets released.

3:17 PM Changeset in webkit [217951] by Simon Fraser
  • 3 edits in trunk/Source/WebKit2

Use initializers in WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=173073

Reviewed by Tim Horton.

Initialize the member variables the modern way.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy):

  • UIProcess/WebPageProxy.h:
3:12 PM Changeset in webkit [217950] by Chris Dumez
  • 4 edits in trunk/LayoutTests

REGRESSION: fast/images/animated-gif-webkit-transform.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=170410
<rdar://problem/31409381>

Reviewed by Simon Fraser.

Fix flakiness and unskip test.

  • fast/images/animated-gif-webkit-transform-expected.txt:
  • fast/images/animated-gif-webkit-transform.html:
  • platform/mac-wk2/TestExpectations:
3:03 PM Changeset in webkit [217949] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[iOS] Buttons in top-left and bottom media controls bar are positioned too high
https://bugs.webkit.org/show_bug.cgi?id=173111
<rdar://problem/32650615>

Patch by Antoine Quint <Antoine Quint> on 2017-06-08
Reviewed by Jon Lee.

Source/WebCore:

Test: media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-button-padding.html

Since we use flex box to vertically center buttons in a buttons container, there is no
need to offset the button due to padding in the y-axis.

  • Modules/modern-media-controls/controls/buttons-container.css:

(.ios .buttons-container button):

LayoutTests:

Add a test that checks that the appropriate styles as set in buttons-container.css
are applied to a button in a buttons container on iOS.

  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-button-padding-expected.txt: Added.
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-button-padding.html: Added.
  • platform/ios-simulator/TestExpectations:
2:47 PM Changeset in webkit [217948] by commit-queue@webkit.org
  • 28 edits in trunk/Source

Implement additional AVPlayerController interfaces for minTime and maxTime.
https://bugs.webkit.org/show_bug.cgi?id=172396
rdar://problem/30737452

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-08
Reviewed by Jer Noble.

Source/WebCore:

No new tests because no change to DOM.

Add support for new HLS UI in AVKit.

This adds new properties (seekableTimeRangesLastModifiedTime, liveUpdateInterval, minTiming, maxTiming) to WebAVPlayerController.
Plumb these properties from AVPlayer up to AVKit.

Switch WebPlaybackSessionModelMediaElement from updating seekableRangesChanged using timeupdate event to using progress event.

Enable progress events on iOS.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::seekableTimeRangesLastModifiedTime):
(WebCore::HTMLMediaElement::liveUpdateInterval):

  • html/HTMLMediaElement.h:
  • platform/cf/CoreMediaSoftLink.cpp:
  • platform/cf/CoreMediaSoftLink.h:
  • platform/cocoa/WebPlaybackSessionModel.h:

(WebCore::WebPlaybackSessionModelClient::seekableRangesChanged):

  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
(WebCore::WebPlaybackSessionModelMediaElement::observedEventNames):
(WebCore::WebPlaybackSessionModelMediaElement::seekableTimeRangesLastModifiedTime):
(WebCore::WebPlaybackSessionModelMediaElement::liveUpdateInterval):

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::seekableTimeRangesLastModifiedTime):
(WebCore::MediaPlayer::liveUpdateInterval):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::seekableTimeRangesLastModifiedTime):
(WebCore::MediaPlayerPrivateInterface::liveUpdateInterval):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval):

  • platform/ios/WebAVPlayerController.h:
  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController init]):
(-[WebAVPlayerController dealloc]):
(-[WebAVPlayerController observeValueForKeyPath:ofObject:change:context:]):
(-[WebAVPlayerController updateMinMaxTiming]):
(-[WebAVPlayerController hasSeekableLiveStreamingContent]):
(+[WebAVPlayerController keyPathsForValuesAffectingHasSeekableLiveStreamingContent]):
(-[WebAVPlayerController resetMediaState]):

  • platform/ios/WebPlaybackSessionInterfaceAVKit.h:
  • platform/ios/WebPlaybackSessionInterfaceAVKit.mm:

(WebCore::WebPlaybackSessionInterfaceAVKit::WebPlaybackSessionInterfaceAVKit):
(WebCore::WebPlaybackSessionInterfaceAVKit::resetMediaState):
(WebCore::WebPlaybackSessionInterfaceAVKit::seekableRangesChanged):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(WebVideoFullscreenControllerContext::seekableRangesChanged):
(WebVideoFullscreenControllerContext::seekableTimeRangesLastModifiedTime):
(WebVideoFullscreenControllerContext::liveUpdateInterval):

  • platform/mac/WebPlaybackSessionInterfaceMac.h:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):

  • platform/spi/cocoa/AVKitSPI.h:
  • platform/spi/mac/AVFoundationSPI.h:

Source/WebKit2:

Add support for new HLS UI in AVKit.

Plumb seekableTimeRangesLastModifiedTime and liveUpdateInterval across process boundaries.

  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionModelContext::setSeekableRanges):
(WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector):

  • WebProcess/cocoa/WebPlaybackSessionManager.h:
  • WebProcess/cocoa/WebPlaybackSessionManager.mm:

(WebKit::WebPlaybackSessionInterfaceContext::seekableRangesChanged):
(WebKit::WebPlaybackSessionManager::seekableRangesChanged):

2:37 PM Changeset in webkit [217947] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

Use WTF::Function more in SpeculativeLoadManager
https://bugs.webkit.org/show_bug.cgi?id=173109

Reviewed by Antti Koivisto.

Use WTF::Function more in SpeculativeLoadManager.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::create):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
1:39 PM Changeset in webkit [217946] by Jonathan Bedard
  • 5 edits in trunk/Tools

webkitpy: Run sample/spindump on iOS devices
https://bugs.webkit.org/show_bug.cgi?id=171881
<rdar://problem/32084602>

Reviewed by Daniel Bates.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.sample_process): Only add sudo prefix if the platform is Mac, which
requires sudo to run spindump.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort.look_for_new_samples): Deleted.
(IOSDevicePort.sample_process): Deleted.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest): iOS devices use 'ios' and their os_name.
(IOSDeviceTest.test_spindump):
(IOSDeviceTest.test_sample_process):
(IOSDeviceTest.test_sample_process_exception):

  • Scripts/webkitpy/port/ios_simulator_unittest.py:

(IOSSimulatorTest): iOS Simulators run on Mac and use 'mac' as their os_name.

1:37 PM Changeset in webkit [217945] by commit-queue@webkit.org
  • 6 edits
    12 adds in trunk

getUserMedia should not be prompted again if user denied access
https://bugs.webkit.org/show_bug.cgi?id=173104

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-08
Reviewed by Geoff Garen.

Source/WebKit2:

Store denied requests to be able to replay them.
If mic is denied, user might be prompted for camera, not for mic and camera.
Same principle applies to the case of denied camera.
Clearing the stored denied requests when reloading/navigating away.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::resetAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::isRequestDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:

LayoutTests:

Splitting grant test due to remembering deny decisions.

  • fast/mediastream/getUserMedia-deny-persistency-expected.txt: Added.
  • fast/mediastream/getUserMedia-deny-persistency-reload-expected.txt: Added.
  • fast/mediastream/getUserMedia-deny-persistency-reload.html: Added.
  • fast/mediastream/getUserMedia-deny-persistency.html: Added.
  • fast/mediastream/getUserMedia-deny-persistency2-expected.txt: Added.
  • fast/mediastream/getUserMedia-deny-persistency2.html: Added.
  • fast/mediastream/getUserMedia-deny-persistency3-expected.txt: Added.
  • fast/mediastream/getUserMedia-deny-persistency3.html: Added.
  • fast/mediastream/getUserMedia-grant-persistency-expected.txt:
  • fast/mediastream/getUserMedia-grant-persistency.html:
  • fast/mediastream/getUserMedia-grant-persistency2-expected.txt: Added.
  • fast/mediastream/getUserMedia-grant-persistency2.html: Added.
  • fast/mediastream/getUserMedia-grant-persistency3-expected.txt: Added.
  • fast/mediastream/getUserMedia-grant-persistency3.html: Added.
1:08 PM Changeset in webkit [217944] by fpizlo@apple.com
  • 3 edits
    1 add in trunk

REGRESSION: js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5.html has a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=161156

Reviewed by Saam Barati.

Source/JavaScriptCore:

Since LLInt does not register impure property watchpoints for self property accesses, it
shouldn't try to cache accesses that require a watchpoint.

This manifested as a flaky failure because the test would fire the watchpoint after we had
usually already tiered up. Without concurrent JIT, we would have always tiered up before
getting to the bad case. With concurrent JIT, we would sometimes not tier up by that time. This
also adds a test that deterministically failed in LLInt without this change; it does so by just
running a lot shorter.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

LayoutTests:

Add a version of the test that's guaranteed to fail if the problem it's testing for manifests
in the LLInt.

  • js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5-short.html: Added.
1:06 PM Changeset in webkit [217943] by hyatt@apple.com
  • 8 edits
    3 adds
    3 deletes in trunk

Laili restaurant menu page does not display full menu
https://bugs.webkit.org/show_bug.cgi?id=173062
rdar://problem/32436486

Reviewed by Simon Fraser.

Source/WebCore:

Percentage heights inside auto containing blocks were handled correctly by
hasReplacedLogicalHeight, which checked hasAutoHeightOrContainingBlockWithAutoHeight
properly. min-max-height were not handled properly though and need to do the same check.

There is also now a quirk for iBooks to preserve the old behavior, since they depend
on the old behavior to constrain the height of images to a page.

Test: fast/replaced/max-height-percent-inside-auto-block.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::replacedMinMaxLogicalHeightComputesAsNone):
Add a new helper that resolves min and max logical height values to none for
replaced elements with percentage min/max heights inside auto containing blocks.

(WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
Change the min/max-height constraint function for replaced elements to call the
new helper function.

  • rendering/RenderBox.h:
  • rendering/RenderBoxModelObject.h:

Move a function from private to protected so that RenderBox can access it.

LayoutTests:

  • fast/hidpi/percent-height-image-nested-expected.html:
  • fast/hidpi/percent-height-image-nested.html:
  • fast/multicol/pagination/RightToLeft-max-width.html:
  • fast/replaced/max-height-percent-inside-auto-block-expected.html: Added.
  • fast/replaced/max-height-percent-inside-auto-block.html: Added.
  • platform/mac/fast/multicol/pagination/RightToLeft-max-width-expected.txt:
12:13 PM Changeset in webkit [217942] by keith_miller@apple.com
  • 17 edits
    26 deletes in trunk

WebAssembly: We should only create wrappers for functions that can be exported
https://bugs.webkit.org/show_bug.cgi?id=173088

Reviewed by Saam Barati.

JSTests:

Remove a bunch of old tests that are actually duplicates of the spec-tests and rely
on the old testWasmModuleFunctions api, which has been removed.

  • wasm/function-tests/copysign.js: Removed.
  • wasm/function-tests/ctz.js: Removed.
  • wasm/function-tests/drop.js: Removed.
  • wasm/function-tests/dumb-eq-if-then-else.js: Removed.
  • wasm/function-tests/dumb-less-than-fallthrough.js: Removed.
  • wasm/function-tests/dumb-less-than-ite.js: Removed.
  • wasm/function-tests/eqz.js: Removed.
  • wasm/function-tests/i32-trunc-s-f32.js: Removed.
  • wasm/function-tests/i32-trunc-s-f64.js: Removed.
  • wasm/function-tests/i32-trunc-u-f32.js: Removed.
  • wasm/function-tests/i32-trunc-u-f64.js: Removed.
  • wasm/function-tests/i64-trunc-s-f32.js: Removed.
  • wasm/function-tests/i64-trunc-s-f64.js: Removed.
  • wasm/function-tests/i64-trunc-u-f32.js: Removed.
  • wasm/function-tests/i64-trunc-u-f64.js: Removed.
  • wasm/function-tests/if-then-else-fallthrough.js: Removed.
  • wasm/function-tests/if-then-fallthrough.js: Removed.
  • wasm/function-tests/int-to-floating-point.js: Removed.
  • wasm/function-tests/loop-mult.js:
  • wasm/function-tests/loop-sum.js:
  • wasm/function-tests/max.js: Removed.
  • wasm/function-tests/min.js: Removed.
  • wasm/function-tests/nearest.js: Removed.
  • wasm/function-tests/nop.js: Removed.
  • wasm/function-tests/popcnt.js: Removed.
  • wasm/function-tests/ret5.js:
  • wasm/function-tests/select.js: Removed.
  • wasm/function-tests/tee-local.js: Removed.
  • wasm/function-tests/trunc.js: Removed.

Source/JavaScriptCore:

This patch makes it so we only create wrappers for WebAssembly functions that
can actually be exported. It appears to be a ~2.5% speedup on WasmBench compile times.

This patch also removes most of the old testWasmModuleFunctions api from the jsc CLI.
Most of the tests were duplicates of ones in the spec-tests directory. The others I
have converted to use the normal API.

  • jsc.cpp:

(GlobalObject::finishCreation):
(valueWithTypeOfWasmValue): Deleted.
(box): Deleted.
(callWasmFunction): Deleted.
(functionTestWasmModuleFunctions): Deleted.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::prepare):
(JSC::Wasm::BBQPlan::compileFunctions):
(JSC::Wasm::BBQPlan::complete):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmBBQPlanInlines.h:

(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):

  • wasm/WasmFormat.h:
  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

Tools:

Add quick mode for wasm tests.

  • Scripts/run-jsc-stress-tests:
11:56 AM Changeset in webkit [217941] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/fullscreen-button
https://bugs.webkit.org/show_bug.cgi?id=173101

Reviewed by Dean Jackson.

Update the test to check an SVG asset now that we use those.

  • media/modern-media-controls/fullscreen-button/fullscreen-button-expected.txt:
  • media/modern-media-controls/fullscreen-button/fullscreen-button.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
11:54 AM Changeset in webkit [217940] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/forward-button
https://bugs.webkit.org/show_bug.cgi?id=173100

Reviewed by Dean Jackson.

Update the test to check an SVG asset now that we use those.

  • media/modern-media-controls/forward-button/forward-button-expected.txt:
  • media/modern-media-controls/forward-button/forward-button.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
11:53 AM Changeset in webkit [217939] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

Layout Test media/modern-media-controls/button/button-icon-name.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=173099

Reviewed by Dean Jackson.

Rewrite the test to use asynchronous assertions, the number of frames running is immaterial to this test.

  • media/modern-media-controls/button/button-icon-name-expected.txt:
  • media/modern-media-controls/button/button-icon-name.html:
11:27 AM Changeset in webkit [217938] by Darin Adler
  • 4 edits in trunk/Tools

WTF tests have incorrect RefLogger lifetimes making it impossible to test with Address Sanitizer
https://bugs.webkit.org/show_bug.cgi?id=173106

Reviewed by Sam Weinig.

  • TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: Define RefLogger objects first, so they are

destroyed last.

  • TestWebKitAPI/Tests/WTF/HashMap.cpp: Ditto.
  • TestWebKitAPI/Tests/WTF/HashSet.cpp: Ditto.
11:08 AM Changeset in webkit [217937] by timothy_horton@apple.com
  • 11 edits
    4 adds in trunk

Add a borderless mode to <attachment>, and make it respect its layout size
https://bugs.webkit.org/show_bug.cgi?id=173079
<rdar://problem/32491584>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/attachment/attachment-borderless.html

fast/attachment/attachment-respects-css-size.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSValueKeywords.in:
  • platform/ThemeTypes.h:
  • rendering/RenderAttachment.cpp:

(WebCore::RenderAttachment::shouldDrawBorder):

  • rendering/RenderAttachment.h:
  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
Add "-webkit-appearance: borderless-attachment;" in addition to "attachment",
so clients can specify the borderless appearance. This isn't specified as a
CSS border because it's a very custom appearance that isn't achievable that way.

  • rendering/RenderThemeIOS.mm:

(WebCore::AttachmentInfo::AttachmentInfo):
Use the layout size of the attachment, not the fixed size; we use the fixed
size as our intrinsic size, so most attachments will still be that size,
but if a client specifies a different size, we'll lay out correctly.

LayoutTests:

  • TestExpectations:
  • platform/ios/TestExpectations:
  • fast/attachment/attachment-borderless-expected-mismatch.html: Added.
  • fast/attachment/attachment-borderless.html: Added.
  • fast/attachment/attachment-respects-css-size-expected-mismatch.html: Added.
  • fast/attachment/attachment-respects-css-size.html: Added.

Add mismatch tests ensuring that CSS width/height and borderless-attachment
have *some* kind of impact on rendering.

10:57 AM Changeset in webkit [217936] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

YouTube audio stutters when page changes visibility.
https://bugs.webkit.org/show_bug.cgi?id=173102

Reviewed by Eric Carlson.

Don't change renderers when the visibility changes; only use the decompression session
when we were explicitly asked to paint into an accelerated surface.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):

10:51 AM Changeset in webkit [217935] by jer.noble@apple.com
  • 10 edits in trunk/Source

Clients of the WK2 C-API don't have their mediaContentTypesRequiringHardwareSupport setting initialized correctly.
https://bugs.webkit.org/show_bug.cgi?id=173091

Reviewed by Eric Carlson.

Source/WebCore:

Add a new default setting value, defined separately in Settings and SettingsCocoa.

  • page/Settings.cpp:

(WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport):

  • page/Settings.h:
  • page/cocoa/SettingsCocoa.mm:

(WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport):

Source/WebKit/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

Source/WebKit2:

Rather than add yet a third way of setting this preference, centralize everything by moving the
definition of the default value into WebCore.

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

(-[WKWebViewConfiguration init]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

10:26 AM Changeset in webkit [217934] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

[WK2] mediaContentTypesRequiringHardwareSupport setting not being propogated
https://bugs.webkit.org/show_bug.cgi?id=173090

Reviewed by Eric Carlson.

Passing a NSString* into the WebPreferencesStore::Value constructor would rather cast the NSString*
into a bool than a const String&. So explicitly cast the NSString* into a String before passing.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

10:23 AM Changeset in webkit [217933] by jer.noble@apple.com
  • 7 edits in trunk/Source/WebCore

Take the mediaContentTypesRequiringHardwareSupport Setting into account when answering HTMLMediaElement::canPlayType()
https://bugs.webkit.org/show_bug.cgi?id=173092

Reviewed by Eric Carlson.

Pass the value of mediaContentTypesRequiringHardwareSupport into the MediaPlayer when querying canPlayType().
Then, use the existing code in AVAssetTrackUtilities to know whether to bail out early from the codec check.

Drive-by fix: FourCC was converting String -> FourCC in reverse.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::canPlayType):

  • platform/graphics/FourCC.cpp:

(WebCore::FourCC::fromString):

  • platform/graphics/avfoundation/objc/AVAssetTrackUtilities.h:
  • platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:

(WebCore::contentTypesToCodecs):
(WebCore::codecsMeetHardwareDecodeRequirements):
(WebCore::contentTypeMeetsHardwareDecodeRequirements):
(WebCore::assetTrackMeetsHardwareDecodeRequirements):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

10:13 AM Changeset in webkit [217932] by Chris Dumez
  • 3 edits in trunk/Source/WebCore
ASSERTION FAILED: !m_isolatedWorld->isNormal()
m_wrapper !m_jsFunction on webrtc/ephemeral-certificates-and-cnames.html

https://bugs.webkit.org/show_bug.cgi?id=173039
<rdar://problem/32600412>

Reviewed by Youenn Fablet.

RTCPeerConnection was an ActiveDOMObject but failed to override ActiveDOMObject::hasPendingActivity()
to make sure its JS wrapper stays alive as long as it needs to. In this patch, we override
ActiveDOMObject::hasPendingActivity() and have it return true if !m_isStopped. I believe this is
the right thing to do to keep the wrapper alive as long as the connection is not closed.
RTCPeerConnection::close() closes the connection and then posts a task to call
RTCPeerConnection::doStop(), setting m_isStopped to true.

No new tests, already covered by webrtc/ephemeral-certificates-and-cnames.html which
was a flaky crash.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::canSuspendForDocumentSuspension):
(WebCore::RTCPeerConnection::hasPendingActivity):

  • Modules/mediastream/RTCPeerConnection.h:
10:01 AM Changeset in webkit [217931] by commit-queue@webkit.org
  • 6 edits in trunk/LayoutTests

Modify security test to avoid spacing differences.
https://bugs.webkit.org/show_bug.cgi?id=141709

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2017-06-08
Reviewed by Carlos Alberto Lopez Perez.

  • http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients-expected.txt:
  • http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients.html:
  • http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW-expected.txt:
  • http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html:
  • platform/gtk/TestExpectations:
9:28 AM Changeset in webkit [217930] by commit-queue@webkit.org
  • 8 edits in trunk

getUserMedia request should not be allowed for background tabs unless the tab is already capturing
https://bugs.webkit.org/show_bug.cgi?id=172989

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

Source/WebKit2:

Covered by updated test and manual testing.

In case a getUserMedia can be granted, we check for visbility of the view.
If the view is visible, the getUserMedia request is allowed and promise is resolved.
Otherwise we store the pregranted request and will allow it when the view gets visible.
Pregranted requests will be cleared if the document of the view is changed.

Pregranted requests will not be used when capture page is muted.
In that case, a prompt will appear.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::removeGrantedAccess):
(WebKit::allowRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::processPregrantedRequests):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::viewIsBecomingVisible):

  • UIProcess/WebPageProxy.h:

LayoutTests:

  • fast/mediastream/getUserMedia-grant-persistency-expected.txt:
  • fast/mediastream/getUserMedia-grant-persistency.html: Using testRunner.setPageVisibility so that UIProcess is made aware of the change.

Removing test about capture muted page since there is no API for setting a page as muted right now.
This test should be readded later on.

6:24 AM Changeset in webkit [217929] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=173093

Unreviewed GTK gardening.

r147201 added a crash expectation for the following test, but did so in a manner
that failed linter checks:

LayoutTests/platform/gtk/TestExpectations:1302 More specific entry for

http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients.html on line
LayoutTests/platform/gtk/TestExpectations:992 overrides line LayoutTests/platform/gtk/TestExpectations:1302.
http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients.html

Furthermore, this test no longer crashes in Debug builds, it fails due to whitespace
oddities that are addressed by webkit.org/b/141709 (unreviewed)

Patch by Charlie Turner <cturner@igalia.com> on 2017-06-08

  • platform/gtk/TestExpectations:
6:10 AM Changeset in webkit [217928] by calvaris@igalia.com
  • 8 edits in trunk

MediaTime class has rounding issues in different platforms
https://bugs.webkit.org/show_bug.cgi?id=172640

Reviewed by Jer Noble.

Source/WTF:

The way a timescale is set when creating a MediaTime from a double
can create rounding issues in different platforms because in some
rounding is made and in others, it truncates. This way we ensure a
common behavior.

Dumping MediaTimes is also confusing and by the output you don't
know if it's containing a double or a fraction. Now, if it
contains a double, it only prints the double because printing the
fraction is misleading (it currently prints the double read as an
integer) and if it contains a fraction it shows the fraction and
its double representation separated by an = instead of a ,.

  • wtf/MediaTime.cpp:

(WTF::MediaTime::createWithDouble): When creating MediaTime from
double, we round instead of leaving it to the cast operation.
(WTF::MediaTime::dump):

LayoutTests:

Update expectations because the MediaTime printing changed, but
results are the same.

  • media/media-source/media-source-overlapping-append-expected.txt:
  • media/media-source/media-source-overlapping-decodetime-expected.txt:
  • media/media-source/media-source-seek-back-expected.txt:
  • media/media-source/media-source-sequence-timestamps-expected.txt:
  • media/media-source/media-source-timeoffset-expected.txt:
3:16 AM Changeset in webkit [217927] by magomez@igalia.com
  • 6 edits in trunk/Source/WebCore

[GTK][WPE][GSTREAMER_GL] Change the colorspace used by the video frames provided by GStreamer
https://bugs.webkit.org/show_bug.cgi?id=173050

Reviewed by Žan Doberšek.

We are currently requesting RGBA as the color format of the video frames to gstreamer. This is a problem
because when those frames are rendered with the CPU, the R and B components are swapped as cairo expects
ARGB and GStreamer delivers ABGR.

In order to fix this without performing color conversions on the CPU, what we do is change the format
used by GStreamer for the video frames. We do that taking into account the endianness used. So with
little endian we will use BGRx or BGRA and with big endian xRGB or ARGB. Thanks to this, when downloading
the frames to the CPU they will automatically be turned into the ARGB expected by cairo. Also, when
rendering the frames using OpenGL, we indicate that the color space needs to be converted to the RGBA
expected by the destination texture (but this color conversion is performed by the GPU so there's no
penalty).

Covered by existent tests.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:

(WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::updateColorConversionMatrix):
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::colorSpaceMatrixForFlags):

  • platform/graphics/texmap/TextureMapperGL.h:
12:30 AM Changeset in webkit [217926] by rniwa@webkit.org
  • 4 edits in trunk

IsInShadowTreeFlag does not get updated for a non-container node
https://bugs.webkit.org/show_bug.cgi?id=173084

Reviewed by Antti Koivisto.

.:

  • WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

Source/WebCore:

insertedInto and removedFrom were only called on ContainerNode nodes when they're not connected to a document.
As a result IsInShadowTreeFlag could have gotten out-of-date when a node was inserted or removed from a shadow root
which is not connected to a document.

Fixed this inconsistency by always falling insertedInto and removedFrom on all nodes.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyNodeInsertedIntoDocument): Merged notifyDescendantInsertedIntoDocument. Now takes a Node instead
of a ContainerNode.
(WebCore::notifyNodeInsertedIntoTree): Merged notifyDescendantInsertedIntoTree. Now takes a Node instead of
a ContainerNode.
(WebCore::notifyChildNodeInserted): Always call notifyNodeInsertedIntoTree on an inserted node.
(WebCore::notifyNodeRemovedFromDocument): Now takes a Node instead of a ContainerNode.
(WebCore::notifyNodeRemovedFromTree): Ditto.
(WebCore::notifyChildNodeRemoved): Always call notifyNodeRemovedFromTree on an inserted node.
(WebCore::addChildNodesToDeletionQueue): Directly call adoptIfNeeded on document() since onwerDocument() only returns
nullptr on a Document node but this function is never called on a root node and Document can only be a root node.
Also assert that a node not put into the deletion queue is no longer in a document or a shadow tree.

  • dom/Node.cpp:

(WebCore::Node::insertedInto): Removed the assertion that's no longer true.
(WebCore::Node::removedFrom): Ditto.

Jun 7, 2017:

11:48 PM Changeset in webkit [217925] by Carlos Garcia Campos
  • 6 edits in trunk

[WPE] Enable resource usage
https://bugs.webkit.org/show_bug.cgi?id=173054

Reviewed by Žan Doberšek.

.:

Add private option for resource usage enabled by default.

  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Add resource usage linux files to the compilation.

  • PlatformWPE.cmake:

Source/WebKit2:

Enable/disable the resources overlay with CTRL + Shift + G.

  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::m_compositingManagerProxy):

11:46 PM Changeset in webkit [217924] by Carlos Garcia Campos
  • 20 edits
    2 deletes in trunk

Remove legacy INSPECTOR_SERVER implementation
https://bugs.webkit.org/show_bug.cgi?id=172966

Reviewed by Žan Doberšek.

.:

  • Source/PlatformWin.cmake:

Source/WebInspectorUI:

Remove InspectorFrontendHostStub and thr web sockets initialization.

  • UserInterface/Base/InspectorFrontendHostStub.js: Removed.
  • UserInterface/Base/Main.js:

(WebInspector.loaded):

  • UserInterface/Main.html:
  • UserInterface/Test.html:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

Source/WebKit2:

  • CMakeLists.txt:
  • Platform/Logging.h:
  • PlatformWPE.cmake:
  • UIProcess/InspectorServer/HTTPRequest.cpp: Removed.
  • UIProcess/InspectorServer/HTTPRequest.h: Removed.
  • UIProcess/InspectorServer/WebInspectorServer.cpp: Removed.
  • UIProcess/InspectorServer/WebInspectorServer.h: Removed.
  • UIProcess/InspectorServer/WebSocketServer.cpp: Removed.
  • UIProcess/InspectorServer/WebSocketServer.h: Removed.
  • UIProcess/InspectorServer/WebSocketServerClient.h: Removed.
  • UIProcess/InspectorServer/WebSocketServerConnection.cpp: Removed.
  • UIProcess/InspectorServer/WebSocketServerConnection.h: Removed.
  • UIProcess/InspectorServer/front-end/inspectorPageIndex.html: Removed.
  • UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp: Removed.
  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::invalidate):

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

(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::preferencesDidChange):

  • UIProcess/wpe/WebProcessPoolWPE.cpp:
  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::sendMessageToFrontend):

  • WebProcess/WebPage/WebInspector.h:
  • WebProcess/WebPage/WebInspector.messages.in:
10:02 PM Changeset in webkit [217923] by mitz@apple.com
  • 6 edits in trunk

Source/WebKit2:
[Cocoa] additionalReadAccessAllowedURLs doesn’t preserve non-Latin-1 paths
https://bugs.webkit.org/show_bug.cgi?id=173086

Reviewed by Andy Estes.

We were incorrectly passing the fileSystemRepresentation of an NSURL into the WTF::String
constructor that expects a Latin-1 string. However, in general, fileSystemRepresentation is
not Latin-1.

  • UIProcess/API/APIProcessPoolConfiguration.h: Changed m_additionalReadAccessAllowedPaths from a Vector<WTF::String> into a Vector<WTF::CString>.
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration additionalReadAccessAllowedURLs]): Updated for the change.
(-[_WKProcessPoolConfiguration setAdditionalReadAccessAllowedURLs:]): Ditto.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::resolvePathsForSandboxExtensions): Ditto.

Tools:
[Cocoa] additionalReadAccessAllowedURLs doesn’t preserve non-Latin1 paths
https://bugs.webkit.org/show_bug.cgi?id=173086

Reviewed by Andy Estes.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AdditionalReadAccessAllowedURLs.mm:

(TEST):

9:46 PM Changeset in webkit [217922] by ap@apple.com
  • 10 edits
    3 adds in trunk

Add High Sierra support to WebKit tools
https://bugs.webkit.org/show_bug.cgi?id=173080

Rubber-stamped by Daniel Bates.

Tools:

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/HighSierra.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/HighSierra@2x.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:

Added dashboard support.

  • BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
  • BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:

Trigger the right build queues on check-in.

  • Scripts/webkitpy/common/system/platforminfo.py:
  • Scripts/webkitpy/common/system/platforminfo_unittest.py:
  • Scripts/webkitpy/layout_tests/models/test_expectations.py:
  • Scripts/webkitpy/port/mac.py:
  • Scripts/webkitpy/port/mac_unittest.py:
  • TestResultServer/static-dashboards/flakiness_dashboard.js:

Added cases for Sierra, and updated tests for new baseline search paths.

LayoutTests:

  • platform/mac-sierra: Added an empty directory to avoid breaking scripts.
9:43 PM Changeset in webkit [217921] by jfbastien@apple.com
  • 11 edits
    1 add in trunk

WebAssembly: test imports and exports with 16-bit characters
https://bugs.webkit.org/show_bug.cgi?id=165977
<rdar://problem/29760130>

Reviewed by Saam Barati.

JSTests:

The output for import failure was improved, so many tests need to
be updated here. Only one has new tests as noted below.

  • wasm/function-tests/memory-import-and-grow.js:
  • wasm/js-api/Instance.imports.exports.unicode.js: Added. Main new test.

(idxModule):

  • wasm/js-api/global-error.js:

(new.Number):
(assert.throws):

  • wasm/js-api/table.js:

(assert.throws):
(new.WebAssembly.Table):

  • wasm/js-api/test_memory.js:

(test):

  • wasm/js-api/wasm-to-wasm-bad-signature.js:

(BadSignatureDropStartParams.):
(BadSignatureDropStartParams):
(BadSignatureDropEndParams.):
(BadSignatureSwapParam.):
(BadSignatureRet.):

  • wasm/js-api/web-assembly-instantiate.js:

(assert.asyncTest.async.test):
(assert.asyncTest):

  • wasm/js-api/wrapper-function.js:

(return.new.WebAssembly.Module):

Source/JavaScriptCore:

Add the missing UTF-8 conversions. Improve import failure error
messages, otherwise it's hard to figure out which import is wrong.

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::create):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::finishCreation):
(JSC::WebAssemblyModuleRecord::link):

9:42 PM Changeset in webkit [217920] by ap@apple.com
  • 2 edits in trunk

Add High Sierra support to WebKit tools
https://bugs.webkit.org/show_bug.cgi?id=173080

Rubber-stamped by Daniel Bates.

Tools:

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/HighSierra.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/HighSierra@2x.png: Added.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:

Added dashboard support.

  • BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
  • BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:

Trigger the right build queues on check-in.

  • Scripts/webkitpy/common/system/platforminfo.py:
  • Scripts/webkitpy/common/system/platforminfo_unittest.py:
  • Scripts/webkitpy/layout_tests/models/test_expectations.py:
  • Scripts/webkitpy/port/mac.py:
  • Scripts/webkitpy/port/mac_unittest.py:
  • TestResultServer/static-dashboards/flakiness_dashboard.js:

Added cases for Sierra, and updated tests for new baseline search paths.

LayoutTests:

  • platform/mac-sierra: Added an empty directory to avoid breaking scripts.
9:31 PM Changeset in webkit [217919] by jer.noble@apple.com
  • 8 edits in trunk

[Web Audio] createScriptProcessor throws IndexSizeError for valid arguments
https://bugs.webkit.org/show_bug.cgi?id=173022

Reviewed by Sam Weinig.

Source/WebCore:

Updated test: webaudio/javascriptaudionode.html

The Web Audio spec (<https://webaudio.github.io/web-audio-api/>, 06 June 2017) defines a default behavior when
clients pass in a value of 0 for bufferSize to the createScriptProcessor() method.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::createScriptProcessor):

  • Modules/webaudio/AudioContext.idl:
  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::create):

  • Modules/webaudio/ScriptProcessorNode.h:

LayoutTests:

  • webaudio/javascriptaudionode-expected.txt:
  • webaudio/javascriptaudionode.html:
9:05 PM Changeset in webkit [217918] by ggaren@apple.com
  • 6 edits in trunk/Source/bmalloc

bmalloc: memory APIs don't need to be heap members
https://bugs.webkit.org/show_bug.cgi?id=173076

Reviewed by Sam Weinig.

Asking the OS about memory use is unrelated to the state of bmalloc's
heap, so it's a better separation of concerns if related code is not
part of the heap.

  • bmalloc/AvailableMemory.cpp:

(bmalloc::memoryStatus):

  • bmalloc/AvailableMemory.h:

(bmalloc::MemoryStatus::MemoryStatus):
(bmalloc::isUnderMemoryPressure):
(bmalloc::memoryFootprint):
(bmalloc::percentAvailableMemoryInUse):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):
(bmalloc::Heap::updateMemoryInUseParameters): Deleted.

  • bmalloc/Heap.h:

(bmalloc::Heap::isUnderMemoryPressure): Deleted.
(bmalloc::Heap::memoryFootprint): Deleted.
(bmalloc::Heap::percentAvailableMemoryInUse): Deleted.

8:32 PM Changeset in webkit [217917] by Chris Dumez
  • 11 edits
    3 adds in trunk

CSSStyleRule.style / CSSPageRule.style / CSSKeyframeRule.style should be settable
https://bugs.webkit.org/show_bug.cgi?id=164537
<rdar://problem/29181773>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/cssom/CSSKeyframeRule-expected.txt:
  • web-platform-tests/cssom/CSSKeyframeRule.html:
  • web-platform-tests/cssom/CSSStyleRule-expected.txt:
  • web-platform-tests/cssom/CSSStyleRule.html:

Re-sync web-platform tests after:

This extends test coverage.

  • web-platform-tests/cssom/interfaces-expected.txt:

Rebaseline now that more checks are passing.

Source/WebCore:

CSSStyleRule.style / CSSPageRule.style / CSSKeyframeRule.style should be settable
as per:

Tests:
http/wpt/cssom/CSSPageRule.html
imported/w3c/web-platform-tests/cssom/CSSKeyframeRule.html
imported/w3c/web-platform-tests/cssom/CSSStyleRule.html
imported/w3c/web-platform-tests/cssom/interfaces.html

  • css/CSSKeyframeRule.idl:
  • css/CSSPageRule.idl:
  • css/CSSStyleRule.idl:

LayoutTests:

Add better test coverage for CSSPageRule. This test is being upstreamed via:

  • http/wpt/cssom/CSSPageRule-expected.txt: Added.
  • http/wpt/cssom/CSSPageRule.html: Added.
8:25 PM Changeset in webkit [217916] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

[WebIDL] Split up attribute generation to match operation generation
https://bugs.webkit.org/show_bug.cgi?id=173072

Patch by Sam Weinig <sam@webkit.org> on 2017-06-07
Reviewed by Chris Dumez.

  • bindings/js/JSDOMAttribute.h:

(WebCore::IDLAttribute::setStatic):
(WebCore::IDLAttribute::getStatic):
Add static variants of get/set matching the one in IDLOperation.

  • bindings/scripts/CodeGeneratorJS.pm:

(GetFullyQualifiedImplementationCallName):
Factor out duplicate code to compute the qualified name for a function call.

(AddAdditionalArgumentsForImplementationCall):
Factor out duplicate code to compute the some standard arguments for a function
call. We may want to merge this with GenerateCallWith.

(GenerateHeader):
Update for new signature of HasCustom... subroutines.

(GenerateImplementation):
Pass @implContent to more helper generators to continue propagating the idiom.

(GenerateAttributeGetterBodyDefinition):
(GenerateAttributeGetterTrampolineDefinition):
(GenerateAttributeGetterDefinition):
(GenerateAttributeSetterBodyDefinition):
(GenerateAttributeSetterTrampolineDefinition):
(GenerateAttributeSetterDefinition):
Split attribute getter and setter generation up by having separate subroutines
to generate the trampoline and body. Also, make all attributes, even static ones
use a trampoline to simplify the code. Static attributes got through a no-op
trampoline, that gets compiled away. Also adopt GetFullyQualifiedImplementationCallName
and AddAdditionalArgumentsForImplementationCall to reduce duplication.

(GenerateOperationBodyDefinition):
(GenerateOperationDefinition):
Adopt $outputArray idiom and adopt GetFullyQualifiedImplementationCallName
and AddAdditionalArgumentsForImplementationCall to reduce duplication

(GenerateParametersCheck):
Adopt GetFullyQualifiedImplementationCallName and AddAdditionalArgumentsForImplementationCall
to reduce duplication.

(HasCustomGetter):
(HasCustomSetter):
(HasCustomMethod):
Convert HasCustom... subroutines to take an IDLAttribute rather than the extended
attributes, matching other predicates

  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

Update test results.

8:12 PM Changeset in webkit [217915] by commit-queue@webkit.org
  • 4 edits in trunk

RTCTrackEvent.track should be found in RTCTrackEvent.streams[0]
https://bugs.webkit.org/show_bug.cgi?id=173074

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

Source/WebCore:

Covered by updated test.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::addTrackFromPlatform):

LayoutTests:

  • webrtc/video.html:
8:10 PM Changeset in webkit [217914] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit2

Crash inside WebKit::PluginView::getAuthenticationInfo
https://bugs.webkit.org/show_bug.cgi?id=173083

Reviewed by Chris Dumez.

Added a null pointer check. The content document may have went away by the time we get there from IPC.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::getAuthenticationInfo):

5:51 PM Changeset in webkit [217913] by Ryan Haddad
  • 4 edits in trunk/Tools

Unreviewed, rolling out r217902.

This change appears to have caused imported/w3c/web-platform-
tests/fetch/api/cors tests to fail on El Capitan.

Reverted changeset:

"Teach run-webkit-tests how to run HTTPS Web Platform Tests"
https://bugs.webkit.org/show_bug.cgi?id=172930
http://trac.webkit.org/changeset/217902

5:05 PM Changeset in webkit [217912] by Devin Rousso
  • 14 edits
    1 move
    2 adds
    2 deletes in trunk

Web Inspector: Add ContextMenu item to log WebSocket object to console
https://bugs.webkit.org/show_bug.cgi?id=172878

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:

Add resolveWebSocket command.

Source/WebCore:

Test: http/tests/websocket/tests/hybi/inspector/resolveWebSocket.html

  • inspector/InspectorNetworkAgent.h:
  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::InspectorNetworkAgent):
(WebCore::InspectorNetworkAgent::webSocketForRequestId):
(WebCore::webSocketAsScriptValue):
(WebCore::InspectorNetworkAgent::resolveWebSocket):
Loops over the static allActiveWebSockets to find one with the given requestId. If found, it
will create a RemoteObject wrapper for it and send it back to the inspector.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Protocol/RemoteObject.js:

(WebInspector.RemoteObject.resolveWebSocket):

  • UserInterface/Views/ResourceTreeElement.js:

(WebInspector.ResourceTreeElement.prototype.populateContextMenu):

LayoutTests:

  • http/tests/websocket/tests/hybi/inspector/resolveWebSocket-expected.txt: Added.
  • http/tests/websocket/tests/hybi/inspector/resolveWebSocket.html: Added.
  • http/tests/websocket/tests/hybi/inspector/before-load-expected.txt:
  • http/tests/websocket/tests/hybi/inspector/before-load.html:
  • http/tests/websocket/tests/hybi/inspector/before-load_wsh.py: Removed.
  • http/tests/websocket/tests/hybi/inspector/client-close.html:
  • http/tests/websocket/tests/hybi/inspector/client-close_wsh.py: Removed.
  • http/tests/websocket/tests/hybi/inspector/send-and-receive.html:
  • http/tests/websocket/tests/hybi/inspector/send-and-receive_wsh.py: Removed.
  • http/tests/websocket/tests/hybi/inspector/echo.py: Added.

(web_socket_do_extra_handshake):
(web_socket_transfer_data):
Unified common configurations for Inspector WebSocket tests.

4:53 PM Changeset in webkit [217911] by Devin Rousso
  • 9 edits
    2 adds in trunk

Web Inspector: Allow user to choose stylesheet when creating new rules
https://bugs.webkit.org/show_bug.cgi?id=172487

Reviewed by Joseph Pecoraro.

Source/WebCore:

New test: inspector/css/add-rule.html

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyleSheet::addRule):
Reparse the content when a new rule is added to a non-inspector origin stylesheet.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/DOMNodeStyles.js:

(WebInspector.DOMNodeStyles.prototype.addRule.inspectorStyleSheetAvailable):
(WebInspector.DOMNodeStyles.prototype.addRule):

  • UserInterface/Views/CSSStyleDetailsSidebarPanel.js:

(WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._newRuleButtonContextMenu):

  • UserInterface/Views/RulesStyleDetailsPanel.js:

(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonContextMenu):

  • UserInterface/Views/VisualStyleSelectorSection.js:

(WebInspector.VisualStyleSelectorSection):
(WebInspector.VisualStyleSelectorSection.prototype._addNewRuleContextMenu):
(WebInspector.VisualStyleSelectorSection.prototype._addNewRule): Renamed _addNewRuleClick.

LayoutTests:

  • inspector/css/add-rule-expected.html: Added.
  • inspector/css/add-rule.html: Added.
4:27 PM Changeset in webkit [217910] by commit-queue@webkit.org
  • 16 edits
    4 adds in trunk

getUserMedia is prompting too often
https://bugs.webkit.org/show_bug.cgi?id=172859
<rdar://problem/32589950>

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

Source/WebCore:

Tests: fast/mediastream/getUserMedia-grant-persistency-reload.html

fast/mediastream/getUserMedia-grant-persistency.html

  • loader/FrameLoaderClient.h:
  • page/Frame.cpp:

(WebCore::Frame::setDocument): Allows notifying of change of main frame document.
UIProcess will use that to remove unneeded previously granted gum permission.

Source/WebKit2:

Introduce a storage of granted requests to skip prompting when needed.
This is a partial implementation as granted requests should not happen for background tabs.
This will be covered in a follow-up patch.
Covered by manual tests.

A granted request keeps its mainFrameID.
Whenever the document of the main frame changes, the granted requests for that mainFrameID will be removed.
This handles the case of navigating, reloading... while still supporting the case of granting getUserMedia after in page navigation.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::removeGrantedAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::grantAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaPermissionRequestProxy.cpp:

(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):

  • UIProcess/UserMediaPermissionRequestProxy.h:

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::mainFrameID):
(WebKit::UserMediaPermissionRequestProxy::frameID):
(WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didChangeMainDocument):
(WebKit::WebPageProxy::backForwardGoToItem):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidChangeMainDocument):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

LayoutTests:

  • fast/mediastream/getUserMedia-grant-persistency-expected.txt: Added.
  • fast/mediastream/getUserMedia-grant-persistency-reload-expected.txt: Added.
  • fast/mediastream/getUserMedia-grant-persistency-reload.html: Added.
  • fast/mediastream/getUserMedia-grant-persistency.html: Added.
  • http/tests/media/media-stream/get-user-media-prompt-expected.txt:
  • http/tests/media/media-stream/get-user-media-prompt.html: Last gum does not need a prompt anymore.
3:39 PM Changeset in webkit [217909] by mark.lam@apple.com
  • 2 edits in trunk/JSTests

Restrict the regress-173035.js test to only run on Darwin x86-64.
https://bugs.webkit.org/show_bug.cgi?id=173075

Reviewed by Saam Barati.

This is because the 32-bit x86 build will fail to mmap the 0x3f900000 bytes that
this test will require to succeed. Here's an example of this failure:
https://build.webkit.org/builders/Apple%20Sierra%2032-bit%20JSC%20%28BuildAndTest%29/builds/866/steps/webkit-32bit-jsc-test/logs/stdio

Since the issue is due to allocation of a very large amount of memory, the test
will probably fail on iOS and other platforms as well. Hence, we should just
skip this test for any platforms that is not Darwin x86-64.

  • stress/regress-173035.js:
3:26 PM Changeset in webkit [217908] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

[Cocoa] additionalReadAccessAllowedURLs should be consumed before loading the injected bundle
https://bugs.webkit.org/show_bug.cgi?id=173078

Reviewed by Anders Carlsson.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess): Changed the order.

3:21 PM Changeset in webkit [217907] by Chris Dumez
  • 7 edits
    2 adds in trunk

Align <col span>/<colgroup span> limits with the latest HTML specification
https://bugs.webkit.org/show_bug.cgi?id=173049

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Resync web-platform-tests after:
https://github.com/w3c/web-platform-tests/pull/6172

This helps gain coverage for the change in this patch.

  • resources/import-expectations.json:
  • web-platform-tests/html/dom/elements-tabular.js:
  • web-platform-tests/html/dom/reflection-tabular-expected.txt:
  • web-platform-tests/html/semantics/tabular-data/processing-model-1/col-span-limits-expected.txt: Added.
  • web-platform-tests/html/semantics/tabular-data/processing-model-1/col-span-limits.html: Added.
  • web-platform-tests/html/semantics/tabular-data/processing-model-1/w3c-import.log:

Source/WebCore:

Align <col span>/<colgroup span> limits with the latest HTML specification after:

In particular, col / colspan's span attribute is now clamped to the [1, 1000] range.

Test: imported/w3c/web-platform-tests/html/semantics/tabular-data/processing-model-1/col-span-limits.html

[1] https://html.spec.whatwg.org/#dom-colgroup-span
[2] https://html.spec.whatwg.org/#clamped-to-the-range
[3] https://github.com/whatwg/html/pull/2734/files

  • html/HTMLTableColElement.cpp:

(WebCore::HTMLTableColElement::parseAttribute):
As per [1][2], the span attribute should be clamped to the range [1, 1000] with a default value of 1 (on getting).

(WebCore::HTMLTableColElement::setSpan):
As per [2], on setting, we should behave the same as setting a regular reflected unsigned integer when an attribute
is clamped to a range. Therefore, we now call limitToOnlyHTMLNonNegative() instead of
limitToOnlyHTMLNonNegativeNumbersGreaterThanZero(). We used to call limitToOnlyHTMLNonNegativeNumbersGreaterThanZero()
because the value used to be limited to only non-negative numbers greater than zero with fallback before [3]. Without
this change, "col.span = 0" would set the content attribute to 1 instead of 0, which would be wrong.

3:18 PM Changeset in webkit [217906] by jer.noble@apple.com
  • 3 edits
    1 add in trunk/Source/WebCore

Exempt exclusively wall-powered devices from hardware codec requirement
https://bugs.webkit.org/show_bug.cgi?id=173009

Reviewed by Eric Carlson.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:

(WebCore::systemHasBattery):
(WebCore::assetTrackMeetsHardwareDecodeRequirements):

  • platform/spi/cocoa/IOPSLibSPI.h: Added.
3:15 PM Changeset in webkit [217905] by jer.noble@apple.com
  • 22 edits in trunk/Source

Refactoring: MediaEngineSupportParameters should take a ContentType rather than separate type & codecs strings
https://bugs.webkit.org/show_bug.cgi?id=173038

Reviewed by Eric Carlson.

Source/WebCore:

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::isTypeSupported):

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createDocument):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::selectNextSourceChild):

  • platform/ContentType.cpp:

(WebCore::ContentType::codecsParameter):
(WebCore::ContentType::profilesParameter):
(WebCore::ContentType::containerType):
(WebCore::simplifyWhitespace):
(WebCore::ContentType::codecs):
(WebCore::ContentType::profiles):
(WebCore::ContentType::type): Deleted.

  • platform/ContentType.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::bestMediaEngineForSupportParameters):
(WebCore::MediaPlayer::load):
(WebCore::MediaPlayer::nextBestMediaEngine):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::supportsType):
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::codecs): Deleted.

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayer::contentMIMEType):
(WebCore::MediaPlayer::contentTypeCodecs):

  • platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:

(WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::MediaPlayerPrivateAVFoundationCF::supportsType):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:

(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::supportsType):

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

(WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):

  • platform/graphics/mac/MediaPlayerPrivateQTKit.mm:

(WebCore::MediaPlayerPrivateQTKit::supportsType):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::supportsType):

  • platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:

(WebCore::MockMediaPlayerMediaSource::supportsType):

  • platform/mock/mediasource/MockMediaSourcePrivate.cpp:

(WebCore::MockMediaSourcePrivate::addSourceBuffer):

Source/WTF:

Drive by fix: add a version of split that takes a UChar and returns a Vector<String>.

  • wtf/text/WTFString.h:

(WTF::String::split):

3:07 PM Changeset in webkit [217904] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Use a dedicated node flag to identify a Document node
https://bugs.webkit.org/show_bug.cgi?id=173037

Reviewed by Chris Dumez.

Address Antti's review comment. We don't need a new Node flg.

  • dom/Node.h:

(WebCore::Node::isDocumentNode):

2:35 PM Changeset in webkit [217903] by Jon Davis
  • 4 edits in trunk/Source

Update feature status for features Supported In Preview
https://bugs.webkit.org/show_bug.cgi?id=173071

Reviewed by Darin Adler.

Source/JavaScriptCore:

Updated Media Capture and Streams, Performance Observer, Resource Timing Level 2,
User Timing Level 2, Web Cryptography API, WebGL 2, WebRTC.

  • features.json:

Source/WebCore:

Updated WebAssembly.

  • features.json:
1:25 PM Changeset in webkit [217902] by dbates@webkit.org
  • 4 edits in trunk/Tools

Teach run-webkit-tests how to run HTTPS Web Platform Tests
https://bugs.webkit.org/show_bug.cgi?id=172930
<rdar://problem/32570201>

Reviewed by Youenn Fablet.

Some web platform tests need to be run from an HTTPS server in order to exercise functionality
that is conditioned on the page being delivered over a secure protocol. One example of such
a test is LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/secure_context/crypto-subtle-secure-context-available.https.sub.html.

Ideally we should look to use wptrunner to run Web Platform Tests. For now, modify run-webkit-tests
to access web platform tests from an HTTPS server when the filename of the test contains ".https.".
This makes run-webkit-test match the behavior of wptrunner: <https://github.com/w3c/web-platform-tests/blob/7ce469d1c46dd45aacfe1b408bf2ad36a630e089/tools/manifest/item.py#L42>.

  • Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:

(https_base_url): Parses the Web Platform Tests JSON configuration and returns the base URL
to the Web Platform Tests HTTPS server.

  • Scripts/webkitpy/port/base.py:

(Port.to.web_platform_test_server_https_base_url): Turns around and calls https_base_url().

  • Scripts/webkitpy/port/driver.py:

(Driver.init): Caches the base URL to the Web Platform Tests HTTPS server. Also rename
instance variables web_platform_test_server_doc_root, web_platform_test_server_base_url to
_web_platform_test_server_doc_root and _web_platform_test_server_base_url, respectively to
indicate that they should be considered private instance variables.
(Driver.is_web_platform_test): Update code for renamed instance variables.
(Driver):
(Driver._web_platform_test_base_url_for_test): Returns the URL to access the specified test.
(Driver.test_to_uri): Modified to use Driver._web_platform_test_base_url_for_test() to
determine the base URL to use to access the test.
(Driver.uri_to_test): Added logic to compute the filesystem local test name from a Web
Platform Tests HTTPS URL. Also updated code for renamed instance variables.

1:10 PM Changeset in webkit [217901] by dbates@webkit.org
  • 1 edit
    2 adds in trunk/LayoutTests

Fetching Blob URLs with XHR gives null content-type and content-length
https://bugs.webkit.org/show_bug.cgi?id=137647
<rdar://problem/18215114>

Reviewed by Darin Adler.

Add a test to ensure that we do not regress the computed Content-Type and Content-Length
for a blob URL fetched using XHR.

  • fast/xmlhttprequest/xmlhttprequest-blob-url-has-valid-response-type-and-size-expected.txt: Added.
  • fast/xmlhttprequest/xmlhttprequest-blob-url-has-valid-response-type-and-size.html: Added.
12:59 PM Changeset in webkit [217900] by mark.lam@apple.com
  • 2 edits in trunk/JSTests
ASSERTION failure: !masqueradesAsUndefinedWatchpointIsStillValid()
!isKnownCell(operand.node())

https://bugs.webkit.org/show_bug.cgi?id=168587

Not reviewed.

Unskipping the test because the issue has been fixed in https://bugs.webkit.org/show_bug.cgi?id=172673.

  • stress/test-finally.js:
12:32 PM Changeset in webkit [217899] by zandobersek@gmail.com
  • 3 edits
    18 adds in trunk/LayoutTests

Unreviewed GTK+ and WPE gardening.

Add platform-specific test baselines for layout tests where the
libgcrypt-based implementation passes more tests than the generic
baselines expect. The WPE test expectations for these tests are
also cleaned up a bit, and the tests are marked as slow to give
them more time to properly execute.

  • platform/gtk/TestExpectations: Skip two imported W3C Web Crypto API tests that rely in SPKI and PKCS#8 imports.
  • platform/wpe/TestExpectations: Ditto.
  • platform/wpe/crypto: Added.
  • platform/wpe/crypto/subtle: Added.
  • platform/wpe/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt: Added.
  • platform/wpe/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt: Added.
  • platform/wpe/imported: Added.
  • platform/wpe/imported/w3c: Added.
  • platform/wpe/imported/w3c/web-platform-tests: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-PSS.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-PSS.https-expected.txt: Added.
12:21 PM Changeset in webkit [217898] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 32

Added a tag for Safari Technology Preview release 32.

12:13 PM Changeset in webkit [217897] by sbarati@apple.com
  • 6 edits in trunk

ARES-6 incorrectly measures Worst 4 Iterations
https://bugs.webkit.org/show_bug.cgi?id=172960

Reviewed by Mark Lam.

Version 1.0 of ARES-6 was accidentally measuring the first
4 iterations, instead of the worst 4. This patch fixes the
bug and bumps the version to 1.0.1.

  • ARES-6/glue.js:

(driver.reportResult):

  • ARES-6/results.js:

(Results.prototype.reportResult):

12:12 PM Changeset in webkit [217896] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Assertion failure in com.apple.WebKit.WebContent.Development in com.apple.JavaScriptCore: JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined + 141
https://bugs.webkit.org/show_bug.cgi?id=172673
<rdar://problem/32250144>

Reviewed by Mark Lam.

This patch simply removes this assertion. It's faulty because it
races with the main thread when doing concurrent compilation.

Consider a program with:

  • a FrozenValue over an object O and Structure S1. S1 starts off as dfgWatchable() being true.
  • Structure S2

The DFG IR is like so:

a: JSConstant(O) FrozenValue {O, S1}
b: CheckStructure(@a, S2)
c: ToThis(@a)
d: CheckEq(@c, nullConstant)
Branch(@d)

The AbstractValue for @a will start off as having a finite structure because S1 is dfgWatchable().
When running AI, we'll notice that node @b will OSR exit, so nodes after
@b are unreachable. Later in the compilation, S1 is no longer dfgWatchable().
Now, when running AI, @a will have Top for its structure set. No longer will
we think @b exits.

The DFG backend asserts that under such a situation, we should have simplified
the CheckEq to false. However, this is a racy thing to assert, since the
transition from dfgWatchable() to !dfgWatchable() can happen right before we
enter the backend. Hence, this assertion is not valid.

(Note, the generated code for the above program will never actually execute.
Since we noticed S1 as dfgWatchable(), we make the compilation dependent on
S1 not transitioning. S1 transitions, so we won't actually run the code that
gets compiled.)

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined):

11:57 AM Changeset in webkit [217895] by weinig@apple.com
  • 8 edits in trunk

[WebIDL] PutForwards is not implemented to spec as illustrated by the WPT WebIDL/ecmascript-binding/put-forwards.html
https://bugs.webkit.org/show_bug.cgi?id=172956

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update results to show we now implement [PutForwards] correctly.

  • web-platform-tests/WebIDL/ecmascript-binding/put-forwards-expected.txt:

Source/WebCore:

Implements step 3.5.9 of https://heycam.github.io/webidl/#dfn-attribute-setter.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateAttributeSetterDefinition):
Implement [PutForwards] to spec, which involves using JSC get/set rather than calling
directly into the implementation.

  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:

Update test results.

LayoutTests:

  • http/tests/security/xss-DENIED-contentWindow-eval-expected.txt:

Update results to show that we now throw a type error, because the action now requires
an explicit get of the location object, which does not work in the context.

11:41 AM Changeset in webkit [217894] by commit-queue@webkit.org
  • 2 edits in trunk

[CMake] Only force response files for Ninja with CMake < 3.2 on Linux
https://bugs.webkit.org/show_bug.cgi?id=173066

Patch by Loïc Yhuel <loic.yhuel@softathome.com> on 2017-06-07
Reviewed by Michael Catanzaro.

CMake automatically uses response files when needed, but the limit was
wrong on Linux before 3.2.

  • Source/cmake/OptionsCommon.cmake:
10:44 AM Changeset in webkit [217893] by jer.noble@apple.com
  • 22 edits in trunk/Source

Clean-up: RenderElement.h includes headers it doesn't use
https://bugs.webkit.org/show_bug.cgi?id=173046

Reviewed by Andy Estes.

Source/WebCore:

Remove a couple of unneeded includes from RenderElement.h, and then clean up all the
follow-on compile errors that causes. Mostly, these errors are fixed by including the
correct headers at the point of use; otherwise, they're solved by forward-declaring types
and in one case by moving default constructors implementation to the cpp file from the header.

  • css/parser/SizesAttributeParser.cpp:
  • editing/cocoa/EditorCocoa.mm:
  • platform/mac/PasteboardMac.mm:
  • rendering/InlineIterator.h:

(WebCore::embedCharFromDirection):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderElement.cpp:
  • rendering/RenderElement.h:
  • rendering/RenderIterator.h:
  • rendering/RenderLineBreak.cpp:
  • rendering/RenderQuote.cpp:
  • rendering/RenderText.h:
  • rendering/SimpleLineLayoutPagination.cpp:
  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:
  • rendering/TextAutoSizing.cpp:
  • rendering/style/RenderStyle.cpp:
  • rendering/style/RenderStyle.h:
  • style/RenderTreeUpdater.cpp:
  • style/StyleResolveForDocument.cpp:
  • style/StyleTreeResolver.cpp:

Source/WebKit/mac:

  • WebView/WebImmediateActionController.mm:
10:40 AM Changeset in webkit [217892] by graouts@webkit.org
  • 17 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/controls-visibility-support
https://bugs.webkit.org/show_bug.cgi?id=173060
<rdar://problem/32616840>

Reviewed by Eric Carlson.

We only check the "visible" property on the MediaControls instance which is the only thing being
set by this class now. We also fix entering fullscreen by not using a <button> element which has
some default styles set by the Button class. Finally, we make some videoTracks.length assertions
asynchronous to avoid timing issues.

  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio-expected.txt:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio.html:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-expected.txt:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off.html:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio-expected.txt:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio.html:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-expected.txt:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on.html:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle-expected.txt:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle.html:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element-expected.txt:
  • 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-expected.txt:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html:
10:37 AM Changeset in webkit [217891] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/buttons-container
https://bugs.webkit.org/show_bug.cgi?id=173059
<rdar://problem/32616156>

Reviewed by Eric Carlson.

The only change is the default margin for a ButtonsContainer.

  • media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt:
  • media/modern-media-controls/buttons-container/buttons-container-constructor.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
10:36 AM Changeset in webkit [217890] by graouts@webkit.org
  • 4 edits
    2 copies
    4 adds
    1 delete in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/button
https://bugs.webkit.org/show_bug.cgi?id=173058
<rdar://problem/32615846>

Reviewed by Eric Carlson.

The IconButton class was removed and merged into its superclass Button, so we merge those tests
in a single directory. A couple tests no longer applied as we do not have a focused state for
buttons anymore, nor do we deal with changes in layout traits since there is no such thing as
a compact mode anymore.

  • media/modern-media-controls/button/button-active-state-expected.txt: Added.
  • media/modern-media-controls/button/button-active-state.html: Renamed from LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state.html.
  • media/modern-media-controls/button/button-icon-name-expected.txt: Added.
  • media/modern-media-controls/button/button-icon-name.html: Added.
  • media/modern-media-controls/button/button-on-expected.txt: Added.
  • media/modern-media-controls/button/button-on.html: Renamed from LayoutTests/media/modern-media-controls/icon-button/icon-button-on.html.
  • media/modern-media-controls/button/button.html:
  • media/modern-media-controls/icon-button/icon-button-active-state-expected.txt: Removed.
  • media/modern-media-controls/icon-button/icon-button-change-layout-traits-expected.txt: Removed.
  • media/modern-media-controls/icon-button/icon-button-change-layout-traits.html: Removed.
  • media/modern-media-controls/icon-button/icon-button-expected.txt: Removed.
  • media/modern-media-controls/icon-button/icon-button-focus-state-expected.txt: Removed.
  • media/modern-media-controls/icon-button/icon-button-focus-state.html: Removed.
  • media/modern-media-controls/icon-button/icon-button-on-expected.txt: Removed.
  • media/modern-media-controls/icon-button/icon-button.html: Removed.
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
10:13 AM Changeset in webkit [217889] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Remove TestExpectation for fast/backgrounds/background-repeat-x-y-parse.html.
https://bugs.webkit.org/show_bug.cgi?id=167428

Unreviewed test gardening.

9:55 AM Changeset in webkit [217888] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Add WebRTC stats logging
https://bugs.webkit.org/show_bug.cgi?id=173045

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

Source/ThirdParty/libwebrtc:

  • Source/webrtc/api/stats/rtcstats.h: Exporting RTCStats ToString.

Source/WebCore:

No change of behavior.

Do release logging of WebRTC stats once remote description is set.
Do logging every second for the first 30 seconds.
After 30 seconds, do release logging of these stats every 5 seconds.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
(WebCore::LibWebRTCMediaEndpoint::stop):
(WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):
(WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
(WebCore::LibWebRTCMediaEndpoint::startLoggingStats):
(WebCore::LibWebRTCMediaEndpoint::stopLoggingStats):
(WebCore::LibWebRTCPeerConnectionBackend::doSetRemoteDescription):

9:54 AM Changeset in webkit [217887] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] has_generic_property never accepts non-String
https://bugs.webkit.org/show_bug.cgi?id=173057

Reviewed by Darin Adler.

We never pass non-String value to has_generic_property bytecode.

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

9:51 AM Changeset in webkit [217886] by pvollan@apple.com
  • 27 edits
    2 adds in trunk

Support removal of authentication data through the Website data store API.
https://bugs.webkit.org/show_bug.cgi?id=171217
Source/WebCore:

Reviewed by Brady Eidson.

Add support to remove and fetch credential data through the Website data store API.

Test: http/tests/loading/basic-auth-remove-credentials.html

  • platform/network/CredentialStorage.h:

(WebCore::CredentialStorage::originsWithCredentials):

Source/WebKit2:

<rdar://problem/29522573>

Reviewed by Brady Eidson.

Add support to remove and fetch credential data through the Website data store API.
Credential data is removed and fetched from both the network process and web process.
Authentication data stored in the keychain will not be cleared.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):

  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::encode):
(WebKit::WebsiteData::decode):

  • Shared/WebsiteData/WebsiteData.h:
  • Shared/WebsiteData/WebsiteDataType.h:
  • UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
  • UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:

(dataTypesToString):

  • UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:

(WebKit::toWebsiteDataType):
(WebKit::toWKWebsiteDataTypes):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(+[WKWebsiteDataStore allWebsiteDataTypes]):

  • UIProcess/WebsiteData/WebsiteDataRecord.cpp:

(WebKit::WebsiteDataRecord::addOriginWithCredential):

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

(WebKit::WebsiteDataStore::fetchData):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::fetchWebsiteData):
(WebKit::WebProcess::deleteWebsiteData):

Tools:

Reviewed by Brady Eidson.

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

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::removeAllSessionCredentials):
(WTR::TestRunner::callDidRemoveAllSessionCredentialsCallback):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didRemoveAllSessionCredentials):

  • WebKitTestRunner/TestInvocation.h:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::removeAllSessionCredentials):

LayoutTests:

Reviewed by Brady Eidson.

  • TestExpectations:
  • http/tests/loading/basic-auth-remove-credentials-expected.txt: Added.
  • http/tests/loading/basic-auth-remove-credentials.html: Added.
  • platform/mac-wk2/TestExpectations:
9:04 AM Changeset in webkit [217885] by Jon Davis
  • 4 edits in trunk/Websites/webkit.org

Update the design of the WebKit Feature Status page
https://bugs.webkit.org/show_bug.cgi?id=173036

Reviewed by Simon Fraser.

  • wp-content/themes/webkit/functions.php: Fixed a bad function call.
  • wp-content/themes/webkit/status.php: Implemented redesign with saved search.
  • wp-content/themes/webkit/style.css:

(.feature-header:after):
(@media only screen and (max-width: 920px)):
(@media only screen and (max-width: 600px)):
(.feature-filters): Deleted.
(.feature-filters.opened): Deleted.
(.feature-filters:after): Deleted.
(.feature-filters.opened:after): Deleted.

8:48 AM Changeset in webkit [217884] by Alan Bujtas
  • 7 edits in trunk/Source/WebKit

[iOS WK1 WebThread] Do not call out to the main thread for device orientation.
https://bugs.webkit.org/show_bug.cgi?id=173044
<rdar://problem/32449338>

Reviewed by Tim Horton.

Source/WebKit/ios:

On iOS WK1 we could end up with an inconsistent state, where the web thread is inside
the Document's constructor waiting on a delegate callback on the main thread
while the main thread executes a pending task that assumes a valid Document.
This patch ensures that we don't call out to the main thread from the Document's constructor.

  • WebCoreSupport/WebChromeClientIOS.mm:

(WebChromeClientIOS::deviceOrientation): Caches deviceOrientation on the WebView so that we
don't have to lift the WebThread lock.

Source/WebKit/mac:

Cache the current device orientation so that we don't have to lift the WebThread lock
to collect it.

  • WebView/WebFrame.mm:

(-[WebFrame deviceOrientationChanged]):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _setDeviceOrientation:]):
(-[WebView _deviceOrientation]):

  • WebView/WebViewData.h:
  • WebView/WebViewInternal.h:
8:08 AM Changeset in webkit [217883] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add Charlie Turner as contributor
https://bugs.webkit.org/show_bug.cgi?id=173055

Patch by Charlie Turner <cturner@igalia.com> on 2017-06-07
Reviewed by Carlos Alberto Lopez Perez.

I also ran the Tools/Scripts/validate-committer-lists --canonicalize command at the suggestion
of webkit-patch upload, which reordered some fields and removed a newline.

  • Scripts/webkitpy/common/config/contributors.json:
8:07 AM Changeset in webkit [217882] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/background-tint
https://bugs.webkit.org/show_bug.cgi?id=173056
<rdar://problem/32614607>

Patch by Antoine Quint <Antoine Quint> on 2017-06-07
Reviewed by Eric Carlson.

Update the background-color and filter properties for backdrops to match
the latest implementation and specs.

  • media/modern-media-controls/background-tint/background-tint-expected.txt:
  • media/modern-media-controls/background-tint/background-tint.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
6:24 AM Changeset in webkit [217881] by alex
  • 2 edits in trunk/LayoutTests

Unreviewed GTK expectations gardening

Mark the mediacapturefromelement tests as skipped, we need canvas
captureStreams support.

  • platform/gtk/TestExpectations:
5:29 AM Changeset in webkit [217880] by graouts@webkit.org
  • 2 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

Unreviewed test gardening. This test has started timing out again on WK1.

  • platform/mac-wk1/TestExpectations:
4:50 AM Changeset in webkit [217879] by zandobersek@gmail.com
  • 2 edits
    15 adds in trunk/LayoutTests

Unreviewed GTK+ gardening.

Add test baselines that expect RSA-PSS and HKDF tests running successfully.
Also mark tests under imported/w3c/web-platform-tests/WebCryptoAPI as slow,
giving them enough time to run properly and avoid timeouts.

  • platform/gtk/TestExpectations:
  • platform/gtk/crypto: Added.
  • platform/gtk/crypto/subtle: Added.
  • platform/gtk/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt: Added.
  • platform/gtk/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf.https-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures.https-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-PSS.https-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-PSS.https-expected.txt: Added.
3:57 AM Changeset in webkit [217878] by pvollan@apple.com
  • 3 edits in trunk/Source/WebCore

AudioSourceProviderAVFObjC::m_tap member access is not thread safe.
https://bugs.webkit.org/show_bug.cgi?id=172263

Reviewed by Darin Adler.

It it possible that the main thread will modify the m_tap member by calling
AudioSourceProviderAVFObjC::destroyMix(), while m_tap is being read on a secondary
thread under AudioSourceProviderAVFObjC::processCallback(). Instead of accessing
the m_tap member on the secondary thread, we can use the same MTAudioProcessingTapRef
provided by MediaToolbox in the callback. We assume the tap ref is retained by
MediaToolbox, so it should be safe to use even if the the m_tap member is set to null.

Covered by existing tests.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::processCallback):
(WebCore::AudioSourceProviderAVFObjC::process):

2:16 AM Changeset in webkit [217877] by zandobersek@gmail.com
  • 11 edits
    1 add in trunk

[GCrypt] RSA-PSS support
https://bugs.webkit.org/show_bug.cgi?id=172856

Reviewed by Jiewen Tan.

.:

  • Source/cmake/OptionsGTK.cmake: Set and expose the USE_GCRYPT preprocessor macro when

SUBTLE_CRYPTO is enabled.

  • Source/cmake/OptionsWPE.cmake: Match the GTK+ port in demanding at least version 1.7.0

of libgcrypt. Also set and expose the USE_GCRYPT preprocessor macro.

Source/WebCore:

Implement RSA-PSS support for Web Crypto API in ports that use libgcrypt.

For the signing operation, the digest algorithm is determined and used to
compute the hash of the passed-in data. The given salt length and hash results
are embedded into a data s-expression, specifying PSS as the preferred type of
padding. This s-expression and the provided key are then passed to the
gcry_pk_sign() call which computes the signature. The MPI data of this signature
is retrieved and its size validated before being passed to the success callback.

For the verification operation, the hash of the passed-in data is computed as
before, embedding it into a data s-expression along with the specified salt
length. The passed-in signature data is embedded into a sig-val s-expression.
The two s-expressions are passed to the gcry_pk_verify() call along with the
key. If the returned error code for this operation is GPG_ERR_NO_ERROR the
verification is deemed successful, while in case of any other error code (which
might indicate a verification failure or an operation error) we simply signal
that the verification step failed (and not that it possibly errored out).

No new tests -- covered by existing tests.

  • PlatformGTK.cmake: Add the new build targets.
  • PlatformWPE.cmake: Ditto.
  • crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp: Added.

(WebCore::gcryptSign):
(WebCore::gcryptVerify):
(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register the RSA-PSS algorithm.

Source/WTF:

  • wtf/Platform.h: Define HAVE_RSA_PSS to 1 for USE(GCRYPT). Support for RSA-PSS

is provided by default through the libgcrypt library.

LayoutTests:

  • platform/gtk/TestExpectations: Enable RSA-PSS tests that we pass. The remaining

disabled tests rely on SPKI or PKCS#8 support that hasn't landed yet.

1:02 AM Changeset in webkit [217876] by rniwa@webkit.org
  • 39 edits
    2 deletes in trunk/Source/WebCore

Merge TreeScopeAdopter into TreeScope
https://bugs.webkit.org/show_bug.cgi?id=173040

Reviewed by Antti Koivisto.

Merged TreeScopeAdopter into TreeScope since it's used by TreeScope::adoptIfNeeded.

Most of code changes are for didMoveToNewDocument taking the new document as an argument,
which is used by ShadowRoot::didMoveToNewDocument to update its document scope.

No new tests since there should be no behavioral change.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Element.cpp:

(WebCore::Element::didMoveToNewDocument):

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::didMoveToNewDocument): Moved the code to moves the node lists and node iterators here
from TreeScopeAdopter::moveNodeToNewDocument.

  • dom/Node.h:
  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::didMoveToNewDocument): Moved the code to update the document scope here
from TreeScopeAdopter::moveNodeToNewDocument.

  • dom/ShadowRoot.h:
  • dom/TreeScope.cpp:

(WebCore::TreeScope::adoptIfNeeded):
(WebCore::TreeScope::moveTreeToNewScope): Moved from TreeScopeAdopter. Now takes the old tree scope and
the new tree scope as arguments (they used to be members of TreeScopeAdopter). Also merged updateTreeScope
into this function.
(WebCore::TreeScope::ensureDidMoveToNewDocumentWasCalled): Moved from TreeScopeAdopter.
(WebCore::TreeScope::moveNodeToNewDocument): Ditto. The code to adopt node lists and node iterators have
been moved to Node::didMoveToNewDocument.
(WebCore::TreeScope::moveShadowTreeToNewDocument): Moved from TreeScopeAdopter.

  • dom/TreeScope.h:

(WebCore::TreeScope::ensureDidMoveToNewDocumentWasCalled):

  • dom/TreeScopeAdopter.cpp: Removed.
  • dom/TreeScopeAdopter.h: Removed.
  • html/HTMLFieldSetElement.cpp:

(WebCore::HTMLFieldSetElement::didMoveToNewDocument):

  • html/HTMLFieldSetElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::didMoveToNewDocument):

  • html/HTMLFormControlElement.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::didMoveToNewDocument):

  • html/HTMLFormElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::didMoveToNewDocument):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::didMoveToNewDocument): Grouped related function calls on new/old documents.

  • html/HTMLInputElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didMoveToNewDocument):

  • html/HTMLMediaElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::didMoveToNewDocument):

  • html/HTMLObjectElement.h:
  • html/HTMLPictureElement.cpp:

(WebCore::HTMLPictureElement::didMoveToNewDocument):

  • html/HTMLPictureElement.h:
  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::didMoveToNewDocument):

  • html/HTMLPlugInImageElement.h:
  • html/HTMLTemplateElement.cpp:

(WebCore::HTMLTemplateElement::didMoveToNewDocument):

  • html/HTMLTemplateElement.h:
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::didMoveToNewDocument):

  • html/HTMLVideoElement.h:
  • html/ImageDocument.cpp:

(WebCore::ImageDocumentElement::didMoveToNewDocument):

  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::didMoveToNewDocument):

  • svg/SVGImageElement.h:
  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::didMoveToNewDocument):

  • svg/SVGSVGElement.h:

Jun 6, 2017:

11:49 PM Changeset in webkit [217875] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

Use a dedicated node flag to identify a Document node
https://bugs.webkit.org/show_bug.cgi?id=173037

Reviewed by Chris Dumez.

Use a Node flag to identify a Document node instead of checking this == document() which loads TreeScope.

  • dom/Document.h:

(WebCore::Node::isDocumentNode): Deleted.

  • dom/Node.h:

(WebCore::Node::isDocumentNode):

9:19 PM Changeset in webkit [217874] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[Win][x86-64] Some callee saved registers aren't preserved
https://bugs.webkit.org/show_bug.cgi?id=171266

Patch by Fujii Hironori <Fujii Hironori> on 2017-06-06
Reviewed by Saam Barati.

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::calleeSaveRegisters): Added edi and esi for X86_64 Windows.

9:12 PM Changeset in webkit [217873] by mitz@apple.com
  • 4 edits in trunk/Source

Fixed building with the macOS 10.13 Apple Internal SDK when targeting macOS 10.12.

Source/WebCore:

  • platform/spi/cocoa/PassKitSPI.h:

Source/WebKit2:

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:handler:]):

8:46 PM Changeset in webkit [217872] by Chris Dumez
  • 5 edits in trunk/Source

Unreviewed, rolling out r214974.

Causes some tabs to start using a huge amount of CPU after 8
minutes in the background

Reverted changeset:

"Make inactive web processes behave as though under memory
pressure."
https://bugs.webkit.org/show_bug.cgi?id=170042
http://trac.webkit.org/changeset/214974

8:25 PM Changeset in webkit [217871] by Brent Fulgham
  • 7 edits in trunk/Source/WebKit2

[WK2][Cocoa] Allow network process to bind addresses without webrtc extension
https://bugs.webkit.org/show_bug.cgi?id=173032
<rdar://problem/32597426>

Reviewed by Youenn Fablet.

Remove the unnecessary WebRTC sandbox extension handle and conditional sandbox rules, since we've
decided that all WebKit clients should be able to use the WebRTC protocol.

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode): Remove unused sandbox extension from serialization.
(WebKit::NetworkProcessCreationParameters::decode): Ditto.

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa): We no longer send the sandbox extension,
so don't attempt to consume it.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Remove check for 'com.apple.webkit.webrtc'

extension. Make rules conditional on building with WEB_RTC feature enabled.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Remove check for 'com.apple.webkit.webrtc'
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess): Do not create unnecessary sandbox extension
handle.

7:17 PM Changeset in webkit [217870] by timothy_horton@apple.com
  • 6 edits in trunk/Source

Crash trying to drag the entire text of a long book out of Mail compose view
https://bugs.webkit.org/show_bug.cgi?id=173042
<rdar://problem/32382059>

Reviewed by Simon Fraser.

Source/WebCore:

Creating a TextIndicator that is hundreds of thousands of pixels tall
is not a good idea. We introduced TextIndicatorOptionDoNotClipToVisibleRect
so that (for example) an image that overhangs the edge of the page would
contain the entire image, instead of just the visible fragment.
Instead, rename this option to ExpandClipBeyondVisibleRect, and make it
not unclip *entirely*, but expand the clip significantly (50% in each direction)
beyond the bounds of the current visible rect. Also, make use of exposed
area information for this clipping; otherwise, clients with very large views
inside scrollable areas (like Mail) would still try to create large TextIndicators.

  • page/TextIndicator.cpp:

(WebCore::initializeIndicator):

  • page/TextIndicator.h:

Source/WebKit2:

  • WebProcess/WebPage/ios/FindControllerIOS.mm:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::didConcludeEditDataInteraction):
Adapt to the new name.

5:28 PM Changeset in webkit [217869] by mark.lam@apple.com
  • 8 edits
    1 add in trunk

Contiguous storage butterfly length should not exceed MAX_STORAGE_VECTOR_LENGTH.
https://bugs.webkit.org/show_bug.cgi?id=173035
<rdar://problem/32554593>

Reviewed by Geoffrey Garen and Filip Pizlo.

JSTests:

  • stress/regress-173035.js: Added.

Source/JavaScriptCore:

Also added and fixed up some assertions.

  • runtime/ArrayConventions.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::setLength):

  • runtime/JSObject.cpp:

(JSC::JSObject::createInitialIndexedStorage):
(JSC::JSObject::ensureLengthSlow):
(JSC::JSObject::reallocateAndShrinkButterfly):

  • runtime/JSObject.h:

(JSC::JSObject::ensureLength):

  • runtime/RegExpObject.cpp:

(JSC::collectMatches):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncSplitFast):

4:45 PM Changeset in webkit [217868] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked workers/bomb.html as flaky on iOS.
https://bugs.webkit.org/show_bug.cgi?id=167757

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:31 PM Changeset in webkit [217867] by Chris Dumez
  • 8 edits
    1 add in trunk

RELEASE_ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values)) hit in convertEnumerationToJS<WebCore::History::ScrollRestoration>()
https://bugs.webkit.org/show_bug.cgi?id=173033
<rdar://problem/32591099>

Reviewed by Simon Fraser.

Source/WebCore:

History::scrollRestoration() was returning a bad value because HistoryItem::m_shouldRestoreScrollPosition
was initialized from FrameState::shouldRestoreScrollPosition member, which was not initialized when
restored from the legacy session restore API.

Tests: WebKit2.RestoreSessionStateContainingScrollRestoration* API tests.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateEnumerationImplementationContent):
Drop the RELEASE_ASSERT that was added to debug this and use the regular debug ASSERT.

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::setShouldRestoreScrollPosition):
Make sure we notify that the HistoryItem has changed when setShouldRestoreScrollPosition()
is called.

Source/WebKit2:

  • Shared/SessionState.h:

Make sure FrameState::shouldRestoreScrollPosition and other struct members are always
intialized.

  • UIProcess/mac/LegacySessionStateCoding.cpp:

(WebKit::encodeFrameStateNode):
(WebKit::decodeBackForwardTreeNode):
Make sure FrameState::shouldRestoreScrollPosition is properly encoded / decoded.

Tools:

Add API test coverage to make sure History's scrollRestoration is properly saved / restored via the
WKPageCopySessionState() / WKPageRestoreFromSessionState() C API.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/RestoreSessionState.cpp: Added.

(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::createSessionStateDataContainingScrollRestoration):
(TestWebKitAPI::TEST):

4:06 PM Changeset in webkit [217866] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Make sure we restore SP when doing calls that could be to JS
https://bugs.webkit.org/show_bug.cgi?id=172946
<rdar://problem/32579026>

Reviewed by JF Bastien.

JSTests:

  • wasm/function-tests/many-args-tail-call-sp-restored.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.f1):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.end):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.f2):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.let.instance.new.WebAssembly.Instance.new.WebAssembly.Module.builder.WebAssembly):

Source/JavaScriptCore:

I was worried that there was a bug where we'd call JS, JS would tail call,
and we'd end up with a bogus SP. However, this bug does not exist since wasm
always calls to JS through a stub, and the stub treats SP as a callee save.

I wrote a test for this, and also made a note that this is the needed ABI.

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):

4:04 PM Changeset in webkit [217865] by aestes@apple.com
  • 4 edits
    1 add in trunk

REGRESSION (r199558): WKWebView upload file which name contains Chinese character results in garbled code
https://bugs.webkit.org/show_bug.cgi?id=172849
<rdar://problem/32567454>

Reviewed by Darin Adler.

Source/WebKit2:

This is the Mac equivalent of what was fixed in r208295. This time we use -[NSURL path] to
construct a WTF::String instead of calling String::fromUTF8() on -[NSURL fileSystemRepresentation].

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::runOpenPanel):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/RunOpenPanel.mm: Added.

(-[RunOpenPanelUIDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
(TestWebKitAPI::TEST):

3:59 PM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)
3:38 PM Changeset in webkit [217864] by Darin Adler
  • 9 edits in trunk

Update to slightly stricter rules for custom element names from more recent standard draft
https://bugs.webkit.org/show_bug.cgi?id=173019

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/interfaces-expected.txt: Expect more PASS.

Source/WebCore:

  • bindings/js/JSCustomElementRegistryCustom.cpp:

(WebCore::validateCustomElementNameAndThrowIfNeeded): Add more error strings for various error cases.

  • dom/Document.cpp:

(WebCore::isPotentialCustomElementNameCharacter): Added. Implements the PCENChar production
from the standard by listing all the ranges exactly as they appear in the standard.
(WebCore::Document::validateCustomElementName): Added a check that the first character is
a lowercase ASCII letter. Added a check that all characters are potential custom element
name characters.

  • dom/Document.h: Update the CustomElementNameValidationStatus with new values for

the various new error cases. Not sure that validateCustomElementName really belongs
in the Document class in the first place. Also seems that the error strings could be
in validateCustomElementName rather than in a separate bindings function, obviating
the need for the enum.

LayoutTests:

  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt: Expect more PASS.
  • platform/ios/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt: Ditto.
3:36 PM Changeset in webkit [217863] by yoav@yoav.ws
  • 33 edits in trunk

[preload] Conditional support for media preloading and align media as values.
https://bugs.webkit.org/show_bug.cgi?id=172501

Reviewed by Dean Jackson.

Source/WebCore:

As discussed at https://bugs.webkit.org/show_bug.cgi?id=171720#c11 media preloading may not work
since the backend may not reuse such resources properly.
This patch makes support for media preloading conditional on a setting, in order to avoid double downloads in these cases.
It also aligns the media as values to the spec, and splitting them into "video" and "audio".

No new tests but related tests were modified to remove media preloading tests as the setting is off by default.

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::resourceTypeFromAsAttribute): Make handling of MediaResource conditional on setting. Align as values to spec.
(WebCore::createLinkPreloadResourceClient): Make handling of MediaResource conditional on setting.
(WebCore::LinkLoader::isSupportedType): Make handling of MediaResource conditional on setting.

  • page/RuntimeEnabledFeatures.h: Added a media preloading preference.

(WebCore::RuntimeEnabledFeatures::setMediaPreloadingEnabled):
(WebCore::RuntimeEnabledFeatures::mediaPreloadingEnabled):

  • page/Settings.in: Added a media preloading preference.

Source/WebKit:

Add media preloading preference and hook it up to runtime enabled features.

  • mac/WebView/WebPreferenceKeysPrivate.h: Added a media preloading preference.
  • mac/WebView/WebPreferences.mm:

(WebKit::WebPreferences::setMediaPreloadingEnabled):
(WebKit::WebPreferences::mediaPreloadingEnabled):

  • mac/WebView/WebPreferencesPrivate.h:

(WebKit::WebPreferences::setMediaPreloadingEnabled):
(WebKit::WebPreferences::mediaPreloadingEnabled):

  • mac/WebView/WebView.mm: Set runtime enabled feature based on preference.
  • win/Interfaces/IWebPreferencesPrivate.idl: define mediaPreloadEnabled and setMediaPreloadingEnabled
  • win/WebPreferences.cpp: Initialize media preloading as false and define setter and getter.

(WebKit::WebPreferences::setMediaPreloadingEnabled):
(WebKit::WebPreferences::mediaPreloadingEnabled):

  • win/WebPreferences.h:
  • win/WebPreferenceKeysPrivate.h:
  • win/WebView.cpp: Set runtime enabled feature based on preference.

Source/WebKit2:

Add media preloading preference and hook it up to runtime enabled features.

  • Shared/WebPreferencesDefinitions.h: Added a macro defining media preloading preference.
  • UIProcess/API/C/WKPreferences.cpp:

(WebKit2::WKPreferences::WKPreferencesSetMediaPreloadingEnabled):
(WebKit2::WKPreferences::WKPreferencesGetMediaPreloadingEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/WebPage/WebPage.cpp: Set runtime enabled feature based on preference.

Tools:

Turn on media preloading preference for tests.

  • DumpRenderTree/mac/DumpRenderTree.mm: Turn on media preloading preference.
  • DumpRenderTree/win/DumpRenderTree.cpp: Turn on media preloading preference.
  • WebKitTestRunner/TestController.cpp: Turn on media preloading preference.

LayoutTests:

Tests checking media resources preloading support were removed.

  • http/tests/preload/download_resources.html: Replaced "media" with "video".
  • http/tests/preload/download_resources_from_header_iframe-expected.txt: Changed expectation due to added "audio" test.
  • http/tests/preload/onload_event.html: Replaced "media" with "video".
  • http/tests/preload/preloadscanner_download_resources.html: Replaced "media" with "video".
  • http/tests/preload/resources/download_resources_from_header.php: Replaced "media" with "video" and "audio".
  • http/tests/preload/resources/nph-invalid_resources_from_header.pl: Replaced "media" with "video".
  • http/tests/preload/single_download_preload.html: Replaced "media" with "video" and "audio".
  • http/tests/preload/single_download_preload_headers.php: Replaced "media" with "video" and "audio".
  • http/tests/preload/single_download_preload_headers_charset.php: Replaced "media" with "video" and "audio".
3:29 PM Changeset in webkit [217862] by commit-queue@webkit.org
  • 15 edits in trunk/Source

[WebCore] Enable REQUEST_ANIMATION_FRAME_TIMER for all ports
https://bugs.webkit.org/show_bug.cgi?id=172780

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-06-06
Reviewed by Alex Christensen.

Source/WebCore:

No new tests. No change in behavior.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::addThrottlingReason):
(WebCore::ScriptedAnimationController::removeThrottlingReason):
(WebCore::ScriptedAnimationController::isThrottled):
(WebCore::ScriptedAnimationController::interval):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::ScriptedAnimationController::displayRefreshFired):

  • dom/ScriptedAnimationController.h:
  • loader/EmptyClients.h:
  • page/Chrome.cpp:

(WebCore::Chrome::scheduleAnimation): Deleted.

  • page/Chrome.h:
  • page/ChromeClient.h:
  • platform/Curl.cmake: Added.
  • platform/ScrollAnimationSmooth.cpp:

(WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
(WebCore::ScrollAnimationSmooth::stop):
(WebCore::ScrollAnimationSmooth::animationTimerFired):
(WebCore::ScrollAnimationSmooth::startNextTimer):
(WebCore::ScrollAnimationSmooth::animationTimerActive):
(WebCore::ScrollAnimationSmooth::serviceAnimation): Deleted.

  • platform/ScrollAnimationSmooth.h:

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::scheduleAnimation): Deleted.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::syncDisplayState):

Source/WTF:

  • wtf/Platform.h:
3:20 PM Changeset in webkit [217861] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

OMG tier up checks should be a patchpoint
https://bugs.webkit.org/show_bug.cgi?id=172944

Reviewed by Saam Barati.

Tier up checks in BBQ should be done as a patchpoint rather than individual B3 opcodes.
In order to reduce code generated out of line in each function. We generate a single stub
that pushes all the callee-saves. This looks like a 5-10% compile time speedup.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::emitTierUpCheck):
(JSC::Wasm::B3IRGenerator::addLoop):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::triggerOMGTierUpThunkGenerator):

  • wasm/WasmThunks.h:
3:09 PM Changeset in webkit [217860] by Darin Adler
  • 18 edits in trunk/Source

Cut down use of WTF_ARRAY_LENGTH
https://bugs.webkit.org/show_bug.cgi?id=172997

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • parser/Lexer.cpp:

(JSC::singleEscape): Use WTF_ARRAY_LENGTH instead of ARRAY_SIZE.

  • runtime/NumberPrototype.cpp:

(JSC::toStringWithRadix): Use std::end instead of WTF_ARRAY_LENGTH.

Source/WebCore:

  • contentextensions/NFAToDFA.cpp: Remove unused SetTransitions class.
  • dom/Document.cpp:

(WebCore::Document::~Document): Use modern for loop instead of WTF_ARRAY_LENGTH.

  • dom/make_names.pl:

(printDefinitions): Ditto.
(printFactoryCppFile): Ditto.
(printWrapperFactoryCppFile): Ditto.

  • platform/URL.cpp:

(WebCore::portAllowed): Use std::is_sorted, std::begin, and std::end
in sort assertion to greatly streamline it and eliminate use of WTF_ARRAY_LENGTH.
Also allow the sort assertion to run every time; slightly optimizing debug builds
was not worth having the code be messy.

  • platform/URLParser.cpp:

(WebCore::URLParser::appendNumberToASCIIBuffer): Use std::end instead of
WTF_ARRAY_LENGTH.

  • platform/graphics/FontCascade.cpp: Make fontFamiliesWithInvalidCharWidth be

a constant array rather than a non-constant array to constant strings.
(WebCore::FontCascade::hasValidAverageCharWidth): Streamline the hash table
initialization to avoid heap allocation and use a modern for loop instead of
WTF_ARRAY_LENGTH.

  • platform/graphics/mac/MediaPlayerPrivateQTKit.mm:

(WebCore::disableComponentsOnce): Use a modern for loop instead of WTF_ARRAY_LENGTH.

  • platform/network/CacheValidation.cpp:

(WebCore::shouldUpdateHeaderAfterRevalidation): Ditto. Also use the
startsWithIgnoringASCIICase function rather than the version that folds
arbitrary Unicode case.

  • platform/text/TextEncodingRegistry.cpp:

(WebCore::pruneBlacklistedCodecs): Use modern for loops to make the code considerably
easier to read and avoid WTF_ARRAY_LENGTH.

  • platform/text/mac/LocaleMac.mm:

(WebCore::LocaleMac::monthLabels): Use modern for loop instead of WTF_ARRAY_LENGTH.
(WebCore::LocaleMac::shortMonthLabels): Ditto.

  • rendering/RenderCombineText.cpp:

(WebCore::RenderCombineText::combineText): Ditto.

Source/WTF:

  • wtf/DateMath.cpp:

(WTF::equalLettersIgnoringASCIICase): Added helper function template.
(WTF::parseDateFromNullTerminatedCharacters): Use a modern for loop instead of
WTF_ARRAY_LENGTH. Use startsWithLettersIgnoringASCIICase and
equalLettersIgnoringASCIICase instead of strncasecmp.

  • wtf/text/IntegerToStringConversion.h:

(WTF::numberToStringImpl): Use std::end instead of WTF_ARRAY_LENGTH.
(WTF::writeNumberToBufferImpl): Ditto.

3:04 PM Changeset in webkit [217859] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Allow FileReader to open files multiple times

If multiple file readers open files they are prevented by default due to
Windows' file locking.

Allow FileReader to open multiple files for reading at the same time on wincairo
https://bugs.webkit.org/show_bug.cgi?id=172632

Patch by Isaac Devine <isaac@devinesystems.co.nz> on 2017-06-06
Reviewed by Darin Adler.

  • platform/win/FileSystemWin.cpp:

(WebCore::openFile): Use the appropriate sharing options to allow multiple opens

2:46 PM Changeset in webkit [217858] by Beth Dakin
  • 18 edits in trunk/Source

Netflix seeking quirk should also apply to Now Playing, and should always use the
livestream UI
https://bugs.webkit.org/show_bug.cgi?id=173030
-and corresponding-
rdar://problem/32228660

Reviewed by Darin Adler.

Source/WebCore:

This patch rolls out much of https://trac.webkit.org/changeset/217791/webkit in
favor of an approach that can be used to apply the quirk to Now Playing in
addition to Touch Bar. This patch also changes the UI in both Touch Bar and Now
Playing to match live stream UI, which means there is no playhead. This hopefully
makes it less confusing that taps on the timeline will have no effect.

supportsSeeking() should return false for Netflix. That function needs to be
public now.

  • html/HTMLMediaElement.cpp:

(WebCore::needsSeekingSupportQuirk):
(WebCore::HTMLMediaElement::supportsSeeking):

  • html/HTMLMediaElement.h:

Here is where we get the desired result in Now Playing. Make sure the
currentSession supportsSeeking() before relying on the time and duration info for
the sake of Now Playing.

  • platform/audio/mac/MediaSessionManagerMac.mm:

(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):

We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().

  • platform/cocoa/WebPlaybackSessionModel.h:

(WebCore::WebPlaybackSessionModelClient::mutedChanged):
(WebCore::WebPlaybackSessionModelClient::allowsTouchBarScrubbingChanged): Deleted.

  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):

And here is where we get the desired result for Touch Bar. Make sure the the media
element supportsSeeking() before relying on the duration.
(WebCore::WebPlaybackSessionModelMediaElement::duration):

We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
(WebCore::WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing): Deleted.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:
  • platform/mac/WebPlaybackControlsManager.h:

Currently the Touch Bar live stream UI lets you seek, which results in broken
behavior on real live streams and on Netflix. Prevent that by preventing scrubbing
for NaN and infinite durations.

  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):

We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().

  • platform/mac/WebPlaybackSessionInterfaceMac.h:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
(WebCore::WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged): Deleted.

Source/WebKit2:

See WebCore ChangeLog for more details. We can roll out allowsTouchBarScrubbing()
and rely on supportsSeeking().

  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing): Deleted.

  • WebProcess/cocoa/WebPlaybackSessionManager.h:
  • WebProcess/cocoa/WebPlaybackSessionManager.mm:

(WebKit::WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged): Deleted.
(WebKit::WebPlaybackSessionManager::allowsTouchBarScrubbingChanged): Deleted.

2:27 PM Changeset in webkit [217857] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker.html as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=170907

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
2:02 PM Changeset in webkit [217856] by Jonathan Bedard
  • 6 edits in trunk/Tools

webkitpy: Return correct process names from SimulatorProcess
https://bugs.webkit.org/show_bug.cgi?id=172940

Reviewed by Aakash Jain.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.plist_data_from_bundle): Share plist access code for accessing different plist entries.
(DarwinPort.app_identifier_from_bundle): Use plist_data_from_bundle.
(DarwinPort.app_executable_from_bundle): Access name of app executable from provided app bundle.

  • Scripts/webkitpy/port/driver.py:

(Driver.has_crashed): Use _server_process.process_name() instead of _server_process.name() since
_server_process.name() will not return the correct process name for iOS.
(Driver._check_for_driver_crash_or_unresponsiveness): Ditto.
(Driver._read_block): Ditto.

  • Scripts/webkitpy/port/driver_unittest.py:

(DriverTest.test_check_for_driver_crash.FakeServerProcess.process_name): Update since Driver uses
process_name() instead of name().

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess._start): Use process_name() instead of name().
(ServerProcess.stop): Ditto.
(ServerProcess.name): Deleted.

  • Scripts/webkitpy/port/simulator_process.py:

(SimulatorProcess.process_name): Check the provided bundle for the process name.

1:39 PM Changeset in webkit [217855] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

test-webkitpy: stop forking unsafely from within a spawned process
https://bugs.webkit.org/show_bug.cgi?id=172774

Patch by Dean Johnson <dean_johnson@apple.com> on 2017-06-06
Reviewed by Darin Adler.

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

(Builder.init): We don't use mechanize.Browser() as part of testing, so only initialize it when
it's going to be used.
(Builder.force_build):

1:28 PM Changeset in webkit [217854] by zandobersek@gmail.com
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening.

  • platform/gtk/TestExpectations: Clean up the Web Crypto API test expectations.

Unskip the crypto/subtle/, crypto/workers/subtle/ and
imported/w3c/web-platform-tests/WebCryptoAPI/ directories and add expectations
that skip the remaining failing layout tests, instead of skipping those
directories and maintaining expectations for the passing tests.

1:25 PM Changeset in webkit [217853] by Jonathan Bedard
  • 17 edits in trunk/Tools

webkitpy: Process crash-logs for iOS devices
https://bugs.webkit.org/show_bug.cgi?id=171976
<rdar://problem/32134551>

Reviewed by David Kilzer.

When running layout tests on an iOS device, crash logs should be processed.
Implement crash log searching and parsing for iOS devices.

  • Scripts/webkitpy/common/system/crashlogs.py:

(CrashLogs): Moved process regular expression for Darwin to class variable.
(CrashLogs.init): Accept optional list of crash logs to ignore.
(CrashLogs.find_newest_log): Add iOS as a potential platform.
(CrashLogs.find_all_logs): Ditto.
(CrashLogs._parse_darwin_crash_log): Share code for parsing of Darwin crash logs.
Do not assume that a Darwin crash log starts with the process.
(CrashLogs._find_newest_log_darwin): Remove .app in process name for iOS, use
shared code for parsing Darwin crash logs.
(CrashLogs._find_newest_log_darwin.is_crash_log): Skip crash logs passed into this
object so that crash logs already on the system before testing are not parsed.
(CrashLogs._find_newest_log_win.is_crash_log): Ditto.
(CrashLogs._find_all_logs_darwin.is_crash_log): Ditto.
(CrashLogs._find_all_logs_darwin): Use shared code for parsing Darwin crash logs.

  • Scripts/webkitpy/common/system/crashlogs_unittest.py:

(make_mock_crash_report_darwin): Crash logs may not have their process on the first line.

  • Scripts/webkitpy/common/system/systemhost.py:

(SystemHost.symbolicate_crash_log_if_needed): The symbolicated crash log for most
systems is just the crashlog, use this behavior by default.

  • Scripts/webkitpy/common/system/systemhost_mock.py:

(MockSystemHost.symbolicate_crash_log_if_needed): The symbolicated crash log for most
systems is just the crashlog, use this behavior by default.

  • Scripts/webkitpy/port/apple.py:

(ApplePort): Add a dictionary mapping hosts to a list of crash logs to be skipped.
(ApplePort.setup_test_run): Set the list of crash logs to be skipped to the crash logs on
the system before testing begins

  • Scripts/webkitpy/port/base.py:

(Port._get_crash_log): Pass optional target host when getting crash logs.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._look_for_all_crash_logs_in_log_dir): Pass list of crash logs to be skipped to
CrashLogs object.
(DarwinPort._get_crash_log): Pass optional target host when getting crash logs, pass list of crash
logs to be skipped to CrashLogs object.

  • Scripts/webkitpy/port/darwin_testcase.py:

(DarwinTest.test_get_crash_log): Removed unused local function.
(DarwinTest.test_get_crash_log.fake_time_cb): Deleted.

  • Scripts/webkitpy/port/device.py:

(Device.symbolicate_crash_log_if_needed): If the platform device has a function with this
name, call it. Otherwise, assume the default behavior and read the file at the provided path.

  • Scripts/webkitpy/port/driver.py:

(Driver._get_crash_log): Pass optional target host when getting crash logs.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort._get_crash_log): Pass optional target host when getting crash logs.

  • Scripts/webkitpy/port/ios.py: Ditto.

(IOSPort.setup_test_run): Each device is treated as an independent host. Set the list of crash logs
to be skipped for each host.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort.path_to_crash_logs): Consult apple_additions for the path to crash logs.
(IOSDevicePort._look_for_all_crash_logs_in_log_dir): Search every connected device for
crash logs and pass list of crash logs to ignore to each instance of CrashLogs.
(IOSDevicePort._get_crash_log): Search the specified target host for a crash log if a target
host is specified. Else, search all connected devices for the specified crash-log.
(IOSDevicePort.look_for_new_crash_logs): Deleted.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.test_crashlog_path): Without apple_additions, an exception should be raised.
(IOSDeviceTest.test_get_crash_log): Ditto.

  • Scripts/webkitpy/port/simulator_process.py:

(SimulatorProcess.process_name): Check the provided bundle for the process name.

  • Scripts/webkitpy/port/win.py:

(WinPort._get_crash_log): Pass optional target host when getting crash logs, pass list of crash
logs to be skipped to CrashLogs object.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort._get_crash_log): Pass optional target host when getting crash logs.

1:10 PM Changeset in webkit [217852] by Konstantin Tokarev
  • 7 edits in trunk/Source

Add missing <functional> includes
https://bugs.webkit.org/show_bug.cgi?id=173017

Patch by Thiago Macieira <thiago.macieira@intel.com>
Reviewed by Yusuke Suzuki.

This patch fixes compilation with GCC 7.

Source/JavaScriptCore:

  • inspector/InspectorBackendDispatcher.h:

Source/WebCore:

No new tests needed.

  • css/CSSValue.h:
  • css/StyleSheetContents.h:
  • loader/NetscapePlugInStreamLoader.h:
  • loader/ResourceLoader.h:
1:06 PM Changeset in webkit [217851] by Jonathan Bedard
  • 3 edits in trunk/LayoutTests

Move storage/websql/alter-to-info-table.html failure expectation.
https://bugs.webkit.org/show_bug.cgi?id=156718

Unreviewed test gardening

storage/websql/alter-to-info-table.html fails on iOS-simulator,
but passes on device.

  • platform/ios-simulator/TestExpectations:
  • platform/ios/TestExpectations:
12:52 PM Changeset in webkit [217850] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/fullscreen-api-enabled-media-with-presentation-mode.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=172998

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:51 PM Changeset in webkit [217849] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Fix compilation with !ENABLE(SVG_FONTS)
https://bugs.webkit.org/show_bug.cgi?id=172731

Reviewed by Darin Adler.

No new tests needed.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::load):

12:35 PM Changeset in webkit [217848] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Safari doesn't load newest The Order of the Stick comic.
https://bugs.webkit.org/show_bug.cgi?id=172949
<rdar://problem/32389730>

Reviewed by Antti Koivisto.

Source/WebCore:

As part of the table layout, RenderTableSection::layoutRows calls the RenderTableCell's layout() directly
(skipping the RenderTableRow parent). If during this call the RenderTableCell (or any of its descendant) marks the ancestor
chain dirty, this dirty flag on the RenderTableRows will never be cleared and we'll end up early returning from RenderTableSection::paint.
For certain type of float objects, we need to invalidate the line layout path during layout (and we mark the ancestors dirty).
This patch takes a conservative approach and marks the ancestors dirty only when the renderer is not dirty yet, but
as part of webkit.org/b/172947 we should revisit and validate whether the setNeedsLayout() is required at all.

Test: fast/table/floating-table-sibling-is-invisible.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::invalidateLineLayoutPath):

LayoutTests:

  • fast/table/floating-table-sibling-is-invisible-expected.html: Added.
  • fast/table/floating-table-sibling-is-invisible.html: Added.
11:45 AM Changeset in webkit [217847] by ddkilzer@apple.com
  • 6 edits in trunk/Tools

Move WTF_ATTRIBUTE_PRINTF() from implementation to declaration
<https://webkit.org/b/172804>

Reviewed by Darin Adler.

WTF_ATTRIBUTE_PRINTF() only works outside the current
compilation unit if it's on the declaration, not the
implementation, of a function or class method.

  • DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
  • DumpRenderTree/TestNetscapePlugIn/PluginObject.h:
  • DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
  • DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
  • Move WTF_ATTRIBUTE_PRINTF() macro to declaration.
  • DumpRenderTree/TestNetscapePlugIn/main.cpp:
  • Remove redundant CRASH() macro definition. Use the one from <wtf/Assertions.h> instead.
11:35 AM Changeset in webkit [217846] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix 32-bit build.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_unreachable):

11:28 AM Changeset in webkit [217845] by jer.noble@apple.com
  • 7 edits in trunk/Source

[Cocoa] Set defaults for mediaContentTypesRequiringHardwareSupport setting
https://bugs.webkit.org/show_bug.cgi?id=173008

Reviewed by Eric Carlson.

Source/WebKit/mac:

Add a private preference (with default) for the mediaContentTypesRequiringHardwareSupport WebCore setting.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences mediaUserGestureInheritsFromDocument]):
(-[WebPreferences setMediaUserGestureInheritsFromDocument:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

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

[css-conditional] The one-string version of CSS.supports should be wrapped in implied parentheses.
https://bugs.webkit.org/show_bug.cgi?id=172906

Patch by Emilio Cobos Álvarez <ecobos@igalia.com> on 2017-06-06
Reviewed by Darin Adler.

Source/WebCore:

From https://drafts.csswg.org/css-conditional/#the-css-interface:

When invoked with a single conditionText argument, it must return
true if conditionText, when either parsed and evaluated as a
supports_condition or parsed as a declaration, wrapped in implied
parentheses, and evaluated as a supports_condition, would return
true.

Note the "wrapped in implied parentheses" bit.

Gecko is fixing it in https://bugzil.la/1338486, and Blink in
https://crbug.com/729403.

Tests: css3/supports-dom-api.html

imported/w3c/web-platform-tests/cssom/CSS.html

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseSupportsCondition):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeSupportsRule):

  • css/parser/CSSSupportsParser.cpp:

(WebCore::CSSSupportsParser::supportsCondition):

  • css/parser/CSSSupportsParser.h:

LayoutTests:

  • css3/supports-dom-api-expected.txt:
  • css3/supports-dom-api.html: Added test
11:15 AM Changeset in webkit [217843] by Joseph Pecoraro
  • 17 edits
    1 delete in trunk

Unreviewed rollout r217807. Caused a test to crash.

JSTests:

  • heapProfiler/class-names.js: Removed.
  • heapProfiler/driver/driver.js:

(CheapHeapSnapshotNode):
(CheapHeapSnapshot):
(createCheapHeapSnapshot):
(HeapSnapshot):
(createHeapSnapshot):

  • typeProfiler/inheritance.js:

(wrapper.A):
(wrapper.B):
(wrapper.C):
(wrapper):

Source/JavaScriptCore:

  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::buildSnapshot):
(JSC::HeapSnapshotBuilder::json):
(): Deleted.

  • heap/HeapSnapshotBuilder.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::calculatedClassName):

Source/WebInspectorUI:

  • UserInterface/Proxies/HeapSnapshotNodeProxy.js:

(WebInspector.HeapSnapshotNodeProxy):
(WebInspector.HeapSnapshotNodeProxy.deserialize):

  • UserInterface/Views/HeapSnapshotClassDataGridNode.js:

(WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):

  • UserInterface/Views/HeapSnapshotClusterContentView.js:

(WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):

  • UserInterface/Views/HeapSnapshotDataGridTree.js:

(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):

  • UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:

(HeapSnapshot):
(HeapSnapshot.updateCategoriesAndMetadata):
(HeapSnapshot.prototype.serializeNode):
(HeapSnapshot.prototype._gcRootPathes.visitNode):
(HeapSnapshot.prototype._gcRootPathes):

LayoutTests:

  • inspector/unit-tests/heap-snapshot-expected.txt:
  • inspector/unit-tests/heap-snapshot.html:
11:11 AM Changeset in webkit [217842] by Joseph Pecoraro
  • 2 edits in trunk/Websites/webkit.org

Add a WebGPU test to the experimental features test page
https://bugs.webkit.org/show_bug.cgi?id=172953

Reviewed by Darin Adler.

  • experimental-features.html:
11:11 AM Changeset in webkit [217841] by Joseph Pecoraro
  • 10 edits in trunk

Move Resource Timing / User Timing from experimental features into main preferences
https://bugs.webkit.org/show_bug.cgi?id=172950

Reviewed by Darin Adler.

Source/WebCore:

  • features.json:

Graduate some features from In Development to Supported.

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h:

Move Resource Timing and User Timing out of the Experimental Features section.

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
Move out no longer experimental features to the main list.

Websites/webkit.org:

  • experimental-features.html:

Remove no longer experimental features.

11:08 AM Changeset in webkit [217840] by fpizlo@apple.com
  • 19 edits
    1 add in trunk

index out of bound in bytecodebasicblock
https://bugs.webkit.org/show_bug.cgi?id=172963

Reviewed by Saam Barati and Mark Lam.
JSTests:

  • stress/dfg-call-class-constructor.js: Added.

(Foo):
(i.catch):

Source/JavaScriptCore:


We were leaving an unterminated basic block when generating CodeForCall for a class
constructor. This was mostly benign since that unterminated block was not reachable, but it
does cause an ASSERT.

This fixes the issue by appending op_unreachable to that block. I added op_unreachable because
this really is the cleanest and most idiomatic way to solve this problem, so even though it
makes the change bigger it's probabably worth it.

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBytecode):

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/Opcode.h:

(JSC::isTerminal):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::emitUnreachable):

  • bytecompiler/BytecodeGenerator.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileUnreachable):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_unreachable):

  • llint/LowLevelInterpreter.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

Source/WTF:

  • wtf/Assertions.h:

(UNREACHABLE_FOR_PLATFORM):

10:41 AM Changeset in webkit [217839] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/audio
https://bugs.webkit.org/show_bug.cgi?id=172996
<rdar://problem/32590725>

Reviewed by Eric Carlson.

The new controls design switches the AirPlay and mute button order around.

  • media/modern-media-controls/audio/audio-controls-buttons-expected.txt:
  • media/modern-media-controls/audio/audio-controls-buttons.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
10:13 AM Changeset in webkit [217838] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

[GTK][Wayland] Do not pass value of $DISPLAY to wl_display_connect()
https://bugs.webkit.org/show_bug.cgi?id=172993

Reviewed by Žan Doberšek.

No new tests needed.

  • platform/graphics/wayland/PlatformDisplayWayland.cpp:

(WebCore::PlatformDisplayWayland::create): Instead of using the "DISPLAY" environment variable (meant for X11),
pass a null pointer to "wl_display_connect()". This function checks the value of the "WAYLAND_DISPLAY" environment
variable itself and therefore we do not need to pass it ourselves.

9:53 AM Changeset in webkit [217837] by commit-queue@webkit.org
  • 11 edits in trunk/Source

Add an option to disable getUserMedia prompt in case of mock capture sources
https://bugs.webkit.org/show_bug.cgi?id=172981
<rdar://problem/32580325>

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

Source/WebKit/mac:

Defining the option, getter and setter.

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences mockCaptureDevicesPromptEnabled]):
(-[WebPreferences setMockCaptureDevicesPromptEnabled:]):

  • WebView/WebPreferencesPrivate.h:

Source/WebKit2:

Adding mockCaptureDevicesPromptEnabled option.
Allowing any getUserMedia request if mock is on and prompt is off.

Renaming UserMediaProcessManager::willEnableMediaStreamInPage to muteCaptureMediaStreamsExceptIn.
This eases reading the code.
Making sure that a page for which a new getUserMedia MediaStream will be created is capture-unmuted.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::muteCaptureMediaStreamsExceptIn):
(WebKit::UserMediaProcessManager::willCreateMediaStream):

  • UIProcess/UserMediaProcessManager.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setMuted):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::activateMediaStreamCaptureInPage):

9:29 AM Changeset in webkit [217836] by graouts@webkit.org
  • 5 edits in trunk

Rebaseline and enable media/modern-media-controls/airplay-support
https://bugs.webkit.org/show_bug.cgi?id=172980
Source/WebCore:

Reviewed by Eric Carlson.

Fixing a small issue in the modern media controls code which would yield
an error when manually creating a MediaController without a MediaControlsHost.

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

(MediaController.prototype.get isAudio):

LayoutTests:

<rdar://problem/32589074>

Reviewed by Eric Carlson.

The test passes as-is on macOS, but needs to be skipped on iOS since we can't test AirPlay.

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
9:27 AM Changeset in webkit [217835] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/airplay-placard
https://bugs.webkit.org/show_bug.cgi?id=172977
<rdar://problem/32588681>

Reviewed by Eric Carlson.

These two tests work fine as-is, we just need to enable them.

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
9:26 AM Changeset in webkit [217834] by graouts@webkit.org
  • 6 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/airplay-button
https://bugs.webkit.org/show_bug.cgi?id=172975
<rdar://problem/32588422>

Reviewed by Eric Carlson.

  • media/modern-media-controls/airplay-button/airplay-button-expected.txt:
  • media/modern-media-controls/airplay-button/airplay-button-on.html: Remove some unnecessary

code, the path to the icon directory is provided directly by media-controls-loader.js.

  • media/modern-media-controls/airplay-button/airplay-button.html: Remove the test for the "icon"

CSS class since buttons no longer carry this class. We also update the assumptions to use SVG
assets.

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
9:16 AM Changeset in webkit [217833] by Ryan Haddad
  • 4 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r217812.

This change caused test failures on arm64.

Reverted changeset:

"OMG tier up checks should be a patchpoint"
https://bugs.webkit.org/show_bug.cgi?id=172944
http://trac.webkit.org/changeset/217812

8:19 AM Changeset in webkit [217832] by Carlos Garcia Campos
  • 7 edits in trunk

[WPE] Enable remote inspector
https://bugs.webkit.org/show_bug.cgi?id=172971

Reviewed by Žan Doberšek.

.:

Add private option for remote inspector enabled by default.

  • Source/cmake/OptionsWPE.cmake:

Source/JavaScriptCore:

We can just build the current glib remote inspector, without adding a frontend implementation and using a
WebKitGTK+ browser as frontend for now.

  • PlatformWPE.cmake: Add remote inspector files to compilation.
  • inspector/remote/glib/RemoteInspectorUtils.cpp:

(Inspector::backendCommands): Load the inspector resources library.

Source/WebKit2:

Initialize the remote inpector if needed.

  • UIProcess/wpe/WebProcessPoolWPE.cpp:

(WebKit::initializeRemoteInspectorServer):
(WebKit::WebProcessPool::platformInitialize):

8:16 AM Changeset in webkit [217831] by Carlos Garcia Campos
  • 5 edits in trunk/Source

[GLIB] Make remote inspector DBus protocol common to all glib based ports
https://bugs.webkit.org/show_bug.cgi?id=172970

Reviewed by Žan Doberšek.

Source/JavaScriptCore:

We are currently using "webkitgtk" in the names of DBus interfaces and object paths inside an ifdef with the
idea that other ports could use their own names. However, the protocol is the same, so we could use the same
names and make all glib based ports compatible to each other. This way we could use the GTK+ MiniBrowser to
debug WPE, without having to implement the frontend part in WPE yet.

  • inspector/remote/glib/RemoteInspectorGlib.cpp: Use webkit instead of webkitgtk and reomve platform idfeds.
  • inspector/remote/glib/RemoteInspectorServer.cpp: Ditto.

Source/WebKit2:

Use webkit instead of webkitgtk and reomve platform idfeds.

  • UIProcess/glib/RemoteInspectorClient.cpp:
8:15 AM Changeset in webkit [217830] by Carlos Garcia Campos
  • 2 edits in trunk/Source/JavaScriptCore

[GTK] Web Process deadlock when closing the remote inspector frontend
https://bugs.webkit.org/show_bug.cgi?id=172973

Reviewed by Žan Doberšek.

We are taking the remote inspector mutex twice. First close message is received, and receivedCloseMessage()
takes the mutex. Then RemoteConnectionToTarget::close() is called that, when connected, calls
PageDebuggable::disconnect() that ends up calling RemoteInspector::updateTarget() that also takes the remote
inspector mutex. We should release the mutex before calling RemoteConnectionToTarget::close().

  • inspector/remote/glib/RemoteInspectorGlib.cpp:

(Inspector::RemoteInspector::receivedCloseMessage):

7:53 AM Changeset in webkit [217829] by Yusuke Suzuki
  • 2 edits in trunk/Source/bmalloc

struct does not accept initializer-form if member has initializers in GCC 4.9
https://bugs.webkit.org/show_bug.cgi?id=172974

Reviewed by Carlos Garcia Campos.

struct cannot accept initializer-form constructor (like, ListNode<T> t { ... }) if
the member of the struct has a default initializer.
Here is a simple snippet.

template<typename T>
struct Pair {

T* prev { nullptr };
T* next { nullptr };

};

Pair<int> pair { nullptr, nullptr }; compile erorr in GCC 4.9.

Instead, we define a default constructor (to invoke default initializers) and a constructor
to accept the above initialization.

  • bmalloc/List.h:

(bmalloc::ListNode::ListNode):
(bmalloc::List::iterator::iterator):

7:46 AM Changeset in webkit [217828] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit2

[WPE] Don't disable Web security preference by default
https://bugs.webkit.org/show_bug.cgi?id=172964

Reviewed by Carlos Garcia Campos.

  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::View::View): Don't disable Web security by default.

7:39 AM Changeset in webkit [217827] by ggaren@apple.com
  • 2 edits in trunk/Source/bmalloc

Try to fix the GTK build.

Unreviewed.

  • bmalloc/List.h:

(bmalloc::List::List):

7:30 AM Changeset in webkit [217826] by graouts@webkit.org
  • 4 edits in trunk

Update modern media controls testing utilities
https://bugs.webkit.org/show_bug.cgi?id=172976
<rdar://problem/32588432>

Reviewed by Eric Carlson.

Source/WebCore:

Stop logging an error when we're not able to load UI Strings since UI strings
are not defined in the majority of modern-media-controls tests as we load the
code directly from the modern-media-controls module and can't reach into the
English.lproj directory, nor is it necessary.

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

(UIString):

LayoutTests:

Update the list of CSS files to load to match the current list of
existing CSS files in the modern-media-controls module.

  • media/modern-media-controls/resources/media-controls-loader.js:
4:46 AM Changeset in webkit [217825] by clopez@igalia.com
  • 1 edit
    1 add in trunk/Tools

[WPE] Add an install-dependencies script
https://bugs.webkit.org/show_bug.cgi?id=172948

Reviewed by Žan Doberšek.

It is based on the gtk/install-dependencies script.
Includes support for Debian based distrubutions, Fedora and Arch.
It has been tested on a minimal Debian 9 chroot.

  • wpe/install-dependencies: Added.
2:01 AM Changeset in webkit [217824] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebCore

[GStreamer] Use the same draw timer and mutex when AC disabled or building without OpenGL
https://bugs.webkit.org/show_bug.cgi?id=172923

Reviewed by Michael Catanzaro.

We have two different paths to do the same. When building without OpenGL, the VideoRenderRequestScheduler has
its own timer and we need to add ifdefs to handle that. But when building with OpenGL we still support
non-accelerated rendering that does the same than the VideoRenderRequestScheduler timer, but using the media
player timer instead. We can simplify the code and remove more ifdefs by using the media player timer and mutex
in all cases for non-accelerated rendering.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::repaint):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(VideoRenderRequestScheduler::start):
(VideoRenderRequestScheduler::stop):
(VideoRenderRequestScheduler::requestRender):
(VideoRenderRequestScheduler::VideoRenderRequestScheduler): Deleted.
(VideoRenderRequestScheduler::render): Deleted.

1:10 AM Changeset in webkit [217823] by graouts@webkit.org
  • 60 edits
    4 copies
    2 moves
    31 adds
    94 deletes in trunk

Update media controls to match latest design specs
https://bugs.webkit.org/show_bug.cgi?id=172932

Reviewed by Dean Jackson.

Source/WebCore:

The media controls specs have changed and we now implement them. The main controls bar now
appears to be floating, with a rounded corners and a margin around it. Some of the controls
it used to contain now may appear outside of it. Specifically, the fullscreen and
picture-in-picture buttons now are displayed in a dedicated controls bar in the top-left
corner and the mute button, on iOS (where we don't support changing the volume when inline),
is displayed in the top right corner.

Another small UI improvement is that we display an activity indicator when we are waiting
for data to initiate or resume playback instead of showing the elapsed time label. We also
make displaying the scrubber more important than displaying other controls, except for the
play/pause button, when width becomes scarce. Finally, we no longer use a speci layer type
for the controls bar backgrounds, we now use the same "backdrop-filter" and tint overlay
on both macOS and iOS.

Since this work had previously been done through WebKitAdditions, we remove the specific
build phase code that we added for this purpose and are now only ever looking for media
controls code in the WebCore source tree.

  • Modules/modern-media-controls/controls/activity-indicator.css: Added.

(.activity-indicator):
(.activity-indicator > div):
(.activity-indicator > .ne):
(.activity-indicator > .e):
(.activity-indicator > .se):
(.activity-indicator > .s):
(.activity-indicator > .sw):
(.activity-indicator > .w):
(.activity-indicator > .nw):
(@keyframes activity-indicator-pulse):
(to):

  • Modules/modern-media-controls/controls/airplay-button.js:
  • Modules/modern-media-controls/controls/auto-hide-controller.js: Added.

(AutoHideController):
(AutoHideController.prototype.get fadesWhileIdle):
(AutoHideController.prototype.set fadesWhileIdle):
(AutoHideController.prototype.handleEvent):
(AutoHideController.prototype.gestureRecognizerStateDidChange):
(AutoHideController.prototype.mediaControlsFadedStateDidChange):
(AutoHideController.prototype.mediaControlsBecameInvisible):
(AutoHideController.prototype._cancelNonEnforcedAutoHideTimer):
(AutoHideController.prototype._cancelAutoHideTimer):
(AutoHideController.prototype._resetAutoHideTimer):
(AutoHideController.prototype._autoHideTimerFired):

  • Modules/modern-media-controls/controls/background-click-delegate-notifier.js: Added.

(BackgroundClickDelegateNotifier):
(BackgroundClickDelegateNotifier.prototype.handleEvent):

  • Modules/modern-media-controls/controls/background-tint.css:

(.background-tint,):
(.background-tint > .blur):
(.background-tint > .tint):

  • Modules/modern-media-controls/controls/button.css:

(button):
(button > picture):
(button.skip-back > picture,):
(button.on > picture):
(button:active > picture):
(button.corner):
(button.center,):
(button.center):
(button.small-center):
(button.center > .background-tint,):
(button.center > picture,):
(button.center:active > picture,):

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

(Button.prototype.get iconName):
(Button.prototype.set iconName):
(Button.prototype.get on):
(Button.prototype.set on):
(Button.prototype.get style):
(Button.prototype.set style):
(Button.prototype.get scaleFactor):
(Button.prototype.set scaleFactor):
(Button.prototype.handleEvent):
(Button.prototype.commit):
(Button.prototype._loadImage):
(Button.prototype._imageSourceDidLoad):
(Button.prototype._updateImage):
(Button.prototype._updateImageMetrics):
(Button):

  • Modules/modern-media-controls/controls/buttons-container.css:

(.buttons-container):
(.ios .buttons-container button):

  • Modules/modern-media-controls/controls/buttons-container.js:
  • Modules/modern-media-controls/controls/controls-bar.css:

(.controls-bar):
(.controls-bar.faded): Deleted.

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

(ControlsBar.prototype.get children):
(ControlsBar.prototype.set children):
(ControlsBar.prototype.commitProperty):
(ControlsBar.prototype.get userInteractionEnabled): Deleted.
(ControlsBar.prototype.set userInteractionEnabled): Deleted.
(ControlsBar.prototype.get fadesWhileIdle): Deleted.
(ControlsBar.prototype.set fadesWhileIdle): Deleted.
(ControlsBar.prototype.get visible): Deleted.
(ControlsBar.prototype.set visible): Deleted.
(ControlsBar.prototype.get faded): Deleted.
(ControlsBar.prototype.set faded): Deleted.
(ControlsBar.prototype.handleEvent): Deleted.
(ControlsBar.prototype.gestureRecognizerStateDidChange): Deleted.
(ControlsBar.prototype._cancelNonEnforcedAutoHideTimer): Deleted.
(ControlsBar.prototype._cancelAutoHideTimer): Deleted.
(ControlsBar.prototype._resetAutoHideTimer): Deleted.
(ControlsBar.prototype._autoHideTimerFired): Deleted.

  • Modules/modern-media-controls/controls/fullscreen-button.js:
  • Modules/modern-media-controls/controls/icon-button.css: Removed.
  • Modules/modern-media-controls/controls/icon-button.js: Removed.
  • Modules/modern-media-controls/controls/icon-service.js:

(const.iconService.new.IconService.prototype.imageForIconAndLayoutTraits):
(const.iconService.new.IconService.prototype._fileNameAndPlatformForIconAndLayoutTraits):
(const.iconService.new.IconService):
(const.iconService.new.IconService.prototype.imageForIconNameAndLayoutTraits): Deleted.
(const.iconService.new.IconService.prototype._fileNameAndPlatformForIconNameAndLayoutTraits): Deleted.

  • Modules/modern-media-controls/controls/inline-layout-support.js: Removed.
  • Modules/modern-media-controls/controls/inline-media-controls.css: Added.

(.media-controls.inline > .controls-bar):
(.media-controls.inline > .controls-bar.top-left):
(.media-controls.inline.audio > .controls-bar):
(.media-controls.inline > .controls-bar > *):
(.media-controls.inline > button.mute):
(.media-controls.inline > button.play-pause.corner):
(.media-controls.inline.audio > button.play-pause.corner):
(.media-controls.inline > .controls-bar button):
(.media-controls.inline button.start.center > picture,):
(.media-controls.inline button.start.small-center > picture,):
(.media-controls.inline .time-control,):

  • Modules/modern-media-controls/controls/inline-media-controls.js: Added.

(InlineMediaControls):
(InlineMediaControls.prototype.set shouldUseAudioLayout):
(InlineMediaControls.prototype.set shouldUseSingleBarLayout):
(InlineMediaControls.prototype.get showsStartButton):
(InlineMediaControls.prototype.set showsStartButton):
(InlineMediaControls.prototype.showPlacard):
(InlineMediaControls.prototype.hidePlacard):
(InlineMediaControls.prototype.layout):
(InlineMediaControls.prototype.commitProperty):
(InlineMediaControls.prototype.get preferredMuteButtonStyle):
(InlineMediaControls.prototype._topLeftContainerButtons):
(InlineMediaControls.prototype._leftContainerButtons):
(InlineMediaControls.prototype._rightContainerButtons):
(InlineMediaControls.prototype._droppableButtons):

  • Modules/modern-media-controls/controls/ios-inline-media-controls.css: Removed.
  • Modules/modern-media-controls/controls/ios-inline-media-controls.js:

(IOSInlineMediaControls.prototype.get showsStartButton):
(IOSInlineMediaControls.prototype.set showsStartButton):
(IOSInlineMediaControls.prototype.gestureRecognizerStateDidChange):
(IOSInlineMediaControls.prototype._pinchGestureRecognizerStateDidChange):
(IOSInlineMediaControls.prototype._tapGestureRecognizerStateDidChange):
(IOSInlineMediaControls):
(IOSInlineMediaControls.prototype.layout): Deleted.
(IOSInlineMediaControls.prototype.layoutTraitsDidChange): Deleted.

  • Modules/modern-media-controls/controls/layout-item.js:
  • Modules/modern-media-controls/controls/layout-node.js:

(LayoutNode.prototype.commitProperty):

  • Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css: Removed.
  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen .buttons-container.left):
(.media-controls.mac.fullscreen .buttons-container.center):
(.media-controls.mac.fullscreen .time-control):
(.media-controls.mac.fullscreen > .controls-bar .status-label):
(.media-controls.mac.fullscreen > .controls-bar > .background-tint > div): Deleted.
(.media-controls.mac.fullscreen .volume.slider): Deleted.
(.media-controls.mac.fullscreen button.volume-down): Deleted.
(.media-controls.mac.fullscreen button.volume-up): Deleted.
(.media-controls.mac.fullscreen button.rewind): Deleted.
(.media-controls.mac.fullscreen button.play-pause): Deleted.
(.media-controls.mac.fullscreen button.forward): Deleted.
(.media-controls.mac.fullscreen .time-label): Deleted.
(.media-controls.mac.fullscreen .scrubber): Deleted.

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls.prototype.handleEvent):
(MacOSFullscreenMediaControls.prototype.layout):
(MacOSFullscreenMediaControls.prototype._handleMousedown):
(MacOSFullscreenMediaControls.prototype._handleMousemove):

  • Modules/modern-media-controls/controls/macos-inline-media-controls.css:

(.media-controls.mac.inline .volume-slider-container):
(.media-controls.mac.inline.audio .volume-slider-container):
(.media-controls.mac.inline .volume-slider-container > .background-tint):
(.media-controls.mac.inline .volume-slider-container > .background-tint > div):
(.media-controls.mac.inline .volume-slider-container > .slider):
(.media-controls.mac.inline > .controls-bar): Deleted.
(.media-controls.mac.inline > .controls-bar > *): Deleted.
(.media-controls.mac.inline > button.start > div): Deleted.
(.media-controls.mac.inline > .controls-bar button): Deleted.
(.media-controls.mac.inline button.play-pause): Deleted.
(.media-controls.mac.inline button.skip-back): Deleted.
(.media-controls.mac.inline .scrubber.slider): Deleted.
(.media-controls.mac.inline button.mute): Deleted.
(.media-controls.mac.inline button.airplay): Deleted.
(.media-controls.mac.inline button.pip): Deleted.
(.media-controls.mac.inline button.tracks): Deleted.
(.media-controls.mac.inline button.fullscreen): Deleted.
(.media-controls.mac.inline .time-label,): Deleted.
(.media-controls.mac.inline .volume.slider): Deleted.

  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:

(MacOSInlineMediaControls.prototype.layout):
(MacOSInlineMediaControls.prototype.get preferredMuteButtonStyle):
(MacOSInlineMediaControls.prototype.handleEvent):
(MacOSInlineMediaControls.prototype.layoutTraitsDidChange): Deleted.

  • Modules/modern-media-controls/controls/macos-media-controls.js: Removed.
  • Modules/modern-media-controls/controls/media-controls.css:

(:host(audio)):
(*):
(:host(audio), *):
(.media-controls-container):
(.media-controls):
(.media-controls > *):
(.media-controls.shows-tracks-panel > .controls-bar,):
(.media-controls.faded > *:not(.placard)):
(.media-controls .time-label,):

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

(MediaControls.prototype.get visible):
(MediaControls.prototype.set visible):
(MediaControls.prototype.get faded):
(MediaControls.prototype.set faded):
(MediaControls.prototype.showTracksPanel):
(MediaControls.prototype.hideTracksPanel):
(MediaControls.prototype.isPointInControls):
(MediaControls.prototype.handleEvent):
(MediaControls.prototype.commitProperty):
(MediaControls.prototype.get layoutTraits): Deleted.
(MediaControls.prototype.set layoutTraits): Deleted.
(MediaControls.prototype.get showsStartButton): Deleted.
(MediaControls.prototype.set showsStartButton): Deleted.
(MediaControls.prototype.get placard): Deleted.
(MediaControls.prototype.get showsPlacard): Deleted.
(MediaControls.prototype.showPlacard): Deleted.
(MediaControls.prototype.hidePlacard): Deleted.
(MediaControls.prototype.controlsBarVisibilityDidChange): Deleted.
(MediaControls.prototype.controlsBarFadedStateDidChange): Deleted.
(MediaControls.prototype.layoutTraitsDidChange): Deleted.
(MediaControls.prototype.layout): Deleted.
(MediaControls.prototype._invalidateChildren): Deleted.

  • Modules/modern-media-controls/controls/media-document.css:

(:host(.media-document)):
(:host(.media-document.audio.mac)):

  • Modules/modern-media-controls/controls/mute-button.js:
  • Modules/modern-media-controls/controls/pip-button.js:
  • Modules/modern-media-controls/controls/placard.css:

(.placard):
(.placard .container):
(.placard button):
(.placard button > picture):
(.placard .icon): Deleted.

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

(Placard.):
(Placard.prototype.layout):

  • Modules/modern-media-controls/controls/play-pause-button.js:

(PlayPauseButton):
(PlayPauseButton.prototype.commit):

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

  • Modules/modern-media-controls/controls/scrubber.js: Removed.
  • Modules/modern-media-controls/controls/seek-button.js:
  • Modules/modern-media-controls/controls/skip-back-button.js:
  • Modules/modern-media-controls/controls/skip-forward-button.js: Added.

(SkipForwardButton):

  • Modules/modern-media-controls/controls/slider.css:

(.slider):
(.slider > .custom-slider,):
(.slider > .custom-slider):
(.slider > .custom-slider > *):
(.slider > .custom-slider > .fill):
(.slider > .custom-slider > .track):
(.slider > .custom-slider > .primary):
(.slider > .custom-slider > .secondary):
(.slider > .custom-slider > .knob):
(.slider > input):
(.slider > input::-webkit-slider-thumb):
(.slider.disabled > input,):
(.ios .slider > input):
(.ios .slider > input::-webkit-slider-runnable-track):
(.ios .slider > input::-webkit-slider-thumb):
(.slider > canvas,): Deleted.
(.slider > canvas): Deleted.

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

(Slider.prototype.set inputAccessibleLabel):
(Slider.prototype.get disabled):
(Slider.prototype.set disabled):
(Slider.prototype.get secondaryValue):
(Slider.prototype.set secondaryValue):
(Slider.prototype._formatTime):
(Slider.prototype.commitProperty):
(Slider.prototype.commit):
(Slider.prototype.draw): Deleted.
(addRoundedRect): Deleted.

  • Modules/modern-media-controls/controls/start-button.css: Removed.
  • Modules/modern-media-controls/controls/start-button.js: Removed.
  • Modules/modern-media-controls/controls/status-label.css:

(.status-label):

  • Modules/modern-media-controls/controls/status-label.js:

(StatusLabel.prototype.get enabled):
(StatusLabel.prototype.set enabled): Deleted.

  • Modules/modern-media-controls/controls/text-tracks.css:

(video::-webkit-media-text-track-container):
(video::-webkit-media-text-track-container.visible-controls-bar):
(video::-webkit-media-text-track-container.visible-controls-bar.compact-controls-bar): Deleted.

  • Modules/modern-media-controls/controls/time-control.js:

(TimeControl.prototype.set duration):
(TimeControl.prototype.set currentTime):
(TimeControl.prototype.get loading):
(TimeControl.prototype.set loading):
(TimeControl.prototype.get minimumWidth):
(TimeControl.prototype.get idealMinimumWidth):
(TimeControl.prototype.layout):
(TimeControl.prototype._performIdealLayout):
(TimeControl.prototype.get useSixDigitsForTimeLabels): Deleted.
(TimeControl.prototype.set useSixDigitsForTimeLabels): Deleted.
(TimeControl.prototype.get isSufficientlyWide): Deleted.

  • Modules/modern-media-controls/controls/time-label.css:

(.time-label):

  • Modules/modern-media-controls/controls/time-label.js:

(TimeLabel.prototype.setValueWithNumberOfDigits):
(TimeLabel.prototype.commitProperty):
(TimeLabel.prototype._formattedTime):
(doubleDigits):
(TimeLabel.prototype.set value): Deleted.

  • Modules/modern-media-controls/controls/tracks-button.js:
  • Modules/modern-media-controls/controls/tracks-panel.css:

(.tracks-panel > .scrollable-container):
(.tracks-panel section):
(.tracks-panel section > h3):
(.tracks-panel > .background-tint > div,): Deleted.

  • Modules/modern-media-controls/controls/volume-down-button.js:
  • Modules/modern-media-controls/controls/volume-slider.css: Removed.
  • Modules/modern-media-controls/controls/volume-slider.js: Removed.
  • Modules/modern-media-controls/controls/volume-up-button.js:
  • Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js:

(GestureRecognizer.prototype.gestureBegan):
(GestureRecognizer.prototype._removeTrackingListeners):

  • Modules/modern-media-controls/gesture-recognizers/tap.js:

(TapGestureRecognizer.prototype.touchesMoved):

(UIString):
(formatTimeByUnit):

  • Modules/modern-media-controls/media/audio-support.js: Added.

(AudioSupport.prototype.get control):
(AudioSupport.prototype.get mediaEvents):
(AudioSupport.prototype.get tracksToMonitor):
(AudioSupport.prototype.syncControl):
(AudioSupport):

  • Modules/modern-media-controls/media/controls-visibility-support.js:

(ControlsVisibilitySupport.prototype._updateControls):
(ControlsVisibilitySupport):

  • Modules/modern-media-controls/media/fullscreen-support.js:

(FullscreenSupport.prototype.buttonWasPressed):
(FullscreenSupport.prototype.syncControl):
(FullscreenSupport):
(FullscreenSupport.prototype.iOSInlineMediaControlsRecognizedPinchInGesture): Deleted.

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

(MediaController):
(MediaController.prototype.get isAudio):
(MediaController.prototype.get isYouTubeEmbedWithTitle):
(MediaController.prototype.get isFullscreen):
(MediaController.prototype.get layoutTraits):
(MediaController.prototype.iOSInlineMediaControlsRecognizedTapGesture):
(MediaController.prototype.iOSInlineMediaControlsRecognizedPinchInGesture):
(MediaController.prototype._updateControlsIfNeeded):
(MediaController.prototype._updateTextTracksClassList):
(MediaController.prototype.controlsBarFadedStateDidChange): Deleted.

  • Modules/modern-media-controls/media/media-document-controller.js:

(MediaDocumentController.prototype._mediaDocumentHasMetadata):

  • Modules/modern-media-controls/media/placard-support.js:

(PlacardSupport.prototype._updatePlacard):
(PlacardSupport):

  • Modules/modern-media-controls/media/scrubbing-support.js:

(ScrubbingSupport.prototype.get mediaEvents):
(ScrubbingSupport.prototype.syncControl):
(ScrubbingSupport):

  • Modules/modern-media-controls/media/skip-back-support.js:
  • Modules/modern-media-controls/media/skip-forward-support.js: Added.

(SkipForwardSupport.prototype.get control):
(SkipForwardSupport.prototype.get mediaEvents):
(SkipForwardSupport.prototype.buttonWasPressed):
(SkipForwardSupport.prototype.syncControl):
(SkipForwardSupport):

  • Modules/modern-media-controls/media/start-support.js:

(StartSupport):
(StartSupport.prototype.handleEvent):
(StartSupport.prototype._shouldShowStartButton):
(StartSupport.prototype.get control): Deleted.
(StartSupport.prototype.syncControl): Deleted.

  • Modules/modern-media-controls/media/status-support.js:

(StatusSupport.prototype.get mediaEvents):
(StatusSupport.prototype.syncControl):
(StatusSupport):

  • Modules/modern-media-controls/media/time-control-support.js: Renamed from Source/WebCore/Modules/modern-media-controls/media/time-labels-support.js.

(TimeControlSupport.prototype.syncControl):
(TimeControlSupport):

  • Modules/modern-media-controls/media/tracks-support.js:

(TracksSupport.prototype.syncControl):

  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Update test expectations to make a few of the tests we had already rebaselined pass.

  • TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
12:57 AM Changeset in webkit [217822] by sbarati@apple.com
  • 4 edits in trunk

Add a version number to ARES-6
https://bugs.webkit.org/show_bug.cgi?id=172962

Reviewed by Yusuke Suzuki.

  • ARES-6/glue.js:

(driver.reportResult):

Jun 5, 2017:

11:30 PM Changeset in webkit [217821] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline fast/mediacapturefromelement/CanvasCaptureMediaStream-2d-events.html and update TestExpectations.

Unreviewed test gardening.

  • fast/mediacapturefromelement/CanvasCaptureMediaStream-2d-events-expected.txt:
10:44 PM Changeset in webkit [217820] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip storage/domstorage/sessionstorage/set-item-synchronous-keydown.html on iOS.
https://bugs.webkit.org/show_bug.cgi?id=172943

Unreviewed test gardening.

  • platform/ios/TestExpectations:
9:53 PM Changeset in webkit [217819] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Try to fix features.json by adding an ESNext section.

Unreviewed.

  • features.json:
9:47 PM Changeset in webkit [217818] by Wenson Hsieh
  • 6 edits in trunk

Refactor -[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:] to check readable types
https://bugs.webkit.org/show_bug.cgi?id=172891
<rdar://problem/32204540>

Reviewed by Darin Adler.

Source/WebCore:

Tweaks some logic in PlatformPasteboardIOS and WebItemProviderPasteboard to correctly construct objects in
-valuesForPasteboardType:inItemSet:. Previously, we have a hard-coded map of UTI type to Class in the form of
static helpers titled is{RichText, String, URL, Image, Color}Type in WebItemProviderPasteboard. We would use
these functions to determine whether an NSAttributedString, NSString, NSURL, UIImage or UIColor should be
constructed using the loaded item provider data. This is incorrect for some UTIs, such as public.html, which
cannot actually be used to construct an NSAttributedString -- this caused -valuesForPasteboardType:inItemSet: to
always return nil when attempting to create an object corresponding to public.html.

To fix this, we refactor -valuesForPasteboardType:inItemSet: to instead iterate through UIItemProviderReading-
conformant classes in search for a class that can be created for the given UTI type. If no such class exists, we
then fall back to custom WebKit handling of the dropped UTI type, which so far only includes reading an NSString
with public.plain-text if the UTI is public.html (i.e. reading the HTML source from loaded item provider data).

Covered by 2 new API tests:
DataInteractionTests.ExternalSourceHTMLToContentEditable
DataInteractionTests.ExternalSourceAttributedStringToContentEditable

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::stringForType):
(WebCore::PlatformPasteboard::readString):

In some cases, -[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:] may now return an
NSAttributedString when an NSString was previously created. This adjusts for that possibility by returning just
the plain text, -[NSAttributedString string], if the read object was an NSAttributedString.

  • platform/ios/WebItemProviderPasteboard.mm:

(allLoadableClasses):
(classForTypeIdentifier):
(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):

See description above for more details.

(isRichTextType): Deleted.
(isStringType): Deleted.
(isURLType): Deleted.
(isColorType): Deleted.
(isImageType): Deleted.

Removes these heuristics that attempt to "guess" the best UIItemProviderReading class to try and load for a
given UTI type.

  • rendering/RenderText.cpp:

(WebCore::RenderText::draggedContentRangesBetweenOffsets):

Adds a nil check to fix a debug assertion hit when running DataInteractionTests.

Tools:

Adds 2 new API tests to exercise data interaction of HTML data and an attributed string into a rich
contenteditable. See WebCore ChangeLog for more details.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

9:00 PM Changeset in webkit [217817] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

Unreviewed GTK expectations gardening

Mark a few tests as crashing.

  • platform/gtk/TestExpectations:
8:51 PM Changeset in webkit [217816] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Follow-up: Update JSC's features.json
https://bugs.webkit.org/show_bug.cgi?id=172942

Rubber-stamped by Jon Davis.

  • features.json: Change "Supported in preview" to

"Supported" to try to fix <https://webkit.org/status/>.

8:22 PM Changeset in webkit [217815] by ggaren@apple.com
  • 2 edits in trunk/Source/bmalloc

Try to fix the GTK build.

Unreviewed.

  • bmalloc/List.h:
7:59 PM Changeset in webkit [217814] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

We don't properly parse init_expr when the opcode is an unexpected opcode
https://bugs.webkit.org/show_bug.cgi?id=172945

Reviewed by JF Bastien.

The bug is a simple typo. It should use the constant
true instead of false when invoking the WASM_PARSER_FAIL_IF
macro. This failure is already caught by spec tests that fail
on arm64 devices.

  • wasm/WasmModuleParser.cpp:
7:59 PM Changeset in webkit [217813] by Chris Dumez
  • 2 edits in trunk/LayoutTests

ASSERTION FAILED: RunLoop::isMain() in com.apple.WebKit: IPC::Connection::sendSyncMessage + 128
https://bugs.webkit.org/show_bug.cgi?id=172943
<rdar://problem/31288058>

Reviewed by Alexey Proskuryakov.

Make test clean a little bit more robust.

  • storage/domstorage/sessionstorage/set-item-synchronous-keydown.html:
7:34 PM Changeset in webkit [217812] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

OMG tier up checks should be a patchpoint
https://bugs.webkit.org/show_bug.cgi?id=172944

Reviewed by Saam Barati.

Tier up checks in BBQ should be done as a patchpoint rather than individual B3 opcodes.
In order to reduce code generated out of line in each function. We generate a single stub
that pushes all the callee-saves. This looks like a 5-10% compile time speedup.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::emitTierUpCheck):
(JSC::Wasm::B3IRGenerator::addLoop):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::triggerOMGTierUpThunkGenerator):

  • wasm/WasmThunks.h:
7:21 PM Changeset in webkit [217811] by ggaren@apple.com
  • 12 edits in trunk/Source/bmalloc

bmalloc: Small and large objects should share memory
https://bugs.webkit.org/show_bug.cgi?id=172880
<rdar://problem/31494732>

Reviewed by Sam Weinig.

This reduces our high water mark memory usage on JetStream on macOS
by 10%-20%. It also has the nice side effect that we can free small
object metadata after returning from a high water mark.

No change in throughput.

Our old algorithm allocated small object chunks and large objects in
segregated virtual memory and never recycled addresses between them.
This provided a slight security benefit because we could apply guard
pages between the segregated ranges and we would never reuse the same
virtual address for object and metadata memory.

Our new algorithm allocates small object chunks from the large object
allocator. This naturally recycles memory between small chunks and large
objects, and between small chunks of different page classes. This allows
us to shift memory between allocation types as a program moves between
different phases of allocation, and to delete small object chunk metadata
when a program shrinks back from a high water mark.

Two intuitions I had about memory use turned out to be backwards in
this context:

(1) I thought that this optimization would work because it allowed you to
allocate and free a 4MB object and then reuse that large allocation to
service small allocations. In practice, the common benefit seems to be
the opposite: After you allocate and free many small objects, you can
stitch them together to allocate a large object without growing the heap.

(2) I thought that it would be more memory-efficient to allocate
fine-grained pages from the large object allocator. In practice, giving
the large object allocator too many arbitrarily-sized ranges to manage
leads to fragmentation. Meanwhile, segregated fit is a powerful memory
optimization. So, it's best to return small object memory to the large
allocator only when a whole small object chunk is free.

  • bmalloc/Chunk.h:

(bmalloc::Chunk::ref):
(bmalloc::Chunk::deref):
(bmalloc::Chunk::refCount):
(bmalloc::Chunk::freePages): We keep a free list per chunk and refcount
each chunk so we can notice when a chunk becomes empty, and return it
to the large allocator.

(bmalloc::forEachPage): A new helper function for iterating the pages
in a Chunk.

(bmalloc::Chunk::Chunk): Use forEachPage instead of manual iteration.
Use { } initialization because we don't get zero-initialized by the OS
anymore.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):
(bmalloc::Heap::concurrentScavenge):
(bmalloc::Heap::scavenge): Don't bother unlocking while scavenging. I
wasn't able to show it to be a consistent speedup. A more promising
approach, if we find a motivating example, is for the scavenger to give
up and return early if any other client is waiting on the lock.

(bmalloc::Heap::allocateSmallChunk): New helper function for allocating
a small chunk. It allocates through the large allocator to facilitate
sharing. We still allocate a chunk at a time instead of a page at a time.
Surprisingly, more precise page-at-a-time allocation is worse for memory
use because of fragmentation. Segregated fit is a powerful optimization.

(bmalloc::Heap::deallocateSmallChunk): New helper function for deallocating
a small chunk.

(bmalloc::Heap::allocateSmallPage): Updated for new APIs.

(bmalloc::Heap::deallocateSmallLine): Updated for new APIs. Note that
we cache one free chunk per page class. This avoids churn in the large
allocator when you free(malloc(X)).

(bmalloc::Heap::allocateSmallBumpRangesByMetadata):
(bmalloc::Heap::allocateSmallBumpRangesByObject):
(bmalloc::Heap::tryAllocateLarge):
(bmalloc::Heap::scavengeSmallPages): Deleted.
(bmalloc::Heap::scavengeLargeObjects): Deleted.

  • bmalloc/Heap.h:
  • bmalloc/LargeMap.h:

(bmalloc::LargeMap::begin):
(bmalloc::LargeMap::end): Added iteration helpers for scavenging.

  • bmalloc/LargeRange.h:

(bmalloc::LargeRange::physicalSize): Added a comment about something
that I confused myself about in this patch.

  • bmalloc/List.h:

(bmalloc::List::iterator::operator*):
(bmalloc::List::iterator::operator->):
(bmalloc::List::iterator::operator!=):
(bmalloc::List::iterator::operator++):
(bmalloc::List::begin):
(bmalloc::List::end):
(bmalloc::List::pushFront):
(bmalloc::List::remove):
(bmalloc::ListNode::ListNode): Deleted. Added iteration helpers for
scavenging. Changed the default state of a Node to null pointers instead
of self pointers to distinguish the null node from the empty node for
easier debugging.

  • bmalloc/Sizes.h: Changed the chunk size to 1MB to increase the chances

of a chunk becoming free and recyclable.

  • bmalloc/SmallPage.h:

(bmalloc::SmallPage::hasPhysicalPages):
(bmalloc::SmallPage::setHasPhysicalPages): Track physical state by page
instead of implicitly by which list a page is in. It's simpler not
to have to move chunks and pages between physical vs virtual lists.

(bmalloc::SmallPage::SmallPage): Deleted.

  • bmalloc/VMHeap.cpp:

(bmalloc::VMHeap::tryAllocateLargeChunk):
(bmalloc::VMHeap::allocateSmallChunk): Deleted.

  • bmalloc/VMHeap.h:

(bmalloc::VMHeap::allocateSmallPage): Deleted.
(bmalloc::VMHeap::deallocateSmallPage): Deleted. Small chunk allocation
just forwards to the large allocator now.

  • bmalloc/bmalloc.h:

(bmalloc::api::scavenge):

7:03 PM Changeset in webkit [217810] by Chris Dumez
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: RunLoop::isMain() in com.apple.WebKit: IPC::Connection::sendSyncMessage + 128
https://bugs.webkit.org/show_bug.cgi?id=172943
<rdar://problem/31288058>

Reviewed by Alexey Proskuryakov.

Source/WebKit2:

In Connection::sendMessage(), make sure we only ever transform asynchronous messages into synchronous
ones if sendMessage() is called on the main thread. This is necessary because we no longer support
sending synchronous messages from a background thread since r205125.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::sendMessage):
(IPC::Connection::sendSyncMessage):

LayoutTests:

Add better test coverage.

  • storage/domstorage/sessionstorage/set-item-synchronous-keydown-expected.txt: Added.
  • storage/domstorage/sessionstorage/set-item-synchronous-keydown.html: Added.
5:03 PM Changeset in webkit [217809] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebKit2

Revert r217405, this headerpad increase is no longer needed.

Rubber-stamped by Dan Bernstein.

  • Configurations/BaseXPCService.xcconfig:
5:03 PM Changeset in webkit [217808] by Joseph Pecoraro
  • 4 edits in trunk/Source/JavaScriptCore

Remove unused VM members
https://bugs.webkit.org/show_bug.cgi?id=172941

Reviewed by Mark Lam.

  • runtime/HashMapImpl.h:

(JSC::HashMapImpl::selectStructure): Deleted.

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
4:52 PM Changeset in webkit [217807] by commit-queue@webkit.org
  • 17 edits
    1 add in trunk

Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
https://bugs.webkit.org/show_bug.cgi?id=172848
<rdar://problem/25709212>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-06-05
Reviewed by Saam Barati.

JSTests:

  • typeProfiler/inheritance.js:

Rewrite the test slightly for clarity. The hoisting was confusing.

  • heapProfiler/class-names.js: Added.

(MyES5Class):
(MyES6Class):
(MyES6Subclass):
Test object types and improved class names.

  • heapProfiler/driver/driver.js:

(CheapHeapSnapshotNode):
(CheapHeapSnapshot):
(createCheapHeapSnapshot):
(HeapSnapshot):
(createHeapSnapshot):
Update snapshot parsing from version 1 to version 2.

Source/JavaScriptCore:

  • heap/HeapSnapshotBuilder.h:
  • heap/HeapSnapshotBuilder.cpp:

Update the snapshot version. Change the node's 0 | 1 internal value
to be a 32bit bit flag. This is nice in that it is both compatible
with the previous snapshot version and the same size. We can use more
flags in the future.

(JSC::HeapSnapshotBuilder::json):
In cases where the classInfo gives us "Object" check for a better
class name by checking (o).proto.constructor.name. We avoid this
check in cases where (o).hasOwnProperty("constructor") which is the
case for most Foo.prototype objects. Otherwise this would get the
name of the Foo superclass for the Foo.prototype object.

  • runtime/JSObject.cpp:

(JSC::JSObject::calculatedClassName):
Handle some possible edge cases that were not handled before. Such
as a JSObject without a GlobalObject, and an object which doesn't
have a default getPrototype. Try to make the code a little clearer.

Source/WebInspectorUI:

  • UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:

(HeapSnapshot):
Support the new snapshot version. The only thing that changes are the
node flags, and its actually completely compatible with version 1.

(HeapSnapshot.updateCategoriesAndMetadata):
List the count of object type instances in each class category.

(HeapSnapshot.prototype.serializeNode):
Include whether or not the node is an object type.

  • UserInterface/Proxies/HeapSnapshotNodeProxy.js:

(WebInspector.HeapSnapshotNodeProxy):
(WebInspector.HeapSnapshotNodeProxy.deserialize):
Add a new Node isObjectType property based on the new data.

  • UserInterface/Views/HeapSnapshotClassDataGridNode.js:

(WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):

  • UserInterface/Views/HeapSnapshotClusterContentView.js:

(WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
If a class contains 50% or more object type instances then it as such
instead of defaulting to native.

  • UserInterface/Views/HeapSnapshotDataGridTree.js:

(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
We can be more specific than the default if the individual instance is
known to be an object type.

LayoutTests:

  • inspector/unit-tests/heap-snapshot-expected.txt:
  • inspector/unit-tests/heap-snapshot.html:

Update for the new node flag.

4:51 PM Changeset in webkit [217806] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix for macOS 10.12

  • platform/spi/cocoa/AVKitSPI.h:
4:32 PM Changeset in webkit [217805] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Update JSC's features.json
https://bugs.webkit.org/show_bug.cgi?id=172942

Rubber stamped by Mark Lam.

  • features.json:
4:22 PM Changeset in webkit [217804] by jmarcell@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

4:15 PM Changeset in webkit [217803] by mitz@apple.com
  • 6 edits in trunk/Source

Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.

Source/WebCore:

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager togglePictureInPicture]):

Source/WebKit2:

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::mediaPlaybackControlsView):

4:04 PM Changeset in webkit [217802] by mitz@apple.com
  • 5 edits in trunk/Source

Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.

Source/WebCore:

  • platform/spi/cocoa/AVKitSPI.h:

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView updateMediaTouchBar]):

  • WebView/WebViewData.h:
4:01 PM Changeset in webkit [217801] by dbates@webkit.org
  • 2 edits
    1 add in trunk/Tools

webkitpy: Abstract Executive class
https://bugs.webkit.org/show_bug.cgi?id=172928
<rdar://problem/32569531>

Reviewed by Ryosuke Niwa.

Adds an AbstractExecutive class and makes Executive extend AbstractExecutive.
This will make it straightforward to create additional derived classes that
adhere to the same interface, say for iOS on-device testing.

  • Scripts/webkitpy/common/system/abstractexecutive.py: Added.

(AbstractExecutive):
(AbstractExecutive.run_and_throw_if_fail):
(AbstractExecutive.cpu_count):
(AbstractExecutive.interpreter_for_script):
(AbstractExecutive.shell_command_for_script):
(AbstractExecutive.kill_process):
(AbstractExecutive.check_running_pid):
(AbstractExecutive.running_pids):
(AbstractExecutive.wait_newest):
(AbstractExecutive.wait_limited):
(AbstractExecutive.interrupt):
(AbstractExecutive.default_error_handler):
(AbstractExecutive.ignore_error):
(AbstractExecutive._stringify_args):
(AbstractExecutive.command_for_printing):
(AbstractExecutive.run_command):
(AbstractExecutive.popen):
(AbstractExecutive.run_in_parallel):

  • Scripts/webkitpy/common/system/executive.py:

(Executive):
(Executive.cpu_count):
(Executive.running_pids):
(Executive.kill_all):
(Executive._compute_stdin):
(Executive.interpreter_for_script): Deleted.
(Executive.shell_command_for_script): Deleted.
(Executive.wait_newest): Deleted.
(Executive.wait_limited): Deleted.
(Executive.default_error_handler): Deleted.
(Executive.ignore_error): Deleted.
(Executive.command_for_printing): Deleted.

3:41 PM Changeset in webkit [217800] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix missing semicolon in r217795

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::calculateNaturalSize):

3:40 PM Changeset in webkit [217799] by jer.noble@apple.com
  • 28 edits
    4 adds in trunk/Source

Allow clients to specify a list of codecs which should require hardware decode support.
https://bugs.webkit.org/show_bug.cgi?id=172787

Reviewed by Alex Christensen.

Source/WebCore:

Add a new setting, checked by HTMLMediaElement, which allows MediaPlayerPrivate implementation
to require that the specified codecs have hardware support. This requirement will be supported
in the normal media loading path and the MSE path on Cocoa ports.

  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaCodecsRequiringHardwareSupport):

  • html/HTMLMediaElement.h:
  • page/Settings.cpp:

(WebCore::Settings::setMediaCodecsRequiringHardwareSupport):

  • page/Settings.h:

(WebCore::Settings::mediaCodecsRequiringHardwareSupport):

  • platform/cocoa/VideoToolboxSoftLink.cpp:
  • platform/cocoa/VideoToolboxSoftLink.h:
  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaCodecsRequiringHardwareSupport):

  • platform/graphics/avfoundation/objc/AVAssetTrackUtilities.h: Added.
  • platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm: Added.

(WebCore::assetTrackMeetsHardwareDecodeRequirements):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability):
(WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):

Source/WebKit2:

Add a WKWebPageConfiguration (and associated WebPreferences and WKPreferencesRef) properties
allowing clients to require specified codecs have hardware decode support. Also open up the
sandbox on Cocoa ports to services required to check for hardware decode availability.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetMediaCodecsRequiringHardwareSupport):
(WKPreferencesCopyMediaCodecsRequiringHardwareSupport):

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

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _mediaCodecsRequiringHardwareSupport]):
(-[WKWebViewConfiguration _setMediaCodecsRequiringHardwareSupport:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

Add a couple of convenience methods:

  • a String::split() that returns a vector (rather than taking an out-reference to a vector).
  • A Vector::map() template which takes a Callable and returns a Vector of a different type.
  • wtf/Vector.h:

(WTF::Vector::map):

  • wtf/text/WTFString.h:

(WTF::String::split):

3:28 PM Changeset in webkit [217798] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.

  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager togglePictureInPicture]):

3:12 PM Changeset in webkit [217797] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.

  • platform/spi/mac/AVFoundationSPI.h:
2:54 PM Changeset in webkit [217796] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.

  • platform/spi/cocoa/IOSurfaceSPI.h:
2:45 PM Changeset in webkit [217795] by Konstantin Tokarev
  • 3 edits in trunk/Source/WebCore

Fix MediaPlayerPrivateMediaFoundation::naturalSize
https://bugs.webkit.org/show_bug.cgi?id=172908

Reviewed by Alex Christensen.

MediaPlayerPrivateMediaFoundation::naturalSize should return size of
video frame corrected by PAR, not size of video element.

No new tests needed.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::load):
(WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
(WebCore::MediaPlayerPrivateMediaFoundation::setNaturalSize):
(WebCore::calculateNaturalSize):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::setMediaType):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2:04 PM Changeset in webkit [217794] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Destroy the associated renderer subtree when display: contents node is deleted.
https://bugs.webkit.org/show_bug.cgi?id=172920
<rdar://problem/32446045>

Reviewed by Antti Koivisto.

Since display: contents node does not create a renderer, we need to explicitly check
and distinguish it from the display: none case.

Covered by existing tests.

  • dom/ContainerNode.cpp:

(WebCore::destroyRenderTreeIfNeeded):

  • dom/Node.cpp:

(WebCore::Node::~Node): Promote ASSERT(!renderer()) to ASSERT_WITH_SECURITY_IMPLICATION.

  • dom/Text.cpp:

(WebCore::Text::~Text): Redundant assert. Text is a Node.

2:00 PM Changeset in webkit [217793] by Jonathan Bedard
  • 3 edits in trunk/Tools

webkitpy: Add iOS to platform
https://bugs.webkit.org/show_bug.cgi?id=172931

Reviewed by Daniel Bates.

  • Scripts/webkitpy/common/system/platforminfo.py:

PlatformInfo.init): Use platform_module.release() as the os_version for iOS device.
(PlatformInfo.is_ios): Added.
(PlatformInfo._determine_os_name): A platform name of 'ios' means that the os name is 'ios'.

  • Scripts/webkitpy/common/system/platforminfo_mock.py:

(MockPlatformInfo.is_ios): Added.

1:54 PM Changeset in webkit [217792] by clopez@igalia.com
  • 2 edits in trunk/Tools

[WPE][JHBuild] Switch github repository from git:// to https://
https://bugs.webkit.org/show_bug.cgi?id=172921

Reviewed by Alex Christensen.

  • wpe/jhbuild.modules:
1:29 PM Changeset in webkit [217791] by Beth Dakin
  • 16 edits in trunk/Source

Modify Netflix controlsManager quirk to prevent only scrubbing
https://bugs.webkit.org/show_bug.cgi?id=172881
-and corresponding-
rdar://problem/32228660

Reviewed by Andy Estes.

Source/WebCore:

Instead of preventing Netflix from getting a controlsManager at all, this patch
ONLY prevents touch bar scrubbing from working. This means that Netflix will now
get controls in the TouchBar, it means that the play/pause and PiP buttons will be
functional, and it means that the timeline will accurately represent the current
time, BUT users will not be able to use the timeline to scrub the video. This also
allows Netflix to work with other MediaRemote clients such as AirPods.

Remove the quirk code from here, since this is no longer the right place to test
if the MediaElement is hosted at Netflix.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::bestMediaElementForShowingPlaybackControlsManager):
(WebCore::needsPlaybackControlsManagerQuirk): Deleted.

Pass around a new bool allowsTouchBarScrubbing.

  • platform/cocoa/WebPlaybackSessionModel.h:

(WebCore::WebPlaybackSessionModelClient::allowsTouchBarScrubbingChanged):

  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:

Here’s where we check if we need quirky behavior.

  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
(WebCore::WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing):

Return the bool we have plumbed through tracking whether the current site
allowsTouchBarScrubbing from the existing delegate method
canBeginTouchBarScrubbing. We will always return NO for video elements on Netflix,
and this will prevent users from be able to scrub with the TouchBar on Netflix.

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):

More plumbing.

  • platform/mac/WebPlaybackSessionInterfaceMac.h:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged):
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):

Source/WebKit2:

Plumbing for allowsTouchBarScrubbing. See WebCore ChangeLog for more details.

  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing):
(WebKit::WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing):

  • WebProcess/cocoa/WebPlaybackSessionManager.h:
  • WebProcess/cocoa/WebPlaybackSessionManager.mm:

(WebKit::WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged):
(WebKit::WebPlaybackSessionManager::allowsTouchBarScrubbingChanged):

11:19 AM Changeset in webkit [217790] by jmarcell@apple.com
  • 1 copy in tags/Safari-603.3.4

Tag Safari-603.3.4.

10:49 AM Changeset in webkit [217789] by sbarati@apple.com
  • 2 edits in trunk/Websites/browserbench.org

Update index.html to include ARES-6.

Rubber stamped by Ryosuke Niwa.

  • index.html:
9:50 AM Changeset in webkit [217788] by Ryan Haddad
  • 6 edits
    8 adds in branches/safari-603-branch/LayoutTests

Merge r216126.

9:35 AM Changeset in webkit [217787] by Ryan Haddad
  • 41 edits
    2 adds in trunk/LayoutTests

Rebaseline tests for Windows after r217772.
https://bugs.webkit.org/show_bug.cgi?id=172866

Unreviewed test gardening.

  • platform/win/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt:
  • platform/win/svg/W3C-SVG-1.1/animate-elem-06-t-expected.txt:
  • platform/win/svg/W3C-SVG-1.1/animate-elem-07-t-expected.txt:
  • platform/win/svg/W3C-SVG-1.1/animate-elem-08-t-expected.txt:
  • platform/win/svg/W3C-SVG-1.1/animate-elem-83-t-expected.txt:
  • platform/win/svg/W3C-SVG-1.1/filters-example-01-b-expected.txt:
  • platform/win/svg/W3C-SVG-1.1/paths-data-01-t-expected.txt:
  • platform/win/svg/W3C-SVG-1.1/paths-data-02-t-expected.txt:
  • platform/win/svg/W3C-SVG-1.1/paths-data-12-t-expected.txt:
  • platform/win/svg/W3C-SVG-1.1/text-path-01-b-expected.txt:
  • platform/win/svg/batik/filters/feTile-expected.txt:
  • platform/win/svg/batik/filters/filterRegions-expected.txt:
  • platform/win/svg/batik/masking/maskRegions-expected.txt:
  • platform/win/svg/batik/paints/gradientLimit-expected.txt:
  • platform/win/svg/batik/paints/patternPreserveAspectRatioA-expected.txt:
  • platform/win/svg/batik/paints/patternRegionA-expected.txt:
  • platform/win/svg/batik/paints/patternRegions-expected.txt:
  • platform/win/svg/batik/paints/patternRegions-positioned-objects-expected.txt: Added.
  • platform/win/svg/batik/text/longTextOnPath-expected.txt: Added.
  • platform/win/svg/batik/text/smallFonts-expected.txt:
  • platform/win/svg/batik/text/textAnchor-expected.txt:
  • platform/win/svg/batik/text/textDecoration-expected.txt:
  • platform/win/svg/batik/text/textEffect-expected.txt:
  • platform/win/svg/batik/text/textEffect2-expected.txt:
  • platform/win/svg/batik/text/textEffect3-expected.txt:
  • platform/win/svg/batik/text/textFeatures-expected.txt:
  • platform/win/svg/batik/text/textGlyphOrientationHorizontal-expected.txt:
  • platform/win/svg/batik/text/textLayout-expected.txt:
  • platform/win/svg/batik/text/textLayout2-expected.txt:
  • platform/win/svg/batik/text/textLength-expected.txt:
  • platform/win/svg/batik/text/textOnPathSpaces-expected.txt:
  • platform/win/svg/batik/text/textPosition-expected.txt:
  • platform/win/svg/batik/text/textProperties-expected.txt:
  • platform/win/svg/batik/text/textProperties2-expected.txt:
  • platform/win/svg/batik/text/textStyles-expected.txt:
  • platform/win/svg/custom/broken-internal-references-expected.txt:
  • platform/win/svg/custom/path-textPath-simulation-expected.txt:
  • platform/win/svg/dom/SVGPathSegList-segment-modification-expected.txt:
  • platform/win/svg/hixie/perf/001-expected.txt:
  • platform/win/svg/hixie/perf/002-expected.txt:
  • platform/win/svg/text/text-path-01-b-expected.txt:
  • platform/win/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.txt:
9:27 AM Changeset in webkit [217786] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebCore

[GStreamer] Deadlock in MediaPlayerPrivateGStreamer::changePipelineState, web process often locks up on seeking in a youtube video that has already fully buffered
https://bugs.webkit.org/show_bug.cgi?id=170003

Reviewed by Michael Catanzaro.

When video sink is requested to render a frame, the GstBaseSink preroll mutex is taken. Then WebKit media player
schedules a repaint in the main thread, taking the draw mutex and waiting on draw condition. It can happen that
before the repaint is done in the main thread, a pause is requested in the main thread, causing a change state
from PLAYING to PAUSE. When the change state reaches the video sink gst_base_sink_change_state() tries to get
the preroll mutex. This causes a deadlock because the main thread is waiting to get the preroll mutex, but the
other thread is waiting for the main thread to do the repaint. GStreamer handles this case by calling unlock()
on the video sink before trying to get the preroll mutex, but the media player doesn't cancel the pending
repaint when using coordinated graphics. This patch adds a new signal to WebKitVideoSink "repaint-cancelled" to
notify the media player to cancel the pending prepaint.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint): Release the draw mutex and notify the condition.
(WebCore::MediaPlayerPrivateGStreamerBase::repaintCancelledCallback): Call cancelRepaint().
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): Connect to WebKitVideoSink::repaint-cancelled.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(webkitVideoSinkRepaintCancelled): Emit WebKitVideoSink::repaint-cancelled.
(webkitVideoSinkUnlock): Call webkitVideoSinkRepaintCancelled().
(webkitVideoSinkStop): Ditto.
(webkit_video_sink_class_init): Add WebKitVideoSink::repaint-cancelled signal.

9:25 AM Changeset in webkit [217785] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebCore

[GStreamer] Cleanup ifdefs in MediaPlayerPrivateGStreamerBase
https://bugs.webkit.org/show_bug.cgi?id=172918

Reviewed by Michael Catanzaro.

The code in MediaPlayerPrivateGStreamerBase is quite difficult to follow with all the ifdefs for the
possibilities when rendering. Some of them are even dead code now that all ports using GStreamer are using also
coordinated graphics.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
(WebCore::MediaPlayerPrivateGStreamerBase::repaint):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(VideoRenderRequestScheduler::VideoRenderRequestScheduler):
(VideoRenderRequestScheduler::stop):
(VideoRenderRequestScheduler::requestRender):
(webkitVideoSinkRequestRender):

9:05 AM Changeset in webkit [217784] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix compile warning when building GTK+ port without OpenGL.

  • platform/graphics/texmap/BitmapTexturePool.cpp:

(WebCore::BitmapTexturePool::createTexture):

9:03 AM Changeset in webkit [217783] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix GTK+ build with OpenGL disabled after r217779.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged):

8:59 AM Changeset in webkit [217782] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Remove debug-only flag for flaky test http/tests/navigation/statistics.html.
https://bugs.webkit.org/show_bug.cgi?id=172454

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
8:42 AM Changeset in webkit [217781] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

ASSERTION FAILED: m_currentScriptCallbackID in UIScriptContext::requestUIScriptCompletion(JSStringRef) running fast/events/ios/autocorrect-with-range-selection.html
https://bugs.webkit.org/show_bug.cgi?id=172887
<rdar://problem/32546061>

Reviewed by Sam Weinig.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::applyAutocorrection):
applyAutocorrection can call its completion handler synchronously,
which makes UIScriptController unhappy (see bug 172884).

5:33 AM Changeset in webkit [217780] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK][WPE] Do not force video sample's buffer release when the platformLayerProxy is inactive
https://bugs.webkit.org/show_bug.cgi?id=172916

Reviewed by Carlos Garcia Campos.

When MediaPlayerPrivateGStreamerBase's plarformLayerProxy was inactive, a copy of the video sample
was being done (without the buffer) and set, causing the sample's buffer to get freed. This was done
to avoid stalling the gstreamer pipeline in situations where the video was set to display:none, as the
platformLayerProxy would keep all the available buffers. But this can't happen nowadays as setting
the video to display:none invalidates the proxy, causing it to release the references to the
gstreamer buffers it's using. Also, the current code is causing a crash when using gstreamer-gl and
the video is hidden but its contents are being painted through webgl or an accelerated canvas. So,
remove this sample copy as it's not necessary anymore.

Covered by existent tests.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):

5:01 AM Changeset in webkit [217779] by Carlos Garcia Campos
  • 9 edits
    4 deletes in trunk/Source/WebKit2

[WPE] Use AcceleratedDrawingArea instead of its fork
https://bugs.webkit.org/show_bug.cgi?id=172496

Reviewed by Žan Doberšek.

WPE uses its own drawing area implementation, which is actually a fork of AcceleratedDrawingArea, but simplified
for the case of compositing being always forced. AcceleratedDrawingArea already handles the case of compositing
being forced, so now that WPE is upstream we could simply use AcceleratedDrawingArea instead.

  • PlatformWPE.cmake:
  • Shared/DrawingAreaInfo.h: Remove DrawingAreaTypeWPE type.
  • UIProcess/API/wpe/DrawingAreaProxyWPE.cpp: Removed.
  • UIProcess/API/wpe/DrawingAreaProxyWPE.h: Removed.
  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::createDrawingAreaProxy): Create an AcceleratedDrawingAreaProxy.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged): Moved from DrawingAreaImpl since it actually
belongs here.

  • WebProcess/WebPage/DrawingArea.cpp:

(WebKit::DrawingArea::create): Create an AcceleratedDrawingArea for WPE port.

  • WebProcess/WebPage/DrawingAreaImpl.cpp: Remove mainFrameContentSizeChanged() that doesn't belong here.
  • WebProcess/WebPage/DrawingAreaImpl.h:
  • WebProcess/WebPage/wpe/DrawingAreaWPE.cpp: Removed.
  • WebProcess/WebPage/wpe/DrawingAreaWPE.h: Removed.
2:11 AM Changeset in webkit [217778] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Rebaseline media/modern-media-controls/audio/audio-controls-metrics.html
https://bugs.webkit.org/show_bug.cgi?id=172915

Patch by Antoine Quint <Antoine Quint> on 2017-06-05
Reviewed by Antoine Quint.

The default height of <audio> elements is now 31pt.

  • media/modern-media-controls/audio/audio-controls-metrics-expected.txt:
  • media/modern-media-controls/audio/audio-controls-metrics.html:
12:45 AM Changeset in webkit [217777] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK][WPE] Fix the condition to decide whether the MediaPlayer can be rendered accelerated
https://bugs.webkit.org/show_bug.cgi?id=172852

Reviewed by Michael Catanzaro.

Before this change, in order to determine whether the MediaPlayer rendering could be accelerated we
needed the player to have a renderer or it would return false. The renderer was needed in order to
access the RenderLayerCompositor and check whether the chrome would be overwriting the accelerated
compositing setting. But we don't have that option in WebKitGTK+ or WPE, so we can just check the
accelerated compositing setting directly.

Another problems with the approach before this change is that accelerated rendering was being disabled
when the video element was not visible, as there's no video renderer. Due to this, cases where the video
is painted through an accelerated canvas or webgl would not be using hardware accelerated copies.

Covered by existent tests.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::acceleratedRenderingStateChanged):

Note: See TracTimeline for information about the timeline view.