⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Jun 11, 2022:

8:25 PM Changeset in webkit [295477] by Alan Bujtas
  • 1 edit in trunk/Source/WebCore/rendering/LegacyLineLayout.cpp

Reset the dirty bit on the inline level renderers when counter is present
https://bugs.webkit.org/show_bug.cgi?id=241534

Reviewed by Antti Koivisto.

While the actual line layout happens in layoutRunsAndFloats, we pre-reset the needsLayout flag as we walk the renderers and prepare them for the inline layout.
Normally this simple DOM order walk clears all the layout bits just fine, but counters can re-dirty any "connected" renderer in a seemingly random order.
This patch ensures that all inline level box renders are marked clean before returning from layoutLineBoxes.

  • Source/WebCore/rendering/LegacyLineLayout.cpp:

(WebCore::LegacyLineLayout::layoutLineBoxes):

Canonical link: https://commits.webkit.org/251482@main

4:44 PM Changeset in webkit [295476] by mmaxfield@apple.com
  • 22 edits
    2 adds in trunk

Delay system font shorthand resolution until after parsing
https://bugs.webkit.org/show_bug.cgi?id=241454

Reviewed by Antti Koivisto.

This is the fifth piece of https://bugs.webkit.org/show_bug.cgi?id=237817, and is the main crux
of the fix to that bug. When content says something like "font: caption" or "font: -apple-system-body"
we have to map that to CSS properties like font-size and font-weight, so inheritance works properly
across different elements. On iOS, system settings can affect this mapping. Before this patch, we
were performing this mapping inside the parser, which is wrong because we'll never re-parse things
in response to a change in the environment. So, if the page is live, and then the user changes a setting
in system preferences, we won't re-parse, which means the page won't update to accomodate the new setting
the user changed.

This patch changes the parser to not do this mapping, but instead just to emit CSSValues which directly
and simply represent the value that was present in the CSS source itself. So, if the content says
"font: caption" we'll create CSSPrimitiveValues which just hold "caption" and use that for all the longhands
of the font property. Then, we do the mapping when the values are applied, inside StyleBuilder. StyleBuilder
is re-run in response to environment changes, so this piece is necessary for system settings to immediately
take effect without a reload of the page.

This change is web-exposed, because the contents of CSSValues are exposed to webpages via inspecting the
CSSStyleSheet in JavaScript. So, the change is a little scary, but I think it's the only way to have the
right thing happen with system settings.

This patch also deletes the now-unused system font shorthand cache, which was reimplemented in
https://github.com/WebKit/WebKit/commit/10cdfcb983187328f4229d5812a0da2a4210e4ef.

This patch isn't sufficient to make system settings fully work - there are some follow-up patches which
are still necessary on top of this:

  1. Have font creation code actually interrogate system settings, and react accordingly, to create fonts

with the appropriate size/weight

  1. Make sure the right things get invalidated, so we don't get erroneous cache hits when system settings

change

  1. Make sure the right events are being delivered to the right places, and triggering the right invalidation,

in response to system settings being changed.

  • LayoutTests/fast/text/font-shorthand-resolution-expected.txt: Added.
  • LayoutTests/fast/text/font-shorthand-resolution.html: Added.
  • Source/WebCore/css/CSSProperties.json:
  • Source/WebCore/css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeSystemFont):
(WebCore::CSSPropertyParser::parseShorthand):

  • Source/WebCore/css/parser/CSSPropertyParserHelpers.h:

(WebCore::CSSPropertyParserHelpers::isSystemFontShorthand):
(WebCore::CSSPropertyParserHelpers::lowerFontShorthand):

  • Source/WebCore/platform/graphics/SystemFontDatabase.h:
  • Source/WebCore/rendering/RenderTheme.h:
  • Source/WebCore/rendering/RenderThemeCocoa.h:
  • Source/WebCore/rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::systemFont const): Deleted.

  • Source/WebCore/rendering/RenderThemeGtk.cpp:

(WebCore::RenderThemeGtk::systemFont const): Deleted.

  • Source/WebCore/rendering/RenderThemePlayStation.cpp:

(WebCore::RenderThemePlayStation::systemFont const): Deleted.

  • Source/WebCore/rendering/RenderThemeWin.cpp:

(WebCore::RenderThemeWin::systemFont const): Deleted.

  • Source/WebCore/style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertFontWeight):
(WebCore::Style::BuilderConverter::convertFontVariantCaps):
(WebCore::Style::BuilderConverter::convertLineHeight):

  • Source/WebCore/style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyValueFontFamily):
(WebCore::Style::BuilderCustom::applyValueFontStyle):
(WebCore::Style::BuilderCustom::applyValueFontSize):

  • Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::contentSizeCategoryDidChange):

  • Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::accessibilityPreferencesDidChange):

Canonical link: https://commits.webkit.org/251481@main

3:32 PM Changeset in webkit [295475] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

ValidityState object should be the same on each access (JS object getting GC'd incorrectly)
https://bugs.webkit.org/show_bug.cgi?id=33733

Reviewed by Darin Adler.

Fixed the bug by making the form associated element an opaque root of ValidityState.

  • LayoutTests/fast/forms/ValidityState-gc-expected.txt: Added.
  • LayoutTests/fast/forms/ValidityState-gc.html: Added.
  • Source/WebCore/html/HTMLFormControlElement.h:
  • Source/WebCore/html/HTMLObjectElement.h:
  • Source/WebCore/html/ValidityState.h:

(WebCore::ValidityState::element):
(WebCore::ValidityState::opaqueRootConcurrently):

  • Source/WebCore/html/ValidityState.idl:

Canonical link: https://commits.webkit.org/251480@main

8:11 AM Changeset in webkit [295474] by Adrian Perez de Castro
  • 3 edits in trunk/Source

Non-unified build fixes, pre- Web Engines Hackfest edition
https://bugs.webkit.org/show_bug.cgi?id=241532

Unreviewed non-unified build fixes.

  • Source/WebCore/platform/graphics/filters/FilterResults.cpp: Add missing ImageBuffer.h header inclusion.
  • Source/WebCore/platform/graphics/gtk/SystemFontDatabaseGTK.cpp: Add missing inclusion of headers PlatformScreen.h, <gtk/gtk.h>, and wtf/glib/GUniquePtr.h.
  • Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp: Add missing NetworkProcessProxyMessages.h header inclusion.

Canonical link: https://commits.webkit.org/251479@main

Jun 10, 2022:

11:23 PM Changeset in webkit [295473] by achristensen@apple.com
  • 2 edits in trunk

CORS checks shouldn't unblock cookies
https://bugs.webkit.org/show_bug.cgi?id=241527

Reviewed by Brent Fulgham.

If cookies have been blocked, a request that has been made with {credentials: 'include'} shouldn't un-block the cookies.

  • Source/WebCore/loader/CrossOriginAccessControl.cpp:

(WebCore::updateRequestForAccessControl):

  • Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:

(TEST_F):

Canonical link: https://commits.webkit.org/251478@main

10:34 PM Changeset in webkit [295472] by Alan Bujtas
  • 7 edits
    2 adds in trunk

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

7:44 PM Changeset in webkit [295471] by Diego Pino Garcia
  • 1 edit in trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py

[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

6:33 PM Changeset in webkit [295470] by Jonathan Bedard
  • 5 edits in trunk/Tools/Scripts/libraries/webkitscmpy

[git-webkit] Make the default rebase behavior for git-webkit pr configurable
https://bugs.webkit.org/show_bug.cgi?id=239385
<rdar://problem/91811534>

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

5:35 PM Changeset in webkit [295469] by Jonathan Bedard
  • 1 delete in trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl

[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

4:26 PM Changeset in webkit [295468] by Wenson Hsieh
  • 2 edits in trunk

[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

4:10 PM Changeset in webkit [295467] by Jonathan Bedard
  • 2 edits in trunk/Tools/CISupport/ews-build

[EWS] Remove extra space from GitHub PR description links
https://bugs.webkit.org/show_bug.cgi?id=241522
<rdar://problem/94842283>

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

3:45 PM Changeset in webkit [295466] by yurys@chromium.org
  • 1 edit in trunk/Source/WebKit/UIProcess/WebPageProxy.h

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

3:13 PM Changeset in webkit [295465] by Adrian Perez de Castro
  • 1 edit in releases/WebKitGTK/webkit-2.36/Source/WebCore/rendering/RenderBox.h

Merge r295399 - Handle a disconnected view during applyTopLeftLocationOffset
https://bugs.webkit.org/show_bug.cgi?id=241355
<rdar://92432637>

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

2:49 PM Changeset in webkit [295464] by Wenson Hsieh
  • 34 edits in trunk

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

2:44 PM Changeset in webkit [295463] by Devin Rousso
  • 1 edit in trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp

Add PaymentHandler reference when validating the merchant
https://bugs.webkit.org/show_bug.cgi?id=241520
<rdar://problem/94609087>

Reviewed by Wenson Hsieh.

  • Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::completeMerchantValidation):

Canonical link: https://commits.webkit.org/251469@main

2:22 PM Changeset in webkit [295462] by Tyler Wilcock
  • 2 edits in trunk/Tools/CISupport/build-webkit-org

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

1:36 PM Changeset in webkit [295461] by mmaxfield@apple.com
  • 3 edits in trunk/Source

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

1:23 PM Changeset in webkit [295460] by dino@apple.com
  • 1 edit in trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm

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

12:01 PM Changeset in webkit [295459] by caitp@igalia.com
  • 5 edits in trunk/Source

[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

11:50 AM Changeset in webkit [295458] by Alan Bujtas
  • 1 edit in trunk/Source/WebCore/style/InlineTextBoxStyle.cpp

Remove redundant OptionSet<TextDecorationLine> 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

11:19 AM Changeset in webkit [295457] by commit-queue@webkit.org
  • 1 edit in trunk/Source/WebCore/dom/Document.cpp

Special case bitmap renderers in Document::getCSSCanvasContext
https://bugs.webkit.org/show_bug.cgi?id=241505

Patch by Rob Buis <rbuis@igalia.com> 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

10:29 AM Changeset in webkit [295456] by Brent Fulgham
  • 2 edits in trunk

[ macOS ][ iOS ] TestWebKitAPI.SOAuthorizationSubFrame.InterceptionError is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=241421
<rdar://problem/94641397>

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

10:09 AM Changeset in webkit [295455] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

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

9:13 AM Changeset in webkit [295454] by commit-queue@webkit.org
  • 2 edits in trunk/Source

[GLib] Validate proxy URLs passed to WebKitNetworkProxySettings
https://bugs.webkit.org/show_bug.cgi?id=241485

Patch by Michael Catanzaro <mcatanzaro@redhat.com> 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

8:19 AM Changeset in webkit [295453] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

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

8:11 AM Changeset in webkit [295452] by pvollan@apple.com
  • 1 edit in trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

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

7:51 AM Changeset in webkit [295451] by Patrick Angle
  • 6 edits in trunk

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

5:26 AM Changeset in webkit [295450] by Alan Bujtas
  • 1 edit in trunk/Source/WebCore/style/InlineTextBoxStyle.cpp

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

2:37 AM Changeset in webkit [295449] by commit-queue@webkit.org
  • 60 edits
    2 adds in trunk

Enable WasmLLInt on ARMv7

Patch by Geza Lore <Geza Lore> on 2022-06-10
Patch by Geza Lore <Geza Lore> on 2022-05-27
https://bugs.webkit.org/show_bug.cgi?id=221260

Reviewed by Saam Barati.

Patch by Geza Lore and Xan López.

Implement the LLInt tier of WebAssembly for ARMv7. A lot of the
work will be shared by any 32bit port, but the offlineassembler
has only been updated for ARMv7 so far.

Main highlights:

We have split the WebAssembly.asm file into three chunks,
following what LowLevelInterpreter.asm does. The common code
remains in WebAssembly.asm, and 32 and 64bit specific code (mostly
opcode implementations) goes into WebAssembly32_64.asm and
WebAssembly64.asm.

We have decided to use consecutive even/odd pairs of GPRs for every
type of wasm values, even if they are 32bit (i32/f32), with the odd
(higher) numbered GPR holding the more significant half. 32bit values
are held in the even (lower) numbered register. This makes the code
much simpler and allows us to share more code with the 64bit variant.
This is mostly relevant for argument passing, and given that every
value ends up in the stack anyway we do not think it is significant
from a performance POV.

We are reusing JSValueRegs to hold Wasm values too. Obviously they
are not really JSValues, so it might make sense to create a base
class that can be used for both JS and Wasm values.

We do not have enough registers to keep things like the memory
base pointer and size in pinned registers, so we are forced to
load them on each use.

We disable the 'Signaling' memory mode, since the current
implementation relies on being able to mprotect a 232 + redzone
region of memory. This can be changed in the future but it's not a
priority at the moment.

  • stress/sampling-profiler-wasm-name-section.js:
  • stress/sampling-profiler-wasm.js:
  • wasm/regress/llint-callee-saves-with-fast-memory.js:
  • CMakeLists.txt:
  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::vcvt_signedToFloatingPoint):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::convertInt32ToFloat):
(JSC::MacroAssemblerARMv7::threadSafePatchableNearCall):
(JSC::MacroAssemblerARMv7::callOperation):

  • b3/B3ValueRep.h:

(JSC::B3::ValueRep::ValueRep):

  • bytecode/BytecodeDumper.cpp:

(JSC::Wasm::BytecodeDumper::formatConstant const):

  • interpreter/CallFrame.h: adapt to new callee tagging format.

(JSC::CallFrame::callee const):
(JSC::CallFrame::unsafeCallee const):

  • interpreter/CalleeBits.h: add wasm tagging of callee values for

32bit.
(JSC::CalleeBits::CalleeBits):
(JSC::CalleeBits::operator=):
(JSC::CalleeBits::boxWasm):
(JSC::CalleeBits::isWasm const):
(JSC::CalleeBits::asWasmCallee const):

  • interpreter/Register.h:

(JSC::Register::unboxedFloat const):
(JSC::Register::asanUnsafeUnboxedFloat const):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::unboxDouble):

  • jit/RegisterAtOffsetList.cpp:

(JSC::RegisterAtOffsetList::RegisterAtOffsetList):

  • jit/RegisterAtOffsetList.h:

(JSC::RegisterAtOffsetList::sizeOfAreaInBytes const):

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::macroScratchRegisters):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/WebAssembly.asm:
  • llint/WebAssembly32_64.asm: Added.
  • llint/WebAssembly64.asm: Added.
  • offlineasm/arm.rb:
  • offlineasm/instructions.rb:
  • offlineasm/registers.rb:
  • offlineasm/risc.rb:
  • runtime/JSCJSValue.h:

(JSC::wasmUnboxedFloat):

  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::JSValue):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::useSignalingMemory const):
(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::AirIRGenerator::addCall):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::useSignalingMemory const):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addArguments):
(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::B3IRGenerator::memoryKind):
(JSC::Wasm::B3IRGenerator::addCall):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/WasmCallee.cpp:

(JSC::Wasm::LLIntCallee::calleeSaveRegisters):

  • wasm/WasmCalleeGroup.cpp:

(JSC::Wasm::CalleeGroup::isSafeToRun):

  • wasm/WasmCallingConvention.cpp:

(JSC::Wasm::jsCallingConvention):
(JSC::Wasm::wasmCallingConvention):

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallInformation::computeResultsOffsetList):
(JSC::Wasm::WasmCallingConvention::WasmCallingConvention):
(JSC::Wasm::WasmCallingConvention::marshallLocationImpl const):
(JSC::Wasm::WasmCallingConvention::marshallLocation const):
(JSC::Wasm::JSCallingConvention::JSCallingConvention):
(JSC::Wasm::JSCallingConvention::marshallLocationImpl const):
(JSC::Wasm::JSCallingConvention::marshallLocation const):
(JSC::Wasm::JSCallingConvention::callInformationFor const):

  • wasm/WasmFormat.h:
  • wasm/WasmIndexOrName.cpp:

(JSC::Wasm::IndexOrName::IndexOrName):
(JSC::Wasm::makeString):

  • wasm/WasmIndexOrName.h:

(JSC::Wasm::IndexOrName::IndexOrName):
(JSC::Wasm::IndexOrName::isEmpty const):
(JSC::Wasm::IndexOrName::isIndex const):
(JSC::Wasm::IndexOrName::isName const):
(JSC::Wasm::IndexOrName::index const):
(JSC::Wasm::IndexOrName::name const):
(JSC::Wasm::IndexOrName::nameSection const):

  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::updateCachedMemory):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::virtualRegisterForWasmLocal):
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::callInformationForCallee):
(JSC::Wasm::LLIntGenerator::addArguments):
(JSC::Wasm::LLIntGenerator::addLoop):

  • wasm/WasmLLIntPlan.cpp:

(JSC::Wasm::LLIntPlan::didCompleteCompilation):

  • wasm/WasmMemory.cpp:

(JSC::Wasm::MemoryHandle::~MemoryHandle):
(JSC::Wasm::Memory::tryCreate):
(JSC::Wasm::Memory::growShared):
(JSC::Wasm::Memory::grow):
(JSC::Wasm::Memory::copy):

  • wasm/WasmMemory.h:
  • wasm/WasmMemoryInformation.cpp:

(JSC::Wasm::PinnedRegisterInfo::get):

  • wasm/WasmMemoryInformation.h:

(JSC::Wasm::PinnedRegisterInfo::toSave const):

  • wasm/WasmMemoryMode.cpp:

(JSC::Wasm::makeString):

  • wasm/WasmMemoryMode.h:
  • wasm/WasmOpcodeOrigin.cpp:
  • wasm/WasmOpcodeOrigin.h:
  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/WasmOperations.h:
  • wasm/WasmPageCount.h:
  • wasm/WasmParser.h:

(JSC::Wasm::Parser<SuccessType>::parseUInt32):
(JSC::Wasm::Parser<SuccessType>::parseUInt64):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::WASM_SLOW_PATH_DECL):
(JSC::LLInt::slow_path_wasm_popcount):
(JSC::LLInt::slow_path_wasm_popcountll):
(JSC::LLInt::slow_path_wasm_i32_div_s):
(JSC::LLInt::slow_path_wasm_i32_div_u):
(JSC::LLInt::slow_path_wasm_i32_rem_s):
(JSC::LLInt::slow_path_wasm_i32_rem_u):
(JSC::LLInt::slow_path_wasm_i64_div_s):
(JSC::LLInt::slow_path_wasm_i64_div_u):
(JSC::LLInt::slow_path_wasm_i64_rem_s):
(JSC::LLInt::slow_path_wasm_i64_rem_u):

  • wasm/WasmSlowPaths.h:
  • wasm/WasmValueLocation.cpp:

(JSC::Wasm::ValueLocation::dump const):
(WTF::printInternal):

  • wasm/WasmValueLocation.h:

(JSC::Wasm::ValueLocation::ValueLocation):
(JSC::Wasm::ValueLocation::isGPR const):
(JSC::Wasm::ValueLocation::isFPR const):
(JSC::Wasm::ValueLocation::isStack const):
(JSC::Wasm::ValueLocation::isStackArgument const):
(JSC::Wasm::ValueLocation::jsr const):
(JSC::Wasm::ValueLocation::fpr const):
(JSC::Wasm::ValueLocation::reg): Deleted.
(JSC::Wasm::ValueLocation::isReg const): Deleted.
(JSC::Wasm::ValueLocation::reg const): Deleted.
(JSC::Wasm::ValueLocation::gpr const): Deleted.

  • wasm/js/JSToWasm.cpp:

(JSC::Wasm::marshallJSResult):
(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::previousInstanceOffset const):
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::initializeExports):

  • wtf/PlatformEnable.h: enable WebAssembly on ARMv7.
  • Scripts/run-jsc-stress-tests: allow to run the wasm tests on

armv7 even without jit support (for now).

Canonical link: https://commits.webkit.org/251455@main

1:04 AM Changeset in webkit [295448] by Nikos Mouchtaris
  • 8 edits
    2 adds in trunk

REGRESSION: CSS scroll-behavior: smooth with overflow: hidden breaks JS scrollTo/scrollLeft/scrollTop
https://bugs.webkit.org/show_bug.cgi?id=238497
<rdar://90990040>

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

Note: See TracTimeline for information about the timeline view.