Timeline



Apr 23, 2020:

11:57 PM Changeset in webkit [260623] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r257759): Network: waterfall popover is missing bars
https://bugs.webkit.org/show_bug.cgi?id=210947

Reviewed by Brian Burg.

WI.ResourceTimingBreakdownView is also used inside of a WI.Popover, meaning that the
waterfall graph won't be a child of the .network-table. Add a .network class to all
instances of .waterfall so that the selector can be more specific.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._populateWaterfallGraph):

  • UserInterface/Views/NetworkTableContentView.css:

(.waterfall.network .block): Added.
(body[dir=ltr] .waterfall.network .block): Added.
(body[dir=rtl] .waterfall.network .block): Added.
(.waterfall.network .block + .block): Added.
(.waterfall.network .block:matches(.mouse-tracking, .filler) + .block:not(.mouse-tracking, .filler), .waterfall.network .block:not(.request, .response) + :matches(.request, .response)): Added.
(.waterfall.network .block:last-child): Added.
(.waterfall.network .block.request,): Added.
(.waterfall.network .block.mouse-tracking): Added.
(.waterfall.network .block.filler): Added.
(.waterfall.network .block.redirect): Added.
(.waterfall.network .block.queue): Added.
(.waterfall.network .block.dns): Added.
(.waterfall.network .block.connect): Added.
(.waterfall.network .block.secure): Added.
(.waterfall.network .block.request): Added.
(.waterfall.network .block.response): Added.
(.network-table .waterfall .block): Deleted.
(body[dir=ltr] .network-table .waterfall .block): Deleted.
(body[dir=rtl] .network-table .waterfall .block): Deleted.
(.network-table .waterfall .block + .block): Deleted.
(.network-table .waterfall .block:matches(.mouse-tracking, .filler) + .block:not(.mouse-tracking, .filler), .network-table .waterfall .block:not(.request, .response) + :matches(.request, .response)): Deleted.
(.network-table .waterfall .block:last-child): Deleted.
(.network-table .waterfall .block.request,): Deleted.
(.network-table .waterfall .block.mouse-tracking): Deleted.
(.network-table .waterfall .block.filler): Deleted.
(.network-table .waterfall .block.redirect): Deleted.
(.network-table .waterfall .block.queue): Deleted.
(.network-table .waterfall .block.dns): Deleted.
(.network-table .waterfall .block.connect): Deleted.
(.network-table .waterfall .block.secure): Deleted.
(.network-table .waterfall .block.request): Deleted.
(.network-table .waterfall .block.response): Deleted.

  • UserInterface/Views/ResourceTimingBreakdownView.js:

(WI.ResourceTimingBreakdownView.prototype.initialLayout):

11:51 PM Changeset in webkit [260622] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Make CachedResourceLoader more conforming to Fetch specification
https://bugs.webkit.org/show_bug.cgi?id=210925

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-23
Reviewed by Alex Christensen.

Make CachedResourceLoader more conforming to Fetch specification
by fixing links, re-ordering steps to match main fetch [1] and do
early exit code paths earlier.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestImage): adjust to parameter change.
(WebCore::CachedResourceLoader::canRequest): replace CachedResourceRequest param with ResourceLoaderOptions.
(WebCore::CachedResourceLoader::prepareFetch): fix comment.
(WebCore::CachedResourceLoader::requestResource): re-order.

  • loader/cache/CachedResourceLoader.h:
10:43 PM Changeset in webkit [260621] by Alexey Shvayka
  • 6 edits
    2 deletes in trunk

Remove revoked Proxy checks from ProxyCreate
https://bugs.webkit.org/show_bug.cgi?id=210862

Reviewed by Ross Kirsling.

JSTests:

Removes expectations for 2 invalid ChakraCore tests.

  • ChakraCore.yaml: Mark 2 test cases as passing.
  • ChakraCore/test/es6/arraywithproxy.baseline: Removed.
  • ChakraCore/test/es6/proxytest9.baseline: Removed.
  • stress/proxy-revoke.js: Adjust test.
  • test262/expectations.yaml: Mark 12 test cases as passing.

Source/JavaScriptCore:

This change removes revoked Proxy checks from ProxyCreate [1], implementing
https://github.com/tc39/ecma262/pull/1814 and aligning JSC with SpiderMonkey.
Also cleans up ProxyObject creation by using isFunction() instead of
isCallable(), which are identical.

[1]: https://tc39.es/ecma262/#sec-proxycreate (steps 2, 4)

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::structureForTarget):
(JSC::ProxyObject::finishCreation):

10:14 PM Changeset in webkit [260620] by ysuzuki@apple.com
  • 5 edits in trunk/Tools

stress/ensure-crash.js shouldn't spew stuff onto my screen
https://bugs.webkit.org/show_bug.cgi?id=210931

Reviewed by Ross Kirsling.

Set noisyOutputHandler when crash! is specified. We also specify noisyOutputHandler for runComplexTest.

  • Scripts/run-jsc-stress-tests:
  • Scripts/webkitruby/jsc-stress-test-writer-default.rb:
  • Scripts/webkitruby/jsc-stress-test-writer-playstation.rb:
  • Scripts/webkitruby/jsc-stress-test-writer-ruby.rb:
9:52 PM Changeset in webkit [260619] by ysuzuki@apple.com
  • 2 edits in trunk

Make JSCOnly work on macOS
https://bugs.webkit.org/show_bug.cgi?id=210953

Reviewed by Ross Kirsling.

In JSCOnly port on macOS, we should disable ICU API renaming because OS shipped ICU does not have version suffix.

  • Source/cmake/OptionsJSCOnly.cmake:
9:46 PM Changeset in webkit [260618] by Lauro Moura
  • 5 edits in trunk/LayoutTests

Use shouldRejectWithErrorName after r260579.

The mentioned revision made shouldRejectWithErrorName (and
shouldReject) actually omit the error name when it was not requested.

So now to catch the desired error we must actually request it
instead of just relying on the expectation file messages.

Unreviewed test gardening.

  • crypto/subtle/ecdh-import-pkcs8-key-p256-validate-ecprivatekey-parameters-publickey.html:
  • crypto/subtle/ecdh-import-pkcs8-key-p384-validate-ecprivatekey-parameters-publickey.html:
  • crypto/subtle/ecdsa-import-pkcs8-key-p256-validate-ecprivatekey-parameters-publickey.html:
  • crypto/subtle/ecdsa-import-pkcs8-key-p384-validate-ecprivatekey-parameters-publickey.html:
8:31 PM Changeset in webkit [260617] by ysuzuki@apple.com
  • 2 edits in trunk/Tools

Disable useKernTCSM=false for JSC stress tests to make EWS faster
https://bugs.webkit.org/show_bug.cgi?id=210950

Reviewed by Mark Lam.

This patch removes "JSC_useKernTCSM=false" environment variable in JSC stress tests.
Alexey found that this causes EWS JSC stress tests slow down (from roughly 63 mins to 83 mins).
This slow down happens in Mac Pro (which is used in JSC EWS right now), and this slow down does
not happen in Mac mini (post-commit buildbot) and rather improves Mac Mini execution time by 15%,
but keeping EWS faster is more important than making post-commit bots faster.

  • Scripts/run-javascriptcore-tests:
6:14 PM Changeset in webkit [260616] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Move the storage of DisplayID from Chrome to Page
https://bugs.webkit.org/show_bug.cgi?id=210943

Reviewed by Tim Horton.

The less Chrome knows about Frames and Documents the better. At some point Page is going
to talk to ScrollingCoordinator in this callback too.

  • page/Chrome.cpp:

(WebCore::Chrome::displayID const):
(WebCore::Chrome::windowScreenDidChange):

  • page/Chrome.h:
  • page/Page.cpp:

(WebCore::Page::windowScreenDidChange):

  • page/Page.h:

(WebCore::Page::displayID const):

6:08 PM Changeset in webkit [260615] by Simon Fraser
  • 10 edits
    3 adds in trunk

EventHandler::selectCursor() has broken resize over coordinate conversion code
https://bugs.webkit.org/show_bug.cgi?id=210778

Reviewed by Zalan Bujtas.

Source/WebCore:

EventHandler::selectCursor() appeared to make a local hit-test point from window
to content coordinates, which made no sense, but this happened to work because
RenderLayer::hitTestLayer() set the HitTestResult localPoint to a global point
if you hit the resizer.

Clean up this mess by having all resizer-related geometry queries be in local coordinates.

As a bonus, actually set the cursor to a resize cursor when over the resizer.

Test: fast/events/cursors/mouse-cursor-over-resizer.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::handleMousePressEvent):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::offsetFromResizeCorner const):
(WebCore::RenderLayer::isPointInResizeControl const):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestResizerInFragments const):

  • rendering/RenderLayer.h:

LayoutTests:

  • TestExpectations:
  • fast/events/cursors/mouse-cursor-over-resizer-expected.txt: Added.
  • fast/events/cursors/mouse-cursor-over-resizer.html: Added.
  • fast/events/mouse-cursor-change.html:
  • platform/mac-wk2/TestExpectations:
  • resources/ui-helper.js:

(window.UIHelper.async moveMouseAndWaitForFrame):

6:08 PM Changeset in webkit [260614] by Simon Fraser
  • 8 edits in trunk/Source/WebKit

Bounce displayWasRefreshed() via EventDispatcher
https://bugs.webkit.org/show_bug.cgi?id=208778

Reviewed by Antti Koivisto.

Allow the WebContent process to be notified of display refresh off the main thread, so other
threads like the scrolling thread can respond without being blocked. Achieve this
by having EventDispatcher receive the IPC message, then bounce it to the main thread.

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::displayLinkCallback):

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::displayWasRefreshed):

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

(WebKit::WebProcess::displayWasRefreshed):

6:05 PM Changeset in webkit [260613] by Devin Rousso
  • 9 edits
    2 adds in trunk

Web Insspector: Storage: cannot select multiple local storage entries
https://bugs.webkit.org/show_bug.cgi?id=210876

Reviewed by Brian Burg.

Source/WebInspectorUI:

Support multiple selection using WI.DataGrid.

  • UserInterface/Views/DataGrid.js:

(WI.DataGrid):
(WI.DataGrid.prototype.get allowsMultipleSelection): Added.
(WI.DataGrid.prototype.set allowsMultipleSelection): Added.
(WI.DataGrid.prototype.get selectedNode):
(WI.DataGrid.prototype.set selectedNode):
(WI.DataGrid.prototype.get selectedDataGridNodes): Added.
(WI.DataGrid.prototype._keyDown):
(WI.DataGrid.prototype.selectNodes):
(WI.DataGrid.prototype._mouseDownInDataTable):
(WI.DataGrid.prototype._contextMenuInDataTable):
(WI.DataGrid.prototype.handleCopyEvent):
(WI.DataGrid.prototype._copyRow):
(WI.DataGrid.prototype._copyTable):
(WI.DataGrid.prototype._hasCopyableData):
(WI.DataGrid.prototype.selectDataGridNodeInternal): Added.
(WI.DataGrid.prototype.deselectDataGridNodeInternal): Added.
(WI.DataGrid.prototype._dispatchSelectedNodeChangedEvent): Added.
(WI.DataGrid.prototype.dataGridNodeForSelectionItem): Added.
(WI.DataGrid.prototype.selectionItemForDataGridNode): Added.
(WI.DataGrid.prototype.selectionControllerSelectionDidChange): Added.
(WI.DataGrid.prototype.selectionControllerFirstSelectableItem): Added.
(WI.DataGrid.prototype.selectionControllerLastSelectableItem): Added.
(WI.DataGrid.prototype.selectionControllerPreviousSelectableItem): Added.
(WI.DataGrid.prototype.selectionControllerNextSelectableItem): Added.

  • UserInterface/Views/DataGridNode.js:

(WI.DataGridNode.prototype.select):
(WI.DataGridNode.prototype.deselect):
Replace selectedNode with a WI.SelectionController that behaves like a WI.TreeOutline.
Use the WI.SelectionController.Operation to ensure that WI.PlaceholderDataGridNode are
not selected unless directly chosen (i.e. not during shift selection or ⌘A). Add logic such
that WI.PlaceholderDataGridNode are not copied. Prefer _rows instead of children as
the latter is not sorted/filtered.

  • UserInterface/Controllers/SelectionController.js:

(WI.SelectionController.createTreeComparator): Added.
(WI.SelectionController.createListComparator): Added.
Create static helper functions for common comparators.

(WI.SelectionController.prototype.deselectItem):
(WI.SelectionController.prototype.selectAll):
(WI.SelectionController.prototype.removeSelectedItems):
(WI.SelectionController.prototype.handleItemMouseDown):
(WI.SelectionController.prototype._selectItemsFromArrowKey):
(WI.SelectionController.prototype._firstSelectableItem):
(WI.SelectionController.prototype._lastSelectableItem):
(WI.SelectionController.prototype._previousSelectableItem):
(WI.SelectionController.prototype._nextSelectableItem):
(WI.SelectionController.prototype._addRange):
(WI.SelectionController.prototype._deleteRange):
Introduce a WI.SelectionController.Operation which is used to tell the _delegate about
why it's being asked for information.

  • UserInterface/Views/DOMStorageContentView.js:

(WI.DOMStorageContentView):
(WI.DOMStorageContentView.prototype._deleteCallback):
Support multiple selection, including deleting multiple rows at once.

  • UserInterface/Views/Table.js:

(WI.Table):

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline):
(WI.TreeOutline.prototype.selectionControllerNumberOfItems): Deleted.
Removed unused selectionControllerNumberOfItems.

  • UserInterface/Views/ProfileView.js:

(WI.ProfileView):
(WI.ProfileView.prototype._dataGridNodeSelected):
Maintain a _selectedDataGridNode so that oldSelectedNode doesn't have to be included
when dispatching WI.DataGrid.Event.SelectedNodeChanged.

LayoutTests:

  • inspector/tree-outline/selection-controller-tree-comparator.html: Added.
  • inspector/tree-outline/selection-controller-tree-comparator-expected.txt: Added.
5:52 PM Changeset in webkit [260612] by Russell Epstein
  • 2 edits in branches/safari-609.2.9.0-branch/Source/WebKit

Apply patch. rdar://problem/62272256

5:46 PM Changeset in webkit [260611] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebKit

Clean up QuickLookThumbnailLoader
<https://webkit.org/b/210814>

Reviewed by Darin Adler.

The following items are cleaned up:

  • Extract using PlatformImage into QuickLookThumbnailLoader.h, rename to CocoaImage and use to get rid of duplicate code.
  • Change id to instancetype for -init methods.
  • Add atomic keyword to @property definitions that were using it as the default. (Use of atomic properties is rare in WebKit, so being explicit avoids a scenario where it looks like nonatomic was left off by accident.)
  • Change @property definitions to readonly that are never written to outside of QuickLookThumbnailLoader.mm.
  • Delete unused @property definitions.
  • Change method declarations into read-only @property definitions.
  • Re-declare atomic read-only @property definitions in QuickLookThumbnailLoader.h as read-write definitions in QuickLookThumbnailLoader.mm if they are written to.
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::convertPlatformImageToBitmap):

  • UIProcess/QuickLookThumbnailLoader.h:
  • Rename qlThumbnailGenerationQueue @property to just queue.
  • Remove contentType @property. It is not used anywhere. This also fixes a theoretical leak found by the clang static analyzer.
  • Remove shouldWrite @property. It is only used within QuickLookThumbnailLoader.mm.
  • Change identifier and thumbnail to @property declarations.
  • UIProcess/QuickLookThumbnailLoader.mm:
  • Change WKQLThumbnailLoadOperation._identifier type from NSMutableString to NSString. There was no reason for it to be mutable.

(-[WKQLThumbnailQueueManager init]):
(-[WKQLThumbnailQueueManager dealloc]):

  • Release _queue to fix theoretical leak found by the clang static analyzer.

(-[WKQLThumbnailLoadOperation initWithAttachment:identifier:]):
(-[WKQLThumbnailLoadOperation initWithURL:identifier:]):
(-[WKQLThumbnailLoadOperation start]):

  • Rename req to request.
  • Change separate #if macros to #if/#else since only one version of this code can be used at a time.

(-[WKQLThumbnailLoadOperation thumbnail]):

  • Use CocoaImage to use one copy of the method.
5:12 PM Changeset in webkit [260610] by ysuzuki@apple.com
  • 4 edits in trunk/Tools

Support --report-execution-time to report execution time for each JSC stress test
https://bugs.webkit.org/show_bug.cgi?id=210938

Reviewed by Saam Barati.

We can run run-javascriptcore-tests with --report-execution-time option to report execution time for each JSC stress test,
to figure out which test is taking a long time. It appends execution-time to the verbose log. To see it stderr, --verbose is also
required.

$ run-javascriptcore-tests .... --verbose --report-execution-time

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests):

  • Scripts/run-jsc-stress-tests:
  • Scripts/webkitruby/jsc-stress-test-writer-default.rb:
5:07 PM Changeset in webkit [260609] by Wenson Hsieh
  • 5 edits in trunk

Text manipulation does not account for text in fully clipped containers
https://bugs.webkit.org/show_bug.cgi?id=210940
<rdar://problem/61137648>

Reviewed by Tim Horton.

Source/WebCore:

Allow text manipulation to find both text in visibility: hidden; containers, as well as text in fully clipped
overflow containers. In both cases, renderers exist for these nodes, but TextIterator ignores them by default.
If these containers become visible in the future, we don't want to skip out on performing text manipulation on
them.

An alternative would be to detect when any element that has not undergone text manipulation has become visible
(i.e. no longer clipped by an ancestor), but this is likely more complicated (and possibly less performant) than
just eagerly extracting text from hidden containers, once they gain renderers.

TextManipulation.StartTextManipulationIncludesFullyClippedText

  • editing/TextManipulationController.cpp:

(WebCore::ParagraphContentIterator::ParagraphContentIterator):
(WebCore::TextManipulationController::didCreateRendererForElement):
(WebCore::TextManipulationController::scheduleObservationUpdate):
(WebCore::TextManipulationController::scheduleObservartionUpdate): Deleted.

While I'm here, also rename scheduleObservartionUpdate to scheduleObservationUpdate.

  • editing/TextManipulationController.h:

Tools:

Add a new text manipulation API test.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

4:59 PM Changeset in webkit [260608] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Long pressing attachments in Notes does not activate Context Menu.
https://bugs.webkit.org/show_bug.cgi?id=210936
<rdar://problem/61171576>

Reviewed by Tim Horton.

Not having the ID available for notes makes their code to create the context
menu and its items fail. We should probably be passing this information on
for any element if we have it.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::selectionPositionInformation):

4:54 PM Changeset in webkit [260607] by Alan Coon
  • 1 copy in tags/Safari-610.1.11.1

Tag Safari-610.1.11.1.

4:45 PM Changeset in webkit [260606] by jer.noble@apple.com
  • 6 edits in trunk/Tools

REGRESSION (r260278): TestWebKitAPI.Fullscreen.Delegate is timing out on macOS bots
https://bugs.webkit.org/show_bug.cgi?id=210676
<rdar://problem/61953702>

Reviewed by Daniel Bates.

A number of API tests modify the WKWebViewConfiguration after calling -[WKWebView initWithFrame:configuration:], which
could be a source of failures or flakiness. Update these tests to set those configuration values before passing the
configuration to WKWebView.

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm:

(TestWebKitAPI::TEST):

4:43 PM Changeset in webkit [260605] by Alan Coon
  • 8 edits in branches/safari-610.1.11-branch/Source

Versioning.

4:04 PM Changeset in webkit [260604] by Alan Coon
  • 8 edits in branches/safari-609.2.9.0-branch/Source

Versioning.

3:52 PM Changeset in webkit [260603] by sbarati@apple.com
  • 5 edits
    1 add in trunk/Tools

DumpRenderTree should have the JIT entitlement on Mac
https://bugs.webkit.org/show_bug.cgi?id=210887
<rdar://problem/62228740>

Reviewed by Tim Horton.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
  • DumpRenderTree/mac/Configurations/DumpRenderTree.entitlements: Added.
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
3:21 PM Changeset in webkit [260602] by Alan Coon
  • 1 copy in tags/Safari-610.1.11

Tag Safari-610.1.11.

3:00 PM Changeset in webkit [260601] by Ross Kirsling
  • 2 edits in trunk/JSTests

Unreviewed test262 gardening following r260591.

  • test262/expectations.yaml:

Fix expectations to reflect ICU 64.

2:34 PM Changeset in webkit [260600] by Brent Fulgham
  • 5 edits in trunk/Source/WebKit

Allow "kern.osversion" sysctl read
https://bugs.webkit.org/show_bug.cgi?id=210929
<rdar://problem/62256013>

Reviewed by Per Arne Vollan.

Libdispatch checks "kern.osversion" as part of the code path we use for launching our XPC services.
We already allow it for some services (Network Process), and should be doing so for our other
helper processes.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
2:24 PM Changeset in webkit [260599] by Peng Liu
  • 2 edits
    1 delete in trunk/Source/WebKit

Remove the WebKit.plist for Feature Flags
https://bugs.webkit.org/show_bug.cgi?id=210534

Reviewed by Simon Fraser.

  • FeatureFlags/WebKit.plist: Removed.
  • WebKit.xcodeproj/project.pbxproj:
2:08 PM Changeset in webkit [260598] by commit-queue@webkit.org
  • 3 edits
    4 adds in trunk

Allow credentials for same-origin css mask images
https://bugs.webkit.org/show_bug.cgi?id=210895
<rdar://problem/60093888>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-23
Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/security/css-mask-image-credentials.html

r230006 went a step too far in restricting what is allowed with css mask images.
Basic authentication credentials should be allowed with such requests as they are in Chrome and Firefox.
This can be seen by doing run-webkit-httpd then opening http://127.0.0.1:8000/security/css-mask-image-credentials.html
In Chrome and Firefox you'll see it forward to a page that has a blue square.
In Safari before this change you'll see a yellow square and a basic authentication prompt.
In Safari after this change you'll see the same blue square you see in Chrome and Firefox.

  • style/StylePendingResources.cpp:

(WebCore::Style::loadPendingImage):

LayoutTests:

  • http/tests/security/css-mask-image-credentials-expected.html: Added.
  • http/tests/security/css-mask-image-credentials.html: Added.
  • http/tests/security/resources/css-mask-image-credentials-2.html: Added.
  • http/tests/security/resources/image-credential-check.php: Added.
1:59 PM Changeset in webkit [260597] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Jesus Calling app needs more WebSQL
https://bugs.webkit.org/show_bug.cgi?id=210889
<rdar://problem/61795507>

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

Source/WebCore:

Manually verified this fixes the issue in the radar.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowInstanceFunctionOpenDatabaseBody):

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

1:37 PM Changeset in webkit [260596] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Move applyUserAgentIfNeeded calls to a more central place
https://bugs.webkit.org/show_bug.cgi?id=209587

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

Make main resource loads stop calling applyUserAgentIfNeeded
and instead do it in the CachedResourceLoader.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::addExtraFieldsToRequest):
(WebCore::FrameLoader::loadResourceSynchronously):

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::createRequest):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
(WebCore::CachedResourceLoader::requestResource):

  • loader/cache/CachedResourceLoader.h:
  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::updateReferrerAndOriginHeaders):
(WebCore::CachedResourceRequest::updateUserAgentHeader):
(WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders): Deleted.

  • loader/cache/CachedResourceRequest.h:
1:28 PM Changeset in webkit [260595] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] Crash on RunningBoard process assertion invalidation
https://bugs.webkit.org/show_bug.cgi?id=210873
<rdar://problem/62194917>

Unreviewed, nil out the observer only after we've removed it to fix crashes on the bots.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::ProcessAssertion::~ProcessAssertion):

1:17 PM Changeset in webkit [260594] by Kate Cheney
  • 6 edits
    3 adds in trunk

All ITP database tables should reference the ObservedDomains table on DELETE CASCADE
https://bugs.webkit.org/show_bug.cgi?id=210874
<rdar://problem/62209438>

Reviewed by Brady Eidson.

Source/WebKit:

This makes it easier to delete an ITP entry from the entire database.
An entry shouldn't really exist outside of ObservedDomains anyways,
because that table holds all data about the domain, so this is a good
change to make regardless of the deletion use case.

(WebKit::needsNewCreateTableSchema):
Function to check for old CREATE TABLE queries.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::enableForeignKeys):
Must enable foreign keys to use DELETE CASCADE.

(WebKit::ResourceLoadStatisticsDatabaseStore::isMigrationNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToNewTablesIfNecessary):
Since this is a schema change that is executed when a table is created, we
need to check if the current schema is out of date. If so, we can
create new tables using the proper reference and migrate the data.

(WebKit::ResourceLoadStatisticsDatabaseStore::openAndDropOldDatabaseIfNecessary):
We only need to migrate the data if there were no issues with the
schema (otherwise the entire database will already have been created
with the correct CREATE TABLE queries).

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:

Tools:

Adds a new database file with pre-entered values and the old schema.
Adds an API test which checks if the data was migrated after
initializing the ITP database.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/incorrectCreateTableSchema.db: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/incorrectCreateTableSchema.db-shm: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/incorrectCreateTableSchema.db-wal: Added.
1:14 PM WebKitGTK/2.28.x edited by clopez@igalia.com
(diff)
1:09 PM WebKitGTK/2.28.x edited by clopez@igalia.com
(diff)
1:08 PM Changeset in webkit [260593] by don.olmstead@sony.com
  • 8 edits in trunk

[CMake] CMAKE_BINARY_DIR should always be a PRIVATE include directory
https://bugs.webkit.org/show_bug.cgi?id=196717

Reviewed by Michael Catanzaro.

Source/WebKit:

Include CMAKE_BINARY_DIR either directly or through WebKit_PRIVATE_INCLUDE_DIRECTORIES.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:

Source/WTF:

Remove public includes in WTF.

  • wtf/CMakeLists.txt:

Tools:

Include CMAKE_BINARY_DIR.

  • MiniBrowser/gtk/CMakeLists.txt:
  • TestWebKitAPI/glib/CMakeLists.txt:
1:06 PM Changeset in webkit [260592] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

Regression after r260359 ([GTK][WPE] lowWatermarkPages() in MemoryPressureMonitor.cpp only searches the "low" value inside the first "Node" section)
https://bugs.webkit.org/show_bug.cgi?id=210916

Reviewed by Carlos Alberto Lopez Perez.

Switch over to using a FileHandle type based on std::unique_ptr with a custom deleter and an
utility function for opening files. This makes easier to follow the logic inside the polling
loop for opening files and retrying when needed. This also fixes exiting the thread when the
systemMemoryUsedAsPercentage() function would return -1, to loop restart instead to keep
trying.

Thanks to Pablo Saavedra for his help in making this patch.

No new tests needed.

  • UIProcess/linux/MemoryPressureMonitor.cpp:

(WebKit::FileHandleDeleter::operator()): Add deleter to use with std::unique_ptr<>.
(WebKit::tryOpeningForUnbufferedReading): Add utility function to open a file handle if
needed and configuring its buffering upon opening.
(WebKit::MemoryPressureMonitor::start): Use FileHandle to ensure that handles are always
closed properly, and fix logic retry opening files on failure.

1:06 PM WebKitGTK/2.28.x edited by clopez@igalia.com
(diff)
12:57 PM Changeset in webkit [260591] by Alexey Shvayka
  • 61 edits
    2 copies
    3 moves
    107 adds
    3 deletes in trunk/JSTests

Update test262 to commit 31dabb5618e2
https://bugs.webkit.org/show_bug.cgi?id=210921

Reviewed by Ross Kirsling.

  • test262/config.yaml: Skip "Atomics.waitAsync" feature.
  • test262/expectations.yaml:
  • test262/harness/*: Updated.
  • test262/latest-changes-summary.txt:
  • test262/test/*: Updated.
  • test262/test262-Revision.txt:
12:49 PM Changeset in webkit [260590] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Elements: Styles: color functions are missing swatches
https://bugs.webkit.org/show_bug.cgi?id=210930

Reviewed by Brian Burg.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens):
(WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):
(WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
(WI.SpreadsheetStyleProperty.prototype._addBoxShadowTokens):
(WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
Only attempt to WI.Color.fromString when at a ")" that is not part of another function.
Drive-by: add variable tokens after variable text is resolved, as otherwise the variable is

replaced with a WI.InlineSwatch, which replaces the original text, preventing it
from being used for looking up the variable name.

12:49 PM Changeset in webkit [260589] by Devin Rousso
  • 17 edits
    2 deletes in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: SyntaxError: Invalid regular expression: missing )
https://bugs.webkit.org/show_bug.cgi?id=210890

Reviewed by Brian Burg.

  • UserInterface/Base/SearchUtilities.js:

(WI.SearchUtilities.prototype._regExpForString):
Catch any exceptions from new RegExp and return null in that case.

  • UserInterface/Views/FilterBar.js:

(WI.FilterBar):
(WI.FilterBar.prototype.get invalid): Added.
(WI.FilterBar.prototype.set invalid): Added.
(WI.FilterBar.prototype.clear):

  • UserInterface/Views/FilterBar.css:

(:matches(.filter-bar, .search-bar).invalid > input[type="search"]): Added.

  • UserInterface/Views/CookieStorageContentView.js:

(WI.CookieStorageContentView.prototype._updateFilteredCookies):

  • UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:

(WI.IndexedDatabaseObjectStoreContentView.prototype.dataGridMatchNodeAgainstCustomFilters):

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype.updateFilter):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._urlFilterDidChange):

  • UserInterface/Views/SearchSidebarPanel.js:

(WI.SearchSidebarPanel):
(WI.SearchSidebarPanel.prototype.performSearch):
(WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):

  • UserInterface/Views/SearchSidebarPanel.css:

(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]): Added.
Mark the WI.FilterBar as invalid if the filterRegExpForString is invalid.

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype._highlightSearchResults):

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.performSearch):

  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):

  • UserInterface/Views/ResourceSecurityContentView.js:

(WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.customPerformSearch):
(WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.performSearch):
Ensure that the WI.FindBanner shows 0 results if the searchRegExpForString is invalid.

  • UserInterface/Main.html:
  • UserInterface/Views/SearchBar.js: Removed.
  • UserInterface/Views/SearchBar.css: Removed.

Removed unused WI.SearchBar.

12:44 PM Changeset in webkit [260588] by commit-queue@webkit.org
  • 50 edits in trunk

[WebGL2] Update texture packing code for software uploads from DOM
https://bugs.webkit.org/show_bug.cgi?id=209515

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

Source/WebCore:

Update the bottommost DOM-to-texture packing code in
GraphicsContextGLOpenGL and FormatConverter to full WebGL 2.0
capability. Reorganize some code to make side-by-side comparisons
easier with other WebGL 2.0 implementations.

Added NEEDS_PORT comments to areas in the calling code which need
particular attention in subsequent patches. Roughly two more
patches will be needed on top of this one in order to fully pass
the associated conformance tests.

Fix a bug in the non-ANGLE ENABLE(WEBGL2) code path which
accidentally disabled WebGL entirely in this configuration.

Covered by the WebGL 2.0 conformance tests.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::texImageSource2D):
(WebCore::WebGLRenderingContextBase::texImage2DImpl):
(WebCore::WebGLRenderingContextBase::texImage2D):
(WebCore::WebGLRenderingContextBase::texSubImage2DImpl):
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::validateTexFuncData):
(WebCore::WebGLRenderingContextBase::getPackPixelStoreParams const):
(WebCore::WebGLRenderingContextBase::getUnpackPixelStoreParams const):

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/FormatConverter.cpp:

(WebCore::convertFloatToHalfFloat):
(WebCore::float>):
(WebCore::uint8_t>):
(WebCore::uint16_t>):
(WebCore::int8_t>):
(WebCore::int16_t>):
(WebCore::uint32_t>):
(WebCore::int32_t>):
(WebCore::FormatConverter::convert):

  • platform/graphics/FormatConverter.h:

(WebCore::FormatConverter::FormatConverter):

  • platform/graphics/GraphicsContextGL.h:

(WebCore::GraphicsContextGL::hasAlpha):
(WebCore::GraphicsContextGL::hasColor):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::texImage2DResourceSafe):
(WebCore::GraphicsContextGLOpenGL::computeFormatAndTypeParameters):
(WebCore::GraphicsContextGLOpenGL::computeImageSizeInBytes):
(WebCore::GraphicsContextGLOpenGL::PixelStoreParams::PixelStoreParams):
(WebCore::GraphicsContextGLOpenGL::packImageData):
(WebCore::GraphicsContextGLOpenGL::extractImageData):
(WebCore::GraphicsContextGLOpenGL::extractTextureData):
(WebCore::TexelBytesForFormat):
(WebCore::GraphicsContextGLOpenGL::packPixels):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

LayoutTests:

Rebaseline WebGL 2.0 conformance tests affected by this patch.
Most updates are progressions; failures are largely caused by
sub-rectangle uploads not yet being implemented. The tests will
pass fully after the higher-level code is feature complete.

Skip the canvas_sub_rectangle tests, as their results will
continue to be wrong until the higher-level code is finished.

  • TestExpectations:
  • 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_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/misc/tex-image-with-different-data-source-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-r16f-red-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-r16f-red-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-r32f-red-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-r8-red-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-r8ui-red_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-rg16f-rg-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-rg16f-rg-half_float-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-rg32f-rg-float-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-rg8-rg-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-rg8ui-rg_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
  • webgl/2.0.0/conformance2/textures/svg_image/tex-2d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
12:42 PM Changeset in webkit [260587] by Ryan Haddad
  • 4 edits
    1 delete in trunk/Tools

Unreviewed, reverting r260552.

Broke internal builds.

Reverted changeset:

"DumpRenderTree should have the JIT entitlement on Mac"
https://bugs.webkit.org/show_bug.cgi?id=210887
https://trac.webkit.org/changeset/260552

12:37 PM WebKitGTK/2.28.x edited by Adrian Perez de Castro
(diff)
12:29 PM Changeset in webkit [260586] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

Reduce iteration count and change how it invokes GC to reduce execution time of JSTests/stress/delete-property-dfg-inline.js
https://bugs.webkit.org/show_bug.cgi?id=210933

Reviewed by Keith Miller.

This test takes 7~ seconds in Release build with default run. And it takes 1 mins in several variants of JSC tests, which is too long.
By analyzing this, we found that this takes very long time,

  1. due to so frequent synchronous GC run
  2. due to large iteration count while function can get FTL with less counts

While ensuring all functions gets FTL, we reduce iteration count and GC invocations to reduce the execution time, the default run gets 200ms.

  • stress/delete-property-dfg-inline.js:

(noInline.blackbox.testSingleStructure):
(noInline.testSingleStructure.testInlineSingleStructure):
(noInline.testInlineSingleStructure.testExit):
(noInline.testExit.testSingleStructureMiss):
(noInline.testSingleStructureMiss.testSingleStructureMissStrict):
(noInline.testSingleStructureMissStrict.testSingleStructureMissNonConfigurable):
(noInline.testSingleStructureMissNonConfigurable.testSingleStructureEmpty):
(noInline.testSingleStructureEmpty.testPolymorphic):
(noInline.testPolymorphic.testPolyvariant):
(noInline.testPolyvariant.testConstantFolding):
(noInline.testConstantFolding.testObjectSinking):
(noInline.testObjectSinking.testProxy):
(noInline.testProxy.testTypedArray):
(noInline.testTypedArray.testMissMixed):
(noInline.testMissMixed.testMissNonMixed):
(noInline.testMissNonMixed.testByVal.noInline.test):
(noInline.testMissNonMixed.testByVal):
(noInline.assert.assert_throws): Deleted.

11:56 AM Changeset in webkit [260585] by keith_miller@apple.com
  • 8 edits
    6 adds in trunk

Fix OSR exiting/iterator object checks in for-of bytecodes
https://bugs.webkit.org/show_bug.cgi?id=210882

Reviewed by Saam Barati.

JSTests:

  • stress/for-of-iterator-next-osr-at-inlined-return-non-object.js: Added.

(vendNext):
(test):
(catch):

  • stress/for-of-iterator-next-osr-at-next-set-local.js: Added.

(vendNext):
(test):
(catch):

  • stress/for-of-iterator-open-osr-at-inlined-return-non-object.js: Added.

(vendIterator):
(test):
(catch):

  • stress/for-of-iterator-open-osr-at-iterator-set-local.js: Added.

(vendIterator):
(test):
(catch):

  • stress/for-of-iterator-open-return-non-object.js: Added.

(vendIterator):
(test):
(i.catch):

  • stress/test-for-of-cfg-simplication-exit-ok.js: Added.

(z.proto):

Source/JavaScriptCore:

This patch fixes some bugs in the DFGBytecodeParser where we would
set the exit origin for the SetLocal following the iterator_open/next
first call to the next bytecode. This meant that if out-of-line
Symbol.iterator or next functions returned an unexpected non-cell
we would OSR past the rest of the next bytecode rather than to the
first checkpoint.

This patch also makes sure we properly throw for non-objects returned
from either of the above functions in all tiers (and adds tests).

Finally, this patch makes a small optimization where we just ArithBitOr the
iterator's closed state (index == -1) and index is out of bounds. We can't
do a CompareBelow check because the index is effectively an int33_t.

  • bytecode/BytecodeIndex.h:

(JSC::BytecodeIndex::withCheckpoint const):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::nextOpcodeIndex const):
(JSC::DFG::ByteCodeParser::nextCheckpoint const):
(JSC::DFG::ByteCodeParser::progressToNextCheckpoint):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleCallVariant):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parseGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::handlePutByVal):

  • jit/JITCall.cpp:

(JSC::JIT::emitSlow_op_iterator_open):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::handleIteratorNextCheckpoint):

11:47 AM Changeset in webkit [260584] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Gardening, update expectations after r260561
https://bugs.webkit.org/show_bug.cgi?id=210928

Unreviewed gardening.

Mark several new mediastream tests as Crash.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
11:35 AM WebKitGTK/2.28.x edited by berto@igalia.com
(diff)
11:09 AM Changeset in webkit [260583] by Wenson Hsieh
  • 4 edits in trunk

Add a heuristic for text manipulation to treat some list items as paragraph boundaries
https://bugs.webkit.org/show_bug.cgi?id=210915
<rdar://problem/61907080>

Reviewed by Megan Gardner.

Source/WebCore:

Adds a mechanism to allow text manipulation to emit an item containing the current list of text manipulation
tokens early, in the case where the paragraph content iterator crosses the boundary of an element that encloses
a paragraph. Currently, the only enclosing paragraph element will be list items that have display: block;,
which we can take as a hint that the text in these list items should be vended as separate items, rather than as
tokens in a single item.

This may be extended in the future to other situations by adjusting logic in isEnclosingParagraphElement.

Test: TextManipulation.StartTextManipulationBreaksParagraphInBetweenListItems

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::observeParagraphs):

Tools:

Add a new API test to exercise text manipulation over several different cases of lists and list items.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

10:49 AM Changeset in webkit [260582] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC][TFC] Add support for basic baseline align inside a table row
https://bugs.webkit.org/show_bug.cgi?id=210918

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/table-basic-row-baseline-align.html

The minimum height of a row is defined as the height of an hypothetical linebox containing
the cells originating in the row. In this hypothetical linebox, we use baseline alignment to
align the cells vertically.
Use these vertically aligned cells to compute the final row height.

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::verticalMarginBorderAndPadding const):
(WebCore::Display::Box::setVerticalPadding):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutInFlowContent):
(WebCore::Layout::TableFormattingContext::layoutCell):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace):

  • layout/tableformatting/TableFormattingContext.h:

LayoutTests:

  • fast/layoutformattingcontext/table-basic-row-baseline-align-expected.txt: Added.
  • fast/layoutformattingcontext/table-basic-row-baseline-align.html: Added.
10:48 AM Changeset in webkit [260581] by Nikos Mouchtaris
  • 4 edits
    2 adds in trunk/Source/WebKit

Soft link QuickLookThumbnailing framework
https://bugs.webkit.org/show_bug.cgi?id=210894

Reviewed by Megan Gardner.

Soft link QuickLookThumbnailing framework to solve build error.

No new tests. Unnecessary.

  • Configurations/WebKit.xcconfig:
  • UIProcess/QuickLookThumbnailLoader.mm:

(-[WKQLThumbnailLoadOperation initWithURL:identifier:]):
(-[WKQLThumbnailLoadOperation start]):

  • UIProcess/QuickLookThumbnailingSPI.h: Added.
  • UIProcess/QuickLookThumbnailingSoftLink.h: Added.
  • UIProcess/QuickLookThumbnailingSoftLink.mm: Added.
  • WebKit.xcodeproj/project.pbxproj:
10:36 AM Changeset in webkit [260580] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Unreviewed, reverting r260562.
https://bugs.webkit.org/show_bug.cgi?id=210924

It caused 3 new failures and 1 timeout in GTK API tests
(Requested by clopez on #webkit).

Reverted changeset:

"[GTK][WPE] White-list more GStreamer environment variables in
webkitpy"
https://bugs.webkit.org/show_bug.cgi?id=210854
https://trac.webkit.org/changeset/260562

10:26 AM Changeset in webkit [260579] by Chris Dumez
  • 3 edits in trunk/LayoutTests

http/tests/paymentrequest/page-cache-completed-payment-response.https.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207385
<rdar://problem/59260167>

Unreviewed, follow-up to r258373 to silence the error name when using shouldReject() and
actually fix the flakiness.

  • http/tests/paymentrequest/page-cache-completed-payment-response.https-expected.txt:
  • resources/js-test.js:

(shouldRejectWithErrorName):

10:23 AM Changeset in webkit [260578] by sihui_liu@apple.com
  • 4 edits in trunk

TextManipulationController should set range of paragraph using token's positions
https://bugs.webkit.org/show_bug.cgi?id=210866
<rdar://problem/60646283>

Reviewed by Wenson Hsieh.

Source/WebCore:

Set the range of paragraph using positions of first token and last token in the paragraph because:

  1. Accurate range makes token matching in TextManipulationController::replace() easier, as TextIterator could

visit different positions with different ranges or different conditions. For example, in our previous
implementation, start of a paragraph can be set as the first visible position of document, while position of
first token is after that. Then in replace(), TextManipulationController may extract a word before the position
of first token and return error. See added test TextManipulation.CompleteTextManipulationCorrectParagraphRange.

  1. TextManipulationController can handle fewer content and this is less error-prone. For example, svg elements

before/after the paragraph text will not be identified as tokens [] in a paragraph now. See updated API tests
for example.

New test: TextManipulation.CompleteTextManipulationCorrectParagraphRange

  • editing/TextManipulationController.cpp:

(WebCore::ParagraphContentIterator::moveCurrentNodeForward): m_currentNodeForFindingInvisibleContent should not
be advanced if it is already at the end.
(WebCore::containsOnlyHTMLSpaces):
(WebCore::TextManipulationController::observeParagraphs):Set the paragraph start as the position of the first
token and end as the position of last token. If the paragraph is split with <br>, the end will be extended to
position of <br> so that we can add this node back later; otherwise, <br> can be removed after original
text of paragraph is removed in TextManipulationController::replace(). Also, stop identifying spaces as tokens
because non-text Node can emit spaces.
(WebCore::TextManipulationController::replace): Only identify tokens from content with meaningful text.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

10:23 AM Changeset in webkit [260577] by graouts@webkit.org
  • 7 edits
    1 add in trunk/LayoutTests

[ Mac iOS ] animations/animation-direction-normal.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=210156
<rdar://problem/61411725>

Reviewed by Simon Fraser.

The tests animations/animation-direction-normal.html and animations/animation-direction-reverse.html were both written
similarly to test that an element targeted by a CSS Animation would have styles animated while the animation is running
and that those styles would no longer be animated once the CSS Animation was paused using the "animation-play-state"
CSS property.

The way those assertions were made were to use setTimeout() to check the computed style at a given time and compared it
to an expected value give or take an error margin. This design was flaky, as a system under load could easily not run the
timeout until a much larger delta than the one expected would elapse.

We use a new JS helper to write these tests in a non-flaky manner. The technique used now is to record the computed style
while the animation is running without providing expected times and values, but rather specifying delays between which we
want to record the computed style. Once all values have been recorded, a method can be used to check those recorded values
by using the Web Animations API to pause and seek the animation at recorded times and query the computed style, which allows
us to test values without an error margin.

Finally, the new JS helper also allows to check the computed style using a timeout when the animation play state is not relevant,
allowing those tests to pause the animation using the "animation-play-state" property and check after incremental timeouts
that the computed style did not change.

We also made the tests use the WPT harness for assertions and reporting.

  • animations/animation-direction-normal-expected.txt:
  • animations/animation-direction-normal.html:
  • animations/animation-direction-reverse-expected.txt:
  • animations/animation-direction-reverse.html:
  • animations/resources/animation-test.js: Added.

(AnimationTest):
(AnimationTest.prototype.get animation):
(AnimationTest.prototype.get value):
(AnimationTest.prototype.async valueAfterWaitingFor):
(AnimationTest.prototype.async recordValueAfterRunningFor):
(AnimationTest.prototype.checkRecordedValues):
(AnimationTest.prototype._tickUntil):

  • platform/ios-wk1/TestExpectations:
  • platform/ios-wk2/TestExpectations:
10:15 AM Changeset in webkit [260576] by Chris Dumez
  • 5 edits in trunk

[ Mac wk2 ] imported/w3c/web-platform-tests/notifications/event-onclose.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209483
<rdar://problem/60830377>

Reviewed by Geoff Garen.

Source/WebCore:

Align garbage collection of Notification JS wrapper with the specification:

In particular, the following changes were made:

  1. Instead of using the legacy setPendingActivity() / unsetPendingActivity(), override ActiveDOMObject::virtualHasPendingActivity() to implement the behavior documented in the specification.
  2. Keep the wrapper alive as long as the notification is showing and as long as there are relevant event listeners, as per [1]. Previously, we failed to check for event listeners, which was suboptimal.
  3. Update the constructor to queue a task on the event loop in order to show the notification asynchronously, instead of relying on a SuspendableTimer for this purpose. Previously, the JS wrapper could get collected between construction and the notification getting shown, which was leading to the test flakiness.

No new tests, unskipped existing test.

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::Notification):
(WebCore::Notification::show):
(WebCore::Notification::finalize):
(WebCore::Notification::dispatchShowEvent):
(WebCore::Notification::dispatchClickEvent):
(WebCore::Notification::dispatchCloseEvent):
(WebCore::Notification::dispatchErrorEvent):
(WebCore::Notification::eventListenersDidChange):
(WebCore::Notification::virtualHasPendingActivity const):

  • Modules/notifications/Notification.h:

LayoutTests:

Unskip test now that it is no longer flaky.

  • platform/mac-wk2/TestExpectations:
10:07 AM Changeset in webkit [260575] by fpizlo@apple.com
  • 3 edits in trunk/Websites/webkit.org

Unreviewed, check in some more files for a blog post.

  • blog-files/speculation-in-jsc/clobberize-dependence-graph.graffle:
  • blog-files/speculation-in-jsc/clobberize-dependence-graph.svg:
9:27 AM Changeset in webkit [260574] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

[iOS] Port MediaPlayback process assertion to RunningBoard
https://bugs.webkit.org/show_bug.cgi?id=210212
<rdar://problem/61476951>

Reviewed by Geoff Garen.

Port MediaPlayback process assertion to RunningBoard instead of the legacy BKSProcessAssertion.
We can now #ifdef out the legacy BKSProcessAssertion on recent iOS builds.

  • UIProcess/ProcessAssertion.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::runningBoardNameForAssertionType):
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::~ProcessAssertion):

9:12 AM Changeset in webkit [260573] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Correction for patch 397001.
https://bugs.webkit.org/show_bug.cgi?id=210914

Reviewed by Chris Fleizach.

  • No need to check for isEmpty when retrieving the primary screen size,

as pointed out by Darin Adler in bug 210760, patch 397001.

  • Added some helpful AXLOGing.
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper primaryScreenHeight]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):

8:49 AM Changeset in webkit [260572] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[CMake] Add WebKit::WebCoreTestSupport target
https://bugs.webkit.org/show_bug.cgi?id=210867

Unreviewed build fix.

Make the dependencies explicit.

  • CMakeLists.txt:
8:31 AM Changeset in webkit [260571] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

In the scrolling tree, separate wheel event handling from layer updating
https://bugs.webkit.org/show_bug.cgi?id=210899

Reviewed by Antti Koivisto.

Working towards webkit.org/b/210884, it needs to be possible to have the scrolling
tree handle a wheelEvent and update its internal state about scroll positions, but not
immediately map those scroll positions onto CALayers.

To achieve this, have ScrollingTreeScrollingNode::currentScrollPositionChanged()
not call applyLayerPositions(), or notifyRelatedNodesAfterScrollPositionChange() which
just applies layer positions on related nodes.

Instead, at the end of wheel event handling, do a full scrolling tree traversal and update
all the layer positions there.

Delegated scrolling (iOS) still needs notifyRelatedNodesAfterScrollPositionChange() so it
can't be removed.

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::handleWheelEvent):
(WebCore::ScrollingTree::applyLayerPositions):
(WebCore::ScrollingTree::applyLayerPositionsInternal):

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::currentScrollPositionChanged):

8:24 AM Changeset in webkit [260570] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] Crash in cairo_surface_mark_dirty_rectangle() in accelerated compositing mode under X11
https://bugs.webkit.org/show_bug.cgi?id=210636

Patch by John Frankish <john.frankish@outlook.com> on 2020-04-23
Reviewed by Carlos Garcia Campos.

When cairo is configured to use xcb instead of xlib, it might use an image surface attached to the xlib one as
snapshot. In that case a flush is needed to detach that snapshot after we have drawn the surface in the
context.

  • UIProcess/gtk/AcceleratedBackingStoreX11.cpp:

(WebKit::AcceleratedBackingStoreX11::paint): Call cairo_surface_flush() after drawing.

8:18 AM Changeset in webkit [260569] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r260133.

We can use RunningBoard foreground assertion again now that
<rdar://problem/61830390> has been fixed

Reverted changeset:

"REGRESSION (r259610): WebGL does not work at all on iOS (was:
Google Maps tiles turn black after initial load)"
https://trac.webkit.org/changeset/260133

7:50 AM Changeset in webkit [260568] by cturner@igalia.com
  • 3 edits in trunk/Source/WebCore

[EME][CDMProxy] Sort key status array lexicographically by key IDs
https://bugs.webkit.org/show_bug.cgi?id=210659

Reviewed by Xabier Rodriguez-Calvar.

This is required by section 6.1 of
https://www.w3.org/TR/encrypted-media/.

Test: encrypted-media/clearkey-keystatuses.https.html

  • platform/encryptedmedia/CDMProxy.cpp:

(WebCore::KeyStore::add): We could use a set here and keep it
sorted by design, but this is more complexity than needed. The
store has for practical purposes an upper limit of 2
items. Sorting such a vector lowers to either a noop or a swap. So
the simple approach here wins over using some kind of self-sorting
set structure. I also considered only sorting on-demand, since it
only has to appear sorted from the perspective of JS, we could
sort the array in convertToJSKeyStatusVector. However, that is
semantically a const method, so sorting here felt too surprising.

  • platform/encryptedmedia/CDMProxy.h:

(WebCore::Key::operator<): Add a lexicographic comparator to
Key.

7:33 AM Changeset in webkit [260567] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK] excessive wakeups/polling due to gdk_frame_clock_begin_updating
https://bugs.webkit.org/show_bug.cgi?id=210561

Reviewed by Žan Doberšek.

The problem is that we are destroying the display refresh monitor from the frame clock update callback, and GTK
schedules another update from the callback itself in some cases, which ends up happening forever. We were
assuming that destroying the window of immediately destroy the frame clock as well, but the paint source idle
keeps a reference of the frame clock. At the end of the source idle callback the source is scheduled again,
taking a new reference. We need to call gdk_frame_clock_end_updating() to ensure the idle is not scheduled
again.

  • platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp:

(WebCore::DisplayRefreshMonitorGtk::~DisplayRefreshMonitorGtk): Disconnect the update signal and call
gdk_frame_clock_end_updating().
(WebCore::DisplayRefreshMonitorGtk::requestRefreshCallback): Toplevel window should always have a frame clock,
so remove the early return and add an assert instead.

4:36 AM Changeset in webkit [260566] by emilio
  • 2 edits in trunk/Tools

Unreviewed, add my bugzilla / slack nick to contributors.json

  • Scripts/webkitpy/common/config/contributors.json:
4:21 AM Changeset in webkit [260565] by Philippe Normand
  • 2 edits in trunk/Tools

[JHBuild] Add mock release/debug options to the update script

Rubber-stamped by Carlos Alberto Lopez Perez.

These options are now required after r260560. They're not used
though because JHBuild itself doesn't have the notion of build
configuration, unlike the Flatpak SDK.

  • Scripts/update-webkit-libs-jhbuild:
3:18 AM Changeset in webkit [260564] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

Skip stress/v8-bitint32-inc.js on mips
https://bugs.webkit.org/show_bug.cgi?id=210906

Unreviewed Gardening.

Patch by Paulo Matos <Paulo Matos> on 2020-04-23

  • stress/v8-bigint32-inc.js:
2:23 AM Changeset in webkit [260563] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[WPE] Gardening, update expectations after r259705
https://bugs.webkit.org/show_bug.cgi?id=210904

Unreviewed gardening.

  • platform/wpe/TestExpectations:
2:17 AM Changeset in webkit [260562] by Philippe Normand
  • 3 edits in trunk/Tools

[GTK][WPE] White-list more GStreamer environment variables in webkitpy
https://bugs.webkit.org/show_bug.cgi?id=210854

Reviewed by Adrian Perez de Castro.

Extra variables need to be white-listed when the webkitpy tooling
runs inside a gst-build environment, those variables are needed so
that uninstalled GStreamer plugins are correctly picked up.

Additionally we now correctly white-list the
WEBKIT_GST_USE_PLAYBIN3 env var. USE_PLAYBIN3 shouldn't be used
anymore.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort.setup_environ_for_server):

  • Scripts/webkitpy/port/wpe.py:

(WPEPort.setup_environ_for_server):

1:59 AM Changeset in webkit [260561] by youenn@apple.com
  • 15 edits
    4 moves
    9 adds in trunk

getDisplayMedia is not respecting aspect ratio with max constraints
https://bugs.webkit.org/show_bug.cgi?id=210858

Reviewed by Eric Carlson.

Source/WebCore:

Add computation of exact frame size to respect aspect ratio in DisplayCaptureSourceCocoa::updateFrameSize.
Refactor code to have one source class DisplayCaptureSourceCocoa and specific capturer for screen and window.
This simplifies code and allows reusing DisplayCaptureSourceCocoa with a mock capturer.
Update mock code to use DisplayCaptureSourceCocoa.

Tests: fast/mediastream/getDisplayMedia-max-constraints.html

fast/mediastream/getDisplayMedia-max-constraints1.html
fast/mediastream/getDisplayMedia-max-constraints2.html
fast/mediastream/getDisplayMedia-max-constraints3.html

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:

(WebCore::DisplayCaptureManagerCocoa::updateDisplayCaptureDevices):
(WebCore::DisplayCaptureManagerCocoa::updateWindowCaptureDevices):
(WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID):
(WebCore::DisplayCaptureManagerCocoa::windowCaptureDeviceWithPersistentID):

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::create):
(WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa):
(WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa):
(WebCore::DisplayCaptureSourceCocoa::capabilities):
(WebCore::DisplayCaptureSourceCocoa::settings):
(WebCore::DisplayCaptureSourceCocoa::startProducingData):
(WebCore::DisplayCaptureSourceCocoa::stopProducingData):
(WebCore::DisplayCaptureSourceCocoa::updateFrameSize):
(WebCore::DisplayCaptureSourceCocoa::emitFrame):
(WebCore::DisplayCaptureSourceCocoa::Capturer::setLogger):
(WebCore::DisplayCaptureSourceCocoa::Capturer::logChannel const):

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

(WebCore::MockRealtimeVideoSourceMac::createForMockDisplayCapturer):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
  • platform/mediastream/mac/ScreenDisplayCapturerMac.h: Added.
  • platform/mediastream/mac/ScreenDisplayCapturerMac.mm: Added.

(WebCore::ScreenDisplayCapturerMac::create):
(WebCore::ScreenDisplayCapturerMac::ScreenDisplayCapturerMac):
(WebCore::ScreenDisplayCapturerMac::~ScreenDisplayCapturerMac):
(WebCore::ScreenDisplayCapturerMac::createDisplayStream):
(WebCore::ScreenDisplayCapturerMac::start):
(WebCore::ScreenDisplayCapturerMac::stop):
(WebCore::ScreenDisplayCapturerMac::generateFrame):
(WebCore::ScreenDisplayCapturerMac::startDisplayStream):
(WebCore::ScreenDisplayCapturerMac::commitConfiguration):
(WebCore::ScreenDisplayCapturerMac::displayWasReconfigured):
(WebCore::ScreenDisplayCapturerMac::displayReconfigurationCallBack):
(WebCore::ScreenDisplayCapturerMac::newFrame):
(WebCore::ScreenDisplayCapturerMac::screenCaptureDeviceWithPersistentID):
(WebCore::ScreenDisplayCapturerMac::screenCaptureDevices):

  • platform/mediastream/mac/WindowDisplayCapturerMac.h: Added.
  • platform/mediastream/mac/WindowDisplayCapturerMac.mm: ddedAdded.

(WebCore::WindowDisplayCapturerMac::create):
(WebCore::WindowDisplayCapturerMac::WindowDisplayCapturerMac):
(WebCore::WindowDisplayCapturerMac::windowImage):
(WebCore::WindowDisplayCapturerMac::generateFrame):
(WebCore::WindowDisplayCapturerMac::windowCaptureDeviceWithPersistentID):
(WebCore::WindowDisplayCapturerMac::windowCaptureDevices):

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockDisplayCapturer::MockDisplayCapturer):
(WebCore::MockDisplayCapturer::start):
(WebCore::MockDisplayCapturer::generateFrame):

  • platform/mock/MockRealtimeVideoSource.h:

(isType):

LayoutTests:

  • fast/mediastream/getDisplayMedia-max-constraints-expected.txt: Added.
  • fast/mediastream/getDisplayMedia-max-constraints.html: Added.
  • fast/mediastream/getDisplayMedia-max-constraints1-expected.txt: Added.
  • fast/mediastream/getDisplayMedia-max-constraints1.html: Added.
  • fast/mediastream/getDisplayMedia-max-constraints2-expected.txt: Added.
  • fast/mediastream/getDisplayMedia-max-constraints2.html: Added.
  • fast/mediastream/getDisplayMedia-max-constraints3-expected.txt: Added.
  • fast/mediastream/getDisplayMedia-max-constraints3.html: Added.
  • fast/mediastream/resources/getDisplayMedia-utils.js: Added.

(async callGetDisplayMedia):
(async waitForHeight):
(async waitForWidth):

  • platform/ios/TestExpectations:

Skip new tests as getDisplayMedia is not supported on iOS.

1:47 AM Changeset in webkit [260560] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[Flatpak SDK] Install dependencies step needs configuration as argument
https://bugs.webkit.org/show_bug.cgi?id=210898

Reviewed by Philippe Normand.

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

(InstallGtkDependencies): Pass 'configuration' value (Release, Debug).
(InstallWpeDependencies): Pass 'configuration' value (Release, Debug).

1:37 AM EnvironmentVariables edited by Keith Rollin
(diff)
1:35 AM EnvironmentVariables edited by Keith Rollin
(diff)
12:11 AM Changeset in webkit [260559] by Diego Pino Garcia
  • 4 edits
    4 adds in trunk/LayoutTests

[GTK][WPE] Gardening, update baselines and test expectations
https://bugs.webkit.org/show_bug.cgi?id=210900

Results of tests are better than the general expected results,
so new GTK baselines are emitted or updated.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt: Updated.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/nosniff/parsing-nosniff.window-expected.txt: Added.
  • platform/wpe/TestExpectations: Remove failure passing since r259703.

Apr 22, 2020:

11:15 PM Changeset in webkit [260558] by Ryan Haddad
  • 4 edits
    2 deletes in trunk/Source/WebKit

Unreviewed, reverting r260553.

Broke iOS and Catalina builds.

Reverted changeset:

"Soft link QuickLookThumbnailing framework"
https://bugs.webkit.org/show_bug.cgi?id=210894
https://trac.webkit.org/changeset/260553

10:19 PM Changeset in webkit [260557] by Simon Fraser
  • 7 edits in trunk/Source/WebCore

Make it possible to eagerly apply scrolling tree state from the main thread
https://bugs.webkit.org/show_bug.cgi?id=210883

Reviewed by Tim Horton.

Work towards fixing webkit.org/b/210884: at the beginning of Page::updateRendering(),
we are going to need to pull the current state of the scrolling tree back to the
main thread, so that JS-exposed scroll offsets match scrolling tree state.

To this end, expose a scrolling tree traversal function from ScrollingTree, which
takes the lock and then calls a visitor function for each node. For scrolling nodes,
the visitor gets the scroll position and optional layout viewport origin. These
match the data passed back currently via AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll().

The new code is not called yet.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::synchronizeStateFromScrollingTree):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::synchronizeStateFromScrollingTree):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::traverseScrollingTree):
(WebCore::ScrollingTree::traverseScrollingTreeRecursive):

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::currentScrollPositionChanged): applyLayerPositions() calls these two
functions, so just call it instead.

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

Unreviewed, reverting r260535.
https://bugs.webkit.org/show_bug.cgi?id=210897

Causes crashes in WK1 (Requested by smfr on #webkit).

Reverted changeset:

"[ Mac wk2 ] imported/w3c/web-platform-tests/notifications
/event-onclose.html is flaky failing."
https://bugs.webkit.org/show_bug.cgi?id=209483
https://trac.webkit.org/changeset/260535

9:46 PM Changeset in webkit [260555] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations
https://bugs.webkit.org/show_bug.cgi?id=210896

Unreviewed gardening.

  • platform/gtk/TestExpectations:
9:34 PM Changeset in webkit [260554] by Darin Adler
  • 31 edits in trunk

[Cocoa] Build with UChar as char16_t even in builds that use Apple's internal SDK
https://bugs.webkit.org/show_bug.cgi?id=210845

Reviewed by Anders Carlsson.

.:

  • Source/cmake/OptionsCommon.cmake: Move ICU-configuring macros to Platform.h.
  • Source/cmake/OptionsJSCOnly.cmake: Ditto.
  • Source/cmake/OptionsMac.cmake: Ditto.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig: Move ICU-configuring macros to Platform.h.

Source/WebCore:

  • Configurations/WebCore.xcconfig: Move ICU-configuring macros to Platform.h.
  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::connect): Get rid of an obsolete cast to unsigned to work
around uint16_t not being treated as a number by makeString.

  • rendering/svg/SVGTextLayoutEngineBaseline.cpp:

(WebCore::SVGTextLayoutEngineBaseline::calculateGlyphOrientationAngle const):
Remove deprecated U_EA_COUNT.

Source/WebKit:

  • Configurations/BaseTarget.xcconfig: Move ICU-configuring macros to Platform.h.
  • Platform/unix/EnvironmentUtilities.h: Removed unneeded includes.

This sidesteps a problem with Apple's internal InstallAPI tool that happens
if StringView.h is included and Platform.h is not included first.

  • UIProcess/API/cpp/WKRetainPtr.h: Removed unneeded includes, and used

#pragma once.

  • UIProcess/Cocoa/PreferenceObserver.h: Moved most things out of the header,

since they don't need to be there.

  • UIProcess/Cocoa/PreferenceObserver.mm: Moved them here including using a

class extension for the data member of WKPreferenceObserver.

  • UIProcess/ios/fullscreen/FullscreenTouchSecheuristicParameters.h:

Removed unneeded WTF prefix.

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig: Move ICU-configuring macros to Platform.h.

Source/WTF:

  • Configurations/Base.xcconfig: Move ICU-configuring macros to Platform.h.
  • wtf/Platform.h: Set macros here. The file says not to put things like this in it,

but in practice this is the right place to put something that we need set consistently
for all the WebKit projects.

  • U_HIDE_DEPRECATED_API, to make sure we don't use it by accident.
  • U_SHOW_CPLUSPLUS_API=0, to make sure we don't use it by accident.
  • UCHAR_TYPE=char16_t when compiling C++, which is the default on most platforms, but not the default in Apple's internal SDK.
  • U_DISABLE_RENAMING when building on Apple platforms, important so we can link to an older version of ICU and still load with a newer version.
  • wtf/URL.cpp:

(WTF::URL::hostAndPort const): Get rid of an obsolete cast to unsigned to work
around uint16_t not being treated as a number by makeString.

  • wtf/URLHelpers.cpp: Rework to not use deprecated USCRIPT_CODE_LIMIT.

(WTF::URLHelpers::whiteListIDNScript): Added overloads.
(WTF::URLHelpers::initializeDefaultIDNScriptWhiteList): Use an array of
UScriptCode instead of an array of strings.
(WTF::URLHelpers::allCharactersInIDNScriptWhiteList): Updated for the above.

  • wtf/cocoa/NSURLExtras.mm:

(WTF::decodePercentEscapes): Use createCFString instead of converting to NString
and then typecasting.
(WTF::URLByTruncatingOneCharacterBeforeComponent): Updated to use a constexpr
instead of a macro.
(WTF::dataForURLComponentType): Ditto.
(WTF::URLByRemovingComponentAndSubsequentCharacter): Ditto.
(WTF::originalURLData): Ditto.

Tools:

  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:

(TestWebKitAPI::TEST): Get rid of an obsolete cast to unsigned to work
around uint16_t not being treated as a number by makeString.

  • TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:

(TestWebKitAPI::TEST): Ditto.

  • TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:

(TestWebKitAPI::TEST): Ditto.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST): Ditto.

  • TestWebKitAPI/Tests/WebKit/EnvironmentUtilitiesTest.cpp:

Add an include needed since EvironmentUtilities.h now includes less.

9:05 PM Changeset in webkit [260553] by Nikos Mouchtaris
  • 4 edits
    2 adds in trunk/Source/WebKit

Soft link QuickLookThumbnailing framework
https://bugs.webkit.org/show_bug.cgi?id=210894

Reviewed by Tim Horton.

Soft link QuickLookThumbnailing framework to solve build error.

No new tests. Unnecessary.

  • Configurations/WebKit.xcconfig:
  • UIProcess/QuickLookThumbnailLoader.mm:

(-[WKQLThumbnailLoadOperation initWithURL:identifier:]):
(-[WKQLThumbnailLoadOperation start]):

  • UIProcess/QuickLookThumbnailingSPI.h: Added.
  • UIProcess/QuickLookThumbnailingSoftLink.h: Added.
  • UIProcess/QuickLookThumbnailingSoftLink.mm: Added.
  • WebKit.xcodeproj/project.pbxproj:
8:17 PM Changeset in webkit [260552] by sbarati@apple.com
  • 4 edits
    1 add in trunk/Tools

DumpRenderTree should have the JIT entitlement on Mac
https://bugs.webkit.org/show_bug.cgi?id=210887

Reviewed by Tim Horton.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/mac/Configurations/BaseTarget.xcconfig:
  • DumpRenderTree/mac/Configurations/DumpRenderTree.entitlements: Added.
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
8:11 PM Changeset in webkit [260551] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] branchIfBigInt32 can use BigInt32Mask and remove branchIfNumber filter
https://bugs.webkit.org/show_bug.cgi?id=210870

Reviewed by Saam Barati.

JSTests:

  • stress/anybigintuse-should-filter-number-correctly.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

By using BigInt32Mask, we can detect BigInt32 without filtering Numbers. In this patch,

  1. Remove branchIfBigInt32KnownNotNumber and branchIfNotBigInt32KnownNotNumber. And always use branchBigInt32 and branchNotBigInt32 instead.
  2. Remove branchIfNumber type filtering in DFG.
  3. Use BigInt32Mask based scheme in FTL.
  4. Add and64(TrustedImm64, RegisterID) implementations in MacroAssembler.
  5. Add TagRegistersMode version in branchIfBigInt. We use numberTagRegister to produce really efficient code[1] by avoiding large constant materialization.

[1]: From

mov %rax, %rdx
mov $0xfffe000000000012, %r11
and %r11, %rdx
cmp $0x12, %rdx

To

lea 0x12(%r14), %rdx
and %rax, %rdx
cmp $0x12, %rdx

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::and64):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::and64):

  • bytecode/ArithProfile.cpp:

(JSC::ArithProfile<BitfieldType>::emitObserveResult):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateBigInt32):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileToNumeric):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
(JSC::FTL::DFG::LowerDFGToB3::compileIsBigInt):
(JSC::FTL::DFG::LowerDFGToB3::boolify):
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf):
(JSC::FTL::DFG::LowerDFGToB3::lowBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::isBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::isNotBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::isNotAnyBigInt):
(JSC::FTL::DFG::LowerDFGToB3::speculateBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::speculateAnyBigInt):
(JSC::FTL::DFG::LowerDFGToB3::isBigInt32KnownNotCell): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::isBigInt32KnownNotNumber): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::isNotBigInt32KnownNotNumber): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::isNotAnyBigIntKnownNotNumber): Deleted.

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitConvertValueToBoolean):
(JSC::AssemblyHelpers::branchIfValue):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::branchIfBigInt32):
(JSC::AssemblyHelpers::branchIfNotBigInt32):
(JSC::AssemblyHelpers::emitTypeOf):
(JSC::AssemblyHelpers::branchIfBigInt32KnownNotNumber): Deleted.
(JSC::AssemblyHelpers::branchIfNotBigInt32KnownNotNumber): Deleted.

7:18 PM Changeset in webkit [260550] by sbarati@apple.com
  • 4 edits
    1 add in trunk

BigInt32 parsing should be precise
https://bugs.webkit.org/show_bug.cgi?id=210869

Reviewed by Robin Morisset.

JSTests:

  • stress/big-int-32-parsing-should-be-precise.js: Added.

Source/JavaScriptCore:

Our algorithm before was conservative, and might produce a heap big int even
if the value could be an int32. This patch makes the algorithm precise on
64-bit, always producing a bigint32 if the number is indeed an int32.

  • jsc.cpp:

(functionUseBigInt32):
(functionIsBigInt32):
(functionIsHeapBigInt):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::parseInt):

7:14 PM Changeset in webkit [260549] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Edge use kind asserts are wrong for BigInt32 on ValueBitLShift
https://bugs.webkit.org/show_bug.cgi?id=210872

Reviewed by Yusuke Suzuki, Mark Lam, and Robin Morisset.

This is already covered by the v8 tests Yusuke checked in.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitUntypedOrAnyBigIntBitOp):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileValueBitLShift):
(JSC::FTL::DFG::LowerDFGToB3::emitBinaryBitOpSnippet):

6:22 PM Changeset in webkit [260548] by Andres Gonzalez
  • 4 edits in trunk/Source/WebCore

Add logging to core accessibility.
https://bugs.webkit.org/show_bug.cgi?id=210564
<rdar://problem/61863477>

Reviewed by Simon Fraser and Chris Fleizach.

  • Use LOG and LOG_WITH_STREAM macros instead of WTF::Logger directly.
  • Added logging of AXCoreObjects.
  • accessibility/AXLogger.cpp:

(WebCore::AXLogger::AXLogger):
(WebCore::AXLogger::~AXLogger):
(WebCore::AXLogger::log):
(WebCore::operator<<):

  • accessibility/AXLogger.h:
  • accessibility/AccessibilityObjectInterface.h:
5:42 PM Changeset in webkit [260547] by dbates@webkit.org
  • 7 edits in trunk/Source

Support toggling debug overlay for touch action region and editable element region independent from non-fast scrollable region
https://bugs.webkit.org/show_bug.cgi?id=210774

Reviewed by Dean Jackson.

Source/WebCore:

Break out the touch action region and editable element region debug overlays into their own
flags that can be passed to Settings::setVisibleDebugOverlayRegions() to toggle these overlays,
respectively. Currently both of these overlays piggyback on whether the engine will paint the
non-fast scrollable region.

  • page/SettingsBase.h: Add two more enumerators.
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::invalidateEventRegion const): Update the code to be more precise now that
we can target the update paint overlay hack to when we are painting touch-action or editable
element regions.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintDebugOverlays): Condition the painting of touch action region
on one enumerator and the painting of editable element region on another.
(WebCore::RenderLayerBacking::paintContents): Update the code to be more precise.

Source/WebKit:

Expose two new enumerators to toggle touch action region and editable element region
overlay painting.

  • UIProcess/API/C/WKPreferencesRef.h:
  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
5:38 PM Changeset in webkit [260546] by Chris Dumez
  • 6 edits in trunk

[iOS] Expose -_webView:willGoToBackForwardListItem:inPageCache:
https://bugs.webkit.org/show_bug.cgi?id=210878
<rdar://problem/62202276>

Reviewed by Alex Christensen.

Source/WebKit:

Expose -_webView:willGoToBackForwardListItem:inPageCache: on iOS.

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):

Tools:

Enable corresponding API test on iOS.

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
5:27 PM Changeset in webkit [260545] by Darin Adler
  • 2 edits in trunk/Source/WebKitLegacy/mac

[Cocoa] REGRESSION (r260485): Crash in Legacy WebKit createMenu item function (reproducible under Asan)
https://bugs.webkit.org/show_bug.cgi?id=210888

Reviewed by Alex Christensen.

  • WebView/WebHTMLView.mm:

(createMenuItem): Speculative fix: Go back to using a local variable. Apparently
the Objective-C for loop doesn't extend the lifetime of its argument the way the
C++ range-based for loop does, so the local variable is needed.

5:04 PM Changeset in webkit [260544] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] Crash on RunningBoard process assertion invalidation
https://bugs.webkit.org/show_bug.cgi?id=210873
<rdar://problem/62194917>

Reviewed by Darin Adler.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKRBSAssertionDelegate assertion:didInvalidateWithError:]):
Capture a weak pointer to self and make sure we only access the invalidation handler on
the main thread if |self| is still alive.

(WebKit::ProcessAssertion::~ProcessAssertion):
Null out the WKRBSAssertionDelegate's observer in the ProcessAssertion destructor, to
make sure processAssertionWasInvalidated() cannot get called after the ProcessAssertion
has been destroyed.

4:49 PM Changeset in webkit [260543] by Alan Coon
  • 1 copy in tags/Safari-609.2.7.2

Tag Safari-609.2.7.2.

4:48 PM Changeset in webkit [260542] by Alan Coon
  • 7 edits in branches/safari-609.2.7-branch

Apply patch. rdar://problem/62083319

4:45 PM Changeset in webkit [260541] by dbates@webkit.org
  • 2 edits in trunk/Tools

Add a test for -focusTextInputContext on a field in detached frame
https://bugs.webkit.org/show_bug.cgi?id=210704

Reviewed by Wenson Hsieh.

Calling -focusTextInputContext on a field in a detached frame should not
cause a focus change. Add a test to ensure this behavior doesn't regress.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(TEST):

4:45 PM Changeset in webkit [260540] by Alan Coon
  • 8 edits in branches/safari-609.2.7-branch/Source

Versioning.

4:41 PM Changeset in webkit [260539] by don.olmstead@sony.com
  • 8 edits in trunk

[CMake] Use WEBKIT_EXECUTABLE in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=210132

Reviewed by Adrian Perez de Castro.

.:

Add a WebKitTestRunner derived sources directory.

  • Source/cmake/WebKitFS.cmake:

Tools:

Modify CMake code to use WEBKIT_EXECUTABLE when creating WebKitTestRunner.

  • WebKitTestRunner/CMakeLists.txt:
  • WebKitTestRunner/PlatformFTW.cmake:
  • WebKitTestRunner/PlatformGTK.cmake:
  • WebKitTestRunner/PlatformWPE.cmake:
  • WebKitTestRunner/PlatformWin.cmake:
4:09 PM Changeset in webkit [260538] by Alan Coon
  • 1 copy in tags/Safari-609.2.9.1.2

Tag Safari-609.2.9.1.2.

4:09 PM Changeset in webkit [260537] by Alan Coon
  • 8 edits in branches/safari-609.2.9.1-branch/Source

Versioning.

3:55 PM Changeset in webkit [260536] by Alan Coon
  • 1 copy in tags/Safari-609.2.9.1.1

Tag Safari-609.2.9.1.1.

3:45 PM Changeset in webkit [260535] by Chris Dumez
  • 5 edits in trunk

[ Mac wk2 ] imported/w3c/web-platform-tests/notifications/event-onclose.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209483
<rdar://problem/60830377>

Reviewed by Geoffrey Garen.

Source/WebCore:

Align garbage collection of Notification JS wrapper with the specification:

In particular, the following changes were made:

  1. Instead of using the legacy setPendingActivity() / unsetPendingActivity(), override ActiveDOMObject::virtualHasPendingActivity() to implement the behavior documented in the specification.
  2. Keep the wrapper alive as long as the notification is showing and as long as there are relevant event listeners, as per [1]. Previously, we failed to check for event listeners, which was suboptimal.
  3. Update the constructor to queue a task on the event loop in order to show the notification asynchronously, instead of relying on a SuspendableTimer for this purpose. Previously, the JS wrapper could get collected between construction and the notification getting shown, which was leading to the test flakiness.

No new tests, unskipped existing test.

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::Notification):
(WebCore::Notification::show):
(WebCore::Notification::finalize):
(WebCore::Notification::dispatchShowEvent):
(WebCore::Notification::dispatchClickEvent):
(WebCore::Notification::dispatchCloseEvent):
(WebCore::Notification::dispatchErrorEvent):
(WebCore::Notification::eventListenersDidChange):
(WebCore::Notification::virtualHasPendingActivity const):

  • Modules/notifications/Notification.h:

LayoutTests:

Unskip test now that it is no longer flaky.

  • platform/mac-wk2/TestExpectations:
3:16 PM Changeset in webkit [260534] by don.olmstead@sony.com
  • 6 edits in trunk

[CMake] Add WebKit::WebCoreTestSupport target
https://bugs.webkit.org/show_bug.cgi?id=210867

Reviewed by Michael Catanzaro.

Source/WebCore:

Add the WebKit::WebCoreTestSupport target. Modify WebCoreTestSupport to only
have a dependency on WebCore if WebCore is built as a shared library.

  • CMakeLists.txt:

Tools:

Use the WebKit::WebCoreTestSupport target in DumpRenderTree. Fix an
include for WPE in WebKitTestRunner.

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
  • WebKitTestRunner/PlatformWPE.cmake:
2:56 PM Changeset in webkit [260533] by mmaxfield@apple.com
  • 7 edits in trunk/LayoutTests

Update dom/events/Event-dispatch-redispatch.html from upstream WPT
https://bugs.webkit.org/show_bug.cgi?id=210842
<rdar://problem/61948094>

Reviewed by Jon Lee.

Pull in https://github.com/web-platform-tests/wpt/commit/e30e282ed7b1fb77f6d953fb05ef74a34985f472
to our local repo.

LayoutTests/imported/w3c:

  • web-platform-tests/dom/events/Event-dispatch-redispatch-expected.txt:
  • web-platform-tests/dom/events/Event-dispatch-redispatch.html:

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch-expected.txt:
2:31 PM Changeset in webkit [260532] by Alan Coon
  • 1 copy in tags/Safari-609.2.9.0.1

Tag Safari-609.2.9.0.1.

1:47 PM Changeset in webkit [260531] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, skip imported/w3c/web-platform-tests/html/cross-origin-opener-policy since we do not support this feature.

It is not worth spending time investigating failures / flakiness in the folder until we actually
implement this feature.

1:07 PM Changeset in webkit [260530] by sihui_liu@apple.com
  • 2 edits in trunk/Tools

TextManipulation.CompleteTextManipulationAvoidCrashingWhenContentIsRemoved does not wait for result
https://bugs.webkit.org/show_bug.cgi?id=210871

Reviewed by Alex Christensen.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

12:38 PM Changeset in webkit [260529] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebCore

fast/events/event-handler-detached-document-dispatchEvent.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=210859
<rdar://problem/62072269>

Reviewed by Jer Noble.

A media session may not have a Page when it is created, so register with the MediaUsageManager
in inActiveDocumentChanged if necessary.

No new tests, fixes an existing test.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::MediaElementSession):
(WebCore::MediaElementSession::~MediaElementSession):
(WebCore::MediaElementSession::addedMediaUsageManagerSessionIfNecessary):
(WebCore::MediaElementSession::inActiveDocumentChanged):
(WebCore::MediaElementSession::updateMediaUsageIfChanged):

  • html/MediaElementSession.h:
12:24 PM Changeset in webkit [260528] by Antti Koivisto
  • 3 edits
    2 adds in trunk

REGRESSION (r249160): Deleting newline after pasting text ending in a newline results in a discontinuity
https://bugs.webkit.org/show_bug.cgi?id=210677
<rdar://problem/61954169>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/text/delete-line-break-in-pre.html

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::dirtyRange):

r249160 changed InlineTextBox end offset to be consistently first-past-end.
The code here that updates lineBreakPos needs to take this into account too.

LayoutTests:

  • fast/text/delete-line-break-in-pre-expected.html: Added.
  • fast/text/delete-line-break-in-pre.html: Added.
12:14 PM Changeset in webkit [260527] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

IPC::decodeSharedBuffer() should check the return value of SharedMemory::map()
<https://webkit.org/b/210844>
<rdar://problem/60773120>

Reviewed by Geoffrey Garen.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::decodeSharedBuffer):

  • Add nullptr check and early return.
11:59 AM Changeset in webkit [260526] by Chris Dumez
  • 1 edit
    3 adds in trunk/LayoutTests

Add layout test to validate the User-Agent HTTP header of XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=210863

Reviewed by Youenn Fablet.

  • http/tests/xmlhttprequest/xhr-user-agent-expected.txt: Added.
  • http/tests/xmlhttprequest/xhr-user-agent.html: Added.
11:47 AM Changeset in webkit [260525] by graouts@webkit.org
  • 12 edits in trunk

[Web Animations] Coordinate "update animations and send events" procedure across multiple timelines
https://bugs.webkit.org/show_bug.cgi?id=202109
<rdar://problem/59470821>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark a new test as PASS which shows that we correctly perform a single microstask checkpoint when updating multiple timelines.

  • web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-expected.txt:

Source/WebCore:

So far, although we did manage multiple animation timelines per document, we mostly operated
under the assumption that there really was a single timeline. In this patch we make the
"update animations and send events" procedure, which is central to the lifecycle of animations,
work with multiple timelines such that a single microtask checkpoint is performed even with multiple
timelines, whereas we would perform one per timeline before. To do this, we move much of the logic
DocumentTimeline::updateAnimationsAndSendEvents() to DocumentTimelinesController where each step is
run across each timeline, rather than running all steps for each timeline one after the other,
respecting the single microtask checkpoint in the middle of the process.

To minimize code churn at this stage, we still keep a fair bit of logic in DocumentTimeline and,
while we remove updateAnimationsAndSendEvents(), internalUpdateAnimationsAndSendEvents() and
updateCurrentTime(), we expose three methods that allow to run the pre-flight sequence in
documentWillUpdateAnimationsAndSendEvents(), collect pending events in
prepareForPendingAnimationEventsDispatch() and run the post-flight sequence
in documentDidUpdateAnimationsAndSendEvents().

None of the logic changes, this is just moving code around. In the future, more patches will move
code from DocumentTimeline up to DocumentTimelinesController such that events are enqueued there,
and animation scheduling as well. But this already lets us pass a new test that used to flakily
reject promises in the WPT test web-animations/timing-model/timelines/update-and-send-events.html.

  • animation/AnimationTimeline.h:

(WebCore::AnimationTimeline::relevantAnimations const):
(WebCore::AnimationTimeline::allAnimations const):

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::documentWillUpdateAnimationsAndSendEvents):
(WebCore::DocumentTimeline::documentDidUpdateAnimationsAndSendEvents):
(WebCore::DocumentTimeline::prepareForPendingAnimationEventsDispatch):
(WebCore::DocumentTimeline::updateCurrentTime): Deleted.
(WebCore::DocumentTimeline::updateAnimationsAndSendEvents): Deleted.
(WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents): Deleted.

  • animation/DocumentTimeline.h:
  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::DocumentTimelinesController):
(WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents):

  • animation/DocumentTimelinesController.h:
  • animation/WebAnimationTypes.h:
  • dom/Document.cpp:

(WebCore::Document::ensureTimelinesController):

LayoutTests:

Remove the flaky expectation for the improved test.

11:38 AM Changeset in webkit [260524] by eric.carlson@apple.com
  • 6 edits in trunk/Source/WebCore

[iOS] Add a quirk to keep gizmodo videos visible when playing in fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=210857
<rdar://problem/58875327>

Reviewed by Jer Noble.

  • page/Quirks.cpp:

(WebCore::Quirks::needsFullscreenDisplayNoneQuirk const):

  • page/Quirks.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Drive-by fix: always
set the layer name to make debugging in release builds easier.

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

(WebCore::VideoLayerManagerObjC::setVideoLayer): Ditto.

  • style/StyleAdjuster.cpp:

(WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const): Change display:none into
display:block on div with class "instream-native-video--mobile" when child video
element with id "vjs_video_3_html5_api" is in fullscreen.

11:33 AM Changeset in webkit [260523] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Storage: unable to filter cookies
https://bugs.webkit.org/show_bug.cgi?id=210837

Reviewed by Brian Burg.

  • UserInterface/Views/CookieStorageContentView.js:

(WI.CookieStorageContentView):
(WI.CookieStorageContentView.prototype.get navigationItems):
(WI.CookieStorageContentView.prototype.get canFocusFilterBar): Added.
(WI.CookieStorageContentView.prototype.focusFilterBar): Added.
(WI.CookieStorageContentView.prototype.tableIndexForRepresentedObject):
(WI.CookieStorageContentView.prototype.tableRepresentedObjectForIndex):
(WI.CookieStorageContentView.prototype.tableNumberOfRows):
(WI.CookieStorageContentView.prototype.tableSortChanged):
(WI.CookieStorageContentView.prototype.tableCellContextMenuClicked):
(WI.CookieStorageContentView.prototype.tableDidRemoveRows):
(WI.CookieStorageContentView.prototype.tablePopulateCell):
(WI.CookieStorageContentView.prototype._getCookiesForHost): Renamed from _filterCookies.
(WI.CookieStorageContentView.prototype.async _willDismissCookiePopover):
(WI.CookieStorageContentView.prototype._handleFilterBarFilterDidChange): Added.
(WI.CookieStorageContentView.prototype._handleClearNavigationItemClicked):
(WI.CookieStorageContentView.prototype._reloadCookies):
(WI.CookieStorageContentView.prototype._updateFilteredCookies): Added.
(WI.CookieStorageContentView.prototype._updateEmptyFilterResultsMessage): Added.
(WI.CookieStorageContentView.prototype._cookiesAtIndexes):
(WI.CookieStorageContentView.prototype._filterCookies): Deleted.

  • UserInterface/Views/CookieStorageContentView.css:

(.content-view.cookie-storage > .message-text-view): Added.
(.content-view.cookie-storage > .message-text-view > .message): Added.
(.content-view.cookie-storage > .data-grid): Deleted.
Add a filter bar to the navigation bar that checks the regex-ified filter text against the
formatted text of each cell for each cookie. Also hook it up to the global find shortcut.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.layout):
(WI.NetworkTableContentView.prototype._showEmptyFilterResultsMessage):
(WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
(WI.NetworkTableContentView.prototype._positionEmptyFilterMessage): Deleted.

  • UserInterface/Views/NetworkTableContentView.css:

(.content-view.network .message-text-view): Added.
Drive-by: instead of having the "No Filter Results" view only cover the "Name" column, it

should cover the entire table so as to be as noticable as possible (not to mention
the table will be empty anyways, so it's not like anything is being hidden).

Drive-by: ensure that the "No Filter Results" view doesn't cover the statistics.

11:12 AM Changeset in webkit [260522] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] JSBigInt inc operation does not produce right HeapBigInt zero
https://bugs.webkit.org/show_bug.cgi?id=210860

Reviewed by Mark Lam.

JSTests:

  • stress/bigint-zero-canonicalized.js: Added.

(shouldBe):

Source/JavaScriptCore:

JSBigInt::inc can produce signed HeapBigInt zero, which is not meeting the invariant of JSBigInt.
This patch fixes it by checking zero status before setting setSign(true).

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::inc):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::dumpInContextAssumingStructure const):

11:08 AM Changeset in webkit [260521] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[ Mojave wk1 Release ] animations/transition-and-animation-1.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=210051
<rdar://problem/61345177>

Unreviewed test gardening, forgot to rebaseline this test.

  • animations/transition-and-animation-1-expected.txt:
10:24 AM Changeset in webkit [260520] by Devin Rousso
  • 30 edits in trunk

Web Inspector: Debugger: Step Over should only step through comma expressions if they are comma statements
https://bugs.webkit.org/show_bug.cgi?id=210588

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • parser/Nodes.h:

(JSC::ExpressionNode::isStatement const): Added.
(JSC::ExpressionNode::setIsStatement): Added.

  • parser/NodeConstructors.h:

(JSC::ExprStatementNode::ExprStatementNode):
(JSC::DeclarationStatement::DeclarationStatement):
(JSC::ReturnNode::ReturnNode):
(JSC::ThrowNode::ThrowNode):

  • bytecompiler/NodesCodegen.cpp:

(JSC::CommaNode::emitBytecode):
Only emit WillExecuteStatement debug hooks inside CommaNode if it's the only child of a
statement parent node (e.g. a(), b(), c() vs true && (a(), b(), c()) && true).

  • parser/Parser.h:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseReturnStatement):
(JSC::Parser<LexerType>::parseThrowStatement):
(JSC::Parser<LexerType>::parseExpressionOrLabelStatement):
(JSC::Parser<LexerType>::parseExpressionStatement):
(JSC::Parser<LexerType>::parseExpression):
Only record a pause location for each sub-expression in a comma separated expression if it's
the only child of a statement (e.g. a(), b(), c() vs true && (a(), b(), c()) && true).

LayoutTests:

  • inspector/debugger/resources/log-pause-location.js:

(TestPage.registerInitializer.window.step):

  • inspector/debugger/breakpoints/resources/dump-functions.js:
  • inspector/debugger/breakpoints/resources/dump-general.js:
  • inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
  • inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt:
  • inspector/debugger/stepping/stepInto.html:
  • inspector/debugger/stepping/stepInto-expected.txt:
  • inspector/debugger/stepping/stepNext.html:
  • inspector/debugger/stepping/stepNext-expected.txt:
  • inspector/debugger/stepping/stepOut.html:
  • inspector/debugger/stepping/stepOut-expected.txt:
  • inspector/debugger/stepping/stepOver.html:
  • inspector/debugger/stepping/stepOver-expected.txt:
  • inspector/debugger/stepping/stepping-control-flow.html:
  • inspector/debugger/stepping/stepping-control-flow-expected.txt:
  • inspector/debugger/stepping/stepping-loops.html:
  • inspector/debugger/stepping/stepping-loops-expected.txt:
  • inspector/formatting/resources/javascript-tests/arrow-functions.js:
  • inspector/formatting/resources/javascript-tests/arrow-functions-expected.js:
  • inspector/formatting/resources/javascript-tests/functions.js:
  • inspector/formatting/resources/javascript-tests/functions-expected.js:
  • inspector/formatting/resources/javascript-tests/try-catch-finally-statements.js:
  • inspector/formatting/resources/javascript-tests/try-catch-finally-statements-expected.js:
10:17 AM Changeset in webkit [260519] by Russell Epstein
  • 2 edits in branches/safari-609.2.9.0-branch/Source/WebKit

Cherry-pick r260474. rdar://problem/62083321

PiP buttons shows up in element fullscreen when PiP is disabled in WKWebViewConfiguration
https://bugs.webkit.org/show_bug.cgi?id=210813

Reviewed by Eric Carlson.

Not currently testable; entering fullscreen never completes in the iOS TestWebKitAPI app
because that process is not a UI Application.

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm: (-[WKFullScreenViewController videoControlsManagerDidChange]):

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

9:56 AM Changeset in webkit [260518] by achristensen@apple.com
  • 8 edits
    2 adds in trunk/Tools

Add unit test for resuming downloads
https://bugs.webkit.org/show_bug.cgi?id=210852

Reviewed by Brady Eidson.

This is a test that we should've written years ago.
I made HTTPServer able to take a Function that takes a nw_connection_t to give it more power than declarative request/response pairs.
I made TestDownloadDelegate to be reused by future tests, like those I'm going to add for bug 210313.

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(longString):
(TEST):

  • TestWebKitAPI/cocoa/HTTPServer.h:

(TestWebKitAPI::HTTPServer::totalRequests const): Deleted.

  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::HTTPServer::RequestData::RequestData):
(TestWebKitAPI::HTTPServer::listenerParameters):
(TestWebKitAPI::startListening):
(TestWebKitAPI::HTTPServer::HTTPServer):
(TestWebKitAPI::HTTPServer::totalRequests const):
(TestWebKitAPI::dataFromString):
(TestWebKitAPI::nullTerminatedRequest):
(TestWebKitAPI::HTTPServer::respondToRequests):

  • TestWebKitAPI/cocoa/TestDownloadDelegate.h: Added.
  • TestWebKitAPI/cocoa/TestDownloadDelegate.mm: Added.

(-[TestDownloadDelegate _downloadDidStart:]):
(-[TestDownloadDelegate _download:didReceiveServerRedirectToURL:]):
(-[TestDownloadDelegate _download:didReceiveResponse:]):
(-[TestDownloadDelegate _download:didReceiveData:]):
(-[TestDownloadDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]):
(-[TestDownloadDelegate _downloadDidFinish:]):
(-[TestDownloadDelegate _download:didFailWithError:]):
(-[TestDownloadDelegate _downloadDidCancel:]):
(-[TestDownloadDelegate _download:didReceiveAuthenticationChallenge:completionHandler:]):
(-[TestDownloadDelegate _download:didCreateDestination:]):

  • TestWebKitAPI/cocoa/TestNavigationDelegate.h:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.mm:

(-[TestNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

9:34 AM Changeset in webkit [260517] by sbarati@apple.com
  • 3 edits
    1 add in trunk

ValueBitNot is wrong in FTL with AnyBigIntUse
https://bugs.webkit.org/show_bug.cgi?id=210846

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/big-int-value-bit-not-spec-any-big-int.js: Added.

(assert):
(foo):

Source/JavaScriptCore:

We forgot to speculate.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileValueBitNot):

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

Switch from debug ASSERT to RELEASE_ASSERT in toNPJSObject
https://bugs.webkit.org/show_bug.cgi?id=210823
<rdar://problem/61774056>

Reviewed by David Kilzer.

  • WebProcess/Plugins/Netscape/NPJSObject.h:

(WebKit::NPJSObject::toNPJSObject):

9:22 AM Changeset in webkit [260515] by sbarati@apple.com
  • 2 edits in trunk/Tools

makeValueRefForValue should be robust against the type encoding of a NSNumber backed by a boolean
https://bugs.webkit.org/show_bug.cgi?id=210821
<rdar://problem/62136598>

Reviewed by Tim Horton.

  • DumpRenderTree/mac/AccessibilityNotificationHandler.mm:

(makeValueRefForValue):

9:22 AM Changeset in webkit [260514] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed, commit updated xcfilelist files.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
9:21 AM Changeset in webkit [260513] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

[ Mojave wk1 Release ] animations/transition-and-animation-1.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=210051
<rdar://problem/61345177>

Reviewed by Simon Fraser.

The purpose of this test is to check that running an animation does not trigger a transition for the animated
property. The way this test was written is that it would use setTimeout() to set a timer at a time computed to
be 500ms after the completion of the animation. However, using a timer like this is flaky by design as the animation
could technically be still in flight if the system is under heavy load.

We rewrite this test to use an "animationend" event to determine the animation has really completed and then wait
another frame, using requestAnimationFrame() to check that the computed style is as expected.

  • animations/transition-and-animation-1.html:
  • resources/ui-helper.js:

(window.UIHelper.waitForEvent):

8:40 AM Changeset in webkit [260512] by ysuzuki@apple.com
  • 4 edits
    14 adds in trunk

[JSC] AI results of BigInt32 Bitwise shift operation does not match to runtime results
https://bugs.webkit.org/show_bug.cgi?id=210839

Reviewed by Saam Barati.

JSTests:

  • stress/v8-bigint32-add.js: Added.

(main):

  • stress/v8-bigint32-and.js: Added.

(main):

  • stress/v8-bigint32-dec.js: Added.

(main):

  • stress/v8-bigint32-div.js: Added.

(main):

  • stress/v8-bigint32-inc.js: Added.

(main):

  • stress/v8-bigint32-mod.js: Added.

(main):

  • stress/v8-bigint32-mul.js: Added.

(main):

  • stress/v8-bigint32-neg.js: Added.

(main):

  • stress/v8-bigint32-not.js: Added.

(main):

  • stress/v8-bigint32-or.js: Added.

(main):

  • stress/v8-bigint32-sar.js: Added.

(main):

  • stress/v8-bigint32-shl.js: Added.

(main):

  • stress/v8-bigint32-sub.js: Added.

(main):

  • stress/v8-bigint32-xor.js: Added.

(main):

Source/JavaScriptCore:

While runtime function of bitwise ops with BigInt32 sometimes returns HeapBigInt, DFG AI is setting SpecBigInt32
as a result value. This leads to miscompilation particularly in FTL since FTL uses this information to remove
a lot of branches.

And we found that FTL BigInt32 predicate is not correctly checking state. This patch fixes it too.

Added test case found this (v8-bigint32-sar.js).

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileValueBitRShift):
(JSC::FTL::DFG::LowerDFGToB3::compileToNumeric):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
(JSC::FTL::DFG::LowerDFGToB3::compileIsBigInt):
(JSC::FTL::DFG::LowerDFGToB3::boolify):
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf):
(JSC::FTL::DFG::LowerDFGToB3::lowBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::isBigInt32KnownNotCell):
(JSC::FTL::DFG::LowerDFGToB3::isBigInt32KnownNotNumber):
(JSC::FTL::DFG::LowerDFGToB3::isNotBigInt32KnownNotNumber):
(JSC::FTL::DFG::LowerDFGToB3::isNotAnyBigIntKnownNotNumber):
(JSC::FTL::DFG::LowerDFGToB3::isNotHeapBigIntUnknownWhetherCell):
(JSC::FTL::DFG::LowerDFGToB3::speculateBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::speculateAnyBigInt):
(JSC::FTL::DFG::LowerDFGToB3::isBigInt32): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::isNotBigInt32): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::isNotAnyBigInt): Deleted.

8:37 AM Changeset in webkit [260511] by Chris Dumez
  • 7 edits in trunk/Source/WebCore

Unreviewed, reverting r259116.

Broke login flow on some apple-internal sites
(rdar://problem/61905262)

Reverted changeset:

"Move applyUserAgentIfNeeded calls to a more central place"
https://bugs.webkit.org/show_bug.cgi?id=209587
https://trac.webkit.org/changeset/259116

7:42 AM Changeset in webkit [260510] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][TFC] Introduce TableFormattingContext::computeAndDistributeExtraVerticalSpace
https://bugs.webkit.org/show_bug.cgi?id=210830

Reviewed by Antti Koivisto.

Add a dedicated function to compute preferred heights for the table rows.
This is in preparation for the 2 pass layout required to finalize row height.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeBorderAndPadding):

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::computedPadding const):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutInFlowContent):
(WebCore::Layout::TableFormattingContext::layoutCell):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace):
(WebCore::Layout::TableFormattingContext::setComputedGeometryForRows):
(WebCore::Layout::TableFormattingContext::setComputedGeometryForSections):
(WebCore::Layout::TableFormattingContext::positionTableCells): Deleted.

  • layout/tableformatting/TableFormattingContext.h:
7:40 AM Changeset in webkit [260509] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ iPadOS wk2 Release ] fast/css-custom-paint/constructor.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=208837

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
6:26 AM Changeset in webkit [260508] by Claudio Saavedra
  • 7 edits in trunk/Source

[GTK4] Several fixes to GdkEvent APIs for GTK4
https://bugs.webkit.org/show_bug.cgi?id=210856

Reviewed by Carlos Garcia Campos.

Source/WebCore:

No tests needed.

Several fixes to GdkEvent API changes for GTK4. This is far from
complete but it allows the GTK4 build to move forward. When
possible, add GTK3-API replacements to GtkVersioning.h to avoid
#ifdef blocks, where the API changes are too complex, just #ifdef.

  • platform/gtk/GtkUtilities.cpp:

(WebCore::wallTimeForEvent):

  • platform/gtk/GtkVersioning.h:

(gdk_event_get_state):
(gdk_event_get_coords):
(gdk_event_get_root_coords):
(gdk_event_is_scroll_stop_event):
(gdk_event_get_scroll_direction):
(gdk_event_get_scroll_deltas):
(gdk_event_get_button):
(gdk_keymap_get_for_display): Deleted as it was wrong and
it's not needed.

  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::PlatformKeyboardEvent::currentCapsLockState):
(WebCore::PlatformKeyboardEvent::getCurrentModifierState):
(WebCore::PlatformKeyboardEvent::modifiersContainCapsLock):

  • platform/gtk/PlatformWheelEventGtk.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent):

Source/WTF:

  • wtf/glib/GTypedefs.h: In GTK4 GdkEvent is a struct.
5:12 AM WebKitGTK/2.28.x edited by Philippe Normand
(diff)
4:48 AM Changeset in webkit [260507] by youenn@apple.com
  • 5 edits in trunk/Source

Simplify SWServerWorker::whenActivated logic
https://bugs.webkit.org/show_bug.cgi?id=210795

Reviewed by Alex Christensen.

Source/WebCore:

Improve logging and ensure whenActivated can be called whatever the worker state is.
No change of behavior.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::didFinishInstall):
(WebCore::SWServer::fireInstallEvent):
(WebCore::SWServer::fireActivateEvent):

  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::whenActivated):

Source/WebKit:

Improve logging and update code according whenActivated implementation.
Add an early check for timeouts so that we return earlier in that case.

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::createFetchTask):
(WebKit::WebSWServerConnection::startFetch):

4:36 AM Changeset in webkit [260506] by eocanha@igalia.com
  • 7 edits in trunk

[GStreamer][MSE] Youtube 'live stream'/H264 URLs fail to play, VP8/9 URLs play OK
https://bugs.webkit.org/show_bug.cgi?id=209119

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The fix consists of removing the initial avoiding of seeking and just
issuing the proper segment instead of seeking (seeks in GStreamer can't
be done before prerolling anyway). Appsrc doesn't make easy to emit our
own custom segment, so what I did was to use a segment fixer probe to
modify the original [0, infinity] segment issued by appsrc and use
a [startTime, stopTime] with proper values depending on the seek target
and rate.

Covered by existing tests.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::checkShouldDelaySeek): Don't hold seeks on startup, when changing from READY to PAUSED.
(WebCore::MediaPlayerPrivateGStreamerMSE::doSeek): Refactored seek delay condition. Also, don't do a regular
gst_element_seek() for initial seeks, just proceed with a special case in that situation.

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(initialSeekSegmentFixerProbe): Probe that fixes the segment.
(webKitMediaSrcPrepareInitialSeek): Behave much like a regular seek, but also compute the right GstSegment, install
the segment fixer probe and setReadyForMoreSamples() on the SourceBufferPrivates.

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.h:

LayoutTests:

Unskipped media/media-source/media-source-seek-redundant-append.html,
which passes now.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
3:19 AM Changeset in webkit [260505] by svillar@igalia.com
  • 12 edits
    16 copies
    5 adds in trunk

[WebXR] Test IDLs and stubs
https://bugs.webkit.org/show_bug.cgi?id=209859

Reviewed by Dean Jackson and Youenn Fablet.

Source/WebCore:

WebXR testing is hard as it might involve interaction with actual
devices. That's why the WebXR testing
API (https://immersive-web.github.io/webxr-test-api/) was
proposed. In fact, all the current WebXR tests from
web-platform-tests are using that testing API. This new testing
API supplements navigator.xr and is accessed through
navigator.xr.test.

In order not to expose the API to the web we're adding the XRTest
interface to Internals instead. The mapping from internals.xrTest to
navigator.xr.test happens in the WPT code.

We're adding the required IDLs and very basic (mostly empty)
implementations for testing methods. We're adding testing
infrastructure, adding tests make no sense for this change.

  • CMakeLists.txt: Added new files.
  • DerivedSources.make: Ditto.
  • Modules/webxr/NavigatorWebXR.h: Export API to be used in testing code.
  • Modules/webxr/WebXRSystem.h: Export ::from and ::xr methods.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • bindings/js/WebCoreBuiltinNames.h: Added some new macros.
  • testing/FakeXRBoundsPoint.h: Added.
  • testing/FakeXRBoundsPoint.idl: Added.
  • testing/FakeXRButtonStateInit.h: Added.
  • testing/FakeXRButtonStateInit.idl: Added.
  • testing/FakeXRInputSourceInit.h: Added.
  • testing/FakeXRInputSourceInit.idl: Added.
  • testing/FakeXRRigidTransformInit.h: Added.
  • testing/FakeXRRigidTransformInit.idl: Added.
  • testing/FakeXRViewInit.h: Added.
  • testing/FakeXRViewInit.idl: Added.
  • testing/Internals.cpp:

(WebCore::Internals::xrTest): Added WebXRTest to Internals.

  • testing/Internals.h: Added xrTest() accessor.
  • testing/Internals.idl: Added xrTest attribute.
  • testing/WebFakeXRDevice.cpp: Added.

(WebCore::WebFakeXRDevice::setViews):
(WebCore::WebFakeXRDevice::disconnect):
(WebCore::WebFakeXRDevice::setViewerOrigin):
(WebCore::WebFakeXRDevice::clearViewerOrigin):
(WebCore::WebFakeXRDevice::simulateVisibilityChange):
(WebCore::WebFakeXRDevice::setBoundsGeometry):
(WebCore::WebFakeXRDevice::setFloorOrigin):
(WebCore::WebFakeXRDevice::clearFloorOrigin):
(WebCore::WebFakeXRDevice::simulateResetPose):
(WebCore::WebFakeXRDevice::simulateInputSourceConnection):

  • testing/WebFakeXRDevice.h: Added.
  • testing/WebFakeXRDevice.idl: Added.
  • testing/WebFakeXRInputController.cpp: Added.

(WebCore::WebFakeXRInputController::setHandedness):
(WebCore::WebFakeXRInputController::setTargetRayMode):
(WebCore::WebFakeXRInputController::setProfiles):
(WebCore::WebFakeXRInputController::setGripOrigin):
(WebCore::WebFakeXRInputController::clearGripOrigin):
(WebCore::WebFakeXRInputController::setPointerOrigin):
(WebCore::WebFakeXRInputController::disconnect):
(WebCore::WebFakeXRInputController::reconnect):
(WebCore::WebFakeXRInputController::startSelection):
(WebCore::WebFakeXRInputController::endSelection):
(WebCore::WebFakeXRInputController::simulateSelect):
(WebCore::WebFakeXRInputController::setSupportedButtons):
(WebCore::WebFakeXRInputController::updateButtonState):

  • testing/WebFakeXRInputController.h: Added.
  • testing/WebFakeXRInputController.idl: Added.
  • testing/WebXRTest.cpp: Added.

(WebCore::WebXRTest::simulateDeviceConnection const):
(WebCore::WebXRTest::simulateUserActivation):
(WebCore::WebXRTest::disconnectAllDevices):

  • testing/WebXRTest.h: Added.

(WebCore::WebXRTest::create):

  • testing/WebXRTest.idl: Added.
  • testing/XRSimulateUserActivationFunction.h: Added.
  • testing/XRSimulateUserActivationFunction.idl: Ditto.

LayoutTests:

  • platform/wpe/TestExpectations: Added bug number to the passing webxr test.
12:16 AM Changeset in webkit [260504] by graouts@webkit.org
  • 9 edits
    2 adds in trunk/Source/WebCore

[Web Animations] Add a supporting object for Document to manage timelines
https://bugs.webkit.org/show_bug.cgi?id=210817

Reviewed by Dean Jackson.

Add a new DocumentTimelinesController object owned by Document to manage DocumentTimelines created for it. This simple piece of refactoring is the first
step towards a coordinated "update animations and send events" procedure where all timelines are updated at once with a single microtask checkpoint instead
of each timeline running one.

No change in behavior, so no new tests.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::DocumentTimeline):
(WebCore::DocumentTimeline::~DocumentTimeline):
(WebCore::DocumentTimeline::controller const):
(WebCore::DocumentTimeline::detachFromDocument):

  • animation/DocumentTimeline.h:
  • animation/DocumentTimelinesController.cpp: Added.

(WebCore::DocumentTimelinesController::DocumentTimelinesController):
(WebCore::DocumentTimelinesController::~DocumentTimelinesController):
(WebCore::DocumentTimelinesController::addTimeline):
(WebCore::DocumentTimelinesController::removeTimeline):
(WebCore::DocumentTimelinesController::detachFromDocument):
(WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents):

  • animation/DocumentTimelinesController.h: Added.
  • dom/Document.cpp:

(WebCore::Document::commonTeardown):
(WebCore::Document::ensureTimelinesController):
(WebCore::Document::updateAnimationsAndSendEvents): Deleted.
(WebCore::Document::addTimeline): Deleted.
(WebCore::Document::removeTimeline): Deleted.

  • dom/Document.h:

(WebCore::Document::timelinesController const):

  • page/Page.cpp:

(WebCore::Page::updateRendering):

12:10 AM Changeset in webkit [260503] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations
https://bugs.webkit.org/show_bug.cgi?id=210851

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/repaint/focus-ring-repaint-expected.txt: Update

baseline after r260367.

Apr 21, 2020:

9:27 PM Changeset in webkit [260502] by Devin Rousso
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r255396): Graphics: viewing a shader program hides the navigation sidebar
https://bugs.webkit.org/show_bug.cgi?id=210838

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CanvasSidebarPanel.js:

(WI.CanvasSidebarPanel.prototype.canShowRepresentedObject):
Include WI.ShaderProgram in the list of displayable represented objects.

  • UserInterface/Base/Main.js:

(WI.tabContentViewClassForRepresentedObject):

  • UserInterface/Views/GraphicsTabContentView.js:

(WI.GraphicsTabContentView.prototype.canShowRepresentedObject):
Update the list of represented objects that are displayable by the Graphics Tab.

  • UserInterface/Views/GraphicsOverviewContentView.css:

(.content-view.graphics-overview > section > .header):
(.content-view.graphics-overview > section:not(:first-of-type) > .header): Deleted.
Drive-by: add a top border to the first section when overscrolling.

  • UserInterface/Views/CanvasOverviewContentView.css:

(.content-view.canvas-overview > .content-view.canvas > .preview > .message-text-view): Added.
Drive-by: ensure that the "No Preview Available" view doesn't overlap the section header.

9:19 PM Changeset in webkit [260501] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for watchOS
https://bugs.webkit.org/show_bug.cgi?id=210832

If function is not defined, static declaration should not be declared, otherwise, unused-function-error happens.

  • jsc.cpp:
9:12 PM Changeset in webkit [260500] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewd, speculative Windows build fix part 2
https://bugs.webkit.org/show_bug.cgi?id=210834

  • runtime/Options.cpp:

(JSC::strncasecmp):

9:07 PM Changeset in webkit [260499] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix windows build failure
https://bugs.webkit.org/show_bug.cgi?id=210834

  • runtime/Options.cpp:

(JSC::strncasecmp):

9:05 PM Changeset in webkit [260498] by Ryan Haddad
  • 4 edits in trunk/Source/WebKit

Unreviewed, reverting r260478.

Caused TestWebKitAPI.WKAttachmentTests crashes on Catalina

Reverted changeset:

"Clean up QuickLookThumbnailLoader"
https://bugs.webkit.org/show_bug.cgi?id=210814
https://trac.webkit.org/changeset/260478

8:58 PM Changeset in webkit [260497] by Ryan Haddad
  • 18 edits in trunk

Unreviewed, reverting r260410.

Caused crashes in Safari

Reverted changeset:

"SPI clients using fastServerTrustEvaluationEnabled need SPI
to inform them of modern TLS negotiation"
https://bugs.webkit.org/show_bug.cgi?id=210533
https://trac.webkit.org/changeset/260410

8:53 PM Changeset in webkit [260496] by Ryan Haddad
  • 8 edits in trunk/Source/WebKit

Unreviewed, reverting r260475.

New assert caused layout tests to exit early on iOS and macOS

Reverted changeset:

"REGRESSION(r260410) Frequent Network process crashes"
https://bugs.webkit.org/show_bug.cgi?id=210825
https://trac.webkit.org/changeset/260475

8:45 PM Changeset in webkit [260495] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[GTK] http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=194629

Updating test expectation with correct console message after r260356
enabled resource load statistics for GTK/WPE.

Unreviewed test gardening.

  • platform/gtk/http/tests/websocket/connection-refusal-in-frame-resource-load-statistics-expected.txt:
8:39 PM Changeset in webkit [260494] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Test gardening.

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
8:17 PM Changeset in webkit [260493] by Alan Coon
  • 7 edits in branches/safari-609.2.9.0-branch

Apply patch. rdar://problem/62083319

8:13 PM Changeset in webkit [260492] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

IPC::Encoder::reserve() can be private
<https://webkit.org/b/210833>
<rdar://problem/62124193>

Reviewed by Darin Adler.

  • Platform/IPC/Encoder.h:

(IPC::Encoder::reserve):

  • Move from public to private.
8:03 PM Changeset in webkit [260491] by cathiechen
  • 12 edits
    4 adds in trunk

REGRESSION (r254790): No longer get smooth scrolling on music.apple.com
https://bugs.webkit.org/show_bug.cgi?id=210634

Reviewed by Darin Adler.

Source/WebCore:

The page uses the access of "scrollBehavior" in CSSStyleDeclaration as the support of scroll-behavior.
If supported, it will use scroll-behavior. Otherwise, it will perform a JS smooth scroll.
Currently, "scrollBehavior" is still available when CSSOMViewSmoothScrolling is off, only the value
"smooth" is invalidated.
In order to fix this, CSSStyleDeclaration will take account of CSSOMViewSmoothScrolling in Settings.
This patch also tries to provide an interface which let flags in Settings can enable/disable a property.
However, it is not complete, for there are some scenarios that Settings isn't accessible. By adding
"settings-flag" to CSSProperties.json, it would be effective to control the property access in CSSStyleDeclaration.

Tests: fast/scrolling/scroll-behavior-invalidate-if-disabled.html

fast/scrolling/scroll-behavior-validate-if-enabled.html

  • css/CSSProperties.json:
  • css/CSSStyleDeclaration.cpp:

(WebCore::CSSStyleDeclaration::getCSSPropertyIDFromJavaScriptPropertyName):
(WebCore::CSSStyleDeclaration::namedItem):
(WebCore::CSSStyleDeclaration::setNamedItem):
(WebCore::CSSStyleDeclaration::supportedPropertyNames const):

  • css/makeprop.pl:

(addProperty):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::cssPropertyID):

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyle::collectProperties const):

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedCSSProperties):

Tools:

Add settings-flag. Add support for CSSOMViewSmoothScrolling on Windows DumpRenderTree.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):

  • Scripts/webkitpy/style/checkers/jsonchecker.py:

(JSONCSSPropertiesChecker.check_codegen_properties):

LayoutTests:

"scrollBehavior" is not available in CSSStyleDeclaration if the flag is off.
It's available if the flag is on.

  • fast/scrolling/scroll-behavior-invalidate-if-disabled-expected.txt: Added.
  • fast/scrolling/scroll-behavior-invalidate-if-disabled.html: Added.
  • fast/scrolling/scroll-behavior-validate-if-enabled-expected.txt: Added.
  • fast/scrolling/scroll-behavior-validate-if-enabled.html: Added.
7:54 PM Changeset in webkit [260490] by ysuzuki@apple.com
  • 10 edits
    2 adds in trunk

[JSC] SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq should expect AnyBigIntUse
https://bugs.webkit.org/show_bug.cgi?id=210832

Reviewed by Mark Lam.

JSTests:

  • stress/heap-and-32-bigint-eq.js: Added.

(shouldBe):

  • stress/heap-and-32-bigint-stricteq.js: Added.

(shouldBe):

Source/JavaScriptCore:

SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq will get AnyBigIntUse now. We should use ManualOperandSpeculation
and speculate function to perform speculation check.

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):

  • jsc.cpp:

(functionCreateHeapBigInt):
(functionCreateBigInt32):

  • runtime/BigIntConstructor.cpp:

(JSC::toBigInt):
(JSC::callBigIntConstructor):

  • runtime/BigIntConstructor.h:
  • runtime/JSBigInt.h:
7:35 PM Changeset in webkit [260489] by ysuzuki@apple.com
  • 8 edits
    3 adds in trunk

Canonicalize JSBigInt generated by structured-cloning by calling rightTrim
https://bugs.webkit.org/show_bug.cgi?id=210816

Reviewed by Keith Miller and Darin Adler.

Source/JavaScriptCore:

  • runtime/JSBigInt.h:

Source/WebCore:

Let's assume that the serialized data is slightly different. JSBigInt's internal representation has various invariants. For example, if JSBigInt is zero, it should have zero length,
and its sign should be false. But there are various ways of representing zero JSBigInt in serialization format. For example, we can set sign = true, length = 0. Current code strongly
assumes that dumped data meets this JSBigInt's internal invariant. This is not good: for example, if we add a new invariant into JSBigInt, already serialized data would not meet this
invariant.
In this patch, we call JSBigInt::rightTrim(VM&) when finishing JSBigInt deserialization. This means that we canonicalize JSBigInt when finishing creation, and this makes this serialization
format free from JSBigInt's internal invariants. This makes JSBigInt serialization/deserialization robust. And we also add lengthInUint64 == 0 path not to call rightTrim when it is zero.
This makes deserialization robust for zero-length & signed corrupted JSBigInt zero.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpBigInt32Data):
(WebCore::CloneDeserializer::readBigInt):

LayoutTests:

Add HeapZero BigInt test.

  • fast/dom/Window/window-postmessage-clone-expected.txt:
  • fast/dom/Window/window-postmessage-clone.html:
  • js/dom/bigint-canonicalization-in-structured-cloning-expected.txt: Added.
  • js/dom/bigint-canonicalization-in-structured-cloning.html: Added.
  • js/dom/script-tests/bigint-canonicalization-in-structured-cloning.js: Added.
  • platform/gtk/fast/dom/Window/window-postmessage-clone-expected.txt:
7:23 PM Changeset in webkit [260488] by Peng Liu
  • 2 edits in trunk/Source/WebCore

platform/mac/media/audio-session-category-audio-autoplay.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=210826

Reviewed by Jer Noble.

For WebKitLegacy, AudioSession::setCategory() needs to set the category when
m_routingArbitrationClient is nullptr. This patch also fixes an error regarding
setupArbitrationOngoing.

  • platform/audio/mac/AudioSessionMac.mm:

(WebCore::AudioSession::setCategory):

7:03 PM Changeset in webkit [260487] by stephan.szabo@sony.com
  • 2 edits in trunk/Source/WebKit

[PlayStation] Fix GPU Process build for VIDEO_PRESENTATION_MODE changes
https://bugs.webkit.org/show_bug.cgi?id=210836

Reviewed by Darin Adler.

Build fix, no new tests.

  • GPUProcess/media/playstation/RemoteMediaPlayerProxyPlayStation.cpp:
6:54 PM Changeset in webkit [260486] by Peng Liu
  • 17 edits in trunk

Fix MACCATALYST build failures
https://bugs.webkit.org/show_bug.cgi?id=210815

Reviewed by Tim Horton.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests, no functional change.

  • Configurations/FeatureDefines.xcconfig:
  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _isShowingVideoPictureInPicture]):
(-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::applicationDidBecomeActive):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/PlatformEnable.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
6:50 PM Changeset in webkit [260485] by Darin Adler
  • 78 edits in trunk

[Cocoa] Use createNSArray in many more places that build NSArray objects from C++ collections
https://bugs.webkit.org/show_bug.cgi?id=210702

Reviewed by Alex Christensen.

Source/WebCore:

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityFlowToElements]): Use createNSArray.
(-[WebAccessibilityObjectWrapper textRectsFromMarkers:withText:]): Ditto.
(-[WebAccessibilityObjectWrapper rectsForSelectionRects:]): Deleted. Merged into
the method above.

  • accessibility/mac/WebAccessibilityObjectWrapperBase.h: Take const references

instead of references when passing Path and FloatRect.

  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(convertMathPairsToNSArray): Use createNSArray. Also use arrays on the stack
to create NSDictionary rather than using NSMutableDictionary.
(addChildToArray): Deleted.
(convertToNSArray): Uses createNSArray. Rolled addChildToArray in.
(-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]): Take const
reference instead of reference.
(-[WebAccessibilityObjectWrapperBase convertRectToSpace:space:]): Ditto.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
Use createNSArray.

  • editing/cocoa/FontAttributesCocoa.mm:

(WebCore::FontAttributes::createDictionary const): Ditto.

  • page/ios/FrameIOS.mm:

(WebCore::Frame::interpretationsForCurrentRoot const): Ditto.

  • platform/cocoa/SearchPopupMenuCocoa.mm:

(WebCore::saveRecentSearches): Ditto.

  • platform/cocoa/SharedBufferCocoa.mm:

(WebCore::SharedBuffer::createNSDataArray const): Ditto.

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

(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense): Ditto.

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

(WebCore::CDMSessionAVContentKeySession::update): Ditto.

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

(WebCore::CDMSessionAVStreamSession::update): Ditto.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto.

  • platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:

(WebCore::PlatformCAAnimationCocoa::setValues): Ditto.
(WebCore::PlatformCAAnimationCocoa::setKeyTimes): Ditto.
(WebCore::PlatformCAAnimationCocoa::setTimingFunctions): Ditto.

  • platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:

(WebCore::PlatformCAFilters::setFiltersOnLayer): Moved almost the whole
function into a call to createNSArray. Removed the default case from
the switch so we get a warning if we miss any filter operation types.

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

(WebCore::PlatformCALayerCocoa::setSublayers): Use createNSArray.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::write): Ditto.

  • platform/ios/PlaybackSessionInterfaceAVKit.mm:

(WebCore::mediaSelectionOptions): Ditto.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::write): Ditto.

  • platform/mac/WebPlaybackControlsManager.mm:

(mediaSelectionOptions): Ditto.

  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::NetworkStorageSession::setCookies): Ditto.

  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdatePlatformRequest): Ditto.

  • platform/network/cocoa/WebCoreNSURLSession.h:

Use the Objective-C type WebCoreNSURLSessionDataTask in the _dataTasks
set rather than using CFTypeRef.

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSession dealloc]): Remove now-unneeded typecast.
(-[WebCoreNSURLSession taskCompleted:]): Ditto.
(-[WebCoreNSURLSession finishTasksAndInvalidate]): Use a more idiomatic
form of capturing strongSelf in a lambda.
(-[WebCoreNSURLSession invalidateAndCancel]): Updated the type on a
local variable and removed now-unneeded typecast.
(-[WebCoreNSURLSession getTasksWithCompletionHandler:]): Use RetainPtr
to cut down on autorelease. Use createNSArray, taking advantage of the
fact that it works on HashSet. Removed now-unneeded typecast.
(-[WebCoreNSURLSession getAllTasksWithCompletionHandler:]): Ditto.
(-[WebCoreNSURLSession dataTaskWithRequest:]): Remove now-unneeded typecast.
(-[WebCoreNSURLSession dataTaskWithURL:]): Ditto.

Source/WebKit:

  • Platform/cocoa/PaymentAuthorizationPresenter.mm:

(WebKit::toNSErrors): Use createNSArray and return a RetainPtr to cut down
on autorelease.
(WebKit::toPKShippingMethods): Ditto.
(WebKit::PaymentAuthorizationPresenter::completePaymentSession): Updated for RetainPtr.
(WebKit::PaymentAuthorizationPresenter::completeShippingContactSelection): Ditto.

  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Use createNSArray.
Also removed code to support platforms without -setThumbnailURLs: since we don't
have those any more.

  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:

(WebKit::RemoteLayerTreePropertyApplier::updateChildren): Use createNSArray.

  • UIProcess/API/Cocoa/WKHTTPCookieStore.mm:

(coreCookiesToNSCookies); Ditto.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(+[WKProcessPool _allProcessPoolsForTesting]): Ditto.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _startTextManipulationsWithConfiguration:completion:]): Cut down on
repeated code by adding a lambda to create a _WKTextManipulationItem and by using
createNSArray.
(wkTextManipulationErrors): Use createNSArray. Also tighten up the code that maps
WebCore::TextManipulationController::ManipulationFailureType to the
_WKTextManipulationItemError code.

  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:

(-[WKWebpagePreferences _customHeaderFields]): Use createNSArray.

  • UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:

(-[WKWebsiteDataRecord _originsStrings]): Ditto.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _getResourceLoadStatisticsDataSummary:]): Ditto.

  • UIProcess/API/Cocoa/_WKDownload.mm:

(-[_WKDownload redirectChain]): Ditto.

  • UIProcess/API/Cocoa/_WKFrameTreeNode.mm:

(-[_WKFrameTreeNode childFrames]): Ditto.

  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration additionalReadAccessAllowedURLs]): Ditto.

  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdParty.mm:

(-[_WKResourceLoadStatisticsThirdParty underFirstParties]): Ditto.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]): Ditto.

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::didChangeBackForwardList): Ditto.

  • UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm:

(WebKit::RemoteLayerTreeScrollingPerformanceData::data): Ditto.

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::createTargetedDragPreview): Ditto.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _updateTapHighlight]): Removed uneeded RetainPtr local variable.
Use createNSArray. Refactored to make the "all rectilinear" case more parallel
to the general case.
(-[WKContentView webSelectionRectsForSelectionRects:]): Use createNSArray.
(wkTextSelectionRects): Ditto.
(createTargetedPreview): Ditto.
(-[WKContentView _presentationRectsForPreviewItemController:]): Ditto.

  • UIProcess/mac/WKTextFinderClient.mm:

(-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): Use createNSArray.

  • UIProcess/mac/WKTextInputWindowController.mm:

(-[WKTextInputView validAttributesForMarkedText]): Use +[NSArray arrayByAddingObject:].

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(collectIcons): Use createNSArray.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Marked class here
as final. Cut down on local variables a bit. Use createNSArray.

  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:

(WebKit::addAnimationToLayer): Removed unnecessary use of RetainPtr. Use createNSArray.

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::WebBackForwardListProxy): Addd a FIXME about
a problem I noticed, unrelated to the rest of the changes.

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

(-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]): Use createNSArray.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::registerWithStateDumper): Ditto.
(WebKit::activePagesOrigins): Ditto.

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebFrameIOS.mm:

(-[WebFrame selectionRectsForCoreRange:]): Use createNSArray.

Source/WebKitLegacy/mac:

  • DOM/DOM.mm:

(kit): Use createNSArray.
(-[DOMNode getPreviewSnapshotImage:andRects:]): Ditto. Also use makeNSArrayElement
to convert FloatRect to an NSValue containing a CGRect, avoiding use of
+[NSValue value:withObjCType:], while working on macOS where +[NSValue valueWithCGRect:]
is not part of API.

  • History/WebBackForwardList.mm:

(-[WebBackForwardList dictionaryRepresentation]): Use createNSArray, fewer local
variables, and use constexpr instead of #define.
(-[WebBackForwardList setToMatchDictionaryRepresentation:]): Use adoptNS instead
of explicit release and reference instead of pointer.
(vectorToNSArray): Deleted.
(-[WebBackForwardList backListWithLimit:]): Use createNSArray. Also use RetainPtr for
the "hack" here rather than explicit retain/release calls.
(-[WebBackForwardList forwardListWithLimit:]): Ditto.

  • History/WebHistoryItem.mm:

(kit): Added a retain/autorelease pair that is important to have predictable lifetime.
(-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
Added a missing null check.
(-[WebHistoryItem initWithWebCoreHistoryItem:]): Added a FIXME about something I
noticed that is not related to the rest of this patch.
(-[WebHistoryItem children]): Use createNSArray.
(-[WebHistoryItem _redirectURLs]): Ditto.

  • Misc/WebCoreStatistics.mm:

(createNSCountedSet): Added. More efficient than the old code because it doesn't
create many NSString objects for each key, but also shared between functions.
(+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): Use createNSCountedSet.
(+[WebCoreStatistics javaScriptObjectTypeCounts]): Ditto.

  • Misc/WebNSPasteboardExtras.mm:

(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
Use @[] instead of NSMutableArray

  • Storage/WebDatabaseManager.mm:

(-[WebDatabaseManager origins]): Use createNSArray.

  • Storage/WebStorageManager.mm:

(-[WebStorageManager origins]): Ditto.

  • WebCoreSupport/WebApplicationCache.mm:

(+[WebApplicationCache originsWithCache]): Ditto.

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::updateSpellingUIWithGrammarString): Ditto.

  • WebCoreSupport/WebNotificationClient.mm:

(WebNotificationClient::clearNotifications): Ditto.

  • WebView/WebArchive.mm:

(-[WebArchive subresources]): Ditto.
(-[WebArchive subframeArchives]): Ditto.

  • WebView/WebDataSource.mm:

(-[WebDataSource subresources]): Ditto.

  • WebView/WebFrame.mm:

(-[WebFrame _nodesFromList:]): Deleted. This was not declared in any header and
was also unused.

  • WebView/WebFrameView.mm:

(-[WebFrameView initWithFrame:]): Added a FIXME about something I noticed that is
not related to the rest of this patch.

  • WebView/WebHTMLRepresentation.mm:

(-[WebHTMLRepresentation controlsInForm:]): Use createNSArray.

  • WebView/WebHTMLView.mm:

(createMenuItems): Use createNSArray. Also moved up in the file.
(createMenuItem): Removed unneeded local variable.

  • WebView/WebView.mm:

(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
Use createNSArray.

Source/WTF:

  • wtf/cocoa/VectorCocoa.h: Improved the createNSArray function template:

1) Skip nil values. This matches what we do with Optional<> in makeVector and

was always my intention; apparently forgot to do it.

2) Instead of taking a const reference argument, take a forwarding reference

and use forwarding when passing collection elements to makeNSArrayElement
or the passed-in function. Can transfer ownership of collection elements
as they are transformed into array elements, which makes sense if the
Objective-C objects are wrappers that take ownership of what's wrapped.

3) Take any collection that works with std::size and a range-based for loop,

no longer requiring a size member function. Includes arrays.

4) Since this now intended for use on collections other than WTF::Vector,

added "using WTF::createNSArray" since argument-dependent lookup won't
find the function template in those cases.

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(activateTestingFonts): Use constexpr and NSString instead of a null-pointer terminated
array for the font names. Use createNSArray.

  • DumpRenderTree/mac/UIDelegate.mm:

(-[UIDelegate webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):
Use createNSArray.

  • Scripts/webkitpy/style/checkers/cpp.py:

(find_parameter_name_index): Fixed a spelling error.
(_check_parameter_name_against_text): Added a special case to not complain that
parameters named "]" have redundant names. Not obvious to me how to write a test case for
this and how to fix this in a more sensible way, but immediately helpful to not get this
spurious warning.

  • WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:

(WTR::activateSystemCoreWebFonts): Use constexpr array instead of NSArray for font names.
(WTR::activateFonts): Use constexpr and NSString instead of a null-pointer terminated
array for the font names. Use createNSArray.

6:46 PM Changeset in webkit [260484] by Matt Lewis
  • 2 edits in trunk/Tools

Bindings-test should not depend on current working directory.
https://bugs.webkit.org/show_bug.cgi?id=210831

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.main):

6:34 PM Changeset in webkit [260483] by Alexey Shvayka
  • 5 edits in trunk

The visibilitychange event should bubble
https://bugs.webkit.org/show_bug.cgi?id=210829

Reviewed by Darin Adler.

Source/WebCore:

This change makes visibilitychange event bubble as per spec [1], aligning WebKit
with Blink and Gecko. Also fixes broken spec link to visibilityState attribute.

[1] https://w3c.github.io/page-visibility/#dfn-now-visible-algorithm (step 2)

Test: fast/events/page-visibility-transition-test.html

  • dom/Document.cpp:

(WebCore::Document::visibilityStateChanged):
(WebCore::Document::visibilityState const):

LayoutTests:

  • fast/events/page-visibility-transition-test-expected.txt:
  • fast/events/page-visibility-transition-test.html:
6:28 PM Changeset in webkit [260482] by Simon Fraser
  • 7 edits
    3 adds in trunk

Composited layers are misplaced inside RTL overflow scroller with visible scrollbar
https://bugs.webkit.org/show_bug.cgi?id=210820

Reviewed by Zalan Bujtas.

Source/WebCore:

RenderLayerBacking::computeParentGraphicsLayerRect() used renderBox.paddingBoxRectIncludingScrollbar()
to position layers inside composited overflow scroll, but this is wrong if the RTL left-side
scrollbar takes space.

Fix by making some static functions that we can call from the various places that ask
about box geometry, and using them.

Test: compositing/scrolling/async-overflow-scrolling/position-inside-rtl-overflow.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::overflowClipRect const):
(WebCore::RenderBox::clipRect const):
(WebCore::RenderBox::overflowClipRect): Deleted.
(WebCore::RenderBox::clipRect): Deleted.

  • rendering/RenderBox.h:

(WebCore::RenderBox::overflowClipRectForChildLayers const):
(WebCore::RenderBox::overflowClipRectForChildLayers): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::scrollContainerLayerBox):
(WebCore::clippingLayerBox):
(WebCore::overflowControlsHostLayerBox):
(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::clipBox): Deleted.

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::overflowClipRect const):
(WebCore::RenderTable::overflowClipRect): Deleted.

  • rendering/RenderTable.h:

LayoutTests:

  • compositing/scrolling/async-overflow-scrolling/position-inside-rtl-overflow-expected.txt: Added.
  • compositing/scrolling/async-overflow-scrolling/position-inside-rtl-overflow.html: Added.
  • platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/position-inside-rtl-overflow-expected.txt: Added.
6:27 PM Changeset in webkit [260481] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

JSC's options should be case insensitive
https://bugs.webkit.org/show_bug.cgi?id=210834

Reviewed by Yusuke Suzuki.

  • runtime/Options.cpp:

(JSC::Options::setOptionWithoutAlias):
(JSC::Options::setAliasedOption):

  • runtime/OptionsList.h:
5:57 PM Changeset in webkit [260480] by Alan Coon
  • 5 edits in branches/safari-609.2.9.1-branch/Source/WebCore

Cherry-pick r260301. rdar://problem/62083309

[WebGL] Confirm there are no errors when setting up framebuffers
https://bugs.webkit.org/show_bug.cgi?id=210632
<rdar://problem/61916680>

Reviewed by Simon Fraser.

We're seeing crashes on macOS inside GraphicsContextGL::reshape().
Specifically when we submit work at the end of the function via
glFlush.

At the moment the cause is a mystery, because we should bail out
before then if the multisample renderbuffer was not complete. In
the hope that it helps somewhat, add a call to glGetError to double
check that there isn't anything horribly wrong before we talk to
the GPU.

  • html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): If the underlying GCGL context was marked as "LOST" during initialization, skip the rest of our initialization.
  • html/canvas/WebGLRenderingContext.cpp: Ditto. (WebCore::WebGLRenderingContext::WebGLRenderingContext):
  • html/canvas/WebGLRenderingContextBase.cpp: Ditto. (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Check for a GL error during setup and, if there is one, skip directly into a LOST state. (WebCore::GraphicsContext3D::reshape):

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

5:56 PM Changeset in webkit [260479] by Russell Epstein
  • 539 edits
    19 adds
    160 deletes in branches/safari-610.1.11-branch/Source/ThirdParty/ANGLE

Revert r259589. rdar://problem/62141646

5:51 PM Changeset in webkit [260478] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebKit

Clean up QuickLookThumbnailLoader
<https://webkit.org/b/210814>

Reviewed by Darin Adler.

The following items are cleaned up:

  • Extract using PlatformImage into QuickLookThumbnailLoader.h, rename to CocoaImage and use to get rid of duplicate code.
  • Change id to instancetype for -init methods.
  • Add atomic keyword to @property definitions that were using it as the default. (Use of atomic properties is rare in WebKit, so being explicit avoids a scenario where it looks like nonatomic was left off by accident.)
  • Change @property definitions to readonly that are never written to outside of QuickLookThumbnailLoader.mm.
  • Delete unused @property definitions.
  • Change method declarations into read-only @property definitions.
  • Re-declare atomic read-only @property definitions in QuickLookThumbnailLoader.h as read-write definitions in QuickLookThumbnailLoader.mm if they are written to.
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::convertPlatformImageToBitmap):

  • UIProcess/QuickLookThumbnailLoader.h:
  • Rename qlThumbnailGenerationQueue @property to just queue.
  • Remove contentType @property. It is not used anywhere. This also fixes a theoretical leak found by the clang static analyzer.
  • Remove shouldWrite @property. It is only used within QuickLookThumbnailLoader.mm.
  • Change identifier and thumbnail to @property declarations.
  • UIProcess/QuickLookThumbnailLoader.mm:
  • Change WKQLThumbnailLoadOperation._identifier type from NSMutableString to NSString. There was no reason for it to be mutable.

(-[WKQLThumbnailQueueManager init]):
(-[WKQLThumbnailQueueManager dealloc]):

  • Release _queue to fix theoretical leak found by the clang static analyzer.

(-[WKQLThumbnailLoadOperation initWithAttachment:identifier:]):
(-[WKQLThumbnailLoadOperation initWithURL:identifier:]):
(-[WKQLThumbnailLoadOperation start]):

  • Rename req to request and use RetainPtr<>.
  • Change separate #if macros to #if/#else since only one version of this code can be used at a time.

(-[WKQLThumbnailLoadOperation thumbnail]):

  • Use CocoaImage to use one copy of the method.
5:29 PM Changeset in webkit [260477] by Fujii Hironori
  • 5 edits
    1 delete in trunk/Source/WTF

[Win] Use generic WorkQueue instead of WorkQueueWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=210785

Reviewed by Darin Adler.

WorkQueueWin was using random threads to execute dispatched
functions. This is not desired for IPC::Connection because it
needs to call CancelIo API in the same thread started aync
ReadFile operations.

Implemented RunLoop::dispatchAfter in RunLoopWin.cpp in order to
use generic WorkQueue.

  • wtf/PlatformWin.cmake:
  • wtf/RunLoop.h: Added DispatchTimer class for USE(WINDOWS_EVENT_LOOP).

(WTF::RunLoop::DispatchTimer::DispatchTimer):
(WTF::RunLoop::DispatchTimer::setFunction):

  • wtf/WorkQueue.h: Removed code for USE(WINDOWS_EVENT_LOOP).
  • wtf/win/RunLoopWin.cpp:

(WTF::RunLoop::dispatchAfter): Added.

  • wtf/win/WorkQueueWin.cpp: Removed.
5:27 PM Changeset in webkit [260476] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebKit

Fix extra/missing #undef statements
<https://webkit.org/b/210818>
<rdar://problem/61973329>

Reviewed by Chris Dumez.

  • UIProcess/Network/NetworkProcessProxy.cpp:
  • Remove #undef MESSAGE_CHECK_URL. It is no longer used.
  • UIProcess/WebPageProxy.cpp:
  • Add missing #undef MESSAGE_CHECK_COMPLETION.
  • Sort #undef in reverse order of #define.
  • UIProcess/mac/WebPageProxyMac.mm:
  • Add missing #undef MESSAGE_CHECK_WITH_RETURN_VALUE.
  • Sort #undef in reverse order of #define.
5:14 PM Changeset in webkit [260475] by Chris Dumez
  • 8 edits in trunk/Source/WebKit

REGRESSION(r260410) Frequent Network process crashes
https://bugs.webkit.org/show_bug.cgi?id=210825

Reviewed by Alex Christensen.

The webPageProxyID in the NetworkProcessProxy::DidNegotiateModernTLS() IPC was invalid because
NetworkProcessProxy::preconnectTo() was failing to initialize NetworkLoadParameters::webPageProxyID.
This patch addresses the issue.

No new tests, added new assertion that would be tripped by existing tests.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::NetworkLoad):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::preconnectTo):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::preconnectTo):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::preconnectTo):

5:03 PM Changeset in webkit [260474] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

PiP buttons shows up in element fullscreen when PiP is disabled in WKWebViewConfiguration
https://bugs.webkit.org/show_bug.cgi?id=210813

Reviewed by Eric Carlson.

Not currently testable; entering fullscreen never completes in the iOS TestWebKitAPI app
because that process is not a UI Application.

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(-[WKFullScreenViewController videoControlsManagerDidChange]):

4:12 PM Changeset in webkit [260473] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

[Cocoa] Don't bother compiling UpdateInfo since it's not used
https://bugs.webkit.org/show_bug.cgi?id=210819
<rdar://problem/61774766>

Reviewed by Darin Adler.

Since we don't use the UpdateInfo class in Cocoa builds, let's not
bother building it.

  • Shared/UpdateInfo.cpp:
  • Shared/UpdateInfo.h:
  • UIProcess/DrawingAreaProxy.h:
4:01 PM Changeset in webkit [260472] by fpizlo@apple.com
  • 3 edits in trunk/Websites/webkit.org

Unreviewed, check in some more files for a blog post.

  • blog-files/speculation-in-jsc/clobberize-dependence-graph.graffle:
  • blog-files/speculation-in-jsc/clobberize-dependence-graph.svg:
4:00 PM Changeset in webkit [260471] by Darin Adler
  • 4 edits
    2 deletes in trunk/LayoutTests

[Mac] Enable color well tests on modern WebKit
https://bugs.webkit.org/show_bug.cgi?id=210810

Reviewed by Alexey Proskuryakov.

When running tests I was informed of "unexpected passing" for the
test fast/css/pseudo-visited-background-color-on-input.html.
After doing some research, I found that we have tests of color well
that are still disabled on Mac even though we have implemented it
now, just not for legacy WebKit.

Looking at history I see these tests have been passing consistently
on bots. So changed their expectations to Pass, and also un-skipped
some other tests of the same feature that passed for me locally.

  • platform/mac-highsierra-wk1/*: Removed.
  • platform/mac-highsierra/*: Removed.
  • platform/mac-wk1/TestExpectations: Moved expectations here for tests

that we should not run because we don't have color wells enabled.

  • platform/mac-wk2/TestExpectations: Moved expectations here

for color well tests that still don't work in modern WebKit because we
need more support for dragging tests.

  • platform/mac/TestExpectations: Moved the expections *from* here.
3:55 PM Changeset in webkit [260470] by fpizlo@apple.com
  • 1 edit
    2 adds in trunk/Websites/webkit.org

Unreviewed, check in some more files for a blog post.

  • blog-files/speculation-in-jsc/clobberize-dependence-graph.graffle: Added.
  • blog-files/speculation-in-jsc/clobberize-dependence-graph.svg: Added.
3:53 PM Changeset in webkit [260469] by dbates@webkit.org
  • 2 edits in trunk/Tools

Attempt to fix the build after r260449
(https://bugs.webkit.org/show_bug.cgi?id=210697)

Wrap the C++ methods in namespace TestWebKitAPI so that IPhoneUserInterfaceSwizzler can be
used unqualified.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:
3:53 PM Changeset in webkit [260468] by Alan Coon
  • 1 copy in tags/Safari-610.1.10.2

Tag Safari-610.1.10.2.

3:49 PM Changeset in webkit [260467] by Alan Coon
  • 8 edits in branches/safari-610.1.10-branch/Source

Versioning.

3:37 PM Changeset in webkit [260466] by fpizlo@apple.com
  • 3 edits in trunk/Websites/webkit.org

Unreviewed, check in some more files for a blog post.

  • blog-files/speculation-in-jsc/abstract-heaps.graffle:
  • blog-files/speculation-in-jsc/abstract-heaps.svg:
3:33 PM Changeset in webkit [260465] by Alan Coon
  • 8 edits in branches/safari-609.2.9.1-branch/Source

Versioning.

3:33 PM Changeset in webkit [260464] by fpizlo@apple.com
  • 3 edits in trunk/Websites/webkit.org

Unreviewed, check in some more files for a blog post.

  • blog-files/speculation-in-jsc/abstract-heaps.graffle:
  • blog-files/speculation-in-jsc/abstract-heaps.svg:
3:27 PM Changeset in webkit [260463] by fpizlo@apple.com
  • 1 edit
    2 adds in trunk/Websites/webkit.org

Unreviewed, check in some more files for a blog post.

  • blog-files/speculation-in-jsc/abstract-heaps.graffle: Added.
  • blog-files/speculation-in-jsc/abstract-heaps.svg: Added.
3:21 PM Changeset in webkit [260462] by Alan Coon
  • 8 edits in branches/safari-609.2.9.0-branch/Source

Versioning.

2:50 PM Changeset in webkit [260461] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

One more build fix after r260407

  • Configurations/WebKit.xcconfig:
2:47 PM Changeset in webkit [260460] by Alan Coon
  • 1 copy in tags/Safari-610.1.10.1

Tag Safari-610.1.10.1.

2:45 PM Changeset in webkit [260459] by Alan Coon
  • 3 edits in branches/safari-610.1.10-branch/Source/WebKit

Cherry-pick r260137. rdar://problem/62131504

[iOS] Potential crash under WebProcess::platformInitializeWebProcess
https://bugs.webkit.org/show_bug.cgi?id=210547

Reviewed by Brent Fulgham.

If the UI process fails to issue an extension to the runningboard service, the WebContent process will crash
while trying to consume this extension.

No new tests, since the test runners are unsandboxed, so issuing the extension will always succeed.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):

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

2:45 PM Changeset in webkit [260458] by Alan Coon
  • 8 edits in branches/safari-610.1.10-branch/Source

Versioning.

2:34 PM Changeset in webkit [260457] by Alan Coon
  • 1 copy in branches/safari-609.2.9.3-branch

New branch.

2:34 PM Changeset in webkit [260456] by Alan Coon
  • 1 copy in branches/safari-609.2.9.2-branch

New branch.

2:33 PM Changeset in webkit [260455] by Alan Coon
  • 1 copy in branches/safari-609.2.9.1-branch

New branch.

2:33 PM Changeset in webkit [260454] by Alan Coon
  • 1 copy in branches/safari-609.2.9.0-branch

New branch.

2:22 PM Changeset in webkit [260453] by Chris Dumez
  • 10 edits in trunk/Source/WebKit

[iOS] Provide better names for ProcessThrottler process assertions
https://bugs.webkit.org/show_bug.cgi?id=210808

Reviewed by Geoffrey Garen.

Provide better names for ProcessThrottler process assertions, to facilitate debugging.

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/ProcessAssertion.cpp:

(WebKit::ProcessAssertion::ProcessAssertion):

  • UIProcess/ProcessAssertion.h:
  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::assertionName const):
(WebKit::ProcessThrottler::setAssertionType):

  • UIProcess/ProcessThrottler.h:
  • UIProcess/ProcessThrottlerClient.h:
  • UIProcess/WebProcessProxy.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):

1:52 PM Changeset in webkit [260452] by Darin Adler
  • 2 edits in trunk/Tools

WTF API test for StringConcatenate failing for internal Apple builds
https://bugs.webkit.org/show_bug.cgi?id=210812

Reviewed by Brent Fulgham.

  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:

(TestWebKitAPI::TEST): Add back a case for when UChar is uint16_t.

1:49 PM Changeset in webkit [260451] by Kate Cheney
  • 3 edits in trunk/Tools

Move WebKit.WebViewCategory test to InAppBrowserPrivacy.mm
https://bugs.webkit.org/show_bug.cgi?id=210811
<rdar://problem/60972505>

Reviewed by Alexey Proskuryakov.

This test was added before InAppBrowserPrivacy.mm existed. It should
be moved here so it has access to all setup/cleanup needed by these
tests.

  • TestWebKitAPI/Tests/WebKitCocoa/Configuration.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
1:36 PM Changeset in webkit [260450] by Simon Fraser
  • 3 edits
    2 adds in trunk

[Async overflow scroll] Overflow that's hidden on one axis is scrollable on that axis
https://bugs.webkit.org/show_bug.cgi?id=210771
<rdar://problem/62080331>

Reviewed by Tim Horton.

Source/WebCore:

eventCanScrollContents() should check the presence of enabled scrollbars, like
ScrollAnimator::handleWheelEvent() does.

Test: fast/scrolling/mac/async-scroll-overflow-hidden-on-one-axis.html

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::eventCanScrollContents const):

LayoutTests:

  • fast/scrolling/mac/async-scroll-overflow-hidden-on-one-axis-expected.txt: Added.
  • fast/scrolling/mac/async-scroll-overflow-hidden-on-one-axis.html: Added.
1:22 PM Changeset in webkit [260449] by dbates@webkit.org
  • 14 edits
    1 move in trunk

[iOS] -_didFinishTextInteractionInTextInputContext should only zoom to reveal focused element if it changed
https://bugs.webkit.org/show_bug.cgi?id=210697
<rdar://problem/60997530>

Source/WebCore:

Reviewed by Wenson Hsieh.

For now, add a comment about the return value of setFocusedElement: it returns
whether focus was blocked. If focused wasn't blocked then it will return true
even if the element wasn't actually focused. For example, it will return true
for non-focusable elements: <input disabled>.

I was tempted to fix setFocusedElement() to return true when it actually focused
the element or if the element was already focused, but I decided to defer this
until I audit the callers and run some tests.

  • dom/Document.h:

Source/WebKit:

Reviewed by Wenson Hsieh.

Add a new state variable to use to track whether -_focusTextInputContext invoked during a
text interaction actually focused an element. Then in -_didFinishTextInteractionInTextInputContext
condition marking the page to reveal the focused element on this state.

  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _willBeginTextInteractionInTextInputContext:]): Turn around and call the same
function on the content view.
(-[WKWebView _didFinishTextInteractionInTextInputContext:]): Ditto.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanUpInteraction]): Reset state.
(-[WKContentView _didCommitLoadForMainFrame]): Ditto.
(-[WKContentView _focusTextInputContext:placeCaretAt:completionHandler:]): Update state to
indicate whether the focusd element did change or not. I use bitwise ORing instead of strict
assignment to update it because this function can be called multiple times by an internal
Apple client during a text interaction (e.g. <rdar://problem/59430806>). I thought about
making this a FIXME, but this function is otherwise capable of handling multiple invocations
so I didn't.
(-[WKContentView _willBeginTextInteractionInTextInputContext:]): Reset added state.
(-[WKContentView _didFinishTextInteractionInTextInputContext:]): Check if state was set to
indicate that a focus change happened. If so, do what we do now + reset state. Otherwise,
do everything we do now except for marking the page as needing to reveal the focused element
on the next editor state update.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::focusTextInputContextAndPlaceCaret): Check that the target is focusable
before calling FocusController::setFocusedElement() because it ultimately calls Document::setFocusedElement()
that can return true for a non-focusable element. I added a comment in Document.h to explain
this subtlety. I also decided not to check the return value of FocusController::setFocusedElement().
Instead I am checking the more important condition that the focused element is the target
element. Passing true to visiblePositionInFocusedNodeForPoint() will ultimately assert this
to be true. Note that setFocusedElement() may not have done anything as m_focusedElement
could have already been equal to the target element. This is OK and I still update the
caret position.

Tools:

Reviewed by Wenson Hsieh.

I use the term "assisted" below and in the tests to describe an element that is both DOM
focused and the UI process is showing an input view (like the software keyboard) for it.
For many of the tests I check for a zoom scale change as a way to detect if the page
zoomed to reveal the focused element.

Add some tests for the following cases:

  1. Place the caret in a focused field that isn't being assisted.
  2. Focusing an assisted element should not scroll the page.
  3. Focusing an offscreen read-only element should not change zoom scale.
  4. Focusing an offscreen element should change the zoom scale.
  5. Calling -_focusTextInputContext on an offscreen element multiple times during a text interaction should change the zoom scale. The purpose of this test is to ensure that later calls that do not focus the element (because it is already focused) don't prevent zooming for the first call that did focus the element.
  6. Focusing an offscreen element, defocusing it, disabling it, and focusing it again during a text interaction should not change zoom scale.
  7. Focusing an offscreen element, defocusing it, and focusing it again during a text interaction should change zoom scale.
  8. Focusing an assisted element during a text interaction should not change zoom scale.
  9. Focusing a non-assisted focused element during a text interaction should change zoom scale.

While I am here, I consolidated the RAII helper classes IPhoneUserInterfaceSwizzler and
IPadUserInterfaceSwizzler into a single UserInterfaceSwizzler templated class and defined
the former two as template instances.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(TextInteractionForScope::TextInteractionForScope):
(TextInteractionForScope::~TextInteractionForScope):
Added convenience RAII object to call -_willBeginTextInteractionInTextInputContext
and -_didFinishTextInteractionInTextInputContext.
(TEST): Added.

  • TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
  • TestWebKitAPI/ios/IPadUserInterfaceSwizzler.h: Removed.
  • TestWebKitAPI/ios/PreferredContentMode.mm:

(IPhoneUserInterfaceSwizzler::IPhoneUserInterfaceSwizzler): Deleted; movedinto UserInterfaceSwizzler.h.
(IPhoneUserInterfaceSwizzler::phoneUserInterfaceIdiom): Deleted; no longer needed.

  • TestWebKitAPI/ios/UserInterfaceSwizzler.h: Renamed from Tools/TestWebKitAPI/ios/IPadUserInterfaceSwizzler.h.

(TestWebKitAPI::UserInterfaceSwizzler::UserInterfaceSwizzler): Formerly named IPadUserInterfaceSwizzler;
repurposed into general purpose template class, consolidating code from PreferredContentMode.mm.
Privately inherits from InstanceMethodSwizzler instead of using composition as that simplifies
the source code a tiny bit.
(TestWebKitAPI::UserInterfaceSwizzler::effectiveUserInterfaceIdiom): Renamed; formerly padUserInterfaceIdiom.

1:21 PM Changeset in webkit [260448] by Andres Gonzalez
  • 4 edits in trunk/Source/WebCore

Fix for remoteParentObject and platformWidget not being stored properly in the AXIsolatedObject attributes variant.
https://bugs.webkit.org/show_bug.cgi?id=210809

Reviewed by Chris Fleizach.

Adding these properties to the AXIsolatedObject attributes variant as
WeakPtr<void*> fails. So they are now cached as member variables.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::platformWidget const):

  • accessibility/isolatedtree/AXIsolatedObject.h:

(WebCore::AXIsolatedObject::propertyValue const): Deleted.

  • accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:

(WebCore::AXIsolatedObject::initializePlatformProperties):
(WebCore::AXIsolatedObject::remoteParentObject const):

12:18 PM Changeset in webkit [260447] by Alexey Shvayka
  • 6 edits in trunk

constructObjectFromPropertyDescriptor() is incorrect with partial descriptors
https://bugs.webkit.org/show_bug.cgi?id=184629

Reviewed by Ross Kirsling.

JSTests:

  • test262/expectations.yaml: Mark 4 test cases as passing.

Source/JavaScriptCore:

Before this change, constructObjectFromPropertyDescriptor() serialized a value-only descriptor
with nullish m_seenAttributes to {value, writable: false, enumerable: false, configurable: false}
instead of just {value}. This was observable when ordinarySetSlow() was called on a Proxy
receiver with "defineProperty" trap.

This patch makes constructObjectFromPropertyDescriptor() 1:1 with the spec [2], aligning JSC
with V8 and SpiderMonkey, and also cleans up its call sites from handling exceptions and
undefined value returns.

[1]: https://tc39.es/ecma262/#sec-ordinarysetwithowndescriptor (step 3.d.iv)
[2]: https://tc39.es/ecma262/#sec-frompropertydescriptor

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyDescriptors):

  • runtime/ObjectConstructor.h:

(JSC::constructObjectFromPropertyDescriptor):

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performDefineOwnProperty):

11:42 AM Changeset in webkit [260446] by timothy@apple.com
  • 4 edits in trunk

Reset m_userScriptsNotified when web process crashes.
https://bugs.webkit.org/show_bug.cgi?id=210807

Reviewed by Alex Christensen.

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebPageProxy::resetStateAfterProcessExited): Set m_userScriptsNotified to false.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST): Test crashing the web process and reloading.

11:17 AM Changeset in webkit [260445] by Simon Fraser
  • 6 edits
    4 adds in trunk

Horizontal overflow overlay scrollbar is misplaced in RTL
https://bugs.webkit.org/show_bug.cgi?id=210673
<rdar://problem/61950751>

Reviewed by Antti Koivisto.
Source/WebCore:

Code for positioning RenderLayer overflow controls (scrollbars and scroll corner)
was scattered across lots of different functions, making it hard to follow,
and prone to bugs.

Fix by making one source of truth, overflowControlsRects(), which computes
rects for the two scrollbars, the "scroll corner" (the square in the corner which
shows, only for non-overlay scrollbars, when both scrollbars or the resize control
is visible), and the resize control which shows when style specifies the "resize" property.

Call this function in all the places that need to know about overflow control
geometry. RenderLayer::hitTestResizerInFragments() is a little tricky because it wants
the resize control relative to the fragment rect; achieve this by computing the position
of the resizer rect relative to the border box, then shifting it into position relative
to the fragment bounds (which include border).

Test: compositing/overflow/rtl-scrollbar-layer-positioning.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::selectCursor):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollCornerRect const):
(WebCore::RenderLayer::overflowControlsRects const):
(WebCore::RenderLayer::scrollbarOffset const):
(WebCore::RenderLayer::invalidateScrollbarRect):
(WebCore::RenderLayer::positionOverflowControls):
(WebCore::RenderLayer::overflowControlsIntersectRect const):
(WebCore::RenderLayer::paintResizer):
(WebCore::RenderLayer::isPointInResizeControl const):
(WebCore::RenderLayer::hitTestOverflowControls):
(WebCore::RenderLayer::hitTestResizerInFragments const):
(WebCore::cornerStart): Deleted.
(WebCore::cornerRect): Deleted.
(WebCore::resizerCornerRect): Deleted.
(WebCore::RenderLayer::scrollCornerAndResizerRect const): Deleted.
(WebCore::RenderLayer::rectForHorizontalScrollbar const): Deleted.
(WebCore::RenderLayer::rectForVerticalScrollbar const): Deleted.
(WebCore::RenderLayer::verticalScrollbarStart const): Deleted.
(WebCore::RenderLayer::horizontalScrollbarStart const): Deleted.

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

(WebCore::RenderLayerBacking::requiresScrollCornerLayer const):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::paintContents):

LayoutTests:

  • compositing/overflow/rtl-scrollbar-layer-positioning-expected.txt: Added.
  • compositing/overflow/rtl-scrollbar-layer-positioning.html: Added.
  • platform/ios-wk2/compositing/overflow/rtl-scrollbar-layer-positioning-expected.txt: Added.
  • platform/mac-wk1/compositing/overflow/rtl-scrollbar-layer-positioning-expected.txt: Added.
11:13 AM Changeset in webkit [260444] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[ews] Display error message when submit for EWS analysis button doesn't work
https://bugs.webkit.org/show_bug.cgi?id=210803

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-app/ews/views/submittoews.py:

(SubmitToEWS.post): Display relevant error message on submit for EWS analysis button failure.

  • BuildSlaveSupport/ews-app/ews/fetcher.py:

(BugzillaPatchFetcher.fetch):
(BugzillaPatchFetcher.send_patches_to_buildbot):

  • BuildSlaveSupport/ews-app/ews/config.py: Add few more error codes.
11:10 AM Changeset in webkit [260443] by ysuzuki@apple.com
  • 1 edit
    1 move in trunk/JSTests

Move value-pow-ai-rule-should-box-the-same-way-as-the-runtime.js to JSTests/stress/
https://bugs.webkit.org/show_bug.cgi?id=210805

Reviewed by Saam Barati.

r251408 accidentally puts value-pow-ai-rule-should-box-the-same-way-as-the-runtime.js in JSTests/ instead of JSTests/stress/.
This patch fixes that.

  • stress/value-pow-ai-rule-should-box-the-same-way-as-the-runtime.js: Renamed from JSTests/value-pow-ai-rule-should-box-the-same-way-as-the-runtime.js.
10:50 AM Changeset in webkit [260442] by Lauro Moura
  • 2 edits
    1 delete in trunk/Tools

[GStreamer][JHBuild] Update to 1.16.2
https://bugs.webkit.org/show_bug.cgi?id=210730

Reviewed by Philippe Normand.

Moving the bots closer to the flatpak SDK versions.

  • gstreamer/jhbuild.modules:
  • gstreamer/patches/base-0001-glupload-Add-VideoMetas-and-GLSyncMeta-to-the-raw-up.patch: Removed.
10:48 AM Changeset in webkit [260441] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build

  • Configurations/WebKit.xcconfig:
10:30 AM Changeset in webkit [260440] by ddkilzer@apple.com
  • 6 edits in trunk/Source/WebKit

[IPC hardening] ShareableResource::create() should validate its parameters
<https://webkit.org/b/210779>
<rdar://problem/60887693>

Reviewed by Chris Dumez.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::store):

  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord const):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::didFinishLoadForQuickLookDocumentInMainFrame):

  • Handle nullptr returned from ShareableResource::create().
  • Shared/ShareableResource.cpp:

(WebKit::ShareableResource::create):

  • Change to return RefPtr<>.
  • Validate parameters before calling constructor. Return nullptr on failure.

(WebKit::ShareableResource::ShareableResource):

  • Remove assert and comment since checks are now done in ShareableResource::create().
  • Shared/ShareableResource.h:

(WebKit::ShareableResource::create):

  • Change to return RefPtr<>.
10:28 AM Changeset in webkit [260439] by Alan Coon
  • 1 copy in tags/Safari-609.2.9

Tag Safari-609.2.9.

10:27 AM Changeset in webkit [260438] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKitLegacy/win

Cherry-pick r257802. rdar://problem/62093679

[Win] API header file has USE macro
https://bugs.webkit.org/show_bug.cgi?id=208534

Reviewed by Brent Fulgham.

USE macros should not be used in API header files.

  • WebKitCOMAPI.h:

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

10:25 AM Changeset in webkit [260437] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source

Versioning.

10:20 AM Changeset in webkit [260436] by svillar@igalia.com
  • 13 edits
    21 deletes in trunk

Unreviewed, reverting r260432.

Broke WPE build

Reverted changeset:

"[WebXR] Test IDLs and stubs"
https://bugs.webkit.org/show_bug.cgi?id=209859
https://trac.webkit.org/changeset/260432

10:14 AM Changeset in webkit [260435] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

REGRESSION (r256808): “A problem repeatedly occurred” when attempting to load https://bungalow.com/listings/bay-area
https://bugs.webkit.org/show_bug.cgi?id=210801
<rdar://problem/61658940>

Reviewed by Antti Koivisto.

Even though the page uses the 'async' attribute on the mapbox-gl.js script, deferring the execution of this
script gets the page into a bad state, causing it to use a lot of CPU & memory until the process crashes.
Since we don't have any other evidence of breakage from r256808 yet and since r256808 was a massive PLT
progression, I am opting to add a quirk to disable the async script optimization on bungalow.com for now.

  • dom/Document.cpp:

(WebCore::Document::shouldDeferAsynchronousScriptsUntilParsingFinishes const):

  • page/Quirks.cpp:

(WebCore::Quirks::shouldBypassAsyncScriptDeferring const):

  • page/Quirks.h:
  • platform/RegistrableDomain.h:

(WebCore::RegistrableDomain::operator== const):

10:10 AM Changeset in webkit [260434] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Check Structure attributes in Object.assign exhaustively
https://bugs.webkit.org/show_bug.cgi?id=210782
<rdar://problem/62065853>

Reviewed by Mark Lam.

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorAssign):

9:58 AM Changeset in webkit [260433] by ap@apple.com
  • 2 edits in trunk/Tools

Correct the path to libclang_rt.asan_iossim_dynamic.dylib in LC_RPATH
https://bugs.webkit.org/show_bug.cgi?id=210770
rdar://problem/61904541

Reviewed by Alex Christensen.

  • asan/asan.xcconfig:
9:30 AM Changeset in webkit [260432] by svillar@igalia.com
  • 13 edits
    16 copies
    5 adds in trunk

[WebXR] Test IDLs and stubs
https://bugs.webkit.org/show_bug.cgi?id=209859

Reviewed by Dean Jackson and Youenn Fablet.

Source/WebCore:

WebXR testing is hard as it might involve interaction with actual
devices. That's why the WebXR testing
API (https://immersive-web.github.io/webxr-test-api/) was
proposed. In fact, all the current WebXR tests from
web-platform-tests are using that testing API. This new testing
API supplements navigator.xr and is accessed through
navigator.xr.test.

In order not to expose the API to the web we're adding the XRTest
interface to Internals instead. The mapping from internals.xrTest to
navigator.xr.test happens in the WPT code.

We're adding the required IDLs and very basic (mostly empty)
implementations for testing methods. We're adding testing
infrastructure, adding tests make no sense for this change.

  • CMakeLists.txt: Added new files.
  • DerivedSources.make: Ditto.
  • Modules/webxr/NavigatorWebXR.h: Export API to be used in testing code.
  • Modules/webxr/WebXRSystem.h: Export ::from and ::xr methods.
  • Sources.txt: Added new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • bindings/js/WebCoreBuiltinNames.h: Added some new macros.
  • testing/FakeXRBoundsPoint.h: Added.
  • testing/FakeXRBoundsPoint.idl: Added.
  • testing/FakeXRButtonStateInit.h: Added.
  • testing/FakeXRButtonStateInit.idl: Added.
  • testing/FakeXRInputSourceInit.h: Added.
  • testing/FakeXRInputSourceInit.idl: Added.
  • testing/FakeXRRigidTransformInit.h: Added.
  • testing/FakeXRRigidTransformInit.idl: Added.
  • testing/FakeXRViewInit.h: Added.
  • testing/FakeXRViewInit.idl: Added.
  • testing/Internals.cpp:

(WebCore::Internals::xrTest): Added WebXRTest to Internals.

  • testing/Internals.h: Added xrTest() accessor.
  • testing/Internals.idl: Added xrTest attribute.
  • testing/WebFakeXRDevice.cpp: Added.

(WebCore::WebFakeXRDevice::setViews):
(WebCore::WebFakeXRDevice::disconnect):
(WebCore::WebFakeXRDevice::setViewerOrigin):
(WebCore::WebFakeXRDevice::clearViewerOrigin):
(WebCore::WebFakeXRDevice::simulateVisibilityChange):
(WebCore::WebFakeXRDevice::setBoundsGeometry):
(WebCore::WebFakeXRDevice::setFloorOrigin):
(WebCore::WebFakeXRDevice::clearFloorOrigin):
(WebCore::WebFakeXRDevice::simulateResetPose):
(WebCore::WebFakeXRDevice::simulateInputSourceConnection):

  • testing/WebFakeXRDevice.h: Added.
  • testing/WebFakeXRDevice.idl: Added.
  • testing/WebFakeXRInputController.cpp: Added.

(WebCore::WebFakeXRInputController::setHandedness):
(WebCore::WebFakeXRInputController::setTargetRayMode):
(WebCore::WebFakeXRInputController::setProfiles):
(WebCore::WebFakeXRInputController::setGripOrigin):
(WebCore::WebFakeXRInputController::clearGripOrigin):
(WebCore::WebFakeXRInputController::setPointerOrigin):
(WebCore::WebFakeXRInputController::disconnect):
(WebCore::WebFakeXRInputController::reconnect):
(WebCore::WebFakeXRInputController::startSelection):
(WebCore::WebFakeXRInputController::endSelection):
(WebCore::WebFakeXRInputController::simulateSelect):
(WebCore::WebFakeXRInputController::setSupportedButtons):
(WebCore::WebFakeXRInputController::updateButtonState):

  • testing/WebFakeXRInputController.h: Added.
  • testing/WebFakeXRInputController.idl: Added.
  • testing/WebXRTest.cpp: Added.

(WebCore::WebXRTest::simulateDeviceConnection const):
(WebCore::WebXRTest::simulateUserActivation):
(WebCore::WebXRTest::disconnectAllDevices):

  • testing/WebXRTest.h: Added.

(WebCore::WebXRTest::create):

  • testing/WebXRTest.idl: Added.
  • testing/XRSimulateUserActivationFunction.h: Added.
  • testing/XRSimulateUserActivationFunction.idl: Ditto.

LayoutTests:

  • platform/wpe/TestExpectations: Added bug number to the passing webxr test.
9:21 AM Changeset in webkit [260431] by cturner@igalia.com
  • 3 edits in trunk/Source/WTF

[Clang 10] Fix warning: definition of implicit copy assignment operator for 'PageBlock' is deprecated because it has a user-declared copy constructor
https://bugs.webkit.org/show_bug.cgi?id=210748

Reviewed by Adrian Perez de Castro.

Recent Clang's will issue a warning if you declare an explicit
copy construction, but leave the compiler to fill in an implicit
assignment operator. I think this is to catch cases where you do
something exciting in an assignment operator/copy constructor and
forget to do the same exciting thing in the other.

  • wtf/PageAllocation.h: Import the base's constructor to avoid

defining our own identical one.

  • wtf/PageBlock.h: Remove trivial constructor and replace with

member initializers. Remove copy constructor. This looks identical
to what the compiler would generate anyway.

9:12 AM Changeset in webkit [260430] by clopez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Gardening of WPT tests for Intersection Observer v2 after r260388

Unreviewed.

  • platform/gtk/TestExpectations: Due to the override for Pass/Fail in the folder above

its needed to repeat the Skip expectation here to avoid the Missing result.

9:05 AM Changeset in webkit [260429] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[Cocoa] Tighten up some more IPC message checks in WebPasteboardProxy
https://bugs.webkit.org/show_bug.cgi?id=210780
<rdar://problem/62088479>

Reviewed by Alex Christensen.

Adjust some existing IPC message checks in WebPasteboardProxy, and also introduces some new ones. See below for
more details.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::didModifyContentsOfPasteboard):

Move the pasteboardName check here out of didModifyContentsOfPasteboard, and into each call site, such that
we bail and kill the web process before invoking didModifyContentsOfPasteboard in the case where the name is
empty.

(WebKit::WebPasteboardProxy::getPasteboardPathnamesForType):
(WebKit::WebPasteboardProxy::getPasteboardStringForType):
(WebKit::WebPasteboardProxy::getPasteboardStringsForType):
(WebKit::WebPasteboardProxy::getPasteboardBufferForType):
(WebKit::WebPasteboardProxy::addPasteboardTypes):
(WebKit::WebPasteboardProxy::setPasteboardTypes):
(WebKit::WebPasteboardProxy::setPasteboardURL):
(WebKit::WebPasteboardProxy::setPasteboardColor):
(WebKit::WebPasteboardProxy::setPasteboardStringForType):

Add message checks for empty pasteboard types.

(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
(WebKit::WebPasteboardProxy::writeCustomData):
(WebKit::WebPasteboardProxy::readStringFromPasteboard):
(WebKit::WebPasteboardProxy::readBufferFromPasteboard):
(WebKit::WebPasteboardProxy::writeURLToPasteboard):
(WebKit::WebPasteboardProxy::writeWebContentToPasteboard):
(WebKit::WebPasteboardProxy::writeImageToPasteboard):
(WebKit::WebPasteboardProxy::writeStringToPasteboard):

Add a message check for empty pasteboard types, but only when the string is also empty; this is because iOS
clears pasteboard data by writing an empty pasteboard string and type.

8:51 AM Changeset in webkit [260428] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[Flatpak SDK] Keep env variable 'RESULTS_SERVER_API_KEY'
https://bugs.webkit.org/show_bug.cgi?id=210798

Reviewed by Philippe Normand.

The variable is needed by several bot steps to upload results.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

8:26 AM Changeset in webkit [260427] by Adrian Perez de Castro
  • 7 edits
    1 delete in trunk

[GTK][CMake] Make gtk-unix-print a component of FindGTK.cmake
https://bugs.webkit.org/show_bug.cgi?id=210792

Reviewed by Carlos Garcia Campos.

.:

  • Source/cmake/FindGTK.cmake: Support an "unix-print" component.
  • Source/cmake/FindGTKUnixPrint.cmake: Removed.
  • Source/cmake/OptionsGTK.cmake: Use the "unix-print" component of the GTK find module.

Source/WebKit:

No new tests needed.

  • PlatformGTK.cmake: Use the GTK::UnixPrint imported target.

Tools:

  • TestWebKitAPI/glib/PlatformGTK.cmake: Use the GTK::UnixPrint imported target.
6:26 AM Changeset in webkit [260426] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak SDK] Silence git stderr output
https://bugs.webkit.org/show_bug.cgi?id=210789

Reviewed by Sergio Villar Senin.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.is_branch_build): Don't display git errors, usually
emitted when operating on a SVN checkout.

5:31 AM Changeset in webkit [260425] by Claudio Saavedra
  • 4 edits in trunk/Source

[GTK4] Adapt to GtkIconTheme API changes
https://bugs.webkit.org/show_bug.cgi?id=210745

Reviewed by Adrian Perez de Castro.

Source/WebCore:

No new tests needed.

GtkIconTheme changes in GTK and since we're no longer following
the theme we can drop the missing image from the icon theme, so remove
now unnecessary code.

  • platform/graphics/gtk/ImageGtk.cpp:

(WebCore::Image::loadPlatformResource): Directly load image from compiled
GResource.
(WebCore::loadResourceSharedBuffer): Deleted.
(WebCore::loadMissingImageIconFromTheme): Deleted.

Source/WTF:

  • wtf/glib/GTypedefs.h: Remove unneeded GtkIconInfo definition.
3:33 AM Changeset in webkit [260424] by svillar@igalia.com
  • 4 edits in trunk/LayoutTests/imported/w3c

Import latest changes from web-platform-test/webxr/resources to enable testing in WebKit
https://bugs.webkit.org/show_bug.cgi?id=210788

Reviewed by Žan Doberšek.

We landed in wpt new code in webxr_utils.js to map internal.xrTest to
navigator.xr.test to be able to run WebXR WPT in WebKit. Import those changes
from upstream in order to be able to run the tests.

Apart from that we take the chance to import the latest fixes to the
files in resources/ directory.

  • web-platform-tests/webxr/resources/webxr_test_constants.js: Updated.
  • web-platform-tests/webxr/resources/webxr_test_constants_fake_world.js:

(createFakeWorld): Ditto.

  • web-platform-tests/webxr/resources/webxr_util.js: Map internals.xrTest

to navigator.xr.test for WebKit browsers.
(xr_debug): Updated.
(async xr_session_promise_test): Ditto.
(xr_promise_test): Deleted.

3:31 AM Changeset in webkit [260423] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Exit early in FrameLoader::loadURL when redirecting to another frame
https://bugs.webkit.org/show_bug.cgi?id=210751

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-21
Reviewed by Geoffrey Garen.

Exit early in FrameLoader::loadURL when redirecting to another frame, previously we were preparing
request needlessly, doing it twice in case of frame redirecting. Also move some variables to
where they are actually used.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

  • loader/FrameLoader.h:
3:28 AM Changeset in webkit [260422] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

[ARMv7][EWS] stress/check-stack-overflow-before-value-profiling-arguments.js is failing
https://bugs.webkit.org/show_bug.cgi?id=210720

Unreviewed gardening.

Skip test on arm since it is failing on EWS, causing significant delays.

Patch by Paulo Matos <Paulo Matos> on 2020-04-21

  • stress/check-stack-overflow-before-value-profiling-arguments.js:
2:52 AM Changeset in webkit [260421] by commit-queue@webkit.org
  • 8 edits in trunk/JSTests

Re-enable previously skipped mips tests
https://bugs.webkit.org/show_bug.cgi?id=209964

Patch by Paulo Matos <Paulo Matos> on 2020-04-21
Reviewed by Mark Lam.

Followup to r259454 - where we re-enabled a few stress tests for arm.

  • stress/JSArrayBufferView-byteOffset-is-racy-from-compiler-thread.js:
  • stress/dont-range-based-iterate-vector-that-is-mutated.js:
  • stress/ensure-code-block-is-not-precise-allocation.js:
  • stress/generator-cell-with-type.js:
  • stress/racy-slow-put-cloned-arguments-when-having-a-bad-time.js:
  • stress/symbol-is-destructed-before-refing-underlying-symbol-impl.js:
  • stress/toctou-having-a-bad-time-new-array.js:
1:47 AM Changeset in webkit [260420] by Carlos Garcia Campos
  • 3 edits
    1 delete in trunk/Source/WebCore

[GTK] Remove PlatformMouseEventGtk
https://bugs.webkit.org/show_bug.cgi?id=210743

Reviewed by Adrian Perez de Castro.

It's unused, we no longer create PlatformMouseEvent from a GdkEvent since WebKit2.

  • SourcesGTK.txt:
  • platform/PlatformMouseEvent.h:
  • platform/gtk/PlatformMouseEventGtk.cpp: Removed.
1:41 AM Changeset in webkit [260419] by Philippe Normand
  • 5 edits in trunk

Source/WebKit:
[CMake] gst-build-backed build fails
https://bugs.webkit.org/show_bug.cgi?id=210742

Reviewed by Xabier Rodriguez-Calvar.

  • PlatformWPE.cmake:

Tools:
[CMake][Flatpak SDK] gst-build-backed build fails
https://bugs.webkit.org/show_bug.cgi?id=210742

Reviewed by Xabier Rodriguez-Calvar.

Add non-core GStreamer include-dirs necessary for the compilation
of the GStreamer API test. Usually GSTREAMER_INCLUDE_DIRS is
sufficient because on a GStreamer system-wide installation, all
headers are stored in the same root include dir, the same as the
core GStreamer library.

But when building with gst-build, include-dirs are scattered all
over the place.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
1:38 AM Changeset in webkit [260418] by Claudio Saavedra
  • 2 edits in trunk/Source/WebCore

[GTK4] Fix platform GDK includes
https://bugs.webkit.org/show_bug.cgi?id=210746

Reviewed by Carlos Garcia Campos.

  • platform/graphics/PlatformDisplay.cpp: Wayland, X11, etc.

platform includes changed path, so update accordingly.

12:48 AM Changeset in webkit [260417] by Adrian Perez de Castro
  • 13 edits in trunk/Source

Non-unified build fixes late February 2020 edition
https://bugs.webkit.org/show_bug.cgi?id=210767

Unreviewed build fix.

Source/JavaScriptCore:

  • dfg/DFGValueRepReductionPhase.cpp: Add missing JSCJSValueInlines.h header.
  • jit/JITCall.cpp: Add missing SlowPathCall.h header.
  • runtime/AggregateError.cpp: Add missing JSCJSValueInlines.h, JSCellInlines.h, and

JSGlobalObjectInlines.h headers.

  • runtime/AggregateErrorConstructor.cpp: Added missing JSCJSValueInlines.h, JSCellInlines.h,

and VMInlines.h headers.

  • runtime/AggregateErrorPrototype.cpp: Added missing AggregateError.h, IdentifierInlines.h,

JSCJSValueInlines.h, JSCellInlines.h, JSGlobalObjectInlines.h, and VMInlines.h headers.

  • runtime/Intrinsic.h: Added missing wtf/Optional.h header.

Source/WebCore:

No new tests needed.

  • css/MediaQueryListEvent.cpp: Add missing wtf/IsoMallocInlines.h header.
  • css/MediaQueryMatcher.cpp: Add missing MediaQueryListEvent.h header.
  • platform/graphics/FloatQuad.cpp: Add missing wtf/text/TextStream.h header.

Source/WebKit:

  • NetworkProcess/NetworkResourceLoadMap.h: Add missing wtf/Function.h header.

Apr 20, 2020:

11:59 PM Changeset in webkit [260416] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update expectations after r260356
https://bugs.webkit.org/show_bug.cgi?id=210786

Unreviewed gardening.

  • platform/gtk/TestExpectations:
11:11 PM Changeset in webkit [260415] by Ross Kirsling
  • 222 edits in trunk

Classes marked final should not use protected access specifier
https://bugs.webkit.org/show_bug.cgi?id=210775

Reviewed by Daniel Bates.

Source/JavaScriptCore:

  • API/JSAPIValueWrapper.h:
  • API/JSCallbackConstructor.h:
  • API/JSCallbackObject.h:
  • b3/B3ExtractValue.h:
  • bytecode/UnlinkedFunctionExecutable.h:
  • inspector/JSGlobalObjectConsoleClient.h:
  • inspector/JSInjectedScriptHost.h:
  • inspector/JSJavaScriptCallFrame.h:
  • jsc.cpp:
  • runtime/AggregateError.h:
  • runtime/AggregateErrorPrototype.h:
  • runtime/ArrayConstructor.h:
  • runtime/ArrayPrototype.h:
  • runtime/AsyncFunctionPrototype.h:
  • runtime/AsyncGeneratorFunctionPrototype.h:
  • runtime/AtomicsObject.h:
  • runtime/BigIntConstructor.h:
  • runtime/BigIntObject.h:
  • runtime/BigIntPrototype.h:
  • runtime/BooleanConstructor.h:
  • runtime/BooleanPrototype.h:
  • runtime/ConsoleObject.h:
  • runtime/DateConstructor.h:
  • runtime/DatePrototype.h:
  • runtime/ErrorConstructor.h:
  • runtime/ErrorPrototype.h:
  • runtime/FileBasedFuzzerAgent.h:
  • runtime/FunctionPrototype.h:
  • runtime/FunctionRareData.h:
  • runtime/GeneratorFunctionPrototype.h:
  • runtime/GenericTypedArrayView.h:
  • runtime/InspectorInstrumentationObject.h:
  • runtime/IntlCollator.h:
  • runtime/IntlCollatorConstructor.h:
  • runtime/IntlCollatorPrototype.h:
  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatConstructor.h:
  • runtime/IntlDateTimeFormatPrototype.h:
  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatConstructor.h:
  • runtime/IntlNumberFormatPrototype.h:
  • runtime/IntlPluralRules.h:
  • runtime/IntlPluralRulesConstructor.h:
  • runtime/IntlPluralRulesPrototype.h:
  • runtime/IntlRelativeTimeFormatConstructor.h:
  • runtime/IntlRelativeTimeFormatPrototype.h:
  • runtime/JSArrayBuffer.h:
  • runtime/JSArrayBufferConstructor.h:
  • runtime/JSArrayBufferPrototype.h:
  • runtime/JSAsyncGenerator.h:
  • runtime/JSBoundFunction.h:
  • runtime/JSCustomGetterSetterFunction.h:
  • runtime/JSDataView.h:
  • runtime/JSDataViewPrototype.h:
  • runtime/JSGenerator.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGenericTypedArrayViewConstructor.h:
  • runtime/JSGenericTypedArrayViewPrototype.h:
  • runtime/JSGlobalLexicalEnvironment.h:
  • runtime/JSModuleLoader.h:
  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSNativeStdFunction.h:
  • runtime/JSONObject.h:
  • runtime/JSObject.h:
  • runtime/JSTemplateObjectDescriptor.h:
  • runtime/JSTypedArrayViewConstructor.h:
  • runtime/JSTypedArrayViewPrototype.h:
  • runtime/MathObject.h:
  • runtime/NativeExecutable.h:
  • runtime/NumberConstructor.h:
  • runtime/NumberPrototype.h:
  • runtime/ObjectConstructor.h:
  • runtime/ObjectPrototype.h:
  • runtime/PredictionFileCreatingFuzzerAgent.h:
  • runtime/ReflectObject.h:
  • runtime/RegExp.h:
  • runtime/RegExpConstructor.h:
  • runtime/RegExpObject.h:
  • runtime/RegExpPrototype.h:
  • runtime/StringPrototype.h:
  • runtime/Structure.h:
  • runtime/Symbol.h:
  • runtime/SymbolConstructor.h:
  • runtime/SymbolObject.h:
  • runtime/SymbolPrototype.h:
  • runtime/VMTraps.cpp:
  • testRegExp.cpp:
  • wasm/WasmBBQPlan.h:
  • wasm/WasmLLIntPlan.h:
  • wasm/WasmWorklist.cpp:
  • wasm/js/JSWebAssembly.h:
  • wasm/js/JSWebAssemblyCompileError.h:
  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyLinkError.h:
  • wasm/js/JSWebAssemblyRuntimeError.h:
  • wasm/js/WebAssemblyCompileErrorConstructor.h:
  • wasm/js/WebAssemblyCompileErrorPrototype.h:
  • wasm/js/WebAssemblyGlobalConstructor.h:
  • wasm/js/WebAssemblyGlobalPrototype.h:
  • wasm/js/WebAssemblyInstanceConstructor.h:
  • wasm/js/WebAssemblyInstancePrototype.h:
  • wasm/js/WebAssemblyLinkErrorConstructor.h:
  • wasm/js/WebAssemblyLinkErrorPrototype.h:
  • wasm/js/WebAssemblyMemoryConstructor.h:
  • wasm/js/WebAssemblyMemoryPrototype.h:
  • wasm/js/WebAssemblyModuleConstructor.h:
  • wasm/js/WebAssemblyModulePrototype.h:
  • wasm/js/WebAssemblyRuntimeErrorConstructor.h:
  • wasm/js/WebAssemblyRuntimeErrorPrototype.h:
  • wasm/js/WebAssemblyTableConstructor.h:
  • wasm/js/WebAssemblyTablePrototype.h:
  • wasm/js/WebAssemblyWrapperFunction.h:

Source/WebCore:

  • Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
  • Modules/applepay/ApplePayValidateMerchantEvent.h:
  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h:
  • Modules/webaudio/BiquadDSPKernel.h:
  • Modules/webaudio/WaveShaperDSPKernel.h:
  • Modules/websockets/WebSocketChannel.h:
  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • Modules/webxr/WebXRSession.h:
  • Modules/webxr/WebXRSystem.h:
  • accessibility/AccessibilityARIAGridCell.h:
  • accessibility/AccessibleSetValueEvent.h:
  • animation/CSSAnimation.h:
  • bindings/js/ReadableStream.h:
  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • css/CSSImageSetValue.h:
  • html/HTMLKeygenElement.cpp:
  • html/canvas/WebGLBuffer.h:
  • html/canvas/WebGLFramebuffer.h:
  • html/canvas/WebGLProgram.h:
  • html/canvas/WebGLQuery.h:
  • html/canvas/WebGLRenderbuffer.h:
  • html/canvas/WebGLSampler.h:
  • html/canvas/WebGLSync.h:
  • html/canvas/WebGLTransformFeedback.h:
  • html/canvas/WebGLUniformLocation.h:
  • html/shadow/TextControlInnerElements.h:
  • inspector/InspectorStyleSheet.h:
  • inspector/WebInjectedScriptManager.h:
  • loader/cache/CachedCSSStyleSheet.h:
  • page/Frame.h:
  • page/FrameView.h:
  • page/PageConsoleClient.h:
  • page/animation/KeyframeAnimation.h:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.h:
  • platform/audio/AudioBus.h:
  • platform/cocoa/PlaybackSessionModelMediaElement.h:
  • platform/graphics/BitmapImage.h:
  • platform/graphics/CrossfadeGeneratedImage.h:
  • platform/graphics/NamedImageGeneratedImage.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
  • platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h:
  • platform/graphics/ca/win/PlatformCAAnimationWin.h:
  • platform/graphics/cg/ImageDecoderCG.h:
  • platform/graphics/iso/ISOOriginalFormatBox.h:
  • platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
  • platform/graphics/iso/ISOSchemeInformationBox.h:
  • platform/graphics/iso/ISOSchemeTypeBox.h:
  • platform/graphics/iso/ISOTrackEncryptionBox.h:
  • platform/graphics/iso/ISOVTTCue.cpp:
  • platform/graphics/iso/ISOVTTCue.h:
  • platform/graphics/win/ImageDecoderDirect2D.h:
  • platform/mediastream/mac/AVCaptureDeviceManager.h:
  • platform/mock/mediasource/MockBox.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:
  • rendering/RenderFullScreen.h:
  • rendering/RenderGrid.h:
  • rendering/RenderMultiColumnSet.h:
  • rendering/RenderRuby.h:
  • rendering/RenderScrollbarPart.h:
  • rendering/RenderScrollbarTheme.h:
  • rendering/RenderTableCell.h:
  • rendering/RenderTableSection.h:
  • rendering/RenderThemeIOS.h:
  • rendering/RenderView.h:
  • rendering/svg/RenderSVGResourceClipper.h:
  • svg/SVGTextPathElement.h:
  • workers/WorkerConsoleClient.h:
  • worklets/Worklet.h:

Source/WebKit:

  • Shared/API/APIDictionary.h:
  • WebProcess/GPU/media/TextTrackPrivateRemote.h:
  • WebProcess/Plugins/Netscape/JSNPMethod.h:
  • WebProcess/Plugins/Netscape/JSNPObject.h:

Source/WebKitLegacy:

  • WebCoreSupport/WebResourceLoadScheduler.h:

Source/WebKitLegacy/win:

  • DefaultDownloadDelegate.h:
  • DefaultPolicyDelegate.h:
  • MemoryStream.h:
  • WebApplicationCache.h:
  • WebArchive.h:
  • WebBackForwardList.h:
  • WebCache.h:
  • WebCoreStatistics.h:
  • WebDataSource.h:
  • WebElementPropertyBag.h:
  • WebError.h:
  • WebFrame.h:
  • WebFramePolicyListener.h:
  • WebHTMLRepresentation.h:
  • WebHistoryItem.h:
  • WebJavaScriptCollector.h:
  • WebKitClassFactory.h:
  • WebKitStatistics.h:
  • WebMutableURLRequest.h:
  • WebNotification.h:
  • WebNotificationCenter.h:
  • WebPreferences.h:
  • WebResource.h:
  • WebURLAuthenticationChallenge.h:
  • WebURLCredential.h:
  • WebURLProtectionSpace.h:
  • WebURLResponse.h:

Tools:

  • DumpRenderTree/win/DefaultPolicyDelegate.h:
  • DumpRenderTree/win/UIDelegate.h:
9:51 PM Changeset in webkit [260414] by ysuzuki@apple.com
  • 1 edit
    14 adds in trunk/JSTests

[JSC] Import V8 BigInt tests generated by bigint-tester.py
https://bugs.webkit.org/show_bug.cgi?id=210783

Reviewed by Ross Kirsling.

This patch adds BigInt tests generated by V8 bigint-tester.py, which is modified for JSC use.

  • stress/v8-bigint-add.js: Added.
  • stress/v8-bigint-and.js: Added.
  • stress/v8-bigint-dec.js: Added.
  • stress/v8-bigint-div.js: Added.
  • stress/v8-bigint-inc.js: Added.
  • stress/v8-bigint-mod.js: Added.
  • stress/v8-bigint-mul.js: Added.
  • stress/v8-bigint-neg.js: Added.
  • stress/v8-bigint-not.js: Added.
  • stress/v8-bigint-or.js: Added.
  • stress/v8-bigint-sar.js: Added.
  • stress/v8-bigint-shl.js: Added.
  • stress/v8-bigint-sub.js: Added.
  • stress/v8-bigint-xor.js: Added.
9:48 PM Changeset in webkit [260413] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

Try to fix the build after r260407

  • wtf/PlatformHave.h:
9:06 PM Changeset in webkit [260412] by Peng Liu
  • 22 edits in trunk

Fix build failures when video fullscreen and picture-in-picture is disabled
https://bugs.webkit.org/show_bug.cgi?id=210777

Reviewed by Eric Carlson.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)".

  • Configurations/FeatureDefines.xcconfig:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):

  • platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h:
  • platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:

(WebCore::VideoLayerManagerObjC::setVideoLayer):
(WebCore::VideoLayerManagerObjC::requiresTextTrackRepresentation const):
(WebCore::VideoLayerManagerObjC::syncTextTrackBounds):
(WebCore::VideoLayerManagerObjC::setTextTrackRepresentation):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)".

  • Configurations/FeatureDefines.xcconfig:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity):
(WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage):
(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
(WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
(WebKit::RemoteMediaPlayerProxy::setBufferingPolicy):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:

(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::prepareForPlayback):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/PlatformEnable.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
9:04 PM Changeset in webkit [260411] by Ross Kirsling
  • 9 edits in trunk/Source/JavaScriptCore

Intl classes shouldn't need an m_initialized* field
https://bugs.webkit.org/show_bug.cgi?id=210764

Reviewed by Darin Adler.

Existing Intl classes each have a field like m_initializedNumberFormat, but this is unnecessary on two levels:

  1. The thing that gets initialized is a unique pointer to an ICU struct, so we can check it directly.
  2. Everywhere we're checking this is redundant since we've already done the same check on the prototype side, therefore we can just ASSERT before using said ICU struct.

While we're at it, clean up other stuff like:

  • Move stuff that doesn't need to be part of the class to the CPP file (e.g. UFieldPositionIteratorDeleter).
  • Merge createCollator into initializeCollator (seems like this is probably the oldest code in this space).
  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::initializeCollator):
(JSC::IntlCollator::compareStrings):
(JSC::IntlCollator::resolvedOptions):
(JSC::IntlCollator::createCollator): Deleted.

  • runtime/IntlCollator.h:
  • runtime/IntlDateTimeFormat.cpp:

(JSC::UFieldPositionIteratorDeleter::operator() const):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::resolvedOptions):
(JSC::IntlDateTimeFormat::format):
(JSC::partTypeString):
(JSC::IntlDateTimeFormat::formatToParts):
(JSC::IntlDateTimeFormat::UFieldPositionIteratorDeleter::operator() const): Deleted.
(JSC::IntlDateTimeFormat::partTypeString): Deleted.

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlNumberFormat.cpp:

(JSC::UFieldPositionIteratorDeleter::operator() const):
(JSC::IntlNumberFormatField::IntlNumberFormatField):
(JSC::IntlNumberFormat::initializeNumberFormat):
(JSC::IntlNumberFormat::format):
(JSC::IntlNumberFormat::resolvedOptions):
(JSC::partTypeString):
(JSC::IntlNumberFormat::formatToParts):
(JSC::IntlNumberFormat::UFieldPositionIteratorDeleter::operator() const): Deleted.
(JSC::IntlNumberFormat::partTypeString): Deleted.

  • runtime/IntlNumberFormat.h:
  • runtime/IntlPluralRules.cpp:

(JSC::localeData):
(JSC::IntlPluralRules::initializePluralRules):
(JSC::IntlPluralRules::resolvedOptions):
(JSC::IntlPluralRules::select):
(JSC::IntlPRInternal::localeData): Deleted.

  • runtime/IntlPluralRules.h:
8:23 PM Changeset in webkit [260410] by commit-queue@webkit.org
  • 18 edits in trunk

SPI clients using fastServerTrustEvaluationEnabled need SPI to inform them of modern TLS negotiation
https://bugs.webkit.org/show_bug.cgi?id=210533

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

Source/WebKit:

  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTaskClient::didNegotiateModernTLS):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didNegotiateModernTLS):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::didNegotiateModernTLS):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

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

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::didNegotiateModernTLS):

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::didNegotiateModernTLS):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didNegotiateModernTLS):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:

(-[TLSNavigationDelegate waitForDidNegotiateModernTLS]):
(-[TLSNavigationDelegate _webView:didNegotiateModernTLS:]):
(TestWebKitAPI::TEST):

7:52 PM Changeset in webkit [260409] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

Add document about WTF malloc-related macros
https://bugs.webkit.org/show_bug.cgi?id=208367

Reviewed by Anders Carlsson, Simon Fraser, and Darin Adler.

This adds document about WTF malloc-related macros since we have bunch of macros now.

  • wtf/FastMalloc.h:
7:36 PM Changeset in webkit [260408] by Kate Cheney
  • 5 edits in trunk

App-bound domain behavior should abide by the limitsNavigationsToAppBoundDomains argument in WKWebView configuration
https://bugs.webkit.org/show_bug.cgi?id=210769
<rdar://problem/62065241>

Reviewed by Brent Fulgham.

Source/WebKit:

Changes app-bound domain behavior to be triggered by the value of
limitsNavigationsToAppBoundDomains, a WebView configuration flag.
If the WebView has this parameter set and is currently navigating to
an app bound domain, then app-bound privileges will be granted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainAndCheckIfPermitted):
Update this function to return a boolean to indicate whether the
navigation should fail. A failure should occur if a WebView has set
the limitsNavigationsToAppBoundDomains flag and attempts to navigate
away from an app-bound domain.

If the limitsNavigationsToAppBoundDomains value has not been set to
true, maintain non-app bound behavior regardless of whether the domain
is app-bound or not.

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
Check the result of setIsNavigatingToAppBoundDomainAndCheckIfPermitted and fail the
navigation if needed, with both RELEASE logging and an appropriate
error message.

(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain): Deleted.

  • UIProcess/WebPageProxy.h:

Renamed for clarity.

Tools:

Removes any tests for swapping between app-bound and non app-bound
domains as this behavior is no longer supported.

Sets the limitsNavigationsToAppBoundDomains flag for tests which should
have app-bound behavior to maintain test functionality.

Adds 5 new tests for new behavior.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(TEST):
(-[AppBoundDomainDelegate webView:didFinishNavigation:]):
(-[AppBoundDomainDelegate webView:didFailProvisionalNavigation:withError:]):
(-[AppBoundDomainDelegate waitForDidFinishNavigation]):
(-[AppBoundDomainDelegate waitForDidFailProvisionalNavigationError]):

5:27 PM Changeset in webkit [260407] by Nikos Mouchtaris
  • 16 edits
    2 adds in trunk/Source

WK2 Quicklook for attachments
https://bugs.webkit.org/show_bug.cgi?id=208891

Reviewed by Darin Adler.

Source/WebCore:

Added to HTMLAttachmentElement to have member image representing
QuickLook thumbnail. Added code to render this image on both iOS and Mac.

No new tests. Test will be added after additions to test infrastructure.

  • html/HTMLAttachmentElement.cpp:

(WebCore::HTMLAttachmentElement::updateThumbnailRepresentation):
Allow setting of thumbnail member.

  • html/HTMLAttachmentElement.h:
  • rendering/RenderThemeIOS.mm:

Added rendering of image member of attachment element.
(WebCore::RenderAttachmentInfo::RenderAttachmentInfo):
(WebCore::paintAttachmentIcon):
(WebCore::RenderThemeIOS::paintAttachment):

  • rendering/RenderThemeMac.mm:

(WebCore::paintAttachmentIcon):

Source/WebKit:

Allow attachment elements to render QuickLook thumbnail generated
from contents of the file as its icon, rather than the default
icons associated with each mime type.

  • Configurations/WebKit.xcconfig:

Link QuickLook thumbnailing framework.

  • UIProcess/API/APIAttachment.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

Create thumbnail request and add to queue.
(WebKit::convertNSImageToBitmap):
(WebKit::convertUIImageToBitmap):
(WebKit::WebPageProxy::getQLThumbnailForGenerationRequestion):
(WebKit::WebPageProxy::getQLThumbnailForFileWrapper):
(WebKit::WebPageProxy::getQLThumbnailForAttachment):

  • UIProcess/QLThumbnailLoad.h: Added.
  • UIProcess/QLThumbnailLoad.mm: Added.

Add code to request thumbnail for file data.
(-[WKQLThumbnailQueueManager init]):
(+[WKQLThumbnailQueueManager sharedInstance]):
(-[WKQLThumbnailLoadOperation initWithAttachment:identifier:]):
(-[WKQLThumbnailLoadOperation initWithURL:identifier:]):
(-[WKQLThumbnailLoadOperation start]):
(-[WKQLThumbnailLoadOperation isAsynchronous]):
(-[WKQLThumbnailLoadOperation isExecuting]):
(-[WKQLThumbnailLoadOperation setExecuting:]):
(-[WKQLThumbnailLoadOperation isFinished]):
(-[WKQLThumbnailLoadOperation setFinished:]):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateAttachmentIcon):
Set thumbnail of attachment element

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

Thumbnail request message.

5:03 PM Changeset in webkit [260406] by Alan Coon
  • 2 edits in branches/safari-610.1.11-branch/Source/WebKit

Unreviewed macCatalyst build fix.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::disableServiceWorkerEntitlementInNetworkProcess):
(WebKit::WebPageProxy::clearServiceWorkerEntitlementOverride):

4:08 PM Changeset in webkit [260405] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Unreviewed macCatalyst build fix.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::disableServiceWorkerEntitlementInNetworkProcess):
(WebKit::WebPageProxy::clearServiceWorkerEntitlementOverride):

3:32 PM Changeset in webkit [260404] by ysuzuki@apple.com
  • 6 edits in trunk

Add more structure-cloning tests for BigInt
https://bugs.webkit.org/show_bug.cgi?id=210765

Reviewed by Mark Lam.

Source/WebCore:

This patch adds safe-guard for future JSC primitive extension for structure-cloning.
We throw DataCloneError if we see unknown primitive value, which can happen if JSC
extends primitive value.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpImmediate):
(WebCore::CloneSerializer::dumpIfTerminal):

LayoutTests:

Add more tests for BigInt outside of WPT (they are already tested in WPT, but this adds more tests).

  • fast/dom/Window/window-postmessage-clone-expected.txt:
  • fast/dom/Window/window-postmessage-clone.html:
  • platform/gtk/fast/dom/Window/window-postmessage-clone-expected.txt:
2:55 PM Changeset in webkit [260403] by Simon Fraser
  • 16 edits
    2 adds in trunk

Scrolling with background-attachment: fixed needs to trigger repaints
https://bugs.webkit.org/show_bug.cgi?id=193893
<rdar://problem/47587017>

Reviewed by Dean Jackson.

Source/WebCore:

When scrolling an overflow scroll which has "background-atttachment:fixed" in the content,
the node will have non-empty synchronous scrolling reasons. In this case we need to
send the scroll to the main thread, and trigger a repaint on scroll.

If handling the wheel event on the scrolling thread determines that the scroll must be sent
to the main thread, EventDispatcher::wheelEvent() does so in the callback function.

To trigger the repaint, RenderLayer::scrollTo() asks the composited layers backing whether
the node has synchronous scrolling reasons; this is implemented by asking the scrolling
coordinator.

Test: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-repaint.html

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::hasSynchronousScrollingReasons const):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::hasSynchronousScrollingReasons const):

  • page/scrolling/ScrollingStateScrollingNode.h:

(WebCore::ScrollingStateScrollingNode::hasSynchronousScrollingReasons const):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::handleWheelEvent):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent): Return SendToMainThread if this node
needs to do synchronous scrolling.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollTo):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::needsRepaintOnCompositedScroll const):
(WebCore::RenderLayerBacking::setRequiresOwnBackingStore):
(WebCore::RenderLayerBacking::setContentsNeedDisplay):

  • rendering/RenderLayerBacking.h:

Source/WebKit:

When scrolling an overflow scroll which has "background-atttachment:fixed" in the content,
the node will have non-empty synchronous scrolling reasons. In this case we need to
send the scroll to the main thread, and trigger a repaint on scroll.

If handling the wheel event on the scrolling thread determines that the scroll must be sent
to the main thread, EventDispatcher::wheelEvent() does so in the callback function.

To trigger the repaint, RenderLayer::scrollTo() asks the composited layers backing whether
the node has synchronous scrolling reasons; this is implemented by asking the scrolling
coordinator.

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

LayoutTests:

  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-repaint-expected.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-repaint.html: Added.
2:45 PM Changeset in webkit [260402] by Megan Gardner
  • 14 edits
    2 adds in trunk

Date and Time form controls not showing correct initial values on immediate second invocation.
https://bugs.webkit.org/show_bug.cgi?id=210613

Reviewed by Wenson Hsieh.

Source/WebKit:

Updating the webprocess with the newly picked time did not update the local store of that data in the
UI process, so when the control was activated a second time, and we skipped the round trip to the
webprocess to get the data we were certian we already had, we did not start the popover in the
correct state. We now update the webprocess and the local UI stored variable at the same time.

Test: fast/forms/ios/time-picker-value-change.html

  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView timePickerValueHour]):
(-[WKWebView timePickerValueMinute]):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView updateValueAsNumberForViewController:]):
(-[WKContentView updateValueForViewController:]):
(-[WKContentView setTimePickerValueToHour:minute:]):
(-[WKContentView timePickerValueHour]):
(-[WKContentView timePickerValueMinute]):

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

(-[WKDateTimePicker hour]):
(-[WKDateTimePicker minute]):
(-[WKDateTimePicker _dateChangedSetAsNumber]):
(-[WKDateTimePicker _dateChangedSetAsString]):
(-[WKDateTimePicker setHour:minute:]):
(-[WKFormInputControl setTimePickerHour:minute:]):
(-[WKFormInputControl timePickerValueHour]):
(-[WKFormInputControl timePickerValueMinute]):
(-[WKDateTimePopover setHour:minute:]):
(-[WKDateTimePopover hour]):
(-[WKDateTimePopover minute]):

Tools:

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::timePickerValueHour const):
(WTR::UIScriptController::timePickerValueMinute const):

  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::timePickerValueHour const):
(WTR::UIScriptControllerIOS::timePickerValueMinute const):

LayoutTests:

  • fast/forms/ios/time-picker-value-change-expected.txt: Added.
  • fast/forms/ios/time-picker-value-change.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.timerPickerValues):

2:42 PM Changeset in webkit [260401] by Alan Coon
  • 2 edits in branches/safari-610.1.11-branch/Source/WebKit

Try to fix the macCatalyst build after r260366

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h:
2:29 PM Changeset in webkit [260400] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Try to fix the macCatalyst build after r260366

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h:
2:17 PM Changeset in webkit [260399] by clopez@igalia.com
  • 3 edits in trunk/LayoutTests

Skip tests related with missing reftest-wait support for imported WPT tests.

Unreviewed gardening.

Also fix a few typos on the bug numbers for the expectations.

2:14 PM Changeset in webkit [260398] by Russell Epstein
  • 1 copy in tags/Safari-609.2.8

Tag Safari-609.2.8.

2:05 PM Changeset in webkit [260397] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

FTL doesn't observe the use kind of CheckIsConstant's child1
https://bugs.webkit.org/show_bug.cgi?id=210763

Reviewed by Yusuke Suzuki.

Somehow, this didn't get added when I changed CheckIsConstant and didn't show up
when I tested r260377 because I tested in release. Fortunately, the produced
DFG IR will be the same.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCheckIsConstant):

1:38 PM Changeset in webkit [260396] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

MSVC: LayoutUnits.h(248): warning C4245: 'argument': conversion from 'const int' to 'size_t', signed/unsigned mismatch
https://bugs.webkit.org/show_bug.cgi?id=210592

Reviewed by Zalan Bujtas.

  • layout/LayoutUnits.h:

(WTF::HashTraits<WebCore::Layout::SlotPosition>::emptyValue):
(WTF::HashTraits<WebCore::Layout::SlotPosition>::constructDeletedValue):
(WTF::HashTraits<WebCore::Layout::SlotPosition>::isDeletedValue):
Use std::numeric_limits<size_t>::max() for empty and deleted
values instead of WebCore::intMinForLayoutUnit.

1:35 PM Changeset in webkit [260395] by Alan Coon
  • 1 copy in branches/safari-610.1.11-branch

New branch.

1:35 PM Changeset in webkit [260394] by Alan Coon
  • 1 delete in branches/safari-610.1.11-branch

Delete branch.

1:19 PM Changeset in webkit [260393] by Wenson Hsieh
  • 4 edits in trunk

Text manipulation sometimes fails to replace text in title elements
https://bugs.webkit.org/show_bug.cgi?id=210750
<rdar://problem/61066103>

Reviewed by Tim Horton and Darin Adler.

Source/WebCore:

Internal clients using WebKit text manipulation APIs currently fail to replace text in title and option elements
in the case where text manipulation has been completed with more than one token. These are elements for which we
want to replace the entire text as a single token, even if the text manipulation client ends up breaking the
token into multiple chunks.

To handle this case, pull the title || option check out into a helper function, and consult it when completing
text manipulation in the case where the manipulation data lacks either start or end positions. If
canPerformTextManipulationByReplacingEntireTextContent is true and there are multiple replacement tokens,
allow ourselves to process the replacement by combining the replacement tokens into a space-separated string.

Test: TextManipulation.CompleteTextManipulationShouldReplaceTextContentWithMultipleTokens

  • editing/TextManipulationController.cpp:

(WebCore::canPerformTextManipulationByReplacingEntireTextContent):
(WebCore::TextManipulationController::observeParagraphs):
(WebCore::TextManipulationController::replace):

Tools:

Add a new API test to verify that a single title or option element may be replaced with multiple tokens, as long
as all the token identifiers match.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
1:11 PM Changeset in webkit [260392] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

The rect for the primary screen should be retrieved on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=210760

Reviewed by Chris Fleizach.

  • Call to screenRectForPrimaryScreen is dispatched to main thread.
  • This value is cached since it is very unlikely to change in normal

usage and this would avoid hitting the main thread repeatedly.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper primaryScreenHeight]):

1:09 PM Changeset in webkit [260391] by stephan.szabo@sony.com
  • 2 edits in trunk/Source/WebKit

Fix build when !ENABLE(RESOURCE_LOAD_STATISTICS)
https://bugs.webkit.org/show_bug.cgi?id=210757

Reviewed by Ross Kirsling.

Build fix, no new tests

  • NetworkProcess/NetworkDataTask.cpp:

Add ENABLE(RESOURCE_LOAD_STATISTICS) around block
using NetworkSession functions only declared when
that is enabled.

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

When SpeculativeLoadManager is destroyed, properly clean up its PendingFrameLoads
https://bugs.webkit.org/show_bug.cgi?id=210759
<rdar://problem/62056856>

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

Recent work on the resourceLoadStatistics layout tests increased the amount we swap out the WebsiteDataStore.
When this happens, the NetworkSession is eventually destroyed in the NetworkProcess, sometimes when running the next test.
An assertion was firing in the PendingFrameLoad destructor because it hadn't been marked as complete when it was destroyed.
Rather than remove the assertion, when we destroy the SpeculativeLoadManager (which only happens when a WebsiteDataStore
is destroyed) during a speculative pending frame load, just mark the pending frame load as complete because it is being cancelled.
Marking the pending frame load as complete can tell the SpeculativeLoadManager to mutate m_pendingFrameLoads, which we don't want
to do while iterating, so copy the RefPtrs into a Vector first then iterate that to get them all.

This fixes an assertion that was sometimes hit in http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html
but only after running other tests that had initiated speculative pending frame loads. This was ostensibly started by r260322 but is quite unrelated.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager):

12:56 PM Changeset in webkit [260389] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Gardening, update expectations after r260322
https://bugs.webkit.org/show_bug.cgi?id=210761

Unreviewed gardening.

  • platform/gtk/TestExpectations:
12:44 PM Changeset in webkit [260388] by clopez@igalia.com
  • 6 edits in trunk/LayoutTests

Clean and merge test expectations for WPT tests for Intersection Observer v2.

Unreviewed gardening.

Merge the expectations for the tests cross-origin-effects.sub.html
and cross-origin-occlusion.sub.html on the common TestExpectations file.

  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/wpe/TestExpectations:
12:37 PM Changeset in webkit [260387] by stephan.szabo@sony.com
  • 4 edits in trunk

[PlayStation] Fix build after r260277
https://bugs.webkit.org/show_bug.cgi?id=210756

Reviewed by Don Olmstead.

Source/WebKit:

Build fix, no new tests.

  • PlatformPlayStation.cmake:

Tools:

  • TestWebKitAPI/PlatformPlayStation.cmake:
12:35 PM Changeset in webkit [260386] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: the filter bar in the navigation sidebar should respect the global search settings
https://bugs.webkit.org/show_bug.cgi?id=210679

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype.updateFilter):

12:21 PM Changeset in webkit [260385] by svillar@igalia.com
  • 8 edits
    1 add in trunk

[WebXR] Update WebXRSession and WebXRSystem interfaces
https://bugs.webkit.org/show_bug.cgi?id=210553

Reviewed by Žan Doberšek.

LayoutTests/imported/w3c:

  • web-platform-tests/webxr/idlharness.https.window-expected.txt: Added.

Source/WebCore:

Update WebXRSession and WebXRSystem to the latest changes in the specs.

  • Modules/webxr/WebXRSession.idl: Added 3 new events.
  • Modules/webxr/WebXRSystem.idl: Interface name is XR not XRSystem.
  • bindings/js/WebCoreBuiltinNames.h: Renamed macro.
  • dom/EventNames.h: Added 3 new events.

LayoutTests:

  • platform/wpe/TestExpectations: Mark idlharness.https.window.html test as Passed.
12:11 PM Changeset in webkit [260384] by ysuzuki@apple.com
  • 4 edits in trunk

[JSC] Skip test262 for non-safe-integer range BigIntConstructor
https://bugs.webkit.org/show_bug.cgi?id=210749

Reviewed by Keith Miller.

JSTests:

We skip test262 test/built-ins/BigInt/constructor-integer.js for now. As it is shown in old test262 JSTests/test262/expectations.yaml,
this test was failing before BigInt flag is enabled. And new BigInt patch changes error message while we are failing in the same way.
While we implemented BigInt, this test is based on spec change introduced[1], and we are not implementing this. So we mark it skipped,
as it is skipped before BigInt is enabled.

[1]: https://github.com/tc39/proposal-bigint/pull/138

  • test262/config.yaml:

Source/JavaScriptCore:

  • runtime/BigIntConstructor.cpp:

(JSC::callBigIntConstructor):

12:10 PM Changeset in webkit [260383] by Darin Adler
  • 3 edits in trunk/Source/WTF

REGRESSION (r253987): StringImpl::adopt(Vector&&) copies only half of the characters in the Vector when copying across malloc zones
https://bugs.webkit.org/show_bug.cgi?id=210736

Reviewed by Yusuke Suzuki.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::replace): Use copyCharacters instead of memcpy.

  • wtf/text/StringImpl.h: Use std::is_same_v instead of std::is_same.

(WTF::StringImpl::StringImpl): Use copyCharacters instead of memcpy.
Also drop C-style cast to cast away const.
(WTF::StringImpl::adopt): Don't even try to adopt across malloc zones.

11:43 AM Changeset in webkit [260382] by Chris Dumez
  • 7 edits
    2 adds in trunk

Sending beacons when Fetch KeepAlive feature is disabled crashes the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=210753
<rdar://problem/61896221>

Reviewed by Geoffrey Garen.

Source/WebCore:

Test: http/wpt/beacon/beacon-legacy-code-path.html

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setFetchAPIKeepAliveEnabled):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

Add internal settings to disable Fetch Keep Alive for layout testing.

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::startPingLoad):
Make sure NetworkResourceLoadParameters's webPageProxyID / webPageID / webFrameID are properly
initialized before sending the IPC or IPC decoding will fail.

LayoutTests:

Add layout test coverage.

  • http/wpt/beacon/beacon-legacy-code-path-expected.txt: Added.
  • http/wpt/beacon/beacon-legacy-code-path.html: Added.
11:41 AM Changeset in webkit [260381] by ddkilzer@apple.com
  • 15 edits
    1 copy in trunk/Source/WebKit

[IPC hardening] Use ObjectIdentifier<> for geolocationID
<https://webkit.org/b/210680>
<rdar://problem/58892340>

Reviewed by Chris Dumez.

Replace uses of uint64_t with GeolocationIdentifier.

  • Scripts/webkit/messages.py:
  • UIProcess/GeolocationIdentifier.h: Add.
  • UIProcess/GeolocationPermissionRequestManagerProxy.cpp:

(WebKit::GeolocationPermissionRequestManagerProxy::createRequest):
(WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision):

  • UIProcess/GeolocationPermissionRequestManagerProxy.h:
  • UIProcess/GeolocationPermissionRequestProxy.cpp:

(WebKit::GeolocationPermissionRequestProxy::GeolocationPermissionRequestProxy):

  • UIProcess/GeolocationPermissionRequestProxy.h:

(WebKit::GeolocationPermissionRequestProxy::create):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:

(WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
(WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation):
(WebKit::GeolocationPermissionRequestManager::didReceiveGeolocationPermissionDecision):
(WebKit::generateGeolocationID): Delete.

  • Replace with GeolocationIdentifier::generate().
  • WebProcess/Geolocation/GeolocationPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didReceiveGeolocationPermissionDecision):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
11:16 AM Changeset in webkit [260380] by youenn@apple.com
  • 11 edits
    2 adds in trunk

MediaPlayerPrivateMediaStreamAVFObjC should start play a newly added audio track if it is playing
https://bugs.webkit.org/show_bug.cgi?id=210740

Reviewed by Eric Carlson.

Source/WebCore:

Before the patch, MediaPlayerPrivateMediaStreamAVFObjC was not calling play on the audio renderer when the audio renderer
was added after the MediaPlayerPrivateMediaStreamAVFObjC was asked to play.
This patch makes it so that, on configuration of an audio track, it will be asked to play if its MediaPlayerPrivateMediaStreamAVFObjC is playing.
Add internals API to be able to write a test.

Test: fast/mediastream/play-newly-added-audio-track.html

  • html/track/AudioTrack.h:
  • html/track/AudioTrack.idl:
  • platform/graphics/AudioTrackPrivate.h:

(WebCore::AudioTrackPrivate::isBackedByMediaStreamTrack const):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

  • platform/mediastream/AudioTrackPrivateMediaStream.cpp:

(WebCore::AudioTrackPrivateMediaStream::play):

  • platform/mediastream/AudioTrackPrivateMediaStream.h:

(isType):

  • testing/Internals.cpp:

(WebCore::Internals::isMockRealtimeMediaSourceCenterEnabled):
(WebCore::Internals::shouldAudioTrackPlay):

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

LayoutTests:

  • fast/mediastream/play-newly-added-audio-track-expected.txt: Added.
  • fast/mediastream/play-newly-added-audio-track.html: Added.
11:14 AM Changeset in webkit [260379] by youenn@apple.com
  • 9 edits in trunk/Source/WebCore

Use a WeakHashSet to store MediaStreamPrivate observers
https://bugs.webkit.org/show_bug.cgi?id=210494

Reviewed by Eric Carlson.

Remove observers from the MediaStream and migrate existing client (MediaRecorder) to MediaStreamPrivate::Observer.
Make use of WeakHashSet in MediaStreamPrivate to improve robustness of the code.
Any time the MediaStreamPrivate tracks are modified, observers will be notified.
MediaStream needs now to decide when to send an event when its MediaStreamPrivate notifies of new/deleted tracks,
Modernize a bit the code to use more references.
Covered by existing tests.

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::MediaRecorder):
(WebCore::MediaRecorder::~MediaRecorder):
(WebCore::MediaRecorder::handleTrackChange):

  • Modules/mediarecorder/MediaRecorder.h:
  • Modules/mediastream/MediaStream.cpp:

(WebCore::createTrackPrivateVector):
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::~MediaStream):
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::getTrackById):
(WebCore::MediaStream::didAddTrack):
(WebCore::MediaStream::didRemoveTrack):
(WebCore::MediaStream::addTrackFromPlatform):
(WebCore::MediaStream::internalAddTrack):
(WebCore::MediaStream::internalTakeTrack):

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack):

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::MediaStreamPrivate):
(WebCore::MediaStreamPrivate::addObserver):
(WebCore::MediaStreamPrivate::removeObserver):
(WebCore::MediaStreamPrivate::forEachObserver):
(WebCore::MediaStreamPrivate::computeActiveState):
(WebCore::MediaStreamPrivate::updateActiveState):
(WebCore::MediaStreamPrivate::addTrack):
(WebCore::MediaStreamPrivate::removeTrack):
(WebCore::MediaStreamPrivate::trackEnded):

  • platform/mediastream/MediaStreamPrivate.h:
  • testing/Internals.cpp:

(WebCore::Internals::removeMediaStreamTrack):

11:11 AM Changeset in webkit [260378] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

fast/layoutformattingcontext/simple-absolute-positioned-replaced-inline-element-with-percentage-height.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=210754

Unreviewed test gardening.

Let's not use subframe layout in LFC tests for now.

  • fast/layoutformattingcontext/simple-absolute-positioned-replaced-inline-element-with-percentage-height.html:
11:06 AM Changeset in webkit [260377] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix CheckIsConstant for non-constant values and checking for empty
https://bugs.webkit.org/show_bug.cgi?id=210752

Reviewed by Saam Barati.

We need to make sure that we only have one speculated type if our value
is empty.

  • dfg/DFGAbstractInterpreterInlines.h:

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

11:04 AM Changeset in webkit [260376] by Alan Coon
  • 1 copy in branches/safari-610.1.11-branch

New branch.

11:02 AM Changeset in webkit [260375] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: removing a WI.TreeElement in a WI.NavigationSidebar doesn't check if the WI.TreeOutline still matches the current filter
https://bugs.webkit.org/show_bug.cgi?id=210672

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.NavigationSidebarPanel.prototype.updateFilter):
(WI.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
(WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WI.NavigationSidebarPanel.prototype._handleTreeElementRemoved): Added.

10:59 AM Changeset in webkit [260374] by Alan Coon
  • 8 edits in trunk/Source

Versioning.

10:48 AM Changeset in webkit [260373] by Chris Dumez
  • 6 edits in trunk/Source/WebKit

[iOS] Refactor WebKit media playback process assertion logic to minimize chances of leaking them
https://bugs.webkit.org/show_bug.cgi?id=210670

Reviewed by Geoffrey Garen.

Refactor WebKit media playback process assertion logic to minimize chances of leaking them. In particular,
the following changes were made:

  1. Instead of the WebProcessPool having a HashMap of media playback process assertions for the WebProcess, we now store the assertion on the WebProcessProxy object itself. This is less likely to get out of sync and leak.
  2. Add a RefCounter to the WebProcessPool to count WebProcesses that have audible media. Whenever a WebProcess starts or stops playing audible media, it merely grabs a RefCounter token or releases it. The WebProcessPool relies on this counter to decide whether or not to take a media playback assertion on behalf of the UIProcess. Since this is token-based and the token is stored on the WebProcessProxy object, it makes it less likely to leak the assertion.
  3. The WebProcessProxy object now has a AudibleMediaActivity data structure wrapping both its media playback assertion and its WebProcessWithAudibleMediaToken that it got from the WebProcessPool. When the WebProcess shuts down (normally or due to crash/termination), we make sure to clear this data structure.
  4. Make sure that the WebProcessProxy updates its AudibleMediaActivity whenever a page is removed from the WebProcess.
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebProcessPool.cpp:

(WebKit::m_webProcessWithAudibleMediaCounter):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::webProcessWithAudibleMediaToken const):
(WebKit::WebProcessPool::updateAudibleMediaAssertions):

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

(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::updateAudibleMediaAssertions):

  • UIProcess/WebProcessProxy.h:
10:15 AM Changeset in webkit [260372] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

<rdar://problem/62059046>

Unreviewed macCatalyst build fix.

  • NetworkProcess/NetworkProcess.messages.in:
10:14 AM Changeset in webkit [260371] by Simon Fraser
  • 3 edits
    4 adds in trunk

Content disappears on CSS parallax example
https://bugs.webkit.org/show_bug.cgi?id=210732
Source/WebCore:

<rdar://problem/61997636>

Reviewed by Darin Adler.

If scrolling affects the computation of coverage rect of a TiledBacking, we plumb
that expanded coverage back into TransformState which is maintained during GraphicsLayer flushing,
and it's used to compute coverage rect for descendants.

It's passed into TransformState::setLastPlanarSecondaryQuad(), which has to map it back into
the coordinate system of the last flattening ancestor. However, TransformState::mapQuad()
had a missing return and the quad mapping was wrong. The new code is now the same as
TransformState::mappedPoint() (you can see where the copy/paste error came from).

Test: compositing/tiling/coverage-adjustment-secondary-quad-mapping.html

  • platform/graphics/transforms/TransformState.cpp:

(WebCore::TransformState::mapQuad const):
(WebCore::TransformState::flattenWithTransform):

LayoutTests:

Reviewed by Darin Adler.

  • compositing/tiling/coverage-adjustment-secondary-quad-mapping-expected.txt: Added.
  • compositing/tiling/coverage-adjustment-secondary-quad-mapping.html: Added.
  • platform/ios-wk2/compositing/tiling/coverage-adjustment-secondary-quad-mapping-expected.txt: Added.
  • platform/mac-wk1/compositing/tiling/coverage-adjustment-secondary-quad-mapping-expected.txt: Added.
9:54 AM Changeset in webkit [260370] by Russell Epstein
  • 3 edits in branches/safari-609-branch

Apply patch. rdar://problem/62062357

9:23 AM Changeset in webkit [260369] by Russell Epstein
  • 20 edits in branches/safari-609-branch

Apply patch. rdar://problem/61950472

9:16 AM Changeset in webkit [260368] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][TFC] Add support for border-collapse: collapse.
https://bugs.webkit.org/show_bug.cgi?id=210747

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/table-flex-width-border-collapse.html

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::ensureTableGrid):

LayoutTests:

  • fast/layoutformattingcontext/table-flex-width-border-collapse.html: Added.
8:53 AM Changeset in webkit [260367] by Wenson Hsieh
  • 24 edits
    2 adds
    1 delete in trunk

Oversized caret and selection rects in text fields on ganji.com and netflix.com/login
https://bugs.webkit.org/show_bug.cgi?id=210622
<rdar://problem/45945636>

Reviewed by Darin Adler.

Source/WebCore:

Currently, selection and caret rects in text fields on some web pages can be excessively tall. This patch makes
a small adjustment to allow the top of the caret or selection rect to snap to the top of the inline box instead
of being at the end of the previous line, in the case where there is no previous inline box.

In the case where we compute the caret rect for an empty renderer (i.e. no children), we make an additional
tweak so that the caret rect's height is based on the computed font height instead of line height, and then we
ensure that the caret is (logically) vertically centered.

See below for more details.

Test: editing/selection/selection-and-caret-do-not-extend-to-line-height.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

Specify ForHitTesting::Yes when asking for selectionTop().

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):

Use FontMetric's height when computing the height of the caret rect, and then center it vertically in the
renderer.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

Specify ForHitTesting::Yes when asking for selectionTop(). See below for more information.

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::positionForPoint const):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::selectionTop const):

When computing selectionTop(), we currently fall back to using the top of the containing RenderBlockFlow
(blockFlow().borderAndPaddingBefore()) in the case where there is no previous root box. However, this can lead
to selection and caret rects being taller than expected; instead, we can use the max of the selectionTop
(that is, the top of the line box, adjusted for annotations) and the top of the RenderBlockFlow. This has the
effect of allowing the caret and selection to visually snap to the top of a run of text, provided there is not
already a line of text that precedes it. Taking the maximum of the two values ensures that we don't
unintentionally make the selection or caret rects even larger, if the line top is above the top of the block.

Note that we also avoid shrinking the selection and caret rects when hit-testing renderers for positions and
ranges. This allows users to still click and drag to select text in the extra line-height area above a piece of
text, even if the selection is only painted over the text (and not in the region containing the line-height).
This behavior was established in the fix for webkit.org/b/14911, and is covered by the layout test
editing/selection/inline-closest-leaf-child.html.

  • rendering/RootInlineBox.h:

Tools:

Rebaseline some expected selection and caret rects in some iOS API tests.

  • TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm:

(TEST):

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

LayoutTests:

Rebaseline existing tests, and add a new test to verify that caret and selection rects do not extend to match
the line height in empty and non-empty editable elements, in both horizontal and vertical writing modes.

  • editing/selection/ios/absolute-selection-after-scroll-expected.txt:
  • editing/selection/ios/absolute-selection-after-scroll.html:
  • editing/selection/ios/change-selection-after-tapping-focused-element-expected.txt:
  • editing/selection/ios/change-selection-after-tapping-focused-element.html:
  • editing/selection/ios/fixed-selection-after-scroll-expected.txt:
  • editing/selection/ios/fixed-selection-after-scroll.html:
  • editing/selection/ios/selection-after-changing-text-with-callout-menu-expected.txt:
  • editing/selection/ios/selection-after-changing-text-with-callout-menu.html:
  • editing/selection/ios/selection-handles-after-touch-end-expected.txt:
  • editing/selection/ios/update-selection-after-overflow-scroll-expected.txt:
  • editing/selection/ios/update-selection-after-overflow-scroll.html:
  • editing/selection/selection-and-caret-do-not-extend-to-line-height-expected.txt: Added.
  • editing/selection/selection-and-caret-do-not-extend-to-line-height.html: Added.
  • fast/repaint/focus-ring-repaint-expected.txt:
  • platform/ios/editing/selection/ios/selection-handles-after-touch-end-expected.txt: Removed.

Delete this redundant test expectation.

8:32 AM Changeset in webkit [260366] by Darin Adler
  • 471 edits
    2 deletes in trunk

Use #import instead of #include in Objective-C and don't use #pragma once
https://bugs.webkit.org/show_bug.cgi?id=210724

Reviewed by David Kilzer.

Source/JavaScriptCore:

  • API/JSAPIWrapperObject.mm:
  • API/JSContext.h:
  • API/JSContext.mm:
  • API/JSScriptInternal.h:
  • API/JSValue.mm:
  • API/JSVirtualMachine.mm:
  • API/JSVirtualMachinePrivate.h:
  • API/JSWrapperMap.mm:
  • API/ObjCCallbackFunction.mm:
  • API/tests/CurrentThisInsideBlockGetterTest.mm:

More #import, less #pragma once.

Source/WebCore:

  • page/cocoa/SettingsBaseCocoa.mm:

(WebCore::sansSerifTraditionalHanFontFamily): Deleted.
(WebCore::sansSerifSimplifiedHanFontFamily): Deleted.
(WebCore::SettingsBase::initializeDefaultFontFamilies): Just use font name
strings directly since there are no conditionals any more.

  • Modules/applepay/PaymentRequestValidator.mm:
  • Modules/applepay/cocoa/PaymentContactCocoa.mm:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
  • accessibility/mac/AXObjectCacheMac.mm:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.h:
  • bridge/objc/WebScriptObjectPrivate.h:
  • bridge/objc/objc_class.mm:
  • bridge/testbindings.mm:
  • crypto/mac/SerializedCryptoKeyWrapMac.mm:
  • editing/cocoa/WebArchiveResourceFromNSAttributedString.h:
  • editing/cocoa/WebArchiveResourceWebResourceHandler.h:
  • editing/cocoa/WebContentReaderCocoa.mm:
  • history/mac/HistoryItemMac.mm:
  • loader/cocoa/DiskCacheMonitorCocoa.mm:
  • loader/cocoa/SubresourceLoaderCocoa.mm:
  • loader/mac/ResourceLoaderMac.mm:
  • page/cocoa/MemoryReleaseCocoa.mm:
  • page/cocoa/ResourceUsageOverlayCocoa.mm:
  • page/cocoa/ResourceUsageThreadCocoa.mm:
  • page/ios/WebEventRegion.h:
  • page/mac/ChromeMac.mm:
  • page/mac/EventHandlerMac.mm:
  • page/mac/WheelEventDeltaFilterMac.mm:
  • page/scrolling/cocoa/ScrollingStateNode.mm:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
  • page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
  • page/scrolling/mac/ScrollingThreadMac.mm:
  • page/scrolling/mac/ScrollingTreeMac.mm:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:
  • platform/audio/mac/AudioSampleDataSource.mm:
  • platform/cocoa/DataDetectorsCoreSoftLink.mm:
  • platform/cocoa/PasteboardCocoa.mm:
  • platform/cocoa/ScrollSnapAnimatorState.mm:
  • platform/cocoa/SystemVersion.mm:
  • platform/gamepad/cocoa/GameControllerGamepad.mm:
  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
  • platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
  • platform/graphics/ca/cocoa/WebSystemBackdropLayer.h:
  • platform/graphics/ca/cocoa/WebTiledBackingLayer.h:
  • platform/graphics/ca/cocoa/WebVideoContainerLayer.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
  • platform/graphics/cocoa/IOSurfacePoolCocoa.mm:
  • platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
  • platform/graphics/cocoa/WebGLLayer.h:
  • platform/graphics/cocoa/WebGLLayer.mm:
  • platform/graphics/cocoa/WebGPULayer.h:
  • platform/graphics/cocoa/WebGPULayer.mm:
  • platform/graphics/cv/ImageRotationSessionVT.mm:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/graphics/cv/TextureCacheCV.mm:
  • platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
  • platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
  • platform/graphics/mac/ComplexTextControllerCoreText.mm:
  • platform/graphics/mac/FloatPointMac.mm:
  • platform/graphics/mac/FloatSizeMac.mm:
  • platform/graphics/mac/IntPointMac.mm:
  • platform/graphics/mac/IntSizeMac.mm:
  • platform/graphics/mac/WebLayer.h:
  • platform/graphics/mac/WebLayer.mm:
  • platform/ios/LegacyTileCache.mm:
  • platform/ios/LegacyTileGrid.mm:
  • platform/ios/LegacyTileGridTile.mm:
  • platform/ios/LegacyTileLayer.h:
  • platform/ios/LegacyTileLayer.mm:
  • platform/ios/LegacyTileLayerPool.mm:
  • platform/ios/LocalCurrentTraitCollection.mm:
  • platform/ios/LocalizedDeviceModel.mm:
  • platform/ios/ScrollbarThemeIOS.mm:
  • platform/ios/WebCoreMotionManager.h:
  • platform/ios/WebItemProviderPasteboard.mm:
  • platform/ios/WebVideoFullscreenControllerAVKit.h:
  • platform/mac/LocalCurrentGraphicsContext.mm:
  • platform/mac/LocalDefaultSystemAppearance.mm:
  • platform/mac/LoggingMac.mm:
  • platform/mac/PlatformEventFactoryMac.mm:
  • platform/mac/RemoteCommandListenerMac.mm:
  • platform/mac/ScrollAnimatorMac.mm:
  • platform/mac/SerializedPlatformDataCueMac.mm:
  • platform/mac/WebCoreFullScreenPlaceholderView.mm:
  • platform/mac/WebCoreFullScreenWarningView.h:
  • platform/mac/WebCoreFullScreenWarningView.mm:
  • platform/mac/WebCoreFullScreenWindow.h:
  • platform/mac/WebCoreObjCExtras.mm:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
  • platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm:
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:
  • platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm:
  • platform/mediastream/mac/RealtimeVideoUtilities.mm:
  • platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
  • platform/network/cocoa/CertificateInfoCocoa.mm:
  • platform/network/cocoa/WebCoreNSURLSession.h:
  • platform/network/mac/BlobDataFileReferenceMac.mm:
  • platform/network/mac/CredentialStorageMac.mm:
  • platform/network/mac/SynchronousLoaderClient.mm:
  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
  • platform/text/cocoa/LocaleCocoa.mm:
  • testing/ServiceWorkerInternals.mm:
  • testing/cocoa/WebViewVisualIdentificationOverlay.h:

More #import, less #pragma once.

Source/WebCore/PAL:

  • pal/cocoa/AppSSOSoftLink.mm:
  • pal/cocoa/FileSizeFormatterCocoa.mm:
  • pal/cocoa/UsageTrackingSoftLink.mm:
  • pal/ios/ManagedConfigurationSoftLink.mm:
  • pal/ios/UIKitSoftLink.mm:
  • pal/mac/LookupSoftLink.mm:
  • pal/spi/cocoa/AVFoundationSPI.h:
  • pal/spi/cocoa/AccessibilitySupportSoftLink.cpp:
  • pal/spi/cocoa/AppSSOSPI.h:
  • pal/spi/cocoa/AuthKitSPI.h:
  • pal/spi/cocoa/DataDetectorsCoreSPI.h:
  • pal/spi/cocoa/LaunchServicesSPI.h:
  • pal/spi/cocoa/NSAccessibilitySPI.h:
  • pal/spi/cocoa/NSAttributedStringSPI.h:
  • pal/spi/cocoa/NSProgressSPI.h:
  • pal/spi/cocoa/NSURLDownloadSPI.h:
  • pal/spi/cocoa/NSUserDefaultsSPI.h:
  • pal/spi/cocoa/NSXPCConnectionSPI.h:
  • pal/spi/cocoa/PassKitSPI.h:
  • pal/spi/cocoa/SecKeyProxySPI.h:
  • pal/spi/ios/CelestialSPI.h:
  • pal/spi/mac/DataDetectorsSPI.h:
  • pal/spi/mac/NSColorWellSPI.h:
  • pal/spi/mac/NSGraphicsSPI.h:
  • pal/spi/mac/NSPopoverColorWellSPI.h:
  • pal/spi/mac/NSScrollerImpSPI.h:

More #import, less #pragma once.

Source/WebKit:

  • mac/MigrateHeadersFromWebKitLegacy.make: Delete stale MemoryMeasure.h

forwarding header from incremental WebKit builds and ignore when generating
new forwarding headers.

  • Platform/foundation/LoggingFoundation.mm:

(WebKit::logLevelString): Use string directly instead of a named constant.

  • UIProcess/mac/WebColorPickerMac.h: Mark class final.
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
  • NetworkProcess/cache/NetworkCacheDataCocoa.mm:
  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
  • NetworkProcess/cocoa/NetworkActivityTrackerCocoa.mm:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:
  • NetworkProcess/webrtc/NetworkRTCProvider.mm:
  • Platform/spi/Cocoa/DeviceManagementSPI.h:
  • Platform/spi/Cocoa/LocalAuthenticationSPI.h:
  • Platform/spi/Cocoa/NearFieldSPI.h:
  • Platform/spi/Cocoa/SafeBrowsingSPI.h:
  • Platform/spi/mac/AppKitSPI.h:
  • Shared/API/Cocoa/RemoteObjectInvocation.mm:
  • Shared/API/Cocoa/WKMain.mm:
  • Shared/APIWebArchive.mm:
  • Shared/APIWebArchiveResource.mm:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm:
  • Shared/Cocoa/LoadParametersCocoa.mm:
  • Shared/Cocoa/SandboxInitialiationParametersCocoa.mm:
  • Shared/Cocoa/WKNSData.mm:
  • Shared/DocumentEditingContext.mm:
  • Shared/Plugins/mac/PluginSandboxProfile.mm:
  • Shared/RemoteLayerTree/WKAnimationDelegate.h:
  • Shared/UserInterfaceIdiom.mm:
  • Shared/ios/WebIconUtilities.mm:
  • Shared/mac/CodeSigning.mm:
  • Shared/mac/ColorSpaceData.mm:
  • Shared/mac/HangDetectionDisablerMac.mm:
  • Shared/mac/PDFKitImports.mm:
  • UIProcess/API/Cocoa/APIContentRuleListStoreCocoa.mm:
  • UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm:
  • UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
  • UIProcess/API/Cocoa/WKContentRuleList.mm:
  • UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm:
  • UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
  • UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm:
  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h:
  • UIProcess/API/Cocoa/_WKApplicationManifest.h:
  • UIProcess/API/Cocoa/_WKAttachment.h:
  • UIProcess/API/Cocoa/_WKResourceLoadInfoInternal.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstPartyInternal.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdPartyInternal.h:
  • UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.mm:
  • UIProcess/API/Cocoa/_WKUserContentFilter.mm:
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponseInternal.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h:
  • UIProcess/Authentication/mac/WebCredentialMac.mm:
  • UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
  • UIProcess/Cocoa/IconLoadingDelegate.mm:
  • UIProcess/Cocoa/MediaUtilities.mm:
  • UIProcess/Cocoa/PreferenceObserver.h:
  • UIProcess/Cocoa/PreferenceObserver.mm:
  • UIProcess/Cocoa/SOAuthorization/NavigationSOAuthorizationSession.mm:
  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.h:
  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
  • UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.h:
  • UIProcess/Cocoa/WKEditCommand.h:
  • UIProcess/Cocoa/WKFullKeyboardAccessWatcher.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:
  • UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm:
  • UIProcess/Inspector/mac/WKInspectorViewController.h:
  • UIProcess/Inspector/mac/WKInspectorWKWebView.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
  • UIProcess/RemoteLayerTree/mac/ScrollerMac.mm:
  • UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm:
  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
  • UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
  • UIProcess/ios/WKDeferringGestureRecognizer.h:
  • UIProcess/ios/WKHighlightLongPressGestureRecognizer.h:
  • UIProcess/ios/WebDataListSuggestionsDropdownIOS.h:
  • UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
  • UIProcess/ios/forms/WKDatePickerViewController.h:
  • UIProcess/ios/forms/WKDatePickerViewController.mm:
  • UIProcess/ios/forms/WKFocusedFormControlView.h:
  • UIProcess/ios/forms/WKFocusedFormControlView.mm:
  • UIProcess/ios/forms/WKFormColorPicker.mm:
  • UIProcess/ios/forms/WKNumberPadViewController.h:
  • UIProcess/ios/forms/WKNumberPadViewController.mm:
  • UIProcess/ios/forms/WKQuickboardListViewController.h:
  • UIProcess/ios/forms/WKQuickboardListViewController.mm:
  • UIProcess/ios/forms/WKSelectMenuListViewController.h:
  • UIProcess/ios/forms/WKTimePickerViewController.h:
  • UIProcess/ios/forms/WKTimePickerViewController.mm:
  • UIProcess/ios/fullscreen/WKFullScreenViewController.h:
  • UIProcess/ios/fullscreen/WKFullscreenStackView.h:
  • UIProcess/ios/fullscreen/WKFullscreenStackView.mm:
  • UIProcess/mac/PageClientImplMac.mm:
  • UIProcess/mac/WKSharingServicePickerDelegate.h:
  • WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
  • WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.h:
  • WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp:
  • WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h:
  • WebProcess/WebPage/mac/PageBannerMac.mm:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

More #import, less #pragma once.

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj: Removed MemoryMeasure.h/mm.

Source/WebKitLegacy/ios:

  • Misc/MemoryMeasure.h: Removed.
  • Misc/MemoryMeasure.mm: Removed.
  • WebKit.iOS.exp: Removed MemoryMeasure symbols.

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig: Removed MemoryMeasure.h from

EXCLUDED_SOURCE_FILE_NAMES.

  • Misc/WebCache.mm:

(+[WebCache emptyInMemoryResources]): Removed invocation of MemoryMeasure.
This is no longer used for anything.

  • History/BackForwardList.mm:
  • Plugins/Hosted/ProxyRuntimeObject.mm:
  • Plugins/Hosted/WebHostedNetscapePluginView.mm:
  • WebCoreSupport/SearchPopupMenuMac.mm:
  • WebCoreSupport/WebAlternativeTextClient.mm:
  • WebCoreSupport/WebSecurityOriginInternal.h:
  • WebInspector/WebInspector.mm:
  • WebView/WebFramePrivate.h:
  • WebView/WebScriptWorld.h:
  • WebView/WebView.mm:

More #import, less #pragma once.

Source/WTF:

  • wtf/cocoa/Entitlements.mm:
  • wtf/cocoa/FileSystemCocoa.mm:
  • wtf/cocoa/MainThreadCocoa.mm:
  • wtf/cocoa/SystemTracingCocoa.cpp:
  • wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
  • wtf/mac/SchedulePairMac.mm:
  • wtf/text/cocoa/StringCocoa.mm:
  • wtf/text/cocoa/TextStreamCocoa.mm:

More #import.

Tools:

  • DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
  • DumpRenderTree/ios/DumpRenderTreeAppMain.mm:
  • DumpRenderTree/mac/AccessibilityCommonMac.h:
  • DumpRenderTree/mac/DumpRenderTreeMain.mm:
  • TestRunnerShared/cocoa/ClassMethodSwizzler.mm:
  • TestRunnerShared/cocoa/InstanceMethodSwizzler.mm:
  • TestRunnerShared/cocoa/LayoutTestSpellChecker.h:
  • TestRunnerShared/mac/NSPasteboardAdditions.h:
  • TestRunnerShared/spi/AppKitTestSPI.h:
  • TestRunnerShared/spi/PencilKitTestSPI.h:
  • TestWebKitAPI/DataDetectorsCoreSPI.h:
  • TestWebKitAPI/EditingTestHarness.h:
  • TestWebKitAPI/EditingTestHarness.mm:
  • TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:
  • TestWebKitAPI/Tests/WebCore/LineBreaking.mm:
  • TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:
  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:
  • TestWebKitAPI/Tests/WebKit/AGXCompilerService.mm:
  • TestWebKitAPI/Tests/WebKit/AccessibilityRemoteUIApp.mm:
  • TestWebKitAPI/Tests/WebKit/BacklightLevelNotification.mm:
  • TestWebKitAPI/Tests/WebKit/Battery.mm:
  • TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm:
  • TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:
  • TestWebKitAPI/Tests/WebKit/FindMatches.mm:
  • TestWebKitAPI/Tests/WebKit/GrantAccessToMobileAssets.mm:
  • TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm:
  • TestWebKitAPI/Tests/WebKit/LocalizedDeviceModel.mm:
  • TestWebKitAPI/Tests/WebKit/MimeTypes.mm:
  • TestWebKitAPI/Tests/WebKit/NoHistoryItemScrollToFragment.mm:
  • TestWebKitAPI/Tests/WebKit/PasteboardNotifications.mm:
  • TestWebKitAPI/Tests/WebKit/PictureInPictureSupport.mm:
  • TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:
  • TestWebKitAPI/Tests/WebKit/SleepDisabler.mm:
  • TestWebKitAPI/Tests/WebKit/ViewportSizeForViewportUnits.mm:
  • TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm:
  • TestWebKitAPI/Tests/WebKit/WebFilter.mm:
  • TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm:
  • TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm:
  • TestWebKitAPI/Tests/WebKit/mac/CustomBundleObject.h:
  • TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm:
  • TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter_Bundle.mm:
  • TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm:
  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm:
  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewAfterEnterFullscreen.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewDuringEnterFullscreen.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CopyRTF.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DeviceManagementRestrictions.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DoAfterNextPresentationUpdateAfterCrash.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FindInPageAPI.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FixedLayoutSize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LoadFileURL.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/MediaType.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NoPauseWhenSwitchingTabs.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ObservedRenderingProgressEventsAfterCrash.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/OverrideViewportArguments.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PageZoom.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TabOutOfWebView.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h:
  • TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TextSize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TextWidth.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/VideoQualityDisplayCompositing.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm:
  • TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:
  • TestWebKitAPI/Tests/ios/DataDetectorsTestIOS.mm:
  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
  • TestWebKitAPI/Tests/ios/OverflowScrollViewTests.mm:
  • TestWebKitAPI/Tests/ios/RenderingProgressTests.mm:
  • TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
  • TestWebKitAPI/Tests/ios/ScrollViewScrollabilityTests.mm:
  • TestWebKitAPI/Tests/ios/SelectionByWord.mm:
  • TestWebKitAPI/Tests/ios/SelectionModifyByParagraphBoundary.mm:
  • TestWebKitAPI/Tests/ios/TestInputDelegate.h:
  • TestWebKitAPI/Tests/ios/TestInputDelegate.mm:
  • TestWebKitAPI/Tests/ios/TextAutosizingBoost.mm:
  • TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
  • TestWebKitAPI/Tests/ios/WKScrollViewTests.mm:
  • TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
  • TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm:
  • TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm:
  • TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm:
  • TestWebKitAPI/Tests/mac/BackForwardList.mm:
  • TestWebKitAPI/Tests/mac/BackgroundColor.mm:
  • TestWebKitAPI/Tests/mac/CandidateTests.mm:
  • TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm:
  • TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm:
  • TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm:
  • TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm:
  • TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm:
  • TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm:
  • TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm:
  • TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:
  • TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm:
  • TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm:
  • TestWebKitAPI/Tests/mac/SetDocumentURI.mm:
  • TestWebKitAPI/Tests/mac/SimplifyMarkup.mm:
  • TestWebKitAPI/Tests/mac/SubresourceErrorCrash.mm:
  • TestWebKitAPI/Tests/mac/TypingStyleCrash.mm:
  • TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm:
  • TestWebKitAPI/Tests/mac/WebScriptObjectDescription.mm:
  • TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm:
  • TestWebKitAPI/cocoa/DragAndDropSimulator.h:
  • TestWebKitAPI/cocoa/NSItemProviderAdditions.h:
  • TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm:
  • TestWebKitAPI/cocoa/TestContextMenuDriver.h:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.h:
  • TestWebKitAPI/cocoa/TestProtocol.mm:
  • TestWebKitAPI/cocoa/TestUIDelegate.h:
  • TestWebKitAPI/cocoa/UtilitiesCocoa.mm:
  • TestWebKitAPI/ios/PencilKitTestSPI.h:
  • TestWebKitAPI/mac/JavaScriptTestMac.mm:
  • TestWebKitAPI/mac/NSFontPanelTesting.h:
  • TestWebKitAPI/mac/NSFontPanelTesting.mm:
  • TestWebKitAPI/mac/OffscreenWindow.h:
  • TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
  • TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.mm:
  • TestWebKitAPI/mac/TestDraggingInfo.h:
  • TestWebKitAPI/mac/TestFilePromiseReceiver.h:
  • TestWebKitAPI/mac/TestFontOptions.h:
  • TestWebKitAPI/mac/TestInspectorBar.h:
  • TestWebKitAPI/mac/WebKitAgnosticTest.mm:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:
  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h:
  • WebKitTestRunner/mac/PoseAsClass.mm:

More #import, less #pragma once.

8:24 AM Changeset in webkit [260365] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[Flatpak SDK] Prevent exception when calling git in a non-git repository
https://bugs.webkit.org/show_bug.cgi?id=210737

Reviewed by Philippe Normand.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.is_branch_build): Return false if command executes in a
non-git repository (i.e SVN).

7:37 AM Changeset in webkit [260364] by youenn@apple.com
  • 9 edits
    8 adds in trunk

Safari doesn't apply frameRate limit when request stream from Camera
https://bugs.webkit.org/show_bug.cgi?id=210186
<rdar://problem/61452794>

Reviewed by Eric Carlson.

Source/WebCore:

Add support to RealtimeVideoSource to decimate the video samples based on the observed frame rate of its capture source.
This allows supporting two tracks using the same capture device, one track being low frame rate and the other one high frame rate.

Clean-up refactoring to make RealtimeVideoSource directly inherit from RealtimeVideoCaptureSource.
Migrate size and format of frame adaptation from RealtimeVideoCaptureSource to RealtimeVideoSource.
Fix mock capture source to update its frame rate when asked by applyConstraints.

Tests: fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing.html

fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing.html
fast/mediastream/mediastreamtrack-video-frameRate-decreasing.html
fast/mediastream/mediastreamtrack-video-frameRate-increasing.html

  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

(WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers):
(WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):

  • platform/mediastream/RealtimeVideoCaptureSource.h:

(WebCore::RealtimeVideoCaptureSource::observedFrameRate const):

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::RealtimeVideoSource):
(WebCore::m_source):
(WebCore::RealtimeVideoSource::adaptVideoSample):
(WebCore::RealtimeVideoSource::videoSampleAvailable):

  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::setFrameRateWithPreset):

  • testing/Internals.cpp:

(WebCore::Internals::observeMediaStreamTrack):

LayoutTests:

  • fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing-expected.txt: Added.
  • fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing.html: Added.
  • fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing-expected.txt: Added.
  • fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing.html: Added.
  • fast/mediastream/mediastreamtrack-video-framerate-decreasing-expected.txt: added.
  • fast/mediastream/mediastreamtrack-video-framerate-decreasing.html: added.
  • fast/mediastream/mediastreamtrack-video-framerate-increasing-expected.txt: added.
  • fast/mediastream/mediastreamtrack-video-framerate-increasing.html: added.
  • webrtc/routines.js:
5:29 AM Changeset in webkit [260363] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak SDK] Drive-by fixes
https://bugs.webkit.org/show_bug.cgi?id=210557

Reviewed by Žan Doberšek.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox): Properly format error message.
(WebkitFlatpak.main): Show flatpak update output.

5:10 AM Changeset in webkit [260362] by keith_miller@apple.com
  • 2 edits in trunk/JSTests

Unreviewed, revert accidental test changes.

  • microbenchmarks/for-of-iterate-array-entries.js:

(foo):

5:01 AM Changeset in webkit [260361] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

[32-bits] stress/for-of-array-different-globals.js is failing
https://bugs.webkit.org/show_bug.cgi?id=210718

Unreviewed gardening.

Skip test for arm and mips, failing due to r260323

Patch by Paulo Matos <Paulo Matos> on 2020-04-20

  • stress/for-of-array-different-globals.js:
4:56 AM Changeset in webkit [260360] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

WebAnimations API doesn't properly apply keyframe easings to transforms
https://bugs.webkit.org/show_bug.cgi?id=210526
<rdar://problem/61800424>

Reviewed by Antti Koivisto.

Source/WebCore:

GraphicsLayerCA has code that determines whether an animation can be accelerated looking at the timing function of its keyframes and excluding
animations that use a steps timing function as one of its values. However, we we would fail to set the timing function on the KeyframeValue for
each keyframe in the KeyframeList we create for a JS-originated animation. We now do this correctly.

Test: webanimations/transform-animation-with-steps-timing-function-not-accelerated.html

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::updateBlendingKeyframes):

LayoutTests:

Add a new test that checks that an animation targeting an accelerted property does not yield an accelerated animation if one of its keyframes contains a steps timing function.

  • webanimations/transform-animation-with-steps-timing-function-not-accelerated-expected.txt: Added.
  • webanimations/transform-animation-with-steps-timing-function-not-accelerated.html: Added.
3:22 AM Changeset in webkit [260359] by Pablo Saavedra
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] lowWatermarkPages() in MemoryPressureMonitor.cpp only searches the "low" value inside the first "Node" section
https://bugs.webkit.org/show_bug.cgi?id=210345

Reviewed by Adrian Perez de Castro.

  • UIProcess/linux/MemoryPressureMonitor.cpp:

(WebKit::lowWatermarkPages):

2:54 AM Changeset in webkit [260358] by ysuzuki@apple.com
  • 13 edits in trunk

StructuredClone algorithm should be aware of BigInt
https://bugs.webkit.org/show_bug.cgi?id=210728

Reviewed by Mark Lam.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/bigint_value-expected.txt:
  • web-platform-tests/html/infrastructure/safe-passing-of-structured-data/structured_clone_bigint-expected.txt:

Source/JavaScriptCore:

  • CMakeLists.txt:
  • runtime/BigIntObject.h:
  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::digit): Deleted.
(JSC::JSBigInt::setDigit): Deleted.

  • runtime/JSBigInt.h:

(JSC::JSBigInt::digit):
(JSC::JSBigInt::setDigit):

Source/WebCore:

This patch adds structured-cloning for BigInt and BigIntObject.
The logic is adding BigIntTag & BigIntObjectTag. And then we put content of BigInt with length.
And deserialization reads them to reconstruct BigInt or BigIntObject.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpImmediate):
(WebCore::CloneSerializer::dumpBigIntData):
(WebCore::CloneSerializer::dumpBigInt32Data):
(WebCore::CloneSerializer::dumpHeapBigIntData):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::readBigInt):
(WebCore::CloneDeserializer::readTerminal):

LayoutTests:

  • inspector/model/remote-object/number-expected.txt:
  • inspector/model/remote-object/object-expected.txt:
2:20 AM Changeset in webkit [260357] by svillar@igalia.com
  • 2 edits in trunk/Tools

[WebXR][WPE] Let XR_RUNTIME_JSON environment variable go through for testing
https://bugs.webkit.org/show_bug.cgi?id=210738

Reviewed by Žan Doberšek.

The OpenXR loader might be instructed to load a specific runtime by
using the XR_RUNTIME_JSON environment variable. Let it get in for testing.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort.setup_environ_for_server): Copy XR_RUNTIME_JSON if set.

1:33 AM Changeset in webkit [260356] by Carlos Garcia Campos
  • 21 edits in trunk

[GTK][WPE] Enable resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=210184

Reviewed by Žan Doberšek.

.:

Enable resource load statistics.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::setCookiesFromDOM const): Return early if cookies are blocked and update the
persistent cookies expiration if needed.
(WebCore::NetworkStorageSession::deleteCookiesForHostnames): Implement this when receiving
IncludeHttpOnlyCookies parameter.
(WebCore::NetworkStorageSession::hasCookies const): Implement this.
(WebCore::NetworkStorageSession::getRawCookies const): Honor shouldAskITP parameter.
(WebCore::cookiesForSession): Ditto.
(WebCore::NetworkStorageSession::cookiesForDOM const): Ditto.
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): Ditto.

Source/WebKit:

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create): Pass page and frame identifiers to the constructor.
(WebKit::NetworkDataTask::isThirdPartyRequest const): Moved from NetworkDataTaskCocoa.mm.
(WebKit::NetworkDataTask::restrictRequestReferrerToOriginIfNeeded): Ditto.

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): Initialize m_frameID and m_pageID.
(WebKit::NetworkDataTaskSoup::createRequest): Add WasBlockingCookies parameter. Call
restrictRequestReferrerToOriginIfNeeded() and disable cookies in the soup message if cookies should be blocked.
(WebKit::NetworkDataTaskSoup::clearRequest): Reset m_isBlockingCookies.
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Pass WasBlockingCookies to createRequest().

  • NetworkProcess/soup/NetworkDataTaskSoup.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadedThirdPartyDomains): Added for tests.
(WKPageClearLoadedThirdPartyDomains): Ditto.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/glib/WebsiteDataStoreGLib.cpp:

(WebKit::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Use lowercase for consistency with other
default directories.

Tools:

Implement TestController::loadedThirdPartyDomains() and TestController::clearLoadedThirdPartyDomains() for
non-cocoa ports.

  • WebKitTestRunner/TestController.cpp:

(WTR::LoadedThirdPartyDomainsCallbackContext::LoadedThirdPartyDomainsCallbackContext):
(WTR::loadedThirdPartyDomainsCallback):
(WTR::TestController::loadedThirdPartyDomains):
(WTR::TestController::clearLoadedThirdPartyDomains):

LayoutTests:

Unskip tests that are now passing and add expectations for the two reminaing failures.

  • http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported.html: Use setTimeout in onload

handler to avoid a deadlock due to sync injected bundle messages.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
1:25 AM Changeset in webkit [260355] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style should not complain about missing config.h header in WebKitLegacy source files
<https://webkit.org/b/210734>

Reviewed by Darin Adler.

  • Scripts/webkitpy/style/checkers/cpp.py:

(_NO_CONFIG_H_PATH_PATTERNS):

  • Add 'Source/WebKitLegacy/' to the list.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(OrderOfIncludesTest.test_primary_header):

  • Add test for Source/WebKitLegacy source file.
12:11 AM Changeset in webkit [260354] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r259610): Leak of RBSAssertionInvalidationCallbackType due to missing -dealloc
<https://webkit.org/b/210711>
<rdar://problem/61993361>

Reviewed by Geoffrey Garen.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKRBSAssertionDelegate dealloc]): Add.

  • Release _invalidationCallback to fix the leak.

Apr 19, 2020:

11:32 PM Changeset in webkit [260353] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Use Optional<FloatQuad> in TransformState
https://bugs.webkit.org/show_bug.cgi?id=144226

Reviewed by Sam Weinig.

Use Optional<> instead of pointers in TransformState, make it loggable, make FloatQuad loggable.

  • platform/graphics/FloatQuad.cpp:

(WebCore::operator<<):

  • platform/graphics/FloatQuad.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::flushCompositingState):
(WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect const):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):

  • platform/graphics/transforms/TransformState.cpp:

(WebCore::TransformState::operator=):
(WebCore::TransformState::mappedSecondaryQuad const):
(WebCore::TransformState::setLastPlanarSecondaryQuad):
(WebCore::TransformState::flattenWithTransform):
(WebCore::operator<<):

  • platform/graphics/transforms/TransformState.h:

(WebCore::TransformState::setSecondaryQuad):
(WebCore::TransformState::lastPlanarSecondaryQuad const):
(WebCore::TransformState::isMappingSecondaryQuad const):
(WebCore::TransformState::accumulatedTransform const):

11:30 PM Changeset in webkit [260352] by ysuzuki@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, skip imported/w3c/web-platform-tests/IndexedDB/structured-clone
https://bugs.webkit.org/show_bug.cgi?id=210731#c4

Skipping this test based on the following rationales.

  1. This test was previously *effectively* skipped because it is including BigInt syntax. This test immediately throws SyntaxError. So nothing in this test was executed before.
  2. Now JSC supports BigInt syntax. Then, this test is now executed finally. And crash happens when deserializaing DOMMatrixReadOnly.
  3. This is because DOMMatrixReadOnly requires JSDOMGlobalObject since DOMMatrixReadOnly is WebCore object, not JSC object.
  4. However, IDBSerializationContext.cpp is using plain JSGlobalObject. This is not correct since it is JSC JSGlobalObject and it does not include DOMMatrix implementations.
  5. So, nothing is related to BigInt here.
11:20 PM Changeset in webkit [260351] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove unneeded code from FrameLoader::loadURL
https://bugs.webkit.org/show_bug.cgi?id=210696

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

Remove unneeded code from FrameLoader::loadURL, since the only way the load type can be Reload
is if loadFrameRequest set it, and the only way loadFrameRequest can set it is if cachePolicy
is ReloadIgnoringCacheData, so no need to set it again in FrameLoader::loadURL.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

10:55 PM Changeset in webkit [260350] by beidson@apple.com
  • 37 edits
    1 add in trunk

Add WKScriptMessageHandler API that asynchronously responds with a promise.
rdar://problem/57243492 and https://bugs.webkit.org/show_bug.cgi?id=206398

Reviewed by Andy Estes.
Source/WebCore:

Covered by new API tests.

Updated for moving an #include into implementation files:

  • bindings/js/JSDOMPromiseDeferred.cpp:
  • bindings/js/JSDOMPromiseDeferred.h:
  • html/HTMLMediaElement.cpp:
  • page/DOMWindow.cpp:
  • workers/service/ServiceWorkerGlobalScope.cpp:
  • page/UserMessageHandler.cpp:

(WebCore::UserMessageHandler::postMessage): Return a promise to be fulfilled by the API client.

  • page/UserMessageHandler.h:
  • page/UserMessageHandler.idl:
  • page/UserMessageHandlerDescriptor.h:

Source/WebKit:

Change webkit.messageHandlers.<name>.postMessage() to return a promise instead of undefined.

Allow for that promise to be resolved by an asynchronous reply block up in the API client.
This is like the spiritual opposite version of [WKWebView callAsyncFunction:...]

And while we're adding a new script message handler variant, we're adding it sandboxed by WKContentWorld.

  • Shared/API/APISerializedScriptValue.h:
  • UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:

(API::validateObject):
(API::coreValueFromNSObject):
(API::SerializedScriptValue::createFromNSObject):
(API::SerializedScriptValue::wireBytesFromNSObject): Deleted.

  • UIProcess/API/Cocoa/WKScriptMessage.h: Now that script message handlers can be per-world, messages declare which world they were posted from.
  • UIProcess/API/Cocoa/WKScriptMessage.mm:

(-[WKScriptMessage _initWithBody:webView:frameInfo:name:world:]):
(-[WKScriptMessage world]):
(-[WKScriptMessage _initWithBody:webView:frameInfo:name:]): Deleted.

  • UIProcess/API/Cocoa/WKScriptMessageInternal.h:
  • UIProcess/API/Cocoa/WKScriptMessageHandlerWithReply.h: Added. Declare the new protocol for a script message handler that can reply to messages asynchronously.
  • UIProcess/API/Cocoa/WKUserContentController.h:
  • UIProcess/API/Cocoa/WKUserContentController.mm:

(-[WKUserContentController _addScriptMessageHandler:]):
(-[WKUserContentController addScriptMessageHandler:name:]):
(-[WKUserContentController addScriptMessageHandler:contentWorld:name:]):
(-[WKUserContentController addScriptMessageHandlerWithReply:contentWorld:name:]):
(-[WKUserContentController removeScriptMessageHandlerForName:contentWorld:]):
(-[WKUserContentController removeAllScriptMessageHandlersFromContentWorld:]):
(-[WKUserContentController removeAllScriptMessageHandlers]):

  • UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
  • UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]):
Update for new shared API::SerializedScriptValue initialization.

  • UIProcess/API/glib/WebKitUserContentManager.cpp:
  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
  • UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp:
  • UIProcess/UserContent/WebScriptMessageHandler.h:
  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
(WebKit::WebUserContentControllerProxy::didPostMessage):

  • UIProcess/UserContent/WebUserContentControllerProxy.h:
  • UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:

(webkit_dom_dom_window_webkit_message_handlers_post_message):

  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::removeAllUserScriptMessageHandlers):
(WebKit::WebUserContentController::removeAllUserScriptMessageHandlersForWorlds):

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

Source/WTF:

  • wtf/CompletionHandler.h:

(WTF::CompletionHandlerWithFinalizer<Out): Add a variant of CompletionHandler that allows for a Finalizer function

to handle cases where the Completion function hasn't been called at destruction time.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST):
(webViewForScriptMessageHandlerMultipleHandlerRemovalTest):
(-[AsyncScriptMessageHandler userContentController:didReceiveScriptMessage:replyHandler:]):

10:15 PM Changeset in webkit [260349] by Ross Kirsling
  • 25 edits
    1 copy
    6 adds in trunk

[ECMA-402] Intl.RelativeTimeFormat missing in WebKit
https://bugs.webkit.org/show_bug.cgi?id=209770

Reviewed by Darin Adler.

JSTests:

  • stress/intl-relativetimeformat.js: Added.
  • test262/config.yaml:

Enable Intl.RelativeTimeFormat feature with flag.

  • test262/expectations.yaml:

Mark known failures.
Test for locale validation is not specific to RelativeTimeFormat and should be investigated separately.
Tests for Polish appear to be wrong and should be corrected in test262.

Source/JavaScriptCore:

This patch implements the recent ECMA-402 feature Intl.RelativeTimeFormat.

RelativeTimeFormat has format / formatToParts functions like NumberFormat / DateTimeFormat
and is used to turn a number and unit into a formatted relative time string, e.g.:

new Intl.RelativeTimeFormat('en').format(10, 'day')

'in 10 days'

new Intl.RelativeTimeFormat('en', { numeric: 'auto' }).format(0, 'day')

'today'

Implementation of RelativeTimeFormat#formatToParts makes direct use of NumberFormat#formatToParts,
as the relative time string consists of at most one formatted number with optional literal text on either side.

This feature is runtime-guarded by the useIntlRelativeTimeFormat option.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/CommonIdentifiers.h:
  • runtime/IntlRelativeTimeFormat.cpp: Added.
  • runtime/IntlRelativeTimeFormat.h: Added.
  • runtime/IntlRelativeTimeFormatConstructor.cpp: Added.
  • runtime/IntlRelativeTimeFormatConstructor.h: Added.
  • runtime/IntlRelativeTimeFormatPrototype.cpp: Added.
  • runtime/IntlRelativeTimeFormatPrototype.h: Added.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::relativeTimeFormatStructure):

  • runtime/OptionsList.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Add feature and runtime option.

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::formatToParts):

  • runtime/IntlPluralRules.cpp:

(JSC::IntlPluralRules::initializePluralRules):
(JSC::IntlPluralRules::resolvedOptions):
Make "type" a property name.

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):
(JSC::IntlNumberFormat::resolvedOptions):
(JSC::IntlNumberFormat::formatToPartsInternal):
(JSC::IntlNumberFormat::formatToParts):

  • runtime/IntlNumberFormat.h:

Factor out formatToPartsInternal so that RelativeTimeFormat can use it with its own UNumberFormat.
(This logic is too complicated to duplicate; it's because ICU won't split, e.g., "10,000" into parts for us.)

  • runtime/IntlObject.cpp:

(JSC::IntlObject::IntlObject):
(JSC::IntlObject::create):
(JSC::IntlObject::finishCreation):
(JSC::intlAvailableLocales):
(JSC::intlCollatorAvailableLocales):
(JSC::isUnicodeLocaleIdentifierType):
(JSC::supportedLocales):
(JSC::intlDateTimeFormatAvailableLocales): Deleted.
(JSC::intlNumberFormatAvailableLocales): Deleted.

  • runtime/IntlObject.h:

(JSC::intlDateTimeFormatAvailableLocales):
(JSC::intlNumberFormatAvailableLocales):
(JSC::intlPluralRulesAvailableLocales):
(JSC::intlRelativeTimeFormatAvailableLocales):
Perform three corrections for Intl classes:

  1. Collator should be the only class with unique "available locales". [unum|udat]_getAvailable exist but they've deferred to uloc_getAvailable for 20 years.
  2. isUnicodeLocaleIdentifierType isn't just alphanum{3,8} but rather alphanum{3,8} (sep alphanum{3,8})*. This is my own mistake from r239941.
  3. supportedLocalesOf entries should not be frozen. Changed in https://github.com/tc39/ecma402/pull/278.
  • tools/JSDollarVM.cpp:

(JSC::functionICUVersion):
(JSC::JSDollarVM::finishCreation):
Add $vm.icuVersion so that we can add per-line skips to stress tests.

Tools:

  • Scripts/run-jsc-stress-tests:

Add runIntlRelativeTimeFormatEnabled.

8:46 PM Changeset in webkit [260348] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r244091): Leak of TaskStateChangedCallbackType due to missing -dealloc
<https://webkit.org/b/210710>
<rdar://problem/61992856>

Reviewed by Darin Adler.

  • Shared/Cocoa/ProcessTaskStateObserver.mm:

(-[WKProcessTaskStateObserverDelegate dealloc]): Add.

  • Release _taskStateChangedCallback to fix the leak.
7:18 PM Changeset in webkit [260347] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

[IPC hardening] Use MESSAGE_CHECK in WebPageProxy::loadRecentSearches() and WebPageProxy::saveRecentSearches()
<https://webkit.org/b/210683>
<rdar://problem/59240446>

Reviewed by Geoffrey Garen.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(MESSAGE_CHECK): Add.
(MESSAGE_CHECK_COMPLETION): Add.
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):

  • Replace boolean check of const String& with MESSAGE_CHECK.
6:56 PM Changeset in webkit [260346] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] SlowPathCall is not supported by callOperation in Windows
https://bugs.webkit.org/show_bug.cgi?id=210727

Reviewed by Ross Kirsling.

In Windows, SlowPathCall should be handled by JITSlowPathCall, otherwise, stack is not correctly allocated.

  • jit/JITCall.cpp:

(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):

  • jit/SlowPathCall.h:

(JSC::JITSlowPathCall::call):

5:59 PM Changeset in webkit [260345] by ysuzuki@apple.com
  • 4 edits in trunk/Source

[JSC] Enable BigInt
https://bugs.webkit.org/show_bug.cgi?id=210726

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • runtime/OptionsList.h:

Source/WTF:

  • wtf/PlatformUse.h:
4:53 PM Changeset in webkit [260344] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] LLInt slow path call should not have third argument
https://bugs.webkit.org/show_bug.cgi?id=210721

Reviewed by Mark Lam.

LLInt callSlowPath does not work with third argument in Windows, CLoop etc. LLInt slow-path should not take third argument,
instead, use bytecode.metadata(...) to get metadata.

  • jit/JITCall.cpp:

(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):

  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::iterator_open_try_fast):
(JSC::SLOW_PATH_DECL):
(JSC::iterator_next_try_fast):
(JSC::iterator_open_try_fast_narrow): Deleted.
(JSC::iterator_open_try_fast_wide16): Deleted.
(JSC::iterator_open_try_fast_wide32): Deleted.
(JSC::iterator_next_try_fast_narrow): Deleted.
(JSC::iterator_next_try_fast_wide16): Deleted.
(JSC::iterator_next_try_fast_wide32): Deleted.

  • runtime/CommonSlowPaths.h:
2:18 PM Changeset in webkit [260343] by mark.lam@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Fix missing exception checks and handling in JSC APIs.
https://bugs.webkit.org/show_bug.cgi?id=210715
<rdar://problem/61599658>

Reviewed by Saam Barati.

  • API/APICallbackFunction.h:

(JSC::APICallbackFunction::call):

  • We should return early if an exception was thrown. We should not be using the result in any way since we cannot rely on it having any sane value.

(JSC::APICallbackFunction::construct):

  • For consistency, also return an undefined here when an exception was thrown.
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::construct):
(JSC::JSCallbackObject<Parent>::call):

  • Return an undefined if an exception was thrown. Don't return the potentially garbage result value. Who knows what the client code will do with it. Returning an undefined here makes the code more robust.
  • API/JSObjectRef.cpp:

(JSObjectGetProperty):
(JSObjectHasPropertyForKey):
(JSObjectGetPropertyForKey):
(JSObjectDeletePropertyForKey):
(JSObjectGetPropertyAtIndex):
(JSObjectDeleteProperty):

  • Explicitly return a nullptr if an exception was thrown. The toRef() on the result that follows the exception check may or may not return a nullptr (also see toRef(JSC::VM& vm, JSC::JSValue v) for !CPU(ADDRESS64)).
  • API/JSValueRef.cpp:

(JSValueIsEqual):
(JSValueIsInstanceOfConstructor):

  • For consistency, make these return false if an exception is thrown.
  • API/ObjCCallbackFunction.mm:

(JSC::objCCallbackFunctionCallAsFunction):
(JSC::objCCallbackFunctionCallAsConstructor):
(JSC::ObjCCallbackFunctionImpl::call):

  • Add some assertions and return early if an exception was thrown.
11:34 AM Changeset in webkit [260342] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[LFC][TFC] Add column spanning support for flexible table width
https://bugs.webkit.org/show_bug.cgi?id=210713

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/table-flex-width-colspans.html

This patch slightly changes the extra space distribution logic by using either the minimum or
the maximum width as the base initial width for the columns.

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutInFlowContent):
(WebCore::Layout::TableFormattingContext::computeColumnWidths):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): Deleted.

  • layout/tableformatting/TableFormattingContext.h:

LayoutTests:

  • fast/layoutformattingcontext/table-flex-width-colspans-expected.txt: Added.
  • fast/layoutformattingcontext/table-flex-width-colspans.html: Added.
11:12 AM Changeset in webkit [260341] by don.olmstead@sony.com
  • 4 edits
    3 moves
    2 adds in trunk/Tools

[CMake] Consolidate TestNetscapePlugin build
https://bugs.webkit.org/show_bug.cgi?id=210691

Reviewed by Fujii Hironori.

The DumpRenderTree CMakeLists.txt contained a definition of TestNetscapePlugIn
which was used for WebKitLegacy ports. The TestNetscapePlugIn directory also had
a CMakeLists.txt used by GTK for its port. The definitions in DumpRenderTree's
CMake are moved into the TestNetscapePlugIn CMake to provide a common definition
for all ports that ENABLE_NETSCAPE_PLUGIN_API.

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
  • DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
  • DumpRenderTree/TestNetscapePlugIn/PlatformGTK.cmake: Added.
  • DumpRenderTree/TestNetscapePlugIn/PlatformWin.cmake: Added.
  • DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.def: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.def.
  • DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.rc: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.rc.
  • DumpRenderTree/TestNetscapePlugIn/win/resource.h: Renamed from Tools/DumpRenderTree/win/resource.h.
11:01 AM Changeset in webkit [260340] by emilio
  • 8 edits in trunk

Don't use the inherited custom properties to store environment variables.
https://bugs.webkit.org/show_bug.cgi?id=210707

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Annotate the progressions.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-logical-enumeration-expected.txt:

Source/WebCore:

It leaks this implementation detail when enumerating the computed style.

Tests: imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.xhtml

imported/w3c/web-platform-tests/css/cssom/getComputedStyle-logical-enumeration.html

  • css/CSSVariableReferenceValue.cpp:

(WebCore::resolveVariableReference):
(WebCore::resolveTokenRange):

  • style/StyleResolveForDocument.cpp:

(WebCore::Style::resolveForDocument):

LayoutTests:

  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
10:56 AM Changeset in webkit [260339] by emilio
  • 2 edits in trunk/Tools

Allow to override sccache server port.
https://bugs.webkit.org/show_bug.cgi?id=210722

Reviewed by Philippe Normand.

This is useful so that sccache can work both inside and outside the sandbox,
without getting confused about flatpak's chroot.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

10:51 AM Changeset in webkit [260338] by Antti Koivisto
  • 28 edits
    2 adds
    8 deletes in trunk

[CSS selectors] :is() / :where() should not allow pseudo-elements at parse-time
https://bugs.webkit.org/show_bug.cgi?id=210701

Reviewed by Anders Carlsson.

Source/WebCore:

https://drafts.csswg.org/selectors/#matches:

"Pseudo-elements cannot be represented by the matches-any pseudo-class; they are not valid within :is()."

Test: fast/selectors/pseudo-element-in-is-where.html

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumePseudo):

LayoutTests:

Remove or update tests for pseudo elements inside :is()/:where().
Also add some :where() rountrip coverage.

  • fast/css/css-selector-text-expected.txt:
  • fast/css/css-selector-text.html:
  • fast/css/css-set-selector-text-expected.txt:
  • fast/css/css-set-selector-text.html:
  • fast/css/is-specificity-6-expected.html: Removed.
  • fast/css/is-specificity-6.html: Removed.
  • fast/css/matches-specificity-6-expected.html: Removed.
  • fast/css/matches-specificity-6.html: Removed.
  • fast/css/parsing-css-allowed-string-characters-expected.txt:
  • fast/css/parsing-css-is-1-expected.txt:
  • fast/css/parsing-css-is-1.html:
  • fast/css/parsing-css-is-2-expected.txt:
  • fast/css/parsing-css-is-2.html:
  • fast/css/parsing-css-is-3-expected.txt:
  • fast/css/parsing-css-is-3.html:
  • fast/css/parsing-css-is-4-expected.txt:
  • fast/css/parsing-css-is-4.html:
  • fast/css/parsing-css-matches-1-expected.txt:
  • fast/css/parsing-css-matches-1.html:
  • fast/css/parsing-css-matches-2-expected.txt:
  • fast/css/parsing-css-matches-2.html:
  • fast/css/parsing-css-matches-3-expected.txt:
  • fast/css/parsing-css-matches-3.html:
  • fast/css/parsing-css-matches-4-expected.txt:
  • fast/css/parsing-css-matches-4.html:
  • fast/selectors/pseudo-element-in-is-where-expected.html: Added.
  • fast/selectors/pseudo-element-in-is-where.html: Added.
  • fast/selectors/pseudo-element-inside-is-expected.html: Removed.
  • fast/selectors/pseudo-element-inside-is.html: Removed.
  • fast/selectors/pseudo-element-inside-matches-expected.html: Removed.
  • fast/selectors/pseudo-element-inside-matches.html: Removed.
  • fast/selectors/querySelector-is-expected.txt:
  • fast/selectors/querySelector-is.html:
  • fast/selectors/querySelector-matches-expected.txt:
  • fast/selectors/querySelector-matches.html:
10:49 AM Changeset in webkit [260337] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][TFC] Take border spacing into account when distributing column spanners width.
https://bugs.webkit.org/show_bug.cgi?id=210712

Reviewed by Antti Koivisto.

While distributing the column spanner extra space among individual columns,
the spacing between these columns (set by border-spacing) should be taken into
account and subtract it from the width to distribute.

<table style="border-spacing: 50px"><tr><td colspan=2>long long text</td></tr><tr><td>lo</td><td>xt</td><tr></table>
[long long text]
[lo] [xt]
The individual columns don't require any extra space from the spanner.

  • layout/FormattingContext.h:

(WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::operator+=):
(WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::operator-=):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):

  • layout/tableformatting/TableGrid.h:

(WebCore::Layout::TableGrid::horizontalSpacing const):
(WebCore::Layout::TableGrid::totalHorizontalSpacing const): Deleted.

10:24 AM Changeset in webkit [260336] by Darin Adler
  • 2 edits in trunk/Tools

REGRESSION (r260334): SpacebarScrolling.cpp (test in TestWebKitAPI) fails to compile because it includes an Objective-C header
https://bugs.webkit.org/show_bug.cgi?id=210723

Reviewed by Brady Eidson.

  • TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp: Instead of including

WKPreferencesPrivate.h, an Objective-C header, include WKPreferencesRefPrivate.h,
the header with the functions this test is trying to use.

6:46 AM Changeset in webkit [260335] by emilio
  • 5 edits
    2 adds in trunk

Fix the logic to decide whether a property is enumerated in a computed style declaration.
https://bugs.webkit.org/show_bug.cgi?id=210695

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Import the test from
https://github.com/web-platform-tests/wpt/pull/23088. One subtest is
failing, separate bug.

  • web-platform-tests/css/cssom/getComputedStyle-logical-enumeration-expected.txt: Added.
  • web-platform-tests/css/cssom/getComputedStyle-logical-enumeration.html: Added.

Source/WebCore:

Fix the logic to decide whether a property is enumerated in a computed
style declaration.

Logical properties don't need stylebuilder code, but still should be
generated. Using the specification->category for this seems a bit
hacky, but unclear if it's worse than adding a new flag.

Tests: fast/css/getComputedStyle/computed-style-enumeration.html

imported/w3c/web-platform-tests/css/cssom/getComputedStyle-logical-enumeration.html

  • css/makeprop.pl:

(skippedFromComputedStyle):
(isLogical):
(sortWithPrefixedPropertiesLast):

Note: See TracTimeline for information about the timeline view.