Bug 211930 - Web Inspector: Fails to pretty-print a particular CSS file
Summary: Web Inspector: Fails to pretty-print a particular CSS file
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: Devin Rousso
URL: https://account.ikonpass.com/en/login
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-14 16:01 PDT by Myles C. Maxfield
Modified: 2020-05-15 18:18 PDT (History)
4 users (show)

See Also:


Attachments
Screenshot (412.42 KB, image/png)
2020-05-14 16:01 PDT, Myles C. Maxfield
no flags Details
Screenshot 2 (368.15 KB, image/png)
2020-05-14 16:01 PDT, Myles C. Maxfield
no flags Details
Resource (171.90 KB, text/css)
2020-05-14 16:02 PDT, Myles C. Maxfield
no flags Details
Patch (24.41 KB, patch)
2020-05-14 18:41 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (24.57 KB, patch)
2020-05-15 17:23 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2020-05-14 16:01:18 PDT
Created attachment 399421 [details]
Screenshot

Load https://account.ikonpass.com/packs/css/application-1cd9da5f.chunk.css in the pretty-printer in the inspector. It seems to get confused about a data url. Screenshots attached.
Comment 1 Myles C. Maxfield 2020-05-14 16:01:31 PDT
Created attachment 399422 [details]
Screenshot 2
Comment 2 Myles C. Maxfield 2020-05-14 16:02:04 PDT
Created attachment 399423 [details]
Resource
Comment 3 Devin Rousso 2020-05-14 18:41:27 PDT
Created attachment 399438 [details]
Patch
Comment 4 Devin Rousso 2020-05-14 18:42:39 PDT
Comment on attachment 399438 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399438&action=review

> Source/WebInspectorUI/UserInterface/Workers/Formatter/CSSFormatter.js:-232
> -            let specialSequenceEnd = null;

All the removed lines above this line have just been move outside of the `for` and haven't been changed in any way.
Comment 5 Joseph Pecoraro 2020-05-15 11:14:29 PDT
Comment on attachment 399438 [details]
Patch

rs=me
Comment 6 Devin Rousso 2020-05-15 17:23:54 PDT
Created attachment 399532 [details]
Patch

add logic to cover the edge case where we're processing a special sequence and exhaust the `_sourceText`
Comment 7 EWS 2020-05-15 18:17:25 PDT
Committed r261772: <https://trac.webkit.org/changeset/261772>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399532 [details].
Comment 8 Radar WebKit Bug Importer 2020-05-15 18:18:16 PDT
<rdar://problem/63297001>