Skip to content

Revive fork changes for async context - #111

Merged
Jarred-Sumner merged 1 commit into
mainfrom
revive-async-context
Oct 1, 2025
Merged

Jarred-Sumner merged 1 commit into
mainfrom
revive-async-context

Conversation

@sosukesuzuki

Copy link
Copy Markdown
Member

#110 partially deleted fork changes for async context by accident.

This patch revives deleted part.

@Jarred-Sumner
Jarred-Sumner merged commit 6d0f3aa into main Oct 1, 2025
24 checks passed
@coderabbitai

coderabbitai Bot commented Oct 1, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Updated PromiseOperations.js to store promise reaction context as either a single context or a pair [context, asyncContext] when an async context is present, affecting creation and enqueueing of reactions. Public/exported declarations were also modified.

Changes

Cohort / File(s) Change Summary
Promise reaction context handling
Source/JavaScriptCore/builtins/PromiseOperations.js
Reactions now store either context or [context, asyncContext] based on asyncContext presence; applies to initial and subsequent reaction entries. Adjusted handling for enqueuing/processing reactions. Public/exported declarations altered.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revive-async-context

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a04a318 and 1ad8153.

📒 Files selected for processing (1)
  • Source/JavaScriptCore/builtins/PromiseOperations.js (2 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot mentioned this pull request Oct 3, 2025
Jarred-Sumner pushed a commit that referenced this pull request Sep 4, 2026
https://bugs.webkit.org/show_bug.cgi?id=322128
rdar://185355738

Reviewed by Antti Koivisto.

319240@main parses, computes and serializes the link-parameters property but does
not use the computed value, so it has no rendering effect. This PR makes it render
the parameters.

The most trivial form renders:
<style> img { link-parameters: param(--bg, green); } </style>
<img src="icon.svg"> <!-- icon.svg: fill="env(--bg, #111)" -->

There's a pre-existing architecture limitation: one resource
document (SVGImage) holds one container's parameters at a time, so
drawing restyles that document. We can reduce this cost by caching a
display list per container (webkit.org/b/322833) as a follow-up.

Tests: svg/css-link-params/link-parameters-background-image.html
       svg/css-link-params/link-parameters-basic.html
       svg/css-link-params/link-parameters-duplicate-name.html
       svg/css-link-params/link-parameters-dynamic.html
       svg/css-link-params/link-parameters-fallback.html
       svg/css-link-params/link-parameters-geometry.html
       svg/css-link-params/link-parameters-none.html
       svg/css-link-params/link-parameters-per-container.html

* LayoutTests/svg/css-link-params/link-parameters-background-image-expected.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-background-image.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-basic-expected.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-basic.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-duplicate-name-expected.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-duplicate-name.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-dynamic-expected.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-dynamic.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-fallback-expected.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-fallback.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-geometry-expected.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-geometry.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-none-expected.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-none.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-per-container-expected.html: Added.
* LayoutTests/svg/css-link-params/link-parameters-per-container.html: Added.
* LayoutTests/svg/css-link-params/resources/geometry.svg: Added.
* LayoutTests/svg/css-link-params/resources/solid.svg: Added.
* Source/WebCore/loader/cache/CachedImage.cpp:
(WebCore::CachedImage::switchClientsToRevalidatedResource):
(WebCore::CachedImage::setContainerContextForClient):
(WebCore::CachedImage::createImage):
* Source/WebCore/loader/cache/CachedImage.h:
* Source/WebCore/style/StyleDifference.cpp:
* Source/WebCore/style/StyleEnvironmentVariables.cpp:
(WebCore::Style::EnvironmentVariables::uaDefinedValues const):
(WebCore::Style::EnvironmentVariables::valueForName const):
(WebCore::Style::EnvironmentVariables::setLinkParameters):
(WebCore::Style::EnvironmentVariables::values const): Deleted.
* Source/WebCore/style/StyleEnvironmentVariables.h:
* Source/WebCore/style/StyleSubstitutionResolver.cpp:
(WebCore::Style::SubstitutionResolver::propertyValueForVariableName):
* Source/WebCore/style/values/images/kinds/StyleCachedImage.cpp:
(WebCore::Style::CachedImage::setContainerContextForRenderer):
* Source/WebCore/style/values/images/kinds/StyleCursorImage.cpp:
(WebCore::Style::CursorImage::setContainerContextForRenderer):
* Source/WebCore/svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::SVGImage):
(WebCore::SVGImage::drawForContainer):
(WebCore::SVGImage::applyLinkParameters):
(WebCore::SVGImage::drawPatternForContainer):
* Source/WebCore/svg/graphics/SVGImage.h:
* Source/WebCore/svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::setContainerContextForClient):
* Source/WebCore/svg/graphics/SVGImageCache.h:
* Source/WebCore/svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::SVGImageForContainer):
(WebCore::SVGImageForContainer::draw):
(WebCore::SVGImageForContainer::drawPattern):
* Source/WebCore/svg/graphics/SVGImageForContainer.h:

Canonical link: https://commits.webkit.org/320159@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants