Bug 190528

Summary: Web Inspector: sequences of spaces longer than 16 don't show a dot
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, inspector-bugzilla-changes, joepeck, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[Image] Screenshot of Issue
none
Patch
none
Patch none

Description Devin Rousso 2018-10-12 10:55:33 PDT
Created attachment 352181 [details]
[Image] Screenshot of Issue

We should probably programmatically generate the CSS space rules instead of manually writing 16 of them.
Comment 1 Devin Rousso 2018-10-12 17:26:35 PDT
Created attachment 352245 [details]
Patch
Comment 2 Matt Baker 2018-10-15 09:59:42 PDT
Comment on attachment 352245 [details]
Patch

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

r=me, nice cleanup!

> Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js:369
> +                        styleText += `content: "${"\\00B7".repeat(count)}";`;

Nit: I think '\\00B7' would make this a little easier to read, since the "outer" double-quotes are part of the string, and the "inner" double-quotes are part of the expression.
Comment 3 Joseph Pecoraro 2018-10-15 13:40:56 PDT
Comment on attachment 352245 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js:372
> +                        whitespaceStyleElement.textContent = styleText;

Hmm, this looks like the browser would have to reparse the entire stylesheet every time a new value is added, which seems wasteful. Maybe just creating a new element might be more efficient. Or maybe this is just negligible.
Comment 4 Devin Rousso 2018-10-16 09:19:47 PDT
Comment on attachment 352245 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js:372
>> +                        whitespaceStyleElement.textContent = styleText;
> 
> Hmm, this looks like the browser would have to reparse the entire stylesheet every time a new value is added, which seems wasteful. Maybe just creating a new element might be more efficient. Or maybe this is just negligible.

This only happens each time we encounter a new number of sequential spaces.  In my experience, I haven't seen more than 32 in a row before.  I don't think this is something we need to worry about.
Comment 5 Devin Rousso 2018-10-16 09:25:06 PDT
Created attachment 352460 [details]
Patch
Comment 6 WebKit Commit Bot 2018-10-16 09:47:15 PDT
Comment on attachment 352460 [details]
Patch

Clearing flags on attachment: 352460

Committed r237186: <https://trac.webkit.org/changeset/237186>
Comment 7 WebKit Commit Bot 2018-10-16 09:47:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-10-16 09:48:30 PDT
<rdar://problem/45308758>