Uncaught Exception: null is not an object (evaluating 'this.listItemElement.classList')
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-09-18  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Uncaught Exception: null is not an object (evaluating 'this.listItemElement.classList')
4         https://bugs.webkit.org/show_bug.cgi?id=162123
5         <rdar://problem/28352900>
6
7         Reviewed by Matt Baker.
8
9         * UserInterface/Views/DOMTreeElement.js:
10         (WebInspector.DOMTreeElement.prototype.onexpand):
11         If not attached yet, don't update title. We will update title
12         when attaching, so this avoids work and avoids doing that
13         work when the tree element is not fully setup.
14
15         (WebInspector.DOMTreeElement.prototype._startEditing):
16         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
17         (WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
18         Switch to the public name instead of the private name.
19
20 2016-09-16  Joseph Pecoraro  <pecoraro@apple.com>
21
22         Web Inspector: Implement Copy CSS Selector and Copy Xpath Selector context menus
23         https://bugs.webkit.org/show_bug.cgi?id=158881
24         <rdar://problem/8181156>
25
26         Reviewed by Matt Baker.
27
28         This is based off of the Blink implementation (DOMPresentationUtils)
29         with some minor modifications and using our own utility methods.
30
31         * Localizations/en.lproj/localizedStrings.js:
32         New context menu strings.
33
34         * UserInterface/Base/DOMUtilities.js:
35         (WebInspector.cssPath):
36         (WebInspector.cssPathComponent.classNames):
37         (WebInspector.cssPathComponent):
38         (WebInspector.xpath):
39         (WebInspector.xpathIndex.isSimiliarNode):
40         (WebInspector.xpathIndex):
41         Build strings for a CSS selector path or XPath path to a node.
42
43         * UserInterface/Views/DOMTreeElement.js:
44         (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
45         * UserInterface/Views/DOMTreeOutline.js:
46         (WebInspector.DOMTreeOutline.prototype.populateContextMenu):
47         Include copy path context menu items on nodes.
48         Pseudo elements do not get Copy XPath.
49         Non-node elements do not get Copy Selector Path.
50
51 2016-09-16  Nikita Vasilyev  <nvasilyev@apple.com>
52
53         Web Inspector: Make console session dividers more pronounced
54         https://bugs.webkit.org/show_bug.cgi?id=161938
55         <rdar://problem/28291166>
56
57         Reviewed by Brian Burg.
58
59         Instead of using a dim dashed line as a console session separator, include time and reason why
60         the new session started, which could be one of the following values:
61         - Console opened (for the first time)
62         - Console cleared
63         - Page reloaded
64         - Page navigated
65
66         * Localizations/en.lproj/localizedStrings.js:
67         * UserInterface/Controllers/JavaScriptLogViewController.js:
68         (WebInspector.JavaScriptLogViewController.prototype.clear):
69         (WebInspector.JavaScriptLogViewController.prototype.startNewSession):
70         Remove previous session if it doesn't have any messages.
71
72         * UserInterface/Controllers/LogManager.js:
73         (WebInspector.LogManager.prototype._mainResourceDidChange):
74         (WebInspector.LogManager):
75         Session separator wasn't appended when navigating to a different web page. Always dispatch
76         SessionStarted events when the main resource changes. Distinguish between reload and navigation.
77
78         * UserInterface/Views/ConsoleSession.js:
79         (WebInspector.ConsoleSession):
80         (WebInspector.ConsoleSession.prototype.addMessageView):
81         (WebInspector.ConsoleSession.prototype.append):
82         (WebInspector.ConsoleSession.prototype.hasMessages):
83         * UserInterface/Views/LogContentView.css:
84         (.console-session-header):
85         (.console-session:first-of-type .console-session-header):
86         (.console-session:not(:first-of-type)):
87         (.console-session:not(:first-of-type) .console-session-header):
88         * UserInterface/Views/LogContentView.js:
89         (WebInspector.LogContentView.prototype._sessionStarted):
90
91 2016-09-16  Devin Rousso  <dcrousso+webkit@gmail.com>
92
93         Web Inspector: make Object.awaitEvent synchronously add an event listener
94         https://bugs.webkit.org/show_bug.cgi?id=162066
95
96          Reviewed by Brian Burg.
97
98         * UserInterface/Base/Object.js:
99         (WebInspector.Object.awaitEvent):
100         Utilize a WebInspector.WrappedPromise to not worry about adding the singleFireEventListener
101         on the next tick due to the promise construction.
102
103         * UserInterface/TestStub.html:
104         Add WebInspector.WrappedPromise.
105
106 2016-09-16  Joseph Pecoraro  <pecoraro@apple.com>
107
108         Web Inspector: Include JavaScript completion for ES6 keywords and global variables
109         https://bugs.webkit.org/show_bug.cgi?id=162027
110
111         Reviewed by Brian Burg.
112
113         * UserInterface/Controllers/CodeMirrorCompletionController.js:
114         (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
115         Include ES6 keywords and provide them when they may be available.
116
117         * UserInterface/Views/ConsolePrompt.js:
118         (WebInspector.ConsolePrompt):
119         * UserInterface/Views/TextEditor.js:
120         (WebInspector.TextEditor.prototype.set mimeType):
121         For editors that might want to provide completion for global variables
122         use the mode with options way of setting the mode for CodeMirror. The
123         only mode that cares about "globalVars" are the JavaScript variants.
124
125 2016-09-15  Devin Rousso  <dcrousso+webkit@gmail.com>
126
127         Web Inspector: support drag and drop of CSS classes and ids onto DOM nodes
128         https://bugs.webkit.org/show_bug.cgi?id=16529
129
130         Reviewed by Joseph Pecoraro.
131
132         * UserInterface/Models/DOMNode.js:
133         (WebInspector.DOMNode.prototype.toggleClass.resolvedNode.inspectedPage_node_toggleClass):
134         (WebInspector.DOMNode.prototype.toggleClass.resolvedNode):
135         (WebInspector.DOMNode.prototype.toggleClass):
136         Moved from WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.
137
138         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
139         (.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
140         Added z-index to fix overlapping with selector origin.
141
142         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
143         (WebInspector.CSSStyleDetailsSidebarPanel):
144         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
145         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
146         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
147         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._classToggleButtonClicked):
148         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._addClassInputBlur):
149         Added a setting for auto-expanding the Classes toggle list based on the previous state.
150         Also renamed the existing _lastSelectedSectionSetting to _lastSelectedPanelSetting since the
151         setting doesn't have anything to do with the last selected section.
152
153         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName):
154         (WebInspector.CSSStyleDetailsSidebarPanel.ToggledClassesDragType):
155         Added functionality to allow dragging of a className toggle's text (not the checkbox) by
156         using a custom type, preventing the value from being dropped anywhere except the DOM tree.
157
158         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName.classNameToggleChanged):
159         Restructured to use arrow function to avoid function binding.
160
161         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode.toggleClass): Deleted.
162         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode): Deleted.
163         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass): Deleted.
164
165         * UserInterface/Views/DOMTreeOutline.js:
166         (WebInspector.DOMTreeOutline.prototype._ondragover):
167         (WebInspector.DOMTreeOutline.prototype._ondrop.callback):
168         (WebInspector.DOMTreeOutline.prototype._ondrop):
169         Allow dragging when the dataTransfer object contains the type specified by
170         WebInspector.CSSStyleDetailsSidebarPanel.ToggledClassesDragType.  The value for that type
171         will be added to the dropped element's classList.
172
173 2016-09-15  Matt Baker  <mattbaker@apple.com>
174
175         Web Inspector: Use more global color variables in TreeOutline and DataGrid
176         https://bugs.webkit.org/show_bug.cgi?id=161940
177         <rdar://problem/28292555>
178
179         Reviewed by Brian Burg.
180
181         * UserInterface/Views/DataGrid.css:
182         (.data-grid tr.selected):
183         (.data-grid:matches(:focus, .force-focus) tr.selected):
184         Use global color vars.
185
186         * UserInterface/Views/TreeOutline.css:
187         (.tree-outline .item.selected):
188         Use global color vars.
189         (body.window-inactive .tree-outline .item.selected): Deleted.
190         Not needed. Unfocused color is the same when window is inactive.
191
192         * UserInterface/Views/Variables.css:
193         (:root):
194         Add --selected-background-color-unfocused.
195
196 2016-09-14  Matt Baker  <mattbaker@apple.com>
197
198         Web Inspector: Call frame is sometimes not selected in Debugger sidebar on initial pause
199         https://bugs.webkit.org/show_bug.cgi?id=161835
200         <rdar://problem/28236680>
201
202         Reviewed by Joseph Pecoraro.
203
204         * UserInterface/Views/NavigationSidebarPanel.js:
205         (WebInspector.NavigationSidebarPanel):
206         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
207         If a tree other than the newly selected element's tree has the selection,
208         deselect it to prevent multiple tree selections.
209         (WebInspector.NavigationSidebarPanel.prototype.show): Deleted.
210         Not needed since the selected tree is no longer tracked. Incidentally,
211         SidebarPanel.show was only called by SearchSidebarPanel, which doesn't need
212         to manage selection across multiple tree outlines.
213
214 2016-09-14  Matt Baker  <mattbaker@apple.com>
215
216         Web Inspector: Call Stack tree in the Debugger sidebar should mark the active call frame
217         https://bugs.webkit.org/show_bug.cgi?id=161945
218         <rdar://problem/28293451>
219
220         Reviewed by Joseph Pecoraro.
221
222         Add an indicator for the active call frame tree element, patterned after
223         Xcode's call stack UI. The indicator should be positioned on the left,
224         with a fill color based on the tree element's selected/focused state.
225
226         * UserInterface/Images/ActiveCallFrame.svg: Added.
227         Image for "active call frame" tree element status.
228
229         * UserInterface/Main.html:
230         New file.
231
232         * UserInterface/Views/CallFrameTreeElement.css: Added.
233         (.tree-outline .item.call-frame .status):
234         (.tree-outline .item.call-frame .status > .status-image):
235         (.tree-outline .item.call-frame.selected .status > .status-image):
236         (.tree-outline:matches(:focus, .force-focus) .item.call-frame.selected .status > .status-image):
237         New tree element styles.
238
239         * UserInterface/Views/CallFrameTreeElement.js:
240         (WebInspector.CallFrameTreeElement):
241         (WebInspector.CallFrameTreeElement.prototype.get callFrame):
242         (WebInspector.CallFrameTreeElement.prototype.get isActiveCallFrame):
243         (WebInspector.CallFrameTreeElement.prototype.set isActiveCallFrame):
244         Add property for toggling active call frame indicator.
245         (WebInspector.CallFrameTreeElement.prototype.onattach):
246         (WebInspector.CallFrameTreeElement.prototype._updateStatus):
247
248         * UserInterface/Views/DebuggerSidebarPanel.js:
249         (WebInspector.DebuggerSidebarPanel):
250         (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
251         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
252
253         * UserInterface/Views/Variables.css:
254         (:root):
255         New global for dark border color.
256
257 2016-09-13  Matt Baker  <mattbaker@apple.com>
258
259         Web Inspector: Use Array.shallowEqual instead of Object.shallowEqual in more places
260         https://bugs.webkit.org/show_bug.cgi?id=161867
261         <rdar://problem/28261328>
262
263         Reviewed by Joseph Pecoraro.
264
265         * UserInterface/Base/Utilities.js:
266         (value):
267         Array.shallowEqual should return false if passed a non-array.
268
269         * UserInterface/Models/CSSRule.js:
270         (WebInspector.CSSRule.prototype.update):
271         * UserInterface/Models/Color.js:
272         (WebInspector.Color.prototype.isKeyword):
273         * UserInterface/Models/DOMNodeStyles.js:
274         (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
275         (WebInspector.DOMNodeStyles.prototype.refresh):
276         * UserInterface/Models/Geometry.js:
277         (WebInspector.CubicBezier.prototype.toString):
278         * UserInterface/Views/GeneralTreeElement.js:
279         (WebInspector.GeneralTreeElement.prototype.set classNames):
280         * UserInterface/Views/NewTabContentView.js:
281         (WebInspector.NewTabContentView.prototype._updateShownTabs):
282         Prefer Array.shallowEqual over Obejct.shallowEqual if the arguments
283         will always be arrays.
284
285 2016-09-13  Joseph Pecoraro  <pecoraro@apple.com>
286
287         Web Inspector: Should be able to pretty print module code (import / export statements)
288         https://bugs.webkit.org/show_bug.cgi?id=161891
289         <rdar://problem/28272784>
290
291         Reviewed by Yusuke Suzuki.
292
293         * Tools/Formatting/EsprimaFormatterDebug.js:
294         * Tools/Formatting/index.html:
295         Update the formatting tool to toggle between source type modes.
296
297         * UserInterface/Proxies/FormatterWorkerProxy.js:
298         * UserInterface/Workers/Formatter/FormatterWorker.js:
299         (FormatterWorker.prototype.formatJavaScript):
300         Provide a flag to parse the input as a module instead of a script/program.
301
302         * UserInterface/Views/TextEditor.js:
303         (WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
304         Using the formatter here, we may have module scripts in the future.
305
306         * UserInterface/Views/SourceCodeTextEditor.js:
307         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
308         Using the formatter for a function is not module source.
309
310         * UserInterface/Workers/Formatter/ESTreeWalker.js:
311         (ESTreeWalker.prototype._walkChildren):
312         Visit children of Export/Import nodes.
313
314         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
315         (EsprimaFormatter.prototype._handleTokenAtNode):
316         Output tokens with appropriate whitespace.
317
318 2016-09-13  Chris Dumez  <cdumez@apple.com>
319
320         Drop support for <isindex>
321         https://bugs.webkit.org/show_bug.cgi?id=7139
322
323         Reviewed by Ryosuke Niwa.
324
325         Drop references to isindex.
326
327         * UserInterface/Views/DOMTreeElement.js:
328
329 2016-09-12  Matt Baker  <mattbaker@apple.com>
330
331         Web Inspector: Improve clarity of inspector tests by adding TestHarness.expect* functions similar to XCTest
332         https://bugs.webkit.org/show_bug.cgi?id=161278
333         <rdar://problem/28039741>
334
335         Reviewed by Joseph Pecoraro.
336
337         Under the hood they all call TestHarness.expectThat.
338
339         * UserInterface/Test/TestHarness.js:
340         (TestHarness.prototype.expectFalse):
341         (TestHarness.prototype.expectNull):
342         (TestHarness.prototype.expectNotNull):
343         (TestHarness.prototype.expectEqual):
344         (TestHarness.prototype.expectNotEqual):
345         (TestHarness.prototype.expectShallowEqual):
346         (TestHarness.prototype.expectNotShallowEqual):
347         (TestHarness.prototype.expectEqualWithAccuracy):
348         (TestHarness.prototype.expectLessThan):
349         (TestHarness.prototype.expectLessThanOrEqual):
350         (TestHarness.prototype.expectGreaterThan):
351         (TestHarness.prototype.expectGreaterThanOrEqual):
352
353 2016-09-12  Nikita Vasilyev  <nvasilyev@apple.com>
354
355         REGRESSION (r205223): Web Inspector: Debugger popover title and code aren't horizontally aligned
356         https://bugs.webkit.org/show_bug.cgi?id=161848
357         <rdar://problem/28250703>
358
359         Reviewed by Matt Baker.
360
361         * UserInterface/Views/SourceCodeTextEditor.css:
362         (.popover .debugger-popover-content > .title):
363         (.popover .debugger-popover-content.function > .body):
364         Make left and right padding the same.
365
366         (.popover .debugger-popover-content.function > .body .CodeMirror pre):
367         Override left padding defined in CodeMirrorOverrides.css by `.CodeMirror pre` rule.
368
369 2016-09-12  Devin Rousso  <dcrousso+webkit@gmail.com>
370
371         Web Inspector: Hide ["PrivateSymbol.concatSlowPath"] and other PrivateSymbols from memory edges
372         https://bugs.webkit.org/show_bug.cgi?id=156763
373
374         Reviewed by Joseph Pecoraro.
375
376         * UserInterface/Proxies/HeapSnapshotEdgeProxy.js:
377         (WebInspector.HeapSnapshotEdgeProxy.prototype.isPrivateSymbol):
378         Checks that the edge data does not begin with "PrivateSymbol".
379
380         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
381         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
382         Only add child nodes if they are not PrivateSymbol nodes.
383
384 2016-09-12  Matt Baker  <mattbaker@apple.com>
385
386         Web Inspector: Object.shallowEqual() should return false if object prototype chains differ
387         https://bugs.webkit.org/show_bug.cgi?id=161852
388
389         Reviewed by Joseph Pecoraro.
390
391         Improve Object.shallowEqual so it won't produce false positives.
392
393         * UserInterface/Base/Utilities.js:
394         (value):
395         Object.shallowEqual should return false for non-array arguments.
396         Since typeof null === "object", use `instanceof` instead to avoid separate
397         null checks. Also use Array.shallowEqual fast path when both arguments are arrays.
398
399 2016-09-11  Devin Rousso  <dcrousso+webkit@gmail.com>
400
401         Web Inspector: Combine similar SVG files for Styles sidebar
402         https://bugs.webkit.org/show_bug.cgi?id=161071
403
404         Reviewed by Joseph Pecoraro.
405
406         * UserInterface/Images/StyleRule.svg: Added.
407         * UserInterface/Images/StyleRulePseudoElement.svg: Added.
408         Replaced <defs> with <symbol> give CSS some access to the referenced DOM inside <symbol>.
409         Since <symbol> uses Shadow DOM, applying CSS variables to the :target element and using
410         them inside <symbol> allows for variable styling of the content.  Using a more basic
411         `#foo .bar` selector would not be valid since Shadow DOM separates the stylesheet selectors.
412
413         * UserInterface/Images/gtk/StyleRule.svg: Added.
414         * UserInterface/Images/gtk/StyleRulePseudoElement.svg: Added.
415
416         * UserInterface/Images/StyleRuleAuthor.svg: Removed.
417         * UserInterface/Images/StyleRuleInherited.svg: Removed.
418         * UserInterface/Images/StyleRuleInspector.svg: Removed.
419         * UserInterface/Images/StyleRuleUser.svg: Removed.
420         * UserInterface/Images/StyleRuleUserAgent.svg: Removed.
421         * UserInterface/Images/gtk/StyleRuleAuthor.svg: Removed.
422         * UserInterface/Images/gtk/StyleRuleInherited.svg: Removed.
423         * UserInterface/Images/gtk/StyleRuleInspector.svg: Removed.
424         * UserInterface/Images/gtk/StyleRuleUser.svg: Removed.
425         * UserInterface/Images/gtk/StyleRuleUserAgent.svg: Removed.
426         Merged into StyleRule.svg by using IDs in the URL.
427
428         * UserInterface/Images/StyleRuleAuthorPseudo.svg: Removed.
429         * UserInterface/Images/StyleRuleInspectorPseudo.svg: Removed.
430         * UserInterface/Images/StyleRuleUserAgentPseudo.svg: Removed.
431         * UserInterface/Images/StyleRuleUserPseudo.svg: Removed.
432         Merged into StyleRulePseudoElement.svg by using IDs in the URL.
433
434         * UserInterface/Views/StyleRuleIcons.css:
435         (.author-style-rule-icon .icon):
436         (.author-style-rule-icon.pseudo-element-selector .icon):
437         (.user-style-rule-icon .icon):
438         (.user-style-rule-icon.pseudo-element-selector .icon):
439         (.user-agent-style-rule-icon .icon):
440         (.user-agent-style-rule-icon.pseudo-element-selector .icon):
441         (.inspector-style-rule-icon .icon):
442         (.inspector-style-rule-icon.pseudo-element-selector .icon):
443         (.inherited-style-rule-icon .icon):
444
445 2016-09-11  Devin Rousso  <dcrousso+webkit@gmail.com>
446
447         REGRESSION (r205754): Web Inspector: Cannot click on links to stylesheets in Rules sidebar
448         https://bugs.webkit.org/show_bug.cgi?id=161838
449
450         Reviewed by Brian Burg.
451
452         * UserInterface/Views/CSSStyleDeclarationSection.css:
453         (.style-declaration-section > .header > textarea):
454         (.style-declaration-section > .header > .origin):
455         Added z-index to the non-selector elements of the header.  Also limited the size of the
456         selector textarea to just the size of the displayed selector text.
457
458         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
459         (WebInspector.CSSStyleDeclarationTextEditor):
460         Fixed invalid enum value for propertyVisibilityMode.
461
462 2016-09-09  Devin Rousso  <dcrousso+webkit@gmail.com>
463
464         Web Inspector: Command-Z doesn't work when editing CSS selectors in Styles sidebar
465         https://bugs.webkit.org/show_bug.cgi?id=159734
466
467         Reviewed by Brian Burg.
468
469         Replace the current usage of -webkit-user-select with a textarea sized exactly the same as
470         the selector text which holds the current value of the selector.
471
472         * UserInterface/Test.html: Add WrappedPromise.
473
474         * UserInterface/Models/DOMNodeStyles.js:
475         (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
476         (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
477         (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
478         (WebInspector.DOMNodeStyles.prototype.refresh):
479         (WebInspector.DOMNodeStyles.prototype.changeRuleSelector.ruleSelectorChanged):
480         (WebInspector.DOMNodeStyles.prototype.changeRuleSelector):
481         Ensure that the promise returned by changeRuleSelector is only resolved once the initiated
482         refresh has completed, ensuring that all matched selectors are parsed and available.
483
484         * UserInterface/Views/CSSStyleDeclarationSection.css:
485         (.style-declaration-section > .header):
486         (.style-declaration-section.locked > .header::before):
487         (.style-declaration-section.rule-disabled > .header > .icon):
488         (.style-declaration-section > .header > textarea):
489         (.style-declaration-section > .header > textarea:focus):
490         (.style-declaration-section > .header > textarea:focus + .selector):
491         (.style-declaration-section > .header > .selector):
492         (.style-declaration-section > .header > .selector:empty):
493         (.style-declaration-section > .header > .selector .matched):
494         (.style-declaration-section:not(.invalid-selector).rule-disabled > .header > .icon): Deleted.
495         (.style-declaration-section > .header > .selector:empty::before): Deleted.
496         (.style-declaration-section > .header > .selector:focus): Deleted.
497         (.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector): Deleted.
498         (.style-declaration-section > .header > .selector > .matched): Deleted.
499         (.style-declaration-section.invalid-selector > .header > .icon): Deleted.
500         (.style-declaration-section.invalid-selector > .header > .selector): Deleted.
501         Added styling to make textarea invisible when not focused.
502         Also removed the .invalid-selector styles as the section now refreshed on all changes.
503
504         * UserInterface/Views/CSSStyleDeclarationSection.js:
505         (WebInspector.CSSStyleDeclarationSection):
506         (WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
507         (WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelectorTextKnownToMatch):
508         (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
509         (WebInspector.CSSStyleDeclarationSection.prototype.focusRuleSelector):
510         (WebInspector.CSSStyleDeclarationSection.prototype.get selectorEditable):
511         (WebInspector.CSSStyleDeclarationSection.prototype.get _currentSelectorText):
512         (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
513         (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
514         (WebInspector.CSSStyleDeclarationSection.prototype.get selectorLocked): Deleted.
515         Added a hidden textarea for modifying the selector of the represented style.
516
517         * UserInterface/Views/RulesStyleDetailsPanel.js:
518         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorPreviousRule):
519         Now use new getters on CSSSTyleDeclarationSection for determining if a selector is editable.
520
521         * UserInterface/Views/Variables.css:
522         (:root):
523         Added --style-declaration-section-header-padding CSS variable.
524
525 2016-09-08  Brian Burg  <bburg@apple.com>
526
527         Web Inspector: make copy-user-interface-resources.pl easier to read
528         https://bugs.webkit.org/show_bug.cgi?id=161772
529
530         Reviewed by Joseph Pecoraro.
531
532         * Scripts/copy-user-interface-resources.pl:
533         Break long script invocations across multiple lines so that the
534         options and values are paired together.
535
536 2016-09-08  Brian Burg  <bburg@apple.com>
537
538         Web Inspector: get rid of extra copies of jsmin.py and cssmin.py
539         https://bugs.webkit.org/show_bug.cgi?id=161770
540         <rdar://problem/28216813>
541
542         Reviewed by Joseph Pecoraro.
543
544         * Scripts/copy-user-interface-resources-dryrun.rb:
545         - Keep track of the original working directory.
546         - Stage scripts from PrivateHeaders into the temporary directory.
547         - Add a comment to clarify what this script is simulating.
548         - Use system instead of exec so we can print an error message.
549
550         * Scripts/copy-user-interface-resources.pl:
551         - Use jsmin.py and cssmin.py from JavaScriptCore instead of
552         WebInspectorUI. There are no differences between the two copies.
553
554         * Scripts/cssmin.py: Removed.
555         * Scripts/jsmin.py: Removed.
556
557         * WebInspectorUI.xcodeproj/project.pbxproj:
558         - Remove unused copies of jsmin.py and cssmin.py.
559
560 2016-09-08  Matt Baker  <mattbaker@apple.com>
561
562         Web Inspector: TimelineDataGridNode should refresh when graph column is resized
563         https://bugs.webkit.org/show_bug.cgi?id=161765
564         <rdar://problem/28215674>
565
566         Reviewed by Brian Burg.
567
568         * UserInterface/Views/DataGrid.js:
569         (WebInspector.DataGrid.prototype.resizerDragging):
570         Call `DataGridNode.didResizeColumn` for all visible nodes in the columns
571         to the left and right of the column resizer.
572
573         * UserInterface/Views/DataGridNode.js:
574         (WebInspector.DataGridNode.prototype.didResizeColumn):
575         Add protected base class method for subclasses to override.
576
577         * UserInterface/Views/TimelineDataGridNode.js:
578         (WebInspector.TimelineDataGridNode.prototype.didResizeColumn):
579         Refresh the node's graph when the "graph" column is resized.
580         Renamed `left/rightCellIndex` -> `left/rightColumnIndex`.
581
582 2016-09-08  Nikita Vasilyev  <nvasilyev@apple.com>
583
584         Web Inspector: Add a button to navigation bar to toggle Control Flow Profiler
585         https://bugs.webkit.org/show_bug.cgi?id=160973
586         <rdar://problem/27912606>
587
588         Reviewed by Brian Burg.
589
590         * Localizations/en.lproj/localizedStrings.js:
591         Add "Fade unexecuted code" and "Do not fade unexecuted code".
592
593         * UserInterface/Base/Main.js:
594         (WebInspector.loaded):
595         Add a setting to remember whether Code Coverage Profiler is on or off between Web Inspector reloads.
596
597         * UserInterface/Views/SourceCodeTextEditor.js:
598         (WebInspector.SourceCodeTextEditor.prototype.shown):
599         (WebInspector.SourceCodeTextEditor.prototype.canShowTypeAnnotations):
600         (WebInspector.SourceCodeTextEditor.prototype.canShowCoverageHints):
601         (WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
602         (WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
603         (WebInspector.SourceCodeTextEditor.prototype.toggleUnexecutedCodeHighlights):
604         (WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
605         (WebInspector.SourceCodeTextEditor.prototype._proceedPopulateWithContent):
606         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
607         (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
608         (WebInspector.SourceCodeTextEditor.prototype._enableScrollEventsForTypeTokenAnnotator):
609         (WebInspector.SourceCodeTextEditor.prototype._enableScrollEventsForControlFlowAnnotator):
610         (WebInspector.SourceCodeTextEditor.prototype._disableScrollEventsForControlFlowAnnotator):
611         (WebInspector.SourceCodeTextEditor.prototype._createTypeTokenScrollEventHandler):
612         (WebInspector.SourceCodeTextEditor.prototype._createControlFlowScrollEventHandler):
613         (WebInspector.SourceCodeTextEditor.prototype.canBeFormatted): Deleted.
614         (WebInspector.SourceCodeTextEditor.prototype.dialogWasDismissed): Deleted.
615         (WebInspector.SourceCodeTextEditor.prototype.showPopoverForTypes): Deleted.
616         (WebInspector.SourceCodeTextEditor.prototype._addBreakpointWithEditorLineInfo): Deleted.
617         (WebInspector.SourceCodeTextEditor.prototype._removeBreakpointWithEditorLineInfo): Deleted.
618         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression): Deleted.
619         (WebInspector.SourceCodeTextEditor.prototype._dismissEditingController): Deleted.
620         (WebInspector.SourceCodeTextEditor.prototype.editingControllerDidStartEditing): Deleted.
621         (WebInspector.SourceCodeTextEditor.prototype.editingControllerDidFinishEditing): Deleted.
622         (WebInspector.SourceCodeTextEditor.prototype._getAssociatedScript): Deleted.
623         (WebInspector.SourceCodeTextEditor.prototype._createTypeTokenAnnotator): Deleted.
624         Make Code Coverage profiler independent from Type Profiler.
625
626         * UserInterface/Views/TextContentView.js:
627         (WebInspector.TextContentView):
628         (WebInspector.TextContentView.prototype.get navigationItems):
629         (WebInspector.TextContentView.prototype.get textEditor): Deleted.
630         * UserInterface/Views/TextEditor.js:
631         (WebInspector.TextEditor.prototype.get hasModified):
632         (WebInspector.TextEditor.prototype.canShowCoverageHints):
633         * UserInterface/Views/TextResourceContentView.js:
634         (WebInspector.TextResourceContentView):
635         (WebInspector.TextResourceContentView.prototype.get navigationItems):
636         (WebInspector.TextResourceContentView.prototype._contentDidPopulate):
637         (WebInspector.TextResourceContentView.prototype._toggleTypeAnnotations):
638         (WebInspector.TextResourceContentView.prototype._toggleUnexecutedCodeHighlights):
639         (WebInspector.TextResourceContentView.prototype._enableControlFlowProfilerSettingChanged):
640         (WebInspector.TextResourceContentView.prototype._contentWillPopulate): Deleted.
641         * UserInterface/Views/ScriptContentView.js:
642         (WebInspector.ScriptContentView):
643         (WebInspector.ScriptContentView.prototype.get navigationItems):
644         (WebInspector.ScriptContentView.prototype._contentDidPopulate):
645         (WebInspector.ScriptContentView.prototype._toggleTypeAnnotations):
646         (WebInspector.ScriptContentView.prototype._toggleUnexecutedCodeHighlights):
647         (WebInspector.ScriptContentView.prototype._enableControlFlowProfilerSettingChanged):
648         (WebInspector.ScriptContentView.prototype._contentWillPopulate): Deleted.
649         Add the [C] icon right next to the [T] (Type Profiler) icon.
650
651 2016-09-08  Joseph Pecoraro  <pecoraro@apple.com>
652
653         Web Inspector: Debugger sidebar should include a warning message breakpoints are disabled
654         https://bugs.webkit.org/show_bug.cgi?id=156719
655         <rdar://problem/25787932>
656
657         Reviewed by Brian Burg.
658
659         * Localizations/en.lproj/localizedStrings.js:
660         New strings for breakpoints disabled warning banner.
661
662         * UserInterface/Views/DebuggerSidebarPanel.css:
663         (.sidebar > .panel.navigation.debugger .warning-banner):
664         (.sidebar > .panel.navigation.debugger .warning-banner > a):
665         Generalize the class name to "warning-banner".
666
667         * UserInterface/Views/DebuggerSidebarPanel.js:
668         (WebInspector.DebuggerSidebarPanel):
669         (WebInspector.DebuggerSidebarPanel.prototype._breakpointsEnabledDidChange):
670         (WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingWillStart):
671         (WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingStopped):
672         (WebInspector.DebuggerSidebarPanel.prototype._updateBreakpointsDisabledBanner):
673         Show / hide a breakpoints disabled warning banner as needed.
674         Only one banner shows at a time, so either the timing warning
675         or the generic breakpoints disabled banner will show.
676
677 2016-09-07  Johan K. Jensen  <johan_jensen@apple.com>
678
679         Web Inspector: Show resource timing details in Network waterfall
680         https://bugs.webkit.org/show_bug.cgi?id=160062
681
682         This patch adds a popover to network tab's and timeline tab's resource rows, when hovering
683         the recordbar. It shows times for the various parts of the resource load if they are available,
684         or it shows the reason for why not as text (e.g. cached resource, data URI).
685
686         Reviewed by Matt Baker.
687
688         * Localizations/en.lproj/localizedStrings.js:
689         Added new strings.
690
691         * UserInterface/Main.html:
692         Include new files.
693
694         * UserInterface/Views/ComputedStyleDetailsPanel.js:
695         (WebInspector.ComputedStyleDetailsPanel.prototype.initialLayout):
696         Updated to use DataGrid property to hide header.
697
698         * UserInterface/Views/DataGrid.css:
699         (.data-grid.no-header > .header-wrapper):
700         (.data-grid.no-header > .header-wrapper > table.header): Deleted.
701         Hide the whole DataGrid header.
702
703         * UserInterface/Views/DataGrid.js:
704         (WebInspector.DataGrid):
705         (WebInspector.DataGrid.prototype.get headerVisible):
706         (WebInspector.DataGrid.prototype.set headerVisible):
707         Add property to control header visibility, so grid clients aren't forced to manipulate internal grid styles.
708
709         * UserInterface/Views/NetworkGridContentView.js:
710         (WebInspector.NetworkGridContentView.prototype._processPendingRecords):
711         * UserInterface/Views/NetworkTimelineView.js:
712         (WebInspector.NetworkTimelineView.prototype._processPendingRecords):
713         * UserInterface/Views/OverviewTimelineView.js:
714         (WebInspector.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
715         Pass in new parameter for whether or not to show the popover for resources.
716
717         * UserInterface/Views/ResourceTimelineDataGridNode.css: Added.
718         (.resource-timing-popover-content .data-grid):
719         (.resource-timing-popover-content .data-grid .graph-column > .cell-content):
720         (.resource-timing-popover-content .data-grid td):
721         (.resource-timing-popover-content .data-grid td.graph-column):
722         (.resource-timing-popover-content .data-grid table.data):
723         (.resource-timing-popover-content .data-grid tr:nth-last-child(2)):
724         Add styling for the popover.
725
726         * UserInterface/Views/ResourceTimelineDataGridNode.js:
727         (WebInspector.ResourceTimelineDataGridNode):
728         (WebInspector.ResourceTimelineDataGridNode.prototype.didAddRecordBar):
729         (WebInspector.ResourceTimelineDataGridNode.prototype.didRemoveRecordBar):
730         (WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
731         Creates the popover for a RecordBar and shows detailed info about segments.
732
733         * UserInterface/Views/ResourceTimingPopoverDataGridNode.js: Added.
734         (WebInspector.ResourceTimingPopoverDataGridNode):
735         (WebInspector.ResourceTimingPopoverDataGridNode.prototype.get records):
736         (WebInspector.ResourceTimingPopoverDataGridNode.prototype.get data):
737         (WebInspector.ResourceTimingPopoverDataGridNode.prototype.get selectable):
738         (WebInspector.ResourceTimingPopoverDataGridNode.prototype.createCellContent):
739         DataGridNode for the popover.
740
741         * UserInterface/Views/TimelineDataGridNode.js:
742         (WebInspector.TimelineDataGridNode.prototype.refreshGraph.createBar):
743         (WebInspector.TimelineDataGridNode.prototype.refreshGraph):
744         (WebInspector.TimelineDataGridNode.prototype.didAddRecordBar):
745         (WebInspector.TimelineDataGridNode.prototype.didRemoveRecordBar):
746         (WebInspector.TimelineDataGridNode):
747         Added hooks for notifying subclasses.
748
749         * UserInterface/Views/TimelineRecordBar.js:
750         (WebInspector.TimelineRecordBar):
751         (WebInspector.TimelineRecordBar.fromElement):
752         Added symbol and static method to get the recordBar from a given element.
753
754 2016-09-07  Devin Rousso  <dcrousso+webkit@gmail.com>
755
756         Web Inspector: clicking Computed Styles sidebar "Show All" checkbox doesn't trigger relayout of Properties section
757         https://bugs.webkit.org/show_bug.cgi?id=161652
758
759         Reviewed by Brian Burg.
760
761         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
762         (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):
763         Fixed style issues from r205518 <webkit.org/b/161405>.
764
765         * UserInterface/Views/ComputedStyleDetailsPanel.js:
766         (WebInspector.ComputedStyleDetailsPanel.prototype.get regionFlow):
767         (WebInspector.ComputedStyleDetailsPanel.prototype.get contentFlow):
768         (WebInspector.ComputedStyleDetailsPanel.prototype.get containerRegions):
769         Added missing space between semicolon and curly-brace.
770
771         (WebInspector.ComputedStyleDetailsPanel.prototype._computedStyleShowAllCheckboxValueChanged):
772         Added updateLayout call to resize and repopulate the CodeMirror instance.
773
774 2016-09-07  Chris Dumez  <cdumez@apple.com>
775
776         Drop legacy canvas.probablySupportsContext()
777         https://bugs.webkit.org/show_bug.cgi?id=161692
778
779         Reviewed by Alex Christensen.
780
781         * UserInterface/Models/NativeFunctionParameters.js:
782
783 2016-09-06  Joseph Pecoraro  <pecoraro@apple.com>
784
785         Web Inspector: Avoid linkifying some schemes in console logs
786         https://bugs.webkit.org/show_bug.cgi?id=161648
787         <rdar://problem/16413270>
788
789         Reviewed by Brian Burg.
790
791         * UserInterface/Base/Main.js:
792         Don't linkify some kinds of links.
793
794 2016-09-06  Devin Rousso  <dcrousso+webkit@gmail.com>
795
796         Web Inspector: Allow hiding of CSS variables in Computed styles panel
797         https://bugs.webkit.org/show_bug.cgi?id=161405
798
799         Reviewed by Brian Burg.
800
801         * Localizations/en.lproj/localizedStrings.js:
802
803         * UserInterface/Models/CSSProperty.js:
804         (WebInspector.CSSProperty.prototype.update):
805         (WebInspector.CSSProperty.prototype.get variable):
806         Sets a member variable if the CSS property begins with "--", indicating that it is a variable.
807
808         (WebInspector.CSSProperty.prototype.get name):
809         (WebInspector.CSSProperty.prototype.get value):
810         (WebInspector.CSSProperty.prototype.get priority):
811         (WebInspector.CSSProperty.prototype.get overridden):
812         (WebInspector.CSSProperty.prototype.get anonymous):
813         (WebInspector.CSSProperty.prototype.get inherited):
814         (WebInspector.CSSProperty.prototype.get valid):
815         (WebInspector.CSSProperty.prototype.get styleSheetTextRange):
816         (WebInspector.CSSProperty.prototype.get relatedShorthandProperty):
817         (WebInspector.CSSProperty.prototype.get relatedLonghandProperties):
818         Changed styling to be one line getters.
819
820         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
821         (WebInspector.CSSStyleDeclarationTextEditor.PropertyVisibilityMode):
822         Dictionary for the three possible states of CSS property visibility:
823          - ShowAll
824          - HideVariables
825          - HideNonVariables
826
827         (WebInspector.CSSStyleDeclarationTextEditor):
828         (WebInspector.CSSStyleDeclarationTextEditor.prototype.get shownProperties):
829         Added member variable that holds the list of properties resulting from the filter inside
830         WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties.
831
832         (WebInspector.CSSStyleDeclarationTextEditor.prototype.get propertyVisibilityMode):
833         (WebInspector.CSSStyleDeclarationTextEditor.prototype.set propertyVisibilityMode):
834         (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):
835         Added member variable controlling the visibility of CSS properties.
836
837         (WebInspector.CSSStyleDeclarationTextEditor.prototype.get delegate):
838         (WebInspector.CSSStyleDeclarationTextEditor.prototype.get style):
839         (WebInspector.CSSStyleDeclarationTextEditor.prototype.get showsImplicitProperties):
840         (WebInspector.CSSStyleDeclarationTextEditor.prototype.get sortProperties):
841         Changed styling to be one line getters.
842
843         * UserInterface/Views/ComputedStyleDetailsPanel.js:
844         (WebInspector.ComputedStyleDetailsPanel.prototype.refresh):
845         (WebInspector.ComputedStyleDetailsPanel.prototype.filterDidChange):
846         (WebInspector.ComputedStyleDetailsPanel.prototype.initialLayout):
847         (WebInspector.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged):
848         Added an additional text editor that displays the list of CSS Variables visible to the
849         selected node.  Also ties this new editor into the refresh/collapse/filter event handlers.
850
851         (WebInspector.ComputedStyleDetailsPanel.prototype._handlePropertiesSectionCollapsedStateChanged):
852         Renamed from WebInspector.ComputedStyleDetailsPanel.prototype._handleCollapsedStateChanged.
853
854         (WebInspector.ComputedStyleDetailsPanel.prototype.get regionFlow):
855         (WebInspector.ComputedStyleDetailsPanel.prototype.get contentFlow):
856         (WebInspector.ComputedStyleDetailsPanel.prototype.get containerRegions):
857         Changed styling to be one line getters.
858
859 2016-09-06  Devin Rousso  <dcrousso+webkit@gmail.com>
860
861         Web Inspector: CodeMirror in resource content view should not show 'CR' characters
862         https://bugs.webkit.org/show_bug.cgi?id=160465
863
864         Reviewed by Brian Burg.
865
866         * UserInterface/Views/CodeMirrorOverrides.css:
867         (.CodeMirror .cm-invalidchar):
868         Hide all invalid characters.
869
870 2016-09-06  Devin Rousso  <dcrousso+webkit@gmail.com>
871
872         Web Inspector: Cannot undo in breakpoint editor
873         https://bugs.webkit.org/show_bug.cgi?id=152858
874
875         Reviewed by Brian Burg.
876
877         * UserInterface/Controllers/BreakpointPopoverController.js:
878         (WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorBeforeChange):
879         Since the breakpoint editor only allows a single line of JavaScript, it attempts to remove
880         all "\n" characters.  During an "undo" action, this is not possible.
881
882 2016-09-04  Joseph Pecoraro  <pecoraro@apple.com>
883
884         Web Inspector: Enable and enforce some recommended and stylistic ESLint rules
885         https://bugs.webkit.org/show_bug.cgi?id=161567
886
887         Reviewed by Brian Burg.
888
889         * .eslintrc:
890         * UserInterface/Base/EventListener.js:
891         * UserInterface/Base/EventListenerSet.js:
892         * UserInterface/Base/MIMETypeUtilities.js:
893         * UserInterface/Base/Main.js:
894         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
895         * UserInterface/Controllers/DOMTreeManager.js:
896         * UserInterface/Controllers/TimelineManager.js:
897         * UserInterface/Models/CSSKeywordCompletions.js:
898         * UserInterface/Models/DOMNode.js:
899         * UserInterface/Models/DOMNodeStyles.js:
900         * UserInterface/Models/Frame.js:
901         * UserInterface/Models/Geometry.js:
902         * UserInterface/Models/ProfileNode.js:
903         * UserInterface/Models/RenderingFrameTimelineRecord.js:
904         * UserInterface/Models/SourceCodeLocation.js:
905         * UserInterface/Protocol/RemoteObject.js:
906         * UserInterface/Views/ApplicationCacheFrameContentView.js:
907         * UserInterface/Views/ContextMenu.js:
908         * UserInterface/Views/DOMTreeContentView.js:
909         * UserInterface/Views/DOMTreeElement.js:
910         * UserInterface/Views/DataGrid.js:
911         * UserInterface/Views/GeneralTreeElement.js:
912         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
913         * UserInterface/Views/LogContentView.js:
914         * UserInterface/Views/OpenResourceDialog.js:
915         * UserInterface/Views/StyleDetailsPanel.js:
916         * UserInterface/Views/VisualStyleDetailsPanel.js:
917         * UserInterface/Views/VisualStyleKeywordPicker.js:
918         * UserInterface/Views/VisualStylePropertyEditor.js:
919         * UserInterface/Workers/Formatter/FormatterWorker.js:
920
921 2016-09-04  Joseph Pecoraro  <pecoraro@apple.com>
922
923         Web Inspector: Run ESLint over UserInterface/Views
924         https://bugs.webkit.org/show_bug.cgi?id=161564
925
926         Reviewed by Brian Burg.
927
928         * .eslintrc:
929         * UserInterface/Views/BoxModelDetailsSectionRow.js:
930         * UserInterface/Views/ButtonNavigationItem.js:
931         * UserInterface/Views/CSSStyleDeclarationSection.js:
932         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
933         * UserInterface/Views/CodeMirrorAdditions.js:
934         * UserInterface/Views/CodeMirrorEditor.js:
935         * UserInterface/Views/CodeMirrorFormatters.js:
936         * UserInterface/Views/ColorWheel.js:
937         * UserInterface/Views/ComputedStyleDetailsPanel.js:
938         * UserInterface/Views/ConsoleMessageView.js:
939         * UserInterface/Views/ContentViewContainer.js:
940         * UserInterface/Views/CookieStorageContentView.js:
941         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
942         * UserInterface/Views/DOMStorageContentView.js:
943         * UserInterface/Views/DOMTreeElement.js:
944         * UserInterface/Views/DOMTreeOutline.js:
945         * UserInterface/Views/DashboardContainerView.js:
946         * UserInterface/Views/DataGrid.js:
947         * UserInterface/Views/DataGridNode.js:
948         * UserInterface/Views/DebuggerSidebarPanel.js:
949         * UserInterface/Views/DefaultDashboardView.js:
950         * UserInterface/Views/FontResourceContentView.js:
951         * UserInterface/Views/FormattedValue.js:
952         * UserInterface/Views/GradientEditor.js:
953         * UserInterface/Views/GradientSlider.js:
954         * UserInterface/Views/HeapSnapshotContentView.js:
955         * UserInterface/Views/HeapSnapshotDataGridTree.js:
956         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
957         * UserInterface/Views/HoverMenu.js:
958         * UserInterface/Views/LogContentView.js:
959         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
960         * UserInterface/Views/MemoryTimelineView.js:
961         * UserInterface/Views/NavigationSidebarPanel.js:
962         * UserInterface/Views/NetworkTimelineOverviewGraph.js:
963         * UserInterface/Views/NewTabContentView.js:
964         * UserInterface/Views/ObjectPreviewView.js:
965         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
966         * UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
967         * UserInterface/Views/OverviewTimelineView.js:
968         * UserInterface/Views/Popover.js:
969         * UserInterface/Views/ProbeSetDetailsSection.js:
970         * UserInterface/Views/ProfileDataGridNode.js:
971         * UserInterface/Views/ProfileDataGridTree.js:
972         * UserInterface/Views/ProfileView.js:
973         * UserInterface/Views/ResourceSidebarPanel.js:
974         * UserInterface/Views/RulesStyleDetailsPanel.js:
975         * UserInterface/Views/ScopeRadioButtonNavigationItem.js:
976         * UserInterface/Views/ScriptClusterTimelineView.js:
977         * UserInterface/Views/ScriptDetailsTimelineView.js:
978         * UserInterface/Views/ScriptProfileTimelineView.js:
979         * UserInterface/Views/StackedLineChart.js:
980         * UserInterface/Views/StorageSidebarPanel.js:
981         * UserInterface/Views/TabBrowser.js:
982         * UserInterface/Views/TextEditor.js:
983         * UserInterface/Views/TimelineDataGridNode.js:
984         * UserInterface/Views/TimelineOverview.js:
985         * UserInterface/Views/TimelineRecordFrame.js:
986         * UserInterface/Views/TimelineRecordingContentView.js:
987         * UserInterface/Views/TimelineTabContentView.js:
988         * UserInterface/Views/TreeOutline.js:
989         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
990         * UserInterface/Views/VisualStylePropertyEditor.js:
991         * UserInterface/Views/VisualStyleSelectorSection.js:
992
993 2016-09-04  Joseph Pecoraro  <pecoraro@apple.com>
994
995         Web Inspector: Update ESLint rules and run it over most of UserInterface
996         https://bugs.webkit.org/show_bug.cgi?id=161561
997
998         Reviewed by Brian Burg.
999
1000         * .eslintrc:
1001         Updated ESLint rules.
1002
1003         * UserInterface/Base/InspectorFrontendHostStub.js:
1004         * UserInterface/Base/Main.js:
1005         * UserInterface/Base/Object.js:
1006         * UserInterface/Base/Platform.js:
1007         * UserInterface/Base/Setting.js:
1008         * UserInterface/Controllers/CSSStyleManager.js:
1009         * UserInterface/Controllers/CodeMirrorCompletionController.js:
1010         * UserInterface/Controllers/CodeMirrorTextKillController.js:
1011         * UserInterface/Controllers/DebuggerManager.js:
1012         * UserInterface/Controllers/DragToAdjustController.js:
1013         * UserInterface/Controllers/ReplayManager.js:
1014         * UserInterface/Controllers/SourceMapManager.js:
1015         * UserInterface/Controllers/TimelineManager.js:
1016         * UserInterface/Controllers/TypeTokenAnnotator.js:
1017         * UserInterface/Controllers/VisualStyleCompletionsController.js:
1018         * UserInterface/Debug/Bootstrap.js:
1019         * UserInterface/Debug/UncaughtExceptionReporter.js:
1020         * UserInterface/Models/CSSRule.js:
1021         * UserInterface/Models/CallingContextTree.js:
1022         * UserInterface/Models/CallingContextTreeNode.js:
1023         * UserInterface/Models/ConsoleCommandResultMessage.js:
1024         * UserInterface/Models/CookieStorageObject.js:
1025         * UserInterface/Models/Frame.js:
1026         * UserInterface/Models/Geometry.js:
1027         * UserInterface/Models/IssueMessage.js:
1028         * UserInterface/Models/LayoutTimelineRecord.js:
1029         * UserInterface/Models/MemoryTimeline.js:
1030         * UserInterface/Models/NativeFunctionParameters.js:
1031         * UserInterface/Models/ProfileNode.js:
1032         * UserInterface/Models/RenderingFrameTimelineRecord.js:
1033         * UserInterface/Models/Resource.js:
1034         * UserInterface/Models/ScriptSyntaxTree.js:
1035         * UserInterface/Models/ScriptTimelineRecord.js:
1036         * UserInterface/Models/StackTrace.js:
1037         * UserInterface/Models/TypeSet.js:
1038         * UserInterface/Models/WrappedPromise.js:
1039         * UserInterface/Protocol/InspectorBackend.js:
1040         * UserInterface/Protocol/InspectorFrontendAPI.js:
1041         * UserInterface/Protocol/RemoteObject.js:
1042         * UserInterface/Protocol/ScriptProfilerObserver.js:
1043         * UserInterface/Test/FrontendTestHarness.js:
1044         * UserInterface/Test/InspectorProtocol.js:
1045         * UserInterface/Test/ProtocolTestHarness.js:
1046         * UserInterface/Test/Test.js:
1047         * UserInterface/Test/TestHarness.js:
1048         * UserInterface/Test/TestSuite.js:
1049         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
1050         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
1051
1052 2016-09-04  Commit Queue  <commit-queue@webkit.org>
1053
1054         Unreviewed, rolling out r205415.
1055         https://bugs.webkit.org/show_bug.cgi?id=161573
1056
1057         Many bots see inspector test failures, rolling out now and
1058         investigating later. (Requested by brrian on #webkit).
1059
1060         Reverted changeset:
1061
1062         "Web Inspector: unify Main.html and Test.html sources and
1063         generate different copies with the preprocessor"
1064         https://bugs.webkit.org/show_bug.cgi?id=161212
1065         http://trac.webkit.org/changeset/205415
1066
1067 2016-09-01  Brian Burg  <bburg@apple.com>
1068
1069         Web Inspector: unify Main.html and Test.html sources and generate different copies with the preprocessor
1070         https://bugs.webkit.org/show_bug.cgi?id=161212
1071         <rdar://problem/28017961>
1072
1073         Reviewed by Joseph Pecoraro.
1074
1075         Add a Derived Sources build phase to WebInspectorUI project. Generate
1076         Test.html and Main.html from a combined Inspector.html.in which has preprocessor
1077         macros to include/exclude files not needed by all main resource versions.
1078
1079         Similarly, start generating these Inspector files in WebInspectorUI/CMakeLists.txt.
1080         Move platform-specific bundling commands into PlatformGTK.cmake.
1081
1082         * CMakeLists.txt: Added.
1083         Set up a list of common frontend resources that specific ports can extend, such as
1084         with their own port-specific image resources. This list is the input to port-specific
1085         packaging/bundling scripts. Eventually, minification and concatenation should happen
1086         independently of the specific port by constructing the list of resources dynamically.
1087
1088         To ensure resources are always generated in WebInspectorUI and accessible from WebKit2,
1089         add a dummy target that is always out of date and depends on generated files, causing
1090         them to be built.
1091
1092         Also create a macro to run the preprocessor over Inspector.html.in using various
1093         preprocessor macro definitions. These are customizable by ports to control the
1094         appearance of ENGINEERING_BUILD, which guards resources not meant for shipping builds.
1095
1096         * Configurations/WebInspectorUIFramework.xcconfig:
1097         We need to use preprocessor.pm from WebCore. On Mac, this is a private header.
1098         Teach xcodebuild how to compute WEBCORE_PRIVATE_HEADERS_DIR. This is copied
1099         from WebKit2's configuration files.
1100
1101         * PlatformGTK.cmake: Added.
1102         Add GTK image resources to the resource list. Generate GResource catalog and embedded
1103         C file into DerivedSources. WebKit2 will copy over this file and compile it.
1104
1105         * Scripts/combine-resources.pl:
1106         (concatenateFiles):
1107         Remove the --strip option as this patch removes the only use of it.
1108
1109         * DerivedSources.make: Added.
1110         Generate Test.html and Main.html from the new combined Inspector.html.in.
1111         The 'preprocess_main_resource' rule was copied from WebCore's DerivedSources.make.
1112
1113         * Scripts/cssmin.py: Removed.
1114         * Scripts/jsmin.py: Removed.
1115         These scripts are copied from JavaScriptCore but nobody uses these copies. Remove them.
1116
1117         * Scripts/copy-user-interface-resources-dryrun.rb: Do some cleanup.
1118         - Stage scripts from SRCROOT into the tmpdir so dryrun doesn't require
1119           a previous build to process WebInspectorUI resources.
1120         - Run DerivedSources.make before copying/processing resources.
1121         - Add some environment variables for new phase and group by script affected.
1122         - Add a comment to clarify what this script is simulating.
1123
1124         * Scripts/copy-user-interface-resources.pl:
1125         - Use Main.html and Test.html from DerivedSources/ instead of SRCROOT.
1126         - Copy over Main.html and Test.html manually if not combining resources.
1127         - Remove the command to strip files from Debug/ for production. This is
1128           now redundant with ENGINEERING_BUILD guards in Inspector.html.in.
1129         - Use jsmin.py from JavaScriptCore instead of the local copy.
1130         - Wrap all multi-argument 'system' invocations so they are readable.
1131
1132         * Scripts/generate-webinspectorui-derived-sources: Added.
1133         Added boilerplate script to run DerivedSources.make for Mac port.
1134
1135         * Scripts/preprocess-main-resource.pl: Added.
1136         Trivially invoke the preprocessor on $0 using the given defines.
1137
1138         * UserInterface/Inspector.html.in: Renamed from Source/WebInspectorUI/UserInterface/Main.html.
1139         * UserInterface/Test.html: Removed.
1140         Combine Test.html and Main.html into Inspector.html.in. Add these guards:
1141         - INCLUDE_TEST_RESOURCES: for resources excluded from Main.html.
1142         - INCLUDE_UI_RESOURCES: for resources excluded from model tests.
1143         - ENGINEERING_BUILD: for resources not to be shipped (Debug/ directory).
1144
1145         * WebInspectorUI.xcodeproj/project.pbxproj:
1146         - Add new aggregate target 'Derived Sources' to project 'WebInspectorUI'.
1147         - Add dependency on 'Derived Sources' to WebInspectorUI.framework.
1148         - Remove unused copies of jsmin.py and cssmin.py.
1149
1150 2016-09-03  Devin Rousso  <dcrousso+webkit@gmail.com>
1151
1152         Web Inspector: Change Cmd-D from kill line to selecting next occurrence
1153         https://bugs.webkit.org/show_bug.cgi?id=161514
1154
1155         Reviewed by Brian Burg.
1156
1157         * UserInterface/Controllers/CodeMirrorTextKillController.js:
1158         (WebInspector.CodeMirrorTextKillController):
1159         (WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
1160         Remove Cmd-D mapping.
1161
1162         * UserInterface/External/CodeMirror/sublime.js:
1163         * UserInterface/Main.html:
1164         Add Sublime Text keybinding support.
1165
1166         * UserInterface/Views/CodeMirrorAdditions.js:
1167         Use Sublime text selectNextOccurrence for Cmd-D instead of deleteLine.
1168
1169 2016-09-03  Devin Rousso  <dcrousso+webkit@gmail.com>
1170
1171         Web Inspector: Add keyboard shortcut for switching to last used dock configuration
1172         https://bugs.webkit.org/show_bug.cgi?id=110328
1173
1174         Reviewed by Brian Burg.
1175
1176         * UserInterface/Base/Main.js:
1177         (WebInspector.contentLoaded):
1178         (WebInspector.updateDockedState):
1179         (WebInspector._togglePreviousDockConfiguration):
1180         Added variable for saving the previous dock state, which is used by the new Cmd+Shift+D
1181         shortcut to toggle the docked state between the current and previous states.
1182
1183         (WebInspector._undock):
1184         (WebInspector._dockBottom):
1185         (WebInspector._dockRight):
1186         (WebInspector._updateDockNavigationItems):
1187         (WebInspector._dockedResizerMouseDown):
1188         (WebInspector._dockedResizerMouseDown.dockedResizerDrag):
1189         Make use of new WebInspector.DockConfiguration instead of hardcoded strings.
1190
1191         (WebInspector.DockConfiguration):
1192         Create enum for different WebInspector dock modes:
1193          - Right
1194          - Bottom
1195          - Undocked
1196
1197 2016-09-03  Joseph Pecoraro  <pecoraro@apple.com>
1198
1199         Web Inspector: Address ESLint undefined variable errors
1200         https://bugs.webkit.org/show_bug.cgi?id=161563
1201
1202         Reviewed by Darin Adler.
1203
1204         * UserInterface/Controllers/CSSStyleManager.js:
1205         (WebInspector.CSSStyleManager.protocolMediaSourceToEnum):
1206         * UserInterface/Models/IssueMessage.js:
1207         (WebInspector.IssueMessage):
1208         * UserInterface/Protocol/InspectorBackend.js:
1209
1210 2016-09-03  Joseph Pecoraro  <pecoraro@apple.com>
1211
1212         Web Inspector: Address ESLint undefined variable errors in UserInterface/Views
1213         https://bugs.webkit.org/show_bug.cgi?id=161565
1214
1215         Reviewed by Darin Adler.
1216
1217         * UserInterface/Views/DataGrid.js:
1218         (WebInspector.DataGrid.prototype.columnWidthsMap):
1219         * UserInterface/Views/SourceCodeTextEditor.js:
1220         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1221         * UserInterface/Views/TextContentView.js:
1222         (WebInspector.TextContentView.prototype._togglePrettyPrint):
1223
1224 2016-09-02  Joseph Pecoraro  <pecoraro@apple.com>
1225
1226         Web Inspector: Provide a way to open an inspector frontend for a remote target
1227         https://bugs.webkit.org/show_bug.cgi?id=161515
1228         <rdar://problem/13182127>
1229
1230         Reviewed by Brian Burg.
1231
1232         * UserInterface/Base/InspectorFrontendHostStub.js:
1233         (WebInspector.InspectorFrontendHostStub.prototype.backendCommandsURL):
1234         Stub new InspectorFrontendHost methods. This value causes the
1235         frontend to load the latest protocol.
1236
1237         * UserInterface/Protocol/LoadInspectorBackendCommands.js:
1238         Use formalized backendCommandsURL, and if empty load the latest protocol.
1239
1240 2016-09-02  Johan K. Jensen  <johan_jensen@apple.com>
1241
1242         Web Inspector: NetworkTimelineOverviewGraph.MinimumBarPaddingTime is undefined
1243         https://bugs.webkit.org/show_bug.cgi?id=161510
1244
1245         Reviewed by Brian Burg.
1246
1247         * UserInterface/Views/NetworkTimelineOverviewGraph.js:
1248         (WebInspector.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded):
1249         (WebInspector.NetworkTimelineOverviewGraph):
1250         Calculate the minimumBarPaddingTime in similar ways to TimelineRecordBar,
1251         by using MinimumWidthPixel, MinimumMarginPixel and MinimumDurationPerPixel as the secondsPerPixel value.
1252
1253         * UserInterface/Views/TimelineOverview.js:
1254         (WebInspector.TimelineOverview):
1255         Make Minimum/MaximumDurationPerPixel public properties.
1256
1257 2016-09-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1258
1259         Web Inspector: Add visual indicator for shadow content in DOM tree
1260         https://bugs.webkit.org/show_bug.cgi?id=160874
1261
1262         Reviewed by Brian Burg.
1263
1264         * UserInterface/Views/DOMTreeElement.js:
1265         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
1266         (WebInspector.DOMTreeElement.prototype._buildTagDOM):
1267         Moved "shadow" class to parent element to allow easier styling.
1268
1269         * UserInterface/Views/DOMTreeOutline.css:
1270         (.tree-outline.dom):
1271         (.tree-outline.dom li):
1272         (.tree-outline.dom .shadow):
1273         (.tree-outline.dom li.parent.shadow::after):
1274         (.tree-outline.dom li.parent.shadow + ol.children.expanded):
1275         (.tree-outline.dom .html-fragment.shadow): Deleted.
1276
1277 2016-09-01  Matt Baker  <mattbaker@apple.com>
1278
1279         Web Inspector: Value checks of secondsPerPixel cause errors
1280         https://bugs.webkit.org/show_bug.cgi?id=161304
1281         <rdar://problem/28050070>
1282
1283         Reviewed by Brian Burg.
1284
1285         * UserInterface/Views/NetworkTimelineView.js:
1286         (WebInspector.NetworkTimelineView.prototype.reset):
1287         Clear resource node map, which is used to determine which nodes
1288         to refresh during layout.
1289
1290         (WebInspector.NetworkTimelineView.prototype.layout):
1291         Like OverviewTimelineView, only refresh node graphs when times change.
1292         This prevents refreshing nodes when (endTime - startTime) === 0.
1293
1294         * UserInterface/Views/TimelineRecordingContentView.js:
1295         (WebInspector.TimelineRecordingContentView.prototype._recordingReset):
1296         TimelineViews must be cleared before calling _updateTimes to avoid
1297         doing layouts in timeline views containing stale data.
1298
1299 2016-09-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1300
1301         Web Inspector: add Object.awaitEvent which is like singleFireEventListener but returns a promise
1302         https://bugs.webkit.org/show_bug.cgi?id=161451
1303
1304         Reviewed by Brian Burg.
1305
1306         * UserInterface/Base/Object.js:
1307         (WebInspector.Object.awaitEvent):
1308         (WebInspector.Object.prototype.awaitEvent):
1309
1310 2016-09-01  Nikita Vasilyev  <nvasilyev@apple.com>
1311
1312         Web Inspector: Minification detection produces false positives for small resources
1313         https://bugs.webkit.org/show_bug.cgi?id=161159
1314         <rdar://problem/27995306>
1315
1316         Reviewed by Brian Burg.
1317
1318         Improve minification detection algorithm. Minified resources rarely have tabs and usually
1319         have a very few line breaks. Counting tabs as 4 spaces and line breaks as 8 makes minification
1320         detection heuristic more accurate. Increase ratio thresholds to accommodate for the changes in
1321         whitespaceScore.
1322
1323         * UserInterface/Base/Utilities.js:
1324         (isTextLikelyMinified):
1325         * UserInterface/Views/SourceCodeTextEditor.js:
1326         (WebInspector.SourceCodeTextEditor.prototype._prepareEditorForInitialContent):
1327         (WebInspector.SourceCodeTextEditor.prototype._isLikelyMinified): Deleted.
1328
1329 2016-09-01  Nikita Vasilyev  <nvasilyev@apple.com>
1330
1331         REGRESSION (r201454): Web Inspector: Text caret isn't visible when editing an attribute
1332         https://bugs.webkit.org/show_bug.cgi?id=160986
1333         <rdar://problem/27916207>
1334
1335         Reviewed by Brian Burg.
1336
1337         * UserInterface/Views/DOMTreeOutline.css:
1338         (.tree-outline.dom li .selection-area):
1339         (.tree-outline.dom li > span):
1340         Place selection area under the edited field, the way it was before r201454.
1341
1342 2016-09-01  Brian Burg  <bburg@apple.com>
1343
1344         Web Inspector: tweak one UIString for "reasons for compositing"
1345         https://bugs.webkit.org/show_bug.cgi?id=161495
1346         <rdar://problem/13718387>
1347
1348         Reviewed by Simon Fraser.
1349
1350         Change "Element establishes a stacking context" to "Element may overlap other compositing element".
1351
1352         * Localizations/en.lproj/localizedStrings.js:
1353         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
1354         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._populateListOfCompositingReasons):
1355         (WebInspector.LayerTreeDetailsSidebarPanel):
1356
1357 2016-08-30  Devin Rousso  <dcrousso+webkit@gmail.com>
1358
1359         Web Inspector: Remove largest common indentation spacing in debugger popover
1360         https://bugs.webkit.org/show_bug.cgi?id=161417
1361
1362         Reviewed by Joseph Pecoraro.
1363
1364         * UserInterface/Views/SourceCodeTextEditor.css:
1365         (.popover .debugger-popover-content.function > .body):
1366         (.popover .debugger-popover-content.function > .body .CodeMirror):
1367
1368         * UserInterface/Views/SourceCodeTextEditor.js:
1369         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
1370         Use CodeMirror and FormatterWorker to display a non-editable popover.
1371
1372         * UserInterface/Workers/Formatter/FormatterWorker.js:
1373         (FormatterWorker.prototype.formatJavaScript):
1374         Reworked logic to always attempt to format by wrapping content in "(...)".  This is
1375         necessary for unnamed functions, since they are not valid programs by themselves.
1376
1377 2016-08-30  Johan K. Jensen  <johan_jensen@apple.com>
1378
1379         Web Inspector: Add resource timing model with timing information
1380         https://bugs.webkit.org/show_bug.cgi?id=161314
1381
1382         Reviewed by Joseph Pecoraro.
1383
1384         Add a resource timing data model and populate it with info from the
1385         response from the backend.
1386
1387         * UserInterface/Controllers/FrameResourceManager.js:
1388         (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
1389         (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
1390         Forward timing data from response to Resource.js.
1391
1392         * UserInterface/Main.html: Add new ResourceTimingData.js.
1393         * UserInterface/Test.html: Add new ResourceTimingData.js.
1394
1395         * UserInterface/Models/Resource.js:
1396         (WebInspector.Resource): Instantiate ResourceTimingData object.
1397
1398         (WebInspector.Resource.prototype.get timing):
1399         (WebInspector.Resource.prototype.get firstTimestamp):
1400         (WebInspector.Resource.prototype.get lastTimestamp):
1401         (WebInspector.Resource.prototype.get duration):
1402         (WebInspector.Resource.prototype.get latency):
1403         (WebInspector.Resource.prototype.get receiveDuration):
1404         Update getters to use new timing model.
1405
1406         (WebInspector.Resource.prototype.updateForResponse):
1407         Update timing object with info from response.
1408
1409         (WebInspector.Resource.prototype.markAsFinished):
1410         Log response end time.
1411
1412         * UserInterface/Models/ResourceTimelineRecord.js:
1413         (WebInspector.ResourceTimelineRecord.prototype.get startTime):
1414         (WebInspector.ResourceTimelineRecord.prototype.get activeStartTime):
1415         (WebInspector.ResourceTimelineRecord.prototype.get endTime):
1416         Update getters to use new timing model.
1417
1418         * UserInterface/Models/ResourceTimingData.js: Added.
1419         (WebInspector.ResourceTimingData):
1420         (WebInspector.ResourceTimingData.fromPayload):
1421         (WebInspector.ResourceTimingData.prototype.get startTime):
1422         (WebInspector.ResourceTimingData.prototype.get domainLookupStart):
1423         (WebInspector.ResourceTimingData.prototype.get domainLookupEnd):
1424         (WebInspector.ResourceTimingData.prototype.get connectStart):
1425         (WebInspector.ResourceTimingData.prototype.get connectEnd):
1426         (WebInspector.ResourceTimingData.prototype.get secureConnectionStart):
1427         (WebInspector.ResourceTimingData.prototype.get requestStart):
1428         (WebInspector.ResourceTimingData.prototype.get responseStart):
1429         (WebInspector.ResourceTimingData.prototype.get responseEnd):
1430         (WebInspector.ResourceTimingData.prototype.markResponseEndTime):
1431         Add new ResourceTimingData model and fall back on old timestamps
1432         for when data is unavailable.
1433
1434 2016-08-30  Alex Christensen  <achristensen@webkit.org>
1435
1436         Fix WebInspectorUI in internal Windows build
1437         https://bugs.webkit.org/show_bug.cgi?id=161221
1438         rdar://problem/28019023
1439
1440         Reviewed by Brent Fulgham and Joseph Pecoraro.
1441
1442         * WebInspectorUI.vcxproj/WebInspectorUI.make:
1443         * WebInspectorUI.vcxproj/WebInspectorUI.proj:
1444
1445 2016-08-29  Devin Rousso  <dcrousso+webkit@gmail.com>
1446
1447         Web Inspector: Unify Resource entry context menus
1448         https://bugs.webkit.org/show_bug.cgi?id=161301
1449
1450         Reviewed by Brian Burg.
1451
1452         * UserInterface/Main.html:
1453         Add ContextMenuUtilities.
1454
1455         * UserInterface/Views/ContextMenuUtilities.js: Added.
1456         (WebInspector.appendContextMenuItemsForResource):
1457         Appends the following items to the given WebInspector.ContextMenu object with a WebInspector.Resource:
1458          - Open in New Tab
1459          - Copy Link Address
1460          - Copy as cURL (only if the resource is not from a data URL)
1461          - Save File
1462
1463         * UserInterface/Views/ResourceTimelineDataGridNode.js:
1464         (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
1465         Make use of new WebInspector.appendContextMenuItemsForResource.
1466
1467         * UserInterface/Views/ResourceTreeElement.js:
1468         (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent):
1469         Make use of new WebInspector.appendContextMenuItemsForResource.
1470
1471 2016-08-27  Joseph Pecoraro  <pecoraro@apple.com>
1472
1473         Web Inspector: Make localizedString.js diff and commit friendly (UTF16 -> UTF8)
1474         https://bugs.webkit.org/show_bug.cgi?id=28685
1475         <rdar://problem/16460975>
1476
1477         Reviewed by Darin Adler.
1478
1479         * Localizations/en.lproj/localizedStrings.js:
1480         * WebInspectorUI.xcodeproj/project.pbxproj:
1481         Convert the file to UTF-8. Future diffs should display as text.
1482
1483 2016-08-26  Joseph Pecoraro  <pecoraro@apple.com>
1484
1485         Web Inspector: Add protocol version for iOS 10
1486         https://bugs.webkit.org/show_bug.cgi?id=161266
1487         <rdar://problem/28036594>
1488
1489         Rubber-stamped by Brian Burg.
1490
1491         * Localizations/en.lproj/localizedStrings.js:
1492         Update missing localized strings.
1493
1494         * Versions/Inspector-iOS-10.0.json: Added.
1495         Protocol for iOS 10.
1496
1497         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
1498         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
1499         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
1500         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
1501         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
1502         Re-generate the legacy backend commands files.
1503
1504 2016-08-25  Joseph Pecoraro  <pecoraro@apple.com>
1505
1506         Web Inspector: Show IndexedDB Database/ObjectStore/Index data in a details sidebar
1507         https://bugs.webkit.org/show_bug.cgi?id=161180
1508         <rdar://problem/28003417>
1509
1510         Reviewed by Brian Burg.
1511
1512         * Localizations/en.lproj/localizedStrings.js:
1513         * UserInterface/Main.html:
1514         New strings and file.
1515
1516         * UserInterface/Base/Main.js:
1517         (WebInspector.contentLoaded):
1518         Instantiate the global details sidebar.
1519
1520         * UserInterface/Views/StorageTabContentView.js:
1521         (WebInspector.StorageTabContentView):
1522         Include the new details sidebar in the Storage tab.
1523
1524         * UserInterface/Controllers/StorageManager.js:
1525         (WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processKeyPath):
1526         Use the protocol generated types.
1527
1528         * UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js: Added.
1529         (WebInspector.IndexedDatabaseDetailsSidebarPanel):
1530         (WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.inspect):
1531         (WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.layout):
1532         (WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype._keyPathString):
1533         Show the sidebar for an IndexedDatabase, ObjectStore, or Index.
1534         Show each section if we can based on the objects we have.
1535
1536 2016-08-25  Joseph Pecoraro  <pecoraro@apple.com>
1537
1538         Web Inspector: Provide a way to clear an IndexedDB object store
1539         https://bugs.webkit.org/show_bug.cgi?id=161167
1540         <rdar://problem/27996932>
1541
1542         Reviewed by Brian Burg.
1543
1544         * Localizations/en.lproj/localizedStrings.js:
1545         "Clear object store".
1546
1547         * UserInterface/Controllers/StorageManager.js:
1548         (WebInspector.StorageManager.prototype.clearObjectStore):
1549         Provide a wrapper for clearing an object store.
1550
1551         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
1552         (WebInspector.IndexedDatabaseObjectStoreContentView):
1553         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get navigationItems):
1554         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._clearButtonClicked):
1555         Add a navigation button on ObjectStore content views to clear the object store.
1556
1557 2016-08-26  Devin Rousso  <dcrousso+webkit@gmail.com>
1558
1559         Web Inspector: Some CSS selectors in the UI aren't escaped
1560         https://bugs.webkit.org/show_bug.cgi?id=151378
1561
1562         Reviewed by Joseph Pecoraro.
1563
1564         * UserInterface/Base/DOMUtilities.js:
1565         (WebInspector.displayNameForNode): Deleted.
1566         (WebInspector.linkifyNodeReference):
1567         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
1568
1569         * UserInterface/Models/DOMNode.js:
1570         (WebInspector.DOMNode.prototype.get escapedIdSelector):
1571         (WebInspector.DOMNode.prototype.get escapedClassSelector):
1572         (WebInspector.DOMNode.prototype.get displayName):
1573         (WebInspector.DOMNode.prototype.appropriateSelectorFor):
1574         Rework escaping of ids and class names into separate public functions using CSS.escape.
1575
1576         * UserInterface/Views/CSSStyleDeclarationSection.js:
1577         (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
1578         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
1579
1580         * UserInterface/Views/DOMTreeDataGridNode.js:
1581         (WebInspector.DOMTreeDataGridNode.prototype._createNameCellDocumentFragment):
1582         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
1583
1584         * UserInterface/Views/DOMTreeElementPathComponent.js:
1585         (WebInspector.DOMTreeElementPathComponent):
1586         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
1587
1588         * UserInterface/Views/LayerTreeDataGridNode.js:
1589         (WebInspector.LayerTreeDataGridNode.prototype.set layer):
1590         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
1591
1592         * UserInterface/Views/VisualStyleSelectorSection.js:
1593         (WebInspector.VisualStyleSelectorSection.prototype.update):
1594         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
1595
1596 2016-08-24  Matt Baker  <mattbaker@apple.com>
1597
1598         Web Inspector: unexpected cursor changes while dragging ruler handle in rendering frames timeline
1599         https://bugs.webkit.org/show_bug.cgi?id=161101
1600         <rdar://problem/27974117>
1601
1602         Reviewed by Brian Burg.
1603
1604         -webkit-grab(bing) cursor styles shouldn't be applied to the selection
1605         drag element when resizing.
1606
1607         * UserInterface/Views/TimelineRuler.css:
1608         (.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag):
1609         (.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag:active):
1610         (.timeline-ruler:not(.disabled) > .selection-drag): Deleted.
1611         (.timeline-ruler:not(.disabled) > .selection-drag:active): Deleted.
1612
1613 2016-08-24  Devin Rousso  <dcrousso+webkit@gmail.com>
1614
1615         Web Inspector: Shift-Tab should unindent selected line
1616         https://bugs.webkit.org/show_bug.cgi?id=159316
1617
1618         Reviewed by Joseph Pecoraro.
1619
1620         * UserInterface/Views/CodeMirrorAdditions.js:
1621         (CodeMirror.keyMap["default"]):
1622         Changed "Shift-Tab" mapping to "indentLess".
1623
1624 2016-08-23  Devin Rousso  <dcrousso+webkit@gmail.com>
1625
1626         Web Inspector: resource tree elements should provide "Download File" context menu items
1627         https://bugs.webkit.org/show_bug.cgi?id=158035
1628
1629         Reviewed by Joseph Pecoraro.
1630
1631         Add a context menu item to elements representing resources that
1632         initiates a download of that resource.
1633
1634         * Localizations/en.lproj/localizedStrings.js:
1635
1636         * UserInterface/Base/Main.js:
1637         (WebInspector.saveDataToFile):
1638         Add support for saving base64 objects.
1639
1640         * UserInterface/Base/MIMETypeUtilities.js:
1641         (WebInspector.fileExtensionForMIMEType):
1642         Returns a file extension for the given MIME type if able.
1643
1644         * UserInterface/Views/FrameTreeElement.js:
1645         (WebInspector.FrameTreeElement.prototype.onattach):
1646         Add contextmenu event listener since superclass onattach call is explicitly not used.
1647
1648         * UserInterface/Views/ResourceTimelineDataGridNode.js:
1649         (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
1650         Add Save File context menu item.
1651
1652         * UserInterface/Views/ResourceTreeElement.js:
1653         (WebInspector.ResourceTreeElement.prototype.onattach):
1654         (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent):
1655         Add contextmenu event listener and Save File context menu item.
1656
1657 2016-08-23  Devin Rousso  <dcrousso+webkit@gmail.com>
1658
1659         Web Inspector: No open/copy src resource in context menu
1660         https://bugs.webkit.org/show_bug.cgi?id=159028
1661
1662         Reviewed by Joseph Pecoraro.
1663
1664         * Localizations/en.lproj/localizedStrings.js:
1665
1666         * UserInterface/Views/DOMTreeElement.js:
1667         (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
1668         Add options in the context menu of link attributes of DOM nodes to
1669          - Open in New Tab
1670          - Reveal in Resources Tab
1671          - Copy Link Address
1672
1673 2016-08-23  Devin Rousso  <dcrousso+webkit@gmail.com>
1674
1675         Web Inspector: Add visual editor for spring() timing-function
1676         https://bugs.webkit.org/show_bug.cgi?id=159315
1677
1678         Reviewed by Joseph Pecoraro.
1679
1680         * Localizations/en.lproj/localizedStrings.js:
1681         * UserInterface/Main.html:
1682
1683         * UserInterface/Base/Utilities.js:
1684         (Number.prototype.maxDecimals):
1685         Limits the number of decimals for the number object via rounding.
1686
1687         * UserInterface/Controllers/CodeMirrorSpringEditingController.js:
1688         (WebInspector.CodeMirrorSpringEditingController.prototype.get initialValue):
1689         (WebInspector.CodeMirrorSpringEditingController.prototype.get cssClassName):
1690         (WebInspector.CodeMirrorSpringEditingController.prototype.popoverWillPresent):
1691         (WebInspector.CodeMirrorSpringEditingController.prototype.popoverDidPresent):
1692         (WebInspector.CodeMirrorSpringEditingController.prototype.popoverDidDismiss):
1693         (WebInspector.CodeMirrorSpringEditingController.prototype._springEditorSpringChanged):
1694         Controller for Spring editors inside CodeMirror instances.
1695
1696         * UserInterface/Models/Geometry.js:
1697         (WebInspector.Spring):
1698         (WebInspector.Spring.fromValues):
1699         (WebInspector.Spring.fromString):
1700         (WebInspector.Spring.prototype.copy):
1701         (WebInspector.Spring.prototype.toString):
1702         (WebInspector.Spring.prototype.solve):
1703         (WebInspector.Spring.prototype.calculateDuration):
1704         Spring data class based on <https://webkit.org/demos/spring/>.
1705
1706         * UserInterface/Models/TextMarker.js:
1707         (WebInspector.TextMarker.Type):
1708         Added Spring marker type.
1709
1710         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1711         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches):
1712         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update):
1713         (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged):
1714         (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged.update):
1715
1716         * UserInterface/Views/CodeMirrorTextMarkers.js:
1717         (createCodeMirrorSpringTextMarkers):
1718
1719         * UserInterface/Views/InlineSwatch.css:
1720         (.inline-swatch:matches(.bezier, .spring)):
1721         (.inline-swatch:matches(.bezier, .spring):hover):
1722         (.inline-swatch:matches(.bezier, .spring):active):
1723         (.inline-swatch:matches(.bezier, .spring) > span):
1724         (.inline-swatch.bezier): Deleted.
1725         (.inline-swatch.bezier:hover): Deleted.
1726         (.inline-swatch.bezier:active): Deleted.
1727         (.inline-swatch.bezier > span): Deleted.
1728
1729         * UserInterface/Views/InlineSwatch.js:
1730         (WebInspector.InlineSwatch):
1731         (WebInspector.InlineSwatch.prototype._fallbackValue):
1732         (WebInspector.InlineSwatch.prototype._swatchElementClicked):
1733         (WebInspector.InlineSwatch.prototype._valueEditorValueDidChange):
1734         (WebInspector.InlineSwatch.Type):
1735         Added support for Spring editor Inline Swatches.
1736
1737         * UserInterface/Views/SourceCodeTextEditor.js:
1738         (WebInspector.SourceCodeTextEditor.prototype._updateEditableMarkers):
1739         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
1740
1741         * UserInterface/Views/SpringEditor.css:
1742         (.spring-editor):
1743         (.spring-editor > .spring-preview):
1744         (.spring-editor > .spring-preview > div):
1745         (.spring-editor > .spring-timing):
1746         (.spring-editor > .spring-timing > div):
1747         (.spring-editor > .spring-timing:matches(::before, ::after)):
1748         (.spring-editor > .spring-timing::before):
1749         (.spring-editor > .spring-timing::after):
1750         (.spring-editor > :matches(.spring-preview, .spring-timing) > div):
1751         (.spring-editor > .animate:matches(.spring-preview, .spring-timing) > div):
1752         (.spring-editor > .number-input-container > .number-input-row):
1753         (.spring-editor > .number-input-container > .number-input-row > .number-input-row-title):
1754         (.spring-editor > .number-input-container > .number-input-row > input):
1755         (.spring-editor > .number-input-container > .number-input-row > input[type="range"]):
1756
1757         * UserInterface/Views/SpringEditor.js:
1758         (WebInspector.SpringEditor):
1759         (WebInspector.SpringEditor.prototype.get element):
1760         (WebInspector.SpringEditor.prototype.set spring):
1761         (WebInspector.SpringEditor.prototype.get spring):
1762         (WebInspector.SpringEditor.prototype._handleNumberInputInput):
1763         (WebInspector.SpringEditor.prototype._handleNumberInputKeydown):
1764         (WebInspector.SpringEditor.prototype._handleNumberSliderInput):
1765         (WebInspector.SpringEditor.prototype._handleNumberSliderMousedown):
1766         (WebInspector.SpringEditor.prototype._handleNumberSliderMouseup):
1767         (WebInspector.SpringEditor.prototype._changeSpringForInput):
1768         (WebInspector.SpringEditor.prototype._resetPreviewAnimation):
1769         (WebInspector.SpringEditor.prototype._updatePreviewAnimation):
1770         (WebInspector.SpringEditor.Event):
1771         Visual editor for CSS Spring timing function values.  Organized into 5 rows:
1772          - Preview: shows movement of spring and total duration
1773          - Mass: slider and input for "mass" parameter
1774          - Stiffness: slider and input for "stiffness" parameter
1775          - Damping: slider and input for "damping" parameter
1776          - Initial Velocity: slider and input for "initial velocity" parameter
1777         The preview animation will loop indefinitely until the user clicks the animation row
1778         or changes the value of one of the parameters, at which point the duration will also
1779         be recalculated.
1780
1781         * UserInterface/Views/TextEditor.js:
1782         (WebInspector.TextEditor.prototype.createSpringMarkers):
1783         (WebInspector.TextEditor.prototype.editingControllerForMarker):
1784
1785         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
1786         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
1787         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties):
1788         Add support for CSS spring timing functions by allowing parenthesis in comma separated
1789         values so long as there are no commas inside the parenthesis.
1790
1791         * UserInterface/Views/VisualStyleTimingEditor.css:
1792         (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch:matches(.bezier, .spring)):
1793         (.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.spring-value) > .inline-swatch.spring):
1794         (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch.bezier): Deleted.
1795         (.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.bezier-value) > .inline-swatch.bezier): Deleted.
1796
1797         * UserInterface/Views/VisualStyleTimingEditor.js:
1798         (WebInspector.VisualStyleTimingEditor):
1799         (WebInspector.VisualStyleTimingEditor.prototype.get value):
1800         (WebInspector.VisualStyleTimingEditor.prototype.set value):
1801         (WebInspector.VisualStyleTimingEditor.prototype.get synthesizedValue):
1802         (WebInspector.VisualStyleTimingEditor.prototype.parseValue):
1803         (WebInspector.VisualStyleTimingEditor.prototype.get _bezierValue):
1804         (WebInspector.VisualStyleTimingEditor.prototype.set _bezierValue):
1805         (WebInspector.VisualStyleTimingEditor.prototype.get _springValue):
1806         (WebInspector.VisualStyleTimingEditor.prototype.set _springValue):
1807         (WebInspector.VisualStyleTimingEditor.prototype._handleKeywordChanged):
1808         (WebInspector.VisualStyleTimingEditor.prototype._springSwatchValueChanged):
1809         (WebInspector.VisualStyleTimingEditor.prototype.get bezierValue): Renamed.
1810         (WebInspector.VisualStyleTimingEditor.prototype.set bezierValue): Renamed.
1811         Duplicate Bezier custom timing function logic for Spring timing functions.
1812
1813 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
1814
1815         Web Inspector: Styles -> Computed -> Box Model shows NaN x NaN for invisible elements
1816         https://bugs.webkit.org/show_bug.cgi?id=161038
1817
1818         Reviewed by Joseph Pecoraro.
1819
1820         * UserInterface/Base/Utilities.js:
1821         Add figureDash variable.
1822
1823         * UserInterface/Views/BoxModelDetailsSectionRow.js:
1824         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement):
1825         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
1826         Moved isNaN check of value to common createElement.
1827
1828 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
1829
1830         Web Inspector: Visual styles sidebar should do something sane for SVG elements
1831         https://bugs.webkit.org/show_bug.cgi?id=148269
1832
1833         Reviewed by Joseph Pecoraro.
1834
1835         * Localizations/en.lproj/localizedStrings.js:
1836
1837         * UserInterface/Models/DOMNode.js:
1838         (WebInspector.DOMNode.prototype.get ownerSVGElement):
1839         (WebInspector.DOMNode.prototype.isSVGElement):
1840         Climbs ancestor tree to determine if node is an SVG node.
1841
1842         * UserInterface/Views/VisualStyleDetailsPanel.js:
1843         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
1844         (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
1845         (WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection):
1846         (WebInspector.VisualStyleDetailsPanel.prototype._populateDimensionsSection):
1847         (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
1848         (WebInspector.VisualStyleDetailsPanel.prototype._populateFillSection):
1849         (WebInspector.VisualStyleDetailsPanel.prototype._populateStrokeSection):
1850
1851         * UserInterface/Views/VisualStylePropertyEditor.css:
1852         (.visual-style-property-container.inactive):
1853         (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)):
1854
1855         * UserInterface/Views/VisualStyleRelativeNumberSlider.css:
1856         (.visual-style-property-container.number-input-box.relative-number-slider > .relative-slider):
1857
1858         * UserInterface/Views/VisualStyleUnitSlider.css:
1859         (.visual-style-property-container.unit-slider > .visual-style-property-value-container > .slider):
1860         (.visual-style-property-container.unit-slider.opacity > .visual-style-property-value-container > .slider): Deleted.
1861
1862 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
1863
1864         Web Inspector: Visual Styles: "Text -> Content" section should only be visible for pseudo-element
1865         https://bugs.webkit.org/show_bug.cgi?id=158272
1866
1867         Reviewed by Joseph Pecoraro.
1868
1869         * Localizations/en.lproj/localizedStrings.js:
1870
1871         * UserInterface/Views/VisualStyleDetailsPanel.css:
1872         (.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive):
1873         (.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive > *):
1874         (.visual-style-property-container.transition): Deleted.
1875         (.visual-style-property-container.animation): Deleted.
1876
1877         * UserInterface/Views/VisualStyleDetailsPanel.js:
1878         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
1879         (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
1880         (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
1881
1882 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
1883
1884         Web Inspector: Entering ":n" in Open Resource Dialog, where n > number of lines, should jump to the last line
1885         https://bugs.webkit.org/show_bug.cgi?id=160840
1886
1887         Reviewed by Joseph Pecoraro.
1888
1889         * UserInterface/Views/TextEditor.js:
1890         (TextEditor.prototype.revealPosition):
1891         Limit the given line and column to the maximum number of lines and the column count on the
1892         resulting line.
1893
1894 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
1895
1896         Web Inspector: Add indicator to matched selector being a pseudo-element
1897         https://bugs.webkit.org/show_bug.cgi?id=160893
1898
1899         Reviewed by Joseph Pecoraro.
1900
1901         Instead of using "{}" icons for CSS rules, use a "P" icon with the same coloring to identify
1902         that the rule contains a pseudo-selector that is currently being applied to the selected element.
1903
1904         * UserInterface/Base/Utilities.js:
1905         (Array.prototype.toggleIncludes):
1906         Toggles whether or not to include the given value in the array based on its existence or a
1907         "force" flag parameter.
1908
1909         * UserInterface/Images/StyleRuleAuthorPseudo.svg:
1910         * UserInterface/Images/StyleRuleInspectorPseudo.svg:
1911         * UserInterface/Images/StyleRuleUserAgentPseudo.svg:
1912         * UserInterface/Images/StyleRuleUserPseudo.svg:
1913
1914         * UserInterface/Models/CSSRule.js:
1915         (WebInspector.CSSRule.prototype.hasMatchedPseudoElementSelector):
1916
1917         * UserInterface/Models/CSSSelector.js:
1918         (WebInspector.CSSSelector.prototype.isPseudoElementSelector):
1919
1920         * UserInterface/Views/CSSStyleDeclarationSection.js:
1921         (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
1922
1923         * UserInterface/Views/StyleRuleIcons.css:
1924         (.author-style-rule-icon.pseudo-element-selector .icon):
1925         (.user-style-rule-icon.pseudo-element-selector .icon):
1926         (.user-agent-style-rule-icon.pseudo-element-selector .icon):
1927         (.inspector-style-rule-icon.pseudo-element-selector .icon):
1928
1929          * UserInterface/Views/VisualStyleSelectorTreeItem.js:
1930         (WebInspector.VisualStyleSelectorTreeItem):
1931         (WebInspector.VisualStyleSelectorTreeItem.prototype.get iconClassName):
1932         (WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):
1933
1934 2016-08-19  Nikita Vasilyev  <nvasilyev@apple.com>
1935
1936         Web Inspector: Make an icon for Code Coverage Profiler
1937         https://bugs.webkit.org/show_bug.cgi?id=160872
1938         <rdar://problem/27855650>
1939
1940         Reviewed by Joseph Pecoraro.
1941
1942         Add a "C" icon, similar to the existing "T" (Type Profiler) icon.
1943         "C" can stand for Code Coverage or Control Flow.
1944
1945         * UserInterface/Images/NavigationItemCodeCoverage.svg: Added.
1946
1947 2016-08-19  Devin Rousso  <dcrousso+webkit@gmail.com>
1948
1949         Web Inspector: Console log counter on the dashboard should be better at displaying large numbers
1950         https://bugs.webkit.org/show_bug.cgi?id=160054
1951
1952         Reviewed by Matt Baker.
1953
1954         * Localizations/en.lproj/localizedStrings.js:
1955
1956         * UserInterface/Base/Utilities.js:
1957         (Number.abbreviate):
1958         Add logic for formatting a number as "#K", "#M", and "#B" when it is very large.
1959
1960         * UserInterface/Views/DefaultDashboardView.js:
1961         (WebInspector.DefaultDashboardView.prototype._updateDisplay):
1962         (WebInspector.DefaultDashboardView.prototype._formatPossibleLargeNumber): Deleted.
1963         (WebInspector.DefaultDashboardView.prototype._setConsoleItemValue):
1964
1965 2016-08-17  Matt Baker  <mattbaker@apple.com>
1966
1967         Web Inspector: Network Tab should not layout if not visible
1968         https://bugs.webkit.org/show_bug.cgi?id=160920
1969         <rdar://problem/27876629>
1970
1971         Reviewed by Timothy Hatcher.
1972
1973         Avoid updating the current time when the Network tab is hidden.
1974         The timer, and any debounced timer cancellations, need to be stopped
1975         as soon as the view is hidden.
1976
1977         * UserInterface/Views/NetworkGridContentView.js:
1978         (WebInspector.NetworkGridContentView.prototype.hidden):
1979         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
1980         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
1981         (WebInspector.NetworkGridContentView):
1982
1983 2016-08-17  Devin Rousso  <dcrousso+webkit@gmail.com>
1984
1985         Web Inspector: Select elements in DOM hierarchy are misaligned
1986         https://bugs.webkit.org/show_bug.cgi?id=160885
1987
1988         Reviewed by Timothy Hatcher.
1989
1990         * UserInterface/Views/HierarchicalPathComponent.css:
1991         (.hierarchical-path-component > select):
1992
1993 2016-08-17  Devin Rousso  <dcrousso+webkit@gmail.com>
1994
1995         Web Inspector: rapid updates to status icons in Visual Styles sidebar causes flicker
1996         https://bugs.webkit.org/show_bug.cgi?id=160887
1997
1998         Reviewed by Timothy Hatcher.
1999
2000         * UserInterface/Views/VisualStyleBasicInput.js:
2001         (WebInspector.VisualStyleBasicInput):
2002
2003         * UserInterface/Views/VisualStyleColorPicker.js:
2004         (WebInspector.VisualStyleColorPicker):
2005
2006         * UserInterface/Views/VisualStyleNumberInputBox.js:
2007         (WebInspector.VisualStyleNumberInputBox):
2008         (WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown):
2009
2010         * UserInterface/Views/VisualStylePropertyNameInput.js:
2011         (WebInspector.VisualStylePropertyNameInput):
2012
2013 2016-08-16  Nikita Vasilyev  <nvasilyev@apple.com>
2014
2015         Web Inspector: DOM nodes shift when hovering over them in Console
2016         https://bugs.webkit.org/show_bug.cgi?id=160789
2017         <rdar://problem/27815600>
2018
2019         Reviewed by Matt Baker.
2020
2021         * UserInterface/Views/FormattedValue.css:
2022         (.formatted-node > .tree-outline.dom ol): Deleted.
2023
2024 2016-08-16  Nikita Vasilyev  <nvasilyev@apple.com>
2025
2026         Web Inspector: Data grid has a double left border when the first column is hidden
2027         https://bugs.webkit.org/show_bug.cgi?id=160723
2028         <rdar://problem/27778081>
2029
2030         Reviewed by Timothy Hatcher.
2031
2032         This patch exploits the fact hiding columns that aren't first in DataGrid don't create double
2033         borders.
2034
2035         * UserInterface/Views/DataGrid.css:
2036         (.data-grid table.header,):
2037         (.data-grid :matches(th, td):first-child):
2038         (@media (-webkit-min-device-pixel-ratio: 2)):
2039         * UserInterface/Views/SourceCodeTextEditor.js:
2040         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
2041
2042 2016-08-16  Joseph Pecoraro  <pecoraro@apple.com>
2043
2044         Web Inspector: Do not request Scope Chain lists if section is collapsed (mainly Global Variables)
2045         https://bugs.webkit.org/show_bug.cgi?id=140567
2046         <rdar://problem/19504745>
2047
2048         Reviewed by Timothy Hatcher.
2049
2050         * UserInterface/Main.html:
2051         New file name.
2052
2053         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2054         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection):
2055         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
2056         Avoid fetching object properties until the user expands the section.
2057
2058         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2059         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
2060         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
2061         Avoid fetching scope variable properties until the user expands the section.
2062
2063         * UserInterface/Views/ObjectPropertiesDetailSectionRow.js: Renamed from Source/WebInspectorUI/UserInterface/Views/DetailsSectionPropertiesRow.js.
2064         (WebInspector.ObjectPropertiesDetailSectionRow):
2065         (WebInspector.ObjectPropertiesDetailSectionRow.prototype.get objectTree):
2066         (WebInspector.ObjectPropertiesDetailSectionRow.prototype._detailsSectionCollapsedStateChanged):
2067         Rename and simplify the class since it always has an ObjectTreeView.
2068         By default the section will auto-expand the ObjectTreeView, however
2069         if provided a details section group, it will defer expanion until
2070         the group expands.
2071
2072 2016-08-16  Devin Rousso  <dcrousso+webkit@gmail.com>
2073
2074         Web Inspector: add "Copy Selected" context menu item to Console
2075         https://bugs.webkit.org/show_bug.cgi?id=151836
2076
2077         Reviewed by Timothy Hatcher.
2078
2079         * Localizations/en.lproj/localizedStrings.js:
2080         * UserInterface/Views/LogContentView.js:
2081         (WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
2082         (WebInspector.LogContentView.prototype._handleContextMenuEvent):
2083         (WebInspector.LogContentView.prototype._mousedown):
2084
2085 2016-08-16  Devin Rousso  <dcrousso+webkit@gmail.com>
2086
2087         Web Inspector: Visual Styles: "Text -> Content" isn't escaped
2088         https://bugs.webkit.org/show_bug.cgi?id=158271
2089
2090         Reviewed by Timothy Hatcher.
2091
2092         * UserInterface/Base/Utilities.js:
2093         (String.prototype.hasMatchingEscapedQuotes):
2094         Checks that the given string has property escaped quotes (single or double).
2095
2096         * UserInterface/Views/VisualStyleBasicInput.js:
2097         (WebInspector.VisualStyleBasicInput):
2098         (WebInspector.VisualStyleBasicInput.prototype._handleInputElementInput):
2099
2100 2016-08-16  Joseph Pecoraro  <pecoraro@apple.com>
2101
2102         Modernize model objects simple getters
2103         https://bugs.webkit.org/show_bug.cgi?id=160863
2104
2105         Reviewed by Timothy Hatcher.
2106
2107         Simplify the style of many Model objects with basic accessors.
2108         We reduce them to a single line and group them together so
2109         that they can be more easily read at a glance.
2110
2111         * UserInterface/Models/AnalyzerMessage.js:
2112         * UserInterface/Models/ApplicationCacheFrame.js:
2113         * UserInterface/Models/ApplicationCacheManifest.js:
2114         * UserInterface/Models/BreakpointAction.js:
2115         * UserInterface/Models/CSSMedia.js:
2116         * UserInterface/Models/CSSSelector.js:
2117         * UserInterface/Models/CollectionEntry.js:
2118         * UserInterface/Models/CollectionEntryPreview.js:
2119         * UserInterface/Models/DOMStorageObject.js:
2120         * UserInterface/Models/DatabaseObject.js:
2121         * UserInterface/Models/DatabaseTableObject.js:
2122         * UserInterface/Models/ExecutionContext.js:
2123         * UserInterface/Models/GarbageCollection.js:
2124         * UserInterface/Models/IndexedDatabase.js:
2125         * UserInterface/Models/IndexedDatabaseObjectStore.js:
2126         * UserInterface/Models/IndexedDatabaseObjectStoreIndex.js:
2127         * UserInterface/Models/ObjectPreview.js:
2128         * UserInterface/Models/ProbeSet.js:
2129         * UserInterface/Models/PropertyDescriptor.js:
2130         * UserInterface/Models/PropertyPath.js:
2131         * UserInterface/Models/PropertyPreview.js:
2132         * UserInterface/Models/SourceCodePosition.js:
2133         * UserInterface/Models/SourceCodeSearchMatchObject.js:
2134         * UserInterface/Models/SourceCodeTimeline.js:
2135         * UserInterface/Models/StructureDescription.js:
2136         * UserInterface/Models/TextRange.js:
2137         * UserInterface/Models/Timeline.js:
2138         * UserInterface/Models/TimelineRecording.js:
2139         * UserInterface/Models/TypeDescription.js:
2140
2141 2016-08-15  Devin Rousso  <dcrousso+webkit@gmail.com>
2142
2143         Web Inspector: Large class lists are not easily discoverable with "Classes" quick-toggle
2144         https://bugs.webkit.org/show_bug.cgi?id=160856
2145
2146         Reviewed by Joseph Pecoraro.
2147
2148         * UserInterface/Base/DOMUtilities.js:
2149         (WebInspector.linkifyNodeReference):
2150         Add option to truncate the text of the linkified node.
2151
2152         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
2153         (.sidebar > .panel.details.css-style > .content ~ .class-list-container):
2154         Increase the max-height to partially show additional classes if many are set.
2155
2156         * UserInterface/Views/RulesStyleDetailsPanel.js:
2157         (WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
2158         Trucate the name of inherited nodes so they don't take up as much space in the sidebar.
2159
2160         * UserInterface/Views/VisualStyleSelectorSection.css:
2161         (.details-section.visual-style-selector-section > .header > .current-selector): Deleted.
2162         (.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider > .titles): Deleted.
2163         Removed since they are already inherited.
2164
2165 2016-08-15  Devin Rousso  <dcrousso+webkit@gmail.com>
2166
2167         Web Inspector: Close button on selected item in Network tab is misaligned
2168         https://bugs.webkit.org/show_bug.cgi?id=160884
2169
2170         Reviewed by Matt Baker.
2171
2172         * UserInterface/Views/NetworkSidebarPanel.css:
2173         (.sidebar > .panel.navigation.network .status .close.status-button):
2174
2175 2016-08-15  Devin Rousso  <dcrousso+webkit@gmail.com>
2176
2177         Web Inspector: Error/Warning icons are misplaced in the Visual sidebar
2178         https://bugs.webkit.org/show_bug.cgi?id=160875
2179
2180         Reviewed by Matt Baker.
2181
2182         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
2183         (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder): Deleted.
2184         Reworked to apply more generally to editors without titles.
2185
2186         * UserInterface/Views/VisualStylePropertyEditor.css:
2187         (.visual-style-property-container.missing-dependency > .visual-style-property-editor-warning):
2188         (.visual-style-property-container.invalid-value > .visual-style-property-editor-warning):
2189         (.visual-style-property-container:matches(.missing-dependency, .invalid-value) > *:first-child:matches(.visual-style-property-value-container)):
2190         (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container) > .visual-style-special-property-placeholder):
2191         (.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency): Deleted.
2192         (.visual-style-property-container > .visual-style-property-editor-warning.invalid-value): Deleted.
2193         Reworked class names to be on the element container instead of the icon.
2194
2195         * UserInterface/Views/VisualStylePropertyEditor.js:
2196         (WebInspector.VisualStylePropertyEditor.prototype.update):
2197         (WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
2198         (WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
2199         (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
2200
2201 2016-08-15  Saam Barati  <sbarati@apple.com>
2202
2203         Web Inspector: Introduce a method to enable code coverage profiler without enabling type profiler
2204         https://bugs.webkit.org/show_bug.cgi?id=160750
2205         <rdar://problem/27793469>
2206
2207         Reviewed by Joseph Pecoraro.
2208
2209         * UserInterface/Base/Main.js:
2210         (WebInspector.loaded):
2211         * UserInterface/Views/SourceCodeTextEditor.js:
2212         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
2213
2214 2016-08-12  Timothy Hatcher  <timothy@apple.com>
2215
2216         Web Inspector: Add application/vnd.api+json as a valid JSON MIME-type
2217         https://bugs.webkit.org/show_bug.cgi?id=160834
2218         rdar://problem/27608536
2219
2220         Reviewed by Joseph Pecoraro.
2221
2222         * UserInterface/Views/CodeMirrorAdditions.js: Add Add application/vnd.api+json to extraJSONTypes.
2223
2224 2016-08-12  Nikita Vasilyev  <nvasilyev@apple.com>
2225
2226         Web Inspector: Command-Shift-O causes infinite loop if web page has frames
2227         https://bugs.webkit.org/show_bug.cgi?id=160810
2228
2229         Reviewed by Joseph Pecoraro.
2230
2231         * UserInterface/Views/OpenResourceDialog.js:
2232         (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
2233         "frame" doesn't change inside the loop.
2234
2235 2016-08-12  Joseph Pecoraro  <pecoraro@apple.com>
2236
2237         Web Inspector: Support for :lineNumber syntax in Open Resource Dialog
2238         https://bugs.webkit.org/show_bug.cgi?id=159732
2239         <rdar://problem/27684491>
2240
2241         Reviewed by Matt Baker.
2242
2243         Allow the Open Resource Dialog to support line/column syntax.
2244         Other tools allow "<name>:<line>:<column>" syntax, where the
2245         location data at the end is optional. If the <name> portion
2246         is missing, the location can be used for the active content
2247         view, assuming it has text data and has lines.
2248
2249         * UserInterface/Base/Main.js:
2250         (WebInspector.focusedOrVisibleContentView):
2251         Expose a function to access the current focused / visible content view.
2252
2253         (WebInspector.dialogWasDismissed):
2254         Include passing on cookie data when showing a represented object.
2255
2256         * UserInterface/Views/Dialog.js:
2257         (WebInspector.Dialog):
2258         (WebInspector.Dialog.prototype.get visible):
2259         (WebInspector.Dialog.prototype.get delegate):
2260         (WebInspector.Dialog.prototype.get representedObject):
2261         (WebInspector.Dialog.prototype.get cookie):
2262         (WebInspector.Dialog.prototype.dismiss):
2263         * UserInterface/Models/ResourceQueryResult.js:
2264         (WebInspector.ResourceQueryResult):
2265         (WebInspector.ResourceQueryResult.prototype.get cookie):
2266         Include cookie data along with the represented object in matches
2267         and dialog results.
2268
2269         * UserInterface/Controllers/ResourceQueryController.js:
2270         (WebInspector.ResourceQueryController.prototype.executeQuery):
2271         Cut off location data from a query, and stash it on the query result.
2272         A query can be "<name>:<line>:<column>", and the line/column data
2273         becomes cookie data for the resource.
2274
2275         * UserInterface/Views/OpenResourceDialog.js:
2276         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
2277         If the query is just ":<line>:<column>" have it jump to a location
2278         in the current content view if applicable.
2279
2280         (WebInspector.OpenResourceDialog.prototype._handleKeydownEvent):
2281         (WebInspector.OpenResourceDialog.prototype._treeSelectionDidChange):
2282         When dismissing, include cookie data.
2283
2284 2016-08-11  Nikita Vasilyev  <nvasilyev@apple.com>
2285
2286         REGRESSION (r204264): Web Inspector: Uncaught Exception in Network tab when reloading a web page
2287         https://bugs.webkit.org/show_bug.cgi?id=160781
2288         <rdar://problem/27810452>
2289
2290         Reviewed by Matt Baker.
2291
2292         WebInspector.TimelineDataGrid.prototype.closed was removed in r204264.
2293         Define a stub method on DataGrid so it's available to all its subclasses.
2294
2295         * UserInterface/Views/DataGrid.js:
2296         this._dataGrid.closed()
2297
2298 2016-08-10  Joseph Pecoraro  <pecoraro@apple.com>
2299
2300         Web Inspector: Should be able to Edit Node Attributes and Styles for non-UserAgent Shadow DOM nodes
2301         https://bugs.webkit.org/show_bug.cgi?id=160762
2302         <rdar://problem/27798271>
2303
2304         Reviewed by Ryosuke Niwa.
2305
2306         * UserInterface/Models/DOMNode.js:
2307         (WebInspector.DOMNode.prototype.isInUserAgentShadowTree):
2308         (WebInspector.DOMNode.prototype.isShadowRoot):
2309         (WebInspector.DOMNode.prototype.isUserAgentShadowRoot):
2310         (WebInspector.DOMNode.prototype.ancestorShadowRoot):
2311         (WebInspector.DOMNode.prototype.ancestorShadowHost):
2312         Add methods for determining the shadow root, host, and easily
2313         checking the type of shadow tree a node is in.
2314
2315         * UserInterface/Models/CSSStyleDeclaration.js:
2316         (WebInspector.CSSStyleDeclaration.prototype.get editable):
2317         * UserInterface/Views/DOMTreeElement.js:
2318         (WebInspector.DOMTreeElement.prototype.get editable):
2319         (WebInspector.DOMTreeElement.prototype._startEditingTarget):
2320         (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
2321         * UserInterface/Views/RulesStyleDetailsPanel.js:
2322         (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
2323         * UserInterface/Views/VisualStyleSelectorSection.js:
2324         (WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
2325         Allow editing shadow DOM nodes as long as they are not in a UserAgent shadow tree.
2326
2327         * UserInterface/Views/DOMTreeOutline.js:
2328         (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
2329         Disallow "Log Element" on UserAgent shadow tree nodes.
2330
2331 2016-08-10  Nikita Vasilyev  <nvasilyev@apple.com>
2332
2333         Web Inspector: Can't click on the lower half of "S" icon in JavaScript Allocations timeline
2334         https://bugs.webkit.org/show_bug.cgi?id=160743
2335         <rdar://problem/27790098>
2336
2337         Reviewed by Timothy Hatcher.
2338
2339         "S" icons are covered by .scroll-container, which has `z-index: calc(var(--z-index-resizer) + 1)`.
2340         Set larger z-index on the "S" icons.
2341
2342         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
2343         (.timeline-overview-graph.heap-allocations > img.snapshot):
2344
2345 2016-08-08  Joseph Pecoraro  <pecoraro@apple.com>
2346
2347         Web Inspector: Popover for Color Picker should update position when window resizes
2348         https://bugs.webkit.org/show_bug.cgi?id=160321
2349
2350         Reviewed by Brian Burg.
2351
2352         * UserInterface/Views/Popover.js:
2353         (WebInspector.Popover):
2354         (WebInspector.Popover.prototype.set windowResizeHandler):
2355         (WebInspector.Popover.prototype.dismiss):
2356         (WebInspector.Popover.prototype.handleEvent):
2357         (WebInspector.Popover.prototype._addListenersIfNeeded):
2358         The popover already has a set of window listeners, add "resize" to
2359         the list. If there is a resize, invoke a resize handler. The resize
2360         handler will only be called while the popover is visible.
2361
2362         * UserInterface/Views/HeapSnapshotDataGridTree.js:
2363         (WebInspector.HeapSnapshotDataGridTree):
2364         (WebInspector.HeapSnapshotDataGridTree.prototype.get visible):
2365         (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverNode):
2366         (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverNode):
2367         (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverTargetElement):
2368         (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverTargetElement):
2369         (WebInspector.HeapSnapshotDataGridTree.prototype.get popover):
2370         (WebInspector.HeapSnapshotDataGridTree.prototype.willDismissPopover):
2371         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2372         Update heap snapshot popovers to reposition on window resize.
2373         Set a target to reposition around, since the popover is shared.
2374
2375         * UserInterface/Views/ProbeSetDetailsSection.js:
2376         (WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
2377         Update probe expression popover to respect window resizes.
2378
2379         * UserInterface/Views/VisualStylePropertyEditor.js:
2380         (WebInspector.VisualStylePropertyEditor.prototype._showPropertyInfoPopover):
2381         Though not yet visible, update this to respect window resizes.
2382
2383         * UserInterface/Views/InlineSwatch.js:
2384         (WebInspector.InlineSwatch.prototype._swatchElementClicked):
2385         Add a window resize handler to reposition over the swatch element.
2386
2387         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
2388         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode):
2389         (WebInspector.LayerTreeDetailsSidebarPanel): Deleted.
2390         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._windowResized): Deleted.
2391         * UserInterface/Views/TimelineDataGrid.js:
2392         (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
2393         (WebInspector.TimelineDataGrid): Deleted.
2394         (WebInspector.TimelineDataGrid.prototype.closed): Deleted.
2395         (WebInspector.TimelineDataGrid.prototype.handleEvent): Deleted.
2396         (WebInspector.TimelineDataGrid.prototype._windowResized): Deleted.
2397         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2398         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
2399         (WebInspector.ScopeChainDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
2400         Replace custom popover repositioning with standard Popover handling.
2401
2402 2016-08-07  Matt Baker  <mattbaker@apple.com>
2403
2404         REGRESSION (r201245): switching between Computed and Visual Styles panels causes internal error
2405         https://bugs.webkit.org/show_bug.cgi?id=160604
2406         <rdar://problem/27723416>
2407
2408         Reviewed by Timothy Hatcher.
2409
2410         * UserInterface/Views/StyleDetailsPanel.js:
2411         (WebInspector.StyleDetailsPanel.prototype.shown):
2412         Only perform a layout if needed. Subclasses access node style
2413         data during layout, which may not exist yet.
2414
2415 2016-08-06  Matt Baker  <mattbaker@apple.com>
2416
2417         REGRESSION (r203253): Node details sidebar flickers while resizing
2418         https://bugs.webkit.org/show_bug.cgi?id=160631
2419         <rdar://problem/27733024>
2420
2421         Reviewed by Timothy Hatcher.
2422
2423         Sidebar panel layouts can be expensive, and should be performed only
2424         when necessary (i.e., when the panel is shown for the first time, or
2425         model data changed while the panel was hidden).
2426
2427         * UserInterface/Views/Sidebar.js:
2428         (WebInspector.Sidebar.prototype._recalculateWidth):
2429
2430         * UserInterface/Views/SidebarPanel.js:
2431         (WebInspector.SidebarPanel.prototype.shown):
2432
2433         * UserInterface/Views/View.js:
2434         (WebInspector.View.prototype.updateLayoutIfNeeded):
2435         Update the layout if an initial layout was never performed.
2436
2437 2016-08-04  Matt Baker  <mattbaker@apple.com>
2438
2439         Web Inspector: UI polish for Edit Breakpoint dialog
2440         https://bugs.webkit.org/show_bug.cgi?id=160566
2441         <rdar://problem/27706378>
2442
2443         Reviewed by Timothy Hatcher.
2444
2445         * UserInterface/Images/BreakpointActionAdd.svg: Removed.
2446         * UserInterface/Images/BreakpointActionRemove.svg: Removed.
2447         Use Plus13.svg and Minus.svg instead.
2448
2449         * UserInterface/Views/BreakpointActionView.css:
2450         (.breakpoint-action-button-container):
2451         (.breakpoint-action-append-button,):
2452         (.breakpoint-action-append-button):
2453         (.breakpoint-action-remove-button):
2454         Button styles should match Xcode.
2455         (.breakpoint-action-append-button:active,): Deleted.
2456         Brightness on activation no longer needed.
2457
2458         * UserInterface/Views/BreakpointActionView.js:
2459         (WebInspector.BreakpointActionView):
2460         Add a button container so buttons can float together.
2461
2462         * UserInterface/Views/BreakpointPopoverController.css:
2463         (.wide .edit-breakpoint-popover-condition > .CodeMirror):
2464         Increase condition field width by the same amount as the popover.
2465
2466 2016-08-04  Matt Baker  <mattbaker@apple.com>
2467
2468         Web Inspector: Popover's arrow is misplaced
2469         https://bugs.webkit.org/show_bug.cgi?id=151236
2470         <rdar://problem/23527296>
2471
2472         Reviewed by Brian Burg.
2473
2474         * UserInterface/Views/Popover.js:
2475         (WebInspector.Popover.prototype._setAnchorPoint):
2476         Drive-by style fix.
2477         (WebInspector.Popover.prototype._drawFrame):
2478         Position the arrow so that the arrow head doesn't overlap the
2479         rounded corners of its edge.
2480
2481 2016-08-04  Matt Baker  <mattbaker@apple.com>
2482
2483         Web Inspector: Add placeholder graphs to TimelineOverview while editing
2484         https://bugs.webkit.org/show_bug.cgi?id=160485
2485         <rdar://problem/27670755>
2486
2487         Reviewed by Brian Burg.
2488
2489         Insert placeholder elements in TimelineOverview's graph container
2490         when editing instruments. This allows alternating overview graph styles
2491         to be shown for disabled instruments, and ensures that every tree element
2492         has a corresponding element in the overview during dragging/reordering
2493         of instruments (see https://webkit.org/b/157957).
2494
2495         * UserInterface/Views/TimelineOverview.js:
2496         (WebInspector.TimelineOverview.prototype._startEditingInstruments):
2497         (WebInspector.TimelineOverview.prototype._stopEditingInstruments):
2498
2499 2016-08-04  Matt Baker  <mattbaker@apple.com>
2500
2501         Web Inspector: UI polish for Open Quickly and Goto Line dialogs
2502         https://bugs.webkit.org/show_bug.cgi?id=159849
2503         <rdar://problem/27383068>
2504
2505         Reviewed by Brian Burg.
2506
2507         * UserInterface/Images/Search.svg: Added.
2508         Magnifying glass icon.
2509
2510         * UserInterface/Views/GoToLineDialog.css:
2511         (.go-to-line-dialog):
2512         (.go-to-line-dialog > div):
2513         (.go-to-line-dialog > div::before):
2514         * UserInterface/Views/OpenResourceDialog.css:
2515         (.open-resource-dialog > .field):
2516         (.open-resource-dialog > .field::before):
2517         (.open-resource-dialog.has-results > .tree-outline):
2518         (.open-resource-dialog > .tree-outline .item):
2519         Add search icon to left of the input field in both dialogs,
2520         and adjust styles to better match Xcode 8.
2521
2522         * UserInterface/Views/OpenResourceDialog.js:
2523         (WebInspector.OpenResourceDialog):
2524         Remove "input" event listener, as styles are now toggled in _updateFilter.
2525         (WebInspector.OpenResourceDialog.prototype._updateFilter):
2526         Toggle "has-results" and "non-empty" class names.
2527         (WebInspector.OpenResourceDialog.prototype._handleInputEvent): Deleted.
2528         (WebInspector.OpenResourceDialog.prototype._clear): Deleted.
2529         Moved class toggle to _updateFilter.
2530
2531 2016-08-03  Chris Dumez  <cdumez@apple.com>
2532
2533         Drop DocumentType.internalSubset attribute
2534         https://bugs.webkit.org/show_bug.cgi?id=160530
2535
2536         Reviewed by Alex Christensen.
2537
2538         Drop DocumentType.internalSubset attribute.
2539
2540         * UserInterface/Models/DOMNode.js:
2541         (WebInspector.DOMNode): Deleted.
2542         * UserInterface/Models/DOMSearchMatchObject.js:
2543         (WebInspector.DOMSearchMatchObject.titleForDOMNode): Deleted.
2544         * UserInterface/Views/DOMTreeElement.js:
2545         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Deleted.
2546
2547 2016-08-03  Matt Baker  <mattbaker@apple.com>
2548
2549         Web Inspector: Cmd-L shortcut for Jump to Line conflicts with selecting URL of inspected page
2550         https://bugs.webkit.org/show_bug.cgi?id=158028
2551         <rdar://problem/26516663>
2552
2553         Reviewed by Timothy Hatcher.
2554
2555         Remove Command-L shortcut for opening the Line Number dialog, since
2556         we already support Control-G.
2557
2558         * UserInterface/Views/SourceCodeTextEditor.js:
2559         (WebInspector.SourceCodeTextEditor): Deleted.
2560
2561 2016-08-01  Nikita Vasilyev  <nvasilyev@apple.com>
2562
2563         Web Inspector: Don't set `width:calc(100% - 0px); left:0px` on console messages
2564         https://bugs.webkit.org/show_bug.cgi?id=160428
2565         <rdar://problem/27646033>
2566
2567         Reviewed by Timothy Hatcher.
2568
2569         Console messages inside console.group() are indented. Console messages outside of
2570         console.group() aren't and there is no reason to set inline styles that do nothing
2571         on each one of them.
2572
2573         * UserInterface/Views/LogContentView.js:
2574         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
2575
2576 2016-08-01  Matt Baker  <mattbaker@apple.com>
2577
2578         Web Inspector: Grid column resizer elements positioned incorrectly
2579         https://bugs.webkit.org/show_bug.cgi?id=160311
2580         <rdar://problem/27595586>
2581
2582         Reviewed by Brian Burg.
2583
2584         Perform a resize layout on a newly shown tab content view if the tab
2585         browser was resized before showing the tab.
2586
2587         * UserInterface/Views/TabBrowser.js:
2588         (WebInspector.TabBrowser):
2589         (WebInspector.TabBrowser.prototype.layout):
2590         Mark all recent tab content views (except for the current view)
2591         as needing a resize layout.
2592
2593         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
2594         If the tab browser was resized while the view was hidden, update the
2595         view's layout for the new content view container size.
2596
2597 2016-08-01  Matt Baker  <mattbaker@apple.com>
2598
2599         Web Inspector: Waterfall graph in Network tab shows too much whitespace/dead time
2600         https://bugs.webkit.org/show_bug.cgi?id=160373
2601
2602         Reviewed by Timothy Hatcher.
2603
2604         Track the start and end time separate from the ruler to remove
2605         leading/trailing whitespace in the graph. Also prevent network
2606         record bars from being clipped.
2607
2608         * UserInterface/Views/NetworkGridContentView.js:
2609         (WebInspector.NetworkGridContentView):
2610         (WebInspector.NetworkGridContentView.prototype.get zeroTime):
2611         Set equal to the ruler start time.
2612         (WebInspector.NetworkGridContentView.prototype.reset):
2613         Reset start and end time.
2614         (WebInspector.NetworkGridContentView.prototype.layout):
2615         Set the initial values for ruler start/zero time if needed.
2616         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
2617         Set the start time if needed.
2618         Reduce debounce from 250ms to 150ms. This prevents the current time from
2619         exceeding the end time by as wide a margin, while keeping the current
2620         time "timer" from being restarted too frequently.
2621
2622         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
2623         Update the ruler end time and schedule a layout.
2624         Add padding equal to the time needed to draw a network bar at minimum width
2625         to prevent bars from being clipped.
2626
2627 2016-07-29  Matt Baker  <mattbaker@apple.com>
2628
2629         Web Inspector: Inactive/active network bar segments overlap when latency is zero
2630         https://bugs.webkit.org/show_bug.cgi?id=160147
2631         <rdar://problem/27516007>
2632
2633         Reviewed by Joseph Pecoraro.
2634
2635         TimelineRecordBar should hide the inactive segment when its duration
2636         is less than the minimum displayable size. The active segment can
2637         assume the whole width of the bar.
2638
2639         * UserInterface/Views/TimelineOverviewGraph.js:
2640         (WebInspector.TimelineOverviewGraph.prototype.get secondsPerPixel):
2641         Make secondsPerPixel available during TimelineRecordBars.refresh.
2642
2643         * UserInterface/Views/TimelineRecordBar.js:
2644         (WebInspector.TimelineRecordBar.prototype.refresh):
2645         Check inactive duration against the minimum display size,
2646         and add/remove DOM nodes and bar styles as needed.
2647
2648 2016-07-29  Nikita Vasilyev  <nvasilyev@apple.com>
2649
2650         REGRESSION (r195456): Web Inspector: Changing tabs in Styles sidebar shouldn't change sidebar's width
2651         https://bugs.webkit.org/show_bug.cgi?id=159646
2652         <rdar://problem/27286338>
2653
2654         Reviewed by Brian Burg.
2655
2656         Remember sidebar width on per tab basis. For example, Node, Styles, and Layers sidebar panels in
2657         Elements tab should all have the same width, but Resource sidebar panel in Debugger tab should NOT
2658         share its width Element tab's sidebar.
2659
2660         TabContentView stores the width but TabBrowser manages saving and restoring it.
2661         The same way collapsed sidebar state is handled.
2662
2663         * UserInterface/Views/Sidebar.js:
2664         (WebInspector.Sidebar.prototype.set collapsed):
2665         Don't change sidebar's width when sidebar panels change.
2666
2667         (WebInspector.Sidebar.prototype._recalculateWidth):
2668         (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Deleted.
2669         Pass newWidth as an argument so it can be saved in TabBrowser.
2670
2671         * UserInterface/Views/SidebarPanel.js:
2672         (WebInspector.SidebarPanel): Deleted.
2673         (WebInspector.SidebarPanel.prototype.get savedWidth): Deleted.
2674         (WebInspector.SidebarPanel.prototype.sizeDidChange): Deleted.
2675         Remove the per sidebar panel width setting that was added in r195456.
2676
2677         * UserInterface/Views/TabBrowser.js:
2678         (WebInspector.TabBrowser):
2679         (WebInspector.TabBrowser.prototype._detailsSidebarWidthDidChange):
2680         (WebInspector.TabBrowser.prototype._showDetailsSidebarPanelsForTabContentView):
2681         * UserInterface/Views/TabContentView.js:
2682         (WebInspector.TabContentView):
2683         (WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting):
2684         Store details sidebar width on TabContentView.
2685
2686 2016-07-29  Matt Baker  <mattbaker@apple.com>
2687
2688         Web Inspector: Assertion in NetworkGridContentView when updating data grid for the first time
2689         https://bugs.webkit.org/show_bug.cgi?id=160330
2690         <rdar://problem/27600905>
2691
2692         Reviewed by Brian Burg.
2693
2694         When the first grid node is added, a view layout and current time update
2695         are scheduled. A view layout occurring before the current time is updated
2696         should be skipped, since the ruler end time hasn't been set.
2697
2698         * UserInterface/Views/NetworkGridContentView.js:
2699         (WebInspector.NetworkGridContentView.prototype.layout):
2700         Skip layout until current time is updated.
2701         (WebInspector.NetworkGridContentView.prototype._update):
2702         Remove unused variables `startTime` and `endTime`. Don't force a layout
2703         if the elapsed time is zero.
2704
2705 2016-07-28  Chris Dumez  <cdumez@apple.com>
2706
2707         Parameters to Event.initEvent() should be mandatory
2708         https://bugs.webkit.org/show_bug.cgi?id=160320
2709
2710         Reviewed by Darin Adler.
2711
2712         Update WebInspector accordingly.
2713
2714         * UserInterface/Models/NativeFunctionParameters.js:
2715
2716 2016-07-28  Chris Dumez  <cdumez@apple.com>
2717
2718         First parameter to canvas.getContext() / probablySupportsContext() should be mandatory
2719         https://bugs.webkit.org/show_bug.cgi?id=160312
2720
2721         Reviewed by Darin Adler.
2722
2723         Update WebInspector accordingly.
2724
2725         * UserInterface/Models/NativeFunctionParameters.js:
2726
2727 2016-07-28  Matt Baker  <mattbaker@apple.com>
2728
2729         Web Inspector: Hiding a column which contains a TimelineRuler as the headerview, doesn't hide the headerView
2730         https://bugs.webkit.org/show_bug.cgi?id=160093
2731         <rdar://problem/27499300>
2732
2733         Reviewed by Joseph Pecoraro.
2734
2735         * UserInterface/Views/DataGrid.js:
2736         (WebInspector.DataGrid.prototype._positionHeaderViews):
2737         Remove early return so that a header view in a hidden column will have
2738         its width resized to zero, matching the column.
2739
2740 2016-07-28  Johan K. Jensen  <johan_jensen@apple.com>
2741
2742         Web Inspector: Waterfall view should be visible in Network tab and Network Timeline
2743         https://bugs.webkit.org/show_bug.cgi?id=160061
2744
2745         Reviewed by Joseph Pecoraro.
2746
2747         Adds a Timeline-column (waterfall) to the Network tab and Network Timeline.
2748
2749         * Localizations/en.lproj/localizedStrings.js:
2750         Add "Timeline" localized string.
2751
2752         * UserInterface/Views/NetworkGridContentView.js:
2753         (WebInspector.NetworkGridContentView):
2754         Add the Timeline-column with a TimelineRuler as the headerview,
2755         and properties for updating current time.
2756
2757         (WebInspector.NetworkGridContentView.prototype.get secondsPerPixel):
2758         (WebInspector.NetworkGridContentView.prototype.get startTime):
2759         (WebInspector.NetworkGridContentView.prototype.get currentTime):
2760         (WebInspector.NetworkGridContentView.prototype.get endTime):
2761         Acting as a graphDataSource used by TimelineDataGridNode.
2762
2763         (WebInspector.NetworkGridContentView.prototype.shown):
2764         (WebInspector.NetworkGridContentView.prototype.reset):
2765         (WebInspector.NetworkGridContentView.prototype.layout):
2766         Refresh graphs and update the TimelineRuler on layout changes.
2767
2768         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
2769         Add listeners for when resources are finished to stop the timer.
2770
2771         (WebInspector.NetworkGridContentView.prototype._update):
2772         (WebInspector.NetworkGridContentView.prototype._startUpdatingCurrentTime):
2773         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
2774         Adding a timer which updates the TimelineRuler and the layout
2775         if any non-finished requests are running.
2776
2777         * UserInterface/Views/NetworkTimelineView.js:
2778         (WebInspector.NetworkTimelineView):
2779         Add the Timeline-column with a TimelineRuler as the headerview.
2780
2781         (WebInspector.NetworkTimelineView.prototype.get secondsPerPixel):
2782         (WebInspector.NetworkTimelineView.prototype.layout):
2783         Refresh graphs on layout changes.
2784
2785         * UserInterface/Views/TimelineDataGrid.css:
2786         (.tree-outline.timeline-data-grid .item:hover .subtitle):
2787         (.data-grid.timeline th):
2788         (.data-grid.timeline th.graph-column > .timeline-ruler):
2789         (.data-grid.timeline td.graph-column):
2790         (.data-grid.timeline td.graph-column > .cell-content):
2791         (.data-grid.timeline td.graph-column .timeline-record-bar):
2792
2793 2016-07-28  Chris Dumez  <cdumez@apple.com>
2794
2795         Parameter to table.deleteRow() / body.deleteRow() should be mandatory
2796         https://bugs.webkit.org/show_bug.cgi?id=160307
2797
2798         Reviewed by Ryosuke Niwa.
2799
2800         Update WebInspector accordingly.
2801
2802         * UserInterface/Models/NativeFunctionParameters.js:
2803
2804 2016-07-28  Chris Dumez  <cdumez@apple.com>
2805
2806         2 first parameters to input.setSelectionRange() should be mandatory
2807         https://bugs.webkit.org/show_bug.cgi?id=160310
2808
2809         Reviewed by Alex Christensen.
2810
2811         Update WebInspector accordingly.
2812
2813         * UserInterface/Models/NativeFunctionParameters.js:
2814
2815 2016-07-28  Chris Dumez  <cdumez@apple.com>
2816
2817         Parameter to tr.deleteCell() should be mandatory
2818         https://bugs.webkit.org/show_bug.cgi?id=160308
2819
2820         Reviewed by Ryosuke Niwa.
2821
2822         Report tr.deleteCell() parameter as mandatory.
2823
2824         * UserInterface/Models/NativeFunctionParameters.js:
2825
2826 2016-07-27  Nikita Vasilyev  <nvasilyev@apple.com>
2827
2828         Web Inspector: Visual Styles Sidebar should have only one column when it's narrow
2829         https://bugs.webkit.org/show_bug.cgi?id=159905
2830         <rdar://problem/27413248>
2831
2832         Reviewed by Joseph Pecoraro.
2833
2834         Many CSS values often get clipped in the two colunm layout. Change the layout to one colunm
2835         when visual style rows get too narrow.
2836
2837         * UserInterface/Views/VisualStyleDetailsPanel.css:
2838         (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row):
2839         (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .metric-section-row):
2840         Wrap all rows except for position/padding/margin controls.
2841
2842         (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row > .visual-style-property-container:not(.layout-reversed):last-child): Deleted.
2843         Margin between the first and the second column doesn't make sense one column layout.
2844         Set the margin in .visual-style-property-container instead.
2845
2846         * UserInterface/Views/VisualStyleDetailsPanel.js:
2847         (WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows):
2848         * UserInterface/Views/VisualStylePropertyEditor.css:
2849         (.visual-style-property-container):
2850
2851 2016-07-27  Joseph Pecoraro  <pecoraro@apple.com>
2852
2853         [Mac] Web Inspector: CodeMirror-based editor bindings for Home and End don't match system behavior
2854         https://bugs.webkit.org/show_bug.cgi?id=160267
2855         <rdar://problem/27575553>
2856
2857         Reviewed by Brian Burg.
2858
2859         * UserInterface/Views/CodeMirrorEditor.js:
2860         (WebInspector.CodeMirrorEditor.create):
2861         (WebInspector.CodeMirrorEditor):
2862         Add some key map overrides for Home and End to better match system Mac
2863         behavior. This scrolls to the start or end of a document and does not
2864         change the cursor position.
2865
2866 2016-07-27  Brian Burg  <bburg@apple.com>
2867
2868         Regression(r203535): Uncaught Exception: TypeError: Not enough arguments at LayerTreeDataGridNode.js:47
2869         https://bugs.webkit.org/show_bug.cgi?id=160187
2870         <rdar://problem/27540435>
2871
2872         Reviewed by Eric Carlson.
2873
2874         After r203535, document.createTextNode() requires an argument.
2875
2876         * UserInterface/Views/LayerTreeDataGridNode.js:
2877         (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
2878         Since this use-site is for creating a cell in an unknown column,
2879         initialize it to '–'. Previously it would have been the string
2880         "undefined" or empty.
2881
2882 2016-07-24  Matt Baker  <mattbaker@apple.com>
2883
2884         Web Inspector: Filtering is broken in the Overview timeline view
2885         https://bugs.webkit.org/show_bug.cgi?id=160152
2886         <rdar://problem/27517481>
2887
2888         Reviewed by Joseph Pecoraro.
2889
2890         * UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
2891         (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.filterableDataForColumn):
2892         Non-resource nodes should be filtered based on their display name.
2893
2894 2016-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
2895
2896         REGRESSION (r202876): Web Inspector: Switching away from Console tab with a lot of messages is slow
2897         https://bugs.webkit.org/show_bug.cgi?id=160112
2898
2899         Reviewed by Joseph Pecoraro.
2900
2901         Showing NavigationSidebar before removing previous TabContentView can be very slow when
2902         TabContentView is ConsoleTabContentView with a lot of messages. The order of operations
2903         (show sidebar, change content view, show sidebar) caused more forced layouts. This patch
2904         reduces the number of forced layouts by changes the order to: show content view, show sidebar,
2905         show sidebar.
2906
2907         * UserInterface/Views/TabBrowser.js:
2908         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
2909
2910 2016-07-20  Joseph Pecoraro  <pecoraro@apple.com>
2911
2912         Web Inspector: Pausing when Debugger tab is closed opens tab in wrong state
2913         https://bugs.webkit.org/show_bug.cgi?id=159946
2914         <rdar://problem/27429886>
2915
2916         Reviewed by Timothy Hatcher.
2917
2918         * UserInterface/Views/DebuggerSidebarPanel.js:
2919         (WebInspector.DebuggerSidebarPanel):
2920         At the end of construction, update the UI to match the current state
2921         of the world. Such as updating the UI if we are paused, or if the
2922         Timeline is capturing and we are temporarily disabling breakpoints.
2923
2924 2016-07-15  Timothy Hatcher  <timothy@apple.com>
2925
2926         Web Inspector: Make Open Quickly and Goto Line dialogs match Xcode 8
2927         https://bugs.webkit.org/show_bug.cgi?id=159823
2928         rdar://problem/27376501
2929
2930         Reviewed by Brian Burg.
2931
2932         * UserInterface/Views/GoToLineDialog.css:
2933         (.go-to-line-dialog):
2934         (.go-to-line-dialog > div > input):
2935         (.go-to-line-dialog > div > input::placeholder):
2936         (.go-to-line-dialog > div > img):
2937         (.go-to-line-dialog > div): Deleted.
2938         * UserInterface/Views/OpenResourceDialog.css:
2939         (.open-resource-dialog):
2940         (.open-resource-dialog > .field):
2941         (.open-resource-dialog > .field > input):
2942         (.open-resource-dialog > .field > input::placeholder):
2943         (.open-resource-dialog > .field > img):
2944         (.open-resource-dialog > .tree-outline .item): Deleted.
2945         (.open-resource-dialog > .tree-outline .item:first-child): Deleted.
2946
2947 2016-07-14  Joseph Pecoraro  <pecoraro@apple.com>
2948
2949         Web Inspector: Rename CCTNode to CallingContextTreeNode
2950         https://bugs.webkit.org/show_bug.cgi?id=159782
2951
2952         Reviewed by Timothy Hatcher.
2953
2954         * UserInterface/Models/CallingContextTree.js:
2955         * UserInterface/Models/CallingContextTreeNode.js:
2956         Extra to its own file and rename.
2957
2958         * UserInterface/Main.html:
2959         * UserInterface/Test.html:
2960         * UserInterface/TestStub.html:
2961         Include the new file.
2962
2963         * UserInterface/Views/ProfileDataGridNode.js:
2964         (WebInspector.ProfileDataGridNode):
2965         * UserInterface/Views/ProfileDataGridTree.js:
2966         (WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
2967         Rename shorthand "cctnode".
2968
2969 2016-07-14  Matt Baker  <mattbaker@apple.com>
2970
2971         Web Inspector: SidebarPanel classes should use View.layout instead of "refresh"
2972         https://bugs.webkit.org/show_bug.cgi?id=159745
2973         <rdar://problem/27335252>
2974
2975         Reviewed by Timothy Hatcher.
2976
2977         * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
2978         (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.set applicationCacheFrame):
2979         Use needsLayout.
2980
2981         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
2982         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.layout):
2983         Move refresh logic to layout.
2984         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
2985         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._styleSheetAddedOrRemoved):
2986         Defer layout to coalesce updates.
2987         (WebInspector.CSSStyleDetailsSidebarPanel):
2988         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Deleted.
2989
2990         * UserInterface/Views/DOMDetailsSidebarPanel.js:
2991         (WebInspector.DOMDetailsSidebarPanel.prototype.set domNode):
2992         Use needsLayout.
2993
2994         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2995         Move refresh logic to layout.
2996
2997         * UserInterface/Views/DetailsSidebarPanel.js:
2998         (WebInspector.DetailsSidebarPanel.prototype.shown): Deleted.
2999         Base class already forces a layout when shown.
3000         (WebInspector.DetailsSidebarPanel.prototype.needsRefresh): Deleted.
3001         No longer needed.
3002         (WebInspector.DetailsSidebarPanel.prototype.refresh): Deleted.
3003         Renamed layout.
3004         (WebInspector.DetailsSidebarPanel): Deleted.
3005
3006         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3007         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.supportsDOMNode):
3008         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._layerTreeDidChange):
3009         Use needsLayout.
3010         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.shown):
3011         Base class already forces a layout when shown.
3012
3013         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
3014         (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
3015         Use needsLayout.
3016
3017         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
3018         (WebInspector.ScopeChainDetailsSidebarPanel):
3019         (WebInspector.ScopeChainDetailsSidebarPanel.prototype.set callFrame):
3020         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpression):
3021         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._removeWatchExpression):
3022         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._clearAllWatchExpressions):
3023         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._refreshAllWatchExpressionsButtonClicked):
3024         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._didEvaluateExpression):
3025         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._mainResourceDidChange):
3026         Use needsLayout.
3027
3028 2016-07-14  Joseph Pecoraro  <pecoraro@apple.com>
3029
3030         Web Inspector: Maintain selected function when switching between different profile representations
3031         https://bugs.webkit.org/show_bug.cgi?id=159778
3032         <rdar://problem/27355913>
3033
3034         Reviewed by Timothy Hatcher.
3035
3036         * UserInterface/Models/CallingContextTree.js:
3037         (WebInspector.CCTNode):
3038         (WebInspector.CCTNode.prototype.get hash):
3039         (WebInspector.CCTNode.prototype.findOrMakeChild):
3040         (WebInspector.CCTNode.prototype.equals):
3041         Expose the hash so two nodes can be compared cheaply.
3042
3043         * UserInterface/Views/ProfileView.js:
3044         (WebInspector.ProfileView.prototype._repopulateDataGridFromTree):
3045         (WebInspector.ProfileView.prototype._restoreSharedState):
3046         (WebInspector.ProfileView.prototype._dataGridNodeSelected):
3047         Share data between multiple ProfileViews. Currently just remembering
3048         and restoring the selected function.
3049
3050         * UserInterface/Views/ScriptProfileTimelineView.js:
3051         (WebInspector.ScriptProfileTimelineView):
3052         (WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
3053         Include the shared data when constructing new ProfileViews.
3054
3055 2016-07-13  Matt Baker  <mattbaker@apple.com>
3056
3057         Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.showsFilterBar')
3058         https://bugs.webkit.org/show_bug.cgi?id=159696
3059         <rdar://problem/27312356>
3060
3061         Reviewed by Joseph Pecoraro.
3062
3063         * UserInterface/Views/TimelineRecordingContentView.js:
3064         (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
3065         Early return if content view not visible, since the event is sent during
3066         tab teardown and the current TimelineView may be invalid.
3067
3068 2016-07-12  Joseph Pecoraro  <pecoraro@apple.com>
3069
3070         REGRESSION(r192789): Web Inspector: Log Value context menu appears twice
3071         https://bugs.webkit.org/show_bug.cgi?id=159681
3072         <rdar://problem/27304804>
3073
3074         Reviewed by Brian Burg.
3075
3076         In r192789 contextmenu events may bubble up so that multiple handlers
3077         may append ContextMenuItems. In nested ObjectTrees / ObjectPreviews
3078         this could result in duplicate items. Add a flag on the bubbling event
3079         so that we only include Object Tree context menu items for the deepest
3080         part of the Object Tree, but still allow bubbling up to the root.
3081
3082         * UserInterface/Views/ObjectPreviewView.js:
3083         (WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
3084         (WebInspector.ObjectPreviewView):
3085         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
3086         (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
3087
3088 2016-07-12  Johan K. Jensen  <johan_jensen@apple.com>
3089
3090         Web Inspector: ER: Copy as cURL
3091         https://bugs.webkit.org/show_bug.cgi?id=159380
3092
3093         Reviewed by Joseph Pecoraro.
3094
3095         Inspired by https://chromium.googlesource.com/chromium/src/+/b7c1115dbae65030ad96e773d9a270465a05f5c4/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
3096
3097         This "Copy as cURL" feature only approximates the original request as only some parts of
3098         that request is known to the frontend.
3099
3100         * UserInterface/Models/Resource.js:
3101         (WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix.escapeCharacter):
3102         (WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix):
3103         (WebInspector.Resource.prototype.generateCURLCommand):
3104         (WebInspector.Resource):
3105         * UserInterface/Views/ResourceTimelineDataGridNode.js:
3106         (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
3107
3108 2016-07-12  Joseph Pecoraro  <pecoraro@apple.com>
3109
3110         Web Inspector: Use separate files for TreeOutline/TreeElement and DataGrid/DataGridNode
3111         https://bugs.webkit.org/show_bug.cgi?id=159659
3112
3113         Reviewed by Timothy Hatcher.
3114
3115         * UserInterface/Main.html:
3116         * UserInterface/Views/DataGrid.js:
3117         * UserInterface/Views/DataGridNode.js: Added.
3118         * UserInterface/Views/TreeElement.js: Added.
3119         * UserInterface/Views/TreeOutline.js:
3120         Extra the component classes to their own file.
3121
3122 2016-07-11  Joseph Pecoraro  <pecoraro@apple.com>
3123
3124         Web Inspector: ProfileView sometimes shows Top Functions data despite Top Functions being disabled
3125         https://bugs.webkit.org/show_bug.cgi?id=159660
3126         <rdar://problem/27291647>
3127
3128         Reviewed by Timothy Hatcher.
3129
3130         * UserInterface/Views/ScriptProfileTimelineView.js:
3131         (WebInspector.ScriptProfileTimelineView.prototype._profileOrientationButtonClicked):
3132         Pass the value of the setting, not the setting itself.
3133
3134 2016-07-11  Nikita Vasilyev  <nvasilyev@apple.com>
3135
3136         Web Inspector: Transition and Animation sections in Visual Styles sidebar should have more spacing to their left
3137         https://bugs.webkit.org/show_bug.cgi?id=159633
3138         <rdar://problem/27281805>
3139
3140         Reviewed by Timothy Hatcher.
3141
3142         * UserInterface/Views/VisualStyleDetailsPanel.css:
3143         (.visual-style-property-container.animation):
3144
3145 2016-07-08  Nikita Vasilyev  <nvasilyev@apple.com>
3146
3147         Web Inspector: Command-Shift-S in the Styles sidebar should always show the save dialog
3148         https://bugs.webkit.org/show_bug.cgi?id=156858
3149         <rdar://problem/25859098>
3150
3151         Reviewed by Timothy Hatcher.
3152
3153         * UserInterface/Views/CSSStyleDeclarationSection.js:
3154         (WebInspector.CSSStyleDeclarationSection):
3155
3156 2016-07-07  Joseph Pecoraro  <pecoraro@apple.com>
3157
3158         Web Inspector, regression: JS/JSON pretty-printing sporadically broken in STP8
3159         https://bugs.webkit.org/show_bug.cgi?id=159511
3160         <rdar://problem/27218435>
3161
3162         Reviewed by Timothy Hatcher.
3163
3164         * UserInterface/Workers/Formatter/FormatterWorker.js:
3165         (FormatterWorker.prototype.formatJavaScript):
3166         Attempt to format invalid JSON that can be evaluated to an object.
3167
3168 2016-07-07  Timothy Hatcher  <timothy@apple.com>
3169
3170         Web Inspector: scrolled Snapshot list is reset to top and drawn blank after switching back from Snapshot Comparison view
3171         https://bugs.webkit.org/show_bug.cgi?id=158218
3172         rdar://problem/26545000
3173
3174         Reviewed by Brian Burg.
3175
3176         * UserInterface/Views/ClusterContentView.js:
3177         (WebInspector.ClusterContentView.prototype.get scrollableElements): Added.
3178         A default implementation for all cluster views.
3179
3180         * UserInterface/Views/DOMStorageContentView.js:
3181         (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Deleted.
3182         This was duplicated in the class, removed one.
3183
3184         * UserInterface/Views/HeapAllocationsTimelineView.js:
3185         (WebInspector.HeapAllocationsTimelineView): Initialize _snapshotListScrollTop.
3186         (WebInspector.HeapAllocationsTimelineView.prototype.get scrollableElements): Added. Return elements
3187         based on what is showing.
3188
3189         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList): Restore the scroll position
3190         of the DataGrid after it is added to the view.
3191
3192         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord): Save the scroll position
3193         of the DataGrid before it is removed from the view.
3194
3195         * UserInterface/Views/ScriptClusterTimelineView.js:
3196         (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Deleted. Handled by the base class now.
3197
3198 2016-07-06  Timothy Hatcher  <timothy@apple.com>
3199
3200         Web Inspector: REGRESSION: Hitting ⌘T in Web Inspector no longer opens in new tab in Safari
3201         https://bugs.webkit.org/show_bug.cgi?id=159487
3202         rdar://problem/27188047
3203
3204         Change Command-T to Command-Option-T to open a new tab.
3205
3206         I also changed Command-1, etc. to Command-Option-1, etc. to switch tabs. The number commands
3207         conflicted similarly with Safari and didn't work for me as a Web Inspector shortcut at all.
3208         We can't use Command-Shift because of Command-Shift-3 and Command-Shift-4 for screenshots.
3209
3210         Reviewed by Joseph Pecoraro.
3211
3212         * UserInterface/Base/Main.js:
3213         (WebInspector.contentLoaded):
3214
3215 2016-07-06  Joseph Pecoraro  <pecoraro@apple.com>
3216
3217         Web Inspector: sometimes reloading a page with main resource selected will show an empty content view
3218         https://bugs.webkit.org/show_bug.cgi?id=158069
3219         <rdar://problem/26516710>
3220
3221         Reviewed by Timothy Hatcher.
3222
3223         * UserInterface/Views/DebuggerSidebarPanel.js:
3224         (WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView):
3225         Continue until we get one that works.
3226
3227         * UserInterface/Views/NavigationSidebarPanel.js:
3228         (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
3229         Avoid showing a content view for a background tab if it could steal
3230         the content view from a foreground tab. This is a targeted fix for
3231         reload + tab content view loading behavior. A more general fix would
3232         be reducing the work done by non-foreground tabs.
3233
3234         * UserInterface/Views/TabBrowser.js:
3235         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
3236         Update navigation sidebar first so it is set when showing the TabContentView.
3237
3238 2016-07-06  Brian Burg  <bburg@apple.com>
3239
3240         Web Inspector: Uncaught Exception reporter should include the currently dispatching protocol event or request/response if applicable
3241         https://bugs.webkit.org/show_bug.cgi?id=159320
3242         <rdar://problem/27117754>
3243
3244         Reviewed by Timothy Hatcher and Joseph Pecoraro.
3245
3246         Keep track of the currently dispatched protocol response or protocol event and make
3247         them available to the uncaught exception reporter. If an internal exception is reported
3248         while dispatching an event or response, dump the protocol message(s) into the pre-filled
3249         bug report.
3250
3251         * UserInterface/Debug/UncaughtExceptionReporter.js:
3252         (stringifyAndTruncateObject): Added.
3253         Rearrange the code that generates the pre-filled report so it's easier to add optional sections.
3254
3255         * UserInterface/Protocol/InspectorBackend.js:
3256         (InspectorBackendClass):
3257         (InspectorBackendClass.prototype.get currentDispatchState): Expose the dispatching state.
3258         (InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
3259         (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
3260         Store the originating command request with the pendingResponse data so that we can examine
3261         the originating request if the response causes an error. This will cause request message objects
3262         to be garbage-collected after their responses are dispatched rather than when the request is sent.
3263         But, I don't forsee this being a performance problem since we should always get a command response
3264         and pending command responses do not typically accumulate except when the inspector first loads.
3265
3266         (InspectorBackendClass.prototype._dispatchResponse): Save the response being dispatched.
3267         (InspectorBackendClass.prototype._dispatchResponseToCallback): Simplify exception reporting.
3268         (InspectorBackendClass.prototype._dispatchEvent): Save the event being dispatched.
3269
3270 2016-07-05  Timothy Hatcher  <timothy@apple.com>
3271
3272         Web Inspector: Switch last uses of -webkit-linear-gradient() to linear-gradient()
3273         https://bugs.webkit.org/show_bug.cgi?id=159438
3274         rdar://problem/27183417
3275
3276         Reviewed by Joseph Pecoraro.
3277
3278         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
3279         (.timeline-overview-graph.rendering-frame > .frame-marker):
3280         (body.window-inactive .timeline-overview-graph.rendering-frame > .frame-marker):
3281         * UserInterface/Views/TimelineRecordFrame.css:
3282         (.timeline-record-frame.tall):
3283         (.timeline-record-frame.selected):
3284         (body.window-inactive .timeline-record-frame.selected):
3285
3286 2016-07-05  Timothy Hatcher  <timothy@apple.com>
3287
3288         Web Inspector: Drop -webkit-calc() in completions and a single use
3289         https://bugs.webkit.org/show_bug.cgi?id=159435
3290         rdar://problem/27179340
3291
3292         Reviewed by Dean Jackson.
3293
3294         * UserInterface/Models/CSSKeywordCompletions.js:
3295         * UserInterface/Views/VisualStylePropertyEditorLink.css:
3296         (.visual-style-property-editor-link > .visual-style-property-editor-link-border):
3297
3298 2016-07-05  Timothy Hatcher  <timothy@apple.com>
3299
3300         Web Inspector: Drop the prefix from -webkit-image-set()
3301         https://bugs.webkit.org/show_bug.cgi?id=159433
3302         rdar://problem/27178887
3303
3304         Reviewed by Dean Jackson.
3305
3306         * UserInterface/Models/CSSKeywordCompletions.js:
3307         * UserInterface/Views/ApplicationCacheIcons.css:
3308         (.application-cache-manifest .icon):
3309         (.application-cache-frame .icon):
3310         * UserInterface/Views/CookieIcon.css:
3311         (.cookie-icon .icon):
3312         * UserInterface/Views/DOMStorageIcons.css:
3313         (.local-storage-icon .icon):
3314         (.session-storage-icon .icon):
3315         * UserInterface/Views/DatabaseIcon.css:
3316         (.database-icon .icon):
3317         * UserInterface/Views/DatabaseTableIcon.css:
3318         (.database-table-icon .icon):
3319         * UserInterface/Views/FolderIcon.css:
3320         (.folder-icon .icon):
3321         * UserInterface/Views/GradientSlider.css:
3322         (.gradient-slider-knob):
3323         (.gradient-slider-knob.selected):
3324         * UserInterface/Views/HoverMenu.css:
3325         (.hover-menu > img):
3326         * UserInterface/Views/ResourceIcons.css:
3327         (.resource-icon .icon):
3328         (.resource-icon.resource-type-document .icon):
3329         (.resource-icon.resource-type-image .icon):
3330         (.resource-icon.resource-type-font .icon):
3331         (.resource-icon.resource-type-stylesheet .icon):
3332         (.resource-icon.resource-type-script .icon):
3333         (.anonymous-script-icon .icon):
3334         (.source-map-resource.resource-icon .icon):
3335         (.source-map-resource.resource-icon.resource-type-stylesheet .icon):
3336         (.source-map-resource.resource-icon.resource-type-script .icon):
3337         (.large .resource-icon .icon):
3338         (.large .resource-icon.resource-type-document .icon):
3339         (.large .resource-icon.resource-type-image .icon):
3340         (.large .resource-icon.resource-type-font .icon):
3341         (.large .resource-icon.resource-type-stylesheet .icon):
3342         (.large .resource-icon.resource-type-script .icon):
3343         (.large .anonymous-script-icon .icon):
3344         (.large .source-map-resource.resource-icon .icon):
3345         (.large .source-map-resource.resource-icon.resource-type-stylesheet .icon):
3346         (.large .source-map-resource.resource-icon.resource-type-script .icon):
3347         * UserInterface/Views/Slider.css:
3348         (.slider > img):
3349         (.slider > img.dragging):
3350         * UserInterface/Views/SourceCodeTextEditor.css:
3351         (.hover-menu.color > img):
3352         * UserInterface/Views/TextEditor.css:
3353         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
3354         (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before):
3355         (.text-editor > .CodeMirror .execution-line .CodeMirror-linenumber::after):
3356         * UserInterface/Views/TimelineIcons.css:
3357         (body:not(.mac-platform, .windows-platform) .network-icon .icon):
3358         (body:not(.mac-platform, .windows-platform) .network-icon.large .icon):
3359         (body:not(.mac-platform, .windows-platform) .layout-icon .icon):
3360         (body:not(.mac-platform, .windows-platform) .layout-icon.large .icon):
3361         (body:not(.mac-platform, .windows-platform) .script-icon .icon):
3362         (body:not(.mac-platform, .windows-platform) .script-icon.large .icon):
3363         (body:not(.mac-platform, .windows-platform) .rendering-frame-icon .icon):
3364         (body:not(.mac-platform, .windows-platform) .memory-icon .icon):
3365         (body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon):
3366         (body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon):
3367
3368 2016-07-02  Joseph Pecoraro  <pecoraro@apple.com>
3369
3370         Web Inspector: CallFrame console.assert seen in tests (sourceCodeLocation instanceof SourceCodeLocation)
3371         https://bugs.webkit.org/show_bug.cgi?id=159368
3372
3373         Reviewed by Timothy Hatcher.
3374
3375         * UserInterface/Test.html:
3376         SourceCodeLocation was already included earlier. This redefines it and
3377         thereby breaks some things.
3378
3379 2016-07-02  Joseph Pecoraro  <pecoraro@apple.com>
3380
3381         inspector/debugger/command-line-api-exception.html flakily times out on mac
3382         https://bugs.webkit.org/show_bug.cgi?id=152029
3383         <rdar://problem/23813812>
3384
3385         Reviewed by Timothy Hatcher.
3386
3387         * UserInterface/Base/Object.js:
3388         (WebInspector.Object.addEventListener):
3389         Return the listener, this makes it cleaner to write tests.
3390
3391 2016-07-01  Joseph Pecoraro  <pecoraro@apple.com>
3392
3393         Web Inspector: Make enabling protocol logging in inspector tests easy to remember
3394         https://bugs.webkit.org/show_bug.cgi?id=159323
3395
3396         Reviewed by Brian Burg.
3397
3398         Now you just need to type InspectorTest.debug() or
3399         ProtocolTest.debug() and it will include stderr logging.
3400
3401         * UserInterface/Test/FrontendTestHarness.js:
3402         (FrontendTestHarness.prototype.debug):
3403         * UserInterface/Test/ProtocolTestHarness.js:
3404         (ProtocolTestHarness.prototype.debug):
3405         (ProtocolTestHarness):
3406         * UserInterface/Test/TestHarness.js:
3407         (TestHarness.prototype.debug):
3408
3409 2016-06-30  Matt Baker  <mattbaker@apple.com>
3410
3411         Unreviewed build fix.
3412
3413         * Localizations/en.lproj/localizedStrings.js:
3414         Add "Area" localized string.
3415
3416 2016-06-30  Joseph Pecoraro  <pecoraro@apple.com>
3417
3418         Web Inspector: Wrong function name next to scope
3419         https://bugs.webkit.org/show_bug.cgi?id=158210
3420         <rdar://problem/26543093>
3421
3422         Reviewed by Timothy Hatcher.
3423
3424         * UserInterface/Controllers/DebuggerManager.js:
3425         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
3426         Include new payload data in the construction call.
3427         All the new data is optional, so we gracefully handle
3428         legacy backends.
3429
3430         * UserInterface/Models/ScopeChainNode.js:
3431         (WebInspector.ScopeChainNode):
3432         (WebInspector.ScopeChainNode.prototype.get type):
3433         (WebInspector.ScopeChainNode.prototype.get objects):
3434         (WebInspector.ScopeChainNode.prototype.get name):
3435         (WebInspector.ScopeChainNode.prototype.get location):
3436         (WebInspector.ScopeChainNode.prototype.get hash):
3437         Hash is a rough (name:sourceId:line:column) string for quick comparisons.
3438
3439         (WebInspector.ScopeChainNode.prototype.makeLocalScope):
3440         Make this an action you take on a scope, to avoid having to
3441         do it at construction time, or making it a generic setting.
3442
3443         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
3444         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
3445         This was wrong before. Move the work to CallFrame
3446         and change it to be correct.
3447
3448         * UserInterface/CallFrame.js:
3449         (WebInspector.CallFrame.prototype.mergedScopeChain):
3450
3451         This transforms the scope chain for a call frame from:
3452         
3453              scope1  scope2  scope3  scope4  scope5  scope6  scope7
3454               foo     foo     foo     bar     bar      -       -
3455              Block  Closure Closure Closure Closure   GLE     GBL
3456
3457         To:
3458              scope1  scope2&3   scope4&5  scope6  scope7
3459               foo      foo*       bar*      -       -
3460              Block    Local     Closure    GLE     GBL
3461
3462         Doing a few things:
3463
3464             - Merge the first two Closure scopes sharing a location.
3465               These are the "var" and "let" Closure scopes in a function,
3466               and it is better to present these together in the UI.
3467
3468             - Mark the first Closure scope within a function (*). When
3469               this is displayed in the UI, we can provide the name of
3470               the function: "Closure Scope (name)", and we even have
3471               location information that we can use to display a goto
3472               arrow if needed.
3473
3474             - Make the first Closure scope the Local scope if it
3475               matches the Call Frame's function name. This lets us
3476               display the section as "Local Variables".
3477
3478 2016-06-30  Matt Baker  <mattbaker@apple.com>
3479
3480         Web Inspector: add pixel area column to layout timeline view
3481         https://bugs.webkit.org/show_bug.cgi?id=148677
3482         <rdar://problem/22518762>
3483
3484         Reviewed by Timothy Hatcher.
3485
3486         The view can simply add the column. LayoutTimelineDataGridNode
3487         already includes area data and cell formatting.
3488
3489         * UserInterface/Views/LayoutTimelineView.js:
3490         (WebInspector.LayoutTimelineView):
3491
3492 2016-06-30  Brian Burg  <bburg@apple.com>
3493
3494         Web Inspector: the last normal tab cannot be closed with "Close Tab" context menu item
3495         https://bugs.webkit.org/show_bug.cgi?id=159317
3496         <rdar://problem/27042491>
3497
3498         Reviewed by Timothy Hatcher.
3499
3500         * UserInterface/Views/TabBarItem.js:
3501         (WebInspector.TabBarItem.prototype._handleContextMenuEvent):
3502         (WebInspector.TabBarItem): fix the expression that controls whether the item is disabled.
3503
3504 2016-06-30  Nikita Vasilyev  <nvasilyev@apple.com>
3505
3506         Web Inspector: Add "spring" to transition-timing-function value autocompletion
3507         https://bugs.webkit.org/show_bug.cgi?id=159313
3508         <rdar://problem/27114269>
3509
3510         Reviewed by Timothy Hatcher.
3511
3512         * UserInterface/Models/CSSKeywordCompletions.js:
3513
3514 2016-06-30  Commit Queue  <commit-queue@webkit.org>
3515
3516         Unreviewed, rolling out r202659.
3517         https://bugs.webkit.org/show_bug.cgi?id=159305
3518
3519         The test for this change times out on mac-wk2 debug and caused
3520         an existing test to crash. (Requested by ryanhaddad on
3521         #webkit).
3522
3523         Reverted changeset:
3524
3525         "Web Inspector: Wrong function name next to scope"
3526         https://bugs.webkit.org/show_bug.cgi?id=158210
3527         http://trac.webkit.org/changeset/202659
3528
3529 2016-06-29  Joseph Pecoraro  <pecoraro@apple.com>
3530
3531         Web Inspector: Wrong function name next to scope
3532         https://bugs.webkit.org/show_bug.cgi?id=158210
3533         <rdar://problem/26543093>
3534
3535         Reviewed by Brian Burg.
3536
3537         * UserInterface/Controllers/DebuggerManager.js:
3538         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
3539         Include new payload data in the construction call.
3540         All the new data is optional, so we gracefully handle
3541         legacy backends.
3542
3543         * UserInterface/Models/ScopeChainNode.js:
3544         (WebInspector.ScopeChainNode):
3545         (WebInspector.ScopeChainNode.prototype.get type):
3546         (WebInspector.ScopeChainNode.prototype.get objects):
3547         (WebInspector.ScopeChainNode.prototype.get name):
3548         (WebInspector.ScopeChainNode.prototype.get location):
3549         (WebInspector.ScopeChainNode.prototype.get hash):
3550         Hash is a rough (name:sourceId:line:column) string for quick comparisons.
3551
3552         (WebInspector.ScopeChainNode.prototype.makeLocalScope):
3553         Make this an action you take on a scope, to avoid having to
3554         do it at construction time, or making it a generic setting.
3555
3556         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
3557         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
3558         This was wrong before. Move the work to CallFrame
3559         and change it to be correct.
3560
3561         * UserInterface/CallFrame.js:
3562         (WebInspector.CallFrame.prototype.mergedScopeChain):
3563
3564         This transforms the scope chain for a call frame from:
3565         
3566              scope1  scope2  scope3  scope4  scope5  scope6  scope7
3567               foo     foo     foo     bar     bar      -       -
3568              Block  Closure Closure Closure Closure   GLE     GBL
3569
3570         To:
3571              scope1  scope2&3   scope4&5  scope6  scope7
3572               foo      foo*       bar*      -       -
3573              Block    Local     Closure    GLE     GBL
3574
3575         Doing a few things:
3576
3577             - Merge the first two Closure scopes sharing a location.
3578               These are the "var" and "let" Closure scopes in a function,
3579               and it is better to present these together in the UI.
3580
3581             - Mark the first Closure scope within a function (*). When
3582               this is displayed in the UI, we can provide the name of
3583               the function: "Closure Scope (name)", and we even have
3584               location information that we can use to display a goto
3585               arrow if needed.
3586
3587             - Make the first Closure scope the Local scope if it
3588               matches the Call Frame's function name. This lets us
3589               display the section as "Local Variables".
3590
3591 2016-06-29  Brian Burg  <bburg@apple.com>
3592
3593         Web Inspector: Uncaught Exception page never shows if exception is thrown while processing a protocol event
3594         https://bugs.webkit.org/show_bug.cgi?id=159182
3595
3596         Reviewed by Joseph Pecoraro.
3597
3598         Since we catch exceptions raised during the handling of protocol responses and events, there
3599         is no way for these exceptions to trigger the global exception handler that shows the Uncaught
3600         Exception Reporter sheet. We should show these in the sheet because it makes them get fixed faster.
3601
3602         Add a new entry point, WebInspector.reportInternalError, that takes an error or string and
3603         a free-form map of strings to strings for storing additional information such as message data.
3604         Pass the error and any other relevant details to this entry point, which decides whether to
3605         show the uncaught exception reporter or quietly log the error to Inspector^2 console.
3606
3607         In future patches, I would like to do the following once the common errors are fixed:
3608          - enable reporting via Uncaught Exception Reporter for all engineering builds
3609          - move internal console.error call sites to use WebInspector.reportInternalError
3610
3611         * UserInterface/Base/Main.js: Add reportInternalError, which redirects to the uncaught
3612         exception reporter sheet or does console.error. It also adds a console.assert that could
3613         cause the debugger to pause if desired.
3614
3615         * UserInterface/Debug/UncaughtExceptionReporter.css:
3616         (.sheet-container): Make the report scrollable now that we could potentially show a lot of text.
3617
3618         * UserInterface/Debug/UncaughtExceptionReporter.js:
3619         (handleError): Also pass along the 'details' poperty.
3620         (formattedEntry): Refactor the code so it additionally prints out the keys and values of
3621         the 'details' property. It does not do any coercions, so callers must convert values to strings.
3622
3623         * UserInterface/Protocol/InspectorBackend.js:
3624         (InspectorBackendClass.prototype._dispatchResponse): Inlined a function.
3625         (InspectorBackendClass.prototype._dispatchResponseToCallback):
3626         (InspectorBackendClass.prototype._dispatchEvent):
3627         Report uncaught exceptions via WebInspector.reportInternalError.
3628
3629         (InspectorBackendClass.prototype._reportProtocolError): Deleted, inlined into the single use site.
3630
3631 2016-06-29  Joseph Pecoraro  <pecoraro@apple.com>
3632
3633         Web Inspector: Show Shadow Root type in DOM Tree
3634         https://bugs.webkit.org/show_bug.cgi?id=159236
3635         <rdar://problem/27068521>
3636
3637         Reviewed by Timothy Hatcher.
3638
3639         * Localizations/en.lproj/localizedStrings.js:
3640         "Shadow Content (type)" string.
3641
3642         * UserInterface/Models/DOMNode.js:
3643         (WebInspector.DOMNode):
3644         (WebInspector.DOMNode.prototype.shadowRoots):
3645         (WebInspector.DOMNode.prototype.shadowRootType):
3646         Initialize state and add accessors.
3647
3648         * UserInterface/Views/DOMTreeElement.js:
3649         (WebInspector.DOMTreeElement.shadowRootTypeDisplayName):
3650         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
3651         Better string when an element is a Shadow Root.
3652
3653         * UserInterface/Views/DOMTreeElementPathComponent.js:
3654         (WebInspector.DOMTreeElementPathComponent):
3655         Better to check the Shadow Root type.
3656
3657         * UserInterface/Views/DOMTreeOutline.css:
3658         (.tree-outline.dom .html-fragment.shadow):
3659         Opacity looks poor when there is a selection. Switch to gray.
3660
3661 2016-06-28  Nikita Vasilyev  <nvasilyev@apple.com>
3662
3663         REGRESSION (r188730): Web Inspector: Warning icons incorrectly positioned in CSS Rules sidebar
3664         https://bugs.webkit.org/show_bug.cgi?id=157869
3665         <rdar://problem/26356520>
3666
3667         Reviewed by Timothy Hatcher.
3668
3669         Before r188730, CSS text always had a line break as a prefix. r188730 started trimming text.
3670         This patch keeps trimming unnecessary whitespace but brings back required line break prefix.
3671
3672         * UserInterface/Models/CSSStyleDeclaration.js:
3673         (WebInspector.CSSStyleDeclaration.prototype.set text):
3674         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3675         Make PrefixWhitespace and SuffixWhitespace public.
3676
3677         (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):
3678         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
3679         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
3680         Remove an if conditional as it's always true.
3681
3682 2016-06-28  Brian Burg  <bburg@apple.com>
3683
3684         Web Inspector: QuickConsole should update its selection when RuntimeManager.defaultExecutionContextIdentifier changes
3685         https://bugs.webkit.org/show_bug.cgi?id=159183
3686
3687         Reviewed by Timothy Hatcher.
3688
3689         Currently, the UI listens for state changes in the Frame tree to decide when to reset
3690         the selected execution context back to its default value. This is no good, because this
3691         should happen even if we have no UI (i.e., testing models only). The UI should simply
3692         display changes to the model rather than driving them based on other model changes.
3693
3694         Move the logic to reset the execution context into RuntimeManager. When the selected
3695         context changes, an event is fired which causes the QuickConsole to rebuild its path components.
3696
3697         * UserInterface/Controllers/RuntimeManager.js:
3698         (WebInspector.RuntimeManager):
3699         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
3700         Fire an event when the execution context actually changes.
3701
3702         (WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
3703         Added. If the selected context was cleared, reset back to default.
3704
3705         * UserInterface/Models/Frame.js:
3706         (WebInspector.Frame.prototype.clearExecutionContexts):
3707         Include the contexts that were cleared so clients can match against them.
3708
3709         * UserInterface/Views/QuickConsole.js:
3710         (WebInspector.QuickConsole):
3711         Use the proper constant name. Both the old and new names evaluated to `undefined`.
3712         No need to keep track of the selected path component, it will always match the
3713         defaultExecutionContextIdentifier in RuntimeManager.
3714
3715         (WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier):
3716         (WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier):
3717         Forward to RuntimeManager. This name is less awkward for the UI code that manages selections.
3718
3719         (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
3720         Special-case for the main frame execution context.
3721
3722         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
3723         Remove indirection.
3724
3725         (WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
3726         Fix the guard to handle undefined execution contexts in the case where it represents the main frame (undefined).
3727
3728         (WebInspector.QuickConsole.prototype._defaultExecutionContextChanged):
3729         Rebuild when the model changes.
3730
3731         (WebInspector.QuickConsole.prototype._pathComponentSelected): Simplify.
3732         (WebInspector.QuickConsole.prototype.get executionContextIdentifier):
3733         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
3734         Move the fallback selection behavior into RuntimeManager.
3735
3736         (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): Deleted.
3737         This has been dead code ever since we removed iOS 6 legacy support.
3738
3739 2016-06-27  Joseph Pecoraro  <pecoraro@apple.com>
3740
3741         Web Inspector: When modifying sessionStorage, localStorage gets updated
3742         https://bugs.webkit.org/show_bug.cgi?id=159181
3743         <rdar://problem/27043447>
3744
3745         Reviewed by Timothy Hatcher.
3746
3747         * UserInterface/Test/Test.js:
3748         (WebInspector.loaded):
3749         Add registration for StorageManager and StorageObserver.
3750
3751 2016-06-27  Brian Burg  <bburg@apple.com>
3752
3753         Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole
3754         https://bugs.webkit.org/show_bug.cgi?id=128092
3755         <rdar://problem/15966526>
3756
3757         Reviewed by Timothy Hatcher.
3758
3759         This is a layering violation which makes it harder to use RuntimeManager.evaluateInInspectedWindow
3760         from a testing context where the QuickConsole view does not exist.
3761
3762         Store the selected execution context identifier on RuntimeManager and use it
3763         when doing subsequent evaluations that act on the currently selected frame.
3764
3765         * UserInterface/Controllers/RuntimeManager.js:
3766         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
3767         (WebInspector.RuntimeManager.prototype.saveResult):
3768         Use local state.
3769
3770         (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier):
3771         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
3772         Added.
3773
3774         (WebInspector.RuntimeManager):
3775         * UserInterface/Models/ExecutionContext.js:
3776         (WebInspector.ExecutionContext):
3777         Move the symbolic name for the top level execution context to RuntimeManager.
3778
3779         * UserInterface/Test/Test.js:
3780         (WebInspector.loaded): No need to stub out WebInspector.QuickConsole any more.
3781
3782         * UserInterface/Views/QuickConsole.js:
3783         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
3784         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
3785         (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
3786         (WebInspector.QuickConsole.prototype._pathComponentSelected):
3787         For now, set RuntimeManager's selected execution context whenever we set the
3788         selected path component. In a future patch, we should invert the dependency and have
3789         the selected component change whenever RuntimeManager.defaultExecutionContext changes.
3790
3791 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
3792
3793         Web Inspector: first heap snapshot taken when a page is reloaded happens before the reload navigation
3794         https://bugs.webkit.org/show_bug.cgi?id=158995
3795         <rdar://problem/26923778>
3796
3797         Reviewed by Brian Burg.
3798
3799         Let instruments decide to do work or not based on programmatic
3800         (backend initiated) starts and stop.
3801
3802         Programmatic start can happen due to Auto Capture or console.profile.
3803         Programmatic stop can happen due to console.profileEnd.
3804
3805         For example, this allows the frontend to avoid sending agents start/stop
3806         messages when the backend would have already started/stopped the agents.
3807
3808         * UserInterface/Controllers/TimelineManager.js:
3809         (WebInspector.TimelineManager):
3810         (WebInspector.TimelineManager.prototype.startCapturing):
3811         (WebInspector.TimelineManager.prototype.capturingStopped):
3812         (WebInspector.TimelineManager.prototype.autoCaptureStarted):
3813         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
3814         Call Recording.start/stop with a programmatic flag so the frontend
3815         instruments can perform a more informed start/stop.
3816
3817         * UserInterface/Models/TimelineRecording.js:
3818         (WebInspector.TimelineRecording.prototype.start):
3819         (WebInspector.TimelineRecording.prototype.stop):
3820         Let the instruments decide to do work based on the start/stop
3821         being initiated by the backend or not.
3822
3823         * UserInterface/Models/HeapAllocationsInstrument.js:
3824         (WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation):
3825         (WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation):
3826         * UserInterface/Models/Instrument.js:
3827         (WebInspector.Instrument.startLegacyTimelineAgent):
3828         (WebInspector.Instrument.prototype.startInstrumentation):
3829         (WebInspector.Instrument.prototype.stopInstrumentation):
3830         (WebInspector.Instrument):
3831         * UserInterface/Models/MemoryInstrument.js:
3832         (WebInspector.MemoryInstrument.prototype.startInstrumentation):
3833         (WebInspector.MemoryInstrument.prototype.stopInstrumentation):
3834         (WebInspector.MemoryInstrument):
3835         * UserInterface/Models/NetworkInstrument.js:
3836         * UserInterface/Models/ScriptInstrument.js:
3837         (WebInspector.ScriptInstrument.prototype.startInstrumentation):
3838         (WebInspector.ScriptInstrument.prototype.stopInstrumentation):
3839         (WebInspector.ScriptInstrument):
3840         Avoid sending start/stop tracking messages when programmatic.
3841         This still allows the instruments to do their own frontend tracking,
3842         such as the Heap agent triggering periodic snapshots.
3843
3844 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
3845
3846         Web Inspector: Snapshots should be cleared at some point
3847         https://bugs.webkit.org/show_bug.cgi?id=157907
3848         <rdar://problem/26373610>
3849
3850         Reviewed by Timothy Hatcher.
3851
3852         Invalidate HeapSnapshotProxy objects when the page navigates.
3853         This allows us to clear our frontend data for the snapshots.
3854         When a snapshot is invalidated, it is disabled in the UI.
3855         This means you cannot select the snapshot or see content
3856         views for the snapshot. If you are in a snapshot when it is
3857         invalidated, you are taken out to the snapshot list.
3858
3859         * UserInterface/Main.html:
3860         New files.
3861
3862         * UserInterface/Proxies/HeapSnapshotProxy.js:
3863         (WebInspector.HeapSnapshotProxy):
3864         (WebInspector.HeapSnapshotProxy.invalidateSnapshotProxies):
3865         (WebInspector.HeapSnapshotProxy.prototype.get invalid):
3866         (WebInspector.HeapSnapshotProxy.prototype._invalidate):
3867         Keep track of valid snapshots, and provide a static method to invalidate them.
3868
3869         (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
3870         (WebInspector.HeapSnapshotProxy.prototype.allocationBucketCounts):
3871         (WebInspector.HeapSnapshotProxy.prototype.instancesWithClassName):
3872         (WebInspector.HeapSnapshotProxy.prototype.update):
3873         (WebInspector.HeapSnapshotProxy.prototype.nodeWithIdentifier):
3874         UI should only act on valid snapshots.
3875
3876         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
3877         (WebInspector.HeapSnapshotDiffProxy.prototype.get invalid):
3878         (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
3879         (WebInspector.HeapSnapshotDiffProxy.prototype.allocationBucketCounts):
3880         (WebInspector.HeapSnapshotDiffProxy.prototype.instancesWithClassName):
3881         (WebInspector.HeapSnapshotDiffProxy.prototype.update):
3882         (WebInspector.HeapSnapshotDiffProxy.prototype.nodeWithIdentifier):
3883         UI should only act on valid snapshots.
3884
3885         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
3886         (WebInspector.HeapSnapshotWorkerProxy.prototype._mainResourceDidChange):
3887         Invalidate and discard snapshots when the main frame navigates.
3888
3889         (WebInspector.HeapSnapshotWorkerProxy.prototype._handleMessage):