WebKit.git
2 months ago[GTK] Use ${PYTHON_EXECUTABLE} to run generate-gtkdoc
commit-queue@webkit.org [Sat, 21 Mar 2020 15:22:05 +0000 (15:22 +0000)]
[GTK] Use ${PYTHON_EXECUTABLE} to run generate-gtkdoc
https://bugs.webkit.org/show_bug.cgi?id=208970

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-03-21
Reviewed by Konstantin Tokarev.

.:

There's no need to rely on shebangs when executing python scripts from CMake. This should
ensure the script always works even if the shebang does not.

* Source/cmake/GtkDoc.cmake:

Tools:

We are allowed to use /usr/bin/env in this script because it's not installed (so not
packaged). Therefore we can make the shebang compatible with FreeBSD in this particularl
case.

* gtkdoc/generate-gtkdoc:

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

2 months agoMake the MediaSample::toJSONString method generic
philn@webkit.org [Sat, 21 Mar 2020 14:25:09 +0000 (14:25 +0000)]
Make the MediaSample::toJSONString method generic
https://bugs.webkit.org/show_bug.cgi?id=209287

Reviewed by Eric Carlson.

It is generic and thus can be shared to sub-classes.

* platform/MediaSample.h:
(WebCore::MediaSample::toJSONString const):
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

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

2 months agotelerik.com: Placeholder text is misaligned in search text box
zalan@apple.com [Sat, 21 Mar 2020 14:11:01 +0000 (14:11 +0000)]
telerik.com: Placeholder text is misaligned in search text box
https://bugs.webkit.org/show_bug.cgi?id=209371
<rdar://problem/45945564>

Reviewed by Antti Koivisto.

Source/WebCore:

Let the placeholder box do its own vertical positioning/sizing.
The placeholder box's height is currently set to the height of the editable renderer (sibling box), so when the ::placeholder has
a large font-size set, the text is oddly positioned and gets cut off (the placeholder box has 'overflow: hidden' UA style).
This patch makes the placeholder box center aligned and sized based on the used size (matches both Chrome and FF).

Test: fast/forms/placeholder-content-center.html

* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):

LayoutTests:

* fast/forms/placeholder-content-center-expected.html: Added.
* fast/forms/placeholder-content-center.html: Added.

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

2 months agoREGRESSION (r258679): [ Mac ] fast/scrolling/arrow-key-scroll-in-rtl-document.html...
simon.fraser@apple.com [Sat, 21 Mar 2020 05:54:52 +0000 (05:54 +0000)]
REGRESSION (r258679): [ Mac ] fast/scrolling/arrow-key-scroll-in-rtl-document.html is failing and timing out
https://bugs.webkit.org/show_bug.cgi?id=209299

Reviewed by Daniel Bates.

fast/scrolling/arrow-key-scroll-in-rtl-document.html is unusual in that it uses monitorWheelEvents()
but then issues arrow key presses.

WebCore responds to arrow keys via WebEditorClient::handleKeyboardEvent() calling down into
WebPage::scroll() which ends up in FrameView::requestScrollPositionUpdate() and bounces to the
scrolling thread. This isn't tracked by existing 'defer' reasons on WheelEventTestMonitor, so add a
new defer reason that covers the period for adding the requested scroll go the scrolling state tree,
and responding to it in the scrolling thread.

* page/WheelEventTestMonitor.cpp:
(WebCore::operator<<):
* page/WheelEventTestMonitor.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeRequestsScroll):
* page/scrolling/ThreadedScrollingTree.h:

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

2 months ago[iPadOS] Yahoo! search results are sometimes zoomed in a little
wenson_hsieh@apple.com [Sat, 21 Mar 2020 02:42:39 +0000 (02:42 +0000)]
[iPadOS] Yahoo! search results are sometimes zoomed in a little
https://bugs.webkit.org/show_bug.cgi?id=209356
<rdar://problem/60563952>

Reviewed by Tim Horton.

Source/WebKit:

When the web content process uses `WebPage::scalePage()` to modify the viewport scale (e.g. after a viewport
configuration change) on iOS, it's possible for this new scale to be replaced by a previous scale when
dispatching the next visible content rect update. Consider the following scenario:

1. A remote layer tree transaction is sent to the UI process containing scale `a`.
2. `WebPage::scalePage` is called with a scale `b`.
3. A visible content rect update with scale `a` is scheduled, sent to the web process and dispatched.
4. The page scale reverts to `a`.

This bug exercises the above scenario: the Yahoo search results page specifies a responsive viewport
(device-width and scale=1), but proceeds to lay out outside of the bounds of the device width. As such, after
the document finishes parsing, we attempt to shrink the page to fit; however, if this shrinking happens after
a remote layer tree transaction with the old scale but before the next visible content rect update containing
that old scale, we will end up reverting to this old scale instead of the scale after shrinking to fit. This
same bug is present when using `setViewScale`, which was exercised by the flaky test below, since the new scale
after the viewport configuration change may be overridden by an incoming visible content rect update.

To fix this, we add a mechanism to detect when the page scale has been changed by the web process (e.g. after a
viewport change) and remember the last committed layer tree identifier at that moment. Later, if we get a
visible content rect update with a layer tree commit identifier equal to (or older than) the layer tree commit
identifier when we changed the page scale, don't set the page scale factor using this incoming scale; instead,
wait for the next visible content rect update (which will contain the new scale).

Fixes an existing flaky test: fast/viewport/ios/device-width-viewport-after-changing-view-scale.html

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
(WebKit::WebPage::scalePage):
(WebKit::WebPage::platformDidScalePage):

Add a platform hook that is invoked after scaling the page via `scalePage`. See below for the iOS version.

(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::didFinishDocumentLoad):
(WebKit::WebPage::didFinishLoad):

Drive-by fix: remove an unnecessary `UNUSED_PARAM`. Also, replace calls to schedule the shrink to fit content
timer with a call to `shrinkToFitContent` instead.

* WebProcess/WebPage/WebPage.h:

Add a member variable to remember the last sent layer tree commit ID and page scale, when we last changed the
page scale via the web process. This is set in `platformDidScalePage` below.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::shrinkToFitContent):

Refactor this to not return a bool, but instead call `viewportConfigurationChanged` at the end if the viewport
actually changed.

(WebKit::WebPage::updateVisibleContentRects):

Ignore the incoming page scale when updating visible content rects if it:
1. Is the same as the last page scale we sent via layer tree commit.
2. After sending the above scale, we've since adjusted the page scale such that it is no longer the same.

(WebKit::WebPage::platformDidScalePage):

Update `m_lastLayerTreeTransactionIdAndPageScaleBeforeScalingPage`.

(WebKit::WebPage::scheduleShrinkToFitContent): Deleted.
(WebKit::WebPage::shrinkToFitContentTimerFired): Deleted.

Remove the zero-delay timer before running the shrink-to-fit heuristic, and just call `shrinkToFitContent`
directly. This was a source of flakiness when trying to reproduce the bug, and doesn't seem to serve any
purpose since we shrink-to-fit after dispatching the "DOMContentLoaded" and "load" events anyways.

(WebKit::WebPage::immediatelyShrinkToFitContent): Deleted.

LayoutTests:

Remove failing expectations for fast/viewport/ios/device-width-viewport-after-changing-view-scale.html.

* platform/ios-wk2/TestExpectations:

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

2 months ago[Cocoa] Deny access to database mapping service
pvollan@apple.com [Sat, 21 Mar 2020 01:10:42 +0000 (01:10 +0000)]
[Cocoa] Deny access to database mapping service
https://bugs.webkit.org/show_bug.cgi?id=209339
Source/WebKit:

<rdar://problem/56966010>

Reviewed by Brent Fulgham.

In order for the WebContent process to not have permantent access to the database mapping service,
this patch creates an extension for the service in the UI process, sends it to the WebContent
process, where it is consumed. Then, an API call is made which will map the database, and next the
WebContent process will revoke the extension. The WebContent process has then mapped the database,
and access to the database mapping service is no longer needed.

Tested by: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

<rdar://problem/56966010>

Reviewed by Brent Fulgham.

Disable the use of UTTypeRecord swizzling, since this is not needed with the new approach
of denying the database mapping service in this patch.

* wtf/PlatformUse.h:

LayoutTests:

Reviewed by Brent Fulgham.

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

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

2 months ago[iOS] Add telemetry for message filtering
pvollan@apple.com [Sat, 21 Mar 2020 00:52:08 +0000 (00:52 +0000)]
[iOS] Add telemetry for message filtering
https://bugs.webkit.org/show_bug.cgi?id=209003
<rdar://problem/60376722>

Reviewed by Brent Fulgham.

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

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

2 months agohasObservableSideEffectsForRegExpSplit doesn't check for @@match override
ross.kirsling@sony.com [Sat, 21 Mar 2020 00:38:45 +0000 (00:38 +0000)]
hasObservableSideEffectsForRegExpSplit doesn't check for @@match override
https://bugs.webkit.org/show_bug.cgi?id=209363

Reviewed by Michael Saboff.

JSTests:

* test262/expectations.yaml:
Mark two test cases as passing.

Source/JavaScriptCore:

Our RegExp.prototype[@@split] implementation has a fast path for unadultered RegExp objects,
but we're using that fast path even when @@match has been overridden.

This is illegitimate because the RegExp species constructor calls IsRegExp, which hits the @@match getter.

* builtins/BuiltinNames.h:
* builtins/RegExpPrototype.js:
(globalPrivate.hasObservableSideEffectsForRegExpSplit):
* bytecode/LinkTimeConstant.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):

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

2 months agorun-webkit-tests: Report MacCatalyst as a unique platform
jbedard@apple.com [Sat, 21 Mar 2020 00:27:32 +0000 (00:27 +0000)]
run-webkit-tests: Report MacCatalyst as a unique platform
https://bugs.webkit.org/show_bug.cgi?id=209361

Rubber-stamped by Aakash Jain.

* Scripts/webkitpy/port/mac.py:
(MacCatalystPort):
(MacCatalystPort.configuration_for_upload): Treat MacCatalyst as a separate platform from Mac.

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

2 months agoContent-Type & Nosniff Ignored on XML External Entity Resources
ddkilzer@apple.com [Fri, 20 Mar 2020 23:52:09 +0000 (23:52 +0000)]
Content-Type & Nosniff Ignored on XML External Entity Resources
<https://webkit.org/b/191171>
<rdar://problem/45763222>

Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml

* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
* platform/MIMETypeRegistry.h:
(WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
- Checks for XML external entity MIME types.

* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::externalEntityMimeTypeAllowedByNosniff): Add.
- Checks whether the MIME type is valid based on the presence of
  the "X-Content-Type-Options: nosniff" header.
(WebCore::openFunc):
- Drop the contents of the resource that was returned and print
  an error message to the Web Inspector console if
  externalEntityMimeTypeAllowedByNosniff() says the MIME type is
  not allowed.

LayoutTests:

* http/tests/security/contentTypeOptions/nosniff-xml-external-entity-expected.txt: Add.
* http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml: Add.

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

2 months agoCORS-disabling SPI introduced in r253978 should make responses non-opaque
achristensen@apple.com [Fri, 20 Mar 2020 23:24:33 +0000 (23:24 +0000)]
CORS-disabling SPI introduced in r253978 should make responses non-opaque
https://bugs.webkit.org/show_bug.cgi?id=209351
<rdar://problem/60024850>

Reviewed by Chris Dumez.

Source/WebCore:

Covered by making the API test actually check that response content is readable.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::responseReceived):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

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

2 months agoREGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
sihui_liu@apple.com [Fri, 20 Mar 2020 22:56:09 +0000 (22:56 +0000)]
REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318
<rdar://problem/60657081>

Unreviewed test gardening after r258768.

* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

2 months agoHave insertDictatedTextAsync() take an InsertTextOptions
dbates@webkit.org [Fri, 20 Mar 2020 22:45:25 +0000 (22:45 +0000)]
Have insertDictatedTextAsync() take an InsertTextOptions
https://bugs.webkit.org/show_bug.cgi?id=209308
<rdar://problem/60652838>

Reviewed by Darin Adler.

This will provide future extensibility, which I plan to make use of in a subsequent patch,
in addition to making the interface for insertDictatedTextAsync() more like insertTextAsync().

* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::insertDictatedTextAsync): Pass the options through. The caller is now
responsible for setting the registerUndoGroup insertion option.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::insertText): Stack-allocate a InsertTextOptions setting its registerUndoGroup
field and pass this object through.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView insertText:alternatives:style:]): Pass the default constructed InsertTextOptions,
which defaults registerUndoGroup to false to keep the current behavior.
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::insertDictatedTextAsync): Write in terms of InsertTextOptions.registerUndoGroup.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

2 months agoEnsure media cache directory is created before passing to AVURLAsset.
jer.noble@apple.com [Fri, 20 Mar 2020 22:36:45 +0000 (22:36 +0000)]
Ensure media cache directory is created before passing to AVURLAsset.
https://bugs.webkit.org/show_bug.cgi?id=209341

Reviewed by Eric Carlson.

Source/WebCore:

Sandbox changes require the media cache directory to be created before passing to
AVFoundation, to ensure that a sandbox extension is allowed to be created for that
directory.

When the mediaCacheDirectory is empty or null, no longer specify a temporary directory. This
allows clients to disable caching by specifying an empty string for the cache directory.
Since now assetCacheForPath() can return nil, update all the call sites to handle that
possibility. Add a new method, ensureAssetCacheExistsAtPath() which tries to create a
directory at the specified path, and returns nil if that is not possible. This ensures the
cache path exists before adding the AVAssetCache to the AVURLAsset options dictionary.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::assetCacheForPath):
(WebCore::ensureAssetCacheExistsForPath):
(WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache):
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):

Source/WebKitLegacy/mac:

MediaPlayerPrivateAVFoundaionObjC will no longer create an asset cache in a temporary
directory by default; ensure that it's media cache directory is set during initialization.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

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

2 months ago[ iOS wk2 ] animations/animation-direction-reverse.html is a flaky failure
jacob_uphoff@apple.com [Fri, 20 Mar 2020 22:31:03 +0000 (22:31 +0000)]
[ iOS wk2 ] animations/animation-direction-reverse.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=209362

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 months agoUpdate imported/w3c/web-platform-tests/css/css-text/line-break/line-break-{strict...
jacob_uphoff@apple.com [Fri, 20 Mar 2020 22:27:17 +0000 (22:27 +0000)]
Update imported/w3c/web-platform-tests/css/css-text/line-break/line-break-{strict,normal}-015.xht
https://bugs.webkit.org/show_bug.cgi?id=209250

Fixing test expectations.

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 months agoReplace "deferred element focus" functionality with alternative solution
dbates@webkit.org [Fri, 20 Mar 2020 21:55:10 +0000 (21:55 +0000)]
Replace "deferred element focus" functionality with alternative solution
https://bugs.webkit.org/show_bug.cgi?id=201608

Reviewed by Wenson Hsieh.

This is a partial revert of r190278. Have the web process perform a layout, if needed, when
computing focus element information and send an editor state update immediately. If layout is
not needed then explicitly schedule a full editor state update.

Currently, fetching focus element information neither sends an editor state update nor
schedules one. As a result, when the web process tells the UI process to focus an element the
UI process may need to defer doing so if the last received update did not include details
that require up-to-date layout (e.g. the bounding rect of the focused element, which is used
to scroll and zoom to center the focused element). The UI process then schedules an async message
to the web process to fetch the full editor state, which will arrive in a layer tree commit message
from the web process. (Note that the UI process schedules this request to ensure the web process
knows that it is waiting for a layer tree commit. The web process can use this info to expedite
a layer tree commit, if needed). This deferral mechanism complicates the element focusing and
defocusing logic in the UI process and prevents fixing <https://bugs.webkit.org/show_bug.cgi?id=199960>.
Instead remove this deferral concept and have the web process ensure that a full editor state
update is sent or will be sent when computing the focus element information.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::elementDidFocus):
(WebKit::WebPageProxy::elementDidBlur):
Remove bookkeeping code to track a deferred focus event or to perform the deferred event
on layer tree commit.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::elementDidFocus):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getFocusedElementInformation): Save off whether a layout is needed then
tell the page to layout if needed. If a layout was needed then send an editor state update
immediately (it's an async message): this update will be a "full editor state" update that
includes up-to-date layout details. Otherwise, schedule a full editor state update. While I
am here, I updated the code to take out a ref on the focused frame's document before performing
a layout because layout can cause arbitrary JavaScript execution that could detach the document
from its frame view as part of destroying the document. Document destruction is detected by
checking whether the document has been detached from its frame view. If this happens then
bail out as there is no need to get focus element info.

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

2 months agoIntersection Observer intersections are wrong with zooming
ajuma@chromium.org [Fri, 20 Mar 2020 21:54:46 +0000 (21:54 +0000)]
Intersection Observer intersections are wrong with zooming
https://bugs.webkit.org/show_bug.cgi?id=209264

Unreviewed test gardening.

Add an expected.txt file that was accidentally omitted in r258787.

* intersection-observer/root-margin-with-zoom-expected.txt: Added.

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

2 months agocommit-queue should skip building and testing if patch already passed tests on mac...
aakash_jain@apple.com [Fri, 20 Mar 2020 21:38:36 +0000 (21:38 +0000)]
commit-queue should skip building and testing if patch already passed tests on mac-wk2 queue
https://bugs.webkit.org/show_bug.cgi?id=208938

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(RunWebKitTests.doStepIf): Skip testing if patch already passed mac-wk2 tests.
(CheckPatchStatusOnEWSQueues): Build-step to check patch status on other queues.
(CheckPatchStatusOnEWSQueues.get_patch_status):
(CheckPatchStatusOnEWSQueues.start):
* BuildSlaveSupport/ews-build/steps_unittest.py:
(test_skip_for_mac_wk2_passed_patch_on_commit_queue): Added unit-tests.
* BuildSlaveSupport/ews-build/factories.py: Added build-step to check the patch status on other queues.
* BuildSlaveSupport/ews-build/factories_unittest.py: Updated unit-test.
* BuildSlaveSupport/ews-app/ews/views/statusbubble.py: Added the new step status to STEPS_TO_HIDE.

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

2 months agoFix name of "X-Content-Type:" HTTP header in console logging
ddkilzer@apple.com [Fri, 20 Mar 2020 21:21:04 +0000 (21:21 +0000)]
Fix name of "X-Content-Type:" HTTP header in console logging
<https://webkit.org/b/209348>

Reviewed by Devin Rousso.

Source/WebCore:

* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
* dom/LoadableClassicScript.cpp:
(WebCore::LoadableClassicScript::notifyFinished):
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::validateWorkerResponse):
- Change "X-Content-Type:" to "X-Content-Type-Options:" to fix
  the name of the header.

LayoutTests:

* http/tests/security/contentTypeOptions/nosniff-dynamic-script-blocked-expected.txt:
* http/tests/security/contentTypeOptions/nosniff-script-blocked-expected.txt:
* http/tests/security/contentTypeOptions/nosniff-script-without-content-type-blocked-expected.txt:
- Update test results for the correct name of the header:
  "X-Content-Type-Options:".

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

2 months agoIntersection Observer intersections are wrong with zooming
ajuma@chromium.org [Fri, 20 Mar 2020 20:58:54 +0000 (20:58 +0000)]
Intersection Observer intersections are wrong with zooming
https://bugs.webkit.org/show_bug.cgi?id=209264

Reviewed by Simon Fraser.

Source/WebCore:

An IntersectionObserver's rootMargin is expressed in CSS pixels,
but we weren't accounting for page zoom. Fix this by multiplying
the root margin by the zoom factor.

Test: intersection-observer/root-margin-with-zoom.html

* dom/Document.cpp:
(WebCore::expandRootBoundsWithRootMargin):
(WebCore::computeIntersectionState):

LayoutTests:

* intersection-observer/root-margin-with-zoom.html: Added.

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

2 months ago[ews] Better organize patch status api data
aakash_jain@apple.com [Fri, 20 Mar 2020 20:44:56 +0000 (20:44 +0000)]
[ews] Better organize patch status api data
https://bugs.webkit.org/show_bug.cgi?id=209342

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/status.py:
(Status._build_status):
(Status._build_statuses_for_patch): Updated to return dictionary instead of list.
(Status.get): Remove safe=false now that we are returning a dictionary.

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

2 months agoREGRESSION: (r258747) [ Mac wk1 Release ] media/video-background-tab-playback.html...
lawrence.j@apple.com [Fri, 20 Mar 2020 20:40:41 +0000 (20:40 +0000)]
REGRESSION: (r258747) [ Mac wk1 Release ] media/video-background-tab-playback.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=209353

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

2 months agoAdd correct annotations to block isa pointer
commit-queue@webkit.org [Fri, 20 Mar 2020 20:34:51 +0000 (20:34 +0000)]
Add correct annotations to block isa pointer
https://bugs.webkit.org/show_bug.cgi?id=209355
<rdar://problem/60431606>

Patch by Oliver Hunt <oliver@nerget,com> on 2020-03-20
Reviewed by Keith Miller.

Trivial definition update.

* wtf/BlockPtr.h:
(WTF::BlockPtr<R):

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

2 months agoRegExp.prototype[@@replace] doesn't coerce result index to integer
ross.kirsling@sony.com [Fri, 20 Mar 2020 20:19:56 +0000 (20:19 +0000)]
RegExp.prototype[@@replace] doesn't coerce result index to integer
https://bugs.webkit.org/show_bug.cgi?id=209323

Reviewed by Yusuke Suzuki.

JSTests:

* test262/expectations.yaml:
Mark six test cases as passing.

Source/JavaScriptCore:

From https://tc39.es/ecma262/#sec-regexp.prototype-@@replace:
  21.2.5.10 RegExp.prototype [ @@replace ] ( string, replaceValue )
    ...
    14. For each result in results, do
      ...
      e. Let position be ? ToInteger(? Get(result, "index")).
      f. Set position to max(min(position, lengthS), 0).

result.index may be undefined, so it doesn't suffice to coerce it with comparison operators.

* builtins/RegExpPrototype.js:

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

2 months agoImprove the previous build fix.
timothy_horton@apple.com [Fri, 20 Mar 2020 20:16:38 +0000 (20:16 +0000)]
Improve the previous build fix.

* WebCoreSupport/WebFrameLoaderClient.mm:
Darin points out that we have USE(WEB_THREAD), so might as well use it!

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

2 months ago[GPUP] Add PlatformLayerContainer to hold pointer to PlatformLayer
don.olmstead@sony.com [Fri, 20 Mar 2020 20:04:30 +0000 (20:04 +0000)]
[GPUP] Add PlatformLayerContainer to hold pointer to PlatformLayer
https://bugs.webkit.org/show_bug.cgi?id=208963

Reviewed by Eric Carlson.

Source/WebCore:

Add a PlatformLayerContainer definition for use within the GPU Process code.
Migrate to using over typedef in the file.

* platform/graphics/PlatformLayer.h:

Source/WebKit:

Use PlatformLayerContainer since RetainPtr is a Cocoa only construct. This
allows non-Cocoa ports to get further with compiling out the GPU Process.

* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* WebProcess/GPU/media/VideoLayerRemote.h:
* WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
(WebKit::MediaPlayerPrivateRemote::createVideoFullscreenLayer):
* WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm:
(WebKit::createVideoLayerRemote):
* WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:

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

2 months agoIsolated tree updates must happen after AXObject has finished handling notifications.
andresg_22@apple.com [Fri, 20 Mar 2020 19:56:49 +0000 (19:56 +0000)]
Isolated tree updates must happen after AXObject has finished handling notifications.
https://bugs.webkit.org/show_bug.cgi?id=209354

Reviewed by Chris Fleizach.

Isolated tree updates were happening in AXObjectCache::postNotification,
but that is too early because the AXObject tree is updated during
notificationPostTimerFired. Thus, moved the updates to after all
AXObject tree updates have been done.
In addition, fixed the check for replacement of the IsolatedObject in
AXIsolatedTree::applyPendingChanges, which now happens only if the old
and new objects have the same platform wrapper.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::postNotification):
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::applyPendingChanges):

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

2 months ago[ iOS wk2 ] http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites...
lawrence.j@apple.com [Fri, 20 Mar 2020 19:35:02 +0000 (19:35 +0000)]
[ iOS wk2 ] http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209357

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 months agoWeb Inspector: REGRESSION(r257835): close and undock buttons are shown in remote...
drousso@apple.com [Fri, 20 Mar 2020 19:22:02 +0000 (19:22 +0000)]
Web Inspector: REGRESSION(r257835): close and undock buttons are shown in remote inspector
https://bugs.webkit.org/show_bug.cgi?id=209346

Reviewed by Timothy Hatcher.

In the case of remote inspection, the frontend is told that docking is not available before
it is even shown (via `InspectorFrontendAPI.setDockingUnavailable`). Additionally, the
backend (`WebKit::RemoteWebInspectorUI`) never tells the frontend what dock side it actually
is (via `InspectorFrontendAPI.setDockSide`), as there would be no point, given that docking
is unavailable, meaning that the frontend must be undocked.

Before r257835, the docking state held by `WI._dockConfiguration` and `WI.docked`, neither
of which would be set as described above. As a result, in `WI._updateDockNavigationItems`
`WI.docked` would be undefined, which is falsy, thereby causing all docking navigation items
to be hidden. After r257835, these were merged into one `WI.dockConfiguration`, which is
compared against `WI.DockConfiguration.Undocked` instead of just being falsy checked,
meaning it would result in `true` which would not hide all of the docking navigation items.

Change the logic of `WI.updateDockingAvailability` such that if the frontend is told that
docking is unavailable, mark the `WI.dockConfiguration` as `WI.DockConfiguration.Undocked`.
This way, the frontend will always have a valid value for `WI.dockConfiguration`.

Additionally, further leverage `InspectorFrontendHost.supportsDockSide` to only create the
docking navigation items that are actually supported by the host.

* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI.updateDockingAvailability):
(WI.resizeDockedFrameMouseDown):
(WI.dockedConfigurationSupportsSplitContentBrowser):
(WI._updateDockNavigationItems):
(WI._updateTabBarDividers):

* UserInterface/Views/TabBar.js:
(WI.TabBar.get horizontalPadding):
(WI.TabBar.prototype.resetCachedWidths): Added.
When switching dock configurations, we need to reset the cached width of each tab bar item,
as otherwise, a large width cached when undocked can incorrectly be used when docked.

* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem.get horizontalMargin):
Replace negative checks of `WI.dockConfiguration` with positive ones that can't be fooled by
a falsy value.

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

2 months agoFix the build.
timothy_horton@apple.com [Fri, 20 Mar 2020 18:59:26 +0000 (18:59 +0000)]
Fix the build.

* WebCoreSupport/WebFrameLoaderClient.mm:

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

2 months agoFix for retrieving focus in isolated tree mode.
andresg_22@apple.com [Fri, 20 Mar 2020 18:50:00 +0000 (18:50 +0000)]
Fix for retrieving focus in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=209336

Reviewed by Chris Fleizach.

Focused object requests can come on the secondary thread before the
isolated tree has been generated. Thus, AXObjectCache::isolatedTreeFocusedObject
needs to generate the isolated tree if it doesn't exist, similar to
isolatedTreeRootObject.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::isolatedTreeFocusedObject):
(WebCore::AXObjectCache::focusedUIElementForPage):
(WebCore::AXObjectCache::getOrCreateIsolatedTree const):
(WebCore::AXObjectCache::isolatedTreeRootObject):
* accessibility/AXObjectCache.h:
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::focusedUIElement const):
* accessibility/isolatedtree/AXIsolatedTree.h:
m_pendingFocusedNodeID wasn't being initialized, which was causing
random crashes when accessing the HashMap of isolated objects for a
spurious AXID.

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

2 months ago[ iOS ] http/tests/security/stylesheet-href-redirect.html is flaky timing out
jacob_uphoff@apple.com [Fri, 20 Mar 2020 18:40:36 +0000 (18:40 +0000)]
[ iOS ] http/tests/security/stylesheet-href-redirect.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209352

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 months agoFix JSCOnly build without unified sources
commit-queue@webkit.org [Fri, 20 Mar 2020 18:39:35 +0000 (18:39 +0000)]
Fix JSCOnly build without unified sources
https://bugs.webkit.org/show_bug.cgi?id=209343

Patch by Justin Michaud <justin@justinmichaud.com> on 2020-03-20
Reviewed by Keith Miller.

.:

* .gitignore:

Source/JavaScriptCore:

I managed to get clangd to work for code completion using the following command:

./Tools/Scripts/build-webkit --jsc-only --cmakeargs="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_UNIFIED_BUILDS=OFF" && compdb -p WebKitBuild/Release/ list > compile_commands.json

This patch fixes the build for non-unified sources, and adds some extra clangd files to .gitignore.

* API/MarkedJSValueRefArray.h:
* jit/JITPropertyAccess.cpp:

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

2 months ago[ iOS wk2 ] css2.1/20110323/replaced-intrinsic-ratio-001.htm is flaky failing.
lawrence.j@apple.com [Fri, 20 Mar 2020 18:37:12 +0000 (18:37 +0000)]
[ iOS wk2 ] css2.1/20110323/replaced-intrinsic-ratio-001.htm is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209350

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 months agoUpstream a variety of Cocoa-platform HAVE and ENABLE macros
timothy_horton@apple.com [Fri, 20 Mar 2020 18:31:38 +0000 (18:31 +0000)]
Upstream a variety of Cocoa-platform HAVE and ENABLE macros
https://bugs.webkit.org/show_bug.cgi?id=209307

Reviewed by Andy Estes.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:
* pal/spi/cocoa/AVFoundationSPI.h:
* pal/spi/cocoa/RevealSPI.h:
* pal/spi/ios/UIKitSPI.h:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:
* Platform/spi/ios/PDFKitSPI.h:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::createRemoteView):
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:mimeType:]):

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/PlatformEnableCocoa.h:
* wtf/PlatformHave.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 months ago[ iOS ] REGRESSION: http/tests/cache/disk-cache/disk-cache-disable.html is flaky...
jacob_uphoff@apple.com [Fri, 20 Mar 2020 18:16:44 +0000 (18:16 +0000)]
[ iOS ] REGRESSION: http/tests/cache/disk-cache/disk-cache-disable.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209349.

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 months agoUse same syntax for ComputePagesForPrintingAndDrawToPDF message as other messages
commit-queue@webkit.org [Fri, 20 Mar 2020 17:50:21 +0000 (17:50 +0000)]
Use same syntax for ComputePagesForPrintingAndDrawToPDF message as other messages
https://bugs.webkit.org/show_bug.cgi?id=209310
<rdar://problem/60648013>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-20
Reviewed by Sam Weinig.

This makes it easier for scripts to find which messages are unused.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF):

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

2 months agoAdd routines to check about:blank and about:srcdoc URLs
youenn@apple.com [Fri, 20 Mar 2020 17:40:44 +0000 (17:40 +0000)]
Add routines to check about:blank and about:srcdoc URLs
https://bugs.webkit.org/show_bug.cgi?id=209174

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/html/dom/usvstring-reflection.https-expected.txt:

Source/WebCore:

* Modules/fetch/FetchRequest.cpp:
(WebCore::computeReferrer):
* dom/Document.cpp:
(WebCore::isURLPotentiallyTrustworthy):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::location const):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldTreatURLAsSrcdocDocument const):
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):

Source/WebKit:

* WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
(WebKit::WebResourceLoadObserver::requestStorageAccessUnderOpener):

Source/WTF:

* wtf/URL.cpp:
(WTF::aboutSrcDocURL):
(WTF::URL::isAboutBlank const):
(WTF::URL::isAboutSrcDoc const):
* wtf/URL.h:

LayoutTests:

* platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/usvstring-reflection.https-expected.txt:

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

2 months agoREGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
sihui_liu@apple.com [Fri, 20 Mar 2020 17:26:59 +0000 (17:26 +0000)]
REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318
<rdar://problem/60657081>

Reviewed by Ryosuke Niwa.

Open fewer cursors to make the test faster.

* storage/indexeddb/cursor-leak-expected.txt:
* storage/indexeddb/cursor-leak-private-expected.txt:
* storage/indexeddb/resources/cursor-leak.js:
(onOpen.tx.oncomplete):

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

2 months ago[iOS] Articles on NYTimes.com get truncated when switching between MobileSafari and...
cdumez@apple.com [Fri, 20 Mar 2020 17:02:11 +0000 (17:02 +0000)]
[iOS] Articles on NYTimes.com get truncated when switching between MobileSafari and another app
https://bugs.webkit.org/show_bug.cgi?id=209321
<rdar://problem/59763843>

Reviewed by Tim Horton.

Articles on NYTimes.com get truncated when switching between MobileSafari and another app
Source/WebCore:

(multitasking). The reason is that when you home out of MobileSafari, snapshots of the
web view are taken at various sizes and we were firing 5 resizes events at the page as a
result. Those resize events were confusing the logic on NYTimes.com and causing it to
truncate the article.

To address the issue, we stop firing resize events at the page if the resize is happening
during the snapshotting sequence.

* page/FrameView.cpp:
(WebCore::FrameView::sendResizeEventIfNeeded):
* page/Page.h:
(WebCore::Page::shouldFireResizeEvents const):
(WebCore::Page::setShouldFireResizeEvents):

Source/WebKit:

(multitasking). The reason is that when you home out of MobileSafari, snapshots of the
web view are taken at various sizes and we were firing 5 resizes events at the page as a
result. Those resize events were confusing the logic on NYTimes.com and causing it to
truncate the article.

To address the issue, we stop firing resize events at the page if the resize is happening
during the snapshotting sequence.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ApplicationStateTracker.h:
* UIProcess/ApplicationStateTracker.mm:
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
(WebKit::ApplicationStateTracker::~ApplicationStateTracker):
(WebKit::ApplicationStateTracker::willBeginSnapshotSequence):
(WebKit::ApplicationStateTracker::didCompleteSnapshotSequence):
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKApplicationStateTrackingView.mm:
(-[WKApplicationStateTrackingView didMoveToWindow]):
(-[WKApplicationStateTrackingView _willBeginSnapshotSequence]):
(-[WKApplicationStateTrackingView _didCompleteSnapshotSequence]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setShouldFireResizeEvents):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

2 months agoUnreviewed, reverting r258762.
jacob_uphoff@apple.com [Fri, 20 Mar 2020 16:31:51 +0000 (16:31 +0000)]
Unreviewed, reverting r258762.

This commit broke the Catalina build

Reverted changeset:

"Fix the build"
https://trac.webkit.org/changeset/258762

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

2 months agoUnreviewed, reverting r258748.
jacob_uphoff@apple.com [Fri, 20 Mar 2020 16:30:15 +0000 (16:30 +0000)]
Unreviewed, reverting r258748.

This commit broke the Catalina build

Reverted changeset:

"Upstream a variety of Cocoa-platform HAVE and ENABLE macros"
https://bugs.webkit.org/show_bug.cgi?id=209307
https://trac.webkit.org/changeset/258748

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

2 months ago[GTK] Layout Test media/track/track-legacyapi-with-automatic-mode.html is failing
eocanha@igalia.com [Fri, 20 Mar 2020 15:56:58 +0000 (15:56 +0000)]
[GTK] Layout Test media/track/track-legacyapi-with-automatic-mode.html is failing
https://bugs.webkit.org/show_bug.cgi?id=118459

Unreviewed gardening.

The test passes now. Removed media/track/track-legacyapi-with-automatic-mode.html from TextExpectations.

* platform/gtk/TestExpectations:

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

2 months ago[ Mac WK1 ] REGRESSION (r240537) Layout Test media/video-background-tab-playback...
eric.carlson@apple.com [Fri, 20 Mar 2020 15:51:37 +0000 (15:51 +0000)]
[ Mac WK1 ] REGRESSION (r240537) Layout Test media/video-background-tab-playback.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196502
<rdar://problem/49532580>

Unreviewed, revert changes to iOS TestExpectations made in r258747.

* platform/ios/TestExpectations:

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

2 months agoFix the build
timothy_horton@apple.com [Fri, 20 Mar 2020 15:01:10 +0000 (15:01 +0000)]
Fix the build

* pal/spi/cocoa/RevealSPI.h:

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

2 months ago[LFC][IFC] Avoid infinite loop when stuck on partial content
zalan@apple.com [Fri, 20 Mar 2020 14:59:44 +0000 (14:59 +0000)]
[LFC][IFC] Avoid infinite loop when stuck on partial content
https://bugs.webkit.org/show_bug.cgi?id=209312
<rdar://problem/59954605>

Reviewed by Simon Fraser.

Speculative fix to address infinite loop/running out of inline run vector capacity at InlineFormattingContext::setDisplayBoxesForLine.
(Checking if we managed to progress on the content while having partial runs.)

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::lineLayout):
* layout/inlineformatting/LineLayoutContext.cpp:
(WebCore::Layout::LineLayoutContext::nextContentForLine):
(WebCore::Layout::LineLayoutContext::handleFloatsAndInlineContent):

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

2 months ago[ews] commit-queue should comment on bug if patch fails to apply
aakash_jain@apple.com [Fri, 20 Mar 2020 14:31:36 +0000 (14:31 +0000)]
[ews] commit-queue should comment on bug if patch fails to apply
https://bugs.webkit.org/show_bug.cgi?id=209334

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(ApplyPatch):
(ApplyPatch.evaluateCommand): Overridden to check build status and queue name and comment on bug accordingly.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
(TestApplyPatch):
(TestApplyPatch.setUp):
(TestApplyPatch.setUp.mock_start):
(TestApplyPatch.tearDown):
(TestApplyPatch.test_success):
(TestApplyPatch.test_failure):
(TestApplyPatch.test_failure_on_commit_queue):

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

2 months ago[GStreamer] White-list vp09 in the codec registry
philn@webkit.org [Fri, 20 Mar 2020 11:48:08 +0000 (11:48 +0000)]
[GStreamer] White-list vp09 in the codec registry
https://bugs.webkit.org/show_bug.cgi?id=209288

Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::initialize):

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

2 months ago[GTK] Gardening, update TestExpectations and baselines
dpino@igalia.com [Fri, 20 Mar 2020 10:48:44 +0000 (10:48 +0000)]
[GTK] Gardening, update TestExpectations and baselines
https://bugs.webkit.org/show_bug.cgi?id=209331

Unreviewed gardening.

* platform/gtk/TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/svg/painting/reftests/paint-order-001-expected.txt:
Update baseline after r258492.

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

2 months ago[EWS] Limit number of builds to display in status-bubble hover over message in case...
aakash_jain@apple.com [Fri, 20 Mar 2020 10:29:29 +0000 (10:29 +0000)]
[EWS] Limit number of builds to display in status-bubble hover over message in case of lot of retried builds
https://bugs.webkit.org/show_bug.cgi?id=209122

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble._build_bubble):

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

2 months agoNullptr crash in RenderObject::RenderObjectBitfields::isBox when current renderer...
commit-queue@webkit.org [Fri, 20 Mar 2020 09:27:33 +0000 (09:27 +0000)]
Nullptr crash in RenderObject::RenderObjectBitfields::isBox when current renderer is the RenderView
https://bugs.webkit.org/show_bug.cgi?id=209251
<rdar://problem/60103614>

Patch by Jack Lee <shihchieh_lee@apple.com> on 2020-03-20
Reviewed by Antti Koivisto.

Source/WebCore:

It’s perfectly fine to call AccessibilityRenderObject::nextSibling on the RenderView (empty document) and since the RenderView has no sibling, let’s just early return with nullptr.

Test: fast/frames/iframe-empty-doc-crash.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::nextSibling const):

LayoutTests:

It’s perfectly fine to call AccessibilityRenderObject::nextSibling on the RenderView (empty document) and since the RenderView has no sibling, let’s just early return with nullptr.

* fast/frames/iframe-empty-doc-crash-expected.txt: Added.
* fast/frames/iframe-empty-doc-crash.html: Added.

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

2 months agoFix build with gstreamer 1.12
commit-queue@webkit.org [Fri, 20 Mar 2020 09:15:53 +0000 (09:15 +0000)]
Fix build with gstreamer 1.12
https://bugs.webkit.org/show_bug.cgi?id=209296

Patch by Mike Gorse <mgorse@suse.com> on 2020-03-20
Reviewed by Philippe Normand.

No new tests (build fix only).

* platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
(webKitGLVideoSinkChangeState): Add GST_VERSION_CHECK around check for
GST_STATE_CHANGE_READY_TO_READY.

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

2 months ago[Unix] Allow runtime release logging levels configuration
philn@webkit.org [Fri, 20 Mar 2020 09:01:04 +0000 (09:01 +0000)]
[Unix] Allow runtime release logging levels configuration
https://bugs.webkit.org/show_bug.cgi?id=209286

Reviewed by Adrian Perez de Castro.

Setting to a comma-separated list like in this example should now work as expected:

WEBKIT_DEBUG="Media=debug,MediaSource=info" run-minibrowser --gtk ...

* platform/unix/LoggingUnix.cpp:
(WebCore::logLevelString):

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

2 months agoSome scroll snapping tests are still flaky
simon.fraser@apple.com [Fri, 20 Mar 2020 06:03:34 +0000 (06:03 +0000)]
Some scroll snapping tests are still flaky
https://bugs.webkit.org/show_bug.cgi?id=165196

Reviewed by Wenson Hsieh.

WheelEventTestMonitor could trigger too early if the main thread was bogged down, delaying
the firing of the m_updateNodeScrollPositionTimer scheduled from
AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll().

Fix by extending the life of the "ScrollingThreadSyncNeeded" reason until after the m_updateNodeScrollPositionTimer
has fired

Fixes flakiness of tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html
and others.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::noteScrollingThreadSyncCompleteForNode):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

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

2 months agoSharedMemory::allocate() should initialize `address`
ddkilzer@apple.com [Fri, 20 Mar 2020 05:06:59 +0000 (05:06 +0000)]
SharedMemory::allocate() should initialize `address`
<https://webkit.org/b/209315>
<rdar://problem/60606720>

Reviewed by Geoffrey Garen.

* Platform/cocoa/SharedMemoryCocoa.cpp:
(WebKit::SharedMemory::allocate): Initialize `address` to zero.

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

2 months agoUnable to build WebKit with iOS 13.4 SDK
timothy_horton@apple.com [Fri, 20 Mar 2020 04:41:23 +0000 (04:41 +0000)]
Unable to build WebKit with iOS 13.4 SDK
https://bugs.webkit.org/show_bug.cgi?id=209317

Reviewed by Simon Fraser.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKMouseGestureRecognizer.mm:

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

2 months ago[macoOS] Remove access to 'apple-extension-services' from the WebContent sandbox
bfulgham@apple.com [Fri, 20 Mar 2020 03:05:51 +0000 (03:05 +0000)]
[macoOS] Remove access to 'apple-extension-services' from the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=209324
<rdar://problem/58089661>

Reviewed by Per Arne Vollan.

Remove the last of permissions for the unused 'apple-extension-services' mach service.

* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
* WebProcess/com.apple.WebProcess.sb.in:

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

2 months agoSafari video gravity changes performance improvements
peng.liu6@apple.com [Fri, 20 Mar 2020 03:05:11 +0000 (03:05 +0000)]
Safari video gravity changes performance improvements
https://bugs.webkit.org/show_bug.cgi?id=209316

Reviewed by Eric Carlson.

Remove an unnecessary (and harmful) call of setVideoLayerFrame in WebAVPlayerLayer:layoutSublayers.

When a video with the gravity AVLayerVideoGravityResizeAspectFill needs to enter the
picture-in-picture mode from fullscreen, the extra call of setVideoLayerFrame will send
an extra IPC message to the Web process to set the video layer bounds. So the [CATransaction commit]
will need to wait for three property changes to complete - two in the Web process, and one in the
UI process. The interval of the two property changes in the Web process is over 100 ms, because we
delay the call of resolveBounds (which calls the second setVideoLayerFrame) at least 100 ms
in WebAVPlayerLayer:layoutSublayers. That leads to long durations of core animation commits.
In the test, the longest duration of commits is over 500 ms. After applying this patch,
the longest duration in the test is about 50 ms.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerLayer layoutSublayers]):

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

2 months agoUpstream a variety of Cocoa-platform HAVE and ENABLE macros
timothy_horton@apple.com [Fri, 20 Mar 2020 01:59:05 +0000 (01:59 +0000)]
Upstream a variety of Cocoa-platform HAVE and ENABLE macros
https://bugs.webkit.org/show_bug.cgi?id=209307

Reviewed by Andy Estes.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:
* pal/spi/cocoa/AVFoundationSPI.h:
* pal/spi/cocoa/RevealSPI.h:
* pal/spi/ios/UIKitSPI.h:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:
* Platform/spi/ios/PDFKitSPI.h:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::createRemoteView):
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:mimeType:]):

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/PlatformEnableCocoa.h:
* wtf/PlatformHave.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 months ago[ Mac WK1 ] REGRESSION (r240537) Layout Test media/video-background-tab-playback...
eric.carlson@apple.com [Fri, 20 Mar 2020 00:50:24 +0000 (00:50 +0000)]
[ Mac WK1 ] REGRESSION (r240537) Layout Test media/video-background-tab-playback.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196502
<rdar://problem/49532580>

Reviewed by Jer Noble.

* media/video-background-tab-playback-expected.txt:
* media/video-background-tab-playback.html: Don't assume the state will change in 100ms.
* platform/ios/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

2 months agoUnreviewed test fixing.
simon.fraser@apple.com [Fri, 20 Mar 2020 00:42:02 +0000 (00:42 +0000)]
Unreviewed test fixing.

Tests that fire multiple wheel event sequences need to call eventSender.monitorWheelEvents() between each one.

* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:

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

2 months agoRemove test failing after r258734
achristensen@apple.com [Fri, 20 Mar 2020 00:03:39 +0000 (00:03 +0000)]
Remove test failing after r258734
https://bugs.webkit.org/show_bug.cgi?id=209303

We removed the functionality it was testing because it did nothing useful except call the callback.
I'm about to remove the only user of WKContextGetStatistics.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/WebCoreStatisticsWithNoWebProcess.cpp: Removed.

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

2 months agoScriptDisallowedScope should disable isEventAllowedInMainThread and isEventDispatchAl...
commit-queue@webkit.org [Thu, 19 Mar 2020 23:48:18 +0000 (23:48 +0000)]
ScriptDisallowedScope should disable isEventAllowedInMainThread and isEventDispatchAllowedInSubtree asserts in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=209165

Patch by Sunny He <sunny_he@apple.com> on 2020-03-19
Reviewed by Ryosuke Niwa.

Under very intricate sequences of event dispatch in WebKit1, it is
possible for security asserts to be triggered even if there is no
underlying security issue soley due to the design patterns of
WebKit1.

No new tests since the conditions for reproduction are very delicate
and difficult to reliably capture in a test case.

* dom/ScriptDisallowedScope.h:
(WebCore::ScriptDisallowedScope::isEventAllowedInMainThread):
(WebCore::ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree):

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

2 months agocommit-queue status-bubble shows incorrect position in queue
aakash_jain@apple.com [Thu, 19 Mar 2020 23:41:31 +0000 (23:41 +0000)]
commit-queue status-bubble shows incorrect position in queue
https://bugs.webkit.org/show_bug.cgi?id=209313

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble._queue_position):

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

2 months agoREGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
jacob_uphoff@apple.com [Thu, 19 Mar 2020 23:38:21 +0000 (23:38 +0000)]
REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318

Fixing expectations

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

2 months agoSanitize suggested download filename received from web process
commit-queue@webkit.org [Thu, 19 Mar 2020 23:32:45 +0000 (23:32 +0000)]
Sanitize suggested download filename received from web process
https://bugs.webkit.org/show_bug.cgi?id=209300
<rdar://problem/59487723>

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

Source/WebKit:

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):

LayoutTests:

* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:

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

2 months agoREGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
jacob_uphoff@apple.com [Thu, 19 Mar 2020 23:26:29 +0000 (23:26 +0000)]
REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318

Unreviewed test gardening

* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

2 months agoAllow for some tolerance when checking canvas pixels in fast/mediastream tests
eric.carlson@apple.com [Thu, 19 Mar 2020 23:05:24 +0000 (23:05 +0000)]
Allow for some tolerance when checking canvas pixels in fast/mediastream tests
https://bugs.webkit.org/show_bug.cgi?id=209259
<rdar://problem/60609789>

Unreviewed tweak of r258700, increase the maximum tolerance to +/- 2.

* resources/platform-helper.js:
(videoCanvasPixelComparisonTolerance):
(checkPixelColorWithTolerance):

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

2 months agoHandle failed ITP Database insert attempts
katherine_cheney@apple.com [Thu, 19 Mar 2020 22:55:12 +0000 (22:55 +0000)]
Handle failed ITP Database insert attempts
https://bugs.webkit.org/show_bug.cgi?id=209253
<rdar://problem/58886756>

Reviewed by David Kilzer.

A first step toward handling I/O errors in the database. Adds checks
so that in the case where a domain insert fails, we don't execute
code which relies on this domain being in the database.

Future steps will be figuring out a way to schedule failed queries
to execute when the database is accepting inputs in the future.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForRegistrableDomain):
Check if the query to insert a domain failed. If so, return
WTF::nullopt in place of the domain ID to indicate the failure.

(WebKit::ResourceLoadStatisticsDatabaseStore::ensureAndMakeDomainList):
The simplest solution here was to only append strings to this list
if they are already in the database, or are successfully inserted,
because insertDomainRelationshipList() relies on these being in the database.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal):
(WebKit::ResourceLoadStatisticsDatabaseStore::grandfatherDataForDomains):
(WebKit::ResourceLoadStatisticsDatabaseStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsDatabaseStore::logFrameNavigation):
(WebKit::ResourceLoadStatisticsDatabaseStore::logCrossSiteLoadWithLinkDecoration):
(WebKit::ResourceLoadStatisticsDatabaseStore::logUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearPrevalentResource):
(WebKit::ResourceLoadStatisticsDatabaseStore::setGrandfathered):
(WebKit::ResourceLoadStatisticsDatabaseStore::setIsScheduledForAllButCookieDataRemoval):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubframeUnderTopFrameDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUnderTopFrameDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectTo):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectFrom):
(WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectTo):
(WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectFrom):
(WebKit::ResourceLoadStatisticsDatabaseStore::setLastSeen):
(WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource):
(WebKit::ResourceLoadStatisticsDatabaseStore::setVeryPrevalentResource):
Every call to ensureResourceStatisticsForRegistrableDomain should
check the result to make sure the domain was inserted before
continuing, and return early (or return a value that does not further
rely on the database information, like an empty vector). Log these
errors but don't add a debug assert because there already is one in
ensureResourceStatisticsForRegistrableDomain.

* (WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore):
* (WebKit::ResourceLoadStatisticsDatabaseStore::mergeStatistics):
The simplest thing to do in this case is to return early if any domain
inserts fail before inserting domain relationships as a best-effort
approach. A future step could be maintaining a vector of statistics
which successfully inserted, and only adding those relationships.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
ensureResourceStatisticsForRegistrableDomain should return an
Optional domain ID to account for failed inserts.

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

2 months agoUpstream the definition of HAVE_READ_ONLY_SYSTEM_VOLUME
timothy_horton@apple.com [Thu, 19 Mar 2020 22:50:16 +0000 (22:50 +0000)]
Upstream the definition of HAVE_READ_ONLY_SYSTEM_VOLUME
https://bugs.webkit.org/show_bug.cgi?id=209305

Reviewed by Andy Estes.

Source/WebCore:

* platform/mac/BlacklistUpdater.mm:

Source/WebKit:

* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::AuxiliaryProcess::isSystemWebKit):

Source/WTF:

* wtf/PlatformHave.h:

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

2 months agoRemove Mobile Asset access from the WebContent process
bfulgham@apple.com [Thu, 19 Mar 2020 22:44:56 +0000 (22:44 +0000)]
Remove Mobile Asset access from the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=209302
<rdar://problem/56305023>

Reviewed by Per Arne Vollan.

Source/WebKit:

Tested by fast/sandbox/ios/sandbox-mach-lookup.html

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

LayoutTests:

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

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

2 months ago[css-grid] Changes in grid or elements inside the grid affects margin on other elemen...
jfernandez@igalia.com [Thu, 19 Mar 2020 22:27:06 +0000 (22:27 +0000)]
[css-grid] Changes in grid or elements inside the grid affects margin on other elements in the grid
https://bugs.webkit.org/show_bug.cgi?id=209203

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Imported new Web Platform tests to detect regressions in the auto-margins logic durignn relayouts.

* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008-expected.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008-expected.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008.html: Added.

Source/WebCore:

We should ignore the previously computed auto margins wheneven a relayout is performed.

Tests: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
(WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):

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

2 months agoRemove unused WebProcessPool::didGetStatistics
commit-queue@webkit.org [Thu, 19 Mar 2020 22:18:30 +0000 (22:18 +0000)]
Remove unused WebProcessPool::didGetStatistics
https://bugs.webkit.org/show_bug.cgi?id=209303
<rdar://problem/60648454>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-19
Reviewed by Geoffrey Garen.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didGetStatistics): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:

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

2 months agoRemove caching of isOnScreen since it is not used.
andresg_22@apple.com [Thu, 19 Mar 2020 22:06:17 +0000 (22:06 +0000)]
Remove caching of isOnScreen since it is not used.
https://bugs.webkit.org/show_bug.cgi?id=209306

Reviewed by Chris Fleizach.

AXIsolatedObject was caching isOnScreen and it wasn't used. It has a
performance impact since it needs to run on the main thread. thus this
change removes it from the cache.

* accessibility/AccessibilityObjectInterface.h:
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
* accessibility/isolatedtree/AXIsolatedObject.h:

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

2 months ago[JSC] StructureStubInfo::bufferedStructures should not ref/deref UniquedStringImpl
ysuzuki@apple.com [Thu, 19 Mar 2020 21:59:22 +0000 (21:59 +0000)]
[JSC] StructureStubInfo::bufferedStructures should not ref/deref UniquedStringImpl
https://bugs.webkit.org/show_bug.cgi?id=209266
<rdar://problem/60508312>

Reviewed by Saam Barati.

StructureStubInfo::bufferedStructures includes RefPtr<UniquedStringImpl>. So destroying StructureStubInfo in
CodeBlock::finalizeUnconditionally can access to AtomStringTable, and get nullptr AtomStringTable since
CodeBlock::finalizeUnconditionally can be executed in heap-thread.

Temporarily setting AtomStringTable in the heap-thread when executing GC End phase is dangerous: Web worker's
JSC VM is releasing heapAccess when waiting for the next message in the RunLoop. This potentially means that
Web worker's main thread can run concurrently with Web worker's JSC VM's End phase heap-thread until the web
worker takes JSLock. (This is not a problem in WebCore since WebCore JSC VM never releases heapAccess. We cannot
take the same design since we would like to run End phase even if web worker is not getting any messages).

And removing resetJITData in CodeBlock::finalizeUnconditionally does not fix as well since CodeBlock::finalizeUnconditionally
calls StructureStubInfo::visitWeakReferences, and it removes some of entries of StructureStubInfo::bufferedStructures after
ByVal extension is introduced into StructureStubInfo.

This patch uses CacheableIdentifier for bufferedStructures. We make BufferedStructure class which holds Structure and CacheableIdentifier.
And StructureStubInfo holds HashSet<BufferedStructure>. We also visit CacheableIdentifier in StructureStubInfo::visitAggregate. To allow
concurrent collector to run this, we introduce m_bufferedStructuresLock in StructureStubInfo to guard m_bufferedStructures.

* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::StructureStubInfo):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::visitAggregate):
(JSC::StructureStubInfo::visitWeakReferences):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::considerCaching):
(JSC::StructureStubInfo::getByIdSelfIdentifier):
(JSC::StructureStubInfo::cacheType const):
(JSC::StructureStubInfo::clearBufferedStructures):
(JSC::StructureStubInfo::BufferedStructure::BufferedStructure):
(JSC::StructureStubInfo::BufferedStructure::isHashTableDeletedValue const):
(JSC::StructureStubInfo::BufferedStructure::hash const):
(JSC::StructureStubInfo::BufferedStructure::operator==):
(JSC::StructureStubInfo::BufferedStructure::operator!=):
(JSC::StructureStubInfo::BufferedStructure::Hash::hash):
(JSC::StructureStubInfo::BufferedStructure::Hash::equal):
(JSC::StructureStubInfo::BufferedStructure::structure const):
(JSC::StructureStubInfo::BufferedStructure::byValId const):
* jit/JITOperations.cpp:
* runtime/CacheableIdentifier.h:
(JSC::CacheableIdentifier::hash const):

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

2 months agoURL needs to be isolatedCopied when cached in AXIsolatedObject.
andresg_22@apple.com [Thu, 19 Mar 2020 21:57:00 +0000 (21:57 +0000)]
URL needs to be isolatedCopied when cached in AXIsolatedObject.
https://bugs.webkit.org/show_bug.cgi?id=209298

Reviewed by Chris Fleizach.

AXIsolatedObject needs to isolatedCopy the URL property in order to use
it on the secondary thread.

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):

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

2 months agoWeb Inspector: AXI: disabled buttons shouldn't be focusable
nvasilyev@apple.com [Thu, 19 Mar 2020 21:41:33 +0000 (21:41 +0000)]
Web Inspector: AXI: disabled buttons shouldn't be focusable
https://bugs.webkit.org/show_bug.cgi?id=208283
<rdar://problem/59832150>

Reviewed by Devin Rousso.

Set tabIndex to "-1" when button becomes disabled.

* UserInterface/Views/ActivateButtonNavigationItem.js:
(WI.ActivateButtonNavigationItem):
* UserInterface/Views/ButtonNavigationItem.js:
`_role` is defined in the parent class now.

(WI.ButtonNavigationItem):
(WI.ButtonNavigationItem.prototype.set enabled):
(WI.ButtonNavigationItem.prototype.get tabbable):
(WI.ButtonNavigationItem.prototype._updateTabIndex):
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem.prototype.get tabbable):
(WI.RadioButtonNavigationItem):

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

2 months agoWeb Inspector: remove redundant code in TreeOutline.prototype.removeChildAtIndex
nvasilyev@apple.com [Thu, 19 Mar 2020 21:35:47 +0000 (21:35 +0000)]
Web Inspector: remove redundant code in TreeOutline.prototype.removeChildAtIndex
https://bugs.webkit.org/show_bug.cgi?id=209301

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype.removeChildAtIndex):
Check `suppressSelectSibling` once instead of three times.

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

2 months ago[Curl] Add an API returns description of verification errors.
commit-queue@webkit.org [Thu, 19 Mar 2020 21:18:56 +0000 (21:18 +0000)]
[Curl] Add an API returns description of verification errors.
https://bugs.webkit.org/show_bug.cgi?id=208913

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-03-19
Reviewed by Fujii Hironori.

WKCertificateInfoCopyVerificationErrorDescription returns the description of SSL verification error as human readable string.
Browser can display more precise error information with this API.

API Test: Curl.CertificateAPI

Source/WebCore:

* platform/network/curl/CertificateInfo.h:
* platform/network/curl/CertificateInfoCurl.cpp:
(WebCore::CertificateInfo::verificationErrorDescription const):

Source/WebKit:

* Shared/API/c/curl/WKCertificateInfoCurl.cpp:
(WKCertificateInfoCopyVerificationErrorDescription):
* Shared/API/c/curl/WKCertificateInfoCurl.h:

Tools:

* MiniBrowser/win/Common.cpp:
(askServerTrustEvaluation):
* MiniBrowser/win/Common.h:
* MiniBrowser/win/WebKitBrowserWindow.cpp:
(createPEMString):
(WebKitBrowserWindow::canTrustServerCertificate):
* TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp:
(TestWebKitAPI::Curl::TEST):

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

2 months agoUpdate imported/w3c/web-platform-tests/css/css-text/line-break/line-break-{strict...
mmaxfield@apple.com [Thu, 19 Mar 2020 21:17:12 +0000 (21:17 +0000)]
Update imported/w3c/web-platform-tests/css/css-text/line-break/line-break-{strict,normal}-015.xht
https://bugs.webkit.org/show_bug.cgi?id=209250
<rdar://problem/59957596>

Update them according to https://github.com/web-platform-tests/wpt/commit/7d24adef541b2e836f2b2f9534ce3f0e078f5782

Reviewed by Antti Koivisto.

* platform/ios/TestExpectations: Mark as failing on old OSes
* platform/mac/TestExpectations: Mark as failing on old OSes
* web-platform-tests/css/css-text/line-break/line-break-normal-015-expected.xht:
* web-platform-tests/css/css-text/line-break/line-break-normal-015.xht:
* web-platform-tests/css/css-text/line-break/line-break-strict-015-expected.xht:
* web-platform-tests/css/css-text/line-break/line-break-strict-015.xht:

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

2 months ago[iOS] Deny mach lookup access to power service
pvollan@apple.com [Thu, 19 Mar 2020 21:13:28 +0000 (21:13 +0000)]
[iOS] Deny mach lookup access to power service
https://bugs.webkit.org/show_bug.cgi?id=208460
<rdar://problem/57026325>

Reviewed by Darin Adler.

Source/WebKit:

On iOS, deny mach lookup access to the power service in the WebContent process.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

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

LayoutTests:

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

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

2 months ago[ iOS wk2 ] http/tests/workers/service/service-worker-cache-api.https.html is flaky...
lawrence.j@apple.com [Thu, 19 Mar 2020 21:03:29 +0000 (21:03 +0000)]
[ iOS wk2 ] http/tests/workers/service/service-worker-cache-api.https.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209304

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 months agoImplement support for cursor interactions on iPad
timothy_horton@apple.com [Thu, 19 Mar 2020 19:16:33 +0000 (19:16 +0000)]
Implement support for cursor interactions on iPad
https://bugs.webkit.org/show_bug.cgi?id=209268

Reviewed by Darin Adler.

No new tests in this patch, just upstreaming. Will attempt to enable
some macOS mouse event tests on iOS in the future, though.

* wtf/PlatformEnableCocoa.h:
Don't disable the contextmenu event on iOS anymore.

* wtf/PlatformHave.h:
Rename HAVE_HOVER_GESTURE_RECOGNIZER to HAVE_UIKIT_WITH_MOUSE_SUPPORT.
Add HAVE_UI_CURSOR_INTERACTION.
Enable HAVE_UI_PARALLAX_TRANSITION_GESTURE_RECOGNIZER on iOS.

* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isNews):
(WebCore::IOSApplication::isStocks):
(WebCore::IOSApplication::isFeedly):
Add some bundle ID checks needed in WebKit.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/Cocoa/VersionChecks.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _showShareSheet:inRect:completionHandler:]):
(-[WKContentView setupDragAndDropInteractions]):
(-[WKContentView shouldUseMouseGestureRecognizer]):
(-[WKContentView setupMouseGestureRecognizer]):
(-[WKContentView mouseGestureRecognizerChanged:]):
(-[WKContentView setupCursorInteraction]):
(-[WKContentView _cursorInteraction:regionForLocation:defaultRegion:completion:]):
(-[WKContentView cursorRegionForPositionInformation:point:]):
(-[WKContentView cursorInteraction:styleForRegion:modifiers:]):
(-[WKContentView _mouseGestureRecognizerChanged:]): Deleted.
* UIProcess/ios/WKMouseGestureRecognizer.h:
* UIProcess/ios/WKMouseGestureRecognizer.mm:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::shouldUseMouseEventForSelection):

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

2 months agoFix test expectation for fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html
tsavell@apple.com [Thu, 19 Mar 2020 18:43:51 +0000 (18:43 +0000)]
Fix test expectation for fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html
https://bugs.webkit.org/show_bug.cgi?id=209052

unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 months agoUnreviewed, build fix after r258717
ysuzuki@apple.com [Thu, 19 Mar 2020 18:41:16 +0000 (18:41 +0000)]
Unreviewed, build fix after r258717
https://bugs.webkit.org/show_bug.cgi?id=199295

* llint/LowLevelInterpreter.asm:

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

2 months ago[ iOS wk2 and Mac Debug wk2 ] imported/w3c/web-platform-tests/service-workers/service...
lawrence.j@apple.com [Thu, 19 Mar 2020 18:32:21 +0000 (18:32 +0000)]
[ iOS wk2 and Mac Debug wk2 ] imported/w3c/web-platform-tests/service-workers/service-worker/respond-with-body-accessed-response.https.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209295

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

2 months agosanitizeStackForVMImpl writes below stack pointer, triggers huge warning spam from...
ysuzuki@apple.com [Thu, 19 Mar 2020 18:28:58 +0000 (18:28 +0000)]
sanitizeStackForVMImpl writes below stack pointer, triggers huge warning spam from valgrind
https://bugs.webkit.org/show_bug.cgi?id=199295

Reviewed by Mark Lam.

During sanitizeStackForVMImpl, we should not access to the region beyond the stack-pointer.
This patch changes stack-pointer while sanitizeStackForVMImpl is zero-filling the old stack region.

* llint/LowLevelInterpreter.asm:

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

2 months ago[ Mac wk2 ] tiled-drawing/scrolling/scroll-iframe-latched-selects.html is flaky failing.
lawrence.j@apple.com [Thu, 19 Mar 2020 18:06:22 +0000 (18:06 +0000)]
[ Mac wk2 ] tiled-drawing/scrolling/scroll-iframe-latched-selects.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209283

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 months ago[iOS] Add telemetry for message filtering
pvollan@apple.com [Thu, 19 Mar 2020 17:59:26 +0000 (17:59 +0000)]
[iOS] Add telemetry for message filtering
https://bugs.webkit.org/show_bug.cgi?id=208925
<rdar://problem/58885485>

Reviewed by Darin Adler.

On iOS, add telemetry for message filtering in the WebContent process' sandbox.

No new tests, no behavior change.

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

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

2 months agoAXIsolatedObject implementation of the title method.
andresg_22@apple.com [Thu, 19 Mar 2020 17:51:59 +0000 (17:51 +0000)]
AXIsolatedObject implementation of the title method.
https://bugs.webkit.org/show_bug.cgi?id=209291

Reviewed by Chris Fleizach.

- Implements AXIsolatedObgject::title.
- Modified implementation of AXIsolatedObject::titleAttributeValue to
use its appropriate key.

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::title const): Deleted.
* accessibility/isolatedtree/AXIsolatedObject.h:

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

2 months agoSource/WebCore:
cfleizach@apple.com [Thu, 19 Mar 2020 17:45:37 +0000 (17:45 +0000)]
Source/WebCore:
AX: VO and safari: can't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html

If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners
and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.

* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::hasTouchEventListener const):

LayoutTests:
AX: VO and safari: caan't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

* accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt: Added.
* accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.

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

2 months ago[JSC][BigEndians] Several JSC stress tests failing
tpopela@redhat.com [Thu, 19 Mar 2020 17:44:22 +0000 (17:44 +0000)]
[JSC][BigEndians] Several JSC stress tests failing
https://bugs.webkit.org/show_bug.cgi?id=194007

Reviewed by Michael Catanzaro.

Adapt the DataView tests to be able to pass on little endian as well
as the big endian hardware. Do so by introducing method that determine
the endianess and based on its value it saves the expected results in
the right format.

* stress/dataview-get-cse.js:
(getIsLittleEndian):
(adjustForEndianess):
(test3.foo):
(test3):
* stress/dataview-jit-get.js:
(getIsLittleEndian):
(test1.adjustForEndianess):
(test1):
(test2.adjustForEndianess):
(test2):
(test3.adjustForEndianess):
(test3):
(adjustForEndianessUint32):
(test4):
(test5):
(test6):
(test7):
(test8):
* stress/dataview-jit-neuter.js:
(getIsLittleEndian):
(adjustForEndianess):
(test):
(test2):
* stress/dataview-jit-set-nan.js:
(getIsLittleEndian):
(adjustForEndianessFloat32):
(test):
* stress/dataview-jit-set.js:
(getIsLittleEndian):
(readHex):
(adjustForEndianessUint16):
(test):
(test2):
(adjustForEndianessUint32):
(test3):
(test4):
(adjustForEndianessFloat32):
(test5):
(adjustForEndianessFloat64):
(test6):
(isLittleEndian): Deleted.

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

2 months agoFlaky Test: storage/indexeddb/cursor-leak.html and storage/indexeddb/cursor-leak...
sihui_liu@apple.com [Thu, 19 Mar 2020 17:23:58 +0000 (17:23 +0000)]
Flaky Test: storage/indexeddb/cursor-leak.html and storage/indexeddb/cursor-leak-private.html
https://bugs.webkit.org/show_bug.cgi?id=209256
<rdar://problem/60097171>

Reviewed by Geoffrey Garen.

gc() does not guarantee all objects to be collected due to our conservative GC. To make the test more stable, we
now test if there is at lease one object is collected, which is enough to show cursor does not hold strong
reference to script value properties.

* storage/indexeddb/cursor-leak-expected.txt:
* storage/indexeddb/cursor-leak-private-expected.txt:
* storage/indexeddb/resources/cursor-leak.js:
(onOpen.tx.oncomplete):
(onOpen.cursorRequest.onsuccess): Deleted.

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

2 months agoUpdate build.webkit.org link for EWS
aakash_jain@apple.com [Thu, 19 Mar 2020 17:14:23 +0000 (17:14 +0000)]
Update build.webkit.org link for EWS
https://bugs.webkit.org/show_bug.cgi?id=209280

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/templates/root.html:

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

2 months ago[WinCairo] extract-built-product fails after r258612
stephan.szabo@sony.com [Thu, 19 Mar 2020 17:07:37 +0000 (17:07 +0000)]
[WinCairo] extract-built-product fails after r258612
https://bugs.webkit.org/show_bug.cgi?id=209285

extractBuiltProduct also references the old name for the
requirements on wincairo.

Reviewed by Ross Kirsling.

* BuildSlaveSupport/built-product-archive:

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

2 months ago[WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main...
andresg_22@apple.com [Thu, 19 Mar 2020 17:02:26 +0000 (17:02 +0000)]
[WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=209284

Reviewed by Chris Fleizach.

- Dispatch [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] to the main thread.
- [WebAccessibilityObjectWrapper windowElement:] must then call it outside the dispatched lambda.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
(-[WebAccessibilityObjectWrapper windowElement:]):

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

2 months ago[ iOS wk2 and Mac wk2 ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate...
lawrence.j@apple.com [Thu, 19 Mar 2020 16:49:56 +0000 (16:49 +0000)]
[ iOS wk2 and Mac wk2 ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate/frame-removal.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209281

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

2 months ago[Web Animations] Mark promises as handled when rejected
commit-queue@webkit.org [Thu, 19 Mar 2020 16:42:24 +0000 (16:42 +0000)]
[Web Animations] Mark promises as handled when rejected
https://bugs.webkit.org/show_bug.cgi?id=209240
<rdar://problem/60592305>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-19
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Add the new WPT tests added for this spec change (https://github.com/web-platform-tests/wpt/pull/22314) and revert some workarounds
made in our copy of WPT tests to previously silence flaky console output related to promise rejections (added in r258275 and r258276).

* web-platform-tests/web-animations/interfaces/Animation/finished-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/finished.html:
* web-platform-tests/web-animations/interfaces/Animation/ready-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/ready.html:
* web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html:

Source/WebCore:

Implementing the spec change discussed in https://github.com/w3c/csswg-drafts/issues/4556.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::cancel):
(WebCore::WebAnimation::resetPendingTasks):

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

2 months agoMany tests relying on eventSender.monitorWheelEvents() are no longer flaky
simon.fraser@apple.com [Thu, 19 Mar 2020 16:03:04 +0000 (16:03 +0000)]
Many tests relying on eventSender.monitorWheelEvents() are no longer flaky
https://bugs.webkit.org/show_bug.cgi?id=209272

Reviewed by Wenson Hsieh.

Remove tests from TestExpectations that were flakey because of bug 197819.

Fix some scroll-snap tests which were written before CSS OM View changes made document.body
not the scrolling element.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/scrolling/frames/frameset-frame-scrollability-expected.txt:
* tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:

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