Closed Bug 1922511 Opened 2 months ago Closed 2 months ago

Don't send custom property declarations to getCSSDeclarationBlockIssues

Categories

(DevTools :: Inspector: Rules, task)

task

Tracking

(firefox132 verified, firefox133 verified)

VERIFIED FIXED
133 Branch
Tracking Status
firefox132 --- verified
firefox133 --- verified

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Those are completely ignored on the server, so let's not send them in the first place to save some cycle

https://searchfox.org/mozilla-release/rev/6e55285b90d6b7aedbcbbd3a9c132552b07c5ba6/devtools/server/actors/compatibility/lib/MDNCompatibility.js#55,57-61

getCSSDeclarationBlockIssues(declarations, browsers) {
...
  for (const { name: property } of declarations) {
    // Ignore CSS custom properties as any name is valid.
    if (property.startsWith("--")) {
      continue;
    }
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

Those declarations are already ignored on the server, as custom property
declaration can't have compatibility issues.
On pages with lots of CSS variables, we were still paying the price of
iterating over those and sending them through RDP, which could be costly.

Attachment #9428799 - Attachment is obsolete: true
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/45fb146740e0 [devtools] Avoid sending custom property declarations to getCSSDeclarationBlockIssues. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch

Those declarations are already ignored on the server, as custom property
declaration can't have compatibility issues.
On pages with lots of CSS variables, we were still paying the price of
iterating over those and sending them through RDP, which could be costly.

Original Revision: https://phabricator.services.mozilla.com/D224472

Attachment #9429032 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: DevTools Inspector completely freezes when inspecting a page using lots of CSS variables
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Follow steps from https://bugzilla.mozilla.org/show_bug.cgi?id=1922469#c0
  • Risk associated with taking this patch: low
  • Explanation of risk level: simple DevTools only fix
  • String changes made/needed: -
  • Is Android affected?: no
Flags: qe-verify+
Attachment #9429032 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

I was able to reproduce the issue on an affected Firefox 132.0b3 build, using macOS 14.6, while following the steps from https://bugzilla.mozilla.org/show_bug.cgi?id=1922469#c0, as mentioned in Comment 6.
Verified as fixed using Firefox Nightly 133.0a1 (2024-10-06) and Firefox 132.0b4 (treeherder build from Comment 7), on macOS 14.6, Windows 11 and Ubuntu 22.04. The inspector is no longer freezing after pressing the "Open dialog" button from https://sanomalearning.design/categories/components/dialog/usage/.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Duplicate of this bug: 1922469
No longer duplicate of this bug: 1922469
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: