Bug 241558 - REGRESSION (r251194): Web Inspector: Uncaught exception when inspecting color referenced by CSS variable
Summary: REGRESSION (r251194): Web Inspector: Uncaught exception when inspecting color...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Razvan Caliman
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-13 10:55 PDT by Razvan Caliman
Modified: 2022-06-13 13:19 PDT (History)
2 users (show)

See Also:


Attachments
Test case (105 bytes, text/html)
2022-06-13 10:55 PDT, Razvan Caliman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Razvan Caliman 2022-06-13 10:55:47 PDT
Created attachment 460208 [details]
Test case

Uncaught Exception in Web Inspector.

Test case (save as HTML file):
```
<!DOCTYPE html>
<body style="--color: red">
<h1 style="color: var(--color)">Inspect my color</h1>
</body>
```

Steps to Reproduce:
1. Open the attached test case file
2. Inspect the `<h1>` element's color
3. In the Styles panel, click the swatch next to `var(--color)` to see the resolved color value


Uncaught Exceptions:
-----------------------
 - TypeError: undefined is not an object (evaluating 'this._preventChangingColorFormats') (at InlineSwatch.js:389:127)
    callback @ InlineSwatch.js:389:127
    createCodeMirrorTextMarkers @ CodeMirrorTextMarkers.js:76:25
    createCodeMirrorColorTextMarkers @ CodeMirrorTextMarkers.js:121:39
    _swatchElementClicked @ InlineSwatch.js:394:45
    _swatchElementClicked @ [native code]
-----------------------

Regressed by https://bugs.webkit.org/show_bug.cgi?id=241055
Comment 1 Radar WebKit Bug Importer 2022-06-13 10:56:26 PDT
<rdar://problem/95039560>
Comment 2 Razvan Caliman 2022-06-13 11:15:08 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1474
Comment 3 EWS 2022-06-13 13:19:49 PDT
Committed r295500 (251505@main): <https://commits.webkit.org/251505@main>

Reviewed commits have been landed. Closing PR #1474 and removing active labels.