Bug 211436 - Web Inspector: CSSAgent always returns variable names lowercase; must be case-sensitive
Summary: Web Inspector: CSSAgent always returns variable names lowercase; must be case...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-04 23:35 PDT by Nikita Vasilyev
Modified: 2023-06-07 03:57 PDT (History)
3 users (show)

See Also:


Attachments
Screenshot of confirmed fix (592.32 KB, image/png)
2023-06-07 03:57 PDT, Razvan Caliman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2020-05-04 23:35:24 PDT
CSS variable names are case-sensitive. CSSAgent.getMatchedStylesForNode() and CSSAgent.getInlineStylesForNode() returns variables always in lowercase.

Steps:
1. Open data:text/html;,<body style="--lineWidth:5;border-top:calc(var(--lineWidth)*1px) solid magenta">
2. Inspect body
3. Change --lineWidth value to 10

Expected:
The border is 10px wide now.

Actual:
The border is no longer visible.

<rdar://61711536>
Comment 1 Nikita Vasilyev 2020-05-04 23:38:15 PDT
I'd appreciate any tips here.

I'm not seeing any lowercase conversions in WebCore/inspector/agents/InspectorCSSAgent.cpp. I'm looking at WebCore/css now.
Comment 2 Razvan Caliman 2023-06-07 03:57:33 PDT
Created attachment 466611 [details]
Screenshot of confirmed fix

This was fixed some time ago. The backend returns variable names in correct case.