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