8a02d292509f40ccb48707dabb6cdab7e086da5f
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2018-01-24  Nikita Vasilyev  <nvasilyev@apple.com>
2
3         REGRESSION (r226994): Web Inspector: Styles: Suggestions popover floats in top-left corner of Web Inspector after tabbing
4         https://bugs.webkit.org/show_bug.cgi?id=182027
5
6         Reviewed by Matt Baker.
7
8         r226994 added a layout of all properties on property removal. Layout caused
9         a property element to be removed from DOM right before dislaying the suggestion
10         popover, resulting in the popover being displayed at the top left corner.
11
12         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
13         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
14         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
15         Only update property view indices when a property is removed.
16
17         * UserInterface/Views/SpreadsheetStyleProperty.js:
18         (WI.SpreadsheetStyleProperty):
19         (WI.SpreadsheetStyleProperty.prototype.set index):
20
21         * UserInterface/Views/SpreadsheetTextField.js:
22         (WI.SpreadsheetTextField.prototype._updateCompletions):
23         Checking this._element.parentNode to see if the element is attached to the DOM tree is unreliable,
24         since the element may have a non-null parent node that is detached from the DOM tree. To fix that,
25         we could traverse element's ancestors, but I used a concise isConnected property instead.
26
27 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
28
29         ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:​22)​
30         https://bugs.webkit.org/show_bug.cgi?id=182059
31
32         Reviewed by Matt Baker.
33
34         * UserInterface/Models/ScriptSyntaxTree.js:
35         (WI.ScriptSyntaxTree.functionReturnDivot):
36         DOMAgent won't be available in a ServiceWorker or JSContext inspector. So add
37         a check for DOMAgent, and assume if DOMAgent doesn't exist that we should fall
38         back to the latest path (non-iOS 9) target.
39
40 2018-01-23  Joseph Pecoraro  <pecoraro@apple.com>
41
42         Web Inspector: Network's columns shake when scrolling at non-default zoom level
43         https://bugs.webkit.org/show_bug.cgi?id=181998
44         <rdar://problem/36449808>
45
46         Reviewed by Matt Baker.
47
48         * UserInterface/Views/Table.js:
49         When zoomed the bounding client rect values were fractional, which was
50         unexpected by this area of code. Floor the values to get a value we expect
51         to be able to evenly distribute.
52
53 2018-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
54
55         Web Inspector: Styles Redesign: data corruption when updating values quickly
56         https://bugs.webkit.org/show_bug.cgi?id=179461
57         <rdar://problem/35431882>
58
59         Reviewed by Joseph Pecoraro.
60
61         Data corruption used to happen because CSSStyleDeclaration.prototype.text didn't
62         update synchronously. Making two or more quick changes resulted in corrupted data.
63
64         Imagine we modify a CSS value 3 times:
65
66         Front-end:  (1)-(2)---(3)
67         Back-end:          (1)-----(2)-(3)
68
69         The first response from the backend could happen after the 2nd edit. In this patch,
70         CSSStyleDeclaration is locked when its view is being edited.
71
72         To correctly display invalid and overridden properties, the backend is allowed to update
73         CSSStyleDeclaration and CSSProperty when they're locked if the text from the backend
74         matches the model's text. This should happen when the backend is caught up with the
75         front-end changes.
76
77         * UserInterface/Models/CSSProperty.js:
78         (WI.CSSProperty.prototype.update):
79         * UserInterface/Models/CSSStyleDeclaration.js:
80         (WI.CSSStyleDeclaration):
81         (WI.CSSStyleDeclaration.prototype.get locked):
82         (WI.CSSStyleDeclaration.prototype.set locked):
83         (WI.CSSStyleDeclaration.prototype.set text):
84
85         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
86         (WI.SpreadsheetCSSStyleDeclarationEditor):
87         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
88         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
89         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get editing):
90         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set focused):
91         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set inlineSwatchActive):
92         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchActivated):
93         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchDeactivated):
94         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
95         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
96         Lock CSSStyleDeclaration when a CSS property name or value is focused or
97         an inline widget is active.
98
99         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
100         (WI.SpreadsheetCSSStyleDeclarationSection):
101         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
102         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
103         * UserInterface/Views/SpreadsheetStyleProperty.js:
104         (WI.SpreadsheetStyleProperty):
105         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
106         When selector is focused, clicking on the white-space should not add a new blank property.
107
108 2018-01-19  Ross Kirsling  <ross.kirsling@sony.com>
109
110         Web Inspector: Layers tab should do away with popovers (if possible)
111         https://bugs.webkit.org/show_bug.cgi?id=181805
112
113         Reviewed by Matt Baker.
114
115         * Localizations/en.lproj/localizedStrings.js:
116         Remove superfluous colon from a string.
117
118         * UserInterface/Main.html:
119         * UserInterface/Views/LayerDetailsSidebarPanel.css:
120         * UserInterface/Views/Layers3DContentView.css: Added.
121         Remove popover styling from sidebar, add new file with similar styling for canvas overlay.
122
123         * UserInterface/Views/LayerDetailsSidebarPanel.js:
124         (WI.LayerDetailsSidebarPanel):
125         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
126         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
127         (WI.LayerDetailsSidebarPanel.prototype._updateLayers):
128         (WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
129         (WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
130         (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Deleted.
131         (WI.LayerDetailsSidebarPanel.prototype._presentPopover): Deleted.
132         (WI.LayerDetailsSidebarPanel.prototype._contentForPopover): Deleted.
133         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons.addReason): Deleted.
134         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons): Deleted.
135         * UserInterface/Views/Layers3DContentView.js:
136         (WI.Layers3DContentView):
137         (WI.Layers3DContentView.prototype.shown):
138         (WI.Layers3DContentView.prototype.selectLayerById):
139         (WI.Layers3DContentView.prototype._canvasMouseDown):
140         (WI.Layers3DContentView.prototype._buildLayerInfoElement):
141         (WI.Layers3DContentView.prototype._updateLayerInfoElement):
142         (WI.Layers3DContentView.prototype._updateReasonsList):
143         Remove popover from sidebar table, overlay div with same data arrangement on top of the canvas.
144         Also reverse the fix from r226671 since the visualization is no longer unusable without the sidebar!
145
146 2018-01-19  Matt Baker  <mattbaker@apple.com>
147
148         Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
149         https://bugs.webkit.org/show_bug.cgi?id=181865
150         <rdar://problem/36664737>
151
152         Reviewed by Devin Rousso.
153
154         * UserInterface/Views/CanvasContentView.js:
155         (WI.CanvasContentView.prototype._recordingStarted):
156         (WI.CanvasContentView.prototype._recordingStopped):
157
158 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
159
160         Web Inspector: Styles Redesign: tabbing on commented out property throws exception
161         https://bugs.webkit.org/show_bug.cgi?id=180676
162         <rdar://problem/35981058>
163
164         Reviewed by Joseph Pecoraro.
165
166         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
167         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
168         Tabbing from the selector field should focus on the first editable property.
169         When no editable properties are present, a new blank property should be added after the commented out ones.
170
171         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
172         Shift-tabbing from the selector field should focus on the last editable property of the previous CSS rule.
173         When no editable properties are present, a new blank property should be added after the commented out ones.
174
175         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
176         When navigating between properties skip the commented out ones.
177
178         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyAfter):
179         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyBefore):
180         * UserInterface/Views/SpreadsheetStyleProperty.js:
181         (WI.SpreadsheetStyleProperty.prototype.get enabled):
182         (WI.SpreadsheetStyleProperty.prototype._update):
183
184 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
185
186         Web Inspector: Make styles sidebar always LTR
187         https://bugs.webkit.org/show_bug.cgi?id=175357
188         <rdar://problem/33787988>
189
190         Reviewed by Joseph Pecoraro.
191
192         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
193         (WI.SpreadsheetRulesStyleDetailsPanel):
194
195 2018-01-19  Keith Miller  <keith_miller@apple.com>
196
197         HaveInternalSDK includes should be "#include?"
198         https://bugs.webkit.org/show_bug.cgi?id=179670
199
200         Reviewed by Dan Bernstein.
201
202         * Configurations/Base.xcconfig:
203
204 2018-01-18  Dan Bernstein  <mitz@apple.com>
205
206         [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
207         https://bugs.webkit.org/show_bug.cgi?id=181803
208
209         Reviewed by Tim Horton.
210
211         * Configurations/Base.xcconfig: Updated.
212         * Configurations/DebugRelease.xcconfig: Ditto.
213         * Configurations/Version.xcconfig: Ditto.
214
215 2018-01-18  Devin Rousso  <webkit@devinrousso.com>
216
217         Web Inspector: Canvas Tab: record button on canvas card doesn't always show on hover, or is misplaced
218         https://bugs.webkit.org/show_bug.cgi?id=179183
219
220         Reviewed by Joseph Pecoraro.
221
222         * UserInterface/Views/CanvasOverviewContentView.css:
223         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop): Deleted.
224
225 2018-01-17  Devin Rousso  <webkit@devinrousso.com>
226
227         Web Inspector: clicking on a path component that has no siblings should select it
228         https://bugs.webkit.org/show_bug.cgi?id=181772
229
230         Reviewed by Joseph Pecoraro.
231
232         * UserInterface/Views/HierarchicalPathComponent.js:
233         (WI.HierarchicalPathComponent.prototype._updateSelectElement):
234         (WI.HierarchicalPathComponent.prototype._selectElementMouseDown):
235
236 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
237
238         Web Inspector: Add back localized strings for Styles sidebar panels
239         https://bugs.webkit.org/show_bug.cgi?id=181748
240         <rdar://problem/36583184>
241
242         Reviewed by Brian Burg.
243
244         * Localizations/en.lproj/localizedStrings.js:
245         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
246         (WI.ComputedStyleDetailsSidebarPanel):
247         * UserInterface/Views/RulesStyleDetailsSidebarPanel.js:
248         (WI.RulesStyleDetailsSidebarPanel):
249         * UserInterface/Views/VisualStyleDetailsSidebarPanel.js:
250         (WI.VisualStyleDetailsSidebarPanel):
251         Add back localized strings for panel titles lost in r225547.
252
253 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
254
255         Web Inspector: Super long URL string causes bad wrapping in Resources detail sidebar
256         https://bugs.webkit.org/show_bug.cgi?id=181617
257
258         Reviewed by Brian Burg.
259
260         * UserInterface/Views/DetailsSection.css:
261         (.details-section > .content > .group > .row.simple > .value):
262         Set the break to all characters.
263
264 2018-01-16  Matt Baker  <mattbaker@apple.com>
265
266         Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
267         https://bugs.webkit.org/show_bug.cgi?id=181706
268         <rdar://problem/36558221>
269
270         Reviewed by Joseph Pecoraro.
271
272         * UserInterface/Views/CanvasOverviewContentView.js:
273         (WI.CanvasOverviewContentView):
274         (WI.CanvasOverviewContentView.prototype._handleSpace):
275
276 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
277
278         Web Inspector: Make Console's Execution Context picker stand out when it is non-default
279         https://bugs.webkit.org/show_bug.cgi?id=181628
280         <rdar://problem/36492044>
281
282         Reviewed by Matt Baker.
283
284         * UserInterface/Views/HierarchicalPathComponent.css:
285         (.hierarchical-path-component > .selector-arrows):
286         * UserInterface/Views/HierarchicalPathComponent.js:
287         (WI.HierarchicalPathComponent.prototype.set selectorArrows):
288         Switch to SVG element so we can style the arrows.
289
290         * UserInterface/Views/QuickConsole.css:
291         (.quick-console > .navigation-bar > .hierarchical-path .execution-context):
292         (.quick-console > .navigation-bar > .hierarchical-path .execution-context .separator):
293         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context):
294         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context .selector-arrows):
295         Styles for the execution context picker. We hide the unused separator
296         and instead use margin so that the selected background and border don't
297         have an extra 7px on the right/end side.
298
299         * UserInterface/Views/QuickConsole.js:
300         (WI.QuickConsole.prototype._activeExecutionContextChanged):
301         Toggle the non-default class name on the path.
302
303 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
304
305         Web Inspector: Styles: pressing down key should select first item from completion list when focusing on empty value
306         https://bugs.webkit.org/show_bug.cgi?id=181633
307         <rdar://problem/36501797>
308
309         Reviewed by Joseph Pecoraro.
310
311         * UserInterface/Views/SpreadsheetTextField.js:
312         (WI.SpreadsheetTextField.prototype._updateCompletions):
313
314 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
315
316         Web Inspector: Styles Redesign: Long value causes bad wrapping
317         https://bugs.webkit.org/show_bug.cgi?id=181618
318         <rdar://problem/36485175>
319
320         Reviewed by Joseph Pecoraro.
321
322         Wrap long values only when editing.
323
324         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
325         (.spreadsheet-style-declaration-editor .value.editing):
326
327 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
328
329         Web Inspector: Styles Redesign: clicking on the white space after the property sometimes places a blank property at the wrong index
330         https://bugs.webkit.org/show_bug.cgi?id=179585
331         <rdar://problem/35490780>
332
333         Reviewed by Joseph Pecoraro.
334
335         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
336         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
337         Layout call is needed to update data-property-index attributes on the property views.
338
339 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
340
341         Web Inspector: Network Tab - Export HAR Context Menu not working
342         https://bugs.webkit.org/show_bug.cgi?id=181694
343         <rdar://problem/36479197>
344
345         Reviewed by Brian Burg.
346
347         * UserInterface/Views/NetworkTableContentView.js:
348         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
349         Ensure `this` works in the handler.
350
351 2018-01-15  Matt Baker  <mattbaker@apple.com>
352
353         Web Inspector: TabBar redesign: add context menu to TabBar for toggling available tabs
354         https://bugs.webkit.org/show_bug.cgi?id=181448
355         <rdar://problem/36383298>
356
357         Reviewed by Devin Rousso.
358
359         * UserInterface/Base/Main.js:
360         (WI.loaded):
361         (WI.contentLoaded):
362         Reorder production tab classes and default (open) tabs.
363         (WI.registerTabClass): Removed.
364         Not used.
365
366         * UserInterface/Base/Object.js:
367         Remove notification that is no longer used.
368
369         * UserInterface/Views/GeneralTabBarItem.js:
370         (WI.GeneralTabBarItem):
371         (WI.GeneralTabBarItem.prototype.set title):
372         (WI.GeneralTabBarItem.prototype._handleContextMenuEvent): Deleted.
373         Remove per-tab context menu (provided Close Tab and Close Other Tabs).
374
375         * UserInterface/Views/NewTabContentView.js:
376         (WI.NewTabContentView):
377
378         * UserInterface/Views/TabBar.js:
379         (WI.TabBar):
380         (WI.TabBar.prototype._handleContextMenu):
381
382         * UserInterface/Views/TabBrowser.js:
383         (WI.TabBrowser):
384         (WI.TabBrowser._handleNewTabContextMenu): Deleted.
385         No longer needed.
386
387 2018-01-13  Nikita Vasilyev  <nvasilyev@apple.com>
388
389         Web Inspector: Styles Redesign: properties should never be semitransparent or crossed out while editing
390         https://bugs.webkit.org/show_bug.cgi?id=180793
391         <rdar://problem/36038813>
392
393         Reviewed by Devin Rousso.
394
395         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
396         (.spreadsheet-style-declaration-editor .value.editing):
397         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) .content > *):
398         (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled) .content > *):
399         (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .content .value):
400         (.spreadsheet-style-declaration-editor .property.not-inherited .content > *):
401         * UserInterface/Views/SpreadsheetStyleProperty.js:
402         (WI.SpreadsheetStyleProperty.prototype._update):
403
404 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
405
406         Web Inspector: Drop support for iOS 7 targets
407         https://bugs.webkit.org/show_bug.cgi?id=181549
408         <rdar://problem/36444813>
409
410         Reviewed by Brian Burg.
411
412         * Versions/Inspector-iOS-7.0.json: Removed.
413         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: Removed.
414         Remove protocol snapshot and generated commands for iOS 7.
415
416         * UserInterface/Base/Main.js:
417         * UserInterface/Controllers/BreakpointPopoverController.js:
418         (WI.BreakpointPopoverController.prototype._createPopoverContent):
419         * UserInterface/Controllers/DebuggerManager.js:
420         (WI.DebuggerManager.prototype._setBreakpoint):
421         * UserInterface/Controllers/SourceMapManager.js:
422         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
423         * UserInterface/Models/Instrument.js:
424         (WI.Instrument.startLegacyTimelineAgent):
425         * UserInterface/Models/ResourceTimingData.js:
426         * UserInterface/Models/ScriptTimelineRecord.js:
427         (WI.ScriptTimelineRecord.EventType.displayName):
428         * UserInterface/Models/SourceMapResource.js:
429         (WI.SourceMapResource.prototype.requestContentFromBackend):
430         * UserInterface/Protocol/CSSObserver.js:
431         (WI.CSSObserver.prototype.regionLayoutUpdated): Deleted.
432         * UserInterface/Protocol/RemoteObject.js:
433         (WI.RemoteObject.fromPayload):
434         Remove code that was only necessary to support iOS 7.
435
436 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
437
438         Web Inspector: Support JSX (React) syntax highlighting
439         https://bugs.webkit.org/show_bug.cgi?id=181607
440         <rdar://problem/36442564>
441
442         Reviewed by Brian Burg.
443
444         * UserInterface/Base/MIMETypeUtilities.js:
445         (WI.mimeTypeForFileExtension):
446         (WI.fileExtensionForMIMEType):
447         * UserInterface/Models/Resource.js:
448         Support the jsx extension and mime types.
449
450         * UserInterface/Main.html:
451         * Scripts/update-codemirror-resources.rb:
452         * UserInterface/External/CodeMirror/jsx.js: Added.
453         Include new mode from CodeMirror@d8926768.
454
455 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
456
457         Web Inspector: Rename "Query String" section as "Query String Parameters" for clarity
458         https://bugs.webkit.org/show_bug.cgi?id=181464
459
460         Reviewed by Darin Adler.
461
462         * Localizations/en.lproj/localizedStrings.js:
463         * UserInterface/Views/ResourceHeadersContentView.js:
464         (WI.ResourceHeadersContentView.prototype.initialLayout):
465
466 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
467
468         Web Inspector: Remove unused variable in WI.DebuggerSidebarPanel
469         https://bugs.webkit.org/show_bug.cgi?id=181517
470
471         Reviewed by Matt Baker.
472
473         * UserInterface/Views/DebuggerSidebarPanel.js:
474
475 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
476
477         REGRESSION(r218975): Web Inspector: Add back NavigationSidebarPanel initialization parameter used by SearchSidebarPanel (top overflow shadow)
478         https://bugs.webkit.org/show_bug.cgi?id=181518
479         <rdar://problem/36427197>
480
481         Reviewed by Matt Baker.
482
483         * UserInterface/Views/NavigationSidebarPanel.css:
484         (.sidebar > .panel.navigation > .overflow-shadow.top):
485         * UserInterface/Views/NavigationSidebarPanel.js:
486         (WI.NavigationSidebarPanel):
487         Add back the initialization parameter still used by SearchSidebarPanel
488         and add back its implementation. There were still references to
489         dynamically update _topOverflowShadowElement in NavigationSidebarPanel.
490
491 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
492
493         Web Inspector: Incorrect check with WI.debuggableType
494         https://bugs.webkit.org/show_bug.cgi?id=181515
495         <rdar://problem/36425509>
496
497         Reviewed by Brian Burg.
498
499         * UserInterface/Base/Main.js:
500         (WI.contentLoaded):
501         This moved to WI.sharedApp a while ago.
502
503 2018-01-10  Matt Baker  <mattbaker@apple.com>
504
505         Web Inspector: Canvas tab: throttle recording slider updates
506         https://bugs.webkit.org/show_bug.cgi?id=180839
507         <rdar://problem/36057849>
508
509         Reviewed by Joseph Pecoraro
510
511         * UserInterface/Base/Utilities.js:
512         Add Object.throttle and Function.cancelThrottle. Repeated calls to a
513         function on a throttled object are delayed, so that the function isn't
514         invoked more frequently than the specified delay value.
515
516         For a description of throttling behavior see:
517           - http://www.chrislondon.co/throttling-vs-debouncing
518           - http://benalman.com/projects/jquery-throttle-debounce-plugin
519
520         * UserInterface/Views/RecordingContentView.js:
521         (WI.RecordingContentView.prototype.updateActionIndex):
522         Throttle frequency of canvas snapshot creation to 200ms.
523         (WI.RecordingContentView.prototype.hidden):
524         Prevent trailing edge call after hiding the view.
525
526 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
527
528         Web Inspector: Should not try to autocomplete subsections of a string
529         https://bugs.webkit.org/show_bug.cgi?id=181461
530         <rdar://problem/36369421>
531
532         Reviewed by Brian Burg.
533
534         * UserInterface/Controllers/CodeMirrorCompletionController.js:
535         (WI.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
536         Disable autocompletion within strings.
537
538 2018-01-09  Joseph Pecoraro  <pecoraro@apple.com>
539
540         REGRESSION(r201855): Web Inspector: Should see "length" autocompletion suggestion on a string literal
541         https://bugs.webkit.org/show_bug.cgi?id=181462
542         <rdar://problem/36390699>
543
544         Reviewed by Matt Baker.
545
546         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
547         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getCompletions):
548         This is code that runs on the inspected target, which may have an old version of
549         WebKit/JavaScriptCore, so don't use new syntax like this.
550
551         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
552         We intended to return the result by as a JSON value instead of a RemoteObject.
553
554 2018-01-09  Ross Kirsling  <ross.kirsling@sony.com>
555
556         Web Inspector: Layers sidebar shows popover on selection even when collapsed
557         https://bugs.webkit.org/show_bug.cgi?id=181465
558
559         Reviewed by Matt Baker.
560
561         * UserInterface/Views/LayerDetailsSidebarPanel.js:
562         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
563         Have sidebar show itself if necessary before displaying popover.
564
565 2018-01-08  Joseph Pecoraro  <pecoraro@apple.com>
566
567         Web Inspector: Find next / previous within a resource content view does not have bouncy highlight when editor scrolls
568         https://bugs.webkit.org/show_bug.cgi?id=181279
569         <rdar://problem/36291097>
570
571         Reviewed by Brian Burg.
572
573         * UserInterface/Views/TextEditor.js:
574         (WI.TextEditor.prototype._revealSearchResult):
575         Reposition the bouncy highlight on scroll based on the CodeMirror
576         line/ch position of the search result.
577
578         (WI.TextEditor.prototype._removeBouncyHighlightElementIfNeeded):
579         Track the bouncy highlight scroll handler in a member variable so that
580         we always remember to remove it and don't leak scroll handlers.
581
582 2018-01-07  David Kilzer  <ddkilzer@apple.com>
583
584         Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
585         <https://webkit.org/b/181256>
586         <rdar://problem/36281730>
587
588         Reviewed by Darin Adler.
589
590         * Configurations/Base.xcconfig:
591         (WARNING_CFLAGS): Add -Wcast-qual.
592
593 2018-01-05  Joseph Pecoraro  <pecoraro@apple.com>
594
595         Web Inspector: Add another Protocol Version
596         https://bugs.webkit.org/show_bug.cgi?id=181354
597         <rdar://problem/35432817>
598
599         Reviewed by Matt Baker.
600
601         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js: Added.
602         * Versions/Inspector-iOS-11.3.json: Added.
603
604 2018-01-04  Devin Rousso  <webkit@devinrousso.com>
605
606         Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic
607         https://bugs.webkit.org/show_bug.cgi?id=180770
608
609         Reviewed by Joseph Pecoraro.
610
611         * UserInterface/Models/Canvas.js:
612         (WI.Canvas.fromPayload):
613         (WI.Canvas.prototype.get contextType):
614         (WI.Canvas.prototype.saveIdentityToCookie):
615         (WI.Canvas.prototype.get frame): Deleted.
616
617 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
618
619         REGRESSION (r225709): Web Inspector: CSS Source maps not loading
620         https://bugs.webkit.org/show_bug.cgi?id=181314
621         <rdar://problem/36177620>
622
623         Reviewed by Brian Burg.
624
625         * UserInterface/Controllers/SourceMapManager.js:
626         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
627         * UserInterface/Models/SourceMapResource.js:
628         (WI.SourceMapResource.prototype.requestContentFromBackend):
629         Correct this so that we only fall back to a reasonable frame id
630         if we couldn't determine a frame id from earlier. Previously this
631         was incorrectly clearing the frame id if we had gotten it earlier.
632
633         * UserInterface/Test.html:
634         * UserInterface/Test/Test.js:
635         (WI.loaded):
636         Add SourceMap related files for tests.
637
638 2018-01-04  Brian Burg  <bburg@apple.com>
639
640         Web Inspector: Capture Element Screenshot looks fuzzy
641         https://bugs.webkit.org/show_bug.cgi?id=175734
642         <rdar://problem/33803377>
643
644         Reviewed by Joseph Pecoraro and Simon Fraser.
645
646         Spruce up these functions a bit. They now optionally return a promise
647         if no callback is supplied. They now can take either a WI.DOMNode or a node id.
648
649         * UserInterface/Controllers/DOMTreeManager.js:
650         (WI.DOMTreeManager.prototype.querySelector):
651         (WI.DOMTreeManager.prototype.querySelectorAll):
652
653 2018-01-04  Brian Burg  <bburg@apple.com>
654
655         Web Inspector: add RemoteObject.fetchProperties and some basic tests for RemoteObject API
656         https://bugs.webkit.org/show_bug.cgi?id=180945
657
658         Reviewed by Joseph Pecoraro.
659
660         Add a new method, fetchProperties, which async fetches an arbitrary list of properties
661         from a RemoteObject. This is intended for writing tests and other quick evaluations,
662         so it has some behaviors that are suitable in these situations:
663         - If the evaluation throws an exception, the result will reject with that exception.
664         - If there is a protocol error for some reason, the result will reject with an exception.
665         - Non-string and non-number keys cause an exception, as this is probably not intended.
666         - Does not accept a callback, returns a promise only. New code should use async.
667
668         For full fidelity introspection of property descriptors, clients should use the existing
669         getOwnPropertyDescriptor[s] class of methods.
670
671         * UserInterface/Protocol/RemoteObject.js:
672         (WI.RemoteObject.prototype.async.fetchProperties): Added.
673         - Validate specified keys and remove duplicates.
674         - Request properties one-by-one to avoid fetching all descriptors and dealing with previews.
675         - Unwrap returned primitive values to avoid unnecessary munging in tests.
676
677         (WI.RemoteObject.prototype.getProperty):
678         - Rework this to return a promise if no callback was supplied.
679         - Introduce stricter property type checking to avoid unintended mistakes.
680
681         (WI.RemoteObject.prototype.callFunction):
682         - Rework this to return a promise if no callback was supplied.
683         - Turn thrown exceptions and protocol errors into rejected promises.
684
685 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
686
687         Web Inspector: ⌘G / ⇧⌘G text search does not working after closing find banner
688         https://bugs.webkit.org/show_bug.cgi?id=181280
689         <rdar://problem/36291175>
690
691         Reviewed by Matt Baker.
692
693         * UserInterface/Views/ContentBrowser.js:
694         (WI.ContentBrowser.prototype._findBannerDidHide):
695         When the find banner is hidden trigger a new ContentView method,
696         searchHidden instead of the destructive searchCleared. This allows
697         most content views (text editors, DOM tree, Network Headers view)
698         to keep their populated search results.
699
700         * UserInterface/Views/ContentView.js:
701         (WI.ContentView.prototype.searchHidden):
702         * UserInterface/Views/LogContentView.js:
703         (WI.LogContentView.prototype.searchHidden):
704         By default searchHidden does nothing. The Console's LogContentView
705         treats the find banner differently and clears its search results.
706
707         * UserInterface/Views/TextEditor.js:
708         (WI.TextEditor.prototype.searchCleared):
709         Modernize some code while working in this area.
710
711         * UserInterface/Views/Main.css:
712         (.bouncy-highlight):
713         Ensure black text on yellow background in the bouncy highlight. In the
714         DOM Tree it could have been white if the find banner was closed.
715
716 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
717
718         Replace hard-coded paths in shebangs with #!/usr/bin/env
719         https://bugs.webkit.org/show_bug.cgi?id=181040
720
721         Reviewed by Alex Christensen.
722
723         * Scripts/combine-resources.pl:
724         * Scripts/copy-user-interface-resources-dryrun.rb:
725         * Scripts/copy-user-interface-resources.pl:
726         * Scripts/fix-worker-imports-for-optimized-builds.pl:
727         * Scripts/remove-console-asserts-dryrun.rb:
728         * Scripts/remove-console-asserts.pl:
729         * Scripts/update-LegacyInspectorBackendCommands.rb:
730         * Scripts/update-codemirror-resources.rb:
731         * WebInspectorUI.vcxproj/build-webinspectorui.pl:
732
733 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
734
735         Web Inspector: "Log Value" context menu is sometimes unavailable
736         https://bugs.webkit.org/show_bug.cgi?id=181278
737         <rdar://problem/36281649>
738
739         Reviewed by Devin Rousso.
740
741         * UserInterface/Views/ObjectPreviewView.css:
742         (.object-preview > .title):
743         * UserInterface/Views/ObjectTreeView.css:
744         (.object-tree.expanded > .title):
745         Make the expanded object title information 16px tall to match ObjectTree
746         tree element row heights. This eliminates the floating console message
747         location from overlapping the first ObjectTree's TreeElement and causing
748         truncation and other behavior issues (like Context Menu identification).
749
750 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
751
752         Web Inspector: RTL - DOM Tree Element selection doesn't work
753         https://bugs.webkit.org/show_bug.cgi?id=181275
754         <rdar://problem/36290450>
755
756         Reviewed by Devin Rousso.
757
758         * UserInterface/Views/TreeOutline.js:
759         (WI.TreeOutline.prototype.treeElementFromEvent):
760         Provide a better explanation for why we are making the `x` adjustment here,
761         to detect the inner most tree element along the horizontal. Fix the algorithm
762         for RTL, since the intent is to adjust to the trailing edge of the container
763         which is on the opposite side in RTL.
764
765 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
766
767         Web Inspector: Find banner sometimes does not work (when already populated and shown for first time on resource)
768         https://bugs.webkit.org/show_bug.cgi?id=181255
769         <rdar://problem/36248855>
770
771         Reviewed by Matt Baker.
772
773         * UserInterface/Views/TextEditor.js:
774         (WI.TextEditor.prototype.set string):
775         Defer any early searches until the initial content of a TextEditor has been set.
776         Such searches can happen when the FindBanner already has content when a
777         ContentView is first opened and needs to load its content from the backend.
778         Further, even though the content may be loaded from the backend before the
779         search results, microtask hops might cause the content to get to the TextEditor
780         after the search results.
781
782 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
783
784         REGRESSION: Web Inspector: Debugger tab doesn't restore selected resource on reload
785         https://bugs.webkit.org/show_bug.cgi?id=181253
786         <rdar://problem/36280564>
787
788         Reviewed by Matt Baker.
789
790         * UserInterface/Views/DebuggerSidebarPanel.js:
791         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
792         Add braces to ensure the trailing else is actually trailing the outer
793         chain as it was intended to be.
794
795 2018-01-02  Joseph Pecoraro  <pecoraro@apple.com>
796
797         Web Inspector: Clicking source location link in Console unexpectedly jumps to Network tab
798         https://bugs.webkit.org/show_bug.cgi?id=181229
799         <rdar://problem/36075219>
800
801         Reviewed by Matt Baker.
802
803         * UserInterface/Base/Main.js:
804         Cleanup linkifyURLAsNode. Ignore Search tab in generic handlePossibleLinkClick
805         when not already in the Search tab.
806
807         * UserInterface/Views/CallFrameView.js:
808         (WI.CallFrameView):
809         Ignore Search and Network tab in CallFrame links.
810
811         * UserInterface/Views/TabBrowser.js:
812         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
813         Improve style.
814
815 == Rolled over to ChangeLog-2018-01-01 ==