https://bugs.webkit.org/show_bug.cgi?id=229360
<rdar://problem/82192362>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest): Skip some tests on cygwin.
* Scripts/webkitpy/common/system/abstractexecutive.py:
(AbstractExecutive.command_for_printing): Strings might be bytes on some platforms.
* Scripts/webkitpy/common/system/path.py:
(_CygPath.convert): Cygwin path process is not unicode.
* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo._win_version_str): Return Windows version string as unicode string.
Canonical link: https://commits.webkit.org/240831@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229380
Reviewed by Adrian Perez de Castro.
Tools:
r280774 added support for fullscreen in the WindowViewBackend, but
many webdriver tests started failing as they run in the headless
backend.
This commits adds basic support in HeadlessBackend to make some
tests pass. Currently, just storing the fullscreen state and
forwarding the events to the WPE backend functions.
A number of tests are still failing due to the missing multiple window
support (required through the `session` fixtures), but also there are
still some failing that expect the view to be started in
non-fullscreen mode, which does not happen in the headless backend.
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::onDOMFullScreenRequest):
(WPEToolingBackends::HeadlessViewBackend::dispatchFullscreenEvent):
* wpe/backends/HeadlessViewBackend.h:
WebDriverTests:
* TestExpectations.json: Skip some tests still failing, mainly due to multiple window support missing.
Canonical link: https://commits.webkit.org/240817@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=186804
Reviewed by Alan Bujtas.
Source/WebCore:
Previously, single characters weren't shaped in the fast text codepath,
because shaping in the fast text codepath was just for kerning and
ligatures. Kerning didn't need to shape individual characters because
kerning only applies to pairs of characters, and ligatures didn't need
to shape individual characters because two characters are required to
form a ligature. However, now that we want to replace the complex text
codepath with a new-and-improved fast text codepath, we have to perform
all shaping in the fast text codepath, regardless of how many characters
are present.
Test: fast/text/single-character-shaping.html
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::commitCurrentFontRange):
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::shouldApplyFontTransforms const): Deleted.
* platform/graphics/WidthIterator.h:
* platform/graphics/coretext/FontCoreText.cpp:
(WebCore::Font::applyTransforms): Keep kerning disabled for single glyphs,
because of performance. This will be able to be removed when rdar://82195405
is fixed.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
Tools:
Huge thanks to Laurence Penney to contributing this test font!!!
* Scripts/webkitpy/common/config/contributors.json:
LayoutTests:
Huge thanks to Laurence Penney to contributing this test font!!!
* fast/text/resources/UniversTofu-GSUB-rvrn.ttf: Added. The license is Apache 2.0.
* fast/text/single-character-shaping-expected.html: Added.
* fast/text/single-character-shaping.html: Added.
Canonical link: https://commits.webkit.org/240793@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229323
Reviewed by John Wilander.
Source/WebKit:
This allows me to run the UIEventAttribution tests on macOS.
It also makes them not time out, which they were doing since r277447.
To accomplish this, I added more test SPI to prevent the network process
suspension message, which was causing the test to time out on the iOS simulator.
* UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _addEventAttributionWithSourceID:destinationURL:sourceDescription:purchaser:reportEndpoint:optionalNonce:]):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore _preventNetworkProcessSuspensionForTesting]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* UIProcess/API/ios/WKWebViewTestingIOS.mm:
(-[WKWebView _setUIEventAttributionForTesting:withNonce:]): Deleted.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::preventSuspensionForTesting):
(WebKit::NetworkProcessProxy::sendPrepareToSuspend):
* UIProcess/Network/NetworkProcessProxy.h:
Tools:
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::exampleURL):
(TestWebKitAPI::runBasicEventAttributionTest):
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/240764@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=200556
Reviewed by Simon Fraser.
Add a new option to print a summary listing test expectation health.
It uses the same expected results as --print-expectations.
To run it: run-webkit-tests --print-summary
You can pass the same arguments as normal run-webkit-tests and it will
return stats based on the tests collected.
It also outputs a .csv file with the data.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.print_expectations): Gather the tests. Note whether the test
is marked as skip, pass, flaky, or fail, the definitions of which are
dictated by model.get_tests_with_result_type(). Output the results to
command line as well as to file.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py: Add the new option.
It goes through the same path as --print-expectations.
Canonical link: https://commits.webkit.org/240757@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229319
Reviewed by Aakash Jain.
Add a unit test listing all the expected build steps for each queue
like the one added in r281286 for build.webkit.org
Also remove the previous unit tests to not duplicate test functionality.
And replace doble-quotes with single-ones on the test for build.webkit.org
* CISupport/build-webkit-org/factories_unittest.py:
(TestExpectedBuildSteps):
(TestExpectedBuildSteps.test_all_expected_steps):
(TestExpectedBuildSteps.test_unnecessary_expected_steps):
* CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
(TestExpectedBuildSteps.setUp):
(TestExpectedBuildSteps.test_all_expected_steps):
(TestExpectedBuildSteps.test_unnecessary_expected_steps):
Canonical link: https://commits.webkit.org/240739@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229188
Reviewed by Jonathan Bedard.
Some logging beneath WebKit is making WebRTC tests flaky.
While we work on the cause of this bug, we can still beef-up our test output clean up steps to handle this logging.
Instead of stripping lines based on a known pattern, which does not always work as per current results,
we can simply remove all logging before the 'Content-Type:text/plain\n' string that WebKitTestRunner is adding before
printing the text generated by the test itself.
We update webkitpy scripts accordingly and add this new clean-up for:
- tests that have webrtc in their name
- tests whose output contain some known logging strings like 'LRP' or 'Negotiation String'.
This should hopefully be more robust while not hiding real regressions.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner):
* Scripts/webkitpy/port/base.py:
(Port.logging_detectors_to_strip_text_start):
* Scripts/webkitpy/port/driver.py:
(DriverOutput.strip_text_start_if_needed):
* Scripts/webkitpy/port/mac.py:
(MacPort.logging_patterns_to_strip):
(MacPort.logging_detectors_to_strip_text_start):
Canonical link: https://commits.webkit.org/240721@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229311
Reviewed by Aakash Jain.
Port the test that checked every worker and the expected steps to the new buildbot version.
Also delete the file steps_unittest_old.py because the gross of the other tests contained in
this old file are already ported in the current steps_unittests.py
* CISupport/build-webkit-org/factories_unittest.py: Added.
(TestExpectedBuildSteps):
(TestExpectedBuildSteps.setUp):
(TestExpectedBuildSteps.test_all_expected_results):
(TestExpectedBuildSteps.test_unnecessary_expected_results):
* CISupport/build-webkit-org/steps_unittest_old.py: Removed.
Canonical link: https://commits.webkit.org/240711@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229290
<rdar://problem/82128453>
Reviewed by Chris Fleizach.
Tools:
Renamed this method for consistency and to reflect what it is actually
doing. The goal is to avoid confusion with methods for VisiblePosition,
VisibleSelection and so forth, which are Core objects not exposed to AX
clients.
* DumpRenderTree/AccessibilityUIElement.cpp:
(setSelectedTextMarkerRangeCallback):
(AccessibilityUIElement::setSelectedTextMarkerRange):
(AccessibilityUIElement::getJSClass):
(setSelectedVisibleTextRangeCallback): Deleted.
(AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::setSelectedTextMarkerRange):
(AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setSelectedTextMarkerRange):
(AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
LayoutTests:
Updated all test files to use new name.
* accessibility/mac/selected-visible-position-range.html:
* accessibility/mac/selection-sync.html:
* accessibility/mac/wk1-set-selected-text-marker-range-input-element.html:
Canonical link: https://commits.webkit.org/240699@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229139
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-08-19
Reviewed by Adrian Perez de Castro.
Source/WebCore:
We are always claiming to be focused when the document in the active window even if the page is not actually
focused.
* dom/Document.cpp:
(WebCore::Document::hasFocus const): Check also that page is focused.
Tools:
Add a unit tests to check document.hasFocus() returns false when a web view is in the active window, but not focused.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST): Ensure web view is focused as required by credentials container.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewDocumentFocus):
(beforeAll):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView focus]):
Canonical link: https://commits.webkit.org/240665@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/229265>
<rdar://problem/82101453>
Reviewed by Alex Christensen.
Source/WebKit:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetGPUProcessIdentifier): Add.
* UIProcess/API/C/WKPagePrivate.h:
(WKPageGetGPUProcessIdentifier): Add.
- Add function to return the PID for the GPU process.
Tools:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::findAndDumpWebKitProcessIdentifiers):
- Include the GPU process PID if it's enabled when sending a
list of PIDs back to run-webkit-tests.
(WTR::TestController::gpuProcessName): Add.
* WebKitTestRunner/TestController.h:
(WTR::TestController::databaseProcessName): Delete.
- The implementation was removed a while ago.
(WTR::TestController::gpuProcessName): Add.
Canonical link: https://commits.webkit.org/240658@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
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
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
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
https://bugs.webkit.org/show_bug.cgi?id=229174
Reviewed by Carlos Garcia Campos.
r281079 changed the helper method waitUntilTitleChangedTo to
immediately return if the current title is already the expected one.
While this is working fine in other tests, the deviceidhashsalt tries
to load the same page twice. As the title does not change, the call
returns right away, before the expected side effects of the load
happen.
This commit adds a dummy "about:blank" call between both original
calls to make sure we track the title change correctly.
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataDeviceIdHashSalt):
Canonical link: https://commits.webkit.org/240583@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229045
<rdar://81819301>
Reviewed by Chris Fleizach.
Source/WebCore:
Test: accessibility/element-line-rects-and-text.html
Moved the [WebAccessibilityObjectWrapper lineRectsAndText] method, and
supporting methods and functions, from the iOS subclass to the base
(Cocoa) class so that it can be used in both iOS and MacOS.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
Moved the following methods and functions to WebAccessibilityObjectWrapperBase.mm.
(-[WebAccessibilityObjectWrapper _prepareAccessibilityCall]): Deleted.
(-[WebAccessibilityObjectWrapper _addAccessibilityObject:toTextMarkerArray:]): Deleted.
(blockquoteLevel): Deleted.
(AXAttributeStringSetLanguage): Deleted.
(AXAttributeStringSetBlockquoteLevel): Deleted.
(AXAttributeStringSetHeadingLevel): Deleted.
(AXAttributeStringSetFont): Deleted.
(AXAttributeStringSetNumber): Deleted.
(AXAttributeStringSetStyle): Deleted.
(AXAttributedStringAppendText): Deleted.
(-[WebAccessibilityObjectWrapper contentForSimpleRange:attributed:]): Deleted.
(-[WebAccessibilityObjectWrapper lineRectsAndText]): Deleted.
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase _prepareAccessibilityCall]):
(addObjectWrapperToArray):
(blockquoteLevel):
(AXAttributeStringSetLanguage):
(AXAttributeStringSetBlockquoteLevel):
(AXAttributeStringSetHeadingLevel):
(AXAttributeStringSetFont):
(AXAttributeStringSetNumber):
(AXAttributeStringSetStyle):
(AXAttributedStringAppendText):
(-[WebAccessibilityObjectWrapperBase contentForSimpleRange:attributed:]):
(-[WebAccessibilityObjectWrapperBase lineRectsAndText]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Added handling of the attribute "AXLineRectsAndText".
Tools:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::attributedStringForElement):
(WTR::AccessibilityUIElement::lineRectsAndText const):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::lineRectsAndText const):
LayoutTests:
* accessibility/element-line-rects-and-text.html: Renamed from LayoutTests/accessibility/ios-simulator/element-line-rects-and-text.html.
* platform/ios/TestExpectations:
* platform/ios/accessibility/element-line-rects-and-text-expected.txt: Renamed from LayoutTests/accessibility/ios-simulator/element-line-rects-and-text-expected.txt.
* platform/mac/accessibility/element-line-rects-and-text-expected.txt: Added.
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
Canonical link: https://commits.webkit.org/240567@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229018
Reviewed by Geoffrey Garen.
Source/WTF:
Introduce CanMakeThreadSafeCheckedPtr which is a thread safe version of CanMakeCheckedPtr.
* wtf/CheckedRef.h:
(WTF::CanMakeCheckedPtrBase): Extracted from CanMakeCheckedPtr.
(WTF::CanMakeCheckedPtrBase::~CanMakeCheckedPtrBase):
(WTF::CanMakeCheckedPtrBase::ptrCount const):
(WTF::SingleThreadIntegralWrapper): Added.
(WTF::SingleThreadIntegralWrapper::SingleThreadIntegralWrapper):
(WTF::SingleThreadIntegralWrapper::operator IntegralType const):
(WTF::SingleThreadIntegralWrapper::operator! const):
(WTF::SingleThreadIntegralWrapper::operator++):
(WTF::SingleThreadIntegralWrapper::operator--):
(WTF::SingleThreadIntegralWrapper::assertThread const):
(WTF::CanMakeCheckedPtr): Redefined using CanMakeCheckedPtrBase and SimpleNonAtomicType.
(WTF::CanMakeThreadSafeCheckedPtr): Added.
Tools:
Added a unit test for CanMakeThreadSafeCheckedPtr
* TestWebKitAPI/Tests/WTF/CheckedPtr.cpp:
(TestWebKitAPI.ThreadSafeCheckedPtrObject)
(WTF_CheckedPtr.CanMakeThreadSafeCheckedPtr): Added.
Canonical link: https://commits.webkit.org/240564@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228628
Patch by Philippe Normand <pnormand@igalia.com> on 2021-08-16
Reviewed by Adrian Perez de Castro.
The webkitpy autoinstall doesn't reliably work when it's triggered from concurrent
processes. Replace webkitpy usage in apply-build-revision-to-files.py script with explicit
calls to svnversion, git svn info or git log -1, depending on the kind of SCM checkout.
* glib/apply-build-revision-to-files.py:
(get_build_revision):
(main):
Canonical link: https://commits.webkit.org/240549@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/229127>
<rdar://problem/81960587>
Reviewed by Alexey Proskuryakov.
.:
* Makefile.shared:
- Add "analyze" argument to xcodebuild command when invoking
"make analyze" to run clang static analyzer in deep mode.
Simplify "make analyze" since $(PATH_TO_SCAN_BUILD) does not
need to be set.
Source/ThirdParty/ANGLE:
* ANGLE.xcodeproj/project.pbxproj:
- Treat "analyze" the same as "build" for "ACTION" environment
variable.
Source/WebCore:
* Scripts/generate-derived-sources.sh:
- Treat "analyze" the same as "build" for "ACTION" environment
variable.
Source/WebKit:
* Scripts/generate-derived-sources.sh:
* WebKit.xcodeproj/project.pbxproj:
- Treat "analyze" the same as "build" for "ACTION" environment
variable.
Source/WebKitLegacy/mac:
* migrate-headers.sh:
- Treat "analyze" the same as "build" for "ACTION" environment
variable.
Tools:
* DumpRenderTree/Scripts/generate-derived-sources.sh:
* WebKitTestRunner/Scripts/generate-derived-sources.sh:
- Treat "analyze" the same as "build" for "ACTION" environment
variable.
Canonical link: https://commits.webkit.org/240548@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=214804
Reviewed by Adrian Perez de Castro.
Do not wait for title change if the title already changed.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewPageVisibility):
* TestWebKitAPI/glib/TestExpectations.json:
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::waitUntilTitleChangedTo):
(WebViewTest::waitUntilTitleChanged):
Canonical link: https://commits.webkit.org/240539@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228628
Patch by Philippe Normand <pnormand@igalia.com> on 2021-08-16
Reviewed by Adrian Perez de Castro.
The webkitpy autoinstall doesn't reliably work when it's triggered from concurrent
processes. Replace webkitpy usage in apply-build-revision-to-files.py script with explicit
calls to svnversion, git svn info or git log -1, depending on the kind of SCM checkout.
* glib/apply-build-revision-to-files.py:
(get_build_revision):
(main):
Canonical link: https://commits.webkit.org/240537@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228227
Reviewed by Carlos Garcia Campos.
Source/WebKit:
Added webkit_website_data_manager_set_memory_pressure_settings() API function to pass a
WebKitMemoryPressureSettings instance as the settings to use by all the network processes.
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* UIProcess/API/glib/WebKitMemoryPressureSettings.cpp:
* UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkit_website_data_manager_set_memory_pressure_settings):
* UIProcess/API/gtk/WebKitWebsiteDataManager.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/wpe/WebKitWebsiteDataManager.h:
* UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didExceedMemoryLimit):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebProcessPool.h:
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::memoryPressureMonitorDisabled):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
Source/WTF:
Added a new method to MemoryPressureHandler to set the configuration by copying the parameter
instead of moving it.
* wtf/MemoryPressureHandler.h:
(WTF::MemoryPressureHandler::setConfiguration):
Tools:
Added an API test for webkit_website_data_manager_set_memory_pressure_settings().
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(MemoryPressureTest::setup):
(MemoryPressureTest::teardown):
(MemoryPressureTest::loadFailedCallback):
(MemoryPressureTest::waitUntilLoadFailed):
(testMemoryPressureSettings):
(beforeAll):
Canonical link: https://commits.webkit.org/240531@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229126
rdar://80384801
Reviewed by Tim Horton.
Source/WebKit:
Remove the (now-unused) testing SPI `-[WKWebView _doAfterResettingSingleTapGesture:]`. See Tools/ChangeLog for
more information.
* UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* UIProcess/API/ios/WKWebViewTestingIOS.mm:
(-[WKWebView _doAfterResettingSingleTapGesture:]): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _singleTapDidReset:]):
(-[WKContentView _doAfterResettingSingleTapGesture:]): Deleted.
Tools:
This test exercises the ability to cause platform selection views to show up after tapping the web view while a
DOM selection is set. In this codepath, selection views are installed when the web view becomes first responder,
when we call into `-[UIWKTextInteractionAssistant activateSelection]`; the call to `-becomeFirstResponder`, in
turn, comes from UIKit's internal `UITextTapRecognizer` gesture, which recognizes the single tap and makes the
content view first responder.
In the case where this test fails, the synthesized tap gesture fails to activate the text tap recognizer; this
happens because the timing of when the `UITextTapRecognizer` gets reset (i.e. `-_resetGestureRecognizer`) races
against the timing of when the synthesized touch event is sent to the gesture recognizer. When the touch is
delivered to the gesture *before* the text tap gesture is reset, we end up timing out because the text tap
gesture's action never fires and makes the content view first responder.
To ensure that we don't lose this race and time out, we augment the existing mechanism in
`UIScriptControllerIOS::waitForSingleTapToReset()` to wait for *all* enabled single tap (and single touch)
gestures to reset, instead of only waiting for the web view's synthetic click gesture. Importantly, this
includes `UITextTapRecognizer`, which ensures that the touches are delivered to the gesture only after the text
tap gesture has been reset (and transitions to Possible state).
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::waitForSingleTapToReset const):
Instead of using testing SPI (`-_doAfterResettingSingleTapGesture:`) to wait for the single tap to reset, we can
just directly iterate through all the gestures on the content view and wait for all enabled single tap gestures
to transition back to Possible state.
LayoutTests:
Update test expectations for this flaky test.
* platform/ios-14/TestExpectations:
* platform/ios/TestExpectations:
Canonical link: https://commits.webkit.org/240529@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281068 268f45cc-cd09-0410-ab3c-d52691b4dbfc