Timeline



Jan 20, 2018:

11:07 PM Changeset in webkit [227275] by beidson@apple.com
  • 10 edits in trunk/Source/WebCore

Make garbage collection of MessagePort objects be asynchronous.
https://bugs.webkit.org/show_bug.cgi?id=181910

Reviewed by Andy Estes.

No new tests (Covered by existing tests, including GC-specific ones).

The basic premise here is as follows:

  • You can *always* GC a MessagePort that is closed
  • You can *always* GC a MessagePort that has no onmessage handler, as incoming messages cannot possibly revive it.
  • You can GC a MessagePort, even if it has a message handler, as long as there are no messages in flight between it and the remote port, and as long as the remote port is "maybe eligible for GC."

A MessagePort is considered "maybe eligible for GC" once hasPendingActivity is asked once.

A MessagePort loses "maybe eligible for GC" status once it is used for sending or receiving a message.

The changes to MessagePort.cpp implement the above with a tiny little bool-driven state machine.

  • dom/MessagePort.cpp:

(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::disentangle):
(WebCore::MessagePort::registerLocalActivity):
(WebCore::MessagePort::start):
(WebCore::MessagePort::close):
(WebCore::MessagePort::contextDestroyed):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::hasPendingActivity const):
(WebCore::MessagePort::isLocallyReachable const):
(WebCore::MessagePort::addEventListener):
(WebCore::MessagePort::removeEventListener):

  • dom/MessagePort.h:
  • Remove the lock and any background-thread code paths
  • Add ASSERT(isMainThread())s throughout
  • dom/messageports/MessagePortChannel.cpp:

(WebCore::MessagePortChannel::MessagePortChannel):
(WebCore::MessagePortChannel::includesPort):
(WebCore::MessagePortChannel::entanglePortWithProcess):
(WebCore::MessagePortChannel::disentanglePort):
(WebCore::MessagePortChannel::closePort):
(WebCore::MessagePortChannel::postMessageToRemote):
(WebCore::MessagePortChannel::takeAllMessagesForPort):
(WebCore::MessagePortChannel::checkRemotePortForActivity):
(WebCore::MessagePortChannel::hasAnyMessagesPendingOrInFlight const):

  • dom/messageports/MessagePortChannel.h:

Add a callback for a MessagePortChannel to go ask the remote MessagePort object about local activity:

  • dom/messageports/MessagePortChannelProvider.h:
  • dom/messageports/MessagePortChannelProviderImpl.cpp:

(WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity):
(WebCore::MessagePortChannelProviderImpl::checkProcessLocalPortForActivity):
(WebCore::MessagePortChannelProviderImpl::hasMessagesForPorts_temporarySync): Deleted.

  • dom/messageports/MessagePortChannelProviderImpl.h:
  • Remove the lock and any background-thread code paths
  • Add ASSERT(isMainThread())s throughout
  • dom/messageports/MessagePortChannelRegistry.cpp:

(WebCore::MessagePortChannelRegistry::messagePortChannelCreated):
(WebCore::MessagePortChannelRegistry::messagePortChannelDestroyed):
(WebCore::MessagePortChannelRegistry::didEntangleLocalToRemote):
(WebCore::MessagePortChannelRegistry::didDisentangleMessagePort):
(WebCore::MessagePortChannelRegistry::didCloseMessagePort):
(WebCore::MessagePortChannelRegistry::didPostMessageToRemote):
(WebCore::MessagePortChannelRegistry::takeAllMessagesForPort):
(WebCore::MessagePortChannelRegistry::checkRemotePortForActivity):
(WebCore::MessagePortChannelRegistry::existingChannelContainingPort):
(WebCore::MessagePortChannelRegistry::hasMessagesForPorts_temporarySync): Deleted.

  • dom/messageports/MessagePortChannelRegistry.h:
8:29 PM Changeset in webkit [227274] by aestes@apple.com
  • 27 edits in trunk/Source

[Apple Pay] Stop eagerly loading PassKit.framework
https://bugs.webkit.org/show_bug.cgi?id=181911
<rdar://problem/36555369>

Reviewed by Tim Horton.

Source/WebCore:

r226458 and r226123 added code that caused PassKit.framework to be eagerly loaded when
initializing a WKWebView. This is costly and should only be done when Apple Pay is first used.

To avoid eagerly loading PassKit, this patch does two things:

  1. Instead of sending the available payment networks as part of WebPageCreationParameters,

PaymentCoordinator asks for them using a syncrhonous message the first time they are needed.

  1. Instead of setting the Apple Pay preference to false when PassKit can't be loaded,

the following API entry points check for a missing PassKit and return false, or throw
exceptions, or reject promises:

  • ApplePaySession.canMakePayments()
  • ApplePaySession.canMakePaymentsWithActiveCard()
  • ApplePaySession.openPaymentSetup()
  • ApplePaySession.begin()

No new tests for (1), which causes no change in behavior. (2) was manually verified by
locally moving aside PassKit.framework, but that's not possible to do in an automated test.

  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::PaymentCoordinator):
(WebCore::PaymentCoordinator::validatedPaymentNetwork const):
(WebCore::toHashSet): Deleted.

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinatorClient.h:
  • loader/EmptyClients.cpp:
  • page/MainFrame.cpp:

(WebCore::MainFrame::MainFrame):

Removed PaymentCoordinator::m_availablePaymentNetworks and made
PaymentCoordinator::validatedPaymentNetwork() call
PaymentCoordinatorClient::validatedPaymentNetwork() instead.

  • page/PageConfiguration.h:

Removed availablePaymentNetworks from PageConfiguration.

  • testing/Internals.cpp:

(WebCore::Internals::Internals):

  • testing/MockPaymentCoordinator.cpp:

(WebCore::MockPaymentCoordinator::validatedPaymentNetwork):

  • testing/MockPaymentCoordinator.h:

Implemented PaymentCoordinatorClient::validatedPaymentNetwork().

Source/WebKit:

  • Shared/WebPageCreationParameters.cpp:

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

  • Shared/WebPageCreationParameters.h:

Removed availablePaymentNetworks from WebPageCreationParameters.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetApplePayEnabled):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

Stopped calling WebPaymentCoordinatorProxy::platformSupportsPayments().

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::availablePaymentNetworks):

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:

Added message AvailablePaymentNetworks, which synchronously returns a Vector of payment
networks.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments):

Returned false if PassKitLibrary() fails.

(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):

Called completionHandler with false if PassKitLibrary() fails.

(WebKit::WebPaymentCoordinatorProxy::platformAvailablePaymentNetworks):
(WebKit::WebPaymentCoordinatorProxy::availablePaymentNetworks):

Renamed availablePaymentNetworks to platformAvailablePaymentNetworks

(WebKit::WebPaymentCoordinatorProxy::platformSupportsPayments): Deleted.

  • UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:

(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):

Called completionHandler with false if PassKitLibrary() fails.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):

Stopped calling WebPaymentCoordinatorProxy::availablePaymentNetworks().

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::availablePaymentNetworks):
(WebKit::WebPaymentCoordinator::validatedPaymentNetwork):

  • WebProcess/ApplePay/WebPaymentCoordinator.h:

Implemented PaymentCoordinatorClient::validatedPaymentNetwork(). m_availablePaymentNetworks
starts off as std::nullopt, but is initialized by sending the AvailablePaymentNetworks sync
message the first time it's accessed.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):

Stopped setting PageConfiguration::availablePaymentNetworks.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::validatedPaymentNetwork):

Implemented PaymentCoordinatorClient::validatedPaymentNetwork().

12:02 PM Changeset in webkit [227273] by Chris Dumez
  • 2 edits in trunk/Tools

API test URLSchemeHandler.Leaks1 is timing out on iOS simulator debug
https://bugs.webkit.org/show_bug.cgi?id=174984
<rdar://problem/33665676>

Reviewed by Alexey Proskuryakov.

Disable URLSchemeHandler.Leaks1 API test on iOS as it sometimes times out.

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-leaks.mm:

(TEST):

8:55 AM Changeset in webkit [227272] by jer.noble@apple.com
  • 7 edits
    2 adds in trunk

Release ASSERT when reloading Vimeo page @ WebCore: WebCore::Document::updateLayout
https://bugs.webkit.org/show_bug.cgi?id=181840
<rdar://problem/36186214>

Reviewed by Simon Fraser.

Source/WebCore:

Test: media/video-fullscreen-reload-crash.html

Short circuit play() or pause() operations if the document is suspended or stopped.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):

Source/WebKit:

Updating layout while the document is suspended or stopped is unsafe.

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::inlineVideoFrame):

LayoutTests:

  • media/video-fullscreen-reload-crash-expected.txt: Added.
  • media/video-fullscreen-reload-crash.html: Added.
  • platform/ios/TestExpectations:
4:53 AM Changeset in webkit [227271] by Caio Lima
  • 5 edits
    6 adds in trunk

[JSC] NumberPrototype::extractRadixFromArgs incorrectly cast double to int32_t
https://bugs.webkit.org/show_bug.cgi?id=181182

Reviewed by Darin Adler.

JSTests:

  • stress/big-int-prototype-to-string-cast-overflow.js: Added.
  • stress/big-int-prototype-to-string-exception.js: Added.
  • stress/big-int-prototype-to-string-wrong-values.js: Added.
  • stress/number-prototype-to-string-cast-overflow.js: Added.
  • stress/number-prototype-to-string-exception.js: Added.
  • stress/number-prototype-to-string-wrong-values.js: Added.

Source/JavaScriptCore:

Casting double to integer is undefined behavior when the truncation
results into a value that doesn't fit into integer size,
according C++ spec[1]. Thus, we are changing bigIntProtoFuncToString and
numberProtoFuncToString to remove these source of undefined
behavior.

[1] - http://en.cppreference.com/w/cpp/language/implicit_conversion

  • runtime/BigIntPrototype.cpp:

(JSC::bigIntProtoFuncToString):

  • runtime/NumberPrototype.cpp:

(JSC::numberProtoFuncToString):
(JSC::extractToStringRadixArgument):
(JSC::extractRadixFromArgs): Deleted.

  • runtime/NumberPrototype.h:
2:45 AM Changeset in webkit [227270] by commit-queue@webkit.org
  • 14 edits in trunk

fetch redirect is incompatible with "no-cors" mode
https://bugs.webkit.org/show_bug.cgi?id=181866
<rdar://problem/35827140>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-20
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/redirect/redirect-mode-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-mode-worker-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-mode.js:

(redirectMode):

  • web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-event-redirect.https.html:
  • web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt:

Source/WebCore:

Covered by updated tests.

Return a network error when no-cors mode and redirect mode is manual or error.
Update preflight implementation to no longer use manual redirect mode to simulate https://fetch.spec.whatwg.org/#http-network-or-cache-fetch.
Instead implement redirectReceived callback to treat any redirect response as the preflight response.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::canRequest):

  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::redirectReceived):
(WebCore::CrossOriginPreflightChecker::startPreflight):

  • loader/CrossOriginPreflightChecker.h:

LayoutTests:

  • http/tests/fetch/redirectmode-and-preload-expected.txt:
  • http/tests/fetch/redirectmode-and-preload.html:
2:43 AM Changeset in webkit [227269] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

DOMCache data sometimes not properly removed when clearing data for a given origin
https://bugs.webkit.org/show_bug.cgi?id=181887
<rdar://problem/36671239>

Reviewed by Youenn Fablet.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::clearCachesForOrigin):
This code was iterating through folders on disk, then reading the folder's origin
from the origin file on disk. Then, if the origin would match the one we want to
delete, it would regenerate the folder path using cachesRootPath(*folderOrigin).
I don't know how but on my machine, I was ended up in a state where the path
generated by cachesRootPath(*folderOrigin) differed from the actual folder path
we read the origin from (Likely a different salt?). To make the code more robust,
I updated the code to delete "folderPath", which is the path we read the origin
from.

12:42 AM Changeset in webkit [227268] by BJ Burg
  • 2 edits in trunk/Tools

WebDriver: fix some nits that prevent running W3C tests on Mac
https://bugs.webkit.org/show_bug.cgi?id=181864

Reviewed by Carlos Garcia Campos.

  • Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:

(WebDriverW3CWebServer.init): _wsout needs to always be defined,
as we assume that the property exists later.

(WebDriverW3CWebServer.stop): If the temporary file doesn't
exist for some reason, the remove call will raise and exception.
Gracefully handle the case where the file isn't created due to
a problem/exception that happened elsewhere.

Jan 19, 2018:

11:45 PM Changeset in webkit [227267] by Carlos Garcia Campos
  • 2 edits in trunk/WebDriverTests

Unreviewed GTK+ gardening. Skip imported/w3c/webdriver/tests/sessions/new_session/response.py.

It's causing a crash in the driver process and affecting all other tests.

11:24 PM Changeset in webkit [227266] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[macOS] [WK2] Drag location is computed incorrectly when dragging content from subframes
https://bugs.webkit.org/show_bug.cgi?id=181896
<rdar://problem/35479043>

Reviewed by Tim Horton.

In r218837, I packaged most of the information needed to start a drag into DragItem, which is propagated to the client layer
via the startDrag codepath. However, this introduced a bug in computing the event position and drag location in window
coordinates. Consider the case where we're determining the drag image offset for a dragged element in a subframe:

Before the patch, the drag location (which starts out in the subframe's content coordinates) would be converted to root view
coordinates, which would then be converted to mainframe content coordinates, which would then be converted to window coordinates
using the mainframe's view. After the patch, we carry out the same math until the last step, where we erroneously use the
_subframe's_ view to convert to window coordinates from content coordinates. This results in the position of the iframe relative
to the mainframe being accounted for twice.

To fix this, we simply use the main frame's view to convert from mainframe content coordinates to window coordinates while
computing the drag location. As for the event position in window coordinates, this is currently unused by any codepath in WebKit,
so we can just remove it altogether.

Since this bug only affects drag and drop in the macOS WebKit2 port, there's currently no way to test this. I'll be using
<https://bugs.webkit.org/show_bug.cgi?id=181898> to track adding test support for drag and drop on macOS WebKit2. Manually tested
dragging in both WebKit1 and WebKit2 on macOS. dragLocationInWindowCoordinates isn't used at all for iOS drag and drop.

  • page/DragController.cpp:

(WebCore::DragController::doSystemDrag):

  • platform/DragItem.h:

(WebCore::DragItem::encode const):
(WebCore::DragItem::decode):

10:40 PM Changeset in webkit [227265] by commit-queue@webkit.org
  • 3 edits
    3 adds in trunk

Expose Safe Browsing SPI
https://bugs.webkit.org/show_bug.cgi?id=181804
<rdar://problem/36626946>

Patch by Zach Li <zacharyli323@gmail.com> on 2018-01-19
Reviewed by Dan Bernstein.

If client is using Apple internal SDK, then we can just import the header; if not,
then we declare necessary symbols that client will need.

  • Configurations/WebKit.xcconfig:

Only link against SafariSafeBrowsing framework on macOS High Sierra
and iOS 11 and above. Weak link against SafariSafeBrowsing framework
because it is not present on the Base system.

  • Platform/spi/Cocoa/SafeBrowsingSPI.h: Added.
  • WebKit.xcodeproj/project.pbxproj:

Added SafeBrowsingSPI.h.

  • WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/11/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd:

Added.

8:34 PM Changeset in webkit [227264] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181901

Unreviewed test gardening.

8:21 PM Changeset in webkit [227263] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-cache.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181900

Unreviewed test gardening.

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

Mark imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181897

Unreviewed test gardening.

7:55 PM Changeset in webkit [227261] by Ryan Haddad
  • 6 edits
    3 deletes in trunk

Unreviewed, rolling out r227235.

The test for this change consistently times out on High
Sierra.

Reverted changeset:

"Support for preconnect Link headers"
https://bugs.webkit.org/show_bug.cgi?id=181657
https://trac.webkit.org/changeset/227235

7:50 PM Changeset in webkit [227260] by Ryan Haddad
  • 4 edits
    2 adds in trunk/LayoutTests

[Sierra Debug WK2] ASSERTION FAILED: paymentCoordinator().supportsVersion(version)
https://bugs.webkit.org/show_bug.cgi?id=181833

Patch by Andy Estes <aestes@apple.com> on 2018-01-19
Reviewed by Youenn Fablet.

Moved the version 3 test into its own file that only runs on High Sierra and later.

  • http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https-expected.txt: Added.
  • http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html: Added.
  • platform/mac-wk2/TestExpectations:
6:29 PM Changeset in webkit [227259] by jmarcell@apple.com
  • 12 edits in branches/safari-605-branch/Source

Apply patch. rdar://problem/36654954

Update OS Version-based conditionals.
<rdar://problem/36654954>

Reviewed by Joseph Pecoraro.

Source/WebCore:

  • editing/cocoa/HTMLConverter.mm: (_WebMessageDocumentClass):
  • platform/graphics/cg/GraphicsContextCG.cpp:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:
  • platform/mac/EventLoopMac.mm: (WebCore::EventLoop::cycle):

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • Platform/IPC/mac/ConnectionMac.mm: (IPC::AccessibilityProcessSuspendedNotification):
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::shouldLeakBoost):
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
  • WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeProcess):

Source/WTF:

  • wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
  • wtf/spi/cocoa/NSMapTableSPI.h:
6:24 PM Changeset in webkit [227258] by lingcherd_ho@apple.com
  • 4 edits in trunk/Tools

Move Bingdings EWS and Webkitpy EWS queues to High Sierra on buildbot dashboard.
https://bugs.webkit.org/show_bug.cgi?id=181881

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:

(BubbleQueueServer):

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:

(table.queue-grid tr.platform.mac-os-x-elcapitan img.logo): Deleted.

5:58 PM Changeset in webkit [227257] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix, removed unused lambda capture.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):

5:57 PM Changeset in webkit [227256] by jmarcell@apple.com
  • 12 edits in tags/Safari-605.1.24.2/Source

Apply patch. rdar://problem/36654954

Update OS Version-based conditionals.
<rdar://problem/36654954>

Reviewed by Joseph Pecoraro.

Source/WebCore:

  • editing/cocoa/HTMLConverter.mm: (_WebMessageDocumentClass):
  • platform/graphics/cg/GraphicsContextCG.cpp:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:
  • platform/mac/EventLoopMac.mm: (WebCore::EventLoop::cycle):

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • Platform/IPC/mac/ConnectionMac.mm: (IPC::AccessibilityProcessSuspendedNotification):
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::shouldLeakBoost):
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
  • WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeProcess):

Source/WTF:

  • wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
  • wtf/spi/cocoa/NSMapTableSPI.h:
5:50 PM Changeset in webkit [227255] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/wpt/web-animations/timing-model/animation-effects/current-iteration.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181888

Unreviewed test gardening.

5:47 PM Changeset in webkit [227254] by jmarcell@apple.com
  • 7 edits in tags/Safari-605.1.24.2/Source

Versioning.

5:40 PM Changeset in webkit [227253] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.24.2

New tag.

5:13 PM Changeset in webkit [227252] by jmarcell@apple.com
  • 7 edits in tags/Safari-605.1.24.1/Source

Versioning.

4:58 PM Changeset in webkit [227251] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.24.1

New tag.

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

Update TestExpectations for webrtc/video-mute.html.
https://bugs.webkit.org/show_bug.cgi?id=177501

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:16 PM Changeset in webkit [227249] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-* tests as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181565

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:10 PM Changeset in webkit [227248] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit

Resource Load Statistics: Remove unused calls to WebResourceLoadStatisticsStore:logTestingEvent() to fix API test
https://bugs.webkit.org/show_bug.cgi?id=181890
<rdar://problem/36674772>

Unreviewed API test fix.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):

3:37 PM Changeset in webkit [227247] by Megan Gardner
  • 4 edits in branches/safari-605-branch/Source/WebKit

Present WKFileUploadPanel on correct ViewController
https://bugs.webkit.org/show_bug.cgi?id=181884
<rdar://problem/35114892>

Reviewed by Tim Horton and Joseph Pecoraro

We should not be getting the main view controller directly, as done in
ValidationBubbleIOS. This will keep us from presenting on view controllers are
in the midst of being dismissed, etc, causing us to get into states where we lose
the ability to present the WKFileUploadPanel.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView viewControllerForPresentingFileUploadPanel:]):

  • UIProcess/ios/forms/WKFileUploadPanel.h:
  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(fallbackViewController):
(-[WKFileUploadPanel _presentFullscreenViewController:animated:]):

3:35 PM Changeset in webkit [227246] by Ryan Haddad
  • 2 edits in trunk/JSTests

Disable Atomics when SharedArrayBuffer isn’t enabled
https://bugs.webkit.org/show_bug.cgi?id=181572

Unreviewed test gardening.

  • test262.yaml: Skip tests that fail after this change.
3:26 PM Changeset in webkit [227245] by commit-queue@webkit.org
  • 7 edits in trunk

Cache storage errors like Quota should trigger console messages
https://bugs.webkit.org/show_bug.cgi?id=181879
<rdar://problem/36669048>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-19
Reviewed by Chris Dumez.

Source/WebCore:

Covered by rebased test.

  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::retrieveRecords):
(WebCore::DOMCache::batchDeleteOperation):
(WebCore::DOMCache::batchPutOperation):

  • Modules/cache/DOMCacheEngine.cpp:

(WebCore::DOMCacheEngine::errorToException):
(WebCore::DOMCacheEngine::logErrorAndConvertToException):

  • Modules/cache/DOMCacheEngine.h:
  • Modules/cache/DOMCacheStorage.cpp:

(WebCore::DOMCacheStorage::retrieveCaches):
(WebCore::DOMCacheStorage::doOpen):
(WebCore::DOMCacheStorage::doRemove):

LayoutTests:

  • http/wpt/cache-storage/cache-quota.any-expected.txt:
3:18 PM Changeset in webkit [227244] by Ross Kirsling
  • 6 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Layers tab should do away with popovers (if possible)
https://bugs.webkit.org/show_bug.cgi?id=181805

Reviewed by Matt Baker.

  • Localizations/en.lproj/localizedStrings.js:

Remove superfluous colon from a string.

  • UserInterface/Main.html:
  • UserInterface/Views/LayerDetailsSidebarPanel.css:
  • UserInterface/Views/Layers3DContentView.css: Added.

Remove popover styling from sidebar, add new file with similar styling for canvas overlay.

  • UserInterface/Views/LayerDetailsSidebarPanel.js:

(WI.LayerDetailsSidebarPanel):
(WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
(WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
(WI.LayerDetailsSidebarPanel.prototype._updateLayers):
(WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
(WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._presentPopover): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._contentForPopover): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons.addReason): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons): Deleted.

  • UserInterface/Views/Layers3DContentView.js:

(WI.Layers3DContentView):
(WI.Layers3DContentView.prototype.shown):
(WI.Layers3DContentView.prototype.selectLayerById):
(WI.Layers3DContentView.prototype._canvasMouseDown):
(WI.Layers3DContentView.prototype._buildLayerInfoElement):
(WI.Layers3DContentView.prototype._updateLayerInfoElement):
(WI.Layers3DContentView.prototype._updateReasonsList):
Remove popover from sidebar table, overlay div with same data arrangement on top of the canvas.
Also reverse the fix from r226671 since the visualization is no longer unusable without the sidebar!

3:01 PM Changeset in webkit [227243] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
https://bugs.webkit.org/show_bug.cgi?id=181865
<rdar://problem/36664737>

Reviewed by Devin Rousso.

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView.prototype._recordingStarted):
(WI.CanvasContentView.prototype._recordingStopped):

2:58 PM Changeset in webkit [227242] by commit-queue@webkit.org
  • 18 edits
    1 add in trunk

Do not go to the storage process when registering a service worker client if there is no service worker registered
https://bugs.webkit.org/show_bug.cgi?id=181740
<rdar://problem/36650400>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-19
Reviewed by Chris Dumez.

Source/WebCore:

Register a document as service worker client only if there is an existing service worker connection.
This allows not creating any connection if no service worker is registered.

Add internals API to test whether a service worker connection was created or not.
This is used by API tests that cover the changes.

  • dom/Document.cpp:

(WebCore::Document::privateBrowsingStateDidChange): No need to create a service worker connection if client is not registered yet.
(WebCore::Document::setServiceWorkerConnection): No need to unregister/register if service worker connection is the same.
Similarly, if Document is to be destroyed or suspended, we should not register it.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::commitData):

  • testing/Internals.cpp:

(WebCore::Internals::hasServiceWorkerConnection):

  • testing/Internals.h:
  • testing/Internals.idl:
  • workers/service/ServiceWorkerProvider.cpp:

(WebCore::ServiceWorkerProvider::registerServiceWorkerClients):

  • workers/service/ServiceWorkerProvider.h:

Source/WebKit:

UIProcess notifies all web processes to register their service worker clients when spinning the service worker process.
Add private API to set the number of web processes for testing purposes.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _setMaximumNumberOfProcesses:]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::registerServiceWorkerClients):

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

Tools:

Add support for internals inside API tests.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/InjectInternals_Bundle.cpp: Added.

(TestWebKitAPI::InternalsInjectedBundleTest::InternalsInjectedBundleTest):
(TestWebKitAPI::InternalsInjectedBundleTest::initialize):
(TestWebKitAPI::InternalsInjectedBundleTest::didCreatePage):
(TestWebKitAPI::InternalsInjectedBundleTest::didClearWindowForFrame):

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

(setConfigurationInjectedBundlePath):
(-[RegularPageMessageHandler userContentController:didReceiveScriptMessage:]):

2:53 PM Changeset in webkit [227241] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.2.1/Source

Versioning.

2:48 PM Changeset in webkit [227240] by dino@apple.com
  • 14 edits
    1 copy in trunk

REGRESSION (r221092): Swipe actions are hard to perform in FastMail app
https://bugs.webkit.org/show_bug.cgi?id=181817
<rdar://problem/35274055>

Source/WebCore:

Add a setting for controlling whether touch listeners are passive
by default on document/window/body.

Updated existing test.

  • dom/EventTarget.cpp:

(WebCore::EventTarget::addEventListener):

  • page/Settings.yaml:

Source/WebKit:

Reviewed by Simon Fraser.

Add a linked-on-or-after check to set passive touch listeners on document in WebCore.

  • CMakeLists.txt:
  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.cpp: Copied from Source/WebKit/UIProcess/Cocoa/VersionChecks.h.

(defaultPassiveTouchListenersAsDefaultOnDocument):

  • Shared/WebPreferencesDefaultValues.h:
  • UIProcess/Cocoa/VersionChecks.h:
  • WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

Reviewed by Simon Fraser.

Add a linked-on-or-after check to set passive touch listeners on document in WebCore.

  • Misc/WebKitVersionChecks.h:
  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

LayoutTests:

Reviewed by Simon Fraser.

  • fast/events/touch/ios/passive-by-default-on-document-and-window-expected.txt:
2:43 PM Changeset in webkit [227239] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.2.1

New tag.

2:43 PM Changeset in webkit [227238] by dbates@webkit.org
  • 4 edits
    4 adds in trunk

Update frame-ancestor directive to match Content Security Policy Level 3
https://bugs.webkit.org/show_bug.cgi?id=178891
<rdar://problem/35209458>

Reviewed by Alex Christensen.

Derived from Blink e667cc2e501fabab3605b838e4ee0d642a9c4a59:
<https://chromium.googlesource.com/chromium/src.git/+/e667cc2e501fabab3605b838e4ee0d642a9c4a59>

Source/WebCore:

Update frame-ancestor directive to match against the origin of the ancestor document per the
Content Security Policy Level 3 spec.: <https://w3c.github.io/webappsec-csp/> (15 January 2018).
Specifically this change in behavior was made to CSP 3 in <https://github.com/w3c/webappsec/issues/311>.
In earlier versions of the spec, the frame-ancestor directive matched against the URL of the
ancestor document.

Disregarding allow-same-origin sandboxed iframes, a document with policy "frame-ancestor 'self'"
will be blocked from loading in a sandboxed iframe as a result of this change.

Tests: http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-allow-same-origin-sandboxed-cross-url-allow.html

http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-sandboxed-cross-url-block.html

  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::checkFrameAncestors):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-allow-same-origin-sandboxed-cross-url-allow-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-allow-same-origin-sandboxed-cross-url-allow.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-sandboxed-cross-url-block-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-sandboxed-cross-url-block.html: Added.
  • http/tests/security/contentSecurityPolicy/resources/frame-ancestors-test.js:

(injectNestedIframe):
(window.onload):
(testNestedIFrame):

2:33 PM Changeset in webkit [227237] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

[Curl] Add timeout support to XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=181876

Patch by Basuke Suzuki <Basuke Suzuki> on 2018-01-19
Reviewed by Alex Christensen

  • platform/network/ResourceRequestBase.cpp:
  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::setTimeout):

  • platform/network/curl/CurlContext.h:
  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didCompleteTransfer):

  • platform/network/curl/ResourceError.h:
  • platform/network/curl/ResourceErrorCurl.cpp:

(WebCore::ResourceError::httpError):

2:30 PM Changeset in webkit [227236] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Kill ArithNegate's ArithProfile assert inside BytecodeParser
https://bugs.webkit.org/show_bug.cgi?id=181877
<rdar://problem/36630552>

Reviewed by Mark Lam.

JSTests:

  • stress/arith-profile-for-negate-can-see-non-number-due-to-dfg-osr-exit-profiling.js: Added.

(runNearStackLimit):
(f1):
(f2):
(f3):
(i.catch):
(i.try.runNearStackLimit):
(catch):

Source/JavaScriptCore:

Before this patch, we used to assert that op_negate's result ArithProfile
only produces number. It's logically true that negate only produces a number.
However, the DFG may incorrectly pick this ArithProfile when doing OSR exit
profiling. So we'll end up profiling something that's likely the input to
negate. This patch removes the assert. We cede to the fact that Graph::methodOfGettingAValueProfileFor
is entirely heuristic based, potentially leading to profiling results being imprecise.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::makeSafe):

2:16 PM Changeset in webkit [227235] by yoav@yoav.ws
  • 6 edits
    4 adds in trunk

Support for preconnect Link headers
https://bugs.webkit.org/show_bug.cgi?id=181657

Reviewed by Darin Adler.

Source/WebCore:

Move the preconnect functionality into its own function, and
also call this function when Link headers are processed.

Test: http/tests/preconnect/link-header-rel-preconnect-http.php

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::loadLinksFromHeader): Call preconnectIfNeeded.
(WebCore::LinkLoader::preconnectIfNeeded): Preconnect to a host functionality moved here.
(WebCore::LinkLoader::loadLink): Call preconnectIfNeeded.

  • loader/LinkLoader.h:

LayoutTests:

Add test to see Link preconnect headers trigger a connection.

  • http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
  • http/tests/preconnect/link-header-rel-preconnect-http.html: Added.
  • http/tests/preconnect/resources/header-preconnect.php: Added.
  • platform/ios-simulator/TestExpectations: Skipped the test, as ios-simulator doesn't process Link headers for subresources.
  • platform/win/TestExpectations: Skipped the preconnect test directory, as it doesn't work on Windows.
2:12 PM Changeset in webkit [227234] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

Should allow updating a build-request to 'canceled'.
https://bugs.webkit.org/show_bug.cgi?id=181819

Reviewed by Ryosuke Niwa.

It's possible syncing script update a build-request to 'canceled' state.

  • public/api/build-requests.php: Added 'canceled' as an acceptable update state.
  • server-tests/api-build-requests-tests.js: Added a unit test to update a build-request to 'canceled'.
1:48 PM Changeset in webkit [227233] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

oss-fuzz jsc build is broken: StringImpl.h:27:10: fatal error: 'unicode/ustring.h' file not found
<https://webkit.org/b/181871>

Rubber-stamped by JF Bastien.

  • CMakeLists.txt: Add ICU header search path to

LLIntOffsetsExtractor target by reusing
JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES.

1:36 PM Changeset in webkit [227232] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Redesign: tabbing on commented out property throws exception
https://bugs.webkit.org/show_bug.cgi?id=180676
<rdar://problem/35981058>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
Tabbing from the selector field should focus on the first editable property.
When no editable properties are present, a new blank property should be added after the commented out ones.

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
Shift-tabbing from the selector field should focus on the last editable property of the previous CSS rule.
When no editable properties are present, a new blank property should be added after the commented out ones.

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
When navigating between properties skip the commented out ones.

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyAfter):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyBefore):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.get enabled):
(WI.SpreadsheetStyleProperty.prototype._update):

1:22 PM Changeset in webkit [227231] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[Cocoa] _WKNSWindowExtras.h: Add missing availability annotation
https://bugs.webkit.org/show_bug.cgi?id=181868

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-01-19
Reviewed by Dan Bernstein.

  • Shared/API/Cocoa/_WKNSWindowExtras.h:
1:19 PM Changeset in webkit [227230] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Fix jsc-only build
https://bugs.webkit.org/show_bug.cgi?id=181874

Patch by Alex Christensen <achristensen@webkit.org> on 2018-01-19
Reviewed by JF Bastien.

This makes "build-webkit --jsc-only" work on Mac!

  • wtf/PlatformJSCOnly.cmake:
1:15 PM Changeset in webkit [227229] by sbarati@apple.com
  • 4 edits
    2 adds in trunk

Spread's effects are modeled incorrectly both in AI and in Clobberize
https://bugs.webkit.org/show_bug.cgi?id=181867
<rdar://problem/36290415>

Reviewed by Michael Saboff.

JSTests:

  • stress/ai-needs-to-model-spreads-effects.js: Added.

(try.p.Symbol.iterator):
(try.go):
(catch):

  • stress/clobberize-needs-to-model-spread-effects.js: Added.

(assert):
(foo):
(a.Symbol.iterator):

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

12:13 PM Changeset in webkit [227228] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Make styles sidebar always LTR
https://bugs.webkit.org/show_bug.cgi?id=175357
<rdar://problem/33787988>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel):

12:11 PM Changeset in webkit [227227] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit

Resource Load Statistics: Add void to argument list to fix build with -Wstrict-prototypes
https://bugs.webkit.org/show_bug.cgi?id=181870
<rdar://problem/36666750>

Unreviewed build fix.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
12:04 PM Changeset in webkit [227226] by Joseph Pecoraro
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Follow-up build fix for r227206.

Unreviewed.

  • Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/VideoProcessingSoftLink.h:

Avoid duplicate and different definitions of ALWAYS_INLINE.

11:54 AM Changeset in webkit [227225] by commit-queue@webkit.org
  • 94 edits in trunk

AppCache: Log a Deprecation warning to the Console when AppCache is used
https://bugs.webkit.org/show_bug.cgi?id=181778

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-01-19
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker-expected.txt:
  • web-platform-tests/html/browsers/offline/introduction-4/event_cached-expected.txt:
  • web-platform-tests/html/browsers/offline/introduction-4/event_checking-expected.txt:
  • web-platform-tests/html/browsers/offline/introduction-4/event_noupdate-expected.txt:
  • web-platform-tests/html/browsers/offline/introduction-4/event_progress-expected.txt:
  • web-platform-tests/html/browsers/offline/manifest_url_check-expected.txt:
  • web-platform-tests/service-workers/service-worker/appcache-ordering-main.https-expected.txt:

Source/WebCore:

  • html/HTMLHtmlElement.cpp:

(WebCore::HTMLHtmlElement::insertedByParser):

LayoutTests:

  • http/tests/appcache/404-manifest-expected.txt:
  • http/tests/appcache/404-resource-expected.txt:
  • http/tests/appcache/404-resource-with-slow-main-resource-expected.txt:
  • http/tests/appcache/abort-cache-onchecking-expected.txt:
  • http/tests/appcache/abort-cache-onchecking-manifest-404-expected.txt:
  • http/tests/appcache/abort-cache-onchecking-resource-404-expected.txt:
  • http/tests/appcache/abort-cache-ondownloading-expected.txt:
  • http/tests/appcache/abort-cache-ondownloading-manifest-404-expected.txt:
  • http/tests/appcache/abort-cache-ondownloading-resource-404-expected.txt:
  • http/tests/appcache/abort-cache-onprogress-expected.txt:
  • http/tests/appcache/access-via-redirect-expected.txt:
  • http/tests/appcache/crash-when-navigating-away-then-back-expected.txt:
  • http/tests/appcache/credential-url-expected.txt:
  • http/tests/appcache/cyrillic-uri-expected.txt:
  • http/tests/appcache/decide-navigation-policy-after-delay-expected.txt:
  • http/tests/appcache/deferred-events-delete-while-raising-expected.txt:
  • http/tests/appcache/deferred-events-delete-while-raising-timer-expected.txt:
  • http/tests/appcache/deferred-events-expected.txt:
  • http/tests/appcache/different-https-origin-resource-main-expected.txt:
  • http/tests/appcache/different-origin-manifest-expected.txt:
  • http/tests/appcache/different-scheme-expected.txt:
  • http/tests/appcache/document-write-html-element-2-expected.txt:
  • http/tests/appcache/empty-manifest-expected.txt:
  • http/tests/appcache/fail-on-update-2-expected.txt:
  • http/tests/appcache/fail-on-update-expected.txt:
  • http/tests/appcache/fallback-expected.txt:
  • http/tests/appcache/fallback-namespace-outside-manifest-path-expected.txt:
  • http/tests/appcache/foreign-fallback-expected.txt:
  • http/tests/appcache/foreign-iframe-main-expected.txt:
  • http/tests/appcache/history-test-expected.txt:
  • http/tests/appcache/idempotent-update-expected.txt:
  • http/tests/appcache/identifier-test-expected.txt:
  • http/tests/appcache/interrupted-update-expected.txt:
  • http/tests/appcache/local-content-expected.txt:
  • http/tests/appcache/main-resource-fallback-for-network-error-crash-expected.txt:
  • http/tests/appcache/main-resource-hash-expected.txt:
  • http/tests/appcache/main-resource-redirect-expected.txt:
  • http/tests/appcache/manifest-containing-itself-expected.txt:
  • http/tests/appcache/manifest-parsing-expected.txt:
  • http/tests/appcache/manifest-redirect-2-expected.txt:
  • http/tests/appcache/manifest-redirect-expected.txt:
  • http/tests/appcache/manifest-with-empty-file-expected.txt:
  • http/tests/appcache/max-size-expected.txt:
  • http/tests/appcache/multi-fallback-expected.txt:
  • http/tests/appcache/navigating-away-while-cache-attempt-in-progress-expected.txt:
  • http/tests/appcache/non-html-expected.txt:
  • http/tests/appcache/offline-access-expected.txt:
  • http/tests/appcache/online-fallback-layering-expected.txt:
  • http/tests/appcache/online-whitelist-expected.txt:
  • http/tests/appcache/origin-delete-expected.txt:
  • http/tests/appcache/origin-quota-continued-download-expected.txt:
  • http/tests/appcache/origin-quota-continued-download-multiple-manifests-expected.txt:
  • http/tests/appcache/origin-quota-expected.txt:
  • http/tests/appcache/origin-usage-expected.txt:
  • http/tests/appcache/origins-with-appcache-expected.txt:
  • http/tests/appcache/progress-counter-expected.txt:
  • http/tests/appcache/reload-expected.txt:
  • http/tests/appcache/remove-cache-expected.txt:
  • http/tests/appcache/resource-redirect-2-expected.txt:
  • http/tests/appcache/resource-redirect-expected.txt:
  • http/tests/appcache/simple-expected.txt:
  • http/tests/appcache/simple-video-async-expected.txt:
  • http/tests/appcache/simple-video-sync-expected.txt:
  • http/tests/appcache/top-frame-1-expected.txt:
  • http/tests/appcache/top-frame-2-expected.txt:
  • http/tests/appcache/top-frame-3-expected.txt:
  • http/tests/appcache/top-frame-4-expected.txt:
  • http/tests/appcache/update-cache-expected.txt:
  • http/tests/appcache/video-expected.txt:
  • http/tests/appcache/whitelist-wildcard-expected.txt:
  • http/tests/appcache/wrong-content-type-expected.txt:
  • http/tests/appcache/wrong-signature-2-expected.txt:
  • http/tests/appcache/wrong-signature-expected.txt:
  • http/tests/appcache/x-frame-options-prevents-framing-expected.txt:
  • http/tests/appcache/xhr-foreign-resource-expected.txt:
  • http/tests/contentfiltering/load-substitute-data-from-appcache-expected.txt:
  • http/tests/security/appcache-switching-private-browsing-expected.txt:
  • http/tests/security/cross-origin-appcache-allowed-expected.txt:
  • http/tests/security/cross-origin-appcache-expected.txt:
  • http/tests/security/same-origin-appcache-blocked-expected.txt:
  • http/tests/ssl/upgrade-origin-usage-expected.txt:
11:47 AM Changeset in webkit [227224] by Ryan Haddad
  • 4 edits
    2 deletes in trunk

Unreviewed, rolling out r227211.

Breaks iOS Simulator tests.

Reverted changeset:

"Expose Safe Browsing SPI"
https://bugs.webkit.org/show_bug.cgi?id=181804
https://trac.webkit.org/changeset/227211

11:26 AM Changeset in webkit [227223] by wilander@apple.com
  • 20 edits in trunk

Resource Load Statistics: Implement callback support for removal of WebsiteDataType::ResourceLoadStatistics
https://bugs.webkit.org/show_bug.cgi?id=181822
https://bugs.webkit.org/show_bug.cgi?id=175263
https://bugs.webkit.org/show_bug.cgi?id=178536
https://bugs.webkit.org/show_bug.cgi?id=181223
https://bugs.webkit.org/show_bug.cgi?id=181482
<rdar://problem/33491222>
<rdar://problem/33805293>
<rdar://problem/36332683>
<rdar://problem/36549026>

Reviewed by Alex Christensen.

Source/WebKit:

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]):

Calls the new API with no-op completion handler.

(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore:]):

New API with completion handler.

(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]):

Calls the new API with no-op completion handler.

(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:completionHandler:]):

New API with completion handler.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:

(WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk):

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):

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

(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::clearResourceLoadStatisticsInWebProcesses):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

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

(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):

LayoutTests:

  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html:
  • http/tests/resourceLoadStatistics/grandfathering.html:
  • platform/ios/TestExpectations:

Marked the three updated tests as [ Pass ].

  • platform/mac-wk2/TestExpectations:

Marked the three updated tests as [ Pass ].

11:15 AM Changeset in webkit [227222] by Jonathan Bedard
  • 2 edits in trunk/Tools

run-webkit-tests fails when there is a curly brace in Xcode build output
https://bugs.webkit.org/show_bug.cgi?id=181254
<rdar://problem/36453374>

Reviewed by Daniel Bates.

  • Scripts/webkitpy/port/base.py:

(Port._run_script): Encode script output before logging it.

11:13 AM Changeset in webkit [227221] by Chris Dumez
  • 6 edits in trunk/Source/WebCore
ASSERT(registration
isTerminating()) hit in SWServerWorker::skipWaiting()

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

Reviewed by Youenn Fablet.

There is a short period of time, early in the registration process where a
SWServerWorker object exists for a registration but is not in the registration's
installing/waiting/active slots yet. As a result, if a registration is cleared
during this period (for e.g. due to the user clearing all website data), that
SWServerWorker will not be terminated. We then hit assertion later on when this
worker is trying to do things (like call skipWaiting).

To address the issue, we now keep a reference this SWServerWorker on the
registration, via a new SWServerRegistration::m_preInstallationWorker data member.
When the registration is cleared, we now take care of terminating this worker.

No new tests, covered by existing tests that crash flakily in debug builds.

  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::stop):
if the mutex is locked, then the worker thread is still starting. We spin the
runloop and try to stop again later. This avoids the deadlock shown in
Bug 181763 as the worker thread may need to interact with the main thread
during startup.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::installContextData):

  • workers/service/server/SWServerJobQueue.cpp:

(WebCore::SWServerJobQueue::scriptContextFailedToStart):
(WebCore::SWServerJobQueue::install):

  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::~SWServerRegistration):
(WebCore::SWServerRegistration::setPreInstallationWorker):
(WebCore::SWServerRegistration::clear):

  • workers/service/server/SWServerRegistration.h:

(WebCore::SWServerRegistration::preInstallationWorker const):

11:13 AM Changeset in webkit [227220] by Chris Dumez
  • 5 edits in trunk

Service worker registrations restored from disk may not be reused when the JS calls register() again
https://bugs.webkit.org/show_bug.cgi?id=181810
<rdar://problem/36591711>

Reviewed by Youenn Fablet.

Source/WebCore:

The issue was that when restoring a registration from disk, we would not set its active worker right
away. We only set it later in installContextData(). installContextData() is only called after we’ve
launched the service worker process and established a connection to it.

However, we would start processing jobs (such as registrations) before we’ve established the connection
to the service worker process. SWServerJobQueue::runRegisterJob(), in order to reuse an existing
registration checks the registration’s active worker has the right script URL. The issue was that when
this code would execute, we may not have set the registration’s active service worker yet, in which case,
we would update the existing registration instead of reusing it as-is.

To address the issue, we now delay the processing of jobs until the connection to the service worker
process has been established and we've installed all pending contexts via installContextData().

Changed is covered by new API test.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::Connection::scheduleJobInServer):
(WebCore::SWServer::scheduleJob):
(WebCore::SWServer::serverToContextConnectionCreated):

  • workers/service/server/SWServer.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

(-[SWMessageHandlerForRestoreFromDiskTest initWithExpectedMessage:]):
(-[SWMessageHandlerForRestoreFromDiskTest userContentController:didReceiveScriptMessage:]):

11:12 AM Changeset in webkit [227219] by jcraig@apple.com
  • 6 edits in trunk

AX: when invert colors is on, double-invert image and picture elements in UserAgentStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=181281
<rdar://problem/36291776>

Reviewed by Simon Fraser.

Source/WebCore:

Updated "Smart Invert" to include img and picture element inversion and tests.

Tests: accessibility/smart-invert-reference.html

accessibility/smart-invert.html

  • css/html.css:

(@media (inverted-colors)):
(img:not(picture>img), picture, video):

LayoutTests:

Updated to include img and picture element tests.

  • accessibility/smart-invert-expected.txt:
  • accessibility/smart-invert-reference-expected.html:
  • accessibility/smart-invert.html:
11:02 AM Changeset in webkit [227218] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION (r223149): Ref WebPageProxy objects before calling their functionality
https://bugs.webkit.org/show_bug.cgi?id=181863
<rdar://problem/36662452>

Reviewed by Chris Dumez.

More fix ups following r223149. When notifying all pages of a process state change we need to
take care to ref all the pages before iterating over them and notifying them of the change.
Notifying a page of such a state change may ultimately delegate to the embedding client. And
the embedding client can do anything, including deallocating one or more pages.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didBecomeUnresponsive):
(WebKit::WebProcessProxy::didBecomeResponsive):
(WebKit::WebProcessProxy::willChangeIsResponsive):
(WebKit::WebProcessProxy::didChangeIsResponsive):
(WebKit::WebProcessProxy::requestTermination):

10:51 AM Changeset in webkit [227217] by Ryan Haddad
  • 2 edits in trunk/Tools

Remove El Capitan queues from flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=181860

Reviewed by Aakash Jain.

  • TestResultServer/static-dashboards/builders.jsonp:
10:38 AM Changeset in webkit [227216] by Chris Dumez
  • 21 edits
    2 adds in trunk

The WebContent process should not process incoming IPC while waiting for a sync IPC reply
https://bugs.webkit.org/show_bug.cgi?id=181560

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add internals API for testing purposes.

Test: fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html

  • page/ChromeClient.h:
  • testing/Internals.cpp:

(WebCore::Internals::testIncomingSyncIPCMessageWhileWaitingForSyncReply):

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

Source/WebKit:

The WebContent process should not process incoming IPC while waiting for a sync IPC reply.
This is causing hard-to-debug crashes because developers often assume the state does not
change during a sendSync() call.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::waitForSyncReply):

  • Platform/IPC/Connection.h:

(IPC::Connection::setShouldProcessIncomingMessagesWhileWaitingForSyncReply):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::testIncomingSyncIPCMessageWhileWaitingForSyncReply):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::NetworkProcessConnection):

  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):

  • WebProcess/WebConnectionToUIProcess.cpp:

(WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::testIncomingSyncIPCMessageWhileWaitingForSyncReply):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::undo):
(WebKit::WebEditorClient::redo):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::syncIPCMessageWhileWaitingForSyncReplyForTesting):

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

LayoutTests:

Add layout test coverage.

  • fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt: Added.
  • fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html: Added.
10:33 AM Changeset in webkit [227215] by keith_miller@apple.com
  • 17 edits in trunk

HaveInternalSDK includes should be "#include?"
https://bugs.webkit.org/show_bug.cgi?id=179670

Reviewed by Dan Bernstein.

Source/bmalloc:

  • Configurations/Base.xcconfig:

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:

Source/WebCore:

  • Configurations/Base.xcconfig:

Source/WebInspectorUI:

  • Configurations/Base.xcconfig:

Source/WebKit:

  • Configurations/Base.xcconfig:

Source/WTF:

  • Configurations/Base.xcconfig:

Tools:

  • MiniBrowser/Configurations/Base.xcconfig:
  • MobileMiniBrowser/Configurations/Base.xcconfig:
  • TestWebKitAPI/Configurations/Base.xcconfig:
  • WebKitTestRunner/Configurations/Base.xcconfig:
10:32 AM Changeset in webkit [227214] by dbates@webkit.org
  • 9 edits in trunk/Source

Fix misspelling; substitute willDetachRenderer for willDetatchRenderer.

Source/WebCore:

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::willDetachRenderers):

  • plugins/PluginViewBase.h:

(WebCore::PluginViewBase::willDetachRenderer):
(WebCore::PluginViewBase::willDetatchRenderer): Deleted.

Source/WebKit:

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::willDetachRenderer):
(WebKit::PDFPlugin::willDetatchRenderer): Deleted.

  • WebProcess/Plugins/Plugin.h:

(WebKit::Plugin::willDetachRenderer):
(WebKit::Plugin::willDetatchRenderer): Deleted.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::willDetachRenderer):
(WebKit::PluginView::willDetatchRenderer): Deleted.

  • WebProcess/Plugins/PluginView.h:
10:12 AM Changeset in webkit [227213] by Jonathan Bedard
  • 3 edits in trunk/Source/WebCore

Unreviewed build fix, remove unused lambda captures.

  • dom/messageports/MessagePortChannel.cpp:

(WebCore::MessagePortChannel::takeAllMessagesForPort):

  • dom/messageports/MessagePortChannelRegistry.cpp:

(WebCore::MessagePortChannelRegistry::messagePortChannelCreated):

10:09 AM Changeset in webkit [227212] by ap@apple.com
  • 2 edits in trunk/Source/WTF

Update XPCSPI.h
https://bugs.webkit.org/show_bug.cgi?id=181827
rdar://problem/36393031

Reviewed by Daniel Bates.

  • wtf/spi/darwin/XPCSPI.h:
10:05 AM Changeset in webkit [227211] by commit-queue@webkit.org
  • 3 edits
    3 adds in trunk

Expose Safe Browsing SPI
https://bugs.webkit.org/show_bug.cgi?id=181804
<rdar://problem/36626946>

Patch by Zach Li <zacharyli323@gmail.com> on 2018-01-19
Reviewed by Alex Christensen.

If client is using Apple internal SDK, then we can just import the header; if not,
then we declare necessary symbols that client will need.

  • Configurations/WebKit.xcconfig:

Only link against SafariSafeBrowsing framework on macOS High Sierra
and iOS 11 and above. Weak link against SafariSafeBrowsing framework
because it is not present on the Base system.

  • Platform/spi/Cocoa/SafeBrowsingSPI.h: Added.
  • WebKit.xcodeproj/project.pbxproj:

Added SafeBrowsingSPI.h.

  • WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/11/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd:

Added.

9:59 AM Changeset in webkit [227210] by graouts@webkit.org
  • 1 edit
    1 delete in trunk/LayoutTests

[Web Animations] Remove http/wpt/wk-web-animations tests
https://bugs.webkit.org/show_bug.cgi?id=181861

These tests were written early on during our Web Animations implementation before we had a good sense of the quality
of the coverage of the W3C WPT suite. That suite is extremely comprehensive and all of the assertions we wrote ourselves
are redundant and should be removed so that all testing, unless specific to our implementation, is done through the WPT
suite.

Reviewed by Dean Jackson.

  • http/wpt/wk-web-animations/interfaces/document-get-animations-expected.txt: Removed.
  • http/wpt/wk-web-animations/interfaces/document-get-animations.html: Removed.
  • http/wpt/wk-web-animations/interfaces/element-get-animations-expected.txt: Removed.
  • http/wpt/wk-web-animations/interfaces/element-get-animations.html: Removed.
  • http/wpt/wk-web-animations/interfaces/keyframe-effect-getComputedStyle-expected.txt: Removed.
  • http/wpt/wk-web-animations/interfaces/keyframe-effect-getComputedStyle.html: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-creation-basic-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-creation-basic.html: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-current-time-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-current-time.html: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-effect-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-effect-timing-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-effect-timing.html: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-effect-unique-relationship-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-effect-unique-relationship.html: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-effect.html: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-interface-effect-property-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-interface-effect-property.html: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-interface-start-time-property-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/animation-interface-start-time-property.html: Removed.
  • http/wpt/wk-web-animations/timing-model/document-timeline-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/document-timeline.html: Removed.
  • http/wpt/wk-web-animations/timing-model/keyframe-effect-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/keyframe-effect-interface-timing-duration-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/keyframe-effect-interface-timing-duration.html: Removed.
  • http/wpt/wk-web-animations/timing-model/keyframe-effect.html: Removed.
  • http/wpt/wk-web-animations/timing-model/timeline-current-time-expected.txt: Removed.
  • http/wpt/wk-web-animations/timing-model/timeline-current-time.html: Removed.
9:58 AM Changeset in webkit [227209] by pvollan@apple.com
  • 4 edits in trunk/Source/WebKitLegacy/win

[Win] Compile error: 'WebKitQuartzCoreAdditionsBase.h' not found.
https://bugs.webkit.org/show_bug.cgi?id=181859
<rdar://problem/36659886>

Reviewed by Alex Christensen.

Use local include patch.

  • WebKitQuartzCoreAdditions/API/WKCACFImage.h:
  • WebKitQuartzCoreAdditions/API/WKCACFView.h:
  • WebKitQuartzCoreAdditions/API/WKCACFViewPrivate.h:
9:56 AM Changeset in webkit [227208] by graouts@webkit.org
  • 40 edits
    3 copies in trunk

[Web Animations] Expose timing properties (delay, endDelay, fill, iterationStart, iterations, direction) and getComputedTiming()
https://bugs.webkit.org/show_bug.cgi?id=181857
<rdar://problem/36660081>

Reviewed by Dean Jackson.

Source/WebCore:

We start the work to implement the rest of the Web Animations timing and animation model by exposing more properties on
AnimationEffectTiming to control delay (delay, endDelay), looping (iterationStart, iterations), fill and direction.
Additionally, we expose the getComputedTiming() method on AnimationEffect, although it currently lacks some computed
properties that will come in later patch as we implement various processes defined by the spec. We also update the
existing duration() method on AnimationEffectTiming to be called iterationDuration() to match the terms used in the
specification.

Finally, we make all new properties, and update existing ones, that expose a time value go through the new utility
function secondsToWebAnimationsAPITime() to guarantee rounded values with microseconds precision, as advised by
the Web Animations specification.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationEffect.cpp:

(WebCore::AnimationEffect::localTime const):
(WebCore::AnimationEffect::getComputedTiming):

  • animation/AnimationEffect.h:
  • animation/AnimationEffect.idl:
  • animation/AnimationEffectTiming.cpp:

(WebCore::AnimationEffectTiming::AnimationEffectTiming):
(WebCore::AnimationEffectTiming::setIterationStart):
(WebCore::AnimationEffectTiming::setIterations):
(WebCore::AnimationEffectTiming::bindingsDuration const):
(WebCore::AnimationEffectTiming::setBindingsDuration):
(WebCore::AnimationEffectTiming::endTime const):
(WebCore::AnimationEffectTiming::activeDuration const):

  • animation/AnimationEffectTiming.h:
  • animation/AnimationEffectTiming.idl:
  • animation/AnimationPlaybackEvent.cpp:

(WebCore::AnimationPlaybackEvent::bindingsCurrentTime const):
(WebCore::AnimationPlaybackEvent::bindingsTimelineTime const):

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::bindingsCurrentTime):

  • animation/ComputedTimingProperties.h: Added.
  • animation/ComputedTimingProperties.idl: Added. We set nullable double values to a default value of "null" since

otherwise setting those properties to a null value would not set the properties in the converted JS dictionary.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::create): Handle new timing properties passed in the KeyframeEffectOptions dictionary.
(WebCore::KeyframeEffect::applyAtLocalTime):
(WebCore::KeyframeEffect::getAnimatedStyle):
(WebCore::KeyframeEffect::startOrStopAccelerated):

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::bindingsStartTime const):
(WebCore::WebAnimation::bindingsCurrentTime const):
(WebCore::WebAnimation::effectEndTime const):
(WebCore::WebAnimation::timeToNextRequiredTick const):

  • animation/WebAnimationUtilities.h: Added.

(WebCore::secondsToWebAnimationsAPITime):

LayoutTests:

Update expectations with progressions and new failure points now we expose more of the API.

  • http/wpt/web-animations/animation-model/animation-types/discrete-animation-expected.txt:
  • http/wpt/web-animations/interfaces/Animatable/animate-expected.txt:
  • http/wpt/web-animations/interfaces/Animation/finish-expected.txt:
  • http/wpt/web-animations/interfaces/Animation/finished-expected.txt:
  • http/wpt/web-animations/interfaces/Animation/pause-expected.txt:
  • http/wpt/web-animations/interfaces/Animation/play-expected.txt:
  • http/wpt/web-animations/interfaces/AnimationEffectTiming/delay-expected.txt:
  • http/wpt/web-animations/interfaces/AnimationEffectTiming/direction-expected.txt:
  • http/wpt/web-animations/interfaces/AnimationEffectTiming/duration-expected.txt:
  • http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
  • http/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay-expected.txt:
  • http/wpt/web-animations/interfaces/AnimationEffectTiming/fill-expected.txt:
  • http/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart-expected.txt:
  • http/wpt/web-animations/interfaces/AnimationEffectTiming/iterations-expected.txt:
  • http/wpt/web-animations/interfaces/AnimationTimeline/document-timeline-expected.txt:
  • http/wpt/web-animations/timing-model/animation-effects/active-time-expected.txt:
  • http/wpt/web-animations/timing-model/animation-effects/current-iteration-expected.txt:
  • http/wpt/web-animations/timing-model/animation-effects/local-time-expected.txt:
  • http/wpt/web-animations/timing-model/animation-effects/phases-and-states-expected.txt:
  • http/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt:
  • http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
  • http/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
  • http/wpt/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:
  • http/wpt/wk-web-animations/timing-model/keyframe-effect-interface-timing-duration.html:
9:55 AM Changeset in webkit [227207] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Remove dead networking code
https://bugs.webkit.org/show_bug.cgi?id=181813

Patch by Alex Christensen <achristensen@webkit.org> on 2018-01-19
Reviewed by Tim Horton.

CFURLConnection is only used on Windows.

  • platform/network/cf/ResourceError.h:
  • platform/network/cf/ResourceRequest.h:

(WebCore::ResourceRequest::encodingRequiresPlatformData const):

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):

  • platform/network/cf/ResourceResponse.h:

(WebCore::ResourceResponse::ResourceResponse):

9:48 AM Changeset in webkit [227206] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk/Source/ThirdParty/libwebrtc

Softlink VideoProcessing in WebKit
https://bugs.webkit.org/show_bug.cgi?id=181853
<rdar://problem/36590005>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-19
Reviewed by Eric Carlson.

  • Configurations/libwebrtc.xcconfig:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/VideoProcessingSoftLink.cpp: Added.
  • Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/VideoProcessingSoftLink.h: Added.
  • Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/encoder_vcp.h:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/encoder_vcp.mm:

(internal::SetVTSessionProperty):
(webrtc::H264VideoToolboxEncoderVCP::Encode):

  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/videocodecfactory.mm:

(webrtc::VideoToolboxVideoEncoderFactory::VideoToolboxVideoEncoderFactory):

  • libwebrtc.xcodeproj/project.pbxproj:
9:46 AM Changeset in webkit [227205] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Remove unused WebViewPrivate _allowCookies
https://bugs.webkit.org/show_bug.cgi?id=181812

Patch by Alex Christensen <achristensen@webkit.org> on 2018-01-19
Reviewed by Tim Horton.

Source/WebCore:

This SPI was in the original iOS upstreaming and has not been used in many years.

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setDefaultAllowCookies): Deleted.
(WebCore::ResourceRequestBase::defaultAllowCookies): Deleted.

  • platform/network/ResourceRequestBase.h:

(WebCore::ResourceRequestBase::ResourceRequestBase):

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(+[WebView _setAllowCookies:]): Deleted.
(+[WebView _allowCookies]): Deleted.

  • WebView/WebViewPrivate.h:
9:45 AM Changeset in webkit [227204] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/images/image-supports-video.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181862

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:38 AM Changeset in webkit [227203] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Update TestExpectations for media/W3C/audio/networkState/networkState_during_loadstart.html.
https://bugs.webkit.org/show_bug.cgi?id=123010

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:12 AM Changeset in webkit [227202] by Jonathan Bedard
  • 3 edits in trunk/LayoutTests

Move select-out-of-floated-non-editable iOS Simulator expectations to iOS

Unreviewed test gardening.

r222317 introduced these test expectations. These expectations should apply to both
Simulator and device testing.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
8:45 AM Changeset in webkit [227201] by fred.wang@free.fr
  • 10 edits in trunk/LayoutTests

Use promises for basic-gestures.js and 'await' for the corresponding tests
https://bugs.webkit.org/show_bug.cgi?id=181841

Patch by Frederic Wang <fwang@igalia.com> on 2018-01-19
Reviewed by Megan Gardner.

  • fast/events/touch/ios/drag-to-autoscroll-in-single-line-editable.html: Remove redundant

check for testRunner.runUIScript, rewrite runUIScript calls to just await a promise, add the
async keyword to runTest and reindent.
Also remove extraneous space after + operator.

  • fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text.html: Ditto.
  • fast/events/touch/ios/long-press-then-drag-left-to-change-selected-text.html: Ditto.
  • fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html: Ditto.
  • fast/events/touch/ios/long-press-then-drag-to-select-text.html: Ditto.
  • fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html: Ditto.
  • fast/events/touch/ios/long-press-to-select-and-tap-to-clear.html: Ditto.
  • fast/events/touch/ios/long-press-to-select-text.html: Ditto.
  • resources/basic-gestures.js: For all functions in this file, wrap the script source into a

runUIScript call and a new promise, reindent.

8:21 AM Changeset in webkit [227200] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark svg/filters/feDiffuseLighting-bottomRightPixel.html as failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=181854

Unreviewed test gardening.

  • platform/win/TestExpectations:
8:10 AM Changeset in webkit [227199] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[iOS] LayoutTest media/modern-media-controls/media-controller/ios/media-controller-ios-do-not-hide-controls-when-tapping-button.html fails on Internal bots
https://bugs.webkit.org/show_bug.cgi?id=181843
<rdar://problem/36061363>

The button we were trying to press was outside of the viewable screen area and so the tap wouldn't occur.
Resizing the video to fit in the window fixes the issue.

Reviewed by Youenn Fablet.

  • media/modern-media-controls/media-controller/ios/media-controller-ios-do-not-hide-controls-when-tapping-button.html:
7:19 AM Changeset in webkit [227198] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

WebDriver: driver environment not passed to pytest when running w3c tests
https://bugs.webkit.org/show_bug.cgi?id=181852

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2018-01-19
Reviewed by Carlos Alberto Lopez Perez.

That's why color codes are not used in the bots log for selenium tests but they appear in w3c tests.

  • Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:

(WebDriverW3CExecutor.run):

6:19 AM Changeset in webkit [227197] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK] WebDriver: wayland display no used in wayland bot
https://bugs.webkit.org/show_bug.cgi?id=181851

Reviewed by Carlos Alberto Lopez Perez.

We need to handle the additionalArguments property in the WebDriverTests step.

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(RunWebDriverTests.start):

5:06 AM Changeset in webkit [227196] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

Unreviewed, reduce count of iteration to fix timing out debug JSC test
https://bugs.webkit.org/show_bug.cgi?id=181535

  • stress/inserted-recovery-with-set-last-index.js:
4:22 AM Changeset in webkit [227195] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] TERM environment variable is not passed to the test driver.
https://bugs.webkit.org/show_bug.cgi?id=181847

Rubber-stamped by by Carlos Garcia Campos.

  • Scripts/webkitpy/port/base.py:

(Port.to.setup_environ_for_server):

3:54 AM Changeset in webkit [227194] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

WebDriver: run-webdriver-tests is crashing in the bots when creating results json file
https://bugs.webkit.org/show_bug.cgi?id=181844

Reviewed by Carlos Alberto Lopez Perez.

We always try to create the directory where to store the json file, but when the filename is given directly,
like in the bots, the current dir is used.

  • Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:

(WebDriverTestRunner.dump_results_to_json_file): Do not try to create the directory if dirname() returns an
empty string.

1:58 AM Changeset in webkit [227193] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK] WebDriver tests are running outside the jhbuild env
https://bugs.webkit.org/show_bug.cgi?id=181842

Reviewed by Žan Doberšek.

We need to enter jhbuild env in run-webdriver-tests.

  • Scripts/run-webdriver-tests:

Jan 18, 2018:

11:31 PM Changeset in webkit [227192] by Carlos Garcia Campos
  • 3 edits in trunk/Tools

[GTK] Run WebDriver tests in the bots
https://bugs.webkit.org/show_bug.cgi?id=181787

Reviewed by Michael Catanzaro.

Add a step to run WebDriver tests in the GTK test bots. The new step is not GTK specific, but only added to the
factory for the GTK port for now.

  • BuildSlaveSupport/build.webkit.org-config/factories.py:

(TestFactory.init):

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(RunWebDriverTests):
(RunWebDriverTests.start):
(RunWebDriverTests.commandComplete):
(RunWebDriverTests.evaluateCommand):
(RunWebDriverTests.getText):
(RunWebDriverTests.getText2):

11:03 PM Changeset in webkit [227191] by fred.wang@free.fr
  • 9 edits
    2 copies
    1 delete in trunk/LayoutTests

Move helper files for iOS touch gestures into LayoutTests/resources
https://bugs.webkit.org/show_bug.cgi?id=181798

Patch by Frederic Wang <fwang@igalia.com> on 2018-01-18
Reviewed by Wenson Hsieh.

  • fast/events/touch/ios/drag-to-autoscroll-in-single-line-editable.html: Change URL of

basic-gestures.js ; remove gesture-helpers.js it seems unused and has the wrong URL anyway.

  • fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text.html: Change URL

of basic-gestures.js.

  • fast/events/touch/ios/long-press-then-drag-left-to-change-selected-text.html: Ditto.
  • fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html: Ditto.
  • fast/events/touch/ios/long-press-then-drag-to-select-text.html: Ditto.
  • fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html: Ditto.
  • fast/events/touch/ios/long-press-to-select-and-tap-to-clear.html: Ditto.
  • fast/events/touch/ios/long-press-to-select-text.html: Ditto.
  • resources/basic-gestures.js: Renamed from LayoutTests/fast/events/touch/ios/resources/basic-gestures.js.
  • resources/ui-debugging.js: Renamed from LayoutTests/fast/events/touch/ios/resources/ui-debugging.js.

Note that this file was introduced in r222517 but seems unused for now.

10:33 PM Changeset in webkit [227190] by beidson@apple.com
  • 24 edits
    11 adds
    4 deletes in trunk/Source/WebCore

Make in-process MessagePorts be (mostly) asynchronous
https://bugs.webkit.org/show_bug.cgi?id=181454

Reviewed by Alex Christensen.

No new tests (Covered *brutally* by existing tests)

Part of making MessagePorts be a thing we can pass across processes is making them work async.

The existing "MessagePortChannel" method of abstraction was not cut out for this.
This patch gets rid of MessagePortChannel and adds a new MessagePortChannelProvider abstraction.
It then gets the new machinery working in-process (with some pieces of out-of-process in place)

One synchronous behavior this patch maintains is the hasPendingActivity() check used to support GC.
That will (creatively) be made async in the next followup.

More generally from MessagePorts, this patch also adds a "MessageWithMessagePorts" object to be used
with all forms of postMessage(). Much better.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/InProcessMessagePortChannel.cpp: Removed.
  • dom/InProcessMessagePortChannel.h: Removed.
  • dom/MessagePortChannel.cpp: Removed.
  • dom/MessagePortChannel.h: Removed.
  • dom/MessageChannel.cpp:

(WebCore::MessageChannel::create):
(WebCore::MessageChannel::MessageChannel):
(WebCore::m_port2): Deleted.

  • dom/MessageChannel.h:

(WebCore::MessageChannel::create): Deleted.

  • dom/MessagePort.cpp:

(WebCore::MessagePort::create):
(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::~MessagePort):
(WebCore::MessagePort::entangle):
(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::disentangle):
(WebCore::MessagePort::messageAvailable):
(WebCore::MessagePort::start):
(WebCore::MessagePort::close):
(WebCore::MessagePort::contextDestroyed):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::hasPendingActivity const):
(WebCore::MessagePort::locallyEntangledPort const):
(WebCore::MessagePort::disentanglePorts):
(WebCore::MessagePort::entanglePorts):
(WebCore::MessagePort::entangleWithRemote): Deleted.

  • dom/MessagePort.h:
  • dom/MessagePortIdentifier.h:

(WebCore::MessagePortIdentifier::logString const):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::processMessageWithMessagePortsSoon):
(WebCore::ScriptExecutionContext::dispatchMessagePortEvents):
(WebCore::ScriptExecutionContext::processMessagePortMessagesSoon): Deleted.

  • dom/ScriptExecutionContext.h:

Add a single object that represents two intertwined ports, tracks their pending
messages, tracks which process they're in, etc etc:

  • dom/messageports/MessagePortChannel.cpp: Added.

(WebCore::MessagePortChannel::create):
(WebCore::MessagePortChannel::MessagePortChannel):
(WebCore::MessagePortChannel::~MessagePortChannel):
(WebCore::MessagePortChannel::includesPort):
(WebCore::MessagePortChannel::entanglePortWithProcess):
(WebCore::MessagePortChannel::disentanglePort):
(WebCore::MessagePortChannel::closePort):
(WebCore::MessagePortChannel::postMessageToRemote):
(WebCore::MessagePortChannel::takeAllMessagesForPort):
(WebCore::MessagePortChannel::hasAnyMessagesPendingOrInFlight const):

  • dom/messageports/MessagePortChannel.h: Added.

(WebCore::MessagePortChannel::port1 const):
(WebCore::MessagePortChannel::port2 const):
(WebCore::MessagePortChannel::logString const):

Abstraction for creating and operating on MessagePorts in a potentially cross-process way:

  • dom/messageports/MessagePortChannelProvider.cpp: Added.

(WebCore::MessagePortChannelProvider::singleton):
(WebCore::MessagePortChannelProvider::setSharedProvider):

  • dom/messageports/MessagePortChannelProvider.h: Added.

(WebCore::MessagePortChannelProvider::~MessagePortChannelProvider):

Adds a concrete implementation of that provider to be used in-process (e.g. WK1):

  • dom/messageports/MessagePortChannelProviderImpl.cpp: Added.

(WebCore::MessagePortChannelProviderImpl::~MessagePortChannelProviderImpl):
(WebCore::MessagePortChannelProviderImpl::performActionOnAppropriateThread):
(WebCore::MessagePortChannelProviderImpl::createNewMessagePortChannel):
(WebCore::MessagePortChannelProviderImpl::entangleLocalPortInThisProcessToRemote):
(WebCore::MessagePortChannelProviderImpl::messagePortDisentangled):
(WebCore::MessagePortChannelProviderImpl::messagePortClosed):
(WebCore::MessagePortChannelProviderImpl::postMessageToRemote):
(WebCore::MessagePortChannelProviderImpl::takeAllMessagesForPort):
(WebCore::MessagePortChannelProviderImpl::hasMessagesForPorts_temporarySync):

  • dom/messageports/MessagePortChannelProviderImpl.h: Added.

Adds a main thread object to handle the set of all MessagePortChannels that are open.
For now it lives in the WebProcess, but for out-of-process it will live in the UIProcess:

  • dom/messageports/MessagePortChannelRegistry.cpp: Added.

(WebCore::MessagePortChannelRegistry::~MessagePortChannelRegistry):
(WebCore::MessagePortChannelRegistry::didCreateMessagePortChannel):
(WebCore::MessagePortChannelRegistry::messagePortChannelCreated):
(WebCore::MessagePortChannelRegistry::messagePortChannelDestroyed):
(WebCore::MessagePortChannelRegistry::didEntangleLocalToRemote):
(WebCore::MessagePortChannelRegistry::didDisentangleMessagePort):
(WebCore::MessagePortChannelRegistry::didCloseMessagePort):
(WebCore::MessagePortChannelRegistry::didPostMessageToRemote):
(WebCore::MessagePortChannelRegistry::takeAllMessagesForPort):
(WebCore::MessagePortChannelRegistry::hasMessagesForPorts_temporarySync): This is named against style

and weird on purpose - to call attention to how bad it is and how it's temporary.

(WebCore::MessagePortChannelRegistry::existingChannelContainingPort):

  • dom/messageports/MessagePortChannelRegistry.h: Added.

Add an object that represents a "SerializedScriptValue for the message payload and the ports
that are being transferred along with that payload". This is used in all forms of postMessage():

  • dom/messageports/MessageWithMessagePorts.cpp: Added.
  • dom/messageports/MessageWithMessagePorts.h: Added.
  • page/DOMWindow.cpp:

(WebCore::PostMessageTimer::PostMessageTimer):
(WebCore::PostMessageTimer::event):
(WebCore::DOMWindow::postMessage):

  • platform/Logging.h:
  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::postMessage):

  • workers/Worker.cpp:

(WebCore::Worker::postMessage):

  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerObjectProxy.h:
  • workers/service/ServiceWorker.cpp:

(WebCore::ServiceWorker::postMessage):

  • workers/service/ServiceWorkerClient.cpp:

(WebCore::ServiceWorkerClient::postMessage):

  • workers/service/context/SWContextManager.cpp:

(WebCore::SWContextManager::postMessageToServiceWorker):

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::fireMessageEvent):
(WebCore::ServiceWorkerThread::postMessageToServiceWorker):

  • workers/service/context/ServiceWorkerThread.h:
10:17 PM Changeset in webkit [227189] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=180171

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:11 PM Changeset in webkit [227188] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/debugger/breakpoint-action-log.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181839

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:04 PM Changeset in webkit [227187] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark storage/websql/database-lock-after-reload.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173928

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:04 PM Changeset in webkit [227186] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/IndexedDB/idbdatabase-createObjectStore-exception-order.htm as flaky.
https://bugs.webkit.org/show_bug.cgi?id=172243

Unreviewed test gardening.

9:55 PM Changeset in webkit [227185] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark js/slow-stress/Int32Array-alloc-huge-long-lived.html as slow on iOS.
https://bugs.webkit.org/show_bug.cgi?id=181838

Unreviewed test gardening.

  • platform/ios/TestExpectations:
9:42 PM Changeset in webkit [227184] by aakash_jain@apple.com
  • 7 edits in trunk/Websites/perf.webkit.org

Add support for builderNameToIDMap in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=176526

Reviewed by Ryosuke Niwa.

  • tools/js/buildbot-syncer.js:

(BuildbotSyncer._loadConfig): Added builderNameToIDMap parameter. It would be used later on.
(BuildbotSyncer._resolveBuildersWithPlatforms): Ditto.
(BuildbotSyncer._validateAndMergeConfig): Added builderID as a valid config parameter.

  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.getBuilderNameToIDMap): Method to fetch BuilderNameToIDMap from Buildbot 0.9.
(BuildbotTriggerable.prototype.getBuilderNameToIDMapDeprecated): Method to fetch BuilderNameToIDMap from Buildbot 0.8.
(BuildbotTriggerable.prototype.initSyncers): Updated to use getBuilderNameToIDMap.

  • unit-tests/buildbot-syncer-tests.js: Updated unit-tests.
  • server-tests/resources/mock-data.js:

(MockData.buildbotBuildersURLDeprecated): URL for fetching Builders list.
(MockData.buildbotBuildersURL): Ditto for Buildbot 0.9
(MockData.mockBuildbotBuildersDeprecated): Sample builders data for Buildbot 0.8
(MockData.mockBuildbotBuilders): Ditto for Buildbot 0.9

  • server-tests/tools-buildbot-triggerable-tests.js: Added test for getBuilderNameToIDMap. Updated tests to handle

newly added promise for fetching builders list from Buildbot.

  • server-tests/tools-sync-buildbot-integration-tests.js: Ditto.
8:55 PM Changeset in webkit [227183] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/W3C/video/networkState/networkState_during_loadstart.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=179643

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
8:46 PM Changeset in webkit [227182] by rniwa@webkit.org
  • 4 edits in trunk/Websites/perf.webkit.org

Charts can be empty when values are all identical
https://bugs.webkit.org/show_bug.cgi?id=181828

Reviewed by Alexey Proskuryakov.

Fixed the bug that when SampleVarianceUpperTriangularMatrix can store -Infinity as the initial cost
of some entries when the sample standard deviation between two points turns out to be 0,
and cause splitIntoSegmentsUntilGoodEnough to return undefiend because no segmentation has a finite cost.

Also fixed the bug that the time series chart fails to show any data points when all data points have
identical values as the entire y-coordinate gets collapsed to an empty value range by adjusting the max value
when min & max values are identical.

  • public/v3/components/time-series-chart.js:

(TimeSeriesChart.prototype._ensureValueRangeCache): Raise the max slightly when min & max are identical
to avoid the chart becoming empty. Otherwise valueDiff in _computeVerticalRenderingMetrics becomes 0
and value-to-y-coordinate conversion always results in NaN.

  • public/shared/statistics.js:

(Statistics..SampleVarianceUpperTriangularMatrix):

  • unit-tests/statistics-tests.js: Added a test case.
8:33 PM Changeset in webkit [227181] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/video-main-content-allow-then-deny.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181830

Unreviewed test gardening.

  • platform/mac/TestExpectations:
8:29 PM Changeset in webkit [227180] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Update TestExpectations for fast/multicol/spanner-crash-when-adding-summary.html.

Unreviewed test gardening.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
8:25 PM Changeset in webkit [227179] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181499

Unreviewed test gardening.

  • platform/ios/TestExpectations:
7:45 PM Changeset in webkit [227178] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r227147. rdar://problem/36429159

7:21 PM Changeset in webkit [227177] by jmarcell@apple.com
  • 10 edits in branches/safari-605-branch

Cherry-pick r226956. rdar://problem/36598688

5:35 PM Changeset in webkit [227176] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix, removed unused lambda capture.

  • workers/service/context/SWContextManager.cpp:

(WebCore::SWContextManager::ServiceWorkerTerminationRequest::ServiceWorkerTerminationRequest):

4:58 PM Changeset in webkit [227175] by jmarcell@apple.com
  • 7 edits in branches/safari-605-branch/Source

Versioning.

4:57 PM Changeset in webkit [227174] by Chris Dumez
  • 8 edits
    4 adds in trunk

We should be able to terminate service workers that are unresponsive
https://bugs.webkit.org/show_bug.cgi?id=181563
<rdar://problem/35280031>

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/workers/service/postmessage-after-terminating-hung-worker.html

  • workers/service/context/SWContextManager.cpp:

(WebCore::SWContextManager::terminateWorker):
Before calling WorkerThread::stop(), set a timer with the given timeout parameter.
If the worker thread has not stopped when the timer fires, forcefully exit the
service worker process. The StorageProcess will take care of relaunching the
service worker process if it exits abruptly.

(WebCore::SWContextManager::serviceWorkerFailedToTerminate):
Log error message if we failed to terminate a service worker and call exit().

(WebCore::SWContextManager::ServiceWorkerTerminationRequest::ServiceWorkerTerminationRequest):

  • workers/service/context/SWContextManager.h:

Source/WebKit:

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::terminateWorker):
Use a 10 second timeout for forcefully exiting the service worker process when
the service worker in question fails to terminate.

(WebKit::WebSWContextManagerConnection::syncTerminateWorker):
Use a 100ms timeout for forcefully exiting the service worker process when
the service worker in question fails to terminate. This method is only called
from the layout tests, which is why we use a very short timeout.

Source/WTF:

  • wtf/ObjectIdentifier.h:

(WTF::ObjectIdentifier::loggingString const):
Allow using loggingString() from RELEASE_LOG().

LayoutTests:

Add layout test coverage.

  • http/tests/workers/service/postmessage-after-terminating-hung-worker-expected.txt: Added.
  • http/tests/workers/service/postmessage-after-terminating-hung-worker.html: Added.
  • http/tests/workers/service/resources/postmessage-after-terminating-hung-worker.js: Added.
  • http/tests/workers/service/resources/postmessage-echo-worker-mayhang.js: Added.
4:51 PM Changeset in webkit [227173] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.24

Tag Safari-605.1.24.

4:43 PM Changeset in webkit [227172] by ap@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

Build fix, remove a call to -[NSWindow setOneShot:]
https://bugs.webkit.org/show_bug.cgi?id=181809

Reviewed by Tim Horton.

  • WebView/WebTextCompletionController.mm:

(-[WebTextCompletionController _buildUI]):

4:25 PM Changeset in webkit [227171] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[WinCairo] Pass correct url for http test to test driver.
https://bugs.webkit.org/show_bug.cgi?id=181814

Patch by Basuke Suzuki <Basuke Suzuki> on 2018-01-18
Reviewed by Alex Christensen.

  • Scripts/webkitpy/port/driver.py:

(Driver):
(Driver.http_test_path_to_uri):
(Driver.is_secure_path):
(Driver.http_base_url):
(Driver.uri_to_test):

4:19 PM Changeset in webkit [227170] by Ryan Haddad
  • 2 edits in trunk/Tools

Unreviewed, update the triggerable name for 'sierra-release-perf-tests'

  • BuildSlaveSupport/build.webkit.org-config/config.json:
4:07 PM Changeset in webkit [227169] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/JavaScriptCore

Cherry-pick r227165. rdar://problem/36628552

3:53 PM Changeset in webkit [227168] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Set the minimum executable allocator size properly
https://bugs.webkit.org/show_bug.cgi?id=181816
<rdar://problem/36635533>

Reviewed by Saam Barati.

Executable allocator expects at least two page size's worth of
allocation in certain conditions, and that causes some tests to
now fail because they ask for less. Set that minimum correctly. We
were already rounding up to a page size, so having a minimum of 2
page sizes is fine.

  • jit/ExecutableAllocator.cpp:

(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):

3:39 PM Changeset in webkit [227167] by Ryan Haddad
  • 4 edits in trunk/Source

Unreviewed, suppress deprecation warnings to fix the build with a newer SDK.

Source/WebKit:

  • UIProcess/ios/WKPDFPageNumberIndicator.mm:

(-[WKPDFPageNumberIndicator _makeRoundedCorners]):

Source/WebKitLegacy/mac:

  • Carbon/HIWebView.mm:

(overrideCGContext):
(restoreCGContext):

3:01 PM Changeset in webkit [227166] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Don't fetch more than two builds to check duplicity of builds in ReportProcessor
https://bugs.webkit.org/show_bug.cgi?id=181786

Reviewed by Wenson Hsieh.

Limit the number of builds to check to avoid using a lot of memory with a long delay.

  • public/include/report-processor.php:

(ReportProcessor::resolve_build_id):

2:43 PM Changeset in webkit [227165] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

2018-01-18 Michael Saboff <msaboff@apple.com>

Unreviewed build fix for Windows

  • interpreter/FrameTracers.h:

(JSC::assertStackPointerIsAligned): Can't use gcc style inlined assembly
on Windows.

1:51 PM Changeset in webkit [227164] by jmarcell@apple.com
  • 5 edits in tags/Safari-605.1.23.1/Source/JavaScriptCore

Cherry-pick r227152. rdar://problem/36628594

1:51 PM Changeset in webkit [227163] by jmarcell@apple.com
  • 7 edits in tags/Safari-605.1.23.1/Source

Versioning.

1:20 PM Changeset in webkit [227162] by jmarcell@apple.com
  • 5 edits in branches/safari-605-branch/Source/JavaScriptCore

Cherry-pick r227152. rdar://problem/36628552

1:12 PM Changeset in webkit [227161] by commit-queue@webkit.org
  • 16 edits in trunk/Source

Do not go to the storage process when loading a main resource if there is no service worker registered
https://bugs.webkit.org/show_bug.cgi?id=181395

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-18
Reviewed by Chris Dumez.

Source/WebCore:

No observable behavior change.
Instead of creating a connection to know whether there is a potential service worker,
Ask the service worker provider that will use the connection if needed.
Otherwise, it will use a default value provided by the UIProcess.

Tested by cleaning all service workers and checking the computed value of the default value,
then observing whether pages registering service workers work well.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startLoadingMainResource):

  • workers/service/ServiceWorkerProvider.cpp:

(WebCore::ServiceWorkerProvider::mayHaveServiceWorkerRegisteredForOrigin):

  • workers/service/ServiceWorkerProvider.h:

Source/WebKit:

Add a new web process creation parameter to know whether there is any service worker registered at web process creation time.
If there is none, the web process will then start to load HTTP resources from the network.
The connection to the storage process is then executed when receiving the first bytes of the main resource.
This connection is needed as other web processes may create service workers at any given time.
If there is one registered service worker, the web process will wait for its connection to the storage process to be active.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/ServiceWorkerProcessProxy.cpp:

(WebKit::ServiceWorkerProcessProxy::hasRegisteredServiceWorkers):

  • UIProcess/ServiceWorkerProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

  • WebProcess/Storage/WebServiceWorkerProvider.cpp:

(WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession):

  • WebProcess/Storage/WebServiceWorkerProvider.h:
  • WebProcess/Storage/WebToStorageProcessConnection.h:

(WebKit::WebToStorageProcessConnection::existingServiceWorkerConnectionForSession):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

1:08 PM Changeset in webkit [227160] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.23.1

New tag.

1:00 PM Changeset in webkit [227159] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Poisons should be initialized after Options are initialized.
https://bugs.webkit.org/show_bug.cgi?id=181807
<rdar://problem/36629138>

Reviewed by Keith Miller.

This is because poison initialization may depend on options.

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreading):

12:39 PM Changeset in webkit [227158] by jdiggs@igalia.com
  • 4 edits in trunk/LayoutTests

AX: roles-computedRoleString.html layout test should support enabling/disabling individual test cases
https://bugs.webkit.org/show_bug.cgi?id=181806

Reviewed by Chris Fleizach.

Add a "data-platform" attribute to each element so that we can enable or disable
a given test case on a given platform. Update the platform expectations for GTK
to reflect changes and new support which happened in the interim. And remove the
test from the list of expected failures.

  • accessibility/roles-computedRoleString.html:
  • platform/gtk/TestExpectations:
  • platform/gtk/accessibility/roles-computedRoleString-expected.txt:
12:10 PM Changeset in webkit [227157] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Regression(r223149): WebProcessProxy::didClose() no longer refs WebPageProxy objects
https://bugs.webkit.org/show_bug.cgi?id=181771
<rdar://problem/36566237>

Reviewed by Brady Eidson.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didClose):
Use copyToVectorOf<RefPtr<WebPageProxy>>() to maintain pre-r223149 behavior
and ref the pages.

11:49 AM Changeset in webkit [227156] by mitz@apple.com
  • 54 edits
    7 adds in trunk

[Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
https://bugs.webkit.org/show_bug.cgi?id=181803

Reviewed by Tim Horton.

Source/bmalloc:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Ditto.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Ditto.
  • Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
  • Configurations/Version.xcconfig: Updated.
  • Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings useful for defining settings that depend on the target macOS version.

Source/ThirdParty/ANGLE:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Ditto.

Source/ThirdParty/libwebrtc:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Ditto.
  • Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings useful for defining settings that depend on the target macOS version.
  • Configurations/opus.xcconfig: Adopted macOSTargetConditionals helper.

Source/WebCore:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Ditto.
  • Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
  • Configurations/Version.xcconfig: Updated.
  • Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings useful for defining settings that depend on the target macOS version.

Source/WebCore/PAL:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Ditto.
  • Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
  • Configurations/Version.xcconfig: Updated.
  • Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings useful for defining settings that depend on the target macOS version.

Source/WebInspectorUI:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Ditto.
  • Configurations/Version.xcconfig: Ditto.

Source/WebKit:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Ditto.
  • Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
  • Configurations/Version.xcconfig: Updated.
  • Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings useful for defining settings that depend on the target macOS version.

Source/WebKitLegacy/mac:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Ditto.
  • Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
  • Configurations/Version.xcconfig: Updated.
  • Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings useful for defining settings that depend on the target macOS version.

Source/WTF:

  • Configurations/Base.xcconfig: Updated.
  • Configurations/DebugRelease.xcconfig: Updated.

Tools:

  • DumpRenderTree/mac/Configurations/Base.xcconfig: Updated.
  • DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: Ditto.
  • ImageDiff/cg/Configurations/Base.xcconfig: Ditto.
  • ImageDiff/cg/Configurations/DebugRelease.xcconfig: Ditto.
  • MiniBrowser/Configurations/Base.xcconfig: Ditto.
  • MiniBrowser/Configurations/DebugRelease.xcconfig: Ditto.
  • TestWebKitAPI/Configurations/Base.xcconfig: Ditto.
  • TestWebKitAPI/Configurations/DebugRelease.xcconfig: Ditto.
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
  • TestWebKitAPI/Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings useful for defining settings that depend on the target macOS version.
  • WebKitTestRunner/Configurations/Base.xcconfig: Updated.
  • WebKitTestRunner/Configurations/DebugRelease.xcconfig: Updated.
11:41 AM Changeset in webkit [227155] by webkit@devinrousso.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Canvas Tab: record button on canvas card doesn't always show on hover, or is misplaced
https://bugs.webkit.org/show_bug.cgi?id=179183

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CanvasOverviewContentView.css:

(.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop): Deleted.

11:01 AM Changeset in webkit [227154] by lingcherd_ho@apple.com
  • 4 edits in trunk/Tools

Remove Opensource El Capitan queues from buildbot
https://bugs.webkit.org/show_bug.cgi?id=181712

Reviewed by Aakash Jain.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
10:46 AM Changeset in webkit [227153] by Chris Dumez
  • 7 edits in trunk

Service Workers restored from persistent storage have 'redundant' state
https://bugs.webkit.org/show_bug.cgi?id=181749
<rdar://problem/36556486>

Reviewed by Youenn Fablet.

Source/WebCore:

Tested by new API test.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::installContextData):
Make sure the SWServerWorker's state is set to "activated" after it is assigned to
the registrations' active slot. Otherwise, it stays in its default state (redundant).

Source/WebKit:

Allow service workers to intercept custom protocol loads as this is useful for
API testing.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::tryLoadingUsingURLSchemeHandler):

  • WebProcess/Network/WebLoaderStrategy.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

(-[SWMessageHandlerForFetchTest userContentController:didReceiveScriptMessage:]):

10:44 AM Changeset in webkit [227152] by msaboff@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

REGRESSION (r226068): [X86] Crash in JavaScriptCore ShadowChicken when handling exceptions
https://bugs.webkit.org/show_bug.cgi?id=181802

Reviewed by Filip Pizlo.

There where a few places where the stack isn't properly aligned for X86 when we call into C++ code.
Two places are where we call into exception handling code, the LLInt and from nativeForGenerator.
The other place was when we call into the operationOSRWriteBarrier().

Added an assert check that the stack is aligned on X86 platforms in the native call tracing code.
This helped find the other cases beyond the original problem.

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::osrWriteBarrier):

  • interpreter/FrameTracers.h:

(JSC::assertStackPointerIsAligned):
(JSC::NativeCallFrameTracer::NativeCallFrameTracer):
(JSC::NativeCallFrameTracerWithRestore::NativeCallFrameTracerWithRestore):

  • jit/ThunkGenerators.cpp:

(JSC::nativeForGenerator):

  • llint/LowLevelInterpreter32_64.asm:
10:38 AM Changeset in webkit [227151] by jdiggs@igalia.com
  • 6 edits
    3 adds in trunk

[GTK] AX: Two layout tests crash with error 'g_strstr_len: assertion 'haystack != NULL' failed' in Accessibility::UIElement::url
https://bugs.webkit.org/show_bug.cgi?id=176796

Reviewed by Chris Fleizach.

Tools:

Add sanity check that we have a URL before calling g_strstr_len().

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::url):

LayoutTests:

Remove failing tests from Test Expectations. Update expected results of
xml-roles-exposed to reflect several bug fixes which were made in the
interim. Modify add-children-pseudo-element.html to account for platform
differences in the accessibility tree. Add an additional URL test because
we didn't have coverage for getting the URL of accessible links resulting
from native anchor elements.

  • accessibility/add-children-pseudo-element.html: Modified.
  • accessibility/gtk/link-url-expected.txt: Added.
  • accessibility/gtk/link-url.html: Added.
  • accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
  • platform/gtk/TestExpectations: Removed failing tests.
  • platform/gtk/accessibility/add-children-pseudo-element-expected.txt: Added.
10:31 AM Changeset in webkit [227150] by Ryan Haddad
  • 2 edits in trunk/Tools

Add triggers for Sierra test262 and perf queues
https://bugs.webkit.org/show_bug.cgi?id=181799

Reviewed by Aakash Jain.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
10:15 AM Changeset in webkit [227149] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebKit

Cherry-pick r227146. rdar://problem/36624319

10:12 AM Changeset in webkit [227148] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked multiple imported/w3c/web-platform-tests/service-workers/ test as flaky
https://bugs.webkit.org/show_bug.cgi?id=181750

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:50 AM Changeset in webkit [227147] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

REGRESSION(r225650): The scores of MotionMark tests Multiply and Leaves dropped by 8%
https://bugs.webkit.org/show_bug.cgi?id=181460
<rdar://problem/36379776>

Reviewed by Ryosuke Niwa.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):

Don't do the expensive security origin test if the supplied sheet base URL is null. This
is true for rules coming from the same document.

9:49 AM Changeset in webkit [227146] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION(r225858): Sandbox violations due to blocked access to Spotlight search preferences
https://bugs.webkit.org/show_bug.cgi?id=181797
<rdar://problem/36546412>

Reviewed by Eric Carlson.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add the read permission for

'com.apple.lookup.shared' to support DataDetectors.

9:37 AM Changeset in webkit [227145] by Antti Koivisto
  • 3 edits
    2 adds in trunk

REGRESSION (r223604): Setting :before/after pseudo element on <noscript> asserts
https://bugs.webkit.org/show_bug.cgi?id=181795
<rdar://problem/36334524>

Reviewed by David Kilzer.

Source/WebCore:

<noscript> disallows renderer generation outside CSS mechanisms, however we would still construct
PseudoElements for them during style resolution. These were never removed properly because the
pseudo element removal was tied to render tree teardown. Without proper removal the associated
animations were also not canceled.

Test: fast/css-generated-content/noscript-pseudo-anim-crash.html

  • dom/Element.cpp:

(WebCore::Element::removedFromAncestor):

Take care to get rid of PseudoElements when the element is removed from the tree.
This also cancels any associated animations.

LayoutTests:

  • fast/css-generated-content/noscript-pseudo-anim-crash-expected.txt: Added.
  • fast/css-generated-content/noscript-pseudo-anim-crash.html: Added.
9:26 AM Changeset in webkit [227144] by Chris Fleizach
  • 8 edits
    2 adds in trunk

AX: Aria-activedescendant not supported
https://bugs.webkit.org/show_bug.cgi?id=161734
<rdar://problem/28202679>

Reviewed by Joanmarie Diggs.

Source/WebCore:

When a combo-box owns/controls a list/listbox/grid/tree, the owned element needs to check the active-descendant of the combobox when
checking if it has selected children.
The target of the selection change notification should also be the owned element in these cases.

Test: accessibility/aria-combobox-controlling-list.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::selectedListItem):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::targetElementForActiveDescendant const):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::canHaveSelectedChildren const):
(WebCore::AccessibilityRenderObject::selectedChildren):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:

  • accessibility/aria-combobox-control-owns-elements-expected.txt: Added.
  • accessibility/aria-combobox-control-owns-elements.html: Added.
8:52 AM Changeset in webkit [227143] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark fast/forms/auto-fill-button/input-strong-password-auto-fill-button.html as failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=181662

Unreviewed test gardening.

  • platform/win/TestExpectations:
8:46 AM Changeset in webkit [227142] by mitz@apple.com
  • 3 edits in trunk

[Xcode] Shared schemes in the WebKit workspace still have build pre-actions that invoke copy-webkitlibraries-to-product-directory
https://bugs.webkit.org/show_bug.cgi?id=181784

Reviewed by Anders Carlsson.

  • WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme: Remove the build pre-action.
  • WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme: Ditto.
8:13 AM Changeset in webkit [227141] by pvollan@apple.com
  • 6 edits
    2 adds in trunk

REGRESSION (r224780): Text stroke not applied to video captions.
https://bugs.webkit.org/show_bug.cgi?id=181743
<rdar://problem/35874338>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: media/track/track-css-visible-stroke-expected.html

media/track/track-css-visible-stroke.html

After r224780, it is no longer possible to mix text stroke styles with webkit
legacy text stroke styles.

  • css/StyleResolver.cpp:

(WebCore::isValidCueStyleProperty):

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS const):

LayoutTests:

  • media/track/track-css-stroke-cues-expected.txt:
  • media/track/track-css-stroke-cues.html:
  • media/track/track-css-visible-stroke-expected.html: Added.
  • media/track/track-css-visible-stroke.html: Added.
7:42 AM Changeset in webkit [227140] by aestes@apple.com
  • 13 edits
    2 adds in trunk

[Payment Request] Support a default shipping address for Apple Pay
https://bugs.webkit.org/show_bug.cgi?id=181754
<rdar://problem/36009733>

Reviewed by Brady Eidson.

Source/WebCore:

Move shippingContact from ApplePayPaymentRequest to ApplePayRequestBase. This allows
merchants to specify a default shipping address when using Apple Pay with Payment Request.

This also fixes a bug found during testing where
+[NSPersonNameComponentsFormatter localizedStringFromPersonNameComponents:style:options:]
would throw an exception when passed a nil NSPersonNameComponents.

Test: http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html

  • Modules/applepay/ApplePayPaymentRequest.h:
  • Modules/applepay/ApplePayPaymentRequest.idl:
  • Modules/applepay/ApplePayRequestBase.cpp:

(WebCore::convertAndValidate):

  • Modules/applepay/ApplePayRequestBase.h:
  • Modules/applepay/ApplePayRequestBase.idl:
  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):

  • Modules/applepay/ApplePaySessionPaymentRequest.h:

(WebCore::ApplePaySessionPaymentRequest::version const):
(WebCore::ApplePaySessionPaymentRequest::setVersion):

  • Modules/applepay/cocoa/PaymentContactCocoa.mm:

(WebCore::convert):

  • Modules/applepay/paymentrequest/ApplePayRequest.idl:
  • testing/MockPaymentCoordinator.cpp:

(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::completeMerchantValidation):

  • testing/MockPaymentCoordinator.h:

LayoutTests:

  • http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt: Added.
  • http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html: Added.
6:33 AM Changeset in webkit [227139] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/viewport/viewport-resize-event-on-load-overflowing-page.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=181435

Patch by Ali Juma <ajuma@chromium.org> on 2018-01-18
Reviewed by Frédéric Wang.

Test gardening. The flakiness was fixed by r227054, so remove the test expectation.

2:11 AM Changeset in webkit [227138] by Carlos Garcia Campos
  • 3 edits in trunk/WebDriverTests

Unreviewed. Update Selenium WebDriver imported tests.

  • imported/selenium/importer.json:
  • imported/selenium/py/test/selenium/webdriver/common/executing_async_javascript_tests.py:

(reset_timeouts):

12:33 AM Changeset in webkit [227137] by jer.noble@apple.com
  • 3 edits in trunk/LayoutTests

Layout Test http/tests/images/image-supports-video.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=181008
<rdar://problem/36143943>

Reviewed by Youenn Fablet.

Send a "Cache-control: nocache" header from the HTTP server when the image resource is
requested.

  • http/tests/resources/redirect-to-video-if-accepted.php:
  • platform/mac-wk1/TestExpectations:
12:27 AM Changeset in webkit [227136] by commit-queue@webkit.org
  • 6 edits in trunk/Source/JavaScriptCore

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

"it caused a 15% octane regression" (Requested by saamyjoon on
#webkit).

Reverted changeset:

"Support MultiGetByOffset in the DFG"
https://bugs.webkit.org/show_bug.cgi?id=181466
https://trac.webkit.org/changeset/227096

12:24 AM Changeset in webkit [227135] by Wenson Hsieh
  • 5 edits in trunk

[iOS] Specify -[NSURL _title] for the associated URL when copying an image element
https://bugs.webkit.org/show_bug.cgi?id=181783
<rdar://problem/35785445>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Always specify the -[NSURL _title] to be either the title specified in a PasteboardImage's inner PasteboardURL,
or if no title is specified, fall back to the user-visible URL string. This is because at least one internal
client always tries to use the -_title property to determine the title of a pasted URL, or if none is specified,
the -suggestedName. Since we need to set suggestedName to the preferred file name of the copied image and we
don't want the suggested name to become the title of the link, we need to explicitly set the link title.

In doing so, this patch also fixes a bug wherein we forget to set the _title of the NSURL we're registering to
an NSItemProvider.

Tests: ActionSheetTests.CopyImageElementWithHREFAndTitle (new)

ActionSheetTests.CopyImageElementWithHREF (modified)

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::write):

Tools:

Augments an existing API test and adds a new test to make sure that the resulting NSItemProvider's NSURL when
copying an image contains a relevant title.

  • TestWebKitAPI/Tests/ios/ActionSheetTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/DataInteractionSimulator.mm:
  • TestWebKitAPI/ios/UIKitSPI.h:

Jan 17, 2018:

11:30 PM Changeset in webkit [227134] by rniwa@webkit.org
  • 2 edits in trunk/PerformanceTests

Temporarily skip Speedometer until we fix the metrics.

  • Skipped:
11:24 PM Changeset in webkit [227133] by rniwa@webkit.org
  • 3 edits
    1 move in trunk/Websites/perf.webkit.org

Rename config.json to config.json.sample
https://bugs.webkit.org/show_bug.cgi?id=181785

Reviewed by Wenson Hsieh.

  • .gitignore: Added config.json.
  • ReadMe.md: Updated the instruction.
  • config.json.sample: Renamed from config.json.
11:24 PM Changeset in webkit [227132] by jmarcell@apple.com
  • 4 edits
    6 adds in branches/safari-605-branch

Cherry-pick r227121. rdar://problem/36609529

11:24 PM Changeset in webkit [227131] by jmarcell@apple.com
  • 4 edits in branches/safari-605-branch

Cherry-pick r227104. rdar://problem/36609536

11:24 PM Changeset in webkit [227130] by jmarcell@apple.com
  • 6 edits in branches/safari-605-branch/Source/JavaScriptCore

Cherry-pick r227096. rdar://problem/36609546

11:24 PM Changeset in webkit [227129] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r227094. rdar://problem/36600688

11:24 PM Changeset in webkit [227128] by jmarcell@apple.com
  • 5 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r226934. rdar://problem/36567980

10:51 PM Changeset in webkit [227127] by Carlos Garcia Campos
  • 5 edits in trunk

WebDriver: ignore the driver in selenium test names when getting expectations
https://bugs.webkit.org/show_bug.cgi?id=181738

Reviewed by Carlos Alberto Lopez Perez.

Tools:

In selenium tests, the driver is added as a parameter to every test which results in tests names like
foo[DriverName] or foo[DriverName-param2] in case of tests using more parameters. We don't want to include the
driver name in the test expectations file, so we need to remove it when querying the expectations.

  • Scripts/webkitpy/webdriver_tests/pytest_runner.py:

(TestExpectationsMarker.init): Save the param to ignore.
(TestExpectationsMarker._item_name): Return the name of the test without the para to ignore.
(TestExpectationsMarker.pytest_collection_modifyitems): Use _item_name().
(run): Pass param to ignore to TestExpectationsMarker().

  • Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:

(WebDriverSeleniumExecutor.init): Save the driver name.
(WebDriverSeleniumExecutor.run): Pass the driver name as param to ignore.

WebDriverTests:

Add some expectations for selenium tests.

10:50 PM Changeset in webkit [227126] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][WPE] Show unit tests unexpectedly passing in the bots
https://bugs.webkit.org/show_bug.cgi?id=181726

Reviewed by Michael Catanzaro.

Now that we have the info, let's show it also in the bots.

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(RunGLibAPITests.commandComplete):

10:45 PM Changeset in webkit [227125] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Unreviewed build fixes in TestGroupResultsViewer.

  • public/v3/components/test-group-results-viewer.js:

(TestGroupResultsViewer.prototype.render): _renderCurrentMetricsLazily was never called.
(TestGroupResultsViewer.prototype._buildRowForMetric): Don't try to render null or NaN.

10:17 PM Changeset in webkit [227124] by jmarcell@apple.com
  • 15 edits
    2 copies
    1 move
    5 adds
    1 delete in branches/safari-605-branch

Cherry-pick r227103. rdar://problem/36598105

10:17 PM Changeset in webkit [227123] by jmarcell@apple.com
  • 15 edits
    1 move
    1 add
    7 deletes in branches/safari-605-branch

Cherry-pick r227093. rdar://problem/36598105

10:06 PM Changeset in webkit [227122] by rniwa@webkit.org
  • 6 edits in trunk/Websites/perf.webkit.org

Fix perf dashboard tests for node v8
https://bugs.webkit.org/show_bug.cgi?id=181782

Reviewed by Wenson Hsieh.

Fixed the various tests for node.js v8, which is the latest LTS version.

  • server-tests/api-manifest-tests.js: Replaced the missing Triggerable.acceptsTest by Triggerable.acceptedTests

after r226836.

  • server-tests/api-measurement-set-tests.js: Added "Z" to the end timestamps to force UTF timezone now that Date

in node.js parses using the local timezone by default.

  • server-tests/resources/test-server.js:

(TestServer.prototype._restoreDataDirectory): Fixed the bug that this function was erroneously using the async
function to rename a directory per new warnings. This code was racy, and it used to cause a test error occasionally.

  • server-tests/tools-os-build-fetcher-tests.js: Fixed the assertions to make it work in the latest node.js.
  • unit-tests/measurement-set-tests.js:

(waitForMeasurementSet): Wait for setTimeout to cycle through all microtasks instead of just two microtask cycles.

9:55 PM Changeset in webkit [227121] by jer.noble@apple.com
  • 4 edits
    6 adds in trunk

WebVTT served via HLS never results in cues
https://bugs.webkit.org/show_bug.cgi?id=181773

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/media/hls/hls-webvtt-tracks.html

Three independant errors conspired to keep in-band WebVTT samples from parsing:

  • The definition of ISOWebVTTCue::boxTypeName() was incorrect.
  • ISOWebVTTCue::parse() didn't call it's superclass's parse() method (leading to an incorrect size and offset).
  • Use String::fromUTF8() rather than String.adopt(StringVector&&).
  • platform/graphics/iso/ISOVTTCue.cpp:

(WebCore::ISOWebVTTCue::parse):

  • platform/graphics/iso/ISOVTTCue.h:

(WebCore::ISOWebVTTCue::boxTypeName):

LayoutTests:

  • http/tests/media/hls/hls-webvtt-tracks-expected.txt: Added.
  • http/tests/media/hls/hls-webvtt-tracks.html: Added.
  • http/tests/media/resources/hls/subtitles/fileSequence0.webvtt: Added.
  • http/tests/media/resources/hls/subtitles/prog_index.m3u8: Added.
  • http/tests/media/resources/hls/test-webvtt.m3u8: Added.
9:48 PM Changeset in webkit [227120] by jmarcell@apple.com
  • 3 edits
    2 adds in branches/safari-605-branch

Cherry-pick r227087. rdar://problem/36597993

9:48 PM Changeset in webkit [227119] by jmarcell@apple.com
  • 5 edits in branches/safari-605-branch/Source/WebInspectorUI

Cherry-pick r227078. rdar://problem/36597996

9:47 PM Changeset in webkit [227118] by jmarcell@apple.com
  • 15 edits
    2 copies
    1 move
    5 adds
    1 delete in branches/safari-605-branch

Cherry-pick r227076. rdar://problem/36598105

9:47 PM Changeset in webkit [227117] by jmarcell@apple.com
  • 12 edits
    2 adds in branches/safari-605-branch

Cherry-pick r227075. rdar://problem/36598185

9:47 PM Changeset in webkit [227116] by jmarcell@apple.com
  • 3 edits
    5 adds in branches/safari-605-branch

Cherry-pick r227074. rdar://problem/36598123

9:47 PM Changeset in webkit [227115] by jmarcell@apple.com
  • 3 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r227073. rdar://problem/36598265

9:47 PM Changeset in webkit [227114] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WTF

Cherry-pick r227071. rdar://problem/36598125

9:47 PM Changeset in webkit [227113] by jmarcell@apple.com
  • 6 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r227070. rdar://problem/36598339

9:47 PM Changeset in webkit [227112] by jmarcell@apple.com
  • 3 edits
    1 add in branches/safari-605-branch

Cherry-pick r227053. rdar://problem/36587231

9:47 PM Changeset in webkit [227111] by jmarcell@apple.com
  • 3 edits in branches/safari-605-branch/Source/JavaScriptCore

Cherry-pick r227047. rdar://problem/36587246

9:47 PM Changeset in webkit [227110] by jmarcell@apple.com
  • 62 edits
    1 move
    2 deletes in branches/safari-605-branch

Cherry-pick r226940. rdar://problem/36598019

9:47 PM Changeset in webkit [227109] by jmarcell@apple.com
  • 16 edits in branches/safari-605-branch

Cherry-pick r226752. rdar://problem/36601128

9:03 PM Changeset in webkit [227108] by webkit@devinrousso.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: clicking on a path component that has no siblings should select it
https://bugs.webkit.org/show_bug.cgi?id=181772

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/HierarchicalPathComponent.js:

(WI.HierarchicalPathComponent.prototype._updateSelectElement):
(WI.HierarchicalPathComponent.prototype._selectElementMouseDown):

8:17 PM Changeset in webkit [227107] by Yusuke Suzuki
  • 31 edits
    11 adds in trunk

[DFG][FTL] Introduce PhantomNewRegexp and RegExpExecNonGlobalOrSticky
https://bugs.webkit.org/show_bug.cgi?id=181535

Reviewed by Saam Barati.

JSTests:

  • stress/inserted-recovery-with-set-last-index.js: Added.

(shouldBe):
(foo):

  • stress/materialize-regexp-at-osr-exit.js: Added.

(shouldBe):
(test):

  • stress/materialize-regexp-cyclic-regexp-at-osr-exit.js: Added.

(shouldBe):
(test):

  • stress/materialize-regexp-cyclic-regexp.js: Added.

(shouldBe):
(test):
(i.switch):

  • stress/materialize-regexp-cyclic.js: Added.

(shouldBe):
(test):
(i.switch):

  • stress/materialize-regexp-referenced-from-phantom-regexp-cyclic.js: Added.

(bar):
(foo):
(test):

  • stress/materialize-regexp-referenced-from-phantom-regexp.js: Added.

(bar):
(foo):
(test):

  • stress/materialize-regexp.js: Added.

(shouldBe):
(test):

  • stress/phantom-regexp-regexp-exec.js: Added.

(shouldBe):
(test):

  • stress/phantom-regexp-string-match.js: Added.

(shouldBe):
(test):

  • stress/regexp-last-index-sinking.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

When executing the code like string.match(/regexp/), /regexp/ object is created every time we execute this code.
However, user rarely cares about this /regexp/ object. Typically, it is soon discarded even if it has lastIndex
information. So we should not create RegExpObject for this typical case.

This patch introduces PhantomNewRegexp. We convert NewRegexp node to PhantomNewRegexp in Object Allocation Sinking (OAS)
phase. We should do this analysis in OAS phase since we track modifications to lastIndex in the OAS phase. Even if
lastIndex is modified, it may not be read by users. So we have a chance to drop this NewRegexp beacause we carefully model
SetRegExpObjectLastIndex and GetRegExpObjectLastIndex in OAS phase.

This patch is a first attempt to drop NewRegexp. So we start optimizing it with the simple step: we first drop RegExp with
non-global and non-sticky one. We can later extend this optimization for RegExp with global flag. But this is not included
in this patch.

We convert RegExpExec to RegExpExecNonGlobalOrSticky if we find that the given RegExpObject's RegExp is not global/sticky
flagged. Since we do not need to touch lastIndex property in this case, RegExpExecNonGlobalOrSticky just takes RegExp
instead of RegExpObject. This offers the chance to make NewRegExp unused.

We also convert RegExpMatchFast to RegExpExecNonGlobalOrSticky if its RegExpObject's RegExp is non-global and non-sticky,
since they are the same behavior.

The above optimization completely removes NewRegexp in SixSpeed's regexp-u.{es5,es6}. The resulted execution time is
somewhat pure execution time of our Yarr implementation.

baseline patched

regex-u.es5 34.8557+-0.5963 6.1507+-0.5526 definitely 5.6670x faster
regex-u.es6 89.1919+-3.3851 32.0917+-0.4260 definitely 2.7793x faster

This patch does not change Octane/RegExp so much since it heavily uses String.prototype.replace, which is not handled in
this patch right now. We should support StringReplace node in subsequent patches.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.cpp:

(JSC::DFG::Node::convertToRegExpExecNonGlobalOrSticky):

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToPhantomNewRegexp):
(JSC::DFG::Node::convertToSetRegExpObjectLastIndex):
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasCellOperand):
(JSC::DFG::Node::isPhantomAllocation):
(JSC::DFG::Node::hasIgnoreLastIndexIsWritable):
(JSC::DFG::Node::ignoreLastIndexIsWritable):

  • dfg/DFGNodeType.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGPromotedHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGPromotedHeapLocation.h:

(JSC::DFG::PromotedLocationDescriptor::neededForMaterialization const):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewRegexp):
(JSC::DFG::SpeculativeJIT::compileSetRegExpObjectLastIndex):
(JSC::DFG::SpeculativeJIT::compileRegExpExecNonGlobalOrSticky):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpExecNonGlobalOrSticky):
(JSC::FTL::DFG::LowerDFGToB3::compileNewRegexp):
(JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex):

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):

  • jit/JITOperations.h:
  • runtime/RegExpObject.h:

(JSC::RegExpObject::create):

7:15 PM Changeset in webkit [227106] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[FTL] Remove unused helper functions to convert node to PutHint
https://bugs.webkit.org/show_bug.cgi?id=181775

Reviewed by Saam Barati.

We are using PromotedHeapLocation::createHint. So they are not necessary.

  • dfg/DFGNode.cpp:

(JSC::DFG::Node::convertToPutHint): Deleted.
(JSC::DFG::Node::convertToPutStructureHint): Deleted.
(JSC::DFG::Node::convertToPutByOffsetHint): Deleted.
(JSC::DFG::Node::convertToPutClosureVarHint): Deleted.

  • dfg/DFGNode.h:
6:45 PM Changeset in webkit [227105] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, suppress warnings on GCC

Since length and p are always positive or zero,
static_cast<unsigned>() does what we want.

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::parseInt):

5:58 PM Changeset in webkit [227104] by sbarati@apple.com
  • 4 edits in trunk

Disable Atomics when SharedArrayBuffer isn’t enabled
https://bugs.webkit.org/show_bug.cgi?id=181572
<rdar://problem/36553206>

Reviewed by Michael Saboff.

JSTests:

  • stress/isLockFree.js:

Source/JavaScriptCore:

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::createAtomicsProperty): Deleted.

5:58 PM Changeset in webkit [227103] by wilander@apple.com
  • 15 edits
    2 copies
    1 move
    5 adds
    1 delete in trunk

Resource Load Statistics: Block cookies for prevalent resources without user interaction
https://bugs.webkit.org/show_bug.cgi?id=177394
<rdar://problem/34613960>

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect.html

http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html
http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html
http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html

  • platform/network/NetworkStorageSession.h:

Now exports NetworkStorageSession::nsCookieStorage().

  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::setPrevalentDomainsToPartitionOrBlockCookies):

Fixes the FIXME.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Declaration of _initWithIdentifier() on NSHTTPCookieStorage.

Source/WebKit:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:

Now has m_hasBeenSetToUseStatelessCookieStorage to handle
cookie blocking.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::statelessCookieStorage):

Returns singleton empty, deny-all cookie storage for cookie blocking.
The ugly pragma instructions for clang are because the NSString
parameter for _initWithIdentifier was not marked nullable pre-Sierra.

(WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):

Instead of just decision making, this now applies the policy.

(WebKit::NetworkDataTaskCocoa::applyCookiePartitioningPolicy):

New method.

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

Now blocks cookies for domains where cookies will be purged anyway.

(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

Now blocks cookies for domains where cookies will be purged anyway.

(WebKit::shouldChangePartition): Deleted.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):

Now downgrades for blocked cookies instead of partitioned cookies.

(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):

Now downgrades for blocked cookies instead of partitioned cookies.

LayoutTests:

  • http/tests/resourceLoadStatistics/add-blocking-to-redirect-expected.txt: Added.
  • http/tests/resourceLoadStatistics/add-blocking-to-redirect.html: Added.
  • http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html: Added.
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt: Added.
  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html: Added.
  • http/tests/resourceLoadStatistics/remove-partitioning-from-redirect-expected.txt: Removed.
  • http/tests/resourceLoadStatistics/remove-partitioning-from-redirect.html: Removed.

Test case reworked and is now remove-partitioning-in-redirect.html.

  • http/tests/resourceLoadStatistics/remove-partitioning-in-redirect-expected.txt: Added.
  • http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html: Added.
  • platform/ios/TestExpectations:

New tests marked as [ Pass ] for iOS.

  • platform/mac-wk2/TestExpectations:

New tests marked as [ Pass ] for High Sierra+.

  • platform/wk2/TestExpectations:

New tests skipped for WK2 in general.

5:47 PM Changeset in webkit [227102] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Remove linked-on test for Snow Leopard
https://bugs.webkit.org/show_bug.cgi?id=181770

Reviewed by Eric Carlson.

Source/WebCore:

Remove a very old linked-on-or-after test.

  • platform/graphics/ca/GraphicsLayerCA.cpp:
5:31 PM Changeset in webkit [227101] by Matt Lewis
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r227098.

This broke the build.

Reverted changeset:

"Remove linked-on test for Snow Leopard"
https://bugs.webkit.org/show_bug.cgi?id=181770
https://trac.webkit.org/changeset/227098

4:59 PM Changeset in webkit [227100] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

4:52 PM WebKitGTK/Gardening/Calendar edited by aboya@igalia.com
(diff)
4:52 PM Changeset in webkit [227099] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.2

Tag Safari-606.1.2.

4:40 PM Changeset in webkit [227098] by dino@apple.com
  • 4 edits in trunk/Source/WebCore

Remove linked-on test for Snow Leopard
https://bugs.webkit.org/show_bug.cgi?id=181770

Reviewed by Eric Carlson.

Source/WebCore:

Remove a very old linked-on-or-after test.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

Source/WebCore/PAL:

No need for _CFExecutableLinkedOnOrAfter any more.

  • pal/spi/cf/CFUtilitiesSPI.h:
4:39 PM Changeset in webkit [227097] by aboya@igalia.com
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening

  • platform/gtk/TestExpectations:
4:34 PM Changeset in webkit [227096] by sbarati@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Support MultiGetByOffset in the DFG
https://bugs.webkit.org/show_bug.cgi?id=181466

Reviewed by Keith Miller.

This seems to benefit Speedometer in my local testing. It seems like this
might be around a 0.5% improvement.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleGetById):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::supportsMultiGetByOffset):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

4:26 PM Changeset in webkit [227095] by commit-queue@webkit.org
  • 4 edits in trunk/Source

[Curl] Use ResourceRequest::encodeWithPlatformData()
https://bugs.webkit.org/show_bug.cgi?id=181768

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2018-01-17
Reviewed by Alex Christensen.

Source/WebCore:

No new tests, assertion hit in downstream port, should be covered by
existing tests.

  • platform/network/curl/ResourceRequest.h:

(WebCore::ResourceRequest::encodeWithPlatformData const):
(WebCore::ResourceRequest::decodeWithPlatformData):

Source/WebKit:

  • Shared/curl/WebCoreArgumentCodersCurl.cpp:

(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

4:04 PM Changeset in webkit [227094] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

Use existing RGB colorspace instead of creating a new one
https://bugs.webkit.org/show_bug.cgi?id=181765
<rdar://problem/36595753>

Reviewed by Dean Jackson.

  • platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:

(WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream): Use sRGBColorSpaceRef instead
of creating a new static colorspace.

3:49 PM Changeset in webkit [227093] by Matt Lewis
  • 15 edits
    1 move
    1 add
    7 deletes in trunk

Unreviewed, rolling out r227076.

This breaks internal builds

Reverted changeset:

"Resource Load Statistics: Block cookies for prevalent
resources without user interaction"
https://bugs.webkit.org/show_bug.cgi?id=177394
https://trac.webkit.org/changeset/227076

3:19 PM Changeset in webkit [227092] by rniwa@webkit.org
  • 7 edits in trunk/Source/WebCore

input and textarea elements should reveal selection in setSelection when focused
https://bugs.webkit.org/show_bug.cgi?id=181715
<rdar://problem/36570546>

Reviewed by Zalan Bujtas.

Made input and textarea elements reveal selection in FrameSelection::setSelection instead of by directly
invoking FrameSelection::revealSelection in their respective updateFocusAppearance to unify code paths.

Also added options to reveal selection up to the main frame to SetSelectionOption to be used in iOS.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::moveWithoutValidationTo): Takes SelectionRevealMode as an argument and converts
sets appropriate selection options.
(WebCore::FrameSelection::setSelection): Reconstruct SelectionRevealMode out of selection option sets.
(WebCore::FrameSelection::updateAndRevealSelection):

  • editing/FrameSelection.h:

(WebCore::FrameSelection): Added RevealSelectionUpToMainFrame as a SelectionRevealMode and replaced
m_shouldRevealSelection by m_selectionRevealMode.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::updateFocusAppearance): Pass SelectionRevealMode to HTMLTextFormControlElement's
select and restoreCachedSelection instead of directly invoking FrameSelection::revealSelection.

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::updateFocusAppearance): Ditto.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::restoreCachedSelection):

  • html/HTMLTextFormControlElement.h:
3:19 PM Changeset in webkit [227091] by lingcherd_ho@apple.com
  • 2 edits in trunk/Tools

Fix broken unittest after r227048
https://bugs.webkit.org/show_bug.cgi?id=181760

Reviewed by Aakash Jain.

3:18 PM Changeset in webkit [227090] by Michael Catanzaro
  • 11 edits in trunk

WEBKIT_FRAMEWORK should not modify file-global include directories
https://bugs.webkit.org/show_bug.cgi?id=181656

Reviewed by Konstantin Tokarev.

.:

Only modify the system include directories of the target passed to WEBKIT_FRAMEWORK.

  • Source/cmake/WebKitMacros.cmake:

Source/WebCore:

  • CMakeLists.txt:
  • PlatformWPE.cmake:

Source/WebKit:

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:

Tools:

  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/glib/CMakeLists.txt:
3:16 PM Changeset in webkit [227089] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[GTK] Try even harder not to static link WTF into libwebkit2gtk
https://bugs.webkit.org/show_bug.cgi?id=181751

Reviewed by Alex Christensen.

We don't want two copies of WTF. It should only be in libjavascriptcoregtk.

  • PlatformGTK.cmake:
2:49 PM Changeset in webkit [227088] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked http/wpt/resource-timing/rt-resources-per-worker.html as flaky on High Sierra.
https://bugs.webkit.org/show_bug.cgi?id=180260

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:37 PM Changeset in webkit [227087] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Multicol: RenderMultiColumnFlow should not inherit the flow state
https://bugs.webkit.org/show_bug.cgi?id=181762
<rdar://problem/35448565>

Reviewed by Simon Fraser.

Source/WebCore:

Do not compute the inherited flow state flag for RenderMultiColumnFlow.
It is (by definition) always inside a fragmented flow.

Test: fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::computedFragmentedFlowState):

LayoutTests:

  • fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow-expected.txt: Added.
  • fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html: Added.
2:34 PM Changeset in webkit [227086] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Deprecate Application Cache
https://bugs.webkit.org/show_bug.cgi?id=181764

Reviewed by Geoffrey Garen.

  • features.json:
2:25 PM Changeset in webkit [227085] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] Re-enable LayoutTests in the storage/indexeddb directory
https://bugs.webkit.org/show_bug.cgi?id=180958

Unreviewed test gardening.

  • platform/ios/TestExpectations:
2:16 PM Changeset in webkit [227084] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[iOS simulator] API test WKAttachmentTests.InjectedBundleReplaceURLWhenPastingImage is failing
https://bugs.webkit.org/show_bug.cgi?id=181758

Reviewed by Tim Horton.

This test is failing because Editor::clientReplacementURLForResource expects a MIME type, but on iOS, the type
paramter passed into WebContentReader::readImage is a UTI; subsequently, the bundle editing delegate receives
a MIME type that's actually a UTI, which is incorrect. To address this, ensure that a MIME type is passed to
bundle SPI by converting the type in WebContentReader::readImage to a MIME type.

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::WebContentReader::readImage):

2:01 PM Changeset in webkit [227083] by aboya@igalia.com
  • 2 edits in trunk/Tools

Mark Alicia as committer in contributors.json

1:53 PM Changeset in webkit [227082] by Antti Koivisto
  • 5 edits
    2 adds in trunk

REGRESSION (r226385?): Crash in com.apple.WebCore: WebCore::MediaQueryEvaluator::evaluate const + 32
https://bugs.webkit.org/show_bug.cgi?id=181742
<rdar://problem/36334726>

Reviewed by David Kilzer.

Source/WebCore:

Test: fast/media/mediaqueryevaluator-crash.html

  • css/MediaQueryEvaluator.cpp:

(WebCore::MediaQueryEvaluator::MediaQueryEvaluator):

Use WeakPtr<Document> instead of a plain Frame pointer.

(WebCore::MediaQueryEvaluator::evaluate const):

Get the frame via document.

  • css/MediaQueryEvaluator.h:
  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction):

Take care to clear style resolver.

LayoutTests:

  • fast/media/mediaqueryevaluator-crash-expected.txt: Added.
  • fast/media/mediaqueryevaluator-crash.html: Added.
1:37 PM Changeset in webkit [227081] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked inspector/worker/worker-recover-if-inspector-close.html as flaky on macOS
https://bugs.webkit.org/show_bug.cgi?id=181100

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:27 PM Changeset in webkit [227080] by Simon Fraser
  • 3 edits in trunk/LayoutTests

REGRESSION (r226902): fast/events/ios/rotation/layout-viewport-during-rotation.html and fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html are timing out
<rdar://problem/36589755>

The first argument to a load event listener is an event, which meant that passing scriptCompleteCallback
didn't work as expected.

  • fast/events/ios/rotation/layout-viewport-during-rotation.html:
  • fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html:
1:06 PM Changeset in webkit [227079] by commit-queue@webkit.org
  • 23 edits in trunk

Source/WebCore:
Put fetch request keepAlive behind a runtime flag
https://bugs.webkit.org/show_bug.cgi?id=181592

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-17
Reviewed by Chris Dumez.

No change of behavior.

  • Modules/fetch/FetchRequest.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::fetchAPIKeepAliveEnabled const):
(WebCore::RuntimeEnabledFeatures::setFetchAPIKeepAliveEnabled):

Source/WebKit:
Put fetch request keepAlive behind a runtime flag
https://bugs.webkit.org/show_bug.cgi?id=181592

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-17
Reviewed by Chris Dumez.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetFetchAPIKeepAliveEnabled):
(WKPreferencesGetFetchAPIKeepAliveEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:
Put fetch Request.keepalive behind a runtime flag
https://bugs.webkit.org/show_bug.cgi?id=181592

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-17
Reviewed by Chris Dumez.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences fetchAPIKeepAliveEnabled]):
(-[WebPreferences setFetchAPIKeepAliveEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:
Put fetch Request.keepalive behind a runtime flag
https://bugs.webkit.org/show_bug.cgi?id=181592

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-17
Reviewed by Chris Dumez.

  • WebPreferences.cpp:

(WebPreferences::fetchAPIKeepAliveEnabled):
(WebPreferences::setFetchAPIKeepAliveEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:
Put fetch Request.keepalive behind a runtime flag
https://bugs.webkit.org/show_bug.cgi?id=181592

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-17
Reviewed by Chris Dumez.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(enableExperimentalFeatures):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

12:25 PM Changeset in webkit [227078] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Add back localized strings for Styles sidebar panels
https://bugs.webkit.org/show_bug.cgi?id=181748
<rdar://problem/36583184>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-01-17
Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:

(WI.ComputedStyleDetailsSidebarPanel):

  • UserInterface/Views/RulesStyleDetailsSidebarPanel.js:

(WI.RulesStyleDetailsSidebarPanel):

  • UserInterface/Views/VisualStyleDetailsSidebarPanel.js:

(WI.VisualStyleDetailsSidebarPanel):
Add back localized strings for panel titles lost in r225547.

11:35 AM Changeset in webkit [227077] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win] Use switch when converting from ResourceRequestCachePolicy to platform cache policy.
https://bugs.webkit.org/show_bug.cgi?id=181686

Reviewed by Alex Christensen.

No new tests, covered by existing tests.

A switch will make the function easier on the eyes. Also, use the function in places where the ResourceRequestCachePolicy
is just casted to a platform cache policy.

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::toPlatformRequestCachePolicy):

11:16 AM Changeset in webkit [227076] by wilander@apple.com
  • 15 edits
    2 copies
    1 move
    5 adds
    1 delete in trunk

Resource Load Statistics: Block cookies for prevalent resources without user interaction
https://bugs.webkit.org/show_bug.cgi?id=177394
<rdar://problem/34613960>

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect.html

http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html
http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html
http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html

  • platform/network/NetworkStorageSession.h:

Now exports NetworkStorageSession::nsCookieStorage().

  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::setPrevalentDomainsToPartitionOrBlockCookies):

Fixes the FIXME.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Declaration of _initWithIdentifier() on NSHTTPCookieStorage.

Source/WebKit:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:

Now has m_hasBeenSetToUseStatelessCookieStorage to handle
cookie blocking.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::statelessCookieStorage):

Returns singleton empty, deny-all cookie storage for cookie blocking.

(WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):

Instead of just decision making, this now applies the policy.

(WebKit::NetworkDataTaskCocoa::applyCookiePartitioningPolicy):

New method.

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

Now blocks cookies for domains where cookies will be purged anyway.

(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

Now blocks cookies for domains where cookies will be purged anyway.

(WebKit::shouldChangePartition): Deleted.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):

Now downgrades for blocked cookies instead of partitioned cookies.

(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):

Now downgrades for blocked cookies instead of partitioned cookies.

LayoutTests:

  • http/tests/resourceLoadStatistics/add-blocking-to-redirect-expected.txt: Added.
  • http/tests/resourceLoadStatistics/add-blocking-to-redirect.html: Added.
  • http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-expected.txt: Added.
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html: Added.
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt: Added.
  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html: Added.
  • http/tests/resourceLoadStatistics/remove-partitioning-from-redirect-expected.txt: Removed.
  • http/tests/resourceLoadStatistics/remove-partitioning-from-redirect.html: Removed.

Test case reworked and is now remove-partitioning-in-redirect.html.

  • http/tests/resourceLoadStatistics/remove-partitioning-in-redirect-expected.txt: Added.
  • http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html: Added.
  • platform/ios/TestExpectations:

New tests marked as [ Pass ] for iOS.

  • platform/mac-wk2/TestExpectations:

New tests marked as [ Pass ] for High Sierra+.

  • platform/wk2/TestExpectations:

New tests skipped for WK2 in general.

11:09 AM Changeset in webkit [227075] by dbates@webkit.org
  • 12 edits
    2 adds in trunk

REGRESSION (r222795): Cardiogram never signs in
https://bugs.webkit.org/show_bug.cgi?id=181693
<rdar://problem/36286293>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Exempt Cardiogram from the XHR header restrictions in r222795.

Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
However Cardiogram also depends on such functionality.

Test: fast/xmlhttprequest/set-dangerous-headers-from-file-when-setting-enabled.html

  • page/Settings.yaml:
  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isCardiogram):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::setRequestHeader):

Source/WebKit:

Exempt Cardiogram from the XHR header restrictions in r222795.

Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
However Cardiogram also depends on such functionality.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKWebView.mm:

(shouldAllowSettingAnyXHRHeaderFromFileURLs):
(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/Cocoa/VersionChecks.h:

Source/WTF:

Add macro define for future iOS.

  • wtf/spi/darwin/dyldSPI.h:

LayoutTests:

Adds a test to ensure that a file URL can set forbidden XHR headers when the setting
allowSettingAnyXHRHeaderFromFileURLs is enabled.

  • fast/xmlhttprequest/set-dangerous-headers-from-file-when-setting-enabled-expected.txt: Added.
  • fast/xmlhttprequest/set-dangerous-headers-from-file-when-setting-enabled.html: Added.
11:01 AM Changeset in webkit [227074] by dbates@webkit.org
  • 3 edits
    5 adds in trunk

ASSERTION FAILED: !m_completionHandler in PingHandle::~PingHandle()
https://bugs.webkit.org/show_bug.cgi?id=181746
<rdar://problem/36586248>

Reviewed by Chris Dumez.

Source/WebCore:

Call PingHandle::pingLoadComplete() with an error when NSURLConnection queries
whether the ping is able to respond to an authentication request. (Pings do not
respond to authenticate requests.) It will call the completion handler, nullify
the completion handler, and deallocate the PingHandle. Nullifying the completion
handler is necessary to avoid the assertion failure in ~PingHandle().

Test: http/tests/misc/before-unload-load-image.html

  • platform/network/PingHandle.h:

LayoutTests:

Adds a test to ensure that loading a protected image from a beforeunload handler
does not cause an assertion failure.

  • http/tests/misc/before-unload-load-image-expected.txt: Added.
  • http/tests/misc/before-unload-load-image.html: Added.
  • http/tests/misc/resources/before-unload-in-subframe-child.html: Added.
  • http/tests/misc/resources/protected/protected-image.php: Added.
10:57 AM Changeset in webkit [227073] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

WebCoreResourceHandleAsOperationQueueDelegate/ResourceHandleCFURLConnectionDelegateWithOperationQueue may
be deleted in main thread callback
https://bugs.webkit.org/show_bug.cgi?id=181747
<rdar://problem/36588120>

Reviewed by Alex Christensen.

Retain the delegate (e.g. WebCoreResourceHandleAsOperationQueueDelegate) before scheduling
a main thread callback and blocking on a semaphore for its reply because the main thread
callback can do anything, including deleting the delegate, before the non-main thread
has a chance to execute. For instance, a PingHandle will delete itself (and hence delete
its resource handle delegate) in most of the code paths invoked by the delegate.

  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):

10:41 AM Changeset in webkit [227072] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Super long URL string causes bad wrapping in Resources detail sidebar
https://bugs.webkit.org/show_bug.cgi?id=181617

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-01-17
Reviewed by Brian Burg.

  • UserInterface/Views/DetailsSection.css:

(.details-section > .content > .group > .row.simple > .value):
Set the break to all characters.

10:26 AM Changeset in webkit [227071] by pvollan@apple.com
  • 2 edits in trunk/Source/WTF

[Win] Compile error: 'wtf/text/icu/TextBreakIteratorICU.h' not found.
https://bugs.webkit.org/show_bug.cgi?id=181744
<rdar://problem/36582562>

Reviewed by Alex Christensen.

Add WTF folders to forwarding headers directories.

  • wtf/PlatformWin.cmake:
10:07 AM Changeset in webkit [227070] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

'fetch' event may be sent to a service worker before its state is set to 'activated'
https://bugs.webkit.org/show_bug.cgi?id=181698
<rdar://problem/36554856>

Reviewed by Youenn Fablet.

'fetch' event may be sent to a service worker before its state is set to 'activated'.
When the registration's active worker needs to intercept a load, and its state is 'activating',
we queue the request to send the fetch event in SWServerWorker::m_whenActivatedHandlers.
Once the SWServerWorker::setState() is called with 'activated' state, we then call the
handlers in m_whenActivatedHandlers to make send the fetch event now that the worker is
activated. The issue is that even though the worker is activated and its state was set to
'activated' on Storage process side, we had not yet notified the ServiceWorker process
of the service worker's new state yet.

To address the issue, we now make sure that SWServerWorker::m_whenActivatedHandlers are
called *after* we've sent the IPC to the ServiceWorker process to update the worker's
state to 'activated'. Also, we now call ServiceWorkerFetch::dispatchFetchEvent()
asynchronously in a postTask() as the service worker's state is also updated asynchronously
in a postTask. This is as per specification [1], which says to "queue a task" to fire
the fetch event.

[1] https://w3c.github.io/ServiceWorker/#on-fetch-request-algorithm (step 18)

No new tests, covered by imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https.html
which hits the new assertion without the fix.

  • workers/service/context/ServiceWorkerFetch.cpp:

(WebCore::ServiceWorkerFetch::dispatchFetchEvent):
Add assertions to make sure that we dispatch the fetch event on the right worker and
that the worker is in 'activated' state.

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::postFetchTask):
Queue a task to fire the fetch event as per:

We need to match the specification exactly here or things will happen in the wrong
order. In particular, things like "update registration state" and "update worker state"
might happen *after* firing the fetch event, even though the IPC for "update registration/worker
state" was sent before the "fire fetch event" one, because the code for updating a registration/
worker state already queues a task, as per the specification.

  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::updateWorkerState):

  • workers/service/server/SWServerRegistration.h:
  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::setState):
Move code to send the IPC to the Service Worker process whenever the service worker's state
needs to be updated from SWServerRegistration::updateWorkerState() to SWServerWorker::setState().
This way, we can make sure the IPC is sent *before* we call the m_whenActivatedHandlers handlers,
as they may also send IPC to the Service Worker process, and we need to make sure this IPC happens
after so that the service worker is in the right state.

9:36 AM Changeset in webkit [227069] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Page.cpp only sees forward declaration of ApplicationStateChangeListener when ENABLE(VIDEO) is off
https://bugs.webkit.org/show_bug.cgi?id=181713

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2018-01-17
Reviewed by Darin Adler.

No new tests (build fix).

  • page/Page.cpp: Add include for ApplicationStateChangeListener
9:07 AM Changeset in webkit [227068] by Wenson Hsieh
  • 25 edits in trunk

Add injected bundle SPI to replace subresource URLs when dropping or pasting rich content
https://bugs.webkit.org/show_bug.cgi?id=181637
<rdar://problem/36508471>

Reviewed by Tim Horton.

Source/WebCore:

Before carrying out blob URL conversion for pasted or dropped rich content, let the editor client replace
subresource URLs in WebKit2 by calling out to new injected bundle SPI. See comments below for more detail.

Tests: WKAttachmentTests.InjectedBundleReplaceURLsWhenPastingAttributedString

WKAttachmentTests.InjectedBundleReplaceURLWhenPastingImage

  • editing/Editor.cpp:

(WebCore::Editor::clientReplacementURLForResource):

  • editing/Editor.h:

Add a new helper to call out to the editor client for a URL string to replace a given ArchiveResource. In
WebKit2, this calls out to the injected bundle's new replacementURLForResource SPI hook.

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::shouldReplaceSubresourceURL):
(WebCore::replaceRichContentWithAttachments):
(WebCore::replaceSubresourceURLsWithURLsFromClient):

Add a new static helper to replace subresource URLs in the given DocumentFragment with URLs supplied by the
editor client. Additionally builds a list of ArchiveResources that have not been replaced, for use at call sites
so that we don't unnecessarily create more Blobs for ArchiveResources that have already been replaced.

(WebCore::createFragmentAndAddResources):
(WebCore::sanitizeMarkupWithArchive):

Tweak web content reading codepaths to first replace subresource URLs with editor-client-supplied URLs.

(WebCore::WebContentReader::readImage):
(WebCore::shouldConvertToBlob): Deleted.

Rename this helper to shouldReplaceSubresourceURL, blob URL replacement is no longer the only scenario in which
we replace resource URLs, but in both cases, we still want to ignore http:-family and data: URLs.

  • loader/EmptyClients.cpp:
  • page/EditorClient.h:

Source/WebKit:

Add new injected bundle SPI, replacementURLForResource, which clients may use to provide a replacement URL to
represent an archive resource, given the resource's data and MIME type.

  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:

(API::InjectedBundle::EditorClient::replacementURLForResource):

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

Add replacementURLForResource, and also bump the current injected bundle editor client version to 2.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):

  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:

(WebKit::InjectedBundlePageEditorClient::replacementURLForResource):

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

(WebKit::WebEditorClient::replacementURLForResource):

  • WebProcess/WebCoreSupport/WebEditorClient.h:

Source/WebKitLegacy/mac:

Add a stub implementation of replacementURLForResource. See WebCore and WebKit ChangeLogs for more detail.

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

(WebEditorClient::replacementURLForResource):

Source/WebKitLegacy/win:

Add a stub implementation of replacementURLForResource. See WebCore and WebKit ChangeLogs for more detail.

  • WebCoreSupport/WebEditorClient.cpp:

(WebEditorClient::replacementURLForResource):

  • WebCoreSupport/WebEditorClient.h:

Tools:

Add 2 new API tests to exercise injected bundle SPI for supplying replacement URLs when pasting an image, and an
attributed string containing multiple NSTextAttachments. See WebKit and WebCore ChangeLogs for more detail.

  • TestWebKitAPI/Tests/WebKitCocoa/BundleEditingDelegatePlugIn.mm:

(-[BundleEditingDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:replacementURLForResource:mimeType:]):

Implement the new Objective-C bundle SPI to look up the incoming MIME type in the dictionary supplied via the
"MIMETypeToReplacementURLMap" bundle initialization parameter, and return it.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(webViewForTestingAttachments):
(-[TestWKWebView tagsInBody]):
(-[TestWKWebView expectElementTagsInOrder:]):
(-[TestWKWebView expectElementTag:toComeBefore:]):

Add a test helper to check that the given list of element tags appears in the document body. Also, reimplement
the existing -expectElementTag:toComeBefore: as a special case of -expectElementTagsInOrder:.

(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::InjectedBundlePage):

9:00 AM Changeset in webkit [227067] by commit-queue@webkit.org
  • 4 edits in trunk

[EME][GStreamer] Add the full-sample encryption support in the GStreamer ClearKey decryptor
https://bugs.webkit.org/show_bug.cgi?id=180080

Patch by Yacine Bandou <yacine.bandou_ext@softathome.com> on 2018-01-17
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Currently the GStreamer clearKey decryptor doesn't support the full-sample encryption,
where the buffer is entirely encrypted, it supports only the sub-sample encryption.

Test: media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webKitMediaClearKeyDecryptorDecrypt):

LayoutTests:

  • platform/wpe/TestExpectations:

This patch fixes the crash of the test clearKey-cenc-audio-playback-mse.

6:30 AM Changeset in webkit [227066] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Unreviewed follow-up to r227051.

  • platform/graphics/cairo/CairoOperations.h: Fix declaration of the

fillRoundedRect() function by removing the bool parameter that's not
used at all in the definition. This went unspotted due to the unified
source build including the implementation file before fillRoundedRect()
usage in GrapihcsContextCairo.cpp, leaving the declaration undefined
and instead using the definition directly.

5:57 AM WebKitGTK/2.18.x edited by Claudio Saavedra
(diff)
5:06 AM Changeset in webkit [227065] by zandobersek@gmail.com
  • 10 edits in trunk/Source

[Cairo] Don't mirror global alpha and image interpolation quality state values in PlatformContextCairo
https://bugs.webkit.org/show_bug.cgi?id=181725

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Don't duplicate global alpha and image interpolation quality state
values on the PlatformContextCairo. Instead, retrieve them from
the managing GraphicsContextState when necessary.

For Cairo operations, the FillSource and StrokeSource containers now
store the global alpha value, using it during the operation executions.
For drawNativeImage(), the global alpha and interpolation quality values
are passed through arguments.

In PlatformContextCairo, the two values are no longer stored on the
internally-managed stack, and the getter-setter pairs for the two values
are removed. In drawSurfaceToContext(), the two values are now expected
to be passed through the method arguments.

No new tests -- no change in behavior.

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::prepareForFilling):
(WebCore::Cairo::prepareForStroking):
(WebCore::Cairo::drawPathShadow):
(WebCore::Cairo::fillCurrentCairoPath):
(WebCore::Cairo::FillSource::FillSource):
(WebCore::Cairo::StrokeSource::StrokeSource):
(WebCore::Cairo::strokeRect):
(WebCore::Cairo::strokePath):
(WebCore::Cairo::drawGlyphs):
(WebCore::Cairo::drawNativeImage):
(WebCore::Cairo::State::setGlobalAlpha): Deleted.
(WebCore::Cairo::State::setImageInterpolationQuality): Deleted.

  • platform/graphics/cairo/CairoOperations.h:
  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::setPlatformAlpha):
(WebCore::GraphicsContext::setPlatformImageInterpolationQuality):

  • platform/graphics/cairo/PlatformContextCairo.cpp:

(WebCore::PlatformContextCairo::save):
(WebCore::PlatformContextCairo::drawSurfaceToContext):
(WebCore::PlatformContextCairo::State::State): Deleted.
(WebCore::PlatformContextCairo::setImageInterpolationQuality): Deleted.
(WebCore::PlatformContextCairo::imageInterpolationQuality const): Deleted.
(WebCore::PlatformContextCairo::globalAlpha const): Deleted.
(WebCore::PlatformContextCairo::setGlobalAlpha): Deleted.

  • platform/graphics/cairo/PlatformContextCairo.h:
  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):

Source/WebKit:

  • Shared/cairo/ShareableBitmapCairo.cpp:

(WebKit::ShareableBitmap::paint):
Adjust the PlatformContextCairo::drawSurfaceToContext() invocation.

  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:

(WebKit::convertCairoSurfaceToShareableBitmap): Ditto.

3:23 AM Changeset in webkit [227064] by Carlos Garcia Campos
  • 10 edits
    1 add in trunk

WebDriver: add support for test expectations
https://bugs.webkit.org/show_bug.cgi?id=180420

Reviewed by Carlos Alberto Lopez Perez.

Tools:

Add support for parsing test expectations from a JSON file and mark tests on collection accordingly.

  • Scripts/run-webdriver-tests: Get the retval from process_results().
  • Scripts/webkitpy/thirdparty/init.py:

(AutoinstallImportHook._install_pytest): Install also py because pytest needs it.

  • Scripts/webkitpy/webdriver_tests/pytest_runner.py:

(TestExpectationsMarker): Plugin to mark tests based on given expectations.
(TestExpectationsMarker.init): Initialize expectations.
(TestExpectationsMarker.pytest_collection_modifyitems): Mark tests if needed,
(run): Create and use TestExpectationsMarker plugin.

  • Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:

(WebDriverSeleniumExecutor.run): Pass expectations to pytest_runner.

  • Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:

(WebDriverTestRunner.init): Create a TestExpectations and pass it to the runners.
(WebDriverTestRunner.run): Do not count results here.
(WebDriverTestRunner.process_results): Rename print_results() as process_results() since it now returns the
amount of failures. Printing the test summary while processing results will be made optional in a follow up
patch.
(WebDriverTestRunner.process_results.report): Return the amount of failures.

  • Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:

(WebDriverTestRunnerSelenium.init): Initialize _expectations.
(WebDriverTestRunnerSelenium.collect_tests): Do not include skipped tests.
(WebDriverTestRunnerSelenium.run): Stop returning the tests count.

  • Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:

(WebDriverTestRunnerW3C.init): Initialize _expectations.
(WebDriverTestRunnerW3C.collect_tests): Do not include skipped tests.
(WebDriverTestRunnerW3C._scan_directory): Ditto.
(WebDriverTestRunnerW3C.run): Stop returning the tests count.

  • Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:

(WebDriverW3CExecutor.run): Pass expectations to pytest_runner.

WebDriverTests:

Add initial test expectations. For now I'm only adding the W3C test expectations, selenium ones will be added in
a follow up patch.

3:21 AM Changeset in webkit [227063] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed WPE gardening. Mark some known unit test failures.

  • TestWebKitAPI/glib/TestExpectations.json:
3:16 AM Changeset in webkit [227062] by Carlos Garcia Campos
  • 3 edits in trunk/Tools

[GTK][WPE] Use the same subtest names in GTK and WPE unit tests
https://bugs.webkit.org/show_bug.cgi?id=181724

Reviewed by Philippe Normand.

We currently use /webkit2/foo/bar for GTK and /wpe/foo/bar for WPE. Many of the tests are common, so there's no
reason to use different names. This way we can refer to the same test names for both and we can share the
expectations in the TestExpectations.json file.

  • TestWebKitAPI/glib/TestExpectations.json:
  • TestWebKitAPI/glib/WebKitGLib/TestMain.h: Use /webkit/foo/bar in GTK and WPE.
3:10 AM Changeset in webkit [227061] by Philippe Normand
  • 4 edits in trunk/Source/WebCore

REGRESSION(r226973/r226974): Four multimedia tests failing
https://bugs.webkit.org/show_bug.cgi?id=181696

Reviewed by Carlos Garcia Campos.

This patch reverts some of the changes of the above revisions so as to fix layout test failures.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Properly
prepare stalled event when an error was detected.
(WebCore::MediaPlayerPrivateGStreamer::processBufferingStats): Revert to previous version.
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
Emit progress event also when streaming but not when an error was
detected.
(WebCore::MediaPlayerPrivateGStreamer::totalBytes const): use isLiveStream like everywhere else.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_init): Revert to keep-alive FALSE by default.

3:07 AM Changeset in webkit [227060] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Increase the slow timeout of GTK and WPE unit tests.

We are using now a lower default timeout, so multiplying by 5 is no longer enough for some of the WTF
tests. Multiply by 10 so that we get the same slow timeout as before, 50.

  • glib/api_test_runner.py:

(TestRunner._run_test_glib):
(TestRunner._run_google_test):

2:37 AM Changeset in webkit [227059] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.19.6

WebKitGTK+ 2.19.6

2:36 AM Changeset in webkit [227058] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.6 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.19.6.
2:06 AM Changeset in webkit [227057] by Carlos Garcia Campos
  • 4 edits
    2 adds in trunk

[GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
https://bugs.webkit.org/show_bug.cgi?id=179914

Reviewed by Žan Doberšek.

Source/WebKit:

Add symbols detected by check-for-global-bss-symbols-in-webkigtk-libs to the version script.

  • webkitglib-symbols.map:

Tools:

Add two scripts to be run by dist-check step when releasing. One is to detect symbols duplicated in
libjavascriptcoregtk and libwebkit2gtk that should be included to the version script. The other one is to ensure
all symbols listed in the script are present in the library.

  • Scripts/check-for-global-bss-symbols-in-webkigtk-libs: Added.

(bss_symbols):

  • Scripts/check-for-invalid-symbols-in-version-script: Added.

(script_symbols):

  • Scripts/make-dist:

(Distcheck.build):
(Distcheck):
(Distcheck.check_symbols):
(Distcheck.check):

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

[GTK][WPE] Propagate the parameters when restarting glib api tests after a crash
https://bugs.webkit.org/show_bug.cgi?id=181722

Reviewed by Žan Doberšek.

I forgot to pass the parameters to run() when restarting.

  • glib/glib_test_runner.py:

(GLibTestRunner.run):

1:35 AM Changeset in webkit [227055] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebCore

[Cairo] Move prepareForFilling(), prepareForStroking() code to CairoOperations
https://bugs.webkit.org/show_bug.cgi?id=181721

Reviewed by Carlos Garcia Campos.

Move the prepareForFilling() and prepareForStroking() code off of the
PlatformContextCairo class and into static functions inside the
CairoOperations implementation files. The original methods weren't
called from any place other than the Cairo operations, and they only
operated with the cairo_t object that's stored in and retrievable from
the PlatformContextCairo object.

No new tests -- no change in behavior.

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::reduceSourceByAlpha):
(WebCore::Cairo::prepareCairoContextSource):
(WebCore::Cairo::clipForPatternFilling):
(WebCore::Cairo::prepareForFilling):
(WebCore::Cairo::prepareForStroking):
(WebCore::Cairo::drawPathShadow):
(WebCore::Cairo::fillCurrentCairoPath):
(WebCore::Cairo::strokeRect):
(WebCore::Cairo::strokePath):
(WebCore::Cairo::drawGlyphs):

  • platform/graphics/cairo/PlatformContextCairo.cpp:

(WebCore::reduceSourceByAlpha): Deleted.
(WebCore::prepareCairoContextSource): Deleted.
(WebCore::PlatformContextCairo::prepareForFilling): Deleted.
(WebCore::PlatformContextCairo::prepareForStroking): Deleted.
(WebCore::PlatformContextCairo::clipForPatternFilling): Deleted.

  • platform/graphics/cairo/PlatformContextCairo.h:
1:34 AM Changeset in webkit [227054] by commit-queue@webkit.org
  • 4 edits
    28 copies
    3 adds
    2 deletes in trunk/LayoutTests

Update web platform tests for Visual Viewport API
https://bugs.webkit.org/show_bug.cgi?id=181689

Patch by Ali Juma <ajuma@chromium.org> on 2018-01-17
Reviewed by Alex Christensen.

Rename the test directory from 'viewport' to 'visual-viewport', and update
viewport-resize-event-on-load-overflowing-page.html.

This corresponds to the following upstream commits:
1) https://github.com/w3c/web-platform-tests/commit/f878fee4df619e55c7fbfce1a2ff5e5d4d83a03b
2) https://github.com/w3c/web-platform-tests/commit/03a684d63e62d85cffed38bc942f468692d7d54f

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/viewport/w3c-import.log: Removed.
  • web-platform-tests/visual-viewport/viewport-no-resize-event-on-overflow-recalc-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-no-resize-event-on-overflow-recalc-expected.txt.
  • web-platform-tests/visual-viewport/viewport-no-resize-event-on-overflow-recalc.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-no-resize-event-on-overflow-recalc.html.
  • web-platform-tests/visual-viewport/viewport-read-size-causes-layout-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-read-size-causes-layout-expected.txt.
  • web-platform-tests/visual-viewport/viewport-read-size-causes-layout.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-read-size-causes-layout.html.
  • web-platform-tests/visual-viewport/viewport-read-size-in-iframe-causes-layout-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-read-size-in-iframe-causes-layout-expected.txt.
  • web-platform-tests/visual-viewport/viewport-read-size-in-iframe-causes-layout.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-read-size-in-iframe-causes-layout.html.
  • web-platform-tests/visual-viewport/viewport-resize-event-on-load-overflowing-page-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-resize-event-on-load-overflowing-page-expected.txt.
  • web-platform-tests/visual-viewport/viewport-resize-event-on-load-overflowing-page.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-resize-event-on-load-overflowing-page.html.
  • web-platform-tests/visual-viewport/viewport-scrollbars-cause-resize-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-scrollbars-cause-resize-expected.txt.
  • web-platform-tests/visual-viewport/viewport-scrollbars-cause-resize.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-scrollbars-cause-resize.html.
  • web-platform-tests/visual-viewport/viewport-type-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-type-expected.txt.
  • web-platform-tests/visual-viewport/viewport-type.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-type.html.
  • web-platform-tests/visual-viewport/viewport-unscaled-scale-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-scale-expected.txt.
  • web-platform-tests/visual-viewport/viewport-unscaled-scale-iframe-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-scale-iframe-expected.txt.
  • web-platform-tests/visual-viewport/viewport-unscaled-scale-iframe.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-scale-iframe.html.
  • web-platform-tests/visual-viewport/viewport-unscaled-scale.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-scale.html.
  • web-platform-tests/visual-viewport/viewport-unscaled-scroll-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-scroll-expected.txt.
  • web-platform-tests/visual-viewport/viewport-unscaled-scroll-iframe-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-scroll-iframe-expected.txt.
  • web-platform-tests/visual-viewport/viewport-unscaled-scroll-iframe.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-scroll-iframe.html.
  • web-platform-tests/visual-viewport/viewport-unscaled-scroll.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-scroll.html.
  • web-platform-tests/visual-viewport/viewport-unscaled-size-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-size-expected.txt.
  • web-platform-tests/visual-viewport/viewport-unscaled-size-iframe-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-size-iframe-expected.txt.
  • web-platform-tests/visual-viewport/viewport-unscaled-size-iframe.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-size-iframe.html.
  • web-platform-tests/visual-viewport/viewport-unscaled-size.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport-unscaled-size.html.
  • web-platform-tests/visual-viewport/viewport_support.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/viewport/viewport_support.js.
  • web-platform-tests/visual-viewport/w3c-import.log: Added.

LayoutTests:

  • TestExpectations: Updated test path.
  • platform/ios/imported/w3c/web-platform-tests/visual-viewport/viewport-unscaled-scroll-iframe-expected.txt: Renamed from LayoutTests/platform/ios/imported/w3c/web-platform-tests/viewport/viewport-unscaled-scroll-iframe-expected.txt.
  • platform/ios/imported/w3c/web-platform-tests/visual-viewport/viewport-unscaled-size-expected.txt: Renamed from LayoutTests/platform/ios/imported/w3c/web-platform-tests/viewport/viewport-unscaled-size-expected.txt.

Updated expectation since tests in a directory named 'viewport' but not 'visual-viewport' get a flexible viewport on iOS.

  • platform/ios/imported/w3c/web-platform-tests/visual-viewport/viewport-unscaled-size-iframe-expected.txt: Renamed from LayoutTests/platform/ios/imported/w3c/web-platform-tests/viewport/viewport-unscaled-size-iframe-expected.txt.
1:24 AM Changeset in webkit [227053] by sbarati@apple.com
  • 3 edits
    1 add in trunk

DFG::Node::convertToConstant needs to clear the varargs flags
https://bugs.webkit.org/show_bug.cgi?id=181697
<rdar://problem/36497332>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dfg-node-convert-to-constant-must-clear-varargs-flags.js: Added.

(doIndexOf):
(bar):
(i.bar):

Source/JavaScriptCore:

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToConstant):

1:22 AM Changeset in webkit [227052] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Clear Caches volatile storage as a memory optimization.
https://bugs.webkit.org/show_bug.cgi?id=181643

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-17
Reviewed by Chris Dumez.

clearMemoryRepresentation clears m_caches which exposes data potentially stored in m_volatileStorage.
Clearing m_volatileStorage allows releasing some memory.

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::clearMemoryRepresentation):

1:20 AM Changeset in webkit [227051] by zandobersek@gmail.com
  • 13 edits in trunk/Source

[Cairo] Use one-time ShadowBlur objects when performing shadowing
https://bugs.webkit.org/show_bug.cgi?id=181720

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Don't maintain a ShadowBlur object in the PlatformContextCairo class.
Instead, use temporary ShadowBlur objects whenever shadowing is needed,
providing all the shadow state information to it and drawing shadow into
the given GraphicsContext object.

ShadowBlur constructors are cleaned up. The 'shadows ignored' argument
can now also be provided to the variant that accepts explicit shadow
attributes, but the argument is false by default.

In CairoOperations, the ShadowBlurUsage functionality is rolled into the
new ShadowState class. ShadowState parameter is now used for operations
that might need to perform shadow painting. Call sites are modified
accordingly.

Cairo::State::setShadowValues() and Cairo::State::clearShadow() are
removed, since the ShadowBlur object that was modified through those is
being removed from the PlatformContextCairo class. We still have to flip
the Y-axis of the shadow offset in GraphicsContext::setPlatformShadow()
when shadows are ignoring transformations.

No new tests -- no change in behavior.

  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::ShadowBlur):

  • platform/graphics/ShadowBlur.h:
  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::drawPathShadow):
(WebCore::Cairo::drawGlyphsShadow):
(WebCore::Cairo::ShadowState::ShadowState):
(WebCore::Cairo::ShadowState::isVisible const):
(WebCore::Cairo::ShadowState::isRequired const):
(WebCore::Cairo::fillRect):
(WebCore::Cairo::fillRoundedRect):
(WebCore::Cairo::fillRectWithRoundedHole):
(WebCore::Cairo::fillPath):
(WebCore::Cairo::strokeRect):
(WebCore::Cairo::strokePath):
(WebCore::Cairo::drawGlyphs):
(WebCore::Cairo::drawNativeImage):
(WebCore::Cairo::State::setShadowValues): Deleted.
(WebCore::Cairo::State::clearShadow): Deleted.
(WebCore::Cairo::ShadowBlurUsage::ShadowBlurUsage): Deleted.
(WebCore::Cairo::ShadowBlurUsage::required const): Deleted.

  • platform/graphics/cairo/CairoOperations.h:
  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::setPlatformShadow):
(WebCore::GraphicsContext::clearPlatformShadow):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):

  • platform/graphics/cairo/PlatformContextCairo.cpp:

(WebCore::PlatformContextCairo::drawSurfaceToContext):

  • platform/graphics/cairo/PlatformContextCairo.h:

(WebCore::PlatformContextCairo::shadowBlur): Deleted.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):

Source/WebKit:

  • Shared/cairo/ShareableBitmapCairo.cpp:

(WebKit::ShareableBitmap::paint):
Adjust the PlatformContextCairo::drawSurfaceToContext() invocation.

  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:

(WebKit::convertCairoSurfaceToShareableBitmap): Ditto.

12:59 AM Changeset in webkit [227050] by zandobersek@gmail.com
  • 8 edits in trunk

CanvasImageData: createImageData() parameter should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=181670

Reviewed by Sam Weinig.

Source/WebCore:

createImageData() method on the CanvasImageData interface should not
treat the ImageData parameter as nullable, but should instead reject any
null values with a TypeError, as demanded by the specification.

No new tests -- current tests covering createImageData(null) are updated
to properly cover new behavior of throwing a TypeError exception.

  • html/canvas/CanvasImageData.idl:
  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::createImageData const):

  • html/canvas/CanvasRenderingContext2DBase.h:

LayoutTests:

Update createImageData(null) tests that should now throw a TypeError.

  • canvas/philip/tests/2d.imageData.create1.zero.html:
  • fast/canvas/canvas-createImageData-expected.txt:
  • fast/canvas/canvas-createImageData.html:

Jan 16, 2018:

11:14 PM Changeset in webkit [227049] by commit-queue@webkit.org
  • 13 edits in trunk

[CMake] Remove WebCoreDerivedSources library target
https://bugs.webkit.org/show_bug.cgi?id=181664

Patch by Fujii Hironori <Fujii Hironori> on 2018-01-16
Reviewed by Carlos Garcia Campos.

Source/WebCore:

After unified source build has been introduced, CMake Visual
Studio build suffers complicated unnecessary recompilation issues
because Visual Studio invokes scripts twice in both WebCore and
WebCoreDerivedSources projects (Bug 181117).

WebCoreDerivedSources library has been introduced in r198766 to
avoid command line length limit of CMake Ninja build on macOS.
Fortunately, unified source build has reduced the number of source
files to compile, WebCore doesn't need to be split anymore.

No new tests (No behavior change)

  • CMakeLists.txt: Replaced WebCore_DERIVED_SOURCES with WebCore_SOURCES. Removed WebCoreDerivedSources library target.

Do not compile each JavaScript Builtins.cpp files because the unified source WebCoreJSBuiltins.cpp is already included.

  • PlatformGTK.cmake: Replaced WebCore_DERIVED_SOURCES with WebCore_SOURCES.
  • PlatformWin.cmake: Ditto.

Source/WebKit:

  • CMakeLists.txt: Do not link WebCoreDerivedSources.
  • PlatformGTK.cmake: Appended WebCore after WebCorePlatformGTK in WebKit_LIBRARIES.
  • PlatformWin.cmake: Ditto.

Source/WebKitLegacy:

  • PlatformWin.cmake: Do not link WebCoreDerivedSources.

Tools:

  • TestWebKitAPI/PlatformWPE.cmake: Do not link WebCoreDerivedSources.
  • TestWebKitAPI/PlatformWin.cmake: Ditto.
11:04 PM Changeset in webkit [227048] by lingcherd_ho@apple.com
  • 3 edits in trunk/Tools

Move Debug Test262, Release Test262 and Performance queues to Sierra
https://bugs.webkit.org/show_bug.cgi?id=181692

Unreviewed

9:40 PM Changeset in webkit [227047] by jfbastien@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Allow dangerous disabling of poison
https://bugs.webkit.org/show_bug.cgi?id=181685
<rdar://problem/36546265>

Reviewed by Keith Miller.

Some tools such as leak detectors and such like to look at real
pointers, and poisoned ones confuse them. Add a JSC option to
disable poisoning, but log to the console when this is done.

  • runtime/JSCPoison.cpp:

(JSC::initializePoison):

  • runtime/Options.h:
9:38 PM Changeset in webkit [227046] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r226880. rdar://problem/36569616

9:05 PM Changeset in webkit [227045] by jmarcell@apple.com
  • 3 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r227010. rdar://problem/36567991

9:05 PM Changeset in webkit [227044] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebInspectorUI

Cherry-pick r226995. rdar://problem/36568070

9:05 PM Changeset in webkit [227043] by jmarcell@apple.com
  • 7 edits
    2 adds in branches/safari-605-branch

Cherry-pick r226916. rdar://problem/36568057

9:05 PM Changeset in webkit [227042] by jmarcell@apple.com
  • 3 edits
    2 adds in branches/safari-605-branch

Cherry-pick r227009. rdar://problem/36567976

9:05 PM Changeset in webkit [227041] by jmarcell@apple.com
  • 4 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r227006. rdar://problem/36567998

9:04 PM Changeset in webkit [227040] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r227000. rdar://problem/36567987

9:04 PM Changeset in webkit [227039] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebInspectorUI

Cherry-pick r226996. rdar://problem/36568089

9:04 PM Changeset in webkit [227038] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebInspectorUI

Cherry-pick r226994. rdar://problem/36568074

9:04 PM Changeset in webkit [227037] by jmarcell@apple.com
  • 13 edits in branches/safari-605-branch

Cherry-pick r226993. rdar://problem/36567965

9:04 PM Changeset in webkit [227036] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebInspectorUI

Cherry-pick r226992. rdar://problem/36568053

9:04 PM Changeset in webkit [227035] by jmarcell@apple.com
  • 15 edits
    1 add in branches/safari-605-branch/Source

Cherry-pick r226990. rdar://problem/36568066

9:04 PM Changeset in webkit [227034] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r226982. rdar://problem/36567983

9:04 PM Changeset in webkit [227033] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r226951. rdar://problem/36568098

9:04 PM Changeset in webkit [227032] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebKit

Cherry-pick r226946. rdar://problem/36568013

9:04 PM Changeset in webkit [227031] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/JavaScriptCore

Cherry-pick r226942. rdar://problem/36567945

9:04 PM Changeset in webkit [227030] by jmarcell@apple.com
  • 10 edits
    4 adds in branches/safari-605-branch

Cherry-pick r226930. rdar://problem/36567972

9:04 PM Changeset in webkit [227029] by jmarcell@apple.com
  • 4 edits in branches/safari-605-branch

Cherry-pick r226929. rdar://problem/36567962

9:04 PM Changeset in webkit [227028] by jmarcell@apple.com
  • 17 edits in branches/safari-605-branch/Source/JavaScriptCore

Cherry-pick r226928. rdar://problem/36567945

9:04 PM Changeset in webkit [227027] by jmarcell@apple.com
  • 28 edits
    1 copy in branches/safari-605-branch/Source

Cherry-pick r226920. rdar://problem/36567951

9:04 PM Changeset in webkit [227026] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r226919. rdar://problem/36567968

9:04 PM Changeset in webkit [227025] by jmarcell@apple.com
  • 3 edits
    2 adds in branches/safari-605-branch

Cherry-pick r226908. rdar://problem/36568060

9:04 PM Changeset in webkit [227024] by jmarcell@apple.com
  • 14 edits
    1 add in branches/safari-605-branch

Cherry-pick r226907. rdar://problem/36567949

9:04 PM Changeset in webkit [227023] by jmarcell@apple.com
  • 12 edits in branches/safari-605-branch

Cherry-pick r226906. rdar://problem/36568006

9:03 PM Changeset in webkit [227022] by jmarcell@apple.com
  • 19 edits
    5 adds in branches/safari-605-branch

Cherry-pick r226904. rdar://problem/36568017

9:03 PM Changeset in webkit [227021] by jmarcell@apple.com
  • 3 edits in branches/safari-605-branch/LayoutTests

Cherry-pick r226902. rdar://problem/36567966

9:03 PM Changeset in webkit [227020] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r226898. rdar://problem/36568103

9:03 PM Changeset in webkit [227019] by jmarcell@apple.com
  • 3 edits in branches/safari-605-branch/Source/JavaScriptCore

Cherry-pick r226895. rdar://problem/36568085

9:03 PM Changeset in webkit [227018] by jmarcell@apple.com
  • 3 edits
    1 add in branches/safari-605-branch

Cherry-pick r226881. rdar://problem/36567948

9:03 PM Changeset in webkit [227017] by jmarcell@apple.com
  • 6 edits
    4 adds in branches/safari-605-branch

Cherry-pick r226842. rdar://problem/36568025

9:03 PM Changeset in webkit [227016] by jmarcell@apple.com
  • 3 edits in branches/safari-605-branch/Source/WebInspectorUI

Cherry-pick r226821. rdar://problem/36568038

9:03 PM Changeset in webkit [227015] by jmarcell@apple.com
  • 5 edits
    1 add in branches/safari-605-branch

Cherry-pick r226806. rdar://problem/36567946

9:03 PM Changeset in webkit [227014] by jmarcell@apple.com
  • 9 edits in branches/safari-605-branch/Source

Cherry-pick r226790. rdar://problem/36568094

9:03 PM Changeset in webkit [227013] by jmarcell@apple.com
  • 3 edits in branches/safari-605-branch/Source/WebInspectorUI

Cherry-pick r226765. rdar://problem/36568045

9:03 PM Changeset in webkit [227012] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebInspectorUI

Cherry-pick r226674. rdar://problem/36568078

5:34 PM Changeset in webkit [227011] by Simon Fraser
  • 5 edits
    2 adds in trunk

Can't scroll iframe after toggling it to display:none and back
https://bugs.webkit.org/show_bug.cgi?id=181708
rdar://problem/13234778

Reviewed by Tim Horton.

Source/WebCore:

Nothing updated the FrameView's set of scrollable areas when a subframe came back from display:none.
Mirror the existing virtual removeChild() by making addChild() virtual, and using it to mark
the FrameView's scrollable area set as dirty.

Test: tiled-drawing/scrolling/non-fast-region/non-fast-scrollable-region-hide-show-iframe.html

  • page/FrameView.cpp:

(WebCore::FrameView::addChild):

  • page/FrameView.h:
  • platform/ScrollView.h:

LayoutTests:

  • tiled-drawing/scrolling/non-fast-region/non-fast-scrollable-region-hide-show-iframe-expected.txt: Added.
  • tiled-drawing/scrolling/non-fast-region/non-fast-scrollable-region-hide-show-iframe.html: Added.
4:49 PM Changeset in webkit [227010] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

SWServerWorker::m_contextConnectionIdentifier may get out of date
https://bugs.webkit.org/show_bug.cgi?id=181687
<rdar://problem/36548111>

Reviewed by Brady Eidson.

SWServerWorker::m_contextConnectionIdentifier may get out of date. This happens when the
context process crashes and is relaunched.

No new tests, added assertion in terminateWorkerInternal() that hits without this fix.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::runServiceWorker):
(WebCore::SWServer::terminateWorkerInternal):
(WebCore::SWServer::unregisterServiceWorkerClient):

  • workers/service/server/SWServerWorker.h:

(WebCore::SWServerWorker::setContextConnectionIdentifier):

4:04 PM Changeset in webkit [227009] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

Reset MediaSourcePrivateAVFObjC's m_sourceBufferWithSelectedVideo when the underlying SourceBufferPrivate is removed.
https://bugs.webkit.org/show_bug.cgi?id=181707
<rdar://problem/34809474>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-remove-unload-crash.html

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

(WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer):

LayoutTests:

  • media/media-source/media-source-remove-unload-crash-expected.txt: Added.
  • media/media-source/media-source-remove-unload-crash.html: Added.
3:17 PM Changeset in webkit [227008] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
https://bugs.webkit.org/show_bug.cgi?id=181706
<rdar://problem/36558221>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CanvasOverviewContentView.js:

(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype._handleSpace):

3:08 PM Changeset in webkit [227007] by jiewen_tan@apple.com
  • 20 edits
    17 copies in trunk

[WebAuthN] Implement dummy WebAuthN IDLs
https://bugs.webkit.org/show_bug.cgi?id=181627
<rdar://problem/36459864>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt:

Source/WebCore:

This patch implements dummy WebAuthN IDLs and connect them with Credential Management as well.
All implementations in this patch are subject to change when real implementations land. The
purpose here on the other hand is to have IDLs, bindings and implementations connected. This
patch should handle all IDLs that we need.

No tests.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/credentialmanagement/CredentialCreationOptions.h:
  • Modules/credentialmanagement/CredentialCreationOptions.idl:
  • Modules/credentialmanagement/CredentialRequestOptions.h:
  • Modules/credentialmanagement/CredentialRequestOptions.idl:
  • Modules/webauthn/AuthenticatorAssertionResponse.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp.

(WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
(WebCore::AuthenticatorAssertionResponse::~AuthenticatorAssertionResponse):
(WebCore::AuthenticatorAssertionResponse::authenticatorData):
(WebCore::AuthenticatorAssertionResponse::signature):
(WebCore::AuthenticatorAssertionResponse::userHandle):

  • Modules/webauthn/AuthenticatorAssertionResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
  • Modules/webauthn/AuthenticatorAssertionResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
  • Modules/webauthn/AuthenticatorAttestationResponse.cpp: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.

(WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse):
(WebCore::AuthenticatorAttestationResponse::~AuthenticatorAttestationResponse):
(WebCore::AuthenticatorAttestationResponse::attestationObject):

  • Modules/webauthn/AuthenticatorAttestationResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
  • Modules/webauthn/AuthenticatorAttestationResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
  • Modules/webauthn/AuthenticatorResponse.cpp: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.

(WebCore::AuthenticatorResponse::AuthenticatorResponse):
(WebCore::AuthenticatorResponse::~AuthenticatorResponse):
(WebCore::AuthenticatorResponse::clientDataJSON):

  • Modules/webauthn/AuthenticatorResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
  • Modules/webauthn/AuthenticatorResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
  • Modules/webauthn/PublicKeyCredential.cpp:

(WebCore::PublicKeyCredential::rawId):
(WebCore::PublicKeyCredential::response):
(WebCore::PublicKeyCredential::getClientExtensionResults):
(WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):

  • Modules/webauthn/PublicKeyCredential.h:
  • Modules/webauthn/PublicKeyCredential.idl:
  • Modules/webauthn/PublicKeyCredentialCreationOptions.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
  • Modules/webauthn/PublicKeyCredentialCreationOptions.idl: Added.
  • Modules/webauthn/PublicKeyCredentialDescriptor.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
  • Modules/webauthn/PublicKeyCredentialDescriptor.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
  • Modules/webauthn/PublicKeyCredentialRequestOptions.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
  • Modules/webauthn/PublicKeyCredentialRequestOptions.idl: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
  • Modules/webauthn/PublicKeyCredentialType.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
  • Modules/webauthn/PublicKeyCredentialType.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

Modify some tests to reflect the update.

  • http/wpt/credential-management/credentialscontainer-create-basics.https-expected.txt:
  • http/wpt/credential-management/credentialscontainer-create-basics.https.html:
  • http/wpt/credential-management/credentialscontainer-get-basics.https-expected.txt:
  • http/wpt/credential-management/credentialscontainer-get-basics.https.html:
3:06 PM Changeset in webkit [227006] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

AX: Do not trigger layout in updateBackingStore() unless it is safe to do so
https://bugs.webkit.org/show_bug.cgi?id=181703
<rdar://problem/36365706>

Reviewed by Ryosuke Niwa.

Document::isSafeToUpdateStyleOrLayout() can tell whether it is safe to run layout.

Unable to create test with WebInspector involved.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::updateBackingStore):

  • dom/Document.cpp:

(WebCore::Document::isSafeToUpdateStyleOrLayout const):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayout):
(WebCore::isSafeToUpdateStyleOrLayout): Deleted.

  • dom/Document.h:
2:52 PM Changeset in webkit [227005] by Ryan Haddad
  • 4 edits
    2 deletes in trunk

Unreviewed, rolling out r226962.

The LayoutTest added with this change is a flaky timeout.

Reverted changeset:

"Support for preconnect Link headers"
https://bugs.webkit.org/show_bug.cgi?id=181657
https://trac.webkit.org/changeset/226962

2:35 PM Changeset in webkit [227004] by Ryan Haddad
  • 7 edits
    6 deletes in trunk

Unreviewed, rolling out r226937.

Tests added with this change are failing due to a missing
exception check.

Reverted changeset:

"[JSC] NumberPrototype::extractRadixFromArgs incorrectly cast
double to int32_t"
https://bugs.webkit.org/show_bug.cgi?id=181182
https://trac.webkit.org/changeset/226937

2:26 PM Changeset in webkit [227003] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Make Console's Execution Context picker stand out when it is non-default
https://bugs.webkit.org/show_bug.cgi?id=181628
<rdar://problem/36492044>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-01-16
Reviewed by Matt Baker.

  • UserInterface/Views/HierarchicalPathComponent.css:

(.hierarchical-path-component > .selector-arrows):

  • UserInterface/Views/HierarchicalPathComponent.js:

(WI.HierarchicalPathComponent.prototype.set selectorArrows):
Switch to SVG element so we can style the arrows.

  • UserInterface/Views/QuickConsole.css:

(.quick-console > .navigation-bar > .hierarchical-path .execution-context):
(.quick-console > .navigation-bar > .hierarchical-path .execution-context .separator):
(.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context):
(.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context .selector-arrows):
Styles for the execution context picker. We hide the unused separator
and instead use margin so that the selected background and border don't
have an extra 7px on the right/end side.

  • UserInterface/Views/QuickConsole.js:

(WI.QuickConsole.prototype._activeExecutionContextChanged):
Toggle the non-default class name on the path.

2:04 PM Changeset in webkit [227002] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WTF

Cherry-pick r226983. rdar://problem/36480409

1:58 PM Changeset in webkit [227001] by achristensen@apple.com
  • 12 edits in trunk/Source/WebKit

Merge sync and async code paths for getting context menus
https://bugs.webkit.org/show_bug.cgi?id=181423

Reviewed by Joseph Pecoraro.

What a mess. We had a code path for asynchronous context menu generation and a different one for synchronous context menu generation.
This makes it so there is just one. At the API level we see if there is an asynchronous delegate to call, then synchronous.
There is a subtle theoretical change in behaviour because m_page.contextMenuClient().showContextMenu is now called for the asynchronous
case and it wasn't before, but the one C API client that uses this has nullptr as it's WKPageShowContextMenuCallback, so we won't break anything!

  • UIProcess/API/APIContextMenuClient.h:

(API::ContextMenuClient::getContextMenuFromProposedMenu):
(API::ContextMenuClient::getContextMenuFromProposedMenuAsync): Deleted.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageContextMenuClient):

  • UIProcess/API/glib/WebKitContextMenuClient.cpp:
  • UIProcess/WebContextMenuProxy.h:
  • UIProcess/gtk/WebContextMenuProxyGtk.cpp:

(WebKit::WebContextMenuProxyGtk::show):
(WebKit::WebContextMenuProxyGtk::showContextMenuWithItems):

  • UIProcess/gtk/WebContextMenuProxyGtk.h:
  • UIProcess/mac/WebContextMenuProxyMac.h:
  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
(WebKit::WebContextMenuProxyMac::showContextMenu):

  • UIProcess/wpe/WebContextMenuProxyWPE.h:
1:52 PM Changeset in webkit [227000] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Text looks bad on some CSS spec pages
https://bugs.webkit.org/show_bug.cgi?id=181700
rdar://problem/36552107

Reviewed by Tim Horton.

When making new tiles in a TileController, we failed to set their "supports antialiased layer text"
setting, so tile caches could end up with a mixture of layers that do and do not support
antialiased layer text.

No tests because the tiled drawing tests don't dump out tiles inside of tile caches.

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::createTileLayer):

1:14 PM Changeset in webkit [226999] by jmarcell@apple.com
  • 7 edits in branches/safari-605-branch/Source

Versioning.

1:10 PM Changeset in webkit [226998] by jmarcell@apple.com
  • 2 edits in tags/Safari-605.1.23/Source/WTF

Cherry-pick r226983. rdar://problem/36480409

1:07 PM Changeset in webkit [226997] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.23

Tag Safari-605.1.23.

12:54 PM Changeset in webkit [226996] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: pressing down key should select first item from completion list when focusing on empty value
https://bugs.webkit.org/show_bug.cgi?id=181633
<rdar://problem/36501797>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SpreadsheetTextField.js:

(WI.SpreadsheetTextField.prototype._updateCompletions):

12:31 PM Changeset in webkit [226995] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Redesign: Long value causes bad wrapping
https://bugs.webkit.org/show_bug.cgi?id=181618
<rdar://problem/36485175>

Reviewed by Joseph Pecoraro.

Wrap long values only when editing.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:

(.spreadsheet-style-declaration-editor .value.editing):

12:23 PM Changeset in webkit [226994] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Redesign: clicking on the white space after the property sometimes places a blank property at the wrong index
https://bugs.webkit.org/show_bug.cgi?id=179585
<rdar://problem/35490780>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
Layout call is needed to update data-property-index attributes on the property views.

12:21 PM Changeset in webkit [226993] by Said Abou-Hallawa
  • 13 edits in trunk

REGRESSION(r221292): svg/animations/animateTransform-pattern-transform.html crashes with security assertion
https://bugs.webkit.org/show_bug.cgi?id=179986

Reviewed by Simon Fraser.

Source/WebCore:

This patch reverts all or parts of the following changes-sets

<http://trac.webkit.org/changeset/221292>
<http://trac.webkit.org/changeset/197967>
<http://trac.webkit.org/changeset/196670>

A JS statement like this:

var item = text.x.animVal.getItem(0);

Creates the following C++ objects:

SVGAnimatedListPropertyTearOff<SVGLengthListValues> for 'text.x'
SVGListPropertyTearOff<SVGLengthListValues> for 'text.x.animVal'
SVGPropertyTearOff<SVGLengthValue> for 'text.x.animVal.getItem(0)'

If 'item' changes, the attribute 'x' of the element '<text>' will change
as well. But this binding works only in one direction. If the attribute
'x' of the element '<text>' changes, e.g.:

text.setAttribute('x', '10,20,30');

This will detach 'item' from the element <text> and any further changes
in 'item' won't affect the attribute 'x' of element <text>.

The one direction binding can only work if this chain of tear-off objects
is kept connected. This is implemented by RefCounted back pointers from
SVGPropertyTearOff and SVGListPropertyTearOff to SVGAnimatedListPropertyTearOff.

The security crashes and the memory leaks are happening because of the
raw forward pointers:

-- SVGAnimatedListPropertyTearOff maintains raw pointers of type

SVGListPropertyTearOff for m_baseVal and m_animVal

-- The m_wrappers and m_animatedWrappers of SVGAnimatedListPropertyTearOff

are vectors of raw pointer Vector<SVGLength*>

To control the life cycle of the raw pointers, SVGListPropertyTearOff and
SVGPropertyTearOff call SVGAnimatedListPropertyTearOff::propertyWillBeDeleted()
to notify it they are going to be deleted. In propertyWillBeDeleted(), we
clear the pointers so they are not used after being freed. This mechanism
has been error-prone and we've never got it 100% right.

The solution we need to adopt with SVG tear-off objects is the following:

-- All the forward pointers should be weak pointers.
-- All the back pointers should be ref pointers.

This solution may not look intuitive but it solves the bugs and keeps the
one direction binding. The forward weak pointers allows the tear-off
objects to go aways if no reference from JS exists. The back ref pointers
maintains the chain of objects and guarantees the correct binding.

  • svg/SVGPathSegList.h:
  • svg/SVGTransformList.h:
  • svg/properties/SVGAnimatedListPropertyTearOff.h:

(WebCore::SVGAnimatedListPropertyTearOff::baseVal):
(WebCore::SVGAnimatedListPropertyTearOff::animVal):

  • svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
  • svg/properties/SVGAnimatedProperty.h:

(WebCore::SVGAnimatedProperty::isAnimatedListTearOff const):
(WebCore::SVGAnimatedProperty::propertyWillBeDeleted): Deleted.

  • svg/properties/SVGAnimatedPropertyTearOff.h:
  • svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
  • svg/properties/SVGListProperty.h:

(WebCore::SVGListProperty::initializeValuesAndWrappers):
(WebCore::SVGListProperty::getItemValuesAndWrappers):
(WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
(WebCore::SVGListProperty::replaceItemValuesAndWrappers):
(WebCore::SVGListProperty::removeItemValuesAndWrappers):
(WebCore::SVGListProperty::appendItemValuesAndWrappers):
(WebCore::SVGListProperty::createWeakPtr const):

  • svg/properties/SVGListPropertyTearOff.h:

(WebCore::SVGListPropertyTearOff::removeItemFromList):
(WebCore::SVGListPropertyTearOff::~SVGListPropertyTearOff): Deleted.

  • svg/properties/SVGPropertyTearOff.h:

(WebCore::SVGPropertyTearOff::createWeakPtr const):
(WebCore::SVGPropertyTearOff::~SVGPropertyTearOff):

LayoutTests:

  • svg/dom/SVGAnimatedListPropertyTearOff-leak.html:
12:20 PM Changeset in webkit [226992] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Export HAR Context Menu not working
https://bugs.webkit.org/show_bug.cgi?id=181694
<rdar://problem/36479197>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-01-16
Reviewed by Brian Burg.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
Ensure this works in the handler.

11:47 AM Changeset in webkit [226991] by Michael Catanzaro
  • 4 edits in trunk/Source/WebKit

Don't link WebKit target directly to JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=181688

Reviewed by Alex Christensen.

It's safer if we only link to the next lower-layered lib in the stack, so let's just link
directly to WebCore instead.

And WPE doesn't need to specify it twice.

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • PlatformWPE.cmake:
11:46 AM Changeset in webkit [226990] by eric.carlson@apple.com
  • 15 edits
    1 add in trunk/Source

AVSampleBufferDisplayLayer should be flushed when application activates
https://bugs.webkit.org/show_bug.cgi?id=181623
<rdar://problem/36487738>

Reviewed by Darin Adler.

Source/WebCore:

No new tests, I wasn't able to reproduce it in a test.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::addApplicationStateChangeListener): New.
(WebCore::Document::removeApplicationStateChangeListener): Ditto.
(WebCore::Document::forEachApplicationStateChangeListener): Ditto.

  • dom/Document.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::registerWithDocument): Register for application state changes.
(WebCore::HTMLMediaElement::unregisterWithDocument): Unregister.
(WebCore::HTMLMediaElement::applicationWillResignActive): Pass through to the player.
(WebCore::HTMLMediaElement::applicationDidBecomeActive): Ditto.

  • html/HTMLMediaElement.h:
  • page/ApplicationStateChangeListener.h: Added.

(WebCore::ApplicationStateChangeListener::applicationWillResignActive):
(WebCore::ApplicationStateChangeListener::applicationDidBecomeActive):

  • page/Page.cpp:

(WebCore::Page::forEachDocument):
(WebCore::Page::applicationWillResignActive):
(WebCore::Page::applicationDidEnterBackground):
(WebCore::Page::applicationWillEnterForeground):
(WebCore::Page::applicationDidBecomeActive):

  • page/Page.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::applicationWillResignActive):
(WebCore::MediaPlayer::applicationDidBecomeActive):

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

(WebCore::MediaPlayerPrivateInterface::applicationWillResignActive):
(WebCore::MediaPlayerPrivateInterface::applicationDidBecomeActive):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Switch
to release logging.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueCorrectedVideoSample): Split out of enqueueVideoSample.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): Move code that updates
the display later to enqueueCorrectedVideoSample. Rearrange logic to the image painter sample
buffer has the correct timestamp.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerErrorDidChange): Switch to release logging.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerStatusDidChange): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::applicationDidBecomeActive): f the display
layer is in the "failed" state, flush the renderer and update the display mode.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers): Switch to release logging.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareToPlay): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateReadyState) Ditto.:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::logChannel const): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateSampleTimes): Deleted.

Source/WebKit:

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::applicationWillResignActive): Call page.
(WebKit::WebPage::applicationDidEnterBackground): Ditto, let it call libWebRTCProvider.
(WebKit::WebPage::applicationWillEnterForeground): Call page.
(WebKit::WebPage::applicationDidBecomeActive): Ditto, let it call libWebRTCProvider.

11:41 AM Changeset in webkit [226989] by Michael Catanzaro
  • 4 edits in trunk/Source/WebCore

PAL should link to JavaScriptCore rather than WTF
https://bugs.webkit.org/show_bug.cgi?id=181683

Reviewed by Konstantin Tokarev.

Source/WebCore:

Do not link directly to JavaScriptCore. Get it via PAL.

  • CMakeLists.txt:

Source/WebCore/PAL:

Currently we are accidentally linking WTF into both libjavascriptcoregtk and libwebkit2gtk,
which could in theory cause problems similar to bug #179914. There are only two possible
solutions:

  • Ensure WTF always built as a shared library if JavaScriptCore is built as a shared library
  • Change PAL to link to JavaScriptCore instead of WTF

The problem here is caused by layer hopping. It can never be a problem if each library only
links to the next lowest-layered library.

The downside is this allows PAL to use JavaScriptCore symbols, which is not super desirable.
I came up with a hack yesterday for PAL to link to WTF usually, but link to JavaScriptCore
instead if ${JavaScriptCore_LIBRARY_TYPE} MATCHES "SHARED" AND ${WTF_LIBRARY_TYPE} MATCHES
"STATIC". But that is getting too complex and introduces more possibility for platform-
dependent build failures. Better to just accept that PAL will depend on JavaScriptCore.

Note: I'm not brave enough to update the XCode build. We can use that to enforce that no
JavaScriptCore symbols actually get used, I guess....

  • pal/CMakeLists.txt:
11:26 AM Changeset in webkit [226988] by jmarcell@apple.com
  • 2 edits in tags/Safari-606.1.1.1/Source/WebCore

Cherry-pick r226915. rdar://problem/36480797

11:26 AM Changeset in webkit [226987] by jmarcell@apple.com
  • 6 edits
    2 adds in tags/Safari-606.1.1.1

Cherry-pick r226796. rdar://problem/35947650

11:26 AM Changeset in webkit [226986] by jmarcell@apple.com
  • 6 edits in tags/Safari-606.1.1.1

Cherry-pick r226787. rdar://problem/36324813

11:25 AM Changeset in webkit [226985] by jmarcell@apple.com
  • 13 edits in tags/Safari-606.1.1.1

Cherry-pick r226779. rdar://problem/36299316

11:12 AM Changeset in webkit [226984] by commit-queue@webkit.org
  • 16 edits
    1 copy
    1 add in trunk

Add pop-up policy support in website policies.
https://bugs.webkit.org/show_bug.cgi?id=181544.
rdar://problem/30521400.

Patch by Zach Li <zachli@apple.com> on 2018-01-16
Reviewed by Alex Christensen.

Source/WebCore:

  • loader/DocumentLoader.h:

Introduce pop-up policy getter and setter. Initialize
the policy as Default.
(WebCore::DocumentLoader::popUpPolicy const):
(WebCore::DocumentLoader::setPopUpPolicy):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::allowPopUp):
Pop-up policy specified on a per-page basis holds
precedence over the global policy. If no pop-up policy
is specified during navigation, global policy is used.

Source/WebKit:

  • Shared/WebsitePoliciesData.cpp: Encode and decode

pop-up policy.
(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):
Apply the pop-up policy from website policies to the
document loader.

  • Shared/WebsitePoliciesData.h:
  • Shared/WebsitePopUpPolicy.h:

Added for declaring enum WebsitePopUpPolicy.

  • UIProcess/API/APIWforebsitePolicies.cpp:

Include pop-up policy in website policies.
(API::WebsitePolicies::WebsitePolicies):
(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/C/WKWebsitePolicies.cpp:

Added C API to get and set pop-up policy on
website policies.
(WKWebsitePoliciesGetPopUpPolicy):
(WKWebsitePoliciesSetPopUpPolicy):

  • UIProcess/API/C/WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:

Added Obj-C API to get and set pop-up policy
on website policies.

  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setPopUpPolicy:]):
(-[_WKWebsitePolicies popUpPolicy]):

  • WebKit.xcodeproj/project.pbxproj:

Added WebsitePopUpPolicy.h.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Added pop-up-check.html.

  • TestWebKitAPI/Tests/WebKit/pop-up-check.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[PopUpPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[PopUpPoliciesDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):

11:09 AM Changeset in webkit [226983] by pvollan@apple.com
  • 2 edits in trunk/Source/WTF

[Win] JSC compile error in runtime/DateConversion.cpp.
https://bugs.webkit.org/show_bug.cgi?id=181690
<rdar://problem/36480409>

Reviewed by Brent Fulgham.

Add 'text/win' folder to list of forwarding headers directories.

  • wtf/PlatformWin.cmake:
11:04 AM Changeset in webkit [226982] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Crash playing audio-only HLS stream via hls.js (MSE)
https://bugs.webkit.org/show_bug.cgi?id=181691
<rdar://problem/32967295>

Reviewed by Eric Carlson.

Add a weak-link check to the block called by -[AVSampleBufferDisplayLayer requestMediaDataWhenReadyOnQueue:usingBlock:].

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

(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::setVideoLayer):

10:59 AM Changeset in webkit [226981] by Simon Fraser
  • 15 edits in trunk/Source/WebCore

Rename applyHorizontalScale/applyVerticalScale in SVG filters, and related cleanup
https://bugs.webkit.org/show_bug.cgi?id=181684

Reviewed by Alex Christensen.

Rename the confusing applyHorizontalScale/applyVerticalScale to scaledByFilterResolution(),
and have it take and return a FloatSize. Change callers to do math in terms of FloatSizes.

Add inflate(size) to each of the rect classes.

  • platform/graphics/FloatRect.h:

(WebCore::FloatRect::inflate):

  • platform/graphics/IntRect.h:

(WebCore::IntRect::inflate):

  • platform/graphics/LayoutRect.h:

(WebCore::LayoutRect::inflate):

  • platform/graphics/filters/FEDisplacementMap.cpp:

(WebCore::FEDisplacementMap::platformApplySoftware):

  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::determineAbsolutePaintRect):
(WebCore::FEDropShadow::platformApplySoftware):

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
(WebCore::FEGaussianBlur::calculateKernelSize):
(WebCore::FEGaussianBlur::determineAbsolutePaintRect):
(WebCore::FEGaussianBlur::platformApplySoftware):

  • platform/graphics/filters/FEGaussianBlur.h:
  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::FEMorphology::determineAbsolutePaintRect):
(WebCore::FEMorphology::platformApplySoftware):

  • platform/graphics/filters/FEOffset.cpp:

(WebCore::FEOffset::determineAbsolutePaintRect):
(WebCore::FEOffset::platformApplySoftware):

  • platform/graphics/filters/Filter.h:

(WebCore::Filter::setSourceImage):
(WebCore::Filter::scaledByFilterResolution const):
(WebCore::Filter::applyHorizontalScale const): Deleted.
(WebCore::Filter::applyVerticalScale const): Deleted.

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::outsetSizeForBlur):

  • rendering/FilterEffectRenderer.h:
  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::scaledByFilterResolution const):
(WebCore::SVGFilter::applyHorizontalScale const): Deleted.
(WebCore::SVGFilter::applyVerticalScale const): Deleted.

  • svg/graphics/filters/SVGFilter.h:
10:58 AM Changeset in webkit [226980] by achristensen@apple.com
  • 2 edits in trunk/PerformanceTests

Fix Mac CMake build after r222900

  • MallocBench/MallocBench/CMakeLists.txt:

The mbmalloc target doesn't exist if we're not in developer mode, so only use it if we are.

10:55 AM Changeset in webkit [226979] by achristensen@apple.com
  • 7 edits in trunk/Source

[CMake][Mac] Fix the build errors
https://bugs.webkit.org/show_bug.cgi?id=181665

Patch by Fujii Hironori <Fujii Hironori> on 2018-01-16
Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No behavior change)

  • CMakeLists.txt: Added Modules/paymentrequest/MerchantValidationEvent.idl to compile.
  • PlatformMac.cmake: Added Modules/paymentrequest/MerchantValidationEvent.cpp to compile.

Added workers/service/context and Modules/applicationmanifest as forwarding header paths.

Source/WebKit:

  • CMakeLists.txt: Added TouchBarMenuData.cpp and TouchBarMenuItemData.cpp to compile.
  • PlatformMac.cmake: Added _WKApplicationManifest.mm, WKInspectorWKWebView.mm and WKInspectorWindow.mm to compile.
  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _webPageContentProcessCount]): Call WebProcessPool::serviceWorkerProxy() only if ENABLE(SERVICE_WORKER).

10:52 AM Changeset in webkit [226978] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.1.1/Source

Versioning.

10:46 AM Changeset in webkit [226977] by Wenson Hsieh
  • 19 edits in trunk

[Attachment Support] Provide the src of an attachment to the UI delegate when an attachment is inserted
https://bugs.webkit.org/show_bug.cgi?id=181638
<rdar://problem/36508702>

Reviewed by Dan Bernstein.

Source/WebCore:

Adjust the didInsertAttachment codepath to additionally propagate the attachment element's src.
Additionally, fix an issue with insertion and removal client notifications wherein the client can receive
insertion calls without corresponding removal calls, or vice versa. This is an existing issue, but matters more
now because we actually need to access the attachment element for its src when propagating changes to the
client. See below for details.

Test: WKAttachmentTests.AttachmentUpdatesWhenInsertingRichMarkup

  • dom/Document.h:

(WebCore::Document::attachmentElementsByIdentifier const):

  • editing/Editor.cpp:

(WebCore::Editor::notifyClientOfAttachmentUpdates):

  • page/EditorClient.h:

(WebCore::EditorClient::didInsertAttachment):

  • page/Frame.cpp:

(WebCore::Frame::setDocument):

When a Frame's document changes, inform the client that the attachments in the previous document are going away.
For each attachment currently connected to the document, we have either (1) already informed the client that it
was inserted, or (2) the attachment is pending an insertion call to the client. If (1) is the case, then we'll
tell the client that the attachment is removed, which will balance out the earlier insertion call. If (2) is the
case, then we'll remove the previously inserted attachment identifier from the set of attachment identifiers
pending insertion, and the client won't be informed of insertions or removals.

Source/WebKit:

Add a source parameter to the didInsertAttachment codepath for notifying WebKit2 clients when attachment
elements are inserted into the document.

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

(-[WKWebView _didInsertAttachment:withSource:]):
(-[WKWebView _didInsertAttachment:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm:

(WebKit::PageClientImplCocoa::didInsertAttachment):

  • UIProcess/PageClient.h:

(WebKit::PageClient::didInsertAttachment):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didInsertAttachment):

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

(WebKit::WebEditorClient::didInsertAttachment):

  • WebProcess/WebCoreSupport/WebEditorClient.h:

Tools:

Tweak an existing API test to check that the src of an attachment element inserted via script matches the
source provided to the UI delegate via -[WKUIDelegate _webView:didInsertAttachment:withSource:].

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(-[AttachmentUpdateObserver init]):
(-[AttachmentUpdateObserver sourceForIdentifier:]):
(-[AttachmentUpdateObserver _webView:didInsertAttachment:withSource:]):
(TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectSourceForIdentifier):
(TestWebKitAPI::TEST):
(-[AttachmentUpdateObserver _webView:didInsertAttachment:]): Deleted.

10:45 AM Changeset in webkit [226976] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Use traits for animation timing functions
https://bugs.webkit.org/show_bug.cgi?id=181651

Patch by Antoine Quint <Antoine Quint> on 2018-01-16
Reviewed by Dean Jackson.

Cleaning up Dean's previous patch as suggested by Darin's post-commit review comments. The
downcast function can match const automatically and it's a better style to put the * inside
the downcast call rather than outside.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createTimingFunctionValue):

  • platform/animation/TimingFunction.cpp:

(WebCore::operator<<):
(WebCore::TimingFunction::transformTime const):

  • platform/animation/TimingFunction.h:
  • platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:

(WebCore::toCAMediaTimingFunction):

10:29 AM Changeset in webkit [226975] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.1.1

New tag.

8:01 AM Changeset in webkit [226974] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[GStreamer] Live streaming cleanups
https://bugs.webkit.org/show_bug.cgi?id=181672

Reviewed by Michael Catanzaro.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Switch to
streaming code path when no content-length was reported by the
http source element.
(WebCore::MediaPlayerPrivateGStreamer::totalBytes const): Return early when streaming.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::responseReceived): Emit headers as
an element message, like souphttpsrc.

7:59 AM Changeset in webkit [226973] by Philippe Normand
  • 9 edits in trunk/Source/WebCore

[GStreamer] misc fixes and cleanups
https://bugs.webkit.org/show_bug.cgi?id=181647

Reviewed by Michael Catanzaro.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::convertEnumerationToString): New utility function to convert preload enum to string.

  • platform/graphics/MediaPlayerEnums.h: Ditto.
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::load): Debug tweak
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Ditto
(WebCore::MediaPlayerPrivateGStreamer::play): Ditto
(WebCore::MediaPlayerPrivateGStreamer::paused const): Ditto
(WebCore::MediaPlayerPrivateGStreamer::processBufferingStats): Prevent useless state update.
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Debug tweak.
(WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering): Ditto.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

Remove useless handlesSyncMessage method.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::setMuted): Prevent useless state update.
(WebCore::MediaPlayerPrivateGStreamerBase::muted const): Debug tweak.
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement): Ditto.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_init): Enable keepAlive by default like in souphttpsrc.
(webKitWebSrcStart): Debug tweak.
(webKitWebSrcQueryWithParent): Ditto.
(webKitWebSrcNeedData): Ditto.
(CachedResourceStreamingClient::responseReceived): Change appsrc
stream-type when we wan't seek. Also update caps like souphttpsrc
does.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Add forward declaration of MediaPlayer.
  • platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:

(WebCore::MediaSourceClientGStreamerMSE::append): Fix compilation warning.

7:34 AM Changeset in webkit [226972] by Michael Catanzaro
  • 2 edits in trunk/Source/bmalloc

mbmalloc should only be built in developer mode
https://bugs.webkit.org/show_bug.cgi?id=181654

Reviewed by Carlos Garcia Campos.

  • CMakeLists.txt:
7:33 AM Changeset in webkit [226971] by Michael Catanzaro
  • 2 edits in trunk/Source/JavaScriptCore

Test programs should only be built in developer mode
https://bugs.webkit.org/show_bug.cgi?id=181653

Reviewed by Carlos Garcia Campos.

Build test programs only in developer mode, and fix code style.

  • shell/CMakeLists.txt:
6:18 AM Changeset in webkit [226970] by Carlos Garcia Campos
  • 3 edits in trunk/Tools

Unreviewed. Fix GTK unit tests execution in the bots after r226967.

I forgot to pass the environment to the GLibTestRunner and Xvfb was not used in the bots.

  • glib/api_test_runner.py:

(TestRunner._run_test_glib): Pass env to GLibTestRunner.

  • glib/glib_test_runner.py:

(GLibTestRunner.run): Use given env.

4:10 AM Changeset in webkit [226969] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][WPE] Stop passing --verbose to run-api-tests from the bots
https://bugs.webkit.org/show_bug.cgi?id=181676

Reviewed by Carlos Alberto Lopez Perez.

The option was removed in r226967.

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(RunGtkAPITests):
(RunWPEAPITests):

3:38 AM Changeset in webkit [226968] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Temporarily bring back --verbose option of api_test_runner.py.

The bots are still passing that option and the step is failing because it was removed in r226967.

  • glib/api_test_runner.py:

(add_options):

2:42 AM Changeset in webkit [226967] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Tools

[GTK][WPE] Improve the way glib tests are run
https://bugs.webkit.org/show_bug.cgi?id=181674

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2018-01-16
Reviewed by Žan Doberšek.

Stop using gtester external program and use our own tester from python directly. This way we no longer need to
parse the tests output to get the results which is causing problems in WPE bot. We can now differentiate between
tests failing due to an expected assert in the test and unexpected crashes.
This also fixes a bug in previous code where we failed to properly detect tests timing out, because gtester was
not showing the subtest name in stdout in case of timeouts.
I've lowered the default timeout from 10 to 5, since we are now properly handling the timeout for every test
case. I've also removed the verbose option, since it was only used by gtester and we now always show the result
of every test case.

  • glib/api_test_runner.py:

(TestRunner._run_test_glib): Use GLibTestRunner.
(TestRunner._run_google_test): Wrote tests timing out to stdout too.
(add_options):

  • glib/glib_test_runner.py: Added.

(TestTimeout):
(Message):
(Message.init):
(Message.create):
(Message.create.read_unsigned):
(Message.create.read_double):
(Message.create.read_string):
(GLibTestRunner):
(GLibTestRunner.init):
(GLibTestRunner._process_data):
(GLibTestRunner._process_message):
(GLibTestRunner._read_from_pipe):
(GLibTestRunner._read_from_stderr):
(GLibTestRunner._start_timeout):
(GLibTestRunner._start_timeout._alarm_handler):
(GLibTestRunner._stop_timeout):
(GLibTestRunner._subtest_start):
(GLibTestRunner._subtest_message):
(GLibTestRunner._subtest_stderr):
(GLibTestRunner._subtest_end):
(GLibTestRunner.run):

12:16 AM Changeset in webkit [226966] by commit-queue@webkit.org
  • 5 edits
    11 adds in trunk/LayoutTests

[EME] Add layout test for the MSE playback of ClearKey encrypted audio and video
https://bugs.webkit.org/show_bug.cgi?id=181594

Patch by Yacine Bandou <yacine.bandou_ext@softathome.com> on 2018-01-16
Reviewed by Xabier Rodriguez-Calvar.

Add new layout tests in order to test the playback of ClearKey encrypted content:
clearKey-cenc-audio-playback-mse : Tests the MSE playback of ClearKey encrypted audio track.
clearKey-cenc-video-playback-mse : Tests the MSE playback of ClearKey encrypted video track.

  • media/content/encrypted/segments/AudioClearKeyCenc-seg-0.mp4: Added.
  • media/content/encrypted/segments/AudioClearKeyCenc-seg-1.mp4: Added.
  • media/content/encrypted/segments/AudioClearKeyCenc-seg-2.mp4: Added.
  • media/content/encrypted/segments/AudioClearKeyCenc-seg-3.mp4: Added.

These are a simple encrypted audio fragments used in MSE playback.
They have been fragmented and encrypted with BENTO4. https://www.bento4.com/
Use full-sample encryption because they are not NAL Structured.

  • media/content/encrypted/segments/VideoClearKeyCenc-seg-1.mp4: Added.
  • media/content/encrypted/segments/VideoClearKeyCenc-seg-2.mp4: Added.
  • media/content/encrypted/segments/VideoClearKeyCenc-seg-3.mp4: Added.

These are a simple encrypted video fragments used in MSE playback.
They have been fragmented and encrypted with BENTO4. https://www.bento4.com/
Use sub-sample encryption because they are NAL Structured.

  • media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse-expected.txt: Added.
  • media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html: Added.
  • media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse-expected.txt: Added.
  • media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse.html: Added.
  • media/encrypted-media/medias-enc.js:
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/wpe/TestExpectations:

The test clearKey-cenc-audio-playback-mse crashes because the clearKey decryptor plugin doesn't
support yet the Full-sample encryption, see bug 180080.

12:13 AM Changeset in webkit [226965] by commit-queue@webkit.org
  • 5 edits in trunk

[WPE] Two clearkey tests failing since r226621
https://bugs.webkit.org/show_bug.cgi?id=181532

Patch by Yacine Bandou <yacine.bandou_ext@softathome.com> on 2018-01-16
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Whith a fake initData, we can have a pssh size nul, thus we should check it.
We saw this issue in the subtest "initData longer than 64Kb characters" in
the clearkey-generate-request-disallowed-input layout test.

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::extractKeyidsLocationFromCencInitData):

LayoutTests:

  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-unique-origin-expected.txt:

Since r226621 initDataType "cenc" is supported in clearKey, so we should update the expected result of these tests.

12:04 AM Changeset in webkit [226964] by commit-queue@webkit.org
  • 7 edits in trunk/LayoutTests

[EME] some fixes in clearKey-encrypted-cenc-event LayoutTest
https://bugs.webkit.org/show_bug.cgi?id=181526

Patch by Yacine Bandou <yacine.bandou_ext@softathome.com> on 2018-01-16
Reviewed by Xabier Rodriguez-Calvar.

Update the TestExpectation files as it was done with clearKey-message-cenc-event
LayoutTest, the test should be pass in all platforms except gtk and mac.
Use const or let instead of var in JS when it's possible.

  • TestExpectations:
  • media/encrypted-media/clearKey/clearKey-encrypted-cenc-event.html:
  • media/media-source/media-source-loader-simple.js:
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/wpe/TestExpectations:
Note: See TracTimeline for information about the timeline view.