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