| Summary: | Web Inspector: Add new tab button to make it easy to bring a closed tab back | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Timothy Hatcher <timothy> | ||||||||
| Component: | Web Inspector | Assignee: | Timothy Hatcher <timothy> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | DoNotImportToRadar | ||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Timothy Hatcher
2015-04-27 17:19:36 PDT
Created attachment 251792 [details]
Patch
Created attachment 251793 [details]
Screenshot of New Tab View
Comment on attachment 251792 [details]
Patch
I need to tweak this to work with JSContext inspection.
Created attachment 251807 [details]
Patch
Comment on attachment 251807 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251807&action=review r=me! > Source/WebInspectorUI/UserInterface/Views/NewTabContentView.css:26 > + > + Style: Double newline oops. > Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js:33 > + this._allowedNewTabs = [{image: "Images/Elements.svg", title: WebInspector.UIString("Elements"), type: WebInspector.ElementsTabContentView.Type}, > + {image: "Images/Console.svg", title: WebInspector.UIString("Console"), type: WebInspector.ConsoleTabContentView.Type}]; Style: Would read cleaner on their own lines. > Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js:58 > + var boxElement = document.createElement("div"); > + boxElement.classList.add("box"); > + > + var imageElement = document.createElement("img"); > + imageElement.src = info.image; > + > + var labelElement = document.createElement("label"); > + labelElement.textContent = info.title; > + > + boxElement.appendChild(imageElement); > + tabItemElement.appendChild(boxElement); > + tabItemElement.appendChild(labelElement); Style: I still prefer just inlining the appendChilds, it saves so many lines, and you know the element is always inserted. Exceptions are "this.element.appendChild". Comment on attachment 251807 [details] Patch https://trac.webkit.org/r183468 |