Timeline



Mar 3, 2018:

9:19 PM Changeset in webkit [229202] by commit-queue@webkit.org
  • 5 edits in trunk

Delete incorrect version of clampTo() function from SVGToOTFFontConversion.cpp
https://bugs.webkit.org/show_bug.cgi?id=183165

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-03-03
Reviewed by Darin Adler.

Source/WebCore:

Some of the calls in SVGToOTFFontConversion.cpp were directed to the function
in MathExtras.h while the rest were directed to this local static function.
There should not be two versions with the same name while they are supposed
to do the same thing. Besides, the local version does not work correctly
if the type of the argument's max limit is less the max limit of the returned
type, e.g. char -> uint16_t.

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::clampTo): Deleted.

LayoutTests:

Re-baseline the results of these two tests since the local version of
clampTo() was not returning the expected results always.

  • platform/ios/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt:
  • platform/ios/svg/text/text-altglyph-01-b-expected.txt:
3:27 PM Changeset in webkit [229201] by Brent Fulgham
  • 6 edits in trunk/Source/WebKit

Notify the NetworkProcess when a session is servicing an automation client
https://bugs.webkit.org/show_bug.cgi?id=183306
<rdar://problem/37835783>

Reviewed by Brian Burg.

Network loads servicing WebDriver are done through an ephemeral session. While this is great
for protecting a developer's machine from sharing state with test runs, it has the unintended
effect of blocking certain logging operations.

We do not log content in ephemeral sessions to protect user privacy. However, ephemeral sessions
generated by WebDriver should participate in logging so that proper testing (with logging) can
be done.

This patch signals the NetworkProcess when an ephemeral session (created for automation purposes)
is created, so that it can allow logging.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::destroySession): Remove controlled-by-automation entry.
(WebKit::NetworkProcess::sessionIsControlledByAutomation const): Added.
(WebKit::NetworkProcess::setSessionIsControlledByAutomation): Added.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::isAlwaysOnLoggingAllowed const): Checks if the relevant session
is servicing an automation client, and returns true if it is.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy): Signal the network process if this page is being created
for an automation client.

12:13 PM Changeset in webkit [229200] by Alan Bujtas
  • 10 edits in trunk

[RenderTreeBuilder] Move styleDidChange mutation logic to RenderTreeUpdater
https://bugs.webkit.org/show_bug.cgi?id=183273
<rdar://problem/38054892>

Reviewed by Antti Koivisto.

Source/WebCore:

Covered by existing tests.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::styleDidChange):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleDidChange):
(WebCore::RenderElement::noLongerAffectsParentBlock const): Deleted.

  • rendering/RenderElement.h:
  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateElementRenderer):

LayoutTests:

This is just a different repaint order.

  • fast/repaint/absolute-position-change-containing-block-expected.txt:
11:02 AM Changeset in webkit [229199] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[GTK] POTFILES.in is out of date
https://bugs.webkit.org/show_bug.cgi?id=183313

Unreviewed, remove WebErrorsGLib.cpp after r229193

  • POTFILES.in:
2:18 AM Changeset in webkit [229198] by bshafiei@apple.com
  • 7 edits in tags/Safari-606.1.6.0.1/Source

Versioning.

1:43 AM Changeset in webkit [229197] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.6.0.1

Tag Safari-606.1.6.0.1.

12:57 AM Changeset in webkit [229196] by yoav@yoav.ws
  • 5 edits
    3 adds in trunk

Source/WebCore:
Link headers for subresources are not being processes
https://bugs.webkit.org/show_bug.cgi?id=181789

Reviewed by Youenn Fablet.

Triggers Link header processing when the Link headers arrive on a subresource.

Test: http/tests/preload/link-header-on-subresource.html

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::loadLinksFromHeader): Change the media check conditions.

  • loader/LinkLoader.h: Add a third state for media checks.
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveResponse): Preload links from headers for subresources.

LayoutTests:
Link headers for subresources are not being processed
https://bugs.webkit.org/show_bug.cgi?id=181789

Reviewed by Youenn Fablet.

Adds tests to make sure Link headers on subresources are being processed.

  • http/tests/preload/link-header-on-subresource-expected.txt: Added.
  • http/tests/preload/link-header-on-subresource.html: Added.
  • http/tests/preload/resources/dummy-preloads-subresource.css.php: Added.

Mar 2, 2018:

11:58 PM Changeset in webkit [229195] by Yusuke Suzuki
  • 15 edits in trunk/Source

[WTF] Remove RunLoop and RunLoop::Timer's interface using double as seconds
https://bugs.webkit.org/show_bug.cgi?id=183293

Reviewed by Alex Christensen.

Source/WebCore:

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture):

Source/WebKit:

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:

(WebKit::CompositingRunLoop::scheduleUpdate):
(WebKit::CompositingRunLoop::compositionCompleted):
(WebKit::CompositingRunLoop::updateCompleted):

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:

(WebKit::ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback):

Source/WTF:

This patch mainly drops startRepeating(double) and startOneShot(double) interfaces.
Use startRepeating(Seconds) and startOneShot(Seconds) instead.

  • wtf/MemoryPressureHandler.cpp:

(WTF::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor):

  • wtf/RunLoop.h:

(WTF::RunLoop::TimerBase::startRepeating):
(WTF::RunLoop::TimerBase::startOneShot):
(WTF::RunLoop::TimerBase::startInternal):

  • wtf/RunLoopTimer.h:
  • wtf/RunLoopTimerCF.cpp:

(WTF::RunLoopTimerBase::start):

  • wtf/cf/RunLoopCF.cpp:

(WTF::RunLoop::runForDuration):
(WTF::RunLoop::TimerBase::start):

  • wtf/generic/RunLoopGeneric.cpp:

(WTF::RunLoop::TimerBase::start):

  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::TimerBase::start):

  • wtf/win/MemoryPressureHandlerWin.cpp:

(WTF::MemoryPressureHandler::install):

  • wtf/win/RunLoopWin.cpp:

(WTF::RunLoop::TimerBase::start):

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

Remove NP_GLContext since it is unsupported
https://bugs.webkit.org/show_bug.cgi?id=183305
<rdar://problem/36875555>

Reviewed by Simon Fraser.

  • plugins/npapi.h: Remove NP_GLContext and mention that

it is not supported.

4:07 PM Changeset in webkit [229193] by don.olmstead@sony.com
  • 4 edits
    1 delete in trunk/Source/WebKit

Share common WebError implementation
https://bugs.webkit.org/show_bug.cgi?id=183303

Reviewed by Ryosuke Niwa.

  • Shared/WebErrors.cpp:

(WebKit::cancelledError):
(WebKit::fileDoesNotExistError):

  • Shared/glib/WebErrorsGlib.cpp: Removed.
  • SourcesGTK.txt:
  • SourcesWPE.txt:
3:15 PM Changeset in webkit [229192] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Service worker test gardening
https://bugs.webkit.org/show_bug.cgi?id=183264
<rdar://problem/38048743>

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-02

3:14 PM Changeset in webkit [229191] by Chris Dumez
  • 7 edits
    2 copies
    9 adds
    1 delete in trunk

imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html crashes with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183294
<rdar://problem/38073596>

Reviewed by Youenn Fablet.

Source/WebCore:

Drop code that was added to SubresourceLoader::willCancel() in r228852. The purpose of this code
was to make sure that SubresourceLoader::m_policyForResponseCompletionHandler always gets called,
even when the load is cancelled. However, this code is not needed (since m_policyForResponseCompletionHandler
is a CompletionHandler, an assertion will be hit if we fail to call it and we'll know). Calling
the completionHandler inside SubresourceLoader::willCancel() is too early and leads to crashes.

The completionHandler currently gets called DocumentLoader::responseReceived() via a call to
mainResourceLoader->didReceiveResponsePolicy(). Note that in r229177, we made sure that the
call to didReceiveResponsePolicy() happens *after* the call to continueAfterContentPolicy()
to maintain our non-async policy delegate behavior. However, continueAfterContentPolicy()
would end up calling willCancel() and call the completionHandler when shouldContinue was
false.

Test: http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::willCancel):

LayoutTests:

Add layout test coverage.

  • http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate-expected.txt: Added.
  • http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html: Added.
2:55 PM Changeset in webkit [229190] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebCore

Fix the build after r229185 and r229184

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

(WebCore::exernalDeviceDisplayNameForPlayer):

  • platform/ios/DeviceOrientationClientIOS.h:
  • platform/ios/DeviceOrientationClientIOS.mm:
2:13 PM Changeset in webkit [229189] by don.olmstead@sony.com
  • 1 edit
    1 add in trunk

Add clang-format configuration
https://bugs.webkit.org/show_bug.cgi?id=183302

Reviewed by Ryosuke Niwa.

  • .clang-format: Added.
2:10 PM Changeset in webkit [229188] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

LayoutTest imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-within-sw.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=179248
<rdar://problem/35377756>

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

In case we go up to the initializeSize step and Caches was cleared
between the time we stated to initialize and the time we got there,
we need to make as if Caches was not initialized,
thus keeping m_isInitialized to false and m_storage to nullptr.

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::initializeSize):

2:00 PM Changeset in webkit [229187] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Build fix after r229174
https://bugs.webkit.org/show_bug.cgi?id=183301

Patch by Christopher Reid <chris.reid@sony.com> on 2018-03-02
Reviewed by Alex Christensen.

Updating MemoryPressureHandler::holdOff to use Seconds instead of unsigned.

  • wtf/MemoryPressureHandler.cpp:
12:19 PM Changeset in webkit [229186] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Make the LLInt probe work for ARM64.
https://bugs.webkit.org/show_bug.cgi?id=183298
<rdar://problem/38077413>

Reviewed by Filip Pizlo.

  • llint/LowLevelInterpreter.asm:
11:55 AM Changeset in webkit [229185] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebCore

Make the !ENABLE(DEVICE_ORIENTATION) iOS build succeed
https://bugs.webkit.org/show_bug.cgi?id=183296

Reviewed by Dan Bernstein.

  • platform/ios/DeviceMotionClientIOS.h:
  • platform/ios/DeviceMotionClientIOS.mm:
  • platform/ios/WebCoreMotionManager.h:
  • platform/ios/WebCoreMotionManager.mm:
11:47 AM Changeset in webkit [229184] by timothy_horton@apple.com
  • 4 edits in trunk/Source

Make it possible to build for iOS without Celestial
https://bugs.webkit.org/show_bug.cgi?id=183295
<rdar://problem/38074468>

Reviewed by Dan Bernstein.

Source/WebCore:

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

(WebCore::exernalDeviceDisplayNameForPlayer):

Source/WTF:

  • wtf/Platform.h:
11:17 AM Changeset in webkit [229183] by commit-queue@webkit.org
  • 12 edits in trunk/Source

Clients should register to StorageProcess with their service worker registration identifier
https://bugs.webkit.org/show_bug.cgi?id=182313
<rdar://problem/38044403>

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

Source/WebCore:

Relanding with fixing matchAll for uncontrolled clients.

No observable change of behavior in regular conditions.
When service worker process crashes, the service worker identifiers sent by the WebProcess might be wrong
and we will not be able to retrieve the registration from these identifiers.
The storage process will be able to still process correctly messages coming from the WebProcess to register clients of the registration.
Otherwise, there is a chance that WebProcess clients will not be added to the SWServerRegistration.m_clientsUsingRegistration maps.

  • dom/Document.cpp:

(WebCore::Document::setServiceWorkerConnection):

  • workers/service/SWClientConnection.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::matchAll):
(WebCore::SWServer::claim):
(WebCore::SWServer::registerServiceWorkerClient):
(WebCore::SWServer::unregisterServiceWorkerClient):
(WebCore::SWServer::setClientActiveWorker): Deleted.

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::activate):

Source/WebKit:

Relanding.

  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::registerServiceWorkerClient):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::registerServiceWorkerClient):

  • WebProcess/Storage/WebSWClientConnection.h:
10:33 AM Changeset in webkit [229182] by timothy_horton@apple.com
  • 7 edits in trunk/Source

Make it possible to disable WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=183281

Reviewed by Dan Bates.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _isBackground]):
(-[WKWebView _isDisplayingPDF]):
(-[WKWebView _dataForDisplayedPDF]):
(-[WKWebView _suggestedFilenameForDisplayedPDF]):

  • UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:

(-[WKWebViewContentProviderRegistry init]):

  • UIProcess/ios/WKPDFView.h:
  • UIProcess/ios/WKPDFView.mm:
  • wtf/FeatureDefines.h:
10:29 AM Changeset in webkit [229181] by commit-queue@webkit.org
  • 7 edits in trunk

Loads for a Document controlled by a Service Worker should not use AppCache
https://bugs.webkit.org/show_bug.cgi?id=183148

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

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/appcache-ordering-main.https-expected.txt:

Source/WebCore:

Covered by updated test.

Postponing document loading through app cache after matching service worker registration.
Trying to load through app cache only if there is no service worker registration.

Disabling app cache for any load that has a service worker registration identifier.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::redirectReceived):
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::tryLoadingRequestFromApplicationCache):
(WebCore::DocumentLoader::tryLoadingRedirectRequestFromApplicationCache):
(WebCore::DocumentLoader::restartLoadingDueToServiceWorkerRegistrationChange):
(WebCore::DocumentLoader::scheduleSubstituteResourceLoad):
(WebCore::DocumentLoader::startLoadingMainResource):

  • loader/DocumentLoader.h:
  • loader/appcache/ApplicationCacheHost.cpp:

(WebCore::ApplicationCacheHost::maybeLoadMainResource):
(WebCore::ApplicationCacheHost::maybeLoadMainResourceForRedirect):
(WebCore::ApplicationCacheHost::maybeLoadResource):
(WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):

  • loader/appcache/ApplicationCacheHost.h:
9:55 AM Changeset in webkit [229180] by Yusuke Suzuki
  • 10 edits in trunk/Source

[JSC] Annotate more classes with WTF_MAKE_FAST_ALLOCATED
https://bugs.webkit.org/show_bug.cgi?id=183279

Reviewed by JF Bastien.

Source/JavaScriptCore:

  • bytecode/BytecodeIntrinsicRegistry.h:
  • ftl/FTLThunks.h:
  • heap/CodeBlockSet.h:
  • heap/GCSegmentedArray.h:
  • heap/MachineStackMarker.h:
  • heap/MarkingConstraintSet.h:

Source/WTF:

  • wtf/SimpleStats.h:
  • wtf/ThreadGroup.h:
9:52 AM Changeset in webkit [229179] by Chris Dumez
  • 3 edits
    2 adds in trunk

fast/events/before-unload-remove-itself.html crashes with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183290
<rdar://problem/38069045>

Reviewed by Alex Christensen.

Source/WebCore:

When the navigation policy happens asynchronously, it is now possible for the
Frame / FrameLoader to get destroyed between the point that policyChecker().checkNavigationPolicy()
is called and when continueLoadAfterNavigationPolicy() is called.

To address the issue, we now protect the Frame and capture it in the lambda passed
to policyChecker().checkNavigationPolicy().

Test: fast/events/before-unload-remove-itself-async-delegate.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):

LayoutTests:

Add layout test coverage.

  • fast/events/before-unload-remove-itself-async-delegate-expected.txt: Added.
  • fast/events/before-unload-remove-itself-async-delegate.html: Added.
9:48 AM Changeset in webkit [229178] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

WebProcessProxy should handle its completion handler at destruction time
https://bugs.webkit.org/show_bug.cgi?id=183224

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-02
Reviewed by Brady Eidson.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::~WebProcessProxy):

  • UIProcess/WebProcessProxy.h:
9:41 AM Changeset in webkit [229177] by Chris Dumez
  • 15 edits
    2 adds in trunk

Converting a load to a download does not work with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183254
<rdar://problem/38035334>

Reviewed by Youenn Fablet.

Source/WebCore:

Update DocumentLoader::responseReceived() to call didReceiveResponsePolicy()
on the mainResourceLoader *after* calling continueAfterContentPolicy(),
not *before*. This makes sure that the WebResourceLoader sends the
NetworkResourceLoader::ContinueDidReceiveResponse IPC back to the Network
Process *after* the policy decision has been processed, which restores the
pre-r228852 order.

Test: fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::responseReceived):

Tools:

Add layout test infrastructure for responding to the decidePolicyForNavigationResponse
delegate asynchronously.

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

(WTR::InjectedBundlePage::decidePolicyForResponse):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

(WTR::TestRunner::shouldDecideResponsePolicyAfterDelay const):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::decidePolicyForNavigationResponse):

  • WebKitTestRunner/TestController.h:

(WTR::TestController::setShouldDecideResponsePolicyAfterDelay):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

Add layout test coverage.

  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate-expected.txt: Added.
  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html: Added.
9:39 AM Changeset in webkit [229176] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Some RealtimeMediaSource methods do not need to be marked as virtual
https://bugs.webkit.org/show_bug.cgi?id=183272

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

No change of behavior.

  • platform/mediastream/RealtimeMediaSource.h:
9:37 AM Changeset in webkit [229175] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Update WebContent process sandbox IOKit properties
https://bugs.webkit.org/show_bug.cgi?id=183269
<rdar://problem/37853282>

Reviewed by Eric Carlson.

  • WebProcess/com.apple.WebProcess.sb.in:
9:13 AM Changeset in webkit [229174] by Yusuke Suzuki
  • 177 edits in trunk/Source

Remove monotonicallyIncreasingTime
https://bugs.webkit.org/show_bug.cgi?id=182911

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • debugger/Debugger.cpp:

(JSC::Debugger::willEvaluateScript):
(JSC::Debugger::didEvaluateScript):

  • debugger/Debugger.h:
  • debugger/ScriptProfilingScope.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::breakpointActionProbe):

  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::InspectorHeapAgent::snapshot):
(Inspector::InspectorHeapAgent::didGarbageCollect):
(Inspector::InspectorHeapAgent::dispatchGarbageCollectedEvent):

  • inspector/agents/InspectorHeapAgent.h:
  • inspector/agents/InspectorScriptProfilerAgent.cpp:

(Inspector::InspectorScriptProfilerAgent::startTracking):
(Inspector::InspectorScriptProfilerAgent::willEvaluateScript):
(Inspector::InspectorScriptProfilerAgent::didEvaluateScript):
(Inspector::InspectorScriptProfilerAgent::addEvent):
(Inspector::buildSamples):

  • inspector/agents/InspectorScriptProfilerAgent.h:
  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::takeSample):

  • runtime/SamplingProfiler.h:

Source/WebCore:

While generic code uses MonotonicTime, CAAnimation uses media time (CFTimeInterval).
At this boundary, we convert MonotonicTime to media time, this is the same logic to
the code before this patch.

  • Modules/gamepad/Gamepad.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::monitorBufferingRate):

  • Modules/mediasource/SourceBuffer.h:
  • Modules/speech/SpeechSynthesis.cpp:

(WebCore::SpeechSynthesis::startSpeakingImmediately):
(WebCore::SpeechSynthesis::fireEvent):

  • Modules/speech/SpeechSynthesisUtterance.h:
  • contentextensions/ContentExtensionCompiler.cpp:

(WebCore::ContentExtensions::compileRuleList):

  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::parseRuleList):

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const):

  • dom/Element.cpp:

(WebCore::Element::setActive):

  • history/CachedPage.cpp:

(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::hasExpired const):

  • history/CachedPage.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::startProgressEventTimer):
(WebCore::HTMLMediaElement::progressEventTimerFired):
(WebCore::HTMLMediaElement::refreshCachedTime const):
(WebCore::HTMLMediaElement::invalidateCachedTime const):
(WebCore::HTMLMediaElement::currentMediaTime const):
(WebCore::HTMLMediaElement::startPlaybackProgressTimer):

  • html/HTMLMediaElement.h:
  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::removeBehaviorRestriction):
(WebCore::MediaElementSession::mostRecentUserInteractionTime const):
(WebCore::MediaElementSession::resetPlaybackSessionState):

  • html/MediaElementSession.h:
  • html/parser/HTMLParserScheduler.cpp:

(WebCore::PumpSession::PumpSession):
(WebCore::HTMLParserScheduler::HTMLParserScheduler):

  • html/parser/HTMLParserScheduler.h:

(WebCore::HTMLParserScheduler::checkForYield):

  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::recordAction):
(WebCore::InspectorCanvas::finalizeFrame):

  • inspector/InspectorCanvas.h:
  • inspector/agents/InspectorMemoryAgent.cpp:

(WebCore::InspectorMemoryAgent::startTracking):
(WebCore::InspectorMemoryAgent::didHandleMemoryPressure):
(WebCore::InspectorMemoryAgent::collectSample):

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildObjectForTiming):
(WebCore::InspectorNetworkAgent::timestamp):
(WebCore::InspectorNetworkAgent::didFinishLoading):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::timestamp):

  • inspector/agents/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::timestamp):

  • inspector/agents/WebHeapAgent.cpp:

(WebCore::WebHeapAgent::dispatchGarbageCollectedEvent):

  • inspector/agents/WebHeapAgent.h:
  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::didDraw):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::didAccessDecodedData):

  • loader/cache/CachedResource.h:
  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::pruneLiveResourcesToSize):

  • page/EventHandler.cpp:

(WebCore::MaximumDurationTracker::MaximumDurationTracker):
(WebCore::MaximumDurationTracker::~MaximumDurationTracker):

  • page/FocusController.cpp:

(WebCore::FocusController::setFocusedElement):
(WebCore::FocusController::timeSinceFocusWasSet const):

  • page/FocusController.h:
  • page/FrameView.cpp:

(WebCore::FrameView::reset):
(WebCore::FrameView::willPaintContents):
(WebCore::FrameView::didPaintContents):

  • page/FrameView.h:
  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::freezeAtTime):
(WebCore::AnimationBase::beginAnimationUpdateTime const):

  • page/animation/AnimationBase.h:

(WebCore::AnimationBase::onAnimationStartResponse):

  • page/animation/CSSAnimationController.cpp:

(WebCore::CSSAnimationControllerPrivate::beginAnimationUpdateTime):
(WebCore::CSSAnimationControllerPrivate::receivedStartTimeResponse):
(WebCore::CSSAnimationControllerPrivate::startTimeResponse):
(WebCore::CSSAnimationController::notifyAnimationStarted):

  • page/animation/CSSAnimationController.h:
  • page/animation/CSSAnimationControllerPrivate.h:
  • page/mac/WheelEventDeltaFilterMac.h:
  • page/mac/WheelEventDeltaFilterMac.mm:

(WebCore::WheelEventDeltaFilterMac::beginFilteringDeltas):
(WebCore::WheelEventDeltaFilterMac::updateFromDelta):
(WebCore::WheelEventDeltaFilterMac::endFilteringDeltas):

  • platform/ControlStates.h:

(WebCore::ControlStates::timeSinceControlWasFocused const):
(WebCore::ControlStates::setTimeSinceControlWasFocused):

  • platform/PlatformSpeechSynthesisUtterance.h:

(WebCore::PlatformSpeechSynthesisUtterance::startTime const):
(WebCore::PlatformSpeechSynthesisUtterance::setStartTime):

  • platform/gamepad/PlatformGamepad.h:

(WebCore::PlatformGamepad::lastUpdateTime const):
(WebCore::PlatformGamepad::connectTime const):
(WebCore::PlatformGamepad::PlatformGamepad):

  • platform/gamepad/cocoa/GameControllerGamepad.mm:

(WebCore::GameControllerGamepad::setupAsExtendedGamepad):
(WebCore::GameControllerGamepad::setupAsGamepad):

  • platform/gamepad/mac/HIDGamepad.cpp:

(WebCore::HIDGamepad::HIDGamepad):
(WebCore::HIDGamepad::valueChanged):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::suspendAnimations):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/GraphicsLayerClient.h:

(WebCore::GraphicsLayerClient::notifyAnimationStarted):

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

(WebCore::LayerClient::platformCALayerAnimationStarted):
(WebCore::AVFWrapper::createImageForTimeInRect):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::addAnimation):
(WebCore::GraphicsLayerCA::pauseAnimation):
(WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
(WebCore::GraphicsLayerCA::setAnimationOnLayer):
(WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
(WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

  • platform/graphics/ca/GraphicsLayerCA.h:

(WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
(WebCore::GraphicsLayerCA::AnimationProcessingAction::AnimationProcessingAction):

  • platform/graphics/ca/LayerPool.cpp:

(WebCore::LayerPool::LayerPool):
(WebCore::LayerPool::addLayer):
(WebCore::LayerPool::decayedCapacity const):
(WebCore::LayerPool::pruneTimerFired):

  • platform/graphics/ca/LayerPool.h:
  • platform/graphics/ca/PlatformCAAnimation.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/PlatformCALayerClient.h:

(WebCore::PlatformCALayerClient::platformCALayerAnimationStarted):

  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::revalidateTiles):
(WebCore::TileGrid::startedNewCohort):
(WebCore::TileGrid::TileCohortInfo::timeUntilExpiration):
(WebCore::TileGrid::cohortRemovalTimerFired):

  • platform/graphics/ca/TileGrid.h:

(WebCore::TileGrid::TileCohortInfo::TileCohortInfo):

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(mediaTimeToCurrentTime):
(-[WebAnimationDelegate animationDidStart:]):
(PlatformCALayerCocoa::animationStarted):

  • platform/graphics/ca/win/CACFLayerTreeHost.cpp:

(WebCore::CACFLayerTreeHost::notifyAnimationsStarted):

  • platform/graphics/ca/win/PlatformCALayerWin.cpp:

(PlatformCALayerWin::animationStarted):
(PlatformCALayerWin::layerTreeAsString const):

  • platform/graphics/ca/win/PlatformCALayerWin.h:
  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WebCore::WebCoreDecompressionSession::decodeSample):

  • platform/graphics/texmap/BitmapTexturePool.cpp:

(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):

  • platform/graphics/texmap/BitmapTexturePool.h:

(WebCore::BitmapTexturePool::Entry::markIsInUse):
(WebCore::BitmapTexturePool::Entry::canBeReleased const):
(): Deleted.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::addAnimation):
(WebCore::GraphicsLayerTextureMapper::pauseAnimation):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:
  • platform/graphics/texmap/TextureMapperAnimation.cpp:

(WebCore::TextureMapperAnimation::TextureMapperAnimation):
(WebCore::TextureMapperAnimation::apply):
(WebCore::TextureMapperAnimation::pause):
(WebCore::TextureMapperAnimation::resume):
(WebCore::TextureMapperAnimation::computeTotalRunningTime):
(WebCore::TextureMapperAnimations::pause):
(WebCore::TextureMapperAnimations::suspend):

  • platform/graphics/texmap/TextureMapperAnimation.h:

(WebCore::TextureMapperAnimation::startTime const):
(WebCore::TextureMapperAnimation::pauseTime const):

  • platform/graphics/texmap/TextureMapperFPSCounter.cpp:

(WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
(WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):

  • platform/graphics/texmap/TextureMapperFPSCounter.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

(WebCore::TextureMapperPlatformLayerBuffer::markUsed):
(WebCore::TextureMapperPlatformLayerBuffer::lastUsedTime const):
(): Deleted.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::releaseUnusedBuffersTimerFired):

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

(WebCore::CoordinatedGraphicsLayer::addAnimation):
(WebCore::CoordinatedGraphicsLayer::pauseAnimation):
(WebCore::CoordinatedGraphicsLayer::suspendAnimations):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::sendFrame):

  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:

(WebCore::LibWebRTCAudioModule::StartPlayoutOnAudioThread):

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::startProducingData):
(WebCore::DisplayCaptureSourceCocoa::stopProducingData):
(WebCore::DisplayCaptureSourceCocoa::elapsedTime):

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
  • platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
  • platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:

(WebCore::MockRealtimeAudioSourceMac::render):

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):

  • platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
  • platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:

(WebCore::ScreenDisplayCaptureSourceMac::sampleBufferFromPixelBuffer):
(WebCore::ScreenDisplayCaptureSourceMac::frameAvailable):

  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::startProducingData):
(WebCore::MockRealtimeAudioSource::stopProducingData):
(WebCore::MockRealtimeAudioSource::elapsedTime):
(WebCore::MockRealtimeAudioSource::tick):
(WebCore::MockRealtimeAudioSource::delaySamples):

  • platform/mock/MockRealtimeAudioSource.h:

(WebCore::MockRealtimeAudioSource::render):

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::startProducingData):
(WebCore::MockRealtimeVideoSource::stopProducingData):
(WebCore::MockRealtimeVideoSource::elapsedTime):
(WebCore::MockRealtimeVideoSource::drawText):
(WebCore::MockRealtimeVideoSource::delaySamples):
(WebCore::MockRealtimeVideoSource::generateFrame):

  • platform/mock/MockRealtimeVideoSource.h:
  • platform/network/DNSResolveQueue.cpp:

(WebCore::DNSResolveQueue::DNSResolveQueue):
(WebCore::DNSResolveQueue::isUsingProxy):

  • platform/network/DNSResolveQueue.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::suspendAnimations):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::paintFocusRing):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintAreaElementFocusRing):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::notifyAnimationStarted):
(WebCore::RenderLayerBacking::suspendAnimations):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::didPaintBacking):

  • rendering/RenderProgress.cpp:

(WebCore::RenderProgress::RenderProgress):
(WebCore::RenderProgress::animationProgress const):
(WebCore::RenderProgress::updateAnimationState):

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

(WebCore::RenderTheme::animationDurationForProgressBar const):

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

(WebCore::RenderThemeGtk::animationDurationForProgressBar const):

  • rendering/RenderThemeGtk.h:
  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::animationDurationForProgressBar const):

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::animationDurationForProgressBar const):

  • svg/animation/SMILTimeContainer.cpp:

(WebCore::SMILTimeContainer::SMILTimeContainer):
(WebCore::SMILTimeContainer::elapsed const):
(WebCore::SMILTimeContainer::isActive const):
(WebCore::SMILTimeContainer::isPaused const):
(WebCore::SMILTimeContainer::isStarted const):
(WebCore::SMILTimeContainer::begin):
(WebCore::SMILTimeContainer::pause):
(WebCore::SMILTimeContainer::resume):
(WebCore::SMILTimeContainer::setElapsed):
(WebCore::SMILTimeContainer::timerFired):

  • svg/animation/SMILTimeContainer.h:
  • testing/Internals.cpp:

(WebCore::Internals::delayMediaStreamTrackSamples):

  • testing/MockGamepad.cpp:

(WebCore::MockGamepad::MockGamepad):
(WebCore::MockGamepad::updateDetails):
(WebCore::MockGamepad::setAxisValue):
(WebCore::MockGamepad::setButtonValue):

Source/WebCore/PAL:

  • pal/system/ClockGeneric.cpp:

(PAL::ClockGeneric::currentTime const):
(PAL::ClockGeneric::now const):

  • pal/system/ClockGeneric.h:

Source/WebKit:

  • NetworkProcess/cache/CacheStorageEngineCache.cpp:

(WebKit::CacheStorage::Cache::toRecordInformation):

  • Platform/IPC/ArgumentCoders.cpp:

(IPC::ArgumentCoder<Seconds>::encode):
(IPC::ArgumentCoder<Seconds>::decode):
(IPC::ArgumentCoder<MonotonicTime>::encode):
(IPC::ArgumentCoder<MonotonicTime>::decode):

  • Platform/IPC/ArgumentCoders.h:
  • Shared/Gamepad/GamepadData.cpp:

(WebKit::GamepadData::GamepadData):

  • Shared/Gamepad/GamepadData.h:

(WebKit::GamepadData::lastUpdateTime const):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<MonotonicTime>::encode): Deleted.
(IPC::ArgumentCoder<MonotonicTime>::decode): Deleted.
(IPC::ArgumentCoder<Seconds>::encode): Deleted.
(IPC::ArgumentCoder<Seconds>::decode): Deleted.
ArgumentCoders for MonotonicTime and Seconds are now used internally.
Move them to Platform/IPC/ArgumentCoders.h.

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::iconDatabaseSyncThread):

  • UIProcess/DrawingAreaProxyImpl.cpp:

(WebKit::DrawingAreaProxyImpl::DrawingMonitor::start):
(WebKit::DrawingAreaProxyImpl::DrawingMonitor::stop):
(WebKit::DrawingAreaProxyImpl::DrawingMonitor::didDraw):

  • UIProcess/DrawingAreaProxyImpl.h:
  • UIProcess/Gamepad/UIGamepad.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):

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

(WebKit::RemoteLayerTreeHost::animationDidStart):

  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::acceleratedAnimationDidStart):

  • WebProcess/WebPage/DrawingArea.messages.in:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:

(mediaTimeToCurrentTime):
(-[WKAnimationDelegate animationDidStart:]):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::animationStarted):
This argument beginTime is not CFTimeInverval actually. We add currentTimeToMediaTime
conversion here to fix this issue.

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::animationDidStart):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::destroyRenderingResources):

Source/WebKitLegacy/win:

  • FullscreenVideoController.cpp:

(FullscreenVideoController::LayerClient::platformCALayerAnimationStarted):

  • Plugins/PluginMessageThrottlerWin.cpp:

(WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
(WebCore::PluginMessageThrottlerWin::appendMessage):

  • Plugins/PluginMessageThrottlerWin.h:
  • WebView.cpp:

(WebView::notifyAnimationStarted):

  • WebView.h:

Source/WTF:

This patch drops monotonicallyIncreasingTime and monotonicallyIncreasingTimeMS.
We have MonotonicTime API instead. This offers strongly typed MonotonicTime,
Seconds etc. This reduces the chance of bugs mixing doubles which represent milliseconds
and seconds.

Large part of this patch is mechanical one: replacing monotonicallyIncreasingTime with
MonotonicTime, using MonotonicTime and Seconds instead of raw doubles.

But this patch actually finds some bugs (but it is a bit difficult to show it as a test).
One is mixing media time (CACurrentMediaTime()) and MonotonicTime. Basically they are
super close because both uses mach_absolute_time(). But they would be slightly different.
So we should not mix them.

The second bug is GraphicsLayer::suspendAnimations(double). While CA ports (Apple, AppleWin,
iOS etc.) use this double as MonotonicTime, GTK and WPE use this double as Seconds (timeOffset).
This patch fixes it and now the signature becomes GraphicsLayer::suspendAnimations(MonotonicTime).

In this patch, we still uses bunch of double for Seconds. But fixing them at this patch increases
the size of this larger and larger. So some of them remains double. This should be fixed in
subsequent patches.

  • benchmarks/ConditionSpeedTest.cpp:
  • benchmarks/LockSpeedTest.cpp:
  • wtf/CurrentTime.cpp:

(WTF::MonotonicTime::now):
(WTF::monotonicallyIncreasingTime): Deleted.

  • wtf/CurrentTime.h:

(WTF::monotonicallyIncreasingTimeMS): Deleted.

  • wtf/MemoryPressureHandler.h:
  • wtf/MonotonicTime.cpp:

(WTF::MonotonicTime::now): Deleted.

  • wtf/MonotonicTime.h:
  • wtf/ParkingLot.cpp:
  • wtf/Seconds.h:

(WTF::Seconds::nan):

  • wtf/Stopwatch.h:

(WTF::Stopwatch::reset):
(WTF::Stopwatch::start):
(WTF::Stopwatch::stop):
(WTF::Stopwatch::elapsedTime):
(WTF::Stopwatch::elapsedTimeSince):

  • wtf/cocoa/MemoryPressureHandlerCocoa.mm:

(WTF::MemoryPressureHandler::holdOff):
(WTF::MemoryPressureHandler::respondToMemoryPressure):

  • wtf/linux/MemoryPressureHandlerLinux.cpp:

(WTF::MemoryPressureHandler::EventFDPoller::EventFDPoller):
(WTF::MemoryPressureHandler::holdOff):
(WTF::MemoryPressureHandler::respondToMemoryPressure):

  • wtf/win/MemoryPressureHandlerWin.cpp:

(WTF::MemoryPressureHandler::holdOff):

8:55 AM Changeset in webkit [229173] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] whitelist missing AppleJPEG logging feature
https://bugs.webkit.org/show_bug.cgi?id=183270
<rdar://problem/37808612>

Reviewed by Alex Christensen.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
8:52 AM Changeset in webkit [229172] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

IOChannel::read and IOChannel::write can destroy the completion handler in the thread used to manipulate thread
https://bugs.webkit.org/show_bug.cgi?id=183261

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-02
Reviewed by Antti Koivisto.

Moving the completion handler when being called so that it gets desttroyed in the thread it is called.

  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:

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

2:47 AM Changeset in webkit [229171] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed gardening

  • platform/gtk/TestExpectations: Add

imported/w3c/web-platform-tests/css/css-ui/text-overflow-022.html,
which started failing in the bots.

2:00 AM Changeset in webkit [229170] by Claudio Saavedra
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Update js/dom static properties after r229112

Unreviewed gardening.

  • platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt:
  • platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt:
1:23 AM Changeset in webkit [229169] by commit-queue@webkit.org
  • 5 edits
    1 copy in trunk/Source/WebCore

Make LibWebRTCProvider port agnostic again after r215424
https://bugs.webkit.org/show_bug.cgi?id=183080

Patch by Alejandro G. Castro <alex@igalia.com> on 2018-03-02
Reviewed by Youenn Fablet.

In the r215424 commit the webRTCAvailable function started to use a function from the DARWIN platform,
we have moved that code to the cocoa class and created a glib implementation that will be used in the future
to implement the LibWebRTCProviderGlib class.

No new tests, this is a refactor.

  • Sources.txt: Add the compilation of the new file.
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: Remove the webRTCAvailable function from this file.

(WebCore::LibWebRTCProvider::create): We want to use this even when LIBWEBRTC is not used.

  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

(WebCore::LibWebRTCProvider::webRTCAvailable): Moved the code from the LibWebRTCProvider class.

  • platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:

(WebCore::LibWebRTCProvider::webRTCAvailable): Add the glib implementation, basically true, we are always
linking libwebrtc for the moment in these situations.

12:20 AM Changeset in webkit [229168] by mitz@apple.com
  • 4 edits in trunk/Source

Safari uses WebContent.Development when loading injected bundle embedded in its app bundle
https://bugs.webkit.org/show_bug.cgi?id=183275

Reviewed by Tim Horton.

Source/WebKit:

  • UIProcess/mac/WebProcessProxyMac.mm:

(WebKit::WebProcessProxy::shouldAllowNonValidInjectedCode const): Return false if this is

a platform binary. We can also return false unconditionally when building for any shipping
major macOS release.

Source/WTF:

  • wtf/spi/cocoa/SecuritySPI.h: Declared SecTaskGetCodeSignStatus.

Mar 1, 2018:

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

Unreviewed gardening. Skip new action tests added in r229166.

11:56 PM Changeset in webkit [229166] by Carlos Garcia Campos
  • 41 edits
    3 adds
    4 deletes in trunk/WebDriverTests

Unreviewed. Update W3C WebDriver imported tests.

  • imported/w3c/importer.json:
  • imported/w3c/tools/webdriver/webdriver/transport.py:
  • imported/w3c/tools/wptrunner/MANIFEST.in:
  • imported/w3c/tools/wptrunner/README.rst:
  • imported/w3c/tools/wptrunner/requirements.txt:
  • imported/w3c/tools/wptrunner/requirements_chrome.txt:
  • imported/w3c/tools/wptrunner/requirements_edge.txt:
  • imported/w3c/tools/wptrunner/requirements_firefox.txt:
  • imported/w3c/tools/wptrunner/requirements_ie.txt:
  • imported/w3c/tools/wptrunner/requirements_opera.txt:
  • imported/w3c/tools/wptrunner/requirements_sauce.txt:
  • imported/w3c/tools/wptrunner/requirements_servo.txt:
  • imported/w3c/tools/wptrunner/setup.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/chrome.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/chrome_android.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/edge.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/firefox.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/ie.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/opera.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/sauce.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/server-locations.txt: Removed.
  • imported/w3c/tools/wptrunner/wptrunner/browsers/servo.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/servodriver.py:
  • imported/w3c/tools/wptrunner/wptrunner/config.json: Removed.
  • imported/w3c/tools/wptrunner/wptrunner/environment.py:
  • imported/w3c/tools/wptrunner/wptrunner/executors/executorservo.py:
  • imported/w3c/tools/wptrunner/wptrunner/font.py:
  • imported/w3c/tools/wptrunner/wptrunner/hosts.py: Removed.
  • imported/w3c/tools/wptrunner/wptrunner/testrunner.py:
  • imported/w3c/tools/wptrunner/wptrunner/tests/browsers/init.py: Added.
  • imported/w3c/tools/wptrunner/wptrunner/tests/test_hosts.py: Removed.
  • imported/w3c/tools/wptrunner/wptrunner/webdriver_server.py:
  • imported/w3c/tools/wptrunner/wptrunner/wptrunner.py:
  • imported/w3c/webdriver/OWNERS:
  • imported/w3c/webdriver/tests/actions/mouse.py:
  • imported/w3c/webdriver/tests/actions/mouse_dblclick.py:
  • imported/w3c/webdriver/tests/actions/pointer_origin.py: Added.
  • imported/w3c/webdriver/tests/actions/support/mouse.py:
  • imported/w3c/webdriver/tests/element_click/bubbling.py:
  • imported/w3c/webdriver/tests/element_click/select.py:
  • imported/w3c/webdriver/tests/element_send_keys/form_controls.py:
  • imported/w3c/webdriver/tests/element_send_keys/interactability.py:
  • imported/w3c/webdriver/tests/execute_script/cyclic.py:
  • imported/w3c/webdriver/tests/fullscreen_window.py:
  • imported/w3c/webdriver/tests/interface.html:
  • imported/w3c/webdriver/tests/state/get_element_property.py:
10:43 PM Changeset in webkit [229165] by Carlos Garcia Campos
  • 5 edits
    2 adds in trunk

REGRESSION(r222843): [HarfBuzz] Combining enclosed keycap not correctly handled
https://bugs.webkit.org/show_bug.cgi?id=183246

Reviewed by Michael Catanzaro.

Source/WebCore:

We are not correctly handling the combining enclosed keycap since we switched to use
ComplexTextController. This is because fontForCombiningCharacterSequence() always returns the font of the first
character, without checking if that font can render the whole sequence or not. Before 222843, the shaper did
that check when creating the text runs. In this case the sequence was split and a different font was used for the
text and the mark. This patch makes fontForCombiningCharacterSequence() try to find a suitable font for the
whole sequence, first looking at the CSS fallbacks and finally at system ones. The result is much better than
the old one, because we use the same font for both the text and the mark. If there isn't any font to render the
mark, then we fallback to use the first character font, since we will end up rendering the missing glyph
character, it's better to use the same font than the first character one.

Test: fast/text/combining-enclosing-keycap.html

  • platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:

(WebCore::FontCascade::fontForCombiningCharacterSequence const): Check if the first charatcer font can render
the whole sequence, trying with fallbacks otherwise.

  • platform/graphics/freetype/SimpleFontDataFreeType.cpp:

(WebCore::Font::canRenderCombiningCharacterSequence const): Check if the font face has glyphs for the whole
sequence not just the first character.

LayoutTests:

  • fast/text/combining-enclosing-keycap-expected.txt: Added.
  • platform/gtk/fast/text/combining-enclosing-keycap.html: Added.
  • platform/gtk/TestExpectations:
10:40 PM Changeset in webkit [229164] by Carlos Garcia Campos
  • 11 edits in trunk

[FreeType] Remove FontPlatformData fallbacks
https://bugs.webkit.org/show_bug.cgi?id=183210

Reviewed by Michael Catanzaro.

Source/WebCore:

They are only used by FontCache::systemFallbackForCharacters() where a direct FcFontMatch provides the same
or better results.

  • platform/graphics/FontPlatformData.h: Remove fallbacks.
  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::systemFallbackForCharacters): Use FcFontMatch() only.

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::fallbacks): Removed.

LayoutTests:

Rebaseline 3 tests that progressed.

  • platform/gtk/fast/text/international/bidi-LDB-2-CSS-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-CSS-expected.txt:
  • platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.txt:
  • platform/gtk/fast/text/international/bidi-LDB-2-formatting-characters-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
10:04 PM Changeset in webkit [229163] by commit-queue@webkit.org
  • 12 edits in trunk/Source

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

it is breaking imported/w3c/web-platform-tests/service-workers
/service-worker/clients-matchall-exact-controller.https.html
(Requested by youenn on #webkit).

Reverted changeset:

"Clients should register to StorageProcess with their service
worker registration identifier"
https://bugs.webkit.org/show_bug.cgi?id=182313
https://trac.webkit.org/changeset/229153

9:55 PM Changeset in webkit [229162] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

ASSERTION FAILED: matchContextualKeyword(m_vm->propertyNames->async)
https://bugs.webkit.org/show_bug.cgi?id=183173

Reviewed by Saam Barati.

JSTests:

  • stress/async-arrow-function-in-class-heritage.js: Added.

(testSyntax):
(testSyntaxError):
(SyntaxError):

Source/JavaScriptCore:

Classifier could propagate an error which does not occur at the first token
of the given expression. We should check whether the given token is "async"
instead of assertion.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseAssignmentExpression):

9:00 PM Changeset in webkit [229161] by sbarati@apple.com
  • 5 edits
    1 add in trunk

We need to clear cached structures when having a bad time
https://bugs.webkit.org/show_bug.cgi?id=183256
<rdar://problem/36245022>

Reviewed by Mark Lam.

JSTests:

  • stress/having-a-bad-time-with-derived-arrays.js: Added.

(assert):
(defineSetter):
(iterate):
(doSlice):

Source/JavaScriptCore:

This patch makes both InternalFunctionAllocationProfile and the VM's
structure cache having-a-bad-time aware. For InternalFunctionAllocationProfile,
we clear them when they'd produce an object with a bad indexing type.
For the VM's Structure cache, we conservatively clear the entire cache
since it may be housing Structures with bad indexing types.

  • runtime/FunctionRareData.h:

(JSC::FunctionRareData::clearInternalFunctionAllocationProfile):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::haveABadTime):

  • runtime/StructureCache.h:

(JSC::StructureCache::clear):

5:41 PM Changeset in webkit [229160] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Service worker test gardening
https://bugs.webkit.org/show_bug.cgi?id=183264

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-01

5:17 PM Changeset in webkit [229159] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.1-branch/Source

Versioning.

5:16 PM Changeset in webkit [229158] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.0-branch/Source

Versioning.

5:11 PM Changeset in webkit [229157] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.33.0.2

Tag Safari-605.1.33.0.2.

5:10 PM Changeset in webkit [229156] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.33.1.2

Tag Safari-605.1.33.1.2.

5:03 PM WebKitGTK/2.20.x edited by Michael Catanzaro
(diff)
5:01 PM Changeset in webkit [229155] by Michael Catanzaro
  • 2 edits in trunk

[CMake] configure failure for aarch64
https://bugs.webkit.org/show_bug.cgi?id=183268

Unreviewed build fix. This failure is caused by a simple typo.

  • Source/cmake/OptionsCommon.cmake:
4:31 PM Changeset in webkit [229154] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Add the "com.apple.security.cs.disable-library-validation” entitlement to the Plugin Process
https://bugs.webkit.org/show_bug.cgi?id=183252
<rdar://problem/37887136>

Reviewed by David Kilzer.

  • Configurations/PluginService.entitlements:
4:04 PM Changeset in webkit [229153] by commit-queue@webkit.org
  • 12 edits in trunk/Source

Clients should register to StorageProcess with their service worker registration identifier
https://bugs.webkit.org/show_bug.cgi?id=182313

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

Source/WebCore:

No observable change of behavior in regular conditions.
When service worker process crashes, the service worker identifiers sent by the WebProcess might be wrong
and we will not be able to retrieve the registration from these identifiers.
The storage process will be able to still process correctly messages coming from the WebProcess to register clients of the registration.
Otherwise, there is a chance that WebProcess clients will not be added to the SWServerRegistration.m_clientsUsingRegistration maps.

  • dom/Document.cpp:

(WebCore::Document::setServiceWorkerConnection):

  • workers/service/SWClientConnection.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::registerServiceWorkerClient):

  • workers/service/server/SWServer.h:

Source/WebKit:

  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::registerServiceWorkerClient):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::registerServiceWorkerClient):

  • WebProcess/Storage/WebSWClientConnection.h:
3:22 PM Changeset in webkit [229152] by wilander@apple.com
  • 42 edits in trunk/LayoutTests

Move resource load statistics tests from js-test-pre.js to js-test.js
https://bugs.webkit.org/show_bug.cgi?id=183249
<rdar://problem/38033096>

Unreviewed test gardening.

  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-expected.txt:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-expected.txt:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-expected.txt:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-expected.txt:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-expected.txt:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-expected.txt:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-expected.txt:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-expected.txt:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-expected.txt:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-expected.txt:
  • 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-expected.txt:
  • http/tests/resourceLoadStatistics/grandfathering.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-expected.txt:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-expected.txt:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
  • http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt:
  • http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-expected.txt:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-expected.txt:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-expected.txt:
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html:
3:19 PM Changeset in webkit [229151] by commit-queue@webkit.org
  • 5 edits in trunk

LayoutTest imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-within-sw.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=179248
<rdar://problem/35377756>

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

Source/WebKit:

WebKitTestRunner is clearing caches for every test but there might still be some on-going cache activity due to a previous test.
In that case, the activity might try to open the Caches object at the same time the files are deleted by the clearing task.
If the new test is trying to open the same caches, it will also receive the same error, hence the console log message.

To fix that issue, we clear the initialization pending callbacks when clearing the caches.
This prevents the new test to receive the error since the new test should only start some cache activity after the cache clear task is done.
Made refactoring to append the first callback into the list of pending callbacks.

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::initialize):
(WebKit::CacheStorage::Caches::initializeSize):
(WebKit::CacheStorage::Caches::clear):

  • NetworkProcess/cache/CacheStorageEngineCaches.h:

LayoutTests:

3:18 PM Changeset in webkit [229150] by commit-queue@webkit.org
  • 11 edits in trunk

Add API test to validate setting of service worker and cache storage directories
https://bugs.webkit.org/show_bug.cgi?id=182543

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

Source/WebCore:

Covered by API tests.

Add getters to service worker registration directory.

  • testing/Internals.cpp:

(WebCore::Internals::serviceWorkerRegistrationDirectory):

  • testing/Internals.h:
  • testing/Internals.idl:
  • workers/service/SWClientConnection.h:
  • workers/service/server/RegistrationDatabase.h:

(WebCore::RegistrationDatabase::serviceWorkerRegistrationDirectory const):

  • workers/service/server/RegistrationStore.h:

(WebCore::RegistrationStore::serviceWorkerRegistrationDirectory const):

  • workers/service/server/SWServer.h:

(WebCore::SWServer::serviceWorkerRegistrationDirectory const):

Source/WebKit:

Add cache engine directory path to its representation dump.
This is used in API tests to check that the path is correctly set.

Add a way for to know whether a service worker was registered from a WKWebsiteDataStore.
This is used in API tests to check that the path is correctly set.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::representation):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _hasRegisteredServiceWorker]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

LayoutTests:

Updated tests according new engine representation.

  • http/tests/cache-storage/cache-clearing-origin.https.html:
  • http/tests/cache-storage/cache-origins.https.html:
  • http/tests/cache-storage/cache-representation.https.html:
3:14 PM Changeset in webkit [229149] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

SWServer::removeClientServiceWorkerRegistration should not log an error if there is no registration
https://bugs.webkit.org/show_bug.cgi?id=183248

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

No change of behavior.
Removed the error logging.
As can be seen from running api and layout tests, a web process can ask a registration to be unregistered
and by the time it goes to the StorageProcess, the registration is already cleared.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::removeClientServiceWorkerRegistration):

3:11 PM Changeset in webkit [229148] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Fix some errors due to some mach port APIs being unavailable on watchOS
https://bugs.webkit.org/show_bug.cgi?id=183262
<rdar://problem/38028521>

Reviewed by Tim Horton.

Minor build fix; mach_port_guard and mach_port_unguard are not available on this platform.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::Connection::open):

2:35 PM Changeset in webkit [229147] by dbates@webkit.org
  • 8 edits
    12 adds in trunk

CSS ::selection stroke-color and stroke-width are not applied to selected text in text fields
and ::selection:window-inactive stroke-color and stroke-width are never applied
https://bugs.webkit.org/show_bug.cgi?id=183178

Reviewed by David Hyatt.

Source/WebCore:

This change fixes the following two issues:

  1. Properties stroke-color and stroke-width are not applied to the ::selection pseudo- element of text fields.
  2. Properties stroke-color and stroke-width are never applied to ::selection:window-inactive pseudo elements.

Currently when computing the paint styles for selected text we query the cached styles for
the ::selection pseudo element on the renderer. Text fields are implemented using a User Agent
shadow DOM. With regards to issue (1) the renderer queried was the inner most renderer for
the text in the text field. But it should have been the shadow host renderer (i.e. the renderer
for the <input>). With regards to issue (2) we cannot retrieve cached styles for the
::selection pseudo element because it can be effected by a pseudo class, :window-inactive,
which matches when the page is deactivated (i.e. the window is in the background as the user
made another window the frontmost window). Both of these issues are fixed by making use
of RenderElement::selectionPseudoStyle().

Tests: fast/selectors/selection-window-inactive-stroke-color.html

fast/selectors/selection-window-inactive-text-shadow.html
fast/selectors/text-field-selection-stroke-color.html
fast/selectors/text-field-selection-text-shadow.html
fast/selectors/text-field-selection-window-inactive-stroke-color.html
fast/selectors/text-field-selection-window-inactive-text-shadow.html

  • rendering/RenderText.h:

(WebCore::RenderText::selectionPseudoStyle const): Add a convenience function that turns
around and calls the function of the same name on its parent.

  • rendering/TextPaintStyle.cpp:

(WebCore::computeTextSelectionPaintStyle): Modified to use RenderText::selectionPseudoStyle()
instead of directly querying for the cached styles for the ::selection pseudo element.

LayoutTests:

Add tests to ensure that we paint ::selection stroke-color and stroke-width for selected text
in text fields. Add tests to ensure that we apply ::selection:window-inactive stroke-color
and stroke-width to selected text when the page is deactivated.

  • fast/selectors/selection-window-inactive-stroke-color-expected.html: Added.
  • fast/selectors/selection-window-inactive-stroke-color.html: Added.
  • fast/selectors/selection-window-inactive-text-shadow-expected.html: Added.
  • fast/selectors/selection-window-inactive-text-shadow.html: Added.
  • fast/selectors/text-field-selection-stroke-color-expected.html: Added.
  • fast/selectors/text-field-selection-stroke-color.html: Added.
  • fast/selectors/text-field-selection-text-shadow-expected.html: Added.
  • fast/selectors/text-field-selection-text-shadow.html: Added.
  • fast/selectors/text-field-selection-window-inactive-stroke-color-expected.html: Added.
  • fast/selectors/text-field-selection-window-inactive-stroke-color.html: Added.
  • fast/selectors/text-field-selection-window-inactive-text-shadow-expected.html: Added.
  • fast/selectors/text-field-selection-window-inactive-text-shadow.html: Added.
  • platform/gtk/TestExpectations: Skip the ::selection:window-inactive tests until we fix

<https://bugs.webkit.org/show_bug.cgi?id=183143>.

Windows does not seem to be updating selectors when the window is deactivated or window deactivation,
testRunner.setWindowIsKey() is broken.

  • platform/wpe/TestExpectations: Skip the ::selection:window-inactive tests until we fix

<https://bugs.webkit.org/show_bug.cgi?id=183144>.

2:21 PM Changeset in webkit [229146] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r229140.

  • WebProcess/cocoa/WebProcessCocoa.mm:
1:58 PM Changeset in webkit [229145] by jmarcell@apple.com
  • 2 edits in branches/safari-605.1.33.0-branch/Source/WebKit

Cherry-pick r229134. rdar://problem/38035469

1:58 PM Changeset in webkit [229144] by jmarcell@apple.com
  • 1 edit in branches/safari-605.1.33.0-branch/Source/JavaScriptCore/runtime/Options.h

Apply patch. rdar://problem/38035480

1:50 PM Changeset in webkit [229143] by Ross Kirsling
  • 13 edits
    1 copy
    3 adds in trunk

[Win][DRT] Implement setSpatialNavigationEnabled.
https://bugs.webkit.org/show_bug.cgi?id=183166

Reviewed by Per Arne Vollan.

Source/WebKitLegacy/win:

Create a non-dummy implementation of the private preference in Win WKL to support layout tests.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):
(WebPreferences::spatialNavigationEnabled):
(WebPreferences::setSpatialNavigationEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

  • DumpRenderTree/TestRunner.cpp:

(setSpatialNavigationEnabledCallback):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::setSpatialNavigationEnabled):

LayoutTests:

  • platform/win/fast/spatial-navigation/snav-multiple-select-focusring-expected.txt:
  • platform/wincairo/fast/spatial-navigation/snav-multiple-select-focusring-expected.txt: Added.

This test requires an expectation for every platform. AppleWin had one but it must've been a copy-paste job?

  • platform/win/TestExpectations:

Enable fast/spatial-navigation tests on AppleWin too.

1:45 PM Changeset in webkit [229142] by jmarcell@apple.com
  • 1 edit in branches/safari-605.1.33.1-branch/Source/JavaScriptCore/runtime/Options.h

Apply patch. rdar://problem/38035478

1:26 PM Changeset in webkit [229141] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[webkitpy] Use shell=False to launch apache http server.
https://bugs.webkit.org/show_bug.cgi?id=183191

Patch by Basuke Suzuki <Basuke Suzuki> on 2018-03-01
Reviewed by Aakash Jain.

  • Scripts/webkitpy/layout_tests/servers/apache_http_server.py:

(LayoutTestApacheHttpd.init):
(LayoutTestApacheHttpd._run):

1:16 PM Changeset in webkit [229140] by pvollan@apple.com
  • 13 edits in trunk/Source

Scrollbar preferences are ignored when the WebContent process doesn't have access to the WindowServer.
https://bugs.webkit.org/show_bug.cgi?id=183231
<rdar://problem/37793457>

Reviewed by Brent Fulgham.

When the WebContent process doesn't have access to the WindowServer, the scrollbars are always of the overlay type.
The notification about scrollbar preferences is never received by the WebContent process when there is no
WindowServer access. This can be fixed by adding an observer of scrollbar preferences in the UI process, and
notifying the WebProcess about this by sending it a message. This message should also contain the preferred
scrollbar type, since the call '[NSScroller preferredScrollerStyle]' will always return the overlay style when
there is no WindowServer access.

Source/WebCore:

No new tests, covered by existing tests.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mac/NSScrollerImpDetails.h:
  • platform/mac/NSScrollerImpDetails.mm:

(WebCore::ScrollerStyle::recommendedScrollerStyle):
(WebCore::ScrollerStyle::setUseOverlayScrollbars):
(WebCore::recommendedScrollerStyle): Deleted.

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar const):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar const):
(WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):

Source/WebKit:

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):

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

(WebKit::WebProcess::initializeProcess):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::scrollerStylePreferenceChanged):

1:11 PM Changeset in webkit [229139] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Temporarily enable user-installed-fonts everywhere until we can stop crashing on launch
https://bugs.webkit.org/show_bug.cgi?id=183255

Unreviewed.

Tests are already disabled.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:
12:39 PM Changeset in webkit [229138] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[Curl] Split DNS cache expiration and connection timeout setting.
https://bugs.webkit.org/show_bug.cgi?id=182979

It was mis-implemented and was named ambiguous name 'enableTimeout'.
Implement each feature correctly.

Patch by Basuke Suzuki <Basuke Suzuki> on 2018-03-01
Reviewed by Per Arne Vollan.

  • platform/network/curl/CurlContext.cpp:

(WebCore::EnvironmentVariableReader::read):
(WebCore::EnvironmentVariableReader::defined):
(WebCore::EnvironmentVariableReader::readAs):
(WebCore::EnvironmentVariableReader::sscanTemplate):
(WebCore::EnvironmentVariableReader::sscanTemplate<unsigned>):
(WebCore::CurlContext::CurlContext):
(WebCore::safeTimeValue):
(WebCore::CurlHandle::setDnsCacheTimeout):
(WebCore::CurlHandle::setConnectTimeout):
(WebCore::CurlHandle::setTimeout):
(WebCore::CurlHandle::enableTimeout): Deleted.

  • platform/network/curl/CurlContext.h:

(WebCore::CurlContext::dnsCacheTimeout const):
(WebCore::CurlContext::connectTimeout const):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupTransfer):

12:20 PM Changeset in webkit [229137] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Remove RenderElement::s_noLongerAffectsParentBlock
https://bugs.webkit.org/show_bug.cgi?id=183196
<rdar://problem/38030797>

Reviewed by Antti Koivisto.

Remove the hack to track floating/out-of-flow changes between styleWillChange and styleDidChange.

Covered by existing tests.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::styleDidChange):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::noLongerAffectsParentBlock const):
(WebCore::RenderElement::styleDidChange):

  • rendering/RenderElement.h:

(WebCore::RenderElement::noLongerAffectsParentBlock const): Deleted.

10:41 AM Changeset in webkit [229136] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed, update WebKit.CustomHeaderFields API test after r229133.

We no longer do policy checks for 'about:blank'.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[CustomHeaderFieldsDelegate webView:startURLSchemeTask:]):
(TEST):

9:41 AM Changeset in webkit [229135] by jmarcell@apple.com
  • 2 edits in branches/safari-605.1.33.1-branch/Source/JavaScriptCore

Cherry-pick r229109. rdar://problem/38005919

9:11 AM Changeset in webkit [229134] by Antti Koivisto
  • 2 edits in trunk/Source/WebKit

Crash when updating cache entry after validation in apps that uses class A file protection
https://bugs.webkit.org/show_bug.cgi?id=183242
<rdar://problem/33289058>

Reviewed by Chris Dumez.

When validating a cache entry, we keep it alive until we get a network response. With 304 response
we then update the headers of this existing entry. This accesses the body data of the entry which
may be backed by a mapped file. If the app uses class A protection, user might have locked
the device and the entry might have become inaccessible, leading to a crash.

  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::setNeedsValidation):

In case of class A protection, pull the data to a memory buffer immediately before starting a revalidation request.
This makes the window where the file could become inaccessible much shorter (since it no longer depends on network).

9:05 AM Changeset in webkit [229133] by Chris Dumez
  • 7 edits
    3 adds in trunk

imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html fails with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183225
<rdar://problem/38003828>

Reviewed by Alex Christensen.

Source/WebCore:

Bypass navigation policy check when loading about:blank. This does not seem necessary and it would not
be Web-compatible for such policy check to happen synchronously. This is because an iframe without src
or src="about:blank" should load synchronously as per HTML specification.

Test: http/wpt/html/browsers/windows/browsing-context.html

  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy):

LayoutTests:

  • http/wpt/html/browsers/windows/browsing-context-expected.txt: Added.
  • http/wpt/html/browsers/windows/browsing-context.html: Added.

Add layout test coverage.

  • fast/loader/iframe-src-invalid-url-expected.txt:
  • fast/loader/policy-delegate-action-hit-test-zoomed-expected.txt:
  • loader/navigation-policy/should-open-external-urls/subframe-click-target-self-expected.txt:
  • loader/navigation-policy/should-open-external-urls/subframe-click-target-top-expected.txt:

Rebaseline a few layout tests now that the log lines for the about:blank policy checks are
gone.

8:59 AM Changeset in webkit [229132] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[Curl] Linker errors in some curl files due to missing exports
https://bugs.webkit.org/show_bug.cgi?id=183238

Patch by Christopher Reid <chris.reid@sony.com> on 2018-03-01
Reviewed by Alex Christensen.

No new tests, no change in behavior.

Adding WEBCORE_EXPORT to functions now used in WebKit.

  • platform/network/NetworkStorageSession.h:
  • platform/network/curl/CookieJarDB.h:
  • platform/network/curl/CurlContext.h:
6:00 AM Changeset in webkit [229131] by commit-queue@webkit.org
  • 5 edits
    1 delete in trunk/Source/WebCore

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

It breaks AppleWin compilation (Requested by alexg on
#webkit).

Reverted changeset:

"Make LibWebRTCProvider port agnostic again after r215424"
https://bugs.webkit.org/show_bug.cgi?id=183080
https://trac.webkit.org/changeset/229130

5:27 AM Changeset in webkit [229130] by commit-queue@webkit.org
  • 5 edits
    1 copy in trunk/Source/WebCore

Make LibWebRTCProvider port agnostic again after r215424
https://bugs.webkit.org/show_bug.cgi?id=183080

Patch by Alejandro G. Castro <alex@igalia.com> on 2018-03-01
Reviewed by Youenn Fablet.

In the r215424 commit the webRTCAvailable function started to use a function from the DARWIN platform,
we have moved that code to the cocoa class and created a glib implementation that will be used in the future
to implement the LibWebRTCProviderGlib class.

No new tests, this is a refactor.

  • Sources.txt: Add the compilation of the new file.
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: Remove the webRTCAvailable function from this file.

(WebCore::LibWebRTCProvider::create): We want to use this even when LIBWEBRTC is not used.

  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

(WebCore::LibWebRTCProvider::webRTCAvailable): Moved the code from the LibWebRTCProvider class.

  • platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:

(WebCore::LibWebRTCProvider::webRTCAvailable): Add the glib implementation, basically true, we are always
linking libwebrtc for the moment in these situations.

2:24 AM Changeset in webkit [229129] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix exception check for ExceptionScope
https://bugs.webkit.org/show_bug.cgi?id=183175

  • jsc.cpp:

(GlobalObject::moduleLoaderFetch):

1:26 AM Changeset in webkit [229128] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[FreeType] Color emojis in WebKitGTK+ for great justice
https://bugs.webkit.org/show_bug.cgi?id=183155

Reviewed by Michael Catanzaro.

Emojis are actually rendered if there's an emoji font installed in the system, but the size is so tiny that we
don't see them. This is because for some reason the matrix we are getting from fontconfig contains a scale,
which we don't expect. We only get the fontconfig matrix to apply rotations in case of oblique fonts, and then we
always apply the scale for the computed pixel font size. Ignoring the fontconfig matrix scale fixes the issue.

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::fontWeightToFontconfigWeight): Moved here since it's now used by configurePatternForFontDescription().
(WebCore::configurePatternForFontDescription): Helper function to apply the same options for fallback pattern.
(WebCore::createFontConfigPatternForCharacters): Use configurePatternForFontDescription().
(WebCore::findBestFontGivenFallbacks): Adopt the returned reference.
(WebCore::FontCache::systemFallbackForCharacters): Clean it up.
(WebCore::FontCache::createFontPlatformData): Use configurePatternForFontDescription().

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::buildScaledFont): Ignore the scale returned by fontconfig matrix.

1:24 AM Changeset in webkit [229127] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer] text samples no longer processed
https://bugs.webkit.org/show_bug.cgi?id=183212

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::newTextSample): Refer to
track stream ID instead of (potentially) manually generated track
ID stored as hashmap keys.

1:24 AM Changeset in webkit [229126] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

REGRESSION(r221514): [GTK] UI process crash in WebKit::WaylandCompositor::Surface::flushPendingFrameCallbacks
https://bugs.webkit.org/show_bug.cgi?id=183091

Reviewed by Michael Catanzaro.

Invalidate the surface in the page map when the backing store is destroyed.

  • UIProcess/gtk/WaylandCompositor.cpp:

(WebKit::WaylandCompositor::willDestroySurface):

  • UIProcess/gtk/WaylandCompositor.h:

Feb 28, 2018:

11:35 PM Changeset in webkit [229125] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[ARM] Fix compile error in debug builds by invoking unpoisoned().

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-02-28
Reviewed by Mark Lam.

  • assembler/MacroAssemblerCodeRef.h:

(JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): Fix compile error.
(JSC::MacroAssemblerCodePtr::createFromExecutableAddress()): Ditto.
(JSC::MacroAssemblerCodePtr::dataLocation()): Ditto.

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::ByteCompiler::dumpDisjunction): use %zu for printf'ing size_t.

10:47 PM Changeset in webkit [229124] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

Push WTF_PLATFORM_IOS down into preprocessor.pm instead of trying to determine it inside
https://bugs.webkit.org/show_bug.cgi?id=183193

Reviewed by Andy Estes.

  • DerivedSources.make:
  • bindings/scripts/preprocessor.pm:

(applyPreprocessor):
Instead of trying to discern WTF_PLATFORM_IOS inside preprocessor.pm,
push it down from DerivedSources.make. Also clean up DerivedSources.make
a tiny bit by adding a variable, FEATURE_AND_PLATFORM_DEFINES, which
contains both FEATURE_DEFINES and WTF_PLATFORM macros if needed.

7:55 PM Changeset in webkit [229123] by jmarcell@apple.com
  • 2 edits in branches/safari-605.1.33.0-branch/Source/JavaScriptCore

Cherry-pick r229109. rdar://problem/38005929

7:51 PM Changeset in webkit [229122] by jmarcell@apple.com
  • 2 edits in tags/Safari-605.1.32.0.1/Source/JavaScriptCore

Cherry-pick r229109. rdar://problem/38005929

7:49 PM Changeset in webkit [229121] by jmarcell@apple.com
  • 7 edits in tags/Safari-605.1.32.0.1/Source

Versioning.

7:40 PM Changeset in webkit [229120] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.32.0.1

New tag.

6:18 PM Changeset in webkit [229119] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests/imported/w3c

Make LayoutTests wait_for_state fail after a given period of time
https://bugs.webkit.org/show_bug.cgi?id=183039

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

This will allow further investigating why some tests are timing out.

  • web-platform-tests/service-workers/service-worker/resources/test-helpers.sub.js:

(wait_for_state):

6:15 PM Changeset in webkit [229118] by n_wang@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test accessibility/mac/accessibility-make-first-responder.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=183232

Reviewed by Chris Fleizach.

The test is flaky because that the UIProcess might have received the IPC message
to set the first responder after we check the current state. Added a delay
in the test to fix that.

  • accessibility/mac/accessibility-make-first-responder.html:
6:12 PM Changeset in webkit [229117] by BJ Burg
  • 4 edits in trunk/Source/WebKit

[Cocoa] Web Automation: provide a way to ask clients the type of a JavaScript dialog
https://bugs.webkit.org/show_bug.cgi?id=182660
<rdar://problem/37408183>

Reviewed by Tim Horton and Carlos Garcia Campos.

Add another delegate method to ask what type of dialog is being shown.
This is used to implement §18.4 Step 5, where sending text to a dialog
without a prompt will return several different kinds of errors.

No new tests, covered by web platform tests once Safari side has landed.

  • UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h: Update FIXME radar numbers.
  • UIProcess/Cocoa/AutomationSessionClient.h:
  • UIProcess/Cocoa/AutomationSessionClient.mm:

(WebKit::AutomationSessionClient::AutomationSessionClient):
(WebKit::toImpl):
(WebKit::AutomationSessionClient::typeOfCurrentJavaScriptDialogOnPage):
If there is no current dialog to be checked, the client can return the 'None'
type. This gets converted into a std::nullopt and causes a command error later.

6:09 PM Changeset in webkit [229116] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitpy] Remove concept of 'future' versions (Follow-up fix 2)
https://bugs.webkit.org/show_bug.cgi?id=183184
<rdar://problem/37958594>

Reviewed by Aakash Jain.

Unlisted Apple versions can't run webkitpy tests because they don't
have specified port names.

  • Scripts/webkitpy/port/apple.py:

(ApplePort.determine_full_port_name): Return valid port name for unnamed
versions.

  • Scripts/webkitpy/port/base.py:

(Port.version_name): Check both public and internal version mapping
when returning a version name.

  • Scripts/webkitpy/port/mac.py:

(MacPort.init): If no os version is defined, use the current version.

4:54 PM Changeset in webkit [229115] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit

Remove assertion from ResourceLoadStatisticsClassifier::calculateResourcePrevalence() which causes crashes when domains are explicitly set as prevalent without the associated statistics
https://bugs.webkit.org/show_bug.cgi?id=183233

Unreviewed removal of an assertion that's causing layout test crashes.

  • Platform/classifier/ResourceLoadStatisticsClassifier.cpp:

(WebKit::ResourceLoadStatisticsClassifier::calculateResourcePrevalence):

Removed ASSERT(currentPrevalence == Low).

4:37 PM Changeset in webkit [229114] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.1-branch/Source

Versioning.

4:33 PM Changeset in webkit [229113] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.0-branch/Source

Versioning.

4:30 PM Changeset in webkit [229112] by n_wang@apple.com
  • 17 edits
    5 adds in trunk

AX: AOM: Dispatch accessiblesetvalue event
https://bugs.webkit.org/show_bug.cgi?id=183021
<rdar://problem/37764242>

Reviewed by Chris Fleizach.

Source/WebCore:

Accessibility events.
Spec: https://wicg.github.io/aom/spec/phase2.html

Added a new event type AccessibleSetValueEvent.

Test: accessibility/mac/AOM-event-accessiblesetvalue.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/AccessibilityAllInOne.cpp:
  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::canSetValueAttribute const):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::press):
(WebCore::AccessibilityObject::dispatchAccessibilityEvent):
(WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent):

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

(WebCore::AccessibilityRenderObject::setValue):

  • accessibility/AccessibilityScrollbar.cpp:

(WebCore::AccessibilityScrollbar::setValue):

  • accessibility/AccessibilitySlider.cpp:

(WebCore::AccessibilitySlider::setValue):

  • accessibility/AccessibleSetValueEvent.cpp: Added.

(WebCore::AccessibleSetValueEvent::AccessibleSetValueEvent):

  • accessibility/AccessibleSetValueEvent.h: Added.

(WebCore::AccessibleSetValueEvent::create):
(WebCore::AccessibleSetValueEvent::value const):

  • accessibility/AccessibleSetValueEvent.idl: Added.
  • dom/Element.idl:
  • dom/EventNames.h:
  • dom/EventNames.in:

LayoutTests:

  • accessibility/mac/AOM-event-accessiblesetvalue-expected.txt: Added.
  • accessibility/mac/AOM-event-accessiblesetvalue.html: Added.
  • js/dom/dom-static-property-for-in-iteration-expected.txt:
4:12 PM Changeset in webkit [229111] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.33.0.1

Tag Safari-605.1.33.0.1.

4:11 PM Changeset in webkit [229110] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.33.1.1

Tag Safari-605.1.33.1.1.

4:00 PM Changeset in webkit [229109] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

GC should sweep code block before deleting
https://bugs.webkit.org/show_bug.cgi?id=183229
<rdar://problem/32767615>

Reviewed by Saam Barati, Fil Pizlo.

Stub routines shouldn't get deleted before codeblocks have been
swept, otherwise there's a small race window where the codeblock
thinks it's still reachable.

  • heap/Heap.cpp:

(JSC::Heap::deleteUnmarkedCompiledCode):
(JSC::Heap::sweepInFinalize):

3:58 PM Changeset in webkit [229108] by Chris Dumez
  • 4 edits
    8 adds in trunk

html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183168
<rdar://problem/37951341>

Reviewed by Alex Christensen.

Source/WebCore:

The test has an anchor element with both a 'click' event handler which submits a form
and an href attribute. When clicking the link, as per specification, things happen in
this order:

  1. We fire the click event at the anchor, which will execute the event handler and submit the form. Submitting the form *schedules* a navigation to 'click.html'.
  2. We execute the anchor activation code which *navigates* to 'href.html'. The navigation to 'href' is supposed to cancel the pending navigation to 'click.html' and we should navigate to 'href.html', which is what the test asserts.

The issue for us is that we do not cancel pending navigations until after the navigation
policy decision is made, when the provisional loads actually starts, in FrameLoader::provisionalLoadStarted().
Because the policy decision for the navigation can now be made asynchronously, the NavigationScheduler
timer can now fire while the decision is made and we'll submit the form, thus navigating to
'click.html'.

To address the issue, we now cancel any pending navigations in FrameLoader::loadWithDocumentLoader(),
*before* doing the policy check for the navigation.

Test: http/wpt/html/browsers/browsing-the-web/navigating-across-documents/006.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadWithDocumentLoader):

LayoutTests:

Add layout test coverage.

  • TestExpectations:
  • http/wpt/html/browsers/browsing-the-web/navigating-across-documents/006-expected.txt: Added.
  • http/wpt/html/browsers/browsing-the-web/navigating-across-documents/006.html: Added.
  • http/wpt/html/browsers/browsing-the-web/navigating-across-documents/click.html: Added.
  • http/wpt/html/browsers/browsing-the-web/navigating-across-documents/href.html: Added.
3:23 PM Changeset in webkit [229107] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

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

Patch by Alicia Boya García <aboya@igalia.com> on 2018-02-28

  • platform/gtk/TestExpectations:
2:25 PM Changeset in webkit [229106] by wilander@apple.com
  • 27 edits
    2 adds in trunk

Add a second tier of prevalence to facilitate telemetry on very prevalent domains
https://bugs.webkit.org/show_bug.cgi?id=183218
<rdar://problem/37992388>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html

  • loader/ResourceLoadStatistics.cpp:

(WebCore::ResourceLoadStatistics::encode const):
(WebCore::ResourceLoadStatistics::decode):
(WebCore::ResourceLoadStatistics::toString const):
(WebCore::ResourceLoadStatistics::merge):

Handling of the new boolean field isVeryPrevalentResource.

  • loader/ResourceLoadStatistics.h:

Added the new boolean field isVeryPrevalentResource.

Source/WebKit:

  • Platform/classifier/ResourceLoadStatisticsClassifier.cpp:

(WebKit::vectorLength):

New convenience function.

(WebKit::ResourceLoadStatisticsClassifier::calculateResourcePrevalence):

Renamed from ResourceLoadStatisticsClassifier::hasPrevalentResourceCharacteristics().
Now returns a value from the enum ResourceLoadPrevalence.

(WebKit::ResourceLoadStatisticsClassifier::classifyWithVectorThreshold):

Now uses the new vectorLength() convenience function.

(WebKit::ResourceLoadStatisticsClassifier::hasPrevalentResourceCharacteristics): Deleted.

Renamed to ResourceLoadStatisticsClassifier::calculateResourcePrevalence().

  • Platform/classifier/ResourceLoadStatisticsClassifier.h:

Added enum ResourceLoadPrevalence.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
(IPC::ArgumentCoder<ResourceLoadStatistics>::decode):

Handling of the new boolean field isVeryPrevalentResource.

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):

Test infrastructure.

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):

All of these are for handling of the two-tier classification.
Also bumped the statisticsModelVersion to 12.

  • UIProcess/WebResourceLoadStatisticsStore.h:

Tools:

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:

Added two new testRunner functions:

  • setStatisticsVeryPrevalentResource()
  • isStatisticsVeryPrevalentResource()
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsVeryPrevalentResource):
(WTR::TestRunner::isStatisticsVeryPrevalentResource):

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

(WTR::TestController::setStatisticsVeryPrevalentResource):
(WTR::TestController::isStatisticsVeryPrevalentResource):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-expected.txt: Added.
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html: Added.
  • platform/wk2/TestExpectations:

New test marked as [ Pass ].

2:01 PM Changeset in webkit [229105] by jmarcell@apple.com
  • 7 edits
    5 adds in branches/safari-605.1.33.1-branch

Cherry-pick r229086. rdar://problem/37991718

2:01 PM Changeset in webkit [229104] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.1-branch/Source

Cherry-pick r229028. rdar://problem/37992270

1:57 PM Changeset in webkit [229103] by jmarcell@apple.com
  • 7 edits
    5 adds in branches/safari-605.1.33.0-branch

Cherry-pick r229086. rdar://problem/37991818

1:57 PM Changeset in webkit [229102] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.0-branch/Source

Cherry-pick r229028. rdar://problem/37947990

1:54 PM Changeset in webkit [229101] by aakash_jain@apple.com
  • 2 edits in trunk/Websites/perf.webkit.org

Rename samplePendingBuild to samplePendingBuildRequest
https://bugs.webkit.org/show_bug.cgi?id=183171

Reviewed by Ryosuke Niwa.

  • unit-tests/buildbot-syncer-tests.js:

(samplePendingBuildRequests): Renamed from samplePendingBuild.
(samplePendingBuildRequestDeprecated): Renamed from samplePendingBuildDeprecated.
(samplePendingBuild): Deleted.
(samplePendingBuildDeprecated): Deleted.

11:53 AM Changeset in webkit [229100] by commit-queue@webkit.org
  • 24 edits in trunk/Source

Reduce use of NetworkingContext in WebKit
https://bugs.webkit.org/show_bug.cgi?id=183213

Patch by Alex Christensen <achristensen@webkit.org> on 2018-02-28
Reviewed by Brady Eidson.

Source/WebCore:

NetworkingContext is intended to be used only with ResourceHandle, which is now only used in WebKitLegacy.
Now that we don't use ResourceHandle in the WebProcess, everything that was done through the NetworkingContext
can now be done a cleaner way with no change in behavior.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadResourceSynchronously):

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::loadLink):

  • loader/LoaderStrategy.h:
  • platform/network/ProxyServer.h:
  • platform/network/cf/ProxyServerCFNet.cpp:

(WebCore::proxyServersForURL):

  • platform/network/curl/ProxyServerCurl.cpp:

(WebCore::proxyServersForURL):

  • platform/network/soup/ProxyServerSoup.cpp:

(WebCore::proxyServersForURL):

Source/WebKit:

  • NetworkProcess/RemoteNetworkingContext.h:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::preconnectTo):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::proxiesForURL):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
  • WebProcess/WebPage/WebFrame.cpp:

Source/WebKitLegacy:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::loadResourceSynchronously):
(WebResourceLoadScheduler::preconnectTo):

  • WebCoreSupport/WebResourceLoadScheduler.h:

Source/WebKitLegacy/mac:

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::getProxy):

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView getVariable:forURL:value:length:]):

Source/WebKitLegacy/win:

  • Plugins/PluginView.cpp:

(WebCore::PluginView::getValueForURL):

11:34 AM Changeset in webkit [229099] by Jonathan Bedard
  • 3 edits in trunk/Tools

[webkitpy] Remove concept of 'future' versions (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=183184
<rdar://problem/37958594>

Reviewed by David Kilzer.

The factory also relies on future in a non-obvious way.

  • Scripts/webkitpy/common/system/platforminfo.py:

(PlatformInfo.os_version_name): Check both public and internal version mapping
when returning a version name.

  • Scripts/webkitpy/common/system/platforminfo_mock.py:

(MockPlatformInfo.os_version_name): Ditto.

11:14 AM Changeset in webkit [229098] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Disable three resourceLoadStatistics tests on iOS Simulator Debug because they frequently time out.
https://bugs.webkit.org/show_bug.cgi?id=183216

Unreviewed test gardening.

  • platform/ios/TestExpectations:
10:25 AM Changeset in webkit [229097] by zandobersek@gmail.com
  • 2 edits in trunk/Tools

Unreviewed WPE fixup after r229080.

Add empty definitions for two AccessibilityUIElement methods,
avoiding undefined symbols in the WKTR injected bundle.

  • WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:

(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

10:15 AM Changeset in webkit [229096] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.4.4/Source

Versioning.

10:08 AM Changeset in webkit [229095] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=182983

Unreviewed test gardening.

  • platform/wk2/TestExpectations:
10:01 AM WebKitGTK/Gardening/Calendar edited by aboya@igalia.com
(diff)
9:47 AM Changeset in webkit [229094] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.4.4

New tag.

9:17 AM Changeset in webkit [229093] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Remove network access from the WebContent process sandbox
https://bugs.webkit.org/show_bug.cgi?id=183192
<rdar://problem/35369115>

Reviewed by Alex Christensen.

Remove the 'system-network', 'allow-network-common', and 'network-client' access from the WebContent process.
That's why we have a Network Process!

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
8:38 AM Changeset in webkit [229092] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

JSC crash with import("")
https://bugs.webkit.org/show_bug.cgi?id=183175

Reviewed by Saam Barati.

JSTests:

  • stress/import-with-empty-string.js: Added.

Source/JavaScriptCore:

Add file existence and file type check for module loader implementation in jsc.cpp.
This is not safe for TOCTOU, but it is OK since this functionality is used for the
JSC shell (jsc.cpp): testing purpose.

  • jsc.cpp:

(fillBufferWithContentsOfFile):
(fetchModuleFromLocalFileSystem):

8:31 AM Changeset in webkit [229091] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Remove RenderElement::s_affectsParentBlock
https://bugs.webkit.org/show_bug.cgi?id=183187
<rdar://problem/37961079>

Reviewed by Antti Koivisto.

Remove the hack to track floating/out-of-flow changes between styleWillChange and styleDidChange.

Covered by existing tests.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::styleDidChange):

  • rendering/RenderElement.h:
7:50 AM Changeset in webkit [229090] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Filter attribute selectors with selector filter
https://bugs.webkit.org/show_bug.cgi?id=183200

Reviewed by Zalan Bujtas.

Currently selector filtering is done based on tags, classes and ids. We should include attributes too.

This patch adds filtering based on attribute name (but not content).

  • css/SelectorFilter.cpp:

(WebCore::isExcludedAttribute):

Ignore id, class and style attributes. First two are already handled and the last is common but is rarely
used in selectors.

(WebCore::collectElementIdentifierHashes):

Collect attributes.
Remove the unnecessary StyledElement casting.

(WebCore::collectSimpleSelectorHash):

Collect attribute selectors.

(WebCore::chooseSelectorHashesForFilter):

Pick attributes with high priority for the filter as it is likely a good signal.

12:45 AM Changeset in webkit [229089] by svillar@igalia.com
  • 6 edits
    1 delete in trunk/Source/WebCore

[WebVR] Convert VRPlatformDisplayInfo into a class
https://bugs.webkit.org/show_bug.cgi?id=183162

Reviewed by Žan Doberšek.

In preparation for further changes we're transforming the
VRPlatformDisplayInfo into a class. All the members are now private
and the class provides the needed getters/setters.

Apart from that VRDisplayCapabilityFlags is now just an unsigned and
the different flags are defined in VRDisplayCapabilityFlag enum.
Another cleanup was the removal of VRDisplayCapabilities.cpp as
everything can be implemented in the header.

  • Modules/webvr/VRDisplay.cpp:

(WebCore::VRDisplay::VRDisplay):
(WebCore::VRDisplay::isConnected const):
(WebCore::VRDisplay::stageParameters const):

  • Modules/webvr/VRDisplayCapabilities.cpp: Removed.
  • Modules/webvr/VRDisplayCapabilities.h:

(WebCore::VRDisplayCapabilities::hasPosition const):
(WebCore::VRDisplayCapabilities::hasOrientation const):
(WebCore::VRDisplayCapabilities::hasExternalDisplay const):
(WebCore::VRDisplayCapabilities::canPresent const):
(WebCore::VRDisplayCapabilities::maxLayer const):
(WebCore::VRDisplayCapabilities::VRDisplayCapabilities):

  • Sources.txt:
  • platform/vr/VRPlatformDisplay.h:

(WebCore::VRPlatformDisplayInfo::displayName const):
(WebCore::VRPlatformDisplayInfo::setDisplayName):
(WebCore::VRPlatformDisplayInfo::isConnected const):
(WebCore::VRPlatformDisplayInfo::setIsConnected):
(WebCore::VRPlatformDisplayInfo::isMounted const):
(WebCore::VRPlatformDisplayInfo::setIsMounted):
(WebCore::VRPlatformDisplayInfo::capabilityFlags const):
(WebCore::VRPlatformDisplayInfo::setCapabilityFlags):
(WebCore::VRPlatformDisplayInfo::displayIdentifier const):
(WebCore::VRPlatformDisplayInfo::setDisplayIdentifier):
(WebCore::VRPlatformDisplayInfo::eyeTranslation const):
(WebCore::VRPlatformDisplayInfo::setEyeTranslation):
(WebCore::VRPlatformDisplayInfo::eyeFieldOfView const):
(WebCore::VRPlatformDisplayInfo::setEyeFieldOfView):
(WebCore::VRPlatformDisplayInfo::renderSize const):
(WebCore::VRPlatformDisplayInfo::setRenderSize):
(WebCore::VRPlatformDisplayInfo::setPlayAreaBounds):
(WebCore::VRPlatformDisplayInfo::playAreaBounds const):
(WebCore::VRPlatformDisplayInfo::setSittingToStandingTransform):
(WebCore::VRPlatformDisplayInfo::sittingToStandingTransform const):

  • platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:

(WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
(WebCore::VRPlatformDisplayOpenVR::updateEyeParameters):
(WebCore::VRPlatformDisplayOpenVR::updateStageParameters):

Feb 27, 2018:

11:49 PM Changeset in webkit [229088] by commit-queue@webkit.org
  • 6 edits
    2 deletes in trunk

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

This patch causes crashes on two SVG tests (Requested by fredw
on #webkit).

Reverted changeset:

"Relayout frames after AsyncFrameScrolling or FrameFlattening
option is changed"
https://bugs.webkit.org/show_bug.cgi?id=183081
https://trac.webkit.org/changeset/229060

9:41 PM Changeset in webkit [229087] by keith_miller@apple.com
  • 24 edits in trunk/Source/JavaScriptCore

Replace TrustedImmPtr(0) with TrustedImmPtr(nullptr)
https://bugs.webkit.org/show_bug.cgi?id=183195

Reviewed by Mark Lam.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::patchableBranchPtr):
(JSC::MacroAssembler::patchableBranchPtrWithPatch):

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::branchPtrWithPatch):
(JSC::MacroAssemblerARM::storePtrWithPatch):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::call):
(JSC::MacroAssemblerARM64::tailRecursiveCall):
(JSC::MacroAssemblerARM64::branchPtrWithPatch):
(JSC::MacroAssemblerARM64::patchableBranchPtrWithPatch):
(JSC::MacroAssemblerARM64::storePtrWithPatch):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::branchPtrWithPatch):
(JSC::MacroAssemblerARMv7::patchableBranchPtr):
(JSC::MacroAssemblerARMv7::patchableBranchPtrWithPatch):
(JSC::MacroAssemblerARMv7::storePtrWithPatch):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::branchPtrWithPatch):
(JSC::MacroAssemblerMIPS::storePtrWithPatch):

  • assembler/MacroAssemblerX86.h:

(JSC::MacroAssemblerX86::branchPtrWithPatch):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::callWithSlowPathReturnType):
(JSC::MacroAssemblerX86_64::call):
(JSC::MacroAssemblerX86_64::tailRecursiveCall):
(JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
(JSC::MacroAssemblerX86_64::branchPtrWithPatch):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitAllocateRawObject):
(JSC::DFG::SpeculativeJIT::compileToLowerCase):
(JSC::DFG::SpeculativeJIT::compileMakeRope):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):
(JSC::DFG::SpeculativeJIT::compileCreateDirectArguments):
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):
(JSC::DFG::SpeculativeJIT::compileArraySlice):
(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::TrustedImmPtr::TrustedImmPtr):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::debugCall):
(JSC::AssemblyHelpers::sanitizeStackInline):

  • jit/IntrinsicEmitter.cpp:

(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCall):

  • jit/ScratchRegisterAllocator.cpp:

(JSC::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBufferForCall):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::initParenContextFreeList):
(JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
(JSC::Yarr::YarrGenerator::generate):

6:28 PM Changeset in webkit [229086] by commit-queue@webkit.org
  • 7 edits
    5 adds in trunk

Do not trigger a service worker match in case of document redirection if it will be already served by AppCache
https://bugs.webkit.org/show_bug.cgi?id=183185
<rdar://problem/37693796>

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

Source/WebCore:

Disabling service worker matching in case there is a substitute data.
Otherwise there is a risk for a double load, substitute data first and the new load
triggered if matching a new registration.
A future fix should first do service worker registration matching and if there is no registration query appcache.

Test: http/tests/appcache/main-resource-redirect-with-sw.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::redirectReceived):

LayoutTests:

  • http/tests/appcache/main-resource-redirect-with-sw-expected.txt: Added.
  • http/tests/appcache/main-resource-redirect-with-sw.html: Added.
  • http/tests/appcache/resources/main-resource-redirect-with-sw.manifest: Added.
  • http/tests/appcache/resources/register-resources-service-worker.html: Added.
  • http/tests/appcache/service-worker-proxy.js: Added.
  • platform/gtk/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wpe/TestExpectations:
6:05 PM Changeset in webkit [229085] by Jonathan Bedard
  • 8 edits in trunk/Tools

Remove concept of 'future'
https://bugs.webkit.org/show_bug.cgi?id=183184
<rdar://problem/37958594>

Reviewed by Aakash Jain.

Remove concept of 'future' from expectations and instead
use a system of inheritance centered around the current version
of an OS for Mac and iOS.

Inheritance works like so:

| ....
V Future

High Sierra (mac)

mac-sierra
| mac-elcapitan
| ....

This does not change expectation inheritance for any currently running
configurations, it generalizes the logic already used.

  • Scripts/webkitpy/common/version_name_map.py:

(VersionNameMap.init): Remove all future versions.
(VersionNameMap.mapping_for_platform): Return empty dicts instead of
asserting.

  • Scripts/webkitpy/port/apple.py:

(ApplePort):
(ApplePort._allowed_versions): Return all available versions.
(ApplePort._generate_all_test_configurations): Instead of picking from a set
of allowed versions, assume that every specified version is allowed.
(ApplePort._port_name_with_version): Deleted.

  • Scripts/webkitpy/port/darwin.py: Add CURRENT_VERSION overridden by subclasses.

(DarwinPort):

  • Scripts/webkitpy/port/ios.py:

(IOSPort):
(IOSPort.default_baseline_search_path): Use system of inheritance centered around
the current version.

  • Scripts/webkitpy/port/mac.py:

(MacPort):
(MacPort.init): Use current version by default.
(MacPort.default_baseline_search_path): Use system of inheritance centered around
the current version.
(MacPort.configuration_specifier_macros): Use the same set of version names
supported in default_baseline_search_path.

  • Scripts/webkitpy/port/mac_unittest.py:

(MacTest.test_versions): Remove 'future' tests.

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

Mark http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=183094

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
5:24 PM Changeset in webkit [229083] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/dom/Window/window-focus-self.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=183164

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:46 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
3:46 PM Changeset in webkit [229082] by Michael Catanzaro
  • 5 edits in trunk

Unreviewed GTK test gardening

Tools:

  • TestWebKitAPI/glib/TestExpectations.json:

LayoutTests:

3:45 PM Changeset in webkit [229081] by timothy_horton@apple.com
  • 6 edits in trunk/Source

Ensure target triple is propagated correctly to DerivedSources.make
https://bugs.webkit.org/show_bug.cgi?id=183189
<rdar://problem/37959694>

Reviewed by Dan Bernstein.

If we don't propagate the target triple, we can sometimes build with
the wrong options enabled.

  • Configurations/Base.xcconfig:

Mentioning LLVM_TARGET_TRIPLE_SUFFIX here is required to get it to be available to scripts.

  • DerivedSources.make:

Propagate the target triple into our compiler invocations.

2:57 PM Changeset in webkit [229080] by commit-queue@webkit.org
  • 14 edits
    5 adds in trunk

AX: Spell check and style attributes should be optional when fetching attributed string
https://bugs.webkit.org/show_bug.cgi?id=160744

Patch by Doug Russell <doug@getitdownonpaper.com> on 2018-02-27
Reviewed by Chris Fleizach.

The overhead of fetching a spell checked attributed string via AX API is substantial.
In some cases on the order of 7/8 of the total time spent fetching the string.

This change introduces the new attribute AXAttributedStringForTextMarkerRangeWithOptions which accepts an NSDictionary as it's parameter with keys "AXTextMarkerRange" (AXTextMarkerRangeRef) and "AXSpellCheck" (NSNumber(BOOL)).

AXAttributedStringForTextMarkerRange will remain unchanged.

Source/WebCore:

Tests: accessibility/mac/attributed-string/attributed-string-for-range-with-options.html

accessibility/mac/attributed-string/attributed-string-for-range.html

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributedStringAppendText):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForRange:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Deleted.

Tools:

  • DumpRenderTree/AccessibilityUIElement.cpp:

(attributedStringForTextMarkerRangeCallback):
(attributedStringForTextMarkerRangeWithOptionsCallback):
(AccessibilityUIElement::attributedStringForTextMarkerRange):
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
(AccessibilityUIElement::getJSClass):

  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::attributedStringForTextMarkerRange):
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(createJSStringRef):
(AccessibilityUIElement::attributedStringForTextMarkerRange):
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::createJSStringRef):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

LayoutTests:

  • accessibility/mac/attributed-string: Added.
  • accessibility/mac/attributed-string/attributed-string-for-range-expected.txt: Added.
  • accessibility/mac/attributed-string/attributed-string-for-range-with-options-expected.txt: Added.
  • accessibility/mac/attributed-string/attributed-string-for-range-with-options.html: Added.
  • accessibility/mac/attributed-string/attributed-string-for-range.html: Added.
  • accessibility/mac/bounds-for-range-expected.txt:
2:35 PM Changeset in webkit [229079] by dbates@webkit.org
  • 7 edits
    2 moves
    1 add
    1 delete in trunk

Standardize terminology for marked text
https://bugs.webkit.org/show_bug.cgi?id=180999

Reviewed by Zalan Bujtas.

The name MarkerSubrange is a misnomer for a data structure that associates a text subrange with a type
and optional document marker. In particular, a MarkerSubrange may not always correspond to a document
marker. For instance, selected text is represented using a MarkerSubrange that does not have a
corresponding document marker. Let's standardize on the phrase "marked text" as the canonical way to
describe these tagged text subranges.

Source/WebCore:

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::localSelectionRect const):
(WebCore::InlineTextBox::MarkedTextStyle::areBackgroundMarkedTextStylesEqual):
(WebCore::InlineTextBox::MarkedTextStyle::areForegroundMarkedTextStylesEqual):
(WebCore::InlineTextBox::MarkedTextStyle::areDecorationMarkedTextStylesEqual):
(WebCore::InlineTextBox::StyledMarkedText::StyledMarkedText):
(WebCore::createMarkedTextFromSelectionInBox):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintPlatformDocumentMarkers):
(WebCore::InlineTextBox::paintPlatformDocumentMarker):
(WebCore::InlineTextBox::computeStyleForUnmarkedMarkedText const):
(WebCore::InlineTextBox::resolveStyleForMarkedText):
(WebCore::InlineTextBox::subdivideAndResolveStyle):
(WebCore::InlineTextBox::coalesceAdjacentMarkedTexts):
(WebCore::InlineTextBox::collectMarkedTextsForDraggedContent):
(WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers):
(WebCore::InlineTextBox::paintMarkedTexts):
(WebCore::InlineTextBox::paintMarkedTextBackground):
(WebCore::InlineTextBox::paintMarkedTextForeground):
(WebCore::InlineTextBox::paintMarkedTextDecoration):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::MarkerSubrangeStyle::areBackgroundMarkerSubrangeStylesEqual): Deleted.
(WebCore::InlineTextBox::MarkerSubrangeStyle::areForegroundMarkerSubrangeStylesEqual): Deleted.
(WebCore::InlineTextBox::MarkerSubrangeStyle::areDecorationMarkerSubrangeStylesEqual): Deleted.
(WebCore::InlineTextBox::StyledMarkerSubrange::StyledMarkerSubrange): Deleted.
(WebCore::createMarkerSubrangeFromSelectionInBox): Deleted.
(WebCore::InlineTextBox::computeStyleForUnmarkedMarkerSubrange const): Deleted.
(WebCore::InlineTextBox::resolveStyleForSubrange): Deleted.
(WebCore::InlineTextBox::coalesceAdjacentSubranges): Deleted.
(WebCore::InlineTextBox::collectSubrangesForDraggedContent): Deleted.
(WebCore::InlineTextBox::collectSubrangesForDocumentMarkers): Deleted.
(WebCore::InlineTextBox::paintMarkerSubranges): Deleted.
(WebCore::InlineTextBox::paintTextSubrangeBackground): Deleted.
(WebCore::InlineTextBox::paintTextSubrangeForeground): Deleted.
(WebCore::InlineTextBox::paintTextSubrangeDecoration): Deleted.

  • rendering/InlineTextBox.h:

(WebCore::InlineTextBox::paintMarkedTexts):
(WebCore::InlineTextBox::paintMarkerSubranges): Deleted.

  • rendering/MarkedText.cpp: Renamed from Source/WebCore/rendering/MarkerSubrange.cpp.

(WebCore::subdivide):

  • rendering/MarkedText.h: Renamed from Source/WebCore/rendering/MarkerSubrange.h.

(WebCore::MarkedText::MarkedText):
(WebCore::MarkedText::isEmpty const):
(WebCore::MarkedText::operator!= const):
(WebCore::MarkedText::operator== const):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/MarkedText.cpp: Added.

(WebCore::operator<<):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp: Removed.
2:23 PM Changeset in webkit [229078] by jmarcell@apple.com
  • 7 edits in branches/safari-605-branch/Source

Versioning.

2:21 PM Changeset in webkit [229077] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.0-branch/Source

Versioning.

2:19 PM Changeset in webkit [229076] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.1-branch/Source

Versioning.

2:12 PM Changeset in webkit [229075] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

[Win64] JSCOnly compile error using VS2017 and cmake
https://bugs.webkit.org/show_bug.cgi?id=183176

Patch by Karlen Simonyan <szkarlen@gmail.com> on 2018-02-27
Reviewed by Alex Christensen.

  • wtf/PlatformJSCOnly.cmake:
2:12 PM Changeset in webkit [229074] by jmarcell@apple.com
  • 1 copy in branches/safari-605.1.33.1-branch

New branch.

2:12 PM Changeset in webkit [229073] by jmarcell@apple.com
  • 1 copy in branches/safari-605.1.33.0-branch

New branch.

2:11 PM Changeset in webkit [229072] by jmarcell@apple.com
  • 1 edit in branches/safari-605-branch/Source/WebCore/dom/EventTarget.cpp

Revert r229068. rdar://problem/37156477

1:47 PM Changeset in webkit [229071] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed, roll out r228430.

Roll out r228430 now that it is no longer needed after r228852.

No new tests, initial fix is still covered by WebKit.RespondToPolicyForNavigationResponseAsynchronously
API test.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::stopLoading):

  • loader/NavigationScheduler.cpp:

(WebCore::NavigationScheduler::schedule):

1:08 PM Changeset in webkit [229070] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

Unreviewed, marking a number of Web Animations WPT tests non-flaky.

1:05 PM Changeset in webkit [229069] by graouts@webkit.org
  • 19 edits in trunk

[Web Animations] Correct implementation of pending tasks and promises
https://bugs.webkit.org/show_bug.cgi?id=183161

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update test expectations with progressions (+32 WPT PASS).

  • web-platform-tests/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/finish-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/finished-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/onfinish-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/pause-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/pending-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/startTime-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/pausing-an-animation-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/play-states-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/reversing-an-animation-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:

Source/WebCore:

We had an incorrect implementation of the spec due to two misinterpretations.

The first one is about pending tasks (play and pause) which the spec says should
be performed by "scheduling a task". In WebCore, this means using postTask() on a
ScriptExecutionContext, such as Document. One of the big practical changes is that
calling play() on an animation correctly sets its startTime to null (unresolved)
immediately after the call to play() returns before setting it to a resolved value
when the task is performed asynchronously. As a result, the playState is now always
accurate.

The second one is about promises where new promises need to be created in certain
situations called out by the spec. We used to call clear() on them, but this merely
resets the fulfillment or rejection state of the promise, while the spec requires
a different object to be returned for the promise. We now create our promises using
makeUniqueRef<> when new promise objects are expected to be created.

This patch also corrects a few smaller bugs and spec compliant issues, called out
below, related to pending tasks and promises uncovered while looking at relevant
WPT tests.

  • animation/DocumentTimeline.h: Expose the Document used to create this timeline such

that it may be used by WebAnimation objects registered for this timeline when scheduling
a task is required via postTask().

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::setBindingsStartTime):
(WebCore::WebAnimation::setCurrentTime):
(WebCore::WebAnimation::cancel): Ensure the finished promise has not already been fulfilled
before rejecting it. While the spec does not specifically call this out, a promise may not
be rejected after being fulfilled, and we would hit an ASSERT if we didn't also check that
it was in the correct pending state before attemping to reject it.
(WebCore::WebAnimation::resetPendingTasks):
(WebCore::WebAnimation::finish):
(WebCore::WebAnimation::updateFinishedState):
(WebCore::WebAnimation::finishNotificationSteps):
(WebCore::WebAnimation::play): We used to only check for a pending pause task before canceling
that task, but the spec says to check for either a pending pause or play task (ie. pending())
and to cancel whichever is scheduled.
(WebCore::WebAnimation::runPendingPlayTask): We were missing an assertion called out by the
spec when running a pending task.
(WebCore::WebAnimation::pause):
(WebCore::WebAnimation::runPendingPauseTask):
(WebCore::WebAnimation::updatePendingTasks): We now use postTask() on the animation's associated
timeline's document to schedule pending tasks for which the criteria to run are met, ie. there
is an associated timeline.

  • animation/WebAnimation.h:
12:33 PM Changeset in webkit [229068] by jmarcell@apple.com
  • 1 edit in branches/safari-605-branch/Source/WebCore/dom/EventTarget.cpp

Apply patch. rdar://problem/37156477

12:14 PM Changeset in webkit [229067] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Make it possible to set suggestions in extra zoom mode.
https://bugs.webkit.org/show_bug.cgi?id=183154
<rdar://problem/35227450>

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2018-02-27
Reviewed by Tim Horton.

In extra zoom mode, when presenting WKFocusedFormControlViewController, make it the inputDelegate for
WKContentView. This is needed to ensure we can capture/cache the suggestions when _WKInputSession's
suggestions is updated. Later, when we present WKTextInputViewController, we can pass the cached
suggestions.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView presentFocusedFormControlViewController:]): Set _focusedFormControlViewController as

the inputDelegate for WKContentView.

(-[WKContentView dismissFocusedFormControlViewController:]): Null the inputDelegate on dismissal.
(-[WKContentView presentTextInputViewController:]): Pass the suggestions from WKFocusedFormControlViewController to

WKTextInputViewController when the latter is presented.

(-[WKContentView textInputController:didCommitText:]): Call the new delegate method textInputController:didCommitText:withSuggestion:.
(-[WKContentView textInputController:didCommitText:withSuggestion:]): When a suggestions is selected, insert the

suggestion which will notify the client.

(-[WKContentView focusedFormControllerDidUpdateSuggestions:]): Called when the suggestion is updated after the input

view controller is presented.

10:21 AM Changeset in webkit [229066] by timothy_horton@apple.com
  • 6 edits
    1 add in trunk/Source

Stop using deprecated CADisplay SPI
https://bugs.webkit.org/show_bug.cgi?id=183150
<rdar://problem/37918297>

Reviewed by Simon Fraser.

  • pal/spi/cocoa/QuartzCoreSPI.h:

Switch to the more modern way of getting the display name.

  • Platform/spi/ios/FrontBoardServicesSPI.h: Added.
  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

  • WebKit.xcodeproj/project.pbxproj:

Switch to the more modern way of getting the display name.

10:04 AM Changeset in webkit [229065] by Ryan Haddad
  • 6 edits
    1 delete in trunk/Source

Unreviewed, rolling out r229055.

Breaks internal builds.

Reverted changeset:

"Stop using deprecated CADisplay SPI"
https://bugs.webkit.org/show_bug.cgi?id=183150
https://trac.webkit.org/changeset/229055

9:54 AM Changeset in webkit [229064] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

webkitpy Bugzilla transactions should retry on URLError
https://bugs.webkit.org/show_bug.cgi?id=183156

Reviewed by Alexey Proskuryakov.

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

(Bugzilla): Use NetworkTransaction.
(Bugzilla._fetch_bug_page_by_url):
(Bugzilla.bug_id_for_attachment_id):
(Bugzilla.get_bug_id_for_attachment_id):

9:16 AM Changeset in webkit [229063] by Wenson Hsieh
  • 20 edits
    1 add in trunk

[Extra zoom mode] Implement additional SPI for adjusting viewport shrink-to-fit behavior
https://bugs.webkit.org/show_bug.cgi?id=183100
<rdar://problem/37840987>

Reviewed by Tim Horton.

Source/WebCore:

Introduce new customization options to ViewportConfiguration. The first is m_forceHorizontalShrinkToFit, which
(when set to true) forces the viewport to scale using shrink-to-fit heuristics, regardless of whether
"shrink-to-fit=no" is specified via viewport parameters or if content width did not exceed minimum layout size.
The second is m_viewSize, which reflects the true size of the viewport. See WebKit ChangeLog for more details.

Tests: ViewportSizingTests.ForceShrinkToFitViewportOverridesViewportParameters

ViewportSizingTests.ShrinkToFitViewportWithMinimumAllowedLayoutWidth

  • page/ViewportConfiguration.cpp:

(WebCore::ViewportConfiguration::ViewportConfiguration):
(WebCore::ViewportConfiguration::setMinimumLayoutSize):

Plumb the real size of the view alongside the minimum layout size when updating the minimum layout size.

(WebCore::ViewportConfiguration::setForceHorizontalShrinkToFit):
(WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints const):

Bail early and return true if forceHorizontalShrinkToFit is set. This forces shrink-to-fit even in cases where
"shrink-to-fit" is set to "no", or content dimensions don't exceed layout dimensions.

(WebCore::ViewportConfiguration::initialScaleFromSize const):

Use view dimensions rather than minimum layout dimensions when computing the initial scale. Minimum layout size
is no longer always equal to the size of the view if the client has specified a minimum allowed layout width. As
such, when computing the initial scale, to ensure that the content (which was laid out using the minimum layout
size) fits within the real viewport, we need to divide real viewport dimensions by content dimensions.

(WebCore::ViewportConfiguration::minimumScale const):

Similarly, use view size instead of minimum layout size to compute minimum scale.

(WebCore::ViewportConfiguration::description const):

  • page/ViewportConfiguration.h:

Source/WebKit:

Add new SPI hooks to provide finer control over certain aspects of the shrink-to-fit viewport heuristic.
Currently, in certain cases of iPad multitasking, Safari allows shrinking content to fit by default. This means
that even when "width=device-width" is used, if the contents of the page are too wide to fit within the
viewport's width, we'll adjust the initial scale such that the viewport can fit all of the content.

However, in certain viewport dimensions, this heuristic is insufficient to ensure that pages are laid out and
displayed properly within the viewport. Namely, one could imagine that an element with a hard-coded width that
is larger than the real viewport width would cause all other elements with dimensions relative to the body to be
excessively shrunk down once shrink-to-fit is applied, so the page would still look broken even if the contents
of the page all fit within the viewport.

To mitigate this, we decouple the notions of minimum layout size from the size of the actual viewport (which we
simply refer to as "view size"). This allows us to introduce a mechanism where we lay out the page at a given
minimum layout size that is larger than the size of the view; later, when we determine the initial scale, we
then apply shrink-to-fit scaling using the view size rather than the minimum layout size. This grants us the
ability to lay out content as if our view were large, but still ensure that the contents of the page fit within
the actual view.

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::encode const):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::forceHorizontalShrinkToFit const):
(WebKit::operator==):

Plumb the forceHorizontalShrinkToFit flag through VisibleContentRectUpdateInfo.

  • Shared/WebPageCreationParameters.cpp:

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

  • Shared/WebPageCreationParameters.h:

Plumb viewSize through IPC to WebPage.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

Start off WKWebView flags at their initial values.

(-[WKWebView _minimumAllowedLayoutWidth]):
(-[WKWebView _setMinimumAllowedLayoutWidth:]):

This provides the minimum width at which the page will lay out, such that if the view width dips below this
value, we'll use this minimum allowed layout width instead. 0 by default.

(-[WKWebView activeMinimumLayoutSizes:]):

Refactor this from a static function to a helper method on WKWebView that computes both the minimum layout size
(which takes minimum allowed layout width into account) as well as the real view size. Refactor all call sites
to use this new method, and also propagate the view size down via IPC, alongside the minimum layout size.

(-[WKWebView _dispatchSetMinimumLayoutSize:viewSize:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _setMinimumLayoutSizeOverride:]):
(-[WKWebView _setForceHorizontalViewportShrinkToFit:]):
(-[WKWebView _forceHorizontalViewportShrinkToFit]):

Setting this flag to YES forces us to always shrink-to-fit in the horizontal axis. NO by default.

(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
(activeMinimumLayoutSize): Deleted.

More refactoring to replace activeMinimumLayoutSize() with -activeMinimumLayoutSizes:.

(-[WKWebView _dispatchSetMinimumLayoutSize:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

Pass _forceHorizontalViewportShrinkToFit into the visible content rect update.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):

Plumb viewSize alongside the existing minimumLayoutSize.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_credentialsMessenger):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::updateVisibleContentRects):

Set forceHorizontalShrinkToFit on the viewport configuration here.

Tools:

Add API tests that exercise -_setMinimumAllowedLayoutWidth: and -_setForceHorizontalViewportShrinkToFit:. See
WebKit ChangeLog for more detail.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/ViewportSizingTests.mm: Added.

(TestWebKitAPI::while):
(viewportTestPageMarkup):
(TestWebKitAPI::TEST):

8:55 AM WebKitGTK/2.20.x edited by Michael Catanzaro
(diff)
8:43 AM Changeset in webkit [229062] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the debug build after r228877.

In the case where CAN_DISALLOW_USER_INSTALLED_FONTS is enabled, this function doesn't return anything when
allowUserInstalledFonts != AllowUserInstalledFonts::No. Fix the build by moving return nullptr; back out of
the #else.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::installedFontMandatoryAttributes):

8:39 AM Changeset in webkit [229061] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Potential privacy issue: DNS prefetching can be re-enabled
https://bugs.webkit.org/show_bug.cgi?id=182924

Patch by Milan Crha <mcrha@redhat.com> on 2018-02-27
Reviewed by Michael Catanzaro.

  • dom/Document.cpp:

(WebCore::Document::parseDNSPrefetchControlHeader):

6:00 AM Changeset in webkit [229060] by fred.wang@free.fr
  • 5 edits
    2 adds in trunk

Relayout frames after AsyncFrameScrolling or FrameFlattening option is changed
https://bugs.webkit.org/show_bug.cgi?id=183081

Patch by Frederic Wang <fwang@igalia.com> on 2018-02-27
Reviewed by Antonio Gomes.

Add a test to check whether an iframe changes its flattening status after one of the option
AsyncFrameScrolling/FrameFlattening is enabled/disabled.

  • platform/ios-simulator/TestExpectations: Remove failure.
  • platform/ios/fast/frames/flattening/iframe-flattening-async-frame-scrolling-dynamic-expected.txt: Added.
  • platform/ios/fast/frames/flattening/iframe-flattening-async-frame-scrolling-dynamic.html: Added.
5:03 AM Changeset in webkit [229059] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[Web Animations] Implement the procedure to set the target effect of an animation
https://bugs.webkit.org/show_bug.cgi?id=183146

Reviewed by Dean Jackson.

We only had a partial implementation of setEffect() and we now update it to cover the entire
implementation as mandated by the spec. While this doesn't yield any WPT results changes, this
patch will help getting a significant number of new PASS results when we get around to implement
correct support for async procedures (pending pause/play tasks and promises) in the next patch.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setEffect):

5:00 AM Changeset in webkit [229058] by graouts@webkit.org
  • 6 edits in trunk

[Web Animations] Update the playState implementation
https://bugs.webkit.org/show_bug.cgi?id=183145

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update test expectations with slightly different failures later on in a couple of tests.

  • web-platform-tests/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:

Source/WebCore:

The Web Animations spec has changed since we first implemented the playState property and the "pending"
enum value has been dropped since then (there is a separate "pending" property which we also implement).
We update our implementation to match the latest spec text. This does not change WPT test results a lot,
but this patch will help getting a significant number of new PASS results when we get around to implementing
correct support for async procedures (pending pause/play tasks and promises) in a couple of patches.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::playState const):

  • animation/WebAnimation.h:
  • animation/WebAnimation.idl:
1:36 AM Changeset in webkit [229057] by Yusuke Suzuki
  • 5 edits in trunk

Unreviewed, skip FTL tests if FTL is disabled
https://bugs.webkit.org/show_bug.cgi?id=183071

JSTests:

  • stress/has-indexed-property-array-storage-ftl.js:
  • stress/has-indexed-property-slow-put-array-storage-ftl.js:

Tools:

  • Scripts/run-jsc-stress-tests:
12:06 AM Changeset in webkit [229056] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Address post-review comment after r229049.
https://bugs.webkit.org/show_bug.cgi?id=183142

Reviewed by Tim Horton.

Wrap a newly added string literal with ASCIILiteral.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::extraDefaultStyleSheet):

12:00 AM Changeset in webkit [229055] by timothy_horton@apple.com
  • 6 edits
    1 add in trunk/Source

Stop using deprecated CADisplay SPI
https://bugs.webkit.org/show_bug.cgi?id=183150
<rdar://problem/37918297>

Reviewed by Simon Fraser.

Source/WebCore/PAL:

  • pal/spi/cocoa/QuartzCoreSPI.h:

Switch to the more modern way of getting the display name.

Source/WebKit:

  • Platform/spi/ios/FrontBoardServicesSPI.h: Added.
  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

  • WebKit.xcodeproj/project.pbxproj:

Switch to the more modern way of getting the display name.

Note: See TracTimeline for information about the timeline view.