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