Timeline
Jan 26, 2020:
- 10:30 PM Changeset in webkit [255137] by
-
- 2 edits in trunk/Source/WebKit
[WinCairo][curl] ASSERTION FAILED: sessionID != PAL::SessionID::defaultSessionID() in NetworkProcess since r255067
https://bugs.webkit.org/show_bug.cgi?id=206817
Reviewed by Darin Adler.
Since r255067 (Bug 206700), the assertion is failing in
NetworkProcess::destroySession while shutdown, which is ensuring
the destructing session isn't the default session.
Covered by existing tests.
- NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::destroySession): Conditioned out the
assertion for curl port as well as Soup port does.
- 10:27 PM Changeset in webkit [255136] by
-
- 4 edits in trunk/Source/WebCore
Move DOMCacheEngine::errorToException back out of header and into .cpp file
https://bugs.webkit.org/show_bug.cgi?id=206815
Reviewed by Mark Lam.
This is a follow-up to a recent build fix that moved a function, errorToException,
out of a .cpp file and into a header file. This reverses that since we don't need
this function to be inlined.
- Modules/cache/DOMCacheEngine.cpp:
(WebCore::DOMCacheEngine::convertToException): Moved this function from the header
and renamed it from errorToException to match the other function more closely. Also
use the pattern where the switch statement has no default, so we get a warning if
we don't cover all the enum values.
(WebCore::DOMCacheEngine::convertToExceptionAndLog): Updated for new function name.
- Modules/cache/DOMCacheEngine.h: Removed the definition of errorToException and
replaced it with the declaration of it under its new name, convertToException.
- Modules/cache/DOMCacheStorage.cpp:
(WebCore::DOMCacheStorage::retrieveCaches): Updated for new function name.
- 8:38 PM Changeset in webkit [255135] by
-
- 11 edits1 copy in trunk/Source/WebKit
Frequent sync BackForwardBackListCount/BackForwardForwardListCount IPC on reddit.com
https://bugs.webkit.org/show_bug.cgi?id=206438
Reviewed by Darin Adler.
Frequent sync BackForwardBackListCount/BackForwardForwardListCount IPC on reddit.com. When scrolling on reddit.com,
you frequently see 2 consecutive sync IPCs (WebPageProxy::BackForwardBackListCount then WebPageProxy::BackForwardForwardListCount)
from the WebContent process to the UIProcess. Those are bad for performance. This happens every time the script on the page accesses
history.length, which is unfortunate, since this history length rarely changes.
To address the issue, the following changes were made:
- Merge BackForwardBackListCount / BackForwardForwardListCount IPCs into a single BackForwardListCounts IPC which returns both the back & forward counts, since we often need both (e.g. when accessing history.length) and since gettings those counts is very cheap compared to the cost of a sync IPC.
- Cache those counts in WebBackForwardListProxy and blow away the cached counts whenever the back/forward list changes. In the common case (where the back/forward list rarely changes), we now see a single sync IPC instead of many (verified on reddit.com).
No new tests, merely a performance improvement.
- UIProcess/WebPageProxy.cpp:
- UIProcess/WebPageProxy.h:
- UIProcess/WebPageProxy.messages.in:
- WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::addItemFromUIProcess):
(WebKit::WebBackForwardListProxy::addItem):
(WebKit::WebBackForwardListProxy::goToItem):
(WebKit::WebBackForwardListProxy::backListCount const):
(WebKit::WebBackForwardListProxy::forwardListCount const):
(WebKit::WebBackForwardListProxy::cacheListCountsIfNecessary const):
(WebKit::WebBackForwardListProxy::clearCachedListCounts):
(WebKit::WebBackForwardListProxy::close):
(WebKit::WebBackForwardListProxy::clear):
- WebProcess/WebPage/WebBackForwardListProxy.h:
- 3:28 PM Changeset in webkit [255134] by
-
- 6 edits in trunk
Invalid ranges in character classes should be banned in unicode patterns
https://bugs.webkit.org/show_bug.cgi?id=206768
Reviewed by Darin Adler.
JSTests:
- test262/expectations.yaml: Mark 18 test cases as passing.
Source/JavaScriptCore:
In ES5, grammar of CharacterRange was ambiguous, resulting in invalid ranges
like /[\d-a]/ being allowed. As of ES2015, invalid ranges are SyntaxError in
unicode patterns, yet still allowed in regular ones to avoid breaking the web.
(https://tc39.es/ecma262/#sec-patterns-static-semantics-early-errors-annexb)
This change adds SyntaxError for unicode patterns and updates explanatory
comments. ErrorCode::CharacterClassOutOfOrder is renamed for consistency
with newly added error code and ErrorCode::ParenthesesTypeInvalid.
- yarr/YarrErrorCode.cpp:
(JSC::Yarr::errorMessage):
(JSC::Yarr::errorToThrow):
- yarr/YarrErrorCode.h:
- yarr/YarrParser.h:
(JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
(JSC::Yarr::Parser::parseCharacterClass):
- 2:47 PM Changeset in webkit [255133] by
-
- 10 edits1 add in trunk/Source
Use ObjectIdentifier for remote RealtimeMediaSource
https://bugs.webkit.org/show_bug.cgi?id=206808
<rdar://problem/58705405>
Reviewed by Eric Carlson.
Source/WebCore:
No change of behavior.
- WebCore.xcodeproj/project.pbxproj:
- platform/mediastream/RealtimeMediaSourceIdentifier.h: Added.
Source/WebKit:
Use ObjectIdentifier instead of uint64_t.
This is clearer and prevents receiving identifier of value zero from IPC.
Remove related message checks.
- Scripts/webkit/messages.py:
- UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::SourceProxy):
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
(WebKit::UserMediaCaptureManagerProxy::startProducingData):
(WebKit::UserMediaCaptureManagerProxy::stopProducingData):
(WebKit::UserMediaCaptureManagerProxy::end):
(WebKit::UserMediaCaptureManagerProxy::capabilities):
(WebKit::UserMediaCaptureManagerProxy::setMuted):
(WebKit::UserMediaCaptureManagerProxy::applyConstraints):
(WebKit::UserMediaCaptureManagerProxy::clone):
(WebKit::UserMediaCaptureManagerProxy::requestToEnd):
- UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
- UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
- WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::Source::Source):
(WebKit::UserMediaCaptureManager::Source::sourceID const):
(WebKit::UserMediaCaptureManager::createCaptureSource):
(WebKit::UserMediaCaptureManager::sourceStopped):
(WebKit::UserMediaCaptureManager::captureFailed):
(WebKit::UserMediaCaptureManager::sourceMutedChanged):
(WebKit::UserMediaCaptureManager::sourceSettingsChanged):
(WebKit::UserMediaCaptureManager::storageChanged):
(WebKit::UserMediaCaptureManager::ringBufferFrameBoundsChanged):
(WebKit::UserMediaCaptureManager::audioSamplesAvailable):
(WebKit::UserMediaCaptureManager::remoteVideoSampleAvailable):
(WebKit::UserMediaCaptureManager::sourceEnded):
(WebKit::UserMediaCaptureManager::applyConstraintsSucceeded):
(WebKit::UserMediaCaptureManager::applyConstraintsFailed):
(WebKit::UserMediaCaptureManager::cloneVideoSource):
- WebProcess/cocoa/UserMediaCaptureManager.h:
- WebProcess/cocoa/UserMediaCaptureManager.messages.in:
- 2:15 PM Changeset in webkit [255132] by
-
- 4 edits in trunk/Source/WebKit
Protect against crashes during WKWebView init function when methods are called before the view is fully initialized
https://bugs.webkit.org/show_bug.cgi?id=206799
rdar://problem/58871371
Reviewed by Sam Weinig.
Part way through creating WKWebView, some methods can be called and they need to be careful
not to use anything that may not be initialized yet.
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView dealloc]): Check _page for null, since this might happen if the superclass's
init method returned nil.
- UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _frameOrBoundsChanged]): Check _page for null, since this might be called
before object initialization is complete.
(-[WKWebView setSemanticContentAttribute:]): Ditto.
- UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView setFrameSize:]): Check _impl for null since this might be called before
oject initialization is complete.
(-[WKWebView setUserInterfaceLayoutDirection:]): Ditto.
(-[WKWebView renewGState]): Ditto.
- 1:35 PM Changeset in webkit [255131] by
-
- 55 edits4 adds in trunk
Throttling requestAnimationFrame should be controlled by RenderingUpdateScheduler
https://bugs.webkit.org/show_bug.cgi?id=204713
Patch by Said Abou-Hallawa <Said Abou-Hallawa> on 2020-01-26
Reviewed by Simon Fraser.
Source/WebCore:
Test: fast/animation/request-animation-frame-throttling-outside-viewport.html
requestAnimationFrame is throttled by a timer although its callback are
serviced by the page RenderingUpdate. This led to excessive rAF firing
which makes it more than the preferred frame per seconds.
The solution is to have two throttling types:
1) Page throttling (or full throttling) which slows down all the steps of
RenderingUpdate for the main document and all the sub-documents.
2) Document throttling (or partial throttling) which only slows down the
rAF of a certain document.
- Headers.cmake:
- WebCore.xcodeproj/project.pbxproj:
- animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::animationInterval const):
(WebCore::DocumentTimeline::updateThrottlingState): Deleted.
- animation/DocumentTimeline.h:
There is no need to have DocumentTimeline throttling. It is already
throttled when the page RenderingUpdate is throttled.
- dom/Document.cpp:
(WebCore::Document::requestAnimationFrame):
(WebCore::Document::updateLastHandledUserGestureTimestamp):
LowPowerMode throttling is now handled by the page. So remove its handling
in the Document side.
- dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::page const):
(WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const):
(WebCore::ScriptedAnimationController::interval const):
(WebCore::ScriptedAnimationController::isThrottled const):
(WebCore::ScriptedAnimationController::isThrottledRelativeToPage const):
(WebCore::ScriptedAnimationController::shouldRescheduleRequestAnimationFrame const):
(WebCore::ScriptedAnimationController::registerCallback):
(WebCore::ScriptedAnimationController::cancelCallback):
(WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::throttlingReasonToString): Deleted.
(WebCore::throttlingReasonsToString): Deleted.
(WebCore::ScriptedAnimationController::addThrottlingReason): Deleted.
(WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted.
(WebCore::ScriptedAnimationController::animationTimerFired): Deleted.
- dom/ScriptedAnimationController.h:
(WebCore::ScriptedAnimationController::addThrottlingReason):
(WebCore::ScriptedAnimationController::removeThrottlingReason):
Get rid of the rAF throttling timer. Service the rAF callback only when
the period from the current time stamp till the last service time stamp
is greater than the preferred rAF interval .
- page/FrameView.cpp:
(WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
ThrottlingReason is now defined outside ScriptedAnimationController.
- page/Page.cpp:
(WebCore::Page::renderingUpdateThrottlingEnabled const):
(WebCore::Page::renderingUpdateThrottlingEnabledChanged):
(WebCore::Page::isRenderingUpdateThrottled const):
(WebCore::Page::preferredRenderingUpdateInterval const):
Calculate the preferred RenderingUpdate interval from the throttling
reasons.
(WebCore::Page::setIsVisuallyIdleInternal):
(WebCore::Page::handleLowModePowerChange):
Call adjustRenderingUpdateFrequency() when isLowPowerModeEnabled or
IsVisuallyIdle is toggled.
(WebCore::updateScriptedAnimationsThrottlingReason): Deleted.
- page/Page.h:
- page/RenderingUpdateScheduler.cpp:
(WebCore::RenderingUpdateScheduler::adjustFramesPerSecond):
(WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency):
Change the preferredFramesPerSecond of the DisplayRefreshMonitor if the
throttling is not aggressive e.g. 10_s. Otherwise use the timer.
(WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
Call adjustFramesPerSecond() when DisplayRefreshMonitor is created.
(WebCore::RenderingUpdateScheduler::startTimer):
- page/RenderingUpdateScheduler.h:
- page/Settings.yaml:
- page/SettingsBase.cpp:
(WebCore::SettingsBase::renderingUpdateThrottlingEnabledChanged):
- page/SettingsBase.h:
Add a setting to enable/disable RenderingUpdateThrottling.
- platform/graphics/AnimationFrameRate.h: Added.
(WebCore::preferredFrameInterval):
(WebCore::preferredFramesPerSecond):
- platform/graphics/DisplayRefreshMonitor.h:
(WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond):
- platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::monitorForClient):
Rename createMonitorForClient() to monitorForClient() since it may return
a cached DisplayRefreshMonitor.
(WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond):
(WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
(WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
No need to call registerClient(). This function was just ensuring the
DisplayRefreshMonitor is created. scheduleAnimation() does the same thing.
(WebCore::DisplayRefreshMonitorManager::createMonitorForClient): Deleted.
(WebCore::DisplayRefreshMonitorManager::registerClient): Deleted.
- platform/graphics/DisplayRefreshMonitorManager.h:
(WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager): Deleted.
- platform/graphics/GraphicsLayerUpdater.cpp:
(WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
- platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
(-[WebDisplayLinkHandler setPreferredFramesPerSecond:]):
Set the preferredFramesPerSecond of the CADisplayLink.
- platform/ios/LowPowerModeNotifierIOS.mm:
(-[WebLowPowerModeObserver initWithNotifier:]):
Set the initial state of the low power mode.
Source/WebKit:
Create an IPC message on the DrawingArea to send a message from the
WebProcess to the UIProcess to setPreferredFramesPerSecond of the
DisplayRefreshMonitor.
- Shared/WebPreferences.yaml:
- UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetRenderingUpdateThrottlingEnabled):
(WKPreferencesGetRenderingUpdateThrottlingEnabled):
- UIProcess/API/C/WKPreferencesRefPrivate.h:
Add a WKPreference key for RenderingUpdateThrottlingEnabled.
- UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
- UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in:
- UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(-[WKOneShotDisplayLinkHandler setPreferredFramesPerSecond:]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::setPreferredFramesPerSecond):
Set the preferredFramesPerSecond of the CADisplayLink.
- WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h:
- WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::setPreferredFramesPerSecond):
Delegate the call to RemoteLayerTreeDrawingArea.
- WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
- WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setPreferredFramesPerSecond):
Send the IPC message from the WebProcess to the UIProcess.
Source/WebKitLegacy/mac:
Add a WKPreference key for RenderingUpdateThrottling.
- WebView/WebPreferenceKeysPrivate.h:
- WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences renderingUpdateThrottlingEnabled]):
(-[WebPreferences setRenderingUpdateThrottlingEnabled:]):
- WebView/WebPreferencesPrivate.h:
- WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Source/WebKitLegacy/win:
Add a WKPreference key for RenderingUpdateThrottling.
- Interfaces/IWebPreferencesPrivate.idl:
- WebPreferenceKeysPrivate.h:
- WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::renderingUpdateThrottlingEnabled):
(WebPreferences::setRenderingUpdateThrottlingEnabled):
- WebPreferences.h:
- WebView.cpp:
(WebView::notifyPreferencesChanged):
Tools:
RenderingUpdateThrottling is enabled by default. Turn it off for DRT and
WTR. In some cases, the page may not get visually active while it's
waiting for rAF. Throttling tests will have to explicitly turn it on.
- DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
- DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
- WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
LayoutTests:
- fast/animation/css-animation-throttling-lowPowerMode.html:
- fast/animation/request-animation-frame-throttle-subframe.html:
- fast/animation/request-animation-frame-throttling-detached-iframe.html:
Enable RenderingUpdateThrottling for these tests.
- fast/animation/request-animation-frame-throttling-lowPowerMode-expected.txt:
- fast/animation/request-animation-frame-throttling-lowPowerMode.html:
Ensure the actual rAF interval is > 30ms for lowPowerMode.
- fast/animation/request-animation-frame-throttling-outside-viewport-expected.txt: Added.
- fast/animation/request-animation-frame-throttling-outside-viewport.html: Added.
- fast/animation/resources/frame-with-animation-2.html: Added.
Test the OutsideViewport throttling case.
- http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html:
Enable RenderingUpdateThrottling for this test.
- 1:11 PM Changeset in webkit [255130] by
-
- 2 edits1 add in trunk/LayoutTests
media/modern-media-controls/media-controller/media-controller-auto-hide.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=206629
<rdar://problem/58816827>
Reviewed by Dean Jackson.
Attempt to de-flake this test by decreasing the controller auto-hide interval and
using a base64 encoded video file to make it load and finish more quickly.
- media/content/test.mp4.js: Added.
(base64MP4URL): Base64 encoded five frame, four second long MPEG-4 video.
- media/modern-media-controls/media-controller/media-controller-auto-hide.html:
- 4:17 AM Changeset in webkit [255129] by
-
- 5 edits in trunk
Improve compatibility with hyperlink auditing spec
https://bugs.webkit.org/show_bug.cgi?id=188852
Patch by Rob Buis <rbuis@igalia.com> on 2020-01-26
Reviewed by Youenn Fablet.
Source/WebCore:
The hyperlink auditing algorithm indicates the fetch should be done
using no-referrer [1], so remove the code to set the referrer HTTP
header.
Tests: http/tests/navigation/ping-attribute/anchor-cross-origin.html
http/tests/navigation/ping-attribute/area-cross-origin.html
[1] https://html.spec.whatwg.org/multipage/links.html#hyperlink-auditing (Step 3)
- loader/PingLoader.cpp:
(WebCore::PingLoader::sendPing):
LayoutTests:
Update improved test results.
- http/tests/navigation/ping-attribute/anchor-cross-origin-expected.txt:
- http/tests/navigation/ping-attribute/area-cross-origin-expected.txt:
Jan 25, 2020:
- 10:33 PM Changeset in webkit [255128] by
-
- 3 edits in trunk/Source/WebCore
Tighten up some of the drag state machine logic
https://bugs.webkit.org/show_bug.cgi?id=206798
Reviewed by Wenson Hsieh.
- page/EventHandler.h: Added shouldDispatchEventsToDragSourceElement function and renamed
the existing dispatchDragSrcEvent function to dispatchEventToDragSourceElement.
- page/EventHandler.cpp:
(WebCore::EventHandler::updateDragAndDrop): Call the renamed dispatchEventToDragSourceElement
unconditionally, since it now has the smarts to only dispatch an event when we are supposed to.
(WebCore::EventHandler::cancelDragAndDrop): Ditto.
(WebCore::EventHandler::dragSourceEndedAt): Call the new shouldDispatchEventsToDragSourceElement
function because of the null check it does for dataTransfer, before calling setDestinationOperation
on the dataTransfer, since there isn't an obvious ironclad guarantee we might be here without an
actual drag fully in process and a dataTransfer object allocated. Also call the renamed
dispatchEventToDragSourceElement by its new name.
(WebCore::EventHandler::shouldDispatchDragSourceEvents): Added. Checks thre three conditions that
affect whether we should dispatch events to the drag source. First that there is a drag source.
Second that there is a dataTransfer object, indicating that we got far enough in the logic to
actually start a drag. Third that shouldDispatchEvents is true, indicating this is the type of
drag that should be visible to the website content and so events should be dispatched.
(WebCore::EventHandler::dispatchEventToDragSourceElement): Call shouldDispatchDragSourceEvents
before dispatching the event, so that callers don't all have to do that check.
- 9:43 PM Changeset in webkit [255127] by
-
- 20 edits in trunk/Source
Make ContentWorlds be identified by an ObjectIdentifier instead of a uint64_t
https://bugs.webkit.org/show_bug.cgi?id=206784
Reviewed by Alex Christensen.
Source/WebKit:
Refactor: No behavior change.
- Scripts/webkit/messages.py:
- Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
- Shared/ContentWorldShared.h:
(WebKit::pageContentWorldIdentifier):
- Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::decode):
- Shared/WebPageCreationParameters.h:
- Shared/WebUserContentControllerDataTypes.cpp:
(WebKit::WebUserScriptData::decode):
(WebKit::WebUserStyleSheetData::decode):
(WebKit::WebScriptMessageHandlerData::decode):
- Shared/WebUserContentControllerDataTypes.h:
- UIProcess/API/APIContentWorld.cpp:
(API::ContentWorld::pageContentWorld):
(API::ContentWorld::defaultClientWorld):
(API::ContentWorld::ContentWorld):
(API::ContentWorldBase::generateIdentifier): Deleted.
- UIProcess/API/APIContentWorld.h:
(API::ContentWorldBase::identifier const):
(API::ContentWorldBase::worldData const):
(API::ContentWorldBase::ContentWorldBase):
- UIProcess/API/APIUserContentWorld.cpp:
(API::UserContentWorld::UserContentWorld):
- UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::removeUserContentWorldUses):
(WebKit::WebUserContentControllerProxy::removeAllUserScripts):
(WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
- WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::worldMap):
(WebKit::WebUserContentController::worldForIdentifier):
(WebKit::WebUserContentController::addUserContentWorld):
(WebKit::WebUserContentController::addUserContentWorlds):
(WebKit::WebUserContentController::removeUserContentWorlds):
(WebKit::WebUserContentController::addUserScripts):
(WebKit::WebUserContentController::removeUserScript):
(WebKit::WebUserContentController::removeAllUserScripts):
(WebKit::WebUserContentController::addUserStyleSheets):
(WebKit::WebUserContentController::removeUserStyleSheet):
(WebKit::WebUserContentController::removeAllUserStyleSheets):
(WebKit::WebUserContentController::addUserScriptMessageHandlers):
(WebKit::WebUserContentController::removeUserScriptMessageHandler):
(WebKit::WebUserContentController::removeAllUserScriptMessageHandlers):
- WebProcess/UserContent/WebUserContentController.h:
- WebProcess/UserContent/WebUserContentController.messages.in:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScript):
(WebKit::WebPage::runJavaScriptInMainFrameScriptWorld):
(WebKit::WebPage::runJavaScriptInFrame):
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/WebPage.messages.in:
Source/WTF:
- wtf/ObjectIdentifier.h:
(WTF::ObjectIdentifier::generate):
(WTF::ObjectIdentifier::generateThreadSafe):
(WTF::ObjectIdentifier::enableGenerationProtection): To allow restricting generating an identifier to the UIProcess.
- 2:34 PM Changeset in webkit [255126] by
-
- 62 edits in trunk/Source
Introduce a getVTablePointer() utility function.
https://bugs.webkit.org/show_bug.cgi?id=206804
<rdar://problem/58872290>
Reviewed by Yusuke Suzuki and Oliver Hunt.
Source/WebCore:
Updated CodeGeneratorJS to use getVTablePointer() and rebased test results.
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
- bindings/scripts/test/JS/JSInterfaceName.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSMapLike.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSSetLike.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestCEReactions.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestCallTracer.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestIterable.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestPluginInterface.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestSerialization.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestStringifier.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
(WebCore::toJSNewlyCreated):
- bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::toJSNewlyCreated):
Source/WTF:
With getVTablePointer(), we can abstract away how we get a vtable function pointer
without assuming the way it is signed for ARM64E. With this, we can remove the
WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION macro which assumes how a vtable function
pointer is signed.
- wtf/PointerPreparations.h:
- 12:13 PM Changeset in webkit [255125] by
-
- 4 edits in trunk
Add some tests for dynamically allocated StaticStringImpls.
https://bugs.webkit.org/show_bug.cgi?id=206802
Reviewed by Darin Adler.
Source/WTF:
Removed some unnecessary explicit specialization of the charactersAreAllASCII()
template function.
- wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
(WTF::StringImpl::createStaticStringImpl):
Tools:
- TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::doStaticStringImplTests):
(TestWebKitAPI::TEST):
- 12:07 PM Changeset in webkit [255124] by
-
- 2 edits in trunk/LayoutTests
REGRESSION: [ Mac WK2 ] animations/suspend-resume-animation-events.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=206615
Reviewed by Alexey Proskuryakov.
- animations/suspend-resume-animation-events.html: Make test slightly less timing
dependent.
- 12:02 PM Changeset in webkit [255123] by
-
- 3 edits in trunk/Tools
webkit-patch upload should not submit automatically to old EWS
https://bugs.webkit.org/show_bug.cgi?id=206801
Reviewed by Alexey Proskuryakov.
- Scripts/webkitpy/tool/commands/upload_unittest.py:
- Scripts/webkitpy/tool/steps/submittoews.py:
- 11:14 AM Changeset in webkit [255122] by
-
- 2 edits in trunk/LayoutTests
Regression (r255103): media/modern-media-controls/placard-support/placard-support-airplay-fullscreen-no-controls.html
https://bugs.webkit.org/show_bug.cgi?id=206800
Unreviewed test gardening; the test which this was copied from, placard-support-airplay-fullscreen.html, is skipped on
iOS test bots due to a lack of AirPlay test support.
Patch by Jer Noble <jer.noble@apple.com> on 2020-01-25
- platform/ios/TestExpectations:
- 9:12 AM Changeset in webkit [255121] by
-
- 5 edits in trunk/LayoutTests
[GTK] Gardening of media related tests
https://bugs.webkit.org/show_bug.cgi?id=206796
Unreviewed gardening.
- platform/gtk/TestExpectations:
- platform/gtk/media/audio-repaint-expected.txt:
- platform/gtk/media/controls-styling-strict-expected.txt:
- platform/gtk/media/media-controls-play-button-updates-expected.txt:
- 9:03 AM Changeset in webkit [255120] by
-
- 15 edits in trunk/Source
Move singleton Intl string locales out of JSGlobalObject.
https://bugs.webkit.org/show_bug.cgi?id=206791
<rdar://problem/58889037>
Source/JavaScriptCore:
Reviewed by Yusuke Suzuki and Andy Wagoner.
We were creating an instance of these for each JSGlobalObject when they can be a
global singleton since they are always initialized with the same intl data
(barring a mid-flight change in intl settings, which we don't support even in the
existing code).
It turns out that intlPluralRulesAvailableLocales() wasn't called anywhere.
IntlPluralRules code currently just uses intlNumberFormatAvailableLocales().
To document that this is intentional, we do the following:
- have IntlPluralRules code call intlPluralRulesAvailableLocales(), and
- have intlPluralRulesAvailableLocales() call intlNumberFormatAvailableLocales() for its implementation.
See https://bugs.webkit.org/show_bug.cgi?id=206791#c7 and
https://bugs.webkit.org/show_bug.cgi?id=206791#c8.
In addMissingScriptLocales(), I'm deliberately naming the string with underscores
because it's much easier to read pa_PK_String and see that it refers to "pa-PK"
as opposed to paPKString. Ditto for zh_CN_String, zh_HK_String, zh_SG_String,
and zh_TW_String.
- runtime/IntlCollator.cpp:
(JSC::IntlCollator::initializeCollator):
- runtime/IntlCollatorConstructor.cpp:
(JSC::IntlCollatorConstructorFuncSupportedLocalesOf):
- runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
- runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):
- runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::initializeNumberFormat):
- runtime/IntlNumberFormatConstructor.cpp:
(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):
- runtime/IntlObject.cpp:
(JSC::convertICULocaleToBCP47LanguageTag):
(JSC::addMissingScriptLocales):
(JSC::intlCollatorAvailableLocales):
(JSC::intlDateTimeFormatAvailableLocales):
(JSC::intlNumberFormatAvailableLocales):
(JSC::defaultLocale):
- runtime/IntlObject.h:
- runtime/IntlPluralRules.cpp:
(JSC::IntlPluralRules::initializePluralRules):
- runtime/IntlPluralRulesConstructor.cpp:
(JSC::IntlPluralRulesConstructorFuncSupportedLocalesOf):
- runtime/JSGlobalObject.cpp:
(JSC::addMissingScriptLocales): Deleted.
(JSC::JSGlobalObject::intlCollatorAvailableLocales): Deleted.
(JSC::JSGlobalObject::intlDateTimeFormatAvailableLocales): Deleted.
(JSC::JSGlobalObject::intlNumberFormatAvailableLocales): Deleted.
(JSC::JSGlobalObject::intlPluralRulesAvailableLocales): Deleted.
- runtime/JSGlobalObject.h:
Source/WTF:
Reviewed by Yusuke Suzuki.
Fix a bug in StringImpl::createStaticStringImpl(): I forgot to set its hash value
when I introduced it. StaticStringImpls require that its hash code be set ahead
of time, and cannot be mutated at runtime. See the comment in the definition of
StaticStringImpl in StringImpl.h.
- wtf/text/StringImpl.cpp:
(WTF::StringImpl::createStaticStringImpl):
- 8:51 AM Changeset in webkit [255119] by
-
- 13 edits1 add in trunk
[Cocoa] Media mime types map should be created in the UI process
https://bugs.webkit.org/show_bug.cgi?id=206478
Reviewed by Darin Adler.
Source/WebCore:
Creating this map in the WebContent process will access the launch services daemon, which will be blocked.
This patch creates the map in the UI process and sends it to the WebContent process as part of the WebProcess
creation parameters.
API test: WebKit.MimeTypes
- platform/MIMETypeRegistry.cpp:
(WebCore::overriddenMimeTypesMap):
(WebCore::commonMediaTypes):
(WebCore::commonMimeTypesMap):
(WebCore::typesForCommonExtension):
- platform/MIMETypeRegistry.h:
- testing/Internals.cpp:
(WebCore::Internals::mediaMIMETypeForExtension):
- testing/Internals.h:
- testing/Internals.idl:
Source/WebKit:
Send the mime type map from the UI process to the WebContent process as part of the
WebProcess creation parameters.
- Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
- Shared/WebProcessCreationParameters.h:
- UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
- WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Tools:
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebKit/MimeTypes.mm: Added.
(TEST):
- 7:57 AM Changeset in webkit [255118] by
-
- 4 edits in trunk/Source/WebCore
[LFC][IFC] Layout logic should be driven by the type of the inline box
https://bugs.webkit.org/show_bug.cgi?id=206792
<rdar://problem/58889080>
Reviewed by Antti Koivisto.
Use the type of the inline box to decide what layout functions to call and not whether the
box has children or it establishes a formatting context.
- layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::nextInPreOrder):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
- layout/inlineformatting/InlineFormattingContext.h:
- layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
- 6:16 AM Changeset in webkit [255117] by
-
- 16 edits in trunk
[LFC][Integration] Re-enable line layout integration
https://bugs.webkit.org/show_bug.cgi?id=206795
<rdar://problem/58853907>
Reviewed by Zalan Bujtas.
Source/WebCore:
- page/RuntimeEnabledFeatures.h:
Source/WebKit:
- Shared/WebPreferences.yaml:
Source/WebKitLegacy/mac:
- WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
Tools:
- DumpRenderTree/TestOptions.h:
LayoutTests:
- fast/dom/Range/getBoundingClientRect-expected.txt:
- platform/ios/fast/text/hyphenate-limit-lines-expected.txt:
- platform/ios/fast/text/whitespace/pre-break-word-expected.txt:
- platform/ios/fast/text/word-break-expected.txt:
- platform/mac/fast/text/hyphenate-limit-lines-expected.txt:
- platform/mac/fast/text/whitespace/pre-break-word-expected.txt:
- platform/mac/fast/text/word-break-expected.txt:
- 6:14 AM BuildingCairoOnWindows edited by
- (diff)
- 4:27 AM Changeset in webkit [255116] by
-
- 12 edits in trunk
HTMLMediaElement should not remove the media session at DOM suspension time
https://bugs.webkit.org/show_bug.cgi?id=206661
<rdar://problem/58800787>
Source/WebCore:
Reviewed by Eric Carlson.
https://trac.webkit.org/changeset/233560 made it so that, on HTMLMediaElement suspension,
its media session is stopped.
This was done to ensure updateNowPlayingInfo is not called synchronously but asynchronously.
The issue is that, once the media session is stopped, it is removed from the media session vector.
On updating the ready state after suspension, and playing, we try to look into the media session vector and do not find the session.
This triggers the ASSERT.
Partially revert the behavior by calling the same code as clientWillPausePlayback
but make sure updateNowPlayingInfo is calling asynchronously when suspending the media element.
Introduce clientWillBeDOMSuspended for that purpose.
Update mediaPlayerReadyStateChanged to enqueue a task to do the update if the media element is suspended.
Covered by test no longer crashing in debug.
- html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
- platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::processClientWillPausePlayback):
(WebCore::PlatformMediaSession::clientWillPausePlayback):
(WebCore::PlatformMediaSession::clientWillBeDOMSuspended):
- platform/audio/PlatformMediaSession.h:
- platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
- platform/audio/PlatformMediaSessionManager.h:
- platform/audio/cocoa/MediaSessionManagerCocoa.h:
- platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(MediaSessionManagerCocoa::sessionWillEndPlayback):
- platform/audio/ios/MediaSessionManagerIOS.h:
- platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::sessionWillEndPlayback):
Tools:
Reviewed by Eric Carlson.
- TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm:
(TestWebKitAPI::TEST):
Suspend/resume Active DOM Objects from time to time as would do scrolling.
This allows pending tasks to be executed asynchronously when not scrolling.