Bug 154008 - Web Inspector: Extract a few common unicode characters into global variables
Summary: Web Inspector: Extract a few common unicode characters into global variables
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: Joseph Pecoraro
URL:
Keywords: DoNotImportToRadar, InRadar
Depends on:
Blocks:
 
Reported: 2016-02-08 14:08 PST by Joseph Pecoraro
Modified: 2016-02-09 15:51 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (28.51 KB, patch)
2016-02-08 14:09 PST, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff
[PATCH] For Landing (29.47 KB, patch)
2016-02-08 14:15 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2016-02-08 14:08:22 PST
* SUMMARY
Extract a few common unicode characters into global variables

We use `ellipsis` and `emDash` in a lot of places, even storing into a temporary well named global. Lets just make them always available in Utilities to avoid having to look them up everywhere.
Comment 1 Radar WebKit Bug Importer 2016-02-08 14:09:17 PST
<rdar://problem/24555688>
Comment 2 Joseph Pecoraro 2016-02-08 14:09:49 PST
Created attachment 270881 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2016-02-08 14:11:05 PST
> ...even storing into a temporary well named global...

I meant: temporary well named variable.
Comment 4 Timothy Hatcher 2016-02-08 14:11:59 PST
Comment on attachment 270881 [details]
[PATCH] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Base/Utilities.js:28
> +emDash = "\u2014";
> +ellipsis = "\u2026";

var or const?
Comment 5 Joseph Pecoraro 2016-02-08 14:13:55 PST
Comment on attachment 270881 [details]
[PATCH] Proposed Fix

I think we want it to be obvious that we are leaking it to the global namespace. Const wouldn't work as that would scope it to this lexical scope. var would be fine.
Comment 6 Joseph Pecoraro 2016-02-08 14:15:38 PST
Created attachment 270882 [details]
[PATCH] For Landing
Comment 7 WebKit Commit Bot 2016-02-08 15:13:14 PST
Comment on attachment 270882 [details]
[PATCH] For Landing

Clearing flags on attachment: 270882

Committed r196275: <http://trac.webkit.org/changeset/196275>