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