Commit Graph

235746 Commits

Author SHA1 Message Date
Pascal Abresch 66120fcb00 Haiku: Use scrollbars size from decorator 2021-05-01 19:17:15 +02:00
Adrien Destugues 26916f086c Merge commit 'e98c8002727a676a11981f290452a9f39dfc1b67' into haiku 2021-03-27 21:53:05 +01:00
Adrien Destugues edc9a4a989 Fix build after merge. 2021-03-27 21:01:33 +01:00
Adrien Destugues 15aa9c7f7b Merge commit 'd159f8bec75790a9b50cbe42f16dda4236bc4f00' into haiku 2021-03-27 16:37:25 +01:00
Russell Epstein e98c800272 Versioning.
WebKit-7612.1.9

Canonical link: https://commits.webkit.org/235726@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 23:01:12 +00:00
Antoine Quint 582ac6d8a4 Fix interpolation of the border-spacing property
https://bugs.webkit.org/show_bug.cgi?id=223702

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Import the border-spacing interpolation test with its 120 tests passing.

* web-platform-tests/css/css-tables/animations/border-spacing-interpolation-expected.txt: Added.
* web-platform-tests/css/css-tables/animations/border-spacing-interpolation.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-tables/animations/border-spacing-interpolation.html

While we already supported animation of border-spacing, we did not correctly clip the interpolated
value to 0.

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):


Canonical link: https://commits.webkit.org/235725@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 22:25:19 +00:00
Simon Fraser 032de56fde Add DisplayLink log channels in WebCore and WebKit
https://bugs.webkit.org/show_bug.cgi?id=223669

Reviewed by Tim Horton.
Source/WebCore:

DisplayRefreshMonitor code involves some non-trivial object
fan-out and WebProcess/UI Process interaction, and it deserves
a log channel.

* platform/Logging.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::displayDidRefresh):
* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::monitorForClient):
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh):

Source/WebKit:

DisplayRefreshMonitor code involves some non-trivial object
fan-out and WebProcess/UI Process interaction, and it deserves
a log channel.

* Platform/Logging.h:
* WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp:
(WebKit::DisplayRefreshMonitorMac::displayLinkFired):


Canonical link: https://commits.webkit.org/235724@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 22:07:51 +00:00
Philippe Normand 7e265263d1 REGRESSION(r274870) fast/canvas/webgl/texImage2D-mse-flipY-true.html and fast/canvas/webgl/texImage2D-mse-flipY-false.html are crashing
https://bugs.webkit.org/show_bug.cgi?id=223674

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-24
Reviewed by Kenneth Russell.

Source/WebCore:

When the srcObject is directly set on a media element, the corresponding URL might still be
empty, so we need to ensure the URI corresponding to the MediaSource blob is not empty,
otherwise uridecodebin would fail to create the right source element.

* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::load):

LayoutTests:

* platform/glib/TestExpectations:

Canonical link: https://commits.webkit.org/235723@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 21:57:23 +00:00
Chris Gambrell 3724c92eab [LayoutTests] Convert http/tests/resourceLoadStatistics convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=223541
<rdar://problem/75639142>

Reviewed by Jonathan Bedard.

* http/tests/resourceLoadStatistics/add-blocking-to-redirect.html:
* http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import.html:
* http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-expected.txt:
* http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource.html:
* http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion.html:
* http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html:
* http/tests/resourceLoadStatistics/cname-cloaking-top-cname-sub-1p-cname.html:
* http/tests/resourceLoadStatistics/cname-cloaking-top-cname-sub-3p-cname.html:
* http/tests/resourceLoadStatistics/cname-cloaking-top-cname-sub-matching-cname.html:
* http/tests/resourceLoadStatistics/cname-cloaking-top-cname-sub-no-cname.html:
* http/tests/resourceLoadStatistics/cname-cloaking-top-no-cname-sub-1p-cname.html:
* http/tests/resourceLoadStatistics/cname-cloaking-top-no-cname-sub-3p-cname.html:
* http/tests/resourceLoadStatistics/cname-cloaking-top-no-cname-sub-no-cname.html:
* http/tests/resourceLoadStatistics/cookie-deletion.html:
* http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction.html:
* http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect.html:
* http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect.html:
* http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.php: Removed.
* http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py: Added.
* http/tests/resourceLoadStatistics/exemptDomains/app-bound-domains-exempt-from-cookie-blocking-between-each-other.html:
* http/tests/resourceLoadStatistics/grandfathering.html:
* http/tests/resourceLoadStatistics/no-third-party-cookie-blocking-when-itp-is-off.html:
* http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html:
* http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* http/tests/resourceLoadStatistics/ping-to-prevalent-resource.html:
* http/tests/resourceLoadStatistics/resources/cached-permanent-redirect.php:
* http/tests/resourceLoadStatistics/resources/echo-query.php: Removed.
* http/tests/resourceLoadStatistics/resources/echo-query.py: Added.
* http/tests/resourceLoadStatistics/resources/echo-referrer.php: Removed.
* http/tests/resourceLoadStatistics/resources/echo-referrer.py: Added.
* http/tests/resourceLoadStatistics/resources/get-cookies.php: Removed.
* http/tests/resourceLoadStatistics/resources/get-cookies.py: Added.
* http/tests/resourceLoadStatistics/resources/page-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/resources/page-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* http/tests/resourceLoadStatistics/resources/page-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/resources/page-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* http/tests/resourceLoadStatistics/resources/redirect.php: Removed.
* http/tests/resourceLoadStatistics/resources/redirect.py: Added.
* http/tests/resourceLoadStatistics/resources/script-revealing-cookies.php: Removed.
* http/tests/resourceLoadStatistics/resources/script-revealing-cookies.py: Added.
* http/tests/resourceLoadStatistics/resources/set-all-kinds-of-cookies.php: Removed.
* http/tests/resourceLoadStatistics/resources/set-all-kinds-of-cookies.py: Added.
* http/tests/resourceLoadStatistics/resources/set-cookie-on-redirect.php: Removed.
* http/tests/resourceLoadStatistics/resources/set-cookie-on-redirect.py: Added.
* http/tests/resourceLoadStatistics/resources/set-cookie.php: Removed.
* http/tests/resourceLoadStatistics/resources/set-cookie.py: Added.
* http/tests/resourceLoadStatistics/resources/worker-importing-localhost-script.js:
(onmessage):
* http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* http/tests/resourceLoadStatistics/set-all-cookies-to-same-site-strict.html:
* http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-third-party-redirects.html:
* http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-third-party-requests.html:
* http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.php: Removed.
* http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py: Added.
* http/tests/resourceLoadStatistics/third-party-cookie-blocking-ephemeral.html:
* http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction.html:
* http/tests/resourceLoadStatistics/third-party-cookie-blocking.html:
* http/tests/storageAccess/resources/self-navigating-frame-after-granted-access.html:
* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:


Canonical link: https://commits.webkit.org/235722@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 21:32:37 +00:00
Katherine Cheney 685dc2a7fe Remove deprecated WKMediaPlayback APIs
https://bugs.webkit.org/show_bug.cgi?id=223704
<rdar://problem/74611683>

Reviewed by Tim Horton.

We kept these API around after updating the names to give clients
time to adopt the new versions. We can remove them now.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView pauseAllMediaPlayback:]): Deleted.
(-[WKWebView suspendAllMediaPlayback:]): Deleted.
(-[WKWebView resumeAllMediaPlayback:]): Deleted.
(-[WKWebView closeAllMediaPresentations:]): Deleted.
(-[WKWebView requestMediaPlaybackState:]): Deleted.


Canonical link: https://commits.webkit.org/235721@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 20:40:28 +00:00
Chris Fleizach 461a5d68c7 AX: Add functions rectsForTextMarkerRange for testing
https://bugs.webkit.org/show_bug.cgi?id=223705
<rdar://problem/75797361>

Reviewed by Zalan Bujtas.

* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
* WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):


Canonical link: https://commits.webkit.org/235720@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 20:37:57 +00:00
Alex Christensen 3185bd8980 Call InitializeWebKit2 when initializing a _WKUserInitiatedAction
https://bugs.webkit.org/show_bug.cgi?id=223708
<rdar://75788877>

Reviewed by Chris Dumez.

There is a test that deallocates a _WKUserInitiatedAction before anything calls InitializeWebKit2.
Calling constructInWrapper calls InitializeWebKit2.
Since r274227 it has been asserting s_mainRunLoop in RunLoop::isMain.  This fixes it.
We don't have test infrastructure to test this in WebKit because TestWebKitAPI initializes the main thread for us before doing anything.

* UIProcess/API/APIUserInitiatedAction.h:
* UIProcess/API/Cocoa/_WKUserInitiatedAction.mm:
(-[_WKUserInitiatedAction init]):



Canonical link: https://commits.webkit.org/235719@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 20:11:16 +00:00
Aditya Keerthi aec22bd59a REGRESSION (r273154): [iOS] Two magnifier symbols on google.com
https://bugs.webkit.org/show_bug.cgi?id=223700
<rdar://problem/75357965>

Reviewed by Tim Horton.

The iOS form control refresh added a magnifier symbol to
the default appearance of <input type="search">. On iPhone, google.com
uses <input type="search"> for their search field, while drawing their
own magnifier symbol. As a result, two magnifier symbols appear.

Note that on macOS and iPadOS, google.com uses an <input type="text">,
which means this problem is only observed on iPhone. Ideally, google.com
should adopt <input type="text"> on the iPhone version of the site,
matching the other platforms. However, in the meantime, we can hide our
symbol using a quirk.

* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):

Hide the symbol if the quirk applies.

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

Add a quirk to hide the magnifier symbol on google.com and other country
domains.

* page/Quirks.h:


Canonical link: https://commits.webkit.org/235718@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 19:57:37 +00:00
Chris Gambrell a3a5fb8ca3 [LayoutTests] Convert http/tests/performance convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=223599
<rdar://problem/75707991>

Reviewed by Jonathan Bedard.

* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html:
* http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html:
* http/tests/performance/paint-timing/resources/slowscript.php: Removed.
* http/tests/performance/paint-timing/resources/slowscript.py: Added.
* http/tests/performance/paint-timing/resources/slowstyle.php: Removed.
* http/tests/performance/paint-timing/resources/slowstyle.py: Added.


Canonical link: https://commits.webkit.org/235717@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 19:50:29 +00:00
Youenn Fablet b21276808c Add logging to check whether RealtimeOutgoingVideoSource is applying rotation or not
https://bugs.webkit.org/show_bug.cgi?id=223691

Reviewed by Eric Carlson.

No change of behavior.

* platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
(WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):


Canonical link: https://commits.webkit.org/235716@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 19:48:30 +00:00
Chris Gambrell 2a97c2e8cf [LayoutTests] Convert http/tests/preload convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=223602
<rdar://problem/75709989>

Reviewed by Jonathan Bedard.

* TestExpectations:
* http/tests/preload/download_resources_from_header_iframe.html:
* http/tests/preload/link-header-on-subresource-expected.txt:
* http/tests/preload/link-header-on-subresource.html:
* http/tests/preload/preload-encoding.php: Removed.
* http/tests/preload/preload-encoding.py: Added.
* http/tests/preload/resources/download_resources_from_header.php: Removed.
* http/tests/preload/resources/download_resources_from_header.py: Added.
* http/tests/preload/resources/dummy-preloads-subresource.css.php: Removed.
* http/tests/preload/resources/dummy-preloads-subresource.css.py: Added.
* http/tests/preload/single_download_preload_headers.php: Removed.
* http/tests/preload/single_download_preload_headers.py: Added.
* http/tests/preload/single_download_preload_headers_charset.php: Removed.
* http/tests/preload/single_download_preload_headers_charset.py: Added.
* http/tests/preload/viewport/meta-viewport-link-headers.php: Removed.
* http/tests/preload/viewport/meta-viewport-link-headers.py: Added.
* platform/ios/TestExpectations:
* platform/win/TestExpectations:


Canonical link: https://commits.webkit.org/235715@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 19:42:05 +00:00
Youenn Fablet 2c91349d8e Update GPUProcess sandbox to support camera access
https://bugs.webkit.org/show_bug.cgi?id=223681

Reviewed by Eric Carlson.

Give access to com.apple.appleh13camerad in GPUProcess.

* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:


Canonical link: https://commits.webkit.org/235714@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 19:35:51 +00:00
Razvan Caliman 2656c8af96 Web Inspector: REGRESSION (r269359): Timelines: TypeError: this.deselect is not a function
https://bugs.webkit.org/show_bug.cgi?id=223698
<rdar://problem/75790983>

Reviewed by BJ Burg.

Ensure individual timeline views can be closed to return to the Timelines overview.

* UserInterface/Views/TimelineTreeElement.js:
(WI.TimelineTreeElement.prototype._showCloseButton):


Canonical link: https://commits.webkit.org/235713@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 19:31:21 +00:00
Chris Dumez 0b98d90157 Address undefined behavior found by UBSan in StringToIntegerConversion.h
https://bugs.webkit.org/show_bug.cgi?id=223694

Reviewed by Geoffrey Garen.

Source/WTF:

Update StringToIntegerConversion to deal with overflows in a well-defined manner,
by relying on CheckedArithmetics. This addresses undefined behavior reborted by
UBSan:
- wtf/text/StringToIntegerConversion.h:94:30: runtime error: signed integer overflow: 2147483640 + 8 cannot be represented in type 'int'
- wtf/text/StringToIntegerConversion.h:104:17: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself

* wtf/text/StringToIntegerConversion.h:
(WTF::toIntegralType):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/235712@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 19:30:31 +00:00
Chris Dumez cb24fba170 Source/WebCore/page/FrameView.h:990:50: runtime error: signed integer overflow: 65537 * 65537 cannot be represented in type 'int'
https://bugs.webkit.org/show_bug.cgi?id=223697

Reviewed by Darin Adler.

Make sure FrameView::incrementVisuallyNonEmptyPixelCount() deals with overflows in a well-defined
manner. This fixes the following reports from UBSan:
- Source/WebCore/page/FrameView.h:990:50: runtime error: signed integer overflow: 65537 * 65537 cannot be represented in type 'int'
- Source/WebCore/page/FrameView.h:990:50: runtime error: signed integer overflow: 65536 * 65536 cannot be represented in type 'int'
- Source/WebCore/page/FrameView.h:990:50: runtime error: signed integer overflow: 1116300 * 558150 cannot be represented in type 'int'
- Source/WebCore/page/FrameView.h:990:50: runtime error: signed integer overflow: -33554432 * -33554432 cannot be represented in type 'int'

* page/FrameView.h:
(WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):


Canonical link: https://commits.webkit.org/235711@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 19:30:12 +00:00
Rob Buis e2e5c74231 [css-contain] Parse CSS contain property
https://bugs.webkit.org/show_bug.cgi?id=223252

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-24
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Update test results because of not supporting style in contain property.

* web-platform-tests/css/css-contain/content-visibility/content-visibility-026-expected.txt:
* web-platform-tests/css/css-contain/parsing/contain-computed-expected.txt:
* web-platform-tests/css/css-contain/parsing/contain-valid-expected.txt:

Source/WebCore:

Address post land review comments.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeContain):
* rendering/style/RenderStyleConstants.h:
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueContain):

Canonical link: https://commits.webkit.org/235710@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 19:10:07 +00:00
Per Arne Vollan 46d78a8763 The media accessibility service is not an XPC service
https://bugs.webkit.org/show_bug.cgi?id=223699
<rdar://75750989>

Reviewed by Brent Fulgham.

The media accessibility service is not an XPC service, but is listed as such in the sandbox.

* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:


Canonical link: https://commits.webkit.org/235709@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 18:59:20 +00:00
Per Arne Vollan 71f6a1152f Enforce notifyd message filtering
https://bugs.webkit.org/show_bug.cgi?id=223601
<rdar://75098580>

Reviewed by Per Arne Vollan.

Enforce notifyd message filtering on macOS and iOS.

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


Canonical link: https://commits.webkit.org/235708@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 18:24:42 +00:00
Robert Jenner 97528fb648 Remove unused JS and CSS files of media controls
https://bugs.webkit.org/show_bug.cgi?id=214955

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations: Test expectation was removed in a webkit patch, casuing a slowdown on EWS. Re-adding test expectation to Failure.

Canonical link: https://commits.webkit.org/235707@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 18:17:04 +00:00
Katherine Cheney 4cb08149be Followup to https://trac.webkit.org/changeset/274928/webkit
Unreviewed build fix.

* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

Canonical link: https://commits.webkit.org/235706@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 17:50:29 +00:00
Truitt Savell 6c023f540d Unreviewed, reverting r274927.
Broke many tests in WebGL

Reverted changeset:

"Enable Metal ANGLE backend for WebGL"
https://bugs.webkit.org/show_bug.cgi?id=220076
https://commits.webkit.org/r274927

Canonical link: https://commits.webkit.org/235705@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 17:40:01 +00:00
Sam Weinig f47e958095 Update CSS Color 5 color-mix() implementation to match the latest draft spec
https://bugs.webkit.org/show_bug.cgi?id=223665

Reviewed by Simon Fraser.

Source/WebCore:

Update to the latest draft spec, which dramatically reduces the complexity of color-mix()
by remove per-component adjusters.

* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::normalizeWhitenessBlackness):
(WebCore::CSSPropertyParserHelpers::consumeColorMixColorSpaceAndComma):
(WebCore::CSSPropertyParserHelpers::consumeColorMixComponent):
(WebCore::CSSPropertyParserHelpers::normalizedMixPercentages):
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix):
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<HWBA<float>>):
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<HSLA<float>>):
(WebCore::CSSPropertyParserHelpers::fixupHueComponentsPriorToMix):
(WebCore::CSSPropertyParserHelpers::mixColorComponentsInColorSpace):
(WebCore::CSSPropertyParserHelpers::mixColorComponents):
(WebCore::CSSPropertyParserHelpers::parseColorMixFunctionParameters):
(WebCore::CSSPropertyParserHelpers::HueColorAdjuster::fixupAnglesForInterpolation): Deleted.
(WebCore::CSSPropertyParserHelpers::HueColorAdjuster::HueColorAdjuster): Deleted.
(WebCore::CSSPropertyParserHelpers::ColorAdjuster::ColorAdjuster): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeAdjuster): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeAndUpdateAdjusterAtIndex): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeAndUpdateAdjuster): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeAdjusters): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeMixComponents): Deleted.
(WebCore::CSSPropertyParserHelpers::normalizeAdjusterValues): Deleted.
(WebCore::CSSPropertyParserHelpers::remainingAdjustment): Deleted.
(WebCore::CSSPropertyParserHelpers::mixComponent): Deleted.
(WebCore::CSSPropertyParserHelpers::mixComponentAtIndex): Deleted.
(WebCore::CSSPropertyParserHelpers::mix): Deleted.
(WebCore::CSSPropertyParserHelpers::parseColorMixFunctionParametersUsingAdjusters): Deleted.
Update to the new syntax and remove component adjusters. They may come back for color-adjust()
in the future.

* platform/graphics/ColorModels.h:
* platform/graphics/ColorTypes.h:
(WebCore::clampedComponent):
(WebCore::assertInRange):
* platform/graphics/ColorUtilities.h:
(WebCore::invertedColorWithOverriddenAlpha):
Add support in the color models for annotating more about each component, now including
the type (angle, number or percentage). This allows algorithms generic algorithms to
operate on abstract color type components without specializing for each color type.

LayoutTests:

* fast/css/parsing-color-mix-expected.txt:
* fast/css/parsing-color-mix.html:
Update test and results for vastly simplified color-mix().


Canonical link: https://commits.webkit.org/235704@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 17:34:50 +00:00
Chris Dumez 26116f0450 Address undefined behavior found by UBSan in DateMath.h
https://bugs.webkit.org/show_bug.cgi?id=223663

Reviewed by Darin Adler.

Address undefined behavior found by UBSan in DateMath.h
Release/usr/local/include/wtf/DateMath.h:247:39: runtime error: nan is outside the range of representable values of type 'int'
Release/usr/local/include/wtf/DateMath.h:221:29: runtime error: nan is outside the range of representable values of type 'int'
Release/usr/local/include/wtf/DateMath.h:165:38: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'

* wtf/DateMath.h:
(WTF::daysFrom1970ToYear):
Cast year to a double *before* substracting 1 instead of *after*. This works around the fact that INT_MIN-1 would not
fit in an int and would be undefined behavior.

(WTF::dayInYear):
(WTF::msToYear):
Deal with the double potentially being NaN before casting to an int, since
casting NaN to an int type has undefined behavior.


Canonical link: https://commits.webkit.org/235703@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 17:31:28 +00:00
Michael Saboff 4f900270dd [YARR] Interpreter incorrectly matches non-BMP characters with multiple . w/dotAll flag
https://bugs.webkit.org/show_bug.cgi?id=223666

Reviewed by Mark Lam.

JSTests:

Added tests for dotAll.  Also made sure that we test both JIT and non-JIT execution.

* stress/regexp-dot-match-nonBMP.js:

Source/JavaScriptCore:

In checkCharacterClassDontAdvanceInputForNonBMP(), we need to check for input.readChecked() returning -1
and return that the character class didn't match.

* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::checkCharacterClassDontAdvanceInputForNonBMP):


Canonical link: https://commits.webkit.org/235702@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 17:29:02 +00:00
Brent Fulgham b17c8ddde0 [Cocoa] Revise loadSimulatedRequest API with final review comments (223657)
https://bugs.webkit.org/show_bug.cgi?id=223657
<rdar://75757727>

Reviewed by Alex Christensen.

Source/WebKit:

Tested by TestWebKitAPI.

Update the WKWebView API to match final review comments. Deprecate the prior draft API so that we
can smoothly transition away from the original methods.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadSimulatedRequest:response:responseData:]):
(-[WKWebView loadSimulatedRequest:withResponse:responseData:]):
(-[WKWebView loadSimulatedRequest:responseHTMLString:]):
(-[WKWebView loadSimulatedRequest:withResponseHTMLString:]):

Tools:

Update tests to use the final API, while still exercising the existing API.

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


Canonical link: https://commits.webkit.org/235701@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 17:03:09 +00:00
commit-queue@webkit.org 111e685dd7 [GStreamer] Use imxvideoconvert_g2d element inside the sink when available
https://bugs.webkit.org/show_bug.cgi?id=223693

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-03-24
Reviewed by Philippe Normand.

On some iMX platforms we require the use of imxvideoconvert_g2d element
in order to properly convert the visual buffers before they can be
rendered through our pipeline. We expect to require this buffer if it's
present in the GStreamer plugin registry on the system.

We search for this element and, if found, add it to the sink and
position it at the beginning, before the glupload element.

Based on an approach outlined by Gabriel Valcazar.

* platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
(webKitGLVideoSinkConstructed):

Canonical link: https://commits.webkit.org/235700@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 16:59:39 +00:00
Saam Barati 04b247ee25 r271034 added code in constant folding phase that's unreachable given current invariants of our ICs and PutByIdStatus
https://bugs.webkit.org/show_bug.cgi?id=223625

Reviewed by Yusuke Suzuki.

The code was doing a lot of wrong things by making bad assumptions about the
invariants of PutByIdVariants. Replace PutByIdVariants never have object
property condition sets, since we always replace on the self object (and don't
look at the prototype chain). This patch clears up the code to make it
clearer what the invariants are.

With respect to the original fix about not emitting a PutByOffset for a
Replace on a Structure that has an unfired replacement watchpoint set,
that was already handled by the PutByIdStatus::computeFor variant we're
calling inside of constant folding. It will return TakesSlowPathif it
encounters a Replace where the Structure still has an unfired watchpoint.

* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::tryFoldAsPutByOffset):


Canonical link: https://commits.webkit.org/235699@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 16:56:42 +00:00
Sihui Liu a5c6734787 Ignore middle commits during animated resize
https://bugs.webkit.org/show_bug.cgi?id=223530

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-03-24
Reviewed by Tim Horton.

For animated resize, UI process sets layer transform to fit new size until web process picks up size change and
paints. It is possible that UI process receives a commit during animated resize and the commit is not for the
animated resize (web process commits before animated resize). In this case, our current implementation is: if
SPI client species there will be no other update (!_waitingForEndAnimatedResize), we change layer transform to
reflect change of the middle commit.

However, that commit does not mean web process issues new paint, so the adjustment can be wrong. We find the
handling of middle commits causes issues in SPI client's use case  (rdar://47623140). Also by manual testing,
it's not clear how the code can benefit current SPI clients. It seems to cause the same trouble sometimes. So
let's just remove it.

* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _didCommitLayerTreeDuringAnimatedResize:]):

Canonical link: https://commits.webkit.org/235698@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 16:45:11 +00:00
Antoine Quint 76000124b3 Support animation of the tab-size CSS property
https://bugs.webkit.org/show_bug.cgi?id=223688

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Import the tab-size interpolation test with its 196 tests passing.

* web-platform-tests/css/css-text/animations/tab-size-interpolation-expected.txt: Added.
* web-platform-tests/css/css-text/animations/tab-size-interpolation.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-text/animations/tab-size-interpolation.html

* animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/graphics/TabSize.h:
(WebCore::TabSize::value const):
(WebCore::TabSize::operator bool const):


Canonical link: https://commits.webkit.org/235697@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 15:14:55 +00:00
Per Arne Vollan 2dee25fbcf Add IOKit method filter telemetry
https://bugs.webkit.org/show_bug.cgi?id=223652
<rdar://problem/75751391>

Reviewed by Brent Fulgham.

Add IOKit method filter telemetry in the WebContent sandbox on macOS and iOS.

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


Canonical link: https://commits.webkit.org/235696@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 14:28:24 +00:00
Pablo Saavedra 8095c9f053 [WPE] Build error in ARMv7 invalid 'static_cast' for GLNativeWindowType
https://bugs.webkit.org/show_bug.cgi?id=223684

Fixes this error:

  error: invalid 'static_cast' from type 'uintptr_t' {aka 'unsigned
  int'} to type 'GLNativeWindowType' {aka 'void*'}

; an invalid 'static_cast' from type error for ARMv7 (rpi3 and mesa driver)
by using the same solution chosen in
https://bugs.webkit.org/show_bug.cgi?id=179511:

  EGLNativeWindowType can be aliased to a different type depending (at least) on the EGL
  implementation, its build options, and the libepoxy build options.  Using "static_cast"
  works when it is a numeric value and the width of the value needs to be optionally
  extended to 64 bits (e.g. the EGL type is "int" in a 32-bit CPU) but not for pointers,
  and using "reinterpret_cast" works when the size of a pointer is 64 bits but not in other
  cases. Therefore it seems reasonable to use a plain C cast expression to solve this
  particular situation.

https://trac.webkit.org/changeset/274869/webkit

Reviewed by Philippe Normand.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::createGLContext):


Canonical link: https://commits.webkit.org/235695@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 11:02:10 +00:00
Chris Lord 10f3afb0d8 [GLIB] imported/w3c/web-platform-tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.w.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=223671

Unreviewed test gardening.


LayoutTests/imported/w3c:

* web-platform-tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.w-expected.txt:

LayoutTests:

* platform/glib/TestExpectations:


Canonical link: https://commits.webkit.org/235694@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 10:51:24 +00:00
Yusuke Suzuki ce40dcb58a [JSC] Rope string equal operation should first check length
https://bugs.webkit.org/show_bug.cgi?id=223678

Reviewed by Mark Lam.

JSTests:

* stress/redefine-property-same-value-exception-check.js:
(shouldThrow):

Source/JavaScriptCore:

This can avoid eagerly resolving rope strings if it is not necessary.

* runtime/JSString.cpp:
(JSC::JSString::equalSlowCase const):

Canonical link: https://commits.webkit.org/235693@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 09:55:54 +00:00
Philippe Normand e90a458604 [Flatpak SDK] Add nghttp2 client library
https://bugs.webkit.org/show_bug.cgi?id=223585

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-24
Reviewed by Carlos Garcia Campos.

* elements/sdk-platform.bst:
* elements/sdk/nghttp2.bst: Added.

Canonical link: https://commits.webkit.org/235692@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 08:38:26 +00:00
Rob Buis 81b6603041 [css-grid] Do not allow negative heights
https://bugs.webkit.org/show_bug.cgi?id=221439

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-24
Reviewed by Javier Fernandez.

Source/WebCore:

Do not allow negative heights in calculations.

Test: fast/css-grid-layout/zero-height-crash.html

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::setup):
* rendering/GridTrackSizingAlgorithm.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeTrackSizesForDefiniteSize):
(WebCore::RenderGrid::gridGap const):
(WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const):
(WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching const):

LayoutTests:

Add test for this.

* fast/css-grid-layout/zero-height-crash-expected.txt: Added.
* fast/css-grid-layout/zero-height-crash.html: Added.

Canonical link: https://commits.webkit.org/235691@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 07:44:20 +00:00
Lauro Moura 99b7d59009 [GLIB] Gardening some crashes and flakies
Unreviewed test gardening.

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

Canonical link: https://commits.webkit.org/235690@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 06:17:55 +00:00
Tim Horton 4052c191e0 Consolidate Books bundle checks
https://bugs.webkit.org/show_bug.cgi?id=223664
<rdar://problem/75754750>

Reviewed by Wenson Hsieh.

Source/WebCore:

No new tests, no change in behavior.

* Modules/geolocation/Geolocation.cpp:
(WebCore::isRequestFromIBooks):
* bindings/js/CommonVM.cpp:
(WebCore::globalConstRedeclarationShouldThrow):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::initMouseEventQuirk):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::currentRunLoop):
* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::CocoaApplication::isIBooks):
(WebCore::MacApplication::isIBooks): Deleted.
(WebCore::IOSApplication::isIBooks): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::synchronousWillSendRequestEnabled):
* rendering/RenderBox.cpp:
(WebCore::allowMinMaxPercentagesInAutoHeightBlocksQuirk):
Transition to a single bundle check for Books, since the quirks are generally
about book content, not about the app's behavior. Long-term, we should
get rid of these entirely (some are no longer necessary, and the rest
should turn into switches that Books can toggle).

Source/WebKitLegacy/mac:

* WebView/WebViewData.mm:
(currentRunLoop):


Canonical link: https://commits.webkit.org/235689@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 06:06:42 +00:00
Fujii Hironori 77cf64f5ed [WinCairo] Unreviewed test gardening
* platform/wincairo-wk1/TestExpectations:
* platform/wincairo/TestExpectations:

Canonical link: https://commits.webkit.org/235688@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 05:19:45 +00:00
Simon Fraser 995b66752c Add DisplayRefreshMonitorFactory.
https://bugs.webkit.org/show_bug.cgi?id=223648

Reviewed by Chris Dumez.

Future work will require that it's possible to create a DisplayRefreshMonitor
without having a DisplayRefreshMonitorClient. It was also weird that the way to
create a DisplayRefreshMonitor was via the DisplayRefreshMonitorClient, so
this change fixes both by adding DisplayRefreshMonitorFactory.

In WK2, the drawing areas are DisplayRefreshMonitorFactories. If there is no
factory, we fall back to the default implementations.

Source/WebCore:

* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
(WebCore::EmptyDisplayRefreshMonitorFactory::sharedEmptyDisplayRefreshMonitorFactory):
(WebCore::EmptyChromeClient::displayRefreshMonitorFactory const):
(WebCore::EmptyChromeClient::createDisplayRefreshMonitor const): Deleted.
* loader/EmptyClients.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::displayRefreshMonitorFactory const):
(WebCore::ChromeClient::createDisplayRefreshMonitor const): Deleted.
* page/RenderingUpdateScheduler.cpp:
(WebCore::RenderingUpdateScheduler::displayRefreshMonitorFactory const):
(WebCore::RenderingUpdateScheduler::createDisplayRefreshMonitor const): Deleted.
* page/RenderingUpdateScheduler.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::create):
* platform/graphics/DisplayRefreshMonitor.h:
* platform/graphics/DisplayRefreshMonitorClient.cpp:
(WebCore::DisplayRefreshMonitorClient::DisplayRefreshMonitorClient): Deleted.
* platform/graphics/DisplayRefreshMonitorClient.h:
* platform/graphics/DisplayRefreshMonitorFactory.h: Copied from Source/WebCore/platform/graphics/DisplayRefreshMonitorClient.cpp.
* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::monitorForClient):
* platform/graphics/GraphicsLayerUpdater.cpp:
(WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
(WebCore::GraphicsLayerUpdater::displayRefreshMonitorFactory const):
(WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor const): Deleted.
* platform/graphics/GraphicsLayerUpdater.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::displayRefreshMonitorFactory):
(WebCore::RenderLayerCompositor::createDisplayRefreshMonitor const): Deleted.
* rendering/RenderLayerCompositor.h:

Source/WebKit:

Remove DrawingAreaMac.cpp since its code was entirely related to creating
DisplayRefreshMonitorMac objects.

* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::displayRefreshMonitorFactory const):
(WebKit::WebChromeClient::createDisplayRefreshMonitor const): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::createDisplayRefreshMonitor): Deleted.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor):
* WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp: Renamed from Source/WebKit/WebProcess/WebPage/mac/DrawingAreaMac.cpp.
(WebKit::DisplayRefreshMonitorMac::DisplayRefreshMonitorMac):
(WebKit::DisplayRefreshMonitorMac::~DisplayRefreshMonitorMac):
(WebKit::DisplayRefreshMonitorMac::requestRefreshCallback):
(WebKit::DisplayRefreshMonitorMac::displayLinkFired):
* WebProcess/WebPage/mac/DisplayRefreshMonitorMac.h: Copied from Source/WebCore/platform/graphics/GraphicsLayerUpdater.h.
(WebKit::DisplayRefreshMonitorMac::create):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::createDisplayRefreshMonitor):


Canonical link: https://commits.webkit.org/235687@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 02:35:26 +00:00
Katherine Cheney 9a8bc82015 Service worker loads are not marked as app-bound
https://bugs.webkit.org/show_bug.cgi?id=222635
<rdar://problem/74395950>

Source/WebCore:

Reviewed by Youenn Fablet.

Fix capitalization error. Add a new function to mark the service
worker document loader as app-bound.

* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setLastNavigationWasAppBound):
(WebCore::DocumentLoader::setlastNavigationWasAppBound): Deleted.
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::setLastNavigationWasAppBound):
* workers/service/context/ServiceWorkerThreadProxy.h:

Source/WebKit:

Reviewed by Youenn Fablet.

Mark the service worker document loader as app-bound or not when
initiating a fetch event.

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::startFetch):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createDocumentLoader):
Fix capitalization error.

Tools:

API test coverage for fetched and synthetic responses to make sure
they are marked as app-bound or not based on the main request.

Reviewed by Youenn Fablet.

* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:


Canonical link: https://commits.webkit.org/235686@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 01:14:33 +00:00
Dean Jackson 02781b2edf Enable Metal ANGLE backend for WebGL
https://bugs.webkit.org/show_bug.cgi?id=220076
<rdar://problem/72565020>

Patch by Dean Jackson <yolo@apple.com> on 2021-03-23
Reviewed by Sam Weinig.

Source/WTF:

Turn the Metal backend for ANGLE on, moving the feature
from Internal to Experimental.

* Scripts/Preferences/WebPreferencesExperimental.yaml:
* Scripts/Preferences/WebPreferencesInternal.yaml:

LayoutTests:

Updated results for WebGL 2 content with the Metal ANGLE
backend. See https://bugs.webkit.org/show_bug.cgi?id=222239

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

Canonical link: https://commits.webkit.org/235685@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 00:53:25 +00:00
Simon Fraser c83ceb0e17 Use FramesPerSecond in more places in WebCore
https://bugs.webkit.org/show_bug.cgi?id=223656

Reviewed by Tim Horton.

Use FramesPerSecond rather than 'unsigned' in more places in WebCore.

* page/Chrome.h:
* page/Page.cpp:
(WebCore::Page::windowScreenDidChange):
* page/Page.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::windowScreenDidChange):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::windowScreenDidChange):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::windowScreenDidChange):
* page/scrolling/ScrollingTree.h:
* platform/HostWindow.h:


Canonical link: https://commits.webkit.org/235684@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 00:45:50 +00:00
Chris Dumez c0d23d1213 DerivedSources/WebKitTestRunner/JSAccessibilityUIElement.cpp:802:72: runtime error: -1 is outside the range of representable values of type 'unsigned int'
https://bugs.webkit.org/show_bug.cgi?id=223650

Reviewed by Darin Adler.

Source/WTF:

Update the clampTo() template specialization that converts floating types into integer types so that
it deals with NaN inputs in a well-defined manner. Previously, it would simply cast the NaN to the
integer type, which was undefined behavior. We now return the minimum range boundary for the output
when the input is NaN.

* wtf/MathExtras.h:
(clampTo):

Tools:

The bindings generator used by WebKitTestRunner was converting all numbers into double and
passing that to the implementation, no matter the IDL type (e.g. unsigned long). As a result,
there may be a type mismatch between the value the bindings are passing and the implementation
function getting called. This implicit conversion has undefined behavior in some cases and it
triggers UBSan errors. To address the issue, we now call clampTo<NativeNumberType>() on the
double before passing it to the implementation. This makes sure we pass the implementation
the type it expects and that the conversion is well-defined.

* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
(_generateImplementationFile):
(_nativeNumericType):
(_platformType):
(_platformTypeConstructor):
(_platformTypeVariableDeclaration):


Canonical link: https://commits.webkit.org/235683@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 00:30:11 +00:00
Fujii Hironori 8bb6f5c7a2 [WinCairo] Implement inspector-resource:// URL scheme handler for Web Inspector resources
https://bugs.webkit.org/show_bug.cgi?id=223619

Reviewed by Don Olmstead.

Implemented inspector-resource:// URL scheme handler for WinCairo
port. Mac port did it in Bug 179904.

http/tests/inspector tests were crashing due to
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION failure (See Bug 223566).

* PlatformWin.cmake:
* UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.cpp: Added.
(WebKit::InspectorResourceURLSchemeHandler::platformStartTask):
* UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.h: Added.
* UIProcess/Inspector/win/WebInspectorUIProxyWin.cpp:
(WebKit::WebInspectorUIProxy::platformCreateFrontendPage):
(WebKit::WebInspectorUIProxy::inspectorPageURL):
(WebKit::WebInspectorUIProxy::inspectorTestPageURL):
* WebProcess/Inspector/win/WebInspectorUIWin.cpp:
(WebKit::WebInspectorUI::localizedStringsURL const):
(WebKit::RemoteWebInspectorUI::localizedStringsURL const):

Canonical link: https://commits.webkit.org/235682@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 00:15:09 +00:00
Yusuke Suzuki 9668562538 [JSC] Functor for WeakGCMap::ensureValue must not invoke GC
https://bugs.webkit.org/show_bug.cgi?id=223629
Source/JavaScriptCore:

<rdar://problem/75619217>

Reviewed by Mark Lam.

The functor for WeakGCMap::ensureValue must not invoke GC. GC can prune entries in WeakGCMap.
So we can modify underlying HashMap while we are just touching it for HashMap::ensure. This
can corrupt HashMap. To ensure this invariant, we put DisallowGC for WeakGCMap::ensureValue.
So we cannot invoke GC in the functor of that function (otherwise, assertion hits).

And we use DeferGC in createCustomGetterFunction / createCustomSetterFunction to avoid invoking
GC in WeakGCMap::ensureValue. This defers GC invocation until this DeferGC scope is destroyed,
and ensures that functor invoked by WeakGCMap::ensureValue will not cause GC.

* runtime/JSObject.cpp:
(JSC::createCustomGetterFunction):
(JSC::createCustomSetterFunction):
(JSC::JSObject::getOwnPropertyDescriptor):
* runtime/WeakGCMap.h:

Source/WebCore:

Reviewed by Mark Lam.

Test: js/dom/weak-gc-map-ensure-value-should-not-invoke-gc.html

* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::createCrossOriginFunction):
(WebCore::JSDOMGlobalObject::createCrossOriginGetterSetter):

LayoutTests:

Reviewed by Mark Lam.

* js/dom/weak-gc-map-ensure-value-should-not-invoke-gc-expected.txt: Added.
* js/dom/weak-gc-map-ensure-value-should-not-invoke-gc.html: Added.

Canonical link: https://commits.webkit.org/235681@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-23 23:34:45 +00:00