Bug 211930

Summary: Web Inspector: Fails to pretty-print a particular CSS file
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
URL: https://account.ikonpass.com/en/login
Attachments:
Description Flags
Screenshot
none
Screenshot 2
none
Resource
none
Patch
none
Patch none

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>