WebKit-https.git
18 months agoFix bug in testMulImm32SignExtend
keith_miller@apple.com [Thu, 1 Aug 2019 21:30:39 +0000 (21:30 +0000)]
Fix bug in testMulImm32SignExtend
https://bugs.webkit.org/show_bug.cgi?id=200358

Reviewed by Mark Lam.

Also, have it run in more configurations.

* b3/testb3_2.cpp:
(testMulImm32SignExtend):
* b3/testb3_3.cpp:
(addArgTests):

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

18 months agoREGRESSION: HSBC Personal Banking download/print dialog is usually positioned off...
timothy_horton@apple.com [Thu, 1 Aug 2019 20:23:43 +0000 (20:23 +0000)]
REGRESSION: HSBC Personal Banking download/print dialog is usually positioned off screen on iPad
https://bugs.webkit.org/show_bug.cgi?id=200356
<rdar://problem/51885199>

Reviewed by Beth Dakin.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::desktopClassBrowsingRecommendedForRequest):
Add HSBC domains to the list of sites that recommend mobile mode by default.

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

18 months agoCrash under WebProcessProxy::didBecomeUnresponsive()
cdumez@apple.com [Thu, 1 Aug 2019 19:53:19 +0000 (19:53 +0000)]
Crash under WebProcessProxy::didBecomeUnresponsive()
https://bugs.webkit.org/show_bug.cgi?id=200346
<rdar://problem/53795984>

Reviewed by Geoffrey Garen.

Make sure the BackgroundProcessResponsivenessTimer / ResponsivenessTimer ref their client
while they call mayBecomeUnresponsive() / willChangeIsResponsive() / didChangeIsResponsive()
/ didBecomeUnresponsive() on their client, in case calling one of these ends up destroying
the client.

* UIProcess/BackgroundProcessResponsivenessTimer.cpp:
(WebKit::BackgroundProcessResponsivenessTimer::setResponsive):
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::timerFired):
* UIProcess/ResponsivenessTimer.h:
* UIProcess/WebProcessProxy.h:

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

18 months agoInitialize memory pressure flag in MemoryPressureHandler
pvollan@apple.com [Thu, 1 Aug 2019 19:43:10 +0000 (19:43 +0000)]
Initialize memory pressure flag in MemoryPressureHandler
https://bugs.webkit.org/show_bug.cgi?id=200353

Reviewed by Geoffrey Garen.

The flag 'm_underMemoryPressure' in MemoryPressureHandler should be initialized to 'false'.

* wtf/MemoryPressureHandler.h:

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

18 months agoresults.webkit.org: Collision detection for dots is off by 2 * dotMargin
commit-queue@webkit.org [Thu, 1 Aug 2019 19:43:02 +0000 (19:43 +0000)]
results.webkit.org: Collision detection for dots is off by 2 * dotMargin
https://bugs.webkit.org/show_bug.cgi?id=200347

Patch by Zhifei Fang <zhifei_fang@apple.com> on 2019-08-01
Reviewed by Jonathan Bedard.

* resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
(Timeline.CanvasSeriesComponent): Need to change it to dotMargin + radius other than use a fixed 3 * radius, which is for the old wide timeline

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

18 months agoImprove flakiness of SOAuthorizationRedirect tests
jiewen_tan@apple.com [Thu, 1 Aug 2019 19:32:59 +0000 (19:32 +0000)]
Improve flakiness of SOAuthorizationRedirect tests
https://bugs.webkit.org/show_bug.cgi?id=200320
<rdar://problem/53767057>

Reviewed by Alex Christensen.

This patch replaces Util::sleep(0.5) in tests that expect a SOAuthorization session to wait when the corresponding WKWebView
is out of the window with a more precise boolean indicator: navigationPolicyDecided. The new boolean indicator is working and
better because the authorizationPerformed should be set in the same runloop when NavigationState::decidePolicyForNavigationAction
is executed.

* TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(-[TestSOAuthorizationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(resetState):
(TestWebKitAPI::TEST):

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

18 months agoUpdate Test262 (2019.08.01)
ross.kirsling@sony.com [Thu, 1 Aug 2019 19:12:29 +0000 (19:12 +0000)]
Update Test262 (2019.08.01)
https://bugs.webkit.org/show_bug.cgi?id=200351

Reviewed by Keith Miller.

* test262/expectations.yaml:
* test262/harness/testIntl.js:
* test262/latest-changes-summary.txt:
* test262/test/:
* test262/test262-Revision.txt:

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

18 months agoAdd threading assertion to WeakPtr's operator->()
cdumez@apple.com [Thu, 1 Aug 2019 18:38:40 +0000 (18:38 +0000)]
Add threading assertion to WeakPtr's operator->()
https://bugs.webkit.org/show_bug.cgi?id=199922

Reviewed by Ryosuke Niwa.

Add threading assertion to WeakPtr's operator->() to make sure that the WeakPtr
always gets dereferenced on the same thread it was constructed on.

* wtf/WeakPtr.h:
(WTF::WeakPtrImpl::get):
(WTF::WeakPtrImpl::WeakPtrImpl):

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

18 months ago[Text autosizing] [iPadOS] Add targeted hacks to address some remaining text autosizi...
wenson_hsieh@apple.com [Thu, 1 Aug 2019 18:32:32 +0000 (18:32 +0000)]
[Text autosizing] [iPadOS] Add targeted hacks to address some remaining text autosizing issues
https://bugs.webkit.org/show_bug.cgi?id=200271
<rdar://problem/51734741>

Reviewed by Zalan Bujtas.

Source/WebCore:

Makes some targeted adjustments to the text autosizing heuristic, to ensure compatibility with several high-
profile websites. See changes below for more detail.

Tests:  fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidate-special-cases.html
        fast/text-autosizing/ios/idempotentmode/line-height-boosting.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):

Avoid clipped sidebar links on sohu.com by not performing line-height boosting in the case where the element
probably has a small, fixed number of lines. See below for more detail. Additionally, don't attempt to adjust
the line height using the boosted font size, in the case where the element is not a candidate for idempotent
text autosizing.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):

Make various targeted hacks to fix a few websites:

-   Add a special case for top navigation bar links on yandex.ru, where line height greatly exceeds the
    specified font size.

-   Avoid boosting some related video links on v.youku.com by considering the line-clamp CSS property when
    determining the maximum number of lines of text an element is expected to contain.

-   Avoid boosting some front page links on asahi.com, which have non-repeating background images.

-   Add several other adjustments to more aggressively boost pieces of text on Google search results, such as
    taking the `word-break` CSS property into account.

The bottom few pixels of sidebar links on naver.com are also no longer clipped after these changes.

* rendering/style/TextSizeAdjustment.cpp:
(WebCore::AutosizeStatus::probablyContainsASmallFixedNumberOfLines):

Pulls out a piece of the heuristic added to fix sephora.com in r247467 out into a separate helper method. To
recap, this heuristic identifies elements with both a fixed height and fixed line height, for which the fixed
height is close to an integer multiple of the line height.

Also makes several small tweaks in the process: (1) change the max difference between fixed line height and
font size from 6 to 5 to ensure that some multiline caption text on Google search results is boosted, and (2)
replace usages of `lineHeight()` with `specifiedLineHeight()`, which current prevents this function from being
truly idempotent.

(WebCore::AutosizeStatus::updateStatus):
* rendering/style/TextSizeAdjustment.h:

LayoutTests:

Add tests to cover some changes to line height boosting and the idempotent text autosizing candidate heuristic.

* fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidate-special-cases-expected.txt: Added.
* fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidate-special-cases.html: Added.
* fast/text-autosizing/ios/idempotentmode/line-height-boosting-expected.txt:
* fast/text-autosizing/ios/idempotentmode/line-height-boosting.html:

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

18 months agoRemoving expectations for tests that are now consistently passing
tsavell@apple.com [Thu, 1 Aug 2019 18:29:26 +0000 (18:29 +0000)]
Removing expectations for tests that are now consistently passing

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

18 months agoDashboard should defaults to first dashboard page when summary page is not available.
dewei_zhu@apple.com [Thu, 1 Aug 2019 18:02:45 +0000 (18:02 +0000)]
Dashboard should defaults to first dashboard page when summary page is not available.
https://bugs.webkit.org/show_bug.cgi?id=200180

Reviewed by Ryosuke Niwa.

Fix a bug that charts page will become the default when there is no summary page but there
is at least one dashboard page.

* public/v3/main.js: Charts page and analysis category page should not be considered as summay pages.
(main):

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

18 months agoUpdate TestWebKitAPI for XCBuild
krollin@apple.com [Thu, 1 Aug 2019 17:52:01 +0000 (17:52 +0000)]
Update TestWebKitAPI for XCBuild
https://bugs.webkit.org/show_bug.cgi?id=200311
<rdar://problem/53773804>

Reviewed by Alex Christensen.

Bug 199728 (svn 247402) updated TestWebKitAPI to use the unified-build
technique. Now update WebKitLegacy to build under XCBuild after those
changes. This work involves adding an "Apply Configuration to
XCFileLists" build target, adding a check-xcfilelists.sh script,
adding a "Check xcfilelists" build phase that calls that script,
adding knowledge of the project to the generate-xcfilelists script,
creating new .xcfilelist files, and adding those to the project.

* Scripts/webkitpy/generate_xcfilelists_lib/application.py:
(Application.__init__):
* Scripts/webkitpy/generate_xcfilelists_lib/generators.py:
(WebKitTestRunnerGenerator._get_generate_derived_sources_script):
(TestWebKitAPIGenerator):
(TestWebKitAPIGenerator._get_project_file_path):
(TestWebKitAPIGenerator._get_generate_unified_sources_script):
* TestWebKitAPI/Scripts/check-xcfilelists.sh: Added.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/UnifiedSources-output.xcfilelist: Added.

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

18 months agoRename DOMJIT safe/unsafeFunction to functionWithTypeChecks and functionWithoutTypeCh...
mark.lam@apple.com [Thu, 1 Aug 2019 17:13:51 +0000 (17:13 +0000)]
Rename DOMJIT safe/unsafeFunction to functionWithTypeChecks and functionWithoutTypeChecks.
https://bugs.webkit.org/show_bug.cgi?id=200323

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

The DOMJIT has a notion of a safeFunction and an unsafeFunction.  The safeFunction
is effectively the same as the unsafeFunction with added type check.  The DFG/FTL
will emit code to call the unsafeFunction if it has already emitted the needed
type check or proven that it isn't needed.  Otherwise, the DFG/FTL will emit
code to call the safeFunction (which does its own type check) instead.

This patch renames these functions to better describe their difference.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCallDOM):
* domjit/DOMJITSignature.h:
(JSC::DOMJIT::Signature::Signature):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOM):
* tools/JSDollarVM.cpp:
(JSC::DOMJITFunctionObject::functionWithTypeCheck):
(JSC::DOMJITFunctionObject::functionWithoutTypeCheck):
(JSC::DOMJITFunctionObject::finishCreation):
(JSC::DOMJITCheckSubClassObject::functionWithTypeCheck):
(JSC::DOMJITCheckSubClassObject::functionWithoutTypeCheck):
(JSC::DOMJITCheckSubClassObject::finishCreation):
(JSC::DOMJITFunctionObject::safeFunction): Deleted.
(JSC::DOMJITFunctionObject::unsafeFunction): Deleted.
(JSC::DOMJITCheckSubClassObject::safeFunction): Deleted.
(JSC::DOMJITCheckSubClassObject::unsafeFunction): Deleted.

Source/WebCore:

No new tests.  This is just a refactoring exercise.

* bindings/scripts/CodeGeneratorJS.pm:
(GetArgumentTypeForFunctionWithoutTypeCheck):
(GenerateImplementation):
(GenerateOperationDefinition):
(ToNativeForFunctionWithoutTypeCheck):
(GetUnsafeArgumentType): Deleted.
(UnsafeToNative): Deleted.
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetAttribute): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionItem): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionHasAttribute): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementById): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementsByName): Deleted.

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

18 months agoUserMediaPermissionRequestManagerProxy should not use audio+video denied requests...
youenn@apple.com [Thu, 1 Aug 2019 16:17:56 +0000 (16:17 +0000)]
UserMediaPermissionRequestManagerProxy should not use audio+video denied requests to deny audio-only or video-only requests
https://bugs.webkit.org/show_bug.cgi?id=200317

Reviewed by Eric Carlson.

Source/WebKit:

Only match audio+video denied requests with new audio+video requests.
That will ensure that audio can still be captured if user denied access to the camera through preferences
and website started with a getUserMedia({audio: true, video: true}) call.
Covered by added API test.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied):

Tools:

* TestWebKitAPI/Tests/WebKit/getUserMediaAudioVideoCapture.html: Added
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:
(-[GetUserMediaOnlyAudioUIDelegate _webView:requestMediaCaptureAuthorization:decisionHandler:]):
(-[GetUserMediaOnlyAudioUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(TestWebKitAPI::TEST):

LayoutTests:

Update existing test with new behavior.
Added new test for the case where video is blocked but not audio.

* fast/mediastream/getUserMedia-deny-persistency3-expected.txt:
* fast/mediastream/getUserMedia-deny-persistency3.html:
* fast/mediastream/getUserMedia-deny-persistency4-expected.txt: Added.
* fast/mediastream/getUserMedia-deny-persistency4.html: Added.

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

18 months agoNew EWS: Cannot see build status page when patch is waiting for tester
aakash_jain@apple.com [Thu, 1 Aug 2019 15:14:16 +0000 (15:14 +0000)]
New EWS: Cannot see build status page when patch is waiting for tester
https://bugs.webkit.org/show_bug.cgi?id=200333

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble): While patch hasn't started processing on tester queue, display build information from builder queue.

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

18 months ago[SOUP] WebSockets: add support for extensions when using web sockets libsoup API
carlosgc@webkit.org [Thu, 1 Aug 2019 14:21:26 +0000 (14:21 +0000)]
[SOUP] WebSockets: add support for extensions when using web sockets libsoup API
https://bugs.webkit.org/show_bug.cgi?id=199943

Reviewed by Alex Christensen.

Source/WebCore:

Add SOUP_TYPE_WEBSOCKET_EXTENSION_MANAGER feature to the soup session to enable WebSocket extensions.

Tests: http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-comp-bit-onoff.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-parameter.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-set-bfinal.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response.html
       http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-window-bits.html

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::SoupNetworkSession):

Source/WebKit:

* NetworkProcess/NetworkSocketChannel.cpp:
(WebKit::NetworkSocketChannel::didConnect): Add extensions parameter and pass it to the IPC message.
* NetworkProcess/NetworkSocketChannel.h:
* NetworkProcess/cocoa/WebSocketTaskCocoa.mm:
(WebKit::WebSocketTask::didConnect): Pass empty extensions string.
* NetworkProcess/soup/WebSocketTaskSoup.cpp:
(WebKit::WebSocketTask::acceptedExtensions const): Build the accepted extensions string.
(WebKit::WebSocketTask::didConnect): Pass accepted extensions to NetworkSocketChannel::didConnect().
* NetworkProcess/soup/WebSocketTaskSoup.h:
* WebProcess/Network/WebSocketChannel.cpp:
(WebKit::WebSocketChannel::extensions): Return the extensions string received from the network process.
(WebKit::WebSocketChannel::didConnect): Save the extensions string.
* WebProcess/Network/WebSocketChannel.h:
* WebProcess/Network/WebSocketChannel.messages.in:

LayoutTests:

Add new tests for permessage-deflate imported from blink and rebaseline existing tests.

* TestExpectations: Skip permessage-deflate tests by default.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-comp-bit-onoff.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter_wsh.py: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-manual_wsh.py: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-parameter.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-set-bfinal.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames_wsh.py: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response_wsh.py: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-window-bits.html: Added.
* http/tests/websocket/tests/hybi/imported/blink/permessage-deflate_wsh.py: Added.
* platform/gtk/TestExpectations: Enable permessage-deflate tests.
* platform/gtk/http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/deflate-frame-parameter-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/extensions-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-comp-bit-onoff-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-parameter-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-set-bfinal-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-window-bits-expected.txt: Added.
* platform/wpe/TestExpectations: Enable permessage-deflate tests.
* platform/wpe/http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/deflate-frame-parameter-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/extensions-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-comp-bit-onoff-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-parameter-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-set-bfinal-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-window-bits-expected.txt: Added.

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

18 months ago[iOS][WK1] Unsafe unsafe of WeakPtr<Document> from UIThread under PlaybackSessionInte...
cdumez@apple.com [Thu, 1 Aug 2019 14:05:13 +0000 (14:05 +0000)]
[iOS][WK1] Unsafe unsafe of WeakPtr<Document> from UIThread under PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit()
https://bugs.webkit.org/show_bug.cgi?id=200324

Reviewed by Ryosuke Niwa.

The Document is a WebThread object, but a WeakPtr<Document> was dereferenced from the
UIThread in HTMLMediaElement::supportsSeeking(), from the PlaybackSessionInterfaceAVKit
constructor. To address the issue we now grab the WebThread lock before constructing
the PlaybackSessionInterfaceAVKit.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(VideoFullscreenControllerContext::setUpFullscreen):

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

18 months agoFix libwebrtc build with Linux 5.2 headers
commit-queue@webkit.org [Thu, 1 Aug 2019 13:36:44 +0000 (13:36 +0000)]
Fix libwebrtc build with Linux 5.2 headers
https://bugs.webkit.org/show_bug.cgi?id=200342

Patch by Loïc Yhuel <loic.yhuel@softathome.com> on 2019-08-01
Reviewed by Eric Carlson.

We need to include linux/sockios.h for SIOCGSTAMP.
Take upstream fix from https://bugs.chromium.org/p/webrtc/issues/detail?id=10677.

* Source/webrtc/rtc_base/physicalsocketserver.cc:

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

18 months ago[SOUP] Switch to use libsoup WebSockets API
carlosgc@webkit.org [Thu, 1 Aug 2019 11:46:07 +0000 (11:46 +0000)]
[SOUP] Switch to use libsoup WebSockets API
https://bugs.webkit.org/show_bug.cgi?id=200162

Reviewed by Michael Catanzaro.

Source/WebCore:

Use the libsoup WebSockets API unconditionally for libsoup based ports.

* Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::create): Do not check the env var anymore.
* platform/SourcesSoup.txt:
* platform/network/SocketStreamHandleImpl.cpp:
* platform/network/StorageSessionProvider.h:
* platform/network/soup/SocketStreamHandleImpl.h:
* platform/network/soup/SocketStreamHandleImplSoup.cpp: Removed.

Source/WebKit:

Remove temporary method added for old WebSockets implementation.

* NetworkProcess/NetworkStorageSessionProvider.h:

Tools:

Update libsoup version to 2.67.90.

* gtk/jhbuild.modules:
* wpe/jhbuild.modules:

LayoutTests:

* platform/gtk/TestExpectations:
* platform/gtk/http/tests/websocket/tests/hybi/broken-utf8-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/close-before-open-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/close-code-and-reason-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/close-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/closed-when-entering-page-cache-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/compressed-control-frame-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/error-event-ready-state-non-existent-url-with-server-responding-404-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/fragmented-control-frame-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-error-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-maxlength-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/interleaved-fragments-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/invalid-continuation-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/invalid-encode-length-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/invalid-masked-frames-from-server-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/long-control-frame-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/long-invalid-header-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/network-process-crash-error-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/reserved-bits-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/reserved-opcodes-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/secure-cookie-secure-connection-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/send-object-tostring-check-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/simple-wss-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/too-long-payload-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/websocket-event-target-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/workers/close-code-and-reason-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/workers/close-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-illegal-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Create-valid-url-protocol-empty.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Create-valid-url-protocol-empty.any.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-65K-data.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-binary-65K-arraybuffer.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-binary-arraybuffer.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-data.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/Send-paired-surrogates.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/basic-auth.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/basic-auth.any.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/closing-handshake/003-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/cookies/004-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-arraybuffer-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-blob-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-deleting-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-unicode-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-multiple-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-nested-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-return-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/017-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/018-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/019-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/readyState/003-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/websockets/security/001-expected.txt: Added.
* platform/gtk/js/intl-datetimeformat-expected.txt: Removed.
* platform/wpe/TestExpectations:
* platform/wpe/http/tests/websocket/tests/hybi/broken-utf8-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/close-before-open-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/close-code-and-reason-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/close-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/closed-when-entering-page-cache-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/compressed-control-frame-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/error-event-ready-state-non-existent-url-with-server-responding-404-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/fragmented-control-frame-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-error-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-maxlength-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/interleaved-fragments-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/invalid-continuation-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/invalid-encode-length-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/invalid-masked-frames-from-server-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/long-control-frame-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/long-invalid-header-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/network-process-crash-error-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/reserved-bits-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/reserved-opcodes-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/secure-cookie-secure-connection-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/send-object-tostring-check-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/simple-wss-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/too-long-payload-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/websocket-event-target-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/workers/close-code-and-reason-expected.txt: Added.
* platform/wpe/http/tests/websocket/tests/hybi/workers/close-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Create-valid-url-protocol-empty.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Create-valid-url-protocol-empty.any.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-65K-data.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-binary-65K-arraybuffer.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-binary-arraybuffer.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-data.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/Send-paired-surrogates.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/basic-auth.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/basic-auth.any.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/closing-handshake/003-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/cookies/004-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-arraybuffer-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-blob-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-deleting-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-unicode-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-multiple-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-nested-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/close/close-return-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/017-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/018-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/019-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/readyState/003-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/001-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/security/001-expected.txt: Added.

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

18 months agoBegin organizing b3 tests
commit-queue@webkit.org [Thu, 1 Aug 2019 05:58:09 +0000 (05:58 +0000)]
Begin organizing b3 tests
https://bugs.webkit.org/show_bug.cgi?id=200330

Patch by Alex Christensen <achristensen@webkit.org> on 2019-07-31
Reviewed by Keith Miller.

* b3/testb3.h:
* b3/testb3_1.cpp:
(run):
(zero): Deleted.
(negativeZero): Deleted.
* b3/testb3_2.cpp:
(testBitXorTreeArgs):
(testBitXorTreeArgsEven):
(testBitXorTreeArgImm):
(testBitAndTreeArg32):
(testBitOrTreeArg32):
(testBitAndArgs):
(testBitAndSameArg):
(testBitAndNotNot):
(testBitAndNotImm):
(testBitAndImms):
(testBitAndArgImm):
(testBitAndImmArg):
(testBitAndBitAndArgImmImm):
(testBitAndImmBitAndArgImm):
(testBitAndArgs32):
(testBitAndSameArg32):
(testBitAndImms32):
(testBitAndArgImm32):
(testBitAndImmArg32):
(testBitAndBitAndArgImmImm32):
(testBitAndImmBitAndArgImm32):
(testBitAndWithMaskReturnsBooleans):
(testBitAndArgDouble):
(testBitAndArgsDouble):
(testBitAndArgImmDouble):
(testBitAndImmsDouble):
(testBitAndArgFloat):
(testBitAndArgsFloat):
(testBitAndArgImmFloat):
(testBitAndImmsFloat):
(testBitAndArgsFloatWithUselessDoubleConversion):
(testBitOrArgs):
(testBitOrSameArg):
(testBitOrAndAndArgs):
(testBitOrAndSameArgs):
(testBitOrNotNot):
(testBitOrNotImm):
(testBitOrImms):
(testBitOrArgImm):
(testBitOrImmArg):
(testBitOrBitOrArgImmImm):
(testBitOrImmBitOrArgImm):
(testBitOrArgs32):
(testBitOrSameArg32):
(testBitOrImms32):
(testBitOrArgImm32):
(testBitOrImmArg32):
(addBitTests):
* b3/testb3_3.cpp:
(testSShrArgs):
(testSShrImms):
(testSShrArgImm):
(testSShrArg32):
(testSShrArgs32):
(testSShrImms32):
(testSShrArgImm32):
(testZShrArgs):
(testZShrImms):
(testZShrArgImm):
(testZShrArg32):
(testZShrArgs32):
(testZShrImms32):
(testZShrArgImm32):
(zero):
(negativeZero):
(addArgTests):
(addCallTests):
(addShrTests):
* b3/testb3_4.cpp:
(addSExtTests):
* b3/testb3_6.cpp:
(testSShrShl32):
(testSShrShl64):
(addSShrShTests):

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

18 months agoWeb Inspector: Debugger: support emulateUserGesture parameter in Debugger.evaluateOnC...
drousso@apple.com [Thu, 1 Aug 2019 05:19:27 +0000 (05:19 +0000)]
Web Inspector: Debugger: support emulateUserGesture parameter in Debugger.evaluateOnCallFrame
https://bugs.webkit.org/show_bug.cgi?id=200272

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.

* inspector/protocol/Debugger.json:
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame):

Source/WebCore:

When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.

Tests: inspector/debugger/evaluateOnCallFrame-emulateUserGesture.html
       inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting.html

* inspector/agents/page/PageDebuggerAgent.h:
* inspector/agents/page/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::evaluateOnCallFrame): Added.

Source/WebInspectorUI:

When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.

* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype.evaluateInInspectedWindow):

* UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-13.0.json:

LayoutTests:

* inspector/debugger/evaluateOnCallFrame-emulateUserGesture.html: Added.
* inspector/debugger/evaluateOnCallFrame-emulateUserGesture-expected.txt: Added.
* inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting.html: Added.
* inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting-expected.txt: Added.
* TestExpectations:
* platform/wk2/TestExpectations:

* inspector/runtime/evaluate-emulateUserGesture.html: Added.
* inspector/runtime/evaluate-emulateUserGesture-expected.txt: Added.
* inspector/runtime/evaluate-emulateUserGesture-userIsInteracting.html: Added.
* inspector/runtime/evaluate-emulateUserGesture-userIsInteracting-expected.txt: Added.
* inspector/runtime/evaluate-userGestureEmulation.html: Deleted.
* inspector/runtime/evaluate-userGestureEmulation-expected.txt: Deleted.
* inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html: Deleted.
* inspector/runtime/evaluate-userGestureEmulation-userIsInteracting-expected.txt: Deleted.
Rename tests from "userGestureEmulation" to "emulateUserGesture" to match the parameter.

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

18 months ago[WHLSL] Replace memsetZero function with inline "= { }" code
sbarati@apple.com [Thu, 1 Aug 2019 05:17:42 +0000 (05:17 +0000)]
[WHLSL] Replace memsetZero function with inline "= { }" code
https://bugs.webkit.org/show_bug.cgi?id=200328

Reviewed by Robin Morisset.

This is a ~20ms metal compile time improvement on compute_boids.

* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
(WebCore::WHLSL::Metal::writeNativeFunction):
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:

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

18 months agoREGRESSION (r240942): first visually non-empty layout milestone is not reached in...
aestes@apple.com [Thu, 1 Aug 2019 04:24:57 +0000 (04:24 +0000)]
REGRESSION (r240942): first visually non-empty layout milestone is not reached in media documents until after the video finishes loading
https://bugs.webkit.org/show_bug.cgi?id=200293
<rdar://problem/52937749>

Reviewed by Alex Christensen.

Source/WebCore:

r240942 changed FrameView::qualifiesAsVisuallyNonEmpty() to consider only documents in the
Interactive or Complete ready states as "finished parsing". Documents considered finished
parsing can qualify as visually non-empty even without exceeding the visual character or
pixel thresholds, but documents considered not finished must first exceed one of these
thresholds in order to qualify as visually non-empty.

HTMLDocuments are placed in the Interactive ready state by their HTMLDocumentParsers.
However, HTMLDocument subclasses like ImageDocument and MediaDocument use their own custom
parsers that never set the Interactive ready state on their documents; these documents go
from Loading directly to Complete.

In order for these HTMLDocument subclasses to be considered visually non-empty before they
finish loading they must render something that exceeds the visual character or pixel
thresholds. For image documents, rendering the image is usually enough to cross the
threshold, but for media documents the visual pixel threshold was never crossed because
videos did not contribute to the visually non-empty pixel count.

As a result, media documents are not considered visually non-empty until the main resource
finishes loading. On iOS this means that the layer tree remains frozen until this point,
even though the media might have started autoplaying with audio long before it finished
loading.

Fix this by teaching RenderVideo to contribute the video player's size to FrameView's
visually non-empty pixel count once the video player has loaded enough data to determine its
intrinsic size. Videos that render more than 1024 pixels will qualify a media document as
visually non-empty even when it is still loading its main resource.

Added a new API test.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
(WebCore::RenderImage::incrementVisuallyNonEmptyPixelCountIfNeeded):
* rendering/RenderImage.h:
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updateIntrinsicSize):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKit/FirstVisuallyNonEmptyMilestoneWithDeferredScript.mm.
(-[FirstPaintMessageHandler userContentController:didReceiveScriptMessage:]):
(-[RenderingProgressNavigationDelegate _webView:renderingProgressDidChange:]):
(-[RenderingProgressNavigationDelegate webView:didFinishNavigation:]):
(TEST):

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

18 months agoWeb Inspector: Uncaught Exception: TypeError: null is not an object (evaluating ...
drousso@apple.com [Thu, 1 Aug 2019 04:24:50 +0000 (04:24 +0000)]
Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'issueMessage.sourceCodeLocation.sourceCode')
https://bugs.webkit.org/show_bug.cgi?id=200296

Reviewed by Joseph Pecoraro.

When fetching all `WI.IssueMessage`s for a given `WI.SourceCode`, the `WI.IssueMessage` may
be associated in a different way (e.g. by url, instead of `WI.SourceCodeLocation`). As such,
we should pass the `WI.SourceCode` along, and use it when adding the `WI.IssueTreeElement`.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._addIssuesForSourceCode):
(WI.DebuggerSidebarPanel.prototype._addIssue):

* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addIssue):
(WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):

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

18 months ago[ews-build] Enable all macOS queues on new EWS
aakash_jain@apple.com [Thu, 1 Aug 2019 01:17:09 +0000 (01:17 +0000)]
[ews-build] Enable all macOS queues on new EWS
https://bugs.webkit.org/show_bug.cgi?id=199944

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/config.json: Enabled the triggers for macOS queues.
* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble): Enabled status-bubbles for mac queues, separated builders and testers bubbles in separate lines. Also
removed mac-32bit and mac-32bit-wk2 bubbles, these queues were removed from Buildbot configuration previously.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js: Removed mac queues from bot-watcher's dashboard.
* QueueStatusServer/config/queues.py: Removed mac queues from old EWS.

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

18 months agoSplit testb3 into multiple files
achristensen@apple.com [Thu, 1 Aug 2019 01:01:53 +0000 (01:01 +0000)]
Split testb3 into multiple files
https://bugs.webkit.org/show_bug.cgi?id=200326

Reviewed by Keith Miller.

* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/testb3.cpp: Removed.
* b3/testb3.h: Added.
(hiddenTruthBecauseNoReturnIsStupid):
(usage):
(shouldBeVerbose):
(compileProc):
(invoke):
(compileAndRun):
(lowerToAirForTesting):
(checkDisassembly):
(checkUsesInstruction):
(checkDoesNotUseInstruction):
(populateWithInterestingValues):
(floatingPointOperands):
(int64Operands):
(int32Operands):
(add32):
(modelLoad):
(float>):
(double>):
* b3/testb3_1.cpp: Added.
(zero):
(negativeZero):
(shouldRun):
(testRotR):
(testRotL):
(testRotRWithImmShift):
(testRotLWithImmShift):
(testComputeDivisionMagic):
(run):
(main):
(dllLauncherEntryPoint):
* b3/testb3_2.cpp: Added.
(test42):
(testLoad42):
(testLoadAcq42):
(testLoadWithOffsetImpl):
(testLoadOffsetImm9Max):
(testLoadOffsetImm9MaxPlusOne):
(testLoadOffsetImm9MaxPlusTwo):
(testLoadOffsetImm9Min):
(testLoadOffsetImm9MinMinusOne):
(testLoadOffsetScaledUnsignedImm12Max):
(testLoadOffsetScaledUnsignedOverImm12Max):
(testBitXorTreeArgs):
(testBitXorTreeArgsEven):
(testBitXorTreeArgImm):
(testAddTreeArg32):
(testMulTreeArg32):
(testBitAndTreeArg32):
(testBitOrTreeArg32):
(testArg):
(testReturnConst64):
(testReturnVoid):
(testAddArg):
(testAddArgs):
(testAddArgImm):
(testAddImmArg):
(testAddArgMem):
(testAddMemArg):
(testAddImmMem):
(testAddArg32):
(testAddArgs32):
(testAddArgMem32):
(testAddMemArg32):
(testAddImmMem32):
(testAddNeg1):
(testAddNeg2):
(testAddArgZeroImmZDef):
(testAddLoadTwice):
(testAddArgDouble):
(testAddArgsDouble):
(testAddArgImmDouble):
(testAddImmArgDouble):
(testAddImmsDouble):
(testAddArgFloat):
(testAddArgsFloat):
(testAddFPRArgsFloat):
(testAddArgImmFloat):
(testAddImmArgFloat):
(testAddImmsFloat):
(testAddArgFloatWithUselessDoubleConversion):
(testAddArgsFloatWithUselessDoubleConversion):
(testAddArgsFloatWithEffectfulDoubleConversion):
(testAddMulMulArgs):
(testMulArg):
(testMulArgStore):
(testMulAddArg):
(testMulArgs):
(testMulArgNegArg):
(testMulNegArgArg):
(testMulArgImm):
(testMulImmArg):
(testMulArgs32):
(testMulArgs32SignExtend):
(testMulImm32SignExtend):
(testMulLoadTwice):
(testMulAddArgsLeft):
(testMulAddArgsRight):
(testMulAddArgsLeft32):
(testMulAddArgsRight32):
(testMulSubArgsLeft):
(testMulSubArgsRight):
(testMulSubArgsLeft32):
(testMulSubArgsRight32):
(testMulNegArgs):
(testMulNegArgs32):
(testMulArgDouble):
(testMulArgsDouble):
(testMulArgImmDouble):
(testMulImmArgDouble):
(testMulImmsDouble):
(testMulArgFloat):
(testMulArgsFloat):
(testMulArgImmFloat):
(testMulImmArgFloat):
(testMulImmsFloat):
(testMulArgFloatWithUselessDoubleConversion):
(testMulArgsFloatWithUselessDoubleConversion):
(testMulArgsFloatWithEffectfulDoubleConversion):
(testDivArgDouble):
(testDivArgsDouble):
(testDivArgImmDouble):
(testDivImmArgDouble):
(testDivImmsDouble):
(testDivArgFloat):
(testDivArgsFloat):
(testDivArgImmFloat):
(testDivImmArgFloat):
(testDivImmsFloat):
(testModArgDouble):
(testModArgsDouble):
(testModArgImmDouble):
(testModImmArgDouble):
(testModImmsDouble):
(testModArgFloat):
(testModArgsFloat):
(testModArgImmFloat):
(testModImmArgFloat):
(testModImmsFloat):
(testDivArgFloatWithUselessDoubleConversion):
(testDivArgsFloatWithUselessDoubleConversion):
(testDivArgsFloatWithEffectfulDoubleConversion):
(testUDivArgsInt32):
(testUDivArgsInt64):
(testUModArgsInt32):
(testUModArgsInt64):
(testSubArg):
(testSubArgs):
(testSubArgImm):
(testSubNeg):
(testNegSub):
(testNegValueSubOne):
(testSubSub):
(testSubSub2):
(testSubAdd):
(testSubFirstNeg):
(testSubImmArg):
(testSubArgMem):
(testSubMemArg):
(testSubImmMem):
(testSubMemImm):
(testSubArgs32):
(testSubArgImm32):
(testSubImmArg32):
(testSubMemArg32):
(testSubArgMem32):
(testSubImmMem32):
(testSubMemImm32):
(testNegValueSubOne32):
(testNegMulArgImm):
(testSubMulMulArgs):
(testSubArgDouble):
(testSubArgsDouble):
(testSubArgImmDouble):
(testSubImmArgDouble):
(testSubImmsDouble):
(testSubArgFloat):
(testSubArgsFloat):
(testSubArgImmFloat):
(testSubImmArgFloat):
(testSubImmsFloat):
(testSubArgFloatWithUselessDoubleConversion):
(testSubArgsFloatWithUselessDoubleConversion):
(testSubArgsFloatWithEffectfulDoubleConversion):
(testTernarySubInstructionSelection):
(testNegDouble):
(testNegFloat):
(testNegFloatWithUselessDoubleConversion):
(testBitAndArgs):
(testBitAndSameArg):
(testBitAndNotNot):
(testBitAndNotImm):
(testBitAndImms):
(testBitAndArgImm):
(testBitAndImmArg):
(testBitAndBitAndArgImmImm):
(testBitAndImmBitAndArgImm):
(testBitAndArgs32):
(testBitAndSameArg32):
(testBitAndImms32):
(testBitAndArgImm32):
(testBitAndImmArg32):
(testBitAndBitAndArgImmImm32):
(testBitAndImmBitAndArgImm32):
(testBitAndWithMaskReturnsBooleans):
(bitAndDouble):
(testBitAndArgDouble):
(testBitAndArgsDouble):
(testBitAndArgImmDouble):
(testBitAndImmsDouble):
(bitAndFloat):
(testBitAndArgFloat):
(testBitAndArgsFloat):
(testBitAndArgImmFloat):
(testBitAndImmsFloat):
(testBitAndArgsFloatWithUselessDoubleConversion):
(testBitOrArgs):
(testBitOrSameArg):
(testBitOrAndAndArgs):
(testBitOrAndSameArgs):
(testBitOrNotNot):
(testBitOrNotImm):
(testBitOrImms):
(testBitOrArgImm):
(testBitOrImmArg):
(testBitOrBitOrArgImmImm):
(testBitOrImmBitOrArgImm):
(testBitOrArgs32):
(testBitOrSameArg32):
(testBitOrImms32):
(testBitOrArgImm32):
(testBitOrImmArg32):
* b3/testb3_3.cpp: Added.
(testBitOrBitOrArgImmImm32):
(testBitOrImmBitOrArgImm32):
(bitOrDouble):
(testBitOrArgDouble):
(testBitOrArgsDouble):
(testBitOrArgImmDouble):
(testBitOrImmsDouble):
(bitOrFloat):
(testBitOrArgFloat):
(testBitOrArgsFloat):
(testBitOrArgImmFloat):
(testBitOrImmsFloat):
(testBitOrArgsFloatWithUselessDoubleConversion):
(testBitXorArgs):
(testBitXorSameArg):
(testBitXorAndAndArgs):
(testBitXorAndSameArgs):
(testBitXorImms):
(testBitXorArgImm):
(testBitXorImmArg):
(testBitXorBitXorArgImmImm):
(testBitXorImmBitXorArgImm):
(testBitXorArgs32):
(testBitXorSameArg32):
(testBitXorImms32):
(testBitXorArgImm32):
(testBitXorImmArg32):
(testBitXorBitXorArgImmImm32):
(testBitXorImmBitXorArgImm32):
(testBitNotArg):
(testBitNotImm):
(testBitNotMem):
(testBitNotArg32):
(testBitNotImm32):
(testBitNotMem32):
(testNotOnBooleanAndBranch32):
(testBitNotOnBooleanAndBranch32):
(testShlArgs):
(testShlImms):
(testShlArgImm):
(testShlSShrArgImm):
(testShlArg32):
(testShlArgs32):
(testShlImms32):
(testShlArgImm32):
(testShlZShrArgImm32):
(testSShrArgs):
(testSShrImms):
(testSShrArgImm):
(testSShrArg32):
(testSShrArgs32):
(testSShrImms32):
(testSShrArgImm32):
(testZShrArgs):
(testZShrImms):
(testZShrArgImm):
(testZShrArg32):
(testZShrArgs32):
(testZShrImms32):
(testZShrArgImm32):
(countLeadingZero):
(testClzArg64):
(testClzMem64):
(testClzArg32):
(testClzMem32):
(testAbsArg):
(testAbsImm):
(testAbsMem):
(testAbsAbsArg):
(testAbsNegArg):
(testAbsBitwiseCastArg):
(testBitwiseCastAbsBitwiseCastArg):
(testAbsArgWithUselessDoubleConversion):
(testAbsArgWithEffectfulDoubleConversion):
(testCeilArg):
(testCeilImm):
(testCeilMem):
(testCeilCeilArg):
(testFloorCeilArg):
(testCeilIToD64):
(testCeilIToD32):
(testCeilArgWithUselessDoubleConversion):
(testCeilArgWithEffectfulDoubleConversion):
(testFloorArg):
(testFloorImm):
(testFloorMem):
(testFloorFloorArg):
(testCeilFloorArg):
(testFloorIToD64):
(testFloorIToD32):
(testFloorArgWithUselessDoubleConversion):
(testFloorArgWithEffectfulDoubleConversion):
(correctSqrt):
(testSqrtArg):
(testSqrtImm):
(testSqrtMem):
(testSqrtArgWithUselessDoubleConversion):
(testSqrtArgWithEffectfulDoubleConversion):
(testCompareTwoFloatToDouble):
(testCompareOneFloatToDouble):
(testCompareFloatToDoubleThroughPhi):
(testDoubleToFloatThroughPhi):
(testReduceFloatToDoubleValidates):
(testDoubleProducerPhiToFloatConversion):
(testDoubleProducerPhiToFloatConversionWithDoubleConsumer):
(testDoubleProducerPhiWithNonFloatConst):
(testDoubleArgToInt64BitwiseCast):
(testDoubleImmToInt64BitwiseCast):
(testTwoBitwiseCastOnDouble):
(testBitwiseCastOnDoubleInMemory):
(testBitwiseCastOnDoubleInMemoryIndexed):
(testInt64BArgToDoubleBitwiseCast):
(testInt64BImmToDoubleBitwiseCast):
(testTwoBitwiseCastOnInt64):
(testBitwiseCastOnInt64InMemory):
(testBitwiseCastOnInt64InMemoryIndexed):
(testFloatImmToInt32BitwiseCast):
(testBitwiseCastOnFloatInMemory):
(testInt32BArgToFloatBitwiseCast):
(testInt32BImmToFloatBitwiseCast):
(testTwoBitwiseCastOnInt32):
(testBitwiseCastOnInt32InMemory):
(testConvertDoubleToFloatArg):
(testConvertDoubleToFloatImm):
(testConvertDoubleToFloatMem):
(testConvertFloatToDoubleArg):
(testConvertFloatToDoubleImm):
(testConvertFloatToDoubleMem):
(testConvertDoubleToFloatToDoubleToFloat):
(testLoadFloatConvertDoubleConvertFloatStoreFloat):
(testFroundArg):
(testFroundMem):
(testIToD64Arg):
(testIToF64Arg):
(testIToD32Arg):
(testIToF32Arg):
(testIToD64Mem):
(testIToF64Mem):
(testIToD32Mem):
(testIToF32Mem):
(testIToD64Imm):
(testIToF64Imm):
(testIToD32Imm):
(testIToF32Imm):
(testIToDReducedToIToF64Arg):
(testIToDReducedToIToF32Arg):
(testStore32):
(testStoreConstant):
(testStoreConstantPtr):
(testStore8Arg):
(testStore8Imm):
(testStorePartial8BitRegisterOnX86):
(testStore16Arg):
(testStore16Imm):
(testTrunc):
(testAdd1):
(testAdd1Ptr):
(testNeg32):
(testNegPtr):
(testStoreAddLoad32):
* b3/testb3_4.cpp: Added.
(testStoreRelAddLoadAcq32):
(testStoreAddLoadImm32):
(testStoreAddLoad8):
(testStoreRelAddLoadAcq8):
(testStoreRelAddFenceLoadAcq8):
(testStoreAddLoadImm8):
(testStoreAddLoad16):
(testStoreRelAddLoadAcq16):
(testStoreAddLoadImm16):
(testStoreAddLoad64):
(testStoreRelAddLoadAcq64):
(testStoreAddLoadImm64):
(testStoreAddLoad32Index):
(testStoreAddLoadImm32Index):
(testStoreAddLoad8Index):
(testStoreAddLoadImm8Index):
(testStoreAddLoad16Index):
(testStoreAddLoadImm16Index):
(testStoreAddLoad64Index):
(testStoreAddLoadImm64Index):
(testStoreSubLoad):
(testStoreAddLoadInterference):
(testStoreAddAndLoad):
(testStoreNegLoad32):
(testStoreNegLoadPtr):
(testAdd1Uncommuted):
(testLoadOffset):
(testLoadOffsetNotConstant):
(testLoadOffsetUsingAdd):
(testLoadOffsetUsingAddInterference):
(testLoadOffsetUsingAddNotConstant):
(testLoadAddrShift):
(testFramePointer):
(testOverrideFramePointer):
(testStackSlot):
(testLoadFromFramePointer):
(testStoreLoadStackSlot):
(testStoreFloat):
(testStoreDoubleConstantAsFloat):
(testSpillGP):
(testSpillFP):
(testInt32ToDoublePartialRegisterStall):
(testInt32ToDoublePartialRegisterWithoutStall):
(testBranch):
(testBranchPtr):
(testDiamond):
(testBranchNotEqual):
(testBranchNotEqualCommute):
(testBranchNotEqualNotEqual):
(testBranchEqual):
(testBranchEqualEqual):
(testBranchEqualCommute):
(testBranchEqualEqual1):
(testBranchEqualOrUnorderedArgs):
(testBranchNotEqualAndOrderedArgs):
(testBranchEqualOrUnorderedDoubleArgImm):
(testBranchEqualOrUnorderedFloatArgImm):
(testBranchEqualOrUnorderedDoubleImms):
(testBranchEqualOrUnorderedFloatImms):
(testBranchEqualOrUnorderedFloatWithUselessDoubleConversion):
(testBranchFold):
(testDiamondFold):
(testBranchNotEqualFoldPtr):
(testBranchEqualFoldPtr):
(testBranchLoadPtr):
(testBranchLoad32):
(testBranchLoad8S):
(testBranchLoad8Z):
(testBranchLoad16S):
(testBranchLoad16Z):
(testBranch8WithLoad8ZIndex):
(testComplex):
(testBranchBitTest32TmpImm):
(testBranchBitTest32AddrImm):
(testBranchBitTest32TmpTmp):
(testBranchBitTest64TmpTmp):
(testBranchBitTest64AddrTmp):
(testBranchBitTestNegation):
(testBranchBitTestNegation2):
(testSimplePatchpoint):
(testSimplePatchpointWithoutOuputClobbersGPArgs):
(testSimplePatchpointWithOuputClobbersGPArgs):
(testSimplePatchpointWithoutOuputClobbersFPArgs):
(testSimplePatchpointWithOuputClobbersFPArgs):
(testPatchpointWithEarlyClobber):
(testPatchpointCallArg):
(testPatchpointFixedRegister):
(testPatchpointAny):
(testPatchpointGPScratch):
(testPatchpointFPScratch):
(testPatchpointLotsOfLateAnys):
(testPatchpointAnyImm):
* b3/testb3_5.cpp: Added.
(testPatchpointManyImms):
(testPatchpointWithRegisterResult):
(testPatchpointWithStackArgumentResult):
(testPatchpointWithAnyResult):
(testSimpleCheck):
(testCheckFalse):
(testCheckTrue):
(testCheckLessThan):
(testCheckMegaCombo):
(testCheckTrickyMegaCombo):
(testCheckTwoMegaCombos):
(testCheckTwoNonRedundantMegaCombos):
(testCheckAddImm):
(testCheckAddImmCommute):
(testCheckAddImmSomeRegister):
(testCheckAdd):
(testCheckAdd64):
(testCheckAddFold):
(testCheckAddFoldFail):
(testCheckAddArgumentAliasing64):
(testCheckAddArgumentAliasing32):
(testCheckAddSelfOverflow64):
(testCheckAddSelfOverflow32):
(testCheckSubImm):
(testCheckSubBadImm):
(testCheckSub):
(doubleSub):
(testCheckSub64):
(testCheckSubFold):
(testCheckSubFoldFail):
(testCheckNeg):
(testCheckNeg64):
(testCheckMul):
(testCheckMulMemory):
(testCheckMul2):
(testCheckMul64):
(testCheckMulFold):
(testCheckMulFoldFail):
(testCheckMulArgumentAliasing64):
(testCheckMulArgumentAliasing32):
(testCheckMul64SShr):
(genericTestCompare):
(modelCompare):
(testCompareLoad):
(testCompareImpl):
(testCompare):
(testEqualDouble):
(simpleFunction):
(testCallSimple):
(testCallRare):
(testCallRareLive):
(testCallSimplePure):
(functionWithHellaArguments):
(testCallFunctionWithHellaArguments):
(functionWithHellaArguments2):
(testCallFunctionWithHellaArguments2):
(functionWithHellaArguments3):
(testCallFunctionWithHellaArguments3):
(testReturnDouble):
(testReturnFloat):
(simpleFunctionDouble):
(testCallSimpleDouble):
(simpleFunctionFloat):
(testCallSimpleFloat):
(functionWithHellaDoubleArguments):
(testCallFunctionWithHellaDoubleArguments):
(functionWithHellaFloatArguments):
(testCallFunctionWithHellaFloatArguments):
(testLinearScanWithCalleeOnStack):
(testChillDiv):
(testChillDivTwice):
(testChillDiv64):
(testModArg):
(testModArgs):
(testModImms):
(testModArg32):
(testModArgs32):
(testModImms32):
(testChillModArg):
(testChillModArgs):
(testChillModImms):
(testChillModArg32):
(testChillModArgs32):
(testChillModImms32):
(testLoopWithMultipleHeaderEdges):
(testSwitch):
(testSwitchSameCaseAsDefault):
(testSwitchChillDiv):
(testSwitchTargettingSameBlock):
(testSwitchTargettingSameBlockFoldPathConstant):
(testTruncFold):
(testZExt32):
(testZExt32Fold):
(testSExt32):
(testSExt32Fold):
(testTruncZExt32):
(testTruncSExt32):
(testSExt8):
(testSExt8Fold):
(testSExt8SExt8):
(testSExt8SExt16):
(testSExt8BitAnd):
(testBitAndSExt8):
(testSExt16):
(testSExt16Fold):
(testSExt16SExt16):
(testSExt16SExt8):
(testSExt16BitAnd):
(testBitAndSExt16):
(testSExt32BitAnd):
* b3/testb3_6.cpp: Added.
(testBitAndSExt32):
(testBasicSelect):
(testSelectTest):
(testSelectCompareDouble):
(testSelectCompareFloat):
(testSelectCompareFloatToDouble):
(testSelectDouble):
(testSelectDoubleTest):
(testSelectDoubleCompareDouble):
(testSelectDoubleCompareFloat):
(testSelectFloatCompareFloat):
(testSelectDoubleCompareDoubleWithAliasing):
(testSelectFloatCompareFloatWithAliasing):
(testSelectFold):
(testSelectInvert):
(testCheckSelect):
(testCheckSelectCheckSelect):
(testCheckSelectAndCSE):
(b3Pow):
(testPowDoubleByIntegerLoop):
(testTruncOrHigh):
(testTruncOrLow):
(testBitAndOrHigh):
(testBitAndOrLow):
(testBranch64Equal):
(testBranch64EqualImm):
(testBranch64EqualMem):
(testBranch64EqualMemImm):
(testStore8Load8Z):
(testStore16Load16Z):
(testSShrShl32):
(testSShrShl64):
(testTrivialInfiniteLoop):
(testFoldPathEqual):
(testLShiftSelf32):
(testRShiftSelf32):
(testURShiftSelf32):
(testLShiftSelf64):
(testRShiftSelf64):
(testURShiftSelf64):
(testPatchpointDoubleRegs):
(testSpillDefSmallerThanUse):
(testSpillUseLargerThanDef):
(testLateRegister):
(interpreterPrint):
(testInterpreter):
(testReduceStrengthCheckBottomUseInAnotherBlock):
(testResetReachabilityDanglingReference):
(testEntrySwitchSimple):
(testEntrySwitchNoEntrySwitch):
(testEntrySwitchWithCommonPaths):
(testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint):
(testEntrySwitchLoop):
(testSomeEarlyRegister):
(testBranchBitAndImmFusion):
(testTerminalPatchpointThatNeedsToBeSpilled):
(testTerminalPatchpointThatNeedsToBeSpilled2):
(testPatchpointTerminalReturnValue):
(testMemoryFence):
(testStoreFence):
(testLoadFence):
(testTrappingLoad):
(testTrappingStore):
(testTrappingLoadAddStore):
(testTrappingLoadDCE):
(testTrappingStoreElimination):
(testMoveConstants):
(testPCOriginMapDoesntInsertNops):
* b3/testb3_7.cpp: Added.
(testPinRegisters):
(testX86LeaAddAddShlLeft):
(testX86LeaAddAddShlRight):
(testX86LeaAddAdd):
(testX86LeaAddShlRight):
(testX86LeaAddShlLeftScale1):
(testX86LeaAddShlLeftScale2):
(testX86LeaAddShlLeftScale4):
(testX86LeaAddShlLeftScale8):
(testAddShl32):
(testAddShl64):
(testAddShl65):
(testReduceStrengthReassociation):
(testLoadBaseIndexShift2):
(testLoadBaseIndexShift32):
(testOptimizeMaterialization):
(generateLoop):
(makeArrayForLoops):
(generateLoopNotBackwardsDominant):
(oneFunction):
(noOpFunction):
(testLICMPure):
(testLICMPureSideExits):
(testLICMPureWritesPinned):
(testLICMPureWrites):
(testLICMReadsLocalState):
(testLICMReadsPinned):
(testLICMReads):
(testLICMPureNotBackwardsDominant):
(testLICMPureFoiledByChild):
(testLICMPureNotBackwardsDominantFoiledByChild):
(testLICMExitsSideways):
(testLICMWritesLocalState):
(testLICMWrites):
(testLICMFence):
(testLICMWritesPinned):
(testLICMControlDependent):
(testLICMControlDependentNotBackwardsDominant):
(testLICMControlDependentSideExits):
(testLICMReadsPinnedWritesPinned):
(testLICMReadsWritesDifferentHeaps):
(testLICMReadsWritesOverlappingHeaps):
(testLICMDefaultCall):
(testDepend32):
(testDepend64):
(testWasmBoundsCheck):
(testWasmAddress):
(testFastTLSLoad):
(testFastTLSStore):
(doubleEq):
(doubleNeq):
(doubleGt):
(doubleGte):
(doubleLt):
(doubleLte):
(testDoubleLiteralComparison):
(testFloatEqualOrUnorderedFolding):
(testFloatEqualOrUnorderedFoldingNaN):
(testFloatEqualOrUnorderedDontFold):
(functionNineArgs):
(testShuffleDoesntTrashCalleeSaves):
(testDemotePatchpointTerminal):
(testReportUsedRegistersLateUseFollowedByEarlyDefDoesNotMarkUseAsDead):
(testInfiniteLoopDoesntCauseBadHoisting):
* b3/testb3_8.cpp: Added.
(testAtomicWeakCAS):
(testAtomicStrongCAS):
(testAtomicXchg):
(addAtomicTests):
(testLoad):
(addLoadTests):

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

18 months agoWKImagePreviewViewController not being autoreleased
dino@apple.com [Thu, 1 Aug 2019 00:12:18 +0000 (00:12 +0000)]
WKImagePreviewViewController not being autoreleased
https://bugs.webkit.org/show_bug.cgi?id=200325
<rdar://problem/53788214>

Reviewed by Wenson Hsieh.

Wenson noticed I wasn't autoreleasing the WKImagePreviewViewController.

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

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

18 months agoVersioning.
alancoon@apple.com [Thu, 1 Aug 2019 00:11:35 +0000 (00:11 +0000)]
Versioning.

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

18 months ago[WHLSL] Remove UnnamedType copy/move constructors and mark classes as final
sbarati@apple.com [Thu, 1 Aug 2019 00:04:23 +0000 (00:04 +0000)]
[WHLSL] Remove UnnamedType copy/move constructors and mark classes as final
https://bugs.webkit.org/show_bug.cgi?id=200188
<rdar://problem/53628171>

Unreviewed followup.

As Darin pointed out in the bugzilla comments, when defining a copy
constructor in C++ (either deleted or an implementation), the move
constructor is implicitly deleted. This match removes the excessive
use of WTF_MAKE_NONMOVABLE when we're already using WTF_MAKE_NONCOPYABLE.

* Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
* Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
* Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:

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

18 months agoUnreviewed test gardening, disable failing test for rdar://51752593.
ryanhaddad@apple.com [Wed, 31 Jul 2019 23:34:14 +0000 (23:34 +0000)]
Unreviewed test gardening, disable failing test for rdar://51752593.

* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

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

18 months agoUse CTFontCreateForCharactersWithLanguageAndOption if available instead of CTFontCrea...
youenn@apple.com [Wed, 31 Jul 2019 23:24:09 +0000 (23:24 +0000)]
Use CTFontCreateForCharactersWithLanguageAndOption if available instead of CTFontCreateForCharactersWithLanguage
https://bugs.webkit.org/show_bug.cgi?id=200241
<rdar://problem/53495386>

Build fix for older MacOS for which CTFontFallbackOption is not defined.
Unreviewed.

* pal/spi/cocoa/CoreTextSPI.h:

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

18 months ago[ContentChangeObserver] twitch.tv video controls do not always respond to taps in...
zalan@apple.com [Wed, 31 Jul 2019 23:01:43 +0000 (23:01 +0000)]
[ContentChangeObserver] twitch.tv video controls do not always respond to taps in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=200309
<rdar://problem/52964977>

Reviewed by Simon Fraser.

Source/WebCore:

Do not consider an element visible if it is not a descendant of the active fullscreen element.

This patch fixes the cases when the user taps on a button in fullscreen mode while the non-fullscreen content is being mutated and
the ContentChangeObserver mistakenly registers it as a valid, actionable change and as a result we don't fire the click event (stay at hover).

Test: fast/events/touch/ios/content-observation/non-visible-content-change-in-fullscreen-mode.html

* page/ios/ContentChangeObserver.cpp:
(WebCore::fullscreenElement):
(WebCore::ContentChangeObserver::isVisuallyHidden):

LayoutTests:

* fast/events/touch/ios/content-observation/non-visible-content-change-in-fullscreen-mode-expected.txt: Added.
* fast/events/touch/ios/content-observation/non-visible-content-change-in-fullscreen-mode.html: Added.
* platform/ios/TestExpectations: Fullscreen API is not yet enabled on iOS.

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

18 months ago[iPadOS] Enable simulated mouse events on iqiyi.com to fix the video controls
simon.fraser@apple.com [Wed, 31 Jul 2019 22:58:01 +0000 (22:58 +0000)]
[iPadOS] Enable simulated mouse events on iqiyi.com to fix the video controls
https://bugs.webkit.org/show_bug.cgi?id=200322
rdar://problem/53235709

Reviewed by Wenson Hsieh.

iqiyi.com needs to get mouseMove events for dragging the video scrubber to work.

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

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

18 months ago[WHLSL Remove char/short/half types
sbarati@apple.com [Wed, 31 Jul 2019 22:37:00 +0000 (22:37 +0000)]
[WHLSL Remove char/short/half types
https://bugs.webkit.org/show_bug.cgi?id=200312

Reviewed by Myles C. Maxfield.

Source/WebCore:

This patch removes the char/short/half types from WHLSL. Since it's not
supported by all HW, WebGPU is leaving these types out for now. This is
also a huge speedup, since it halves the size of the standard library.

In the compute_boids demo, WHLSL::prepare goes from running in ~140ms to
running in ~60ms.

Test: webgpu/whlsl/smaller-than-32-bit-types.html

* Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
(WebCore::WHLSL::Metal::writeNativeType):
* Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
(WebCore::WHLSL::Intrinsics::addPrimitive):
(WebCore::WHLSL::Intrinsics::addVector):
(WebCore::WHLSL::Intrinsics::addMatrix):
* Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
(WebCore::WHLSL::Intrinsics::WTF_ARRAY_LENGTH):
(WebCore::WHLSL::Intrinsics::ucharType const): Deleted.
(WebCore::WHLSL::Intrinsics::ushortType const): Deleted.
(WebCore::WHLSL::Intrinsics::charType const): Deleted.
(WebCore::WHLSL::Intrinsics::shortType const): Deleted.
(WebCore::WHLSL::Intrinsics::uchar2Type const): Deleted.
(WebCore::WHLSL::Intrinsics::uchar4Type const): Deleted.
(WebCore::WHLSL::Intrinsics::ushort2Type const): Deleted.
(WebCore::WHLSL::Intrinsics::ushort4Type const): Deleted.
(WebCore::WHLSL::Intrinsics::char2Type const): Deleted.
(WebCore::WHLSL::Intrinsics::char4Type const): Deleted.
(WebCore::WHLSL::Intrinsics::short2Type const): Deleted.
(WebCore::WHLSL::Intrinsics::short4Type const): Deleted.
* Modules/webgpu/WHLSL/WHLSLPipelineDescriptor.h:
* Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
(WebCore::WHLSL::isAcceptableFormat):
* Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::convertTextureFormat):

LayoutTests:

* webgpu/whlsl/bools.html:
* webgpu/whlsl/smaller-than-32-bit-types-expected.txt: Added.
* webgpu/whlsl/smaller-than-32-bit-types.html: Added.
* webgpu/whlsl/test-harness-test.html:

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

18 months agoObjC RTCCVPixelBuffer should be prefixed to not conflict with other apps
youenn@apple.com [Wed, 31 Jul 2019 22:26:43 +0000 (22:26 +0000)]
ObjC RTCCVPixelBuffer should be prefixed to not conflict with other apps
https://bugs.webkit.org/show_bug.cgi?id=200289
<rdar://problem/49554670>

Reviewed by Darin Adler.

* Source/webrtc/sdk/objc/components/video_frame_buffer/RTCCVPixelBuffer.h:

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

18 months agoresults.webkit.og: Timeline in canvas painting with wrong colors, cannot customize...
jbedard@apple.com [Wed, 31 Jul 2019 22:21:29 +0000 (22:21 +0000)]
results.webkit.og: Timeline in canvas painting with wrong colors, cannot customize scale
https://bugs.webkit.org/show_bug.cgi?id=200318

Reviewed by Aakash Jain.

* resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
(Timeline.CanvasSeriesComponent): Reset draw context between dots.
(Timeline.CanvasXAxisComponent): Use getLabel function.

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

18 months ago[GTK][WPE] Fix gtkdoc build with "build-webkit --32-bit" on 64-bit hosts
commit-queue@webkit.org [Wed, 31 Jul 2019 21:36:59 +0000 (21:36 +0000)]
[GTK][WPE] Fix gtkdoc build with "build-webkit --32-bit" on 64-bit hosts
https://bugs.webkit.org/show_bug.cgi?id=200306

Patch by Loïc Yhuel <loic.yhuel@softathome.com> on 2019-07-31
Reviewed by Michael Catanzaro.

gtkdoc-scangobj calls scangobj.py, which only uses LDFLAGS on link (when producing
jsc-glib-4.0-scan for example).

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):

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

18 months agoUpdate test expectations for imported/blink/storage/indexeddb/blob-basics-metadata...
tsavell@apple.com [Wed, 31 Jul 2019 21:34:26 +0000 (21:34 +0000)]
Update test expectations for imported/blink/storage/indexeddb/blob-basics-metadata.html
https://bugs.webkit.org/show_bug.cgi?id=199117

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

18 months agoUnreviewed test gardening, disable failing test for rdar://52355829.
ryanhaddad@apple.com [Wed, 31 Jul 2019 21:02:12 +0000 (21:02 +0000)]
Unreviewed test gardening, disable failing test for rdar://52355829.

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

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

18 months agoUse CTFontCreateForCharactersWithLanguageAndOption if available instead of CTFontCrea...
youenn@apple.com [Wed, 31 Jul 2019 20:59:00 +0000 (20:59 +0000)]
Use CTFontCreateForCharactersWithLanguageAndOption if available instead of CTFontCreateForCharactersWithLanguage
https://bugs.webkit.org/show_bug.cgi?id=200241

Source/WebCore:

Reviewed by Myles C. Maxfield.

We can use CTFontCreateForCharactersWithLanguageAndOption instead of CTFontCreateForCharactersWithLanguage
as it allows setting more easily the fallback option.
This allows us to never fallback to user installed fonts.
In such a case, we no longer need to wrap the fonts to change the fallback option.
We also prewarm the fonts with the same SPI and use system fallback as the default value.

Covered by existing tests.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
(WebCore::lookupFallbackFont):
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::prewarm):
(WebCore::fontFamiliesForPrewarming):

Source/WebCore/PAL:

Reviewed by Myles C. Maxfield.

Add new SPI.

* pal/spi/cocoa/CoreTextSPI.h:

Source/WTF:

Reviewed by Myles C. Maxfield.

* wtf/Platform.h: Add macro to enable/disable new SPI.

LayoutTests:

We update the tests to flush font caches as otherwise some debug asserts would be hit.
This is due to changing the user installed font runtime flag while browsing which is not a typical situation.

Reviewed by Myles C. Maxfield.

* fast/text/user-installed-fonts/extended-character-with-user-font.html:
* fast/text/user-installed-fonts/extended-character.html:

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

18 months agoWeb Inspector: Overlay: add page width/height display
drousso@apple.com [Wed, 31 Jul 2019 20:54:18 +0000 (20:54 +0000)]
Web Inspector: Overlay: add page width/height display
https://bugs.webkit.org/show_bug.cgi?id=199369

Reviewed by Joseph Pecoraro.

Show `${width}px x ${height}px` in the corner where the horizontal and vertical rulers meet.
This way, if the rulers shift due to the highlighted content, the page width/height does too.

* inspector/InspectorOverlay.h:
* inspector/InspectorOverlay.cpp:
(WebCore::truncateWithEllipsis):
(WebCore::InspectorOverlay::drawNodeHighlight):
(WebCore::InspectorOverlay::drawQuadHighlight):
(WebCore::InspectorOverlay::drawRulers):
(WebCore::InspectorOverlay::drawElementTitle):

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

18 months agoWeb Inspector: DOM: provide a way to disable/breakpoint all event listeners for a...
drousso@apple.com [Wed, 31 Jul 2019 20:43:32 +0000 (20:43 +0000)]
Web Inspector: DOM: provide a way to disable/breakpoint all event listeners for a given DOM node or event type
https://bugs.webkit.org/show_bug.cgi?id=200233

Reviewed by Joseph Pecoraro.

Often, when trying to debug issues with DOM events, it's extremely tedious to have to go
through event listeners one by one and disable them (or set a breakpoint). This patch adds
a way of performing these "state modifications" in batch operations, based on the current
grouping method of the Event Listeners section.

* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.supportsDisablingEventListeners): Added.
(WI.DOMManager.supportsEventListenerBreakpoints): Added.
Common convenience functions for checking for protocol support.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.createEventListenerSection):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners .details-section.event-listener-section > .header > .event-listener-options): Added.
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners .details-section.event-listener-section:hover > .header > .event-listener-options): Added.
Add an options element that shows a context menu:
 - "Disable Event Listeners"/"Enable Event Listeners"
 - "Add Breakpoints"/"Delete Breakpoints"
Each action applies the corresponding state to all event listeners in that section.

* UserInterface/Views/EventListenerSectionGroup.js:
(WI.EventListenerSectionGroup):
(WI.EventListenerSectionGroup.prototype.get supportsStateModification): Added.
(WI.EventListenerSectionGroup.prototype.get isEventListenerDisabled): Added.
(WI.EventListenerSectionGroup.prototype.set isEventListenerDisabled): Added.
(WI.EventListenerSectionGroup.prototype.get hasEventListenerBreakpoint): Added.
(WI.EventListenerSectionGroup.prototype.set hasEventListenerBreakpoint): Added.
(WI.EventListenerSectionGroup.prototype._updateDisabledToggle): Added.
(WI.EventListenerSectionGroup.prototype._updateBreakpointToggle): Added.
(WI.EventListenerSectionGroup.prototype._createDisabledToggleRow): Deleted.
(WI.EventListenerSectionGroup.prototype._createBreakpointToggleRow): Deleted.
Expose a way to modify the event listener's state so that the UI (e.g. checkbox and title)
also get's updated.

* Localizations/en.lproj/localizedStrings.js:

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

18 months agoUpdate WebKitLegacy for XCBuild
krollin@apple.com [Wed, 31 Jul 2019 20:34:50 +0000 (20:34 +0000)]
Update WebKitLegacy for XCBuild
https://bugs.webkit.org/show_bug.cgi?id=200310
<rdar://problem/53773708>

Reviewed by Alex Christensen.

Bug 199771 (svn r247570) updated WebKitLegacy to use the unified-build
technique. Now update WebKitLegacy to build under XCBuild after those
changes. This work involves adding an "Apply Configuration to
XCFileLists" build target, adding a check-xcfilelists.sh script,
adding a "Check xcfilelists" build phase that calls that script,
adding knowledge of the project to the generate-xcfilelists script,
creating new .xcfilelist files, and adding those to the project.

Source/WebKitLegacy:

* UnifiedSources-output.xcfilelist: Added.
* WebKitLegacy.xcodeproj/project.pbxproj:
* scripts/check-xcfilelists.sh: Added.

Tools:

* Scripts/webkitpy/generate_xcfilelists_lib/application.py:
(Application.__init__):
* Scripts/webkitpy/generate_xcfilelists_lib/generators.py:
(JavaScriptCoreGenerator):
(WebCoreGenerator):
(WebKitGenerator):
(WebKitGenerator._get_generate_unified_sources_script):
(WebKitLegacyGenerator):
(WebKitLegacyGenerator._get_project_file_path):
(WebKitLegacyGenerator._get_generate_unified_sources_script):

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

18 months agoREGRESSION (r247486?): Flaky API Test TestWebKitAPI.WKWebView.LocalStorageProcessSuspends
cdumez@apple.com [Wed, 31 Jul 2019 17:37:51 +0000 (17:37 +0000)]
REGRESSION (r247486?): Flaky API Test TestWebKitAPI.WKWebView.LocalStorageProcessSuspends
https://bugs.webkit.org/show_bug.cgi?id=200086
<rdar://problem/53501721>

Reviewed by Alex Christensen.

Source/WebKit:

The test would first send a ProcessWillSuspendImminently IPC to the NetworkProcess and then
run JS in the WebContent process, which would in turn send IPC to the NetworkProcess. The
test was flaky because it expected the network process to receive the IPC from the UIProcess
*before* the one from the WebContent process. However, there is no guarantee about ordering
from IPC messages coming from different connections.

To address the flakiness, this patch introduces a new ProcessWillSuspendImminentlyForTesting
synchronous IPC and uses this instead. As a result, it is now guaranteed that the network
process processes this IPC *before* receiving any IPC from the WebContent process that is
the result of IPC from the UIProcess.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::processWillSuspendImminentlyForTestingSync):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _sendNetworkProcessWillSuspendImminently]):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminentlyForTesting):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::sendNetworkProcessWillSuspendImminentlyForTesting):
(WebKit::WebProcessPool::sendNetworkProcessWillSuspendImminently): Deleted.
* UIProcess/WebProcessPool.h:

Tools:

re-enable the API test.

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

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

18 months agoOwners of MultiChannelResampler should make sure that the output bus given to it...
youenn@apple.com [Wed, 31 Jul 2019 17:31:17 +0000 (17:31 +0000)]
Owners of MultiChannelResampler should make sure that the output bus given to it has the same number of channels
https://bugs.webkit.org/show_bug.cgi?id=200248
<rdar://problem/53411051>

Reviewed by Eric Carlson.

Source/WebCore:

When a track's number of channels changes, MediaStreamAudioSourceNode is expected
to update its MultiChannelResampler and its output number of channels.
MultiChannelResampler expects to have the same number of channels as the output
but it is not always the case since the channel numbers are changed in different threads
and locks do not help there.

Instead, whenever detecting that the number of channels do not match, render silence
and wait for the next rendering where the number of channels should again match.

Add internals API to change the number of channels from 2 to 1 or 1 to 2
to allow testing that code path (iOS only as MacOS audio capture is in UIProcess).
Covered by updated test.

* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::process):
* Modules/webaudio/MediaStreamAudioSourceNode.cpp:
(WebCore::MediaStreamAudioSourceNode::process):
* platform/audio/MultiChannelResampler.cpp:
(WebCore::MultiChannelResampler::process):
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
(WebCore::MockRealtimeAudioSourceMac::reconfigure):
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::setChannelCount):
* platform/mock/MockRealtimeAudioSource.h:
(isType):
* platform/mock/MockRealtimeVideoSource.h:
* testing/Internals.cpp:
(WebCore::Internals::setMockAudioTrackChannelNumber):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/mediastream/getUserMedia-webaudio-expected.txt:
* fast/mediastream/getUserMedia-webaudio.html:

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

18 months agoAnalysis task page should show build request author and creation time.
dewei_zhu@apple.com [Wed, 31 Jul 2019 16:28:02 +0000 (16:28 +0000)]
Analysis task page should show build request author and creation time.
https://bugs.webkit.org/show_bug.cgi?id=200274

Reviewed by Ryosuke Niwa.

Author and creation time of a build request should be visible in analysis task page.

* public/v3/pages/analysis-task-page.js: Added UI to show build request creation time and author.
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):

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

18 months agoFix 64-bit vs 32-bit mismatch in PersistentCoders.h
krollin@apple.com [Wed, 31 Jul 2019 16:26:57 +0000 (16:26 +0000)]
Fix 64-bit vs 32-bit mismatch in PersistentCoders.h
https://bugs.webkit.org/show_bug.cgi?id=200288
<rdar://problem/53734203>

Reviewed by Chris Dumez.

hashMapSize is declared as a uint64_t. It is passed to
HashMapType::reserveInitialCapacity, which takes an unsigned int. This
is a 32-bit value on 32-bit platforms, leading to a compile time
error. Fix his by casting hashMapSize to the expected type.

* wtf/persistence/PersistentCoders.h:

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

18 months agoFix 64-bit vs 32-bit mismatch in LogArgument
krollin@apple.com [Wed, 31 Jul 2019 16:13:33 +0000 (16:13 +0000)]
Fix 64-bit vs 32-bit mismatch in LogArgument
https://bugs.webkit.org/show_bug.cgi?id=200286
<rdar://problem/53733671>

Reviewed by Darin Adler.

LogArgument is a utility for converting scalars into strings. It has a
number of versions of a toString() method that is specialized for each
type and converts the value to a string in a manner appropriate for
that type. However, the versions of toString() for "long long" and
"unsigned long long" are actually declared to take an "long" or
"unsigned long" as a parameter. This difference leads to a 64-bit vs
32-bit build error on 32-bit systems. Fix this by specifying
correct/matching types.

* wtf/Logger.h:
(WTF::LogArgument::toString):

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

18 months agoElement.outerHTML is missing attribute prefixes in some cases in HTML documents
cdumez@apple.com [Wed, 31 Jul 2019 15:12:41 +0000 (15:12 +0000)]
Element.outerHTML is missing attribute prefixes in some cases in HTML documents
https://bugs.webkit.org/show_bug.cgi?id=200283

Reviewed by Ryosuke Niwa.

Source/WebCore:

When HTML serializing a prefixed element attribute, we should always serialize the
prefix as per [1]. However, our code was only serializing the well-known ones (xml,
xmlns & xlink).

[1] https://html.spec.whatwg.org/#attribute's-serialised-name

Test: fast/dom/Element/outerHTML-prefixed-attribute.html

* editing/MarkupAccumulator.cpp:
(WebCore::htmlAttributeSerialization):
(WebCore::MarkupAccumulator::xmlAttributeSerialization):
(WebCore::MarkupAccumulator::appendAttribute):
* editing/MarkupAccumulator.h:

LayoutTests:

Add layout test coverage.

* fast/dom/Element/outerHTML-prefixed-attribute-expected.txt: Added.
* fast/dom/Element/outerHTML-prefixed-attribute.html: Added.

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

18 months agoUnreviewed WPE and GTK gardening. Adding some failure expectations as
zandobersek@gmail.com [Wed, 31 Jul 2019 14:54:08 +0000 (14:54 +0000)]
Unreviewed WPE and GTK gardening. Adding some failure expectations as
well as updating baselines for WPT tests where the behavior improved or
has just changed in the type of error(s) reported.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:
* platform/wpe/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/service-workers/service-worker/ready.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/service-workers/service-worker/windowclient-navigate.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/websockets: Added.
* platform/wpe/imported/w3c/web-platform-tests/websockets/bufferedAmount-unchanged-by-sync-xhr.any.worker-expected.txt: Added.

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

18 months ago[GStreamer] Fix printf format warnings for 32-bit build in GST traces
commit-queue@webkit.org [Wed, 31 Jul 2019 14:47:32 +0000 (14:47 +0000)]
[GStreamer] Fix printf format warnings for 32-bit build in GST traces
https://bugs.webkit.org/show_bug.cgi?id=200299

Patch by Loïc Yhuel <loic.yhuel@softathome.com> on 2019-07-31
Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): %zu for size_t
(WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered): Ditto
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcCreate): G_GUINT64_FORMAT for uint64_t
* platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp: G_GINT64_FORMAT for int64_t
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: Ditto

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

18 months ago[iOS 13] Safari crashes when closing a tab with a focused element if the unified...
wenson_hsieh@apple.com [Wed, 31 Jul 2019 14:41:16 +0000 (14:41 +0000)]
[iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus
https://bugs.webkit.org/show_bug.cgi?id=200291
<rdar://problem/53717946>

Reviewed by Megan Gardner.

Source/WebKit:

Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed,
and there is no Connection object to use when waiting for a sync IPC response.

Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage

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

Tools:

Add an API test to exercise the scenario of synchronously requesting the autocorrection context immediately
after closing the web view, while the web view's content view isn't the first responder.

* TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm:
* TestWebKitAPI/ios/UIKitSPI.h:

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

18 months agoAX: com.apple.WebKit.WebContent at com.apple.WebKit: -[WKAccessibilityWebPageObject...
cfleizach@apple.com [Wed, 31 Jul 2019 14:38:42 +0000 (14:38 +0000)]
AX: com.apple.WebKit.WebContent at com.apple.WebKit: -[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]
https://bugs.webkit.org/show_bug.cgi?id=200277
<rdar://problem/49475009>

Reviewed by Per Arne Vollan.

Verify Page is available before calling into it.

* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):

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

18 months agoAX: Re-enable accessibility/set-selected-text-range-after-newline.html test.
commit-queue@webkit.org [Wed, 31 Jul 2019 14:36:06 +0000 (14:36 +0000)]
AX: Re-enable accessibility/set-selected-text-range-after-newline.html test.
https://bugs.webkit.org/show_bug.cgi?id=199431
<rdar://problem/52563340>

Patch by Andres Gonzalez <andresg_22@apple.com> on 2019-07-31
Reviewed by Chris Fleizach.

Source/WebCore:

- Re-enabled LayoutTests/accessibility/set-selected-text-range-after-newline.html.
- Put back workaround in visiblePositionForIndexUsingCharacterIterator
that is needed for several accessibility issues.
- This workaround was rolled back because it was thought the cause of:
https://bugs.webkit.org/show_bug.cgi?id=199434
It turned out that the actual cause of that hang was unrelated and was
fixed in:
https://bugs.webkit.org/show_bug.cgi?id=199845

* editing/Editing.cpp:
(WebCore::visiblePositionForIndexUsingCharacterIterator):

LayoutTests:

* TestExpectations:
* accessibility/ios-simulator/set-selected-text-range-after-newline.html: Removed because it was the same as the one in the parent accessibility directory, so enabling it for iOS in ios-wk2/TestExpectations.
* platform/ios-wk2/TestExpectations:

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

18 months agoUnreviewed GTK gardening. Update expectations after r248033.
carlosgc@webkit.org [Wed, 31 Jul 2019 13:22:45 +0000 (13:22 +0000)]
Unreviewed GTK gardening. Update expectations after r248033.

* platform/gtk/TestExpectations:
* platform/gtk/fast/forms/datalist/datalist-searchinput-appearance-expected.png: Added.
* platform/gtk/fast/forms/datalist/datalist-searchinput-appearance-expected.txt: Added.
* platform/gtk/fast/forms/datalist/datalist-textinput-appearance-expected.png: Added.
* platform/gtk/fast/forms/datalist/datalist-textinput-appearance-expected.txt: Added.

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

18 months agoUnreviewed WPE gardening. Rebaselining the straightforward cases.
zandobersek@gmail.com [Wed, 31 Jul 2019 13:08:28 +0000 (13:08 +0000)]
Unreviewed WPE gardening. Rebaselining the straightforward cases.

* platform/wpe/css3/flexbox/flexbox-baseline-margins-expected.txt:
* platform/wpe/fast/dom/Window/window-properties-geolocation-expected.txt:
* platform/wpe/fast/xsl/sort-locale-expected.txt:
* platform/wpe/http/tests/dom/same-origin-detached-window-properties-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.worker-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/service-workers/service-worker/websocket-in-service-worker.https-expected.txt:
* platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt:

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

18 months agoWeb Inspector: Second call to setAttributeNS creates non-prefixed attribute
drousso@apple.com [Wed, 31 Jul 2019 08:53:39 +0000 (08:53 +0000)]
Web Inspector: Second call to setAttributeNS creates non-prefixed attribute
https://bugs.webkit.org/show_bug.cgi?id=200230
<rdar://problem/53712672>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Original patch by Chris Dumez <cdumez@apple.com>.

Test: inspector/dom/attributeModified.html

* dom/Element.cpp:
(WebCore::Element::didAddAttribute):
(WebCore::Element::didModifyAttribute):
(WebCore::Element::didRemoveAttribute):
Use the fully qualified name, not just the local name, when notifying the inspector frontend
about changes to attributes.

LayoutTests:

* inspector/dom/attributeModified.html: Added.
* inspector/dom/attributeModified-expected.txt: Added.

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

18 months ago[GTK] Datalist element support for TextFieldInputType
carlosgc@webkit.org [Wed, 31 Jul 2019 08:02:09 +0000 (08:02 +0000)]
[GTK] Datalist element support for TextFieldInputType
https://bugs.webkit.org/show_bug.cgi?id=98934

Reviewed by Michael Catanzaro.

.:

Enable DATALIST_ELEMENT.

* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

Add support for rendering the arrow indicator of text fields having data list.

* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::RenderThemeGtk::adjustListButtonStyle const):
(WebCore::RenderThemeGtk::paintListButtonForInput):
(WebCore::RenderThemeGtk::adjustSearchFieldStyle const):
* rendering/RenderThemeGtk.h:

Source/WebKit:

Add a WebDataListSuggestionsDropdown implementation for the GTK port using a popup window with a tree view list.

* Sources.txt:
* SourcesGTK.txt:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDataListSuggestionsDropdown):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp: Added.
(WebKit::firstTimeItemSelectedCallback):
(WebKit::WebDataListSuggestionsDropdownGtk::WebDataListSuggestionsDropdownGtk):
(WebKit::WebDataListSuggestionsDropdownGtk::~WebDataListSuggestionsDropdownGtk):
(WebKit::WebDataListSuggestionsDropdownGtk::treeViewRowActivatedCallback):
(WebKit::WebDataListSuggestionsDropdownGtk::didSelectOption):
(WebKit::WebDataListSuggestionsDropdownGtk::show):
(WebKit::WebDataListSuggestionsDropdownGtk::handleKeydownWithIdentifier):
(WebKit::WebDataListSuggestionsDropdownGtk::close):
* UIProcess/gtk/WebDataListSuggestionsDropdownGtk.h: Copied from Tools/WebKitTestRunner/gtk/UIScriptControllerGtk.h.

Tools:

Implement UIScriptControllerGtk::isShowingDataListSuggestions.

* WebKitTestRunner/gtk/UIScriptControllerGtk.cpp:
(WTR::UIScriptControllerGtk::isShowingDataListSuggestions const):
* WebKitTestRunner/gtk/UIScriptControllerGtk.h:

LayoutTests:

Unskip datalist tests for GTK port.

* platform/gtk/TestExpectations:

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

18 months agoRemove WebKit2 Makefile guards for pre-Snow Leopard macOS
timothy_horton@apple.com [Wed, 31 Jul 2019 07:37:47 +0000 (07:37 +0000)]
Remove WebKit2 Makefile guards for pre-Snow Leopard macOS
https://bugs.webkit.org/show_bug.cgi?id=200294

Reviewed by Dan Bernstein.

* Makefile:
It seems ... unlikely ... that anyone is trying to build
trunk WebKit for Leopard or prior.

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

18 months agoUnreviewed WPE gardening.
zandobersek@gmail.com [Wed, 31 Jul 2019 07:07:28 +0000 (07:07 +0000)]
Unreviewed WPE gardening.

* platform/wpe/TestExpectations:
Skip tests invoking the UIScriptController interface for which WPE
doesn't yet provide an implementation, resulting in crashes.

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

18 months agoRemove some needless comments that snuck into the tree
timothy_horton@apple.com [Wed, 31 Jul 2019 05:18:12 +0000 (05:18 +0000)]
Remove some needless comments that snuck into the tree

* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::setHardwareKeyboardAttached):
(WTR::UIScriptController::playBackEventStream):

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

18 months ago[WebKit] Add PageLoadState::Observer C API
Hironori.Fujii@sony.com [Wed, 31 Jul 2019 05:13:18 +0000 (05:13 +0000)]
[WebKit] Add PageLoadState::Observer C API
https://bugs.webkit.org/show_bug.cgi?id=199848

Reviewed by Alex Christensen.

Source/WebKit:

There is no WebKit C API to get the timing of title changed since
WKPageLoaderClientV0::didReceiveTitleForFrame has been removed in
r235398. Cocoa and glib WebKit API exist.

* PlatformWin.cmake:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageStateClient):
* UIProcess/API/C/WKPage.h: Added WKPageSetPageStateClient.
* UIProcess/API/C/WKPageStateClient.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setPageLoadStateObserver):
* UIProcess/WebPageProxy.h:
* WebKit.xcodeproj/project.pbxproj:

Tools:

* MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::didChangeTitle):
(WebKitBrowserWindow::didFinishNavigation): Deleted.
* MiniBrowser/win/WebKitBrowserWindow.h:
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/PageLoadState.cpp: Added.
(TestWebKitAPI::PageLoadTestState::PageLoadTestState):
(TestWebKitAPI::didChangeActiveURL):
(TestWebKitAPI::didChangeCanGoBack):
(TestWebKitAPI::didChangeCanGoForward):
(TestWebKitAPI::didChangeCertificateInfo):
(TestWebKitAPI::didChangeEstimatedProgress):
(TestWebKitAPI::didChangeHasOnlySecureContent):
(TestWebKitAPI::didChangeIsLoading):
(TestWebKitAPI::didChangeNetworkRequestsInProgress):
(TestWebKitAPI::didChangeTitle):
(TestWebKitAPI::didChangeWebProcessIsResponsive):
(TestWebKitAPI::didSwapWebProcesses):
(TestWebKitAPI::willChangeActiveURL):
(TestWebKitAPI::willChangeCanGoBack):
(TestWebKitAPI::willChangeCanGoForward):
(TestWebKitAPI::willChangeCertificateInfo):
(TestWebKitAPI::willChangeEstimatedProgress):
(TestWebKitAPI::willChangeHasOnlySecureContent):
(TestWebKitAPI::willChangeIsLoading):
(TestWebKitAPI::willChangeNetworkRequestsInProgress):
(TestWebKitAPI::willChangeTitle):
(TestWebKitAPI::willChangeWebProcessIsResponsive):
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):

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

18 months agoASSERTion failure under takeSnapshot after r247846
timothy_horton@apple.com [Wed, 31 Jul 2019 05:01:42 +0000 (05:01 +0000)]
ASSERTion failure under takeSnapshot after r247846

* page/TextIndicator.cpp:
(WebCore::takeSnapshots):
We now sometimes inflate the scale factor; allow this.

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

18 months ago[JSC] Emit write barrier after storing instead of before storing
ysuzuki@apple.com [Wed, 31 Jul 2019 01:35:40 +0000 (01:35 +0000)]
[JSC] Emit write barrier after storing instead of before storing
https://bugs.webkit.org/show_bug.cgi?id=200193

Reviewed by Saam Barati.

I reviewed tricky GC-related code including visitChildren and manual writeBarrier, and I found that we have several problems with write-barriers.

1. Some write-barriers are emitted before stores happen

    Some code like LazyProperty emits write-barrier before we store the value. This is wrong since JSC has concurrent collector. Let's consider the situation like this.

        1. Cell "A" is not marked yet
        2. Write-barrier is emitted onto "A"
        3. Concurrent collector scans "A"
        4. Store to "A"'s field happens
        5. (4)'s field is not rescaned

    We should emit write-barrier after stores. This patch places write-barriers after stores happen.

2. Should emit write-barrier after the stored fields are reachable from the owner.

    We have code that is logically the same to the following.

        ```
        auto data = std::make_unique<XXX>();
        data->m_field.set(vm, owner, value);

        storeStoreBarrier();
        owner->m_data = WTFMove(data);
        ```

    This is not correct. When write-barrier is emitted, the owner cannot reach to the field that is stored.
    The actual example is AccessCase. We are emitting write-barriers with owner when creating AccessCase, but this is not
    effective until this AccessCase is chained to StructureStubInfo, which is reachable from CodeBlock.

    I don't think this is actually an issue because currently AccessCase generation is guarded by CodeBlock->m_lock. And CodeBlock::visitChildren takes this lock.
    But emitting a write-barrier at the right place is still better. This patch places write-barriers when StructureStubInfo::addAccessCase is called.

Speculative GC fix, it was hard to reproduce the crash since we need to control concurrent collector and main thread's scheduling in an instruction-level.

* bytecode/BytecodeList.rb:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::addAccessCase):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::considerCaching):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setupGetByIdPrototypeCache):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/LazyPropertyInlines.h:
(JSC::ElementType>::setMayBeNull):
* runtime/RegExpCachedResult.h:
(JSC::RegExpCachedResult::record):

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

18 months ago[JSC] Make StructureChain less-tricky by using Auxiliary Buffer
ysuzuki@apple.com [Wed, 31 Jul 2019 01:22:20 +0000 (01:22 +0000)]
[JSC] Make StructureChain less-tricky by using Auxiliary Buffer
https://bugs.webkit.org/show_bug.cgi?id=200192

Reviewed by Saam Barati.

JSTests:

* stress/structure-chain-stress.js: Added.
(keys):

Source/JavaScriptCore:

StructureChain has a bit tricky write barrier / mutator fence to use UniqueArray for its underlying storage.
But, since the size of StructureChain is fixed at initialization, we should allocate an underlying storage from auxiliary memory and
set it in its constructor instead of finishCreation. We can store values in the finishCreation so that we do not need to have
a hacky write-barrier and mutator fence. Furthermore, we can make StructureChain non-destructible.

This patch leverages auxiliary buffer for the implementation of StructureChain. And it also adds a test that stresses StructureChain creation.

* runtime/StructureChain.cpp:
(JSC::StructureChain::StructureChain):
(JSC::StructureChain::create):
(JSC::StructureChain::finishCreation):
(JSC::StructureChain::visitChildren):
(JSC::StructureChain::destroy): Deleted.
* runtime/StructureChain.h:

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

18 months ago[WHLSL] Add a fast path for TypeNamer::insert where we've already seen the type
sbarati@apple.com [Wed, 31 Jul 2019 00:31:43 +0000 (00:31 +0000)]
[WHLSL] Add a fast path for TypeNamer::insert where we've already seen the type
https://bugs.webkit.org/show_bug.cgi?id=200284

Reviewed by Myles C. Maxfield.

This is a ~27% speedup in the WHLSL::prepare for the compute_boids test.
This optimization makes sense since my previous patch to make UnnamedType
ref counted was also a huge speedup. So the TypeNamer is seeing many
UnnamedTypes which are the same pointer value. On compute_boids, this
makes generateMetalCode ~40ms faster.

* Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
(WebCore::WHLSL::Metal::TypeNamer::insert):

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

18 months agoWorkerGlobalScope::wrapCryptoKey/unwrapCryptoKey should use local heap objects for...
rniwa@webkit.org [Tue, 30 Jul 2019 23:52:55 +0000 (23:52 +0000)]
WorkerGlobalScope::wrapCryptoKey/unwrapCryptoKey should use local heap objects for replies
https://bugs.webkit.org/show_bug.cgi?id=200179
<rdar://problem/52334658>

Reviewed by Brent Fulgham.

Based on the patch by Jiewen Tan.

WorkerGlobalScope::wrapCryptoKey and WorkerGlobalScope::unwrapCryptoKey had a bug that they could exit
the function before the main thread had finished writing to the result vector passed in to these functions
when the worker's runloop receives MessageQueueTerminated before the main thread finishes writing.

Fixed the bug by creating a new temporary Vector inside a ThreadSafeRefCounted object shared between
the main thread and the worker thread, which extends the lifetime of the Vector until when the worker thread
receives the result or when the main thread finishes writing to the Vector, whichever happens last.

Unfortunately no new tests since there is no reproducible test case, and this crash is highly racy.

* workers/WorkerGlobalScope.cpp:
(WebCore::CryptoBufferContainer): Added.
(WebCore::CryptoBufferContainer::create): Added.
(WebCore::CryptoBufferContainer::buffer): Added.
(WebCore::WorkerGlobalScope::wrapCryptoKey):
(WebCore::WorkerGlobalScope::unwrapCryptoKey):

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

18 months ago[WHLSL] Checker sets wrong type for property access instruction with an ander
sbarati@apple.com [Tue, 30 Jul 2019 23:42:30 +0000 (23:42 +0000)]
[WHLSL] Checker sets wrong type for property access instruction with an ander
https://bugs.webkit.org/show_bug.cgi?id=200282

Reviewed by Myles C. Maxfield.

Source/WebCore:

We were assigning resulting type based on the base value instead of the ander
of the base value. For example, consider:
```
struct Point { float x; float y; }
compute main(device Point[] buffer) { buffer[0]; }
```

The local variable "buffer" is in the "thread" address space. So we would end up
trying to use the thread address space for "buffer[0]". This caused us to
generate invalid Metal code because we would call a "thread" ander with a
"device" pointer. The fix is to use the "device" address space, which is
the type of the ander we were already setting on this property access instruction.

Test: webgpu/whlsl/device-proper-type-checker.html

* Modules/webgpu/WHLSL/WHLSLChecker.cpp:
(WebCore::WHLSL::Checker::finishVisiting):

LayoutTests:

* webgpu/whlsl/device-proper-type-checker-expected.txt: Added.
* webgpu/whlsl/device-proper-type-checker.html: Added.

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

18 months ago[WHLSL] Make ASTDumper dump types and address spaces
sbarati@apple.com [Tue, 30 Jul 2019 23:41:04 +0000 (23:41 +0000)]
[WHLSL] Make ASTDumper dump types and address spaces
https://bugs.webkit.org/show_bug.cgi?id=200281

Reviewed by Robin Morisset.

This makes it much easier to gain insight into what type resolution
the checker does. I used this logging to debug https://bugs.webkit.org/show_bug.cgi?id=200282

* Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
(WebCore::WHLSL::AST::TypeAnnotation::isAbstractLeftValue const):
* Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
* Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
* Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
* Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
(WebCore::WHLSL::ASTDumper::visit):

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

18 months ago[FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit
bfulgham@apple.com [Tue, 30 Jul 2019 22:36:14 +0000 (22:36 +0000)]
[FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit
https://bugs.webkit.org/show_bug.cgi?id=200270

Reviewed by Dean Jackson.

Refactor the Direct2D code in WebCore so that the core routines can be shared
between GraphicsContext and GraphicsContextImpl. Implement PlatformContext,
BackingStoreBackend, and GraphicsContextImpl for the Direct2D engine.

This patch effectively just moves code around.

* PlatformFTW.cmake:
* platform/graphics/GraphicsContext.h:
* platform/graphics/GraphicsContextImpl.h:
* platform/graphics/ImageSource.cpp:
* platform/graphics/Pattern.h:
* platform/graphics/displaylists/DisplayListRecorder.cpp:
* platform/graphics/displaylists/DisplayListRecorder.h:
* platform/graphics/win/BackingStoreBackendDirect2D.h: Added.
* platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: Added.
* platform/graphics/win/BackingStoreBackendDirect2DImpl.h: Added.
* platform/graphics/win/Direct2DOperations.cpp: Added.
* platform/graphics/win/Direct2DOperations.h: Added.
* platform/graphics/win/Direct2DUtilities.cpp: Added.
* platform/graphics/win/Direct2DUtilities.h: Added.
* platform/graphics/win/FontCascadeDirect2D.cpp:
* platform/graphics/win/GradientDirect2D.cpp:
* platform/graphics/win/GraphicsContextDirect2D.cpp:
* platform/graphics/win/GraphicsContextImplDirect2D.cpp: Added.
* platform/graphics/win/GraphicsContextImplDirect2D.h: Added.
* platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
* platform/graphics/win/ImageBufferDataDirect2D.h:
* platform/graphics/win/ImageBufferDirect2D.cpp:
* platform/graphics/win/NativeImageDirect2D.cpp:
* platform/graphics/win/PathDirect2D.cpp:
* platform/graphics/win/PatternDirect2D.cpp:
* platform/graphics/win/PlatformContextDirect2D.cpp: Added.
* platform/graphics/win/PlatformContextDirect2D.h: Added.
* platform/win/DragImageWin.cpp:
* svg/graphics/SVGImage.cpp:

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

18 months agoWeb Inspector: Resources: Display outline around images when viewing image collections
nvasilyev@apple.com [Tue, 30 Jul 2019 22:25:14 +0000 (22:25 +0000)]
Web Inspector: Resources: Display outline around images when viewing image collections
https://bugs.webkit.org/show_bug.cgi?id=200212

Reviewed by Devin Rousso.

* UserInterface/Views/CollectionContentView.css:
(.content-view.collection .resource.image img):
(.content-view.collection .resource.image img:hover):

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

18 months agoREGRESSION(r241288): Text on Yahoo Japan mobile looks too bold
mmaxfield@apple.com [Tue, 30 Jul 2019 21:48:27 +0000 (21:48 +0000)]
REGRESSION(r241288): Text on Yahoo Japan mobile looks too bold
https://bugs.webkit.org/show_bug.cgi?id=200065
<rdar://problem/50912757>

Reviewed by Simon Fraser.

Source/WebCore:

Before r241288, we were mapping Japanese sans-serif to Hiragino Kaku Gothic ProN, which
has a 300 weight and a 600 weight. However, we can't use that font because it's user-installed,
so in r241288 we switched to using Hiragino Sans, which has a 300 weight, a 600 weight, and an
800 weight. According to the CSS font selection algorithm, sites that request a weight of 700
would get the 800 weight instead of the 600 weight, which caused the text to look too heavy.
Therefore, the apparent visual change is from a weight change from 600 to 800.

In general, this is working as intended. However, text on Yahoo Japan looks too heavy in weight
800. Instead, this patch adds a quirk specific to Yahoo Japan that overwrites any font requests
to give them a weight of 600 instead of 700. This way, the lighter font will be used.

No new tests because quirks cannot be tested.

* css/CSSFontSelector.cpp:
(WebCore::resolveGenericFamily):
(WebCore::CSSFontSelector::fontRangesForFamily):
* page/Quirks.cpp:
(WebCore::Quirks::shouldLightenJapaneseBoldSansSerif const):
* page/Quirks.h:

Source/WTF:

* wtf/Platform.h:

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

18 months agoAdd test expectations and baselines for iPad
ryanhaddad@apple.com [Tue, 30 Jul 2019 21:04:54 +0000 (21:04 +0000)]
Add test expectations and baselines for iPad
https://bugs.webkit.org/show_bug.cgi?id=199711

Unreviewed test gardening.

* platform/ipad-12/TestExpectations: Added.
* platform/ipad-12/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt: Copied from LayoutTests/platform/ipad/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt.
* platform/ipad-12/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt: Copied from LayoutTests/platform/ipad/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt.
* platform/ipad-12/fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor-expected.txt: Copied from LayoutTests/platform/ipad/fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor-expected.txt.
* platform/ipad-12/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt: Copied from LayoutTests/platform/ipad/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt.
* platform/ipad-12/platform/ios/ios/fast/text/opticalFontWithTextStyle-expected.txt: Copied from LayoutTests/platform/ipad/platform/ios/ios/fast/text/opticalFontWithTextStyle-expected.txt.
* platform/ipad-12/scrollingcoordinator/ios/ui-scrolling-tree-expected.txt: Copied from LayoutTests/platform/ipad/scrollingcoordinator/ios/ui-scrolling-tree-expected.txt.
* platform/ipad/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt: Added.
* platform/ipad/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: Added.
* platform/ipad/editing/caret/ios/fixed-caret-position-after-scroll-expected.txt: Added.
* platform/ipad/editing/selection/ios/do-not-hide-selection-in-visible-container-expected.txt: Added.
* platform/ipad/fast/dom/navigator-iOS-userAgent-expected.txt: Added.
* platform/ipad/fast/scrolling/ios/change-scrollability-on-content-resize-nested-expected.txt: Added.
* platform/ipad/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt:
* platform/ipad/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt:
* platform/ipad/fast/scrolling/ios/reconcile-layer-position-recursive-expected.txt: Added.
* platform/ipad/fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor-expected.txt:
* platform/ipad/fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta-expected.txt: Added.
* platform/ipad/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt:
* platform/ipad/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height-expected.txt: Added.
* platform/ipad/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight-expected.txt: Added.
* platform/ipad/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth-expected.txt: Added.
* platform/ipad/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width-expected.txt: Added.
* platform/ipad/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-innerheight-innerwidth-expected.txt: Added.
* platform/ipad/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-width-height-expected.txt: Added.
* platform/ipad/imported/w3c/web-platform-tests/workers/WorkerNavigator_platform-expected.txt: Added.
* platform/ipad/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/004-expected.txt: Added.
* platform/ipad/platform/ios/ios/fast/text/opticalFontWithTextStyle-expected.txt:
* platform/ipad/scrollingcoordinator/ios/fixed-in-frame-layer-reconcile-layer-position-expected.txt: Added.
* platform/ipad/scrollingcoordinator/ios/fixed-in-overflow-scroll-scrolling-tree-expected.txt: Added.
* platform/ipad/scrollingcoordinator/ios/fixed-scrolling-with-keyboard-expected.txt: Copied from LayoutTests/platform/ipad/scrollingcoordinator/ios/ui-scrolling-tree-expected.txt.
* platform/ipad/scrollingcoordinator/ios/non-stable-viewport-scroll-expected.txt: Added.
* platform/ipad/scrollingcoordinator/ios/ui-scrolling-tree-expected.txt:

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

18 months agoDumpRenderTree.app: Add CFBundleShortVersionString
jbedard@apple.com [Tue, 30 Jul 2019 21:01:39 +0000 (21:01 +0000)]
DumpRenderTree.app: Add CFBundleShortVersionString
https://bugs.webkit.org/show_bug.cgi?id=200269
<rdar://problem/53412596>

Rubber-stamped by Aakash Jain.

* DumpRenderTree/ios/Info.plist:

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

18 months agoCan't scroll on yummly.co.uk recipe (scale(0) div covers the content and hit-tests)
simon.fraser@apple.com [Tue, 30 Jul 2019 20:21:25 +0000 (20:21 +0000)]
Can't scroll on yummly.co.uk recipe (scale(0) div covers the content and hit-tests)
https://bugs.webkit.org/show_bug.cgi?id=200263
rdar://problem/53679408

Reviewed by Antti Koivisto.

Source/WebKit:

The content on this page had a scale(0) div overlaying an overflow:scroll element,
and our UI-side hit-testing code would find this scale(0) element, because apparently
-[UIView convertPoint:fromView:] will happily work with non-invertible matrices, and
-[UIView pointInside:withEvent:] just compares the point with the view bounds.

Since the view frame takes the transform into account, we can look for an empty frame
to detect these non-invertible transforms.

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(WebKit::collectDescendantViewsAtPoint):

LayoutTests:

* fast/scrolling/ios/non-invertible-transformed-over-scroller-expected.txt: Added.
* fast/scrolling/ios/non-invertible-transformed-over-scroller.html: Added.

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

18 months agoFix non-thread safe use of WeakPtr under sendSecItemRequest()
cdumez@apple.com [Tue, 30 Jul 2019 19:54:27 +0000 (19:54 +0000)]
Fix non-thread safe use of WeakPtr under sendSecItemRequest()
https://bugs.webkit.org/show_bug.cgi?id=200249

Reviewed by Alex Christensen.

The function was calling globalNetworkProcess() from a background thread. This is not safe because
globalNetworkProcess() deferences a WeakPtr<NetworkProcess> internally and the NetworkProcess object
gets destroyed on the main thread.

* Shared/mac/SecItemShim.cpp:
(WebKit::sendSecItemRequest):

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

18 months agoUnreviewed, fix GTK build after SoupNetworkSession ownership rework.
mcatanzaro@igalia.com [Tue, 30 Jul 2019 18:41:44 +0000 (18:41 +0000)]
Unreviewed, fix GTK build after SoupNetworkSession ownership rework.

* platform/network/soup/SocketStreamHandleImplSoup.cpp:

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

18 months ago[GTK] Compilation errors when GL is disabled
mcatanzaro@igalia.com [Tue, 30 Jul 2019 17:28:57 +0000 (17:28 +0000)]
[GTK] Compilation errors when GL is disabled
https://bugs.webkit.org/show_bug.cgi?id=200223

Unreviewed, keep trying to fix build with -DENABLE_OPENGL=OFF.

The previous commit was sufficient for the 2.24 branch, but on trunk there are more
problems. This doesn't solve all of them, but it gets us closer.

* SourcesGTK.txt:
* platform/graphics/GLContext.h:

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

18 months agopicture-in-picture.html fails because webkitpresentationmodechanged sometimes dispatc...
dbates@webkit.org [Tue, 30 Jul 2019 17:23:09 +0000 (17:23 +0000)]
picture-in-picture.html fails because webkitpresentationmodechanged sometimes dispatched multiple times
using Apple Internal build
<rdar://problem/36455352>

Workaround by only listening for the first webkitpresentationmodechanged event dispatched. This test
is the canary in the coal mine that revealed that multiple webkitpresentationmodechanged events are
dispatched when one is expected. However this was not the primary purpose of the test and in absence
of a timeframe for a fix for <rdar://problem/36455352> work around this bug to avoid losing test coverage
when using an Apple Internal build.

* platform/ipad/media/controls/resources/picture-in-picture.html:

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

18 months ago[SOUP] Move SoupNetworkSession ownership from NetworkStorageSession to NetworkSession
carlosgc@webkit.org [Tue, 30 Jul 2019 16:31:05 +0000 (16:31 +0000)]
[SOUP] Move SoupNetworkSession ownership from NetworkStorageSession to NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=200076

Reviewed by Michael Catanzaro.

Source/WebCore:

Remove the SoupNetworkSession from NetworkStorageSession.

* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::cookieStorage const): Return the cookie jar.
* platform/network/StorageSessionProvider.h:
(WebCore::StorageSessionProvider::soupSession const): Temporary add this virtual method that is required by
SocketStreamHandleImplSoup. It will be removed once we switch to libsoup WebSockets API soon.
* platform/network/soup/DNSResolveQueueSoup.cpp:
(WebCore::globalDefaultSoupSessionAccessor): Rework the accessor to return the SoupSession directly since
that's what we really want.
(WebCore::DNSResolveQueueSoup::setGlobalDefaultSoupSessionAccessor):
(WebCore::DNSResolveQueueSoup::updateIsUsingProxy):
(WebCore::DNSResolveQueueSoup::platformResolve):
(WebCore::DNSResolveQueueSoup::resolve):
* platform/network/soup/DNSResolveQueueSoup.h:
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession): Create and setup the default cookie jar.
(WebCore::NetworkStorageSession::~NetworkStorageSession): Only disconnect the cookie jar signals.
(WebCore::NetworkStorageSession::setCookieStorage): Update the cookie jar, now we know it's always a new one.
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::create): Use the new virtual method from StorageSessionProvider to get the SoupSession.
* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::SoupNetworkSession): Remove the SoupCookieJar parameter.
* platform/network/soup/SoupNetworkSession.h:

Source/WebKit:

NetworkStorageSession should only own the cookie jar, since it's the only thing it handles from the session.

* NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
(WebKit::WebCookieManager::setCookiePersistentStorage): Use the network session instead of the storage session
to set the peristent cookie storage.
* NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
(WebKit::LegacyCustomProtocolManager::registerScheme): Iterate network sessions instead of storage sessions to
access the SoupNetworkSession.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated): Use
NetworkProcess::forEachNetworkSession() to iterate network sessions.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::lowMemoryHandler): Ditto.
(WebKit::NetworkProcess::forEachNetworkSession): Added to iterate network sessions intead of exposing the map
that is always used to iterate the sessions.
(WebKit::NetworkProcess::switchToNewTestingSession): Use the new NetworkStorageSession constructor API.
(WebKit::NetworkProcess::ensureSession): Ditto.
(WebKit::NetworkProcess::destroySession): Allow to destroy the default session for soup based ports. This is
only called right before process exit to ensure we don't leak network resources like the cookies database.
(WebKit::NetworkProcess::setResourceLoadStatisticsEnabled): Use NetworkProcess::forEachNetworkSession() to
iterate network sessions.
(WebKit::NetworkProcess::fetchWebsiteData): Ditto.
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins): Ditto.
(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains): Ditto.
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData): Ditto.
(WebKit::NetworkProcess::setCacheModel): Ditto.
(WebKit::NetworkProcess::actualPrepareToSuspend): Ditto.
(WebKit::NetworkProcess::resume): Ditto.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkStorageSessionProvider.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearDiskCache): Ditto.
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Ditto.
* NetworkProcess/soup/NetworkProcessMainSoup.cpp: Destroy the default session before process exists.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::userPreferredLanguagesChanged): Iterate network sessions instead of storage sessions to
access the SoupNetworkSession.
(WebKit::NetworkProcess::platformCreateDefaultStorageSession const): Use the new NetworkStorageSession constructor API.
(WebKit::NetworkProcess::clearDiskCache): Use NetworkProcess::forEachNetworkSession() to iterate network sessions.
(WebKit::NetworkProcess::setNetworkProxySettings): Iterate network sessions instead of storage sessions to
access the SoupNetworkSession.
* NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::NetworkSessionSoup): Create the SoupNetworkSession and setup cookies.
(WebKit::NetworkSessionSoup::soupSession const): Return the SoupSession of SoupNetworkSession.
(WebKit::NetworkSessionSoup::setCookiePersistentStorage): Setup a new cookie jar.
* NetworkProcess/soup/NetworkSessionSoup.h:

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

18 months ago[GTK] Compilation errors when GL is disabled
mcatanzaro@igalia.com [Tue, 30 Jul 2019 16:17:38 +0000 (16:17 +0000)]
[GTK] Compilation errors when GL is disabled
https://bugs.webkit.org/show_bug.cgi?id=200223

Unreviewed, fix build with -DENABLE_OPENGL=OFF.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

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

18 months agoFix CRASH_WITH_INFO() so that it doesn't complain about unused parameters on non...
mcatanzaro@igalia.com [Tue, 30 Jul 2019 16:04:44 +0000 (16:04 +0000)]
Fix CRASH_WITH_INFO() so that it doesn't complain about unused parameters on non Clang / MSVC compilers.
https://bugs.webkit.org/show_bug.cgi?id=200243

Reviewed by Mark Lam.

For GCC, we'll implement WTFCrashWithInfo as a function rather than a macro. To use
##__VA_ARGS we would need to enable GNU extensions, and don't want to do that. The proper
solution, format __VA_OPT__(,) __VA_ARGS__, requires C++20. So just use an inline function
for now as a workaround.

* wtf/Assertions.h:
(CRASH_WITH_INFO):
(CRASH_WITH_SECURITY_IMPLICATION_AND_INFO):

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

18 months agoShould not render latest build information if there is no data points for a config.
dewei_zhu@apple.com [Tue, 30 Jul 2019 16:04:23 +0000 (16:04 +0000)]
Should not render latest build information if there is no data points for a config.
https://bugs.webkit.org/show_bug.cgi?id=200250

Reviewed by Ryosuke Niwa.

Fix a bug test freshness page that tooltip cannot be rendered when a cell does not have
a data point.

* public/v3/pages/test-freshness-page.js: Added a null check on commit set before rendering
latest build informaiton.
(TestFreshnessPage.prototype._renderTooltip):

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

18 months agoUnreviewed, rolling out r247932.
tsavell@apple.com [Tue, 30 Jul 2019 15:40:01 +0000 (15:40 +0000)]
Unreviewed, rolling out r247932.

Broke 8 API tests across all platforms.

Reverted changeset:

"Fix non-thread safe use of WeakPtr under
sendSecItemRequest()"
https://bugs.webkit.org/show_bug.cgi?id=200249
https://trac.webkit.org/changeset/247932

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

18 months ago(r247440) imported/w3c/web-platform-tests/wasm/jsapi/interface.any.worker.html is...
tsavell@apple.com [Tue, 30 Jul 2019 15:24:04 +0000 (15:24 +0000)]
(r247440) imported/w3c/web-platform-tests/wasm/jsapi/interface.any.worker.html is a flakey failure
https://bugs.webkit.org/show_bug.cgi?id=200258

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

18 months agoWeb Inspector: Resources: add a "Show Grid" navigation item for the Images collection
drousso@apple.com [Tue, 30 Jul 2019 05:29:59 +0000 (05:29 +0000)]
Web Inspector: Resources: add a "Show Grid" navigation item for the Images collection
https://bugs.webkit.org/show_bug.cgi?id=200260

Reviewed by Joseph Pecoraro.

Each subview `WI.ImageResourceContentView` already listens for changes to the underlying
`WI.settings.showImageGrid` and adds the `.show-grid` class if enabled. As such, this change
just adds a `WI.ButtonNavigationItem` for toggling `WI.settings.showImageGrid` from the
Images "folder".

* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView):
(WI.ResourceCollectionContentView.prototype.get navigationItems):
(WI.ResourceCollectionContentView.prototype.attached): Added.
(WI.ResourceCollectionContentView.prototype.detached): Added.
(WI.ResourceCollectionContentView.prototype._updateImageTypeScopeBar):
Drive-by: hide the image type `WI.ScopeBar` if there's only one type of image.
(WI.ResourceCollectionContentView.prototype._handleShowGridButtonClicked): Added.
(WI.ResourceCollectionContentView.prototype._handleShowImageGridSettingChanged): Added.

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

18 months agoAdd layout test coverage for <https://webkit.org/b/200215>
wenson_hsieh@apple.com [Tue, 30 Jul 2019 03:44:01 +0000 (03:44 +0000)]
Add layout test coverage for <https://webkit.org/b/200215>
https://bugs.webkit.org/show_bug.cgi?id=200245
<rdar://problem/52976965>

Reviewed by Tim Horton.

Tools:

Add new testing infrastructure. See below for more details.

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptContext.h:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setWillCreateNewPageCallback):
(WTR::UIScriptController::willCreateNewPageCallback const):

Add platform-agnostic UIScriptController callback hooks to notify a test when a new page is being created. The
new test in this patch uses this opportunity to remove and reinsert the web view into the window's hierarchy.

* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::becomeFirstResponder):

Add and implement a Cocoa platform hook to make the web view first responder.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::willCreateNewPage):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/UIScriptControllerCocoa.h:
* WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
(WTR::UIScriptControllerCocoa::becomeFirstResponder):

LayoutTests:

Add a new layout test to exercise a scenario where the web view is removed from the view hierarchy, added back
into the view hierarchy, and then made first responder all under the scope of a synchronous autocorrection
context request. See <https://trac.webkit.org/changeset/247914> for more details.

The test here involves two parts: first, we attempt to interact with an input field which, when focused, will
try to open a new window, which then triggers code in the UI process that reinserts the web view in the view
hierarchy. Before r247345, this would result in a crash.

The second part involves tapping an input field on the page. Without the fix in r247914, this would result in a
permanent hang in the UI process, due to the keyboard task queue being unable to dequeue and handle any further
tasks.

* fast/forms/ios/remove-and-add-view-during-focus-expected.txt: Added.
* fast/forms/ios/remove-and-add-view-during-focus.html: Added.

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

18 months ago[Win][MiniBrowser] Add 'reload' menu item and 'reload' toolbar button
Hironori.Fujii@sony.com [Tue, 30 Jul 2019 01:53:27 +0000 (01:53 +0000)]
[Win][MiniBrowser] Add 'reload' menu item and 'reload' toolbar button
https://bugs.webkit.org/show_bug.cgi?id=200217

Reviewed by Alex Christensen.

* MiniBrowser/win/BrowserWindow.h:
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::init):
(MainWindow::resizeSubViews):
(MainWindow::WndProc):
* MiniBrowser/win/MainWindow.h: Added m_hReloadButtonWnd.
* MiniBrowser/win/MiniBrowserLib.rc:
* MiniBrowser/win/MiniBrowserLibResource.h: Added IDM_RELOAD.
* MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::reload):
* MiniBrowser/win/WebKitBrowserWindow.h: Added reload() interface.
* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
(WebKitLegacyBrowserWindow::reload):
* MiniBrowser/win/WebKitLegacyBrowserWindow.h:

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

18 months agoYouTube search field shows RTL text outside its border on iPadOS
wenson_hsieh@apple.com [Tue, 30 Jul 2019 01:50:58 +0000 (01:50 +0000)]
YouTube search field shows RTL text outside its border on iPadOS
https://bugs.webkit.org/show_bug.cgi?id=200253
<rdar://problem/53680603>

Reviewed by Beth Dakin.

Source/WebKit:

Limits code added in r238939 to respect the current keyboard's writing mode to only editable web views. This
behavior was only intended for Mail, and isn't generally compatible with web content.

While the call to -setInitialDirection is correctly gated on an web view editability check, it appears that
other changes in iOS 13 now cause -setBaseWritingDirection:forRange: to be invoked directly from keyboards code.
This means that -setBaseWritingDirection:forRange: should additionally be guarded with the same check.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setBaseWritingDirection:forRange:]):

LayoutTests:

* editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page-expected.txt: Renamed from LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-expected.txt.
* editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page.html: Renamed from LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus.html.

Rename an existing test, rtl-keyboard-input-on-focus.html, to rtl-keyboard-input-on-focus-in-editable-page.html
to emphasize the fact that it requires an editable web view.

* editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page-expected.txt: Added.
* editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page.html: Added.

Add a new layout test to ensure that we don't automatically apply an RTL attribute when focusing fields in a
non-editable web view.

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

18 months ago[Win][MiniBrowser][WK2] Automatically supplement "file://" or "http://" for an input...
Hironori.Fujii@sony.com [Tue, 30 Jul 2019 01:46:19 +0000 (01:46 +0000)]
[Win][MiniBrowser][WK2] Automatically supplement "file://" or "" for an input URL as well as WK1 browser window
https://bugs.webkit.org/show_bug.cgi?id=200218

Reviewed by Alex Christensen.

Moved the scheme supplementing logic from
WebKitLegacyBrowserWindow::loadURL to MainWindow::loadURL.

* MiniBrowser/win/MainWindow.cpp:
(MainWindow::loadURL):
(MainWindow::onURLBarEnter):
* MiniBrowser/win/MainWindow.h:
* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
(WebKitLegacyBrowserWindow::loadURL):

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

18 months agoMediaSource.isTypeSupported claims FLAC-in-MP4 support on iOS and macOS, but plays...
eric.carlson@apple.com [Tue, 30 Jul 2019 01:24:53 +0000 (01:24 +0000)]
MediaSource.isTypeSupported claims FLAC-in-MP4 support on iOS and macOS, but plays silence
https://bugs.webkit.org/show_bug.cgi?id=198583
<rdar://problem/51487853>

Reviewed by Maciej Stachowiak.

* platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h:
(WebCore::AVStreamDataParserMIMETypeCache::canDecodeType): Use anParseExtendedMIMEType:
when it is available.

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

18 months agoTry fixing crash at com.apple.WebKit.Networking: NetworkProcess::setSharedHTTPCookieS...
sihui_liu@apple.com [Tue, 30 Jul 2019 00:21:44 +0000 (00:21 +0000)]
Try fixing crash at com.apple.WebKit.Networking: NetworkProcess::setSharedHTTPCookieStorage
https://bugs.webkit.org/show_bug.cgi?id=200189
<rdar://problem/41325767>

Reviewed by Chris Dumez.

The crash indicates that sharedCookieStorage is accessed before being set in network process.
sharedCookieStorage is set during the processing of InitializeNetworkProcess message, and access to
sharedCookieStorage is supposed to happen after that. Therefore, it is likely some message is received and
handled before InitializeNetworkProcess.

One possible explanation is WebKit APIs get called on different threads. Because of the race in checking and
setting m_networkProcess, some message is sent between network process gets launched (m_networkProcess is set)
and InitializeNetworkProcess message is sent. To mitigate this issue, we make sure m_networkProcess is set only
in the main runloop and only after InitializeNetworkProcess is sent.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):

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

18 months agoFix non-thread safe use of WeakPtr under sendSecItemRequest()
cdumez@apple.com [Tue, 30 Jul 2019 00:20:11 +0000 (00:20 +0000)]
Fix non-thread safe use of WeakPtr under sendSecItemRequest()
https://bugs.webkit.org/show_bug.cgi?id=200249

Reviewed by Alex Christensen.

The function was calling globalNetworkProcess() from a background thread. This is not safe because
globalNetworkProcess() deferences a WeakPtr<NetworkProcess> internally and the NetworkProcess object
gets destroyed on the main thread.

* Shared/mac/SecItemShim.cpp:
(WebKit::sendSecItemRequest):

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

18 months ago[LFC][TFC] <table> initiates a principal block container box called table wrapper...
zalan@apple.com [Tue, 30 Jul 2019 00:17:16 +0000 (00:17 +0000)]
[LFC][TFC] <table> initiates a principal block container box called table wrapper box.
https://bugs.webkit.org/show_bug.cgi?id=200198
<rdar://problem/53623803>

Reviewed by Antti Koivisto.

The table wrapper box contains the table box itself and any caption boxes.

* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isBlockContainerBox const):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isTableCaption const):
(WebCore::Layout::Box::isTableRow const):
(WebCore::Layout::Box::isTableCell const):
* layout/layouttree/LayoutContainer.h:
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::appendChild):
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::TreeBuilder::createTableStructure):
(WebCore::Layout::TreeBuilder::createSubTree):
(WebCore::Layout::outputLayoutBox):
* layout/layouttree/LayoutTreeBuilder.h:

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

18 months ago[WebGPU] Replace Vectors with HashSets for tracking resources used by GPUCommandBuffer
justin_fan@apple.com [Tue, 30 Jul 2019 00:06:31 +0000 (00:06 +0000)]
[WebGPU] Replace Vectors with HashSets for tracking resources used by GPUCommandBuffer
https://bugs.webkit.org/show_bug.cgi?id=200200

Reviewed by Myles C. Maxfield.

Resources bound to a command buffer or bind group only need be tracked once rather than once per sub-view.
This patch cuts GPUQueue.submit validation from 2-12 ms down to ~0 when drawing 12000 triangles in Animometer.

Covered by existing tests; no behavior change expected.

* Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: Removed unused variable.
* platform/graphics/gpu/GPUBindGroup.h:
(WebCore::GPUBindGroup::boundBuffers const):
(WebCore::GPUBindGroup::boundTextures const):
* platform/graphics/gpu/GPUCommandBuffer.h:
(WebCore::GPUCommandBuffer::usedBuffers const):
(WebCore::GPUCommandBuffer::usedTextures const):
(WebCore::GPUCommandBuffer::useBuffer):
(WebCore::GPUCommandBuffer::useTexture):
* platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
(WebCore::GPUBindGroup::tryCreate):
(WebCore::GPUBindGroup::GPUBindGroup):

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

18 months agoDisable Flaky API Test TestWebKitAPI.WKWebView.LocalStorageProcessSuspends
aakash_jain@apple.com [Mon, 29 Jul 2019 23:23:29 +0000 (23:23 +0000)]
Disable Flaky API Test TestWebKitAPI.WKWebView.LocalStorageProcessSuspends
https://bugs.webkit.org/show_bug.cgi?id=200254

Unreviewed infrastructure fix.

* TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: Disabled the test.

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

18 months agoWeb Inspector: add -webkit-* keywords for *-height CSS properties
drousso@apple.com [Mon, 29 Jul 2019 23:06:25 +0000 (23:06 +0000)]
Web Inspector: add -webkit-* keywords for *-height CSS properties
https://bugs.webkit.org/show_bug.cgi?id=200240

Reviewed by Joseph Pecoraro.

* UserInterface/Models/CSSKeywordCompletions.js:

* UserInterface/Views/Main.css:
(.message-text-view):
* UserInterface/Views/Toolbar.css:
(.toolbar .control-section):
(.toolbar .item-section):
Replace `-webkit-min-content` with `min-content`.

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

18 months ago[LFC][TFC] Introduce Box::establishesTableFormattingContext
zalan@apple.com [Mon, 29 Jul 2019 23:04:43 +0000 (23:04 +0000)]
[LFC][TFC] Introduce Box::establishesTableFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=200060

Reviewed by Antti Koivisto.

https://www.w3.org/TR/CSS22/tables.html

The table generates a principal block container box called the table wrapper box that contains the table box itself and any caption boxes.
The table box is a block-level box that contains the table's internal table boxes.
The table wrapper box is block-level for 'display: table', and inline-level; for 'display: inline-table'. The table wrapper box establishes a block
formatting context, and the table box establishes a table formatting context."

* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::establishesFormattingContext const):
(WebCore::Layout::Box::establishesTableFormattingContext const):
(WebCore::Layout::Box::isBlockLevelBox const):
(WebCore::Layout::Box::isInlineLevelBox const):
(WebCore::Layout::Box::isBlockContainerBox const):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isTableWrapperBox const):
(WebCore::Layout::Box::isTableBox const):

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

18 months ago[ContentChangeObserver] didFinishContentChangeObserving should include the type of...
zalan@apple.com [Mon, 29 Jul 2019 22:48:30 +0000 (22:48 +0000)]
[ContentChangeObserver] didFinishContentChangeObserving should include the type of content change.
https://bugs.webkit.org/show_bug.cgi?id=200247
<rdar://problem/53681149>

Reviewed by Simon Fraser.

Source/WebCore:

Now we don't have to query the content change observer for the type of the change in the callback.

* loader/EmptyClients.h:
* page/ChromeClient.h:
* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::adjustObservedState):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::mouseMoved):

Source/WebKit:

* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::didFinishContentChangeObserving):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didFinishContentChangeObserving):

Source/WebKitLegacy/ios:

* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::didFinishContentChangeObserving):

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

18 months ago[JSC] Increment bytecode age only when SlotVisitor is first-visit
ysuzuki@apple.com [Mon, 29 Jul 2019 22:26:58 +0000 (22:26 +0000)]
[JSC] Increment bytecode age only when SlotVisitor is first-visit
https://bugs.webkit.org/show_bug.cgi?id=200196

Reviewed by Robin Morisset.

JSTests:

* stress/reparsing-unlinked-codeblock.js:

Source/JavaScriptCore:

WriteBarrier can cause multiple visits for the same UnlinkedCodeBlock. But this does not mean that we are having multiple cycles of GC.
We should increment the age of the UnlinkedCodeBlock only when the SlotVisitor is saying that this is the first visit.

In practice,this almost never happens. Multiple visits can happen only when the marked UnlinkedCodeBlock gets a write-barrier. But, mutation
of UnlinkedCodeBlock is rare or none after it is initialized. I ran all the JSTests and I cannot find any tests that get re-visiting of UnlinkedCodeBlock.
This patch extends JSTests/stress/reparsing-unlinked-codeblock.js to ensure that UnlinkedCodeBlockJettisoning feature is working after this change.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::visitChildren):
* heap/SlotVisitor.h:
(JSC::SlotVisitor::isFirstVisit const):
* parser/Parser.cpp:
* parser/Parser.h:
(JSC::parse):
(JSC::parseFunctionForFunctionConstructor):
* runtime/Options.h:
* tools/JSDollarVM.cpp:
(JSC::functionParseCount):
(JSC::JSDollarVM::finishCreation):

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