WebKit.git
3 months ago[JSC] Add @@toStringTag to WebAssembly.Global
ysuzuki@apple.com [Mon, 4 May 2020 23:37:44 +0000 (23:37 +0000)]
[JSC] Add @@toStringTag to WebAssembly.Global
https://bugs.webkit.org/show_bug.cgi?id=211372

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* web-platform-tests/wasm/jsapi/global/toString.any-expected.txt:
* web-platform-tests/wasm/jsapi/global/toString.any.worker-expected.txt:

Source/JavaScriptCore:

As r260992 did for the other wasm prototypes, we should put @@toStringTag to WebAssembly.Global's prototype too.

* wasm/js/WebAssemblyGlobalPrototype.cpp:
(JSC::WebAssemblyGlobalPrototype::finishCreation):

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

3 months ago[ iPadOS wk2 ] editing/selection/selection-change-in-mutation-event-by-remove-childre...
lawrence.j@apple.com [Mon, 4 May 2020 23:25:08 +0000 (23:25 +0000)]
[ iPadOS wk2 ] editing/selection/selection-change-in-mutation-event-by-remove-children.html is timing out.
https://bugs.webkit.org/show_bug.cgi?id=208840

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

3 months agoREGRESSION (r259470): Accessibility Stereo to Mono is not working
bfulgham@apple.com [Mon, 4 May 2020 23:24:16 +0000 (23:24 +0000)]
REGRESSION (r259470): Accessibility Stereo to Mono is not working
https://bugs.webkit.org/show_bug.cgi?id=211408
<rdar://problem/62847299>

Reviewed by Per Arne Vollan.

The changes in r259470 regressed our Accessibility features. We need to do a rollout of that
change to restore proper behavior.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* WebProcess/com.apple.WebProcess.sb.in:

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

3 months agoREGRESSION (r261109): [ Mac ] inspector/css/getAllStyleSheets.html is failing
drousso@apple.com [Mon, 4 May 2020 23:22:43 +0000 (23:22 +0000)]
REGRESSION (r261109): [ Mac ] inspector/css/getAllStyleSheets.html is failing
https://bugs.webkit.org/show_bug.cgi?id=211405
<rdar://problem/62863843>

Unreviewed, remove unnecessary call to function that no longer exists.

* inspector/css/getAllStyleSheets.html:

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

3 months agoREGRESSION (r261108): [ Mac ] inspector/timeline/timeline-recording.html is failing
drousso@apple.com [Mon, 4 May 2020 23:17:51 +0000 (23:17 +0000)]
REGRESSION (r261108): [ Mac ] inspector/timeline/timeline-recording.html is failing
https://bugs.webkit.org/show_bug.cgi?id=211404
<rdar://problem/62863766>

Unreviewed, update test expectation.

* inspector/timeline/timeline-recording-expected.txt:

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

3 months ago[ macOS ] webgl/2.0.0/conformance/extensions/webgl-draw-buffers.html has been timing...
jacob_uphoff@apple.com [Mon, 4 May 2020 22:58:01 +0000 (22:58 +0000)]
[ macOS ] webgl/2.0.0/conformance/extensions/webgl-draw-buffers.html has been timing out ever since it was introduced.
https://bugs.webkit.org/show_bug.cgi?id=208524

Unreviewed test gardening: Removing expectations.

* platform/mac-wk1/TestExpectations:

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

3 months ago[WebAuthn] Implement +[_WKWebAuthenticationPanel clearAllLocalAuthenticatorCredentials]
jiewen_tan@apple.com [Mon, 4 May 2020 22:26:12 +0000 (22:26 +0000)]
[WebAuthn] Implement +[_WKWebAuthenticationPanel clearAllLocalAuthenticatorCredentials]
https://bugs.webkit.org/show_bug.cgi?id=211369
<rdar://problem/60246635>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by manual tests given auto tests could clear developers' actual credentials.

* Modules/webauthn/WebAuthenticationConstants.h:

Source/WebKit:

Adds a new SPI for UI clients to clear all existing credentials from the keychain.

* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
(+[_WKWebAuthenticationPanel clearAllLocalAuthenticatorCredentials]):
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.h:
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::clearAllCredentials):
* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::createCredentialPrivateKey const):

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

3 months agoExcessive error logging from daemons trying to use WebKit, under -[UIDevice currentDe...
timothy_horton@apple.com [Mon, 4 May 2020 22:11:42 +0000 (22:11 +0000)]
Excessive error logging from daemons trying to use WebKit, under -[UIDevice currentDevice]
https://bugs.webkit.org/show_bug.cgi?id=211397
<rdar://problem/61635403>

Reviewed by Simon Fraser.

* Shared/UserInterfaceIdiom.mm:
(WebKit::userInterfaceIdiomIsPad):
Adjust userInterfaceIdiomIsPad so that in daemons, it consults only MobileGestalt,
which returns the actual hardware model, and does not try to use UIDevice.
UIDevice is more accurate for applications because it will report that
the device is an iPhone when called inside an iPhone app running on iPad,
but it cannot be used in daemons that do not have a UIApplication.

For the behaviors we gate on this bit, it makes sense to use iPhone
behaviors on iPad in the iPhone app jail, so we continue using
UIDevice if possible.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
Make use of the new mechanism instead of going straight to MobileGestalt,
for the aforementioned reasons.

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

3 months agoStop hard-coding get-task-allow entitlement for simulator builds
cdumez@apple.com [Mon, 4 May 2020 22:08:46 +0000 (22:08 +0000)]
Stop hard-coding get-task-allow entitlement for simulator builds
https://bugs.webkit.org/show_bug.cgi?id=211392

Reviewed by Geoffrey Garen.

Stop hard-coding get-task-allow entitlement for simulator builds and let Xcode inject it as needed.

* Configurations/BaseXPCService.xcconfig:
* Resources/ios/XPCService-embedded-simulator.entitlements:

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

3 months agoREGRESSION (JazzkonE): ResourceLoadStatisticsDatabaseStore checks 'hasHadUserInteract...
bfulgham@apple.com [Mon, 4 May 2020 22:00:27 +0000 (22:00 +0000)]
REGRESSION (JazzkonE): ResourceLoadStatisticsDatabaseStore checks 'hasHadUserInteraction' without ensuring the domain has been added to the ITP database (211388)
https://bugs.webkit.org/show_bug.cgi?id=211388
<rdar://problem/62849919>

Reviewed by John Wilander.

A spurious log entry is created if we check 'hasHadUserInteraction' before inserting a row for the domain
being checked (if that domain had not previosly been observed). This patch changes the order of the two
commands to avoid this possibility. This makes the database implementation behave like the in-memory version.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::logUserInteraction):

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

3 months agoReduce AlternativeService assertion to debug-only assert
commit-queue@webkit.org [Mon, 4 May 2020 21:58:29 +0000 (21:58 +0000)]
Reduce AlternativeService assertion to debug-only assert
https://bugs.webkit.org/show_bug.cgi?id=211263
<rdar://problem/61354813>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-04
Reviewed by Chris Dumez.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
This is asserting sometimes.  No need to crash.  Reduce to debug-only assert.

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

3 months agoThrottling requestAnimationFrame should be controlled by RenderingUpdateScheduler
commit-queue@webkit.org [Mon, 4 May 2020 21:24:49 +0000 (21:24 +0000)]
Throttling requestAnimationFrame should be controlled by RenderingUpdateScheduler
https://bugs.webkit.org/show_bug.cgi?id=204713

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

Source/WebCore:

rAF and Page rendering were managed by two different timers. Throttling
rAF was implemented by changing its timer. After r242624, RenderingUpdate
steps have been managed by RenderingUpdateScheduler. This means rAF is
now serviced by the preferredFramesPerSecond which is 60 fps regardless
it's throttled or not. Moreover the rAF throttling timer was mistakenly
kept and it has been running under the old assumption which is: rAF is
serviced by a timer only. This means rAF will be serviced by its timer
and by the RenderingUpdate steps at the same time when it is supposed to
throttle. This will make it fire more than 60 fps in cases which it is
supposed to run less than 60 fps.

The solution is to have two throttling types:

1) Page throttling (or full throttling): This slows down all the steps
   of RenderingUpdate for the main document and all the sub-documents.
   Page throttling reasons are:
   -- VisuallyIdle: Aggressive throttling.
   -- LowPowerMode: Half speed throttling.
2) Document throttling (or partial throttling): This only slows down the
   rAF of a certain document. Document throttling reasons are:
   -- OutsideViewport: Aggressive throttling.
   -- NonInteractedCrossOriginFrame: Half speed throttling.

RenderingUpdate steps will still be managed by RenderingUpdateScheduler
which can be throttled. The assumption is none of these steps will need
to run faster than the Page preferredFramesPerSecond. If rAF wants to
run slower than the Page because of a Document throttling reason, no rAF
callbacks will be serviced before its preferredFrameInterval has elapsed.

In this patch, "Half speed throttling" is only implemented for the Page
and the Document throttling. The "Aggressive throttling" will be done in
following patches. Page rendering was never throttled before. We need to
make sure this is not going to affect PLT. Some tests need to be changed
and new tests need to be written.  All of the throttling tests checks the
state of the code but none of them checks the real user's experience.

* 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
from the Document.

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::page const):
(WebCore::ScriptedAnimationController::interval const):
(WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const):
(WebCore::ScriptedAnimationController::throttlingReasons 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::isThrottled const): 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::m_loadsFromNetwork):
(WebCore::Page::setLowPowerModeEnabledOverrideForTesting):

(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::Page::isLowPowerModeEnabled const): Deleted.
(WebCore::updateScriptedAnimationsThrottlingReason): Deleted.
* page/Page.h:
(WebCore::Page::isLowPowerModeEnabled const):
(WebCore::Page::throttlingReasons const):
(WebCore::Page::canUpdateThrottlingReason const):

* page/RenderingUpdateScheduler.cpp:
(WebCore::RenderingUpdateScheduler::setPreferredFramesPerSecond):
(WebCore::RenderingUpdateScheduler::scheduleAnimation):
(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:
* platform/graphics/AnimationFrameRate.h: Added.
(WebCore::preferredFrameInterval):
(WebCore::preferredFramesPerSecond):
(WebCore::operator<<):
Push names of ThrottlingReasons to a TextStream.

* 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.

* testing/Internals.cpp:
(WebCore::Internals::requestAnimationFrameThrottlingReasons const):
(WebCore::Internals::isRequestAnimationFrameThrottled const): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
Replace isRequestAnimationFrameThrottled() which returns a boolean by
requestAnimationFrameThrottlingReasons() which returns a string. The
string represents the throttling reasons.

Source/WebKit:

Create an IPC message on the DrawingArea to send a message from the
WebProcess to the UIProcess to setPreferredFramesPerSecond of the
DisplayRefreshMonitor.

* 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):
Forward 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.

LayoutTests:

* fast/animation/request-animation-frame-throttle-inside-overflow-scroll-expected.txt:
* fast/animation/request-animation-frame-throttle-inside-overflow-scroll.html:
* fast/animation/request-animation-frame-throttle-subframe-display-none-expected.txt:
* fast/animation/request-animation-frame-throttle-subframe-display-none.html:
* fast/animation/request-animation-frame-throttle-subframe-expected.txt:
* fast/animation/request-animation-frame-throttle-subframe-zero-size-expected.txt:
* fast/animation/request-animation-frame-throttle-subframe-zero-size.html:
* fast/animation/request-animation-frame-throttle-subframe.html:
* fast/animation/request-animation-frame-throttling-detached-iframe-expected.txt:
* fast/animation/request-animation-frame-throttling-detached-iframe.html:
Replace the call isRequestAnimationFrameThrottled() by requestAnimationFrameThrottlingReasons().

* 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.

* http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt:
* http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html:
* http/tests/frame-throttling/resources/requestAnimationFrame-frame.html:
Replace the call isRequestAnimationFrameThrottled() by requestAnimationFrameThrottlingReasons().

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

3 months agoTestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout
commit-queue@webkit.org [Mon, 4 May 2020 21:04:23 +0000 (21:04 +0000)]
TestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=211299

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-04
Reviewed by Chris Dumez.

Sometimes the task queued in WebProcess::updateProcessName happens after the one in WebProcess::updateActivePages.
Schedule them on the same queue so they happen in deterministic order so we get reliable process names eventually.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::updateActivePages):

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

3 months agoRemove unneeded USE(MEDIAREMOTE)
darin@apple.com [Mon, 4 May 2020 20:21:43 +0000 (20:21 +0000)]
Remove unneeded USE(MEDIAREMOTE)
https://bugs.webkit.org/show_bug.cgi?id=211385

Reviewed by Eric Carlson.

Source/WebCore:

* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): Remove USE(MEDIAREMOTE).
* platform/mac/MediaRemoteSoftLink.cpp: Ditto.
* platform/mac/MediaRemoteSoftLink.h: Ditto.
* platform/mac/RemoteCommandListenerMac.mm:
(WebCore::RemoteCommandListenerMac::updateSupportedCommands): Ditto.
(WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): Ditto.
(WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac): Ditto.

Source/WebCore/PAL:

* pal/spi/mac/MediaRemoteSPI.h: Removed check of USE(MEDIAREMOTE).
Also got rid of __has_include for MRNowPlayingTypes.h and moved
it down into the normal sections below.

Source/WTF:

* wtf/PlatformUse.h: Don't set USE_MEDIAREMOTE.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Reverse conditional so it's
consistently listing which platforms we do *not* compile the test on.

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

3 months agoWeb Inspector: drop support for iOS 9.*
drousso@apple.com [Mon, 4 May 2020 20:14:10 +0000 (20:14 +0000)]
Web Inspector: drop support for iOS 9.*
https://bugs.webkit.org/show_bug.cgi?id=211314

Reviewed by Daniel Bates.

* UserInterface/Controllers/BreakpointPopoverController.js:
(WI.BreakpointPopoverController.prototype._createPopoverContent):
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager):
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
(WI.CSSManager.prototype._mainResourceDidChange):
(WI.CSSManager.prototype._fetchInfoForAllStyleSheets):
(WI.CSSManager.prototype.fetchStyleSheetsIfNeeded): Deleted.
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame.documentNodeAvailable): Deleted.
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame.bodyNodeAvailable): Deleted.
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame.cssRuleAvailable): Deleted.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype._scopeChainNodeFromPayload):
* UserInterface/Controllers/LayerTreeManager.js:
(WI.LayerTreeManager.prototype.set showPaintRects):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.initializeTarget):
(WI.TimelineManager.defaultTimelineTypes):
(WI.TimelineManager.availableTimelineTypes):
(WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
(WI.TimelineManager.prototype._processRecord):
(WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
* UserInterface/Models/CSSCompletions.js:
(WI.CSSCompletions.initializeCSSCompletions):
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype.refresh):
* UserInterface/Models/HeapAllocationsInstrument.js:
(WI.HeapAllocationsInstrument):
(WI.HeapAllocationsInstrument.supported): Deleted.
* UserInterface/Models/MemoryInstrument.js:
(WI.MemoryInstrument): Deleted.
(WI.MemoryInstrument.supported): Deleted.
* UserInterface/Models/NativeFunctionParameters.js:
* UserInterface/Models/ScriptInstrument.js:
(WI.ScriptInstrument.prototype.startInstrumentation):
(WI.ScriptInstrument.prototype.stopInstrumentation):
* UserInterface/Models/ScriptSyntaxTree.js:
(WI.ScriptSyntaxTree.functionReturnDivot):
* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord):
(WI.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
* UserInterface/Protocol/DebuggerObserver.js:
(WI.DebuggerObserver.prototype.scriptParsed):
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: Removed.
* UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: Removed.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WI.ScriptClusterTimelineView):
(WI.ScriptClusterTimelineView.createPathComponent):
(WI.ScriptClusterTimelineView.prototype.reset):
(WI.ScriptClusterTimelineView.prototype.showProfile):
(WI.ScriptClusterTimelineView.prototype._canShowProfileView): Deleted.
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WI.ScriptDetailsTimelineView):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch):
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
(WI.TimelineRecordingContentView.prototype._recordingTimesUpdated):
* Versions/Inspector-iOS-9.0.json: Removed.
* Versions/Inspector-iOS-9.3.json: Removed.

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

3 months agoWeb Inspector: drop support for iOS 8.*
drousso@apple.com [Mon, 4 May 2020 20:12:50 +0000 (20:12 +0000)]
Web Inspector: drop support for iOS 8.*
https://bugs.webkit.org/show_bug.cgi?id=211312

Reviewed by Daniel Bates.

* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.highlightSelector):
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.resourceRequestWillBeSent):
* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype.initializeTarget):
(WI.RuntimeManager.prototype.evaluateInInspectedWindow):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.defaultTimelineTypes):
(WI.TimelineManager.prototype._loadNewRecording):
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.parseSelectorListPayload):
* UserInterface/Models/FPSInstrument.js:
(WI.FPSInstrument): Deleted.
(WI.FPSInstrument.supported): Deleted.
* UserInterface/Models/ObjectPreview.js:
(WI.ObjectPreview.fromPayload):
* UserInterface/Models/ProfileNode.js:
(WI.ProfileNode):
(WI.ProfileNode.prototype.get startTime):
(WI.ProfileNode.prototype.get endTime):
(WI.ProfileNode.prototype.computeCallInfoForTimeRange):
(WI.ProfileNode.prototype.get calls): Deleted.
(WI.ProfileNode.prototype.computeCallInfoForTimeRange.totalTimeInRange): Deleted.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.get initiatedResources):
(WI.Resource.prototype.get originalRequestWillBeSentTimestamp): Deleted.
* UserInterface/Models/ResourceTimingData.js:
(WI.ResourceTimingData.fromPayload):
* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
* UserInterface/Models/TimelineRecording.js:
(WI.TimelineRecording):
(WI.TimelineRecording.prototype.computeElapsedTime):
(WI.TimelineRecording.prototype.setLegacyBaseTimestamp): Deleted.
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: Removed.
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.fromPayload):
(WI.RemoteObject.prototype.getDisplayablePropertyDescriptors):
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.initialize):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WI.ObjectTreePropertyTreeElement.prototype._updateProperties):
(WI.ObjectTreePropertyTreeElement):
* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.prototype._updateProperties):
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WI.ScriptTimelineDataGridNode.prototype.get data):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._createTypeTokenAnnotator):
(WI.SourceCodeTextEditor.prototype._createBasicBlockAnnotator):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
(WI.TimelineTabContentView.prototype.closed):
(WI.TimelineTabContentView.prototype.restoreFromCookie):
* Versions/Inspector-iOS-8.0.json: Removed.

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

3 months agoRemove unneeded check for Apple Media Services
bfulgham@apple.com [Mon, 4 May 2020 20:02:22 +0000 (20:02 +0000)]
Remove unneeded check for Apple Media Services
https://bugs.webkit.org/show_bug.cgi?id=211391
<rdar://problem/62853199>

Reviewed by Per Arne Vollan.

Earlier in the development cycle we added an entitlement check for AppleMediaServices, that we now realize
we do not need. Since this is a non-zero performance cost, remove this check.

* UIProcess/WebPageProxy.cpp:

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

3 months ago(r261004) platform/mac/media/media-source/media-source-change-source.html is a flaky...
eric.carlson@apple.com [Mon, 4 May 2020 20:00:06 +0000 (20:00 +0000)]
(r261004) platform/mac/media/media-source/media-source-change-source.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=211326
<rdar://problem/62751237>

Unreviewed, skip new test on platforms where it is expected to fail.

Set explicitly timeout before checking initial audio session category so it will fail
with an error message if it takes too long to run. Skip the test in the GPU process, because
audio session is not yet fully supported, and on WK1 because audio session is a singleton.

* gpu-process/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac/media/media-source/media-source-change-source.html: Added.

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

3 months agoWeb Inspector: drop support for iOS 10.*
drousso@apple.com [Mon, 4 May 2020 19:58:40 +0000 (19:58 +0000)]
Web Inspector: drop support for iOS 10.*
https://bugs.webkit.org/show_bug.cgi?id=211318

Reviewed by Daniel Bates.

* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.supportsDOMBreakpoints):
(WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.async initializeTarget):
(WI.DebuggerManager.prototype.debuggerDidResume):
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.webSocketWillSendHandshakeRequest):
(WI.NetworkManager.prototype.resourceRequestDidReceiveResponse):
(WI.NetworkManager.prototype.markResourceRequestAsServedFromMemoryCache): Deleted.
* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype.initializeTarget):
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.legacyMarkServedFromMemoryCache): Deleted.
(WI.Resource.prototype.legacyMarkServedFromDiskCache): Deleted.
* UserInterface/Models/ResourceTimingData.js:
(WI.ResourceTimingData.fromPayload):
* UserInterface/Models/WebSocketResource.js:
(WI.WebSocketResource.prototype.addFrame):
* UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: Removed.
* UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: Removed.
* UserInterface/Protocol/NetworkObserver.js:
(WI.NetworkObserver.prototype.requestServedFromCache): Deleted.
* UserInterface/Protocol/PageObserver.js:
(WI.PageObserver.prototype.frameClearedScheduledNavigation):
(WI.PageObserver):
(WI.PageObserver.prototype.javascriptDialogOpening): Deleted.
(WI.PageObserver.prototype.javascriptDialogClosed): Deleted.
(WI.PageObserver.prototype.scriptsEnabled): Deleted.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._garbageCollect):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WI.NetworkTimelineView):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
* UserInterface/Views/WebSocketContentView.js:
(WI.WebSocketContentView):
(WI.WebSocketContentView.prototype._addRow):
* Versions/Inspector-iOS-10.0.json: Removed.
* Versions/Inspector-iOS-10.3.json: Removed.

* UserInterface/Protocol/CSSObserver.js:
(WI.CSSObserver.prototype.namedFlowCreated):
(WI.CSSObserver.prototype.namedFlowRemoved):
(WI.CSSObserver.prototype.regionOversetChanged):
(WI.CSSObserver.prototype.registeredNamedFlowContentElement):
(WI.CSSObserver.prototype.unregisteredNamedFlowContentElement):
Fix compatibility comments.

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

3 months agoWeb Inspector: Worker: should use the name of the worker if it exists
drousso@apple.com [Mon, 4 May 2020 19:51:30 +0000 (19:51 +0000)]
Web Inspector: Worker: should use the name of the worker if it exists
https://bugs.webkit.org/show_bug.cgi?id=211244

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/protocol/Worker.json:
Include the `name` in `Worker.workerCreated`.

Source/WebCore:

Test: inspector/worker/runtime-basic.html

Pass the `name` from the `WorkerOptions` given to the `Worker` when it's constructed to Web
Inspector so it can be used in the frontend UI.

Drive-by: replace lots of pointers with references.
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

* workers/WorkerInspectorProxy.h:
(WebCore::WorkerInspectorProxy::name const): Added.
* workers/WorkerInspectorProxy.cpp:
(WebCore::WorkerInspectorProxy::workerStarted):
(WebCore::WorkerInspectorProxy::workerTerminated):
(WebCore::WorkerInspectorProxy::connectToWorkerInspectorController):
(WebCore::WorkerInspectorProxy::sendMessageFromWorkerToFrontend):

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::workerStarted):
(WebCore::InspectorInstrumentation::workerTerminated):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::workerStartedImpl):
(WebCore::InspectorInstrumentation::workerTerminatedImpl):

* inspector/agents/InspectorWorkerAgent.h:
* inspector/agents/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::sendMessageFromWorkerToFrontend):
(WebCore::InspectorWorkerAgent::workerStarted):
(WebCore::InspectorWorkerAgent::workerTerminated):
(WebCore::InspectorWorkerAgent::connectToAllWorkerInspectorProxiesForPage):
(WebCore::InspectorWorkerAgent::connectToWorkerInspectorProxy):
(WebCore::InspectorWorkerAgent::disconnectFromWorkerInspectorProxy):

Source/WebInspectorUI:

* UserInterface/Protocol/WorkerObserver.js:
(WI.WorkerObserver.prototype.workerCreated):
* UserInterface/Controllers/WorkerManager.js:
(WI.WorkerManager.prototype.workerCreated):
* UserInterface/Protocol/WorkerTarget.js:
(WI.WorkerTarget):
(WI.WorkerTarget.prototype.get customName): Added.
(WI.WorkerTarget.prototype.get displayName):
(WI.WorkerTarget.prototype.get displayURL): Added.
Use the `name` from the `WorkerOptions` given to the `Worker` when it's constructed as the
`displayName` of the `WI.WorkerTarget` if able. Also exposed via `get customName`.

* UserInterface/Views/ScriptTreeElement.js:
(WI.ScriptTreeElement):
* UserInterface/Views/WorkerTreeElement.js:
(WI.WorkerTreeElement):
Accept an `options` optional object that can be used to override the `mainTitle`.

LayoutTests:

* inspector/worker/runtime-basic.html:
* inspector/worker/runtime-basic-expected.txt:

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

3 months agoWeb Inspector: provide a way for inspector to turn on/off ITP debug mode and AdClickA...
drousso@apple.com [Mon, 4 May 2020 19:51:18 +0000 (19:51 +0000)]
Web Inspector: provide a way for inspector to turn on/off ITP debug mode and AdClickAttribution debug mode
https://bugs.webkit.org/show_bug.cgi?id=209763

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/protocol/Page.json:
Add new enum values to `Page.Setting`:
 - `AdClickAttributionDebugModeEnabled`
 - `ITPDebugModeEnabled`

Source/WebCore:

Tests: inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html
       inspector/page/overrideSetting-ITPDebugModeEnabled.html

* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::overrideSetting):

* inspector/InspectorClient.h:
(WebCore::InspectorClient::setDeveloperPreferenceOverride): Added.
(WebCore::InspectorClient::setMockCaptureDevicesEnabledOverride): Deleted.

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WI._handleDeviceSettingsTabBarButtonClicked):
Add a new section to the device settings popover:

    Enable: [ ] ITP Debug Mode
            [ ] Ad Click Attribution Debug Mode

* Localizations/en.lproj/localizedStrings.js:

Source/WebKit:

Generalize the `setMockCaptureDevicesEnabledOverride` to be `setDeveloperPreferenceOverride`
that uses an enum `WebCore::InspectorClient::DeveloperPreference` to know what to do.

Communicate with the NetworkProcess (from the WebProcess via the UIProcess) in the case of:
 - `AdClickAttributionDebugModeEnabled`
 - `ITPDebugModeEnabled`

* WebProcess/Inspector/WebInspectorClient.h:
* WebProcess/Inspector/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::setDeveloperPreferenceOverride): Added.
(WebKit::WebInspectorClient::setMockCaptureDevicesEnabledOverride): Deleted.
* WebProcess/Inspector/WebInspector.h:
* WebProcess/Inspector/WebInspector.cpp:
(WebKit::WebInspector::setDeveloperPreferenceOverride): Added.
(WebKit::WebInspector::setMockCaptureDevicesEnabledOverride): Deleted.

* UIProcess/Inspector/WebInspectorProxy.messages.in:
* UIProcess/Inspector/WebInspectorProxy.h:
* UIProcess/Inspector/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::setDeveloperPreferenceOverride): Added.
(WebKit::WebInspectorProxy::setMockCaptureDevicesEnabledOverride): Deleted.
* UIProcess/WebsiteData/WebsiteDataStore.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::setAdClickAttributionDebugMode): Added.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::setAdClickAttributionDebugMode): Added.

* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::setAdClickAttributionDebugMode): Added.
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode):

LayoutTests:

* inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html: Added.
* inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled-expected.txt: Added.
* inspector/page/overrideSetting-ITPDebugModeEnabled.html: Added.
* inspector/page/overrideSetting-ITPDebugModeEnabled-expected.txt: Added.

* TestExpectations:
* platform/wk2/TestExpectations:

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

3 months agoREGRESSION: [ Mac WK1 ] inspector/console/console-api.html is flaky crashing
simon.fraser@apple.com [Mon, 4 May 2020 19:49:11 +0000 (19:49 +0000)]
REGRESSION: [ Mac WK1 ] inspector/console/console-api.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=211386

Reviewed by David Kilzer.

Add some temporary logging code to get data from Mojave bots related to this
NSScrollerImp crash.

* platform/mac/ScrollAnimatorMac.mm:
(WebCore::dumpPaintersWithDelegates):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):

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

3 months ago[Catalina] ASSERTION FAILED: Unsafe to ref/deref from different threads seen with...
commit-queue@webkit.org [Mon, 4 May 2020 19:46:27 +0000 (19:46 +0000)]
[Catalina] ASSERTION FAILED: Unsafe to ref/deref from different threads seen with TestWebKitAPI.MultipleClientCertificateConnections.Failure
https://bugs.webkit.org/show_bug.cgi?id=211300

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-04
Reviewed by Youenn Fablet.

RequestData references are stored in blocks given to the network framework, which does things on background threads.
To make them safe to ref and deref on non-main threads, make RequestData ThreadSafeRefCounted.

* TestWebKitAPI/cocoa/HTTPServer.mm:

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

3 months agoAdd additional null checks to MediaPlayerPrivateMediaSourceAVFObjC
dougk@apple.com [Mon, 4 May 2020 19:44:50 +0000 (19:44 +0000)]
Add additional null checks to MediaPlayerPrivateMediaSourceAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=211134
<rdar://problem/62056577>

Reviewed by Daniel Bates.

Add additional null checks for a set m_mediaSourcePrivate to MediaPlayerPrivateMediaSourceAVFObjC.  Most uses in this
class are already guarded, but a few were not, which could lead to a null pointer crash if encountered.

No new tests; no functional changes.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):

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

3 months ago[iOS] Unable to take RunningBoard process assertions in the iOS Simulator
cdumez@apple.com [Mon, 4 May 2020 19:28:21 +0000 (19:28 +0000)]
[iOS] Unable to take RunningBoard process assertions in the iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=211254
<rdar://problem/62674074>

Reviewed by Geoffrey Garen.

Add com.apple.runningboard.assertions.webkit entitlement to iOS Simulator builds so that
we can take RunningBoard assertions on those platforms too.

While doing this, I found that we were not adding the entitlements properly for simulator
builds. For simulator builds, entitlements go into an __entitlements section of the binary,
rather than in the signature. Use CODE_SIGN_ENTITLEMENTS directive in xcconfig so that
XCode does the right thing for simulator builds.

* Configurations/BaseXPCService.xcconfig:
* Resources/ios/XPCService-embedded-simulator.entitlements: Added.
* Scripts/process-entitlements.sh:

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

3 months agoRemove now-unneded HAVE(WINDOW_SERVER_OCCLUSION_NOTIFICATIONS)
darin@apple.com [Mon, 4 May 2020 19:18:10 +0000 (19:18 +0000)]
Remove now-unneded HAVE(WINDOW_SERVER_OCCLUSION_NOTIFICATIONS)
https://bugs.webkit.org/show_bug.cgi?id=211380

Reviewed by Sam Weinig.

Source/WebKit:

* UIProcess/mac/WindowServerConnection.h: Don't check
HAVE(WINDOW_SERVER_OCCLUSION_NOTIFICATIONS) in this Mac-only header.
Also removed #pragma once in this header that is only included from .mm files.

* UIProcess/mac/WindowServerConnection.mm: Wrapped the whole file in
PLATFORM(MAC) because this is macOS-specific code that may be compiled on
iOS family platforms. Could wrap it in HAVE(WINDOW_SERVER) instead, but we
don't have anything like that and PageClientImplMac.mm, the client of this
code, uses PLATFORM(MAC).
(WebKit::registerOcclusionNotificationHandler): Ditto.
(WebKit::WindowServerConnection::WindowServerConnection): Ditto.

Source/WTF:

* wtf/PlatformHave.h: Don't define HAVE_WINDOW_SERVER_OCCLUSION_NOTIFICATIONS.

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

3 months agoRemove unused USE(COREAUDIO)
darin@apple.com [Mon, 4 May 2020 19:04:25 +0000 (19:04 +0000)]
Remove unused USE(COREAUDIO)
https://bugs.webkit.org/show_bug.cgi?id=211384

Reviewed by Alex Christensen.

* wtf/PlatformUse.h: Don't define USE_COREAUDIO.

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

3 months agoRemove now-unneeded HAVE(UI_REMOTE_VIEW)
darin@apple.com [Mon, 4 May 2020 18:52:27 +0000 (18:52 +0000)]
Remove now-unneeded HAVE(UI_REMOTE_VIEW)
https://bugs.webkit.org/show_bug.cgi?id=211382

Reviewed by Alex Christensen.

Source/WebKit:

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::createRemoteView): Deleted.
(WebKit::RemoteLayerTreeHost::makeNode): After researching to be sure the method
is present in the relevant versions of iOS 13, changed this code to use the
initWithFrame:pid:contextID: method without doing a selector check, and also
without a HAVE(UI_REMOTE_VIEW) conditional.

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: Removed the
HAVE(UI_REMOTE_VIEW) conditional.

Source/WTF:

* wtf/PlatformHave.h: Remove code to define HAVE_UI_REMOTE_VIEW.

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

3 months agoRemove now-unneeded HAVE(MENU_CONTROLLER_SHOW_HIDE_API)
darin@apple.com [Mon, 4 May 2020 18:47:34 +0000 (18:47 +0000)]
Remove now-unneeded HAVE(MENU_CONTROLLER_SHOW_HIDE_API)
https://bugs.webkit.org/show_bug.cgi?id=211381

Reviewed by Alex Christensen.

Source/WebKit:

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _handleDOMPasteRequestWithResult:]): Use hideMenuFromView: directly.
(-[WKContentView _requestDOMPasteAccessWithElementRect:originIdentifier:completionHandler:]):
Use showMenuFromView: directly.
(-[WKContentView showGlobalMenuControllerInRect:]): Deleted.
(-[WKContentView hideGlobalMenuController]): Deleted.

Source/WTF:

* wtf/PlatformHave.h: Remove code to set HAVE_MENU_CONTROLLER_SHOW_HIDE_API.

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

3 months agoRemove now-unneeded HAVE(VOUCHERS)
darin@apple.com [Mon, 4 May 2020 18:41:28 +0000 (18:41 +0000)]
Remove now-unneeded HAVE(VOUCHERS)
https://bugs.webkit.org/show_bug.cgi?id=211379

Reviewed by Alex Christensen.

Source/WebKit:

* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer): Remove HAVE(VOUCHERS) checks from this
Cocoa-only source file.

Source/WTF:

* wtf/PlatformHave.h: Remove definition of HAVE_VOUCHERS.

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

3 months agoRemove now-unneeded HAVE(MEDIA_PLAYER)
darin@apple.com [Mon, 4 May 2020 18:26:41 +0000 (18:26 +0000)]
Remove now-unneeded HAVE(MEDIA_PLAYER)
https://bugs.webkit.org/show_bug.cgi?id=211378

Reviewed by Alex Christensen.

Source/WebCore:

* platform/RemoteCommandListener.cpp: Remove uneeded check for HAVE(MEDIA_PLAYER)
in code that already checks for Cocoa platforms explicitly.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Removed
check of HAVE(MEDIA_PLAYER) in a Cocoa-only source file.
* platform/ios/RemoteCommandListenerIOS.h: Ditto. Also removed #pragma once and
some other unnecessary things because this is only included in the .mm file below.
* platform/ios/RemoteCommandListenerIOS.mm: Ditto.

Source/WTF:

* wtf/PlatformHave.h: Remove code that sets HAVE_MEDIA_PLAYER.

Tools:

* TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:
(TestWebKitAPI::TEST): Removed HAVE(MEDIA_PLAYER) check since it's now always
true in Objective-C source files.

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

3 months agoRemove unused HAVE(STRINGS_H)
darin@apple.com [Mon, 4 May 2020 18:24:15 +0000 (18:24 +0000)]
Remove unused HAVE(STRINGS_H)
https://bugs.webkit.org/show_bug.cgi?id=211377

Reviewed by Alex Christensen.

.:

* Source/cmake/OptionsCommon.cmake: Remove code to set HAVE_STRINGS_H.

Source/WTF:

* wtf/PlatformHave.h: Remove code to set HAVE_STRINGS_H.

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

3 months agoSource/WebCore:
commit-queue@webkit.org [Mon, 4 May 2020 18:18:28 +0000 (18:18 +0000)]
Source/WebCore:
WebGPU: Textures should be able to have OUTPUT_ATTACHMENT | SAMPLED usage flags
https://bugs.webkit.org/show_bug.cgi?id=211345
<rdar://problem/62264423>

Patch by Guillem Vinals <gvinals@apple.com> on 2020-05-04
Reviewed by Myles C. Maxfield.

Added support for off-screen render targets.

Test: webgpu/textures-textureviews.html

* platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
(WebCore::mtlTextureUsageForGPUTextureUsageFlags):

LayoutTests:
WebGPU: Textures should be able to have OUTPUT_ATTACHEMENT | SAMPLED usage flags
https://bugs.webkit.org/show_bug.cgi?id=211345

Patch by Guillem Vinals <gvinals@apple.com> on 2020-05-04
Reviewed by Myles C. Maxfield.

* webgpu/textures-textureviews-expected.txt:
* webgpu/textures-textureviews.html:

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

3 months agoTestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout
commit-queue@webkit.org [Mon, 4 May 2020 18:00:44 +0000 (18:00 +0000)]
TestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=211299

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-04
Reviewed by Darin Adler.

The application name is being set on a background queue, but there's nothing actually keeping the NSString alive.
This may fix some timeouts we were seeing.  I wonder why ASAN or guard malloc didn't catch this yet.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::updateProcessName):

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

3 months agoWebGPU: copyTextureToTexture() has an implementation bug (src copy view info is used...
commit-queue@webkit.org [Mon, 4 May 2020 18:00:42 +0000 (18:00 +0000)]
WebGPU: copyTextureToTexture() has an implementation bug (src copy view info is used also as dst)
https://bugs.webkit.org/show_bug.cgi?id=211303

Patch by Guillem Vinals <gvinals@apple.com> on 2020-05-04
Reviewed by Daniel Bates.

Source/WebCore:

The source copy information is also used as the destination copy information.

Test: webgpu/blit-commands-texture-to-texture.html

* platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
(WebCore::GPUCommandBuffer::copyTextureToTexture):

LayoutTests:

* webgpu/blit-commands-texture-to-texture-expected.html: Added.
* webgpu/blit-commands-texture-to-texture.html: Added.
* webgpu/js/webgpu-functions.js:
(drawGreenMipChainOnRedBackgroundInSoftware):

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

3 months agoRemove no-longer-needed HAVE(UISCENE)
darin@apple.com [Mon, 4 May 2020 16:55:07 +0000 (16:55 +0000)]
Remove no-longer-needed HAVE(UISCENE)
https://bugs.webkit.org/show_bug.cgi?id=211376

Reviewed by Chris Dumez.

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h: Don't check HAVE(UISCENE) any more in this
iOS-family-only source file; it's always true.
* UIProcess/ApplicationStateTracker.h: Ditto.
* UIProcess/ApplicationStateTracker.mm:
(WebKit::ApplicationStateTracker::ApplicationStateTracker): Ditto.
(WebKit::ApplicationStateTracker::~ApplicationStateTracker): Ditto.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView interfaceOrientation]): Ditto.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textEffectsWindow]): Ditto.

Source/WTF:

* wtf/PlatformHave.h: Don't define HAVE_UISCENE any more.
It's always true for PLATFORM(IOS_FAMILY).

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

3 months ago[WPE][GTK] Should install python3-secretstorage
commit-queue@webkit.org [Mon, 4 May 2020 15:58:53 +0000 (15:58 +0000)]
[WPE][GTK] Should install python3-secretstorage
https://bugs.webkit.org/show_bug.cgi?id=207473

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-05-04
Reviewed by Adrian Perez de Castro.

If python3-secretstorage is not installed, webkit-patch will use a custom encrypted file
for password storage instead of utilizing the system keyring. This means unnecessary
password prompts to unlock the custom encrypted key storage.

There is no benefit to using custom key storage over the system keyring.

* gtk/install-dependencies:
* wpe/install-dependencies:

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

3 months agoUnreviewed test gardening.
pvollan@apple.com [Mon, 4 May 2020 15:46:18 +0000 (15:46 +0000)]
Unreviewed test gardening.

* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt:

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

3 months agoUnreviewed test gardening.
pvollan@apple.com [Mon, 4 May 2020 15:35:14 +0000 (15:35 +0000)]
Unreviewed test gardening.

* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt:

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

3 months agoMedia controls tracks menu shows "Auto" selected instead of track selected via the...
commit-queue@webkit.org [Mon, 4 May 2020 15:28:46 +0000 (15:28 +0000)]
Media controls tracks menu shows "Auto" selected instead of track selected via the JS API
https://bugs.webkit.org/show_bug.cgi?id=211230
<rdar://problem/62648409>

Patch by Antoine Quint <graouts@apple.com> on 2020-05-04
Reviewed by Eric Carlson.

Source/WebCore:

Test: media/modern-media-controls/tracks-support/tracks-support-text-track-selected-via-media-api.html

We're fixing two issues with the captions menu on macOS here.

First, if a text track was marked as "showing" with the JS API, we would not show it as selected in the UI
because MediaControlsHost would report that the captionDisplayMode was "automatic" and we'd take this as
sufficient data to say that the "Automatic (Recommended)" item should be shown as selected. We now only
do this if we also don't have any text tracks set as "showing".

The second issue was when trying to select "Automatic (Recommended)" when a text track had been marked as
"showing" with the JS API. Calling `setSelectedTextTrack()` on MediaControlsHost in this case was not sufficient
because HTMLMediaElement::setSelectedTextTrack is a no-op if the automatic text track is provided but captionDisplayMode
is still set to "automatic". To address this, we first disable all text tracks before calling `setSelectedTextTrack()`.

* Modules/modern-media-controls/media/tracks-support.js:
(TracksSupport.prototype.tracksPanelIsTrackInSectionSelected):
(TracksSupport.prototype.tracksPanelSelectionDidChange):

LayoutTests:

Add a test that:

- sets an embedded text track as selected via the HTMLMediaElement TextTrack APIs,
- brings up the tracks panel,
- dumps its initial UI state, checking that the track selected via the API shows as selected in the UI,
- selects the "Automatic (Recommended)" track,
- brings up the tracks panel again,
- dumps its current UI state, checking that the "Automatic (Recommended)" shows as selected in the UI.

* media/modern-media-controls/tracks-support/tracks-support-text-track-selected-via-media-api-expected.txt: Added.
* media/modern-media-controls/tracks-support/tracks-support-text-track-selected-via-media-api.html: Added.

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

3 months ago[LFC][TFC] Override the table computed height when content needs more space
zalan@apple.com [Mon, 4 May 2020 14:59:53 +0000 (14:59 +0000)]
[LFC][TFC] Override the table computed height when content needs more space
https://bugs.webkit.org/show_bug.cgi?id=211367

Reviewed by Antti Koivisto.

* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):

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

3 months ago[LFC][TFC] Use distributeAvailableSpace for row sizing
zalan@apple.com [Mon, 4 May 2020 14:53:32 +0000 (14:53 +0000)]
[LFC][TFC] Use distributeAvailableSpace for row sizing
https://bugs.webkit.org/show_bug.cgi?id=211366

Reviewed by Antti Koivisto.

Switch over to the generic space distribution for table row sizing.

* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::RowSpan::hasSpan):
(WebCore::Layout::RowSpan::isSpanned):
(WebCore::Layout::RowSpan::spanCount):
(WebCore::Layout::RowSpan::startSpan):
(WebCore::Layout::RowSpan::endSpan):
(WebCore::Layout::RowSpan::index):
(WebCore::Layout::RowSpan::size):
(WebCore::Layout::RowSpan::spacing):
(WebCore::Layout::distributeAvailableSpace):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace):

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

3 months agoAdd WTR::AccessibilityUIElement::attributeValueAsync to retrieve attribute values...
andresg_22@apple.com [Mon, 4 May 2020 14:35:10 +0000 (14:35 +0000)]
Add WTR::AccessibilityUIElement::attributeValueAsync to retrieve attribute values in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=211341

Reviewed by Chris Fleizach.

Tools:

To simulate running WebAccessibilityObjectWrapper methods on the secondary
thread, WTR::AccessibilityUIElement dispatches those calls to the AX
thread. But some WebAccessibilityObjectWrapper calls cannot be fulfilled
on the secondary thread and in turn have to be dispatched to the main
thread. This was causing a thread lock during LayoutTests in isolated
tree mode since the initial dispatch to the secondary thread blocks the
main thread. The solution in this patch is to add an asynchronous
mechanism to retrieve attribute values.
- Added WTR::AccessibilityUIElement::attributeValueAsync.
- Made several fixes consisting of retaining variables in the main
thread whose values are computed on the secondary thread.

* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::executeOnAXThreadAndWait):
(WTR::AccessibilityController::executeOnAXThread):
(WTR::AccessibilityController::executeOnMainThread):
(WTR::AXThread::dispatchBarrier):
(WTR::AccessibilityController::executeOnAXThreadIfPossible): Renamed executeOnAXThreadAndWait.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:
(WTR::webAccessibilityObjectWrapperClass):
(WTR::makeArrayRefForArray):
(WTR::makeObjectRefForDictionary):
(WTR::makeValueRefForValue):
(WTR::searchPredicateParameterizedAttributeForSearchCriteria):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::accessibleElementById):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
(-[AccessibilityNotificationHandler startObserving]):
(-[AccessibilityNotificationHandler _notificationReceived:]):
(webAccessibilityObjectWrapperClass): Moved to AccessibilityCommonMac.
(makeValueRefForValue): Moved to AccessibilityCommonMac.
(makeArrayRefForArray): Moved to AccessibilityCommonMac.
(makeObjectRefForDictionary): Moved to AccessibilityCommonMac.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::supportedAttributes):
(WTR::attributeValue):
(WTR::setAttributeValue):
(WTR::attributesOfElement):
(WTR::AccessibilityUIElement::getChildrenWithRange):
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::AccessibilityUIElement::indexOfChild):
(WTR::AccessibilityUIElement::selectedChildrenCount const):
(WTR::AccessibilityUIElement::attributeValueAsync):
(WTR::AccessibilityUIElement::selectTextWithCriteria):

LayoutTests:

This test exercises the new WTR::AccessibilityUIElement::atributeValueAsync method.
Instead of using shouldBeTrue that does not work with local variables,
uses debug to log results.

* accessibility/mac/primary-screen-height-expected.txt:
* accessibility/mac/primary-screen-height.html:

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

3 months agoCamera video samples have a bad orientation if upside down
youenn@apple.com [Mon, 4 May 2020 14:13:24 +0000 (14:13 +0000)]
Camera video samples have a bad orientation if upside down
https://bugs.webkit.org/show_bug.cgi?id=211373

Reviewed by Eric Carlson.

Manually tested on iPad and iPhones.

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::computeSampleRotation):
-90 should be the same as 270 not -270.

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

3 months agoUnreviewed, reverting r261076.
commit-queue@webkit.org [Mon, 4 May 2020 08:57:33 +0000 (08:57 +0000)]
Unreviewed, reverting r261076.
https://bugs.webkit.org/show_bug.cgi?id=211371

Triggers obscure X11 error on GTK bots (Requested by philn on
#webkit).

Reverted changeset:

"[Flatpak SDK] Query the doc portal path with DBus"
https://bugs.webkit.org/show_bug.cgi?id=211281
https://trac.webkit.org/changeset/261076

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

3 months ago[Flatpak SDK] Support for local repository and drive-by fixes
philn@webkit.org [Mon, 4 May 2020 08:31:17 +0000 (08:31 +0000)]
[Flatpak SDK] Support for local repository and drive-by fixes
https://bugs.webkit.org/show_bug.cgi?id=211370

Reviewed by Žan Doberšek.

This patch adds a new --repo option to webkit-flatpak, allowing
SDK developers to test local changes made to the SDK. As future
versions of the SDK will depend on the ffmpeg FDO extension,
flatpakutils installs it from now on. One consequence is that the
LD_LIBRARY_PATH set in the GTK layout test driver is no longer
overriden when running in the flatpak SDK, in order to allow the
extension to set it correctly.

* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
* flatpak/flatpakutils.py:
(FlatpakRepos.add):
(FlatpakRepo.repo_file):
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.__init__):
(WebkitFlatpak.clean_args):
(WebkitFlatpak._reset_repository):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak._get_packages):
(run_in_sandbox_if_available):

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

3 months agoUnreviewed, speculative build fix for r261071
ysuzuki@apple.com [Mon, 4 May 2020 08:27:00 +0000 (08:27 +0000)]
Unreviewed, speculative build fix for r261071
https://bugs.webkit.org/show_bug.cgi?id=211274

* UIProcess/Cocoa/WebPageProxyCocoa.mm:

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

3 months ago[Flatpak SDK] Query the doc portal path with DBus
commit-queue@webkit.org [Mon, 4 May 2020 08:23:44 +0000 (08:23 +0000)]
[Flatpak SDK] Query the doc portal path with DBus
https://bugs.webkit.org/show_bug.cgi?id=211281

Patch by Philippe Normand <pnormand@igalia.com> on 2020-05-04
Reviewed by Žan Doberšek.

* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):

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

3 months ago[gtk] isMainThread() assert when running minibrowser in debug builds.
ysuzuki@apple.com [Mon, 4 May 2020 07:28:39 +0000 (07:28 +0000)]
[gtk] isMainThread() assert when running minibrowser in debug builds.
https://bugs.webkit.org/show_bug.cgi?id=211355

Reviewed by Mark Lam.

Using NeverDestroyed<const AtomString> is discouraged if it is in the non main thread. This can be quite easily wrong:
if the running thread is one of WorkerPool, then this is wrong since AtomStringTable will be destroyed every time underlying
Thread is shutdown. If this is invoked by AutomaticThread, this is also wrong due to the same reason etc. This is why
we introduced MainThreadNeverDestroyed and use it for const AtomString. This restriction found the bug that we are using
`NeverDestroyed<const AtomString>` in non main thread. We should not do that.

This patch fixes the issue by introducing TextureMapperShaderProgram::Variable instead of using AtomString. Then this code
no longer has thread affinity.

* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::getLocation): Deleted.
* platform/graphics/texmap/TextureMapperShaderProgram.h:

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

3 months agoPut lh / rlh units behind a flag until bug 211351 is sorted out.
emilio@crisal.io [Mon, 4 May 2020 07:16:48 +0000 (07:16 +0000)]
Put lh / rlh units behind a flag until bug 211351 is sorted out.
https://bugs.webkit.org/show_bug.cgi?id=211356

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-values/lh-rlh-on-root-001.html: Enable the flag in relevant tests.
* web-platform-tests/css/css-values/lh-unit-001.html:
* web-platform-tests/css/css-values/lh-unit-002.html:

Source/WebCore:

* css/parser/CSSParserToken.cpp: Use the new runtime flag to disable parsing the units.
(WebCore::cssPrimitiveValueUnitFromTrie):
* page/RuntimeEnabledFeatures.h: Define the new runtime flag.
(WebCore::RuntimeEnabledFeatures::setLineHeightUnitsEnabled):
(WebCore::RuntimeEnabledFeatures::lineHeightUnitsEnabled const):

Source/WebKit:

* Shared/WebPreferences.yaml: Define the runtime flag.

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences lineHeightUnitsEnabled]):
(-[WebPreferences setLineHeightUnitsEnabled:]):
* WebView/WebView.mm:

Tools:

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):

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

3 months agoRemove some unused and broken functions in Bitmap.
mark.lam@apple.com [Mon, 4 May 2020 07:13:21 +0000 (07:13 +0000)]
Remove some unused and broken functions in Bitmap.
https://bugs.webkit.org/show_bug.cgi?id=211368

Reviewed by Yusuke Suzuki.

Bitmap::operator[] never worked.  There's currently no way to use it to read a
bit value.  We also can't use it to set a bit value because it relies on
Bitmap::iterator::operator= to set the value.  However, Bitmap::iterator stores
the Bitmap* as a const pointer, and Bitmap::iterator::operator= calls set() on
the const pointer.  If we try to use operator[] to set a bit, we'll get a
compilation error.

This patch removes the 2 variants of Bitmap::operator[] and Bitmap::iterator::operator=.

* wtf/Bitmap.h:
(WTF::WordType>::operator): Deleted.
(WTF::WordType>::operator const const): Deleted.

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

3 months ago[Flatpak SDK] Misc flatpakutils.py fixes
pgriffis@igalia.com [Mon, 4 May 2020 07:07:32 +0000 (07:07 +0000)]
[Flatpak SDK] Misc flatpakutils.py fixes
https://bugs.webkit.org/show_bug.cgi?id=211032

Reviewed by Philippe Normand.

Pass SSLKEYLOGFILE into sandbox which is useful for debugging with Wireshark.

Sanitize G_MESSAGES_DEBUG env var when checking output of flatpak command.

Fix check for --noninteractive support.

Fix python 3 exception when setting up icecc mixing strings and bytes.

* flatpak/flatpakutils.py:
(Console.warning_message):
(flatpak_check_output):
(check_flatpak):
(FlatpakObject.flatpak):
* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):

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

3 months agoUse LocalCurrentGraphicsContext in WebKit::convertPlatformImageToBitmap()
ddkilzer@apple.com [Mon, 4 May 2020 04:14:51 +0000 (04:14 +0000)]
Use LocalCurrentGraphicsContext in WebKit::convertPlatformImageToBitmap()
<https://webkit.org/b/211274>

Reviewed by Darin Adler.

Source/WebCore:

* platform/mac/LocalCurrentGraphicsContext.h:
(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
(WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):
- Export methods for use in WebKit.

Source/WebKit:

* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::convertPlatformImageToBitmap):
- Use LocalCurrentGraphicsContext to replace code.

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

3 months agoFix static analyzer false positive in -[WebUndefined undefined]
ddkilzer@apple.com [Mon, 4 May 2020 03:42:02 +0000 (03:42 +0000)]
Fix static analyzer false positive in -[WebUndefined undefined]
<https://webkit.org/b/211353>

Reviewed by Darin Adler.

* bridge/objc/WebScriptObject.mm:
(+[WebUndefined allocWithZone:]):
(-[WebUndefined initWithCoder:]):
(-[WebUndefined retain]):
(-[WebUndefined autorelease]):
- Update method signatures.
(+[WebUndefined undefined]):
- Fix clang static analyzer false positive by using idiomatic
  -alloc, -init calls to create object.  These methods call
  -allocWithZone:, so this still uses the singleton pattern.

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

3 months agoAttempt to fix the iOS build after r261068
dbates@webkit.org [Sun, 3 May 2020 22:37:19 +0000 (22:37 +0000)]
Attempt to fix the iOS build after r261068
(https://bugs.webkit.org/show_bug.cgi?id=208281)

Wrap TEST()s in namespace TestWebKitAPI so as to not need to qualify IPhoneUserInterfaceSwizzler.

* TestWebKitAPI/Tests/ios/UIWKInteractionViewProtocol.mm:
(TEST): Deleted.

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

3 months ago[iPad Simulator] TestWebKitAPI.UIWKInteractionViewProtocol.SelectPositionAtPointAfter...
dbates@webkit.org [Sun, 3 May 2020 22:14:45 +0000 (22:14 +0000)]
[iPad Simulator] TestWebKitAPI.UIWKInteractionViewProtocol.SelectPositionAtPointAfterBecomingFirstResponder is failing
https://bugs.webkit.org/show_bug.cgi?id=208281
<rdar://problem/59829265>

Reviewed by Wenson Hsieh.

I tried to write the test SelectPositionAtPointAfterBecomingFirstResponder for both iPad and iPhone,
but it turns out that I forgot an impl detail on how form control dismissal works for iPad and fixing
this would require adding more SPI/IPI. This is largely due to differences in form control UI and
conventions for dismissing such UI. This test isn't testing such UI it just needs to ensure that the
view is not first responder before it runs the actual test code. It uses an iPhone specific set of
steps to do this. It's enough to test this functionality on iPhone.

* TestWebKitAPI/Tests/ios/UIWKInteractionViewProtocol.mm:
(TEST):

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

3 months agoRemove no longer needed WebKitAdditions include for JavaScriptCorePrefix.h
mjs@apple.com [Sun, 3 May 2020 22:00:48 +0000 (22:00 +0000)]
Remove no longer needed WebKitAdditions include for JavaScriptCorePrefix.h
https://bugs.webkit.org/show_bug.cgi?id=211357

Reviewed by Mark Lam.

* JavaScriptCorePrefix.h:

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

3 months agoUse default initializers and default constructors in WebEvent.h
ddkilzer@apple.com [Sun, 3 May 2020 21:42:23 +0000 (21:42 +0000)]
Use default initializers and default constructors in WebEvent.h
<https://webkit.org/b/211354>

Reviewed by Daniel Bates.

* Shared/WebEvent.h:
(WebKit::WebWheelEvent):
(WebKit::WebKeyboardEvent):
(WebKit::WebPlatformTouchPoint):
(WebKit::WebTouchEvent):
- Change empty constructors to use `default`.
- Use default initializers to make sure all fields are
  initialized.

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

3 months agoSometimes cannot find <textarea> in list of editable elements
dbates@webkit.org [Sun, 3 May 2020 20:53:22 +0000 (20:53 +0000)]
Sometimes cannot find <textarea> in list of editable elements
https://bugs.webkit.org/show_bug.cgi?id=211348
<rdar://problem/62231067>

Reviewed by Simon Fraser.

Source/WebCore:

When building the editable region add the bounds of the text control to the region instead
of the bounds of its inner text element even though it is the latter that is actually editable.
Using the bounds of the text control is more in line with a user's expectation for the editable
portion of a text control: the entire control. So, do that.

Tests: editing/editable-region/hit-test-textarea-empty-space.html
       editing/editable-region/search-field-basic.html
       editing/editable-region/text-field-basic.html
       editing/editable-region/textarea-basic.html

* rendering/EventRegion.cpp:
(WebCore::EventRegionContext::unite):
(WebCore::EventRegion::unite):
Add a new bool as to whether to override the user-modify check and just assume that the region
is for something editable. This is needed because the form control (e.g. the <input> or <textarea>
aka the shadow host element) isn't actually editable itself. Its inner text element is editable.
RenderBlock::paintObject() will pass true for this override when event region painting such a
control and the control's inner text element is editable so that the controls bounds are added to
the editable region.
* rendering/EventRegion.h: Add a bool, defaulting to false to keep the current behavior. While
I am here remove some unneeded WEBCORE_EXPORT attributions.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject): Pass a value for the override argument. It will be true
if this block is actually a text control and its inner text element is editable. Otherwise, it
will be false. There is also no longer a need to descend into the children of a text control
because I only care to record the bounds of the control itself as editable, not its inner text
element.

LayoutTests:

Update some existing test results and add some more tests.

* editing/editable-region/hit-test-textarea-empty-space-expected.txt: Added.
* editing/editable-region/hit-test-textarea-empty-space.html: Added.
* editing/editable-region/overflow-scroll-text-field-and-contenteditable-expected.txt:
* editing/editable-region/search-field-basic-expected.txt: Copied from LayoutTests/editing/editable-region/input-basic-expected.txt.
* editing/editable-region/search-field-basic.html: Copied from LayoutTests/editing/editable-region/input-basic.html.
* editing/editable-region/text-field-basic-expected.txt: Copied from LayoutTests/editing/editable-region/input-basic-expected.txt.
* editing/editable-region/text-field-basic.html: Copied from LayoutTests/editing/editable-region/input-basic.html.
* editing/editable-region/textarea-basic-expected.txt: Renamed from LayoutTests/editing/editable-region/input-basic-expected.txt.
* editing/editable-region/textarea-basic.html: Renamed from LayoutTests/editing/editable-region/input-basic.html.

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

3 months ago[LFC][TFC] Turns horizontal space distribution into a generic space distribution
zalan@apple.com [Sun, 3 May 2020 18:23:39 +0000 (18:23 +0000)]
[LFC][TFC] Turns horizontal space distribution into a generic space distribution
https://bugs.webkit.org/show_bug.cgi?id=211352

Reviewed by Antti Koivisto.

Horizontal(column) and vertical(row) space distributions use essentially the same logic to distribute
the extra space among the columns/rows.
This patch turns the horizontal space distribution function into a generic space distribution code so
that we can use it for row sizing as well.

* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::ColumnSpan::hasSpan):
(WebCore::Layout::ColumnSpan::isSpanned):
(WebCore::Layout::ColumnSpan::spanCount):
(WebCore::Layout::ColumnSpan::startSpan):
(WebCore::Layout::ColumnSpan::endSpan):
(WebCore::Layout::ColumnSpan::index):
(WebCore::Layout::ColumnSpan::size):
(WebCore::Layout::ColumnSpan::spacing):
(WebCore::Layout::distributeAvailableSpace):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):
* layout/tableformatting/TableGrid.h:
(WebCore::Layout::TableGrid::slot const):

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

3 months agoAudioMediaStreamTrackRendererCocoa should create/start/stop its remote unit on the...
youenn@apple.com [Sun, 3 May 2020 18:16:31 +0000 (18:16 +0000)]
AudioMediaStreamTrackRendererCocoa should create/start/stop its remote unit on the main thread
https://bugs.webkit.org/show_bug.cgi?id=211287

Reviewed by Eric Carlson.

Creating/starting/stopping audio units in different threads is error prone.
Now that we have an observer model where we have observers for when to play in the main thread and
based on that, we decide to receive audio samples in a background thread, we can simplify the logic of AudioMediaStreamTrackRendererCocoa.
We do this by creating/starting the unit in AudioMediaStreamTrackRendererCocoa::start.
At that point, AudioMediaStreamTrackRendererCocoa is not expected to receive any sample.
Just after starting, AudioTrackPrivateMediaStream will receive audio samples and forward them to AudioMediaStreamTrackRendererCocoa.
AudioMediaStreamTrackRendererCocoa will then create in a background thread the AudioSampleDataSource that is responsible to adapt the received audio samples to the unit.

Manually tested.

* platform/audio/mac/AudioSampleDataSource.h:
(WebCore::AudioSampleDataSource::inputDescription const):
* platform/audio/mac/CAAudioStreamDescription.h:
* platform/mediastream/AudioTrackPrivateMediaStream.cpp:
(WebCore::AudioTrackPrivateMediaStream::startRenderer):
Ensure to start the unit and then start gettting audio samples.
* platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
(WebCore::AudioMediaStreamTrackRendererCocoa::start):
(WebCore::AudioMediaStreamTrackRendererCocoa::stop):
(WebCore::AudioMediaStreamTrackRendererCocoa::clear):
(WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
(WebCore::AudioMediaStreamTrackRendererCocoa::render):
* platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h:

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

3 months agoUnreviewed test cleanup.
simon.fraser@apple.com [Sun, 3 May 2020 15:59:09 +0000 (15:59 +0000)]
Unreviewed test cleanup.

Remove some unused elements from these tests, and send a couple of mouseMoved
events to reduce the chances of flakiness.

* fast/scrolling/mac/scrollbars/overlay-scrollbar-hovered.html:
* fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal-expected.txt:
* fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal.html:

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

3 months agoatob() should not accept a vertical tab
commit-queue@webkit.org [Sun, 3 May 2020 09:53:55 +0000 (09:53 +0000)]
atob() should not accept a vertical tab
https://bugs.webkit.org/show_bug.cgi?id=184529

Patch by Rob Buis <rbuis@igalia.com> on 2020-05-03
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update improved test expectations.

* web-platform-tests/fetch/data-urls/base64.any-expected.txt:
* web-platform-tests/fetch/data-urls/base64.any.worker-expected.txt:
* web-platform-tests/fetch/data-urls/resources/base64.json: Add test for unicode whitespace.
* web-platform-tests/html/webappapis/atob/base64-expected.txt:

Source/WebCore:

The forgiving-base64 decode algorithm [1] uses [2] to strip
out ASCII whitespace which does not include vertical tabs, so
change the atob() implementation to not strip out vertical
tabs and thus to fail decode on vertical tabs.

[1] https://infra.spec.whatwg.org/#forgiving-base64-decode
[2] https://infra.spec.whatwg.org/#ascii-whitespace

Behavior matches Firefox and Chrome.

* page/Base64Utilities.cpp:
(WebCore::Base64Utilities::atob):
* platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::decodeBase64):

Source/WTF:

Add an option to allow discarding of base64 decoding
when a vertical tab is encountered.

* wtf/text/Base64.cpp:
(WTF::base64DecodeInternal):
* wtf/text/Base64.h:

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

3 months agoUpdate info.
dbates@webkit.org [Sun, 3 May 2020 07:44:32 +0000 (07:44 +0000)]
Update info.

* Scripts/webkitpy/common/config/contributors.json:

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

3 months agoUnreviewed, add myself to some watch lists.
changseok@webkit.org [Sun, 3 May 2020 06:20:52 +0000 (06:20 +0000)]
Unreviewed, add myself to some watch lists.

* Scripts/webkitpy/common/config/watchlist:

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

3 months agoediting/undo-manager/undo-manager-delete-stale-undo-items.html is timing out.
mark.lam@apple.com [Sun, 3 May 2020 06:18:25 +0000 (06:18 +0000)]
editing/undo-manager/undo-manager-delete-stale-undo-items.html is timing out.
https://bugs.webkit.org/show_bug.cgi?id=211340
<rdar://problem/62767874>

Reviewed by Wenson Hsieh.

The test aims to measure the number of GC'ed Undo related objects.  It created
and estimated 600 objects and allows an error of 20 objects after GC is expected
to have collected these objects.  This turns out to be too tight an error allowance.
Just running any JS code could inadvertantly create more objects, that will exceed
that error allowance.

This patch attempts to make the test more robust by increasing the created object
count to an estimated 3000 objects and allows an error of 300 objects.  This means
we'll expect to see at least 2700 objects collected.  That is a high enough number
that it cannot be attributed to unexpected objects created by the JS runtime being
GCed.  The allowance of 300 is also much higher than number of unexpected objects
that the JS runtime may reasonably create beyond those managed by this test.

With this change, the test no longer times out.

* editing/undo-manager/undo-manager-delete-stale-undo-items-expected.txt:
* editing/undo-manager/undo-manager-delete-stale-undo-items.html:

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

3 months agoAdd a log channel for OverlayScrollbars
simon.fraser@apple.com [Sun, 3 May 2020 03:53:40 +0000 (03:53 +0000)]
Add a log channel for OverlayScrollbars
https://bugs.webkit.org/show_bug.cgi?id=211329

Reviewed by Zalan Bujtas.

Overlay scrollbar behavior is opaque. This log channel will add clarity.

* platform/Logging.h:
* platform/mac/ScrollAnimatorMac.mm:
(operator<<):
(-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
(-[WebScrollbarPartAnimation startAnimation]):
(-[WebScrollbarPartAnimation setCurrentProgress:setCurrentProgress:]):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture const):
(WebCore::ScrollAnimatorMac::didEndScrollGesture const):
(WebCore::ScrollAnimatorMac::mayBeginScrollGesture const):
(WebCore::ScrollAnimatorMac::handleWheelEventPhase):

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

3 months agoMake it possible to test overlay scrollbar interactions
simon.fraser@apple.com [Sun, 3 May 2020 03:49:16 +0000 (03:49 +0000)]
Make it possible to test overlay scrollbar interactions
https://bugs.webkit.org/show_bug.cgi?id=211342

Reviewed by Daniel Bates.

Source/WebCore:

Add internals.horizontalScrollbarState() and internals.verticalScrollbarState() and hook them
up via ScrollableArea to ScrollAnimatorMac. They dump state based on the NSScrollerImp state.

Make internals.setUsesOverlayScrollbars(true) actually trigger real overlay scrollbars by notifying
the ScrollbarTheme about the scrollbar style change.

Tests: fast/scrolling/mac/scrollbars/overlay-scrollbar-hovered.html
       fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal.html
       fast/scrolling/mac/scrollbars/overlay-scrollbar-state.html
       fast/scrolling/mac/scrollbars/scrollbar-state.html

* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::ScrollAnimator::horizontalScrollbarStateForTesting const):
(WebCore::ScrollAnimator::ScrollAnimator::verticalScrollbarStateForTesting const):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::horizontalScrollbarStateForTesting const):
(WebCore::ScrollableArea::verticalScrollbarStateForTesting const):
* platform/ScrollableArea.h:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::scrollbarState):
(WebCore::ScrollAnimatorMac::horizontalScrollbarStateForTesting const):
(WebCore::ScrollAnimatorMac::verticalScrollbarStateForTesting const):
* testing/Internals.cpp:
(WebCore:: const):
(WebCore::Internals::scrollbarOverlayStyle const):
(WebCore::Internals::scrollbarUsingDarkAppearance const):
(WebCore::Internals::horizontalScrollbarState const):
(WebCore::Internals::verticalScrollbarState const):
(WebCore::Internals::setUsesOverlayScrollbars):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

New tests, and some helper functions in UIHelper.

* fast/scrolling/mac/scrollbars/overlay-scrollbar-hovered-expected.txt: Added.
* fast/scrolling/mac/scrollbars/overlay-scrollbar-hovered.html: Added.
* fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal-expected.txt: Added.
* fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal.html: Added.
* fast/scrolling/mac/scrollbars/overlay-scrollbar-state-expected.txt: Added.
* fast/scrolling/mac/scrollbars/overlay-scrollbar-state.html: Added.
* fast/scrolling/mac/scrollbars/scrollbar-state-expected.txt: Added.
* fast/scrolling/mac/scrollbars/scrollbar-state.html: Added.
* resources/ui-helper.js:
(window.UIHelper.async mouseWheelMayBeginAt):
(window.UIHelper.async mouseWheelCancelAt):
(window.UIHelper.async waitForCondition):

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

3 months agoGardening: rolling out r261050 and r261051.
mark.lam@apple.com [Sat, 2 May 2020 21:23:00 +0000 (21:23 +0000)]
Gardening: rolling out r261050 and r261051.
https://bugs.webkit.org/show_bug.cgi?id=211328
<rdar://problem/62755865>

Not reviewed.

Source/JavaScriptCore:

* assembler/CPU.h:

Source/WTF:

Appears to make editing/undo-manager/undo-manager-delete-stale-undo-items.html timeout always.

* WTF.xcodeproj/project.pbxproj:
* wtf/Bitmap.h:
* wtf/CMakeLists.txt:
* wtf/StdIntExtras.h: Removed.

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

3 months agoPage::editableElementsInRect() should return root editable elements
dbates@webkit.org [Sat, 2 May 2020 21:21:19 +0000 (21:21 +0000)]
Page::editableElementsInRect() should return root editable elements
https://bugs.webkit.org/show_bug.cgi?id=211343
<rdar://problem/60015801>

Reviewed by Simon Fraser.

Source/WebCore:

Return the root editable element for each non-text form control editable element
inside the search rect as it may not have been hit itself. This can happen if the
search rect is small enough to intersect only child elements of the root editable
elements.

* page/Page.cpp:
(WebCore::Page::editableElementsInRect const):
(WebCore::isEditableTextInputElement): Deleted.

Tools:

Add some tests.

* TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:
(TestWebKitAPI::TEST):

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

3 months agoscrollableAreaForScrollingNodeID() gives the wrong answer for the FrameView
simon.fraser@apple.com [Sat, 2 May 2020 19:35:03 +0000 (19:35 +0000)]
scrollableAreaForScrollingNodeID() gives the wrong answer for the FrameView
https://bugs.webkit.org/show_bug.cgi?id=211310

Reviewed by Zalan Bujtas.

Given the FrameView's scrollingNodeID, RenderLayerCompositor::scrollableAreaForScrollingNodeID()
would return the RenderView's layer when it should return the FrameView itself.

Fixing this allows removal of a special-case in setActiveScrollSnapIndices().

No behavior change.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::scrollableAreaForScrollingNodeID const):

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

3 months agohandleWheelEventPhase() should include the relevant ScrollingNodeID
simon.fraser@apple.com [Sat, 2 May 2020 19:32:26 +0000 (19:32 +0000)]
handleWheelEventPhase() should include the relevant ScrollingNodeID
https://bugs.webkit.org/show_bug.cgi?id=211315

Reviewed by Tim Horton.

handleWheelEventPhase() is used to send information about wheel event phases
to the main thread, which make their way to ScrollAnimatorMac::handleWheelEventPhase()
and are used to update the state of overlay scrollbars. In order to talk to the
correct set of scrollbars with overflow:scroll, we need to send along the ScrollingNodeID
and map that to the appropriate ScrollableArea.

Will be tested by future overlay scrollbar tests.

Source/WebCore:

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::handleWheelEventPhase):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::handleWheelEventPhase): Deleted.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::handleWheelEventPhase):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::handleWheelEventPhase):
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent):
* platform/mac/ScrollAnimatorMac.mm:

Source/WebKit:

* UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::handleWheelEventPhase):
* UIProcess/RemoteLayerTree/RemoteScrollingTree.h:

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

3 months ago[Follow up] Allow Bitmap to use up to a UCPURegister word size for internal bit storage.
mark.lam@apple.com [Sat, 2 May 2020 19:07:28 +0000 (19:07 +0000)]
[Follow up] Allow Bitmap to use up to a UCPURegister word size for internal bit storage.
https://bugs.webkit.org/show_bug.cgi?id=211328
<rdar://problem/62755865>

Not reviewed.

Landing file missed in last commit.

* wtf/StdIntExtras.h: Added.

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

3 months agoAllow Bitmap to use up to a UCPURegister word size for internal bit storage.
mark.lam@apple.com [Sat, 2 May 2020 17:03:42 +0000 (17:03 +0000)]
Allow Bitmap to use up to a UCPURegister word size for internal bit storage.
https://bugs.webkit.org/show_bug.cgi?id=211328
<rdar://problem/62755865>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

* assembler/CPU.h:

Source/WTF:

1. Moved the definition of CPURegister and UCPURegister down into WTF.
2. Updated Bitmap so that it will automatically choose the minimal required
   word size for the number of bits it needs to store.  This means the Bitmap
   can automatically choose a WordType from uint8_t up to UCPURegister.
   Previously, the WordType is always uint32_t by default.

This should improve perf with use of Bitmap on 64-bit platforms.  The size
optimization is necessary to prevent bloat on 64-bit platforms which would have
resulted if we simply set the default to always be UCPURegister.

* WTF.xcodeproj/project.pbxproj:
* wtf/Bitmap.h:
* wtf/CMakeLists.txt:
* wtf/StdIntExtras.h: Added.

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

3 months ago[GTK][WPE] Gardening, several WebGL tests are failing after r261023
dpino@igalia.com [Sat, 2 May 2020 15:27:13 +0000 (15:27 +0000)]
[GTK][WPE] Gardening, several WebGL tests are failing after r261023
https://bugs.webkit.org/show_bug.cgi?id=211339

Unreviewed gardening.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

3 months ago[GTK4] Re-inject key press events not handled by the web process
carlosgc@webkit.org [Sat, 2 May 2020 12:55:57 +0000 (12:55 +0000)]
[GTK4] Re-inject key press events not handled by the web process
https://bugs.webkit.org/show_bug.cgi?id=211286

Reviewed by Adrian Perez de Castro.

Use gdk_display_put_event() since gtk_main_do_event() is no longer available in GTK4. Also stop forwarding key
release events in GTK3 case, this only makes sense for key press events and we were re-injecting every release
event since they are not handled by web elements in most of the cases.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithKeyEvent):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent):
(webkitWebViewBaseKeyReleaseEvent):
(webkitWebViewBaseKeyPressed):

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

3 months ago[GTK] Specify action group name when binding context menu models
aperez@igalia.com [Sat, 2 May 2020 12:54:36 +0000 (12:54 +0000)]
[GTK] Specify action group name when binding context menu models
https://bugs.webkit.org/show_bug.cgi?id=211288

Reviewed by Carlos Garcia Campos.

No new tests needed.

* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::append): Use the action name directly for the menu item.
(WebKit::WebContextMenuProxyGtk::populate): Indicate the action group name when binding the
menu model, which automatically adds the group name as action name prefix without needing
to specify it by hand when adding menu items.

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

3 months ago[CSS Easing 1] implement `jump-*` step positions
drousso@apple.com [Sat, 2 May 2020 09:34:30 +0000 (09:34 +0000)]
[CSS Easing 1] implement `jump-*` step positions
https://bugs.webkit.org/show_bug.cgi?id=211271

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-animations/parsing/animation-timing-function-computed-expected.txt:
* web-platform-tests/css/css-animations/parsing/animation-timing-function-valid-expected.txt:
* web-platform-tests/css/css-easing/step-timing-functions-output-expected.txt:
* web-platform-tests/css/css-easing/step-timing-functions-syntax-expected.txt:
* web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed-expected.txt:
* web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid-expected.txt:
* web-platform-tests/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:

Source/WebCore:

Add support for `jump-start`, `jump-end`, `jump-none`, and `jump-both` step positions inside
the `steps()` CSS timing function <https://drafts.csswg.org/css-easing-1/#step-position>.

Adjust existing serialization logic to match the spec <https://drafts.csswg.org/css-easing-1/#serialization>:
 - omit `end` (and `jump-end`)
 - the value `step-start` should result in `steps(1, start)` instead of `step-start`
 - the value `step-end` should result in `steps(1)` instead of `step-end`

Tests: animations/computed-style.html
       fast/css/animation-steps-calculated-value.html
       transitions/transitions-parsing.html
       web-platform-tests/css/css-animations/parsing/animation-timing-function-computed.html
       web-platform-tests/css/css-animations/parsing/animation-timing-function-valid.html
       web-platform-tests/css/css-easing/step-timing-functions-output.html
       web-platform-tests/css/css-easing/step-timing-functions-syntax.html
       web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed.html
       web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid.html
       web-platform-tests/web-animations/timing-model/time-transformations/transformed-progress.html

* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeSteps):
(WebCore::consumeAnimationTimingFunction):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createTimingFunctionValue):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):

* css/CSSTimingFunctionValue.h:
(WebCore::CSSStepsTimingFunctionValue::create):
(WebCore::CSSStepsTimingFunctionValue::stepPosition const): Added.
(WebCore::CSSStepsTimingFunctionValue::CSSStepsTimingFunctionValue):
(WebCore::CSSStepsTimingFunctionValue::stepAtStart const): Deleted.
* css/CSSTimingFunctionValue.cpp:
(WebCore::CSSStepsTimingFunctionValue::customCSSText const):
(WebCore::CSSStepsTimingFunctionValue::equals const):

* platform/animation/TimingFunction.h:
(WebCore::StepsTimingFunction::create):
(WebCore::StepsTimingFunction::StepsTimingFunction):
(WebCore::StepsTimingFunction::stepPosition): Added.
(WebCore::StepsTimingFunction::setStepPosition): Added.
(WebCore::StepsTimingFunction::clone):
(WebCore::StepsTimingFunction::stepAtStart): Deleted.
(WebCore::StepsTimingFunction::setStepAtStart): Deleted.
* platform/animation/TimingFunction.cpp:
(WebCore::operator<<):
(WebCore::TimingFunction::transformTime):
(WebCore::TimingFunction::createFromCSSValue):
(WebCore::TimingFunction::cssText const):

Source/WebInspectorUI:

* UserInterface/Models/CSSKeywordCompletions.js:
(WI.CSSKeywordCompletions.forFunction):
Include the step position keywords when autocompleting the `steps()` CSS function.

Source/WebKit:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<StepsTimingFunction>::encode):
(IPC::ArgumentCoder<StepsTimingFunction>::decode):

LayoutTests:

* animations/computed-style.html:
* animations/computed-style-expected.txt:
* fast/css/animation-steps-calculated-value.html:
* fast/css/animation-steps-calculated-value-expected.txt:
* transitions/transitions-parsing.html:
* transitions/transitions-parsing-expected.txt:

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

3 months ago[GTK] Gardening, update API test expectations
dpino@igalia.com [Sat, 2 May 2020 08:32:06 +0000 (08:32 +0000)]
[GTK] Gardening, update API test expectations
https://bugs.webkit.org/show_bug.cgi?id=211337

Unreviewed gardening.

Some tests became flaky under Flatpak.

* TestWebKitAPI/glib/TestExpectations.json:

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

3 months agoBooks sometimes ends up with blank pages, especially after adjusting font size
timothy_horton@apple.com [Sat, 2 May 2020 04:57:13 +0000 (04:57 +0000)]
Books sometimes ends up with blank pages, especially after adjusting font size
https://bugs.webkit.org/show_bug.cgi?id=211265
<rdar://problem/59898144>

Reviewed by Darin Adler.

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::setViewExposedRect):
Rename "hasRectChanged" because it only tests if the optional-state of the
rect has changed, not the actual value.

Source/WebKit:

A few problems:

- There is short time during page creation where a WKWebView created
with _clipsToVisibleRect=YES would not yet have sent its viewExposedRect
to the Web Content process, and if we end up constructing tiles during
that time, we can make way too many, bogging down the process (or crashing).

Fix this by always keeping track of the viewExposedRect (on WebPageProxy,
instead of the somewhat-more-transient DrawingAreaProxy) and sending it
to the Web Content process in the WebPage creation parameters, to entirely
remove this window.

- Even when the viewExposedRect successfully gets to the Web Content
process, it can still end up wildly wrong: the DrawingArea was tasked with
watching scrolling changes, applying the scroll offset to the viewExposedRect,
and pushing it to FrameView in content coordinates.

It turns out that this was all unnecessary, as we need viewExposedRect
in root view coordinates (same space as visibleContentRect, which we
intersect it with), and we just didn't notice because all clients of
_clipsToVisibleRect: expand the view to its layout size and insert
a scrolling view outside the web view, and so don't use our scrolling.

Avoid this conversion and complexity entirely; I tested Mail and Books
where there is no impact (other than fixing the original bug), and also
a custom test app with a scrollable WKWebView inside a NSScrollView,
which improved significantly.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
Plumb view exposed rect via WebPage creation parameters.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateViewExposedRect):
Send viewExposedRect changes to WebPageProxy instead of DrawingAreaProxy.

* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::didChangeViewExposedRect):
(WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
(WebKit::DrawingAreaProxy::setViewExposedRect): Deleted.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::viewExposedRect const): Deleted.
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::didChangeViewExposedRect):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation const):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
(WebKit::RemoteLayerTreeDrawingAreaProxy::setViewExposedRect): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setViewExposedRect):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::viewExposedRect const):
Maintain viewExposedRect on WebPageProxy instead of DrawingAreaProxy,
so that we can always store it even if we don't have a DrawingAreaProxy yet
(or change DrawingAreaProxies) and can send it in WebPage creation parameters.

* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::setViewExposedRect):
(WebKit::RemoteLayerTreeDrawingArea::updateRendering):
(WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect): Deleted.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::updateRendering):
(WebKit::TiledCoreAnimationDrawingArea::setViewExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::scroll): Deleted.
(WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect): Deleted.
Plumb viewExposedRect directly to FrameView, instead of trying to apply
the root view -> contents mapping ourselves and pushing updates.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ViewExposedRect.mm: Added.
(forceRepaintCallback):
(TEST):
Add a test for the first problem, which would previously attempt to allocate
~90TB of tiles, spinning and exploding, and now happily just allocates a few.

LayoutTests:

* tiled-drawing/tile-coverage-scrolled-view-exposed-rect-expected.txt: Added.
* tiled-drawing/tile-coverage-scrolled-view-exposed-rect.html: Added.
Add a test ensuring that we create the correct tiles with a
scrolled web view that also uses clipsToVisibleRect=YES.

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

3 months ago[WebDriver] Gardening some failures.
lmoura@igalia.com [Sat, 2 May 2020 04:21:15 +0000 (04:21 +0000)]
[WebDriver] Gardening some failures.

Unreviewed test gardening.

* TestExpectations.json:

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

3 months agoText manipulation should observe the value attribute of some input elements
wenson_hsieh@apple.com [Sat, 2 May 2020 02:26:23 +0000 (02:26 +0000)]
Text manipulation should observe the value attribute of some input elements
https://bugs.webkit.org/show_bug.cgi?id=211307
<rdar://problem/61568528>

Reviewed by Darin Adler.

Source/WebCore:

Teach TextManipulationController to detect the `value` attribute in input elements of type "button" and
"submit". To do this, we plumb the element through to `isAttributeForTextManipulation` and check `isTextButton()`
if "value" attribute is being considered.

Test: TextManipulation.StartTextManipulationExtractsValuesFromButtonInputs

* editing/TextManipulationController.cpp:
(WebCore::isAttributeForTextManipulation):
(WebCore::TextManipulationController::observeParagraphs):

Tools:

Add a new API test that covers `<input type="submit">` and `<input type="button">`.

* TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

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

3 months agoHave a thread local cache for the Wasm LLInt bytecode buffer
sbarati@apple.com [Sat, 2 May 2020 00:21:51 +0000 (00:21 +0000)]
Have a thread local cache for the Wasm LLInt bytecode buffer
https://bugs.webkit.org/show_bug.cgi?id=211317

Reviewed by Filip Pizlo and Mark Lam.

Source/JavaScriptCore:

One of the main things slowing down Wasm compile times is the banging
on bmalloc's global heap lock. This patch makes it so for the bytecode
instruction buffer, we keep a thread local cache with latest capacity
the thread needed to compile. This makes it so that in the average case,
we only do one malloc at the end of a compile to memcpy the final result.

We clear these thread local caches when the WasmWorklist's automatic threads
underlying machine thread is destroyed.

This is a 15% speedup in zen garden compile times on a 16-core Mac Pro.
This is a 4-5% speedup in zen garden compile times on a 6-core MBP.

* bytecode/InstructionStream.h:
(JSC::InstructionStreamWriter::setInstructionBuffer):
(JSC::InstructionStreamWriter::finalize):
* wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::threadSpecificBuffer):
(JSC::Wasm::clearLLIntThreadSpecificCache):
(JSC::Wasm::LLIntGenerator::LLIntGenerator):
(JSC::Wasm::LLIntGenerator::finalize):
* wasm/WasmLLIntGenerator.h:
* wasm/WasmWorklist.cpp:

Source/WTF:

* wtf/Vector.h:
(WTF::Vector::sizeInBytes const):

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

3 months ago[IPC hardening] Refactor createMessageDecoder() for clarity
ddkilzer@apple.com [Fri, 1 May 2020 23:44:47 +0000 (23:44 +0000)]
[IPC hardening] Refactor createMessageDecoder() for clarity
<https://webkit.org/b/211322>

Reviewed by Darin Adler.

* Platform/IPC/cocoa/ConnectionCocoa.mm:
(IPC::createMessageDecoder):
- Rename `numDescriptors` to `numberOfPortDescriptors` to match
  variable name in sendOutgoingMessage().
- Add new `numberOfAttachments` variable to make it clear that
  one port descriptor is left for an out-of-line message body.
- Add FIXME about another issue.

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

3 months ago[Win] Fix AppleWin build
pvollan@apple.com [Fri, 1 May 2020 23:41:16 +0000 (23:41 +0000)]
[Win] Fix AppleWin build
https://bugs.webkit.org/show_bug.cgi?id=211324

Reviewed by Don Olmstead.

.:

Use correct target namespace.

* Source/cmake/target/WebCore.cmake:

Source/JavaScriptCore:

Check if target WTF_CopyHeaders exists before using it.

* CMakeLists.txt:

Source/WebKitLegacy:

Remove unknown object target and fix link errors.

* PlatformWin.cmake:

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

3 months agoAdd SPI to move localStorage to a different domain
commit-queue@webkit.org [Fri, 1 May 2020 23:38:22 +0000 (23:38 +0000)]
Add SPI to move localStorage to a different domain
https://bugs.webkit.org/show_bug.cgi?id=209260
<rdar://problem/60285683>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-05-01
Reviewed by Brady Eidson.

Source/WebKit:

Covered by an API test.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::renameDomainInWebsiteData):
(WebKit::NetworkProcess::getLocalStorageOriginDetails):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
(WebKit::LocalStorageNamespace::renameDomain):
* NetworkProcess/WebStorage/LocalStorageNamespace.h:
* NetworkProcess/WebStorage/StorageArea.cpp:
(WebKit::StorageArea::close):
* NetworkProcess/WebStorage/StorageArea.h:
* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::renameDomain):
* NetworkProcess/WebStorage/StorageManager.h:
* NetworkProcess/WebStorage/StorageManagerSet.cpp:
(WebKit::StorageManagerSet::renameDomain):
* NetworkProcess/WebStorage/StorageManagerSet.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _renameDomain:to:forDataOfTypes:completionHandler:]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::renameDomainInWebsiteData):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::renameDomainInWebsiteData):
* UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):

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

3 months agoAdd a test for webkit.org/b/211311
wenson_hsieh@apple.com [Fri, 1 May 2020 23:12:07 +0000 (23:12 +0000)]
Add a test for webkit.org/b/211311
https://bugs.webkit.org/show_bug.cgi?id=211319
<rdar://problem/62663459>

Reviewed by Tim Horton.

Exercise the crash fixed in r261017 with a new API test that loads a page and then uses
`-[WebHTMLView attributedSubstringFromRange:]` to try and grab the contents of the page as an attributed string.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/AttributedString.mm:
(TestWebKitAPI::AttributedStringTest_NewlineAtEndOfDocument::didLoadURL):
(TestWebKitAPI::AttributedStringTest_NewlineAtEndOfDocument::url const):
(TestWebKitAPI::AttributedStringTest_NewlineAtEndOfDocument::runSyncTest):
* TestWebKitAPI/Tests/mac/attributedStringNewlineAtEndOfDocument.html: Added.

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

3 months agoRegression(r259036) Unable to post comments on Jira
cdumez@apple.com [Fri, 1 May 2020 23:07:38 +0000 (23:07 +0000)]
Regression(r259036) Unable to post comments on Jira
https://bugs.webkit.org/show_bug.cgi?id=211122
<rdar://problem/62561879>

Unreviewed, revert r259036 as the new behavior does not match other browsers
and broke some Jira instances.

* loader/FormSubmission.cpp:
(WebCore::FormSubmission::populateFrameLoadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::addExtraFieldsToRequest):
(WebCore::FrameLoader::addHTTPOriginIfNeeded):
(WebCore::FrameLoader::loadResourceSynchronously):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/FrameLoader.h:
* loader/NavigationScheduler.cpp:
* loader/PingLoader.cpp:
(WebCore::PingLoader::sendPing):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::updateReferrerAndOriginHeaders):
* platform/network/ResourceRequestBase.cpp:
(WebCore::doesRequestNeedHTTPOriginHeader): Deleted.
* platform/network/ResourceRequestBase.h:

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

3 months ago[iOS] ProcessThrottler fails to re-take ProcessAssertion if the previous one was...
cdumez@apple.com [Fri, 1 May 2020 22:57:00 +0000 (22:57 +0000)]
[iOS] ProcessThrottler fails to re-take ProcessAssertion if the previous one was invalidated
https://bugs.webkit.org/show_bug.cgi?id=211297
<rdar://problem/62542463>

Reviewed by Jer Noble.

Our ProcessAssertions may get invalidated upon backgrounding of the app. When the app becomes
foreground and the ProcessThrottler tries to take a Foreground assertion as a result, it would
incorrectly think it already had such assertion and not do anything, even though the previous
one is no longer valid. As a result, the child processes would stay suspended even though the
app was foregrounded.

To address the issue, add a isValid() method to ProcessAssertion() and check it in
ProcessThrottler::setAssertionType() to determine if we need to re-take an assertion or not.
We also invalidate all pending ProcessThrottler activities upon ProcessAssertion invalidation
for good measure. This way, the holders of these activities will be able to rely on
Activity::isValid() to determine if they need to re-take their activities or not.

* Platform/spi/ios/AssertionServicesSPI.h:
* Platform/spi/ios/RunningBoardServicesSPI.h:
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAssertion::isValid const):
* UIProcess/ProcessAssertion.h:
(WebKit::ProcessAssertion::validity const): Deleted.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::setAssertionType):
(WebKit::ProcessThrottler::assertionWasInvalidated):
* UIProcess/ProcessThrottler.h:
* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::ProcessAssertion::processAssertionWasInvalidated):
(WebKit::ProcessAssertion::isValid const):
(WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount):

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

3 months agoUnreviewed, reverting r261015.
cdumez@apple.com [Fri, 1 May 2020 22:55:19 +0000 (22:55 +0000)]
Unreviewed, reverting r261015.

Seems to have broken clean builds

Reverted changeset:

"[iOS] Unable to take RunningBoard process assertions in the
iOS Simulator"
https://bugs.webkit.org/show_bug.cgi?id=211254
https://trac.webkit.org/changeset/261015

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

3 months agoUnreviewed, amend change log entry for r260831.
shihchieh_lee@apple.com [Fri, 1 May 2020 22:54:39 +0000 (22:54 +0000)]
Unreviewed, amend change log entry for r260831.

* ChangeLog:

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

3 months agoUnreviewed, another build fix after r260962.
cdumez@apple.com [Fri, 1 May 2020 22:30:06 +0000 (22:30 +0000)]
Unreviewed, another build fix after r260962.

* page/Page.h:

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

3 months agoAvoid unnecessary copying in AnimationTimeline and other clean ups
dbates@webkit.org [Fri, 1 May 2020 22:16:59 +0000 (22:16 +0000)]
Avoid unnecessary copying in AnimationTimeline and other clean ups
https://bugs.webkit.org/show_bug.cgi?id=211309

Reviewed by Simon Fraser.

Return animations by const lvalue ref to avoid copying the Vectors.
Default the constructor and destructor implementations. Remove an
unnessary argument name from animationsForElement() and re-arrange
decls to make class definition more idiomatic.

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::AnimationTimeline): Deleted.
(WebCore::AnimationTimeline::~AnimationTimeline): Deleted.
* animation/AnimationTimeline.h:
(WebCore::AnimationTimeline::relevantAnimations const):
(WebCore::AnimationTimeline::allAnimations const):

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

3 months agoChange HitTestResult::NodeSet from set of RefPtrs to set of Refs
dbates@webkit.org [Fri, 1 May 2020 22:16:19 +0000 (22:16 +0000)]
Change HitTestResult::NodeSet from set of RefPtrs to set of Refs
https://bugs.webkit.org/show_bug.cgi?id=211306

Reviewed by Simon Fraser.

HitTestResult::listBasedTestResult() never returns a set with nullptrs in it.
So, change the set declaration from ListHashSet<RefPtr<Node>> to ListHashSet<Ref<Node>>.
This way people are not tempted to unnecessarily null check the nodes in the set.

As I made this change to TreeScope::elementsFromPoint() I noticed that retargetToScope(),
which is called by it, returned a Node&. So, I changed it to return a Ref<Node>. That
required me to fix up caretRangeFromPoint(), which lead me to fix up nodeFromPoint() as well.

* dom/Document.cpp:
(WebCore::Document::caretRangeFromPoint):
* dom/EventPath.cpp:
(WebCore::RelatedNodeRetargeter::checkConsistency):
* dom/TreeScope.cpp:
(WebCore::TreeScope::retargetToScope const):
(WebCore::TreeScope::nodeFromPoint):
(WebCore::TreeScope::elementFromPoint):
(WebCore::TreeScope::elementsFromPoint):
* dom/TreeScope.h:
* page/Page.cpp:
(WebCore::Page::editableElementsInRect const):
* rendering/HitTestResult.cpp:
(WebCore::appendToNodeSet):
(WebCore::HitTestResult::HitTestResult):
(WebCore::HitTestResult::operator=):
(WebCore::HitTestResult::addNodeToListBasedTestResultCommon):
(WebCore::HitTestResult::append):
* rendering/HitTestResult.h:
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect const):

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

3 months agoFix stress/big-int-negate-jit.js
ysuzuki@apple.com [Fri, 1 May 2020 22:03:15 +0000 (22:03 +0000)]
Fix stress/big-int-negate-jit.js
https://bugs.webkit.org/show_bug.cgi?id=211321

Reviewed by Saam Barati.

This test is assuming that 100000 iteration of 2 negateBigInt calls makes negateBigInt DFG-compiled.
But this is wrong if BigInt negation is fast enough. We made BigInt faster and now this test starts
failing because running this iteration finishes earlier than DFG compilation finishes. We should use `useConcurrentJIT`
to ensure this status.

* stress/big-int-negate-jit.js:

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

3 months agoUnreviewed build fix after r260962.
cdumez@apple.com [Fri, 1 May 2020 22:00:00 +0000 (22:00 +0000)]
Unreviewed build fix after r260962.

* page/Page.cpp:
(WebCore::Page::setCORSDisablingPatterns):
* page/Page.h:
(WebCore::Page::setCORSDisablingPatterns): Deleted.

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

3 months ago[IPC hardening] createMessageDecoder() needs a validity check
ddkilzer@apple.com [Fri, 1 May 2020 21:59:07 +0000 (21:59 +0000)]
[IPC hardening] createMessageDecoder() needs a validity check
<https://webkit.org/b/211260>
<rdar://problem/61914087>

Reviewed by Darin Adler.

* Platform/IPC/cocoa/ConnectionCocoa.mm:
(IPC::createMessageDecoder):
- Add validity check and early return for
  `numDescriptors`.

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

3 months ago[WebGL2] Refactor texImage2D and texSubImage2D taking ImageBitmap, ImageData, Image...
commit-queue@webkit.org [Fri, 1 May 2020 21:52:48 +0000 (21:52 +0000)]
[WebGL2] Refactor texImage2D and texSubImage2D taking ImageBitmap, ImageData, Image, ArrayBufferView
https://bugs.webkit.org/show_bug.cgi?id=210766

Patch by Kenneth Russell <kbr@chromium.org> on 2020-05-01
Reviewed by Dean Jackson.

Source/WebCore:

Refactor the texture upload paths taking DOM sources and
ArrayBuffers so that texImage/texSubImage and 2D/3D textures are
handled with the same entry point. Hook up WebGL 2.0 pixel unpack
parameters for selecting sub-rectangles during texture uploads.
Refactor context initialization to support WebGL 2.0-specific code
paths.

Remove duplicate code validating the type of the ArrayBufferView
passed to readPixels that was added in the patch for Bug 209515,
and validation code subsumed by ANGLE.

With this patch, dozens more texture-related WebGL 2.0 conformance
tests are passing completely, including all of those under the
directories:

    webgl/2.0.0/conformance2/textures/
        canvas_sub_rectangle/
        image_data/

The svg_image/ tests in this directory demonstrate browser
inconsistencies in SVG handling, and are temporarily skipped.
These will be investigated in Bug 211220.

Other conformance tests progress or change results, which is
expected until WebGL2RenderingContext is fully implemented.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::create):
(WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
(WebCore::WebGL2RenderingContext::initializeNewContext):
(WebCore::WebGL2RenderingContext::resetUnpackParameters):
(WebCore::WebGL2RenderingContext::restoreUnpackParameters):
(WebCore::WebGL2RenderingContext::initializeShaderExtensions):
(WebCore::WebGL2RenderingContext::getTextureSourceSubRectangle):
(WebCore::WebGL2RenderingContext::pixelStorei):
(WebCore::WebGL2RenderingContext::texStorage2D):
(WebCore::WebGL2RenderingContext::texImage2D):
(WebCore::WebGL2RenderingContext::texImage3D):
(WebCore::WebGL2RenderingContext::texSubImage2D):
(WebCore::WebGL2RenderingContext::texSubImage3D):
(WebCore::WebGL2RenderingContext::initializeTransformFeedbackBufferCache): Deleted.
(WebCore::WebGL2RenderingContext::initializeSamplerCache): Deleted.
(WebCore::WebGL2RenderingContext::sliceTypedArrayBufferView): Deleted.
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
(WebCore::WebGLRenderingContext::WebGLRenderingContext):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::ScopedUnpackParametersResetRestore::ScopedUnpackParametersResetRestore):
(WebCore::ScopedUnpackParametersResetRestore::~ScopedUnpackParametersResetRestore):
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::initializeNewContext):
(WebCore::WebGLRenderingContextBase::resetUnpackParameters):
(WebCore::WebGLRenderingContextBase::restoreUnpackParameters):
(WebCore::WebGLRenderingContextBase::compressedTexImage2D):
(WebCore::WebGLRenderingContextBase::compressedTexSubImage2D):
(WebCore::WebGLRenderingContextBase::validateSettableTexInternalFormat):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::generateMipmap):
(WebCore::WebGLRenderingContextBase::getTexParameter):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::sentinelEmptyRect):
(WebCore::WebGLRenderingContextBase::safeGetImageSize):
(WebCore::WebGLRenderingContextBase::getImageDataSize):
(WebCore::WebGLRenderingContextBase::getTexImageSourceSize):
(WebCore::WebGLRenderingContextBase::texImageSourceHelper):
(WebCore::WebGLRenderingContextBase::texImageArrayBufferViewHelper):
(WebCore::WebGLRenderingContextBase::texImageImpl):
(WebCore::WebGLRenderingContextBase::texImage2DBase):
(WebCore::WebGLRenderingContextBase::texSubImage2DBase):
(WebCore::WebGLRenderingContextBase::getTexImageFunctionName):
(WebCore::WebGLRenderingContextBase::validateTexFunc):
(WebCore::WebGLRenderingContextBase::texImage2D):
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::validateArrayBufferType):
(WebCore::WebGLRenderingContextBase::validateTexFuncData):
(WebCore::WebGLRenderingContextBase::validateTexFuncParameters):
(WebCore::WebGLRenderingContextBase::addExtensionSupportedFormatsAndTypes):
(WebCore::WebGLRenderingContextBase::addExtensionSupportedFormatsAndTypesWebGL2):
(WebCore::WebGLRenderingContextBase::validateTexImageSourceFormatAndType):
(WebCore::WebGLRenderingContextBase::copyTexImage2D):
(WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
(WebCore::WebGLRenderingContextBase::texParameter):
(WebCore::WebGLRenderingContextBase::getUnpackPixelStoreParams const):
(WebCore::WebGLRenderingContextBase::validateTextureBinding):
(WebCore::WebGLRenderingContextBase::validateTexImageBinding):
(WebCore::WebGLRenderingContextBase::validateTexture2DBinding):
(WebCore::WebGLRenderingContextBase::validateSize):
(WebCore::WebGLRenderingContextBase::validateImageBitmap):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::texImageSource2D): Deleted.
(WebCore::WebGLRenderingContextBase::texImage2DImpl): Deleted.
(WebCore::WebGLRenderingContextBase::texSubImage2DImpl): Deleted.
* html/canvas/WebGLRenderingContextBase.h:
(WebCore::WebGLRenderingContextBase::getTextureSourceSize):
(WebCore::WebGLRenderingContextBase::validateTexImageSubRectangle):
* platform/graphics/IntRect.cpp:
(WebCore::IntRect::isValid const):
* platform/graphics/IntRect.h:

LayoutTests:

Rebaseline WebGL layout tests affected by this patch.

    webgl/2.0.0/conformance2/textures/
        canvas_sub_rectangle/
        image_data/

are now passing completely. Some of the individual tests in these
directories were skipped in earlier patches and will be re-enabled
in a subsequent patch.

Skip webgl/2.0.0/conformance2/textures/svg_image due to possible
bugs in the tests. These failures will be investigated in Bug
211220.

Fix bug in fast/canvas/webgl/gl-enum-tests.html where
INVALID_OPERATION rather than INVALID_ENUM is possible.

Other conformance tests progress or change results, which is
expected until WebGL2RenderingContext is fully implemented.

* TestExpectations:
* fast/canvas/webgl/gl-enum-tests-expected.txt:
* fast/canvas/webgl/gl-enum-tests.html:
* webgl/2.0.0/conformance2/misc/views-with-offsets-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r11f_g11f_b10f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r11f_g11f_b10f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb16f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb16f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb32f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb565-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb5_a1-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb9_e5-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb9_e5-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba16f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba16f-rgba-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba32f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba4-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-srgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r11f_g11f_b10f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r11f_g11f_b10f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb16f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb16f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb32f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb565-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb5_a1-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb9_e5-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgb9_e5-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba16f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba16f-rgba-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba32f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba4-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-srgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-3d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-2d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-r11f_g11f_b10f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-r11f_g11f_b10f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb16f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb16f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb32f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb565-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb5_a1-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb9_e5-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgb9_e5-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgba16f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgba16f-rgba-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgba32f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgba4-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgba8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-srgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_canvas/tex-3d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-2d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-r11f_g11f_b10f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-r11f_g11f_b10f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb16f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb16f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb32f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb565-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb5_a1-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb9_e5-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb9_e5-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba16f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba16f-rgba-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba32f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba4-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-srgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_data/tex-3d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/misc/copy-texture-image-webgl-specific-expected.txt:
* webgl/2.0.0/conformance2/textures/misc/gl-get-tex-parameter-expected.txt:
* webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source-expected.txt:
* webgl/2.0.0/conformance2/textures/misc/tex-image-with-different-data-source-expected.txt:
* webgl/2.0.0/conformance2/textures/misc/tex-mipmap-levels-expected.txt:
* webgl/2.0.0/conformance2/textures/misc/tex-new-formats-expected.txt:
* webgl/2.0.0/conformance2/textures/misc/tex-unpack-params-expected.txt:

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

3 months agoWeb Inspector: Browser: crash when handling `disable`
drousso@apple.com [Fri, 1 May 2020 21:09:52 +0000 (21:09 +0000)]
Web Inspector: Browser: crash when handling `disable`
https://bugs.webkit.org/show_bug.cgi?id=211251

Reviewed by Daniel Bates.

* UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp:
(WebKit::InspectorBrowserAgent::disable):
If the inspected page crashed, we won't have a `WebInspectorProxy` anymore.

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

3 months agoSource/WebCore:
shihchieh_lee@apple.com [Fri, 1 May 2020 20:53:59 +0000 (20:53 +0000)]
Source/WebCore:
Nullptr crash in CompositeEditCommand::cloneParagraphUnderNewElement when indent
and align a paragraph.
https://bugs.webkit.org/show_bug.cgi?id=211273
<rdar://problem/61885958>

Reviewed by Geoffrey Garen.

A load event can fire when we clone and append a paragraph. Check if the elements
are removed in the event and bail out.

Test: fast/editing/indent-then-justifyFull-crash.html

* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):

LayoutTests:
Nullptr crash in CompositeEditCommand::cloneParagraphUnderNewElement when indent
and align a paragraph.
https://bugs.webkit.org/show_bug.cgi?id=211273
<rdar://problem/61885958>

Reviewed by Geoffrey Garen.

Added a regression test for the crash.

* fast/editing/indent-then-justifyFull-crash-expected.txt: Added.
* fast/editing/indent-then-justifyFull-crash.html: Added.

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