Closed Bug 2072506 Opened 2 months ago Closed 1 month ago

InspectorUtils.getComputationSteps does not support random()

Categories

(DevTools :: Inspector: Rules, defect, P2)

defect

Tracking

(firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: nchevobbe, Assigned: sajidanwar)

References

Details

Attachments

(1 file, 1 external file)

Attached file test_case.html —

Steps to reproduce

  1. With both layout.css.random.enabled and devtools.inspector.css-explainers set to true
  2. Open attached test case
  3. Inspect one of the square in the page
  4. Hover random in rotate: random(0deg, 180deg)

Expected results

The tooltip shows the value that was returned for that declaration for this given element

Actual results

The tooltip shows "Couldn't compute data for 'random(0deg, 180deg)'"


I don't know the detail of the random() implementation, but it's important that we get the value that was produced for that declaration and element, and not a random number. Note that a declaration might have multiple random() calls, so we'd need to be able to differentiate those.
On the Inspector side, since we can highlight only parts of the declaration value, we should also be able to know where the "sub-expression" sits in the declaration to be able to get the right "random()" call

Sajid, I know you might already be busy with the actual random() implementation, but I guess the implementation might also be impacted by DevTools needs, so it could be nice to consider this while the implementation work is ongoing

Flags: needinfo?(sajidanwar94)

Note that in Bug 2041621, I'm adding the property name as a parameter for InspectorUtils.getComputationSteps, which we also need to know for random()

Depends on: 2041621
Severity: -- → S3
Priority: -- → P2

No problem, I can take this bug for random() support, going to self-assign.

Assignee: nobody → sajidanwar94
Status: NEW → ASSIGNED
Flags: needinfo?(sajidanwar94)
Pushed by sajidanwar94@gmail.com: https://github.com/mozilla-firefox/firefox/commit/9193490cf278 https://hg.mozilla.org/integration/autoland/rev/efbda672beed Support CSS random() in InspectorUtils.getComputationSteps. r=devtools-reviewers,firefox-style-system-reviewers,layout-reviewers,emilio,nchevobbe
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9a0745d08a30 https://hg.mozilla.org/integration/autoland/rev/8634351653a8 Revert "Bug 2072506 - Support CSS random() in InspectorUtils.getComputationSteps. r=devtools-reviewers,firefox-style-system-reviewers,layout-reviewers,emilio,nchevobbe" for causing mochitest failures @test_getComputationSteps.html.

Backed out for causing mochitest failures @test_getComputationSteps.html.

Flags: needinfo?(sajidanwar94)
Pushed by sajidanwar94@gmail.com: https://github.com/mozilla-firefox/firefox/commit/ef3b794f616b https://hg.mozilla.org/integration/autoland/rev/4dfb185cf9cb Support CSS random() in InspectorUtils.getComputationSteps. r=devtools-reviewers,firefox-style-system-reviewers,layout-reviewers,emilio,nchevobbe
Flags: needinfo?(sajidanwar94)
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
QA Whiteboard: [qa-triage-done-c161/b160]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: