Invalidate inline style cache after CSSOM mutations [chromium/src : main]

0 views
Skip to first unread message

Jason Leo (Gerrit)

unread,
May 5, 2026, 4:18:37 AM (5 days ago) May 5
to Andrey Kosyakov, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
Attention needed from Andrey Kosyakov

Jason Leo added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Jason Leo . resolved

Please take a look.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrey Kosyakov
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: I6eebbdfdf8bff2bc65bbb0705b0248ca44c5f483
Gerrit-Change-Number: 7806141
Gerrit-PatchSet: 2
Gerrit-Owner: Jason Leo <cg...@chromium.org>
Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Reviewer: Jason Leo <cg...@chromium.org>
Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Comment-Date: Tue, 05 May 2026 08:18:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrey Kosyakov (Gerrit)

unread,
May 6, 2026, 8:30:15 PM (4 days ago) May 6
to Jason Leo, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
Attention needed from Jason Leo

Andrey Kosyakov added 4 comments

File third_party/blink/renderer/core/inspector/inspector_css_agent.cc
Line 4548, Patchset 4 (Latest): if (!element)
Andrey Kosyakov . unresolved

Let's ditch this check, or replace with `CHECK()`, or, better, pass Element& instead.

Line 4571, Patchset 4 (Latest):void InspectorCSSAgent::DidInvalidateStyleAttr(Node* node) {
Andrey Kosyakov . unresolved

Any idea why this is a `Node`, not `Element`? Nodes are not supposed to have attributes, are they?

Line 4577, Patchset 4 (Latest): auto* element = DynamicTo<Element>(node);
Andrey Kosyakov . unresolved

If we get rid of this, we can assume a non-null Element (or, as above, just pass by reference).

File third_party/blink/renderer/core/inspector/inspector_css_agent_test.cc
Line 246, Patchset 4 (Latest):// Regression test: a CSSOM-driven inline style mutation (e.g.
Andrey Kosyakov . unresolved

Any chance this can be reproduced from the page side so we could have a JS test under inspector-protocol instead?

Open in Gerrit

Related details

Attention is currently required from:
  • Jason Leo
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: I6eebbdfdf8bff2bc65bbb0705b0248ca44c5f483
    Gerrit-Change-Number: 7806141
    Gerrit-PatchSet: 4
    Gerrit-Owner: Jason Leo <cg...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Jason Leo <cg...@chromium.org>
    Gerrit-Attention: Jason Leo <cg...@chromium.org>
    Gerrit-Comment-Date: Thu, 07 May 2026 00:30:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jason Leo (Gerrit)

    unread,
    9:51 AM (3 hours ago) 9:51 AM
    to Andrey Kosyakov, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Andrey Kosyakov

    Jason Leo added 4 comments

    File third_party/blink/renderer/core/inspector/inspector_css_agent.cc
    Line 4548, Patchset 4: if (!element)
    Andrey Kosyakov . resolved

    Let's ditch this check, or replace with `CHECK()`, or, better, pass Element& instead.

    Jason Leo

    Done

    Line 4571, Patchset 4:void InspectorCSSAgent::DidInvalidateStyleAttr(Node* node) {
    Andrey Kosyakov . resolved

    Any idea why this is a `Node`, not `Element`? Nodes are not supposed to have attributes, are they?

    Jason Leo

    Done

    Line 4577, Patchset 4: auto* element = DynamicTo<Element>(node);
    Andrey Kosyakov . resolved

    If we get rid of this, we can assume a non-null Element (or, as above, just pass by reference).

    Jason Leo

    Done

    File third_party/blink/renderer/core/inspector/inspector_css_agent_test.cc
    Line 246, Patchset 4:// Regression test: a CSSOM-driven inline style mutation (e.g.
    Andrey Kosyakov . resolved

    Any chance this can be reproduced from the page side so we could have a JS test under inspector-protocol instead?

    Jason Leo

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    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: I6eebbdfdf8bff2bc65bbb0705b0248ca44c5f483
      Gerrit-Change-Number: 7806141
      Gerrit-PatchSet: 5
      Gerrit-Owner: Jason Leo <cg...@chromium.org>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Jason Leo <cg...@chromium.org>
      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Comment-Date: Sun, 10 May 2026 13:51:18 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages