Web Inspector: Object.shallowEqual([{}], [{}]) should return true
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-12-05  Matt Baker  <mattbaker@apple.com>
2
3         Web Inspector: Object.shallowEqual([{}], [{}]) should return true
4         https://bugs.webkit.org/show_bug.cgi?id=165397
5
6         Reviewed by Brian Burg.
7
8         * UserInterface/Base/Utilities.js:
9         (value):
10         Array.shallowEqual should compare array items using strict equivalence,
11         and on failure defer to Object.shallowEqual.
12
13 2016-12-05  Joseph Pecoraro  <pecoraro@apple.com>
14
15         Web Inspector: Remove legacy styles
16         https://bugs.webkit.org/show_bug.cgi?id=165389
17
18         Reviewed by Matt Baker.
19
20         Remove styles for platforms we don't build on anymore (Mavericks
21         and Mountain Lion). There are also no "unknown-mac" styles to
22         upgrade to a named platform.
23
24         * UserInterface/Base/Platform.js:
25         Add sierra and remove older unsupported platforms.
26
27         * UserInterface/Views/Main.css:
28         (body):
29         (body:not(.mavericks)): Deleted.
30         * UserInterface/Views/TabBar.css:
31         (body.mavericks .tab-bar > .item:not(.disabled).selected): Deleted.
32         * UserInterface/Views/Toolbar.css:
33         (body .toolbar):
34         (body.window-inactive .toolbar):
35         (body.mac-platform:not(.docked) .toolbar):
36         (body.mac-platform:not(.docked)):
37         (body:not(.mavericks) .toolbar,): Deleted.
38         (body.window-inactive:not(.mavericks) .toolbar): Deleted.
39         (body.mac-platform:not(.docked, .mavericks) .toolbar): Deleted.
40         (body.mac-platform:not(.docked, .mavericks)): Deleted.
41         Remove mavericks specific styles.
42
43 2016-12-02  Andy Estes  <aestes@apple.com>
44
45         [Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
46         https://bugs.webkit.org/show_bug.cgi?id=164492
47
48         Reviewed by Dan Bernstein.
49
50         * Configurations/WebInspectorUIFramework.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
51         com.apple.$(PRODUCT_NAME:rfc1034identifier).
52         * Info.plist: Changed CFBundleIdentifier's value from
53         com.apple.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}.
54
55 2016-12-02  Nikita Vasilyev  <nvasilyev@apple.com>
56
57         REGRESSION (r192344): Web Inspector: Turning off Code Coverage or Type Profiler logs an error
58         https://bugs.webkit.org/show_bug.cgi?id=164804
59         <rdar://problem/29278028>
60
61         Reviewed by Matt Baker.
62
63         BasicBlockAnnotator and TypeTokenAnnotator were instanciated for a resource in an inactive Debugger tab.
64
65         * UserInterface/Views/NavigationSidebarPanel.js:
66         (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
67         Don't show any content view if we are not in a selected tab.
68
69 2016-12-01  Matt Baker  <mattbaker@apple.com>
70
71         Web Inspector: Show async stack traces for workers
72         https://bugs.webkit.org/show_bug.cgi?id=165235
73         <rdar://problem/29450172>
74
75         Reviewed by Joseph Pecoraro.
76
77         * UserInterface/Views/CallFrameTreeElement.css:
78         (.tree-outline > .children > .item.call-frame.async-boundary):
79         (.tree-outline:not(.single-thread) > .children > .item.call-frame.async-boundary):
80         (.tree-outline .item.call-frame.async-boundary::before):
81         (.tree-outline.single-thread .item.call-frame.async-boundary::before):
82         (.tree-outline .item.call-frame.async-boundary): Deleted.
83         Style changes for single/multiple-thread call stacks.
84         Padding changes to account for Thread tree element.
85         Make selectors more specific where needed.
86
87         * UserInterface/Views/DebuggerSidebarPanel.css:
88         (.sidebar > .panel.navigation.debugger .tree-outline.single-thread > .item.thread):
89         (.sidebar > .panel.navigation.debugger .tree-outline.single-thread):
90         Style changes for single/multiple-thread call stacks.
91
92         * UserInterface/Views/DebuggerSidebarPanel.js:
93         (WebInspector.DebuggerSidebarPanel):
94         Use a single tree outline for showing a single thread or multiple threads.
95         For single-threaded, hide Thread tree element and un-indent children.
96
97         (WebInspector.DebuggerSidebarPanel.prototype._targetAdded):
98         (WebInspector.DebuggerSidebarPanel.prototype._targetRemoved):
99         (WebInspector.DebuggerSidebarPanel.prototype._updateCallStackTreeOutline):
100         Update tree style and whether Thread tree element is selectable.
101         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
102         Remove support for second tree outline.
103
104         (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks): Deleted.
105         (WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement): Deleted.
106         (WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks): Deleted.
107         (WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks): Deleted.
108         No longer needed after unifying tree outlines.
109
110         * UserInterface/Views/ThreadTreeElement.js:
111         (WebInspector.ThreadTreeElement.prototype.refresh):
112         Append call frames from the async stack trace.
113
114 2016-11-30  Joseph Pecoraro  <pecoraro@apple.com>
115
116         Web Inspector: Clicking on link in Web Inspector can cause UIProcess to crash
117         https://bugs.webkit.org/show_bug.cgi?id=165157
118         <rdar://problem/27896562>
119
120         Reviewed by Brian Burg.
121
122         By correctly disallowing slashes in the scheme Web Inspector resolves
123         the correct absolute URL and doesn't end up trying to navigate to an
124         incorrect file URL.
125
126         * UserInterface/Base/URLUtilities.js:
127         (parseURL):
128         Disallow "/" characters in the scheme portion. (/http://example.com)
129         Allow path to be optional before a fragment portion. (http://example.com#frag)
130
131 2016-11-29  Joseph Pecoraro  <pecoraro@apple.com>
132
133         Web Inspector: Improve name sorting in HeapSnapshot data grids
134         https://bugs.webkit.org/show_bug.cgi?id=165170
135         <rdar://problem/28784421>
136
137         Reviewed by Matt Baker.
138
139         When sorting the Name column, group named properties and unnamed
140         properties and sort them each individually:
141
142           - Sort named properties by their property name (property names will be unique if they exist)
143           - Sort unnamed properties by their class name (guaranteed)
144           - Sort any tied class names by their object id
145
146         This makes using the Object Graph with Name sort easier to follow.
147         In the ascending sort you see all the named properties first,
148         followed by the unnamed (internal) properties.
149
150         * UserInterface/Views/HeapSnapshotContentView.js:
151         (WebInspector.HeapSnapshotObjectGraphContentView):
152         Since this data grid column now sorts on more than just the "Class Name"
153         rename it to "Name".
154
155         * UserInterface/Views/HeapSnapshotDataGridTree.js:
156         (WebInspector.HeapSnapshotDataGridTree.buildSortComparator):
157         Make the sort of the `className` column more general to handle sorting
158         by property names, class names, and object identifiers.
159
160         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
161         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get propertyName):
162         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
163         Provide a lazy `propertyName` accessor where we compute it once and stash
164         it on the DataGridNode to avoid extra work when resorting.
165
166         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate.propertyName):
167         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
168         In the initial populated sort, provide the necessary property name property
169         the sort comparator expects.
170
171 2016-11-29  Matt Baker  <mattbaker@apple.com>
172
173         Web Inspector: Breakpoints button enabled state is too subtle
174         https://bugs.webkit.org/show_bug.cgi?id=165153
175
176         Reviewed by Joseph Pecoraro.
177
178         * UserInterface/Images/Breakpoints.svg:
179         Change to path so stroke and fill can be styled.
180
181         * UserInterface/Views/DebuggerSidebarPanel.css:
182         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints):
183         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints.activated):
184         Fill and stroke styles for the active and inactive breakpoint button.
185
186 2016-11-28  Matt Baker  <mattbaker@apple.com>
187
188         Web Inspector: Debugger should have an option for showing asynchronous call stacks
189         https://bugs.webkit.org/show_bug.cgi?id=163230
190         <rdar://problem/28698683>
191
192         Reviewed by Joseph Pecoraro.
193
194         * Localizations/en.lproj/localizedStrings.js:
195         New string for generic async call stack boundary label: "(async)".
196
197         * UserInterface/Controllers/DebuggerManager.js:
198         Create async stack depth setting and set default depth.
199         (WebInspector.DebuggerManager.prototype.get asyncStackTraceDepth):
200         (WebInspector.DebuggerManager.prototype.set asyncStackTraceDepth):
201         Make async stack depth setting accessible to the frontend.
202         (WebInspector.DebuggerManager.prototype.initializeTarget):
203         Set async stack depth value on the target.
204         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
205         Plumbing for the async stack trace payload.
206
207         * UserInterface/Models/ConsoleMessage.js:
208         (WebInspector.ConsoleMessage):
209         Updated for new StackTrace.fromPayload use.
210
211         * UserInterface/Models/DebuggerData.js:
212         (WebInspector.DebuggerData):
213         (WebInspector.DebuggerData.prototype.get asyncStackTrace):
214         (WebInspector.DebuggerData.prototype.updateForPause):
215         (WebInspector.DebuggerData.prototype.updateForResume):
216         More plumbing.
217
218         * UserInterface/Models/StackTrace.js:
219         Update frontend model for use as new protocol object Console.StackTrace,
220         which was previously an alias for a simple array of Console.CallFrames.
221
222         (WebInspector.StackTrace):
223         (WebInspector.StackTrace.fromPayload):
224         (WebInspector.StackTrace.fromString):
225         (WebInspector.StackTrace.prototype.get topCallFrameIsBoundary):
226         (WebInspector.StackTrace.prototype.get parentStackTrace):
227
228         * UserInterface/Protocol/DebuggerObserver.js:
229         (WebInspector.DebuggerObserver.prototype.paused):
230         More plumbing.
231
232         * UserInterface/Views/CallFrameTreeElement.css:
233         (.tree-outline .item.call-frame.async-boundary):
234         Use default cursor since boundary element is not selectable.
235         (.tree-outline .item.call-frame.async-boundary .icon):
236         (.tree-outline .item.call-frame.async-boundary::before,):
237         (.tree-outline .item.call-frame.async-boundary::after):
238         (.tree-outline .item.call-frame.async-boundary::before):
239         Dimmed text and divider line styles for boundary element.
240
241         * UserInterface/Views/CallFrameTreeElement.js:
242         (WebInspector.CallFrameTreeElement):
243         Add a flag denoting whether the call frame is an async call trace
244         boundary, and set styles accordingly.
245
246         * UserInterface/Views/DebuggerSidebarPanel.js:
247         Set async stack trace depth, if supported.
248         (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks):
249         Add call frames for async stack traces to the call stack TreeOutline.
250         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
251         Ensure that async call frames cannot become the active call frame.
252
253         * UserInterface/Views/Variables.css:
254         (:root):
255         Add --text-color-gray-medium, for dimmed text in async boundary element.
256
257 2016-11-18  Matt Baker  <mattbaker@apple.com>
258
259         Web Inspector: TimelineDataGridNode assertions when refreshing page
260         https://bugs.webkit.org/show_bug.cgi?id=162642
261         <rdar://problem/28505898>
262
263         Reviewed by Timothy Hatcher.
264
265         This patch fixes a number of deficiencies in the Network tab that caused
266         TimelineDataGridNode graphs to refresh before the tab became visible.
267
268         * UserInterface/Views/ElementsTabContentView.js:
269         (WebInspector.ElementsTabContentView):
270         (WebInspector.ElementsTabContentView.prototype.shown):
271         Drive-by fix: defer showing the DOM content view until the tab is shown.
272
273         * UserInterface/Views/NetworkGridContentView.js:
274         (WebInspector.NetworkGridContentView):
275         Drive-by event listener cleanup.
276         (WebInspector.NetworkGridContentView.prototype.get startTime):
277         (WebInspector.NetworkGridContentView.prototype.get endTime):
278         Back endTime with a variable, instead of using the ruler value which
279         isn't valid before the tab is shown for the first time.
280
281         (WebInspector.NetworkGridContentView.prototype.shown):
282         Force the grid to update its layout, and that of the Timeline column ruler.
283         During layout the ruler's secondsPerPixel value is used, which isn't
284         valid until the ruler does an initial layout.
285
286         (WebInspector.NetworkGridContentView.prototype.reset):
287         Clear pending records. This was causing duplicates to appear when the
288         inspected page was refreshed multiple times prior to showing the Network
289         tab for the first time.
290
291         (WebInspector.NetworkGridContentView.prototype.layout):
292         Should more closely match behavior in NetworkTimelineView.prototype.layout.
293         Graph end time padding is added if no longer updating the current time.
294
295         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
296         Track endTime of the last record added, so that the graph end time can
297         be padded once the current time is no longer being updated.
298
299         (WebInspector.NetworkGridContentView.prototype._update):
300         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
301         Graph end time padding shouldn't be applied here, since this isn't called
302         if the inspected page finishes loading before the view is shown.
303
304         (WebInspector.NetworkGridContentView.prototype._clearNetworkItems): Deleted.
305         Replaced by an arrow function.
306
307         * UserInterface/Views/NetworkSidebarPanel.js:
308         (WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
309         Don't show the content view if the tab is hidden.
310
311 2016-11-17  Devin Rousso  <dcrousso+webkit@gmail.com>
312
313         Web Inspector: Shift clicking on named color value only shows its hex form
314         https://bugs.webkit.org/show_bug.cgi?id=162758
315
316         Reviewed by Timothy Hatcher.
317
318         * UserInterface/Models/Color.js:
319         (WebInspector.Color.prototype.nextFormat):
320         Reworked the logic for the formatting order to be the following:
321          - Long HEX and Long HEXAlpha
322          - RGB and RGBA
323          - HSL and HSLA
324          - Keyword (if applicable)
325          - Short HEX (if applicable)
326          - Short HEXAlpha (if applicable)
327         It will only show formats with alpha values if the color value has an alpha that is not 1.
328         If the alpha is not 1, it will not show formats with non-alpha values.
329
330         The changes to this function have no effect on the context menu items of InlineSwatch
331         elements.  The purpose of each of those items is to allow the user to change the format to
332         a specified type, whereas WebInspector.Color.prototype.nextFormat is used to cycle through
333         all of the relevant formats.
334
335         (WebInspector.Color.prototype._toRGBString):
336         (WebInspector.Color.prototype._toRGBAString):
337         (WebInspector.Color.prototype._toHSLString):
338         (WebInspector.Color.prototype._toHSLAString):
339         Unrelated fix of extra decimals when converting from HEX to RGB and HSL.
340
341         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
342         (WebInspector.CSSStyleDeclarationTextEditor._inlineSwatchValueChanged):
343         Removed assertion for `_hasActiveInlineSwatchEditor` since the value may change from
344         switching the format of a color swatch (Shift-Click).
345
346 2016-11-16  Joseph Pecoraro  <pecoraro@apple.com>
347
348         Web Inspector: Background tabs are often updating non-stop because they think they are visible
349         https://bugs.webkit.org/show_bug.cgi?id=164841
350         <rdar://problem/29298658>
351
352         Reviewed by Matt Baker.
353
354         * UserInterface/Views/NetworkGridContentView.js:
355         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
356         * UserInterface/Views/TimelineRecordingContentView.js:
357         (WebInspector.TimelineRecordingContentView.prototype._update):
358         Don't constantly update when this tab is not in the foreground.
359
360 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
361
362         Web Inspector: SourceCodeTextEditor should display execution lines for background threads
363         https://bugs.webkit.org/show_bug.cgi?id=164679
364         <rdar://problem/29233026>
365
366         Reviewed by Timothy Hatcher.
367
368         There may be multiple threads paused in the same content view. With
369         this change we should a thread indicator for each primary line a
370         thread is paused on. It uses the same inline line indicator that
371         inline errors/warnings (issues) use.
372
373         When there is a single thread (just the Page) we don't show thread
374         indicators. But as soon as there are multiple threads we start
375         managing and showing them. The line indicator contains the name of
376         the thread on the side.
377
378         Note that SourceCodeTextEditor maintains the thread indicators, but
379         it still always handles the ActiveCallFrame as it used to, pushing
380         values down into TextEditor. The ActiveCallFrame styles override
381         the thread line indicators (albeit with the same styles). The reason
382         these are still separate is that TextEditor has some special styles
383         regarding its gutter for the active execution line. Eventually we
384         may want to find a way to push this up into SourceCodeTextEditor.
385
386         * Localizations/en.lproj/localizedStrings.js:
387         New string "%d Threads" when multiple threads are on the same line.
388
389         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
390         (WebInspector.ScopeChainDetailsSidebarPanel):
391         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._activeCallFrameDidChange):
392         Update Watch Expressions when the active call frame changes.
393
394         * UserInterface/Views/SourceCodeTextEditor.css:
395         (.source-code.text-editor > .CodeMirror .line-indicator-widget):
396         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline):
397         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .arrow):
398         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .arrow):
399         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .icon):
400         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .text):
401         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .text):
402         Share line indicator widget styles between issue widgets and thread widgets.
403
404         (.source-code.text-editor > .CodeMirror .thread-indicator):
405         (.source-code.text-editor > .CodeMirror .thread-widget):
406         (.source-code.text-editor > .CodeMirror .thread-widget.inline):
407         (.source-code.text-editor > .CodeMirror .thread-widget.inline > .arrow):
408         Colors for the thread-widget line-indicators.
409
410         * UserInterface/Views/SourceCodeTextEditor.js:
411         (WebInspector.SourceCodeTextEditor):
412         (WebInspector.SourceCodeTextEditor.prototype.close):
413         New event listeners handling for Target added / removed events.
414
415         (WebInspector.SourceCodeTextEditor.prototype._targetAdded):
416         (WebInspector.SourceCodeTextEditor.prototype._targetRemoved):
417         Update thread indicators as needed.
418
419         (WebInspector.SourceCodeTextEditor.prototype._looselyMatchesSourceCodeLocation):
420         More generic match based just on the URLs. Even if the exact script comes
421         from a different target, if they share the same URL that is fine.
422
423         (WebInspector.SourceCodeTextEditor.prototype._callFramesDidChange):
424         (WebInspector.SourceCodeTextEditor.prototype._addThreadIndicatorForTarget):
425         (WebInspector.SourceCodeTextEditor.prototype._removeThreadIndicatorForTarget):
426         (WebInspector.SourceCodeTextEditor.prototype._threadIndicatorWidgetForLine):
427         (WebInspector.SourceCodeTextEditor.prototype._updateThreadIndicatorWidget):
428         (WebInspector.SourceCodeTextEditor.prototype._handleThreadIndicatorWidgetClick):
429         Manage thread line indicator widgets. There are 3 maps we maintain.
430
431           1. line -> [threads]
432               List of threads paused on a line, needed for the UI text.
433           2. line -> widget
434               Gets the widget on a line so we can modify and eventually remove it.
435           3. target -> line
436               If a target is removed, we need to know what line it had an indicator on.
437
438         (WebInspector.SourceCodeTextEditor.prototype._isWidgetToggleable):
439         Generalize for all of our different line indicator widgets.
440
441         (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
442         (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):        
443         (WebInspector.SourceCodeTextEditor.prototype._reinsertAllThreadIndicators):
444         When first populated, or reformatted, clear and reinsert all widgets.
445
446         (WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues):
447         (WebInspector.SourceCodeTextEditor.prototype._logCleared):
448         (WebInspector.SourceCodeTextEditor.prototype._clearIssueWidgets): Renamed.
449         Rename _clearWidgets to _clearIssueWidgets.
450
451 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
452
453         Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
454         https://bugs.webkit.org/show_bug.cgi?id=164793
455
456         Reviewed by Timothy Hatcher.
457
458         * Localizations/en.lproj/localizedStrings.js:
459         Tooltips for new button.
460
461         * UserInterface/Base/Main.js:
462         (WebInspector.loaded):
463         New global setting.
464
465         * UserInterface/Views/DOMTreeContentView.js:
466         (WebInspector.DOMTreeContentView):
467         (WebInspector.DOMTreeContentView.prototype.get navigationItems):
468         (WebInspector.DOMTreeContentView.prototype._showPrintStylesSettingChanged):
469         (WebInspector.DOMTreeContentView.prototype._togglePrintStylesSetting):
470         New navigation bar button to toggle print styles.
471
472         * UserInterface/Controllers/CSSStyleManager.js:
473         (WebInspector.CSSStyleManager.prototype.mediaTypeChanged):
474         After toggling styles we will need to refresh styles, so provide
475         a meaningful way to trigger refreshing styles from the frontend.
476
477         * UserInterface/Images/Printer.svg: Added.
478         * UserInterface/Images/gtk/Printer.svg: Added.
479         New Printer icon for enabling / disabling print styles.
480
481         * UserInterface/Images/gtk/Crosshair.svg:
482         * UserInterface/Images/gtk/LayerBorders.svg:
483         * UserInterface/Images/gtk/NavigationItemCurleyBraces.svg:
484         * UserInterface/Images/gtk/NavigationItemTypes.svg:
485         * UserInterface/Images/gtk/PaintFlashing.svg:
486         * UserInterface/Images/gtk/ShadowDOM.svg:
487         * UserInterface/Images/gtk/ToggleLeftSidebar.svg:
488         * UserInterface/Images/gtk/ToggleRightSidebar.svg:
489         * UserInterface/Images/gtk/UpDownArrows.svg:
490         Fix a number of existing GTK images to have activated styles.
491
492 2016-11-15  Nikita Vasilyev  <nvasilyev@apple.com>
493
494         REGRESSION (r208248): Web Inspector: Pressing Left Arrow breaks autocomplete
495         https://bugs.webkit.org/show_bug.cgi?id=164391
496         <rdar://problem/29102408>
497
498         Reviewed by Matt Baker.
499
500         Unroll r208248.
501
502         * UserInterface/Controllers/CodeMirrorCompletionController.js:
503         (WebInspector.CodeMirrorCompletionController):
504         (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
505         (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
506         (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
507         (WebInspector.CodeMirrorCompletionController.prototype.close):
508         (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
509         (WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker):
510         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
511         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
512         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update):
513         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
514         (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory):
515         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker):
516         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
517         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
518         (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
519         (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
520
521 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
522
523         Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
524         https://bugs.webkit.org/show_bug.cgi?id=164793
525
526         Reviewed by Matt Baker.
527
528         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
529         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
530         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
531         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
532         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
533         * Versions/Inspector-iOS-10.0.json:
534         * Versions/Inspector-iOS-7.0.json:
535         * Versions/Inspector-iOS-8.0.json:
536         * Versions/Inspector-iOS-9.0.json:
537         * Versions/Inspector-iOS-9.3.json:
538
539 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
540
541         Web Inspector: URL Breakpoints that resolve in multiple workers should only appear in the UI once
542         https://bugs.webkit.org/show_bug.cgi?id=164334
543         <rdar://problem/29073523>
544
545         Reviewed by Matt Baker.
546
547         * UserInterface/Views/DebuggerSidebarPanel.js:
548         (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
549         Don't add a duplicate BreakpointTreeElements for the same Breakpoint.
550
551 2016-11-14  Joseph Pecoraro  <pecoraro@apple.com>
552
553         Web Inspector: Worker debugging should pause all targets and view call frames in all targets
554         https://bugs.webkit.org/show_bug.cgi?id=164305
555         <rdar://problem/29056192>
556
557         Reviewed by Timothy Hatcher.
558
559         This implements a policy where, when one Target ("Thread") pauses
560         the frontend triggers a pause in all other Targets. The intended
561         user experience is "all threads pause" whenever the frontend shows
562         the debugger paused UI.
563
564         DebuggerManager has a few straight forward changes:
565
566             - The paused state reflects if any target is paused.
567             - The Paused Event is fired when going from !paused -> paused.
568               This means when the first target pauses.
569             - The Resumed Event is fired when going from paused -> !paused.
570               This means only after all targets have resumed.
571             - The CallFrameDidChange Event now includes the Target that updated.
572
573         When a Target first pauses the frontend then immediately pauses all
574         other Targets. This puts them into a "pausing" state (we display as
575         Idle) and they will pause as soon as they start executing JavaScript.
576
577         When a Target steps the "paused" state isn't changing. So this is
578         just a CallFramesDidChange update.
579
580         When clicking Resume we resume all targets. This is will be the normal,
581         expected way users resume execution. Note that one of the threads may
582         then hit a breakpoint and re-pause all threads.
583
584         Sometimes when multiple threads are paused you may want to run an
585         individual thread to completion but keep other threads paused. There
586         is a context menu on the ThreadTreeElement to resume just that
587         single thread. It will continue and pause for its next run loop.
588
589         * Localizations/en.lproj/localizedStrings.js:
590         * UserInterface/Images/Thread.svg: Added.
591         * UserInterface/Images/gtk/Thread.svg: Added.
592         * UserInterface/Main.html:
593         New strings and files.
594
595         * UserInterface/Base/Main.js:
596         (WebInspector.loaded):
597         * UserInterface/Test/Test.js:
598         (WebInspector.loaded):
599         Place the TargetManager first since other managers may want to listen
600         for TargetAdded / TargetRemoved events.
601
602         * UserInterface/Controllers/DebuggerManager.js:
603         (WebInspector.DebuggerManager.prototype.get paused):
604         This is now a computed state.
605
606         (WebInspector.DebuggerManager.prototype.pause):
607         (WebInspector.DebuggerManager.prototype.resume):
608         Affect all targets.
609
610         (WebInspector.DebuggerManager.prototype.stepOver):
611         (WebInspector.DebuggerManager.prototype.stepInto):
612         (WebInspector.DebuggerManager.prototype.stepOut):
613         (WebInspector.DebuggerManager.prototype.reset):
614         Update to use the paused computed property.
615
616         (WebInspector.DebuggerManager.prototype.continueUntilNextRunLoop):
617         Issue the new Debugger.continueUntilNextRunLoop command
618         on a given target.
619
620         (WebInspector.DebuggerManager.prototype.initializeTarget):
621         When a new Target is created and we were already paused,
622         then start that Worker in a paused state.
623
624         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
625         Recover from bad cases where the backend informs the frontend about
626         internal JavaScript that it shouldn't know about. Legacy backend do
627         this but also there are corner cases we need to handle.
628         Dispatch events appropriately now that multiple targets may be paused.
629
630         (WebInspector.DebuggerManager.prototype._didResumeInternal):
631         Dispatch events appropriately now that multiple targets may be paused.
632
633         (WebInspector.DebuggerManager.prototype._targetRemoved):
634         Remove debugger data for targets that go away to avoid leaks.
635
636         * UserInterface/Models/DebuggerData.js:
637         (WebInspector.DebuggerData):
638         (WebInspector.DebuggerData.prototype.get paused):
639         (WebInspector.DebuggerData.prototype.get pausing):
640         Move some more per-Target state into DebuggerData.
641
642         (WebInspector.DebuggerData.prototype.pauseIfNeeded):
643         (WebInspector.DebuggerData.prototype.resumeIfNeeded):
644         (WebInspector.DebuggerData.prototype.continueUntilNextRunLoop):
645         These should only be called by DebuggerManager. They correctly
646         update the state of the DebuggerData for this Target, and also
647         issue the underlying command to the target.
648
649         (WebInspector.DebuggerData.prototype.updateForPause):
650         (WebInspector.DebuggerData.prototype.updateForResume):
651         Handle a special case where continueUntilNextRunLoop triggers
652         an invisible "pause" on the backend that we should mirror.
653
654         * UserInterface/Protocol/Target.js:
655         (WebInspector.MainTarget):
656         (WebInspector.MainTarget.prototype.get displayName):
657         (WebInspector.MainTarget.prototype.initialize):
658         Better display names.
659
660         * UserInterface/Views/DebuggerSidebarPanel.js:
661         (WebInspector.DebuggerSidebarPanel):
662         (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
663         (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
664         (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks):
665         (WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement):
666         (WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks):
667         (WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks):
668         (WebInspector.DebuggerSidebarPanel.prototype._findThreadTreeElementForTarget):
669         (WebInspector.DebuggerSidebarPanel.prototype._targetAdded):
670         (WebInspector.DebuggerSidebarPanel.prototype._targetRemoved):
671         (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
672         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
673         The DebuggerSidebar still has a single "Call Stacks" section, but maintains
674         two TreeOutlines and only shows one at a time. The Single Thread view shows
675         a flat list of the call frames for the Main Target when it is the only target.
676         The Multiple Threads view shows a list of Threads and their call frames.
677         We always keep both up to date, because we may need to swap between them
678         purely as Targets are added / removed. There is a bit of extra logic to
679         ensure we select elements properly based only on the visible tree outline.
680
681         * UserInterface/Views/LogContentView.js:
682         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
683         When evaluating in a particular target, "runAfterPendingDispatches"
684         must wait for all other commands in that particular target to have
685         completed. So use the target specific version.
686
687         * UserInterface/Views/NavigationSidebarPanel.js:
688         (WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
689         Gracefully handle a few more TreeElements without a represented object.
690
691         * UserInterface/Views/IdleTreeElement.css: Added.
692         (.details-section.call-stack .idle .icon):
693         * UserInterface/Views/IdleTreeElement.js: Added.
694         (WebInspector.IdleTreeElement):
695         Very basic tree element to encapsulate an Idle call frame with an
696         empty represented object.
697
698         * UserInterface/Views/ThreadTreeElement.css: Added.
699         (.details-section.call-stack .thread .icon):
700         * UserInterface/Views/ThreadTreeElement.js: Added.
701         (WebInspector.ThreadTreeElement):
702         (WebInspector.ThreadTreeElement.prototype.get target):
703         (WebInspector.ThreadTreeElement.prototype.refresh):
704         (WebInspector.ThreadTreeElement.prototype.onattach):
705         (WebInspector.ThreadTreeElement.prototype.oncontextmenu):
706         ThreadTreeElement has no represented object, but makes it easy
707         to refresh a list of CallFrameTreeElements for a given target.
708
709 2016-11-14  Timothy Hatcher  <timothy@apple.com>
710
711         Web Inspector: Disable Warning Filter in Debugger Tab By Default
712         https://bugs.webkit.org/show_bug.cgi?id=164723
713         rdar://problem/29251780
714
715         Reviewed by Joseph Pecoraro.
716
717         * UserInterface/Views/DebuggerSidebarPanel.js:
718         (WebInspector.DebuggerSidebarPanel): Made "debugger-show-resources-with-issues-only" false by default.
719
720 2016-11-14  Nikita Vasilyev  <nvasilyev@apple.com>
721
722         Web Inspector: Settings tab should look more like a native macOS view
723         https://bugs.webkit.org/show_bug.cgi?id=164708
724         <rdar://problem/29241296>
725
726         Reviewed by Timothy Hatcher.
727
728         * UserInterface/Views/SettingsTabContentView.css:
729         (.content-view.settings):
730         (.content-view.settings > .header):
731         (.content-view.settings > .setting-container):
732         Match macOS Sierra default font size for settings view.
733
734         (.content-view.settings > .setting-container > .setting-name):
735         (.content-view.settings > .setting-container > .setting-value-controller):
736         (.content-view.settings > .setting-container > .setting-value-controller input):
737         (.content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]):
738         Make checkbox larger.
739
740         (.content-view.settings > .setting-container > .setting-value-controller select):
741         (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
742         Decrease the width of the number fields to make them just wide enough to fit 2 digit numbers.
743
744 2016-11-12  Joseph Pecoraro  <pecoraro@apple.com>
745
746         Web Inspector: Type Profiler and Code Coverage Profiler should work in Workers
747         https://bugs.webkit.org/show_bug.cgi?id=164682
748
749         Reviewed by Darin Adler.
750
751         * UserInterface/Controllers/BasicBlockAnnotator.js:
752         * UserInterface/Models/ScriptSyntaxTree.js:
753         (WebInspector.ScriptSyntaxTree.prototype.updateTypes):
754         Use the target associated with the Script.
755
756         * UserInterface/Protocol/Target.js:
757         (WebInspector.WorkerTarget.prototype.initialize):
758         When initializing a Worker Target, match the existing state
759         of the Page for these profilers.
760
761         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
762         * UserInterface/Views/SourceCodeTextEditor.js:
763         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation):
764         (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
765         Use the correct target for this Script / Resource.
766
767         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
768         (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
769         Enable / disable for all targets when toggling profilers.
770
771 2016-11-11  Anthony Ricaud  <rik@webkit.org>
772
773         Web Inspector: Whitespace in Editor should be less visible than regular content
774         https://bugs.webkit.org/show_bug.cgi?id=164660
775
776         Reviewed by Matt Baker.
777
778         * UserInterface/Views/CodeMirrorOverrides.css:
779         (.show-whitespace-characters .CodeMirror .cm-whitespace::before):
780
781 2016-11-11  Nikita Vasilyev  <nvasilyev@apple.com>
782
783         Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off
784         https://bugs.webkit.org/show_bug.cgi?id=163407
785         <rdar://problem/28764230>
786
787         Reviewed by Timothy Hatcher.
788
789         Turning Type Profiler off by clicking [T] icon now disables its backend by calling RuntimeAgent.disableTypeProfiler().
790
791         * UserInterface/Views/SourceCodeTextEditor.js:
792         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
793
794 2016-11-11  Nikita Vasilyev  <nvasilyev@apple.com>
795
796         Web Inspector: Settings tab: make the header smaller to fit more content
797         https://bugs.webkit.org/show_bug.cgi?id=164613
798         <rdar://problem/29206007>
799
800         Reviewed by Timothy Hatcher.
801
802         * UserInterface/Views/SettingsTabContentView.css:
803         (.content-view.settings > .header):
804         Use hv units for margin. 1vh = 1% of viewport height. When Web Inspector window is taller, the margin is larger.
805
806         (.content-view.settings > .setting-container):
807         Convert padding to margin to make spacing between the header and the first section better.
808
809 2016-11-10  Nikita Vasilyev  <nvasilyev@apple.com>
810
811         Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off
812         https://bugs.webkit.org/show_bug.cgi?id=163407
813         <rdar://problem/28764230>
814
815         Reviewed by Joseph Pecoraro.
816
817         Turning Code Coverage off by clicking [C] icon now disables its backend by calling RuntimeAgent.disableControlFlowProfiler().
818
819         * UserInterface/Views/SourceCodeTextEditor.js:
820         (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
821
822 2016-11-10  Aaron Chu  <aaron_chu@apple.com>
823
824         Web Inspector: AXI: clarify button roles (e.g. toggle or popup button)
825         https://bugs.webkit.org/show_bug.cgi?id=130726
826         <rdar://problem/16420420>
827
828         Reviewed by Brian Burg.
829
830         Updated Inspector to show the button type using the new mapping information.
831
832         * Localizations/en.lproj/localizedStrings.js:
833         * UserInterface/Models/DOMNode.js:
834         (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
835         (WebInspector.DOMNode.prototype.accessibilityProperties):
836         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
837         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
838         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
839
840 2016-11-09  Joseph Pecoraro  <pecoraro@apple.com>
841
842         Web Inspector: DebuggerManager.Event.Resumed introduces test flakiness
843         https://bugs.webkit.org/show_bug.cgi?id=161951
844         <rdar://problem/28295767>
845
846         Reviewed by Brian Burg.
847
848         * UserInterface/Controllers/DebuggerManager.js:
849         (WebInspector.DebuggerManager.prototype.debuggerDidResume):
850         Now, Debugger.resumed events really mean the debugger resumed,
851         so act immediately instead of guessing. We must still guess
852         in legacy backends.
853
854         * UserInterface/Test/Test.js:
855         When the inspector frontend encounters an issue, log it.
856
857         * UserInterface/Views/DebuggerSidebarPanel.js:
858         (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
859         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
860         Always enable the step out button. I don't think it makes sense to disable
861         it sometimes, and if there are issues with this we should solve the issues
862         instead of hiding them.
863
864 2016-11-09  Joseph Pecoraro  <pecoraro@apple.com>
865
866         Web Inspector: Associate Worker Resources with the Worker and not the Page
867         https://bugs.webkit.org/show_bug.cgi?id=164342
868         <rdar://problem/29075775>
869
870         Reviewed by Timothy Hatcher.
871
872         A Target may have its own list of Resource. For example, Workers may
873         request any resources via XHR/Fetch. So we associate a ResourceCollection
874         with a Target, and ensure we show them in Web Inspector as you would expect.
875         At this point, Target starts acting like Frame. Target has a resourceCollection
876         and extraScriptsCollection just like Frame. Target has events for ResourceAdded
877         just like Frame.
878
879         Even though Resource loads are happening in Workers, the Network data
880         still comes from the Page's Network agent. The added "targetId" data
881         with the Resource will let us associate a Resoure with a Target.
882
883         When opening inspector after a page has loaded, the frontend loads Resources
884         via the Page.getResourceTree path. In this case, the frontend may be
885         informed of Resources for a Target that it does not know about yet. In
886         these cases, it sets them aside as Orphaned resources for a target. Later,
887         when that Target is created, it will adopt its Orphaned resources.
888
889         Places that used to listen to just Frame.Event.ResourceWasAdded should now
890         also listen for Target.Event.ResourceAdded to ensure it sees the resources
891         associated with non-page targets.
892
893         * UserInterface/Protocol/Target.js:
894         (WebInspector.Target):
895         (WebInspector.Target.prototype.get identifier):
896         (WebInspector.Target.prototype.get resourceCollection):
897         (WebInspector.Target.prototype.get extraScriptCollection):
898         (WebInspector.Target.prototype.addResource):
899         (WebInspector.Target.prototype.adoptResource):
900         (WebInspector.Target.prototype.addScript):
901         Give Target resource collections.
902
903         (WebInspector.MainTarget):
904         (WebInspector.MainTarget.prototype.get mainResource):
905         Pass through to the FrameResourceManager for the MainTarget.
906
907         (WebInspector.WorkerTarget):
908         (WebInspector.WorkerTarget.prototype.initialize):
909         Adopt orphaned resources on creation.
910
911         * UserInterface/Models/Resource.js:
912         (WebInspector.Resource):
913         (WebInspector.Resource.prototype.get target):
914         (WebInspector.Resource.prototype.get type):
915         Resource now has a Target. During creation, if there is a targetId
916         then we must produce a Target or null (orphaned).
917
918         (WebInspector.Resource.prototype.associateWithScript):
919         When associating a Resource with a Script, we can use this opportunity
920         to convert from an XML / Other type to Script.
921
922         * UserInterface/Models/Script.js:
923         (WebInspector.Script.prototype._resolveResource):
924         When associating Scripts with a resource we must associate resources
925         from within the proper Target. If it is the Main target we still use
926         the FrameResourceManager which keep searches across all Frames.
927
928         * UserInterface/Protocol/NetworkObserver.js:
929         (WebInspector.NetworkObserver.prototype.requestWillBeSent):
930         * UserInterface/Controllers/FrameResourceManager.js:
931         (WebInspector.FrameResourceManager.prototype.initialize):
932         (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
933         (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
934         (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
935         (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
936         (WebInspector.FrameResourceManager.prototype.adoptOrphanedResourcesForTarget):
937         (WebInspector.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
938         (WebInspector.FrameResourceManager.prototype._addResourceToTarget):
939         (WebInspector.FrameResourceManager.prototype._createResource):
940         (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
941         (WebInspector.FrameResourceManager.prototype._addOrphanedResource):
942         (WebInspector.FrameResourceManager.prototype._mainFrameDidChange):
943         (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Deleted.
944         When creating Resources from Network events we may now have a targetId.
945         Once created a Resource must be associated with a Frame, Target, or orphaned.
946
947         * UserInterface/Main.html:
948         * UserInterface/Views/TargetTreeElement.js: Removed.
949         * UserInterface/Views/WorkerTreeElement.js: Added.
950         (WebInspector.WorkerTreeElement):
951         (WebInspector.WorkerTreeElement.prototype.get target):
952         (WebInspector.WorkerTreeElement.prototype.onexpand):
953         (WebInspector.WorkerTreeElement.prototype.oncollapse):
954         (WebInspector.WorkerTreeElement.prototype.onpopulate):
955         (WebInspector.WorkerTreeElement.prototype.updateSourceMapResources):
956         (WebInspector.WorkerTreeElement.prototype.onattach):
957         (WebInspector.WorkerTreeElement.prototype.compareChildTreeElements):
958         (WebInspector.WorkerTreeElement.prototype._handleContextMenuEvent):
959         (WebInspector.WorkerTreeElement.prototype._scriptAdded):
960         (WebInspector.WorkerTreeElement.prototype._resourceAdded):
961         Convert TargetTreeElement to WorkerTreeElement as that is clearer.
962         Behave like FrameTreeElement and populate resources on creation,
963         handle SourceMapResource, etc.
964
965         * UserInterface/Views/FolderizedTreeElement.js:
966         (WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings):
967         (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
968         (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
969         If the display name for a folder is `null` then there is no folder,
970         and place such child tree elements at the top level. This will be
971         the case for a Worker's Script's, which we choose not to folderize.
972
973         * UserInterface/Controllers/DebuggerManager.js:
974         (WebInspector.DebuggerManager.prototype.scriptDidParse):
975         * UserInterface/Controllers/TargetManager.js:
976         (WebInspector.TargetManager.prototype.targetForIdentifier):
977
978         * UserInterface/Models/DefaultDashboard.js:
979         (WebInspector.DefaultDashboard):
980         * UserInterface/Controllers/TimelineManager.js:
981         (WebInspector.TimelineManager):
982         * UserInterface/Controllers/WorkerManager.js:
983         (WebInspector.WorkerManager.prototype.workerCreated):
984         * UserInterface/Views/OpenResourceDialog.js:
985         (WebInspector.OpenResourceDialog.prototype.didDismissDialog):
986         (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
987         (WebInspector.OpenResourceDialog.prototype._addScriptsForTarget): Deleted.
988         (WebInspector.OpenResourceDialog.prototype._addResourcesForTarget): Added.
989         Ensure those that listen for Frame.Event.ResourceWasAdded now also
990         listen for Target.Event.ResourceAdded.
991
992         * UserInterface/Views/ContextMenuUtilities.js:
993         (WebInspector.appendContextMenuItemsForSourceCode):
994         (WebInspector.appendContextMenuItemsForResource): Deleted.
995         * UserInterface/Views/ResourceTimelineDataGridNode.js:
996         (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
997         * UserInterface/Views/ResourceTreeElement.js:
998         (WebInspector.ResourceTreeElement.prototype._updateTitles):
999         (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent):
1000         Generalize ContextMenu helper to SourceCode so it can be used on a Script or Resource.
1001
1002         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1003         (WebInspector.ResourceDetailsSidebarPanel.prototype.inspect):
1004         When looking at a WorkerTarget's mainResource (Script) show the
1005         Resource Details sidebar for its Resource.
1006
1007         * UserInterface/Views/ResourceSidebarPanel.js:
1008         (WebInspector.ResourceSidebarPanel):
1009         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
1010         (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
1011         (WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource):
1012         (WebInspector.ResourceSidebarPanel.prototype._targetRemoved):
1013         (WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget): Deleted.
1014         Simplify ResourceSidebarPanel to only handle adding WorkerTreeElements,
1015         which will do the rest of the work for their Resources/Scripts.
1016
1017         * UserInterface/Views/SourceCodeTreeElement.js:
1018         (WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
1019         When we were changing the type of a resource, it would remove and re-insert.
1020         This would collapse the parent if it was the only child in removal, and not
1021         expand the parent when re-inserting. This ensures we re-expand.
1022
1023 2016-11-09  Nikita Vasilyev  <nvasilyev@apple.com>
1024
1025         Web Inspector: Settings tab sections overlap each other in docked Inspector window
1026         https://bugs.webkit.org/show_bug.cgi?id=164564
1027
1028         Reviewed by Joseph Pecoraro.
1029
1030         * UserInterface/Views/SettingsTabContentView.css:
1031         (.content-view.settings):
1032         Make settings sections non-shrinkable and make the content view vertically scrollable.
1033
1034         (.content-view.settings > .setting-container):
1035         Set vertical padding that looks good for non-shrinkable sections.
1036
1037 2016-11-09  Nikita Vasilyev  <nvasilyev@apple.com>
1038
1039         Web Inspector: Settings tab: Checkbox labels should be clickable
1040         https://bugs.webkit.org/show_bug.cgi?id=164470
1041         <rdar://problem/29133787>
1042
1043         Reviewed by Matt Baker.
1044
1045         * UserInterface/Views/SettingsTabContentView.js:
1046         (WebInspector.SettingsTabContentView.prototype.initialLayout):
1047         Add a label element to make checkboxes clickable.
1048
1049 2016-11-09  Devin Rousso  <dcrousso+webkit@gmail.com>
1050
1051         Web Inspector: Allow FolderTreeElement to display content when selected
1052         https://bugs.webkit.org/show_bug.cgi?id=164407
1053
1054         Reviewed by Timothy Hatcher.
1055
1056         * UserInterface/Main.html:
1057         Add CollectionContentView and TitleView.
1058
1059         * UserInterface/Base/Main.js:
1060         * UserInterface/Views/ContentView.js:
1061         (WebInspector.ContentView.createFromRepresentedObject):
1062         (WebInspector.ContentView.isViewable):
1063         Add support for Collection as the representedObject of a content view.
1064
1065         * UserInterface/Views/CollectionContentView.css: Added.
1066         (.content-view.collection):
1067         (.content-view.collection > .content-view):
1068         * UserInterface/Views/CollectionContentView.js: Added.
1069         (WebInspector.CollectionContentView):
1070         (WebInspector.CollectionContentView.prototype.initialLayout):
1071         (WebInspector.CollectionContentView.prototype._addContentViewForItem):
1072         (WebInspector.CollectionContentView.prototype._removeContentViewForItem):
1073         (WebInspector.CollectionContentView.prototype._handleItemAdded):
1074         (WebInspector.CollectionContentView.prototype._handleItemRemoved):
1075         (WebInspector.CollectionContentView.prototype._handleContentError):
1076         Takes in a Collection when constructed, and attempts to display a sub-ContentView for each
1077         item in the collection if the type of the collection is viewable en masse.  Currently, this
1078         is only supported for WebInspector.Resource.Type.Image collections.
1079
1080         * UserInterface/Views/ResourceContentView.js:
1081         (WebInspector.ResourceContentView.prototype._contentError):
1082         Dispatch an event whenever the content fails to load.
1083
1084         * UserInterface/Views/ResourceSidebarPanel.js:
1085         (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
1086         * UserInterface/Views/ResourcesTabContentView.js:
1087         (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
1088         Allow FolderTreeElements to be selected.
1089
1090         * UserInterface/Views/TitleView.css: Added.
1091         (.title-view):
1092         * UserInterface/Views/TitleView.js: Added.
1093         (WebInspector.TitleView):
1094         Basic view that displays the given text in the center of the viewable area.
1095
1096 2016-11-03  Nikita Vasilyev  <nvasilyev@apple.com>
1097
1098         Web Inspector: Stack overflow when searching a timeline recording for JS function names
1099         https://bugs.webkit.org/show_bug.cgi?id=161784
1100         <rdar://problem/28219498>
1101
1102         Reviewed by Timothy Hatcher.
1103
1104         _populate method of ProfileNodeDataGridNode and ProfileDataGridNode traverses
1105         all children of a given node. makeVisible function of DataGrid#_applyFiltersToNode
1106         traverses all its parents to expand them. This creates an infinite recursion.
1107         Remove "populate" event before appending child nodes to prevent it.
1108
1109         * UserInterface/Views/ProfileDataGridNode.js:
1110         (WebInspector.ProfileDataGridNode.prototype._populate):
1111         (WebInspector.ProfileDataGridNode):
1112         * UserInterface/Views/ProfileNodeDataGridNode.js:
1113         (WebInspector.ProfileNodeDataGridNode.prototype._populate):
1114         (WebInspector.ProfileNodeDataGridNode):
1115
1116 2016-11-03  Devin Rousso  <dcrousso+webkit@gmail.com>
1117
1118         Web Inspector: Modify FolderTreeElement to have a Collection as a its represented object
1119         https://bugs.webkit.org/show_bug.cgi?id=164349
1120
1121         Reviewed by Matt Baker.
1122
1123         * UserInterface/Views/FolderTreeElement.js:
1124         (WebInspector.FolderTreeElement):
1125         Now accepts a representedObject parameter, which must be a WebInspector.Collection.
1126
1127         * UserInterface/Views/FolderizedTreeElement.js:
1128         (WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings):
1129         (WebInspector.FolderizedTreeElement.prototype.updateParentStatus):
1130         (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
1131         (WebInspector.FolderizedTreeElement.prototype._settingsForRepresentedObject):
1132         (WebInspector.FolderizedTreeElement.prototype._shouldGroupIntoFolders):
1133         (WebInspector.FolderizedTreeElement):
1134         Rework the logic for creating WebInspector.FolderTreeElement so that items for the
1135         representedObject parameter may be passed in via registerFolderizeSettings.
1136
1137         * UserInterface/Views/FrameTreeElement.js:
1138         (WebInspector.FrameTreeElement):
1139         (WebInspector.FrameTreeElement.): Deleted.
1140         (WebInspector.FrameTreeElement.makeChildCountCallback): Deleted.
1141         Rework logic for calling registerFolderizeSettings to support the representedObject
1142         parameter.  Also changed calls to WebInspector.Frame to support the
1143         WebInspector.Collection class.
1144
1145         * UserInterface/Views/ResourceSidebarPanel.js:
1146         (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
1147         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
1148         (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
1149         Create WebInspector.Collection instances of Script model objects for additional folders
1150         created by the Resources sidebar:
1151          - Anonymous Scripts
1152          - Extension Scripts
1153          - Extra Scripts
1154
1155 2016-11-02  Joseph Pecoraro  <pecoraro@apple.com>
1156
1157         Web Inspector: Include DebuggerAgent in Workers - see, pause, and step through scripts
1158         https://bugs.webkit.org/show_bug.cgi?id=164136
1159         <rdar://problem/29028462>
1160
1161         Reviewed by Brian Burg.
1162         
1163         By implementing DebuggerAgent, Workers will inform the frontend about
1164         Scripts that evaluate in the Worker's VM and the Worker VM can pause
1165         and send the pausing CallFrames to the frontend. This means that
1166         WebInspector.Script and WebInspector.CallFrame will need to be made
1167         target aware. This also means that each Target will have its own
1168         set of debugger data, such as the list of scripts and pause data
1169         like the pause reason / call frames. Previously all this data was
1170         managed by DebuggerManager.
1171
1172         With this change we split that data out of DebuggerManager to be
1173         per-target DebuggerData. DebuggerManager keeps `activeCallFrame`
1174         but the list of scripts and pause data have moved into `DebuggerData`
1175         which is per-target, accessed through DebuggerManager's new
1176         dataForTarget(target) method.
1177
1178         Finally we make a few changes to the UserInterface to make Workers
1179         and their scripts, appear grouped together. The Resources sidebar
1180         previously had a single top level item for the Main Frame, which
1181         has all its resources as its children (potentially grouped into
1182         folders). With this change, each Worker gets its own top level
1183         item as well, and the Worker's subresources (imported scripts)
1184         become its children.
1185
1186         We also now associate a single mainResource with Targets. In the
1187         case of Workers, we assume and assert that this is a Script. If
1188         this were to ever change we would need to adjust the assumptions.
1189
1190         * UserInterface/Main.html:
1191         * UserInterface/Test.html:
1192         New files.
1193
1194         * UserInterface/Base/Main.js:
1195         * UserInterface/Test/Test.js:
1196         Add WebInspector.assumingMainTarget to fill in all the places where
1197         we assume the main target right now, but would need to handle non-main
1198         targets as other agents are implemented in workers. For example profile
1199         data that assumes the main target right now could be worker targets
1200         when we implement ScriptProfiler / Heap agents.
1201
1202         * UserInterface/Protocol/Connection.js:
1203         (InspectorBackend.WorkerConnection):
1204         * UserInterface/Protocol/Target.js:
1205         (WebInspector.Target):
1206         (WebInspector.Target.prototype.get DebuggerAgent):
1207         (WebInspector.Target.prototype.get mainResource):
1208         (WebInspector.Target.prototype.set mainResource):
1209         (WebInspector.WorkerTarget.prototype.initialize):
1210         (WebInspector.WorkerTarget):
1211         Include DebuggerAgent in Targets.
1212         Include a mainResource for Worker Targets.
1213
1214         * UserInterface/Protocol/DebuggerObserver.js:
1215         (WebInspector.DebuggerObserver.prototype.scriptParsed):
1216         (WebInspector.DebuggerObserver.prototype.breakpointResolved):
1217         (WebInspector.DebuggerObserver.prototype.paused):
1218         (WebInspector.DebuggerObserver.prototype.resumed):
1219         Pass the target on to managers when necessary.
1220
1221         * UserInterface/Models/DebuggerData.js: Added.
1222         (WebInspector.DebuggerData):
1223         (WebInspector.DebuggerData.prototype.get target):
1224         (WebInspector.DebuggerData.prototype.get callFrames):
1225         (WebInspector.DebuggerData.prototype.get pauseReason):
1226         (WebInspector.DebuggerData.prototype.get pauseData):
1227         (WebInspector.DebuggerData.prototype.get scripts):
1228         (WebInspector.DebuggerData.prototype.scriptForIdentifier):
1229         (WebInspector.DebuggerData.prototype.scriptsForURL):
1230         (WebInspector.DebuggerData.prototype.reset):
1231         (WebInspector.DebuggerData.prototype.addScript):
1232         (WebInspector.DebuggerData.prototype.pause):
1233         (WebInspector.DebuggerData.prototype.unpause):
1234         Extract per-target data from DebuggerManager. This includes the list
1235         of scripts evaluated in a Target, and any pause data for this target
1236         such as the pause reason and call frames.
1237
1238         * UserInterface/Controllers/DebuggerManager.js:
1239         (WebInspector.DebuggerManager.prototype.dataForTarget):
1240         (WebInspector.DebuggerManager.prototype.get pauseReason): Deleted.
1241         (WebInspector.DebuggerManager.prototype.get pauseData): Deleted.
1242         (WebInspector.DebuggerManager.prototype.get callFrames): Deleted.
1243         (WebInspector.DebuggerManager.prototype.reset):
1244         New way to access per-target debugger data.
1245
1246         (WebInspector.DebuggerManager.prototype.initializeTarget):
1247         When a new Target is created, synchronize frontend state with the target.
1248         Things like the list of breakpoints and global breakpoint states.
1249
1250         (WebInspector.DebuggerManager.prototype.scriptForIdentifier):
1251         (WebInspector.DebuggerManager.prototype.scriptsForURL):
1252         Convenience accessors for scripts must now provide a Target.
1253
1254         (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
1255         This is a convenience accessors for a list of all scripts across all targets
1256         so this handles getting the list across all targets.
1257
1258         (WebInspector.DebuggerManager.prototype.pause):
1259         (WebInspector.DebuggerManager.prototype.resume):
1260         (WebInspector.DebuggerManager.prototype.stepOver):
1261         (WebInspector.DebuggerManager.prototype.stepInto):
1262         (WebInspector.DebuggerManager.prototype.stepOut):
1263         (WebInspector.DebuggerManager.prototype.continueToLocation):
1264         Stepping commands affect the current target with the active call frame.
1265         Eventually we will change Pause and Resume behavior to affect all targets.
1266         
1267         (WebInspector.DebuggerManager.prototype.addBreakpoint):
1268         (WebInspector.DebuggerManager.prototype.breakpointResolved):
1269         (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
1270         (WebInspector.DebuggerManager.prototype._setBreakpoint):
1271         (WebInspector.DebuggerManager.prototype._removeBreakpoint):
1272         Breakpoints should be set on all targets, but we need a way
1273         to set them on a specific target, when initializing an
1274         individual target when we want to inform that single target
1275         of all of the breakpoints.
1276
1277         (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
1278         (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
1279         Changing global breakpoint state should inform all targets.
1280
1281         (WebInspector.DebuggerManager.prototype.scriptDidParse):
1282         Associate Scripts with a Target. Identify the main resource of a
1283         Worker Target and set it as soon as we can.
1284
1285         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
1286         (WebInspector.DebuggerManager.prototype.debuggerDidResume):
1287         (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
1288         (WebInspector.DebuggerManager.prototype._scopeChainFromPayload):
1289         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
1290         (WebInspector.DebuggerManager.prototype._mainResourceDidChange):
1291         (WebInspector.DebuggerManager.prototype._didResumeInternal):
1292         Pausing and resuming now happens per-target, so associate
1293         created model objects (CallFrame, ScopeChain objects) and any
1294         other necessary data with the target.
1295
1296         * UserInterface/Models/Breakpoint.js:
1297         (WebInspector.Breakpoint):
1298         (WebInspector.Breakpoint.prototype.get target):
1299         (WebInspector.Breakpoint.prototype.get info):
1300         * UserInterface/Models/CallFrame.js:
1301         (WebInspector.CallFrame):
1302         (WebInspector.CallFrame.prototype.get target):
1303         (WebInspector.CallFrame.fromDebuggerPayload):
1304         (WebInspector.CallFrame.fromPayload):
1305         * UserInterface/Models/ConsoleMessage.js:
1306         (WebInspector.ConsoleMessage):
1307         * UserInterface/Models/Script.js:
1308         (WebInspector.Script):
1309         (WebInspector.Script.prototype.get target):
1310         (WebInspector.Script.prototype.isMainResource):
1311         (WebInspector.Script.prototype.requestContentFromBackend):
1312         (WebInspector.Script.prototype._resolveResource):
1313         * UserInterface/Models/StackTrace.js:
1314         (WebInspector.StackTrace.fromPayload):
1315         (WebInspector.StackTrace.fromString):
1316         * UserInterface/Models/ProbeManager.js:
1317         (WebInspector.ProbeManager.prototype.didSampleProbe):
1318         * UserInterface/Models/Probe.js:
1319         (WebInspector.ProbeSample):
1320         * UserInterface/Views/ConsoleMessageView.js:
1321         (WebInspector.ConsoleMessageView.prototype._appendLocationLink):
1322         (WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
1323         Associate model objects with a specific target where necessary.
1324
1325         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
1326         (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
1327         * UserInterface/Controllers/RuntimeManager.js:
1328         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
1329         * UserInterface/Protocol/RemoteObject.js:
1330         (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
1331         Use target specific DebuggerAgent where necessary.
1332
1333         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1334         * UserInterface/Controllers/TimelineManager.js:
1335         (WebInspector.TimelineManager.prototype._callFramesFromPayload):
1336         * UserInterface/Models/ScriptTimelineRecord.js:
1337         (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
1338         * UserInterface/Views/EventListenerSectionGroup.js:
1339         (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
1340         (WebInspector.EventListenerSectionGroup):
1341         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1342         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.):
1343         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
1344         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview):
1345         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
1346         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
1347         * UserInterface/Views/ProfileDataGridNode.js:
1348         (WebInspector.ProfileDataGridNode.prototype.iconClassName):
1349         (WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
1350         (WebInspector.ProfileDataGridNode.prototype._displayContent):
1351         Use assumed main target and audit these when the Worker gets more Agents.
1352
1353         * UserInterface/Controllers/FrameResourceManager.js:
1354         (WebInspector.FrameResourceManager.prototype._initiatorSourceCodeLocationFromPayload):
1355         This will always be the main target because only the main target
1356         has access to the DOM.
1357
1358         * UserInterface/Views/SourceCodeTextEditor.js:
1359         (WebInspector.SourceCodeTextEditor.prototype.get target):
1360         (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
1361         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1362         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
1363         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
1364         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
1365         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
1366         Update target specific actions to use the proper target's agents.
1367
1368         * UserInterface/Views/TargetTreeElement.js: Added.
1369         (WebInspector.TargetTreeElement):
1370         (WebInspector.TargetTreeElement.prototype.get target):
1371         (WebInspector.TargetTreeElement.prototype.onexpand):
1372         (WebInspector.TargetTreeElement.prototype.oncollapse):
1373         Add a new tree element for a Target. We currently assume that the
1374         main resource for a Target will be a Script right now, as is the
1375         case for Web Workers. This simply remembers its expanded or
1376         collapsed state and has a better icon.
1377
1378         * UserInterface/Views/ResourceIcons.css:
1379         (body:matches(.mac-platform, .windows-platform) .script.worker-icon .icon):
1380         (body:matches(.mac-platform, .windows-platform) .large .script.worker-icon .icon):
1381         * UserInterface/Images/WorkerScript.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument.png.
1382         * UserInterface/Images/WorkerScript@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument@2x.png.
1383         * UserInterface/Images/WorkerScriptLarge.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge.png.
1384         * UserInterface/Images/WorkerScriptLarge@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge@2x.png.
1385         Improve icon for a Worker's main resource script.
1386
1387         * UserInterface/Views/ResourceSidebarPanel.js:
1388         (WebInspector.ResourceSidebarPanel):
1389         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
1390         (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
1391         (WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget):
1392         (WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource):
1393         (WebInspector.ResourceSidebarPanel.prototype._targetRemoved):
1394         * UserInterface/Views/SearchSidebarPanel.js:
1395         (WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts):
1396         (WebInspector.SearchSidebarPanel.prototype._searchTreeElementForScript):
1397         * UserInterface/Views/OpenResourceDialog.js:
1398         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline.createTreeElement):
1399         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
1400         (WebInspector.OpenResourceDialog.prototype.didDismissDialog):
1401         (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
1402         (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
1403         (WebInspector.OpenResourceDialog.prototype._addScriptsForTarget):
1404         (WebInspector.OpenResourceDialog.prototype._scriptAdded):
1405         (WebInspector.OpenResourceDialog):
1406         * UserInterface/Views/DebuggerSidebarPanel.js:
1407         (WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToTreeOutline):
1408         (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
1409         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
1410         (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
1411         Include scripts from non-main targets in sidebars.
1412
1413 2016-11-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1414
1415         Web Inspector: Creating a new pseudo-selector in the Styles sidebar doesn't work on first attempt
1416         https://bugs.webkit.org/show_bug.cgi?id=164092
1417
1418         Reviewed by Timothy Hatcher.
1419
1420         * UserInterface/Views/CSSStyleDeclarationSection.css:
1421         (.style-declaration-section:not(.invalid-selector).rule-disabled > .header > .icon):
1422         (.style-declaration-section.invalid-selector > .header > .icon):
1423         (.style-declaration-section.invalid-selector > .header > .selector,):
1424         (.style-declaration-section.rule-disabled > .header > .icon): Deleted.
1425
1426         * UserInterface/Views/CSSStyleDeclarationSection.js:
1427         (WebInspector.CSSStyleDeclarationSection):
1428         (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
1429         (WebInspector.CSSStyleDeclarationSection.prototype._handleIconElementClicked):
1430         (WebInspector.CSSStyleDeclarationSection.prototype._updateSelectorIcon): Added.
1431         Re-add logic removed by https://webkit.org/b/159734 for handling invalid selectors.  Instead
1432         of just refreshing the section whenever the represented CSSRule changes selectors, we only
1433         need to refresh if the selector no longer applies to the current element.
1434
1435         (WebInspector.CSSStyleDeclarationSection.prototype._handleMouseMove): Added.
1436         Fix another issue discovered while adding the invalid selector warnings, where the title
1437         attribute of each individual selector was no longer visible.  To fix this, whenever the user
1438         moves their mouse over the selector input, the position is compared to each selector to find
1439         the first one that matches, whose title is then applied to the input element.
1440
1441 2016-11-01  Joseph Pecoraro  <pecoraro@apple.com>
1442
1443         Web Inspector: Improve debugger highlight in some exception cases
1444         https://bugs.webkit.org/show_bug.cgi?id=164300
1445
1446         Reviewed by Matt Baker.
1447
1448         * UserInterface/Views/SourceCodeTextEditor.js:
1449         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
1450         When walking up AST nodes and reach a throw statement, use that.
1451
1452 2016-11-01  Joseph Pecoraro  <pecoraro@apple.com>
1453
1454         Web Inspector: Cleanup stale code in NetworkSidebarPanel
1455         https://bugs.webkit.org/show_bug.cgi?id=164295
1456
1457         Reviewed by Matt Baker.
1458
1459         * UserInterface/Views/NetworkSidebarPanel.js:
1460         (WebInspector.NetworkSidebarPanel.prototype.closed): Deleted.
1461         This doesn't appear to be needed since NetworkSidebarPanel never
1462         registered any event listeners.
1463
1464 2016-11-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1465
1466         REGRESSION (r191419): Web Inspector: Autocomplete is broken
1467         https://bugs.webkit.org/show_bug.cgi?id=150493
1468
1469         Reviewed by Timothy Hatcher.
1470
1471         Fixed CodeMirror.undo() logic rolled out by r191539 <https://webkit.org/b/150537>
1472
1473         Added calls to CodeMirror.changeGeneration(true) which tells the history stack to "close"
1474         the current event, preventing it from being consolidated with new changes.  If the user
1475         typed fast enough, non-completion changes (like adding ":" in CSS) would get merged with
1476         completion changes, causing calls to CodeMirror.undo() to undo those changes as well.  To
1477         prevent this, a boolean variable is set to true whenever a completion "activity" is in
1478         progress, defined by a sequence of completion related events.  When this "activity" first
1479         starts, call CodeMirror.changeGeneration(true) to freeze the current history.
1480
1481         See original bug for more information <https://webkit.org/b/147720>.
1482
1483         * UserInterface/Controllers/CodeMirrorCompletionController.js:
1484         (WebInspector.CodeMirrorCompletionController):
1485         (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
1486         (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
1487         (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
1488         (WebInspector.CodeMirrorCompletionController.prototype.close):
1489         (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
1490         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
1491         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
1492         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update):
1493         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
1494         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
1495         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
1496         (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
1497         (WebInspector.CodeMirrorCompletionController.prototype._handleBeforeChange):
1498         (WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker): Deleted.
1499         (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory): Deleted.
1500         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker): Deleted.
1501
1502 2016-11-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1503
1504         Web Inspector: Replace sublists inside DOM-related model objects with WI.Collection
1505         https://bugs.webkit.org/show_bug.cgi?id=164098
1506
1507         Reviewed by Timothy Hatcher.
1508
1509         * UserInterface/Models/DOMTree.js:
1510         * UserInterface/Models/Frame.js:
1511         Add support for WebInspector.Collection.
1512
1513         * UserInterface/Models/Script.js:
1514         (WebInspector.Script):
1515         * UserInterface/Views/DebuggerSidebarPanel.js:
1516         (WebInspector.DebuggerSidebarPanel.prototype._addResourcesRecursivelyForFrame):
1517         * UserInterface/Views/FrameTreeElement.js:
1518         (WebInspector.FrameTreeElement):
1519         (WebInspector.FrameTreeElement.prototype.onpopulate):
1520         * UserInterface/Views/OpenResourceDialog.js:
1521         (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
1522         Use new functions defined by changing to WebInspector.Collection.
1523
1524 2016-11-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1525
1526         Web Inspector: Fix double remove of ResourceCollection if type changes
1527         https://bugs.webkit.org/show_bug.cgi?id=164268
1528
1529         Reviewed by Joseph Pecoraro.
1530
1531         * UserInterface/Models/ResourceCollection.js:
1532         (WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
1533         Change logic so that a non-typed collection will not try to remove a resource that has
1534         changed types from the sub-collection of its old type, since the sub-collection itself will
1535         handle the removal inside its own event listener for the type change.
1536
1537 2016-11-01  Ryosuke Niwa  <rniwa@webkit.org>
1538
1539         Web Inspector: Add the support for custom elements
1540         https://bugs.webkit.org/show_bug.cgi?id=164266
1541         <rdar://problem/29038883>
1542
1543         Reviewed by Joseph Pecoraro.
1544
1545         Show the custom element state in DOM node's details pane:
1546          - "Element" for all builtin elements.
1547          - "Element (Custom)" for any upgraded custom elements.
1548          - "Element (Waiting to be upgraded)" for any element waiting to be upgraded.
1549          - "Element (Failed to upgrade)" for any custom element that failed during construction or an upgrade.
1550
1551         And add "Jump to Definition" to the context menu of an node to find the custom element's definition.
1552
1553         * Localizations/en.lproj/localizedStrings.js: Added localized strings.
1554         * UserInterface/Controllers/DOMTreeManager.js:
1555         (WebInspector.DOMTreeManager.prototype._customElementStateChanged): Added. Update the state and fire
1556         WebInspector.DOMTreeManager.Event.CustomElementStateChanged to update the node's details pane.
1557         * UserInterface/Models/DOMNode.js:
1558         (WebInspector.DOMNode): Set the custom element state or default to "builtin". Use null when the node
1559         is not an element.
1560         (WebInspector.DOMNode.prototype.isCustomElement): Added. Returns true if this is a successfully
1561         constructed or upgraded custom element.
1562         (WebInspector.DOMNode.prototype.customElementState): Added.
1563         (WebInspector.DOMNode.CustomElementState): Added.
1564         * UserInterface/Protocol/DOMObserver.js:
1565         (WebInspector.DOMObserver.prototype.customElementStateChanged): Added.
1566         * UserInterface/Protocol/RemoteObject.js:
1567         (WebInspector.RemoteObject.prototype.getProperty): Added. Retrieves the property of a given name from
1568         the remote backend.
1569         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1570         (WebInspector.DOMNodeDetailsSidebarPanel): Call _customElementStateChanged when the custom element
1571         state changes by listening to WebInspector.DOMTreeManager.Event.CustomElementStateChanged.
1572         (WebInspector.DOMNodeDetailsSidebarPanel.prototype.layout):
1573         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshIdentity): Extracted from layout.
1574         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementStateChanged): Added. 
1575         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName): Include the custom element
1576         state when it's not a builtin element (_customElementState returns null in that case).
1577         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementState): Get the localized string for
1578         each custom element state.
1579         * UserInterface/Views/DOMTreeElement.js:
1580         (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): Add "Jump to Definition" item in the
1581         context menu of an element when it's a successfully constructed or upgraded custom element.
1582
1583 2016-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1584
1585         Web Inspector: Shadow DOM scoped styles are missing
1586         https://bugs.webkit.org/show_bug.cgi?id=164247
1587         <rdar://problem/29035061>
1588
1589         Reviewed by Antti Koivisto.
1590
1591         * UserInterface/Models/DOMNodeStyles.js:
1592         (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
1593         Fix incorrect WrapperPromise usage.
1594
1595 2016-10-31  Devin Rousso  <dcrousso+webkit@gmail.com>
1596
1597         Web Inspector: Arrows for Styles scope bar item are misaligned
1598         https://bugs.webkit.org/show_bug.cgi?id=164159
1599
1600         Reviewed by Timothy Hatcher.
1601
1602         * UserInterface/Views/ScopeRadioButtonNavigationItem.css:
1603         (.scope-radio-button-navigation-item > .scope-radio-button-item-select:focus):
1604         (.scope-radio-button-navigation-item > .arrows):
1605
1606 2016-10-31  Devin Rousso  <dcrousso+webkit@gmail.com>
1607
1608         Web Inspector: Entering ":n" in Open Resource Dialog, where n > number of lines, should jump to the last line
1609         https://bugs.webkit.org/show_bug.cgi?id=160840
1610
1611         Reviewed by Timothy Hatcher.
1612
1613         * UserInterface/Views/TextEditor.js:
1614         (WebInspector.TextEditor.prototype.revealPosition):
1615         Since it is possible for the given position to be outside the bounds of the CodeMirror
1616         instance, wait to get the line handler for the highlight animation until we have constrained
1617         the position value.
1618
1619 2016-10-28  Devin Rousso  <dcrousso+webkit@gmail.com>
1620
1621         Web Inspector: Preferences for Text Editor behavior
1622         https://bugs.webkit.org/show_bug.cgi?id=149120
1623
1624         Reviewed by Timothy Hatcher.
1625
1626         * Localizations/en.lproj/localizedStrings.js:
1627
1628         * UserInterface/Base/Main.js:
1629         (WebInspector.loaded):
1630         (WebInspector.contentLoaded):
1631         (WebInspector.contentLoaded.setTabSize):
1632         (WebInspector.contentLoaded.setInvalidCharacterClassName):
1633         (WebInspector.contentLoaded.setWhitespaceCharacterClassName):
1634         (WebInspector._tryToRestorePendingTabs):
1635         (WebInspector.indentString):
1636         (WebInspector._updateNewTabButtonState): Deleted.
1637         (WebInspector._newTabItemClicked): Deleted.
1638         Removed calls to the New Tab tab bar item on the Tab Bar instance.
1639         Added listener to the indentUnit setting to change the tab-size value on <body>.
1640         Created helper function to generate the indentString value from settings.
1641
1642         * UserInterface/Base/Test.js:
1643         (WebInspector.indentString):
1644         Assume indent string is "    " for tests.
1645
1646         * UserInterface/Base/Setting.js:
1647         Added global WebInspector.settings dictionary for holding settings with UI editors.
1648
1649         * UserInterface/Main.html:
1650         Added GeneralTabBarItem, PinnedTabBarItem, and SettingsTabContentView.
1651
1652         * UserInterface/Models/CSSStyleDeclaration.js:
1653         (WebInspector.CSSStyleDeclaration.prototype.generateCSSRuleString):
1654         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1655         (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContentFromEditor):
1656         (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
1657         * UserInterface/Views/VisualStylePropertyEditor.js:
1658         (WebInspector.VisualStylePropertyEditor.generateFormattedTextForNewProperty):
1659         * UserInterface/Views/SourceCodeTextEditor.js:
1660         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
1661         Now uses WebInspector.indentUnit for indentation values
1662
1663         * UserInterface/Views/CodeMirrorAdditions.js:
1664         Added "showWhitespaceCharacter" option to CodeMirror.  When enabled, it adds an overlay to
1665         the editor that will use pseudo-elements to display whitespace characters (unicode 00B7).
1666
1667         * UserInterface/Views/CodeMirrorOverrides.css:
1668         (.CodeMirror .cm-tab):
1669         (.show-whitespace-characters .CodeMirror .cm-tab::before):
1670         (.show-whitespace-characters .CodeMirror .cm-whitespace::before):
1671         (.show-whitespace-characters .CodeMirror .cm-whitespace-1::before):
1672         (.show-whitespace-characters .CodeMirror .cm-whitespace-2::before):
1673         (.show-whitespace-characters .CodeMirror .cm-whitespace-3::before):
1674         (.show-whitespace-characters .CodeMirror .cm-whitespace-4::before):
1675         (.show-whitespace-characters .CodeMirror .cm-whitespace-5::before):
1676         (.show-whitespace-characters .CodeMirror .cm-whitespace-6::before):
1677         (.show-whitespace-characters .CodeMirror .cm-whitespace-7::before):
1678         (.show-whitespace-characters .CodeMirror .cm-whitespace-8::before):
1679         (.show-whitespace-characters .CodeMirror .cm-whitespace-9::before):
1680         (.show-whitespace-characters .CodeMirror .cm-whitespace-10::before):
1681         (.show-whitespace-characters .CodeMirror .cm-whitespace-11::before):
1682         (.show-whitespace-characters .CodeMirror .cm-whitespace-12::before):
1683         (.show-whitespace-characters .CodeMirror .cm-whitespace-13::before):
1684         (.show-whitespace-characters .CodeMirror .cm-whitespace-14::before):
1685         (.show-whitespace-characters .CodeMirror .cm-whitespace-15::before):
1686         (.show-whitespace-characters .CodeMirror .cm-whitespace-16::before):
1687         (.show-invalid-characters .CodeMirror .cm-invalidchar):
1688         (.CodeMirror .cm-invalidchar): Deleted.
1689         Use unicode character 00B7 (middle dot) to display a space.  Also uses a grey border for
1690         visualizing tab characters.
1691
1692         * UserInterface/Views/ApplicationCacheFrameContentView.js:
1693         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1694         * UserInterface/Views/ClusterContentView.js:
1695         * UserInterface/Views/DOMTreeContentView.js:
1696         * UserInterface/Views/DatabaseContentView.js:
1697         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
1698         * UserInterface/Views/NetworkGridContentView.js:
1699         * UserInterface/Views/ResourceContentView.js:
1700         * UserInterface/Views/ScriptContentView.js:
1701         * UserInterface/Views/TabContentView.js:
1702         * UserInterface/Views/TimelineRecordingContentView.js:
1703         Add calls to super.shown(), super.hidden(), and super.closed().
1704
1705         * UserInterface/Views/ConsoleTabContentView.js:
1706         * UserInterface/Views/DebuggerTabContentView.js:
1707         * UserInterface/Views/ElementsTabContentView.js:
1708         * UserInterface/Views/NetworkTabContentView.js:
1709         * UserInterface/Views/NewTabContentView.js:
1710         * UserInterface/Views/ResourcesTabContentView.js:
1711         * UserInterface/Views/SearchTabContentView.js:
1712         * UserInterface/Views/StorageTabContentView.js:
1713         * UserInterface/Views/TimelineTabContentView.js:
1714         Now uses WebInspector.GeneralTabBarItem.
1715
1716         * UserInterface/Views/GeneralTabBarItem.js: Added.
1717         (WebInspector.GeneralTabBarItem):
1718         (WebInspector.GeneralTabBarItem.prototype.set title):
1719         (WebInspector.GeneralTabBarItem.prototype._handleContextMenuEvent):
1720         Split from TabBarItem.js to make pinned tab bar items more distinct.
1721
1722         * UserInterface/Views/Main.css:
1723         (body):
1724         Removed tab-size.
1725
1726         * UserInterface/Views/PinnedTabBarItem.js: Added.
1727         (WebInspector.PinnedTabBarItem):
1728         Split from TabBarItem.js to make pinned tab bar items more distinct.
1729
1730         * UserInterface/Views/SettingsTabContentView.css: Added.
1731         (.content-view.settings):
1732         (.content-view.settings > .header):
1733         (.content-view.settings > .setting-container):
1734         (.content-view.settings > .setting-container > .setting-name):
1735         (.content-view.settings > .setting-container > .setting-value-controller):
1736         (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
1737
1738         * UserInterface/Views/SettingsTabContentView.js:
1739         (WebInspector.SettingsTabContentView):
1740         (WebInspector.SettingsTabContentView.tabInfo):
1741         (WebInspector.SettingsTabContentView.isEphemeral):
1742         (WebInspector.SettingsTabContentView.shouldSaveTab):
1743         (WebInspector.SettingsTabContentView.prototype.initialLayout):
1744         (WebInspector.SettingsTabContentView.isTabAllowed): Deleted.
1745         (WebInspector.SettingsTabContentView.prototype.get type): Deleted.
1746         Added logic to display an appropriate editor for each item in WebInspector.settings.
1747
1748         * UserInterface/Views/SourceCodeTextEditor.js:
1749         (WebInspector.SourceCodeTextEditor.prototype.close):
1750         Add call to super.close().
1751
1752         * UserInterface/Views/TabBar.css:
1753         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover):
1754         (.tab-bar > .item:not(.pinned) > .flex-space:last-child):
1755         (.tab-bar > .item.pinned > .icon):
1756         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
1757         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,): Deleted.
1758         (.tab-bar > .item > .flex-space:last-child): Deleted.
1759         (.tab-bar > .item.new-tab-button > .icon): Deleted.
1760         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon,): Deleted.
1761         Removed rules specifically targeting `.new-tab-button`.
1762
1763         * UserInterface/Views/TabBar.js:
1764         (WebInspector.TabBar):
1765         (WebInspector.TabBar.prototype.get newTabTabBarItem):
1766         (WebInspector.TabBar.prototype.updateNewTabTabBarItemState):
1767         (WebInspector.TabBar.prototype.insertTabBarItem):
1768         (WebInspector.TabBar.prototype.removeTabBarItem.animateTabs):
1769         (WebInspector.TabBar.prototype.removeTabBarItem):
1770         (WebInspector.TabBar.prototype.selectPreviousTab):
1771         (WebInspector.TabBar.prototype.selectNextTab):
1772         (WebInspector.TabBar.prototype.set selectedTabBarItem):
1773         (WebInspector.TabBar.prototype.hasNormalTab):
1774         (WebInspector.TabBar.prototype.layout):
1775         (WebInspector.TabBar.prototype._hasMoreThanOneNormalTab):
1776         (WebInspector.TabBar.prototype._handleMouseDown):
1777         (WebInspector.TabBar.prototype._handleMouseMoved):
1778         (WebInspector.TabBar.prototype._handleMouseLeave):
1779         (WebInspector.TabBar.prototype._handleNewTabClick):
1780         (WebInspector.TabBar.prototype._handleNewTabMouseEnter):
1781         (WebInspector.TabBar.prototype.get newTabItem): Deleted.
1782         (WebInspector.TabBar.prototype.set newTabItem): Deleted.
1783         Replaced the newTabItem setter by adding a saved pinned tab bar item (instead of relying
1784         upon a different object to give it the pinned tab bar item) that changes modes depending on
1785         whether a new tab is able to be created.
1786
1787         * UserInterface/Views/TabBarItem.js:
1788         (WebInspector.TabBarItem):
1789         (WebInspector.TabBarItem.prototype.get element):
1790         (WebInspector.TabBarItem.prototype.get representedObject):
1791         (WebInspector.TabBarItem.prototype.set representedObject):
1792         (WebInspector.TabBarItem.prototype.get parentTabBar):
1793         (WebInspector.TabBarItem.prototype.set parentTabBar):
1794         (WebInspector.TabBarItem.prototype.get image):
1795         (WebInspector.TabBarItem.prototype.set image):
1796         (WebInspector.TabBarItem.prototype.get title):
1797         (WebInspector.TabBarItem.prototype.set title):
1798         (WebInspector.TabBarItem.prototype.get pinned): Deleted.
1799         (WebInspector.TabBarItem.prototype._handleContextMenuEvent): Deleted.
1800         Split into GeneralTabBarItem and PinnedTabBarItem to simplify the logic of the DOM and allow
1801         for easier checking of whether a tab bar item is pinned or not.
1802
1803         * UserInterface/Views/TabBrowser.js:
1804         (WebInspector.TabBrowser):
1805         (WebInspector.TabBrowser.prototype.addTabForContentView):
1806         (WebInspector.TabBrowser.prototype.closeTabForContentView):
1807         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
1808         (WebInspector.TabBrowser.prototype._tabBarItemRemoved):
1809         Replaced references to newTabItem with a set number (since each TabBar has a specific number
1810         of pinned tabs).
1811
1812         * UserInterface/Views/TextEditor.js:
1813         (WebInspector.TextEditor):
1814         (WebInspector.TextEditor.prototype.close):.
1815         Remove settings update event listeners to allow garbage collection.
1816
1817         (WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
1818         (WebInspector.TextEditor.prototype._startCodeMirrorPrettyPrint):
1819         Now uses the settings values in WebInspector.setting for settings on the CodeMirror
1820         instance.  Also updates the CodeMirror instance if any setting changes.
1821
1822 2016-10-28  Joseph Pecoraro  <pecoraro@apple.com>
1823
1824         Web Inspector: Include parameter strings for native CustomElementRegistry methods in the console
1825         https://bugs.webkit.org/show_bug.cgi?id=164147
1826
1827         Reviewed by Brian Burg.
1828
1829         * UserInterface/Models/NativeFunctionParameters.js:
1830
1831 2016-10-28  Matt Baker  <mattbaker@apple.com>
1832
1833         Unreviewed, worker document images added
1834
1835         * UserInterface/Images/WorkerDocument.png: Added.
1836         * UserInterface/Images/WorkerDocument@2x.png: Added.
1837         * UserInterface/Images/WorkerDocumentLarge.png: Added.
1838         * UserInterface/Images/WorkerDocumentLarge@2x.png: Added.
1839
1840 2016-10-27  Devin Rousso  <dcrousso+webkit@gmail.com>
1841
1842         Web Inspector: Create general model object Collection class
1843         https://bugs.webkit.org/show_bug.cgi?id=163995
1844
1845         Reviewed by Joseph Pecoraro.
1846
1847         * UserInterface/Models/Collection.js: Added.
1848         (WebInspector.Collection):
1849         (WebInspector.Collection.prototype.get items):
1850         (WebInspector.Collection.prototype.get typeVerifier):
1851         (WebInspector.Collection.prototype.add):
1852         (WebInspector.Collection.prototype.remove):
1853         (WebInspector.Collection.prototype.clear):
1854         (WebInspector.Collection.prototype.toArray):
1855         (WebInspector.Collection.prototype.toJSON):
1856         (WebInspector.Collection.prototype.itemAdded):
1857         (WebInspector.Collection.prototype.itemRemoved):
1858         (WebInspector.Collection.prototype.itemsCleared):
1859         Class that holds multiple model objects.  It can be limited to a specific type by supplying
1860         a "typeVerifier", which is a function that accepts a single argument (the model object) and
1861         returns true/false depending on if that argument matches the "type" of the collection.
1862
1863         * UserInterface/Main.html:
1864         * UserInterface/Test.html:
1865         * UserInterface/Models/Frame.js:
1866         * UserInterface/Views/CookieStorageContentView.js:
1867         * UserInterface/Views/DebuggerSidebarPanel.js:
1868         * UserInterface/Views/FrameTreeElement.js:
1869         * UserInterface/Views/OpenResourceDialog.js:
1870         Add support for WebInspector.Collection.
1871         
1872         * UserInterface/Models/ResourceCollection.js:
1873         (WebInspector.ResourceCollection):
1874         (WebInspector.ResourceCollection.verifierForType):
1875         (WebInspector.ResourceCollection.prototype.resourceCollectionForType):
1876         (WebInspector.ResourceCollection.prototype.clear):
1877         (WebInspector.ResourceCollection.prototype.itemAdded):
1878         (WebInspector.ResourceCollection.prototype.itemRemoved):
1879         (WebInspector.ResourceCollection.prototype.itemsCleared):
1880         (WebInspector.ResourceCollection.prototype._associateWithResource):
1881         (WebInspector.ResourceCollection.prototype._disassociateWithResource):
1882         (WebInspector.ResourceCollection.prototype._resourceURLDidChange):
1883         (WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
1884         (WebInspector.ResourceCollection.prototype.get resources): Deleted.
1885         (WebInspector.ResourceCollection.prototype.resourcesWithType): Deleted.
1886         (WebInspector.ResourceCollection.prototype.addResource): Deleted.
1887         (WebInspector.ResourceCollection.prototype.removeResource): Deleted.
1888         (WebInspector.ResourceCollection.prototype.removeAllResources): Deleted.
1889         Now a subclass of WebInspector.Collection.  Retrieving WebInspector.Resource objects by type
1890         and URL is still supported, but requesting by type now returns another instance of
1891         WebInspector.ResourceCollection that is configured to only accept the requested type.
1892
1893 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
1894
1895         Web Inspector: Include ConsoleAgent in Workers - real console.log support
1896         https://bugs.webkit.org/show_bug.cgi?id=163844
1897         <rdar://problem/28903328>
1898
1899         Reviewed by Brian Burg.
1900
1901         * UserInterface/Protocol/Target.js:
1902         (WebInspector.Target.prototype.get ConsoleAgent):
1903         (WebInspector.Target.prototype._initializeNonMainTarget):
1904         * UserInterface/Protocol/Connection.js:
1905         (InspectorBackend.WorkerConnection):
1906         Add ConsoleAgent.
1907
1908         * UserInterface/Controllers/LogManager.js:
1909         (WebInspector.LogManager.prototype.messageWasAdded):
1910         (WebInspector.LogManager.prototype.requestClearMessages):
1911         Handle ConsoleAgent calls with multiple targets.
1912
1913         * UserInterface/Protocol/ConsoleObserver.js:
1914         (WebInspector.ConsoleObserver.prototype.messageAdded):
1915         Dispatch with the target in case we create Model objects.
1916
1917         * UserInterface/Controllers/WorkerManager.js:
1918         (WebInspector.WorkerManager.prototype.workerCreated):
1919         The frontend must now call "initialized" on Workers after
1920         sending our setup messages (enable, set breakpoints, etc).
1921
1922         * UserInterface/Protocol/RemoteObject.js:
1923         (WebInspector.RemoteObject.prototype.get target):
1924         Expose an accessor for tests.
1925
1926         * UserInterface/Protocol/LoggingProtocolTracer.js:
1927         (WebInspector.LoggingProtocolTracer.prototype._processEntry):
1928         Actually output the Exception, useful when debugging failures in tests.
1929
1930 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
1931
1932         Web Inspector: Include RuntimeAgent in Workers - evaluate in Worker context
1933         https://bugs.webkit.org/show_bug.cgi?id=163835
1934         <rdar://problem/28901465>
1935
1936         Reviewed by Brian Burg.
1937
1938         This introduces the idea that the frontend may communication with multiple
1939         backend "Targets" which each have their own set of Agents.
1940
1941             - WebInspector.Target
1942               - has its own list of Agents
1943               - has a InspectorBackend.Connection to communicate with the backend
1944
1945             - WebInspector.mainTarget
1946               - always exists and represents the thing we are debugging (Page or JSContext)
1947
1948             - WebInspector.targets / WebInspector.targetManager
1949               - management of all Targets
1950               - create new Targets for Workers
1951
1952         This also slowly introduces the concept that Model objects may be tied to
1953         a specific Target:
1954
1955             - WebInspector.RemoteObject
1956               - in order to evaluate JS and interact with this object we must know the target (Page or Worker)
1957               - when fetching PropertyDescriptors and other RemoteObjects we must continue to pass on the target
1958
1959         Finally this makes the QuickConsole list Worker execution contexts in
1960         the context picker so that users can choose a Worker context and
1961         evaluate JavaScript in that context using the console.
1962
1963         * Localizations/en.lproj/localizedStrings.js:
1964         * UserInterface/Main.html:
1965         * UserInterface/Base/Main.js:
1966         (WebInspector.loaded):
1967         * UserInterface/Test.html:
1968         * UserInterface/Test/Test.js:
1969         (WebInspector.loaded):
1970         New files, strings, and managers.
1971         New global WebInspector.mainTarget.
1972         New convenience WebInspector.targets.
1973
1974         * UserInterface/Protocol/Target.js: Added.
1975         (WebInspector.Target):
1976         (WebInspector.Target.prototype.get RuntimeAgent):
1977         (WebInspector.Target.prototype.get name):
1978         (WebInspector.Target.prototype.get type):
1979         (WebInspector.Target.prototype.get connection):
1980         (WebInspector.Target.prototype.get executionContext):
1981         (WebInspector.Target.prototype.get displayName):
1982         (WebInspector.Target.prototype._intializeMainTarget):
1983         (WebInspector.Target.prototype._initializeNonMainTarget):
1984         Target has some basic properties.
1985
1986         * UserInterface/Controllers/TargetManager.js:
1987         (WebInspector.TargetManager):
1988         (WebInspector.TargetManager.prototype.get targets):
1989         (WebInspector.TargetManager.prototype.addTarget):
1990         (WebInspector.TargetManager.prototype.removeTarget):
1991         Holds the list of Targets and events when created / removed.
1992         Each target with a RuntimeAgent has an ExecutionContext.
1993
1994         * UserInterface/Controllers/WorkerManager.js:
1995         (WebInspector.WorkerManager):
1996         (WebInspector.WorkerManager.prototype.workerCreated):
1997         (WebInspector.WorkerManager.prototype.workerTerminated):
1998         (WebInspector.WorkerManager.prototype.dispatchMessageFromWorker):
1999         Create / remove / dispatch on a Worker Target.
2000
2001         * UserInterface/Protocol/InspectorBackend.js:
2002         (InspectorBackendClass):
2003         (InspectorBackendClass.prototype.registerCommand):
2004         (InspectorBackendClass.prototype.dispatch):
2005         (InspectorBackendClass.prototype.runAfterPendingDispatches):
2006         (InspectorBackendClass.prototype._agentForDomain):
2007         Keep the original implementations and just dispatch to the main connection.
2008
2009         (InspectorBackend.Agent):
2010         (InspectorBackend.Agent.prototype.get connection):
2011         (InspectorBackend.Agent.prototype.set connection):
2012         (InspectorBackend.Agent.prototype.get dispatcher):
2013         We will share Agent implementations but just give new "copies" a different
2014         connection and dispatcher.
2015
2016         (InspectorBackend.Command):
2017         (InspectorBackend.Command.create):
2018         (InspectorBackend.Command.prototype.invoke):
2019         (InspectorBackend.Command.prototype.supports):
2020         We continue to have a single Command instance on the Agent. However instead
2021         of using the hardcoded Agent on the Instance when evaluated as a function
2022         it uses the `this` object which should be an agent. This way:
2023
2024             target1.RuntimeAgent.evaluate
2025                 - `this` is target1 and we use the connection for that target
2026             target2.RuntimeAgent.evaluate
2027                 - `this` is target2 and we use the connection for that target
2028
2029         Unfortunately this breaks `RuntimeAgent.evaluate.invoke`. Currently this
2030         is solved by providing an extra parameter. In the case where we need to
2031         invoke on a particular agent we must provide the agent.
2032
2033             target.RuntimeAgent.evaluate.invoke({options}, target.RuntimeAgent)
2034
2035         This is unfortunate but only needed in a handful of places right now.
2036
2037         (InspectorBackendClass.prototype._sendCommandToBackendWithCallback): Deleted.
2038         (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise): Deleted.
2039         (InspectorBackendClass.prototype._sendMessageToBackend): Deleted.
2040         (InspectorBackendClass.prototype._dispatchResponse): Deleted.
2041         (InspectorBackendClass.prototype._dispatchResponseToCallback): Deleted.
2042         (InspectorBackendClass.prototype._dispatchResponseToPromise): Deleted.
2043         (InspectorBackendClass.prototype._dispatchEvent): Deleted.
2044         (InspectorBackendClass.prototype._flushPendingScripts): Deleted.
2045         (InspectorBackend.Agent.prototype.get currentDispatchState): Deleted.
2046         (InspectorBackend.Command.prototype.deliverFailure): Deleted.
2047         * UserInterface/Protocol/Connection.js: Added.
2048         (InspectorBackend.Connection):
2049         (InspectorBackend.Connection.prototype.get target):
2050         (InspectorBackend.Connection.prototype.set target):
2051         (InspectorBackend.Connection.prototype.dispatch):
2052         (InspectorBackend.Connection.prototype.runAfterPendingDispatches):
2053         (InspectorBackend.Connection.prototype.sendMessageToBackend):
2054         (InspectorBackend.Connection.prototype._dispatchResponse):
2055         (InspectorBackend.Connection.prototype._dispatchResponseToCallback):
2056         (InspectorBackend.Connection.prototype._dispatchResponseToPromise):
2057         (InspectorBackend.Connection.prototype._dispatchEvent):
2058         (InspectorBackend.Connection.prototype._sendCommandToBackendWithCallback):
2059         (InspectorBackend.Connection.prototype._sendCommandToBackendExpectingPromise):
2060         (InspectorBackend.Connection.prototype._sendMessageToBackend):
2061         (InspectorBackend.Connection.prototype._flushPendingScripts):
2062         This extracts the Connection details into its own class.
2063         Although we make it appear as though a Target has a list of
2064         Agents, we actually have the Connection hold the list of Agents.
2065         Instead of cloning the entire Agent we just create a new object
2066         extended from the original Agent instance. This allows us to keep
2067         the same interface but just change the connection / dispatcher
2068         properties within the Agent.
2069
2070         (InspectorBackend.MainConnection):
2071         (InspectorBackend.MainConnection.prototype.sendMessageToBackend):
2072         (InspectorBackend.WorkerConnection):
2073         (InspectorBackend.WorkerConnection.sendMessageToBackend):
2074         Two different kinds of connections. One for the Main connection
2075         and one for Workers. Currently the list of agents we expose
2076         on a Worker Target/Connection is hardcoded.
2077
2078         * UserInterface/Models/ExecutionContext.js:
2079         (WebInspector.ExecutionContext):
2080         (WebInspector.ExecutionContext.prototype.get target):
2081         We may now have ExecutionContexts that mean a Page, Frames, and Workers.
2082         To do this we include the (target, executionContextId) tuple in this object.
2083         With this we have everything we need to evaluate JavaScript.
2084
2085         * UserInterface/Controllers/RuntimeManager.js:
2086         (WebInspector.RuntimeManager):
2087         (WebInspector.RuntimeManager.prototype.get activeExecutionContext):
2088         (WebInspector.RuntimeManager.prototype.set activeExecutionContext):
2089         (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier): Deleted.
2090         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier): Deleted.
2091         Update from contextId to a full ExecutionContext object.
2092
2093         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow.evalCallback):
2094         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
2095         (WebInspector.RuntimeManager.prototype.saveResult):
2096         (WebInspector.RuntimeManager.prototype.getPropertiesForRemoteObject):
2097         (WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
2098         * UserInterface/Controllers/FrameResourceManager.js:
2099         (WebInspector.FrameResourceManager.prototype.executionContextCreated):
2100         * UserInterface/Controllers/JavaScriptLogViewController.js:
2101         (WebInspector.JavaScriptLogViewController.prototype.consolePromptShouldCommitText):
2102         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2103         Anywhere that wants to use the "activeExecutionContext" must use the
2104         specific RuntimeAgent tied to that ExecutionContext's Target.
2105
2106         * UserInterface/Models/PropertyDescriptor.js:
2107         (WebInspector.PropertyDescriptor.fromPayload):
2108         * UserInterface/Protocol/RemoteObject.js:
2109         (WebInspector.RemoteObject):
2110         (WebInspector.RemoteObject.createFakeRemoteObject):
2111         (WebInspector.RemoteObject.fromPrimitiveValue):
2112         (WebInspector.RemoteObject.fromPayload):
2113         (WebInspector.RemoteObject.prototype.getDisplayablePropertyDescriptors):
2114         (WebInspector.RemoteObject.prototype.deprecatedGetDisplayableProperties):
2115         (WebInspector.RemoteObject.prototype.setPropertyValue):
2116         (WebInspector.RemoteObject.prototype.getCollectionEntries):
2117         (WebInspector.RemoteObject.prototype.releaseWeakCollectionEntries):
2118         (WebInspector.RemoteObject.prototype.callFunction):
2119         (WebInspector.RemoteObject.prototype.callFunctionJSON):
2120         (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor.wrappedCallback):
2121         (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor):
2122         (WebInspector.RemoteObject.prototype.release):
2123         (WebInspector.RemoteObject.prototype._getPropertyDescriptors):
2124         (WebInspector.RemoteObject.prototype._getPropertyDescriptorsResolver):
2125         (WebInspector.RemoteObject.prototype._deprecatedGetProperties):
2126         RemoteObject and related Model Objects now must be tied to a specific
2127         Target, because we need to know which Target it belongs to in order to
2128         interact with it further.
2129
2130         * UserInterface/Views/QuickConsole.js:
2131         (WebInspector.QuickConsole):
2132         (WebInspector.QuickConsole.prototype.get selectedExecutionContext):
2133         (WebInspector.QuickConsole.prototype.set selectedExecutionContext):
2134         (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
2135         (WebInspector.QuickConsole.prototype._rebuildExecutionContextPathComponents):
2136         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
2137         (WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
2138         (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
2139         (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
2140         (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
2141         (WebInspector.QuickConsole.prototype._insertOtherExecutionContextPathComponent):
2142         (WebInspector.QuickConsole.prototype._removeOtherExecutionContextPathComponent):
2143         (WebInspector.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
2144         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
2145         (WebInspector.QuickConsole.prototype._targetAdded):
2146         (WebInspector.QuickConsole.prototype._targetRemoved):
2147         (WebInspector.QuickConsole.prototype._pathComponentSelected):
2148         (WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier): Deleted.
2149         (WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier): Deleted.
2150         (WebInspector.QuickConsole.prototype._defaultExecutionContextChanged): Deleted.
2151         Update the code from executionContextId to ExecutionContext objects.
2152         Update the picker with ExecutionContextPathComponent for Workers (new Targets).
2153         Generalize and cleanup the code to make it easier to follow.
2154
2155 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
2156
2157         Web Inspector: Introduce Page WorkerAgent and Worker InspectorController
2158         https://bugs.webkit.org/show_bug.cgi?id=163817
2159         <rdar://problem/28899063>
2160
2161         Reviewed by Brian Burg.
2162
2163         * UserInterface/Main.html:
2164         * UserInterface/Test.html:
2165         New files.
2166
2167         * UserInterface/Base/Main.js:
2168         (WebInspector.loaded):
2169         * UserInterface/Test/Test.js:
2170         (WebInspector.loaded):
2171         New Observers and Managers.
2172
2173         * UserInterface/Protocol/WorkerObserver.js: Added.
2174         (WebInspector.WorkerObserver.prototype.workerCreated):
2175         (WebInspector.WorkerObserver.prototype.workerTerminated):
2176         (WebInspector.WorkerObserver.prototype.dispatchMessageFromWorker):
2177         (WebInspector.WorkerObserver):
2178         * UserInterface/Controllers/WorkerManager.js: Added.
2179         (WebInspector.WorkerManager):
2180         (WebInspector.WorkerManager.prototype.workerCreated):
2181         (WebInspector.WorkerManager.prototype.workerTerminated):
2182         (WebInspector.WorkerManager.prototype.dispatchMessageFromWorker):
2183         To be implemented with the first Worker agent implementation
2184         when there is actually something we can do with the Worker.
2185
2186 2016-10-25  Joseph Pecoraro  <pecoraro@apple.com>
2187
2188         Web Inspector: Cmd-+ doesn't "zoom in" to increase text size in the Web Inspector
2189         https://bugs.webkit.org/show_bug.cgi?id=163961
2190         <rdar://problem/28895308>
2191
2192         Reviewed by Brian Burg.
2193
2194         * UserInterface/Base/Main.js:
2195         (WebInspector.contentLoaded):
2196         Add a duplicate set of keyboard shortcuts for the Shift variants.
2197
2198 2016-10-25  Joseph Pecoraro  <pecoraro@apple.com>
2199
2200         Web Inspector: Remove dead code in FrameTreeElement
2201         https://bugs.webkit.org/show_bug.cgi?id=163914
2202
2203         Reviewed by Brian Burg.
2204
2205         * UserInterface/Views/FrameTreeElement.js:
2206
2207 2016-10-24  Devin Rousso  <dcrousso+webkit@gmail.com>
2208
2209         Web Inspector: Scope chain shouldn't show empty Closure sections
2210         https://bugs.webkit.org/show_bug.cgi?id=152348
2211
2212         Reviewed by Joseph Pecoraro.
2213
2214         * UserInterface/Controllers/DebuggerManager.js:
2215         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
2216         * UserInterface/Models/ScopeChainNode.js:
2217         (WebInspector.ScopeChainNode):
2218         (WebInspector.ScopeChainNode.prototype.get empty):
2219         Added support for new empty property.
2220
2221         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2222         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
2223         Only create and display a DetailsSection if the scope is not empty (via empty).
2224
2225 2016-10-24  Devin Rousso  <dcrousso+webkit@gmail.com>
2226
2227         Web Inspector: Improve Quick Open sorting algorithm
2228         https://bugs.webkit.org/show_bug.cgi?id=163705
2229
2230         Reviewed by Joseph Pecoraro.
2231
2232         * UserInterface/Models/ResourceQueryResult.js:
2233         (WebInspector.ResourceQueryResult.prototype._calculateRank.getMultiplier):
2234         (WebInspector.ResourceQueryResult.prototype._calculateRank):
2235         Added logic to multiply the ranking increment/decrement based on whether the current match
2236         is part of a sequence, whether that sequence began with a special character, and the length
2237         of the current sequence.
2238
2239 2016-10-19  Dean Jackson  <dino@apple.com>
2240
2241         Support CSS Shapes Level 1 without a prefix
2242         https://bugs.webkit.org/show_bug.cgi?id=163709
2243         <rdar://problem/28859369>
2244
2245         Reviewed by Myles Maxfield.
2246
2247         Replace -webkit-shape-outside with shape-outside.
2248
2249         * UserInterface/Models/CSSKeywordCompletions.js:
2250
2251 2016-10-19  Aaron Chu  <aaron_chu@apple.com>
2252
2253         Web Inspector: AXI: expose computed tree node and heading level
2254         https://bugs.webkit.org/show_bug.cgi?id=130825
2255         <rdar://problem/16442349>
2256
2257         Reviewed by Joseph Pecoraro.
2258
2259         Updating the Web Accessibility Inspector to display Heading Level and Hierarchical Level.
2260
2261         * Localizations/en.lproj/localizedStrings.js:
2262         * UserInterface/Models/DOMNode.js:
2263         (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
2264         (WebInspector.DOMNode.prototype.accessibilityProperties):
2265         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2266         (WebInspector.DOMNodeDetailsSidebarPanel):
2267         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
2268         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
2269
2270 2016-10-18  Joseph Pecoraro  <pecoraro@apple.com>
2271
2272         Web Inspector: Styles Sidebar highlights "translate" but not "translateX"
2273         https://bugs.webkit.org/show_bug.cgi?id=163613
2274         <rdar://problem/28829610>
2275
2276         Reviewed by Timothy Hatcher.
2277
2278         * UserInterface/Models/CSSCompletions.js:
2279         (WebInspector.CSSCompletions.requestCSSCompletions):
2280         The hash table objects we pass to CodeMirror expects keys to be lowercased.
2281
2282 2016-10-18  Joseph Pecoraro  <pecoraro@apple.com>
2283
2284         Web Inspector: CSS Autocompletion sometimes adds extra unexpected characters
2285         https://bugs.webkit.org/show_bug.cgi?id=163612
2286         <rdar://problem/28829557>
2287
2288         Reviewed by Timothy Hatcher.
2289
2290         * UserInterface/Controllers/CodeMirrorCompletionController.js:
2291         (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
2292         Better handle completions in cases where we are in the middle of a property
2293         to avoid orphaned characters, or at the end of a function name to avoid creating
2294         duplicate parenthesis.
2295
2296 2016-10-18  Joseph Pecoraro  <pecoraro@apple.com>
2297
2298         REGRESSION(r201171): Web Inspector: Timeline Recording playhead should always start immediately, not wait until first event
2299         https://bugs.webkit.org/show_bug.cgi?id=163583
2300         <rdar://problem/28815882>
2301
2302         Reviewed by Timothy Hatcher.
2303
2304         * UserInterface/Views/TimelineRecordingContentView.js:
2305         (WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
2306         Revert logic change introduced by r201171 with no explanation.
2307         Whenever we get a start time we should use it, regardless of
2308         of what the current time is, precisely because the backend is
2309         informing us of the start time to use.
2310
2311 2016-10-17  Joseph Pecoraro  <pecoraro@apple.com>
2312
2313         Web Inspector: Add toggles for debugger pauses at console.assert failures
2314         https://bugs.webkit.org/show_bug.cgi?id=139542
2315         <rdar://problem/19281600>
2316
2317         Reviewed by Timothy Hatcher.
2318
2319         * UserInterface/Controllers/DebuggerManager.js:
2320         (WebInspector.DebuggerManager.prototype.get assertionsBreakpoint):
2321         (WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
2322         (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
2323         New breakpoint and toggling behavior.
2324
2325         * Localizations/en.lproj/localizedStrings.js:
2326         * UserInterface/Views/DebuggerSidebarPanel.js:
2327         (WebInspector.DebuggerSidebarPanel):
2328         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
2329         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint):
2330         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
2331         New breakpoint tree element behavior.
2332
2333         (WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
2334         (WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
2335         Sidebar restoration if it was selected.
2336
2337         * UserInterface/Images/Assertion.svg: Added.
2338         * UserInterface/Images/gtk/Assertion.svg: Added.
2339         * UserInterface/Views/BreakpointTreeElement.css:
2340         (.breakpoint-assertion-icon .icon):
2341         New sidebar icon for the global breakpoint.
2342
2343 2016-10-15  Joseph Pecoraro  <pecoraro@apple.com>
2344
2345         Web Inspector: Cleanup parts of DebuggerManager
2346         https://bugs.webkit.org/show_bug.cgi?id=163400
2347
2348         Reviewed by Timothy Hatcher.
2349
2350         * UserInterface/Controllers/DebuggerManager.js:
2351         (WebInspector.DebuggerManager.restoreBreakpointsSoon):
2352
2353         (WebInspector.DebuggerManager.prototype.get paused):
2354         (WebInspector.DebuggerManager.prototype.get pauseReason):
2355         (WebInspector.DebuggerManager.prototype.get pauseData):
2356         (WebInspector.DebuggerManager.prototype.get callFrames):
2357         (WebInspector.DebuggerManager.prototype.get activeCallFrame):
2358         (WebInspector.DebuggerManager.prototype.set activeCallFrame):
2359         Put simple accessors at the top.
2360
2361         (WebInspector.DebuggerManager.prototype.get allExceptionsBreakpoint):
2362         (WebInspector.DebuggerManager.prototype.get allUncaughtExceptionsBreakpoint):
2363         (WebInspector.DebuggerManager.prototype.get breakpoints):
2364         (WebInspector.DebuggerManager.prototype.breakpointForIdentifier):
2365         (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
2366         (WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
2367         (WebInspector.DebuggerManager.prototype.isBreakpointEditable):
2368         (WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
2369         Group public breakpoint state and access methods.
2370
2371         (WebInspector.DebuggerManager.prototype.scriptForIdentifier):
2372         (WebInspector.DebuggerManager.prototype.scriptsForURL):
2373         (WebInspector.DebuggerManager.prototype.get searchableScripts):
2374         (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
2375         Group public script access methods.
2376
2377         (WebInspector.DebuggerManager.prototype.pause):
2378         (WebInspector.DebuggerManager.prototype.resume):
2379         (WebInspector.DebuggerManager.prototype.stepOver):
2380         (WebInspector.DebuggerManager.prototype.stepInto):
2381         (WebInspector.DebuggerManager.prototype.stepOut):
2382         (WebInspector.DebuggerManager.prototype.continueToLocation):
2383         (WebInspector.DebuggerManager.prototype.addBreakpoint):
2384         (WebInspector.DebuggerManager.prototype.removeBreakpoint):
2385         Group and modernize public methods that perform actions.
2386
2387         (WebInspector.DebuggerManager.prototype.nextBreakpointActionIdentifier):
2388         Misc. methods.
2389
2390         (WebInspector.DebuggerManager.prototype.breakpointResolved):
2391         (WebInspector.DebuggerManager.prototype.reset):
2392         (WebInspector.DebuggerManager.prototype.playBreakpointActionSound):
2393         (WebInspector.DebuggerManager.prototype.scriptDidParse):
2394         (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
2395         (WebInspector.DebuggerManager.prototype._setBreakpoint):
2396         (WebInspector.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
2397         (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
2398         (WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
2399         Minor cleanup in protected and private methods.
2400
2401         * UserInterface/Models/BreakpointAction.js:
2402         (WebInspector.BreakpointAction):
2403         Getting the next identifier is an action so it should be a function call.
2404
2405         * UserInterface/Views/SourceCodeTextEditor.js:
2406         (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
2407         Remove unused parameter.
2408
2409 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2410
2411         Web Inspector: Dragging to delete a Breakpoint should never trigger a ContentView change
2412         https://bugs.webkit.org/show_bug.cgi?id=163403
2413         <rdar://problem/28762930>
2414
2415         Reviewed by Timothy Hatcher.
2416
2417         * UserInterface/Views/BreakpointTreeElement.js:
2418         (WebInspector.BreakpointTreeElement.prototype.ondelete):
2419         Signal when a breakpoint tree element will be going away because it was
2420         deleted via the keyboard operation within the TreeOutline. This is a dirty
2421         way to do the signal but we remove BreakpointTreeElements asynchronously
2422         when the Breakpoint actually gets removed from the backend.
2423
2424         * UserInterface/Views/DebuggerSidebarPanel.js:
2425         (WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
2426         Deselect a BreakpointTreeElement if it was deleted in a way other then
2427         the delete keyboard shortcut. This ensures another TreeElement selection
2428         doesn't force ContentView changes.
2429
2430 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2431
2432         Web Inspector: Improve debugger highlight when inside of getter/setter calls
2433         https://bugs.webkit.org/show_bug.cgi?id=163428
2434         <rdar://problem/28769061>
2435
2436         Reviewed by Timothy Hatcher.
2437
2438         * UserInterface/Views/SourceCodeTextEditor.js:
2439         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2440         When in the middle of a member expression at a '.' or '[' get the best member
2441         expression range.
2442
2443         * UserInterface/Views/TextEditor.js:
2444         (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
2445         Include the character at the current position. This is useful since AST Nodes
2446         don't give us token info but we would like to know if we are at particular tokens.
2447
2448 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2449
2450         Web Inspector: Unused Breakpoint getter/setter for "id" - should be "identifier"
2451         https://bugs.webkit.org/show_bug.cgi?id=163395
2452
2453         Reviewed by Timothy Hatcher.
2454
2455         * UserInterface/Models/Breakpoint.js:
2456         (WebInspector.Breakpoint.prototype.get identifier): Renamed.
2457         (WebInspector.Breakpoint.prototype.set identifier): Renamed.
2458         The only user is DebuggerManager which sets and gets. Previously
2459         it was unexpectedly setting a direct property on the Breakpoint
2460         instead of using these methods to set the member variable.
2461
2462 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2463
2464         Web Inspector: Remove uses of delete in SourceCodeTextEditor
2465         https://bugs.webkit.org/show_bug.cgi?id=163379
2466
2467         Reviewed by Timothy Hatcher.
2468
2469         Remove uses of delete and better group member variables.
2470         One of the deletes was deleting an incorrect property.
2471
2472         * UserInterface/Views/SourceCodeTextEditor.js:
2473         (WebInspector.SourceCodeTextEditor):
2474         (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
2475         (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
2476         (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
2477         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
2478         (WebInspector.SourceCodeTextEditor.prototype._dismissEditingController):
2479         (WebInspector.SourceCodeTextEditor.prototype.editingControllerDidFinishEditing):
2480
2481 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2482
2483         Uncaught Exception: TypeError: this.positionToOffset is not a function - seen hovering expressions with Type Profiler enabled
2484         https://bugs.webkit.org/show_bug.cgi?id=163405
2485         <rdar://problem/28763953>
2486
2487         Reviewed by Matt Baker.
2488
2489         * UserInterface/Views/SourceCodeTextEditor.js:
2490         Use correct method name, the old one must have gone away.
2491
2492 2016-10-12  Joseph Pecoraro  <pecoraro@apple.com>
2493
2494         Web Inspector: Improve support for logging Proxy objects in console
2495         https://bugs.webkit.org/show_bug.cgi?id=163323
2496         <rdar://problem/28432553>
2497
2498         Reviewed by Timothy Hatcher.
2499
2500         * UserInterface/Views/ConsoleMessageView.js:
2501         (WebInspector.ConsoleMessageView.prototype._formatParameter):
2502         Treat a Proxy like any other object.
2503
2504 2016-10-12  Joseph Pecoraro  <pecoraro@apple.com>
2505
2506         Emit DebugHooks uniformly with pause locations instead of having separate pause locations and op_debug emits
2507         https://bugs.webkit.org/show_bug.cgi?id=162809
2508
2509         Reviewed by Geoffrey Garen.
2510
2511         * UserInterface/Views/SourceCodeTextEditor.js:
2512         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2513         When pausing on the variable assignment inside for..of and for..in don't just
2514         highlight "var foo" but include the right hand side "var foo in ..." or
2515         "var foo of ...".
2516
2517 2016-10-12  Joseph Pecoraro  <pecoraro@apple.com>
2518
2519         Web Inspector: Whole program sometimes highlighted instead of just first statement
2520         https://bugs.webkit.org/show_bug.cgi?id=163300
2521         <rdar://problem/28723162>
2522
2523         Reviewed by Timothy Hatcher.
2524
2525         * UserInterface/Views/SourceCodeTextEditor.js:
2526         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2527         Avoid highlighting the entire program by skipping a Program type Node.
2528
2529         * UserInterface/Views/TextEditor.js:
2530         (WebInspector.TextEditor.prototype.setExecutionLineAndColumn):
2531         Avoid unnecessary work before content has loaded.
2532
2533         (WebInspector.TextEditor.prototype.currentPositionToOriginalOffset):
2534         Avoid unnecessary indirection to get the CodeMirror editor.
2535
2536 2016-10-11  Joseph Pecoraro  <pecoraro@apple.com>
2537
2538         Web Inspector: Remove line highlight on primary execution line while stepping because it is distracting
2539         https://bugs.webkit.org/show_bug.cgi?id=163294
2540         <rdar://problem/28721176>
2541
2542         Reviewed by Timothy Hatcher.
2543
2544         * UserInterface/Views/TextEditor.js:
2545         (WebInspector.TextEditor.prototype._updateExecutionLine):
2546         When setting the primary execution line, remove default line highlights.
2547
2548 2016-10-10  Matt Baker  <mattbaker@apple.com>
2549
2550         Web Inspector: Revealed line not highlighted in TextEditor while debugger paused
2551         https://bugs.webkit.org/show_bug.cgi?id=163197
2552
2553         Reviewed by Timothy Hatcher.
2554
2555         * UserInterface/Views/TextEditor.js:
2556         (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
2557         Avoid highlighting the execution line while debugging, but allow
2558         other lines to be highlighted.
2559
2560 2016-10-06  Devin Rousso  <dcrousso+webkit@gmail.com>
2561
2562         Inspector exception in `parseTextForRule()` when pasting into CSS rule selector
2563         https://bugs.webkit.org/show_bug.cgi?id=162792
2564
2565         Reviewed by Matt Baker.
2566
2567         * UserInterface/Views/CSSStyleDeclarationSection.js:
2568         (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
2569         Changed regular expression for matching CSS rules to allow newlines in pasted text.
2570
2571 2016-10-02  Devin Rousso  <dcrousso+webkit@gmail.com>
2572
2573         Web Inspector: Clicking twice on the color swatch square should hide the color picker
2574         https://bugs.webkit.org/show_bug.cgi?id=162759
2575
2576         Reviewed by Matt Baker.
2577
2578         * UserInterface/Views/InlineSwatch.js:
2579         (WebInspector.InlineSwatch):
2580         (WebInspector.InlineSwatch.prototype.didDismissPopover):
2581         (WebInspector.InlineSwatch.prototype._swatchElementClicked):
2582         Remove the "click" event listener when a popover is presented to prevent improper
2583         interaction.  Add the event listener back when the popover is dismissed.
2584
2585 2016-10-02  Matt Baker  <mattbaker@apple.com>
2586
2587         Web Inspector: Exception thrown when hovering network waterfall graphs during reload
2588         https://bugs.webkit.org/show_bug.cgi?id=162850
2589         <rdar://problem/28579653>
2590
2591         Reviewed by Brian Burg.
2592
2593         * UserInterface/Views/ResourceTimelineDataGridNode.js:
2594         (WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
2595         Check that the node's data grid reference is valid before use.
2596         (WebInspector.ResourceTimelineDataGridNode):
2597
2598 2016-10-01  Joseph Pecoraro  <pecoraro@apple.com>
2599
2600         Web Inspector: Selection does not show up over execution highlight ranges
2601         https://bugs.webkit.org/show_bug.cgi?id=162844
2602         <rdar://problem/28579121>
2603
2604         Reviewed by Matt Baker.
2605
2606         * Scripts/update-codemirror-resources.rb:
2607         * UserInterface/External/CodeMirror/mark-selection.js: Added.
2608         * UserInterface/Main.html:
2609         New add-on that makes selection a text marker so it can be styled
2610         at the same level as other text markers.
2611
2612         * UserInterface/Views/TextEditor.css:
2613         (.text-editor > .CodeMirror .execution-range-highlight:not(.CodeMirror-selectedtext)):
2614         Don't use execution-range-highlight styles if the text is selected.
2615
2616         * UserInterface/Views/TextEditor.js:
2617         (WebInspector.TextEditor):
2618         Enable the text selection as text markers addon.
2619
2620 2016-09-30  Joseph Pecoraro  <pecoraro@apple.com>
2621
2622         Web Inspector: Make debugger stepping highlights work in inline <script>s
2623         https://bugs.webkit.org/show_bug.cgi?id=162753
2624         <rdar://problem/28551332>
2625
2626         Reviewed by Brian Burg.
2627
2628         * UserInterface/Models/TextRange.js:
2629         (WebInspector.TextRange.prototype.contains):
2630         Check if a given line/column falls within this range.
2631
2632         * UserInterface/Views/SourceCodeTextEditor.js:
2633         (WebInspector.SourceCodeTextEditor.prototype._getAssociatedScript):
2634         If we are in a Document resource find the associated script at a given position.
2635
2636         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2637         When comparing offsets to SyntaxTree offsets, the SyntaxTree's offset of 0 is the
2638         first character of the Script, which differs from the current SourceCode's offset.
2639         Adjust the offset by the Script's startOffset.
2640
2641         * UserInterface/Views/TextEditor.js:
2642         (WebInspector.TextEditor.prototype.currentPositionToOriginalPosition):
2643         (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
2644         Pass both the original offset and original position to the delegate.
2645
2646 2016-09-30  Joseph Pecoraro  <pecoraro@apple.com>
2647
2648         Web Inspector: Stepping through `a(); b(); c();` it is unclear where we are and what is about to execute
2649         https://bugs.webkit.org/show_bug.cgi?id=161658
2650         <rdar://problem/28181254>
2651
2652         Reviewed by Geoffrey Garen.
2653
2654         * UserInterface/Models/Script.js:
2655         (WebInspector.Script.prototype.requestScriptSyntaxTree):
2656         Fix first calls to requestScriptSyntaxTree. They were getting an uncaught
2657         exception because the content argument was missing.
2658
2659         * UserInterface/Models/ScriptSyntaxTree.js:
2660         (WebInspector.ScriptSyntaxTree.prototype.containersOfOffset):
2661         Find all AST nodes that contain a particular offset.
2662
2663         * UserInterface/Views/SourceCodeTextEditor.js:
2664         (WebInspector.SourceCodeTextEditor):
2665         (WebInspector.SourceCodeTextEditor.prototype.close):
2666         (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
2667         (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
2668         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2669         Provide a good highlight range for a given offset. This is normally the start
2670         of a statement/expression, inside a statement/expression, or the closing brace
2671         of a function (leaving a function). Provide good ranges for each of these.
2672
2673         * UserInterface/Views/TextEditor.js:
2674         (WebInspector.TextEditor):
2675         (WebInspector.TextEditor.set string.update):
2676         (WebInspector.TextEditor.prototype.set string):
2677         (WebInspector.TextEditor.prototype.setExecutionLineAndColumn):
2678         (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
2679         (WebInspector.TextEditor.prototype.revealPosition):
2680         (WebInspector.TextEditor.prototype.currentPositionToOriginalOffset):
2681         (WebInspector.TextEditor.prototype._updateAfterFormatting):
2682         (WebInspector.TextEditor.prototype.set executionLineNumber): Deleted.
2683         (WebInspector.TextEditor.prototype.set executionColumnNumber): Deleted.
2684         (WebInspector.TextEditor.prototype._updateExecutionLine.update): Deleted.
2685         Always set the execution line and column together, to simplify how we update highlights.
2686
2687         (WebInspector.TextEditor.prototype._clearMultilineExecutionLineHighlights):
2688         (WebInspector.TextEditor.prototype._updateExecutionLine):
2689         When updating the main highlight clear any multi-line highlights.
2690
2691         (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
2692         Ask the delegate for a specific highlight range. If provided use that range,
2693         otherwise just highlight the end of the line. Once we know the range, if it
2694         is multiple lines, give the extra lines the full line highlight as well.
2695         Also make adjustments, such as not highlighting trailing whitespace.
2696
2697         * UserInterface/Views/TextEditor.css:
2698         (.text-editor > .CodeMirror .execution-line.primary .CodeMirror-linenumber::after):
2699         (.text-editor > .CodeMirror .execution-line):
2700         (.text-editor > .CodeMirror .execution-line .CodeMirror-matchingbracket):
2701         (.text-editor > .CodeMirror .execution-range-highlight):
2702         Styles for execution lines and execution range highlights.
2703
2704 2016-09-29  Aaron Chu  <aaron_chu@apple.com>
2705
2706         Web Inspector: AXI: linkified refs to #document and #text are not usually navigable nodes; consider delinkifying them
2707         https://bugs.webkit.org/show_bug.cgi?id=130600
2708         <rdar://problem/16391333>
2709
2710         Reviewed by Brian Burg.
2711
2712         Removing link style for non-navigable nodes by first
2713         checking nodeType of the node.
2714
2715         * UserInterface/Base/DOMUtilities.js:
2716         (WebInspector.linkifyNodeReference):
2717
2718 2016-09-27  Matt Baker  <mattbaker@apple.com>
2719
2720         Web Inspector: Refreshing while in Timelines-tab causes negative timestamps in Network-tab
2721         https://bugs.webkit.org/show_bug.cgi?id=160051
2722         <rdar://problem/27480122>
2723
2724         Reviewed by Brian Burg.
2725
2726         * UserInterface/Views/NetworkGridContentView.js:
2727         (WebInspector.NetworkGridContentView.prototype.get startTime):
2728         (WebInspector.NetworkGridContentView.prototype.get zeroTime):
2729         Use the cached start time for graph data source properties instead of
2730         relying on the ruler, which requires a layout in order to be updated
2731         for the first time.
2732
2733 2016-09-27  Matt Baker  <mattbaker@apple.com>
2734
2735         Web Inspector: Unfocusing / Focusing inspector window should not change ContentView
2736         https://bugs.webkit.org/show_bug.cgi?id=162572
2737         <rdar://problem/28479562>
2738
2739         Reviewed by Brian Burg.
2740
2741         Improve NavigationSidebarPanel logic for coordinating selection between trees.
2742         When tree selection changes, the most recent selection should be restored
2743         the next time the tree is focused.
2744
2745         The sidebar should also handle focusing a tree for the first time, in
2746         which no previous selection exists, and focusing a tree that has had its
2747         previous selection filtered out (hidden).
2748
2749         * UserInterface/Views/NavigationSidebarPanel.js:
2750         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineDidFocus):
2751         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
2752         Restoring the last deselected element, instead of the last selected element
2753         only works when the selection is moving from one tree to another. When
2754         the elements belong to the same tree the newly selected element won't
2755         be saved until the next selection change. If the window loses and regains
2756         the focus before then, the tree will restore the previous selection,
2757         effectively reverting the last selection change.
2758
2759 2016-09-27  Tomas Popela  <tpopela@redhat.com>
2760
2761         [GTK] Mac defaults are used for key shortcuts on Linux
2762         https://bugs.webkit.org/show_bug.cgi?id=162564
2763
2764         Don't set Mac's default keymap as a fallthrough for CodeMirror when we
2765         are not on Mac.
2766
2767         Reviewed by Carlos Garcia Campos.
2768
2769         * UserInterface/Test.html: Include Platform.js for the
2770         WebInspector.Platform definition.
2771         * UserInterface/Views/CodeMirrorAdditions.js:
2772
2773 2016-09-26  Matt Baker  <mattbaker@apple.com>
2774
2775         Web Inspector: Box Model values not updated when DOM node styles change
2776         https://bugs.webkit.org/show_bug.cgi?id=162525
2777
2778         Reviewed by Brian Burg.
2779
2780         The Box Model section should refresh itself when the selected node's
2781         computed style changes. This is necessary since the Styles sidebar
2782         doesn't always refresh its sections on node changes.
2783
2784         * UserInterface/Views/BoxModelDetailsSectionRow.js:
2785         (WebInspector.BoxModelDetailsSectionRow.prototype.set nodeStyles):
2786         Refresh metrics whenever the computed style changes.
2787
2788         (WebInspector.BoxModelDetailsSectionRow.prototype._getBox):
2789         (WebInspector.BoxModelDetailsSectionRow.prototype._getComponentSuffix):
2790         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createValueElement):
2791         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
2792         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
2793         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
2794         Drive-by cleanup to make this large function easier to read.
2795         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement): Deleted.
2796         Renamed createValueElement.
2797         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement): Deleted.
2798         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement): Deleted.
2799         Combined these into a single function taking a property name (width or height).
2800
2801 == Rolled over to ChangeLog-2016-09-26 ==