Commit Graph

240929 Commits

Author SHA1 Message Date
Fujii Hironori f603eb47aa [Fetch API][WebKit1] http/tests/fetch/keepalive-fetch-2.html is randomly failing
https://bugs.webkit.org/show_bug.cgi?id=229247

Unreviewed test gardening.

WebKit1 doesn't properly support keepalive fetch. Marked it as
flaky. Increased the number of fetches for testing WebKit2 more.

* http/tests/fetch/keepalive-fetch-2.html:
* http/tests/fetch/resources/keepalive-fetch-2-window.html:
* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:

Canonical link: https://commits.webkit.org/240655@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-19 00:34:51 +00:00
Ryosuke Niwa f8a029b168 [ iOS Debug ] 12 TestWebKitAPI.WebKitLegacy. tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=229250

Reviewed by Wenson Hsieh.

Disable the assertion when Web Thread is enabled for now.

* wtf/CheckedRef.h:
(WTF::SingleThreadIntegralWrapper::assertThread const):


Canonical link: https://commits.webkit.org/240654@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-19 00:20:53 +00:00
Jonathan Bedard f3435a15b5 [run-webkit-tests] Remember failures when repeating test
https://bugs.webkit.org/show_bug.cgi?id=229217
<rdar://problem/81919223>

Reviewed by Ryan Haddad.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.update_summary_with_result): Replace existing result with unexpected result so
that unexpected results always take precedence over expected ones.
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.add): Do not replace existing result.


Canonical link: https://commits.webkit.org/240653@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-19 00:20:00 +00:00
Chris Dumez d10c58b76c Unreviewed, reverting r281206.
Reverting because of branching, will re-land soon

Reverted changeset:

"Implement Crypto.randomUUID()"
https://bugs.webkit.org/show_bug.cgi?id=229240
https://commits.webkit.org/r281206

Canonical link: https://commits.webkit.org/240652@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 23:14:15 +00:00
Eric Hutchison fcdcbe0865 [Mac wk1 Debug] imported/w3c/web-platform-tests/IndexedDB/idbcursor-advance-continue-async.htm is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=229252.

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

Canonical link: https://commits.webkit.org/240651@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 22:00:58 +00:00
Lauro Moura 3cb27927f4 REGRESSION(r279169) [WebDriver] WPT Tools now requires python3 to launch the server
https://bugs.webkit.org/show_bug.cgi?id=229248

Reviewed by Chris Dumez.

239066@main updated the layout test WPT tools to
94d018bb5d7c0d46df7ba1 and this version requires Python3 to run the
WPT server.

* Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
(WebDriverW3CWebServer.start):


Canonical link: https://commits.webkit.org/240650@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 21:41:54 +00:00
Megan Gardner 8a606cafdd Remove unneeded UIKitSPI declarations
https://bugs.webkit.org/show_bug.cgi?id=210075

Reviewed by Wenson Hsieh.

Source/WebKit:

No code changes, just using the now fully public API.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _highlightLongPressRecognized:]):
(-[WKContentView _doubleTapRecognizedForDoubleClick:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _singleTapRecognized:]):
(gestureRecognizerModifierFlags): Deleted.

Source/WTF:

Remove unneeded feature define.

* wtf/PlatformHave.h:


Canonical link: https://commits.webkit.org/240649@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 21:17:26 +00:00
Fujii Hironori b7cab643e4 [Win] http/tests/fetch/keepalive-fetch-2.html is randomly failing
https://bugs.webkit.org/show_bug.cgi?id=229247

Unreviewed test gardening.

* platform/win/TestExpectations: Marked it as flaky.
* platform/wincairo-wk1/TestExpectations: Ditto.

Canonical link: https://commits.webkit.org/240648@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 20:21:06 +00:00
Chris Dumez fe61e6a1e5 Implement Crypto.randomUUID()
https://bugs.webkit.org/show_bug.cgi?id=229240

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

* web-platform-tests/WebCryptoAPI/randomUUID.https.any-expected.txt:
* web-platform-tests/WebCryptoAPI/randomUUID.https.any.worker-expected.txt:

Source/WebCore:

Implement Crypto.randomUUID():
- https://wicg.github.io/uuid/#extensions-to-the-crypto-interface

Chrome already implements this and Firefox seems to be working on it
(https://bugzilla.mozilla.org/show_bug.cgi?id=1705264).

No new tests, rebaselined existing tests.

* page/Crypto.cpp:
(WebCore::Crypto::randomUUID const):
* page/Crypto.h:
* page/Crypto.idl:


Canonical link: https://commits.webkit.org/240647@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 19:13:37 +00:00
Eric Hutchison ed5c083bfe [Mac Debug] imported/w3c/web-platform-tests/IndexedDB/key-generators/reading-autoincrement-indexes-cursors.any.worker.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=229244.

Unreviewed test gardening.

* platform/mac/TestExpectations:

Canonical link: https://commits.webkit.org/240646@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 19:05:11 +00:00
Youenn Fablet 1a39ead4d9 [MacOS] Use com.apple.webkit.microphone extension to gate microphone access in GPUProcess sandbox
https://bugs.webkit.org/show_bug.cgi?id=229238

Reviewed by Eric Carlson.

Manually tested.

* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
Align to iOS and only allow microphone access in sandbox if com.apple.webkit.microphone is sent to GPUProcess.
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultCaptureAudioInGPUProcessEnabled):
Do audio capture in UIProcess for non Safari applications until rdar://problem/29448368 is fixed.


Canonical link: https://commits.webkit.org/240645@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 18:04:09 +00:00
Andres Gonzalez 84a3f71676 Add layout test for WebAccessibilityObjectWrapper handler for attribute AXLineForTextMarker on MacOS.
https://bugs.webkit.org/show_bug.cgi?id=229220
<rdar://problem/82057459>

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/mac/line-index-for-textmarker.html

There was not a layout test that exercised directly the handler for the
AXLineForTextMarker attribute in [WebAccessibilityObjectWrapper
accessibilityAttributeValue:withParameter:].
This patch adds the above test to exercise this method for textarea and
contenteditable elements. The text in these elements includes soft and
hard linebreaks, which are important test cases for this API.
The handler for AXLineForTextMarker in turn calls
AccessibilityObject::lineForPosition, and analyzing this method, made a
minor optimization by getting rid off of an unnecessary local variable
and object copy.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::lineForPosition const):

Tools:

Added AccessibilityUIElement::lineIndexForTextMarker.

* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::lineIndexForTextMarker const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::lineIndexForTextMarker const):

LayoutTests:

* accessibility/mac/line-index-for-textmarker-expected.txt: Added.
* accessibility/mac/line-index-for-textmarker.html: Added.
* platform/mac-wk1/TestExpectations:


Canonical link: https://commits.webkit.org/240644@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 17:57:24 +00:00
Sihui Liu 2ff72b6b44 Do not terminate relaunched network process when getting network process connection
https://bugs.webkit.org/show_bug.cgi?id=229236

Reviewed by Chris Dumez.

When UI process fails to get network process connection for the first time, it will retry on next runloop
iteration. On the retry, it terminates existing network process and relaunch a network process, because the
failure may indicate something is wrong in the network process. If existing network process is different from
the one on first try, the existing process can be functional and we should not terminate it.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::getNetworkProcessConnection):


Canonical link: https://commits.webkit.org/240643@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 17:45:29 +00:00
Simon Fraser 2637c591e9 Update feature statuses in features.json
https://bugs.webkit.org/show_bug.cgi?id=229212

Reviewed by Wenson Hsieh.

Update the status of various features in features.json to reflect their current state.

Remove `"enabled-by-default": true` from features that are marked as Supported.

* features.json:


Canonical link: https://commits.webkit.org/240642@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 17:42:30 +00:00
Jonathan Bedard 545620a985 [git-webkit] "IndexError: list index out of range" using log
https://bugs.webkit.org/show_bug.cgi?id=229232

Reviewed by Ryan Haddad.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.pager):


Canonical link: https://commits.webkit.org/240641@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 17:19:25 +00:00
Megan Gardner 2726d9605b Add Highlight API to features.json
https://bugs.webkit.org/show_bug.cgi?id=208226

Reviewed by Simon Fraser.

* features.json:


Canonical link: https://commits.webkit.org/240640@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 17:16:10 +00:00
Wenson Hsieh 9f0843a529 Add a layout test for webkit.org/b/229200
https://bugs.webkit.org/show_bug.cgi?id=229222
rdar://81636256

Reviewed by Simon Fraser.

Add a layout test to exercise the hang fixed in bug #229200. This test can be manually run by opening it in
browser and verifying that the page does not hang (and outputs the expected PASS messages).

* fast/canvas/draw-text-repeatedly-into-disconnected-canvas-expected.txt: Added.
* fast/canvas/draw-text-repeatedly-into-disconnected-canvas.html: Added.


Canonical link: https://commits.webkit.org/240639@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 16:58:52 +00:00
Eric Hutchison 1e0c394ba7 [Mac wk1] css/css-position/position-relative-table* tests fail.
https://bugs.webkit.org/show_bug.cgi?id=203449.

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

Canonical link: https://commits.webkit.org/240638@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 16:58:30 +00:00
Jer Noble 0b7f26745a REGRESSION(r280723): Protected HLS + EME playback fails with "temporary error"
https://bugs.webkit.org/show_bug.cgi?id=229201
<rdar://81807216>

Reviewed by Eric Carlson.

In r280723, we stopped unconditionally creating an AVPlayerLayer when we create an AVPlayer. However,
we will still create an AVPlayerItemVideoOutput when we create an AVPlayerItem. This leaves our
AVPlayer in a state where AVFoundation will throw a "temporary error; try again later" when given
an otherwise valid protected HLS stream and key data through EME.

To work around this behavior, delay creating the AVPlayerItemVideoOutput until explicitly told to
create video renderers, typically simultaneous to creating an AVPlayerLayer.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):


Canonical link: https://commits.webkit.org/240637@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 16:50:30 +00:00
Michael Catanzaro 289592c105 REGRESSION(r280382): [GTK] 2.33.3 does not build with gtk-doc enabled, installs broken pkg-config files
https://bugs.webkit.org/show_bug.cgi?id=229152

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2021-08-18
Reviewed by Philippe Normand.

Source/JavaScriptCore:

* PlatformGTK.cmake:
* javascriptcoregtk.pc.in:

Source/WebKit:

CMake is expanding templates in the pkg-config files that are not supposed to be expanded.
Oops! Let's switch back to using @SVN_REVISION@ instead of ${SVN_REVISION} as the template
for inserting the SVN revision into the pkg-config file, so we can tell CMake to leave the
${} variables alone.

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* Shared/glib/BuildRevision.h.in:
* gtk/webkit2gtk-web-extension.pc.in:
* gtk/webkit2gtk.pc.in:

Tools:

* glib/apply-build-revision-to-files.py:
(main):

Canonical link: https://commits.webkit.org/240636@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 16:46:34 +00:00
Jonathan Bedard aaffdf715b [webkitcorepy] Add CallByNeed object
https://bugs.webkit.org/show_bug.cgi?id=229148
<rdar://problem/81817705>

Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, export Defer object.
* Scripts/libraries/webkitcorepy/webkitcorepy/call_by_need.py: Added.
(CallByNeed):
(CallByNeed.__init__):
(CallByNeed.__getattribute__): Depending on the request attribute, either return it or attempt to
resolve the underlying value before returning the attribute of the resolved value.
(CallByNeed.value): Resolve and return underlying object.
(CallByNeed.__call__): Ditto.
(CallByNeed.__repr__): Resolve object and return representation.
(CallByNeed.__str__): Resolve object and return string conversion.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/call_by_need_unittest.py: Added.
(TestCallByNeed):
(TestCallByNeed.test_basic):
(TestCallByNeed.test_string_conversion):
(TestCallByNeed.test_attribute_forwarding):
(TestCallByNeed.test_failed_attribute_forwarding):


Canonical link: https://commits.webkit.org/240635@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 16:34:05 +00:00
Ayumi Kojima 7baa8a9cd9 [ MacOS EWS ] inspector/canvas/recording-2d-memoryLimit.html is flaky crashing..
https://bugs.webkit.org/show_bug.cgi?id=229237

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/240634@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 16:22:18 +00:00
Martin Robinson aa58705720 [css-scroll-snap] Don't snap to offscreen snap areas in unidirectional scrolls
https://bugs.webkit.org/show_bug.cgi?id=227949
<rdar://problem/80895783>

Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-both-expected.txt: This bidirectional
scrolling test no longer snaps because we don't have support for choosing between two candidates
properly yet.
* web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-x-axis-expected.txt: Updated to show newly passing test.
* web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-y-axis-expected.txt: Ditto.

Source/WebCore:

No new tests. This is covered by two existing WPT tests.

* page/scrolling/ScrollSnapOffsetsInfo.cpp:
(WebCore::componentForAxis): Added this helper.
(WebCore::hasCompatibleSnapArea): Added this helper that checks to see if any of the snap areas
at a given scroll snap position are compatible with the viewport.
(WebCore::adjustPreviousAndNextForOnscreenSnapAreas): Adjusts the selected previous and next snap
positions by looking backward and forward for the first compatible snap position.
(WebCore::closestSnapOffsetWithInfoAndAxis): Use the new helper.


Canonical link: https://commits.webkit.org/240633@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 15:59:48 +00:00
Chris Dumez 838bed3011 Crash under JSIntersectionObserverCallback::handleEvent()
https://bugs.webkit.org/show_bug.cgi?id=229196
<rdar://82016054>

Reviewed by Geoffrey Garen.

Early return in IntersectionObserver::notify() if the callback has already been destroyed.
This is not supposed to happen as we're supposed to be keeping the JSIntersectionObserver
wrapper alive as long as the IntersectionObserver may fire events, which should keep the
callback alive too. However, despite Ryosuke's fix in r280549, the crash is still happening
in the wild. To address the crash, I am simply doing an early return for now, similarly to
what we already do in MutationObserver::deliver(), while keeping a debug assertion around
in hope of finding the root cause at some point.

No new tests, we do not not how this is happening yet.

* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::notify):

Canonical link: https://commits.webkit.org/240632@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 15:25:04 +00:00
Wenson Hsieh fefd979648 REGRESSION (iOS 15): DoubleDown Casino app won't load past launch page
https://bugs.webkit.org/show_bug.cgi?id=229200
rdar://81636256

Reviewed by Myles C. Maxfield.

The changes in https://webkit.org/b/228216 to fix rdar://80473805 introduced a mechanism to keep track of uses
of cached fonts and images in display list items in the web and GPU processes, via a `useCount` counter variable
that's incremented in the web process whenever the font or image is used in a display list item and decremented
in the GPU process whenever the item is processed.

However, the code to increment `useCount` in the web process currently only triggers at most once per rendering
update — this means that if there are multiple canvas drawing commands that use fonts in the same rendering
update, the web process' notion of `useCount` will fall out of sync with the GPU process' notion of `useCount`.

In most cases, this causes the cached font to remain for longer in the GPU process than necessary; however, in
this specific scenario, it's possible for the web process to tell the GPU process to release the cached font too
early, which causes the GPU process to prematurely purge the font from the cache, and subsequently wait for the
cached font to arrive (which will never arrive, since the web process has already released the font).

In other words, the timeline of events between the web and GPU processes looks like this (where `f` is a cached
web font, `A_f` is a drawing command that uses `f`, and `B_f` is another drawing command that uses `f`).

WEB                                             GPU
==============================================================
1. Cache `f`
2. Append `A_f`
                                                3. Cache `f`
                                                4. Play back `A_f`
5. Append `B_f`
6. Release `f` (use count was 1 here)
                                                7. Release `f` (use count dropped from 1 to 0)
                                                8. Play back `B_f`
                                                ...and then display list playback stops due to `f` not being in
                                                the cache.

To address this, we simply move the `useCount` increment in the web process out of the rendering update check.
The original intent of the fix for bug #228216 was to allow for `useCount` to increment as many times as needed
per rendering update, so this limitation was unintentional.

Unfortunately, I have not been able to come up with a layout test that reliably reproduces this scenario (yet).

* WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::RemoteResourceCacheProxy::recordFontUse):


Canonical link: https://commits.webkit.org/240631@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 13:42:48 +00:00
Martin Robinson 8c824e1c52 position: sticky with display: inline-block
https://bugs.webkit.org/show_bug.cgi?id=224415
<rdar://problem/76811968>

Reviewed by Simon Fraser.

Source/WebCore:

Improve sticky positioning applied to inline items. The first improvement is to
skip anonymous RenderBlock parents of inline display items when looking for the
containing block used to calculate sticky constraints. These anonymous parents
are not the containing block that constrains the movement of these kind of stickily
positioned items. Instead look for containing block for the anonymous parent,
which does limit the scroll boundaries of inline stickily position items.

Previously, when converting the frame rect from the coordinate space of the stickily
positioned item to that of the scrolling container, the code used to apply the offset
from the containing block to the scrolling ancestor directly to the frame rect. That
doesn't work when the containing block that determines sticky constraints is not the
direct containing block of the stickily positioned items (as it is for inlines).

Instead, the code now just maps the frame rect directly from the item parent to
the scrolling ancestor. This simplifies things a bit and allows it to work with
inline stickily positioned items.

Finally, this change adds comments to make it clearer what this method is doing.

No new tests. This is covered by existing WPT tests. Specifically the following
tests are now passing:
 imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-hyperlink.html
 imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-nested-table.html
 imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-parts.html
 imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-th-bottom.html
 imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-nested-thead-th.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::positionOffsetValue): enclosingClippingBoxForStickyPosition now returns a pair
to avoid passing in a pointer. Only look at the first part of the pair here.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints const): Modified this method
to return a pair in order to avoid dealing with input parameters. This allows simplifying this
method, making the code a bit simpler.
(WebCore::RenderBoxModelObject::enclosingClippingBoxForStickyPosition const): Deleted.
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints const): Make two changes
to this method to improve sticky positioning for inline elements. The first change is
to be a bit better about finding the appropriate containing block for calculating sticky
constraints. The second is to more resiliently move from coordinate systems. In addition,
improve the comments for this method to make it clearer what is happening at each step.
* rendering/RenderBoxModelObject.h: Updated method declaration.

LayoutTests:

* TestExpectations: Unskip newly passing tests and skip one test which was
a false pass previously.


Canonical link: https://commits.webkit.org/240630@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 13:30:04 +00:00
Martin Robinson 744ffecdf7 [Flatpak SDK] Increase the startup performance of webkit-flatpak
https://bugs.webkit.org/show_bug.cgi?id=229185

Reviewed by Philippe Normand.

Improve flatpakutils.py by ensuring that we don't make redundant
calls to flatpak during initialization of the data structures. This
saves 5 seconds on every call to build-webkit and run-webkit-tests.

Before:
    $ time ./Tools/Scripts/webkit-flatpak -c true
    real    0m6,297s
    user    0m0,786s
    sys     0m0,513s

After:
    $ time ./Tools/Scripts/webkit-flatpak -c true
    real    0m1,243s
    user    0m0,375s
    sys     0m0,162s

* flatpak/flatpakutils.py:
(FlatpakPackages.__init__): Separate the update into another
method so that it can be called directly when a package is installed.
Add new packages directly to self.packages.
(FlatpakRepos.__init__): Ensure that we only update our repositories
and package list once we've initialized our list of repositories.
(FlatpakRepos.add): Return True if this method actually changed anything
and accept a parameter determining whether an update is done to
the repository and package list.
(FlatpakRepos.is_package_installed): Added this method which replaces
FlatpakRepo.is_app_installed.
(FlatpakRepo.__init__): Remove the app registry because it is duplicated
by FlatpakPackages.
(FlatpakPackage.is_installed): Now call FlatpakRepos.is_package_installed.
(WebkitFlatpak._reset_repository): Set up both repositories here and
pass then as part of the FlatpakRepos constructor.
(WebkitFlatpak.main): Separate out the check which deletes the Flatpak
repository from the one that checks if the packages are installed. This
makes sure we don't install packages and then immediately delete them.
(WebkitFlatpak.check_installed_packages): rename _get_packages to _get_dependency_packages
in order to make it clear that it doesn't return installed packages.
(WebkitFlatpak._get_dependency_packages): Ditto.
(WebkitFlatpak.install_all): Ditto.
(FlatpakRepo.is_app_installed): Deleted.
(WebkitFlatpak._get_packages): Deleted.


Canonical link: https://commits.webkit.org/240629@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 09:13:47 +00:00
Xabier Rodriguez-Calvar 28c9945267 [GStreamer][EME] Try to parse XML init datas that could possibly come from MPD manifests
https://bugs.webkit.org/show_bug.cgi?id=229145

Reviewed by Alicia Boya Garcia.

Source/WebCore:

Added GStreamerEMEUtilities to include implementation of
InitData::extractCencIfNeeded. This tries to parse the possible
XML inside an init data that could come from MPD manifests. If it
succeeds, it keeps the parsed init data, if not, it returns the
original one.

Based on a patch by Philippe Normand.

* platform/GStreamer.cmake:
* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp: Added.
(WebCore::markupStartElement):
(WebCore::markupEndElement):
(WebCore::markupText):
(WebCore::markupPassthrough):
(WebCore::markupError):
(WebCore::InitData::extractCencIfNeeded):
* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
(WebCore::InitData::InitData):

Source/WTF:

* wtf/glib/GUniquePtr.h: Added deleter for GMarkupParseContext.


Canonical link: https://commits.webkit.org/240628@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 08:26:33 +00:00
Devin Rousso c7d1c61a61 Web Inspector: match the undocked tab bar style when docked bottom/side
https://bugs.webkit.org/show_bug.cgi?id=212398

Reviewed by Timothy Hatcher.

Source/WebCore:

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::platformVersionName const):
Add macOS Monterey.

Source/WebInspectorUI:

This will avoid confusion when switching from docked to undocked (and vice versa) as the tab
bar UI will no longer be significantly different.

* UserInterface/Views/TabBar.js:
(WI.TabBar):
(WI.TabBar.prototype.layout):
(WI.TabBar.prototype.layout.measureWidth):
(WI.TabBar.prototype._recordTabBarItemSizesAndPositions):
(WI.TabBar.prototype._applyTabBarItemSizesAndPositions):
(WI.TabBar.prototype._clearTabBarItemSizesAndPositions):
(WI.TabBar.prototype._handleMouseDown):
(WI.TabBar.prototype._handleMouseMoved):
(WI.TabBar.get horizontalPadding): Deleted.
(WI.TabBar.prototype._recordTabBarItemSizesAndPositions.add): Deleted.
* UserInterface/Views/TabBar.css:
(.tab-bar):
(body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar, body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar): Added.
(.tab-bar > .tabs > .item):
(body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item): Added.
(.tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)):
(.tab-bar > .tabs > .item:nth-child(n + 2 of :not(.hidden)), .tab-bar > .tabs:not(.hide-border-start) > .item:nth-child(1 of :not(.hidden)), .tab-bar > .tabs.dragging-tab > .item.selected):
(.tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden))):
(body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body:is(.mac-platform.monterey, .mac-platform.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(.tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover, .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover + .item):
(.tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover):
(body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item, body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item): Added.
(body.window-inactive .tab-bar > .tabs > .item):
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected):
(.tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected):
(body.window-inactive .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body.window-inactive .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body.window-inactive .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar, body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(@media (prefers-color-scheme: dark) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar, body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body.big-sur .tab-bar): Deleted.
(body:not(.docked) .tab-bar): Deleted.
(body.big-sur:not(.docked) .tab-bar): Deleted.
(body:not(.big-sur):not(.docked) .tab-bar): Deleted.
(body.big-sur:not(.docked).window-inactive .tab-bar, body:not(.big-sur):not(.docked).window-inactive .tab-bar): Deleted.
(body.docked.window-inactive .tab-bar): Deleted.
(body.docked.bottom .tab-bar > .border.top): Deleted.
(body.big-sur.docked .tab-bar > .border.bottom): Deleted.
(body.docked .tab-bar .tabs): Deleted.
(body.docked .tab-bar > .tabs > .flexible-space): Deleted.
(body.docked.bottom .tab-bar > .tabs > .flexible-space): Deleted.
(body:not(.docked) .tab-bar > .tabs > .item): Deleted.
(body.big-sur:not(.docked) .tab-bar > .tabs > .item): Deleted.
(body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item): Deleted.
(body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)): Deleted.
(body.docked .tab-bar > .tabs > .item): Deleted.
(body:not(.docked) .tab-bar > .tabs > .item:nth-child(n + 3 of :not(.hidden)), body:not(.docked) .tab-bar > .tabs:not(.hide-border-start) > .item:nth-child(2 of :not(.hidden)), .tab-bar > .tabs.dragging-tab > .item.selected): Deleted.
(body:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden))): Deleted.
(body.docked .tab-bar > .tabs > .item.pinned): Deleted.
(body.big-sur:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body.docked .tab-bar > .tabs > .item:not(.disabled):matches(.selected, :hover)): Deleted.
(body.docked .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body.big-sur:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(body:not(.big-sur):not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(body.docked .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover, body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover + .item): Deleted.
(body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover): Deleted.
(body:not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
(body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item, body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
(body:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body:not(.docked) .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked) .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked) .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Deleted.
(body:not(.docked).window-inactive .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked).window-inactive .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked).window-inactive .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur .tab-bar, body:not(.big-sur) .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.docked .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.docked.bottom .tab-bar > .border.top): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(@media (prefers-color-scheme: dark) body.docked .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(@media (prefers-color-scheme: dark) body.docked .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover > .icon): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar, body:not(.big-sur):not(.docked).window-inactive .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem.get horizontalMargin): Deleted.
 - remove the flexible space filler elements (and associated CSS) before and after the tabs
 - remove any `.docked` CSS
 - remove the (now unnecessary) `:not(.docked)` from all CSS related to the `WI.TabBar`
 - replace `.big-sur` with `.mac-platform.big-sur` for clarity
 - add `.mac-platform.monterey` alongside any `.mac-platform.big-sur`

* UserInterface/Base/Main.js:
(WI.undockedTitleAreaHeight):
* UserInterface/Views/Main.css:
(body:is(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive #undocked-title-area): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive #undocked-title-area): Added.
(body.big-sur #undocked-title-area): Deleted.
(body:not(.big-sur) #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur) #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur.window-inactive #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur).window-inactive #undocked-title-area): Deleted.
* UserInterface/Views/Variables.css:
(body:is(.mac-platform.monterey, .mac-platform.big-sur)): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)): Added.
(body:is(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur)): Added.
(body.big-sur): Deleted.
(body.mac-platform:not(.big-sur):not(.docked)): Deleted.
(body.mac-platform.big-sur:not(.docked)): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur): Deleted.
Add support for macOS Monterey.


Canonical link: https://commits.webkit.org/240627@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 06:50:16 +00:00
Alex Christensen 129553d980 Mark test as flaky: imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_values.html
https://bugs.webkit.org/show_bug.cgi?id=229181

* TestExpectations:
r281147 changed this test from flaky to differently flaky.
It used to pass sometimes because the whole document would load before any script was executed, so there was no PerformanceNavigationTiming
object to update as the document loaded.  r281147 fixed that, making it basically always pass when loaded over the real internet.
Now, sometimes it loads locally so fast that Performance::reduceTimeResolution makes some of the values 0, which is allowed by the spec but not
by the tests.  In practice, pages don't load over the internet in less than 1ms, so this isn't much of an issue, just in our test bots.
I'll propose a fix for the web platform test, but for now I mark it as flaky.



Canonical link: https://commits.webkit.org/240626@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 06:26:20 +00:00
Arcady Goldmints-Orlov 98a767a583 [GLIB] test http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html is a flaky timeout since r278004
https://bugs.webkit.org/show_bug.cgi?id=229219

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-08-17

* platform/glib/TestExpectations:

Canonical link: https://commits.webkit.org/240625@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 03:30:04 +00:00
Saam Barati 84cd9bea46 Add an option for canonicalizePrePostIncrements
https://bugs.webkit.org/show_bug.cgi?id=229211
<rdar://problem/82050126>

Reviewed by Mark Lam.

The current phase has bugs. Let's disable it for now until the bugs
are fixed. See discussion about the bugs I spotted in:
https://bugs.webkit.org/show_bug.cgi?id=228538

* b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* b3/testb3_3.cpp:
(addShrTests):
* runtime/OptionsList.h:


Canonical link: https://commits.webkit.org/240624@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 02:27:03 +00:00
Fujii Hironori a8d8176ba3 [curl] Kept alive NetworkResourceLoaders should be cancelled by NetworkLoad::didCompleteWithError on PolicyAction::Ignore of didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=228095
<rdar://problem/81393898>

Unreviewed test failure fix.

* http/tests/fetch/resources/get-set-temp-file.py: chmod +x.

Canonical link: https://commits.webkit.org/240623@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 02:20:25 +00:00
Sihui Liu 0c63d705bd Fix crash in TestWebKitAPI.NetworkProcess.CrashWhenNotAssociatedWithDataStore
https://bugs.webkit.org/show_bug.cgi?id=229209
rdar://82040197

Reviewed by Geoffrey Garen.

When getting network process connection fails, we don't need to retry or crash UI process if web process is
already gone.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::getNetworkProcessConnection):


Canonical link: https://commits.webkit.org/240622@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 00:55:59 +00:00
Ayumi Kojima 6282e8948d [ MacOS wk2 Debug ] http/wpt/webrtc/sframe-transform-error.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=229206

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/240621@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 00:12:19 +00:00
Ayumi Kojima c84e51d152 [ Win EWS ] Rebaselining 2 http/tests/security/contentSecurityPolicy/worker-* tests.
https://bugs.webkit.org/show_bug.cgi?id=229216

Unreviewed test gardening.

* platform/win/http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt:
* platform/win/http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt:

Canonical link: https://commits.webkit.org/240620@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 00:05:16 +00:00
Eric Hutchison 9c3b4f63d8 [Mac Guard-Malloc] imported/w3c/web-platform-tests/mathml/relations/html5-tree/display-2.html is a flaky failure.
rdar://82053210.

Unreviewed test gardening.

* platform/mac/TestExpectations:

Canonical link: https://commits.webkit.org/240619@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 23:56:38 +00:00
Ayumi Kojima eeedc0e734 [ Win EWS ] http/tests/security/no-javascript-refresh-percent-escaped.py is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=229215

Unreviewed test gardening.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240618@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 23:26:11 +00:00
Robert Jenner 1196f987c3 REGRESSION (r271146): [ iOS ] editing/selection/ios/scrolling-to-focused-element-inside-iframe.html is failing
https://bugs.webkit.org/show_bug.cgi?id=228200

Unreviewed test gardening.

* platform/ios/TestExpectations:

Canonical link: https://commits.webkit.org/240617@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 23:20:13 +00:00
Ayumi Kojima d3ee034556 [ Win EWS ] performance-api/performance-timeline-api.html needs to be rebaselined.
https://bugs.webkit.org/show_bug.cgi?id=229214

Unreviewed test gardening.

* platform/win/performance-api/performance-timeline-api-expected.txt:

Canonical link: https://commits.webkit.org/240616@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 23:10:11 +00:00
Robert Jenner 88d02e309f REBASELINE : [ iOS ] 3X imported/w3c/web-platform-t ests/css/css-typed-om layout-tests are constant text failures
https://bugs.webkit.org/show_bug.cgi?id=229207

Unreviewed test gardening/ iOS rebaseline.

* platform/ios/imported/w3c/web-platform-tests/css/css-typed-om/rotate-by-added-angle-expected.txt: Added.
* platform/ios/imported/w3c/web-platform-tests/css/css-typed-om/width-by-max-px-em-expected.txt: Added.
* platform/ios/imported/w3c/web-platform-tests/css/css-typed-om/width-by-min-px-em-expected.txt: Added.

Canonical link: https://commits.webkit.org/240615@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 22:54:13 +00:00
Jonathan Bedard aa1d66d940 [webkitcorepy] Return SourceFileLoader in find_module
https://bugs.webkit.org/show_bug.cgi?id=229172
<rdar://problem/82006256>

Reviewed by Stephanie Lewis.

* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(AutoInstall.find_module): Return SourceFileLoader object in Python 3.


Canonical link: https://commits.webkit.org/240614@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 22:16:18 +00:00
Ayumi Kojima 8083fc7199 [ Mac wk2 ] http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html is a flaky timeout.
rdar://82047046

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/240613@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 21:42:58 +00:00
Ayumi Kojima adc318cb12 Rebaselining [ Win EWS ] http/tests/misc/webtiming-slow-load.py.
https://bugs.webkit.org/show_bug.cgi?id=229099

Unreviewed test gardening.

* platform/win/TestExpectations:
* platform/win/http/tests/misc/webtiming-slow-load-expected.txt:

Canonical link: https://commits.webkit.org/240612@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 20:44:04 +00:00
Eric Hutchison d8a840c8e1 [Monterey] imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-double-write.https.html is a constant failure.
rdar://82044002.

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/240611@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 20:37:15 +00:00
David Kilzer d3c1e70fc1 [Metal ANGLE] Fix over-autorelease of rx::DisplayMtl::getMetalDeviceMatchingAttribute() and various Objective-C leaks
<https://webkit.org/b/229128>
<rdar://problem/81964007>

Reviewed by Alex Christensen.

* src/libANGLE/renderer/metal/DisplayMtl.h:
(rx::DisplayMtl::getMetalDeviceMatchingAttribute):
- Change to return mtl::AutoObjCPtr<> to make ownership clear.
(rx::DisplayMtl::mMetalDevice):
- No need to initialize to nil.

* src/libANGLE/renderer/metal/DisplayMtl.mm:
(rx::DisplayMtl::initializeImpl):
- Update for changes to getMetalDeviceMatchingAttribute().
(rx::DisplayMtl::getMetalDeviceMatchingAttribute):
- Change to return mtl::AutoObjCPtr<> to make ownership clear.
- Fix leak of `deviceList`, `externalGPUs`, `integratedGPUs`, and
  `discreteGPUs`.
- Use mtl::adoptObjCObj<>() to prevent leak of
  MTLCreateSystemDefaultDevice().

* src/libANGLE/renderer/metal/IOSurfaceSurfaceMtl.mm:
- Fix leak of `captureDescriptor` in two different if blocks.

* src/libANGLE/renderer/metal/ProgramMtl.mm:
- Fix leak of `funcConstants` in early return on error path.

* src/libANGLE/renderer/metal/ProvokingVertexHelper.mm:
(rx::ProvokingVertexHelper::getSpecializedShader):
- Fix leak of `fcValues`.

* src/libANGLE/renderer/metal/SurfaceMtl.mm:
- Fix leak of `captureDescriptor` in two different if blocks.

* src/libANGLE/renderer/metal/mtl_common.h:
(rx::mtl::WrappedObject::retainAssign):
- Move statement inside #if/#endif that isn't needed for ARC.
(rx::mtl::WrappedObject::unretainAssign): Add.
(rx::mtl::AutoObjCPtr::AutoObjCPtr): Add.
(rx::mtl::adoptObjCObj): Add.
- Add a helper method to adopt an Objective-C object to
  eliminate the need to autorelease a +1 retained object before
  an mtl::AutoObjCPtr<> object wraps it.  Modeled after
  WTF::RetainPtr<> in WebKit.

* src/libANGLE/renderer/metal/mtl_state_cache.mm:
(rx::mtl::RenderPipelineCache::createRenderPipelineState):
(rx::mtl::ProvokingVertexComputePipelineCache::createComputePipelineState):
- Use adoptObjCObj<>() to fix potential leak on the early return
  path since these methods return an mtl::AutoObjCPtr<>.


Canonical link: https://commits.webkit.org/240610@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 20:32:30 +00:00
Eric Hutchison f5b219561d [Monterey wk2 Debug arm64,iOS 15 wk2] imported/w3c/web-platform-tests/xhr/xhr-timeout-longtask.any.html is a flaky failure.
rdar://82043074.

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/240609@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 20:19:22 +00:00
Fujii Hironori 039ffff745 [curl] Kept alive NetworkResourceLoaders should be cancelled by NetworkLoad::didCompleteWithError on PolicyAction::Ignore of didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=228095
<rdar://problem/81393898>

Reviewed by Don Olmstead.

Source/WebKit:

If a page dispatches a keepalive fetch and the page is navigated
away, the alive NetworkResourceLoader is transferred to the
NetworkSession by NetworkConnectionToWebProcess::transferKeptAliveLoad.
After the NetworkResourceLoader receives a response, it is canceled
by PolicyAction::Ignore.

However, NetworkDataTaskCurl didn't properly cancel the kept alive
NetworkResourceLoader. They remained in m_keptAliveLoads of
NetworkSession even after the requests were canceled.

Test: http/tests/fetch/keepalive-fetch-2.html

* NetworkProcess/curl/NetworkDataTaskCurl.cpp:
(WebKit::NetworkDataTaskCurl::invokeDidReceiveResponse): Call didCompleteWithError on PolicyAction::Ignore.

LayoutTests:

* http/tests/fetch/keepalive-fetch-2-expected.txt: Added.
* http/tests/fetch/keepalive-fetch-2.html: Added.
* http/tests/fetch/resources/get-set-temp-file.py: Added.
* http/tests/fetch/resources/keepalive-fetch-2-window.html: Added.

Canonical link: https://commits.webkit.org/240608@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 19:57:50 +00:00
Jer Noble e190f09a76 De-duplicate the Cocoa-specific MediaPlayerPrivateRemote constructor
https://bugs.webkit.org/show_bug.cgi?id=229193

Reviewed by Eric Carlson.

Source/WebCore:

Don't include a Objective-C header in a file which will be included by C++ source; forward-declare
the class instead.

* platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h:
* platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:

Source/WebKit:

Rather than have two, separate implementations of the MediaPlayerPrivateRemote constructor (one for Cocoa),
just wrap the initializer for the Cocoa-specific ivar in PLATFORM(COCOA) guards.

* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote):
* WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): Deleted.


Canonical link: https://commits.webkit.org/240607@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 19:34:28 +00:00
Mikhail R. Gadelha 174ca9b665 Unreviewed. Skip failing MIPS tests
https://bugs.webkit.org/show_bug.cgi?id=229198

Patch by Mikhail R. Gadelha <mikhail@igalia.com> on 2021-08-17

JSTests:

* ChakraCore.yaml:

LayoutTests:

* platform/wpe/TestExpectations:

Canonical link: https://commits.webkit.org/240606@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 19:23:23 +00:00