Bug 211436

Summary: Web Inspector: CSSAgent always returns variable names lowercase; must be case-sensitive
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: inspector-bugzilla-changes, rcaliman, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=211459
Attachments:
Description Flags
Screenshot of confirmed fix none

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.