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