RESOLVED FIXED151057
Web Inspector: Convert sidebars to use View base class
https://bugs.webkit.org/show_bug.cgi?id=151057
Summary Web Inspector: Convert sidebars to use View base class
Matt Baker
Reported 2015-11-09 15:38:26 PST
* SUMMARY Convert sidebars to use View base class, make details section a first-class concept. It would be nice to be able to write this.addDetailsSection(detailsSection) instead of this.element.appendChild(this._myDetailsSection.element), from within sidebar classes.
Attachments
[Patch] Proposed Fix (22.16 KB, patch)
2015-11-10 20:16 PST, Matt Baker
no flags
[Patch] Proposed Fix (22.07 KB, patch)
2015-11-11 14:08 PST, Matt Baker
no flags
Radar WebKit Bug Importer
Comment 1 2015-11-09 15:38:41 PST
Matt Baker
Comment 2 2015-11-10 20:14:35 PST
To reduce the scope of this patch, improvements to sidebar details sections will be tracked under a separate issue: https://bugs.webkit.org/show_bug.cgi?id=151126.
Matt Baker
Comment 3 2015-11-10 20:16:58 PST
Created attachment 265262 [details] [Patch] Proposed Fix
Timothy Hatcher
Comment 4 2015-11-10 20:31:58 PST
Comment on attachment 265262 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=265262&action=review > Source/WebInspectorUI/UserInterface/Views/Sidebar.js:203 > + this._collapsed = flag; flag || false; > Source/WebInspectorUI/UserInterface/Views/Sidebar.js:205 > + this.element.classList.add(WebInspector.Sidebar.CollapsedStyleClassName); These lines can be replaced with classList.toggle(). > Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js:75 > + this._selected = flag; flag || false; > Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js:76 > + this.element.classList.toggle("selected"); Would be safer to pass _selected as the second argument to toggle. > Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js:81 > + return this.parentView; Nice!
Matt Baker
Comment 5 2015-11-11 14:08:18 PST
Created attachment 265317 [details] [Patch] Proposed Fix
WebKit Commit Bot
Comment 6 2015-11-11 14:57:41 PST
Comment on attachment 265317 [details] [Patch] Proposed Fix Clearing flags on attachment: 265317 Committed r192327: <http://trac.webkit.org/changeset/192327>
WebKit Commit Bot
Comment 7 2015-11-11 14:57:45 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.