[webkit-changes] [295472] trunk
Title: [295472] trunk Revision 295472 Author za...@apple.com Date 2022-06-10 22:34:43 -0700 (Fri, 10 Jun 2022) Log Message Repaint rect does not take into account text-underline-offset https://bugs.webkit.org/show_bug.cgi?id=241442 Reviewed by Antti Koivisto. This patch add support for text decoration ink overflow (IFC). 1. Collect decoration ink overflow (logical) 2. Update display box ink overflow (visual) * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp: (WebCore::Layout::InlineDisplayContentBuilder::build): (WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForInlineBoxes): (WebCore::Layout::visualBottomForTextDecorationContent): (WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForTextDecorations): * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h: * Source/WebCore/style/InlineTextBoxStyle.cpp: (WebCore::visualOverflowForDecorations): (WebCore::defaultGap): * Source/WebCore/style/InlineTextBoxStyle.h: Canonical link: https://commits.webkit.org/251477@main Modified Paths trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position-expected.txt trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position.html trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h trunk/Source/WebCore/style/InlineTextBoxStyle.cpp trunk/Source/WebCore/style/InlineTextBoxStyle.h Added Paths trunk/LayoutTests/fast/repaint/text-decoration-overflow-repaint-expected.txt trunk/LayoutTests/fast/repaint/text-decoration-overflow-repaint.html Diff Modified: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position-expected.txt (295471 => 295472) --- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position-expected.txt 2022-06-11 02:44:51 UTC (rev 295471) +++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position-expected.txt 2022-06-11 05:34:43 UTC (rev 295472) @@ -1,5 +1,5 @@ -PASS window.internals.repaintRectsAsText().indexOf('8 8 784 12') is not -1 -PASS window.internals.repaintRectsAsText().indexOf('8 20 784 12') is not -1 +PASS window.internals.repaintRectsAsText().indexOf('8 8 784 13') is not -1 +PASS window.internals.repaintRectsAsText().indexOf('8 20 784 13') is not -1 PASS successfullyParsed is true TEST COMPLETE Modified: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position.html (295471 => 295472) --- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position.html 2022-06-11 02:44:51 UTC (rev 295471) +++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position.html 2022-06-11 05:34:43 UTC (rev 295472) @@ -31,8 +31,8 @@ elements[i].style.textDecoration = "underline"; document.body.offsetHeight; if (window.internals) { -shouldNotBe("window.internals.repaintRectsAsText().indexOf('8 8 784 12')", "-1"); -shouldNotBe("window.internals.repaintRectsAsText().indexOf('8 20 784 12')", "-1"); +shouldNotBe("window.internals.repaintRectsAsText().indexOf('8 8 784 13')", "-1"); +shouldNotBe("window.internals.repaintRectsAsText().indexOf('8 20 784 13')", "-1"); internals.stopTrackingRepaints(); } finishJSTest(); Added: trunk/LayoutTests/fast/repaint/text-decoration-overflow-repaint-expected.txt (0 => 295472) --- trunk/LayoutTests/fast/repaint/text-decoration-overflow-repaint-expected.txt (rev 0) +++ trunk/LayoutTests/fast/repaint/text-decoration-overflow-repaint-expected.txt 2022-06-11 05:34:43 UTC (rev 295472) @@ -0,0 +1,10 @@ +PASS if the underlines are green. +content +content +content +(repaint rects + (rect 48 46 112 25) + (rect 39 82 25 112) + (rect 39 214 25 112) +) + Added: trunk/LayoutTests/fast/repaint/text-decoration-overflow-repaint.html (0 => 295472) --- trunk/LayoutTests/fast/repaint/text-decoration-overflow-repaint.html (rev 0) +++ trunk/LayoutTests/fast/repaint/text-decoration-overflow-repaint.html 2022-06-11 05:34:43 UTC (rev 295472) @@ -0,0 +1,36 @@ + +div { + margin: 20px; + font-family: Ahem; +} +span { + text-decoration: underline; + text-underline-offset: 10px; + color: blue; +} + +PASS if the underlines are green. + +content +content +content + + + +if (window.testRunner) { +
[webkit-changes] [295471] trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py
Title: [295471] trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py Revision 295471 Author dp...@igalia.com Date 2022-06-10 19:44:51 -0700 (Fri, 10 Jun 2022) Log Message [webkit-patch] Format patch without version signature https://bugs.webkit.org/show_bug.cgi?id=240516 Reviewed by Jonathan Bedard. By default 'git-format-patch' adds a signature at the bottom of a diff patch with Git version number, which the DiffParser wrongly interprets as a patch chunk. * Tools/Scripts/webkitpy/common/checkout/scm/git.py: Use knob '--no-signature' to emit patch without signature. Canonical link: https://commits.webkit.org/251476@main Modified Paths trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py Diff Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (295470 => 295471) --- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2022-06-11 01:33:15 UTC (rev 295470) +++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2022-06-11 02:44:51 UTC (rev 295471) @@ -361,7 +361,7 @@ if not commit_message or merge_base == head: command = [self.executable_name, 'diff', '--binary', '--no-color', '--no-ext-diff', '--full-index', '--no-renames'] else: -command = [self.executable_name, 'format-patch', '--stdout', '--binary'] +command = [self.executable_name, 'format-patch', '--no-signature', '--stdout', '--binary'] # Put code changes at the top of the patch and layout tests # at the bottom, this makes for easier reviewing. ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295470] trunk/Tools/Scripts/libraries/webkitscmpy
Title: [295470] trunk/Tools/Scripts/libraries/webkitscmpy Revision 295470 Author jbed...@apple.com Date 2022-06-10 18:33:15 -0700 (Fri, 10 Jun 2022) Log Message [git-webkit] Make the default rebase behavior for `git-webkit pr` configurable https://bugs.webkit.org/show_bug.cgi?id=239385 Reviewed by Dewei Zhu. * Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py: (PullRequest.main): Check the webkitscmpy.auto-rebase-branch option to determine if we should automatically rebase the branch. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: (Setup.git): Prompt user to set the automatic rebase behavior. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py: Canonical link: https://commits.webkit.org/251475@main Modified Paths trunk/Tools/Scripts/libraries/webkitscmpy/setup.py trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py Diff Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295469 => 295470) --- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2022-06-11 00:35:48 UTC (rev 295469) +++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2022-06-11 01:33:15 UTC (rev 295470) @@ -29,7 +29,7 @@ setup( name='webkitscmpy', -version='5.0.0', +version='5.0.1', description='Library designed to interact with git and svn repositories.', long_description=readme(), classifiers=[ Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (295469 => 295470) --- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2022-06-11 00:35:48 UTC (rev 295469) +++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2022-06-11 01:33:15 UTC (rev 295470) @@ -46,7 +46,7 @@ "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `" ) -version = Version(5, 0, 0) +version = Version(5, 0, 1) AutoInstall.register(Package('fasteners', Version(0, 15, 0))) AutoInstall.register(Package('jinja2', Version(2, 11, 3))) Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py (295469 => 295470) --- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py 2022-06-11 00:35:48 UTC (rev 295469) +++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py 2022-06-11 01:33:15 UTC (rev 295470) @@ -267,7 +267,11 @@ sys.stderr.write("'{}' is not a remote in this repository\n".format(source_remote)) return 1 -rebasing = args.rebase or (args.rebase is None and repository.config().get('pull.rebase')) +rebasing = args.rebase if args.rebase is not None else repository.config().get( +'webkitscmpy.auto-rebase-branch', +repository.config().get('pull.rebase', 'true'), +) == 'true' + if rebasing: log.info("Rebasing '{}' on '{}'...".format(repository.branch, branch_point.branch)) if repository.pull(rebase=True, branch=branch_point.branch): Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (295469 => 295470) --- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py 2022-06-11 00:35:48 UTC (rev 295469) +++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py 2022-06-11 01:33:15 UTC (rev 295470) @@ -250,6 +250,25 @@ sys.stderr.write('Failed to use {} as the merge strategy for this repository\n'.format('merge commits' if args.merge else 'rebase')) result += 1 +need_prompt_auto_update = args.all or not local_config.get('webkitscmpy.auto-rebase-branch') +if not args.merge and not args.defaults and need_prompt_auto_update: +log.info('Setting auto update on PR creation...') +response = Terminal.choose( +'Would you like to automatically rebase your branch when creating or\nupdating a pull request?', +default='Yes', options=('Yes', 'No', 'Later'), +) +if response in ['Yes', 'No']: +if run( +[local.Git.executable(), 'config', 'webkitscmpy.auto-rebase-branch', 'true' if response == 'Yes' else 'false'], +capture_output=True, cwd=repository.root_path, +).returncode: +sys.stderr.write('Failed to {} auto update\n'.format('enable' if response == 'Yes' else 'disable')) +result += 1 +else: +log.info('{} auto update on PR creation'.format('Enabled' if response == 'Yes' else 'Disabled')) +
[webkit-changes] [295469] trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/ mergeChangeLogs.pl
Title: [295469] trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl Revision 295469 Author jbed...@apple.com Date 2022-06-10 17:35:48 -0700 (Fri, 10 Jun 2022) Log Message [webkitperl] Remove ChangeLog test https://bugs.webkit.org/show_bug.cgi?id=241481 Reviewed by Aakash J. * Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl: Removed. Canonical link: https://commits.webkit.org/251474@main Removed Paths trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl Diff Deleted: trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl (295468 => 295469) --- trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl 2022-06-10 23:26:43 UTC (rev 295468) +++ trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl 2022-06-11 00:35:48 UTC (rev 295469) @@ -1,336 +0,0 @@ -#!/usr/bin/env perl -# -# Copyright (C) 2010 Apple Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Unit tests of VCSUtils::mergeChangeLogs(). - -use strict; - -use Test::Simple tests => 16; -use File::Temp qw(tempfile); -use VCSUtils; - -# Read contents of a file and return it. -sub readFile($) -{ -my ($fileName) = @_; - -local $/; -open(FH, "<", $fileName); -my $content = ; -close(FH); - -return $content; -} - -# Write a temporary file and return the filename. -sub writeTempFile($$$) -{ -my ($name, $extension, $content) = @_; - -my ($FH, $fileName) = tempfile( -$name . "-", -DIR => ($ENV{'TMPDIR'} || $ENV{'TEMP'} || "/tmp"), -UNLINK => 0, -); -print $FH $content; -close $FH; - -if ($extension) { -my $newFileName = $fileName . $extension; -rename($fileName, $newFileName); -$fileName = $newFileName; -} - -return $fileName; -} - -# - -{ -# New test -my $title = "mergeChangeLogs: traditional rejected patch success"; - -my $fileNewerContent = <<'EOF'; -2010-01-29 Mark Rowe - -Fix the Mac build. - -Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional". - -2010-01-29 Simon Hausmann - -Rubber-stamped by Maciej Stachowiak. - -Fix the ARM build. -EOF -my $fileNewer = writeTempFile("file", "", $fileNewerContent); - -my $fileMineContent = <<'EOF'; -*** -*** 1,3 - 2010-01-29 Simon Hausmann - - Rubber-stamped by Maciej Stachowiak. 1,9 -+ 2010-01-29 Oliver Hunt -+ -+ Reviewed by Darin Adler. -+ -+ JSC is failing to propagate anonymous slot count on some transitions -+ - 2010-01-29 Simon Hausmann - - Rubber-stamped by Maciej Stachowiak. -EOF -my $fileMine = writeTempFile("file", ".rej", $fileMineContent); -rename($fileMine, $fileNewer . ".rej"); -$fileMine = $fileNewer . ".rej"; - -my $fileOlderContent = $fileNewerContent; -my $fileOlder = writeTempFile("file", ".orig", $fileOlderContent); -rename($fileOlder, $fileNewer . ".orig"); -$fileOlder = $fileNewer . ".orig"; - -my $exitStatus = mergeChangeLogs($fileMine, $fileOlder, $fileNewer); - -# mergeChangeLogs() should return 1 since the patch succeeded. -ok($exitStatus == 1, "$title: should return 1 for success"); - -ok(readFile($fileMine) eq $fileMineContent, "$title: \$fileMine should be unchanged"); -ok(readFile($fileOlder) eq $fileOlderContent, "$title: \$fileOlder should be unchanged"); - -my $expectedContent = <<'EOF'; -2010-01-29 Oliver Hunt - -Reviewed by Darin Adler. - -JSC is failing to propagate anonymous slot count on some transitions - -EOF -
[webkit-changes] [295468] trunk
Title: [295468] trunk Revision 295468 Author wenson_hs...@apple.com Date 2022-06-10 16:26:43 -0700 (Fri, 10 Jun 2022) Log Message [iOS] Specifying spellcheck="false" on a contentEditable element should suppress platform spellchecking https://bugs.webkit.org/show_bug.cgi?id=241514 rdar://91123300 Reviewed by Devin Rousso. Additionally set `-[UITextInputTraits spellCheckingType]` to `UITextSpellCheckingTypeNo` when focusing editable fields with the DOM attribute `spellcheck="false"`. This provides a hint to UIKit that system spellchecking should be disabled when editing this field - among other things, this allows us to avoid showing text candidates in the case where `autocorrect="off"` is additionally specified. If either `spellcheck="true"` is set or `spellcheck` is not specified, we fall back to the user's preference by using `UITextSpellCheckingTypeDefault`. Test: KeyboardInputTests.DisableSpellChecking * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _updateTextInputTraits:]): * Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/251473@main Modified Paths trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm Diff Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (295467 => 295468) --- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2022-06-10 23:10:44 UTC (rev 295467) +++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2022-06-10 23:26:43 UTC (rev 295468) @@ -5897,6 +5897,7 @@ traits.smartQuotesType = UITextSmartQuotesTypeNo; if ([traits respondsToSelector:@selector(setSmartDashesType:)]) traits.smartDashesType = UITextSmartDashesTypeNo; +traits.spellCheckingType = UITextSpellCheckingTypeNo; } switch (_focusedElementInformation.inputMode) { Modified: trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm (295467 => 295468) --- trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm 2022-06-10 23:10:44 UTC (rev 295467) +++ trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm 2022-06-10 23:26:43 UTC (rev 295468) @@ -624,7 +624,7 @@ EXPECT_EQ(inputView.get(), [contentView inputView]); } -TEST(KeyboardInputTests, DisableSmartQuotesAndDashes) +TEST(KeyboardInputTests, DisableSpellChecking) { auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]); auto inputDelegate = adoptNS([[TestInputDelegate alloc] init]); @@ -633,27 +633,28 @@ }]; [webView _setInputDelegate:inputDelegate.get()]; -auto checkSmartQuotesAndDashesType = [&] (UITextSmartDashesType dashesType, UITextSmartQuotesType quotesType) { +auto checkSmartQuotesAndDashesType = [&] (UITextSmartDashesType dashesType, UITextSmartQuotesType quotesType, UITextSpellCheckingType spellCheckingType) { UITextInputTraits *traits = [[webView textInputContentView] textInputTraits]; EXPECT_EQ(dashesType, traits.smartDashesType); EXPECT_EQ(quotesType, traits.smartQuotesType); +EXPECT_EQ(spellCheckingType, traits.spellCheckingType); }; [webView synchronouslyLoadHTMLString:@""]; [webView evaluateJavaScriptAndWaitForInputSessionToChange:@"foo.focus()"]; -checkSmartQuotesAndDashesType(UITextSmartDashesTypeNo, UITextSmartQuotesTypeNo); +checkSmartQuotesAndDashesType(UITextSmartDashesTypeNo, UITextSmartQuotesTypeNo, UITextSpellCheckingTypeNo); [webView evaluateJavaScriptAndWaitForInputSessionToChange:@"bar.focus()"]; -checkSmartQuotesAndDashesType(UITextSmartDashesTypeNo, UITextSmartQuotesTypeNo); +checkSmartQuotesAndDashesType(UITextSmartDashesTypeNo, UITextSmartQuotesTypeNo, UITextSpellCheckingTypeNo); [webView evaluateJavaScriptAndWaitForInputSessionToChange:@"baz.focus()"]; -checkSmartQuotesAndDashesType(UITextSmartDashesTypeNo, UITextSmartQuotesTypeNo); +checkSmartQuotesAndDashesType(UITextSmartDashesTypeNo, UITextSmartQuotesTypeNo, UITextSpellCheckingTypeNo); [webView synchronouslyLoadHTMLString:@""]; [webView evaluateJavaScriptAndWaitForInputSessionToChange:@"foo.focus()"]; -checkSmartQuotesAndDashesType(UITextSmartDashesTypeDefault, UITextSmartQuotesTypeDefault); +checkSmartQuotesAndDashesType(UITextSmartDashesTypeDefault, UITextSmartQuotesTypeDefault, UITextSpellCheckingTypeDefault); [webView evaluateJavaScriptAndWaitForInputSessionToChange:@"bar.focus()"]; -checkSmartQuotesAndDashesType(UITextSmartDashesTypeDefault, UITextSmartQuotesTypeDefault); +checkSmartQuotesAndDashesType(UITextSmartDashesTypeDefault, UITextSmartQuotesTypeDefault, UITextSpellCheckingTypeDefault); [webView evaluateJavaScriptAndWaitForInputSessionToChange:@"baz.focus()"]; -checkSmartQuotesAndDashesType(UITextSmartDashesTypeDefault, UITextSmartQuotesTypeDefault); +
[webkit-changes] [295467] trunk/Tools/CISupport/ews-build
Title: [295467] trunk/Tools/CISupport/ews-build Revision 295467 Author jbed...@apple.com Date 2022-06-10 16:10:44 -0700 (Fri, 10 Jun 2022) Log Message [EWS] Remove extra space from GitHub PR description links https://bugs.webkit.org/show_bug.cgi?id=241522 Reviewed by Ryan Haddad. * Tools/CISupport/ews-build/steps.py: (UpdatePullRequest): Port changes from 250718@main to EWS. (UpdatePullRequest.escape_html): * Tools/CISupport/ews-build/steps_unittest.py: Canonical link: https://commits.webkit.org/251472@main Modified Paths trunk/Tools/CISupport/ews-build/steps.py trunk/Tools/CISupport/ews-build/steps_unittest.py Diff Modified: trunk/Tools/CISupport/ews-build/steps.py (295466 => 295467) --- trunk/Tools/CISupport/ews-build/steps.py 2022-06-10 22:45:06 UTC (rev 295466) +++ trunk/Tools/CISupport/ews-build/steps.py 2022-06-10 23:10:44 UTC (rev 295467) @@ -5111,7 +5111,7 @@ ESCAPE_TABLE = { '"': '', "'": '', -'>': ' ', +'>': '', '<': '', '&': '', } @@ -5126,7 +5126,7 @@ @classmethod def escape_html(cls, message): message = ''.join(cls.ESCAPE_TABLE.get(c, c) for c in message) -return re.sub(r'(https?://[^\s<>,:;]+)', r'+return re.sub(r'(https?://[^\s<>,:;]+?)(?=[\s<>,:;]|())', r' def __init__(self, **kwargs): super(UpdatePullRequest, self).__init__(logEnviron=False, timeout=300, **kwargs) Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (295466 => 295467) --- trunk/Tools/CISupport/ews-build/steps_unittest.py 2022-06-10 22:45:06 UTC (rev 295466) +++ trunk/Tools/CISupport/ews-build/steps_unittest.py 2022-06-10 23:10:44 UTC (rev 295467) @@ -6317,7 +6317,7 @@ [Merge-Queue] Add http credential helper -rdar://problem/91044821 +rdar://problem/91044821 Reviewed by NOBODY (OOPS!). ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295466] trunk/Source/WebKit/UIProcess/WebPageProxy.h
Title: [295466] trunk/Source/WebKit/UIProcess/WebPageProxy.h Revision 295466 Author yu...@chromium.org Date 2022-06-10 15:45:06 -0700 (Fri, 10 Jun 2022) Log Message Unified build: error: reference to 'FontInfo' is ambiguous https://bugs.webkit.org/show_bug.cgi?id=241524 Reviewed by Darin Adler. Fix unified build error. * Source/WebKit/UIProcess/WebPageProxy.h: removed unused forward declaration. It may cause name clash with ::FontInfo (from QD.framework/Headers/Quickdraw.h) on Mac when this file is included into the same unified source as another .cpp file declaring 'using namespace WebKit;'. Canonical link: https://commits.webkit.org/251471@main Modified Paths trunk/Source/WebKit/UIProcess/WebPageProxy.h Diff Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (295465 => 295466) --- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2022-06-10 22:13:36 UTC (rev 295465) +++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2022-06-10 22:45:06 UTC (rev 295466) @@ -399,7 +399,6 @@ struct EditorState; struct FrameTreeNodeData; struct FocusedElementInformation; -struct FontInfo; struct FrameInfoData; struct InputMethodState; struct InsertTextOptions; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295465] releases/WebKitGTK/webkit-2.36/Source/WebCore/rendering/ RenderBox.h
Title: [295465] releases/WebKitGTK/webkit-2.36/Source/WebCore/rendering/RenderBox.h Revision 295465 Author ape...@igalia.com Date 2022-06-10 15:13:36 -0700 (Fri, 10 Jun 2022) Log Message Merge r295399 - Handle a disconnected view during applyTopLeftLocationOffset https://bugs.webkit.org/show_bug.cgi?id=241355 Reviewed by Alan Bujtas. It appears that we can sometimes end up in a state where the document's view is disconnected during didLayout, which calls applyTopleftLocationOffset. This just adds a null check to handle this case for now. * Source/WebCore/rendering/RenderBox.h: (WebCore::RenderBox::applyTopLeftLocationOffset const): Canonical link: https://commits.webkit.org/251405@main Modified Paths releases/WebKitGTK/webkit-2.36/Source/WebCore/rendering/RenderBox.h Diff Modified: releases/WebKitGTK/webkit-2.36/Source/WebCore/rendering/RenderBox.h (295464 => 295465) --- releases/WebKitGTK/webkit-2.36/Source/WebCore/rendering/RenderBox.h 2022-06-10 21:49:55 UTC (rev 295464) +++ releases/WebKitGTK/webkit-2.36/Source/WebCore/rendering/RenderBox.h 2022-06-10 22:13:36 UTC (rev 295465) @@ -597,7 +597,7 @@ void applyTopLeftLocationOffset(LayoutPoint& point) const { // This is inlined for speed, since it is used by updateLayerPosition() during scrolling. -if (!document().view()->hasFlippedBlockRenderers()) +if (!document().view() || !document().view()->hasFlippedBlockRenderers()) point.move(m_frameRect.x(), m_frameRect.y()); else applyTopLeftLocationOffsetWithFlipping(point); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295464] trunk
Title: [295464] trunk Revision 295464 Author wenson_hs...@apple.com Date 2022-06-10 14:49:55 -0700 (Fri, 10 Jun 2022) Log Message Update TBA API availability macros for iOS 16 and macOS Ventura https://bugs.webkit.org/show_bug.cgi?id=241482 rdar://94651561 Reviewed by Tim Horton. Update `WK_MAC_TBA` and `WK_IOS_TBA` macros to 13.0 and 16.0, respectively. * Source/WebKit/Shared/API/Cocoa/WKMain.h: * Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.h: * Source/WebKit/UIProcess/API/Cocoa/WKError.h: * Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h: Mark these two API properties as available since macOS 12.3 and iOS 15.4. These were first introduced in these respective macOS and iOS versions, but with incorrect availability macros indicating that they were available since 12.0 and 15.0. * Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebView.h: Also, mark `setMinimumViewportInset:maximumViewportInset:`, `minimumViewportInset`, and `maximumViewportInset` as being available since iOS 15.5. * Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h: (-[WKWebView _dataTaskWithRequest:completionHandler:]): * Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecord.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: * Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h: * Source/WebKit/UIProcess/API/Cocoa/_WKAuthenticatorSelectionCriteria.h: * Source/WebKit/UIProcess/API/Cocoa/_WKAutomationSession.h: * Source/WebKit/UIProcess/API/Cocoa/_WKContentRuleListAction.h: * Source/WebKit/UIProcess/API/Cocoa/_WKDataTask.h: * Source/WebKit/UIProcess/API/Cocoa/_WKDataTaskDelegate.h: * Source/WebKit/UIProcess/API/Cocoa/_WKElementAction.h: * Source/WebKit/UIProcess/API/Cocoa/_WKModalContainerInfo.h: * Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: * Source/WebKit/UIProcess/API/Cocoa/_WKResidentKeyRequirement.h: * Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferences.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: * Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInCSSStyleDeclarationHandle.h: * Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h: * Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: * Tools/Scripts/webkitpy/common/version_name_map.py: (VersionNameMap.__init__): Canonical link: https://commits.webkit.org/251470@main Modified Paths trunk/Source/WebKit/Shared/API/Cocoa/WKMain.h trunk/Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKError.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKUserContentControllerPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecord.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKAuthenticatorSelectionCriteria.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKAutomationSession.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKContentRuleListAction.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKDataTask.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKDataTaskDelegate.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKElementAction.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKModalContainerInfo.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKResidentKeyRequirement.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferences.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h
[webkit-changes] [295463] trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp
Title: [295463] trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp Revision 295463 Author drou...@apple.com Date 2022-06-10 14:44:14 -0700 (Fri, 10 Jun 2022) Log Message Add PaymentHandler reference when validating the merchant https://bugs.webkit.org/show_bug.cgi?id=241520 Reviewed by Wenson Hsieh. * Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp: (WebCore::PaymentRequest::completeMerchantValidation): Canonical link: https://commits.webkit.org/251469@main Modified Paths trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp Diff Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp (295462 => 295463) --- trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp 2022-06-10 21:22:16 UTC (rev 295462) +++ trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp 2022-06-10 21:44:14 UTC (rev 295463) @@ -604,7 +604,8 @@ return; } -auto exception = activePaymentHandler()->merchantValidationCompleted(m_merchantSessionPromise->result()); +Ref activePaymentHandler = *this->activePaymentHandler(); +auto exception = activePaymentHandler->merchantValidationCompleted(m_merchantSessionPromise->result()); if (exception.hasException()) { abortWithException(exception.releaseException()); return; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295462] trunk/Tools/CISupport/build-webkit-org
Title: [295462] trunk/Tools/CISupport/build-webkit-org Revision 295462 Author tyle...@apple.com Date 2022-06-10 14:22:16 -0700 (Fri, 10 Jun 2022) Log Message Add post-commit build to run accessibility isolated tree mode layout tests https://bugs.webkit.org/show_bug.cgi?id=235125 Reviewed by Aakash Jain. Patch co-author is Aakash Jain. * Tools/CISupport/build-webkit-org/config.json: * Tools/CISupport/build-webkit-org/factories_unittest.py: (TestExpectedBuildSteps): Canonical link: https://commits.webkit.org/251468@main Modified Paths trunk/Tools/CISupport/build-webkit-org/config.json trunk/Tools/CISupport/build-webkit-org/factories_unittest.py Diff Modified: trunk/Tools/CISupport/build-webkit-org/config.json (295461 => 295462) --- trunk/Tools/CISupport/build-webkit-org/config.json 2022-06-10 20:36:55 UTC (rev 295461) +++ trunk/Tools/CISupport/build-webkit-org/config.json 2022-06-10 21:22:16 UTC (rev 295462) @@ -143,7 +143,8 @@ "platform": "mac-monterey", "configuration": "release", "architectures": ["x86_64", "arm64"], "triggers": [ "monterey-applesilicon-release-tests-test262" ,"monterey-release-tests-test262", "monterey-release-tests-wk1", "monterey-release-tests-wk2", - "monterey-release-applesilicon-tests-wk1", "monterey-release-applesilicon-tests-wk2", "monterey-applesilicon-release-tests-jsc" + "monterey-release-applesilicon-tests-wk1", "monterey-release-applesilicon-tests-wk2", "monterey-applesilicon-release-tests-jsc", + "monterey-release-tests-wk2-accessibility-isolated-tree" ], "workernames": ["bot185", "bot187"] }, @@ -175,6 +176,11 @@ "additionalArguments": ["--no-retry-failures"], "workernames": ["bot1023"] }, +{ "name": "Apple-Monterey-Release-WK2-Accessibility-Isolated-Tree-Tests", "factory": "TestLayoutFactory", + "platform": "mac-monterey", "configuration": "release", "architectures": ["x86_64", "arm64"], + "additionalArguments": ["--no-retry-failures", "--accessibility-isolated-tree", "accessibility/"], + "workernames": ["bot179"] +}, { "name": "Apple-Monterey-Debug-Build", "factory": "BuildFactory", "platform": "mac-monterey", "configuration": "debug", "architectures": ["x86_64", "arm64"], "triggers": [ @@ -643,6 +649,9 @@ { "type": "Triggerable", "name": "monterey-release-applesilicon-tests-wk2", "builderNames": ["Apple-Monterey-Release-AppleSilicon-WK2-Tests"] }, +{ "type": "Triggerable", "name": "monterey-release-tests-wk2-accessibility-isolated-tree", + "builderNames": ["Apple-Monterey-Release-WK2-Accessibility-Isolated-Tree-Tests"] +}, { "type": "Triggerable", "name": "monterey-debug-tests-wk1", "builderNames": ["Apple-Monterey-Debug-WK1-Tests"] }, Modified: trunk/Tools/CISupport/build-webkit-org/factories_unittest.py (295461 => 295462) --- trunk/Tools/CISupport/build-webkit-org/factories_unittest.py 2022-06-10 20:36:55 UTC (rev 295461) +++ trunk/Tools/CISupport/build-webkit-org/factories_unittest.py 2022-06-10 21:22:16 UTC (rev 295462) @@ -171,6 +171,24 @@ 'builtins-generator-tests', 'trigger-crash-log-submission' ], +'Apple-Monterey-Release-WK2-Accessibility-Isolated-Tree-Tests': [ +'configure-build', +'configuration', +'clean-and-update-working-directory', +'checkout-specific-revision', +'show-identifier', +'kill-old-processes', +'delete-WebKitBuild-directory', +'delete-stale-build-files', +'download-built-product', +'extract-built-product', +'layout-test', +'dashboard-tests', +'archive-test-results', +'upload', +'extract-test-results', +'set-permissions', +], 'Apple-Monterey-Debug-Build': [ 'configure-build', 'configuration', ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295461] trunk/Source
Title: [295461] trunk/Source Revision 295461 Author mmaxfi...@apple.com Date 2022-06-10 13:36:55 -0700 (Fri, 10 Jun 2022) Log Message Adopt EnumeratedArray in SystemFontDatabase https://bugs.webkit.org/show_bug.cgi?id=241506 Reviewed by Cameron McCormack. This is why we created EnumeratedArray in the first place. * Source/WebCore/platform/graphics/SystemFontDatabase.cpp: (WebCore::SystemFontDatabase::systemFontShorthandInfo const): * Source/WebCore/platform/graphics/SystemFontDatabase.h: Canonical link: https://commits.webkit.org/251467@main Modified Paths trunk/Source/WTF/wtf/CMakeLists.txt trunk/Source/WebCore/platform/graphics/SystemFontDatabase.cpp trunk/Source/WebCore/platform/graphics/SystemFontDatabase.h Diff Modified: trunk/Source/WTF/wtf/CMakeLists.txt (295460 => 295461) --- trunk/Source/WTF/wtf/CMakeLists.txt 2022-06-10 20:23:56 UTC (rev 295460) +++ trunk/Source/WTF/wtf/CMakeLists.txt 2022-06-10 20:36:55 UTC (rev 295461) @@ -67,6 +67,7 @@ EmbeddedFixedVector.h EnumClassOperatorOverloads.h EnumTraits.h +EnumeratedArray.h Expected.h ExperimentalFeatureNames.h ExportMacros.h Modified: trunk/Source/WebCore/platform/graphics/SystemFontDatabase.cpp (295460 => 295461) --- trunk/Source/WebCore/platform/graphics/SystemFontDatabase.cpp 2022-06-10 20:23:56 UTC (rev 295460) +++ trunk/Source/WebCore/platform/graphics/SystemFontDatabase.cpp 2022-06-10 20:36:55 UTC (rev 295461) @@ -31,12 +31,11 @@ SystemFontDatabase::SystemFontDatabase() = default; auto SystemFontDatabase::systemFontShorthandInfo(FontShorthand fontShorthand) -> const SystemFontShorthandInfo& { -auto index = static_cast(fontShorthand); -if (auto& entry = m_systemFontShorthandCache[index]) +if (auto& entry = m_systemFontShorthandCache[fontShorthand]) return *entry; -m_systemFontShorthandCache[index] = platformSystemFontShorthandInfo(fontShorthand); -return *m_systemFontShorthandCache[index]; +m_systemFontShorthandCache[fontShorthand] = platformSystemFontShorthandInfo(fontShorthand); +return *m_systemFontShorthandCache[fontShorthand]; } const AtomString& SystemFontDatabase::systemFontShorthandFamily(FontShorthand fontShorthand) Modified: trunk/Source/WebCore/platform/graphics/SystemFontDatabase.h (295460 => 295461) --- trunk/Source/WebCore/platform/graphics/SystemFontDatabase.h 2022-06-10 20:23:56 UTC (rev 295460) +++ trunk/Source/WebCore/platform/graphics/SystemFontDatabase.h 2022-06-10 20:36:55 UTC (rev 295461) @@ -28,6 +28,7 @@ #include "FontSelectionAlgorithm.h" #include #include +#include #include namespace WebCore { @@ -65,10 +66,8 @@ AppleSystemTitle3, AppleSystemTitle4, #endif -StatusBar, +StatusBar, // This has to be kept in sync with SystemFontShorthandCache below. }; -using FontShorthandUnderlyingType = std::underlying_type::type; -static constexpr auto fontShorthandCount = static_cast(FontShorthand::StatusBar) + 1; const AtomString& systemFontShorthandFamily(FontShorthand); float systemFontShorthandSize(FontShorthand); @@ -88,7 +87,7 @@ const SystemFontShorthandInfo& systemFontShorthandInfo(FontShorthand); static SystemFontShorthandInfo platformSystemFontShorthandInfo(FontShorthand); -using SystemFontShorthandCache = std::array, fontShorthandCount>; +using SystemFontShorthandCache = EnumeratedArray, FontShorthand::StatusBar>; SystemFontShorthandCache m_systemFontShorthandCache; }; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295460] trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm
Title: [295460] trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm Revision 295460 Author d...@apple.com Date 2022-06-10 13:23:56 -0700 (Fri, 10 Jun 2022) Log Message Safari crashes anytime any web links on a webpage are clicked on https://bugs.webkit.org/show_bug.cgi?id=241500 rdar://94655829 Reviewed by Tim Horton. In some VM scenarios, IOSurfaceAccelerator is not available, which causes a crash when navigating (creating the back-forward images). The solution is to check for null after attempting to create the accelerator. * Source/WebCore/platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::convertToFormat): Add a null check and bail. Canonical link: https://commits.webkit.org/251466@main Modified Paths trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm Diff Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (295459 => 295460) --- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm 2022-06-10 19:01:43 UTC (rev 295459) +++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm 2022-06-10 20:23:56 UTC (rev 295460) @@ -462,6 +462,11 @@ if (!accelerator) { IOSurfaceAcceleratorCreate(nullptr, nullptr, ); +if (!accelerator) { +callback(nullptr); +return; +} + auto runLoopSource = IOSurfaceAcceleratorGetRunLoopSource(accelerator); CFRunLoopAddSource(CFRunLoopGetMain(), runLoopSource, kCFRunLoopDefaultMode); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295459] trunk/Source
Title: [295459] trunk/Source Revision 295459 Author ca...@igalia.com Date 2022-06-10 12:01:43 -0700 (Fri, 10 Jun 2022) Log Message [Shadow Realms] Add feature flag to enable Exposed=* web APIs in ShadowRealms https://bugs.webkit.org/show_bug.cgi?id=241448 Reviewed by Yusuke Suzuki. No longer expose Web APIs to ShadowRealm by default. Instead, we enable this with a new setting WebAPIsInShadowRealmEnabled. Because the HTML integration aspect of the specification is still in the air, it's prudent to disable it by default, while still providing a feature flag for web-platform-tests. * Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml: * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: * Source/WebCore/bindings/scripts/preprocess-idls.pl: (GenerateConstructorAttributes): * Source/WebCore/bindings/scripts/test/JS/JSShadowRealmGlobalScope.cpp: (WebCore::JSShadowRealmGlobalScope::finishCreation): * Source/WebCore/bindings/scripts/test/ShadowRealmGlobalScopeConstructors.idl: Canonical link: https://commits.webkit.org/251465@main Modified Paths trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl trunk/Source/WebCore/bindings/scripts/test/JS/JSShadowRealmGlobalScope.cpp trunk/Source/WebCore/bindings/scripts/test/ShadowRealmGlobalScopeConstructors.idl Diff Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (295458 => 295459) --- trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml 2022-06-10 18:50:09 UTC (rev 295458) +++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml 2022-06-10 19:01:43 UTC (rev 295459) @@ -1564,6 +1564,18 @@ WebKit: default: true +WebAPIsInShadowRealmEnabled: + type: bool + humanReadableName: "Web APIs in ShadowRealm" + humanReadableDescription: "Enable Web APIs to be exposed in ShadowRealm" + defaultValue: +WebKitLegacy: + default: false +WebKit: + default: false +WebCore: + default: false + WebAnimationsCompositeOperationsEnabled: type: bool humanReadableName: "Web Animations composite operations" Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (295458 => 295459) --- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2022-06-10 18:50:09 UTC (rev 295458) +++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2022-06-10 19:01:43 UTC (rev 295459) @@ -39,6 +39,25 @@ #define WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS(macro) #endif +#if !defined(WEBCORE_COMMON_PRIVATE_IDENTIFIERS_FOR_SHADOWREALM_EACH_PROPERTY_NAME) +// Dom APIs exposed to ShadowRealm are temporarily enabled via the WebAPIsInShadowRealmEnabled +// experimental feature. When this is resolved, these can be deleted. +#define WEBCORE_COMMON_PRIVATE_IDENTIFIERS_FOR_SHADOWREALM_EACH_PROPERTY_NAME(macro) \ +macro(AbortController) \ +macro(ByteLengthQueuingStrategy) \ +macro(CountQueuingStrategy) \ +macro(CustomEvent) \ +macro(ErrorEvent) \ +macro(Event) \ +macro(EventTarget) \ +macro(Performance) \ +macro(PromiseRejectionEvent) \ +macro(TextDecoder) \ +macro(TextEncoder) \ +macro(URL) \ +macro(URLSearchParams) +#endif + #define WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \ macro(AbortSignal) \ macro(AbstractRange) \ @@ -608,6 +627,7 @@ macro(pendingAbortRequest) \ macro(writeRequests) \ WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS(macro) \ +WEBCORE_COMMON_PRIVATE_IDENTIFIERS_FOR_SHADOWREALM_EACH_PROPERTY_NAME(macro) \ class WebCoreBuiltinNames { public: Modified: trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl (295458 => 295459) --- trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl 2022-06-10 18:50:09 UTC (rev 295458) +++ trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl 2022-06-10 19:01:43 UTC (rev 295459) @@ -501,6 +501,15 @@ $extendedAttributes->{"Conditional"} = $existingConditional; } +if ($globalContext eq "ShadowRealm" && $extendedAttributes->{"Exposed"} eq "*") { +my $enabledBySetting = "WebAPIsInShadowRealmEnabled"; +my $existingEnabledBySetting = $extendedAttributes->{"EnabledBySetting"}; +if ($existingEnabledBySetting) { +$enabledBySetting .= "&" . $existingEnabledBySetting; +} +$extendedAttributes->{"EnabledBySetting"} = $enabledBySetting; +} + my $code = ""; my @extendedAttributesList; foreach my $attributeName (sort keys %{$extendedAttributes}) { Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSShadowRealmGlobalScope.cpp (295458 => 295459) --- trunk/Source/WebCore/bindings/scripts/test/JS/JSShadowRealmGlobalScope.cpp 2022-06-10 18:50:09 UTC (rev 295458) +++ trunk/Source/WebCore/bindings/scripts/test/JS/JSShadowRealmGlobalScope.cpp 2022-06-10 19:01:43 UTC (rev 295459) @@ -59,22 +59,18 @@ /* Hash
[webkit-changes] [295458] trunk/Source/WebCore/style/InlineTextBoxStyle.cpp
Title: [295458] trunk/Source/WebCore/style/InlineTextBoxStyle.cpp Revision 295458 Author za...@apple.com Date 2022-06-10 11:50:09 -0700 (Fri, 10 Jun 2022) Log Message Remove redundant OptionSet in InlineTextBoxStyle functions https://bugs.webkit.org/show_bug.cgi?id=241499 Reviewed by Antti Koivisto. * Source/WebCore/style/InlineTextBoxStyle.cpp: (WebCore::minLogicalTopForTextDecorationLine): (WebCore::maxLogicalBottomForTextDecorationLine): (WebCore::enclosingRendererWithTextDecoration): (WebCore::textRunLogicalOffsetFromLineBottom): Canonical link: https://commits.webkit.org/251464@main Modified Paths trunk/Source/WebCore/style/InlineTextBoxStyle.cpp Diff Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (295457 => 295458) --- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 18:19:56 UTC (rev 295457) +++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 18:50:09 UTC (rev 295458) @@ -48,7 +48,7 @@ return false; } -static float minLogicalTopForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalTop, const RenderElement* decorationRenderer, OptionSet textDecorationLine) +static float minLogicalTopForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalTop, const RenderElement* decorationRenderer) { auto minLogicalTop = textRunLogicalTop; for (auto run = lineBox->firstLeafBox(); run; run.traverseNextOnLine()) { @@ -55,7 +55,7 @@ if (run->renderer().isOutOfFlowPositioned()) continue; // Positioned placeholders don't affect calculations. -if (!(run->style().textDecorationsInEffect() & textDecorationLine)) +if (!run->style().textDecorationsInEffect().contains(TextDecorationLine::Underline)) continue; // If the text decoration isn't in effect on the child, then it must be outside of |decorationRenderer|'s hierarchy. if (decorationRenderer && decorationRenderer->isRenderInline() && !isAncestorAndWithinBlock(downcast(*decorationRenderer), >renderer())) @@ -67,7 +67,7 @@ return minLogicalTop; } -static float maxLogicalBottomForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalBottom, const RenderElement* decorationRenderer, OptionSet textDecorationLine) +static float maxLogicalBottomForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalBottom, const RenderElement* decorationRenderer) { auto maxLogicalBottom = textRunLogicalBottom; for (auto run = lineBox->firstLeafBox(); run; run.traverseNextOnLine()) { @@ -74,7 +74,7 @@ if (run->renderer().isOutOfFlowPositioned()) continue; // Positioned placeholders don't affect calculations. -if (!(run->style().textDecorationsInEffect() & textDecorationLine)) +if (!run->style().textDecorationsInEffect().contains(TextDecorationLine::Underline)) continue; // If the text decoration isn't in effect on the child, then it must be outside of |decorationRenderer|'s hierarchy. if (decorationRenderer && decorationRenderer->isRenderInline() && !isAncestorAndWithinBlock(downcast(*decorationRenderer), >renderer())) @@ -86,7 +86,7 @@ return maxLogicalBottom; } -static const RenderElement* enclosingRendererWithTextDecoration(const RenderText& renderer, OptionSet textDecorationLine, bool firstLine) +static const RenderElement* enclosingRendererWithTextDecoration(const RenderText& renderer, bool firstLine) { const RenderElement* current = renderer.parent(); do { @@ -96,7 +96,7 @@ return nullptr; const RenderStyle& styleToUse = firstLine ? current->firstLineStyle() : current->style(); -if (styleToUse.textDecorationLine() & textDecorationLine) +if (styleToUse.textDecorationLine().contains(TextDecorationLine::Underline)) return current; current = current->parent(); } while (current && (!current->element() || (!is(*current->element()) && !current->element()->hasTagName(HTMLNames::fontTag; @@ -107,12 +107,12 @@ float textRunLogicalOffsetFromLineBottom(const InlineIterator::TextBoxIterator& textRun) { float offset = 0.f; -auto* decorationRenderer = enclosingRendererWithTextDecoration(textRun->renderer(), TextDecorationLine::Underline, textRun->lineBox()->isFirst()); +auto* decorationRenderer = enclosingRendererWithTextDecoration(textRun->renderer(), textRun->lineBox()->isFirst()); if (textRun->renderer().style().isFlippedLinesWritingMode()) { -auto minLogicalTop = minLogicalTopForTextDecorationLine(textRun->lineBox(), textRun->logicalTop(), decorationRenderer, TextDecorationLine::Underline); +auto minLogicalTop = minLogicalTopForTextDecorationLine(textRun->lineBox(), textRun->logicalTop(), decorationRenderer); offset = textRun->logicalTop() - minLogicalTop; } else { -offset =
[webkit-changes] [295457] trunk/Source/WebCore/dom/Document.cpp
Title: [295457] trunk/Source/WebCore/dom/Document.cpp Revision 295457 Author commit-qu...@webkit.org Date 2022-06-10 11:19:56 -0700 (Fri, 10 Jun 2022) Log Message Special case bitmap renderers in Document::getCSSCanvasContext https://bugs.webkit.org/show_bug.cgi?id=241505 Patch by Rob Buis on 2022-06-10 Reviewed by Alex Christensen. Special case bitmap renderers in Document::getCSSCanvasContext. * Source/WebCore/dom/Document.cpp: (WebCore::Document::getCSSCanvasContext): Canonical link: https://commits.webkit.org/251463@main Modified Paths trunk/Source/WebCore/dom/Document.cpp Diff Modified: trunk/Source/WebCore/dom/Document.cpp (295456 => 295457) --- trunk/Source/WebCore/dom/Document.cpp 2022-06-10 17:29:29 UTC (rev 295456) +++ trunk/Source/WebCore/dom/Document.cpp 2022-06-10 18:19:56 UTC (rev 295457) @@ -6580,6 +6580,9 @@ return RenderingContext { RefPtr { (*context) } }; #endif +if (is(*context)) +return RenderingContext { RefPtr { (*context) } }; + return RenderingContext { RefPtr { (*context) } }; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295456] trunk
Title: [295456] trunk Revision 295456 Author bfulg...@apple.com Date 2022-06-10 10:29:29 -0700 (Fri, 10 Jun 2022) Log Message [ macOS ][ iOS ] TestWebKitAPI.SOAuthorizationSubFrame.InterceptionError is a flaky timeout https://bugs.webkit.org/show_bug.cgi?id=241421 Reviewed by Kate Cheney. This test was timing out for the same reason as SOAuthorizationSubFrame.InterceptionErrorWithReferrer, which Pascoe fixed in Bug 239311. This change modifies all 'waitForMessage'-based tests to use the message listener delegate to avoid the race conditions identified. I also changed the method swizzling code to remove a bunch of copy/paste code that had to be kept in sync. With these changes I can run the tests 1000 times on simulator without a timeout. * Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm: (-[WKSOAuthorizationDelegate authorization:didCompleteWithError:]): Only emit an error log message when there is an actual error. We pass through this flow in normal cases where a site wants to use the web fallback instead of AppSSO based on user input. * Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm: (-[TestSOAuthorizationScriptMessageHandler extendExpectations:]): (-[TestSOAuthorizationScriptMessageHandler resetExpectations:]): (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/251462@main Modified Paths trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm Diff Modified: trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm (295455 => 295456) --- trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm 2022-06-10 17:09:37 UTC (rev 295455) +++ trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm 2022-06-10 17:29:29 UTC (rev 295456) @@ -129,7 +129,8 @@ { ASSERT(RunLoop::isMain()); WKSOAUTHORIZATIONDELEGATE_RELEASE_LOG("authorization:didCompleteWithError: (authorization = %p, _session = %p)", authorization, _session.get()); -LOG_ERROR("Could not complete AppSSO: %d", error.code); +if (error.code) +LOG_ERROR("Could not complete AppSSO operation. Error: %d", error.code); if (!_session) { WKSOAUTHORIZATIONDELEGATE_RELEASE_LOG("authorization:didCompleteWithError: No session, so returning early."); ASSERT_NOT_REACHED(); Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm (295455 => 295456) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm 2022-06-10 17:09:37 UTC (rev 295455) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm 2022-06-10 17:29:29 UTC (rev 295456) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Apple Inc. All rights reserved. + * Copyright (C) 2019-2022 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -260,6 +260,19 @@ return self; } +- (void)extendExpectations:(NSArray *)additionalMessages +{ +_expectedMessages = [_expectedMessages arrayByAddingObjectsFromArray:additionalMessages]; +allMessagesReceived = false; +} + +- (void)resetExpectations:(NSArray *)expectedMessages +{ +_messages = adoptNS([[NSMutableArray alloc] init]); +_expectedMessages = expectedMessages; +allMessagesReceived = false; +} + - (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message { auto curIndex = [_messages count]; @@ -370,6 +383,16 @@ EXPECT_EQ(((NSNumber *)[gAuthorization authorizationOptions][SOAuthorizationOptionInitiatingAction]).intValue, initiatingAction); } +#define SWIZZLE_SOAUTH(SOAuthClass) \ +ClassMethodSwizzler swizzler1(SOAuthClass, @selector(canPerformAuthorizationWithURL:responseCode:), reinterpret_cast(overrideCanPerformAuthorizationWithURL)); \ +InstanceMethodSwizzler swizzler2(SOAuthClass, @selector(setDelegate:), reinterpret_cast(overrideSetDelegate)); \ +InstanceMethodSwizzler swizzler3(SOAuthClass, @selector(beginAuthorizationWithURL:httpHeaders:httpBody:), reinterpret_cast(overrideBeginAuthorizationWithURL)); \ +InstanceMethodSwizzler swizzler4(SOAuthClass, @selector(cancelAuthorization), reinterpret_cast(overrideCancelAuthorization)); \ +InstanceMethodSwizzler swizzler5(SOAuthClass, @selector(getAuthorizationHintsWithURL:responseCode:completion:), reinterpret_cast(overrideGetAuthorizationHintsWithURL)); + +#define SWIZZLE_AKAUTH() \ +ClassMethodSwizzler swizzler6([AKAuthorizationController class], @selector(isURLFromAppleOwnedDomain:), reinterpret_cast(overrideIsURLFromAppleOwnedDomain)); \ + namespace TestWebKitAPI { TEST(SOAuthorizationRedirect, NoInterceptions) @@ -391,10 +414,7 @@ TEST(SOAuthorizationRedirect, DisableSSO) { resetState(); -ClassMethodSwizzler
[webkit-changes] [295455] trunk/Source/WebCore
Title: [295455] trunk/Source/WebCore Revision 295455 Author za...@apple.com Date 2022-06-10 10:09:37 -0700 (Fri, 10 Jun 2022) Log Message Should be able to compute decoration overflow without InlineIterator::TextBoxIterator https://bugs.webkit.org/show_bug.cgi?id=241490 Reviewed by Antti Koivisto. This patch enables IFC codebase to compute visual overflow for decoration (even when TextBoxIterator is not available). * Source/WebCore/rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeAffectsVisualOverflow const): * Source/WebCore/style/InlineTextBoxStyle.cpp: (WebCore::visualOverflowForDecorations): * Source/WebCore/style/InlineTextBoxStyle.h: Canonical link: https://commits.webkit.org/251461@main Modified Paths trunk/Source/WebCore/rendering/style/RenderStyle.cpp trunk/Source/WebCore/style/InlineTextBoxStyle.cpp trunk/Source/WebCore/style/InlineTextBoxStyle.h Diff Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (295454 => 295455) --- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2022-06-10 16:13:17 UTC (rev 295454) +++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2022-06-10 17:09:37 UTC (rev 295455) @@ -685,7 +685,7 @@ // is specified. We can take an early out here. if (textUnderlinePosition() == TextUnderlinePosition::Under || other.textUnderlinePosition() == TextUnderlinePosition::Under) return true; -return visualOverflowForDecorations(*this, { }) != visualOverflowForDecorations(other, { }); +return visualOverflowForDecorations(*this) != visualOverflowForDecorations(other); } auto hasOutlineInVisualOverflow = this->hasOutlineInVisualOverflow(); Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (295454 => 295455) --- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 16:13:17 UTC (rev 295454) +++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 17:09:37 UTC (rev 295455) @@ -172,10 +172,8 @@ return result; } -GlyphOverflow visualOverflowForDecorations(const RenderStyle& lineStyle, const InlineIterator::TextBoxIterator& textRun) +GlyphOverflow visualOverflowForDecorations(const RenderStyle& lineStyle, std::optional underlineOffset) { -ASSERT(!textRun || textRun->style() == lineStyle); - auto decoration = lineStyle.textDecorationsInEffect(); if (decoration.isEmpty()) return GlyphOverflow(); @@ -183,11 +181,11 @@ float strokeThickness = lineStyle.textDecorationThickness().resolve(lineStyle.computedFontSize(), lineStyle.metricsOfPrimaryFont()); WavyStrokeParameters wavyStrokeParameters; float wavyOffset = 0; - + TextDecorationStyle decorationStyle = lineStyle.textDecorationStyle(); float height = lineStyle.fontCascade().metricsOfPrimaryFont().floatHeight(); GlyphOverflow overflowResult; - + if (decorationStyle == TextDecorationStyle::Wavy) { wavyStrokeParameters = getWavyStrokeParameters(lineStyle.computedFontPixelSize()); wavyOffset = wavyOffsetFromDecoration(); @@ -198,27 +196,13 @@ // These metrics must match where underlines get drawn. // FIXME: Share the code in TextDecorationPainter::paintBackgroundDecorations() so we can just query it for the painted geometry. if (decoration & TextDecorationLine::Underline) { -// Compensate for the integral ceiling in GraphicsContext::computeLineBoundsAndAntialiasingModeForText() -int underlineOffset = 1; -float textDecorationBaseFontSize = 16; -auto defaultGap = lineStyle.computedFontSize() / textDecorationBaseFontSize; -// FIXME: RenderStyle calls us with empty textRun but only when TextUnderlinePosition is not Under. -ASSERT(textRun || lineStyle.textUnderlinePosition() != TextUnderlinePosition::Under); -if (!textRun) -underlineOffset += computeUnderlineOffset({ lineStyle, defaultGap }); -else { -underlineOffset += computeUnderlineOffset({ lineStyle -, defaultGap -, UnderlineOffsetArguments::TextUnderlinePositionUnder { textRun->lineBox()->baselineType(), textRun->logicalBottom() - textRun->logicalTop(), textRunLogicalOffsetFromLineBottom(textRun) } -}); -} - +ASSERT(underlineOffset); if (decorationStyle == TextDecorationStyle::Wavy) { -overflowResult.extendBottom(underlineOffset + wavyOffset + wavyStrokeParameters.controlPointDistance + strokeThickness - height); -overflowResult.extendTop(-(underlineOffset + wavyOffset - wavyStrokeParameters.controlPointDistance - strokeThickness)); +overflowResult.extendBottom(*underlineOffset + wavyOffset + wavyStrokeParameters.controlPointDistance + strokeThickness - height); +overflowResult.extendTop(-(*underlineOffset + wavyOffset - wavyStrokeParameters.controlPointDistance - strokeThickness)); } else { -
[webkit-changes] [295454] trunk/Source
Title: [295454] trunk/Source Revision 295454 Author commit-qu...@webkit.org Date 2022-06-10 09:13:17 -0700 (Fri, 10 Jun 2022) Log Message [GLib] Validate proxy URLs passed to WebKitNetworkProxySettings https://bugs.webkit.org/show_bug.cgi?id=241485 Patch by Michael Catanzaro on 2022-06-10 Reviewed by Philippe Normand. Validate that users pass only valid URLs to these APIs. * Source/WTF/wtf/URL.h: Opportunistic typo fix. * Source/WebKit/UIProcess/API/glib/WebKitNetworkProxySettings.cpp: (webkit_network_proxy_settings_new): (webkit_network_proxy_settings_add_proxy_for_scheme): Canonical link: https://commits.webkit.org/251460@main Modified Paths trunk/Source/WTF/wtf/URL.h trunk/Source/WebKit/UIProcess/API/glib/WebKitNetworkProxySettings.cpp Diff Modified: trunk/Source/WTF/wtf/URL.h (295453 => 295454) --- trunk/Source/WTF/wtf/URL.h 2022-06-10 15:19:42 UTC (rev 295453) +++ trunk/Source/WTF/wtf/URL.h 2022-06-10 16:13:17 UTC (rev 295454) @@ -61,7 +61,7 @@ bool isHashTableDeletedValue() const { return m_string.isHashTableDeletedValue(); } // Resolves the relative URL with the given base URL. If provided, the -// URLTextEncoding is used to encode non-ASCII characers. The base URL can be +// URLTextEncoding is used to encode non-ASCII characters. The base URL can be // null or empty, in which case the relative URL will be interpreted as absolute. WTF_EXPORT_PRIVATE URL(const URL& base, const String& relative, const URLTextEncoding* = nullptr); Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitNetworkProxySettings.cpp (295453 => 295454) --- trunk/Source/WebKit/UIProcess/API/glib/WebKitNetworkProxySettings.cpp 2022-06-10 15:19:42 UTC (rev 295453) +++ trunk/Source/WebKit/UIProcess/API/glib/WebKitNetworkProxySettings.cpp 2022-06-10 16:13:17 UTC (rev 295454) @@ -22,7 +22,9 @@ #include "WebKitNetworkProxySettingsPrivate.h" #include +#include #include +#include using namespace WebCore; @@ -105,8 +107,10 @@ { WebKitNetworkProxySettings* proxySettings = static_cast(fastMalloc(sizeof(WebKitNetworkProxySettings))); new (proxySettings) WebKitNetworkProxySettings; -if (defaultProxyURI) +if (defaultProxyURI) { +g_return_val_if_fail(URL(String::fromUTF8(defaultProxyURI)).isValid(), nullptr); proxySettings->settings.defaultProxyURL = defaultProxyURI; +} if (ignoreHosts) proxySettings->settings.ignoreHosts.reset(g_strdupv(const_cast(ignoreHosts))); return proxySettings; @@ -164,6 +168,7 @@ g_return_if_fail(proxySettings); g_return_if_fail(scheme); g_return_if_fail(proxyURI); +g_return_if_fail(URL(String::fromUTF8(proxyURI)).isValid()); proxySettings->settings.proxyMap.add(scheme, proxyURI); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295453] trunk/Source/WebCore
Title: [295453] trunk/Source/WebCore Revision 295453 Author za...@apple.com Date 2022-06-10 08:19:42 -0700 (Fri, 10 Jun 2022) Log Message computeUnderlineOffset should not take InlineIterator::LineBoxIterator https://bugs.webkit.org/show_bug.cgi?id=241488 Reviewed by Antti Koivisto. Let's precompute the text run's offset value so that we don't have to pass in a LineBoxIterator to computeUnderlineOffset. * Source/WebCore/rendering/TextDecorationPainter.cpp: (WebCore::TextDecorationPainter::paintBackgroundDecorations): * Source/WebCore/style/InlineTextBoxStyle.cpp: (WebCore::textRunLogicalOffsetFromLineBottom): (WebCore::computeUnderlineOffset): (WebCore::visualOverflowForDecorations): * Source/WebCore/style/InlineTextBoxStyle.h: Canonical link: https://commits.webkit.org/251459@main Modified Paths trunk/Source/WebCore/rendering/TextDecorationPainter.cpp trunk/Source/WebCore/style/InlineTextBoxStyle.cpp trunk/Source/WebCore/style/InlineTextBoxStyle.h Diff Modified: trunk/Source/WebCore/rendering/TextDecorationPainter.cpp (295452 => 295453) --- trunk/Source/WebCore/rendering/TextDecorationPainter.cpp 2022-06-10 15:11:58 UTC (rev 295452) +++ trunk/Source/WebCore/rendering/TextDecorationPainter.cpp 2022-06-10 15:19:42 UTC (rev 295453) @@ -282,11 +282,10 @@ auto defaultGap = m_lineStyle.computedFontSize() / textDecorationBaseFontSize; float offset = computeUnderlineOffset({ m_lineStyle , defaultGap -, _textBox->renderer() -, m_textBox->lineBox()->baselineType() -, m_textBox->logicalTop() -, m_textBox->logicalBottom() -, m_textBox->lineBox() +, UnderlineOffsetArguments::TextUnderlinePositionUnder { m_textBox->lineBox()->baselineType(), +m_textBox->logicalBottom() - m_textBox->logicalTop(), +textRunLogicalOffsetFromLineBottom(m_textBox) +} }); float wavyOffset = m_styles.underlineStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0; FloatRect rect(localOrigin, FloatSize(m_width, textDecorationThickness)); Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (295452 => 295453) --- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 15:11:58 UTC (rev 295452) +++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 15:19:42 UTC (rev 295453) @@ -103,7 +103,21 @@ return current; } - + +float textRunLogicalOffsetFromLineBottom(const InlineIterator::TextBoxIterator& textRun) +{ +float offset = 0.f; +auto* decorationRenderer = enclosingRendererWithTextDecoration(textRun->renderer(), TextDecorationLine::Underline, textRun->lineBox()->isFirst()); +if (textRun->renderer().style().isFlippedLinesWritingMode()) { +auto minLogicalTop = minLogicalTopForTextDecorationLine(textRun->lineBox(), textRun->logicalTop(), decorationRenderer, TextDecorationLine::Underline); +offset = textRun->logicalTop() - minLogicalTop; +} else { +offset = maxLogicalBottomForTextDecorationLine(textRun->lineBox(), textRun->logicalBottom(), decorationRenderer, TextDecorationLine::Underline); +offset -= textRun->logicalBottom(); +} +return offset; +} + float computeUnderlineOffset(const UnderlineOffsetArguments& context) { // This represents the gap between the baseline and the closest edge of the underline. @@ -124,12 +138,12 @@ auto resolvedUnderlinePosition = underlinePosition; if (resolvedUnderlinePosition == TextUnderlinePosition::Auto && underlineOffset.isAuto()) { -if (context.renderer) -resolvedUnderlinePosition = context.baselineType == IdeographicBaseline ? TextUnderlinePosition::Under : TextUnderlinePosition::Auto; +if (context.textUnderlinePositionUnder) +resolvedUnderlinePosition = context.textUnderlinePositionUnder->baselineType == IdeographicBaseline ? TextUnderlinePosition::Under : TextUnderlinePosition::Auto; else resolvedUnderlinePosition = TextUnderlinePosition::Auto; } - + switch (resolvedUnderlinePosition) { case TextUnderlinePosition::Auto: if (underlineOffset.isAuto()) @@ -138,20 +152,9 @@ case TextUnderlinePosition::FromFont: return fontMetrics.ascent() + fontMetrics.underlinePosition() + underlineOffset.lengthOr(0); case TextUnderlinePosition::Under: { -ASSERT(context.lineBox && context.renderer); +ASSERT(context.textUnderlinePositionUnder); // Position underline relative to the bottom edge of the lowest element's content box. -auto* decorationRenderer = enclosingRendererWithTextDecoration(*context.renderer, TextDecorationLine::Underline, context.lineBox->isFirst()); - -float offset; -if (context.renderer->style().isFlippedLinesWritingMode()) { -auto minLogicalTop =
[webkit-changes] [295452] trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
Title: [295452] trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm Revision 295452 Author pvol...@apple.com Date 2022-06-10 08:11:58 -0700 (Fri, 10 Jun 2022) Log Message Disable URL scheme check in Data Detectors for all clients https://bugs.webkit.org/show_bug.cgi?id=241273 Reviewed by Geoffrey Garen. We are seeing telmetry where also Web browser clients are attempting to connect to Launch Services when data detection is trying to find an application to handle a URL with a custom scheme. Since Launch Services is blocked in the sandbox, the WebContent process will be unable to determine if there is an application that can open this URL, and the link will not be clickable. This can be addressed by disabling the URL scheme check in Data Detectors for all clients. * Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): Canonical link: https://commits.webkit.org/251458@main Modified Paths trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm Diff Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (295451 => 295452) --- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2022-06-10 14:51:23 UTC (rev 295451) +++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2022-06-10 15:11:58 UTC (rev 295452) @@ -431,8 +431,7 @@ accessibilityPreferencesDidChange(parameters.accessibilityPreferences); -if (!isParentProcessAFullWebBrowser(*this)) -disableURLSchemeCheckInDataDetectors(); +disableURLSchemeCheckInDataDetectors(); // Soft link frameworks related to Data Detection before we disconnect from launchd because these frameworks connect to // launchd temporarily at link time to register XPC services. See rdar://93598951 (my feature request to stop doing that) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295451] trunk
Title: [295451] trunk Revision 295451 Author pan...@apple.com Date 2022-06-10 07:51:23 -0700 (Fri, 10 Jun 2022) Log Message WebDriver: [Cocoa] Regression(r290743) Automated mouse movement does not result in JS mouse event being fired https://bugs.webkit.org/show_bug.cgi?id=241484 rdar://94026001 Reviewed by Devin Rousso. r290743 changed WKWebView on macOS to no longer forward NSEventTypeMouseMoved events to the underlying view implementation since it does its own mouse tracking. Unfortuantely, this means that WebDriver on Cocoa platforms can not just dispatch an event to the window and have that event reach the WKWebView's underlying view implementation. This change was made because events for genuine cursor movement were being received twice by the underlying view previously. We need to explicitly tell the underlying view about automated mouse movements (as well as the NSWindow to maintain any existing behavior caused by the mouse move event being sent to the window). This patch was verified by comparing WPT test results for tests in /webdriver/tests/perform_actions and /webdriver/tests/release_actions and ensuring that results now match Safari 15.5 again, which does not have the regressing change included. * Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h: * Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm: (-[WKWebView _simulateMouseMove:]): * Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h: * Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm: (-[WKWebView _simulateMouseMove:]): Deleted. - Move _simulateMouseMove to be private instead of private for testing. * Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm: (WebKit::WebAutomationSession::sendSynthesizedEventsToPage): - For mouse move events, make sure the view implementation receives the events. * Tools/WebKitTestRunner/mac/EventSenderProxy.mm: Canonical link: https://commits.webkit.org/251457@main Modified Paths trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h trunk/Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm trunk/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h trunk/Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm Diff Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (295450 => 295451) --- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2022-06-10 12:26:02 UTC (rev 295450) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2022-06-10 14:51:23 UTC (rev 295451) @@ -725,6 +725,8 @@ - (void)_prepareForMoveToWindow:(NSWindow *)targetWindow completionHandler:(void(^)(void))completionHandler WK_API_AVAILABLE(macos(10.13)); +- (void)_simulateMouseMove:(NSEvent *)event WK_API_AVAILABLE(macos(13.0)); + @end #endif // !TARGET_OS_IPHONE Modified: trunk/Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm (295450 => 295451) --- trunk/Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm 2022-06-10 12:26:02 UTC (rev 295450) +++ trunk/Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm 2022-06-10 14:51:23 UTC (rev 295451) @@ -1690,6 +1690,11 @@ }); } +- (void)_simulateMouseMove:(NSEvent *)event +{ +return _impl->mouseMoved(event); +} + @end // WKWebView (WKPrivateMac) #endif // PLATFORM(MAC) Modified: trunk/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h (295450 => 295451) --- trunk/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h 2022-06-10 12:26:02 UTC (rev 295450) +++ trunk/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h 2022-06-10 14:51:23 UTC (rev 295451) @@ -52,7 +52,6 @@ - (void)_setFooterBannerHeight:(int)height; - (NSSet *)_pdfHUDs; -- (void)_simulateMouseMove:(NSEvent *)event; - (void)_retrieveAccessibilityTreeData:(void (^)(NSData *, NSError *))completionHandler; @property (nonatomic, readonly) BOOL _secureEventInputEnabledForTesting; Modified: trunk/Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm (295450 => 295451) --- trunk/Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm 2022-06-10 12:26:02 UTC (rev 295450) +++ trunk/Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm 2022-06-10 14:51:23 UTC (rev 295451) @@ -121,11 +121,6 @@ return nil; } -- (void)_simulateMouseMove:(NSEvent *)event -{ -return _impl->mouseMoved(event); -} - - (void)_retrieveAccessibilityTreeData:(void (^)(NSData *, NSError *))completionHandler { _page->getAccessibilityTreeData([completionHandler = makeBlockPtr(completionHandler)] (API::Data* data) { Modified: trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm (295450 => 295451) --- trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm 2022-06-10 12:26:02 UTC (rev 295450) +++ trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm 2022-06-10 14:51:23 UTC (rev 295451) @@ -32,6 +32,7 @@ #import
[webkit-changes] [295450] trunk/Source/WebCore/style/InlineTextBoxStyle.cpp
Title: [295450] trunk/Source/WebCore/style/InlineTextBoxStyle.cpp Revision 295450 Author za...@apple.com Date 2022-06-10 05:26:02 -0700 (Fri, 10 Jun 2022) Log Message minLogicalTopForTextDecorationLine/maxLogicalBottomForTextDecorationLine should return the min/max value https://bugs.webkit.org/show_bug.cgi?id=241474 Reviewed by Antti Koivisto. This improves readability and also a preparation for making decoration visual overflow work with IFC. * Source/WebCore/style/InlineTextBoxStyle.cpp: (WebCore::minLogicalTopForTextDecorationLine): (WebCore::maxLogicalBottomForTextDecorationLine): (WebCore::computeUnderlineOffset): Canonical link: https://commits.webkit.org/251456@main Modified Paths trunk/Source/WebCore/style/InlineTextBoxStyle.cpp Diff Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (295449 => 295450) --- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 09:37:34 UTC (rev 295449) +++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 12:26:02 UTC (rev 295450) @@ -48,8 +48,9 @@ return false; } -static void minLogicalTopForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float& minLogicalTop, const RenderElement* decorationRenderer, OptionSet textDecorationLine) +static float minLogicalTopForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalTop, const RenderElement* decorationRenderer, OptionSet textDecorationLine) { +auto minLogicalTop = textRunLogicalTop; for (auto run = lineBox->firstLeafBox(); run; run.traverseNextOnLine()) { if (run->renderer().isOutOfFlowPositioned()) continue; // Positioned placeholders don't affect calculations. @@ -63,10 +64,12 @@ if (run->isText() || run->style().textDecorationSkipInk() == TextDecorationSkipInk::None) minLogicalTop = std::min(minLogicalTop, run->logicalTop()); } +return minLogicalTop; } -static void maxLogicalBottomForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float& maxLogicalBottom, const RenderElement* decorationRenderer, OptionSet textDecorationLine) +static float maxLogicalBottomForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalBottom, const RenderElement* decorationRenderer, OptionSet textDecorationLine) { +auto maxLogicalBottom = textRunLogicalBottom; for (auto run = lineBox->firstLeafBox(); run; run.traverseNextOnLine()) { if (run->renderer().isOutOfFlowPositioned()) continue; // Positioned placeholders don't affect calculations. @@ -80,6 +83,7 @@ if (run->isText() || run->style().textDecorationSkipInk() == TextDecorationSkipInk::None) maxLogicalBottom = std::max(maxLogicalBottom, run->logicalBottom()); } +return maxLogicalBottom; } static const RenderElement* enclosingRendererWithTextDecoration(const RenderText& renderer, OptionSet textDecorationLine, bool firstLine) @@ -140,12 +144,10 @@ float offset; if (context.renderer->style().isFlippedLinesWritingMode()) { -offset = context.textRunLogicalTop; -minLogicalTopForTextDecorationLine(context.lineBox, offset, decorationRenderer, TextDecorationLine::Underline); -offset = context.textRunLogicalTop - offset; +auto minLogicalTop = minLogicalTopForTextDecorationLine(context.lineBox, context.textRunLogicalTop, decorationRenderer, TextDecorationLine::Underline); +offset = context.textRunLogicalTop - minLogicalTop; } else { -offset = context.textRunLogicalBottom; -maxLogicalBottomForTextDecorationLine(context.lineBox, offset, decorationRenderer, TextDecorationLine::Underline); +offset = maxLogicalBottomForTextDecorationLine(context.lineBox, context.textRunLogicalBottom, decorationRenderer, TextDecorationLine::Underline); offset -= context.textRunLogicalBottom; } auto textRunLogicalHeight = context.textRunLogicalBottom - context.textRunLogicalTop; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295448] trunk
Title: [295448] trunk Revision 295448 Author nmouchta...@apple.com Date 2022-06-10 01:04:47 -0700 (Fri, 10 Jun 2022) Log Message REGRESSION: CSS scroll-behavior: smooth with overflow: hidden breaks JS scrollTo/scrollLeft/scrollTop https://bugs.webkit.org/show_bug.cgi?id=238497 Reviewed by Simon Fraser. Add scrollable area to frame view's list of scrollable areas if necessary in scrollToOffset. This is necessary as Document::runScrollSteps() looks through the list of scrollable areas to service animations on the scrollable area. It is necessary to add the scrollable area in scrollToOffset as for a scrollable area that is not user scrollable (such as a scrollable area with overflow: hidden) it would not be added, so the animation would not occur. * LayoutTests/fast/scrolling/smooth-scroll-with-overflow-hidden-expected.txt: Added. * LayoutTests/fast/scrolling/smooth-scroll-with-overflow-hidden.html: Added. * Source/WebCore/page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const): * Source/WebCore/platform/ScrollableArea.h: (WebCore::ScrollableArea::isVisibleToHitTesting const): * Source/WebCore/rendering/RenderLayerScrollableArea.cpp: (WebCore::RenderLayerScrollableArea::clear): (WebCore::RenderLayerScrollableArea::scrollToOffset): (WebCore::RenderLayerScrollableArea::isVisibleToHitTesting const): (WebCore::RenderLayerScrollableArea::updateScrollableAreaSet): (WebCore::RenderLayerScrollableArea::registerScrollableArea): * Source/WebCore/rendering/RenderLayerScrollableArea.h: Canonical link: https://commits.webkit.org/251454@main Modified Paths trunk/Source/WebCore/page/FocusController.cpp trunk/Source/WebCore/page/FrameView.cpp trunk/Source/WebCore/page/FrameView.h trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp trunk/Source/WebCore/platform/ScrollableArea.h trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h trunk/Source/WebCore/rendering/RenderListBox.h Added Paths trunk/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-expected.txt trunk/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden.html Diff Added: trunk/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-expected.txt (0 => 295448) --- trunk/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-expected.txt (rev 0) +++ trunk/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-expected.txt 2022-06-10 08:04:47 UTC (rev 295448) @@ -0,0 +1,5 @@ +PASS scrollContainer.scrollLeft is 500 +PASS successfullyParsed is true + +TEST COMPLETE + Added: trunk/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden.html (0 => 295448) --- trunk/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden.html (rev 0) +++ trunk/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden.html 2022-06-10 08:04:47 UTC (rev 295448) @@ -0,0 +1,54 @@ + + + + +.scroll-container { +height: 250px; +width: 300px; +border: 1px solid black; +overflow-y: scroll; +overflow: hidden; +} + +.contents { +height: 100%; +width: 400%; +background-image: repeating-linear-gradient(to right, white, silver 250px); +} + + +jsTestIsAsync = true; + +async function runTest() +{ +scrollContainer = document.querySelector('.scroll-container'); + +eventSender.monitorWheelEvents(); + +scrollContainer.scrollTo({ +top: 0, +left: 500, +behavior: 'smooth' +}); + +await UIHelper.waitForScrollCompletion(); + +shouldBe('scrollContainer.scrollLeft', '500'); +finishJSTest(); +} + +window.addEventListener('load', () => { +setTimeout(runTest, 0); +}, false); + + + + + + + +
[webkit-changes] [295447] trunk
Title: [295447] trunk Revision 295447 Author mmaxfi...@apple.com Date 2022-06-09 23:29:03 -0700 (Thu, 09 Jun 2022) Log Message Add EnumeratedArray type https://bugs.webkit.org/show_bug.cgi?id=241451 Reviewed by Cameron McCormack. This is an std::array where the indices of the array are values of an enum (rather than a size_t). This assumes the values of the enum start at 0 and monotonically increase by 1 (so the conversion function between size_t and the enum is just a simple static_cast). EnumeratedArray includes almost all of the functions from std::array, except for a few which I intentionally omitted. * Source/WTF/WTF.xcodeproj/project.pbxproj: * Source/WTF/wtf/EnumeratedArray.h: Added. (WTF::EnumeratedArray::EnumeratedArray): (WTF::EnumeratedArray::operator=): (WTF::EnumeratedArray::at): (WTF::EnumeratedArray::at const): (WTF::EnumeratedArray::operator[]): (WTF::EnumeratedArray::operator[] const): (WTF::EnumeratedArray::front): (WTF::EnumeratedArray::front const): (WTF::EnumeratedArray::back): (WTF::EnumeratedArray::back const): (WTF::EnumeratedArray::fill): (WTF::EnumeratedArray::operator== const): (WTF::EnumeratedArray::operator!= const): (WTF::EnumeratedArray::operator< const): (WTF::EnumeratedArray::operator<= const): (WTF::EnumeratedArray::operator> const): (WTF::EnumeratedArray::operator>= const): (WTF::EnumeratedArray::index): * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WTF/EnumeratedArray.cpp: Added. (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/251453@main Modified Paths trunk/Source/WTF/WTF.xcodeproj/project.pbxproj trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Source/WTF/wtf/EnumeratedArray.h trunk/Tools/TestWebKitAPI/Tests/WTF/EnumeratedArray.cpp Diff Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (295446 => 295447) --- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2022-06-10 06:25:28 UTC (rev 295446) +++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2022-06-10 06:29:03 UTC (rev 295447) @@ -51,6 +51,7 @@ 1C96836926BE76B600A2A2F9 /* LoggingCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C96836826BE76B600A2A2F9 /* LoggingCocoa.mm */; }; 1CA85CA9241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */; }; 1CF18F3B26BB579E004B1722 /* LogChannels.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CF18F3926BB579E004B1722 /* LogChannels.cpp */; }; + 1CFD5D3D2851AB3E00A0E30B /* EnumeratedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CFD5D3B2851AB3E00A0E30B /* EnumeratedArray.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1FA47C8A152502DA00568D1B /* WebCoreThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FA47C88152502DA00568D1B /* WebCoreThread.cpp */; }; 2CCD892A15C0390200285083 /* GregorianDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD892915C0390200285083 /* GregorianDateTime.cpp */; }; 2CDED0EF18115C38004DBA70 /* RunLoopCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CDED0EE18115C38004DBA70 /* RunLoopCF.cpp */; }; @@ -1049,6 +1050,7 @@ 1CCDB14D1E566898006C73C0 /* TextBreakIteratorICU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBreakIteratorICU.h; sourceTree = ""; }; 1CF18F3926BB579E004B1722 /* LogChannels.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LogChannels.cpp; sourceTree = ""; }; 1CF18F3A26BB579E004B1722 /* LogChannels.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LogChannels.h; sourceTree = ""; }; + 1CFD5D3B2851AB3E00A0E30B /* EnumeratedArray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnumeratedArray.h; sourceTree = ""; }; 1FA47C88152502DA00568D1B /* WebCoreThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreThread.cpp; sourceTree = ""; }; 1FA47C89152502DA00568D1B /* WebCoreThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreThread.h; sourceTree = ""; }; 24F1B248619F412296D1C19C /* RandomDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomDevice.h; sourceTree = ""; }; @@ -1981,6 +1983,7 @@ A8A47298151A825A004123FF /* dtoa.h */, E3538D4C276220880075DA50 /* EmbeddedFixedVector.h */, 5338EBA423AB04D100382662 /* EnumClassOperatorOverloads.h */, +1CFD5D3B2851AB3E00A0E30B /* EnumeratedArray.h */, 1AEA88E11D6BBCF400E5AD64 /* EnumTraits.h */, AD7C434A1DD2A4A70026888B /* Expected.h */, DF292D55278F9BC600BB2918 /* ExperimentalFeatureNames.h */, @@ -2911,6 +2914,7 @@ DD3DC94C27A4BF8E007E5B61 /* EmbeddedFixedVector.h in Headers */,
[webkit-changes] [295446] trunk
Title: [295446] trunk Revision 295446 Author tyle...@apple.com Date 2022-06-09 23:25:28 -0700 (Thu, 09 Jun 2022) Log Message AX: Update the isolated tree in response to dynamic changes to aria-live, aria-relevant, and aria-atomic https://bugs.webkit.org/show_bug.cgi?id=241444 Reviewed by Chris Fleizach. With this patch, we now update the isolated tree in response to dynamic aria-live, aria-relevant, and aria-atomic changes. This patch also makes liveRegionStatus, liveRegionRelevant, and liveRegionAtomic work on node-only objects (like those with display:contents). * LayoutTests/accessibility/aria-busy-updates-after-dynamic-change-expected.txt: Removed. * LayoutTests/accessibility/aria-busy-updates-after-dynamic-change.html: Removed. * LayoutTests/accessibility/live-region-attributes-update-after-dynamic-change-expected.txt: Added. * LayoutTests/accessibility/live-region-attributes-update-after-dynamic-change.html: Added. * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/win/TestExpectations: * Source/WebCore/accessibility/AXLogger.cpp: (WebCore::operator<<): * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAttributeChange): (WebCore::AXObjectCache::updateIsolatedTree): * Source/WebCore/accessibility/AXObjectCache.h: * Source/WebCore/accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::liveRegionStatus const): (WebCore::AccessibilityNodeObject::liveRegionRelevant const): (WebCore::AccessibilityNodeObject::liveRegionAtomic const): * Source/WebCore/accessibility/AccessibilityNodeObject.h: * Source/WebCore/accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::liveRegionStatus const): Deleted. (WebCore::AccessibilityRenderObject::liveRegionRelevant const): Deleted. (WebCore::AccessibilityRenderObject::liveRegionAtomic const): Deleted. * Source/WebCore/accessibility/AccessibilityRenderObject.h: * Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp: (WebCore::AXObjectCache::postPlatformNotification): * Tools/DumpRenderTree/AccessibilityUIElement.cpp: (getLiveRegionRelevantCallback): (getLiveRegionStatusCallback): (getIsAtomicLiveRegionCallback): (AccessibilityUIElement::getJSClass): * Tools/DumpRenderTree/AccessibilityUIElement.h: * Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (AccessibilityUIElement::liveRegionRelevant const): (AccessibilityUIElement::liveRegionStatus const): (AccessibilityUIElement::isAtomicLiveRegion const): * Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp (AccessibilityUIElement::liveRegionRelevant const): (AccessibilityUIElement::liveRegionStatus const): (AccessibilityUIElement::isAtomicLiveRegion const): * Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm: (AccessibilityUIElement::liveRegionRelevant const): (AccessibilityUIElement::liveRegionStatus const): (AccessibilityUIElement::isAtomicLiveRegion const): * Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::liveRegionRelevant const): (WTR::AccessibilityUIElement::liveRegionStatus const): (WTR::AccessibilityUIElement::isAtomicLiveRegion const): * Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::liveRegionStatus const): (WTR::AccessibilityUIElement::liveRegionRelevant const): (WTR::AccessibilityUIElement::isAtomicLiveRegion const): * Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp * Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp Canonical link: https://commits.webkit.org/251452@main Modified Paths trunk/LayoutTests/platform/glib/TestExpectations trunk/LayoutTests/platform/ios/TestExpectations trunk/LayoutTests/platform/win/TestExpectations trunk/Source/WebCore/accessibility/AXLogger.cpp trunk/Source/WebCore/accessibility/AXObjectCache.cpp trunk/Source/WebCore/accessibility/AXObjectCache.h trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h trunk/Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp trunk/Tools/DumpRenderTree/AccessibilityUIElement.h trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp