Closed Bug 2069280 Opened 24 days ago Closed 19 days ago

Fix the undefined --border-color-dead-row custom property in aboutMemory.css

Categories

(Toolkit :: about:memory, task)

task

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: dao, Assigned: xz.ganbaruibro, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=css])

Attachments

(1 file)

Filing as a good first bug to learn workflows.

.nodeInspector .deadRow in toolkit/components/aboutmemory/content/aboutMemory.css sets border: var(--border-color-dead-row), but nothing defines --border-color-dead-row. The declaration is dropped at computed-value time, so dead rows in about:memory's Collector Log Analyzer render with no border.

Bug 2005954 added the rule with a mismatched pair of names: the custom property was defined as --background-color-dead-row while the use site read --border-color-dead-row, so the two never met. Because the defined name was never referenced, browser_parsable_css.js failed, and the follow-up fix removed the definition rather than reconciling the names, which left the use site pointing at nothing.

The value belongs to the border shorthand rather than to a colour, so name it for what it is. Add the property back beside its siblings in the same rule (near --background-color-grid-header):

--border-dead-row: 1px solid color-mix(in srgb, var(--color-gray-60) 30%, transparent);

and change the use site to match:

border: var(--border-dead-row);

Link to the code:
https://searchfox.org/firefox-main/source/toolkit/components/aboutmemory/content/aboutMemory.css

The change is recent enough that Searchfox may not have indexed it yet. To find both places locally:

grep -n "dead-row\|background-color-grid-header" toolkit/components/aboutmemory/content/aboutMemory.css

To verify the fix:

./mach lint -l stylelint toolkit/components/aboutmemory/content/aboutMemory.css
./mach test browser/base/content/test/static/browser_parsable_css.js

The second one is the guard that caught the original mistake: it fails on a custom property nothing references, so it confirms the new name is actually used.

Then check that the styling applies: open about:memory, load a cycle-collector log in the Collector Log Analyzer, and confirm in the Browser Toolbox inspector that .nodeInspector .deadRow has a border instead of a dropped border declaration.

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Blocks: 2005954

Hi! I'd like to work on this as my first Firefox contribution. Could you assign it to me?

(In reply to Xiaosen Zhuang from comment #1)

Hi! I'd like to work on this as my first Firefox contribution. Could you assign it to me?

See the last paragraph on the bug description.

Assignee: nobody → xz.ganbaruibro
Status: NEW → ASSIGNED
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7e1e37f5ef08 https://hg.mozilla.org/integration/autoland/rev/08f81cc253ed Define --border-dead-row for dead rows in about:memory's Collector Log Analyzer r=dao,desktop-theme-reviewers DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: