Closed Bug 1444772 Opened 8 years ago Closed 1 year ago

Autocomplete CSS variables inside calc()

Categories

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

60 Branch
defect

Tracking

(firefox60 wontfix, firefox136 fixed)

RESOLVED FIXED
136 Branch
Tracking Status
firefox60 --- wontfix
firefox136 --- fixed

People

(Reporter: Oriol, Assigned: nchevobbe)

References

(Blocks 3 open bugs)

Details

(Keywords: perf-alert)

Attachments

(1 file)

I have an element styled with --size:100px This variable appears in autocompletion if I use width: var(-- But If I write width: calc(var(-- Then --size is not suggested.
Blocks: 1223058
No longer blocks: 1422635
Depends on: 1422635
Priority: -- → P3
Product: Firefox → DevTools
Severity: normal → S3

At the moment, we're using a very simple heuristic for the autocompletion (we basically check for last space before cursor and have a regex for var)
We should use InspectorCSSParser instead, so we would have a better context of the currently edited function/token

Blocks: 1900304
Type: enhancement → defect
Blocks: 1805649
Blocks: 1900305

Using the parser allows us to have more context for building the suggestions.
For example, here, we can now autocomplete var() when it's inside another function,
and we can also avoid completion if we're in an unclosed css comment.

Test cases are added to cover those.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df91a73ed334 [devtools] Use InspectorCSSParser to handle CSS value autocomplete. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch

(In reply to Pulsebot from comment #3)

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/df91a73ed334
[devtools] Use InspectorCSSParser to handle CSS value autocomplete.
r=devtools-reviewers,ochameau.

Perfherder has detected a talos performance change from push df91a73ed334d79870e9ef1379ededfa0f089eb6.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
6% perf_reftest_singletons scrollbar-styles-1.html linux1804-64-shippable-qr e10s fission stylo webrender 355.29 -> 335.67

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 43344

For more information on performance sheriffing please see our FAQ.

Keywords: perf-alert

(In reply to Acasandrei Beatrice (needinfo me) from comment #5)

(In reply to Pulsebot from comment #3)

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/df91a73ed334
[devtools] Use InspectorCSSParser to handle CSS value autocomplete.
r=devtools-reviewers,ochameau.

Perfherder has detected a talos performance change from push df91a73ed334d79870e9ef1379ededfa0f089eb6.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
6% perf_reftest_singletons scrollbar-styles-1.html linux1804-64-shippable-qr e10s fission stylo webrender 355.29 -> 335.67

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 43344

For more information on performance sheriffing please see our FAQ.

This patch only impacts the inspector, which shouldn't have any effect on perf_reftest , unless I'm missing something

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: