[Fonts] Enforce per-document CSP on cached CSS subresources [chromium/src : main]

1 view
Skip to first unread message

Dileep Maurya (Gerrit)

unread,
May 22, 2026, 7:29:36 AMMay 22
to Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
Attention needed from Divyansh Mangal and Gaurav Kumar

Dileep Maurya voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Divyansh Mangal
  • Gaurav Kumar
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • 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: Ib7fa806f0616e82cda4ce7517f61f61d46c75edb
Gerrit-Change-Number: 7867457
Gerrit-PatchSet: 5
Gerrit-Owner: Dileep Maurya <dileep...@microsoft.com>
Gerrit-Reviewer: Dileep Maurya <dileep...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Gaurav Kumar <gaur...@microsoft.com>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
Gerrit-CC: Virali Purbey <virali...@microsoft.com>
Gerrit-Attention: Gaurav Kumar <gaur...@microsoft.com>
Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Comment-Date: Fri, 22 May 2026 11:29:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Gaurav Kumar (Gerrit)

unread,
May 25, 2026, 6:01:21 AMMay 25
to Dileep Maurya, Divyansh Mangal, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
Attention needed from Dileep Maurya and Divyansh Mangal

Gaurav Kumar added 4 comments

File third_party/blink/renderer/core/css/css_font_face_src_value.cc
Line 162, Patchset 5 (Latest): // Fall through to a fresh fetch; do not overwrite `fetched_` so that
// other documents sharing this value still get a cache hit.
Gaurav Kumar . unresolved

Move it after line 165.

Line 199, Patchset 5 (Parent): // FIXME: CSSFontFaceSrcValue::Fetch is invoked when @font-face rule
// is processed by StyleResolver / StyleEngine.
Gaurav Kumar . unresolved

Is it fixed ? if not please add this comment.

Line 166, Patchset 5 (Latest): const CSSUrlData& url_data = src_value_->UrlData();
const CSSUrlRequestModifiers& modifiers = url_data.GetModifiers();
const Referrer& referrer = url_data.GetReferrer();
ResourceRequest resource_request(url_data.ResolvedUrl());

if (modifiers.referrer_policy) {
resource_request.SetReferrerPolicy(*modifiers.referrer_policy);
} else {
resource_request.SetReferrerPolicy(
ReferrerUtils::MojoReferrerPolicyResolveDefault(
referrer.referrer_policy));
}
resource_request.SetReferrerString(referrer.referrer);

if (url_data.IsAdRelated()) {
resource_request.SetIsAdResource();
}
ResourceLoaderOptions options(world_);
options.initiator_info.name = fetch_initiator_type_names::kCSS;
if (referrer.referrer != Referrer::ClientReferrerString()) {
options.initiator_info.referrer = referrer.referrer;
}
FetchParameters params(std::move(resource_request), options);
if (base::FeatureList::IsEnabled(
features::kWebFontsCacheAwareTimeoutAdaption)) {
params.SetCacheAwareLoadingEnabled(kIsCacheAwareLoadingEnabled);
}
params.SetFromOriginDirtyStyleSheet(!url_data.IsFromOriginCleanStyleSheet());
const SecurityOrigin* security_origin = context->GetSecurityOrigin();

// Local fonts are accessible from file: URLs even when
// allowFileAccessFromFileURLs is false.
if (!params.Url().IsLocalFile()) {
CrossOriginAttributeValue cross_origin =
modifiers.cross_origin != kCrossOriginAttributeNotSet
? modifiers.cross_origin
: kCrossOriginAttributeAnonymous;
params.SetCrossOriginAccessControl(security_origin, cross_origin);
}

if (!modifiers.integrity.IsNull()) {
IntegrityMetadataSet metadata_set;
SubresourceIntegrity::ParseIntegrityAttribute(modifiers.integrity,
metadata_set, context);
params.SetIntegrityMetadata(metadata_set);
params.MutableResourceRequest().SetFetchIntegrity(modifiers.integrity,
context);
}
Gaurav Kumar . unresolved

Can we add this in else block ?
Also since this code is not changed can you format is so that only the diff is visible while review.

Line 219, Patchset 5 (Latest): return *fresh;
Gaurav Kumar . unresolved

return *fetched_

Open in Gerrit

Related details

Attention is currently required from:
  • Dileep Maurya
  • Divyansh Mangal
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: Ib7fa806f0616e82cda4ce7517f61f61d46c75edb
    Gerrit-Change-Number: 7867457
    Gerrit-PatchSet: 5
    Gerrit-Owner: Dileep Maurya <dileep...@microsoft.com>
    Gerrit-Reviewer: Dileep Maurya <dileep...@microsoft.com>
    Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Reviewer: Gaurav Kumar <gaur...@microsoft.com>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
    Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
    Gerrit-CC: Virali Purbey <virali...@microsoft.com>
    Gerrit-Attention: Dileep Maurya <dileep...@microsoft.com>
    Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Comment-Date: Mon, 25 May 2026 10:00:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Gaurav Kumar (Gerrit)

    unread,
    May 25, 2026, 6:54:24 AMMay 25
    to Dileep Maurya, Divyansh Mangal, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
    Attention needed from Dileep Maurya and Divyansh Mangal

    Gaurav Kumar added 2 comments

    File third_party/blink/renderer/core/css/css_font_face_src_value.cc
    Line 146, Patchset 5 (Latest): // A StyleSheetContents (and the CSSFontFaceSrcValues it owns) is shared
    // across documents in the same renderer process via the MemoryCache.
    // Re-run the current document's security checks (CSP, etc.) before
    // surfacing a previously-fetched FontResource so this document is not
    // handed a resource that its own policies would have blocked.
    Gaurav Kumar . unresolved

    NIT: We can remove the HOW part from above comment.

    File third_party/blink/renderer/core/css/resolver/element_style_resources.cc
    Line 238, Patchset 5 (Latest): // The cached image is shared via a memory-cached StyleSheetContents
    // across documents with different CSPs; reject it for this document
    // without clearing the shared cache.
    Gaurav Kumar . unresolved

    NIT : IMO we do not need it. It is evident from the like 235.

    Gerrit-Comment-Date: Mon, 25 May 2026 10:53:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vinay Singh (Gerrit)

    unread,
    May 25, 2026, 7:05:47 AMMay 25
    to Dileep Maurya, Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
    Attention needed from Dileep Maurya and Divyansh Mangal

    Vinay Singh added 2 comments

    Commit Message
    Line 31, Patchset 5 (Latest):http/tests/security/contentSecurityPolicy/font-src/.
    Vinay Singh . unresolved

    Consider wrapping this inside backticks.

    ```suggestion
    `http/tests/security/contentSecurityPolicy/font-src/`
    ```

    File third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
    Line 3105, Patchset 5 (Latest): // We already fired DevTools / violation-report events on this fetcher for
    // this resource. Re-run CanRequest with reporting suppressed so callers
    // surfacing a cached resource still get the current verdict without
    // duplicating reports.
    Vinay Singh . unresolved

    This function here need not understand what has happened before it.

    ```suggestion
    // Re-run CanRequest with reporting suppressed so callers surfacing a
    // cached resource still get the current verdict without duplicating
    // reports.
    ```
    Gerrit-Comment-Date: Mon, 25 May 2026 11:05:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Divyansh Mangal (Gerrit)

    unread,
    May 25, 2026, 3:07:03 PMMay 25
    to Dileep Maurya, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
    Attention needed from Dileep Maurya

    Divyansh Mangal added 1 comment

    File third_party/blink/renderer/core/css/css_font_face_src_value.cc
    Gaurav Kumar . unresolved

    return *fetched_

    Divyansh Mangal

    I think when CSP is set (or condition at L:216 return false) shouldn't a fresh reload of the resource should be returned (IIUC thats the security bug)? that is isn't the current code already captures it correctly?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dileep Maurya
    Gerrit-Comment-Date: Mon, 25 May 2026 19:06:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Gaurav Kumar <gaur...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Divyansh Mangal (Gerrit)

    unread,
    May 25, 2026, 3:07:35 PMMay 25
    to Dileep Maurya, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
    Attention needed from Dileep Maurya

    Divyansh Mangal added 1 comment

    Patchset-level comments
    File-level comment, Patchset 5 (Latest):
    Divyansh Mangal . resolved

    Moving myself to CC but the plumbing logic looks sound

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dileep Maurya
    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: Ib7fa806f0616e82cda4ce7517f61f61d46c75edb
    Gerrit-Change-Number: 7867457
    Gerrit-PatchSet: 5
    Gerrit-Owner: Dileep Maurya <dileep...@microsoft.com>
    Gerrit-Reviewer: Dileep Maurya <dileep...@microsoft.com>
    Gerrit-Reviewer: Gaurav Kumar <gaur...@microsoft.com>
    Gerrit-CC: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
    Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
    Gerrit-CC: Virali Purbey <virali...@microsoft.com>
    Gerrit-Attention: Dileep Maurya <dileep...@microsoft.com>
    Gerrit-Comment-Date: Mon, 25 May 2026 19:07:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Divyansh Mangal (Gerrit)

    unread,
    May 25, 2026, 3:47:26 PMMay 25
    to Dileep Maurya, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
    Attention needed from Dileep Maurya

    Divyansh Mangal added 5 comments

    File third_party/blink/renderer/core/css/css_font_face_src_value.cc
    Line 215, Patchset 5 (Latest): FontResource* fresh = FontResource::Fetch(params, context->Fetcher(), client);
    Divyansh Mangal . unresolved

    When `RestoreCachedResourceIfNeeded()` returns a blocked reason (reporting the violation), the fall-through to `FontResource::Fetch()` will re-enter the path

    `RequestResource()` -> `PrepareResourceRequestForCacheAccess()` -> `CanRequest(..., kReport)`, which fires a second `securitypolicyviolation` event for the same resource. (Please correct me if I am wrong here)

    Could we either suppress reporting on the fallback fetch (e.g. via `params.SetSpeculativePreload()` or a dedicated suppress flag), or skip the fetch entirely and return an error `FontResource` directly?

    Divyansh Mangal . unresolved

    nit: Add DCHECK(fresh); before return *fresh; to encode the non-null invariant locally.

    File third_party/blink/renderer/core/css/css_image_value.cc
    Line 112, Patchset 5 (Latest):StyleImage* CSSImageValue::CacheImage(
    const Document& document,
    CrossOriginAttributeValue cross_origin,
    const float override_image_resolution) {
    if (!cached_image_) {
    const CSSUrlData& url_data = UrlData();
    if (url_data.ResolvedUrl().empty()) {
    url_data.ReResolveUrl(document);
    }

    FetchParameters params = PrepareFetch(document, cross_origin);
    ImageResourceContent* image_content =
    document.GetStyleEngine().CacheImageContent(params);
    cached_image_ = MakeGarbageCollected<StyleFetchedImage>(
    image_content, *url_data.MakeResolvedIfDanglingMarkup(document),
    document,
    params.Url(), override_image_resolution);
    }
    return cached_image_.Get();
    Divyansh Mangal . unresolved
    `CacheImage()` returns `cached_image_` without any per-document CSP check when it's already populated. This means `cross-fade()` and `image-set()`, which always go through `StyleImageLoader::Load()` → `CacheImage()`, can still serve a cached image from a permissive-CSP document to a strict-CSP document, bypassing the new enforcement.

    Consider adding a CSP revalidation here when `cached_image_` already exists, similar to how `CachedStyleImage()` now calls `RestoreCachedResourceIfNeeded()`. Something like:

    ```
    if (cached_image_) {
    auto blocked = RestoreCachedResourceIfNeeded(document);
    if (blocked) return nullptr;
    return cached_image_.Get();
    }
    ```
    File third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
    Line 3112, Patchset 5 (Latest): return Context().CanRequest(resource->GetType(), last_resource_request,
    last_resource_request.Url(), silent_options,
    ReportingDisposition::kSuppressReporting,
    last_resource_request.GetRedirectInfo());
    Divyansh Mangal . unresolved

    Re-running `CanRequest(..., kSuppressReporting)` on the "already-emulated" path happens on every style recalc for elements using @font-face. For pages with many cached fonts, this adds per-recalc overhead.

    Not blocking, but worth considering whether the result could be memoized per-fetcher if this shows up in profiles. (Maybe a TODO can be added?)

    File third_party/blink/web_tests/http/tests/security/contentSecurityPolicy/font-src/shared-stylesheet-cache-bypass.html
    Line 1, Patchset 5 (Latest):<!doctype html>
    Divyansh Mangal . unresolved

    Should we extend coverage by considering below cases too?

      1. Consider adding a test for `img-src` / `background-image` via a shared stylesheet to cover the `CachedStyleImage()` returning `nullptr` path.
    2. Consider triggering the font lookup twice in the strict iframe to exercise the "already-emulated" path and verify no duplicate violation event fires.
    3. Optional: add a third iframe (permissive CSP) after the strict one, to prove that blocking in one document doesn't poison the shared cache for later allowed documents.
    Gerrit-Comment-Date: Mon, 25 May 2026 19:46:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Virali Purbey (Gerrit)

    unread,
    May 26, 2026, 2:57:10 AMMay 26
    to Dileep Maurya, Divyansh Mangal, Gaurav Kumar, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
    Attention needed from Dileep Maurya

    Virali Purbey added 2 comments

    File third_party/blink/renderer/core/css/css_font_face_src_value.cc
    Line 215, Patchset 5 (Latest): FontResource* fresh = FontResource::Fetch(params, context->Fetcher(), client);
    Virali Purbey . unresolved

    If the strict-CSP document loads this stylesheet first (before any permissive one), `fetched_` is null, `!fetched_` is true, `fetched_` gets set to the blocked/errored `FontResource`. A later permissive document would then reuse that errored resource. Could we guard with `if (fresh && !fresh->ErrorOccurred())` before writing to `fetched_`? Might be wrong here, happy to be corrected.

    File third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
    Line 3096, Patchset 5 (Latest): if (CachedResource(url)) {
    return std::nullopt;
    }

    if (resource->ErrorOccurred()) {
    return std::nullopt;
    }

    if (ResourceHasBeenEmulatedLoadStartedForInspector(url)) {
    Virali Purbey . unresolved

    nit: this swaps the `ErrorOccurred` / "already-emulated" check order from the old code, makes sense since the emulated path now calls `CanRequest`. Maybe a one-liner comment like `// Bail on error before the emulated path to avoid a needless CanRequest` will be nice?

    Gerrit-Comment-Date: Tue, 26 May 2026 06:56:43 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dileep Maurya (Gerrit)

    unread,
    Jun 1, 2026, 10:33:13 AMJun 1
    to Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
    Attention needed from Divyansh Mangal, Gaurav Kumar, Vinay Singh and Virali Purbey

    Dileep Maurya added 15 comments

    Commit Message
    Line 31, Patchset 5:http/tests/security/contentSecurityPolicy/font-src/.
    Vinay Singh . resolved

    Consider wrapping this inside backticks.

    ```suggestion
    `http/tests/security/contentSecurityPolicy/font-src/`
    ```

    Dileep Maurya

    Done

    File third_party/blink/renderer/core/css/css_font_face_src_value.cc
    Line 146, Patchset 5: // A StyleSheetContents (and the CSSFontFaceSrcValues it owns) is shared

    // across documents in the same renderer process via the MemoryCache.
    // Re-run the current document's security checks (CSP, etc.) before
    // surfacing a previously-fetched FontResource so this document is not
    // handed a resource that its own policies would have blocked.
    Gaurav Kumar . resolved

    NIT: We can remove the HOW part from above comment.

    Dileep Maurya

    Done.

    Line 162, Patchset 5: // Fall through to a fresh fetch; do not overwrite `fetched_` so that

    // other documents sharing this value still get a cache hit.
    Gaurav Kumar . resolved

    Move it after line 165.

    Dileep Maurya

    Done. After restoring the original `if/else` structure, the fall-through comment now sits directly above the `return *fetch_from_network(`) in the blocked branch, where the no-overwrite behavior actually happens.

    Line 199, Patchset 5 (Parent): // FIXME: CSSFontFaceSrcValue::Fetch is invoked when @font-face rule
    // is processed by StyleResolver / StyleEngine.
    Gaurav Kumar . resolved

    Is it fixed ? if not please add this comment.

    Dileep Maurya

    Done. Restored the FIXME above the cached-path branch.

    Line 166, Patchset 5: const CSSUrlData& url_data = src_value_->UrlData();
    Gaurav Kumar . resolved

    Can we add this in else block ?
    Also since this code is not changed can you format is so that only the diff is visible while review.

    Dileep Maurya

    Done. Restored the original `if (!fetched_) { fresh } else { cached }` structure. Extracted the fresh-fetch body into a local `fetch_from_network` lambda so the blocked-CSP path can reuse it without duplicating code.

    Line 215, Patchset 5: FontResource* fresh = FontResource::Fetch(params, context->Fetcher(), client);
    Divyansh Mangal . resolved

    When `RestoreCachedResourceIfNeeded()` returns a blocked reason (reporting the violation), the fall-through to `FontResource::Fetch()` will re-enter the path

    `RequestResource()` -> `PrepareResourceRequestForCacheAccess()` -> `CanRequest(..., kReport)`, which fires a second `securitypolicyviolation` event for the same resource. (Please correct me if I am wrong here)

    Could we either suppress reporting on the fallback fetch (e.g. via `params.SetSpeculativePreload()` or a dedicated suppress flag), or skip the fetch entirely and return an error `FontResource` directly?

    Dileep Maurya

    Confirmed and fixed. `RestoreCachedResourceIfNeeded()` is now called with `ReportingDisposition::kSuppressReporting`, so only the fall-back `FontResource::Fetch()` reports. Verified by `result.violationCount == 1` even though the strict iframe calls `document.fonts.load()` twice.

    Line 215, Patchset 5: FontResource* fresh = FontResource::Fetch(params, context->Fetcher(), client);
    Virali Purbey . resolved

    If the strict-CSP document loads this stylesheet first (before any permissive one), `fetched_` is null, `!fetched_` is true, `fetched_` gets set to the blocked/errored `FontResource`. A later permissive document would then reuse that errored resource. Could we guard with `if (fresh && !fresh->ErrorOccurred())` before writing to `fetched_`? Might be wrong here, happy to be corrected.

    Dileep Maurya

    Good catch - added `if (!fresh->ErrorOccurred()) fetched_ = fresh;`. New regression test `shared-stylesheet-cache-bypass-strict-first.html` covers exactly this ordering.

    Line 219, Patchset 5: return *fresh;
    Divyansh Mangal . resolved

    nit: Add DCHECK(fresh); before return *fresh; to encode the non-null invariant locally.

    Dileep Maurya

    Done

    Line 219, Patchset 5: return *fresh;
    Gaurav Kumar . resolved

    return *fetched_

    Divyansh Mangal

    I think when CSP is set (or condition at L:216 return false) shouldn't a fresh reload of the resource should be returned (IIUC thats the security bug)? that is isn't the current code already captures it correctly?

    Dileep Maurya

    Yes, that's exactly what happens, but I agree the previous structure obscured it. After the restructure, the blocked-CSP path explicitly does return `*fetch_from_network()`, which issues a fresh fetch that the loader's `CanRequest` will properly block for this document.

    File third_party/blink/renderer/core/css/css_image_value.cc
    Line 112, Patchset 5:StyleImage* CSSImageValue::CacheImage(

    const Document& document,
    CrossOriginAttributeValue cross_origin,
    const float override_image_resolution) {
    if (!cached_image_) {
    const CSSUrlData& url_data = UrlData();
    if (url_data.ResolvedUrl().empty()) {
    url_data.ReResolveUrl(document);
    }

    FetchParameters params = PrepareFetch(document, cross_origin);
    ImageResourceContent* image_content =
    document.GetStyleEngine().CacheImageContent(params);
    cached_image_ = MakeGarbageCollected<StyleFetchedImage>(
    image_content, *url_data.MakeResolvedIfDanglingMarkup(document),
    document,
    params.Url(), override_image_resolution);
    }
    return cached_image_.Get();
    Divyansh Mangal . resolved
    `CacheImage()` returns `cached_image_` without any per-document CSP check when it's already populated. This means `cross-fade()` and `image-set()`, which always go through `StyleImageLoader::Load()` → `CacheImage()`, can still serve a cached image from a permissive-CSP document to a strict-CSP document, bypassing the new enforcement.

    Consider adding a CSP revalidation here when `cached_image_` already exists, similar to how `CachedStyleImage()` now calls `RestoreCachedResourceIfNeeded()`. Something like:

    ```
    if (cached_image_) {
    auto blocked = RestoreCachedResourceIfNeeded(document);
    if (blocked) return nullptr;
    return cached_image_.Get();
    }
    ```
    Dileep Maurya

    Done. Added the symmetric CSP check at the top of `CacheImage()`.
    Note: I return a freshly-fetched (loader-blocked) `StyleFetchedImage` instead of `nullptr`, because callers like `EnsureSVGResource()` and `LoadMaskSource()'s` `To<StyleFetchedImage>(...)` non-null cast crash on `null`. Functionally equivalent, no bytes leak and the loader still fires the CSP report.

    File third_party/blink/renderer/core/css/resolver/element_style_resources.cc
    Line 238, Patchset 5: // The cached image is shared via a memory-cached StyleSheetContents

    // across documents with different CSPs; reject it for this document
    // without clearing the shared cache.
    Gaurav Kumar . resolved

    NIT : IMO we do not need it. It is evident from the like 235.

    Dileep Maurya

    Done.

    File third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
    Line 3096, Patchset 5: if (CachedResource(url)) {

    return std::nullopt;
    }

    if (resource->ErrorOccurred()) {
    return std::nullopt;
    }

    if (ResourceHasBeenEmulatedLoadStartedForInspector(url)) {
    Virali Purbey . resolved

    nit: this swaps the `ErrorOccurred` / "already-emulated" check order from the old code, makes sense since the emulated path now calls `CanRequest`. Maybe a one-liner comment like `// Bail on error before the emulated path to avoid a needless CanRequest` will be nice?

    Dileep Maurya

    Done

    Line 3105, Patchset 5: // We already fired DevTools / violation-report events on this fetcher for

    // this resource. Re-run CanRequest with reporting suppressed so callers
    // surfacing a cached resource still get the current verdict without
    // duplicating reports.
    Vinay Singh . resolved

    This function here need not understand what has happened before it.

    ```suggestion
    // Re-run CanRequest with reporting suppressed so callers surfacing a
    // cached resource still get the current verdict without duplicating
    // reports.
    ```
    Dileep Maurya

    Done

    Line 3112, Patchset 5: return Context().CanRequest(resource->GetType(), last_resource_request,

    last_resource_request.Url(), silent_options,
    ReportingDisposition::kSuppressReporting,
    last_resource_request.GetRedirectInfo());
    Divyansh Mangal . resolved

    Re-running `CanRequest(..., kSuppressReporting)` on the "already-emulated" path happens on every style recalc for elements using @font-face. For pages with many cached fonts, this adds per-recalc overhead.

    Not blocking, but worth considering whether the result could be memoized per-fetcher if this shows up in profiles. (Maybe a TODO can be added?)

    Dileep Maurya

    Done. added TODO(crbug.com/504107363) noting we should memoize per-fetcher if profiles flag it.

    File third_party/blink/web_tests/http/tests/security/contentSecurityPolicy/font-src/shared-stylesheet-cache-bypass.html
    Line 1, Patchset 5:<!doctype html>
    Divyansh Mangal . resolved

    Should we extend coverage by considering below cases too?

      1. Consider adding a test for `img-src` / `background-image` via a shared stylesheet to cover the `CachedStyleImage()` returning `nullptr` path.
    2. Consider triggering the font lookup twice in the strict iframe to exercise the "already-emulated" path and verify no duplicate violation event fires.
    3. Optional: add a third iframe (permissive CSP) after the strict one, to prove that blocking in one document doesn't poison the shared cache for later allowed documents.
    Dileep Maurya

    Thanks for your comment here. All three case added:
    1. `img-src/shared-stylesheet-image-cache-bypass.html`: `img-src/background-image` via shared stylesheet.
    2. `shared-stylesheet-cache-bypass-strict.html` now loads the font twice; main test asserts violationCount == 1.
    3. `shared-stylesheet-cache-bypass-strict-first.html`: strict iframe first, permissive second; asserts the permissive iframe still loads the font (no cache poisoning).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Divyansh Mangal
    • Gaurav Kumar
    • Vinay Singh
    • Virali Purbey
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • 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: Ib7fa806f0616e82cda4ce7517f61f61d46c75edb
      Gerrit-Change-Number: 7867457
      Gerrit-PatchSet: 11
      Gerrit-Owner: Dileep Maurya <dileep...@microsoft.com>
      Gerrit-Reviewer: Dileep Maurya <dileep...@microsoft.com>
      Gerrit-Reviewer: Gaurav Kumar <gaur...@microsoft.com>
      Gerrit-CC: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
      Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
      Gerrit-CC: Virali Purbey <virali...@microsoft.com>
      Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
      Gerrit-Attention: Gaurav Kumar <gaur...@microsoft.com>
      Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
      Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Comment-Date: Mon, 01 Jun 2026 14:33:00 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Vinay Singh <vinay...@microsoft.com>
      Comment-In-Reply-To: Gaurav Kumar <gaur...@microsoft.com>
      Comment-In-Reply-To: Virali Purbey <virali...@microsoft.com>
      Comment-In-Reply-To: Divyansh Mangal <dma...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dileep Maurya (Gerrit)

      unread,
      Jun 1, 2026, 2:08:45 PMJun 1
      to Kevin Babbitt, Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
      Attention needed from Divyansh Mangal, Gaurav Kumar, Kevin Babbitt, Vinay Singh and Virali Purbey

      Dileep Maurya voted Commit-Queue+1

      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Divyansh Mangal
      • Gaurav Kumar
      • Kevin Babbitt
      • Vinay Singh
      • Virali Purbey
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • 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: Ib7fa806f0616e82cda4ce7517f61f61d46c75edb
      Gerrit-Change-Number: 7867457
      Gerrit-PatchSet: 11
      Gerrit-Owner: Dileep Maurya <dileep...@microsoft.com>
      Gerrit-Reviewer: Dileep Maurya <dileep...@microsoft.com>
      Gerrit-Reviewer: Gaurav Kumar <gaur...@microsoft.com>
      Gerrit-Reviewer: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
      Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
      Gerrit-CC: Virali Purbey <virali...@microsoft.com>
      Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
      Gerrit-Attention: Gaurav Kumar <gaur...@microsoft.com>
      Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
      Gerrit-Attention: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Comment-Date: Mon, 01 Jun 2026 18:08:15 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Kevin Babbitt (Gerrit)

      unread,
      Jun 1, 2026, 7:24:38 PMJun 1
      to Dileep Maurya, Yoav Weiss (@Shopify), Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
      Attention needed from Dileep Maurya, Divyansh Mangal, Gaurav Kumar, Vinay Singh, Virali Purbey and Yoav Weiss (@Shopify)

      Kevin Babbitt added 3 comments

      Patchset-level comments
      File-level comment, Patchset 11 (Latest):
      Kevin Babbitt . resolved

      General shape seems okay to me, but I think someone with Fetch expertise should also have a look. yoavweiss@ would that be you?

      File third_party/blink/renderer/core/css/css_image_value.cc
      Line 117, Patchset 11 (Latest): if (cached_image_) {
      // Suppress the emulated report: on block, the fall-back fetch below fires
      // its own CSP violation report via the loader's CanRequest.
      if (RestoreCachedResourceIfNeeded(
      document, ReportingDisposition::kSuppressReporting)) {
      // Fall through to a fresh fetch without overwriting `cached_image_` so
      // other documents that legally share this value still get a cache hit.
      } else {
      return cached_image_.Get();
      }
      }
      Kevin Babbitt . unresolved

      Suggest simplifying this to:

      ```suggestion
      if (cached_image_) {
      // Suppress the emulated report: on block, the fall-back fetch below fires
      // its own CSP violation report via the loader's CanRequest.
      if (!RestoreCachedResourceIfNeeded(
      document, ReportingDisposition::kSuppressReporting)) {
      return cached_image_.Get();
      }
      // Otherwise, continue to a fresh fetch without overwriting `cached_image_`
      // so other documents that legally share this value still get a cache hit.
      }
      ```
      File third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
      Line 3104, Patchset 11 (Latest): // TODO(crbug.com/504107363): Runs on every style recalc for cached
      // fonts/images; consider memoizing per-fetcher if it shows up in profiles.
      ResourceRequest last_resource_request(resource->LastResourceRequest());
      Kevin Babbitt . unresolved

      Can you clarify this? Does "Runs on every style recalc" mean...
      ... runs once per document-wide style recalc pass?
      ... runs once per style recalc for an element that references the resource?
      ... something else?

      Style recalc is a hot path, so if we think this is going to be slow, I think it's worth considering whether we should jump straight to memoization. Do we have any benchmarking to understand the cost?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dileep Maurya
      • Divyansh Mangal
      • Gaurav Kumar
      • Vinay Singh
      • Virali Purbey
      • Yoav Weiss (@Shopify)
      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: Ib7fa806f0616e82cda4ce7517f61f61d46c75edb
        Gerrit-Change-Number: 7867457
        Gerrit-PatchSet: 11
        Gerrit-Owner: Dileep Maurya <dileep...@microsoft.com>
        Gerrit-Reviewer: Dileep Maurya <dileep...@microsoft.com>
        Gerrit-Reviewer: Gaurav Kumar <gaur...@microsoft.com>
        Gerrit-Reviewer: Kevin Babbitt <kbab...@microsoft.com>
        Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
        Gerrit-CC: Divyansh Mangal <dma...@microsoft.com>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
        Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
        Gerrit-CC: Virali Purbey <virali...@microsoft.com>
        Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
        Gerrit-Attention: Gaurav Kumar <gaur...@microsoft.com>
        Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
        Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
        Gerrit-Attention: Dileep Maurya <dileep...@microsoft.com>
        Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
        Gerrit-Comment-Date: Mon, 01 Jun 2026 23:24:25 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Yoav Weiss (@Shopify) (Gerrit)

        unread,
        Jun 2, 2026, 2:56:58 AMJun 2
        to Dileep Maurya, Kevin Babbitt, Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
        Attention needed from Dileep Maurya, Divyansh Mangal, Gaurav Kumar, Vinay Singh and Virali Purbey

        Yoav Weiss (@Shopify) added 2 comments

        File third_party/blink/renderer/core/css/css_font_face_src_value.cc
        Line 197, Patchset 11 (Latest): FontResource* fresh =
        Yoav Weiss (@Shopify) . unresolved

        The logic flow here is very confusing. Can you stick to the original form of setting `fetched_` and returning it, while adding the new CSP logic?

        Line 199, Patchset 11 (Latest): DCHECK(fresh);
        Yoav Weiss (@Shopify) . unresolved

        `CHECK` instead of `DCHECK`?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Dileep Maurya
        • Divyansh Mangal
        • Gaurav Kumar
        • Vinay Singh
        • Virali Purbey
        Gerrit-Attention: Dileep Maurya <dileep...@microsoft.com>
        Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
        Gerrit-Comment-Date: Tue, 02 Jun 2026 06:56:35 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Dileep Maurya (Gerrit)

        unread,
        Jun 11, 2026, 9:52:35 AM (8 days ago) Jun 11
        to android-bu...@system.gserviceaccount.com, Yoav Weiss (@Shopify), Kevin Babbitt, Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, mkwst+w...@chromium.org, blink-revi...@chromium.org, antoniosarto...@chromium.org, arthursonzog...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
        Attention needed from Divyansh Mangal, Gaurav Kumar, Kevin Babbitt, Vinay Singh, Virali Purbey and Yoav Weiss (@Shopify)

        Dileep Maurya added 4 comments

        File third_party/blink/renderer/core/css/css_font_face_src_value.cc
        Line 197, Patchset 11: FontResource* fresh =
        Yoav Weiss (@Shopify) . resolved

        The logic flow here is very confusing. Can you stick to the original form of setting `fetched_` and returning it, while adding the new CSP logic?

        Dileep Maurya

        Done

        Line 199, Patchset 11: DCHECK(fresh);
        Yoav Weiss (@Shopify) . resolved

        `CHECK` instead of `DCHECK`?

        Dileep Maurya

        Done

        File third_party/blink/renderer/core/css/css_image_value.cc
        Line 117, Patchset 11: if (cached_image_) {

        // Suppress the emulated report: on block, the fall-back fetch below fires
        // its own CSP violation report via the loader's CanRequest.
        if (RestoreCachedResourceIfNeeded(
        document, ReportingDisposition::kSuppressReporting)) {
        // Fall through to a fresh fetch without overwriting `cached_image_` so
        // other documents that legally share this value still get a cache hit.
        } else {
        return cached_image_.Get();
        }
        }
        Kevin Babbitt . resolved

        Suggest simplifying this to:

        ```suggestion
        if (cached_image_) {
        // Suppress the emulated report: on block, the fall-back fetch below fires
        // its own CSP violation report via the loader's CanRequest.
        if (!RestoreCachedResourceIfNeeded(
        document, ReportingDisposition::kSuppressReporting)) {
        return cached_image_.Get();
        }
        // Otherwise, continue to a fresh fetch without overwriting `cached_image_`
        // so other documents that legally share this value still get a cache hit.
        }
        ```
        Dileep Maurya

        Done

        File third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
        Line 3104, Patchset 11: // TODO(crbug.com/504107363): Runs on every style recalc for cached

        // fonts/images; consider memoizing per-fetcher if it shows up in profiles.
        ResourceRequest last_resource_request(resource->LastResourceRequest());
        Kevin Babbitt . resolved

        Can you clarify this? Does "Runs on every style recalc" mean...
        ... runs once per document-wide style recalc pass?
        ... runs once per style recalc for an element that references the resource?
        ... something else?

        Style recalc is a hot path, so if we think this is going to be slow, I think it's worth considering whether we should jump straight to memoization. Do we have any benchmarking to understand the cost?

        Dileep Maurya

        1. "Runs on every style recalc" frequency:

        • Font path (`CSSFontFaceSrcValue::Fetch`): once per FontFace init. Callers are `FontFace::InitCSSFontFace` and `FrameSerializer::RetrieveResourcesForCSSValue`. Not per style recalc.
        • Image path (`CSSImageValue::RestoreCachedResourceIfNeeded`): once per (element, image-using property) per recalc that resolves a non-pending `CSSImageValue`. Reached via `StyleImageLoader::Load`, `LoadMaskSource`, and directly from `CachedStyleImage`.

        2. Benchmarks (two data points, Win11 x64):

        • Infrastructure-only microbench (`MockFetchContext, 100k iters`): ~187 ns / call for the cached branch.
        • Real-world cost (WPT `shared-stylesheet-cache-bypass.html`, real CSP): ~234 µs / call (dominated by `Context().CanRequest(...)'s` policy walk).
        • So the per-recalc image-path cost in the cross-doc cache scenario is roughly `N × M × 234 µs` (N image-using properties × M elements). 10 elements would consume ~2.3 ms of frame budget; 100 elements would overflow it.

        As per analysis locally, memoization was needed - added the memoization in this CL.

        • Combined with the earlier WPT-measured `~234 µs per real-CSP CanRequest`, steady-state cost for cross-document cache hits collapses from `N × M × 234 µs` to `N × M × ~106 ns`, with one ~234 µs catch-up per (URL, CSP-version) change.
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Divyansh Mangal
        • Gaurav Kumar
        • Kevin Babbitt
        • Vinay Singh
        • Virali Purbey
        • Yoav Weiss (@Shopify)
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • 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: Ib7fa806f0616e82cda4ce7517f61f61d46c75edb
            Gerrit-Change-Number: 7867457
            Gerrit-PatchSet: 13
            Gerrit-Owner: Dileep Maurya <dileep...@microsoft.com>
            Gerrit-Reviewer: Dileep Maurya <dileep...@microsoft.com>
            Gerrit-Reviewer: Gaurav Kumar <gaur...@microsoft.com>
            Gerrit-Reviewer: Kevin Babbitt <kbab...@microsoft.com>
            Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
            Gerrit-CC: Divyansh Mangal <dma...@microsoft.com>
            Gerrit-CC: Menard, Alexis <alexis...@intel.com>
            Gerrit-CC: Nate Chapin <jap...@chromium.org>
            Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
            Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
            Gerrit-CC: Virali Purbey <virali...@microsoft.com>
            Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
            Gerrit-Attention: Gaurav Kumar <gaur...@microsoft.com>
            Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
            Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
            Gerrit-Attention: Kevin Babbitt <kbab...@microsoft.com>
            Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
            Gerrit-Comment-Date: Thu, 11 Jun 2026 13:52:02 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Yoav Weiss (@Shopify) <yoav...@chromium.org>
            Comment-In-Reply-To: Kevin Babbitt <kbab...@microsoft.com>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Dileep Maurya (Gerrit)

            unread,
            Jun 12, 2026, 5:15:01 AM (7 days ago) Jun 12
            to android-bu...@system.gserviceaccount.com, Yoav Weiss (@Shopify), Kevin Babbitt, Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, mkwst+w...@chromium.org, blink-revi...@chromium.org, antoniosarto...@chromium.org, arthursonzog...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
            Attention needed from Divyansh Mangal, Gaurav Kumar, Kevin Babbitt, Vinay Singh, Virali Purbey and Yoav Weiss (@Shopify)

            Dileep Maurya added 1 comment

            Patchset-level comments
            Gerrit-Comment-Date: Fri, 12 Jun 2026 09:14:34 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Kevin Babbitt (Gerrit)

            unread,
            Jun 12, 2026, 1:11:44 PM (6 days ago) Jun 12
            to Dileep Maurya, android-bu...@system.gserviceaccount.com, Yoav Weiss (@Shopify), Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, mkwst+w...@chromium.org, blink-revi...@chromium.org, antoniosarto...@chromium.org, arthursonzog...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
            Attention needed from Dileep Maurya, Divyansh Mangal, Gaurav Kumar, Vinay Singh, Virali Purbey and Yoav Weiss (@Shopify)

            Kevin Babbitt voted and added 1 comment

            Votes added by Kevin Babbitt

            Code-Review+1

            1 comment

            File third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
            Line 3107, Patchset 13 (Latest): const String cache_key = MemoryCache::RemoveFragmentIdentifierIfNeeded(url);
            Kevin Babbitt . unresolved

            It's strange that we added a test for this code but the coverage result is showing it as "not covered." Though the entire change is showing 0% coverage so maybe it's an issue with the bot. Could you please double-check to confirm that this code is actually being exercised by the test?

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Dileep Maurya
            • Divyansh Mangal
            • Gaurav Kumar
            • Vinay Singh
            • Virali Purbey
            • Yoav Weiss (@Shopify)
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not satisfiedCode-Owners
                • requirement satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                Gerrit-Attention: Dileep Maurya <dileep...@microsoft.com>
                Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
                Gerrit-Comment-Date: Fri, 12 Jun 2026 17:11:25 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Dileep Maurya (Gerrit)

                unread,
                Jun 15, 2026, 5:34:25 AM (4 days ago) Jun 15
                to Kevin Babbitt, android-bu...@system.gserviceaccount.com, Yoav Weiss (@Shopify), Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, mkwst+w...@chromium.org, blink-revi...@chromium.org, antoniosarto...@chromium.org, arthursonzog...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
                Attention needed from Divyansh Mangal, Gaurav Kumar, Vinay Singh, Virali Purbey and Yoav Weiss (@Shopify)

                Dileep Maurya added 1 comment

                File third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
                Line 3107, Patchset 13 (Latest): const String cache_key = MemoryCache::RemoveFragmentIdentifierIfNeeded(url);
                Kevin Babbitt . resolved

                It's strange that we added a test for this code but the coverage result is showing it as "not covered." Though the entire change is showing 0% coverage so maybe it's an issue with the bot. Could you please double-check to confirm that this code is actually being exercised by the test?

                Dileep Maurya

                Thanks for the review Kevin. I ran `ResourceFetcherTestBase.EmulateLoadStartedForInspectorMemoizesUntilCspChanges` test and verified it locally. The memoization code get executed as expected. The Gerrit Coverage tab reads 0% what it looks to be `*-code-coverage` tryjobs failing for infrastructure reasons unrelated to this CL.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Divyansh Mangal
                • Gaurav Kumar
                • Vinay Singh
                • Virali Purbey
                • Yoav Weiss (@Shopify)
                Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement is not satisfiedCode-Owners
                  • requirement satisfiedCode-Review
                  • requirement satisfiedReview-Enforcement
                  Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
                  Gerrit-Comment-Date: Mon, 15 Jun 2026 09:33:54 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Kevin Babbitt <kbab...@microsoft.com>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Dileep Maurya (Gerrit)

                  unread,
                  Jun 16, 2026, 1:17:55 AM (3 days ago) Jun 16
                  to Kevin Babbitt, android-bu...@system.gserviceaccount.com, Yoav Weiss (@Shopify), Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, mkwst+w...@chromium.org, blink-revi...@chromium.org, antoniosarto...@chromium.org, arthursonzog...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
                  Attention needed from Divyansh Mangal, Gaurav Kumar, Vinay Singh, Virali Purbey and Yoav Weiss (@Shopify)

                  Dileep Maurya added 1 comment

                  Patchset-level comments
                  Dileep Maurya . resolved

                  yoav...@chromium.org can you PTAL!

                  Gerrit-Comment-Date: Tue, 16 Jun 2026 05:17:28 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Dileep Maurya (Gerrit)

                  unread,
                  2:05 AM (21 hours ago) 2:05 AM
                  to Kevin Babbitt, android-bu...@system.gserviceaccount.com, Yoav Weiss (@Shopify), Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, mkwst+w...@chromium.org, blink-revi...@chromium.org, antoniosarto...@chromium.org, arthursonzog...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
                  Attention needed from Divyansh Mangal, Gaurav Kumar, Vinay Singh, Virali Purbey and Yoav Weiss (@Shopify)

                  Dileep Maurya added 1 comment

                  Patchset-level comments
                  Dileep Maurya . resolved

                  yoav...@chromium.org can you PTAL!

                  Dileep Maurya

                  yoav...@chromium.org gentle ping on this. Please take a look when you have a chance. Thanks!

                  Gerrit-Comment-Date: Thu, 18 Jun 2026 06:04:57 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Dileep Maurya <dileep...@microsoft.com>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Yoav Weiss (@Shopify) (Gerrit)

                  unread,
                  5:20 AM (17 hours ago) 5:20 AM
                  to Dileep Maurya, Kevin Babbitt, android-bu...@system.gserviceaccount.com, Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, mkwst+w...@chromium.org, blink-revi...@chromium.org, antoniosarto...@chromium.org, arthursonzog...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
                  Attention needed from Dileep Maurya, Divyansh Mangal, Gaurav Kumar, Vinay Singh and Virali Purbey

                  Yoav Weiss (@Shopify) added 1 comment

                  File third_party/blink/renderer/core/css/css_font_face_src_value.cc
                  Line 209, Patchset 13 (Latest): } else if (RestoreCachedResourceIfNeeded(
                  Yoav Weiss (@Shopify) . unresolved

                  It's confusing that this returns a value only on failure. Can you consider renaming this method to make that obvious, or take that value into a variable that makes that clearer?

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Dileep Maurya
                  • Divyansh Mangal
                  • Gaurav Kumar
                  • Vinay Singh
                  • Virali Purbey
                    Submit Requirements:
                      • requirement satisfiedCode-Coverage
                      • requirement is not satisfiedCode-Owners
                      • requirement satisfiedCode-Review
                      • requirement is not satisfiedNo-Unresolved-Comments
                      • requirement satisfiedReview-Enforcement
                      Gerrit-Attention: Dileep Maurya <dileep...@microsoft.com>
                      Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
                      Gerrit-Comment-Date: Thu, 18 Jun 2026 09:20:32 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Dileep Maurya (Gerrit)

                      unread,
                      8:33 AM (14 hours ago) 8:33 AM
                      to Kevin Babbitt, android-bu...@system.gserviceaccount.com, Yoav Weiss (@Shopify), Divyansh Mangal, Gaurav Kumar, Virali Purbey, Sejal Anand, Vinay Singh, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, mkwst+w...@chromium.org, blink-revi...@chromium.org, antoniosarto...@chromium.org, arthursonzog...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org
                      Attention needed from Divyansh Mangal, Gaurav Kumar, Vinay Singh, Virali Purbey and Yoav Weiss (@Shopify)

                      Dileep Maurya voted and added 1 comment

                      Votes added by Dileep Maurya

                      Commit-Queue+1

                      1 comment

                      File third_party/blink/renderer/core/css/css_font_face_src_value.cc
                      Line 209, Patchset 13: } else if (RestoreCachedResourceIfNeeded(
                      Yoav Weiss (@Shopify) . resolved

                      It's confusing that this returns a value only on failure. Can you consider renaming this method to make that obvious, or take that value into a variable that makes that clearer?

                      Dileep Maurya

                      Thanks for pointing this out. I've updated the method name to make it obvious, PTAL!

                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Divyansh Mangal
                      • Gaurav Kumar
                      • Vinay Singh
                      • Virali Purbey
                      • Yoav Weiss (@Shopify)
                      Submit Requirements:
                        • requirement satisfiedCode-Coverage
                        • requirement is not satisfiedCode-Owners
                        • requirement satisfiedCode-Review
                        • requirement 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: Ib7fa806f0616e82cda4ce7517f61f61d46c75edb
                        Gerrit-Change-Number: 7867457
                        Gerrit-PatchSet: 14
                        Gerrit-Owner: Dileep Maurya <dileep...@microsoft.com>
                        Gerrit-Reviewer: Dileep Maurya <dileep...@microsoft.com>
                        Gerrit-Reviewer: Gaurav Kumar <gaur...@microsoft.com>
                        Gerrit-Reviewer: Kevin Babbitt <kbab...@microsoft.com>
                        Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
                        Gerrit-CC: Divyansh Mangal <dma...@microsoft.com>
                        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
                        Gerrit-CC: Nate Chapin <jap...@chromium.org>
                        Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
                        Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
                        Gerrit-CC: Virali Purbey <virali...@microsoft.com>
                        Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
                        Gerrit-Attention: Gaurav Kumar <gaur...@microsoft.com>
                        Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
                        Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
                        Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
                        Gerrit-Comment-Date: Thu, 18 Jun 2026 12:32:40 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy
                        Reply all
                        Reply to author
                        Forward
                        0 new messages