Web Inspector: Sources: the Inspector Style Sheet is missing when grouped by path
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-06-17  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Sources: the Inspector Style Sheet is missing when grouped by path
4         https://bugs.webkit.org/show_bug.cgi?id=198860
5
6         Reviewed by Timothy Hatcher.
7
8         * UserInterface/Controllers/CSSManager.js:
9         (WI.CSSManager.prototype.get styleSheets):
10         (WI.CSSManager.prototype.inspectorStyleSheetsForFrame):
11         (WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
12         (WI.CSSManager.prototype._inspectorStyleSheetsForFrame): Deleted.
13         Expose a way to fetch all inspector stylesheets for a given frame.
14         Make sure to associate inspector stylesheets with their frame.
15
16         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
17         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
18         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
19         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
20         Add paths for inspector stylesheet creation/fetching when grouping by path.
21         Sort inspector stylesheets as the first item of an origin/frame when grouping by path.
22
23 2019-06-17  Jamal Nasser  <jamaln@mail.com>
24
25         Web Inspector: Go To Line dialog is white when in Dark Mode
26         https://bugs.webkit.org/show_bug.cgi?id=198596
27
28         Reviewed by Timothy Hatcher.
29
30         * UserInterface/Views/GoToLineDialog.css:
31         (@media (prefers-color-scheme: dark)):
32         (.go-to-line-dialog):
33         (.go-to-line-dialog > div > input):
34         (.go-to-line-dialog > div > input::placeholder):
35         (.go-to-line-dialog > div::before):
36
37 2019-06-17  Devin Rousso  <drousso@apple.com>
38
39         Web Inspector: Sources: searching doesn't use the case sensitive or regex global settings
40         https://bugs.webkit.org/show_bug.cgi?id=198897
41
42         Reviewed by Joseph Pecoraro.
43
44         * UserInterface/Views/SourceCodeTextEditor.js:
45         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
46
47 2019-06-13  Devin Rousso  <drousso@apple.com>
48
49         Web Inspector: REGRESSION(r246178): extra spaces added in at-rules when formatting CSS
50         https://bugs.webkit.org/show_bug.cgi?id=198806
51
52         Reviewed by Joseph Pecoraro.
53
54         * UserInterface/Workers/Formatter/CSSFormatter.js:
55         (CSSFormatter.prototype._format):
56         Add more specific tests for at-rules, and add/remove whitespace depending on the type of
57         at-rule (e.g. `@supports` vs `@media`), as well as where the scanner is in the parameters of
58         the at at-rule (e.g. `@supports |` vs `@media (|`).
59
60         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
61         (FormatterContentBuilder):
62         (FormatterContentBuilder.prototype.get lastToken): Added.
63         (FormatterContentBuilder.prototype.get currentLine):
64         (FormatterContentBuilder.prototype.removeLastNewline):
65         (FormatterContentBuilder.prototype.removeLastWhitespace):
66         (FormatterContentBuilder.prototype._popFormattedContent):
67         (FormatterContentBuilder.prototype._append):
68         Update `lastTokenWasNewline` and `lastTokenWasWhitespace` when removing newlines/whitespace.
69         Memoize the `currentLine` so it's less expensive to re-fetch.
70
71 2019-06-13  Devin Rousso  <drousso@apple.com>
72
73         Web Inspector: Settings: indent type and size settings aren't respected everywhere
74         https://bugs.webkit.org/show_bug.cgi?id=198804
75
76         Reviewed by Timothy Hatcher.
77
78         * UserInterface/Views/CodeMirrorEditor.js:
79         (WI.CodeMirrorEditor.create):
80         When creating a `CodeMirror` instance, default to using the global `Setting`s as the options.
81         If an override is specified in `options`, it will take precedence and the `CodeMirror` will
82         ignore any changes to the `Setting` as well.
83
84         * UserInterface/Views/TextEditor.js:
85         (WI.TextEditor):
86         (WI.TextEditor.prototype.close): Deleted.
87
88         * UserInterface/Views/AuditTestCaseContentView.js:
89         (WI.AuditTestCaseContentView.prototype.layout):
90         * UserInterface/Views/BreakpointActionView.js:
91         (WI.BreakpointActionView.prototype._updateBody):
92         * UserInterface/Views/ConsolePrompt.js:
93         (WI.ConsolePrompt):
94         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
95         (WI.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
96         Remove overrides that aren't necessary for `CodeMirror` to fit in the container element:
97          - `showWhitespaceCharacters`
98          - `indentWithTabs`
99          - `indentUnit`
100
101         * UserInterface/Views/SourceCodeTextEditor.js:
102         (WI.SourceCodeTextEditor.prototype.close):
103         * UserInterface/Views/ShaderProgramContentView.js:
104         (WI.ShaderProgramContentView.prototype.closed): Deleted.
105         * UserInterface/Views/TextContentView.js:
106         (WI.TextContentView.prototype.closed): Deleted.
107         * UserInterface/Views/TextResourceContentView.js:
108         (WI.TextResourceContentView.prototype.closed):
109         Delete the logic for removing event listeners from global `Setting`, as it didn't work
110         anyways, since none of the event listeners were added using a `thisObject`.
111
112 2019-06-13  Devin Rousso  <drousso@apple.com>
113
114         Web Inspector: Settings: sticky header disappears when over scrolling
115         https://bugs.webkit.org/show_bug.cgi?id=198833
116
117         Reviewed by Joseph Pecoraro.
118
119         * UserInterface/Views/SettingsTabContentView.css:
120         (.content-view.settings .navigation-bar):
121         (.content-view.settings > .settings-view): Added.
122         (.content-view.settings): Deleted.
123
124 2019-06-10  Devin Rousso  <drousso@apple.com>
125
126         Web Inspector: Timelines: imported recordings do not have JavaScript call trees
127         https://bugs.webkit.org/show_bug.cgi?id=197490
128         <rdar://problem/50589158>
129
130         Reviewed by Joseph Pecoraro.
131
132         * UserInterface/Models/TimelineRecording.js:
133         (WI.TimelineRecording.prototype.initializeCallingContextTrees):
134         Make sure to actually save the provided stack traces and samples in the export data.
135
136         * UserInterface/Models/ScriptTimelineRecord.js:
137         (WI.ScriptTimelineRecord.fromJSON):
138         (WI.ScriptTimelineRecord.prototype.toJSON):
139         Drive-by: include `extraDetails`, which contains useful information like "default prevented".
140
141 2019-06-10  Nikita Vasilyev  <nvasilyev@apple.com>
142
143         REGRESSION(r244268): Web Inspector: Styles: navigating from Computed to Styles doesn't work
144         https://bugs.webkit.org/show_bug.cgi?id=198508
145         <rdar://problem/51375503>
146
147         Reviewed by Matt Baker.
148
149         It didn't work because the detached sidebar panel tried to access its parent view (this.parentSidebar).
150
151         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
152         (WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Added.
153         (WI.ComputedStyleDetailsSidebarPanel):
154         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
155         (WI.GeneralStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Deleted.
156         Move computedStyleDetailsPanelShowProperty to ComputedStyleDetailsSidebarPanel since it's the only
157         panel where it's needed.
158
159 2019-06-10  Alexey Shvayka  <shvaikalesh@gmail.com>
160
161         Web Inspector: "Copy Path to Property" doesn't work with multiline keys
162         https://bugs.webkit.org/show_bug.cgi?id=198691
163
164         Reviewed by Matt Baker.
165
166         Correctly escape line terminators to prevent doubleQuotedString from returning malformed strings.
167
168         * UserInterface/Base/Utilities.js: Use JSON.stringify.
169
170 2019-06-10  Devin Rousso  <drousso@apple.com>
171
172         Web Inspector: REGRESSION(r246025): prototypes in object previews are visible even when setting `showOnlyJSON`
173         https://bugs.webkit.org/show_bug.cgi?id=198721
174
175         Reviewed by Joseph Pecoraro.
176
177         * UserInterface/Views/ObjectTreeView.css:
178         (.object-tree.properties-only.json-only .object-tree-property.prototype-property): Added.
179         (.object-tree.properties-only.json-only .object-tree-property .prototype-property): Deleted.
180
181 2019-06-07  Nikita Vasilyev  <nvasilyev@apple.com>
182
183         Web Inspector: longhand CSS properties overridden by shorthands miss strikethrough
184         https://bugs.webkit.org/show_bug.cgi?id=198629
185         <rdar://problem/51504160>
186
187         Reviewed by Devin Rousso.
188
189         Longhand CSS properties (e.g. "font-size") overriden by shorthands (e.g. "font") now have strikethroughs.
190
191         * UserInterface/Models/CSSProperty.js:
192         (WI.CSSProperty.prototype.set overridingProperty):
193         (WI.CSSProperty):
194
195         * UserInterface/Models/DOMNodeStyles.js:
196         (WI.DOMNodeStyles.prototype._updateStyleCascade):
197         Call _associateRelatedProperties before _markOverriddenProperties because
198         _associateRelatedProperties sets relatedShorthandProperty property, which
199         is now used by _markOverriddenProperties.
200
201         (WI.DOMNodeStyles.prototype._markOverriddenProperties.isOverriddenBy):
202         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
203
204 2019-06-06  Devin Rousso  <drousso@apple.com>
205
206         Web Inspector: Timelines: remove always disabled details sidebar navigation item
207         https://bugs.webkit.org/show_bug.cgi?id=198393
208
209         Reviewed by Timothy Hatcher.
210
211         * UserInterface/Views/TimelineTabContentView.js:
212         (WI.TimelineTabContentView):
213
214 2019-06-06  Devin Rousso  <drousso@apple.com>
215
216         Web Inspector: REGRESSION(r245833): Timelines: CPU: JavaScript label is missing and JavaScript section of pie chart is black
217         https://bugs.webkit.org/show_bug.cgi?id=198627
218
219         Reviewed by Joseph Pecoraro.
220
221         * UserInterface/Views/CPUTimelineView.js:
222         (WI.CPUTimelineView.displayNameForSampleType):
223         * UserInterface/Views/CPUTimelineView.css:
224         (.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-javascript):
225         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-javascript): Added.
226         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script): Deleted.
227         * UserInterface/Views/CPUUsageCombinedView.css:
228         (.cpu-usage-combined-view > .graph > .range-chart .sample-type-javascript): Added.
229         (.cpu-usage-combined-view > .graph > .range-chart .sample-type-script): Deleted.
230         Use the enum string added in r245833 (`sample-type-javascript`) instead of what was there
231         before (`sample-type-script`).
232
233         * UserInterface/Views/Variables.css:
234         (:root):
235         Rename `--cpu-script-*` to `--cpu-javascript-*`.
236
237 2019-06-06  Devin Rousso  <drousso@apple.com>
238
239         Web Inspector: Formatter: pretty-print CSS using a Worker
240         https://bugs.webkit.org/show_bug.cgi?id=197829
241         <rdar://problem/36891532>
242
243         Reviewed by Timothy Hatcher.
244
245         * UserInterface/Proxies/FormatterWorkerProxy.js:
246         (WI.FormatterWorkerProxy.prototype.formatCSS): Added.
247         * UserInterface/Workers/Formatter/FormatterWorker.js:
248         (FormatterWorker.prototype.formatCSS): Added.
249         * UserInterface/Workers/Formatter/CSSFormatter.js: Added.
250         (CSSFormatter):
251         (CSSFormatter.prototype.get success):
252         (CSSFormatter.prototype.get formattedText):
253         (CSSFormatter.prototype.get sourceMapData):
254         (CSSFormatter.prototype._format):
255
256         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
257         (FormatterContentBuilder.prototype.get currentLine): Added.
258
259         * UserInterface/Views/TextEditor.js:
260         (WI.TextEditor.prototype._canUseFormatterWorker):
261         (WI.TextEditor.prototype._startWorkerPrettyPrint):
262
263         * .eslintrc:
264
265 2019-06-06  Devin Rousso  <drousso@apple.com>
266
267         Web Inspector: Elements: print/rulers/compositing/paint navigation items shouldn't be visible if the inspected target doesn't have a PageAgent
268         https://bugs.webkit.org/show_bug.cgi?id=198410
269
270         Reviewed by Timothy Hatcher.
271
272         * UserInterface/Views/DOMTreeContentView.js:
273         (WI.DOMTreeContentView):
274         (WI.DOMTreeContentView.prototype.get navigationItems):
275         (WI.DOMTreeContentView.prototype._showRulersChanged):
276
277 == Rolled over to ChangeLog-2019-06-05 ==