WebKit-https.git
2 years agoUnreviewed, use std::vector instead of variable length array
utatane.tea@gmail.com [Fri, 6 Oct 2017 01:15:36 +0000 (01:15 +0000)]
Unreviewed, use std::vector instead of variable length array
https://bugs.webkit.org/show_bug.cgi?id=177856

This is OK because originally this code uses dispatch queue, which
should have allocation inside it too.

* MallocBench/MallocBench/message.cpp:
(benchmark_message_many):

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

2 years agoUnreviewed, tapi builds without optimization so we should have TAPI passes -DRELEASE_...
keith_miller@apple.com [Fri, 6 Oct 2017 00:36:44 +0000 (00:36 +0000)]
Unreviewed, tapi builds without optimization so we should have TAPI passes -DRELEASE_WITHOUT_OPTIMIZATIONS.

Source/WebKit:

* Configurations/Base.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/WebKitLegacy.xcconfig:

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

2 years ago[Cocoa] Enable ENABLE_ENCRYPTED_MEDIA build-time setting
jer.noble@apple.com [Fri, 6 Oct 2017 00:13:23 +0000 (00:13 +0000)]
[Cocoa] Enable ENABLE_ENCRYPTED_MEDIA build-time setting
https://bugs.webkit.org/show_bug.cgi?id=177261

Reviewed by Eric Carlson.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Enable ENCRYPTED_MEDIA, and make the changes required for ENABLED_MEDIA and LEGACY_ENABLED_MEDIA
to co-exist while both enabled simultaneously.

* Configurations/FeatureDefines.xcconfig:
* Modules/encryptedmedia/legacy/LegacyCDM.cpp:
(WebCore::LegacyCDM::registerCDMFactory):
(WebCore::LegacyCDM::supportsKeySystem):
(WebCore::LegacyCDM::keySystemSupportsMimeType):
(WebCore::LegacyCDM::create):
(WebCore::LegacyCDM::LegacyCDM):
(WebCore::LegacyCDM::~LegacyCDM):
(WebCore::LegacyCDM::supportsMIMEType const):
(WebCore::LegacyCDM::createSession):
(WebCore::LegacyCDM::mediaPlayer const):
(WebCore::CDM::registerCDMFactory): Deleted.
(WebCore::CDM::supportsKeySystem): Deleted.
(WebCore::CDM::keySystemSupportsMimeType): Deleted.
(WebCore::CDM::create): Deleted.
(WebCore::CDM::CDM): Deleted.
(WebCore::CDM::~CDM): Deleted.
(WebCore::CDM::supportsMIMEType const): Deleted.
(WebCore::CDM::createSession): Deleted.
(WebCore::CDM::mediaPlayer const): Deleted.
* Modules/encryptedmedia/legacy/LegacyCDM.h:
(WebCore::LegacyCDMClient::~LegacyCDMClient):
(WebCore::LegacyCDM::client const):
(WebCore::LegacyCDM::setClient):
(WebCore::CDMClient::~CDMClient): Deleted.
(WebCore::CDM::keySystem const): Deleted.
(WebCore::CDM::client const): Deleted.
(WebCore::CDM::setClient): Deleted.
* Modules/encryptedmedia/legacy/LegacyCDMPrivate.h:
* Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp:
(WebCore::LegacyCDMPrivateClearKey::supportsKeySystem):
(WebCore::LegacyCDMPrivateClearKey::supportsKeySystemAndMimeType):
(WebCore::LegacyCDMPrivateClearKey::supportsMIMEType):
(WebCore::LegacyCDMPrivateClearKey::createSession):
(WebCore::CDMPrivateClearKey::supportsKeySystem): Deleted.
(WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Deleted.
(WebCore::CDMPrivateClearKey::supportsMIMEType): Deleted.
(WebCore::CDMPrivateClearKey::createSession): Deleted.
* Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h:
(WebCore::LegacyCDMPrivateClearKey::LegacyCDMPrivateClearKey):
(WebCore::LegacyCDMPrivateClearKey::~LegacyCDMPrivateClearKey):
(WebCore::CDMPrivateClearKey::CDMPrivateClearKey): Deleted.
(WebCore::CDMPrivateClearKey::~CDMPrivateClearKey): Deleted.
* Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp:
(WebCore::CDMPrivateMediaPlayer::createSession):
* Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.h:
(WebCore::CDMPrivateMediaPlayer::CDMPrivateMediaPlayer):
(WebCore::CDMPrivateMediaPlayer::cdm const):
* Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::CDMSessionClearKey):
* Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h:
* Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
* Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
(WebCore::WebKitMediaKeys::create):
(WebCore::WebKitMediaKeys::WebKitMediaKeys):
(WebCore::WebKitMediaKeys::isTypeSupported):
(WebCore::WebKitMediaKeys::cdmMediaPlayer const):
* Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
* WebCore.xcodeproj/project.pbxproj:
* platform/encryptedmedia/CDMFactory.cpp:
(WebCore::CDMFactory::platformRegisterFactories):
* platform/encryptedmedia/clearkey/CDMClearKey.cpp:
(WebCore::ClearKeyState::singleton):
(WebCore::parseJSONObject):
(WebCore::parseLicenseFormat):
(WebCore::parseLicenseReleaseAcknowledgementFormat):
(WebCore::CDMFactoryClearKey::singleton):
(WebCore::containsPersistentLicenseType):
(WebCore::CDMInstanceClearKey::keySystem const):
* platform/encryptedmedia/clearkey/CDMClearKey.h:
* platform/graphics/LegacyCDMSession.h:
(WebCore::LegacyCDMSessionClient::~LegacyCDMSessionClient):
(WebCore::CDMSession::type):
(WebCore::CDMSessionClient::~CDMSessionClient): Deleted.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::createSession):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::createSession):
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
(WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC):
(WebCore::CDMPrivateMediaSourceAVFObjC::cdm const):
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::CDMPrivateMediaSourceAVFObjC::createSession):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession):
(WebCore::CDMSessionAVContentKeySession::update):
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
(WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):
(WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
(WebCore::CDMSessionAVFoundationObjC::playerDidReceiveError):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createSession):
* testing/Internals.cpp:
(WebCore::Internals::initializeMockCDM):
* testing/LegacyMockCDM.cpp:
(WebCore::LegacyMockCDM::supportsKeySystem):
(WebCore::LegacyMockCDM::supportsKeySystemAndMimeType):
(WebCore::LegacyMockCDM::supportsMIMEType):
(WebCore::LegacyMockCDM::createSession):
(WebCore::MockCDMSession::MockCDMSession):
(WebCore::MockCDM::supportsKeySystem): Deleted.
(WebCore::MockCDM::supportsKeySystemAndMimeType): Deleted.
(WebCore::MockCDM::supportsMIMEType): Deleted.
(WebCore::MockCDM::createSession): Deleted.
* testing/LegacyMockCDM.h:
(WebCore::LegacyMockCDM::LegacyMockCDM):
(WebCore::LegacyMockCDM::~LegacyMockCDM):
(WebCore::MockCDM::MockCDM): Deleted.
(WebCore::MockCDM::~MockCDM): Deleted.
* testing/MockCDMFactory.cpp:
(WebCore::MockCDMInstance::keySystem const):

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years agobmalloc mutex should be adaptive
fpizlo@apple.com [Thu, 5 Oct 2017 23:48:10 +0000 (23:48 +0000)]
bmalloc mutex should be adaptive
https://bugs.webkit.org/show_bug.cgi?id=177839

Reviewed by Michael Saboff.

Source/bmalloc:

This pulls the WordLock algorithm into bmalloc, mostly by copy-pasting the code. We need to
copy paste because sometimes we build WTF without bmalloc, so WTF cannot rely on bmalloc for
anything other than malloc.

Reland after fixing ancient WordLock bug: the notify_one has to happen with the lock held
to ensure it doesn't run after that thread has died.

* bmalloc/Algorithm.h:
(bmalloc::compareExchangeWeak):
(bmalloc::compareExchangeStrong):
* bmalloc/PerThread.h:
* bmalloc/StaticMutex.cpp:
(bmalloc::StaticMutex::lockSlow):
(bmalloc::StaticMutex::unlockSlow):
(bmalloc::StaticMutex::lockSlowCase): Deleted.
* bmalloc/StaticMutex.h:
(bmalloc::StaticMutex::try_lock):
(bmalloc::StaticMutex::isLocked const):
(bmalloc::StaticMutex::init):
(bmalloc::StaticMutex::tryLock):
(bmalloc::StaticMutex::lock):
(bmalloc::StaticMutex::unlock):
(bmalloc::sleep): Deleted.
(bmalloc::waitUntilFalse): Deleted.

Source/WTF:

Add some comments that I thought of while copy-pasting this code.

Reland after fixing ancient WordLock bug: the notify_one has to happen with the lock held
to ensure it doesn't run after that thread has died.

* wtf/LockAlgorithmInlines.h:
* wtf/WordLock.cpp:

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

2 years agoAdd ObjC equivalent of WKPageNavigationClient.didChangeBackForwardList
achristensen@apple.com [Thu, 5 Oct 2017 23:18:36 +0000 (23:18 +0000)]
Add ObjC equivalent of WKPageNavigationClient.didChangeBackForwardList
https://bugs.webkit.org/show_bug.cgi?id=177966
<rdar://problem/22387135>

Reviewed by Tim Horton.

Source/WebKit:

* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didChangeBackForwardList):
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
(WebKit::NavigationState::NavigationClient::didChangeBackForwardList):
(WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
(WebKit::NavigationState::NavigationClient::didCancelClientRedirect):
(WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
(WebKit::NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace):
(WebKit::NavigationState::NavigationClient::processDidTerminate):
(WebKit::NavigationState::NavigationClient::processDidBecomeResponsive):
(WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive):
(WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
(WebKit::NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame):
(WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
(WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
(WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
(WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(-[ListItemDelegate _webView:backForwardListItemAdded:removed:]):
(-[ListItemDelegate webView:didFinishNavigation:]):
(TEST):

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

2 years agoAdd ObjC SPI with userInfo corresponding to WKPageNavigationClient's decidePolicyForN...
achristensen@apple.com [Thu, 5 Oct 2017 23:14:15 +0000 (23:14 +0000)]
Add ObjC SPI with userInfo corresponding to WKPageNavigationClient's decidePolicyForNavigationAction, didStartProvisionalNavigation, and didFailNavigation
https://bugs.webkit.org/show_bug.cgi?id=177974
<rdar://problem/22888802>

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation):
(WebKit::NavigationState::NavigationClient::didFailNavigationWithError):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):

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

2 years agoStorage Access API: Web process should ask UI process for grant/deny
wilander@apple.com [Thu, 5 Oct 2017 23:05:02 +0000 (23:05 +0000)]
Storage Access API: Web process should ask UI process for grant/deny
https://bugs.webkit.org/show_bug.cgi?id=176941
<rdar://problem/34440036>

Reviewed by Chris Dumez and Sam Weinig.

Source/WebCore:

Tests: http/tests/storageAccess/request-and-grant-storage-access-cross-origin-non-sandboxed-iframe.html
       http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction.html
       http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-without-user-interaction.html

This patch changes Document::requestStorageAccess() so that it
calls the ChromeClient instead of the ResourceLoadObserver to
request storage access on behalf of the iframe.
The patch also changes how the promise is used, from returning
a boolean to either resolving or rejecting to signal grant/deny
access respectively.

* dom/Document.cpp:
(WebCore::Document::requestStorageAccess):
* dom/Document.idl:
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::registerStorageAccess): Deleted.
* loader/ResourceLoadObserver.h:
* page/ChromeClient.h:

Source/WebKit:

This patch adds infrastructure to let WebCore::Document call
WebKit::WebResourceLoadStatisticsStore and ask for storage
access on behalf of an iframe. The communication goes through
the ChromeClient since we might want to add a native prompt.
From the ChromeClient it continues to the WebPage which
messages the WebPageProxy. The WebPageProxy calls the
WebsiteDataStore which owns the WebResourceLoadStatisticsStore.
A uint64_t is used to match the right callback with the boolean
result.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestStorageAccess):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::requestStorageAccess):
* UIProcess/WebsiteData/WebsiteDataStore.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::requestStorageAccess):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::nextRequestStorageAccessContextId):
(WebKit::WebPage::requestStorageAccess):
(WebKit::WebPage::storageAccessResponse):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

LayoutTests:

The iframes now communicate the results back to the top frame through postMessage.
Also, denied access results in a rejected promise which is handled in these
changed test cases.

* http/tests/storageAccess/request-and-deny-storage-access-cross-origin-iframe-expected.txt:
* http/tests/storageAccess/request-and-deny-storage-access-cross-origin-iframe.html:
* http/tests/storageAccess/request-and-deny-storage-access-cross-origin-sandboxed-iframe-expected.txt:
* http/tests/storageAccess/request-and-deny-storage-access-cross-origin-sandboxed-iframe.html:
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-iframe-expected.txt: Removed.
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-iframe.html: Removed.
    Renamed to request-and-grant-storage-access-cross-origin-non-sandboxed-iframe.html.
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-non-sandboxed-iframe-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-non-sandboxed-iframe.html: Added.
    See comment above on renaming.
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-expected.txt:
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction.html: Added.
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-without-user-interaction-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-without-user-interaction.html: Added.
    Two new test cases added for the new logic in WebKit::WebResourceLoadStatisticsStore.
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe.html:
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-nested-iframe-expected.txt:
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-nested-iframe.html:
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-with-unique-origin-expected.txt:
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-with-unique-origin.html:
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-allow-token-expected.txt:
* http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-allow-token.html:
* http/tests/storageAccess/request-storage-access-same-origin-iframe-expected.txt:
* http/tests/storageAccess/request-storage-access-same-origin-iframe.html:
* http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-expected.txt:
* http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-without-allow-token-expected.txt:
* http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-without-allow-token.html:
* http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe.html:
* http/tests/storageAccess/request-storage-access-top-frame-expected.txt:
* http/tests/storageAccess/request-storage-access-top-frame.html:
* http/tests/storageAccess/resources/request-storage-access-iframe.html:
* platform/mac-wk2/TestExpectations:
    Added the new tests as [ Pass ].

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

2 years agoWeb Inspector: EventLoop::cycle() should not send nil NSEvents
bburg@apple.com [Thu, 5 Oct 2017 23:02:52 +0000 (23:02 +0000)]
Web Inspector: EventLoop::cycle() should not send nil NSEvents
https://bugs.webkit.org/show_bug.cgi?id=177971
<rdar://problem/20387399>

Reviewed by Joseph Pecoraro.

It is possible for the next matching event to be nil.
WebKit clients don't expect to be sent a nil NSEvent, so add a null check here.

* platform/mac/EventLoopMac.mm:
(WebCore::EventLoop::cycle):

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

2 years agoUnreviewed, rolling out r222929.
ryanhaddad@apple.com [Thu, 5 Oct 2017 22:52:27 +0000 (22:52 +0000)]
Unreviewed, rolling out r222929.

Caused assertion failures during LayoutTests.

Reverted changeset:

"Only add prototypes to the PrototypeMap if they're not
already present"
https://bugs.webkit.org/show_bug.cgi?id=177952
http://trac.webkit.org/changeset/222929

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

2 years agoDrop unused parameters for CookiesStrategy::cookiesEnabled()
cdumez@apple.com [Thu, 5 Oct 2017 22:43:02 +0000 (22:43 +0000)]
Drop unused parameters for CookiesStrategy::cookiesEnabled()
https://bugs.webkit.org/show_bug.cgi?id=177957

Reviewed by Alex Christensen.

Source/WebCore:

* loader/CookieJar.cpp:
(WebCore::cookiesEnabled):
* platform/CookiesStrategy.h:
* platform/network/PlatformCookieJar.h:
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::cookiesEnabled):
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::CookieJarCurlFileSystem::cookiesEnabled):
(WebCore::cookiesEnabled):
* platform/network/curl/CookieJarCurl.h:
* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesEnabled):
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::cookiesEnabled):

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesEnabled):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::cookiesEnabled):

Source/WebKitLegacy/win:

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookiesEnabled):
* WebCoreSupport/WebPlatformStrategies.h:

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

2 years agocheck-webkit-style erroneously requires a space between the carrot and brace in obj...
megan_gardner@apple.com [Thu, 5 Oct 2017 22:41:15 +0000 (22:41 +0000)]
check-webkit-style erroneously requires a space between the carrot and brace in obj-c blocks.
https://bugs.webkit.org/show_bug.cgi?id=177897

Reviewed by Dan Bernstein and Jonathan Bedard.

Remove the check for a space between ^ and {,
as this is valid and expected Obj-C. Now check to make sure there is
no space at all between ^ and {, and also that there is a space between
the end of an argument list and the {.

* Scripts/webkitpy/style/checkers/cpp.py:
(regex_for_lambdas_and_blocks):

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

2 years agoRenderListItem should not hold raw pointers to RenderListMarker.
zalan@apple.com [Thu, 5 Oct 2017 22:40:05 +0000 (22:40 +0000)]
RenderListItem should not hold raw pointers to RenderListMarker.
https://bugs.webkit.org/show_bug.cgi?id=177968
<rdar://problem/34842943>

Reviewed by Antti Koivisto.

Now we don't need to unregister the marker from the list item explicitly.

Covered by existing tests.

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::willBeDestroyed):
(WebCore::RenderListItem::positionListMarker):
* rendering/RenderListItem.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::willBeDestroyed):
* style/RenderTreeUpdaterListItem.cpp:
(WebCore::RenderTreeUpdater::ListItem::updateMarker):

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

2 years agoUpdate Webkit Style webpage to include Obj-C blocks
megan_gardner@apple.com [Thu, 5 Oct 2017 22:32:55 +0000 (22:32 +0000)]
Update Webkit Style webpage to include Obj-C blocks
https://bugs.webkit.org/show_bug.cgi?id=177906

Reviewed by Tim Horton.

* code-style.md:

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

2 years agoRenderSVGRoot should check the renderers inside its visualOverflowRect for hit testin...
commit-queue@webkit.org [Thu, 5 Oct 2017 21:54:16 +0000 (21:54 +0000)]
RenderSVGRoot should check the renderers inside its visualOverflowRect for hit testing if the overflow is visible
https://bugs.webkit.org/show_bug.cgi?id=177953
<rdar://problem/34788389>

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

Source/WebCore:

Test: svg/hittest/svg-visual-overflow-rect.html

If an SVGElement is positioned outside the rectangle of the root element,
it can still be drawn if the root element has "overflow: visible" applied.
But since SVGElement can be drawn in this case, it should be accessible
through nodeAtPoint() which is used for hit testing.

* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):

LayoutTests:

* svg/hittest/svg-visual-overflow-rect-expected.html: Added.
* svg/hittest/svg-visual-overflow-rect.html: Added.

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

2 years agoMark 4 fast/text layout tests as flaky on Windows.
pvollan@apple.com [Thu, 5 Oct 2017 21:31:00 +0000 (21:31 +0000)]
Mark 4 fast/text layout tests as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=177964

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years agoRenderButton should not hold raw pointers to its direct children.
zalan@apple.com [Thu, 5 Oct 2017 21:14:44 +0000 (21:14 +0000)]
RenderButton should not hold raw pointers to its direct children.
https://bugs.webkit.org/show_bug.cgi?id=177960
<rdar://problem/34840807>

Reviewed by Antti Koivisto.

The correct way of destroying a renderer is to call ::removeFromParentAndDestroy().

Covered by existing tests.

* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton):
(WebCore::RenderButton::addChild):
(WebCore::RenderButton::takeChild):
(WebCore::RenderButton::updateAnonymousChildStyle const):
(WebCore::RenderButton::setText):
(WebCore::RenderButton::text const):
* rendering/RenderButton.h:

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

2 years agoAX: [iOS] Layout Test accessibility/ios-simulator/video-elements-ios.html is failing
n_wang@apple.com [Thu, 5 Oct 2017 21:07:14 +0000 (21:07 +0000)]
AX: [iOS] Layout Test accessibility/ios-simulator/video-elements-ios.html is failing
https://bugs.webkit.org/show_bug.cgi?id=177954
<rdar://problem/34838094>

We should do the isIgnored check instead of the null check.

Reviewed by Chris Fleizach.

* accessibility/ios-simulator/video-elements-ios-expected.txt:
* accessibility/ios-simulator/video-elements-ios.html:

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

2 years agoGenerate a compile error if release is built without compiler optimizations
clopez@igalia.com [Thu, 5 Oct 2017 20:39:04 +0000 (20:39 +0000)]
Generate a compile error if release is built without compiler optimizations
https://bugs.webkit.org/show_bug.cgi?id=177665

Reviewed by Brian Burg.

.:

Default to RelWithDebInfo if CMAKE_BUILD_TYPE is unset.

* CMakeLists.txt:

Source/JavaScriptCore:

Pass -DRELEASE_WITHOUT_OPTIMIZATIONS to testair.cpp and testb3.cpp because
this files are compiled with -O0 for build speed reasons after r195639.

* JavaScriptCore.xcodeproj/project.pbxproj:

Source/WTF:

For GCC and Clang, generate an error at build time that will alert
the developer that she is trying to build Release without any compiler
optimization. A build time error is much better than an unexpected
"oh, WebKit is really slow ..."  situation later.

If this was intended, then we tell the developer that she can continue
by just setting -DRELEASE_WITHOUT_OPTIMIZATIONS in the list of build
flags.

The intention of this patch is to ensure that nobody builds Release
without enabling compiler optimization by mistake.

* wtf/Compiler.h:

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

2 years agoOnly add prototypes to the PrototypeMap if they're not already present
sbarati@apple.com [Thu, 5 Oct 2017 19:58:08 +0000 (19:58 +0000)]
Only add prototypes to the PrototypeMap if they're not already present
https://bugs.webkit.org/show_bug.cgi?id=177952

Reviewed by Michael Saboff and JF Bastien.

With poly proto, we need to call PrototypeMap::add more frequently since we don't
know if the prototype is already in the map or not based solely on Structure.
PrototypeMap::add was calling WeakMap::set unconditionally, which would unconditionally
allocate a Weak handle. Allocating a Weak handle is expensive. It's at least 8x more
expensive than just checking if the prototype is in the map prior to adding it. This
patch makes the change to only add the prototype if it's not already in the map. To
do this, I've added a WeakMap::add API that just forwards into HashMap's add API.
This allows us to both only do a single hash table lookup and also to allocate only
a single Weak handle when necessary.

* runtime/PrototypeMapInlines.h:
(JSC::PrototypeMap::addPrototype):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::add):

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

2 years agoBug 177893: Disable -Wcast-qual for new clang compiler in Apple ports
ddkilzer@apple.com [Thu, 5 Oct 2017 19:12:04 +0000 (19:12 +0000)]
Bug 177893: Disable -Wcast-qual for new clang compiler in Apple ports
<https://webkit.org/b/177893>
<rdar://problem/33667497>

Reviewed by Tim Horton.

Source/WebCore:

* Configurations/Base.xcconfig:
(WARNING_CFLAGS): Remvoe -Wcast-qual until we can provide a safe
cast function that lets us re-enable the warning.

Source/WTF:

* wtf/RetainPtr.h:
(WTF::RetainPtr::fromStorageType const): Disable warnings for
-Wcast-qual until we can provide a safe cast function that lets
us re-enable the warning.

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

2 years agoMake progress toward properly-formed XPC services in the Mac CMake build
timothy_horton@apple.com [Thu, 5 Oct 2017 19:09:53 +0000 (19:09 +0000)]
Make progress toward properly-formed XPC services in the Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=177918

Reviewed by Alex Christensen.

.:

* Source/cmake/WebKitMacros.cmake:
Add a macro wrapper around 'ln'.

Source/WebKit:

* CMakeLists.txt:
* PlatformMac.cmake:
Turn on the storage process on Mac, and fix its build.
Move XPC services to Versions/A/XPCServices and add the toplevel
XPCServices as a symlink of that.
Run the XPC services' Info.plists through configure_file, and substitute
the important variables (most critically the bundle identifier).
Factor out the service setup so we don't keep duplicating it as it
gets more complicated.

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

2 years agoImplement font-display loading behaviors
mmaxfield@apple.com [Thu, 5 Oct 2017 19:02:03 +0000 (19:02 +0000)]
Implement font-display loading behaviors
https://bugs.webkit.org/show_bug.cgi?id=175384
<rdar://problem/33813243>

Reviewed by Darin Adler.

Source/WebCore:

The font-display descriptors works off of the following model of font loading:

1. When a font loads, the @font-face enters the first phase, called the "block period." Here,
text using this @font-face is rendered as invisible using a fallback font for metrics. If the
file finishes loading during this period, it is swapped in (visibly).
2. When the first phase is over, the @font-face enters the second phase, called the "swap
period." Here, text using this @font-face is rendered visibly using a fallback font. If the
file finishes loading during this period, it is swapped in.
3. When the second phase is over, the @font-face enters the third phase, called the "failure
period." Here, text using this @font-face is rendered visibly using a fallback font. If the
file finishes loading during this period, it is not swapped in (but it does live in the
network cache for subsequent page loads). This phase lasts forever.

The font-display descriptor changes the duration of these phases. For example, our default
font loading behavior can be achieved by making the first phase 3 seconds long and making the
second phase infinitely long (so the third phase is never reached).

Luckily, our CSSFontFace class already has states which correspond to each phase listed above:
Loading, TimedOut, and Failure. This patch migrates our existing 3-second timer to have logic
to correctly set the timeout duration based on the value of the font-display descriptor and
the current status(). This occurs inside CSSFontFace::setStatus().

This has implications for testing. Previously, our tests for the font loading behavior had a
single boolean that describes whether or not font loads should immediately jump to the "swap
period". Clearly, this is insufficient for testing all aspects of the font-display descriptor.
Instead, this patch deletes this existing infrastructure and instead creates three more fake
values of font-display (achieved in tests by using window.internals). These fake values make
fonts immediately jump into a particular state and stay there forever (so the timeout values
are, for example, [0, infinity, infinity] to test the swap period). This works because
CSSFontFace is smart enough to synchronously move between states that have a 0 timeout, so
there is no race between these timers and font loads.

We also need to test the behavior when a file downloads and when a file hasn't been loaded
yet (and the @font-face is in a particular state). Therefore, this patch adds another bool
which indicates whether the font subsystem should totally ignore font load events. This means
that a font will successfully download (and DOMContentLoaded will be fired, because that
uses the loading subsystem), but the font subsystem will plug its ears and ignore the load.
This means we can test the invisibility of text during the "block period" because DRT will
see that the page load has completed, but the font subsystem will pretend like the font is
still loading and draw invisibly.

Therefore, there are 6 tests: a test to test each of the 3 states an @font-face block may be
in, times 2 for whether or not we are ignoring font loads. These are more comprehensive than
the existing font loading tests which used internals.settings.setWebFontsAlwaysFallBack(),
so I deleted those tests in favor of these new ones.

Tests: fast/text/loading-block-finish.html
       fast/text/loading-block-nofinish.html
       fast/text/loading-failure-finish.html
       fast/text/loading-failure-nofinish.html
       fast/text/loading-swap-finish.html
       fast/text/loading-swap-nofinish.html

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::setLoadingBehavior):
(WebCore::CSSFontFace::fontLoadEventOccurred): Remove old testing infrastructure.
(WebCore::CSSFontFace::timeoutFired): Previously, the timer was only used for going
from Loading -> TimedOut. Now, we have to ask the status() to figure out which
state transition we should be performing.
(WebCore::CSSFontFace::allSourcesFailed const): A Failed state needs to return true
here, even if some of the sources successfully downloaded.
(WebCore::CSSFontFace::setStatus): The logic to figure out how long to set the timer
for. Also, if the timer value is 0, synchronously recurse to change the status instead
of setting a 0-delay timer.
(WebCore::CSSFontFace::fontLoaded): Remove old testing infrastructure.
(WebCore::CSSFontFace::fontTimeoutIndex const): Implement new testing infrastructure.
(WebCore::CSSFontFace::shouldIgnoreFontLoadCompletions const): Ditto.
(WebCore::CSSFontFace::pump): See comment. Also, we're allowed to be in the Failure
state in more scenarios now, so relax some of our ASSERT()s.
(WebCore::CSSFontFace::font): Ditto.
(WebCore::CSSFontFace::webFontsShouldAlwaysFallBack const): Deleted.
* css/CSSFontFace.h: Migrate to new testing infrastructure.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::CSSFontFaceSource): Implement new testing infrastructure.
(WebCore::CSSFontFaceSource::shouldIgnoreFontLoadCompletions const): Ditto.
(WebCore::CSSFontFaceSource::fontLoaded): Ditto.
* css/CSSFontFaceSource.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadingFontSoon): Remove old testing infrastructure.
* css/CSSSegmentedFontFace.cpp: It's possible to get different values out of
CSSFontFace::font() in successive calls during the same runloop. FontRanges will
include a raw pointer to one of the values, so all the values need to be kept alive.
* page/Settings.cpp: Migrate to new testing infrastructure.
(WebCore::Settings::Settings):
(WebCore::Settings::setFontTimeoutIndex):
(WebCore::Settings::setShouldIgnoreFontLoadCompletions):
(WebCore::Settings::setWebFontsAlwaysFallBack): Deleted.
* page/Settings.h: Ditto.
(WebCore::Settings::fontTimeoutIndex const):
(WebCore::Settings::shouldIgnoreFontLoadCompletions const):
(WebCore::Settings::webFontsAlwaysFallBack const): Deleted.
* testing/InternalSettings.cpp: Ditto.
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setFontTimeoutIndex):
(WebCore::InternalSettings::setShouldIgnoreFontLoadCompletions):
(WebCore::InternalSettings::setWebFontsAlwaysFallBack): Deleted.
* testing/InternalSettings.h: Ditto.
* testing/InternalSettings.idl: Ditto.

LayoutTests:

Delete the tests using the old testing infrastructure and replace them
with tests that use the new testing infrastructure.

* fast/text/font-loading-system-fallback-expected.html: Removed.
* fast/text/font-loading-system-fallback.html: Removed.
* fast/text/loading-block-finish-expected.html: Added.
* fast/text/loading-block-finish.html: Added.
* fast/text/loading-block-nofinish-expected.html: Added.
* fast/text/loading-block-nofinish.html: Added.
* fast/text/loading-failure-finish-expected.html: Added.
* fast/text/loading-failure-finish.html: Added.
* fast/text/loading-failure-nofinish-expected.html: Added.
* fast/text/loading-failure-nofinish.html: Added.
* fast/text/loading-swap-finish-expected.html: Added.
* fast/text/loading-swap-finish.html: Added.
* fast/text/loading-swap-nofinish-expected.html: Added.
* fast/text/loading-swap-nofinish.html: Added.
* fast/text/web-font-load-fallback-during-loading-2-expected.html: Removed.
* fast/text/web-font-load-fallback-during-loading-2.html: Removed.
* fast/text/web-font-load-fallback-during-loading-expected.html: Removed.
* fast/text/web-font-load-fallback-during-loading.html: Removed.
* platform/gtk/TestExpectations:
* platform/ios-wk1/TestExpectations:
* platform/win/TestExpectations:

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

2 years agoUnreviewed. Disable probe OSR exit on 32-bit until it's fixed.
sbarati@apple.com [Thu, 5 Oct 2017 18:59:58 +0000 (18:59 +0000)]
Unreviewed. Disable probe OSR exit on 32-bit until it's fixed.

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

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

2 years agoLayout Test media/modern-media-controls/scrubber-support/scrubber-support-drag.html...
commit-queue@webkit.org [Thu, 5 Oct 2017 18:57:07 +0000 (18:57 +0000)]
Layout Test media/modern-media-controls/scrubber-support/scrubber-support-drag.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=174682

Patch by Antoine Quint <graouts@apple.com> on 2017-10-05
Reviewed by Dean Jackson.

This test could fail since we would start it before the time control was fully sized and only
the scrubber had bounds, but not the elapsed time label. We have to wait on both being fully
sized before starting the test and only then it is reliable.

* media/modern-media-controls/scrubber-support/scrubber-support-drag.html:
* platform/mac/TestExpectations:

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

2 years agoLayout Test media/modern-media-controls/scrubber-support/scrubber-support-click.html...
commit-queue@webkit.org [Thu, 5 Oct 2017 18:51:46 +0000 (18:51 +0000)]
Layout Test media/modern-media-controls/scrubber-support/scrubber-support-click.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=177930

Patch by Antoine Quint <graouts@apple.com> on 2017-10-05
Reviewed by Dean Jackson.

In cases where this test failed, it actually worked as expected but the "timeupdate" event would be fired
twice, most likely because it was registered twice. We now use an asynchronous expectation to run the test
which should only register the event listener once and make the test more reliable.

* media/modern-media-controls/scrubber-support/scrubber-support-click-expected.txt:
* media/modern-media-controls/scrubber-support/scrubber-support-click.html:

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

2 years agoRenderMathMLFenced should not hold a raw pointer to RenderMathMLFencedOperator
zalan@apple.com [Thu, 5 Oct 2017 18:48:36 +0000 (18:48 +0000)]
RenderMathMLFenced should not hold a raw pointer to RenderMathMLFencedOperator
https://bugs.webkit.org/show_bug.cgi?id=177950
<rdar://problem/34837002>

Reviewed by Antti Koivisto.

Even though RenderMathMLFencedOperator is a child renderer, it's lifetime is not explicitly managed by
RenderMathMLFenced.

Covered by existing test cases.

* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::RenderMathMLFenced):
(WebCore::RenderMathMLFenced::makeFences):
(WebCore::RenderMathMLFenced::addChild):
* rendering/mathml/RenderMathMLFenced.h:

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

2 years ago[Payment Request] Add a payment method that supports Apple Pay
aestes@apple.com [Thu, 5 Oct 2017 18:47:17 +0000 (18:47 +0000)]
[Payment Request] Add a payment method that supports Apple Pay
https://bugs.webkit.org/show_bug.cgi?id=177850

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/payment-request/payment-request-abort-method.https-expected.txt:
* web-platform-tests/payment-request/payment-request-show-method.https-expected.txt:

Source/WebCore:

This patch implements a payment method dictionary and a payment handler for Apple Pay.

It reuses existing Apple Pay code by:
1. Moving shared properties from ApplePayPaymentRequest to ApplePayRequestBase and having
   ApplePayPaymentRequest inherit from ApplePayRequestBase.
2. Creating an ApplePayRequest dictionary that inherits from ApplePayRequestBase and adds
   PaymentRequest-specific properties (right now that's just the version property).
3. Moving validation logic from ApplePaySession into various places that can be reused by
   PaymentRequest and ApplePayPaymentHandler.
4. Storing currency values for both ApplePaySession and PaymentRequest in Strings rather
   than integers representing whole cents, since PaymentRequest supports high-precision
   currency values.

This patch does not implement any event handling for merchant validation, payment method
changes, or shipping address/option changes. That will be handled in a follow-on.

Test: http/tests/ssl/applepay/PaymentRequest.html

* DerivedSources.make:
* Modules/applepay/ApplePayContactField.cpp: Added.
(WebCore::convertAndValidate): Moved from ApplePaySession.cpp.
* Modules/applepay/ApplePayContactField.h: Added.
* Modules/applepay/ApplePayContactField.idl: Added.
* Modules/applepay/ApplePayMerchantCapability.cpp: Added.
(WebCore::convertAndValidate): Moved from ApplePaySession.cpp.
* Modules/applepay/ApplePayMerchantCapability.h: Added.
* Modules/applepay/ApplePayMerchantCapability.idl: Added.
* Modules/applepay/ApplePayPaymentRequest.h: Moved fields shared with ApplePayRequest into ApplePayRequestBase.
* Modules/applepay/ApplePayPaymentRequest.idl: Ditto.
* Modules/applepay/ApplePayRequestBase.cpp: Added.
(WebCore::convertAndValidate): Moved from ApplePaySession.cpp.
* Modules/applepay/ApplePayRequestBase.h: Added.
* Modules/applepay/ApplePayRequestBase.idl: Added.
* Modules/applepay/ApplePaySession.cpp:
(WebCore::validateAmount): Renamed from parseAmount.
(WebCore::convertAndValidateTotal):
(WebCore::convertAndValidate):
(WebCore::parseDigit): Deleted.
(WebCore::parseAmount): Renamed to validateAmount.
* Modules/applepay/ApplePaySessionPaymentRequest.h: Changed amount from an int64_t to a String.
* Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
(WebCore::convert):
* Modules/applepay/PaymentRequestValidator.mm: Renamed from Source/WebCore/Modules/applepay/PaymentRequestValidator.cpp.
(WebCore::PaymentRequestValidator::validateTotal): Used NSDecimalNumber to validate amounts.
(WebCore::validateShippingMethod): Ditto.
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: Added.
(WebCore::ApplePayPaymentHandler::handlesIdentifier): Added. Returns true if identifier is a URL with host "apple.com" and path "/apple-pay".
(WebCore::ApplePayPaymentHandler::ApplePayPaymentHandler):
(WebCore::convert): Added. Converts PaymentRequest types to ApplePaySessionPaymentRequest types.
(WebCore::ApplePayPaymentHandler::convertData): Added. JSON-parses data into an ApplePayRequest,
then uses that along with the PaymentRequest to construct and validate an ApplePaySessionPaymentRequest.
(WebCore::ApplePayPaymentHandler::show): Added a FIXME.
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: Added.
* Modules/applepay/paymentrequest/ApplePayRequest.h: Added.
* Modules/applepay/paymentrequest/ApplePayRequest.idl: Added. Inherits from ApplePayRequestBase and adds a required version property.
* Modules/paymentrequest/PaymentHandler.cpp: Added.
(WebCore::PaymentHandler::create): Returns a PaymentHandler subclass based on the payment method identifier.
(WebCore::PaymentHandler::~PaymentHandler):
* Modules/paymentrequest/PaymentHandler.h: Added.
* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::convertAndValidatePaymentMethodIdentifier): Added.
(WebCore::PaymentRequest::show): Removed an unnecessary call to RunLoop::dispatch().
Created a PaymentHandler for each payment method and called show() on the first available PaymentHandler.
(WebCore::PaymentRequest::abort): Removed an unnecessary call to RunLoop::dispatch().
(WebCore::PaymentRequest::canMakePayment): Ditto.
(WebCore::PaymentRequest::finishShowing): Deleted.
* Modules/paymentrequest/PaymentRequest.h:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(toShippingMethod): Converted the NSDecimalNumber amount to a string rather than an integer.
(WebKit::toDecimalNumber): used -decimalNumberWithString:locale: rather than
-initWithMantissa:exponent:isNegative: to create an NSDecimalNumber.
(WebKit::toPKPaymentSummaryItem):
(WebKit::toPKShippingMethod):

LayoutTests:

* http/tests/ssl/applepay/PaymentRequest.https-expected.txt: Added.
* http/tests/ssl/applepay/PaymentRequest.https.html: Added.
* platform/mac-wk2/TestExpectations:
* platform/ios-wk2/TestExpectations:

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

2 years agoMove more multicolumn render tree mutation code to RenderTreeUpdater::MultiColumn
antti@apple.com [Thu, 5 Oct 2017 17:59:49 +0000 (17:59 +0000)]
Move more multicolumn render tree mutation code to RenderTreeUpdater::MultiColumn
https://bugs.webkit.org/show_bug.cgi?id=177942

Reviewed by Zalan Bujtas.

* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow):

    Use std::unique_ptr for the spanner map for safe owenership transfer.

(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
(WebCore::RenderMultiColumnFlow::handleSpannerRemoval):
(WebCore::RenderMultiColumnFlow::fragmentedFlowRelativeWillBeRemoved):
(WebCore::RenderMultiColumnFlow::populate): Deleted.
(WebCore::RenderMultiColumnFlow::evacuateAndDestroy): Deleted.

    This code moves to RenderTreeUpdater::MultiColumn.

* rendering/RenderMultiColumnFlow.h:
* style/RenderTreeUpdaterMultiColumn.cpp:
(WebCore::RenderTreeUpdater::MultiColumn::update):
(WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeUpdater::MultiColumn::destroyFragmentedFlow):

    Use Hyatt's preferred 'fragmented flow' terminology.

* style/RenderTreeUpdaterMultiColumn.h:

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

2 years agoUnreviewed, rolling out r222893.
jlewis3@apple.com [Thu, 5 Oct 2017 17:58:55 +0000 (17:58 +0000)]
Unreviewed, rolling out r222893.

This caused multiple API failures.

Reverted changeset:

"bmalloc mutex should be adaptive"
https://bugs.webkit.org/show_bug.cgi?id=177839
http://trac.webkit.org/changeset/222893

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

2 years agoUnreviewed. Run WebKit2 C API tests in GTK+ bots again after the last WebKit2 ->...
carlosgc@webkit.org [Thu, 5 Oct 2017 17:50:03 +0000 (17:50 +0000)]
Unreviewed. Run WebKit2 C API tests in GTK+ bots again after the last WebKit2 -> WebKit rename.

* Scripts/run-gtk-tests:
(TestRunner):
(TestRunner._run_test):

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

2 years agoRemove additional WebKitSystemInterface remnants
darin@apple.com [Thu, 5 Oct 2017 17:43:56 +0000 (17:43 +0000)]
Remove additional WebKitSystemInterface remnants
https://bugs.webkit.org/show_bug.cgi?id=177948

Reviewed by Andy Estes.

Source/WebCore:

* PlatformMac.cmake: Remove logic to select and link an appropriate
WebKitSystemInterface library.

* html/shadow/MediaControlElementTypes.h: Remove comment about matching
WebKitSystemInterface.h, now obsolete.

* rendering/RenderMediaControls.cpp: Wrap whole file in a single conditional
to make it clear that it's only used at all in this one particular case.
(wkHitTestMediaUIPart): Deleted.
(wkMeasureMediaUIPart): Deleted.
(wkDrawMediaUIPart): Deleted.
(wkDrawMediaSliderTrack): Deleted.
(WebCore::determineState): Deleted.
(WebCore::getUnzoomedRectAndAdjustCurrentContext): Deleted.
(WebCore::RenderMediaControls::adjustMediaSliderThumbSize): Call the
WKMeasureMediaUIPart instead of through an inline function to rename it.
(WebCore::RenderMediaControls::paintMediaControlsPart): Deleted.

* rendering/RenderMediaControls.h: Wrap whole file in a single conditional
to make it clear that it's only used at all in this one particular case.
Removed unneeded includes, forward declarations, and function declaration.

* rendering/RenderThemeMac.mm: Removed include of RenderMediaControls.h.

Source/WebKitLegacy:

* PlatformMac.cmake: Removed reference to deleted file WebSystemInterface.mm.

Tools:

* DumpRenderTree/PlatformMac.cmake: Removed code to link the
WebKitSystemInterface library. Left in code that points to
the WebKitLibraries directory, but maybe that can be removed by
someone who is more certain it's no longer needed.

* Scripts/copy-webkitlibraries-to-product-directory: Removed code
to copy and delete WebKitSystemInterface libraries and headers.

* WebKitTestRunner/PlatformMac.cmake: Removed code to link the
WebKitSystemInterface library. Left in code that points to
the WebKitLibraries directory, but maybe that can be removed by
someone who is more certain it's no longer needed.

WebKitLibraries:

* libWebKitSystemInterfaceElCapitan.a: Removed.
* libWebKitSystemInterfaceIOSDevice10.a: Removed.
* libWebKitSystemInterfaceIOSDevice11.a: Removed.
* libWebKitSystemInterfaceIOSSimulator10.a: Removed.
* libWebKitSystemInterfaceIOSSimulator11.a: Removed.
* libWebKitSystemInterfaceOSX10.12.a: Removed.
* libWebKitSystemInterfaceOSX10.13.a: Removed.

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

2 years agoRemove redundant LayoutStateDisabler from RenderTreeUpdaterFirstLetter
zalan@apple.com [Thu, 5 Oct 2017 17:40:14 +0000 (17:40 +0000)]
Remove redundant LayoutStateDisabler from RenderTreeUpdaterFirstLetter
https://bugs.webkit.org/show_bug.cgi?id=177946

Reviewed by Simon Fraser.

First letter is updated prior to layout.

Covered by existing tests.

* style/RenderTreeUpdaterFirstLetter.cpp:
(WebCore::updateFirstLetterStyle):

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

2 years ago[Payment Request] Factor out ApplePaySession's interface to PaymentCoordinator into...
aestes@apple.com [Thu, 5 Oct 2017 17:31:58 +0000 (17:31 +0000)]
[Payment Request] Factor out ApplePaySession's interface to PaymentCoordinator into a base class
https://bugs.webkit.org/show_bug.cgi?id=177904

Reviewed by Daniel Bates.

In a follow-on patch, something other than ApplePaySession will need to be the
PaymentCoordinator's active session during PaymentRequest sessions.

To support this, this patch factors out the ApplePaySession functions called by
PaymentCoordinator into a new base class called PaymentSession.

* Modules/applepay/ApplePaySession.h:
* Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::beginPaymentSession):
* Modules/applepay/PaymentCoordinator.h:
* Modules/applepay/PaymentSession.h: Added.
(WebCore::PaymentSession::~PaymentSession):
* WebCore.xcodeproj/project.pbxproj:

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

2 years agoUnreviewed. Try to make debug type profiler tests stop timing out.
sbarati@apple.com [Thu, 5 Oct 2017 17:18:15 +0000 (17:18 +0000)]
Unreviewed. Try to make debug type profiler tests stop timing out.

* Scripts/run-jsc-stress-tests:

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

2 years agoMove multicolumn flow clear to RenderTreeUpdater
zalan@apple.com [Thu, 5 Oct 2017 14:04:27 +0000 (14:04 +0000)]
Move multicolumn flow clear to RenderTreeUpdater
https://bugs.webkit.org/show_bug.cgi?id=177898
<rdar://problem/34820157>

Reviewed by Antti Koivisto.

There are 2 cases when we need to clear the the multicolumn flow from its container.

1. When the column renderer is not need anymore due to style change (evacuateAndDestroy).
During the subtree reparenting (moving back the descendants to the original position),
if we still had the multicolumn set on the RenderBlockFlow, RenderBlockFlow::addChild() would
put the children back under the column. -> Move the clear call to the RenderTreeUpdater.

2. When the column is detached from the tree/destroyed (willBeRemoveFromTree).
Since it does not trigger reparenting, we don't need to clear the column immediately.
We call clear to avoid accessing state column renderer. -> Use WeakPtr to
manage lifetime instead.

Covered by existing tests.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::setMultiColumnFlow):
(WebCore::RenderBlockFlow::clearMultiColumnFlow):
* rendering/RenderBlockFlow.h:
* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
(WebCore::RenderMultiColumnFlow::willBeRemovedFromTree):
* style/RenderTreeUpdaterMultiColumn.cpp:
(WebCore::RenderTreeUpdater::MultiColumn::update):
(WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):

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

2 years ago[GTK][WPE] GIFImageDecoder never clears decoded frames even when told to do so
magomez@igalia.com [Thu, 5 Oct 2017 14:00:05 +0000 (14:00 +0000)]
[GTK][WPE] GIFImageDecoder never clears decoded frames even when told to do so
https://bugs.webkit.org/show_bug.cgi?id=177864

Reviewed by Carlos Garcia Campos.

Fix GIFImageDecoder::clearFrameBufferCache() so it really deletes decoded buffers, and modify
GIFImageDecoder to be able to decode frames that are not requested in the expected order.

Covered by existent tests.

* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::findFirstRequiredFrameToDecode):
(WebCore::GIFImageDecoder::frameBufferAtIndex):
(WebCore::GIFImageDecoder::clearFrameBufferCache):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFImageReader::decode):
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::frameContext const):

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

2 years agoUnreviewed GTK+ gardening. Update expectations and rebaseline tests failing at r222905.
magomez@igalia.com [Thu, 5 Oct 2017 13:31:57 +0000 (13:31 +0000)]
Unreviewed GTK+ gardening. Update expectations and rebaseline tests failing at r222905.

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

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

2 years ago[WinCairo] Fix build after Bug 167956
commit-queue@webkit.org [Thu, 5 Oct 2017 10:49:45 +0000 (10:49 +0000)]
[WinCairo] Fix build after Bug 167956
https://bugs.webkit.org/show_bug.cgi?id=177921

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

FontCascade::fontForCombiningCharacterSequence wasn't defined for
WinCairo port. It should be defined if !USE(HARFBUZZ).

No new tests because there is no behavior change.

* platform/graphics/FontCascade.cpp: Use !USE(HARFBUZZ) instead of !USE(CAIRO).

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

2 years agoRemove Brotli from Source/ThirdParty
fred.wang@free.fr [Thu, 5 Oct 2017 09:32:58 +0000 (09:32 +0000)]
Remove Brotli from Source/ThirdParty
https://bugs.webkit.org/show_bug.cgi?id=177804

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-03
Reviewed by Michael Catanzaro.

.:

* Source/CMakeLists.txt: Do not build ThirdParty/brotli anymore.
* Source/cmake/FindBrotliDec.cmake: Added. New cmake module to find Brotli via PkgConfig.
* Source/cmake/OptionsGTK.cmake: Expose USE_WOFF2 as a public option and use find_package
to look for brotli.

Source/ThirdParty:

* brotli/CMakeLists.txt: Removed.
* brotli/LICENSE: Removed.
* brotli/README.webkit: Removed.
* brotli/common/constants.h: Removed.
* brotli/common/dictionary.bin: Removed.
* brotli/common/dictionary.c: Removed.
* brotli/common/dictionary.h: Removed.
* brotli/common/version.h: Removed.
* brotli/dec/bit_reader.c: Removed.
* brotli/dec/bit_reader.h: Removed.
* brotli/dec/context.h: Removed.
* brotli/dec/decode.c: Removed.
* brotli/dec/huffman.c: Removed.
* brotli/dec/huffman.h: Removed.
* brotli/dec/port.h: Removed.
* brotli/dec/prefix.h: Removed.
* brotli/dec/state.c: Removed.
* brotli/dec/state.h: Removed.
* brotli/dec/transform.h: Removed.
* brotli/include/brotli/decode.h: Removed.
* brotli/include/brotli/encode.h: Removed.
* brotli/include/brotli/port.h: Removed.
* brotli/include/brotli/types.h: Removed.
* brotli/update.sh: Removed.
* woff2/CMakeLists.txt: Use Brotli's include and library paths found by CMake.

Tools:

* gtk/jhbuild.modules: Build brotli 1.0.1 from the official github repository.
* Scripts/webkitpy/style/checker.py: Remove brotli.

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

2 years agoAlign BitmapImage::LargeAnimationCutoff to a megabyte value
zandobersek@gmail.com [Thu, 5 Oct 2017 09:28:54 +0000 (09:28 +0000)]
Align BitmapImage::LargeAnimationCutoff to a megabyte value
https://bugs.webkit.org/show_bug.cgi?id=177924

Reviewed by Carlos Garcia Campos.

* platform/graphics/BitmapImage.h: Fix the 1014 multiplier used to calculate
the LargeAnimationCutoff value. It was most likely a typo.

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

2 years agoUnreviewed WPE gardening.
zandobersek@gmail.com [Thu, 5 Oct 2017 09:04:14 +0000 (09:04 +0000)]
Unreviewed WPE gardening.

Enable the http/tests/ layout tests in general, but skip the directories
that contain failing tests that still have to be cataloged.

* platform/wpe/TestExpectations:
* platform/wpe/http: Added.
* platform/wpe/http/wpt: Added.
* platform/wpe/http/wpt/resource-timing: Added.
* platform/wpe/http/wpt/resource-timing/rt-initiatorType-media-expected.txt: Added.

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

2 years agoAddress post-review feedback following r222885
wenson_hsieh@apple.com [Thu, 5 Oct 2017 08:06:16 +0000 (08:06 +0000)]
Address post-review feedback following r222885
https://bugs.webkit.org/show_bug.cgi?id=177853
<rdar://problem/34807346>

Reviewed by Ryosuke Niwa and Dan Bates.

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::updateFileList):
(WebCore::DataTransfer::types const):
(WebCore::DataTransfer::filesFromPasteboardAndItemList const):
* dom/DataTransferItem.h:
(WebCore::DataTransferItem::file):
(WebCore::DataTransferItem::file const): Deleted.
* dom/DataTransferItemList.cpp:
(WebCore::DataTransferItemList::add):
(WebCore::DataTransferItemList::remove):

When removing a data transfer item, capture it in a Ref for the scope of remove(), so that it won't be destroyed
immediately after removing from the item list.

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

2 years agoUpgrade Brotli to version 1.0.1 and WOFF2 to latest upstream
fred.wang@free.fr [Thu, 5 Oct 2017 07:54:02 +0000 (07:54 +0000)]
Upgrade Brotli to version 1.0.1 and WOFF2 to latest upstream
https://bugs.webkit.org/show_bug.cgi?id=177768

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-05
Reviewed by Michael Catanzaro.

* brotli/CMakeLists.txt:
* brotli/README.webkit:
* brotli/common/constants.h: Added.
* brotli/common/dictionary.bin: Added.
* brotli/common/dictionary.c: Added.
* brotli/common/dictionary.h: Added.
* brotli/common/version.h: Added.
* brotli/dec/Makefile: Removed.
* brotli/dec/bit_reader.c:
* brotli/dec/bit_reader.h:
* brotli/dec/context.h:
* brotli/dec/decode.c:
* brotli/dec/decode.h: Removed.
* brotli/dec/dictionary.c: Removed.
* brotli/dec/dictionary.h: Removed.
* brotli/dec/huffman.c:
* brotli/dec/huffman.h:
* brotli/dec/port.h:
(BrotliDump):
(BrotliRBit):
* brotli/dec/prefix.h:
* brotli/dec/state.c:
* brotli/dec/state.h:
* brotli/dec/transform.h:
* brotli/dec/types.h: Removed.
* brotli/include/brotli/decode.h: Added.
* brotli/include/brotli/encode.h: Added.
* brotli/include/brotli/port.h: Added.
* brotli/include/brotli/types.h: Added.
* brotli/update.sh:
* woff2/CMakeLists.txt:
* woff2/README.webkit:
* woff2/src/buffer.h:
(woff2::Buffer::Buffer):
(woff2::Buffer::Read):
* woff2/src/convert_woff2ttf_*.cc: Added.
* woff2/src/font.cc:
* woff2/src/glyph.cc:
* woff2/src/normalize.cc:
* woff2/src/port.h:
* woff2/src/store_bytes.h:
(woff2::Store16):
* woff2/src/variable_length.cc:
* woff2/src/woff2_common.cc:
* woff2/src/woff2_dec.cc:
* woff2/src/woff2_decompress.cc:
* woff2/src/woff2_enc.cc:
* woff2/src/woff2_info.cc: Added.

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

2 years agoMake LibWebRTCProvider port agnostic
commit-queue@webkit.org [Thu, 5 Oct 2017 07:44:35 +0000 (07:44 +0000)]
Make LibWebRTCProvider port agnostic
https://bugs.webkit.org/show_bug.cgi?id=177747

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

Source/WebCore:

No change of behavior.

LibWebRTCProvider had some Mac/iOS specific members that are now
moved to LibWebRTCProviderCocoa.
This consists in the codec factories that are VideoToolBox specific.
Introducing LibWebRTCProvider::create to allow different port implementations of LibWebRTCProvider.

* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::create):
(WebCore::LibWebRTCProvider::factory):
(WebCore::LibWebRTCProvider::createPeerConnectionFactory):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:
* platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
(WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
(WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
(WebCore::LibWebRTCProviderCocoa::setActive):
* platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):

Source/WebKit:

* WebProcess/Network/webrtc/LibWebRTCProvider.h: Making sure Mac/iOS provider creates the codec factories.

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

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

2 years agoMake sure all prototypes under poly proto get added into the VM's prototype map
sbarati@apple.com [Thu, 5 Oct 2017 07:38:00 +0000 (07:38 +0000)]
Make sure all prototypes under poly proto get added into the VM's prototype map
https://bugs.webkit.org/show_bug.cgi?id=177909

Reviewed by Keith Miller.

JSTests:

* stress/poly-proto-prototype-map-having-a-bad-time.js: Added.
(assert):
(foo.C):
(foo):
(set x):

Source/JavaScriptCore:

This is an invariant of prototypes that I broke when doing poly proto. This patch fixes it.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGOperations.cpp:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/JSCInlines.h:
* runtime/PrototypeMap.cpp:
(JSC::PrototypeMap::addPrototype): Deleted.
* runtime/PrototypeMap.h:
* runtime/PrototypeMapInlines.h:
(JSC::PrototypeMap::isPrototype const):
(JSC::PrototypeMap::addPrototype):

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

2 years ago[Linux] Port MallocBench
utatane.tea@gmail.com [Thu, 5 Oct 2017 07:05:44 +0000 (07:05 +0000)]
[Linux] Port MallocBench
https://bugs.webkit.org/show_bug.cgi?id=177856

Reviewed by Filip Pizlo.

.:

* CMakeLists.txt:

PerformanceTests:

We would like to optimize locking in bmalloc in Linux by using futex APIs. So we should have
the way to ensure this actually improves / does not regress the performance.

This patch ports MallocBench to Linux to measure/ensure the effect of bmalloc patch in Linux.

While we replace the dispatch serial queue in message.cpp, we still use libdispatch in Benchmark.cpp
since we do not have priority mechanism in C++11 threading implementation.

We also extend run-malloc-benchmarks to accept cmake style layout of build product directory.
And we also support building MallocBench in CMake environment including CMake Mac ports.
Currently, we do not support Windows yet.

Based on the measurement, we can say the following observation. glibc's malloc performance is not
so bad. While bmalloc shows 3.8x (in geomean) performance improvement, bmalloc in Linux shows 2.0x
improvement. Since both numbers in bmalloc are similar, we can think that bmalloc's optimization is
actually working in Linux too. And even though glibc's malloc perofmrnace is not so bad, bmalloc
still offers performance improvement.

* CMakeLists.txt: Added.
* MallocBench/CMakeLists.txt: Added.
* MallocBench/MallocBench.xcodeproj/project.pbxproj:
* MallocBench/MallocBench/Benchmark.cpp:
(Benchmark::Benchmark):
(Benchmark::runOnce):
(Benchmark::currentMemoryBytes): Deleted.
* MallocBench/MallocBench/Benchmark.h:
(Benchmark::Memory::Memory): Deleted.
(Benchmark::Memory::operator-): Deleted.
* MallocBench/MallocBench/CMakeLists.txt: Added.
* MallocBench/MallocBench/CPUCount.cpp:
(cpuCount):
* MallocBench/MallocBench/Interpreter.cpp:
(Interpreter::doMallocOp):
* MallocBench/MallocBench/Memory.cpp: Added.
(currentMemoryBytes):
* MallocBench/MallocBench/Memory.h: Copied from PerformanceTests/MallocBench/MallocBench/CPUCount.cpp.
(Memory::Memory):
(Memory::operator-):
* MallocBench/MallocBench/balloon.cpp:
(benchmark_balloon):
* MallocBench/MallocBench/mbmalloc.cpp:
* MallocBench/MallocBench/message.cpp:
(WorkQueue::WorkQueue):
(WorkQueue::~WorkQueue):
(WorkQueue::dispatchAsync):
(WorkQueue::dispatchSync):
(benchmark_message_one):
(benchmark_message_many):
* MallocBench/MallocBench/nimlang.cpp:
(benchmark_nimlang):
* MallocBench/MallocBench/stress.cpp:
(SizeStream::next):
* MallocBench/MallocBench/stress_aligned.cpp:
* MallocBench/run-malloc-benchmarks:

Source/bmalloc:

* CMakeLists.txt:

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

2 years agoWeb Inspector: When scrolled Network Table reduces the number of rows it may appear...
commit-queue@webkit.org [Thu, 5 Oct 2017 06:33:56 +0000 (06:33 +0000)]
Web Inspector: When scrolled Network Table reduces the number of rows it may appear as blank
https://bugs.webkit.org/show_bug.cgi?id=177914
<rdar://problem/34827613>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-10-04
Reviewed by Matt Baker.

* UserInterface/Views/Table.js:
(WI.Table.prototype._updateVisibleRows):
(WI.Table.prototype._updateFillerRowWithNewHeight):
Reduce the scrollTop when the table was scrolled and was then reloaded with a
smaller number of rows. This can happen in two ways. Either the number of rows
was reduced so much that we enter non-scrollable mode with a non-zero filler
row. This can always reset the scrollTop to 0. Or when a large number of rows
is reduced to a smaller number than our current scrollTop but still more than
fit on one screen. In that case we can reduce the scrollTop to whatever would
scroll the table to its max position.

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

2 years agoRemove WebCoreSystemInterface
achristensen@apple.com [Thu, 5 Oct 2017 06:13:51 +0000 (06:13 +0000)]
Remove WebCoreSystemInterface
https://bugs.webkit.org/show_bug.cgi?id=177916

Reviewed by Antti Koivisto.

Source/WebCore:

* Configurations/WebCore.xcconfig:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/mac/AXObjectCacheMac.mm:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
* dom/Document.cpp:
* editing/mac/DictionaryLookup.mm:
* page/ios/FrameIOS.mm:
* page/ios/UserAgentIOS.mm:
* page/mac/EventHandlerMac.mm:
* platform/cocoa/LocalizedStringsCocoa.mm:
* platform/cocoa/ScrollController.mm:
* platform/graphics/Font.h:
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/cg/PathCG.cpp:
* platform/graphics/cg/PatternCG.cpp:
* platform/graphics/cocoa/FontCascadeCocoa.mm:
* platform/graphics/cocoa/FontCocoa.mm:
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
* platform/graphics/mac/FontCacheMac.mm:
* platform/graphics/mac/GlyphPageMac.cpp:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
* platform/ios/LegacyTileCache.mm:
* platform/ios/PlatformScreenIOS.mm:
* platform/ios/VideoFullscreenInterfaceAVKit.mm:
* platform/ios/WebCoreSystemInterfaceIOS.mm: Removed.
* platform/ios/wak/WAKWindow.mm:
* platform/mac/CursorMac.mm:
* platform/mac/FileSystemMac.mm:
* platform/mac/PlatformEventFactoryMac.mm:
* platform/mac/PlatformSpeechSynthesizerMac.mm:
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/ThemeMac.mm:
* platform/mac/WebCoreNSURLExtras.mm:
* platform/mac/WebCoreSystemInterface.h: Removed.
* platform/mac/WebCoreSystemInterface.mm: Removed.
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
* platform/mac/WebWindowAnimation.mm:
* platform/network/cf/CookieStorageCFNet.cpp:
* platform/network/cf/CredentialStorageCFNet.cpp:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
* platform/network/cf/ResourceHandleCFNet.cpp:
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
* platform/network/cf/ResourceRequestCFNet.cpp:
* platform/network/cf/ResourceResponseCFNet.cpp:
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
* platform/network/cocoa/ResourceRequestCocoa.mm:
* platform/network/ios/WebCoreURLResponseIOS.mm:
* platform/network/mac/CookieJarMac.mm:
* platform/network/mac/ResourceHandleMac.mm:
* platform/network/mac/WebCoreURLResponse.mm:
* platform/text/TextEncodingRegistry.cpp:
* rendering/RenderThemeMac.mm:

Source/WebKitLegacy/ios:

* Misc/WebUIKitSupport.mm:

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

2 years agoStop linking with WebKitSystemInterface
achristensen@apple.com [Thu, 5 Oct 2017 05:46:49 +0000 (05:46 +0000)]
Stop linking with WebKitSystemInterface
https://bugs.webkit.org/show_bug.cgi?id=177915

Reviewed by Antti Koivisto.

Source/WebKit:

* Configurations/DebugRelease.xcconfig:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy:

* WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

* Configurations/DebugRelease.xcconfig:
* Configurations/WebKitLegacy.xcconfig:

Tools:

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
* DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
* WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig:
* WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:

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

2 years agoRemove unnecessary includes of WebKitSystemInterface on Cocoa platforms
achristensen@apple.com [Thu, 5 Oct 2017 04:30:40 +0000 (04:30 +0000)]
Remove unnecessary includes of WebKitSystemInterface on Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=177912

Reviewed by Saam Barati.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
Also stop compiling RenderMediaControls.cpp on Cocoa platforms.  It's not used.

Source/WebKit:

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
* Platform/IPC/mac/ConnectionMac.mm:
* Platform/mac/LayerHostingContext.mm:
* PluginProcess/mac/PluginProcessMac.mm:
* PluginProcess/mac/PluginProcessShim.mm:
* Shared/ios/ChildProcessIOS.mm:
* Shared/mac/ChildProcessMac.mm:
* Shared/mac/SandboxExtensionMac.mm:
* Shared/mac/WebCoreArgumentCodersMac.mm:
* Shared/mac/WebEventFactory.mm:
* StorageProcess/ios/StorageProcessIOS.mm:
* StorageProcess/mac/StorageProcessMac.mm:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
* UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
* UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
* UIProcess/mac/PageClientImplMac.mm:
* UIProcess/mac/WKTextInputWindowController.mm:
* UIProcess/mac/WebContextMenuProxyMac.mm:
* UIProcess/mac/WebPopupMenuProxyMac.mm:
* UIProcess/mac/WindowServerConnection.mm:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
* WebProcess/WebPage/ios/WebPageIOS.mm:
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/cocoa/WebProcessCocoa.mm:

Source/WebKitLegacy/ios:

* Misc/WebUIKitSupport.mm:
* WebCoreSupport/WebChromeClientIOS.mm:

Source/WebKitLegacy/mac:

* Carbon/CarbonUtils.m:
* Carbon/CarbonWindowAdapter.mm:
* Carbon/HIWebView.mm:
* DefaultDelegates/WebDefaultContextMenuDelegate.mm:
* Misc/WebNSFileManagerExtras.mm:
* Misc/WebNSPasteboardExtras.mm:
* Misc/WebNSURLExtras.mm:
* Plugins/Hosted/HostedNetscapePluginStream.mm:
* Plugins/Hosted/NetscapePluginHostManager.mm:
* Plugins/Hosted/NetscapePluginHostProxy.mm:
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
* Plugins/Hosted/WebHostedNetscapePluginView.h:
* Plugins/Hosted/WebTextInputWindowController.m:
* Plugins/WebBaseNetscapePluginView.mm:
* Plugins/WebNetscapePluginEventHandlerCarbon.mm:
* Plugins/WebNetscapePluginEventHandlerCocoa.mm:
* Plugins/WebNetscapePluginStream.mm:
* Plugins/WebNetscapePluginView.mm:
* Plugins/WebPluginDatabase.mm:
* WebCoreSupport/PopupMenuMac.mm:
* WebCoreSupport/WebChromeClient.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebCoreSupport/WebInspectorClient.mm:
* WebCoreSupport/WebPlatformStrategies.mm:
* WebCoreSupport/WebSystemInterface.mm:
* WebView/WebDynamicScrollBarsView.mm:
* WebView/WebFrame.mm:
* WebView/WebFrameView.mm:
* WebView/WebFullScreenController.mm:
* WebView/WebHTMLView.mm:
* WebView/WebPreferences.mm:
* WebView/WebView.mm:

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:

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

2 years ago[JSC] Introduce import.meta
utatane.tea@gmail.com [Thu, 5 Oct 2017 03:57:38 +0000 (03:57 +0000)]
[JSC] Introduce import.meta
https://bugs.webkit.org/show_bug.cgi?id=177703

Reviewed by Filip Pizlo.

JSTests:

* modules/import-meta-syntax.js: Added.
(shouldThrow):
(shouldNotThrow):
* modules/import-meta.js: Added.
* modules/import-meta/cocoa.js: Added.
* modules/resources/assert.js:
(export.shouldNotThrow):
* stress/import-syntax.js:

Source/JavaScriptCore:

This patch adds stage 3 `import.meta`[1].
We add a new hook function moduleLoaderCreateImportMetaProperties, which creates
import meta properties object to this module. And we set this object as @meta
private variable in module environments. So module code can access this by accessing
@meta private variable.

[1]: https://github.com/tc39/proposal-import-meta

* builtins/BuiltinNames.h:
* builtins/ModuleLoaderPrototype.js:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* jsc.cpp:
(GlobalObject::moduleLoaderCreateImportMetaProperties):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseModuleSourceElements):
(JSC::Parser<LexerType>::parseMemberExpression):
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::createImportMetaProperties):
* runtime/JSModuleLoader.h:
* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::link):
(JSC::JSModuleRecord::instantiateDeclarations):
* runtime/JSModuleRecord.h:
* runtime/ModuleLoaderPrototype.cpp:
(JSC::moduleLoaderPrototypeModuleDeclarationInstantiation):

Source/WebCore:

* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSWorkerGlobalScopeBase.cpp:

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

2 years agortc::PacketOptions should have its own IPC encoding/decoding routines
commit-queue@webkit.org [Thu, 5 Oct 2017 03:54:39 +0000 (03:54 +0000)]
rtc::PacketOptions should have its own IPC encoding/decoding routines
https://bugs.webkit.org/show_bug.cgi?id=177812

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

Replacing rtc::PacketOptions IPC encoding/decoding from passing the structure as individual parameters to the structure as a parameter.
Introducing WebKit::RTCPacketOptions as a wrapper around it for which encode/decode routines are added.
Updating code using rtc::PacketOptions accordingly.

* NetworkProcess/webrtc/NetworkRTCSocket.cpp:
(WebKit::NetworkRTCSocket::sendTo):
* NetworkProcess/webrtc/NetworkRTCSocket.h:
* NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
* Platform/IPC/Decoder.cpp:
(IPC::Decoder::operator>>):
(IPC::Decoder::decode):
* Platform/IPC/Decoder.h:
* Platform/IPC/Encoder.cpp:
(IPC::Encoder::encode):
* Platform/IPC/Encoder.h:
* Shared/RTCPacketOptions.cpp: Added.
(WebKit::RTCPacketOptions::encode const):
(WebKit::RTCPacketOptions::decode):
* Shared/RTCPacketOptions.h: Added.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
(WebKit::LibWebRTCSocket::SendTo):

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

2 years agobmalloc mutex should be adaptive
fpizlo@apple.com [Thu, 5 Oct 2017 03:05:42 +0000 (03:05 +0000)]
bmalloc mutex should be adaptive
https://bugs.webkit.org/show_bug.cgi?id=177839

Reviewed by Michael Saboff.

Source/bmalloc:

This pulls the WordLock algorithm into bmalloc, mostly by copy-pasting the code. We need to
copy paste because sometimes we build WTF without bmalloc, so WTF cannot rely on bmalloc for
anything other than malloc.

* bmalloc/Algorithm.h:
(bmalloc::compareExchangeWeak):
(bmalloc::compareExchangeStrong):
* bmalloc/PerThread.h:
* bmalloc/StaticMutex.cpp:
(bmalloc::StaticMutex::lockSlow):
(bmalloc::StaticMutex::unlockSlow):
(bmalloc::StaticMutex::lockSlowCase): Deleted.
* bmalloc/StaticMutex.h:
(bmalloc::StaticMutex::try_lock):
(bmalloc::StaticMutex::isLocked const):
(bmalloc::StaticMutex::init):
(bmalloc::StaticMutex::tryLock):
(bmalloc::StaticMutex::lock):
(bmalloc::StaticMutex::unlock):
(bmalloc::sleep): Deleted.
(bmalloc::waitUntilFalse): Deleted.

Source/WTF:

Add some comments that I thought of while copy-pasting this code.

* wtf/LockAlgorithmInlines.h:
* wtf/WordLock.cpp:

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

2 years agoLink WebCore against CFNetwork in the CMake build
timothy_horton@apple.com [Thu, 5 Oct 2017 02:57:01 +0000 (02:57 +0000)]
Link WebCore against CFNetwork in the CMake build
https://bugs.webkit.org/show_bug.cgi?id=177910

Reviewed by Ryosuke Niwa.

* PlatformMac.cmake:
This is enough to get WebKit1 MiniBrowser running; otherwise, we
crash trying to access the public suffix list.

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

2 years agoMake pertinent AccessCases watch the poly proto watchpoint
sbarati@apple.com [Thu, 5 Oct 2017 02:47:59 +0000 (02:47 +0000)]
Make pertinent AccessCases watch the poly proto watchpoint
https://bugs.webkit.org/show_bug.cgi?id=177765

Reviewed by Keith Miller.

JSTests:

* microbenchmarks/poly-proto-and-non-poly-proto-same-ic.js: Added.
(assert):
(foo.C):
(foo):
(validate):
* stress/poly-proto-clear-stub.js: Added.
(assert):
(foo.C):
(foo):

Source/JavaScriptCore:

This patch makes it so that stubs that encounter a structure with a
valid poly proto watchpoint will watch the poly proto watchpoint. This
ensures that if the watchpoint is fired, the stub will be cleared
and have a chance to regenerate. In an ideal world, this will lead
to the stub generating better code since it may never encounter the
non-poly proto structure again.

This patch also fixes a bug in the original poly proto code where
I accidentally had a condition inverted. The bad code caused a
stub that continually cached two structures which are structurally
equivalent but with different prototype objects to always clear itself.
The code should have been written differently. It should have only
cleared if the poly proto watchpoint *was not* fired. The code
accidentally cleared only if stub *was* fired.

* bytecode/AccessCase.cpp:
(JSC::AccessCase::commit):
* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::addCases):
(WTF::printInternal):
* bytecode/PolymorphicAccess.h:
(JSC::AccessGenerationResult::shouldResetStubAndFireWatchpoints const):
(JSC::AccessGenerationResult::addWatchpointToFire):
(JSC::AccessGenerationResult::fireWatchpoints):
(JSC::AccessGenerationResult::shouldResetStub const): Deleted.
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):
* bytecode/Watchpoint.h:
(JSC::InlineWatchpointSet::inflate):
* jit/Repatch.cpp:
(JSC::fireWatchpointsAndClearStubIfNeeded):
(JSC::tryCacheGetByID):
(JSC::repatchGetByID):
(JSC::tryCachePutByID):
(JSC::repatchPutByID):
(JSC::tryCacheIn):
(JSC::repatchIn):
(JSC::tryRepatchIn): Deleted.

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

2 years agoBreak out new touch debugging code into seperate file
megan_gardner@apple.com [Thu, 5 Oct 2017 00:02:05 +0000 (00:02 +0000)]
Break out new touch debugging code into seperate file
https://bugs.webkit.org/show_bug.cgi?id=177796

Reviewed by Simon Fraser.

Encapsulate the new debug touch code into it's own file.
This allows for cleaner code and a better way to show the touches
in a completely separate window, which should also be in screen
coordinates, and not subject to any transforms that get put on the
WebViews.

* TestRunnerShared/spi/UIKitTestSPI.h:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/ios/HIDDebugTouchWindow.h: Added.
* WebKitTestRunner/ios/HIDDebugTouchWindow.mm: Added.
(+[HIDDebugTouchWindow sharedHIDDebugTouchWindow]):
(-[HIDDebugTouchWindow init]):
(-[HIDDebugTouchWindow dealloc]):
(-[HIDDebugTouchWindow updateDebugIndicatorForTouch:withPointInWindowCoordinates:isTouching:]):
(-[HIDDebugTouchWindow initDebugViewsIfNeeded]):
* WebKitTestRunner/ios/HIDEventGenerator.h:
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator init]):
(-[HIDEventGenerator _createIOHIDEventWithInfo:]):
(-[HIDEventGenerator _createIOHIDEventType:]):
(-[HIDEventGenerator _updateTouchPoints:count:]):
(-[HIDEventGenerator touchDownAtPoints:touchCount:]):
(-[HIDEventGenerator touchDown:touchCount:]):
(-[HIDEventGenerator liftUpAtPoints:touchCount:]):
(-[HIDEventGenerator liftUp:touchCount:]):
(-[HIDEventGenerator moveToPoints:touchCount:duration:]):
(-[HIDEventGenerator initDebugViewsIfNeeded]): Deleted.
(-[HIDEventGenerator updateDebugIndicatorForTouch:withPoint:isTouching:]): Deleted.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::updatePlatformSpecificTestOptionsForTest const):

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

2 years agoHave TextDecorationPainter hold an OptionSet of decorations
dbates@webkit.org [Wed, 4 Oct 2017 23:58:02 +0000 (23:58 +0000)]
Have TextDecorationPainter hold an OptionSet of decorations
https://bugs.webkit.org/show_bug.cgi?id=177889

Reviewed by Simon Fraser.

Currently TextDecorationPainter implicitly maintains the set of one or more TextDecoration
flags in a instance variable bitmask of type TextDecoration. Instead we should represent
this set explicitly as an OptionSet to improve readability of the code.

For now we have the TextDecorationPainter constructor and TextDecorationPainter::stylesForRenderer()
to take the set of decorations as an unsigned value to avoid the need to update callers.
We will look to apply a similar change throughout the code in <https://bugs.webkit.org/show_bug.cgi?id=176844>.

No functionality changed. So, no new tests.

* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::TextDecorationPainter): For now, changed data type for passed
decorations from TextDecoration to unsigned to convey that it is a bitmask.
(WebCore::TextDecorationPainter::paintTextDecoration): Renamed linesAreOpaque to areLinesOpaque
while I am here. Fixed some minor style issues.
(WebCore::collectStylesForRenderer): Modified to take the remaining decorations as an OptionSet,
and removed an unnecessary copy of these decorations by taking advantage of the fact that they
are passed by value.
(WebCore::TextDecorationPainter::stylesForRenderer): Convert the passed decorations to an OptionSet as needed to
pass to collectStylesForRenderer().
* rendering/TextDecorationPainter.h: Change m_decoration from TextDecoration to OptionSet<TextDecoration>
and rename it to m_decorations to reflect that it is used as a set of one or more TextDecoration flags.
Also remove unnecessary initializer for m_isPrinting while I am here and group it with the other boolean,
m_isHorizontal. There is exactly one constructor for this class and it initializes m_isPrinting.

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

2 years agoWeb Inspector: Improve CanvasManager recording events
mattbaker@apple.com [Wed, 4 Oct 2017 23:51:47 +0000 (23:51 +0000)]
Web Inspector: Improve CanvasManager recording events
https://bugs.webkit.org/show_bug.cgi?id=177762

Reviewed by Devin Rousso.

Source/JavaScriptCore:

* inspector/protocol/Canvas.json:
Renamed events for clarity and consistency; made recording data optional.

Source/WebCore:

Dispatch Canvas.recordingFinished regardless of whether any actions were
recorded. Without this extra guarantee, the frontend has to keep track
of additional state to determine whether a recording is in progress.

* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::startRecording):
(WebCore::InspectorCanvasAgent::stopRecording):
(WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
(WebCore::InspectorCanvasAgent::requestRecording): Deleted.
(WebCore::InspectorCanvasAgent::cancelRecording): Deleted.
* inspector/InspectorCanvasAgent.h:

Source/WebInspectorUI:

* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.startRecording):
(WI.CanvasManager.prototype.stopRecording):
(WI.CanvasManager.prototype.recordingFinished):
Replace the RecordingFinished event with a pair of events. RecordingStarted
is sent when CanvasAgent.startRecording succeeds. RecordingStopped is
sent when a recordingFinished event is received from the backend, or
when a call to CanvasAgent.stopRecording fails.

* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype._toggleRecording):
(WI.CanvasContentView.prototype._recordingStarted):
(WI.CanvasContentView.prototype._recordingFinished): Deleted.
Update recording status when CanvasManager fires recording events,
instead of immediately after clicking the record button.

LayoutTests:

Update tests for renamed CanvasManager event.

* inspector/canvas/recording-2d.html:
* inspector/canvas/recording-expected.txt:
* inspector/canvas/recording-webgl-snapshots.html:
* inspector/canvas/recording-webgl.html:
* inspector/canvas/recording.html:
* inspector/canvas/resources/recording-utilities.js:
(TestPage.registerInitializer):

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

2 years agoAX: Make video objects accessible on iOS
n_wang@apple.com [Wed, 4 Oct 2017 23:43:13 +0000 (23:43 +0000)]
AX: Make video objects accessible on iOS
https://bugs.webkit.org/show_bug.cgi?id=177788
<rdar://problem/34778028>

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed certain <video> elements on iOS:
1. If they have no controls attribute set and have playsinline attribute set, that means
   normally there are custom controls provided.
2. Without autoplay attribute set. From iOS 10, with the motivation to improve performace by
   replacing GIF with <video>, elements will now honor the autoplay attribute if they
   have no audio. So normally those <video> elements are not interactive.

Also provided functions to let iOS users interact with the video elements:
- Play/Pause: accessibilityActivate
- Fast forward: accessibilityIncrement
- Rewind: accessibilityDecrement

Test: accessibility/ios-simulator/video-elements-ios.html

* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityMediaObject.cpp: Added.
(WebCore::AccessibilityMediaObject::AccessibilityMediaObject):
(WebCore::AccessibilityMediaObject::~AccessibilityMediaObject):
(WebCore::AccessibilityMediaObject::create):
(WebCore::AccessibilityMediaObject::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityMediaObject::mediaElement const):
(WebCore::AccessibilityMediaObject::stringValue const):
(WebCore::AccessibilityMediaObject::interactiveVideoDuration const):
(WebCore::AccessibilityMediaObject::mediaSeek):
(WebCore::AccessibilityMediaObject::toggleMute):
(WebCore::AccessibilityMediaObject::increment):
(WebCore::AccessibilityMediaObject::decrement):
(WebCore::AccessibilityMediaObject::press):
(WebCore::AccessibilityMediaObject::hasControlsAttributeSet const):
(WebCore::AccessibilityMediaObject::isPlaying const):
(WebCore::AccessibilityMediaObject::isMuted const):
(WebCore::AccessibilityMediaObject::isAutoplayEnabled const):
(WebCore::AccessibilityMediaObject::isPlayingInline const):
(WebCore::AccessibilityMediaObject::enterFullscreen const):
* accessibility/AccessibilityMediaObject.h: Added.
* accessibility/AccessibilityObject.cpp:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isMediaObject const):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityIsWebInteractiveVideo]):
(-[WebAccessibilityObjectWrapper interactiveVideoDescription]):
(-[WebAccessibilityObjectWrapper accessibilityIsMediaPlaying]):
(-[WebAccessibilityObjectWrapper accessibilityIsMediaMuted]):
(-[WebAccessibilityObjectWrapper accessibilityToggleMuteForMedia]):
(-[WebAccessibilityObjectWrapper accessibilityVideoEnterFullscreen]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
(-[WebAccessibilityObjectWrapper accessibilityLabel]):

LayoutTests:

* accessibility/ios-simulator/video-elements-ios-expected.txt: Added.
* accessibility/ios-simulator/video-elements-ios.html: Added.

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

2 years agoInclude Pasteboard.h for all in WebCoreArgumentCoders
don.olmstead@sony.com [Wed, 4 Oct 2017 23:27:45 +0000 (23:27 +0000)]
Include Pasteboard.h for all in WebCoreArgumentCoders
https://bugs.webkit.org/show_bug.cgi?id=177902

Reviewed by Alex Christensen.

* Shared/WebCoreArgumentCoders.cpp:

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

2 years agoAdd basic support for the version of DataTransferItemList.add that takes a File
wenson_hsieh@apple.com [Wed, 4 Oct 2017 22:28:08 +0000 (22:28 +0000)]
Add basic support for the version of DataTransferItemList.add that takes a File
https://bugs.webkit.org/show_bug.cgi?id=177853
<rdar://problem/34807346>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Adds very basic support for DataTransferItemList.add(File). So far, a File added in this way can only be read
back from the same DataTransfer, during dragstart or copy. This File isn't written to the platform pasteboard
yet, so even dropping or pasting in the same page will not transfer the File, but this brings us closer to
parity with other browsers. See per-method comments for details.

Tests: editing/pasteboard/data-transfer-item-list-add-file-multiple-times.html
       editing/pasteboard/data-transfer-item-list-add-file-on-copy.html
       editing/pasteboard/data-transfer-item-list-add-file-on-drag.html

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::updateFileList):

Recompute the DataTransfer's FileList. This behaves the same way as destroying the FileList altogether and
building it from scratch, but we avoid that approach because the FileList object needs to maintain the same DOM
wrapper after a File-backed item is removed.

(WebCore::DataTransfer::itemListDidAddFile):

Add the newly appended DataTransferItem's File to the DataTransfer's FileList.

(WebCore::DataTransfer::types const):

Return only the "Files" type if there are file-backed items in the DataTransfer's item list.

(WebCore::DataTransfer::updatedFilesForFileList const):
(WebCore::DataTransfer::files const):
* dom/DataTransfer.h:
* dom/DataTransferItem.h:
(WebCore::DataTransferItem::file const):
* dom/DataTransferItemList.cpp:
(WebCore::DataTransferItemList::add):
(WebCore::DataTransferItemList::remove):
(WebCore::DataTransferItemList::clear):

When removing a File, only clear from the DataTransfer's pasteboard if the removed item is not a File (otherwise,
clearing a File that shares the same type as some other item in the pasteboard will erroneously clear that other
item as well). Additionally, call out to the DataTransfer to update the FileList.

* dom/DataTransferItemList.h:
(WebCore::DataTransferItemList::hasItems const):
(WebCore::DataTransferItemList::items const):

Add helpers for directly accessing an item list's items. items() should be used in conjunction with hasItems().
This route is taken to (1) avoid having to copy the vector of Files, and (2) to avoid generating m_items if it
doesn't already exist.

LayoutTests:

Add tests to verify that Files can be added to and removed from the DataTransferItemList, and also read back via
both the item list and the DataTransfer's FileList when copying and dragging. Additionally, adds a test that adds
and removes the same File to the DataTransferItemList multiple times.

* TestExpectations:
* editing/pasteboard/data-transfer-item-list-add-file-multiple-times-expected.txt: Added.
* editing/pasteboard/data-transfer-item-list-add-file-multiple-times.html: Added.
* editing/pasteboard/data-transfer-item-list-add-file-on-copy-expected.txt: Added.
* editing/pasteboard/data-transfer-item-list-add-file-on-copy.html: Added.
* editing/pasteboard/data-transfer-item-list-add-file-on-drag-expected.txt: Added.
* editing/pasteboard/data-transfer-item-list-add-file-on-drag.html: Added.
* platform/ios-simulator-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:

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

2 years agoRenderMultiColumnFlow populate/evacuate should not disable layout state.
zalan@apple.com [Wed, 4 Oct 2017 21:29:50 +0000 (21:29 +0000)]
RenderMultiColumnFlow populate/evacuate should not disable layout state.
https://bugs.webkit.org/show_bug.cgi?id=177894
<rdar://problem/34818696>

Reviewed by Antti Koivisto.

Populate/evacuate methods are not called at layout time.

Covered by existing tests.

* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::populate):
(WebCore::RenderMultiColumnFlow::evacuateAndDestroy):

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

2 years agoRemove unused variables in lambdas for network process cache
ddkilzer@apple.com [Wed, 4 Oct 2017 21:15:32 +0000 (21:15 +0000)]
Remove unused variables in lambdas for network process cache
<https://webkit.org/b/177878>
<rdar://problem/34038482>

Reviewed by Tim Horton.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::open):
(WebKit::CacheStorage::Engine::putRecords):
(WebKit::CacheStorage::Engine::deleteMatchingRecords):
* NetworkProcess/cache/CacheStorageEngineConnection.cpp:
(WebKit::CacheStorageEngineConnection::reference):
- Remove unused |this| from lambda captures.

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

2 years agoWTF: Update std::expected to match current proposal
jfbastien@apple.com [Wed, 4 Oct 2017 20:54:26 +0000 (20:54 +0000)]
WTF: Update std::expected to match current proposal
https://bugs.webkit.org/show_bug.cgi?id=177881

Reviewed by Mark Lam.

Source/JavaScriptCore:

Update API.

* wasm/WasmB3IRGenerator.cpp:
* wasm/WasmModule.cpp:
(JSC::Wasm::makeValidationResult):
* wasm/WasmParser.h:
* wasm/WasmValidate.cpp:
* wasm/generateWasmValidateInlinesHeader.py:
(loadMacro):
(storeMacro):

Source/WTF:

The proposal is likely to be in C++20 and I've been asked to help co-champion
it. I'm therefore updating our implementation to more closely match the current
proposal, and to make sure it'll work for us if standardized.

 - Rename UnexpectedType to Unexpected to match the proposal.
 - Remove relational operators, only equality / inequality remains.
 - Fix minor type signatures.
 - Add UnexpectedType typedef.
 - Uncomment rebind implementation.
 - Add in-place construction tag, as well as explicit error construction tag.
 - Add template unexpected constructor.
 - Note that make_unexpected isn't in the proposal anymore, but we keep it because we don't have C++17 deduction guides.
 - Remove hashing, which isn't in the proposal anymore.

* wtf/Expected.h:
(WTF::Unexpected::Unexpected):
(WTF::Unexpected::value const):
(WTF::operator==):
(WTF::operator!=):
(WTF::makeUnexpected):
(WTF::Expected::Expected):
(WTF::Expected::operator=):
(WTF::Expected::getUnexpected const):

Tools:

The proposal is likely to be in C++20 and I've been asked to help co-champion
it. I'm therefore updating our implementation to more closely match the current
proposal, and to make sure it'll work for us if standardized.

 - Rename UnexpectedType to Unexpected to match the proposal.
 - Remove relational operators, only equality / inequality remains.
 - Fix minor type signatures.
 - Add UnexpectedType typedef.
 - Uncomment rebind implementation.
 - Add in-place construction tag, as well as explicit error construction tag.
 - Add template unexpected constructor.
 - Note that make_unexpected isn't in the proposal anymore, but we keep it because we don't have C++17 deduction guides.
 - Remove hashing, which isn't in the proposal anymore.

* TestWebKitAPI/Tests/WTF/Expected.cpp:
(WTF::operator<<):
(TestWebKitAPI::TEST):

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

2 years agoRemove failure expectation for async-func-decl-dstr-obj-id-put-unresolvable-no-strict.js.
ryanhaddad@apple.com [Wed, 4 Oct 2017 20:51:20 +0000 (20:51 +0000)]
Remove failure expectation for async-func-decl-dstr-obj-id-put-unresolvable-no-strict.js.

Unreviewed test gardening.

* test262.yaml:

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

2 years ago[WinCairo] add PLATFORM(WIN) configurations to config.h
commit-queue@webkit.org [Wed, 4 Oct 2017 20:46:53 +0000 (20:46 +0000)]
[WinCairo] add PLATFORM(WIN) configurations to config.h
https://bugs.webkit.org/show_bug.cgi?id=177846

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2017-10-04
Reviewed by Alex Christensen.

* config.h:

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

2 years agohttps://bugs.webkit.org/show_bug.cgi?id=177888
lforschler@apple.com [Wed, 4 Oct 2017 20:27:03 +0000 (20:27 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=177888
WebKitArchiveSupport - add API Gateway to source control
This is a swagger configuration export via AWS API Gateway console.

Rubber-stamped by Alexey Proskuryakov.

* WebKitArchiveSupport/AWS-APIGateway: Added.
* WebKitArchiveSupport/AWS-APIGateway/stage-v2.json: Added.

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

2 years agoRenderMultiColumnFlow::m_beingEvacuated is redundant.
zalan@apple.com [Wed, 4 Oct 2017 20:23:10 +0000 (20:23 +0000)]
RenderMultiColumnFlow::m_beingEvacuated is redundant.
https://bugs.webkit.org/show_bug.cgi?id=177886
<rdar://problem/34815997>

Reviewed by Simon Fraser.

m_beingEvacuated was introduced to protect RenderMultiColumnFlow from triggering
remove/insert code while the column is being destroyed and the descendants are getting reparented.
However,
1. the setMultiColumnFlow(nullptr) call already protects from triggering the remove callback
2. When adding the children back to their original position, we should not be able to find
this column as the enclosing block anymore (simply because we are moving the children as siblings
to the multicol renderer)

Covered by existing tests.

* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow):
(WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
(WebCore::RenderMultiColumnFlow::fragmentedFlowRelativeWillBeRemoved):
* rendering/RenderMultiColumnFlow.h:

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

2 years agoWebAssembly: address no VM / JS follow-ups
jfbastien@apple.com [Wed, 4 Oct 2017 20:20:43 +0000 (20:20 +0000)]
WebAssembly: address no VM / JS follow-ups
https://bugs.webkit.org/show_bug.cgi?id=177887

Reviewed by Saam Barati.

All minor fixes, no functional changes.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::addCurrentMemory):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
* wasm/WasmContext.cpp:
(JSC::Wasm::Context::store):
* wasm/WasmMemoryMode.h:
* wasm/WasmTable.h:
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
* wasm/js/JSWebAssemblyTable.cpp:
(JSC::JSWebAssemblyTable::JSWebAssemblyTable):
(JSC::JSWebAssemblyTable::grow):

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

2 years agoMark http/wpt/cache-storage/cache-quota.any.html as flaky on Windows.
pvollan@apple.com [Wed, 4 Oct 2017 20:12:15 +0000 (20:12 +0000)]
Mark http/wpt/cache-storage/cache-quota.any.html as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=177891

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years agoAdd support for using Probe DFG OSR Exit behind a runtime flag.
mark.lam@apple.com [Wed, 4 Oct 2017 20:00:01 +0000 (20:00 +0000)]
Add support for using Probe DFG OSR Exit behind a runtime flag.
https://bugs.webkit.org/show_bug.cgi?id=177844
<rdar://problem/34801425>

Reviewed by Saam Barati.

Source/JavaScriptCore:

This is based on the code originally posted in https://bugs.webkit.org/show_bug.cgi?id=175144
(in r221774 and r221832) with some optimizations and bug fixes added.  The probe
based DFG OSR Exit is only enabled if Options::useProbeOSRExit() is true.  We're
landing this behind an option switch to make it easier to tune performance using
the probe based OSR exit.

* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/MacroAssembler.cpp:
(JSC::stdFunctionCallback):
* assembler/MacroAssemblerPrinter.cpp:
(JSC::Printer::printCallback):
* assembler/ProbeContext.cpp:
(JSC::Probe::executeProbe):
(JSC::Probe::flushDirtyStackPages):
* assembler/ProbeContext.h:
(JSC::Probe::Context::Context):
(JSC::Probe::Context::arg):
* assembler/ProbeFrame.h: Added.
(JSC::Probe::Frame::Frame):
(JSC::Probe::Frame::argument):
(JSC::Probe::Frame::operand):
(JSC::Probe::Frame::setArgument):
(JSC::Probe::Frame::setOperand):
(JSC::Probe::Frame::get):
(JSC::Probe::Frame::set):
* assembler/ProbeStack.cpp:
(JSC::Probe::Page::lowWatermarkFromVisitingDirtyChunks):
(JSC::Probe::Stack::Stack):
(JSC::Probe::Stack::lowWatermarkFromVisitingDirtyPages):
* assembler/ProbeStack.h:
(JSC::Probe::Stack::Stack):
(JSC::Probe::Stack::lowWatermark):
(JSC::Probe::Stack::set):
(JSC::Probe::Stack::savedStackPointer const):
(JSC::Probe::Stack::setSavedStackPointer):
(JSC::Probe::Stack::newStackPointer const): Deleted.
(JSC::Probe::Stack::setNewStackPointer): Deleted.
* bytecode/ArrayProfile.h:
(JSC::ArrayProfile::observeArrayMode):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::updateOSRExitCounterAndCheckIfNeedToReoptimize):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addressOfOSRExitCounter): Deleted.
* bytecode/ExecutionCounter.h:
(JSC::ExecutionCounter::hasCrossedThreshold const):
(JSC::ExecutionCounter::setNewThresholdForOSRExit):
* bytecode/MethodOfGettingAValueProfile.cpp:
(JSC::MethodOfGettingAValueProfile::reportValue):
* bytecode/MethodOfGettingAValueProfile.h:
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::jsValueFor):
(JSC::DFG::restoreCalleeSavesFor):
(JSC::DFG::saveCalleeSavesFor):
(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):
(JSC::DFG::saveOrCopyCalleeSavesFor):
(JSC::DFG::createDirectArgumentsDuringExit):
(JSC::DFG::createClonedArgumentsDuringExit):
(JSC::DFG::emitRestoreArguments):
(JSC::DFG::OSRExit::executeOSRExit):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):
(JSC::DFG::printOSRExit):
* dfg/DFGOSRExit.h:
(JSC::DFG::OSRExitState::OSRExitState):
* dfg/DFGThunks.cpp:
(JSC::DFG::osrExitThunkGenerator):
* dfg/DFGThunks.h:
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::tryToSetConstantRecovery):
(JSC::DFG::VariableEventStream::reconstruct const):
(JSC::DFG::VariableEventStream::tryToSetConstantRecovery const): Deleted.
* dfg/DFGVariableEventStream.h:
* profiler/ProfilerOSRExit.h:
(JSC::Profiler::OSRExit::incCount):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
* runtime/Options.h:

Tools:

Enable --useProbeOSrExit=true for dfg-eager and ftl-no-cjit-validate-sampling-profiler
test configurations.

* Scripts/run-jsc-stress-tests:

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

2 years agoUnreviewed, rolling out r222840.
ryanhaddad@apple.com [Wed, 4 Oct 2017 19:47:32 +0000 (19:47 +0000)]
Unreviewed, rolling out r222840.

This change breaks internal builds.

Reverted changeset:

"Generate a compile error if release is built without compiler
optimizations"
https://bugs.webkit.org/show_bug.cgi?id=177665
http://trac.webkit.org/changeset/222840

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

2 years agoUnreviewed, rolling out r222775.
commit-queue@webkit.org [Wed, 4 Oct 2017 19:31:38 +0000 (19:31 +0000)]
Unreviewed, rolling out r222775.
https://bugs.webkit.org/show_bug.cgi?id=177890

Significantly increased the WebKit build time (Requested by
rniwa on #webkit).

Reverted changeset:

"Build libwebrtc unit tests executables"
https://bugs.webkit.org/show_bug.cgi?id=177211
http://trac.webkit.org/changeset/222775

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

2 years agoWeb Inspector: Detail Views for resources in Network Tab
joepeck@webkit.org [Wed, 4 Oct 2017 19:17:30 +0000 (19:17 +0000)]
Web Inspector: Detail Views for resources in Network Tab
https://bugs.webkit.org/show_bug.cgi?id=177553

Reviewed by Devin Rousso.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and resources.

* UserInterface/Base/Main.js:
(WI._focusedContentBrowser):
Detect nested content browsers instead of only top level tab content browsers.

* UserInterface/Base/Setting.js:
Add a new global setting for which Network Detail view is preferred.

* UserInterface/Views/ContentBrowser.css:
(.content-browser > .navigation-bar .item):
(.content-browser > .navigation-bar > .item): Deleted.
Generalize a navigation item style so it works on items nested inside a group.

* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem):
(WI.ContentBrowser.prototype._updateContentViewNavigationItems):
(WI.ContentBrowser.prototype._removeAllNavigationItems):
Give ContentBrowser a way to group all ContentView specific navigation items
inside a GroupNavigationItem. This lets the client decide what to do with
those navigation items, instead of default behavior in the navigation bar.

* UserInterface/Views/ContentViewContainer.js:
(WI.ContentViewContainer.prototype.showContentView):
Avoid a flash when showContentView is called with the current content view.

* UserInterface/Views/FlexibleSpaceNavigationItem.css:
(:matches(.navigation-bar, .toolbar) .item.flexible-space.align-start > .item):
(:matches(.navigation-bar, .toolbar) .item.flexible-space.align-end > .item):
When containing a navigation item decide where you want the items to align to.

* UserInterface/Views/FlexibleSpaceNavigationItem.js:
(WI.FlexibleSpaceNavigationItem):
(WI.FlexibleSpaceNavigationItem.prototype.updateLayout):
Provide an option to embed a NavigationItem within a FlexibleSpace. Its behavior right
now is rather simple. If the embedded Item fits in the current available space it is
shown. If it doesn't fit, it is hidden and we have just a flexible space. This is used
in the network detail view's navigation bar to keep the main navigation items centered
while allowing for buttons to show up on the side without affecting the centering.

* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar):
(WI.NavigationBar.prototype._mouseDown):
(WI.NavigationBar.prototype._mouseUp):
Simplify event registration. This would also help avoid cases where we
might have registered multiple mousedown handlers.

* UserInterface/Views/GroupNavigationItem.js:
(WI.GroupNavigationItem):
(WI.GroupNavigationItem.prototype.get navigationItems):
(WI.GroupNavigationItem.prototype.set navigationItems):
(WI.GroupNavigationItem.prototype.get width):
(WI.GroupNavigationItem.prototype.get minimumWidth):
(WI.GroupNavigationItem.prototype._updateItems):
* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WI.HierarchicalPathNavigationItem):
(WI.HierarchicalPathNavigationItem.prototype.set components):
(WI.HierarchicalPathNavigationItem.prototype.updateLayout):
(WI.HierarchicalPathNavigationItem.prototype._updateComponentsIfNeeded):
Defer DOM modifications until layout for NavigationItems container classes
that change items/components dynamically. This reduces UI flashing in the
bar when items/components change by coalescing all DOM updates at the same
time; when the NavigationBar does its next layout.

* UserInterface/Views/NetworkResourceDetailView.css:
(.network-resource-detail):
(.network-resource-detail .navigation-bar):
(.network-resource-detail .item.close > .glyph):
(.network-resource-detail .item.close > .glyph:hover):
(.network-resource-detail .item.close > .glyph:active):
(.network .network-resource-detail .navigation-bar .item.radio.button.text-only):
(.network .network-resource-detail .navigation-bar .item.radio.button.text-only.selected):
(.network-resource-detail > .content-browser):
Styles for the detail view's navigation bar.

* UserInterface/Views/NetworkResourceDetailView.js: Added.
(WI.NetworkResourceDetailView):
(WI.NetworkResourceDetailView.prototype.get resource):
(WI.NetworkResourceDetailView.prototype.shown):
(WI.NetworkResourceDetailView.prototype.hidden):
(WI.NetworkResourceDetailView.prototype.dispose):
(WI.NetworkResourceDetailView.prototype.initialLayout):
(WI.NetworkResourceDetailView.prototype._showPreferredContentView):
(WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
(WI.NetworkResourceDetailView.prototype._navigationItemSelected):
(WI.NetworkResourceDetailView.prototype._handleCloseButton):
ContentBrowser with customized navigation bar. This container has a fixed
list of ContentViews all relating to the Resource. The detail view has
a single delegate method for its close button. Since it maintains a
ContentBrowser it needs to expose shown/hidden/dispose logic to ensure
proper ContentView lifecycle events.

* UserInterface/Views/NetworkTableContentView.css:
(.showing-detail .table .cell:not(.name)):
(.showing-detail .table .resizer:not(:first-of-type)):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype.shown):
(WI.NetworkTableContentView.prototype.hidden):
(WI.NetworkTableContentView.prototype.closed):
(WI.NetworkTableContentView.prototype.reset):
(WI.NetworkTableContentView.prototype.networkResourceDetailViewClose):
(WI.NetworkTableContentView.prototype.tableSortChanged):
(WI.NetworkTableContentView.prototype.tableCellClicked):
(WI.NetworkTableContentView.prototype.tableSelectedRowChanged):
(WI.NetworkTableContentView.prototype.layout):
(WI.NetworkTableContentView.prototype._hideResourceDetailView):
(WI.NetworkTableContentView.prototype._showResourceDetailView):
(WI.NetworkTableContentView.prototype._positionDetailView):
(WI.NetworkTableContentView.prototype._updateFilteredEntries):
(WI.NetworkTableContentView.prototype._typeFilterScopeBarSelectionChanged):
(WI.NetworkTableContentView.prototype._restoreSelectedRow):
(WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
Behavior for selecting a row and showing / hiding the detail view.
The detail view is positioned beside the Network Table's "name" column
and resizes when that column resizes.

* UserInterface/Views/Resizer.css:
(.resizer):
* UserInterface/Views/Table.css:
(.table > .resizers):
* UserInterface/Views/Table.js:
(WI.Table):
(WI.Table.prototype.get scrollContainer):
(WI.Table.prototype._positionResizerElements):
To let clients customize the table a bit, put resizers into their own
container and expose the scroll container.

* UserInterface/Views/Variables.css:
(:root):
Add a new button hover color, slightly lighter than the existing button active color.

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

2 years agoFix typo.
antti@apple.com [Wed, 4 Oct 2017 18:59:04 +0000 (18:59 +0000)]
Fix typo.

Unreviewed.

* rendering/RenderView.cpp:
(WebCore::RenderView::willBeDestroyed):

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

2 years ago3 poly-proto JSC tests timing out on debug after r222827
sbarati@apple.com [Wed, 4 Oct 2017 18:56:32 +0000 (18:56 +0000)]
3 poly-proto JSC tests timing out on debug after r222827
https://bugs.webkit.org/show_bug.cgi?id=177880

Rubber stamped by Mark Lam.

* microbenchmarks/poly-proto-access.js:
* typeProfiler/deltablue-for-of.js:
* typeProfiler/getter-richards.js:

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

2 years agoWeb Inspector: Fix Beacon and Ping folderization issues
joepeck@webkit.org [Wed, 4 Oct 2017 18:55:19 +0000 (18:55 +0000)]
Web Inspector: Fix Beacon and Ping folderization issues
https://bugs.webkit.org/show_bug.cgi?id=177885

Reviewed by Matt Baker.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.shortDisplayNameForResourceType):
Use common capitalized UIString "Ping". It gets lowercased later.

* UserInterface/Models/ResourceCollection.js:
Add missing verifier.

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

2 years agoTeach TextDecorationPainter about pseudo styles
dbates@webkit.org [Wed, 4 Oct 2017 18:55:14 +0000 (18:55 +0000)]
Teach TextDecorationPainter about pseudo styles
https://bugs.webkit.org/show_bug.cgi?id=177882

Reviewed by Simon Fraser.

As a step towards implementing support for CSS pseudo elements ::spelling-error and ::grammar-error
(https://bugs.webkit.org/show_bug.cgi?id=175784) teach TextDecorationPainter about pseudo styles.

* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::TextDecorationPainter): Modified to take an optional
pseudo style (defaults to NOPSEUDO - no pseudo style).
(WebCore::collectStylesForRenderer): Modified to take a pseudo style. Note that getCachedPseudoStyle()
is only defined on RenderText and RenderElement objects (i.e. it is not a virtual function on RenderObject).
So, we must explicitly type check the renderer and cast appropriately before calling it. We may want
to consider making it virtual in the future if we find there are more call sites that would benefit
from polymorphism.
(WebCore::TextDecorationPainter::stylesForRenderer): Modified to take an optional
pseudo style (defaults to NOPSEUDO - no pseudo style).
* rendering/TextDecorationPainter.h:

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

2 years agoAdd assert verifying all renderers get destroyed
antti@apple.com [Wed, 4 Oct 2017 18:52:08 +0000 (18:52 +0000)]
Add assert verifying all renderers get destroyed
https://bugs.webkit.org/show_bug.cgi?id=177870

Reviewed by Zalan Bujtas.

* rendering/RenderView.cpp:
(WebCore::RenderView::willBeDestroyed):

    Add assert to verify all renderers for this tree have been destroyed before the RenderView is.

* rendering/RenderView.h:

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

2 years agoTextDecorationPainter::m_wavyOffset should be a float
dbates@webkit.org [Wed, 4 Oct 2017 18:37:47 +0000 (18:37 +0000)]
TextDecorationPainter::m_wavyOffset should be a float
https://bugs.webkit.org/show_bug.cgi?id=177883

Reviewed by Simon Fraser.

In r194447 we extracted the text decoration painting code from InlineTextBox into
TextDecorationPainter and changed the data type of the wavy offset from float to int.
We use floating point numbers throughout the painting code and should store the wavy
offset as a float.

* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::TextDecorationPainter): Use C++ uniform initializer
syntax to initialize member fields.
(WebCore::TextDecorationPainter::paintTextDecoration): Change int to float.
* rendering/TextDecorationPainter.h: Remove unnecessary equal initializer for m_wavyOffset
as this class has exactly one constructor and it always initializes it.

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

2 years agoWeb Inspector: Remove unused `representedObject` parameter from GeneralTreeElementPat...
mattbaker@apple.com [Wed, 4 Oct 2017 18:32:28 +0000 (18:32 +0000)]
Web Inspector: Remove unused `representedObject` parameter from GeneralTreeElementPathComponent constructor
https://bugs.webkit.org/show_bug.cgi?id=177561

Reviewed by Joseph Pecoraro.

* UserInterface/Views/GeneralTreeElementPathComponent.js:
(WI.GeneralTreeElementPathComponent):
(WI.GeneralTreeElementPathComponent.prototype.get generalTreeElement):
(WI.GeneralTreeElementPathComponent.prototype.get previousSibling):
(WI.GeneralTreeElementPathComponent.prototype.get nextSibling):

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

2 years agoWeb Inspector: After enabling the new Network Tab in experimental settings, the netwo...
commit-queue@webkit.org [Wed, 4 Oct 2017 18:30:38 +0000 (18:30 +0000)]
Web Inspector: After enabling the new Network Tab in experimental settings, the network tab disappears
https://bugs.webkit.org/show_bug.cgi?id=177774
<rdar://problem/34771647>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-10-04
Reviewed by Devin Rousso.

* UserInterface/Views/SettingsTabContentView.js:
When enabling the new network tab, ensure it gets added to the list of open tabs.
Place it where the old network tab was so the UI is as consistent as possible.

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

2 years agoUnreviewed, marking tco-catch.js as a failure after test262 update
joepeck@webkit.org [Wed, 4 Oct 2017 17:57:22 +0000 (17:57 +0000)]
Unreviewed, marking tco-catch.js as a failure after test262 update
https://bugs.webkit.org/show_bug.cgi?id=177859

* test262.yaml:

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

2 years agoRemove OpenWebRTC backend
commit-queue@webkit.org [Wed, 4 Oct 2017 17:50:07 +0000 (17:50 +0000)]
Remove OpenWebRTC backend
https://bugs.webkit.org/show_bug.cgi?id=177868

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-04
Reviewed by Alejandro G. Castro.

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/MediaEndpointPeerConnection.cpp: Removed.
* Modules/mediastream/MediaEndpointPeerConnection.h: Removed.
* Modules/mediastream/MediaEndpointSessionDescription.cpp: Removed.
* Modules/mediastream/MediaEndpointSessionDescription.h: Removed.
* Modules/mediastream/SDPProcessor.cpp: Removed.
* Modules/mediastream/SDPProcessor.h: Removed.
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
* WebCore.xcodeproj/project.pbxproj:
* platform/GStreamer.cmake:
* platform/graphics/MediaPlayer.cpp:
(WebCore::buildMediaEnginesVector):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::supportsType):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp: Removed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h: Removed.
* platform/mediastream/MediaEndpoint.cpp: Removed.
* platform/mediastream/MediaEndpoint.h: Removed.
* platform/mediastream/MediaEndpointSessionConfiguration.h: Removed.
* platform/mediastream/SDPProcessorScriptResource.cpp: Removed.
* platform/mediastream/SDPProcessorScriptResource.h: Removed.
* platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: Removed.
* platform/mediastream/openwebrtc/MediaEndpointOwr.h: Removed.
* platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Removed.
* platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Removed.
* platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Removed.
* platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Removed.
* platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Removed.
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Removed.
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Removed.
* platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Removed.
* platform/mock/MockMediaEndpoint.cpp: Removed.
* platform/mock/MockMediaEndpoint.h: Removed.
* platform/mock/MockRealtimeMediaSource.cpp:
(WebCore::MockRealtimeMediaSource::MockRealtimeMediaSource):
* platform/mock/MockRealtimeMediaSource.h:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::enableMockMediaEndpoint): Deleted.
* testing/Internals.h:

LayoutTests:

* platform/gtk/TestExpectations:

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

2 years agoRemove RenderTreeInternalMutationScope
zalan@apple.com [Wed, 4 Oct 2017 17:48:39 +0000 (17:48 +0000)]
Remove RenderTreeInternalMutationScope
https://bugs.webkit.org/show_bug.cgi?id=177875
<rdar://problem/34813088>

Reviewed by Antti Koivisto.

RenderTree mutation is in the past now. -and we've got assertions in place.

Not testable.

* page/FrameView.cpp:
(WebCore::FrameView::layout):
* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::populate):
(WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::updateTextRenderer):
(WebCore::RenderQuote::updateRenderer):
* rendering/RenderView.h:
(WebCore::RenderTreeInternalMutationScope::RenderTreeInternalMutationScope): Deleted.
(WebCore::RenderTreeInternalMutationScope::~RenderTreeInternalMutationScope): Deleted.

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

2 years agowebkitpy.tool.steps.steps_unittest.StepsTest.test_runtests_api is flakey
jbedard@apple.com [Wed, 4 Oct 2017 17:34:45 +0000 (17:34 +0000)]
webkitpy.tool.steps.steps_unittest.StepsTest.test_runtests_api is flakey
https://bugs.webkit.org/show_bug.cgi?id=177751
<rdar://problem/34769470>

Reviewed by Daniel Bates.

Port._build_path() calls Tools/Scripts/webkit-build-directory and caches this
result. When capturing output from the MockExecutive, the first invocation of
Port._build_path() will log the running of Tools/Scripts/webkit-build-directory
but subsequent invocations will not.

* Scripts/webkitpy/tool/steps/steps_unittest.py:
(StepsTest):
(StepsTest.setUp): Cache the build path before running tests.

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

2 years ago[GTK] WebKit2GTK+ does not handle touchmove and touchend events correctly
aperez@igalia.com [Wed, 4 Oct 2017 17:33:27 +0000 (17:33 +0000)]
[GTK] WebKit2GTK+ does not handle touchmove and touchend events correctly
https://bugs.webkit.org/show_bug.cgi?id=158531

Reviewed by Carlos Alberto Lopez Perez.

Do not bypass WebCore event handling when receiving touch events.

Based on a patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>.
Thanks to Carlos Garnacho <carlosg@gnome.org> for helping out reviewing the code.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent): Make sure touchend reaches gesture controller if touchbegin evet got to it.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseTouchEvent): Do not invoke gesture controller directly by bypassing WebCore event handling.
* UIProcess/gtk/GestureController.cpp:
(WebKit::GestureController::reset): Added.
(WebKit::GestureController::handleEvent): Reset gesture controller when touchpadupdate/end is received without touchbegin.
(WebKit::GestureController::Gesture::reset): Added.
* UIProcess/gtk/GestureController.h:

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

2 years agoUnreviewed GTK+ gardening. Remove tests from expectations passing since freetype...
carlosgc@webkit.org [Wed, 4 Oct 2017 17:14:24 +0000 (17:14 +0000)]
Unreviewed GTK+ gardening. Remove tests from expectations passing since freetype upgrade in r221670.

* platform/gtk/TestExpectations:

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

2 years agoUnreviewed, marking one async iterator test262 test failed
utatane.tea@gmail.com [Wed, 4 Oct 2017 17:04:26 +0000 (17:04 +0000)]
Unreviewed, marking one async iterator test262 test failed
https://bugs.webkit.org/show_bug.cgi?id=177859

* test262.yaml:

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

2 years agoRebaseline fast/xmlhttprequest/set-dangerous-headers.html and http/tests/xmlhttpreque...
ryanhaddad@apple.com [Wed, 4 Oct 2017 16:56:28 +0000 (16:56 +0000)]
Rebaseline fast/xmlhttprequest/set-dangerous-headers.html and http/tests/xmlhttprequest/set-dangerous-headers.html
https://bugs.webkit.org/show_bug.cgi?id=177829

Unreviewed test gardening.

* fast/xmlhttprequest/set-dangerous-headers-expected.txt:
* http/tests/xmlhttprequest/set-dangerous-headers-expected.txt:

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

2 years ago[JHBuild][GTK][WKE] Circular dependency between harfbuzz and freetype6
clopez@igalia.com [Wed, 4 Oct 2017 16:54:16 +0000 (16:54 +0000)]
[JHBuild][GTK][WKE] Circular dependency between harfbuzz and freetype6
https://bugs.webkit.org/show_bug.cgi?id=177865

Reviewed by Michael Catanzaro.

Build freetype6 without harfbuzz support.
This seems to be what distros like Fedora, Debian or OpenEmbedded do.
Also explicitly enable support for freetype and fontconfig on harfbuzz.

* gtk/jhbuild.modules: Enable also support for icu.
* wpe/jhbuild.modules:

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

2 years agoUnreviewed: fix GTK debug build after r222841.
magomez@igalia.com [Wed, 4 Oct 2017 15:18:00 +0000 (15:18 +0000)]
Unreviewed: fix GTK debug build after r222841.

* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::initFrameBuffer):

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

2 years agoUnreviewed WPE gardening.
zandobersek@gmail.com [Wed, 4 Oct 2017 15:10:00 +0000 (15:10 +0000)]
Unreviewed WPE gardening.

* platform/wpe/TestExpectations: Unskip tests under http/wpt/. Manage
expectations for failures that are currently present.

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

2 years ago[Test262] Update Test262 to Oct 4 version
utatane.tea@gmail.com [Wed, 4 Oct 2017 14:42:03 +0000 (14:42 +0000)]
[Test262] Update Test262 to Oct 4 version
https://bugs.webkit.org/show_bug.cgi?id=177859

Reviewed by Sam Weinig.

JSTests:

Let's rebaseline test262. Since it includes the latest changes to ArrayIterator::next,
we no longer need to mark it skip/fail. Also this update includes bunch of BigInt tests.

* test262.yaml:
* test262/harness/promiseHelper.js: Renamed from JSTests/test262/harness/PromiseHelper.js.
(checkSequence):
* test262/harness/typeCoercion.js:
(testCoercibleToIndexZero):
(testCoercibleToIndexOne):
(testCoercibleToIndexFromIndex):
(testNotCoercibleToIndex.testPrimitiveValue):
(testNotCoercibleToInteger):
(testCoercibleToBigIntZero.testPrimitiveValue):
(testCoercibleToBigIntZero):
(testCoercibleToBigIntOne.testPrimitiveValue):
(testCoercibleToBigIntOne):
(testPrimitiveValue):
(testCoercibleToBigIntFromBigInt):
(testNotCoercibleToBigInt.testPrimitiveValue):
(testNotCoercibleToBigInt.testStringValue):
(testNotCoercibleToBigInt):
* test262/test/built-ins/Array/from/proto-from-ctor-realm.js:
* test262/test/built-ins/Array/length/define-own-prop-length-overflow-realm.js:
* test262/test/built-ins/Array/of/proto-from-ctor-realm.js:
* test262/test/built-ins/Array/proto-from-ctor-realm.js:
* test262/test/built-ins/Array/prototype/concat/create-proto-from-ctor-realm-array.js:
* test262/test/built-ins/Array/prototype/concat/create-proto-from-ctor-realm-non-array.js:
* test262/test/built-ins/Array/prototype/filter/create-proto-from-ctor-realm-array.js:
* test262/test/built-ins/Array/prototype/filter/create-proto-from-ctor-realm-non-array.js:
* test262/test/built-ins/Array/prototype/map/create-proto-from-ctor-realm-array.js:
* test262/test/built-ins/Array/prototype/map/create-proto-from-ctor-realm-non-array.js:
* test262/test/built-ins/Array/prototype/slice/create-proto-from-ctor-realm-array.js:
* test262/test/built-ins/Array/prototype/slice/create-proto-from-ctor-realm-non-array.js:
* test262/test/built-ins/Array/prototype/splice/create-proto-from-ctor-realm-array.js:
* test262/test/built-ins/Array/prototype/splice/create-proto-from-ctor-realm-non-array.js:
* test262/test/built-ins/ArrayBuffer/proto-from-ctor-realm.js:
* test262/test/built-ins/BigInt/asIntN/bigint-tobigint.js:
(testCoercibleToBigIntZero):
(testCoercibleToBigIntOne):
(testNotCoercibleToBigInt):
(MyError): Deleted.
(valueOf): Deleted.
(toString): Deleted.
(Symbol.toPrimitive): Deleted.
* test262/test/built-ins/BigInt/asIntN/bits-toindex.js:
(testCoercibleToIndexZero):
(testCoercibleToIndexOne):
(testNotCoercibleToIndex):
(MyError): Deleted.
(assert.sameValue.BigInt.asIntN.valueOf): Deleted.
(assert.sameValue.BigInt.asIntN.toString): Deleted.
(BigInt.asIntN.Symbol.toPrimitive): Deleted.
(BigInt.asIntN.valueOf): Deleted.
(BigInt.asIntN.toString): Deleted.
* test262/test/built-ins/BigInt/asUintN/arithmetic.js: Added.
* test262/test/built-ins/BigInt/asUintN/asUintN.js: Added.
* test262/test/built-ins/BigInt/asUintN/bigint-tobigint.js: Added.
(testCoercibleToBigIntZero):
(testCoercibleToBigIntOne):
(testNotCoercibleToBigInt):
* test262/test/built-ins/BigInt/asUintN/bits-toindex.js: Added.
(testCoercibleToIndexZero):
(testCoercibleToIndexOne):
(testNotCoercibleToIndex):
* test262/test/built-ins/BigInt/asUintN/length.js: Added.
* test262/test/built-ins/BigInt/asUintN/name.js: Added.
* test262/test/built-ins/BigInt/asUintN/order-of-steps.js: Added.
(bits.valueOf):
(bigint.valueOf):
* test262/test/built-ins/BigInt/prototype/valueOf/length.js: Added.
* test262/test/built-ins/BigInt/prototype/valueOf/name.js: Added.
* test262/test/built-ins/BigInt/prototype/valueOf/prop-desc.js: Added.
* test262/test/built-ins/BigInt/prototype/valueOf/return.js: Added.
* test262/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-object-throws.js: Added.
* test262/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-primitive-throws.js: Added.
* test262/test/built-ins/Boolean/proto-from-ctor-realm.js:
* test262/test/built-ins/DataView/proto-from-ctor-realm-sab.js:
* test262/test/built-ins/DataView/proto-from-ctor-realm.js:
* test262/test/built-ins/Date/proto-from-ctor-realm-one.js:
* test262/test/built-ins/Date/proto-from-ctor-realm-two.js:
* test262/test/built-ins/Date/proto-from-ctor-realm-zero.js:
* test262/test/built-ins/Error/proto-from-ctor-realm.js:
* test262/test/built-ins/Function/call-bind-this-realm-undef.js:
* test262/test/built-ins/Function/call-bind-this-realm-value.js:
* test262/test/built-ins/Function/internals/Call/class-ctor-realm.js:
* test262/test/built-ins/Function/internals/Construct/base-ctor-revoked-proxy-realm.js:
* test262/test/built-ins/Function/internals/Construct/derived-return-val-realm.js:
* test262/test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js:
* test262/test/built-ins/Function/proto-from-ctor-realm.js:
* test262/test/built-ins/Function/prototype/bind/get-fn-realm.js:
* test262/test/built-ins/Function/prototype/bind/proto-from-ctor-realm.js:
* test262/test/built-ins/GeneratorFunction/proto-from-ctor-realm.js:
* test262/test/built-ins/JSON/stringify/bigint-order.js: Added.
(replacer):
(BigInt.prototype.toJSON):
* test262/test/built-ins/JSON/stringify/bigint-replacer.js: Added.
(replacer):
* test262/test/built-ins/JSON/stringify/bigint-tojson.js: Added.
(BigInt.prototype.toJSON):
* test262/test/built-ins/JSON/stringify/bigint.js:
* test262/test/built-ins/Map/proto-from-ctor-realm.js:
* test262/test/built-ins/Number/S9.3.1_A2_U180E.js:
* test262/test/built-ins/Number/S9.3.1_A3_T1_U180E.js:
* test262/test/built-ins/Number/S9.3.1_A3_T2_U180E.js:
* test262/test/built-ins/Number/proto-from-ctor-realm.js:
* test262/test/built-ins/Object/proto-from-ctor.js:
* test262/test/built-ins/Promise/proto-from-ctor-realm.js:
* test262/test/built-ins/Proxy/apply/arguments-realm.js:
* test262/test/built-ins/Proxy/apply/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/construct/arguments-realm.js:
* test262/test/built-ins/Proxy/construct/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/construct/trap-is-undefined-proto-from-ctor-realm.js:
* test262/test/built-ins/Proxy/defineProperty/desc-realm.js:
* test262/test/built-ins/Proxy/defineProperty/null-handler-realm.js:
* test262/test/built-ins/Proxy/defineProperty/targetdesc-configurable-desc-not-configurable-realm.js:
* test262/test/built-ins/Proxy/defineProperty/targetdesc-not-compatible-descriptor-not-configurable-target-realm.js:
* test262/test/built-ins/Proxy/defineProperty/targetdesc-not-compatible-descriptor-realm.js:
* test262/test/built-ins/Proxy/defineProperty/targetdesc-undefined-not-configurable-descriptor-realm.js:
* test262/test/built-ins/Proxy/defineProperty/targetdesc-undefined-target-is-not-extensible-realm.js:
* test262/test/built-ins/Proxy/defineProperty/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/deleteProperty/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/get-fn-realm.js:
* test262/test/built-ins/Proxy/get/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/getOwnPropertyDescriptor/result-type-is-not-object-nor-undefined-realm.js:
* test262/test/built-ins/Proxy/getOwnPropertyDescriptor/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/getPrototypeOf/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/has/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/isExtensible/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/ownKeys/return-not-list-object-throws-realm.js:
* test262/test/built-ins/Proxy/ownKeys/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/preventExtensions/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/set/trap-is-not-callable-realm.js:
* test262/test/built-ins/Proxy/setPrototypeOf/trap-is-not-callable-realm.js:
* test262/test/built-ins/RegExp/S15.10.2.12_A1_T1.js:
(i6.replace):
(i6b.replace):
* test262/test/built-ins/RegExp/dotall/with-dotall-unicode.js:
* test262/test/built-ins/RegExp/dotall/with-dotall.js:
* test262/test/built-ins/RegExp/dotall/without-dotall-unicode.js:
* test262/test/built-ins/RegExp/dotall/without-dotall.js:
* test262/test/built-ins/RegExp/proto-from-ctor-realm.js:
* test262/test/built-ins/RegExp/prototype/Symbol.split/splitter-proto-from-ctor-realm.js:
* test262/test/built-ins/RegExp/u180e.js: Added.
* test262/test/built-ins/Set/proto-from-ctor-realm.js:
* test262/test/built-ins/SharedArrayBuffer/proto-from-ctor-realm.js:
* test262/test/built-ins/String/proto-from-ctor-realm.js:
* test262/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail.js:
* test262/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail_2.js:
* test262/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success.js:
* test262/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_2.js:
* test262/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_3.js:
* test262/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_4.js:
* test262/test/built-ins/String/prototype/endsWith/coerced-values-of-position.js:
* test262/test/built-ins/String/prototype/endsWith/endsWith.js:
* test262/test/built-ins/String/prototype/endsWith/length.js:
* test262/test/built-ins/String/prototype/endsWith/name.js:
* test262/test/built-ins/String/prototype/endsWith/return-abrupt-from-position-as-symbol.js:
* test262/test/built-ins/String/prototype/endsWith/return-abrupt-from-position.js:
* test262/test/built-ins/String/prototype/endsWith/return-abrupt-from-searchstring-as-symbol.js:
* test262/test/built-ins/String/prototype/endsWith/return-abrupt-from-searchstring-regexp-test.js:
* test262/test/built-ins/String/prototype/endsWith/return-abrupt-from-searchstring.js:
* test262/test/built-ins/String/prototype/endsWith/return-abrupt-from-this-as-symbol.js:
* test262/test/built-ins/String/prototype/endsWith/return-abrupt-from-this.js:
* test262/test/built-ins/String/prototype/endsWith/return-false-if-search-start-is-less-than-zero.js:
* test262/test/built-ins/String/prototype/endsWith/return-true-if-searchstring-is-empty.js:
* test262/test/built-ins/String/prototype/endsWith/searchstring-found-with-position.js:
* test262/test/built-ins/String/prototype/endsWith/searchstring-found-without-position.js:
* test262/test/built-ins/String/prototype/endsWith/searchstring-is-regexp-throws.js:
* test262/test/built-ins/String/prototype/endsWith/searchstring-not-found-with-position.js:
* test262/test/built-ins/String/prototype/endsWith/searchstring-not-found-without-position.js:
* test262/test/built-ins/String/prototype/endsWith/this-is-null-throws.js:
* test262/test/built-ins/String/prototype/endsWith/this-is-undefined-throws.js:
* test262/test/built-ins/String/prototype/includes/String.prototype.includes_FailBadLocation.js:
* test262/test/built-ins/String/prototype/includes/String.prototype.includes_FailLocation.js:
* test262/test/built-ins/String/prototype/includes/String.prototype.includes_FailMissingLetter.js:
* test262/test/built-ins/String/prototype/includes/String.prototype.includes_Success.js:
* test262/test/built-ins/String/prototype/includes/String.prototype.includes_SuccessNoLocation.js:
* test262/test/built-ins/String/prototype/includes/String.prototype.includes_lengthProp.js:
* test262/test/built-ins/String/prototype/includes/coerced-values-of-position.js:
* test262/test/built-ins/String/prototype/includes/includes.js:
* test262/test/built-ins/String/prototype/includes/length.js:
* test262/test/built-ins/String/prototype/includes/name.js:
* test262/test/built-ins/String/prototype/includes/return-abrupt-from-position-as-symbol.js:
* test262/test/built-ins/String/prototype/includes/return-abrupt-from-position.js:
* test262/test/built-ins/String/prototype/includes/return-abrupt-from-searchstring-as-symbol.js:
* test262/test/built-ins/String/prototype/includes/return-abrupt-from-searchstring-regexp-test.js:
* test262/test/built-ins/String/prototype/includes/return-abrupt-from-searchstring.js:
* test262/test/built-ins/String/prototype/includes/return-abrupt-from-this-as-symbol.js:
* test262/test/built-ins/String/prototype/includes/return-abrupt-from-this.js:
* test262/test/built-ins/String/prototype/includes/return-false-with-out-of-bounds-position.js:
* test262/test/built-ins/String/prototype/includes/return-true-if-searchstring-is-empty.js:
* test262/test/built-ins/String/prototype/includes/searchstring-found-with-position.js:
* test262/test/built-ins/String/prototype/includes/searchstring-found-without-position.js:
* test262/test/built-ins/String/prototype/includes/searchstring-is-regexp-throws.js:
* test262/test/built-ins/String/prototype/includes/searchstring-not-found-with-position.js:
* test262/test/built-ins/String/prototype/includes/searchstring-not-found-without-position.js:
* test262/test/built-ins/String/prototype/includes/this-is-null-throws.js:
* test262/test/built-ins/String/prototype/includes/this-is-undefined-throws.js:
* test262/test/built-ins/String/prototype/toLocaleLowerCase/Final_Sigma_U180E.js:
* test262/test/built-ins/String/prototype/toLowerCase/Final_Sigma_U180E.js:
* test262/test/built-ins/String/prototype/trim/u180e.js:
* test262/test/built-ins/Symbol/for/cross-realm.js:
* test262/test/built-ins/Symbol/hasInstance/cross-realm.js:
* test262/test/built-ins/Symbol/isConcatSpreadable/cross-realm.js:
* test262/test/built-ins/Symbol/iterator/cross-realm.js:
* test262/test/built-ins/Symbol/keyFor/cross-realm.js:
* test262/test/built-ins/Symbol/match/cross-realm.js:
* test262/test/built-ins/Symbol/replace/cross-realm.js:
* test262/test/built-ins/Symbol/search/cross-realm.js:
* test262/test/built-ins/Symbol/species/cross-realm.js:
* test262/test/built-ins/Symbol/split/cross-realm.js:
* test262/test/built-ins/Symbol/toPrimitive/cross-realm.js:
* test262/test/built-ins/Symbol/toStringTag/cross-realm.js:
* test262/test/built-ins/Symbol/unscopables/cross-realm.js:
* test262/test/built-ins/ThrowTypeError/distinct-cross-realm.js:
* test262/test/built-ins/TypedArrays/buffer-arg-proto-from-ctor-realm-sab.js:
* test262/test/built-ins/TypedArrays/buffer-arg-proto-from-ctor-realm.js:
* test262/test/built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer-realm.js:
* test262/test/built-ins/TypedArrays/internals/Get/detached-buffer-realm.js:
* test262/test/built-ins/TypedArrays/internals/GetOwnProperty/detached-buffer-realm.js:
* test262/test/built-ins/TypedArrays/internals/HasProperty/detached-buffer-realm.js:
* test262/test/built-ins/TypedArrays/internals/Set/detached-buffer-realm.js:
* test262/test/built-ins/TypedArrays/length-arg-proto-from-ctor-realm.js:
* test262/test/built-ins/TypedArrays/no-args-proto-from-ctor-realm.js:
* test262/test/built-ins/TypedArrays/object-arg-proto-from-ctor-realm.js:
* test262/test/built-ins/TypedArrays/typedarray-arg-other-ctor-buffer-ctor-custom-species-proto-from-ctor-realm.js:
* test262/test/built-ins/TypedArrays/typedarray-arg-proto-from-ctor-realm.js:
* test262/test/built-ins/TypedArrays/typedarray-arg-same-ctor-buffer-ctor-species-custom-proto-from-ctor-realm.js:
* test262/test/built-ins/WeakMap/proto-from-ctor-realm.js:
* test262/test/built-ins/WeakSet/proto-from-ctor-realm.js:
* test262/test/built-ins/parseFloat/S15.1.2.3_A2_T10_U180E.js:
* test262/test/built-ins/parseInt/S15.1.2.2_A2_T10_U180E.js:
* test262/test/intl402/NumberFormat/prototype/formatToParts/length.js:
* test262/test/language/comments/mongolian-vowel-separator-multi.js:
* test262/test/language/comments/mongolian-vowel-separator-single-eval.js:
* test262/test/language/comments/mongolian-vowel-separator-single.js:
* test262/test/language/eval-code/indirect/realm.js:
* test262/test/language/expressions/assignment/dstr-obj-rest-order.js: Added.
(o.get z):
(o.get a):
* test262/test/language/expressions/call/eval-realm-indirect.js:
* test262/test/language/expressions/generators/eval-body-proto-realm.js:
* test262/test/language/expressions/greater-than-or-equal/bigint-and-bigint.js: Added.
* test262/test/language/expressions/greater-than-or-equal/bigint-and-non-finite.js: Added.
* test262/test/language/expressions/greater-than-or-equal/bigint-and-number-extremes.js: Added.
* test262/test/language/expressions/greater-than-or-equal/bigint-and-number.js:
* test262/test/language/expressions/greater-than/bigint-and-bigint.js: Added.
* test262/test/language/expressions/greater-than/bigint-and-non-finite.js: Added.
* test262/test/language/expressions/greater-than/bigint-and-number-extremes.js: Added.
* test262/test/language/expressions/greater-than/bigint-and-number.js:
* test262/test/language/expressions/less-than-or-equal/bigint-and-bigint.js: Added.
* test262/test/language/expressions/less-than-or-equal/bigint-and-non-finite.js: Added.
* test262/test/language/expressions/less-than-or-equal/bigint-and-number-extremes.js: Added.
* test262/test/language/expressions/less-than-or-equal/bigint-and-number.js:
* test262/test/language/expressions/less-than/bigint-and-bigint.js: Added.
* test262/test/language/expressions/less-than/bigint-and-non-finite.js: Added.
* test262/test/language/expressions/less-than/bigint-and-number-extremes.js: Added.
* test262/test/language/expressions/less-than/bigint-and-number.js:
* test262/test/language/expressions/new/non-ctor-err-realm.js:
* test262/test/language/expressions/super/realm.js:
* test262/test/language/expressions/tagged-template/cache-realm.js:
* test262/test/language/expressions/template-literal/mongolian-vowel-separator-eval.js:
* test262/test/language/expressions/template-literal/mongolian-vowel-separator.js:
* test262/test/language/literals/regexp/mongolian-vowel-separator-eval.js:
* test262/test/language/literals/regexp/mongolian-vowel-separator.js:
* test262/test/language/literals/string/mongolian-vowel-separator-eval.js:
* test262/test/language/literals/string/mongolian-vowel-separator.js:
* test262/test/language/statements/for-of/dstr-obj-rest-order.js: Added.
(o.get z):
(o.get a):
* test262/test/language/statements/for-of/iterator-next-reference.js:
(next):
(iterator.next): Deleted.
(x.of.iterable.): Deleted.
(x.of.iterable.get return): Deleted.
(x.of.iterable.iterator.next): Deleted.
* test262/test/language/types/reference/get-value-prop-base-primitive-realm.js:
* test262/test/language/types/reference/put-value-prop-base-primitive-realm.js:
* test262/test/language/white-space/mongolian-vowel-separator-eval.js:
* test262/test/language/white-space/mongolian-vowel-separator.js:
* test262/test262-Revision.txt:

Tools:

* Scripts/import-test262-tests:

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

2 years agoRenderFragmentContainerRange should not hold raw pointers.
zalan@apple.com [Wed, 4 Oct 2017 14:37:19 +0000 (14:37 +0000)]
RenderFragmentContainerRange should not hold raw pointers.
https://bugs.webkit.org/show_bug.cgi?id=177854
<rdar://problem/34805954>

Reviewed by Antti Koivisto.

m_startFragment and m_endFragment object's lifetimes are not tied to the lifetime of
RenderFragmentContainerRange.

Covered by existing tests.

* rendering/RenderFragmentedFlow.cpp:
(WebCore::RenderFragmentedFlow::setFragmentRangeForBox):
* rendering/RenderFragmentedFlow.h:

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

2 years agoUnreviewed WPE build fix after r222837
mcatanzaro@igalia.com [Wed, 4 Oct 2017 14:24:41 +0000 (14:24 +0000)]
Unreviewed WPE build fix after r222837
https://bugs.webkit.org/show_bug.cgi?id=177449

* Shared/wpe/WebEventFactory.cpp:
(WebKit::wallTimeForEventTime):

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

2 years agoRenderMultiColumnSpannerPlaceholder should not hold raw pointers.
zalan@apple.com [Wed, 4 Oct 2017 14:14:13 +0000 (14:14 +0000)]
RenderMultiColumnSpannerPlaceholder should not hold raw pointers.
https://bugs.webkit.org/show_bug.cgi?id=177840
<rdar://problem/34800109>

Reviewed by Sam Weinig.

Though we should always have a spanner as long as there's a RenderMultiColumnSpannerPlaceholder,
the spanner inject/removal logic is complicated enough to protect them with WeakPtr.

Covered by existing tests.

* rendering/RenderMultiColumnSpannerPlaceholder.cpp:
(WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
* rendering/RenderMultiColumnSpannerPlaceholder.h:

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

2 years ago[GTK] GtkUtilities.h should not be included in libs not linked to GTK
mcatanzaro@igalia.com [Wed, 4 Oct 2017 14:07:19 +0000 (14:07 +0000)]
[GTK] GtkUtilities.h should not be included in libs not linked to GTK
https://bugs.webkit.org/show_bug.cgi?id=177860

Reviewed by Carlos Garcia Campos.

* platform/FreeType.cmake:
* platform/gtk/GtkUtilities.cpp:
(WebCore::topLevelPath): Deleted.
(WebCore::webkitBuildDirectory): Deleted.
* platform/gtk/GtkUtilities.h:
(WebCore::wallTimeForEvent):
* platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::topLevelPath):
(WebCore::webkitBuildDirectory):

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

2 years ago[Harfbuzz] Implement ComplexTextController on top of HarfBuzz
carlosgc@webkit.org [Wed, 4 Oct 2017 13:51:19 +0000 (13:51 +0000)]
[Harfbuzz] Implement ComplexTextController on top of HarfBuzz
https://bugs.webkit.org/show_bug.cgi?id=167956

Source/WebCore:

Reviewed by Myles C. Maxfield.

Implement ComplexTextController using HarfBuzz and remove HarfBuzzShaper.

Covered by existing tests, a rebaseline will be neeed.

* platform/FreeType.cmake:
* platform/graphics/ComplexTextController.cpp:
(WebCore::TextLayoutDeleter::operator() const): Enable TextLayout when using HarfBuzz.
(WebCore::FontCascade::createLayout const): Ditto.
(WebCore::FontCascade::width): Ditto.
* platform/graphics/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::create): Add constructor that receives an hb_buffer_t.
* platform/graphics/Font.cpp:
(WebCore::Font::variantCapsSupportsCharacterForSynthesis const): Simple implementation for non-cocoa ports.
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::getGlyphsAndAdvancesForComplexText const): Moved from FontCascadeCocoa.mm.
(WebCore::FontCascade::floatWidthForComplexText const): Ditto.
(WebCore::FontCascade::adjustSelectionRectForComplexText const): Ditto.
(WebCore::FontCascade::offsetForPositionForComplexText const): Ditto.
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::FontCascade::fontForCombiningCharacterSequence const): Normalize the sequence and get the font of the
base character.
* platform/graphics/cocoa/FontCascadeCocoa.mm:
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::harfBuzzPositionToFloat):
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
(WebCore::fontFeatures):
(WebCore::characterScript):
(WebCore::scriptsAreCompatibleForCharacters):
(WebCore::findNextRun):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
(WebCore::harfBuzzGetGlyph): Check here if the character is a white space and use the space or zeroWidthSpace
to ensure we get a glyph.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Removed.
* platform/graphics/harfbuzz/HarfBuzzShaper.h: Removed.
* platform/graphics/harfbuzz/HbUniquePtr.h: Added.
(WebCore::HbPtrDeleter::operator() const):
(WebCore::HbPtrDeleter<hb_font_t>::operator() const):
(WebCore::HbPtrDeleter<hb_buffer_t>::operator() const):
* platform/graphics/opentype/OpenTypeMathData.h: Use HbUniquePtr.

LayoutTests:

Unreviewed GTK+ gardening. Rebaseline tests.

* platform/gtk/css1/font_properties/font-expected.png:
* platform/gtk/css1/font_properties/font-expected.txt:
* platform/gtk/css1/pseudo/firstline-expected.png:
* platform/gtk/css1/pseudo/firstline-expected.txt:
* platform/gtk/css1/pseudo/multiple_pseudo_elements-expected.png:
* platform/gtk/css1/pseudo/multiple_pseudo_elements-expected.txt:
* platform/gtk/css2.1/t051201-c23-first-line-00-b-expected.png:
* platform/gtk/css2.1/t051201-c23-first-line-00-b-expected.txt:
* platform/gtk/css2.1/t051202-c26-psudo-nest-00-c-expected.png:
* platform/gtk/css2.1/t051202-c26-psudo-nest-00-c-expected.txt:
* platform/gtk/css2.1/t0905-c5525-fltwidth-00-c-g-expected.png:
* platform/gtk/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-00-b-expected.png:
* platform/gtk/css2.1/t1508-c527-font-00-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-06-b-expected.png:
* platform/gtk/css2.1/t1508-c527-font-06-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-07-b-expected.png:
* platform/gtk/css2.1/t1508-c527-font-07-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-10-c-expected.png:
* platform/gtk/css2.1/t1508-c527-font-10-c-expected.txt:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.png:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.png:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.png:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.png:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt:
* platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.png:
* platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.txt:
* platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.png:
* platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.txt:
* platform/gtk/fast/text/atsui-negative-spacing-features-expected.png:
* platform/gtk/fast/text/atsui-negative-spacing-features-expected.txt:
* platform/gtk/fast/text/atsui-pointtooffset-calls-cg-expected.png:
* platform/gtk/fast/text/atsui-pointtooffset-calls-cg-expected.txt:
* platform/gtk/fast/text/atsui-rtl-override-selection-expected.png:
* platform/gtk/fast/text/atsui-rtl-override-selection-expected.txt:
* platform/gtk/fast/text/atsui-spacing-features-expected.png:
* platform/gtk/fast/text/atsui-spacing-features-expected.txt:
* platform/gtk/fast/text/emphasis-expected.png:
* platform/gtk/fast/text/emphasis-expected.txt:
* platform/gtk/fast/text/international/bold-bengali-expected.png:
* platform/gtk/fast/text/international/bold-bengali-expected.txt:
* platform/gtk/fast/text/international/hebrew-vowels-expected.png:
* platform/gtk/fast/text/international/hebrew-vowels-expected.txt:
* platform/gtk/fast/text/international/thai-baht-space-expected.png:
* platform/gtk/fast/text/international/thai-baht-space-expected.txt:
* platform/gtk/fast/text/international/thai-line-breaks-expected.png:
* platform/gtk/fast/text/international/thai-line-breaks-expected.txt:
* platform/gtk/fast/text/large-text-composed-char-dos-expected.txt: Added.
* platform/gtk/svg/W3C-I18N/g-dirLTR-ubNone-expected.png:
* platform/gtk/svg/W3C-I18N/g-dirLTR-ubNone-expected.txt:
* platform/gtk/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png:
* platform/gtk/svg/W3C-I18N/g-dirLTR-ubOverride-expected.txt:
* platform/gtk/svg/W3C-I18N/g-dirRTL-ubNone-expected.png:
* platform/gtk/svg/W3C-I18N/g-dirRTL-ubNone-expected.txt:
* platform/gtk/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png:
* platform/gtk/svg/W3C-I18N/g-dirRTL-ubOverride-expected.txt:
* platform/gtk/svg/W3C-I18N/text-dirLTR-ubNone-expected.png:
* platform/gtk/svg/W3C-I18N/text-dirLTR-ubNone-expected.txt:
* platform/gtk/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png:
* platform/gtk/svg/W3C-I18N/text-dirLTR-ubOverride-expected.txt:
* platform/gtk/svg/W3C-I18N/text-dirRTL-ubNone-expected.png:
* platform/gtk/svg/W3C-I18N/text-dirRTL-ubNone-expected.txt:
* platform/gtk/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png:
* platform/gtk/svg/W3C-I18N/text-dirRTL-ubOverride-expected.txt:
* platform/gtk/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.png:
* platform/gtk/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.txt:
* platform/gtk/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.png:
* platform/gtk/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.txt:
* platform/gtk/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.png:
* platform/gtk/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.txt:
* platform/gtk/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.png:
* platform/gtk/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.txt:
* platform/gtk/svg/W3C-I18N/tspan-direction-rtl-expected.png:
* platform/gtk/svg/W3C-I18N/tspan-direction-rtl-expected.txt:
* platform/gtk/svg/text/bidi-tspans-expected.png:
* platform/gtk/svg/text/bidi-tspans-expected.txt:
* platform/gtk/svg/text/select-textLength-spacing-squeeze-1-expected.png:
* platform/gtk/svg/text/select-textLength-spacing-squeeze-1-expected.txt:
* platform/gtk/svg/text/select-textLength-spacing-squeeze-2-expected.png:
* platform/gtk/svg/text/select-textLength-spacing-squeeze-2-expected.txt:
* platform/gtk/svg/text/select-textLength-spacing-stretch-2-expected.png:
* platform/gtk/svg/text/select-textLength-spacing-stretch-2-expected.txt:
* platform/gtk/svg/text/select-textLength-spacing-stretch-3-expected.png:
* platform/gtk/svg/text/select-textLength-spacing-stretch-3-expected.txt:

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

2 years agoUnreviewed, fix typo in function name scanDirectoryForDicionaries
mcatanzaro@igalia.com [Wed, 4 Oct 2017 12:48:52 +0000 (12:48 +0000)]
Unreviewed, fix typo in function name scanDirectoryForDicionaries
https://bugs.webkit.org/show_bug.cgi?id=177866

* platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::scanDirectoryForDictionaries):
(WebCore::scanTestDictionariesDirectoryIfNecessary):
(WebCore::availableLocales):
(WebCore::scanDirectoryForDicionaries): Deleted.

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