Bug 143128 - Web Inspector: Convert more misc View classes to ES6
Summary: Web Inspector: Convert more misc View classes to ES6
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks: 142891
  Show dependency treegraph
 
Reported: 2015-03-26 23:38 PDT by Timothy Hatcher
Modified: 2015-04-21 20:31 PDT (History)
7 users (show)

See Also:


Attachments
Patch (108.61 KB, patch)
2015-03-26 23:41 PDT, Timothy Hatcher
joepeck: review+
joepeck: commit-queue-
Details | Formatted Diff | Diff
Patch (Ignore Space) (70.01 KB, patch)
2015-03-26 23:42 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2015-03-26 23:38:48 PDT
A grab bag of misc View classes that are simple and easy to test.
Comment 1 Radar WebKit Bug Importer 2015-03-26 23:39:02 PDT
<rdar://problem/20322584>
Comment 2 Timothy Hatcher 2015-03-26 23:41:47 PDT
Created attachment 249555 [details]
Patch
Comment 3 Timothy Hatcher 2015-03-26 23:42:47 PDT
Created attachment 249556 [details]
Patch (Ignore Space)
Comment 4 Joseph Pecoraro 2015-03-26 23:49:21 PDT
Comment on attachment 249556 [details]
Patch (Ignore Space)

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

r=me

> Source/WebInspectorUI/UserInterface/Views/DashboardContainerView.js:280
> +WebInspector.DashboardContainerView.AdvanceDirection = {
> +    Forward: Symbol("dashboard-container-view-advance-direction-forward"),
> +    Backward: Symbol("dashboard-container-view-advance-direction-backward"),
> +    None: Symbol("dashboard-container-view-advance-direction-none")
> +};
> +

Nice, moving to Symbol!

> Source/WebInspectorUI/UserInterface/Views/DashboardView.js:43
> +    static create(representedObject)

Yay!

> Source/WebInspectorUI/UserInterface/Views/DefaultDashboardView.js:106
>          Object.defineProperty(item, "text",
>          {
> -            set: function(newText)
> +            set(newText)

So I think I told mattbaker the other day that I don't like this in Object.defineProperty. Since this is really about creating a set property with a function handler, not a method. But having thought more about this, the syntax is pretty cool, cause its the setter syntax inside the descriptor. I could go either way here.

> Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js:-84
> -WebInspector.ObjectTreeView.Mode = {
> -    Properties: Symbol("object-tree-properties"),
> -    API: Symbol("object-tree-api"),
> -};

You will have conflicts with this file.
Comment 5 Timothy Hatcher 2015-03-27 00:28:06 PDT
Comment on attachment 249555 [details]
Patch

https://trac.webkit.org/r182055