WebKit-https.git
7 months agoPass a hint from the extension to decidePolicyForSOAuthorizationLoadWithCurrentPolicy
jiewen_tan@apple.com [Tue, 4 Feb 2020 05:29:51 +0000 (05:29 +0000)]
Pass a hint from the extension to decidePolicyForSOAuthorizationLoadWithCurrentPolicy
https://bugs.webkit.org/show_bug.cgi?id=207079
<rdar://problem/48290464>

Reviewed by Brent Fulgham.

Source/WebCore/PAL:

* pal/cocoa/AppSSOSoftLink.h:
* pal/cocoa/AppSSOSoftLink.mm:
* pal/spi/cocoa/AppSSOSPI.h:
Adds macros for classes that are used in the tests.

Source/WebKit:

Pass a localized human readable hint from the extension to decidePolicyForSOAuthorizationLoadWithCurrentPolicy,
such that clients can display it to tell users what the extension is trying to do. Hints could be something
like "Sign In With Apple".

Covered new test contents within existing tests.

* UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h:
* UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
(WebKit::SOAuthorizationSession::start):
(WebKit::SOAuthorizationSession::continueStartAfterGetAuthorizationHints):
(WebKit::SOAuthorizationSession::continueStartAfterDecidePolicy):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(-[TestSOAuthorizationDelegate _webView:decidePolicyForSOAuthorizationLoadWithCurrentPolicy:forExtension:completionHandler:]):
(overrideGetAuthorizationHintsWithURL):
(TestWebKitAPI::TEST):

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

7 months ago[JSC] Use PackedPtr for VariableEnvironment
ysuzuki@apple.com [Tue, 4 Feb 2020 04:22:29 +0000 (04:22 +0000)]
[JSC] Use PackedPtr for VariableEnvironment
https://bugs.webkit.org/show_bug.cgi?id=207172

Reviewed by Mark Lam.

Since VariableEnvironment's KeyValue is key: pointer + value: 2 byte, using PackedPtr can make it 8 bytes, 50% reduction.

* parser/VariableEnvironment.h:
* runtime/CachedTypes.cpp:
(JSC::CachedRefPtr::encode):
(JSC::CachedRefPtr::decode const): CachedTypes should handle PackedPtr too since VariableEnvironment starts using it.

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

7 months agoUnreviewed, fix the internal build after <rdar://problem/59132944>
wenson_hsieh@apple.com [Tue, 4 Feb 2020 03:59:08 +0000 (03:59 +0000)]
Unreviewed, fix the internal build after <rdar://problem/59132944>

* UIProcess/ios/WKContentViewInteraction.h: Declare this helper in the header, now that it's consulted by some
WebKitAdditions code.

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

7 months agoAdd a WebKitAdditions hook to override the behavior of -[WKContentView gestureRecogni...
wenson_hsieh@apple.com [Tue, 4 Feb 2020 01:51:21 +0000 (01:51 +0000)]
Add a WebKitAdditions hook to override the behavior of -[WKContentView gestureRecognizer:shouldReceiveTouch:]
https://bugs.webkit.org/show_bug.cgi?id=207162
<rdar://problem/59129739>

Reviewed by Tim Horton.

Allow an internal implementation of `-_allowGestureRecognizer:toReceiveTouch:` to prevent touches from being
routed to certain gesture recognizers, if necessary.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):

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

7 months agoresults.webkit.org: Support jsc stress tests
jbedard@apple.com [Tue, 4 Feb 2020 01:47:26 +0000 (01:47 +0000)]
results.webkit.org: Support jsc stress tests
https://bugs.webkit.org/show_bug.cgi?id=204096

Rubber-stamped by Aakash Jain.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests): Add pass and failures to reported results.

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

7 months agoMake Bugzilla._find_select_element_for_flag more robust
shvaikalesh@gmail.com [Tue, 4 Feb 2020 01:32:06 +0000 (01:32 +0000)]
Make Bugzilla._find_select_element_for_flag more robust
https://bugs.webkit.org/show_bug.cgi?id=207148

Reviewed by Jonathan Bedard.

This patch resolves two FIXMEs:
1. _find_select_element_for_flag() is now used in _fill_attachment_form() method.
2. _find_select_element_for_flag() now does not rely on order of <select> elements.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla._fill_attachment_form):
(Bugzilla._find_select_element_for_flag):

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

7 months ago[ macOS wk1 ] inspector/unit-tests/server-timing-entry.html is flaky timeout
tsavell@apple.com [Tue, 4 Feb 2020 01:03:06 +0000 (01:03 +0000)]
[ macOS wk1 ] inspector/unit-tests/server-timing-entry.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=207167

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months ago[ Mac wk2 ] http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuproc...
tsavell@apple.com [Tue, 4 Feb 2020 01:00:24 +0000 (01:00 +0000)]
[ Mac wk2 ] http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207166

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months ago[ Mac wk2 ] tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html...
tsavell@apple.com [Tue, 4 Feb 2020 00:50:11 +0000 (00:50 +0000)]
[ Mac wk2 ] tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207165

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months agoLayoutTest inspector/controller/runtime-controller-import.html is a flaky timeout
tsavell@apple.com [Tue, 4 Feb 2020 00:49:13 +0000 (00:49 +0000)]
LayoutTest inspector/controller/runtime-controller-import.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168926

Updating because the test is also flaky failing.

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac/TestExpectations:

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

7 months ago[ macOS wk1 ] inspector/heap/imported-snapshot.html is flaky timeout
ryanhaddad@apple.com [Tue, 4 Feb 2020 00:36:18 +0000 (00:36 +0000)]
[ macOS wk1 ] inspector/heap/imported-snapshot.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=207163

Updating to include an exclude for timeouts.

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac/TestExpectations:

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

7 months ago[iOS wk2 Debug] legacy-animation-engine/animations/play-state-in-shorthand.html is...
tsavell@apple.com [Tue, 4 Feb 2020 00:34:56 +0000 (00:34 +0000)]
[iOS wk2 Debug] legacy-animation-engine/animations/play-state-in-shorthand.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207164

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ios-wk2/TestExpectations:

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

7 months agoCrash in WebCore::IDBServer::IDBServer::createIndex
sihui_liu@apple.com [Tue, 4 Feb 2020 00:31:02 +0000 (00:31 +0000)]
Crash in WebCore::IDBServer::IDBServer::createIndex
https://bugs.webkit.org/show_bug.cgi?id=207137
<rdar://problem/59096231>

Reviewed by Darin Adler.

Source/WebCore:

Export IDBIndexInfo::isolatedCopy so it can be used in WebKitLegacy framework code.

* Modules/indexeddb/shared/IDBIndexInfo.h:

Source/WebKitLegacy:

* Storage/InProcessIDBServer.cpp:
(InProcessIDBServer::createIndex): Create an isolated copy of IDBIndexInfo before passing it to IDB thread.

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

7 months agoRegression: (254414?) [ iOS wk2 ] imported/w3c/web-platform-tests/2dcontext/imagebitm...
tsavell@apple.com [Tue, 4 Feb 2020 00:28:44 +0000 (00:28 +0000)]
Regression: (254414?) [ iOS wk2 ] imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207161

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ios-wk2/TestExpectations:

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

7 months ago[ macOS wk1 ] css2.1/20110323/replaced-intrinsic-ratio-001.htm is flaky failing
ryanhaddad@apple.com [Tue, 4 Feb 2020 00:15:03 +0000 (00:15 +0000)]
[ macOS wk1 ] css2.1/20110323/replaced-intrinsic-ratio-001.htm is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207160

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months agoREGRESSION: [ macOS wk1 ] inspector/debugger/tail-deleted-frames/tail-deleted-frames...
tsavell@apple.com [Mon, 3 Feb 2020 23:54:53 +0000 (23:54 +0000)]
REGRESSION: [ macOS wk1 ] inspector/debugger/tail-deleted-frames/tail-deleted-frames-scopes.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207157

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months agoReduce size of HashMap and HashSet
achristensen@apple.com [Mon, 3 Feb 2020 23:48:29 +0000 (23:48 +0000)]
Reduce size of HashMap and HashSet
https://bugs.webkit.org/show_bug.cgi?id=207138

Reviewed by Yusuke Suzuki.

Source/WTF:

This reduces sizeof(HashMap) and sizeof(HashSet) from 24 to 8 on 64-bit systems.
I measured that the overwhelming majority of HashMaps and HashSets never see more than 0 elements,
so I moved the table metadata (tableSize, tableSizeMask, keyCount, deletedCount) to inside the
dynamically allocated memory.  This makes another branch in size() for non-empty tables
and an additional read and write when rehashing in exchange for fewer writes in the constructor
and increased cache locality of everything that uses HashMap and HashSet, which is basically everything.

* wtf/HashTable.h:
(WTF::HashTable::~HashTable):
(WTF::HashTable::end):
(WTF::HashTable::end const):
(WTF::HashTable::random):
(WTF::HashTable::size const):
(WTF::HashTable::capacity const):
(WTF::HashTable::isEmpty const):
(WTF::HashTable::reserveInitialCapacity):
(WTF::HashTable::shouldExpand const):
(WTF::HashTable::mustRehashInPlace const):
(WTF::HashTable::shouldShrink const):
(WTF::HashTable::shrink):
(WTF::HashTable::makeIterator):
(WTF::HashTable::makeConstIterator const):
(WTF::HashTable::makeKnownGoodIterator):
(WTF::HashTable::makeKnownGoodConstIterator const):
(WTF::HashTable::tableSize const):
(WTF::HashTable::setTableSize const):
(WTF::HashTable::tableSizeMask const):
(WTF::HashTable::setTableSizeMask):
(WTF::HashTable::keyCount const):
(WTF::HashTable::setKeyCount const):
(WTF::HashTable::deletedCount const):
(WTF::HashTable::setDeletedCount const):
(WTF::KeyTraits>::HashTable):
(WTF::KeyTraits>::inlineLookup):
(WTF::KeyTraits>::lookupForWriting):
(WTF::KeyTraits>::fullLookupForWriting):
(WTF::KeyTraits>::addUniqueForInitialization):
(WTF::KeyTraits>::add):
(WTF::KeyTraits>::addPassingHashCode):
(WTF::KeyTraits>::remove):
(WTF::KeyTraits>::removeIf):
(WTF::KeyTraits>::allocateTable):
(WTF::KeyTraits>::deallocateTable):
(WTF::KeyTraits>::expand):
(WTF::KeyTraits>::shrinkToBestSize):
(WTF::KeyTraits>::deleteReleasedWeakBuckets):
(WTF::KeyTraits>::rehash):
(WTF::KeyTraits>::clear):
(WTF::KeyTraits>::swap):
(WTF::KeyTraits>::checkTableConsistencyExceptSize const):

Tools:

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::TEST):

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

7 months ago[WK2] Use per-UIProcess default cookie storage for Mac Catalyst apps
cdumez@apple.com [Mon, 3 Feb 2020 23:40:44 +0000 (23:40 +0000)]
[WK2] Use per-UIProcess default cookie storage for Mac Catalyst apps
https://bugs.webkit.org/show_bug.cgi?id=207139
<rdar://problem/59047014>

Reviewed by Brent Fulgham.

Use per-UIProcess default cookie storage for Mac Catalyst apps, similarly to what
we do for regular macOS apps.

* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):

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

7 months agoUnreviewed iOS build fix; lambdas need an arrow operator between the paramaters and...
jer.noble@apple.com [Mon, 3 Feb 2020 23:38:57 +0000 (23:38 +0000)]
Unreviewed iOS build fix; lambdas need an arrow operator between the paramaters and return type.

* page/Quirks.cpp:
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

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

7 months ago[ iOS wk2 Release ] http/tests/websocket/tests/hybi/workers/close.html is flaky failing.
ryanhaddad@apple.com [Mon, 3 Feb 2020 23:38:48 +0000 (23:38 +0000)]
[ iOS wk2 Release ] http/tests/websocket/tests/hybi/workers/close.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207156

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ios-wk2/TestExpectations:

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

7 months ago[ macOS wk1 ] inspector/canvas/recording-2d-full.html is flaky timing out
ryanhaddad@apple.com [Mon, 3 Feb 2020 23:33:09 +0000 (23:33 +0000)]
[ macOS wk1 ] inspector/canvas/recording-2d-full.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207154

Updating expectations for newer OS

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months ago[ iOS wk2 ] animations/animation-callback-timestamp.html is flaky failing.
ryanhaddad@apple.com [Mon, 3 Feb 2020 23:31:33 +0000 (23:31 +0000)]
[ iOS wk2 ] animations/animation-callback-timestamp.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207153

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ios-wk2/TestExpectations:

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

7 months agoobsolete_attachment should not fail when flags do not exist
shvaikalesh@gmail.com [Mon, 3 Feb 2020 23:31:31 +0000 (23:31 +0000)]
obsolete_attachment should not fail when flags do not exist
https://bugs.webkit.org/show_bug.cgi?id=171121

Reviewed by Jonathan Bedard.

Before this change, an error occured if a contributor without EditBugs privileges tried
to obsolete not their own attachment. With this patch, uploading routine continues with
friendly console warning like we have in reassign_bug() method.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla):
(Bugzilla.obsolete_attachment):
(Bugzilla.reassign_bug): Use NO_EDIT_BUGS_MESSAGE constant.

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

7 months ago[iOS 13] Dragging on-screen volume control on a YouTube video selects text around...
wenson_hsieh@apple.com [Mon, 3 Feb 2020 23:09:19 +0000 (23:09 +0000)]
[iOS 13] Dragging on-screen volume control on a YouTube video selects text around the panel
https://bugs.webkit.org/show_bug.cgi?id=207140
<rdar://problem/58852938>

Reviewed by Tim Horton.

Source/WebKit:

This bug occurs on iPadOS when long pressing the volume controls on the desktop version of YouTube, and then
performing a pan gesture; this activates the highlight text selection gesture recognizer added in iOS 13,
causing text to be selected while adjusting the volume using these custom controls. On macOS, we avoid this
because `Node::canStartSelection()` returns `false`, due to a container node having both `user-drag: element`
and `user-select: none`; in this scenario, we allow dragging to take precendence over text selection, so the
volume slider can be moved using a mouse without simultaneously selecting text.

This logic is currently absent on iOS, where UIKit text interaction gesture recognizers ask us for information
about the DOM at given locations, and we determine whether to allow text interaction gestures (such as long
pressing) to begin in `-textInteractionGesture:shouldBeginAtPoint:` and `-hasSelectablePositionAtPoint:`.
Ideally, we'd want to eventually unify these two codepaths for triggering text selection (and preferably just
have both go through EventHandler); in lieu of this, simply make the iOS codepath behave a little more like
macOS by adding a bit to allow text interaction gestures to bail in the case where at least one container of the
hit-tested element is both draggable and unselectable.

Test: editing/selection/ios/prefer-drag-over-text-selection.html

* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Add the new bit to InteractionInformationAtPosition.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

Avoid beginning text selection if the bit is set.

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

Move a comment about the ">= 97% of the document's visible area" heuristic next to the relevant code, and also
leave a FIXME mentioning that we should reconsider whether this is really needed; it seems that this was
originally intended to avoid ending up with an excessively large block selection, but block selection has been
removed entirely since iOS 12. That said, this logic may still be helping avoid situations where the text
selection is too aggressive on iOS and ends up selecting too much text.

LayoutTests:

Add a layout test to verify that we don't allow text selection gestures inside of containers that have both
`user-drag: element` and `user-select: none`.

* editing/selection/ios/prefer-drag-over-text-selection-expected.txt: Added.
* editing/selection/ios/prefer-drag-over-text-selection.html: Added.

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

7 months ago[ macOS iOS ] fast/dom/connected-subframe-counter-overflow.html is flaky timing out
tsavell@apple.com [Mon, 3 Feb 2020 23:04:20 +0000 (23:04 +0000)]
[ macOS iOS ] fast/dom/connected-subframe-counter-overflow.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207152

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

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

7 months ago[ Mac wk2 Release ] fast/dom/navigator-detached-no-crash.html flaky failing.
tsavell@apple.com [Mon, 3 Feb 2020 22:58:47 +0000 (22:58 +0000)]
[ Mac wk2 Release ] fast/dom/navigator-detached-no-crash.html flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207151

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months ago[ macOS wk1 ] platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html is flaky...
tsavell@apple.com [Mon, 3 Feb 2020 22:52:34 +0000 (22:52 +0000)]
[ macOS wk1 ] platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207150

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months ago[ Mojave wk2 ] imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-state.html...
tsavell@apple.com [Mon, 3 Feb 2020 22:45:36 +0000 (22:45 +0000)]
[ Mojave wk2 ] imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-state.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207149

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months ago [iOS] Layout Test animations/duplicate-keys.html is a flaky failure
tsavell@apple.com [Mon, 3 Feb 2020 22:44:11 +0000 (22:44 +0000)]
   [iOS] Layout Test animations/duplicate-keys.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=185332

Updating on macOS wk1 because the same failure is also seen there

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months ago[ Mac ] legacy-animation-engine/compositing/geometry/partial-layout-update.html is...
tsavell@apple.com [Mon, 3 Feb 2020 22:34:25 +0000 (22:34 +0000)]
[ Mac ] legacy-animation-engine/compositing/geometry/partial-layout-update.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207147

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac/TestExpectations:

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

7 months ago[ macOS wk1 ] media/media-source/media-source-seek-redundant-append.html is flaky...
tsavell@apple.com [Mon, 3 Feb 2020 22:26:31 +0000 (22:26 +0000)]
[ macOS wk1 ] media/media-source/media-source-seek-redundant-append.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207146

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months agoRegression(r253224) WKUIDelegate.webViewDidClose may get called twice after calling...
cdumez@apple.com [Mon, 3 Feb 2020 22:21:54 +0000 (22:21 +0000)]
Regression(r253224) WKUIDelegate.webViewDidClose may get called twice after calling _tryClose on the WKWebView
https://bugs.webkit.org/show_bug.cgi?id=207121
<rdar://problem/58880177>

Reviewed by Alex Christensen.

Source/WebKit:

WKUIDelegate.webViewDidClose may get called twice after calling _tryClose on the WKWebView, in case we time out
while waiting for an answer from the WebProcess but the WebProcess eventually responds.

Change is covered by new API test.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::tryClose):

Tools:

Add API test coverage.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/beforeunload-slow.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm:
(-[SlowBeforeUnloadHandlerUIDelegate _webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[SlowBeforeUnloadHandlerUIDelegate webViewDidClose:]):
(TEST):

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

7 months ago[ Mojave wk2 ] media/media-fragments/TC0087.html is flaky failing.
tsavell@apple.com [Mon, 3 Feb 2020 22:19:31 +0000 (22:19 +0000)]
[ Mojave wk2 ] media/media-fragments/TC0087.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207143

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months ago[Web Animations] Accelerated animations don't run until their natural completion
graouts@webkit.org [Mon, 3 Feb 2020 22:16:46 +0000 (22:16 +0000)]
[Web Animations] Accelerated animations don't run until their natural completion
https://bugs.webkit.org/show_bug.cgi?id=207130
<rdar://problem/59106047>

Reviewed by Dean Jackson.

Source/WebCore:

Tests: webanimations/transform-accelerated-animation-finishes-before-removal.html
       webanimations/transform-accelerated-animation-removed-one-frame-after-finished-promise.html

Ensure we don't tear down a composited renderer until all of its runnning accelerated animations are completed.
The accelerated animations will be queued for removal in the next animation frame.

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::isRunningAcceleratedAnimationForProperty const):
* animation/KeyframeEffect.h:
* animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::isCurrentlyAffectingProperty const):

LayoutTests:

Add two new tests that ensures that an accelerated animation still yields compositing on an element when
its finished promise is resolved, but that it's no longer the case on the next frame.

This required an existing test to be updated to wait until the next frame before checking the composited
status of an element on which an animation had just completed.

* compositing/geometry/limit-layer-bounds-opacity-transition.html:
* webanimations/transform-accelerated-animation-finishes-before-removal-expected.txt: Added.
* webanimations/transform-accelerated-animation-finishes-before-removal.html: Added.
* webanimations/transform-accelerated-animation-removed-one-frame-after-finished-promise-expected.txt: Added.
* webanimations/transform-accelerated-animation-removed-one-frame-after-finished-promise.html: Added.

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

7 months ago[iPad] Videos on nhl.com can't be scrubbed when loaded with desktop UA.
jer.noble@apple.com [Mon, 3 Feb 2020 22:15:20 +0000 (22:15 +0000)]
[iPad] Videos on nhl.com can't be scrubbed when loaded with desktop UA.
https://bugs.webkit.org/show_bug.cgi?id=207058

Reviewed by Darin Adler.

The video controls on nhl.com listen for mousedown/mousemove/mouseup events, not
touchstart/touchmove/touchend events. Until nhl.com can update their site to support touch
events, add them to the quirks list for simplated mouse events.

Drive-by fix: There's no need to re-parse the entire URL and walk through all the cases
every time shouldDispatchSimulatedMouseEvents() is called. Save the results of the initial
pass so that subsequent checks are just a simple bool check.

* page/Quirks.cpp:
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

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

7 months ago[ macOS wk1 ] inspector/canvas/recording-webgl-full.html is flaky timing out
tsavell@apple.com [Mon, 3 Feb 2020 22:13:57 +0000 (22:13 +0000)]
[ macOS wk1 ] inspector/canvas/recording-webgl-full.html  is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207145

Updating expectations

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months ago[WebKitTestRunner] setOpenPanelFiles support in non-local tests
lmoura@igalia.com [Mon, 3 Feb 2020 21:54:54 +0000 (21:54 +0000)]
[WebKitTestRunner] setOpenPanelFiles support in non-local tests
https://bugs.webkit.org/show_bug.cgi?id=206517

Reviewed by Carlos Alberto Lopez Perez.

Tools:

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setOpenPanelFiles): Use file:// if the passed path
starts with a leading slash instead of using the test URL, which could
cause input forms with invalid file data.

LayoutTests:

* platform/gtk/TestExpectations: Update expectations after fix.

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

7 months agoLayout Test svg/custom/object-sizing-explicit-width.xhtml is a flaky failure.
tsavell@apple.com [Mon, 3 Feb 2020 21:49:11 +0000 (21:49 +0000)]
Layout Test svg/custom/object-sizing-explicit-width.xhtml is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=181058

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months ago[ macOS wk1 ] media/modern-media-controls/compact-media-controls/compact-media-contro...
tsavell@apple.com [Mon, 3 Feb 2020 21:41:23 +0000 (21:41 +0000)]
[ macOS wk1 ] media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html is flaky failing (192974)
https://bugs.webkit.org/show_bug.cgi?id=192974

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months ago[ Mac ] requestidlecallback/requestidlecallback-is-called.html flaky failing.
tsavell@apple.com [Mon, 3 Feb 2020 21:39:49 +0000 (21:39 +0000)]
[ Mac ] requestidlecallback/requestidlecallback-is-called.html flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207142

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac/TestExpectations:

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

7 months agoReplace the custom allocator in AudioArray::allocate() with fastAlignedMalloc().
jer.noble@apple.com [Mon, 3 Feb 2020 21:35:16 +0000 (21:35 +0000)]
Replace the custom allocator in AudioArray::allocate() with fastAlignedMalloc().
https://bugs.webkit.org/show_bug.cgi?id=206504

Reviewed by Filip Pizlo.

AudioArray wants to have its data aligned at 16-byte boundaries, as that's a requirement for
some of the accelerated math frameworks used by Web Audio. Now that we have fastAlignedMalloc(),
there's no need to use a custom aligned allocator.

Drive-by fixes: clean up the constructors a bit to use the modern initialization syntax.

* platform/audio/AudioArray.h:
(WebCore::AudioArray::AudioArray):
(WebCore::AudioArray::~AudioArray):
(WebCore::AudioArray::allocate):
(WebCore::AudioArray::data):
(WebCore::AudioArray::data const):
(WebCore::AudioArray::alignedAddress): Deleted.

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

7 months agoREGRESSION: [ macOS wk2 ] inspector/canvas/create-context-bitmaprenderer.html is...
tsavell@apple.com [Mon, 3 Feb 2020 21:33:06 +0000 (21:33 +0000)]
REGRESSION: [ macOS wk2 ] inspector/canvas/create-context-bitmaprenderer.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207141

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months ago\0 identity escapes should be syntax errors in Unicode patterns only
shvaikalesh@gmail.com [Mon, 3 Feb 2020 21:23:20 +0000 (21:23 +0000)]
\0 identity escapes should be syntax errors in Unicode patterns only
https://bugs.webkit.org/show_bug.cgi?id=207114

Reviewed by Darin Adler.

JSTests:

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

Source/JavaScriptCore:

This change adds a separate check for null character because `strchr`
always returns a non-null pointer when called with '\0' as second argument.

Grammar: https://tc39.es/ecma262/#prod-annexB-IdentityEscape
(/u flag precludes the use of SourceCharacterIdentityEscape)

* yarr/YarrParser.h:
(JSC::Yarr::Parser::isIdentityEscapeAnError):

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

7 months ago[ iOS wk2 ] compositing/backing/page-scale-overlap-in-iframe.html failing.
tsavell@apple.com [Mon, 3 Feb 2020 21:12:43 +0000 (21:12 +0000)]
[ iOS wk2 ] compositing/backing/page-scale-overlap-in-iframe.html failing.
https://bugs.webkit.org/show_bug.cgi?id=207116

Unreviewed test gardening.

Added an expectation file for iPad.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ipad/TestExpectations:
* platform/ipad/compositing/backing/page-scale-overlap-in-iframe-expected.txt: Added.

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

7 months ago[ macOS wk2 ] http/tests/media/media-stream/get-display-media-prompt.html is flaky...
youenn@apple.com [Mon, 3 Feb 2020 20:44:49 +0000 (20:44 +0000)]
[ macOS wk2 ] http/tests/media/media-stream/get-display-media-prompt.html is flaky failure
https://bugs.webkit.org/show_bug.cgi?id=206958
<rdar://problem/59003765>

Reviewed by Eric Carlson.

We added a rule to only allow one getDisplayMedia call per gesture.
For that reason, we were storing a pointer to the gesture event and
resetting in case the current gesture event was equal to the stored pointer.
Instead, store a WeakPtr which ensures that if the previous event is destroyed,
the weak pointer will be null and so will not have the same value as the new gesture event.
Covered by existing tests no longer being flaky.

* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::computeUserGesturePriviledge):
* Modules/mediastream/MediaDevices.h:
* dom/UserGestureIndicator.h:

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

7 months ago[macOS] AirPlay sometimes stops after 60 minutes of playback
eric.carlson@apple.com [Mon, 3 Feb 2020 20:19:44 +0000 (20:19 +0000)]
[macOS] AirPlay sometimes stops after 60 minutes of playback
https://bugs.webkit.org/show_bug.cgi?id=207056
Source/WebCore:

<rdar://problem/53649508>

Reviewed by Jer Noble.

No new tests, this only reproduces when playing to an AirPlay device.

AVPlayerItem.tracks is empty during AirPlay. If AirPlay is activated immediately
after the item is created, as is typically the case when switching from an MSE to
a url based player, MediaPlayerPrivateAVFoundationObjC doesn't know if the AVPlayerItem
has audio or video so the state reported to the WebMediaSessionManager is incorrect.
AirPlay can't actually be active if an item doesn't have audio or video, so always claim
to have both during AirPlay.

Converted WebMediaSessionManager logging from debug-only to runtime to make it easier
to diagnose problems in the future.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::mediaProducerStateString):
(WebCore::WebMediaSessionLogger::create):
(WebCore::WebMediaSessionLogger::WebMediaSessionLogger):
(WebCore::WebMediaSessionLogger::log const):
(WebCore::WebMediaSessionManager::logger):
(WebCore::WebMediaSessionManager::alwaysOnLoggingAllowed const):
(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerEnabled):
(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerState):
(WebCore::WebMediaSessionManager::mockMediaPlaybackTargetPickerDismissPopup):
(WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient):
(WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient):
(WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients):
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
(WebCore::WebMediaSessionManager::clientStateDidChange):
(WebCore::WebMediaSessionManager::setPlaybackTarget):
(WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange):
(WebCore::WebMediaSessionManager::playbackTargetPickerWasDismissed):
(WebCore::WebMediaSessionManager::configurePlaybackTargetClients):
(WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring):
(WebCore::WebMediaSessionManager::configureWatchdogTimer):
(WebCore::WebMediaSessionManager::watchdogTimerFired):
(WebCore::ClientState::logAlways const): Deleted.
* Modules/mediasession/WebMediaSessionManager.h:
* Modules/mediasession/WebMediaSessionManagerClient.h:
(WebCore::WebMediaSessionManagerClient::alwaysOnLoggingAllowed):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaState const):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasVideo const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasAudio const):

Source/WebKit:

Reviewed by Jer Noble.

* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:

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

7 months ago[ews] Set custom build summary for webkitpy tests
aakash_jain@apple.com [Mon, 3 Feb 2020 19:41:41 +0000 (19:41 +0000)]
[ews] Set custom build summary for webkitpy tests
https://bugs.webkit.org/show_bug.cgi?id=207027

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/factories.py:
* BuildSlaveSupport/ews-build/steps.py:
(WebKitPyTest.setBuildSummary):
(WebKitPyTest.getResultSummary):
* BuildSlaveSupport/ews-build/factories_unittest.py:

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

7 months agorun-javascriptcore-tests: Don't split binary results
jbedard@apple.com [Mon, 3 Feb 2020 19:37:40 +0000 (19:37 +0000)]
run-javascriptcore-tests: Don't split binary results
https://bugs.webkit.org/show_bug.cgi?id=207118

Rubber-stamped by Aakash Jain.

* Scripts/run-javascriptcore-tests:
(runTest): Only report aggregated binary results.

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

7 months agoStart splitting platform specific overrides of default enable behavior into their...
commit-queue@webkit.org [Mon, 3 Feb 2020 19:29:22 +0000 (19:29 +0000)]
Start splitting platform specific overrides of default enable behavior into their own files
https://bugs.webkit.org/show_bug.cgi?id=207105

Patch by Sam Weinig <weinig@apple.com> on 2020-02-03
Reviewed by Dean Jackson.

Source/WebKit:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
Switch to using the ENABLE() helper macro to correctly guard against the case that
ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0.

Source/WTF:

Splits out platform specific overrides of default enable behavior into separate files,
starting with one for all of the Cocoa related ports, one for Apple's Windows port, and
one for the WinCario port.

The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h,
but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually
ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h
also had defaults in PlatformEnable.h, but going forward this needs be validated either through
some sort of macro-based validation, through the style checker or something else.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/PlatformEnable.h:
* wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h.
* wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h.
* wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h.

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

7 months agoREGRESSION: [ macOS wk1 ] css3/selectors3/xml/css3-modsel-d2.xml is flaky failing
tsavell@apple.com [Mon, 3 Feb 2020 19:00:20 +0000 (19:00 +0000)]
REGRESSION: [ macOS wk1 ] css3/selectors3/xml/css3-modsel-d2.xml is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207133

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months ago[ macOS wk2 ] inspector/canvas/create-context-2d.html is flaky failing
tsavell@apple.com [Mon, 3 Feb 2020 18:41:39 +0000 (18:41 +0000)]
[ macOS wk2 ] inspector/canvas/create-context-2d.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207132

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac/TestExpectations:

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

7 months agoFix expectation after r255561 that needed to be just iPad
tsavell@apple.com [Mon, 3 Feb 2020 18:36:54 +0000 (18:36 +0000)]
Fix expectation after r255561 that needed to be just iPad
https://bugs.webkit.org/show_bug.cgi?id=207116

Unreviewed test gardening.

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

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

7 months agoFlaky Test: inspector/worker/debugger-pause.html
tsavell@apple.com [Mon, 3 Feb 2020 18:25:35 +0000 (18:25 +0000)]
Flaky Test: inspector/worker/debugger-pause.html
https://bugs.webkit.org/show_bug.cgi?id=206285

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac/TestExpectations:

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

7 months agoinspector/heap/getRemoteObject.html is a flaky crash
tsavell@apple.com [Mon, 3 Feb 2020 17:54:23 +0000 (17:54 +0000)]
inspector/heap/getRemoteObject.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=206903

Updating expectations for an existing bug

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months ago[ macOS wk2 ] webgpu/whlsl/buffer-vertex.html is flaky failing
tsavell@apple.com [Mon, 3 Feb 2020 17:43:42 +0000 (17:43 +0000)]
[ macOS wk2 ] webgpu/whlsl/buffer-vertex.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207127

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months ago[ macOS wk1 ] transitions/start-transform-transition.html is flaky failing
tsavell@apple.com [Mon, 3 Feb 2020 17:36:19 +0000 (17:36 +0000)]
[ macOS wk1 ] transitions/start-transform-transition.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207125

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months ago[ macOS wk1 ] compositing/backing/animate-into-view.html is flaky timing out
tsavell@apple.com [Mon, 3 Feb 2020 17:21:27 +0000 (17:21 +0000)]
[ macOS wk1 ] compositing/backing/animate-into-view.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207124

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

7 months agoUnreviewed watchOS build fix after r255559- add missing semi-colon.
krollin@apple.com [Mon, 3 Feb 2020 17:21:17 +0000 (17:21 +0000)]
Unreviewed watchOS build fix after r255559- add missing semi-colon.

* UIProcess/ios/forms/WKFocusedFormControlView.mm:
(-[WKFocusedFormControlView scrollOffsetForCrownInputOffset:]):

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

7 months agoUnreviewed, disable ResponsivenessTimer test in Debug / ASAN
cdumez@apple.com [Mon, 3 Feb 2020 17:10:07 +0000 (17:10 +0000)]
Unreviewed, disable ResponsivenessTimer test in Debug / ASAN

The ResponsivenessTimer is disabled for those configurations as of r255518.

* TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm:

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

7 months ago[ macOS wk2 ] tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-then-proximit...
tsavell@apple.com [Mon, 3 Feb 2020 17:02:55 +0000 (17:02 +0000)]
[ macOS wk2 ] tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-then-proximity.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207120

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months agoMake sure RTCVideoEncoderH264 generate a keyframe even if the frame that was supposed...
youenn@apple.com [Mon, 3 Feb 2020 16:38:29 +0000 (16:38 +0000)]
Make sure RTCVideoEncoderH264 generate a keyframe even if the frame that was supposed to be a key frame was dropped
https://bugs.webkit.org/show_bug.cgi?id=207108

Reviewed by Eric Carlson.

Add a parameter telling whether a frame to be encoded should be a key frame.
In encoder callback, if the frame is expected to be a key frame, set a flag to force the next frame to be a key frame.
This ensures that keyframe sending is not delayed in case encoding is dropping or failing to encode frames.

* Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:
(-[RTCVideoEncoderH264 initWithCodecInfo:]):
(-[RTCVideoEncoderH264 encode:codecSpecificInfo:frameTypes:]):
(-[RTCVideoEncoderH264 frameWasEncoded:flags:sampleBuffer:codecSpecificInfo:width:height:renderTimeMs:timestamp:rotation:isKeyFrameRequired:]):

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

7 months ago[ macOS wk2 ] webgpu/whlsl/nested-loop.html is flaky failing
tsavell@apple.com [Mon, 3 Feb 2020 16:26:50 +0000 (16:26 +0000)]
[ macOS wk2 ] webgpu/whlsl/nested-loop.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207117

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months agoDo not copy feature policy in isFeaturePolicyAllowedByDocumentAndAllOwners
youenn@apple.com [Mon, 3 Feb 2020 16:25:38 +0000 (16:25 +0000)]
Do not copy feature policy in isFeaturePolicyAllowedByDocumentAndAllOwners
https://bugs.webkit.org/show_bug.cgi?id=207110

Reviewed by Eric Carlson.

Use auto& instead of auto to not copy the feature policy object.
Add some auto* to improve code readability.
No change of behavior.

* html/FeaturePolicy.cpp:
(WebCore::isFeaturePolicyAllowedByDocumentAndAllOwners):

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

7 months ago[ iOS wk2 ] compositing/backing/page-scale-overlap-in-iframe.html failing.
tsavell@apple.com [Mon, 3 Feb 2020 16:23:48 +0000 (16:23 +0000)]
[ iOS wk2 ] compositing/backing/page-scale-overlap-in-iframe.html failing.
https://bugs.webkit.org/show_bug.cgi?id=207116

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ios-wk2/TestExpectations:

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

7 months ago[macS wk2] LayoutTest/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainf...
tsavell@apple.com [Mon, 3 Feb 2020 16:03:44 +0000 (16:03 +0000)]
[macS wk2] LayoutTest/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html is a flaky failure. (171839)
https://bugs.webkit.org/show_bug.cgi?id=171839

Removing "debug" as the failure is also happening on release.

Unreviewed test gardening

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

7 months agoUse std::hypot() where possible
zandobersek@gmail.com [Mon, 3 Feb 2020 14:14:29 +0000 (14:14 +0000)]
Use std::hypot() where possible
https://bugs.webkit.org/show_bug.cgi?id=198483

Reviewed by Carlos Garcia Campos.

Use std::hypot() where possible, allowing for a possibly more precise
calculation of square roots of sums of two or three square values.

Source/WebCore:

* css/CSSGradientValue.cpp:
(WebCore::horizontalEllipseRadius):
* platform/audio/FFTFrame.cpp:
(WebCore::FFTFrame::print):
* platform/graphics/FloatPoint.cpp:
(WebCore::FloatPoint::length const): Deleted.
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::length const):
* platform/graphics/FloatPoint3D.h:
(WebCore::FloatPoint3D::length const):
* platform/graphics/FloatSize.cpp:
(WebCore::FloatSize::diagonalLength const): Deleted.
* platform/graphics/FloatSize.h:
(WebCore::FloatSize::diagonalLength const):
* platform/graphics/GeometryUtilities.cpp:
(WebCore::euclidianDistance):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* platform/graphics/PathTraversalState.cpp:
(WebCore::distanceLine):
* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::computeLineBoundsAndAntialiasingModeForText):
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::addArcTo):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::roundToDevicePixels):
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::initPaint):
* platform/graphics/transforms/AffineTransform.cpp:
(WebCore::AffineTransform::xScale const):
(WebCore::AffineTransform::yScale const):
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend):
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::v3Length):
(WebCore::decompose2):
(WebCore::TransformationMatrix::rotate3d):
* rendering/RenderThemeIOS.mm:
(WebCore::shortened):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeCircle::floatValueForRadiusInBox const):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::calculateDistance):
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::valueForLength):
(WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage const):
(WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits const):
* svg/SVGTransformDistance.cpp:
(WebCore::SVGTransformDistance::distance const):
* svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:

Source/WebKit:

* Platform/classifier/ResourceLoadStatisticsClassifier.cpp:
(WebKit::vectorLength):
* UIProcess/ios/forms/WKFocusedFormControlView.mm:
(-[WKFocusedFormControlView scrollOffsetForCrownInputOffset:]):

Tools:

* TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
(-[DragAndDropSimulator initialProgressForMouseDrag]):

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

7 months ago[JHBuild] remove libvpx
commit-queue@webkit.org [Mon, 3 Feb 2020 12:17:13 +0000 (12:17 +0000)]
[JHBuild] remove libvpx
https://bugs.webkit.org/show_bug.cgi?id=207103

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-02-03
Reviewed by Xabier Rodriguez-Calvar.

libvpx were added in jhbuild in times of OpenWebRTC. Nowadays, LibWebRTC is used and libvpx is
installed through Tools/gtk/install-dependencies, thus it should be removed from jhbuild.modules

* gstreamer/jhbuild.modules: remove libvpx.

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

7 months agoUnreviewed. Fix the inspector files combination after r255547
carlosgc@webkit.org [Mon, 3 Feb 2020 10:31:02 +0000 (10:31 +0000)]
Unreviewed. Fix the inspector files combination after r255547

* UserInterface/Main.html: Remove Views/SizesToFitNavigationBar.js that was removed in r255547

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

7 months agoCrash in WebKitAccessible
commit-queue@webkit.org [Mon, 3 Feb 2020 10:27:27 +0000 (10:27 +0000)]
Crash in WebKitAccessible
https://bugs.webkit.org/show_bug.cgi?id=207093
<rdar://problem/59088456>

Patch by Jonathan Kingston <jonathan@jooped.co.uk> on 2020-02-03
Reviewed by Carlos Garcia Campos.

Fixed a debug crash in WebKitAccessible caused by detatching an accessibility wrapper multiple times.

* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::detachPlatformWrapper):

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

7 months agoBuild error with -DENABLE_VIDEO_TRACK=OFF after r255151
psaavedra@igalia.com [Mon, 3 Feb 2020 08:59:06 +0000 (08:59 +0000)]
Build error with -DENABLE_VIDEO_TRACK=OFF after r255151
https://bugs.webkit.org/show_bug.cgi?id=207097

Reviewed by Antti Koivisto.

No new tests, only build error fix up

* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText const):

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

7 months agoediting/input/composition-highlights.html fails on open source Mojave bots
wenson_hsieh@apple.com [Mon, 3 Feb 2020 04:55:58 +0000 (04:55 +0000)]
editing/input/composition-highlights.html fails on open source Mojave bots
https://bugs.webkit.org/show_bug.cgi?id=207107

Reviewed by Tim Horton.

This test currently fails consistently on non-internal macOS Mojave bots; for some reason, the width of the
colon character glyph in Times font is 8.4px instead of 4.4px when using CTRunGetAdvancesPtr, causing the
composition highlights to be shifted right 4px and making the ref comparison fail.

Debugging shows that only in macOS Mojave, the CoreText framework adjusts the width of the colon glyph by 4px
in TStorageRange::SetAdvance. This has since been fixed in Catalina, so just work around this for the time being
by changing the editable text from "Test: " to just "Test ".

* editing/input/composition-highlights-expected.html:
* editing/input/composition-highlights.html:

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

7 months agoUpdate style checker with new locations OS version checks are allowed
commit-queue@webkit.org [Mon, 3 Feb 2020 04:26:55 +0000 (04:26 +0000)]
Update style checker with new locations OS version checks are allowed
https://bugs.webkit.org/show_bug.cgi?id=207106

Patch by Sam Weinig <weinig@apple.com> on 2020-02-02
Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_os_version_checks):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_os_version_checks):
Update path check to allow anything with the pattern "Source/WTF/wtf/Platform[a-zA-Z]+\.h"

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

7 months agoASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) on animations...
commit-queue@webkit.org [Sun, 2 Feb 2020 23:18:47 +0000 (23:18 +0000)]
ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) on animations/keyframe-autoclose-brace.html
https://bugs.webkit.org/show_bug.cgi?id=207071
<rdar://problem/59076249>

Patch by Antoine Quint <graouts@apple.com> on 2020-02-02
Reviewed by Dean Jackson.

Source/WebCore:

We cannot add CSSPropertyInvalid to a HashSet<CSSPropertyID>, because it triggers an ASSERT, and also we shouldn't
because we wouldn't know how to animate that CSS property.

* animation/AnimationTimeline.cpp:
(WebCore::compileTransitionPropertiesInStyle):

LayoutTests:

The crash is fixed, we can start running the test as expected again.

* platform/ipad/TestExpectations:

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

7 months ago[CMake] Use opj_config.h to find OpenJPEG include directory
commit-queue@webkit.org [Sun, 2 Feb 2020 16:51:41 +0000 (16:51 +0000)]
[CMake] Use opj_config.h to find OpenJPEG include directory
https://bugs.webkit.org/show_bug.cgi?id=207100

Patch by Ting-Wei Lan <lantw44@gmail.com> on 2020-02-02
Reviewed by Konstantin Tokarev.

WebKit needs OpenJPEG 2.2.0 or later versions, but it is possible for a
system to have both OpenJPEG 1 and OpenJPEG 2 installed. However, some
distributions do not put OpenJPEG 1 under a versioned directory and
put its header file directly under /usr/include or /usr/local/include.
Since CMake prefers its prefixes to paths given in HINTS, it is possible
that openjpeg.h from OpenJPEG 1 is found before the one from OpenJPEG 2,
causing WebKit to fail to build because of using the wrong header file.

Resolve the problem by checking opj_config.h instead of openjpeg.h.
OpenJPEG 1.5 does not have opj_config.h, so only OpenJPEG 2 can be
found. This also makes it consistent with the code below which already
uses opj_config.h.

* Source/cmake/FindOpenJPEG.cmake:

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

7 months agoImport WPT tests to verify pings do not send a referrer header
commit-queue@webkit.org [Sun, 2 Feb 2020 10:20:09 +0000 (10:20 +0000)]
Import WPT tests to verify pings do not send a referrer header
https://bugs.webkit.org/show_bug.cgi?id=207090

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

Import WPT tests to verify pings do not send a referrer header.

* resources/import-expectations.json:
* web-platform-tests/html/semantics/links/downloading-resources/contains.json: Removed.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-expected.txt: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-no-referrer-expected.txt: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-no-referrer-when-downgrade-expected.txt: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-no-referrer-when-downgrade.html: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-no-referrer.html: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-origin-expected.txt: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-origin-when-cross-origin-expected.txt: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-origin-when-cross-origin.html: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-origin.html: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-same-origin-expected.txt: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-same-origin.html: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-strict-origin-expected.txt: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-strict-origin-when-cross-origin-expected.txt: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-strict-origin-when-cross-origin.html: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-strict-origin.html: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-unsafe-url-expected.txt: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer-unsafe-url.html: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer.html: Added.
* web-platform-tests/html/semantics/links/downloading-resources/header-referrer.js: Added.
(testReferrerHeader):
(pollResult.return.new.Promise.):
(pollResult.return.new.Promise):
* web-platform-tests/html/semantics/links/downloading-resources/resources/inspect-header.py: Added.
(main):
* web-platform-tests/html/semantics/links/downloading-resources/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/w3c-import.log.
* web-platform-tests/html/semantics/links/downloading-resources/w3c-import.log:

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

7 months agoSilence compiler warnings
commit-queue@webkit.org [Sun, 2 Feb 2020 03:57:10 +0000 (03:57 +0000)]
Silence compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=207015

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-02-01
Reviewed by Darin Adler.

Source/WebCore:

* accessibility/AXObjectCache.cpp:
(WebCore::characterForCharacterOffset): Use IGNORE_CLANG_WARNINGS macros to avoid
warnings when using GCC. GCC freaks out when it doesn't recognize a warning passed to
IGNORE_WARNINGS_BEGIN().
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildObjectForCanvas): Fix -Wredundant-move
* platform/PasteboardItemInfo.h: Fix -Wredundant-move
(WebCore::PresentationSize::decode):
(WebCore::PasteboardItemInfo::decode):

Source/WebKit:

Use UNUSED_VARIABLE() for variable that is only used inside RELEASE_LOG(), which is
Apple-specific.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFailLoading):

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

7 months agoWeb Inspector: move the items in the toolbar into the tab bar to save vertical space
drousso@apple.com [Sun, 2 Feb 2020 03:40:31 +0000 (03:40 +0000)]
Web Inspector: move the items in the toolbar into the tab bar to save vertical space
https://bugs.webkit.org/show_bug.cgi?id=204627

Reviewed by Timothy Hatcher.

Source/WebCore:

Now that there is no toolbar area, there is nothing obstructing the ability for the window
to be moved around when dragging via the title bar area. As such, we can remove the unused
`InspectorFrontendHost` APIs.

* inspector/InspectorFrontendHost.idl:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::startWindowDrag): Deleted.
(WebCore::InspectorFrontendHost::moveWindowBy const): Deleted.

* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::moveWindowBy): Deleted.

Source/WebInspectorUI:

Merge the toolbar are and tab bar to waste less vertical space.

The inspect, download, reload, and device settings buttons are pinned before the tabs.

If there are any console warnings/errors, an icon for each type of message is shown between
the left buttons and the tabs, and each button's opacity is animated whenever a new message
is added.

Whenever the debugger pauses, change the tab bar icon of the Sources Tab to an image that
includes paused iconography (||) to help convey the debugger's state no matter which tab is
currently selected, just like the debugger dashboard.

The docking configuration, debug, and close buttons are pinned after the tabs.

The dashboard network information has been moved to the Network Tab (described below).

When undocked, the tab bar and all the content below it are pushed down by 22px to make room
for the system close/minimize/maximize buttons and the window title.

* UserInterface/Base/Main.js:
(WI.loaded):
(WI._handleSettingsKeyboardShortcut):
(WI._tryToRestorePendingTabs):
(WI.isNewTabWithTypeAllowed):
(WI._openDefaultTab): Deleted.
(WI.showNewTabTab): Deleted.
* UserInterface/Views/Main.css:
(#undocked-title-area): Added.
(body.docked #undocked-title-area): Added.
(body.window-inactive #undocked-title-area): Added.
(#main):
(@keyframes tab-bar-console-item-pulse): Added.
(.tab-bar > .navigation-bar :matches(.console-warnings, .console-errors):not(.disabled).pulsing): Added.
(@media (prefers-color-scheme: dark) #undocked-title-area): Added.
(@media (prefers-color-scheme: dark) body.window-inactive #undocked-title-area): Added.
(body.docked.bottom): Deleted.
(body.docked.bottom #toolbar): Deleted.
(body.docked.bottom #toolbar .item:not(.flexible-space)): Deleted.

* UserInterface/Views/TabBar.js:
(WI.TabBar):
(WI.TabBar.prototype.addNavigationItemBefore): Added.
(WI.TabBar.prototype.addNavigationItemAfter): Added.
(WI.TabBar.prototype.insertTabBarItem):
(WI.TabBar.prototype.insertTabBarItem.animateTabs):
(WI.TabBar.prototype.insertTabBarItem.removeStyles):
(WI.TabBar.prototype.removeTabBarItem):
(WI.TabBar.prototype.removeTabBarItem.animateTabs):
(WI.TabBar.prototype.removeTabBarItem.removeStyles):
(WI.TabBar.prototype.set selectedTabBarItem):
(WI.TabBar.prototype.get tabCount): Added.
(WI.TabBar.prototype.layout):
(WI.TabBar.prototype.didLayoutSubtree): Added.
(WI.TabBar.prototype._recordTabBarItemSizesAndPositions):
(WI.TabBar.prototype._finishExpandingTabsAfterClose):
(WI.TabBar.prototype._finishExpandingTabsAfterClose.animateTabs):
(WI.TabBar.prototype._finishExpandingTabsAfterClose.removeStyles):
(WI.TabBar.prototype._handleClick):
(WI.TabBar.prototype._handleMouseMoved):
(WI.TabBar.prototype._handleMouseUp):
(WI.TabBar.prototype._handleMouseLeave):
(WI.TabBar.prototype._handleContextMenu):
(WI.TabBar.prototype.get saveableTabCount): Deleted.
(WI.TabBar.layout.forceItemHidden): Deleted.
* UserInterface/Views/TabBar.css:
(.tab-bar):
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar): Added.
(.tab-bar > .border): Added.
(.tab-bar > .border.top): Added.
(.tab-bar > .border.bottom): Added.
(body.docked.bottom .tab-bar > .border.top): Added.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .border): Added.
(@media (-webkit-max-device-pixel-ratio: 1) body.docked:matches(.right, .left):not(.window-docked-inactive) .tab-bar > .border.top): Added.
(@media (-webkit-min-device-pixel-ratio: 2) body.docked:matches(.right, .left):not(.window-docked-inactive) .tab-bar > .border.top): Added.
(.tab-bar > .tabs > .item):
(.tab-bar > .tabs > .item:not(.disabled).selected):
(.tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover):
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item):
(.tab-bar > .navigation-bar): Added.
(.tab-bar > .navigation-bar > .item.group > .item): Added.
(.tab-bar > .navigation-bar > .item.group > .item:nth-child(1 of :not(.hidden))): Added.
(.tab-bar > .navigation-bar > .item.group > .item:nth-last-child(1 of :not(.hidden))): Added.
(.tab-bar > .navigation-bar .item.divider): Added.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .navigation-bar > .item.divider): Added.
(.tab-bar > .tabs): Added.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item): Added.
(.tab-bar > .tabs.dragging-tab > .item.selected, .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), .tab-bar > .tabs.animating.closing-tab > .item.selected): Added.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.dragging-tab > .item.selected, body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.animating.closing-tab > .item.selected): Added.
(@media (prefers-color-scheme: dark) body.docked.bottom .tab-bar > .border.top): Added.
(@media (prefers-color-scheme: dark) .tab-bar > .tabs > .item:not(.disabled).selected):
(body:not(.window-inactive) .tab-bar.single-tab > .item.default-tab:hover > .close): Deleted.
(.tab-bar.single-tab > .item.default-tab > .close): Deleted.
(body[dir=ltr].window-inactive .tab-bar > .item): Deleted.
(body[dir=rtl].window-inactive .tab-bar > .item): Deleted.
NOTE: elided renaming CSS changes.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype.reset):
(WI.NetworkTableContentView.prototype.tablePopulateCell):
(WI.NetworkTableContentView.prototype._changeCollection):
(WI.NetworkTableContentView.prototype.initialLayout):
(WI.NetworkTableContentView.prototype.processHAR):
(WI.NetworkTableContentView.prototype._processPendingEntries):
(WI.NetworkTableContentView.prototype._updateEntryForResource):
(WI.NetworkTableContentView.prototype._mainResourceDidChange):
(WI.NetworkTableContentView.prototype._handleResourceSizeDidChange): Added.
(WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange):
(WI.NetworkTableContentView.prototype._handleResourceAdded):
(WI.NetworkTableContentView.prototype._handleFrameWasAdded):
(WI.NetworkTableContentView.prototype._entryForResource):
(WI.NetworkTableContentView.prototype._updateStatistics): Added.
(WI.NetworkTableContentView.prototype._updateStatistic): Added.
(WI.NetworkTableContentView.prototype._startUpdatingLoadTimeStatistic): Added.
(WI.NetworkTableContentView.prototype._stopUpdatingLoadTimeStatistic): Added.
(WI.NetworkTableContentView.prototype._updateLoadTimeStatistic): Added.
* UserInterface/Views/NetworkTableContentView.css:
(.network-table > .statistics): Added.
(.network-table > .statistics > .statistic): Added.
(.network-table > .statistics > .statistic[hidden]): Added.
(.network-table > .statistics > .statistic > .icon): Added.
(.network-table > .statistics > .statistic > .text): Added.
(@media (prefers-color-scheme: dark) .network-table > .statistics > .statistic.domain-count > .icon): Added.
Add a fixed row below the network table that contains statistics information based on the
current shown collection (e.g. live data vs HAR):
 - number of domains
 - number of resources
 - total resource size
 - total transfer size
 - number of redirects
 - time to load
Slightly dim entries for previous sessions if Preserve Log is checked, since the statistics
data is calculated from the current session.
NOTE: elided renaming CSS changes.

* UserInterface/Views/TabBrowser.js:
(WI.TabBrowser.prototype.addTabForContentView):
(WI.TabBrowser.prototype.closeTabForContentView):
(WI.TabBrowser.prototype._tabBarItemSelected):
(WI.TabBrowser.prototype._tabBarItemRemoved):

* UserInterface/Views/TabContentView.js:
(WI.TabContentView.shouldPinTab): Added.
* UserInterface/Views/AuditTabContentView.js:
(WI.AuditTabContentView):
(WI.AuditTabContentView.tabInfo):
* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView):
(WI.CanvasTabContentView.tabInfo):
* UserInterface/Views/ConsoleTabContentView.js:
(WI.ConsoleTabContentView):
(WI.ConsoleTabContentView.tabInfo):
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView):
* UserInterface/Views/ElementsTabContentView.js:
(WI.ElementsTabContentView):
(WI.ElementsTabContentView.tabInfo):
* UserInterface/Views/LayersTabContentView.js:
(WI.LayersTabContentView):
(WI.LayersTabContentView.tabInfo):
* UserInterface/Views/NetworkTabContentView.js:
(WI.NetworkTabContentView):
(WI.NetworkTabContentView.tabInfo):
* UserInterface/Views/SearchTabContentView.js:
(WI.SearchTabContentView):
(WI.SearchTabContentView.tabInfo):
(WI.SearchTabContentView.shouldPinTab): Added.
(WI.SearchTabContentView.shouldSaveTab): Added.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView):
(WI.SettingsTabContentView.tabInfo):
(WI.SettingsTabContentView.shouldPinTab): Added.
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView):
(WI.SourcesTabContentView.tabInfo):
(WI.SourcesTabContentView.prototype._handleDebuggerPaused): Added.
(WI.SourcesTabContentView.prototype._handleDebuggerResumed): Added.
* UserInterface/Views/StorageTabContentView.js:
(WI.StorageTabContentView):
(WI.StorageTabContentView.tabInfo):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
(WI.TimelineTabContentView.tabInfo):
* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem):
(WI.TabBarItem.prototype.get element):
(WI.TabBarItem.prototype.get representedObject):
(WI.TabBarItem.prototype.set disabled):
(WI.TabBarItem.prototype.get hidden): Added.
(WI.TabBarItem.prototype.set hidden): Added.
(WI.TabBarItem.prototype.set representedObject): Deleted.
(WI.TabBarItem.prototype.get isDefaultTab): Deleted.
(WI.TabBarItem.prototype.set isDefaultTab): Deleted.
* UserInterface/Views/GeneralTabBarItem.js:
(WI.GeneralTabBarItem.fromTabContentView): Added.
(WI.GeneralTabBarItem.fromTabInfo): Deleted.
* UserInterface/Views/PinnedTabBarItem.js:
(WI.PinnedTabBarItem):
(WI.PinnedTabBarItem.fromTabContentView): Added.
(WI.PinnedTabBarItem.titleDidChange):
(WI.PinnedTabBarItem.fromTabInfo): Deleted.
(WI.PinnedTabBarItem.prototype.titleDidChange): Deleted.
(WI.PinnedTabBarItem.prototype._handleContextMenuEvent): Deleted.
Simplify how tab bar items are created.

* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar.prototype.get sizesToFit):
(WI.NavigationBar.prototype.addNavigationItem):
(WI.NavigationBar.prototype.insertNavigationItem):
* UserInterface/Views/SizesToFitNavigationBar.js: Removed.
* UserInterface/Views/Sidebar.js:
(WI.Sidebar):
Support marking `sizesToFit` during construction, instead of having to make a subclass.

* UserInterface/Views/ButtonNavigationItem.js:
(WI.ButtonNavigationItem):
(WI.ButtonNavigationItem.prototype.get imageType): Added.
(WI.ButtonNavigationItem.prototype.set imageType): Added.
(WI.ButtonNavigationItem.prototype._update):
* UserInterface/Views/ButtonNavigationItem.css:
(.tab-bar > .navigation-bar .item.button.image-and-text > span): Added.
(.navigation-bar .item.button > img): Added.
(.navigation-bar .item.button.disabled > img): Added.
(body:matches(.window-inactive, .window-docked-inactive) .navigation-bar .item.button > img): Added.
(body:matches(.window-inactive, .window-docked-inactive) .navigation-bar .item.button.disabled > img): Added.
(@media (prefers-color-scheme: dark) .navigation-bar .item.button.disabled > img): Added.
Allow `WI.ButtonNavigationItem` to use an `<img>` instead of an `<svg>` for it's image. This
is to work around a compositing bug <https://webkit.org/b/207022>.

* UserInterface/Views/GroupNavigationItem.js:
(WI.GroupNavigationItem.prototype.get hidden): Added.
(WI.GroupNavigationItem.prototype.set hidden): Added.
(WI.GroupNavigationItem.prototype.get additionalClassNames): Added.
Add a special case where this item is considered `hidden` if all sub-items are also `hidden`.

* UserInterface/Views/Variables.css:
(:root):
(body:matches(.window-inactive, .window-docked-inactive)): Added.
(body:matches(.window-inactive, .window-docked-inactive) *): Added.
(body:not(.docked)): Added.
(@media (prefers-color-scheme: dark) :root):
(@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive)): Added.
(@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive) *): Added.
(body.window-inactive): Deleted.
(body.window-inactive *): Deleted.
(@media (prefers-color-scheme: dark) body.window-inactive): Deleted.
(@media (prefers-color-scheme: dark) body.window-inactive *): Deleted.
Replace `--toolbar-height` with `--undocked-title-area-height`, which is set when docked.

* UserInterface/Views/DividerNavigationItem.css:
(.navigation-bar .item.divider):
(@media (prefers-color-scheme: dark)):
Simplify the CSS in order to better support being used in the tab bar.

* UserInterface/Views/FlexibleSpaceNavigationItem.css:
(.navigation-bar .item.flexible-space):
(.navigation-bar .item.flexible-space.align-start > .item):
(.navigation-bar .item.flexible-space.align-end > .item):
(:matches(.navigation-bar, .toolbar) .item.flexible-space): Deleted.
(:matches(.navigation-bar, .toolbar) .item.flexible-space.align-start > .item): Deleted.
(:matches(.navigation-bar, .toolbar) .item.flexible-space.align-end > .item): Deleted.
Remove toolbar styles.

* UserInterface/Controllers/ConsoleManager.js:
(WI.ConsoleManager):
(WI.ConsoleManager.prototype.get warningCount): Added.
(WI.ConsoleManager.prototype.get errorCount): Added.
(WI.ConsoleManager.prototype.messageWasAdded):
(WI.ConsoleManager.prototype.messagesCleared):
(WI.ConsoleManager.prototype.messageRepeatCountUpdated):
(WI.ConsoleManager.prototype._incrementMessageLevelCount): Added.
(WI.ConsoleManager.prototype._delayedMessagesCleared):
Keep track of the count of warnings and errors so that they can be used to determine when to
show Console button navigation items in the tab bar.

* UserInterface/Views/DOMTreeContentView.css:
(body:not(.window-inactive, .window-docked-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint): Added.
(body:not(.window-inactive, .window-docked-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Added.
(body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint): Deleted.
(body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Deleted.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
(body:matches(.window-inactive, .window-docked-inactive) .timeline-overview-graph.rendering-frame > .frame-marker): Added.
(body.window-inactive .timeline-overview-graph.rendering-frame > .frame-marker): Deleted.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > .tree-outline.timelines .item.selected + .item, body:matches(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines .item.selected + .item): Added.
(@media (prefers-color-scheme: dark) .timeline-overview > .tree-outline.timelines .item.selected + .item, body:matches(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines .item.selected + .item): Added.
(.timeline-overview > .tree-outline.timelines .item.selected + .item, body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
(@media (prefers-color-scheme: dark) .timeline-overview > .tree-outline.timelines .item.selected + .item, body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
* UserInterface/Views/TimelineRecordFrame.css:
(body:matches(.window-inactive, .window-docked-inactive) .timeline-record-frame.selected): Added.
(body.window-inactive .timeline-record-frame.selected): Deleted.
* UserInterface/Views/TimelineRuler.css:
(body:matches(.window-inactive, .window-docked-inactive) .timeline-ruler > .header > .divider): Added.
(body.window-inactive .timeline-ruler > .header > .divider): Deleted.
Add selectors for `.window-docked-inactive` everywhere that `.window-inactive` exists.

* UserInterface/Base/Setting.js:
Remove new tab bar experimental setting.

* UserInterface/Debug/Bootstrap.js:
(WI.runBootstrapOperations):
(WI.runBootstrapOperations.applyDumpMessagesState):
(WI.runBootstrapOperations.updateDebugUI):

* UserInterface/Images/Origin.svg:
Add `id="root"` so this can be used with `WI.ImageUtilities.useSVGSymbol`.

* UserInterface/Main.html:
* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Views/ActivateButtonToolbarItem.js: Removed.
* UserInterface/Views/ButtonToolbarItem.js: Removed.
* UserInterface/Views/ButtonToolbarItem.css: Removed.
* UserInterface/Views/ControlToolbarItem.js: Removed.
* UserInterface/Views/ControlToolbarItem.css: Removed.
* UserInterface/Views/Toolbar.js: Removed.
* UserInterface/Views/Toolbar.css: Removed.
Remove toolbar related code now that it has been merged into the tab bar.

* UserInterface/Models/DebuggerDashboard.js: Removed.
* UserInterface/Models/DefaultDashboard.js: Removed.
* UserInterface/Views/DashboardContainerView.js: Removed.
* UserInterface/Views/DashboardContainerView.css: Removed.
* UserInterface/Views/DashboardView.js: Removed.
* UserInterface/Views/DebuggerDashboardView.js: Removed.
* UserInterface/Views/DebuggerDashboardView.css: Removed.
* UserInterface/Views/DefaultDashboardView.js: Removed.
* UserInterface/Views/DefaultDashboardView.css: Removed.
Remove dashboard related code now that it has been merged into the tab bar.

* UserInterface/Views/LegacyTabBar.js: Removed.
* UserInterface/Views/NewTabContentView.js: Removed.
* UserInterface/Views/NewTabContentView.css: Removed.
* UserInterface/Images/NewTab.svg: Removed.
* UserInterface/Images/NewTabPlus.svg: Removed.
* UserInterface/Images/SearchResults.svg: Removed.
Remove the lebacy tab bar in favor of the new tab bar.

Source/WebKit:

Now that there is no toolbar area, there is nothing obstructing the ability for the window
to be moved around when dragging via the title bar area. As such, we can remove the unused
`InspectorFrontendHost` APIs.

* WebProcess/Inspector/WebInspectorUI.h:
* WebProcess/Inspector/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::startWindowDrag): Deleted.
(WebKit::WebInspectorUI::moveWindowBy): Deleted.
* UIProcess/Inspector/WebInspectorProxy.messages.in:
* UIProcess/Inspector/WebInspectorProxy.h:
* UIProcess/Inspector/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::startWindowDrag): Deleted.
(WebKit::WebInspectorProxy::platformStartWindowDrag): Deleted.
* UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformStartWindowDrag): Deleted.
* UIProcess/Inspector/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformStartWindowDrag): Deleted.
* UIProcess/Inspector/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformStartWindowDrag): Deleted.
* UIProcess/Inspector/wpe/WebInspectorProxyWPE.cpp:
(WebKit::WebInspectorProxy::platformStartWindowDrag): Deleted.

* WebProcess/Inspector/RemoteWebInspectorUI.h:
* WebProcess/Inspector/RemoteWebInspectorUI.cpp:
(WebKit::RemoteWebInspectorUI::startWindowDrag): Deleted.
(WebKit::RemoteWebInspectorUI::moveWindowBy): Deleted.
* UIProcess/Inspector/RemoteWebInspectorProxy.messages.in:
* UIProcess/Inspector/RemoteWebInspectorProxy.cpp:
* UIProcess/Inspector/RemoteWebInspectorProxy.h:
(WebKit::RemoteWebInspectorProxy::startWindowDrag): Deleted.
(WebKit::RemoteWebInspectorProxy::platformStartWindowDrag): Deleted.
* UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp:
(WebKit::RemoteWebInspectorProxy::platformStartWindowDrag): Deleted.
* UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm:
(WebKit::RemoteWebInspectorProxy::platformStartWindowDrag): Deleted.
* UIProcess/Inspector/win/RemoteWebInspectorProxyWin.cpp:
(WebKit::RemoteWebInspectorProxy::platformStartWindowDrag): Deleted.

Source/WebKitLegacy/ios:

Now that there is no toolbar area, there is nothing obstructing the ability for the window
to be moved around when dragging via the title bar area. As such, we can remove the unused
`InspectorFrontendHost` APIs.

* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorFrontendClient::startWindowDrag): Deleted.

Source/WebKitLegacy/mac:

Now that there is no toolbar area, there is nothing obstructing the ability for the window
to be moved around when dragging via the title bar area. As such, we can remove the unused
`InspectorFrontendHost` APIs.

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::startWindowDrag): Deleted.

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

7 months agofast/events/touch/ios/long-press-on-link.html consistently times out after r254699
wenson_hsieh@apple.com [Sun, 2 Feb 2020 00:56:13 +0000 (00:56 +0000)]
fast/events/touch/ios/long-press-on-link.html consistently times out after r254699
https://bugs.webkit.org/show_bug.cgi?id=207095

Reviewed by Darin Adler.

After <https://trac.webkit.org/r254699>, tests that end without causing presented view controllers to dismiss
will always cause the subsequent test to time out. This happens all the time with the layout test
fast/events/touch/ios/long-press-on-link.html, which runs after fast/events/touch/ios/long-press-on-image.html;
both of these tests long press previewable elements to present a context menu, but don't attempt to dismiss
these previews.

Address this by tapping at the web view's origin after ending the long press gesture, which causes the preview
view controllers that were presented by the test to dismiss.

* fast/events/touch/ios/long-press-on-image-expected.txt:
* fast/events/touch/ios/long-press-on-image.html:
* fast/events/touch/ios/long-press-on-link-expected.txt:
* fast/events/touch/ios/long-press-on-link.html:

Modernize these layout tests by adopting helper methods for driving interaction (instead of directly using
testRunner.runUIScript). Also, use the testing helpers in `js-test.js`, and add descriptions to each test.

* resources/ui-helper.js:
(window.UIHelper.longPressAndGetContextMenuContentAt.return.new.Promise):
(window.UIHelper.longPressAndGetContextMenuContentAt):

Make this resolve the promise to a parsed JSON object instead of a JSON string. Currently, the result is a JSON
string that is parsed at each call site.

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

7 months agoNon-alphabetical \c escapes should be syntax errors in Unicode patterns only
shvaikalesh@gmail.com [Sun, 2 Feb 2020 00:20:04 +0000 (00:20 +0000)]
Non-alphabetical \c escapes should be syntax errors in Unicode patterns only
https://bugs.webkit.org/show_bug.cgi?id=207091

Reviewed by Darin Adler.

JSTests:

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

Source/JavaScriptCore:

This change adds SyntaxError for non-alphabetical and identity \c escapes
in Unicode patterns, aligning JSC with V8 and SpiderMonkey.

Grammar: https://tc39.es/ecma262/#prod-annexB-ClassEscape
(/u flag precludes the use of ClassControlLetter)

* yarr/YarrErrorCode.cpp:
(JSC::Yarr::errorMessage):
(JSC::Yarr::errorToThrow):
* yarr/YarrErrorCode.h:
* yarr/YarrParser.h:
(JSC::Yarr::Parser::parseEscape):

LayoutTests:

* js/regexp-unicode-expected.txt:
* js/script-tests/regexp-unicode.js:

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

7 months agoClosing a MiniBrowser WK2 window does not release the WKWebView
simon.fraser@apple.com [Sat, 1 Feb 2020 22:26:34 +0000 (22:26 +0000)]
Closing a MiniBrowser WK2 window does not release the WKWebView
https://bugs.webkit.org/show_bug.cgi?id=203185

Reviewed by Wenson Hsieh.

Use a weak WKWebView reference in the _textFinder.hideInterfaceCallback() block
to avoid a retain cycle that keeps the window controller and WKWebView alive.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):

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

7 months ago[JSC] Hold StructureID instead of Structure* in PolyProtoAccessChain and DFG::CommonData
ysuzuki@apple.com [Sat, 1 Feb 2020 06:18:18 +0000 (06:18 +0000)]
[JSC] Hold StructureID instead of Structure* in PolyProtoAccessChain and DFG::CommonData
https://bugs.webkit.org/show_bug.cgi?id=207086

Reviewed by Mark Lam.

PolyProtoAccessChain and DFG::CommonData are kept alive so long as associated AccessCase / DFG/FTL CodeBlock
is alive. They hold Vector<Structure*> / Vector<WriteBarrier<Structure*>>, but access frequency is low. And
We should hold Vector<StructureID> instead to cut 50% of the size.

* bytecode/AccessCase.cpp:
(JSC::AccessCase::commit):
(JSC::AccessCase::forEachDependentCell const):
(JSC::AccessCase::doesCalls const):
(JSC::AccessCase::visitWeak const):
(JSC::AccessCase::propagateTransitions const):
(JSC::AccessCase::generateWithGuard):
* bytecode/AccessCase.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
(JSC::CodeBlock::stronglyVisitWeakReferences):
* bytecode/GetByStatus.cpp:
(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):
* bytecode/InByIdStatus.cpp:
(JSC::InByIdStatus::computeFor):
(JSC::InByIdStatus::computeForStubInfo):
(JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
* bytecode/InByIdStatus.h:
* bytecode/InstanceOfStatus.cpp:
(JSC::InstanceOfStatus::computeFor):
(JSC::InstanceOfStatus::computeForStubInfo):
* bytecode/InstanceOfStatus.h:
* bytecode/PolyProtoAccessChain.cpp:
(JSC::PolyProtoAccessChain::create):
(JSC::PolyProtoAccessChain::needImpurePropertyWatchpoint const):
(JSC::PolyProtoAccessChain::dump const):
* bytecode/PolyProtoAccessChain.h:
(JSC::PolyProtoAccessChain::chain const):
(JSC::PolyProtoAccessChain::forEach const):
(JSC::PolyProtoAccessChain::slotBaseStructure const):
(JSC::PolyProtoAccessChain:: const): Deleted.
* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::regenerate):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeForStubInfo):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::summary const):
(JSC::StructureStubInfo::summary):
* bytecode/StructureStubInfo.h:
* dfg/DFGCommonData.h:
* dfg/DFGDesiredWeakReferences.cpp:
(JSC::DFG::DesiredWeakReferences::reallyAdd):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
* jit/Repatch.cpp:
(JSC::tryCacheGetBy):
(JSC::tryCachePutByID):
(JSC::tryCacheInByID):

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

7 months ago[JSC] ShrinkToFit some vectors kept by JIT data structures
ysuzuki@apple.com [Sat, 1 Feb 2020 05:22:47 +0000 (05:22 +0000)]
[JSC] ShrinkToFit some vectors kept by JIT data structures
https://bugs.webkit.org/show_bug.cgi?id=207085

Reviewed by Mark Lam.

1. We are allocating RareCaseProfile by using SegmentedVector since JIT code is directly accessing to RareCaseProfile*. But when creating RareCaseProfile, we can know
   how many RareCaseProfiles should we create: RareCaseProfile is created per slow paths of Baseline JIT bytecode. Since we already scan bytecode for the main paths,
   we can count it and use this number when creating RareCaseProfile.
2. Vectors held by PolymorphicAccess and PolymorphicCallStubRoutine should be kept small by calling shrinkToFit.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setRareCaseProfiles):
(JSC::CodeBlock::shrinkToFit):
(JSC::CodeBlock::addRareCaseProfile): Deleted.
* bytecode/CodeBlock.h:
* bytecode/PolyProtoAccessChain.cpp:
(JSC::PolyProtoAccessChain::create):
* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::regenerate):
* bytecode/ValueProfile.h:
(JSC::RareCaseProfile::RareCaseProfile):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):

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

7 months ago[JSC] DFG::CommonData::shrinkToFit called before DFG::Plan::reallyAdd is called
ysuzuki@apple.com [Sat, 1 Feb 2020 03:36:42 +0000 (03:36 +0000)]
[JSC] DFG::CommonData::shrinkToFit called before DFG::Plan::reallyAdd is called
https://bugs.webkit.org/show_bug.cgi?id=207083

Reviewed by Mark Lam.

We are calling DFG::CommonData::shrinkToFit, but calling this too early: we execute
DFG::Plan::reallyAdd(DFG::CommonData*) after that, and this adds many entries to
DFG::CommonData*. We should call DFG::CommonData::shrinkToFit after calling DFG::Plan::reallyAdd.

To implement it, we make DFG::JITCode::shrinkToFit virtual function in JSC::JITCode. Then, we
can also implement FTL::JITCode::shrinkToFit which was previously not implemented.

* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::shrinkToFit):
* dfg/DFGJITCode.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::shrinkToFit):
* ftl/FTLJITCode.h:
* jit/JITCode.cpp:
(JSC::JITCode::shrinkToFit):
* jit/JITCode.h:

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

7 months agoGetButterfly should check if the input value is an object in safe to execute
sbarati@apple.com [Sat, 1 Feb 2020 02:09:42 +0000 (02:09 +0000)]
GetButterfly should check if the input value is an object in safe to execute
https://bugs.webkit.org/show_bug.cgi?id=207082

Reviewed by Mark Lam.

We can only hoist GetButterfly when we know the incoming value is an object.
We might want to reconsider making GetButterfly use ObjectUse as its edge
kind, but that's out of the scope of this patch. Currently, we use CellUse
for GetButterfly node's child1.

* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):

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

7 months agosafe to execute should return false when we know code won't be moved
sbarati@apple.com [Sat, 1 Feb 2020 01:47:42 +0000 (01:47 +0000)]
safe to execute should return false when we know code won't be moved
https://bugs.webkit.org/show_bug.cgi?id=207074

Reviewed by Yusuke Suzuki.

We use safeToExecute to determine inside LICM whether it's safe to execute
a node somewhere else in the program. We were returning true for nodes
we knew would never be moved, because they were effectful. Things like Call
and GetById. This patch makes those nodes return false now, since we want
to make it easier to audit the nodes that return true. This makes that audit
easier, since it gets rid of the obvious things that will never be hoisted.

* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):

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

7 months agoFlaky Test: imported/w3c/web-platform-tests/websockets/cookies/007.html
tsavell@apple.com [Sat, 1 Feb 2020 00:50:34 +0000 (00:50 +0000)]
Flaky Test: imported/w3c/web-platform-tests/websockets/cookies/007.html
https://bugs.webkit.org/show_bug.cgi?id=206484

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-01-31

* platform/mac/TestExpectations:

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

7 months agoREGRESSION(r252185): NetworkSessionCocoa cancels downloads that receive authenticatio...
david_quesada@apple.com [Sat, 1 Feb 2020 00:47:57 +0000 (00:47 +0000)]
REGRESSION(r252185): NetworkSessionCocoa cancels downloads that receive authentication challenges
https://bugs.webkit.org/show_bug.cgi?id=206984
rdar://problem/58999654

Reviewed by Brady Eidson.

Source/WebKit:

r252185 changed the early return in WKNetworkSessionDelegate's -...task:didReceiveChallenge:... method
from "cancel the task and return early if self has no _session" to "cancel the task and return early
if we can't determine the network session for the given data task". When this method is called for
an NSURLSessionDownloadTask, this early return is hit because there is no NetworkDataTaskCocoa
for an active download. As a result, the download is canceled when it might have otherwise been able
to proceed.

Fix this by adding a code path to fetch the NetworkSession associated with the Download when an
NSURLSessionDownloadTask receives an authentication challenge. This ensures we can actually handle
the challenge appropriately and not just cancel the task.

* NetworkProcess/Downloads/Download.h:
(WebKit::Download::sessionID const):
    Expose the session ID so we can use it to look up the NetworkSession for a Download.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
    Remove an unnecessary redeclaration of networkDataTask, and also an unneeded assertion that
    networkDataTask != nullptr. Even if this is the case, the code that eventually handles this
    task will null check it and handle the challenge as a websocket task or download task
    based on the taskIdentifier.

Tools:

Add an API test for a resumed download that receives an authentication challenge. The download
delegate should be asked to handle the challenge, and the download should be able to finish.

* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
(-[DownloadCancelingDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]):
(-[DownloadCancelingDelegate _download:didReceiveData:]):
(-[DownloadCancelingDelegate _downloadDidCancel:]):
(-[AuthenticationChallengeHandlingDelegate _download:didReceiveAuthenticationChallenge:completionHandler:]):
(-[AuthenticationChallengeHandlingDelegate _downloadDidFinish:]):
(TEST):

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

7 months agoAdd support for specifying background colors when setting marked text
wenson_hsieh@apple.com [Sat, 1 Feb 2020 00:44:07 +0000 (00:44 +0000)]
Add support for specifying background colors when setting marked text
https://bugs.webkit.org/show_bug.cgi?id=207065
<rdar://problem/57876140>

Reviewed by Tim Horton.

Source/WebCore:

Add support for rendering custom highlights (background colors) behind marked text in WebCore. To do this, we
plumb a Vector of CompositionHighlights alongside the Vector of CompositionUnderlines to Editor. At paint time,
we then consult this highlight data to determine which ranges of text in the composition should paint using
custom background colors.

Note that in the future, we should consider refactoring both composition underlines and highlights to use the
MarkedText mechanism for decorating ranges of text instead.

Test: editing/input/composition-highlights.html

* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* editing/CompositionHighlight.h: Added.
(WebCore::CompositionHighlight::CompositionHighlight):
(WebCore::CompositionHighlight::encode const):
(WebCore::CompositionHighlight::decode):

Add CompositionHighlight, which represents a range in the composition that should be highlighted with a given
background color.

* editing/Editor.cpp:
(WebCore::Editor::clear):
(WebCore::Editor::setComposition):

Add logic for clearing and updating m_customCompositionHighlights.

* editing/Editor.h:
(WebCore::Editor::compositionUsesCustomHighlights const):
(WebCore::Editor::customCompositionHighlights const):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintCompositionBackground):

If custom composition highlights are given, use those when painting the composition background; otherwise,
default to painting the entire composition range using `Color::compositionFill`.

Source/WebCore/PAL:

Add an SPI soft-linking declaration for NSMarkedClauseSegmentAttributeName.

* pal/spi/cocoa/NSAttributedStringSPI.h:

Source/WebKit:

Implement -setAttributedMarkedText:selectedRange: on WKContentView, and have it extract highlight color
information from the given attributed string. Plumb this through to the web process by serializing and
deserializing `WebCore::CompositionHighlight`s.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::setMarkedText):
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(compositionHighlights):

For each marked text clause, grab the specified background color (defaulting to Color::compositionFill) and use
it to create a list of CompositionHighlights.

(-[WKContentView setAttributedMarkedText:selectedRange:]):
(-[WKContentView setMarkedText:selectedRange:]):
(-[WKContentView _setMarkedText:highlights:selectedRange:]):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetComposition):

Add testing support for specifying highlight ranges when setting marked text.

* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp:
(WebKit::WebEditorClient::didDispatchInputMethodKeydown):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setCompositionForTesting):
(WebKit::WebPage::setCompositionAsync):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Source/WebKitLegacy/mac:

Adjust some call sites of Editor::setComposition().

* WebView/WebFrame.mm:
(-[WebFrame setMarkedText:selectedRange:]):
(-[WebFrame setMarkedText:forCandidates:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView setMarkedText:selectedRange:]):

Source/WebKitLegacy/win:

Adjust some call sites of Editor::setComposition().

* WebView.cpp:
(WebView::onIMEComposition):
(WebView::setCompositionForTesting):

Tools:

Add support in WebKitTestRunner for specifying a list of highlight ranges when setting marked text. This comes
in the form of an additional argument to TextInputController::setMarkedText, which contains an array of objects,
each describing one range (in the composition) to highlight.

* DumpRenderTree/ios/TextInputControllerIOS.m:
(+[TextInputController isSelectorExcludedFromWebScript:]):
(+[TextInputController webScriptNameForSelector:]):
(-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:highlights:]):
(-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:]): Deleted.
* DumpRenderTree/mac/TextInputControllerMac.m:
(+[TextInputController isSelectorExcludedFromWebScript:]):
(+[TextInputController webScriptNameForSelector:]):
(-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:highlights:]):
(-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:]): Deleted.
* WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl:
* WebKitTestRunner/InjectedBundle/TextInputController.cpp:
(WTR::arrayLength):
(WTR::createCompositionHighlightData):

Add logic to convert a given JSObject containing the composition highlight information into a WKArrayRef, which
is then passed into WebKit via WKBundlePageSetComposition.

(WTR::TextInputController::setMarkedText):
* WebKitTestRunner/InjectedBundle/TextInputController.h:

LayoutTests:

Add a test to check that highlighting different parts of a composition range results in the same behavior as
applying background colors using CSS. This test is currently only supported in WebKit2.

* TestExpectations:
* editing/input/composition-highlights-expected.html: Added.
* editing/input/composition-highlights.html: Added.
* platform/wk2/TestExpectations:

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

7 months ago[WebGL] Revert logging added to investigate 205757
justin_fan@apple.com [Sat, 1 Feb 2020 00:23:20 +0000 (00:23 +0000)]
[WebGL] Revert logging added to investigate 205757
https://bugs.webkit.org/show_bug.cgi?id=207076

Unreviewed.

Revert https://trac.webkit.org/changeset/255468.

Source/WebCore:

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::bindTexture):
(WebCore::WebGLRenderingContextBase::createTexture):
(WebCore::WebGLRenderingContextBase::getError):
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::texImage2D):
* platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:
(WebCore::GraphicsContextGLOpenGL::texImage2D):
* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
(WebCore::GraphicsContextGLOpenGL::bindTexture):
(WebCore::GraphicsContextGLOpenGL::getError):
(WebCore::GraphicsContextGLOpenGL::texSubImage2D):
(WebCore::GraphicsContextGLOpenGL::createTexture):

LayoutTests:

* TestExpectations:

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

7 months ago[ macOS wk2 ] webgpu/whlsl/textures-sample-level.html is flaky failing
tsavell@apple.com [Sat, 1 Feb 2020 00:14:35 +0000 (00:14 +0000)]
[ macOS wk2 ] webgpu/whlsl/textures-sample-level.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207078

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-01-31

* platform/mac-wk2/TestExpectations:

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

7 months agoUnreviewed. Don't dump disassembly in test.
sbarati@apple.com [Sat, 1 Feb 2020 00:11:09 +0000 (00:11 +0000)]
Unreviewed. Don't dump disassembly in test.

* stress/get-getter-setter-by-offset-not-always-safe-to-execute.js:

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

7 months agoGetGetterSetterByOffset and GetGetter/GetSetter are not always safe to execute
sbarati@apple.com [Sat, 1 Feb 2020 00:06:51 +0000 (00:06 +0000)]
GetGetterSetterByOffset and GetGetter/GetSetter are not always safe to execute
https://bugs.webkit.org/show_bug.cgi?id=206805
<rdar://problem/58898161>

Reviewed by Yusuke Suzuki.

JSTests:

* stress/get-getter-setter-by-offset-not-always-safe-to-execute.js: Added.

Source/JavaScriptCore:

This patch fixes two bugs. The first is GetGetterSetterByOffset. Previously,
we were just checking that we could load the value safely. However, because
GetGetterSetterByOffset returns a GetterSetter object, we can only safely
move this node into a context where it's guaranteed that the offset loaded
will return a GetterSetter.

The second fix is GetGetter/GetSetter were both always marked as safe to execute.
However, they're only safe to execute when the incoming value to load from
is a GetterSetter object.

* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):

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

7 months agoUnreviewed build fix after r255522.
aestes@apple.com [Fri, 31 Jan 2020 23:56:22 +0000 (23:56 +0000)]
Unreviewed build fix after r255522.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
Switched to a C-style cast.

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

7 months ago [ Mac wk2 ] tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with...
tsavell@apple.com [Fri, 31 Jan 2020 23:31:13 +0000 (23:31 +0000)]
   [ Mac wk2 ] tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=206940

Also is happening on release so I updated the expectation to reflect that.

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-01-31

* platform/mac-wk2/TestExpectations:

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

7 months ago[ iOS Debug wk2 ] animations/keyframe-autoclose-brace.html is flaky crashing.
tsavell@apple.com [Fri, 31 Jan 2020 23:25:08 +0000 (23:25 +0000)]
[ iOS Debug wk2 ] animations/keyframe-autoclose-brace.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=207071

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-01-31

* platform/ipad/TestExpectations:

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

7 months ago[ Mac wk1 ] fast/images/animated-gif-restored-from-bfcache.html is a flaky failure
tsavell@apple.com [Fri, 31 Jan 2020 23:23:59 +0000 (23:23 +0000)]
[ Mac wk1 ] fast/images/animated-gif-restored-from-bfcache.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=206950

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-01-31

* platform/mac-wk1/TestExpectations:

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

7 months agoAdd KVO SPI WKWebView._negotiatedLegacyTLS
commit-queue@webkit.org [Fri, 31 Jan 2020 23:16:47 +0000 (23:16 +0000)]
Add KVO SPI WKWebView._negotiatedLegacyTLS
https://bugs.webkit.org/show_bug.cgi?id=207067

Patch by Alex Christensen <achristensen@webkit.org> on 2020-01-31
Reviewed by Andy Estes.

Source/WebKit:

Covered by API tests.

* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::negotiatedLegacyTLS const):
* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTaskClient::negotiatedLegacyTLS const):
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::negotiatedLegacyTLS const):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::negotiatedLegacyTLS const):
* Shared/Authentication/AuthenticationManager.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _negotiatedLegacyTLS]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeNegotiatedLegacyTLS):
(WebKit::NavigationState::didChangeNegotiatedLegacyTLS):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::negotiatedLegacyTLS):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::commitChanges):
(WebKit::PageLoadState::hasNegotiatedLegacyTLS const):
(WebKit::PageLoadState::negotiatedLegacyTLS):
(WebKit::PageLoadState::didCommitLoad):
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::Observer::willChangeNegotiatedLegacyTLS):
(WebKit::PageLoadState::Observer::didChangeNegotiatedLegacyTLS):
(WebKit::PageLoadState::Data::Data): Deleted.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:
(-[TLSObserver observeValueForKeyPath:ofObject:change:context:]):
(-[TLSObserver waitUntilNegotiatedLegacyTLSChanged]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/config.h:

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

7 months ago[ macOS wk1 ] editing/execCommand/insert-nested-lists.html is flaky failing
tsavell@apple.com [Fri, 31 Jan 2020 21:25:12 +0000 (21:25 +0000)]
[ macOS wk1 ] editing/execCommand/insert-nested-lists.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207066

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-01-31

* platform/mac-wk1/TestExpectations:

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

7 months agoUnreviewed macOS build fix after r255518
cdumez@apple.com [Fri, 31 Jan 2020 21:05:37 +0000 (21:05 +0000)]
Unreviewed macOS build fix after r255518

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleGestureEvent):

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

7 months ago[ iOS ] imported/w3c/web-platform-tests/IndexedDB/key-generators/reading-autoincremen...
cdumez@apple.com [Fri, 31 Jan 2020 20:58:43 +0000 (20:58 +0000)]
[ iOS ] imported/w3c/web-platform-tests/IndexedDB/key-generators/reading-autoincrement-indexes-cursors.any.serviceworker.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=206934
<rdar://problem/58991581>

Source/WebKit:

Reviewed by Brady Eidson.

Flakiness would happen when the service worker would take too long to launch and the responsiveness timer would fire and
report the process as unresponsive while still launching or very shortly after. When a service worker is reported as
unresponsive, we would kill it.

To address the issue, several changes were made:
- Responsiveness checks are now disabled for slow builds (Debug, ASAN, GuardMalloc)
- We only start the ResponsivenessTimer after the process has finished launching since the responsiveness
  check relies on IPC to the process and we cannot send the IPC until after the process has launched.

* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::sendUpdateBackingStoreState):
* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::goToBackForwardItem):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::launchProcessForReload):
(WebKit::WebPageProxy::launchProcessWithItem):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::loadWebArchiveData):
(WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::processNextQueuedMouseEvent):
(WebKit::WebPageProxy::handleKeyboardEvent):
(WebKit::WebPageProxy::handleGestureEvent):
(WebKit::WebPageProxy::handlePreventableTouchEvent):
(WebKit::WebPageProxy::handleTouchEvent):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::mayBecomeUnresponsive):
(WebKit::WebProcessProxy::didFinishLaunching):
(WebKit::WebProcessProxy::startResponsivenessTimer):
(WebKit::WebProcessProxy::isResponsive):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::responsivenessTimer):

LayoutTests:

Unskip test which should no longer be flaky.

* platform/ios-wk2/TestExpectations:

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