WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
147381
Web Inspector: Convert timeline view classes to ES6 classes
https://bugs.webkit.org/show_bug.cgi?id=147381
Summary
Web Inspector: Convert timeline view classes to ES6 classes
Brian Burg
Reported
2015-07-28 15:54:07 PDT
,
Attachments
Patch
(170.47 KB, patch)
2015-07-29 14:30 PDT
,
Brian Burg
joepeck
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-07-28 15:54:33 PDT
<
rdar://problem/22040696
>
Brian Burg
Comment 2
2015-07-29 14:30:35 PDT
Created
attachment 257769
[details]
Patch
Joseph Pecoraro
Comment 3
2015-07-30 11:18:13 PDT
Comment on
attachment 257769
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=257769&action=review
> Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js:27 > +WebInspector.TimelineRecordingContentView = class TimelineRecordingContentView extends WebInspector.ContentView
Can you do this and extend WebInspector.ContentView even though that is not an ES6 class yet?!
Brian Burg
Comment 4
2015-07-30 12:43:02 PDT
(In reply to
comment #3
)
> Comment on
attachment 257769
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=257769&action=review
> > > Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js:27 > > +WebInspector.TimelineRecordingContentView = class TimelineRecordingContentView extends WebInspector.ContentView > > Can you do this and extend WebInspector.ContentView even though that is not > an ES6 class yet?!
I was skeptical, but everything seemed to work. Maybe you should apply the patch and sanity check it.
Brian Burg
Comment 5
2015-07-31 11:34:00 PDT
(In reply to
comment #3
)
> Comment on
attachment 257769
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=257769&action=review
> > > Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js:27 > > +WebInspector.TimelineRecordingContentView = class TimelineRecordingContentView extends WebInspector.ContentView > > Can you do this and extend WebInspector.ContentView even though that is not > an ES6 class yet?!
Here's a console interaction to demo this:
> window.A = function() { console.log("A ctor"); }; window.B = class B extends A { }
< class B = $1
> new B
[Log] A ctor < B {} = $2
Joseph Pecoraro
Comment 6
2015-07-31 14:35:34 PDT
Comment on
attachment 257769
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=257769&action=review
r=me
> Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js:34 > - this.navigationSidebarTreeOutline.element.classList.add(WebInspector.NavigationSidebarPanel.HideDisclosureButtonsStyleClassName); > - this.navigationSidebarTreeOutline.element.classList.add(WebInspector.LayoutTimelineView.TreeOutlineStyleClassName); > + console.assert(timeline.type === WebInspector.TimelineRecord.Type.Layout, timeline); > > - var columns = {eventType: {}, location: {}, width: {}, height: {}, startTime: {}, totalTime: {}}; > + this.navigationSidebarTreeOutline.element.classList.add(WebInspector.NavigationSidebarPanel.HideDisclosureButtonsStyleClassName);
I think there is a way to create a git diff ignoring whitespace only changes. It would likely make this much easier to read / see the actual changes!
> Source/WebInspectorUI/UserInterface/Views/TimelineRecordBar.js:-43 > -WebInspector.TimelineRecordBar.UnfinishedStyleClassName = "unfinished";
I feel like if the style class is used in multiple places it could stay a variable. But I don't mind inline a few of these.
> Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js:547 > const timelineHeight = 36; > const renderingFramesTimelineHeight = 108;
This is interesting. Until Saam's super recent changes, we couldn't use "const" in classes. Now, we can! There are a couple instances of "const " in these files, but we should be good now.
Brian Burg
Comment 7
2015-07-31 16:27:30 PDT
Committed
r187689
: <
http://trac.webkit.org/changeset/187689
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug