Move inline CSS to fix blob iframe CSP errors [chromium/src : main]

0 views
Skip to first unread message

Olga Korokhina (Gerrit)

unread,
Oct 17, 2025, 8:32:11 AMOct 17
to Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, andy...@google.com, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath and Simon Hangl

Olga Korokhina added 1 comment

Commit Message
Line 7, Patchset 7:Change moves inline css classes causing CSP error for iFrame
Simon Hangl . resolved

nit: usually we try to provide 1-line headings

Olga Korokhina

I failed to squeeze all the context in one line, let's keep it as an exception this way, some of reviewers are not involved in bugs related discussions so we need as much context as we can have.

Chris Thompson

Suggestion: "Move inline CSS to fix blob iframe CSP errors" (and then move this full sentence into the description perhaps)

Olga Korokhina

Addressed, thank you!

Open in Gerrit

Related details

Attention is currently required from:
  • Abigail Klein
  • Chris Thompson
  • Nico Weber
  • Robbie McElrath
  • Simon Hangl
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: I98abb62b8a6ec8557e4dae34bb665c478b279806
Gerrit-Change-Number: 7031803
Gerrit-PatchSet: 9
Gerrit-Owner: Olga Korokhina <koro...@google.com>
Gerrit-Reviewer: Abigail Klein <abigai...@google.com>
Gerrit-Reviewer: Chris Thompson <cth...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Olga Korokhina <koro...@google.com>
Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
Gerrit-Reviewer: Simon Hangl <sim...@google.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Alexis Menard <alexis...@intel.com>
Gerrit-CC: James Maclean <wjma...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Kevin McNee <mc...@chromium.org>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-Attention: Robbie McElrath <rmce...@chromium.org>
Gerrit-Attention: Chris Thompson <cth...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Attention: Abigail Klein <abigai...@google.com>
Gerrit-Attention: Simon Hangl <sim...@google.com>
Gerrit-Comment-Date: Fri, 17 Oct 2025 12:31:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Chris Thompson <cth...@chromium.org>
Comment-In-Reply-To: Simon Hangl <sim...@google.com>
Comment-In-Reply-To: Olga Korokhina <koro...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Olga Korokhina (Gerrit)

unread,
Oct 17, 2025, 9:30:30 AMOct 17
to Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, andy...@google.com, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath and Simon Hangl

Olga Korokhina added 1 comment

File third_party/blink/renderer/core/html/resources/html.css
Line 1565, Patchset 7:pre.wrap-pre {
Abigail Klein . resolved

I don't think it's a good idea to have a class name in this official css file. That would affect developers who use this same class name.

Olga Korokhina

How would you recommend to have this selector?

Olga Korokhina

@abigai...@google.com I've replaced class with name and made it less like to be used by someone outside, chrome#wrap-pre . How to you think if this is a) the right direction? 2) enough unique name?

Gerrit-Comment-Date: Fri, 17 Oct 2025 13:30:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Abigail Klein <abigai...@google.com>
Comment-In-Reply-To: Olga Korokhina <koro...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Olga Korokhina (Gerrit)

unread,
Oct 17, 2025, 9:32:36 AMOct 17
to Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, andy...@google.com, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath and Simon Hangl

Olga Korokhina added 1 comment

File components/webapps/isolated_web_apps/url_loading/url_loader_factory.cc
Line 87, Patchset 5: "style-src 'self';"
Olga Korokhina . resolved

This left here for the purpose of testing for one who wants to fetch and try the CL, will be reverted before merge.

Olga Korokhina

Tests are failing because of this, once we revert it tests will go fine.

Olga Korokhina

Set to proper value, ready to merge.

Open in Gerrit

Related details

Attention is currently required from:
  • Abigail Klein
  • Chris Thompson
  • Nico Weber
  • Robbie McElrath
  • Simon Hangl
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: I98abb62b8a6ec8557e4dae34bb665c478b279806
    Gerrit-Change-Number: 7031803
    Gerrit-PatchSet: 10
    Gerrit-Owner: Olga Korokhina <koro...@google.com>
    Gerrit-Reviewer: Abigail Klein <abigai...@google.com>
    Gerrit-Reviewer: Chris Thompson <cth...@chromium.org>
    Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
    Gerrit-Reviewer: Olga Korokhina <koro...@google.com>
    Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: James Maclean <wjma...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Kevin McNee <mc...@chromium.org>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-Attention: Robbie McElrath <rmce...@chromium.org>
    Gerrit-Attention: Chris Thompson <cth...@chromium.org>
    Gerrit-Attention: Nico Weber <tha...@chromium.org>
    Gerrit-Attention: Abigail Klein <abigai...@google.com>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Comment-Date: Fri, 17 Oct 2025 13:32:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Olga Korokhina <koro...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Rune Lillesveen (Gerrit)

    unread,
    Oct 20, 2025, 7:47:21 AMOct 20
    to Olga Korokhina, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, andy...@google.com, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
    Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

    Rune Lillesveen added 4 comments

    File content/test/data/accessibility/html/long-text.html
    Line 2, Patchset 10 (Parent):<pre style="word-wrap: break-word; white-space: pre-wrap;"><script>
    Rune Lillesveen . unresolved

    This is an html file being loaded, not a text file, so why would this test be relevant for this change?

    File third_party/blink/renderer/core/html/parser/text_document_parser.cc
    Line 72, Patchset 10 (Latest): Attribute(html_names::kNameAttr, AtomicString("chrome#wrap-pre")));
    Rune Lillesveen . unresolved

    Would adding this to `<head>` also be stopped by the CSP?:

    `<style>pre { word-wrap: break-word; white-space: pre-wrap }</style>`

    If so, an alternative is to have a separate text document UA stylesheet.

    File third_party/blink/renderer/core/html/resources/html.css
    Line 1565, Patchset 10 (Latest):pre[name="chrome#wrap-pre"] {
    Rune Lillesveen . unresolved

    This will affect styling of author html document that would happen to use pre name="chrome#wrap-pre".

    File third_party/blink/web_tests/accessibility/long-text.html
    Line 4, Patchset 10 (Parent):<pre id="pre" style="word-wrap: break-word; white-space: pre-wrap;"><script>
    Rune Lillesveen . unresolved

    This is an html file being loaded, not a text file, so why would this test be relevant for this change?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Abigail Klein
    • Chris Thompson
    • Nico Weber
    • Olga Korokhina
    • Robbie McElrath
    • Simon Hangl
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Gerrit-CC: Rune Lillesveen <fut...@chromium.org>
      Gerrit-Attention: Robbie McElrath <rmce...@chromium.org>
      Gerrit-Attention: Chris Thompson <cth...@chromium.org>
      Gerrit-Attention: Nico Weber <tha...@chromium.org>
      Gerrit-Attention: Abigail Klein <abigai...@google.com>
      Gerrit-Attention: Simon Hangl <sim...@google.com>
      Gerrit-Attention: Olga Korokhina <koro...@google.com>
      Gerrit-Comment-Date: Mon, 20 Oct 2025 11:47:04 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Abigail Klein (Gerrit)

      unread,
      Oct 20, 2025, 11:00:39 AMOct 20
      to Olga Korokhina, Rune Lillesveen, Nico Weber, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, andy...@google.com, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
      Attention needed from Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath, Rune Lillesveen and Simon Hangl

      Abigail Klein added 1 comment

      File third_party/blink/renderer/core/html/parser/text_document_parser.cc
      Line 72, Patchset 10 (Latest): Attribute(html_names::kNameAttr, AtomicString("chrome#wrap-pre")));
      Rune Lillesveen . unresolved

      Would adding this to `<head>` also be stopped by the CSP?:

      `<style>pre { word-wrap: break-word; white-space: pre-wrap }</style>`

      If so, an alternative is to have a separate text document UA stylesheet.

      Abigail Klein
      +1. We should not be modifying the common resource `html.css` for this task, but I think we can address this in other ways. Otherwise, would it be possible to addd a CSP exception? e.g.
      ```
      source->OverrideContentSecurityPolicy(
      network::mojom::CSPDirectiveName::StyleSrc,
      "style-src 'self' chrome-untrusted://resources 'word-wrap';");
      ```
      You would have to replace chrome-untrusted://resources with the correct origin.
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Chris Thompson
      • Nico Weber
      • Olga Korokhina
      • Robbie McElrath
      • Rune Lillesveen
      • Simon Hangl
      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: I98abb62b8a6ec8557e4dae34bb665c478b279806
      Gerrit-Change-Number: 7031803
      Gerrit-PatchSet: 10
      Gerrit-Owner: Olga Korokhina <koro...@google.com>
      Gerrit-Reviewer: Abigail Klein <abigai...@google.com>
      Gerrit-Reviewer: Chris Thompson <cth...@chromium.org>
      Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
      Gerrit-Reviewer: Olga Korokhina <koro...@google.com>
      Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
      Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
      Gerrit-Reviewer: Simon Hangl <sim...@google.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: James Maclean <wjma...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Kevin McNee <mc...@chromium.org>
      Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
      Gerrit-Attention: Robbie McElrath <rmce...@chromium.org>
      Gerrit-Attention: Chris Thompson <cth...@chromium.org>
      Gerrit-Attention: Nico Weber <tha...@chromium.org>
      Gerrit-Attention: Simon Hangl <sim...@google.com>
      Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
      Gerrit-Attention: Olga Korokhina <koro...@google.com>
      Gerrit-Comment-Date: Mon, 20 Oct 2025 15:00:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Rune Lillesveen <fut...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Olga Korokhina (Gerrit)

      unread,
      Oct 20, 2025, 12:09:41 PMOct 20
      to Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, andy...@google.com, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
      Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen and Simon Hangl

      Olga Korokhina added 2 comments

      File third_party/blink/renderer/core/html/parser/text_document_parser.cc
      Line 72, Patchset 10 (Latest): Attribute(html_names::kNameAttr, AtomicString("chrome#wrap-pre")));
      Rune Lillesveen . unresolved

      Would adding this to `<head>` also be stopped by the CSP?:

      `<style>pre { word-wrap: break-word; white-space: pre-wrap }</style>`

      If so, an alternative is to have a separate text document UA stylesheet.

      Abigail Klein
      +1. We should not be modifying the common resource `html.css` for this task, but I think we can address this in other ways. Otherwise, would it be possible to addd a CSP exception? e.g.
      ```
      source->OverrideContentSecurityPolicy(
      network::mojom::CSPDirectiveName::StyleSrc,
      "style-src 'self' chrome-untrusted://resources 'word-wrap';");
      ```
      You would have to replace chrome-untrusted://resources with the correct origin.
      Olga Korokhina
      Folks I am struggling to write down the <style>...<style>, nothing works, f.i.
      // Artificial <style> with styles removed from inline for <pre>.
      attributes.push_back(
      Attribute(html_names::kContentAttr,
      AtomicString("pre { word-wrap: break-word; white-space: pre-wrap }")));
      AtomicHTMLToken fake_style_start(HTMLToken::kStartTag, html_names::HTMLTag::kStyle);
      TreeBuilder()->ConstructTree(&fake_style_start);
        AtomicHTMLToken fake_style_content(HTMLToken::kComment, html_names::HTMLTag::kPlaintext, attributes);
        TreeBuilder()->ConstructTree(&fake_style_content);// set insertion mode to kTextMode?
        AtomicHTMLToken fake_style_end(HTMLToken::kEndTag, html_names::HTMLTag::kStyle);
      TreeBuilder()->ConstructTree(&fake_style_end);
      attributes.clear();

      Anyone knows how to do it?

      File third_party/blink/web_tests/accessibility/long-text.html
      Line 4, Patchset 10 (Parent):<pre id="pre" style="word-wrap: break-word; white-space: pre-wrap;"><script>
      Rune Lillesveen . unresolved

      This is an html file being loaded, not a text file, so why would this test be relevant for this change?

      Olga Korokhina

      I believe aim of a test is to have the match with generated one so have a selector and not a direct inline style here.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Abigail Klein
      • Chris Thompson
      • Nico Weber
      Gerrit-Attention: Abigail Klein <abigai...@google.com>
      Gerrit-Attention: Simon Hangl <sim...@google.com>
      Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
      Gerrit-Comment-Date: Mon, 20 Oct 2025 16:09:29 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Abigail Klein <abigai...@google.com>
      Comment-In-Reply-To: Rune Lillesveen <fut...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Rune Lillesveen (Gerrit)

      unread,
      Oct 20, 2025, 12:49:41 PMOct 20
      to Olga Korokhina, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, andy...@google.com, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
      Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

      Rune Lillesveen added 2 comments

      File third_party/blink/renderer/core/html/parser/text_document_parser.cc
      Rune Lillesveen
      Folks I am struggling to write down the <style>...<style>, nothing works, f.i.
      // Artificial <style> with styles removed from inline for <pre>.
      attributes.push_back(
      Attribute(html_names::kContentAttr,
      AtomicString("pre { word-wrap: break-word; white-space: pre-wrap }")));
      AtomicHTMLToken fake_style_start(HTMLToken::kStartTag, html_names::HTMLTag::kStyle);
      TreeBuilder()->ConstructTree(&fake_style_start);
        AtomicHTMLToken fake_style_content(HTMLToken::kComment, html_names::HTMLTag::kPlaintext, attributes);
        TreeBuilder()->ConstructTree(&fake_style_content);// set insertion mode to kTextMode?
        AtomicHTMLToken fake_style_end(HTMLToken::kEndTag, html_names::HTMLTag::kStyle);
      TreeBuilder()->ConstructTree(&fake_style_end);
      attributes.clear();

      Anyone knows how to do it?

      Not familiar with the html parser, but my guess is that you need something else than an AtomicHTMLToken since you need to open/close the style element with a text node child.

      File third_party/blink/web_tests/accessibility/long-text.html
      Line 4, Patchset 10 (Parent):<pre id="pre" style="word-wrap: break-word; white-space: pre-wrap;"><script>
      Rune Lillesveen . unresolved

      This is an html file being loaded, not a text file, so why would this test be relevant for this change?

      Olga Korokhina

      I believe aim of a test is to have the match with generated one so have a selector and not a direct inline style here.

      Rune Lillesveen

      Looking at the CL introducing this test, the bug seems to be about loading txt files directly: https://chromium-review.googlesource.com/c/chromium/src/+/1388552

      However, since this test is not a text file, you will not be able to pull in the txt file rendering style when the html.css styling is removed. I would leave these tests without any changes.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Abigail Klein
      • Chris Thompson
      • Nico Weber
      • Olga Korokhina
      • Robbie McElrath
      • Simon Hangl
      Gerrit-Attention: Olga Korokhina <koro...@google.com>
      Gerrit-Comment-Date: Mon, 20 Oct 2025 16:49:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Abigail Klein <abigai...@google.com>
      Comment-In-Reply-To: Rune Lillesveen <fut...@chromium.org>
      Comment-In-Reply-To: Olga Korokhina <koro...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Andy Phan (Gerrit)

      unread,
      Oct 20, 2025, 1:16:29 PMOct 20
      to Olga Korokhina, andy...@google.com, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
      Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

      Andy Phan removed andy...@google.com from this change

      Deleted Reviewers:
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Abigail Klein
      • Chris Thompson
      • Nico Weber
      • Olga Korokhina
      • Robbie McElrath
      • Simon Hangl
      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: deleteReviewer
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Olga Korokhina (Gerrit)

      unread,
      Oct 21, 2025, 7:34:16 AMOct 21
      to Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
      Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen and Simon Hangl

      Olga Korokhina added 2 comments

      File third_party/blink/renderer/core/html/parser/text_document_parser.cc
      Line 72, Patchset 10 (Latest): Attribute(html_names::kNameAttr, AtomicString("chrome#wrap-pre")));
      Rune Lillesveen . resolved
      Olga Korokhina

      I am able to generate <style> </style> (first and third AtomicHTMLToken in a sample code above) but not the plain text content inside...

      File third_party/blink/web_tests/accessibility/long-text.html
      Line 4, Patchset 10 (Parent):<pre id="pre" style="word-wrap: break-word; white-space: pre-wrap;"><script>
      Rune Lillesveen . resolved

      This is an html file being loaded, not a text file, so why would this test be relevant for this change?

      Olga Korokhina

      I believe aim of a test is to have the match with generated one so have a selector and not a direct inline style here.

      Rune Lillesveen

      Looking at the CL introducing this test, the bug seems to be about loading txt files directly: https://chromium-review.googlesource.com/c/chromium/src/+/1388552

      However, since this test is not a text file, you will not be able to pull in the txt file rendering style when the html.css styling is removed. I would leave these tests without any changes.

      Olga Korokhina

      Copy, thank you very much. So test is 'kinda artificial'.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Abigail Klein
      • Chris Thompson
      • Nico Weber
      • Robbie McElrath
      • Rune Lillesveen
      • Simon Hangl
      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-Attention: Rune Lillesveen <fut...@chromium.org>
      Gerrit-Comment-Date: Tue, 21 Oct 2025 11:33:59 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Olga Korokhina (Gerrit)

      unread,
      Oct 21, 2025, 12:23:52 PMOct 21
      to Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
      Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen and Simon Hangl

      Olga Korokhina added 1 comment

      File third_party/blink/renderer/core/html/parser/text_document_parser.cc
      Line 72, Patchset 10: Attribute(html_names::kNameAttr, AtomicString("chrome#wrap-pre")));
      Olga Korokhina

      UPD: failed to inject the plain text with the rules inside of the <style></style> block so moved this styles for <pre> to new blob.css file and adding it as
      <html><head><link rel="stylesheet" crossorigin="" href="chrome://resources/css/blob.css"><link rel="stylesheet" crossorigin="" href="blob.css"><meta name="color-scheme" content="light dark"></head><body><pre>...</pre></body></html>
      Is it a correct way to go, colleagues?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Abigail Klein
      • Chris Thompson
      • Nico Weber
      • Robbie McElrath
      • Rune Lillesveen
      • Simon Hangl
      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: I98abb62b8a6ec8557e4dae34bb665c478b279806
      Gerrit-Change-Number: 7031803
      Gerrit-PatchSet: 11
      Gerrit-Owner: Olga Korokhina <koro...@google.com>
      Gerrit-Reviewer: Abigail Klein <abigai...@google.com>
      Gerrit-Reviewer: Chris Thompson <cth...@chromium.org>
      Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
      Gerrit-Reviewer: Olga Korokhina <koro...@google.com>
      Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
      Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
      Gerrit-Reviewer: Simon Hangl <sim...@google.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: James Maclean <wjma...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Kevin McNee <mc...@chromium.org>
      Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
      Gerrit-Attention: Robbie McElrath <rmce...@chromium.org>
      Gerrit-Attention: Chris Thompson <cth...@chromium.org>
      Gerrit-Attention: Nico Weber <tha...@chromium.org>
      Gerrit-Attention: Abigail Klein <abigai...@google.com>
      Gerrit-Attention: Simon Hangl <sim...@google.com>
      Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
      Gerrit-Comment-Date: Tue, 21 Oct 2025 16:23:40 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Rune Lillesveen (Gerrit)

      unread,
      Oct 22, 2025, 3:07:14 AMOct 22
      to Olga Korokhina, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
      Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

      Rune Lillesveen added 2 comments

      File third_party/blink/renderer/core/html/parser/text_document_parser.cc
      Rune Lillesveen

      Inserting the source text should be possible if you ask someone who knows the HTML parser, but have you considered Abigail's proposal to handle this through a CSP override for text documents? That sounds simpler if it's safe.

      File third_party/blink/web_tests/accessibility/long-text.html
      Line 4, Patchset 10 (Parent):<pre id="pre" style="word-wrap: break-word; white-space: pre-wrap;"><script>
      Rune Lillesveen . resolved

      This is an html file being loaded, not a text file, so why would this test be relevant for this change?

      Olga Korokhina

      I believe aim of a test is to have the match with generated one so have a selector and not a direct inline style here.

      Rune Lillesveen

      Looking at the CL introducing this test, the bug seems to be about loading txt files directly: https://chromium-review.googlesource.com/c/chromium/src/+/1388552

      However, since this test is not a text file, you will not be able to pull in the txt file rendering style when the html.css styling is removed. I would leave these tests without any changes.

      Olga Korokhina

      Copy, thank you very much. So test is 'kinda artificial'.

      Rune Lillesveen

      No, it's not artificial, but whether the long text is from a text file or included in an html file is not really relevant to the underlying issue.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Abigail Klein
      • Chris Thompson
      • Nico Weber
      • Olga Korokhina
      • Robbie McElrath
      • Simon Hangl
      Gerrit-Attention: Olga Korokhina <koro...@google.com>
      Gerrit-Comment-Date: Wed, 22 Oct 2025 07:07:01 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Olga Korokhina (Gerrit)

      unread,
      Oct 22, 2025, 5:47:52 AMOct 22
      to Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
      Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen and Simon Hangl

      Olga Korokhina added 3 comments

      File content/test/data/accessibility/html/long-text.html
      Line 2, Patchset 10 (Parent):<pre style="word-wrap: break-word; white-space: pre-wrap;"><script>
      Rune Lillesveen . resolved

      This is an html file being loaded, not a text file, so why would this test be relevant for this change?

      Olga Korokhina

      Reverted, thank you. Because of this has an inline style I am trying to get rid of, technically if we have new rule in html.css and use the name of selector here - style should be applied.

      File third_party/blink/renderer/core/html/parser/text_document_parser.cc
      Olga Korokhina

      Yes, and this is exactly what we want to escape - we need csp headers remain strict, this is why we do all these changes, check out bug/336209144 . cth...@chromium.org please correct me if I am wrong.

      File third_party/blink/renderer/core/html/resources/html.css
      Line 1565, Patchset 10:pre[name="chrome#wrap-pre"] {
      Rune Lillesveen . resolved

      This will affect styling of author html document that would happen to use pre name="chrome#wrap-pre".

      Olga Korokhina

      This is indeed a problem so I've been trying to make name unique. Why I tend to put this new rule into this class it is it loaded and available always, and with attempt to put new rule in dedicated .css file I am getting 'can not load local resource' for IWA (where I need to fix the blob loading problem as a goal of these changes) as well as for plain html files, we can't load the chrome:// ... resource.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Abigail Klein
      • Chris Thompson
      • Nico Weber
      • Robbie McElrath
      • Rune Lillesveen
      • Simon Hangl
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
        Gerrit-Comment-Date: Wed, 22 Oct 2025 09:47:35 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Rune Lillesveen (Gerrit)

        unread,
        Oct 22, 2025, 6:09:53 AMOct 22
        to Olga Korokhina, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
        Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

        Rune Lillesveen added 1 comment

        File third_party/blink/renderer/core/html/parser/text_document_parser.cc
        Rune Lillesveen

        The content from the author is always just text, so what would be blocked by the CSP is styles injected by us. Unless it's possible to inject style from the author text document, why couldn't we override the CSP for text documents?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Abigail Klein
        • Chris Thompson
        • Nico Weber
        • Olga Korokhina
        • Robbie McElrath
        • Simon Hangl
        Gerrit-Attention: Olga Korokhina <koro...@google.com>
        Gerrit-Comment-Date: Wed, 22 Oct 2025 10:09:37 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        AI Code Reviewer (Gerrit)

        unread,
        Oct 23, 2025, 6:19:54 AMOct 23
        to Olga Korokhina, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
        Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

        AI Code Reviewer added 2 comments

        File third_party/blink/renderer/core/html/parser/text_document_parser.cc
        Line 60, Patchset 13 (Latest): AtomicHTMLToken link_style(HTMLToken::kStartTag,
        AI Code Reviewer . unresolved

        nit: The variable name `link_style` is a bit misleading as it represents a `<style>` element, not a `<link>` element. To improve clarity, please consider renaming it to something like `style_start_tag`. (Blink Style Guide: Naming)

        To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
        **Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason

        This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent).AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve.[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

        Line 73, Patchset 13 (Latest): AtomicHTMLToken link_style_2(HTMLToken::kEndTag,
        AI Code Reviewer . unresolved

        nit: The variable name `link_style_2` is not descriptive. To improve readability, please consider renaming it to something that better reflects its purpose, such as `style_end_tag`. (Blink Style Guide: Naming)

        To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
        **Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason

        This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent).AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve.[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Abigail Klein
        • Chris Thompson
        • Nico Weber
        • Olga Korokhina
        • Robbie McElrath
        • Simon Hangl
        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: I98abb62b8a6ec8557e4dae34bb665c478b279806
          Gerrit-Change-Number: 7031803
          Gerrit-PatchSet: 13
          Gerrit-Owner: Olga Korokhina <koro...@google.com>
          Gerrit-Reviewer: Abigail Klein <abigai...@google.com>
          Gerrit-Reviewer: Chris Thompson <cth...@chromium.org>
          Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
          Gerrit-Reviewer: Olga Korokhina <koro...@google.com>
          Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
          Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
          Gerrit-Reviewer: Simon Hangl <sim...@google.com>
          Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
          Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
          Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
          Gerrit-CC: Alexis Menard <alexis...@intel.com>
          Gerrit-CC: James Maclean <wjma...@chromium.org>
          Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
          Gerrit-CC: Kevin McNee <mc...@chromium.org>
          Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
          Gerrit-Attention: Robbie McElrath <rmce...@chromium.org>
          Gerrit-Attention: Chris Thompson <cth...@chromium.org>
          Gerrit-Attention: Nico Weber <tha...@chromium.org>
          Gerrit-Attention: Abigail Klein <abigai...@google.com>
          Gerrit-Attention: Simon Hangl <sim...@google.com>
          Gerrit-Attention: Olga Korokhina <koro...@google.com>
          Gerrit-Comment-Date: Thu, 23 Oct 2025 10:19:51 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Olga Korokhina (Gerrit)

          unread,
          Oct 23, 2025, 7:58:54 AMOct 23
          to Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
          Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen, Simon Hangl and Simon Hangl

          Olga Korokhina voted and added 1 comment

          Votes added by Olga Korokhina

          Commit-Queue+1

          1 comment

          File third_party/blink/renderer/core/html/parser/text_document_parser.cc
          Line 72, Patchset 10: Attribute(html_names::kNameAttr, AtomicString("chrome#wrap-pre")));
          Rune Lillesveen . unresolved
          Olga Korokhina

          I believe this wouldn't work: original set up is clients with strict CSP rules (self only) inside of Isolated Web App use the iFrame with blob text in src. Blob is rendered as text inside of a <pre> with inline style in this file so clients get CSP error. We can not add and use any of source files here (shipped with Chrome) like <link rel="style" ...> - local resources chrome:// will not be loaded (checked by adding here directly and in a header of an html file wrapping the texts). Another opportunity is clients add .css files with needed pre styling to their IWA (can access, passes through CSP) but the inline style here will override it and still cause the CSP error.
          So after many experiments I can say that the only working solution is move style to html.css so it be applied by StyleResolver as a rule with either class or name with highly unique string.
          As far as I understand styles applied in a order of first rules found in html.css,then client provided .css and and then some overrides in files like forced_colors.css. Potential clients affected by this (if they apparently have same name) will have an opportunity to fix it just by setting word-wrap and white-space to default value.
          So, I am very much pushing forward the solution with adding a rule into html.css. @fut...@chromium.org @abigai...@google.com @sim...@chromium.org , Are you fine with this?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Abigail Klein
          • Chris Thompson
          • Nico Weber
          • Robbie McElrath
          • Rune Lillesveen
          • Simon Hangl
          • Simon Hangl
          Gerrit-CC: Simon Hangl <sim...@chromium.org>
          Gerrit-Attention: Robbie McElrath <rmce...@chromium.org>
          Gerrit-Attention: Chris Thompson <cth...@chromium.org>
          Gerrit-Attention: Nico Weber <tha...@chromium.org>
          Gerrit-Attention: Abigail Klein <abigai...@google.com>
          Gerrit-Attention: Simon Hangl <sim...@chromium.org>
          Gerrit-Attention: Simon Hangl <sim...@google.com>
          Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Oct 2025 11:58:40 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Rune Lillesveen (Gerrit)

          unread,
          Oct 23, 2025, 8:10:13 AMOct 23
          to Olga Korokhina, Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
          Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath, Simon Hangl and Simon Hangl

          Rune Lillesveen added 1 comment

          File third_party/blink/renderer/core/html/parser/text_document_parser.cc
          Rune Lillesveen

          I believe this wouldn't work: original set up is clients with strict CSP rules (self only) inside of Isolated Web App use the iFrame with blob text in src. Blob is rendered as text inside of a <pre> with inline style in this file so clients get CSP error. We can not add and use any of source files here (shipped with Chrome) like <link rel="style" ...> - local resources chrome:// will not be loaded (checked by adding here directly and in a header of an html file wrapping the texts). Another opportunity is clients add .css files with needed pre styling to their IWA (can access, passes through CSP) but the inline style here will override it and still cause the CSP error.
          So after many experiments I can say that the only working solution is move style to html.css so it be applied by StyleResolver as a rule with either class or name with highly unique string.
          As far as I understand styles applied in a order of first rules found in html.css,then client provided .css and and then some overrides in files like forced_colors.css. Potential clients affected by this (if they apparently have same name) will have an opportunity to fix it just by setting word-wrap and white-space to default value.
          So, I am very much pushing forward the solution with adding a rule into html.css. @fut...@chromium.org @abigai...@google.com @sim...@chromium.org , Are you fine with this?

          No, and I don't understand why we cannot override the CSP (in C++) for TextDocument where we know all non-text content is generated by the browser.

          If a UA stylesheet is the only way, it is possible to create a separate sheet in CSSDefaultStyleSheets that is only applied to TextDocument.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Abigail Klein
          • Chris Thompson
          • Nico Weber
          • Olga Korokhina
          • Robbie McElrath
          • Simon Hangl
          • Simon Hangl
          Gerrit-Attention: Olga Korokhina <koro...@google.com>
          Gerrit-Comment-Date: Thu, 23 Oct 2025 12:09:57 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Olga Korokhina (Gerrit)

          unread,
          Oct 23, 2025, 9:01:03 AMOct 23
          to Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
          Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen, Simon Hangl and Simon Hangl

          Olga Korokhina added 1 comment

          File third_party/blink/renderer/core/html/parser/text_document_parser.cc
          Olga Korokhina

          I tried with the separate css and failed to integrate it - it shall not be included as <link ...> but somehow added to the scope of StyleResolver. Do you know where I can find a valid sample of how to do it? Thank you in advance!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Abigail Klein
          • Chris Thompson
          • Nico Weber
          • Robbie McElrath
          • Rune Lillesveen
          • Simon Hangl
          • Simon Hangl
          Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Oct 2025 13:00:45 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Olga Korokhina (Gerrit)

          unread,
          Oct 23, 2025, 9:05:13 AMOct 23
          to Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
          Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen, Simon Hangl and Simon Hangl

          Olga Korokhina added 2 comments

          File third_party/blink/renderer/core/html/parser/text_document_parser.cc
          Line 60, Patchset 13 (Latest): AtomicHTMLToken link_style(HTMLToken::kStartTag,
          AI Code Reviewer . resolved

          nit: The variable name `link_style` is a bit misleading as it represents a `<style>` element, not a `<link>` element. To improve clarity, please consider renaming it to something like `style_start_tag`. (Blink Style Guide: Naming)

          To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
          **Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason

          This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent).AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve.[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

          Olga Korokhina

          will be reverted, used for illustrative purpose.

          Line 73, Patchset 13 (Latest): AtomicHTMLToken link_style_2(HTMLToken::kEndTag,
          AI Code Reviewer . resolved

          nit: The variable name `link_style_2` is not descriptive. To improve readability, please consider renaming it to something that better reflects its purpose, such as `style_end_tag`. (Blink Style Guide: Naming)

          To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
          **Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason

          This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent).AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve.[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

          Olga Korokhina

          Used for illustrative purpose, will be reverted.

          Gerrit-Comment-Date: Thu, 23 Oct 2025 13:04:56 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Rune Lillesveen (Gerrit)

          unread,
          Oct 23, 2025, 9:05:56 AMOct 23
          to Olga Korokhina, Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
          Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath, Simon Hangl and Simon Hangl

          Rune Lillesveen added 1 comment

          File third_party/blink/renderer/core/html/parser/text_document_parser.cc
          Rune Lillesveen

          I tried with the separate css and failed to integrate it - it shall not be included as <link ...> but somehow added to the scope of StyleResolver. Do you know where I can find a valid sample of how to do it? Thank you in advance!

          Attention is currently required from:
          • Abigail Klein
          • Chris Thompson
          • Nico Weber
          • Olga Korokhina
          • Robbie McElrath
          • Simon Hangl
          • Simon Hangl
          Gerrit-Attention: Olga Korokhina <koro...@google.com>
          Gerrit-Comment-Date: Thu, 23 Oct 2025 13:05:43 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Olga Korokhina (Gerrit)

          unread,
          Oct 23, 2025, 9:13:08 AMOct 23
          to Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
          Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen, Simon Hangl and Simon Hangl

          Olga Korokhina added 1 comment

          File third_party/blink/renderer/core/html/parser/text_document_parser.cc
          Olga Korokhina

          Thank you for sharing the css_default_style_sheet, this clarifies how to add a style, how we determine the context is a text document so we can apply this style?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Abigail Klein
          • Chris Thompson
          • Nico Weber
          • Robbie McElrath
          • Rune Lillesveen
          • Simon Hangl
          • Simon Hangl
          Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Oct 2025 13:12:55 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Rune Lillesveen (Gerrit)

          unread,
          Oct 23, 2025, 10:57:17 AM (14 days ago) Oct 23
          to Olga Korokhina, Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
          Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath, Simon Hangl and Simon Hangl

          Rune Lillesveen added 1 comment

          File third_party/blink/renderer/core/html/parser/text_document_parser.cc
          Rune Lillesveen

          Allowing inline style seems to work with a local python http server that serves txt files with `style-src 'none'` (modulo nullptr checks):

          ```
          void TextDocumentParser::InsertFakePreElement() {
          GetDocument()->GetExecutionContext()->GetContentSecurityPolicy()->SetOverrideAllowInlineStyle(true);
          ```
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Abigail Klein
          • Chris Thompson
          • Nico Weber
          • Olga Korokhina
          • Robbie McElrath
          • Simon Hangl
          • Simon Hangl
          Gerrit-Attention: Olga Korokhina <koro...@google.com>
          Gerrit-Comment-Date: Thu, 23 Oct 2025 14:57:00 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Simon Hangl (Gerrit)

          unread,
          Oct 28, 2025, 6:20:05 AM (9 days ago) Oct 28
          to Olga Korokhina, Code Review Nudger, Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Chris Thompson, Robbie McElrath, AyeAye, Alexis Menard, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
          Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

          Simon Hangl added 1 comment

          Patchset-level comments
          File-level comment, Patchset 13 (Latest):
          Simon Hangl . resolved

          removing myself from the attention set until the tests are passing

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Abigail Klein
          • Chris Thompson
          • Nico Weber
          • Olga Korokhina
          • Robbie McElrath
          • Simon Hangl
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-CC: James Maclean <wjma...@chromium.org>
          Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
          Gerrit-CC: Kevin McNee <mc...@chromium.org>
          Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
          Gerrit-CC: Simon Hangl <sim...@chromium.org>
          Gerrit-Attention: Robbie McElrath <rmce...@chromium.org>
          Gerrit-Attention: Chris Thompson <cth...@chromium.org>
          Gerrit-Attention: Nico Weber <tha...@chromium.org>
          Gerrit-Attention: Abigail Klein <abigai...@google.com>
          Gerrit-Attention: Simon Hangl <sim...@chromium.org>
          Gerrit-Attention: Olga Korokhina <koro...@google.com>
          Gerrit-Comment-Date: Tue, 28 Oct 2025 10:19:50 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Olga Korokhina (Gerrit)

          unread,
          Nov 3, 2025, 5:52:59 AM (3 days ago) Nov 3
          to Code Review Nudger, Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Menard, Alexis, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
          Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen and Simon Hangl

          Olga Korokhina added 1 comment

          File third_party/blink/renderer/core/html/parser/text_document_parser.cc
          Line 72, Patchset 10: Attribute(html_names::kNameAttr, AtomicString("chrome#wrap-pre")));
          Rune Lillesveen . resolved
          Olga Korokhina

          @cth...@chromium.org How do you think, will this solve our issue with Citrix, if we leave all as is and just override the CSP?
          The proposed solution actually removes the CSP error, thank you all for advises! I believe we should go with this solution for now, let Citrix check if this works for them and if not - continue effort on moving inline styles away.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Abigail Klein
          • Chris Thompson
          • Nico Weber
          • Robbie McElrath
          • Rune Lillesveen
          • Simon Hangl
          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: I98abb62b8a6ec8557e4dae34bb665c478b279806
            Gerrit-Change-Number: 7031803
            Gerrit-PatchSet: 15
            Gerrit-Owner: Olga Korokhina <koro...@google.com>
            Gerrit-Reviewer: Abigail Klein <abigai...@google.com>
            Gerrit-Reviewer: Chris Thompson <cth...@chromium.org>
            Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
            Gerrit-Reviewer: Olga Korokhina <koro...@google.com>
            Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
            Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
            Gerrit-Reviewer: Simon Hangl <sim...@google.com>
            Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
            Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
            Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-CC: James Maclean <wjma...@chromium.org>
            Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
            Gerrit-CC: Kevin McNee <mc...@chromium.org>
            Gerrit-CC: Menard, Alexis <alexis...@intel.com>
            Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
            Gerrit-CC: Simon Hangl <sim...@chromium.org>
            Gerrit-Attention: Robbie McElrath <rmce...@chromium.org>
            Gerrit-Attention: Chris Thompson <cth...@chromium.org>
            Gerrit-Attention: Nico Weber <tha...@chromium.org>
            Gerrit-Attention: Abigail Klein <abigai...@google.com>
            Gerrit-Attention: Simon Hangl <sim...@chromium.org>
            Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
            Gerrit-Comment-Date: Mon, 03 Nov 2025 10:52:42 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Rune Lillesveen (Gerrit)

            unread,
            Nov 4, 2025, 3:51:33 AM (2 days ago) Nov 4
            to Olga Korokhina, Code Review Nudger, Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Menard, Alexis, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
            Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

            Rune Lillesveen added 1 comment

            File third_party/blink/renderer/core/html/parser/text_document_parser.cc
            Line 56, Patchset 15 (Latest): GetContentSecurityPolicy()->SetOverrideAllowInlineStyle(true);
            Rune Lillesveen . unresolved

            If the execution context is available on TextDocument construction, I think that's where we should set the override, with a comment saying something like:

            ```
            // Text documents are rendered using a UA-inserted <pre> tag with a style attribute
            // This style attribute should be allowed regardless of the CSP headers sent with
            // the text file. This is safe since the all non-text rendered content, that would
            // have been blocked, is inserted by the UA.
            ```

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Abigail Klein
            • Chris Thompson
            • Nico Weber
            • Olga Korokhina
            • Robbie McElrath
            • Simon Hangl
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement is not satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              Gerrit-Attention: Olga Korokhina <koro...@google.com>
              Gerrit-Comment-Date: Tue, 04 Nov 2025 08:51:17 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Olga Korokhina (Gerrit)

              unread,
              Nov 4, 2025, 7:47:33 AM (2 days ago) Nov 4
              to Code Review Nudger, Simon Hangl, AI Code Reviewer, Rune Lillesveen, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Menard, Alexis, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
              Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Robbie McElrath, Rune Lillesveen and Simon Hangl

              Olga Korokhina added 1 comment

              File third_party/blink/renderer/core/html/parser/text_document_parser.cc
              Line 56, Patchset 15: GetContentSecurityPolicy()->SetOverrideAllowInlineStyle(true);
              Rune Lillesveen . resolved

              If the execution context is available on TextDocument construction, I think that's where we should set the override, with a comment saying something like:

              ```
              // Text documents are rendered using a UA-inserted <pre> tag with a style attribute
              // This style attribute should be allowed regardless of the CSP headers sent with
              // the text file. This is safe since the all non-text rendered content, that would
              // have been blocked, is inserted by the UA.
              ```

              Olga Korokhina

              Works this way as well, checked. Thank you!

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Abigail Klein
              • Chris Thompson
              • Nico Weber
              • Robbie McElrath
              • Rune Lillesveen
              • Simon Hangl
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not satisfiedCode-Owners
                • requirement is not satisfiedCode-Review
                Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
                Gerrit-Comment-Date: Tue, 04 Nov 2025 12:47:15 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Rune Lillesveen <fut...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Rune Lillesveen (Gerrit)

                unread,
                Nov 4, 2025, 7:55:38 AM (2 days ago) Nov 4
                to Olga Korokhina, Rune Lillesveen, Code Review Nudger, Simon Hangl, AI Code Reviewer, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Menard, Alexis, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
                Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

                Rune Lillesveen voted and added 3 comments

                Votes added by Rune Lillesveen

                Code-Review+1

                3 comments

                Patchset-level comments
                File-level comment, Patchset 17 (Latest):
                Rune Lillesveen . resolved

                lgtm with the typos in my proposed text fixed.

                File third_party/blink/renderer/core/html/text_document.cc
                Line 40, Patchset 16: // attribute This style attribute should be allowed regardless of the CSP
                Rune Lillesveen . unresolved

                Missing '.'

                Line 41, Patchset 16: // headers sent with the text file. This is safe since the all non-text
                Rune Lillesveen . unresolved

                remove "the"

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Abigail Klein
                • Chris Thompson
                • Nico Weber
                • Olga Korokhina
                • Robbie McElrath
                • Simon Hangl
                Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement satisfiedCode-Owners
                • requirement satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • 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: I98abb62b8a6ec8557e4dae34bb665c478b279806
                Gerrit-Change-Number: 7031803
                Gerrit-PatchSet: 17
                Gerrit-Attention: Olga Korokhina <koro...@google.com>
                Gerrit-Comment-Date: Tue, 04 Nov 2025 12:55:23 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Rune Lillesveen (Gerrit)

                unread,
                Nov 4, 2025, 7:58:16 AM (2 days ago) Nov 4
                to Olga Korokhina, Rune Lillesveen, Code Review Nudger, Simon Hangl, AI Code Reviewer, Nico Weber, Abigail Klein, Simon Hangl, Chris Thompson, Robbie McElrath, AyeAye, Menard, Alexis, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Kevin McNee, James Maclean, Chromium LUCI CQ, oshima...@chromium.org, abigailbk...@google.com, apavlo...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kinuko...@chromium.org, kyungjunle...@google.com, loading-rev...@chromium.org, lucasrada...@google.com, nektar...@chromium.org, pdf-r...@chromium.org, yuzo+...@chromium.org
                Attention needed from Abigail Klein, Chris Thompson, Nico Weber, Olga Korokhina, Robbie McElrath and Simon Hangl

                Rune Lillesveen added 2 comments

                Commit Message
                Line 7, Patchset 17 (Latest):Move inline CSS to fix blob iframe CSP errors
                Rune Lillesveen . unresolved

                This is no longer accurate.

                Line 10, Patchset 17 (Latest):with Blob resource in existing css file. Inline styles for <pre> wrapping text in ifame moved to html.css making it available on any rendered page, this eliminates CSP security error fired if policies for styles do not include 'unsafe-inline'. Solves several known issues with blobs as iFrame source.
                Rune Lillesveen . unresolved

                Need to update the description to match the actual change.

                Note that you should wrap the lines of the commit message at ~72 chars.

                Gerrit-Comment-Date: Tue, 04 Nov 2025 12:58:02 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy
                Reply all
                Reply to author
                Forward
                0 new messages