Share parsed CSS with @import across Declarative Shadow Roots [chromium/src : main]

0 views
Skip to first unread message

Helmut Januschka (Gerrit)

unread,
Apr 15, 2026, 6:06:59 PMApr 15
to Helmut Januschka, Noam Rosenthal, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, blink-re...@chromium.org, kinuko...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Noam Rosenthal

Helmut Januschka added 3 comments

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Helmut Januschka . resolved

@nrose...@google.com thanks in advance for review, i left a few open discussions, where i would like to have either confirmation that it's ok, or a idea how to refactor/change.

really appreciate any help, please let me know if you want me to change anything.

File third_party/blink/renderer/core/css/parser/css_parser_impl.cc
Line 768, Patchset 7 (Latest): if (!seen_rule && (rule || !base::FeatureList::IsEnabled(
Helmut Januschka . unresolved

without the exception to accept failed parsing of @charset the provided samplers failed.

```
@charset "utf-8"; clg-profile-avatar {
display: inline-block;
height: var(--clg-avatar-host-size, var(--clg-dimension-app-avatar-base-size, 48px));
width: var(--clg-avatar-host-size, var(--clg-dimension-app-avatar-base-size, 48px))
}

```
--> https://www.etsy.com/ac/sasquatch/css/collage/shadow.f976e51d0fc8f2.css

never used @charset, not sure why this fails to parse.

File third_party/blink/renderer/core/css/style_sheet_contents.cc
Line 119, Patchset 5: for (unsigned i = 0; i < import_rules_.size(); ++i) {
Helmut Januschka . unresolved
Nit: This indexed loop intentionally follows the pattern used by the surrounding loops in this file. guess it could be better like:
```cpp
base::ranges::transform(o.import_rules_, import_rules_.begin(),
[this](const auto& rule) { return rule->CopyForShareableSheet(this); });
```

but guess that should be done as a follow up?

Open in Gerrit

Related details

Attention is currently required from:
  • Noam Rosenthal
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iec3cad0d9b44c51e487ba349536d8d3b53602dfa
Gerrit-Change-Number: 7760117
Gerrit-PatchSet: 7
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Noam Rosenthal <nrose...@google.com>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Noam Rosenthal <nrose...@google.com>
Gerrit-Comment-Date: Wed, 15 Apr 2026 22:06:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Noam Rosenthal (Gerrit)

unread,
Apr 16, 2026, 9:10:55 AM (14 days ago) Apr 16
to Helmut Januschka, Anders Hartvoll Ruud, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-re...@chromium.org, kinuko...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Anders Hartvoll Ruud and Helmut Januschka

Noam Rosenthal added 2 comments

File third_party/blink/public/common/features.h
Line 252, Patchset 9 (Latest):BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kCSSImportedStyleSheetCaching);
Noam Rosenthal . unresolved

Make this a runtime_enabled_feature instead since it's blink only.

File third_party/blink/renderer/core/loader/resource/css_style_sheet_resource.cc
Line 236, Patchset 9 (Latest): SetParsedStyleSheetCache(nullptr);
Noam Rosenthal . unresolved

If this can only happen with the new flag, CHECK here for the flag being enabled.

Open in Gerrit

Related details

Attention is currently required from:
  • Anders Hartvoll Ruud
  • Helmut Januschka
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iec3cad0d9b44c51e487ba349536d8d3b53602dfa
Gerrit-Change-Number: 7760117
Gerrit-PatchSet: 9
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Noam Rosenthal <nrose...@google.com>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Comment-Date: Thu, 16 Apr 2026 13:10:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Helmut Januschka (Gerrit)

unread,
Apr 16, 2026, 3:38:57 PM (14 days ago) Apr 16
to Helmut Januschka, Anders Hartvoll Ruud, Noam Rosenthal, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-re...@chromium.org, kinuko...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Anders Hartvoll Ruud and Noam Rosenthal

Helmut Januschka added 2 comments

File third_party/blink/public/common/features.h
Line 252, Patchset 9 (Latest):BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kCSSImportedStyleSheetCaching);
Noam Rosenthal . resolved

Make this a runtime_enabled_feature instead since it's blink only.

Helmut Januschka

Done

File third_party/blink/renderer/core/loader/resource/css_style_sheet_resource.cc
Line 236, Patchset 9 (Latest): SetParsedStyleSheetCache(nullptr);
Noam Rosenthal . resolved

If this can only happen with the new flag, CHECK here for the flag being enabled.

Helmut Januschka

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Anders Hartvoll Ruud
  • Noam Rosenthal
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iec3cad0d9b44c51e487ba349536d8d3b53602dfa
Gerrit-Change-Number: 7760117
Gerrit-PatchSet: 9
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Noam Rosenthal <nrose...@google.com>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Attention: Noam Rosenthal <nrose...@google.com>
Gerrit-Comment-Date: Thu, 16 Apr 2026 19:38:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Noam Rosenthal <nrose...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Anders Hartvoll Ruud (Gerrit)

unread,
Apr 17, 2026, 7:01:12 AM (13 days ago) Apr 17
to Helmut Januschka, Noam Rosenthal, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, jmedle...@chromium.org, blink-re...@chromium.org, kinuko...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Helmut Januschka and Noam Rosenthal

Anders Hartvoll Ruud added 1 comment

Patchset-level comments
File-level comment, Patchset 10 (Latest):
Anders Hartvoll Ruud . unresolved

Sharing of StyleSheetContents has been a recurring source of bugs, some _extremely_ subtle and elusive, so any change in this area needs to be completely bulletproof.

As it stands now, and absent any explanation/plan/description, I struggle to see the cohesion and reasoning between the various changes in this CL.

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
  • Noam Rosenthal
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iec3cad0d9b44c51e487ba349536d8d3b53602dfa
Gerrit-Change-Number: 7760117
Gerrit-PatchSet: 10
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Noam Rosenthal <nrose...@google.com>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Attention: Noam Rosenthal <nrose...@google.com>
Gerrit-Comment-Date: Fri, 17 Apr 2026 11:00:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages