2016-10-12 Joseph Pecoraro Web Inspector: Improve support for logging Proxy objects in console https://bugs.webkit.org/show_bug.cgi?id=163323 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._formatParameter): Treat a Proxy like any other object. 2016-09-27 Tomas Popela [GTK] Mac defaults are used for key shortcuts on Linux https://bugs.webkit.org/show_bug.cgi?id=162564 Don't set Mac's default keymap as a fallthrough for CodeMirror when we are not on Mac. Reviewed by Carlos Garcia Campos. * UserInterface/Test.html: Include Platform.js for the WebInspector.Platform definition. * UserInterface/Views/CodeMirrorAdditions.js: 2016-09-02 Johan K. Jensen Web Inspector: NetworkTimelineOverviewGraph.MinimumBarPaddingTime is undefined https://bugs.webkit.org/show_bug.cgi?id=161510 Reviewed by Brian Burg. * UserInterface/Views/NetworkTimelineOverviewGraph.js: (WebInspector.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded): (WebInspector.NetworkTimelineOverviewGraph): Calculate the minimumBarPaddingTime in similar ways to TimelineRecordBar, by using MinimumWidthPixel, MinimumMarginPixel and MinimumDurationPerPixel as the secondsPerPixel value. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview): Make Minimum/MaximumDurationPerPixel public properties. 2016-09-01 Matt Baker Web Inspector: Value checks of secondsPerPixel cause errors https://bugs.webkit.org/show_bug.cgi?id=161304 Reviewed by Brian Burg. * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView.prototype.reset): Clear resource node map, which is used to determine which nodes to refresh during layout. (WebInspector.NetworkTimelineView.prototype.layout): Like OverviewTimelineView, only refresh node graphs when times change. This prevents refreshing nodes when (endTime - startTime) === 0. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._recordingReset): TimelineViews must be cleared before calling _updateTimes to avoid doing layouts in timeline views containing stale data. 2016-09-01 Nikita Vasilyev REGRESSION (r201454): Web Inspector: Text caret isn't visible when editing an attribute https://bugs.webkit.org/show_bug.cgi?id=160986 Reviewed by Brian Burg. * UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom li .selection-area): (.tree-outline.dom li > span): Place selection area under the edited field, the way it was before r201454. 2016-08-29 Devin Rousso Web Inspector: Unify Resource entry context menus https://bugs.webkit.org/show_bug.cgi?id=161301 Reviewed by Brian Burg. * UserInterface/Main.html: Add ContextMenuUtilities. * UserInterface/Views/ContextMenuUtilities.js: Added. (WebInspector.appendContextMenuItemsForResource): Appends the following items to the given WebInspector.ContextMenu object with a WebInspector.Resource: - Open in New Tab - Copy Link Address - Copy as cURL (only if the resource is not from a data URL) - Save File * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems): Make use of new WebInspector.appendContextMenuItemsForResource. * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent): Make use of new WebInspector.appendContextMenuItemsForResource. 2016-08-27 Joseph Pecoraro Web Inspector: Make localizedString.js diff and commit friendly (UTF16 -> UTF8) https://bugs.webkit.org/show_bug.cgi?id=28685 Reviewed by Darin Adler. * Localizations/en.lproj/localizedStrings.js: * WebInspectorUI.xcodeproj/project.pbxproj: Convert the file to UTF-8. Future diffs should display as text. 2016-08-26 Joseph Pecoraro Web Inspector: Add protocol version for iOS 10 https://bugs.webkit.org/show_bug.cgi?id=161266 Rubber-stamped by Brian Burg. * Localizations/en.lproj/localizedStrings.js: Update missing localized strings. * Versions/Inspector-iOS-10.0.json: Added. Protocol for iOS 10. * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: Re-generate the legacy backend commands files. 2016-08-25 Joseph Pecoraro Web Inspector: Show IndexedDB Database/ObjectStore/Index data in a details sidebar https://bugs.webkit.org/show_bug.cgi?id=161180 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New strings and file. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): Instantiate the global details sidebar. * UserInterface/Views/StorageTabContentView.js: (WebInspector.StorageTabContentView): Include the new details sidebar in the Storage tab. * UserInterface/Controllers/StorageManager.js: (WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processKeyPath): Use the protocol generated types. * UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js: Added. (WebInspector.IndexedDatabaseDetailsSidebarPanel): (WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.inspect): (WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.layout): (WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype._keyPathString): Show the sidebar for an IndexedDatabase, ObjectStore, or Index. Show each section if we can based on the objects we have. 2016-08-25 Joseph Pecoraro Web Inspector: Provide a way to clear an IndexedDB object store https://bugs.webkit.org/show_bug.cgi?id=161167 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: "Clear object store". * UserInterface/Controllers/StorageManager.js: (WebInspector.StorageManager.prototype.clearObjectStore): Provide a wrapper for clearing an object store. * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js: (WebInspector.IndexedDatabaseObjectStoreContentView): (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get navigationItems): (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._clearButtonClicked): Add a navigation button on ObjectStore content views to clear the object store. 2016-08-26 Devin Rousso Web Inspector: Some CSS selectors in the UI aren't escaped https://bugs.webkit.org/show_bug.cgi?id=151378 Reviewed by Joseph Pecoraro. * UserInterface/Base/DOMUtilities.js: (WebInspector.displayNameForNode): Deleted. (WebInspector.linkifyNodeReference): Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode. * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode.prototype.get escapedIdSelector): (WebInspector.DOMNode.prototype.get escapedClassSelector): (WebInspector.DOMNode.prototype.get displayName): (WebInspector.DOMNode.prototype.appropriateSelectorFor): Rework escaping of ids and class names into separate public functions using CSS.escape. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype.refresh): Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode. * UserInterface/Views/DOMTreeDataGridNode.js: (WebInspector.DOMTreeDataGridNode.prototype._createNameCellDocumentFragment): Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode. * UserInterface/Views/DOMTreeElementPathComponent.js: (WebInspector.DOMTreeElementPathComponent): Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode. * UserInterface/Views/LayerTreeDataGridNode.js: (WebInspector.LayerTreeDataGridNode.prototype.set layer): Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode. * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection.prototype.update): Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode. 2016-08-24 Matt Baker Web Inspector: unexpected cursor changes while dragging ruler handle in rendering frames timeline https://bugs.webkit.org/show_bug.cgi?id=161101 Reviewed by Brian Burg. -webkit-grab(bing) cursor styles shouldn't be applied to the selection drag element when resizing. * UserInterface/Views/TimelineRuler.css: (.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag): (.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag:active): (.timeline-ruler:not(.disabled) > .selection-drag): Deleted. (.timeline-ruler:not(.disabled) > .selection-drag:active): Deleted. 2016-08-24 Devin Rousso Web Inspector: Shift-Tab should unindent selected line https://bugs.webkit.org/show_bug.cgi?id=159316 Reviewed by Joseph Pecoraro. * UserInterface/Views/CodeMirrorAdditions.js: (CodeMirror.keyMap["default"]): Changed "Shift-Tab" mapping to "indentLess". 2016-08-23 Devin Rousso Web Inspector: resource tree elements should provide "Download File" context menu items https://bugs.webkit.org/show_bug.cgi?id=158035 Reviewed by Joseph Pecoraro. Add a context menu item to elements representing resources that initiates a download of that resource. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WebInspector.saveDataToFile): Add support for saving base64 objects. * UserInterface/Base/MIMETypeUtilities.js: (WebInspector.fileExtensionForMIMEType): Returns a file extension for the given MIME type if able. * UserInterface/Views/FrameTreeElement.js: (WebInspector.FrameTreeElement.prototype.onattach): Add contextmenu event listener since superclass onattach call is explicitly not used. * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems): Add Save File context menu item. * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.prototype.onattach): (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent): Add contextmenu event listener and Save File context menu item. 2016-08-23 Devin Rousso Web Inspector: No open/copy src resource in context menu https://bugs.webkit.org/show_bug.cgi?id=159028 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._populateTagContextMenu): Add options in the context menu of link attributes of DOM nodes to - Open in New Tab - Reveal in Resources Tab - Copy Link Address 2016-08-23 Devin Rousso Web Inspector: Add visual editor for spring() timing-function https://bugs.webkit.org/show_bug.cgi?id=159315 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Base/Utilities.js: (Number.prototype.maxDecimals): Limits the number of decimals for the number object via rounding. * UserInterface/Controllers/CodeMirrorSpringEditingController.js: (WebInspector.CodeMirrorSpringEditingController.prototype.get initialValue): (WebInspector.CodeMirrorSpringEditingController.prototype.get cssClassName): (WebInspector.CodeMirrorSpringEditingController.prototype.popoverWillPresent): (WebInspector.CodeMirrorSpringEditingController.prototype.popoverDidPresent): (WebInspector.CodeMirrorSpringEditingController.prototype.popoverDidDismiss): (WebInspector.CodeMirrorSpringEditingController.prototype._springEditorSpringChanged): Controller for Spring editors inside CodeMirror instances. * UserInterface/Models/Geometry.js: (WebInspector.Spring): (WebInspector.Spring.fromValues): (WebInspector.Spring.fromString): (WebInspector.Spring.prototype.copy): (WebInspector.Spring.prototype.toString): (WebInspector.Spring.prototype.solve): (WebInspector.Spring.prototype.calculateDuration): Spring data class based on . * UserInterface/Models/TextMarker.js: (WebInspector.TextMarker.Type): Added Spring marker type. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches): (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged): (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged.update): * UserInterface/Views/CodeMirrorTextMarkers.js: (createCodeMirrorSpringTextMarkers): * UserInterface/Views/InlineSwatch.css: (.inline-swatch:matches(.bezier, .spring)): (.inline-swatch:matches(.bezier, .spring):hover): (.inline-swatch:matches(.bezier, .spring):active): (.inline-swatch:matches(.bezier, .spring) > span): (.inline-swatch.bezier): Deleted. (.inline-swatch.bezier:hover): Deleted. (.inline-swatch.bezier:active): Deleted. (.inline-swatch.bezier > span): Deleted. * UserInterface/Views/InlineSwatch.js: (WebInspector.InlineSwatch): (WebInspector.InlineSwatch.prototype._fallbackValue): (WebInspector.InlineSwatch.prototype._swatchElementClicked): (WebInspector.InlineSwatch.prototype._valueEditorValueDidChange): (WebInspector.InlineSwatch.Type): Added support for Spring editor Inline Swatches. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype._updateEditableMarkers): (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression): * UserInterface/Views/SpringEditor.css: (.spring-editor): (.spring-editor > .spring-preview): (.spring-editor > .spring-preview > div): (.spring-editor > .spring-timing): (.spring-editor > .spring-timing > div): (.spring-editor > .spring-timing:matches(::before, ::after)): (.spring-editor > .spring-timing::before): (.spring-editor > .spring-timing::after): (.spring-editor > :matches(.spring-preview, .spring-timing) > div): (.spring-editor > .animate:matches(.spring-preview, .spring-timing) > div): (.spring-editor > .number-input-container > .number-input-row): (.spring-editor > .number-input-container > .number-input-row > .number-input-row-title): (.spring-editor > .number-input-container > .number-input-row > input): (.spring-editor > .number-input-container > .number-input-row > input[type="range"]): * UserInterface/Views/SpringEditor.js: (WebInspector.SpringEditor): (WebInspector.SpringEditor.prototype.get element): (WebInspector.SpringEditor.prototype.set spring): (WebInspector.SpringEditor.prototype.get spring): (WebInspector.SpringEditor.prototype._handleNumberInputInput): (WebInspector.SpringEditor.prototype._handleNumberInputKeydown): (WebInspector.SpringEditor.prototype._handleNumberSliderInput): (WebInspector.SpringEditor.prototype._handleNumberSliderMousedown): (WebInspector.SpringEditor.prototype._handleNumberSliderMouseup): (WebInspector.SpringEditor.prototype._changeSpringForInput): (WebInspector.SpringEditor.prototype._resetPreviewAnimation): (WebInspector.SpringEditor.prototype._updatePreviewAnimation): (WebInspector.SpringEditor.Event): Visual editor for CSS Spring timing function values. Organized into 5 rows: - Preview: shows movement of spring and total duration - Mass: slider and input for "mass" parameter - Stiffness: slider and input for "stiffness" parameter - Damping: slider and input for "damping" parameter - Initial Velocity: slider and input for "initial velocity" parameter The preview animation will loop indefinitely until the user clicks the animation row or changes the value of one of the parameters, at which point the duration will also be recalculated. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype.createSpringMarkers): (WebInspector.TextEditor.prototype.editingControllerForMarker): * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value): (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties): Add support for CSS spring timing functions by allowing parenthesis in comma separated values so long as there are no commas inside the parenthesis. * UserInterface/Views/VisualStyleTimingEditor.css: (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch:matches(.bezier, .spring)): (.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.spring-value) > .inline-swatch.spring): (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch.bezier): Deleted. (.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.bezier-value) > .inline-swatch.bezier): Deleted. * UserInterface/Views/VisualStyleTimingEditor.js: (WebInspector.VisualStyleTimingEditor): (WebInspector.VisualStyleTimingEditor.prototype.get value): (WebInspector.VisualStyleTimingEditor.prototype.set value): (WebInspector.VisualStyleTimingEditor.prototype.get synthesizedValue): (WebInspector.VisualStyleTimingEditor.prototype.parseValue): (WebInspector.VisualStyleTimingEditor.prototype.get _bezierValue): (WebInspector.VisualStyleTimingEditor.prototype.set _bezierValue): (WebInspector.VisualStyleTimingEditor.prototype.get _springValue): (WebInspector.VisualStyleTimingEditor.prototype.set _springValue): (WebInspector.VisualStyleTimingEditor.prototype._handleKeywordChanged): (WebInspector.VisualStyleTimingEditor.prototype._springSwatchValueChanged): (WebInspector.VisualStyleTimingEditor.prototype.get bezierValue): Renamed. (WebInspector.VisualStyleTimingEditor.prototype.set bezierValue): Renamed. Duplicate Bezier custom timing function logic for Spring timing functions. 2016-08-22 Devin Rousso Web Inspector: Styles -> Computed -> Box Model shows NaN x NaN for invisible elements https://bugs.webkit.org/show_bug.cgi?id=161038 Reviewed by Joseph Pecoraro. * UserInterface/Base/Utilities.js: Add figureDash variable. * UserInterface/Views/BoxModelDetailsSectionRow.js: (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement): (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement): Moved isNaN check of value to common createElement. 2016-08-22 Devin Rousso Web Inspector: Visual styles sidebar should do something sane for SVG elements https://bugs.webkit.org/show_bug.cgi?id=148269 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode.prototype.get ownerSVGElement): (WebInspector.DOMNode.prototype.isSVGElement): Climbs ancestor tree to determine if node is an SVG node. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout): (WebInspector.VisualStyleDetailsPanel.prototype._updateSections): (WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateDimensionsSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateFillSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateStrokeSection): * UserInterface/Views/VisualStylePropertyEditor.css: (.visual-style-property-container.inactive): (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)): * UserInterface/Views/VisualStyleRelativeNumberSlider.css: (.visual-style-property-container.number-input-box.relative-number-slider > .relative-slider): * UserInterface/Views/VisualStyleUnitSlider.css: (.visual-style-property-container.unit-slider > .visual-style-property-value-container > .slider): (.visual-style-property-container.unit-slider.opacity > .visual-style-property-value-container > .slider): Deleted. 2016-08-22 Devin Rousso Web Inspector: Visual Styles: "Text -> Content" section should only be visible for pseudo-element https://bugs.webkit.org/show_bug.cgi?id=158272 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/VisualStyleDetailsPanel.css: (.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive): (.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive > *): (.visual-style-property-container.transition): Deleted. (.visual-style-property-container.animation): Deleted. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout): (WebInspector.VisualStyleDetailsPanel.prototype._updateSections): (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection): 2016-08-22 Devin Rousso Web Inspector: Entering ":n" in Open Resource Dialog, where n > number of lines, should jump to the last line https://bugs.webkit.org/show_bug.cgi?id=160840 Reviewed by Joseph Pecoraro. * UserInterface/Views/TextEditor.js: (TextEditor.prototype.revealPosition): Limit the given line and column to the maximum number of lines and the column count on the resulting line. 2016-08-22 Devin Rousso Web Inspector: Add indicator to matched selector being a pseudo-element https://bugs.webkit.org/show_bug.cgi?id=160893 Reviewed by Joseph Pecoraro. Instead of using "{}" icons for CSS rules, use a "P" icon with the same coloring to identify that the rule contains a pseudo-selector that is currently being applied to the selected element. * UserInterface/Base/Utilities.js: (Array.prototype.toggleIncludes): Toggles whether or not to include the given value in the array based on its existence or a "force" flag parameter. * UserInterface/Images/StyleRuleAuthorPseudo.svg: * UserInterface/Images/StyleRuleInspectorPseudo.svg: * UserInterface/Images/StyleRuleUserAgentPseudo.svg: * UserInterface/Images/StyleRuleUserPseudo.svg: * UserInterface/Models/CSSRule.js: (WebInspector.CSSRule.prototype.hasMatchedPseudoElementSelector): * UserInterface/Models/CSSSelector.js: (WebInspector.CSSSelector.prototype.isPseudoElementSelector): * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype.refresh): * UserInterface/Views/StyleRuleIcons.css: (.author-style-rule-icon.pseudo-element-selector .icon): (.user-style-rule-icon.pseudo-element-selector .icon): (.user-agent-style-rule-icon.pseudo-element-selector .icon): (.inspector-style-rule-icon.pseudo-element-selector .icon): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem): (WebInspector.VisualStyleSelectorTreeItem.prototype.get iconClassName): (WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon): 2016-08-19 Nikita Vasilyev Web Inspector: Make an icon for Code Coverage Profiler https://bugs.webkit.org/show_bug.cgi?id=160872 Reviewed by Joseph Pecoraro. Add a "C" icon, similar to the existing "T" (Type Profiler) icon. "C" can stand for Code Coverage or Control Flow. * UserInterface/Images/NavigationItemCodeCoverage.svg: Added. 2016-08-19 Devin Rousso Web Inspector: Console log counter on the dashboard should be better at displaying large numbers https://bugs.webkit.org/show_bug.cgi?id=160054 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Utilities.js: (Number.abbreviate): Add logic for formatting a number as "#K", "#M", and "#B" when it is very large. * UserInterface/Views/DefaultDashboardView.js: (WebInspector.DefaultDashboardView.prototype._updateDisplay): (WebInspector.DefaultDashboardView.prototype._formatPossibleLargeNumber): Deleted. (WebInspector.DefaultDashboardView.prototype._setConsoleItemValue): 2016-08-17 Matt Baker Web Inspector: Network Tab should not layout if not visible https://bugs.webkit.org/show_bug.cgi?id=160920 Reviewed by Timothy Hatcher. Avoid updating the current time when the Network tab is hidden. The timer, and any debounced timer cancellations, need to be stopped as soon as the view is hidden. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView.prototype.hidden): (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded): (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime): (WebInspector.NetworkGridContentView): 2016-08-17 Devin Rousso Web Inspector: Select elements in DOM hierarchy are misaligned https://bugs.webkit.org/show_bug.cgi?id=160885 Reviewed by Timothy Hatcher. * UserInterface/Views/HierarchicalPathComponent.css: (.hierarchical-path-component > select): 2016-08-17 Devin Rousso Web Inspector: rapid updates to status icons in Visual Styles sidebar causes flicker https://bugs.webkit.org/show_bug.cgi?id=160887 Reviewed by Timothy Hatcher. * UserInterface/Views/VisualStyleBasicInput.js: (WebInspector.VisualStyleBasicInput): * UserInterface/Views/VisualStyleColorPicker.js: (WebInspector.VisualStyleColorPicker): * UserInterface/Views/VisualStyleNumberInputBox.js: (WebInspector.VisualStyleNumberInputBox): (WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown): * UserInterface/Views/VisualStylePropertyNameInput.js: (WebInspector.VisualStylePropertyNameInput): 2016-08-16 Nikita Vasilyev Web Inspector: DOM nodes shift when hovering over them in Console https://bugs.webkit.org/show_bug.cgi?id=160789 Reviewed by Matt Baker. * UserInterface/Views/FormattedValue.css: (.formatted-node > .tree-outline.dom ol): Deleted. 2016-08-16 Nikita Vasilyev Web Inspector: Data grid has a double left border when the first column is hidden https://bugs.webkit.org/show_bug.cgi?id=160723 Reviewed by Timothy Hatcher. This patch exploits the fact hiding columns that aren't first in DataGrid don't create double borders. * UserInterface/Views/DataGrid.css: (.data-grid table.header,): (.data-grid :matches(th, td):first-child): (@media (-webkit-min-device-pixel-ratio: 2)): * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState): 2016-08-16 Joseph Pecoraro Web Inspector: Do not request Scope Chain lists if section is collapsed (mainly Global Variables) https://bugs.webkit.org/show_bug.cgi?id=140567 Reviewed by Timothy Hatcher. * UserInterface/Main.html: New file name. * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties): Avoid fetching object properties until the user expands the section. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection): Avoid fetching scope variable properties until the user expands the section. * UserInterface/Views/ObjectPropertiesDetailSectionRow.js: Renamed from Source/WebInspectorUI/UserInterface/Views/DetailsSectionPropertiesRow.js. (WebInspector.ObjectPropertiesDetailSectionRow): (WebInspector.ObjectPropertiesDetailSectionRow.prototype.get objectTree): (WebInspector.ObjectPropertiesDetailSectionRow.prototype._detailsSectionCollapsedStateChanged): Rename and simplify the class since it always has an ObjectTreeView. By default the section will auto-expand the ObjectTreeView, however if provided a details section group, it will defer expanion until the group expands. 2016-08-16 Devin Rousso Web Inspector: add "Copy Selected" context menu item to Console https://bugs.webkit.org/show_bug.cgi?id=151836 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated): (WebInspector.LogContentView.prototype._handleContextMenuEvent): (WebInspector.LogContentView.prototype._mousedown): 2016-08-16 Devin Rousso Web Inspector: Visual Styles: "Text -> Content" isn't escaped https://bugs.webkit.org/show_bug.cgi?id=158271 Reviewed by Timothy Hatcher. * UserInterface/Base/Utilities.js: (String.prototype.hasMatchingEscapedQuotes): Checks that the given string has property escaped quotes (single or double). * UserInterface/Views/VisualStyleBasicInput.js: (WebInspector.VisualStyleBasicInput): (WebInspector.VisualStyleBasicInput.prototype._handleInputElementInput): 2016-08-16 Joseph Pecoraro Modernize model objects simple getters https://bugs.webkit.org/show_bug.cgi?id=160863 Reviewed by Timothy Hatcher. Simplify the style of many Model objects with basic accessors. We reduce them to a single line and group them together so that they can be more easily read at a glance. * UserInterface/Models/AnalyzerMessage.js: * UserInterface/Models/ApplicationCacheFrame.js: * UserInterface/Models/ApplicationCacheManifest.js: * UserInterface/Models/BreakpointAction.js: * UserInterface/Models/CSSMedia.js: * UserInterface/Models/CSSSelector.js: * UserInterface/Models/CollectionEntry.js: * UserInterface/Models/CollectionEntryPreview.js: * UserInterface/Models/DOMStorageObject.js: * UserInterface/Models/DatabaseObject.js: * UserInterface/Models/DatabaseTableObject.js: * UserInterface/Models/ExecutionContext.js: * UserInterface/Models/GarbageCollection.js: * UserInterface/Models/IndexedDatabase.js: * UserInterface/Models/IndexedDatabaseObjectStore.js: * UserInterface/Models/IndexedDatabaseObjectStoreIndex.js: * UserInterface/Models/ObjectPreview.js: * UserInterface/Models/ProbeSet.js: * UserInterface/Models/PropertyDescriptor.js: * UserInterface/Models/PropertyPath.js: * UserInterface/Models/PropertyPreview.js: * UserInterface/Models/SourceCodePosition.js: * UserInterface/Models/SourceCodeSearchMatchObject.js: * UserInterface/Models/SourceCodeTimeline.js: * UserInterface/Models/StructureDescription.js: * UserInterface/Models/TextRange.js: * UserInterface/Models/Timeline.js: * UserInterface/Models/TimelineRecording.js: * UserInterface/Models/TypeDescription.js: 2016-08-15 Devin Rousso Web Inspector: Large class lists are not easily discoverable with "Classes" quick-toggle https://bugs.webkit.org/show_bug.cgi?id=160856 Reviewed by Joseph Pecoraro. * UserInterface/Base/DOMUtilities.js: (WebInspector.linkifyNodeReference): Add option to truncate the text of the linkified node. * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content ~ .class-list-container): Increase the max-height to partially show additional classes if many are set. * UserInterface/Views/RulesStyleDetailsPanel.js: (WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel): Trucate the name of inherited nodes so they don't take up as much space in the sidebar. * UserInterface/Views/VisualStyleSelectorSection.css: (.details-section.visual-style-selector-section > .header > .current-selector): Deleted. (.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider > .titles): Deleted. Removed since they are already inherited. 2016-08-15 Devin Rousso Web Inspector: Close button on selected item in Network tab is misaligned https://bugs.webkit.org/show_bug.cgi?id=160884 Reviewed by Matt Baker. * UserInterface/Views/NetworkSidebarPanel.css: (.sidebar > .panel.navigation.network .status .close.status-button): 2016-08-15 Devin Rousso Web Inspector: Error/Warning icons are misplaced in the Visual sidebar https://bugs.webkit.org/show_bug.cgi?id=160875 Reviewed by Matt Baker. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css: (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder): Deleted. Reworked to apply more generally to editors without titles. * UserInterface/Views/VisualStylePropertyEditor.css: (.visual-style-property-container.missing-dependency > .visual-style-property-editor-warning): (.visual-style-property-container.invalid-value > .visual-style-property-editor-warning): (.visual-style-property-container:matches(.missing-dependency, .invalid-value) > *:first-child:matches(.visual-style-property-value-container)): (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container) > .visual-style-special-property-placeholder): (.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency): Deleted. (.visual-style-property-container > .visual-style-property-editor-warning.invalid-value): Deleted. Reworked class names to be on the element container instead of the icon. * UserInterface/Views/VisualStylePropertyEditor.js: (WebInspector.VisualStylePropertyEditor.prototype.update): (WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues): (WebInspector.VisualStylePropertyEditor.prototype._valueDidChange): (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies): 2016-08-15 Saam Barati Web Inspector: Introduce a method to enable code coverage profiler without enabling type profiler https://bugs.webkit.org/show_bug.cgi?id=160750 Reviewed by Joseph Pecoraro. * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState): 2016-08-12 Timothy Hatcher Web Inspector: Add application/vnd.api+json as a valid JSON MIME-type https://bugs.webkit.org/show_bug.cgi?id=160834 rdar://problem/27608536 Reviewed by Joseph Pecoraro. * UserInterface/Views/CodeMirrorAdditions.js: Add Add application/vnd.api+json to extraJSONTypes. 2016-08-12 Nikita Vasilyev Web Inspector: Command-Shift-O causes infinite loop if web page has frames https://bugs.webkit.org/show_bug.cgi?id=160810 Reviewed by Joseph Pecoraro. * UserInterface/Views/OpenResourceDialog.js: (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame): "frame" doesn't change inside the loop. 2016-08-12 Joseph Pecoraro Web Inspector: Support for :lineNumber syntax in Open Resource Dialog https://bugs.webkit.org/show_bug.cgi?id=159732 Reviewed by Matt Baker. Allow the Open Resource Dialog to support line/column syntax. Other tools allow "::" syntax, where the location data at the end is optional. If the portion is missing, the location can be used for the active content view, assuming it has text data and has lines. * UserInterface/Base/Main.js: (WebInspector.focusedOrVisibleContentView): Expose a function to access the current focused / visible content view. (WebInspector.dialogWasDismissed): Include passing on cookie data when showing a represented object. * UserInterface/Views/Dialog.js: (WebInspector.Dialog): (WebInspector.Dialog.prototype.get visible): (WebInspector.Dialog.prototype.get delegate): (WebInspector.Dialog.prototype.get representedObject): (WebInspector.Dialog.prototype.get cookie): (WebInspector.Dialog.prototype.dismiss): * UserInterface/Models/ResourceQueryResult.js: (WebInspector.ResourceQueryResult): (WebInspector.ResourceQueryResult.prototype.get cookie): Include cookie data along with the represented object in matches and dialog results. * UserInterface/Controllers/ResourceQueryController.js: (WebInspector.ResourceQueryController.prototype.executeQuery): Cut off location data from a query, and stash it on the query result. A query can be "::", and the line/column data becomes cookie data for the resource. * UserInterface/Views/OpenResourceDialog.js: (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline): If the query is just "::" have it jump to a location in the current content view if applicable. (WebInspector.OpenResourceDialog.prototype._handleKeydownEvent): (WebInspector.OpenResourceDialog.prototype._treeSelectionDidChange): When dismissing, include cookie data. 2016-08-11 Nikita Vasilyev REGRESSION (r204264): Web Inspector: Uncaught Exception in Network tab when reloading a web page https://bugs.webkit.org/show_bug.cgi?id=160781 Reviewed by Matt Baker. WebInspector.TimelineDataGrid.prototype.closed was removed in r204264. Define a stub method on DataGrid so it's available to all its subclasses. * UserInterface/Views/DataGrid.js: this._dataGrid.closed() 2016-08-10 Joseph Pecoraro Web Inspector: Should be able to Edit Node Attributes and Styles for non-UserAgent Shadow DOM nodes https://bugs.webkit.org/show_bug.cgi?id=160762 Reviewed by Ryosuke Niwa. * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode.prototype.isInUserAgentShadowTree): (WebInspector.DOMNode.prototype.isShadowRoot): (WebInspector.DOMNode.prototype.isUserAgentShadowRoot): (WebInspector.DOMNode.prototype.ancestorShadowRoot): (WebInspector.DOMNode.prototype.ancestorShadowHost): Add methods for determining the shadow root, host, and easily checking the type of shadow tree a node is in. * UserInterface/Models/CSSStyleDeclaration.js: (WebInspector.CSSStyleDeclaration.prototype.get editable): * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype.get editable): (WebInspector.DOMTreeElement.prototype._startEditingTarget): (WebInspector.DOMTreeElement.prototype._populateTagContextMenu): * UserInterface/Views/RulesStyleDetailsPanel.js: (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked): * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection.prototype._addNewRule): Allow editing shadow DOM nodes as long as they are not in a UserAgent shadow tree. * UserInterface/Views/DOMTreeOutline.js: (WebInspector.DOMTreeOutline.prototype._populateContextMenu): Disallow "Log Element" on UserAgent shadow tree nodes. 2016-08-10 Nikita Vasilyev Web Inspector: Can't click on the lower half of "S" icon in JavaScript Allocations timeline https://bugs.webkit.org/show_bug.cgi?id=160743 Reviewed by Timothy Hatcher. "S" icons are covered by .scroll-container, which has `z-index: calc(var(--z-index-resizer) + 1)`. Set larger z-index on the "S" icons. * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css: (.timeline-overview-graph.heap-allocations > img.snapshot): 2016-08-08 Joseph Pecoraro Web Inspector: Popover for Color Picker should update position when window resizes https://bugs.webkit.org/show_bug.cgi?id=160321 Reviewed by Brian Burg. * UserInterface/Views/Popover.js: (WebInspector.Popover): (WebInspector.Popover.prototype.set windowResizeHandler): (WebInspector.Popover.prototype.dismiss): (WebInspector.Popover.prototype.handleEvent): (WebInspector.Popover.prototype._addListenersIfNeeded): The popover already has a set of window listeners, add "resize" to the list. If there is a resize, invoke a resize handler. The resize handler will only be called while the popover is visible. * UserInterface/Views/HeapSnapshotDataGridTree.js: (WebInspector.HeapSnapshotDataGridTree): (WebInspector.HeapSnapshotDataGridTree.prototype.get visible): (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverNode): (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverNode): (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverTargetElement): (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverTargetElement): (WebInspector.HeapSnapshotDataGridTree.prototype.get popover): (WebInspector.HeapSnapshotDataGridTree.prototype.willDismissPopover): * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js: Update heap snapshot popovers to reposition on window resize. Set a target to reposition around, since the popover is shared. * UserInterface/Views/ProbeSetDetailsSection.js: (WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked): Update probe expression popover to respect window resizes. * UserInterface/Views/VisualStylePropertyEditor.js: (WebInspector.VisualStylePropertyEditor.prototype._showPropertyInfoPopover): Though not yet visible, update this to respect window resizes. * UserInterface/Views/InlineSwatch.js: (WebInspector.InlineSwatch.prototype._swatchElementClicked): Add a window resize handler to reposition over the swatch element. * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WebInspector.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode): (WebInspector.LayerTreeDetailsSidebarPanel): Deleted. (WebInspector.LayerTreeDetailsSidebarPanel.prototype._windowResized): Deleted. * UserInterface/Views/TimelineDataGrid.js: (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon): (WebInspector.TimelineDataGrid): Deleted. (WebInspector.TimelineDataGrid.prototype.closed): Deleted. (WebInspector.TimelineDataGrid.prototype.handleEvent): Deleted. (WebInspector.TimelineDataGrid.prototype._windowResized): Deleted. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked): (WebInspector.ScopeChainDetailsSidebarPanel.prototype.willDismissPopover): Deleted. Replace custom popover repositioning with standard Popover handling. 2016-08-07 Matt Baker REGRESSION (r201245): switching between Computed and Visual Styles panels causes internal error https://bugs.webkit.org/show_bug.cgi?id=160604 Reviewed by Timothy Hatcher. * UserInterface/Views/StyleDetailsPanel.js: (WebInspector.StyleDetailsPanel.prototype.shown): Only perform a layout if needed. Subclasses access node style data during layout, which may not exist yet. 2016-08-06 Matt Baker REGRESSION (r203253): Node details sidebar flickers while resizing https://bugs.webkit.org/show_bug.cgi?id=160631 Reviewed by Timothy Hatcher. Sidebar panel layouts can be expensive, and should be performed only when necessary (i.e., when the panel is shown for the first time, or model data changed while the panel was hidden). * UserInterface/Views/Sidebar.js: (WebInspector.Sidebar.prototype._recalculateWidth): * UserInterface/Views/SidebarPanel.js: (WebInspector.SidebarPanel.prototype.shown): * UserInterface/Views/View.js: (WebInspector.View.prototype.updateLayoutIfNeeded): Update the layout if an initial layout was never performed. 2016-08-04 Matt Baker Web Inspector: UI polish for Edit Breakpoint dialog https://bugs.webkit.org/show_bug.cgi?id=160566 Reviewed by Timothy Hatcher. * UserInterface/Images/BreakpointActionAdd.svg: Removed. * UserInterface/Images/BreakpointActionRemove.svg: Removed. Use Plus13.svg and Minus.svg instead. * UserInterface/Views/BreakpointActionView.css: (.breakpoint-action-button-container): (.breakpoint-action-append-button,): (.breakpoint-action-append-button): (.breakpoint-action-remove-button): Button styles should match Xcode. (.breakpoint-action-append-button:active,): Deleted. Brightness on activation no longer needed. * UserInterface/Views/BreakpointActionView.js: (WebInspector.BreakpointActionView): Add a button container so buttons can float together. * UserInterface/Views/BreakpointPopoverController.css: (.wide .edit-breakpoint-popover-condition > .CodeMirror): Increase condition field width by the same amount as the popover. 2016-08-04 Matt Baker Web Inspector: Popover's arrow is misplaced https://bugs.webkit.org/show_bug.cgi?id=151236 Reviewed by Brian Burg. * UserInterface/Views/Popover.js: (WebInspector.Popover.prototype._setAnchorPoint): Drive-by style fix. (WebInspector.Popover.prototype._drawFrame): Position the arrow so that the arrow head doesn't overlap the rounded corners of its edge. 2016-08-04 Matt Baker Web Inspector: Add placeholder graphs to TimelineOverview while editing https://bugs.webkit.org/show_bug.cgi?id=160485 Reviewed by Brian Burg. Insert placeholder elements in TimelineOverview's graph container when editing instruments. This allows alternating overview graph styles to be shown for disabled instruments, and ensures that every tree element has a corresponding element in the overview during dragging/reordering of instruments (see https://webkit.org/b/157957). * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview.prototype._startEditingInstruments): (WebInspector.TimelineOverview.prototype._stopEditingInstruments): 2016-08-04 Matt Baker Web Inspector: UI polish for Open Quickly and Goto Line dialogs https://bugs.webkit.org/show_bug.cgi?id=159849 Reviewed by Brian Burg. * UserInterface/Images/Search.svg: Added. Magnifying glass icon. * UserInterface/Views/GoToLineDialog.css: (.go-to-line-dialog): (.go-to-line-dialog > div): (.go-to-line-dialog > div::before): * UserInterface/Views/OpenResourceDialog.css: (.open-resource-dialog > .field): (.open-resource-dialog > .field::before): (.open-resource-dialog.has-results > .tree-outline): (.open-resource-dialog > .tree-outline .item): Add search icon to left of the input field in both dialogs, and adjust styles to better match Xcode 8. * UserInterface/Views/OpenResourceDialog.js: (WebInspector.OpenResourceDialog): Remove "input" event listener, as styles are now toggled in _updateFilter. (WebInspector.OpenResourceDialog.prototype._updateFilter): Toggle "has-results" and "non-empty" class names. (WebInspector.OpenResourceDialog.prototype._handleInputEvent): Deleted. (WebInspector.OpenResourceDialog.prototype._clear): Deleted. Moved class toggle to _updateFilter. 2016-08-03 Chris Dumez Drop DocumentType.internalSubset attribute https://bugs.webkit.org/show_bug.cgi?id=160530 Reviewed by Alex Christensen. Drop DocumentType.internalSubset attribute. * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode): Deleted. * UserInterface/Models/DOMSearchMatchObject.js: (WebInspector.DOMSearchMatchObject.titleForDOMNode): Deleted. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Deleted. 2016-08-03 Matt Baker Web Inspector: Cmd-L shortcut for Jump to Line conflicts with selecting URL of inspected page https://bugs.webkit.org/show_bug.cgi?id=158028 Reviewed by Timothy Hatcher. Remove Command-L shortcut for opening the Line Number dialog, since we already support Control-G. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor): Deleted. 2016-08-01 Nikita Vasilyev Web Inspector: Don't set `width:calc(100% - 0px); left:0px` on console messages https://bugs.webkit.org/show_bug.cgi?id=160428 Reviewed by Timothy Hatcher. Console messages inside console.group() are indented. Console messages outside of console.group() aren't and there is no reason to set inline styles that do nothing on each one of them. * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView.prototype.didAppendConsoleMessageView): 2016-08-01 Matt Baker Web Inspector: Grid column resizer elements positioned incorrectly https://bugs.webkit.org/show_bug.cgi?id=160311 Reviewed by Brian Burg. Perform a resize layout on a newly shown tab content view if the tab browser was resized before showing the tab. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser): (WebInspector.TabBrowser.prototype.layout): Mark all recent tab content views (except for the current view) as needing a resize layout. (WebInspector.TabBrowser.prototype._tabBarItemSelected): If the tab browser was resized while the view was hidden, update the view's layout for the new content view container size. 2016-08-01 Matt Baker Web Inspector: Waterfall graph in Network tab shows too much whitespace/dead time https://bugs.webkit.org/show_bug.cgi?id=160373 Reviewed by Timothy Hatcher. Track the start and end time separate from the ruler to remove leading/trailing whitespace in the graph. Also prevent network record bars from being clipped. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): (WebInspector.NetworkGridContentView.prototype.get zeroTime): Set equal to the ruler start time. (WebInspector.NetworkGridContentView.prototype.reset): Reset start and end time. (WebInspector.NetworkGridContentView.prototype.layout): Set the initial values for ruler start/zero time if needed. (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded): Set the start time if needed. Reduce debounce from 250ms to 150ms. This prevents the current time from exceeding the end time by as wide a margin, while keeping the current time "timer" from being restarted too frequently. (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime): Update the ruler end time and schedule a layout. Add padding equal to the time needed to draw a network bar at minimum width to prevent bars from being clipped. 2016-07-29 Matt Baker Web Inspector: Inactive/active network bar segments overlap when latency is zero https://bugs.webkit.org/show_bug.cgi?id=160147 Reviewed by Joseph Pecoraro. TimelineRecordBar should hide the inactive segment when its duration is less than the minimum displayable size. The active segment can assume the whole width of the bar. * UserInterface/Views/TimelineOverviewGraph.js: (WebInspector.TimelineOverviewGraph.prototype.get secondsPerPixel): Make secondsPerPixel available during TimelineRecordBars.refresh. * UserInterface/Views/TimelineRecordBar.js: (WebInspector.TimelineRecordBar.prototype.refresh): Check inactive duration against the minimum display size, and add/remove DOM nodes and bar styles as needed. 2016-07-29 Nikita Vasilyev REGRESSION (r195456): Web Inspector: Changing tabs in Styles sidebar shouldn't change sidebar's width https://bugs.webkit.org/show_bug.cgi?id=159646 Reviewed by Brian Burg. Remember sidebar width on per tab basis. For example, Node, Styles, and Layers sidebar panels in Elements tab should all have the same width, but Resource sidebar panel in Debugger tab should NOT share its width Element tab's sidebar. TabContentView stores the width but TabBrowser manages saving and restoring it. The same way collapsed sidebar state is handled. * UserInterface/Views/Sidebar.js: (WebInspector.Sidebar.prototype.set collapsed): Don't change sidebar's width when sidebar panels change. (WebInspector.Sidebar.prototype._recalculateWidth): (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Deleted. Pass newWidth as an argument so it can be saved in TabBrowser. * UserInterface/Views/SidebarPanel.js: (WebInspector.SidebarPanel): Deleted. (WebInspector.SidebarPanel.prototype.get savedWidth): Deleted. (WebInspector.SidebarPanel.prototype.sizeDidChange): Deleted. Remove the per sidebar panel width setting that was added in r195456. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser): (WebInspector.TabBrowser.prototype._detailsSidebarWidthDidChange): (WebInspector.TabBrowser.prototype._showDetailsSidebarPanelsForTabContentView): * UserInterface/Views/TabContentView.js: (WebInspector.TabContentView): (WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting): Store details sidebar width on TabContentView. 2016-07-29 Matt Baker Web Inspector: Assertion in NetworkGridContentView when updating data grid for the first time https://bugs.webkit.org/show_bug.cgi?id=160330 Reviewed by Brian Burg. When the first grid node is added, a view layout and current time update are scheduled. A view layout occurring before the current time is updated should be skipped, since the ruler end time hasn't been set. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView.prototype.layout): Skip layout until current time is updated. (WebInspector.NetworkGridContentView.prototype._update): Remove unused variables `startTime` and `endTime`. Don't force a layout if the elapsed time is zero. 2016-07-28 Chris Dumez Parameters to Event.initEvent() should be mandatory https://bugs.webkit.org/show_bug.cgi?id=160320 Reviewed by Darin Adler. Update WebInspector accordingly. * UserInterface/Models/NativeFunctionParameters.js: 2016-07-28 Chris Dumez First parameter to canvas.getContext() / probablySupportsContext() should be mandatory https://bugs.webkit.org/show_bug.cgi?id=160312 Reviewed by Darin Adler. Update WebInspector accordingly. * UserInterface/Models/NativeFunctionParameters.js: 2016-07-28 Matt Baker Web Inspector: Hiding a column which contains a TimelineRuler as the headerview, doesn't hide the headerView https://bugs.webkit.org/show_bug.cgi?id=160093 Reviewed by Joseph Pecoraro. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid.prototype._positionHeaderViews): Remove early return so that a header view in a hidden column will have its width resized to zero, matching the column. 2016-07-28 Johan K. Jensen Web Inspector: Waterfall view should be visible in Network tab and Network Timeline https://bugs.webkit.org/show_bug.cgi?id=160061 Reviewed by Joseph Pecoraro. Adds a Timeline-column (waterfall) to the Network tab and Network Timeline. * Localizations/en.lproj/localizedStrings.js: Add "Timeline" localized string. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): Add the Timeline-column with a TimelineRuler as the headerview, and properties for updating current time. (WebInspector.NetworkGridContentView.prototype.get secondsPerPixel): (WebInspector.NetworkGridContentView.prototype.get startTime): (WebInspector.NetworkGridContentView.prototype.get currentTime): (WebInspector.NetworkGridContentView.prototype.get endTime): Acting as a graphDataSource used by TimelineDataGridNode. (WebInspector.NetworkGridContentView.prototype.shown): (WebInspector.NetworkGridContentView.prototype.reset): (WebInspector.NetworkGridContentView.prototype.layout): Refresh graphs and update the TimelineRuler on layout changes. (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded): Add listeners for when resources are finished to stop the timer. (WebInspector.NetworkGridContentView.prototype._update): (WebInspector.NetworkGridContentView.prototype._startUpdatingCurrentTime): (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime): Adding a timer which updates the TimelineRuler and the layout if any non-finished requests are running. * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView): Add the Timeline-column with a TimelineRuler as the headerview. (WebInspector.NetworkTimelineView.prototype.get secondsPerPixel): (WebInspector.NetworkTimelineView.prototype.layout): Refresh graphs on layout changes. * UserInterface/Views/TimelineDataGrid.css: (.tree-outline.timeline-data-grid .item:hover .subtitle): (.data-grid.timeline th): (.data-grid.timeline th.graph-column > .timeline-ruler): (.data-grid.timeline td.graph-column): (.data-grid.timeline td.graph-column > .cell-content): (.data-grid.timeline td.graph-column .timeline-record-bar): 2016-07-28 Chris Dumez Parameter to table.deleteRow() / body.deleteRow() should be mandatory https://bugs.webkit.org/show_bug.cgi?id=160307 Reviewed by Ryosuke Niwa. Update WebInspector accordingly. * UserInterface/Models/NativeFunctionParameters.js: 2016-07-28 Chris Dumez 2 first parameters to input.setSelectionRange() should be mandatory https://bugs.webkit.org/show_bug.cgi?id=160310 Reviewed by Alex Christensen. Update WebInspector accordingly. * UserInterface/Models/NativeFunctionParameters.js: 2016-07-28 Chris Dumez Parameter to tr.deleteCell() should be mandatory https://bugs.webkit.org/show_bug.cgi?id=160308 Reviewed by Ryosuke Niwa. Report tr.deleteCell() parameter as mandatory. * UserInterface/Models/NativeFunctionParameters.js: 2016-07-27 Nikita Vasilyev Web Inspector: Visual Styles Sidebar should have only one column when it's narrow https://bugs.webkit.org/show_bug.cgi?id=159905 Reviewed by Joseph Pecoraro. Many CSS values often get clipped in the two colunm layout. Change the layout to one colunm when visual style rows get too narrow. * UserInterface/Views/VisualStyleDetailsPanel.css: (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row): (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .metric-section-row): Wrap all rows except for position/padding/margin controls. (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row > .visual-style-property-container:not(.layout-reversed):last-child): Deleted. Margin between the first and the second column doesn't make sense one column layout. Set the margin in .visual-style-property-container instead. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows): * UserInterface/Views/VisualStylePropertyEditor.css: (.visual-style-property-container): 2016-07-27 Joseph Pecoraro [Mac] Web Inspector: CodeMirror-based editor bindings for Home and End don't match system behavior https://bugs.webkit.org/show_bug.cgi?id=160267 Reviewed by Brian Burg. * UserInterface/Views/CodeMirrorEditor.js: (WebInspector.CodeMirrorEditor.create): (WebInspector.CodeMirrorEditor): Add some key map overrides for Home and End to better match system Mac behavior. This scrolls to the start or end of a document and does not change the cursor position. 2016-07-27 Brian Burg Regression(r203535): Uncaught Exception: TypeError: Not enough arguments at LayerTreeDataGridNode.js:47 https://bugs.webkit.org/show_bug.cgi?id=160187 Reviewed by Eric Carlson. After r203535, document.createTextNode() requires an argument. * UserInterface/Views/LayerTreeDataGridNode.js: (WebInspector.LayerTreeDataGridNode.prototype.createCellContent): Since this use-site is for creating a cell in an unknown column, initialize it to '–'. Previously it would have been the string "undefined" or empty. 2016-07-24 Matt Baker Web Inspector: Filtering is broken in the Overview timeline view https://bugs.webkit.org/show_bug.cgi?id=160152 Reviewed by Joseph Pecoraro. * UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js: (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.filterableDataForColumn): Non-resource nodes should be filtered based on their display name. 2016-07-23 Nikita Vasilyev REGRESSION (r202876): Web Inspector: Switching away from Console tab with a lot of messages is slow https://bugs.webkit.org/show_bug.cgi?id=160112 Reviewed by Joseph Pecoraro. Showing NavigationSidebar before removing previous TabContentView can be very slow when TabContentView is ConsoleTabContentView with a lot of messages. The order of operations (show sidebar, change content view, show sidebar) caused more forced layouts. This patch reduces the number of forced layouts by changes the order to: show content view, show sidebar, show sidebar. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser.prototype._tabBarItemSelected): 2016-07-20 Joseph Pecoraro Web Inspector: Pausing when Debugger tab is closed opens tab in wrong state https://bugs.webkit.org/show_bug.cgi?id=159946 Reviewed by Timothy Hatcher. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): At the end of construction, update the UI to match the current state of the world. Such as updating the UI if we are paused, or if the Timeline is capturing and we are temporarily disabling breakpoints. 2016-07-15 Timothy Hatcher Web Inspector: Make Open Quickly and Goto Line dialogs match Xcode 8 https://bugs.webkit.org/show_bug.cgi?id=159823 rdar://problem/27376501 Reviewed by Brian Burg. * UserInterface/Views/GoToLineDialog.css: (.go-to-line-dialog): (.go-to-line-dialog > div > input): (.go-to-line-dialog > div > input::placeholder): (.go-to-line-dialog > div > img): (.go-to-line-dialog > div): Deleted. * UserInterface/Views/OpenResourceDialog.css: (.open-resource-dialog): (.open-resource-dialog > .field): (.open-resource-dialog > .field > input): (.open-resource-dialog > .field > input::placeholder): (.open-resource-dialog > .field > img): (.open-resource-dialog > .tree-outline .item): Deleted. (.open-resource-dialog > .tree-outline .item:first-child): Deleted. 2016-07-14 Joseph Pecoraro Web Inspector: Rename CCTNode to CallingContextTreeNode https://bugs.webkit.org/show_bug.cgi?id=159782 Reviewed by Timothy Hatcher. * UserInterface/Models/CallingContextTree.js: * UserInterface/Models/CallingContextTreeNode.js: Extra to its own file and rename. * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/TestStub.html: Include the new file. * UserInterface/Views/ProfileDataGridNode.js: (WebInspector.ProfileDataGridNode): * UserInterface/Views/ProfileDataGridTree.js: (WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails): Rename shorthand "cctnode". 2016-07-14 Matt Baker Web Inspector: SidebarPanel classes should use View.layout instead of "refresh" https://bugs.webkit.org/show_bug.cgi?id=159745 Reviewed by Timothy Hatcher. * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js: (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.set applicationCacheFrame): Use needsLayout. * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WebInspector.CSSStyleDetailsSidebarPanel.prototype.layout): Move refresh logic to layout. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._styleSheetAddedOrRemoved): Defer layout to coalesce updates. (WebInspector.CSSStyleDetailsSidebarPanel): (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Deleted. * UserInterface/Views/DOMDetailsSidebarPanel.js: (WebInspector.DOMDetailsSidebarPanel.prototype.set domNode): Use needsLayout. * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: Move refresh logic to layout. * UserInterface/Views/DetailsSidebarPanel.js: (WebInspector.DetailsSidebarPanel.prototype.shown): Deleted. Base class already forces a layout when shown. (WebInspector.DetailsSidebarPanel.prototype.needsRefresh): Deleted. No longer needed. (WebInspector.DetailsSidebarPanel.prototype.refresh): Deleted. Renamed layout. (WebInspector.DetailsSidebarPanel): Deleted. * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WebInspector.LayerTreeDetailsSidebarPanel.prototype.supportsDOMNode): (WebInspector.LayerTreeDetailsSidebarPanel.prototype._layerTreeDidChange): Use needsLayout. (WebInspector.LayerTreeDetailsSidebarPanel.prototype.shown): Base class already forces a layout when shown. * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Use needsLayout. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel): (WebInspector.ScopeChainDetailsSidebarPanel.prototype.set callFrame): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpression): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._removeWatchExpression): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._clearAllWatchExpressions): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._refreshAllWatchExpressionsButtonClicked): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._didEvaluateExpression): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._mainResourceDidChange): Use needsLayout. 2016-07-14 Joseph Pecoraro Web Inspector: Maintain selected function when switching between different profile representations https://bugs.webkit.org/show_bug.cgi?id=159778 Reviewed by Timothy Hatcher. * UserInterface/Models/CallingContextTree.js: (WebInspector.CCTNode): (WebInspector.CCTNode.prototype.get hash): (WebInspector.CCTNode.prototype.findOrMakeChild): (WebInspector.CCTNode.prototype.equals): Expose the hash so two nodes can be compared cheaply. * UserInterface/Views/ProfileView.js: (WebInspector.ProfileView.prototype._repopulateDataGridFromTree): (WebInspector.ProfileView.prototype._restoreSharedState): (WebInspector.ProfileView.prototype._dataGridNodeSelected): Share data between multiple ProfileViews. Currently just remembering and restoring the selected function. * UserInterface/Views/ScriptProfileTimelineView.js: (WebInspector.ScriptProfileTimelineView): (WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation): Include the shared data when constructing new ProfileViews. 2016-07-13 Matt Baker Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.showsFilterBar') https://bugs.webkit.org/show_bug.cgi?id=159696 Reviewed by Joseph Pecoraro. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange): Early return if content view not visible, since the event is sent during tab teardown and the current TimelineView may be invalid. 2016-07-12 Joseph Pecoraro REGRESSION(r192789): Web Inspector: Log Value context menu appears twice https://bugs.webkit.org/show_bug.cgi?id=159681 Reviewed by Brian Burg. In r192789 contextmenu events may bubble up so that multiple handlers may append ContextMenuItems. In nested ObjectTrees / ObjectPreviews this could result in duplicate items. Add a flag on the bubbling event so that we only include Object Tree context menu items for the deepest part of the Object Tree, but still allow bubbling up to the root. * UserInterface/Views/ObjectPreviewView.js: (WebInspector.ObjectPreviewView.prototype._contextMenuHandler): (WebInspector.ObjectPreviewView): * UserInterface/Views/ObjectTreeBaseTreeElement.js: (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler): 2016-07-12 Johan K. Jensen Web Inspector: ER: Copy as cURL https://bugs.webkit.org/show_bug.cgi?id=159380 Reviewed by Joseph Pecoraro. Inspired by https://chromium.googlesource.com/chromium/src/+/b7c1115dbae65030ad96e773d9a270465a05f5c4/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js This "Copy as cURL" feature only approximates the original request as only some parts of that request is known to the frontend. * UserInterface/Models/Resource.js: (WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix.escapeCharacter): (WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix): (WebInspector.Resource.prototype.generateCURLCommand): (WebInspector.Resource): * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems): 2016-07-12 Joseph Pecoraro Web Inspector: Use separate files for TreeOutline/TreeElement and DataGrid/DataGridNode https://bugs.webkit.org/show_bug.cgi?id=159659 Reviewed by Timothy Hatcher. * UserInterface/Main.html: * UserInterface/Views/DataGrid.js: * UserInterface/Views/DataGridNode.js: Added. * UserInterface/Views/TreeElement.js: Added. * UserInterface/Views/TreeOutline.js: Extra the component classes to their own file. 2016-07-11 Joseph Pecoraro Web Inspector: ProfileView sometimes shows Top Functions data despite Top Functions being disabled https://bugs.webkit.org/show_bug.cgi?id=159660 Reviewed by Timothy Hatcher. * UserInterface/Views/ScriptProfileTimelineView.js: (WebInspector.ScriptProfileTimelineView.prototype._profileOrientationButtonClicked): Pass the value of the setting, not the setting itself. 2016-07-11 Nikita Vasilyev Web Inspector: Transition and Animation sections in Visual Styles sidebar should have more spacing to their left https://bugs.webkit.org/show_bug.cgi?id=159633 Reviewed by Timothy Hatcher. * UserInterface/Views/VisualStyleDetailsPanel.css: (.visual-style-property-container.animation): 2016-07-08 Nikita Vasilyev Web Inspector: Command-Shift-S in the Styles sidebar should always show the save dialog https://bugs.webkit.org/show_bug.cgi?id=156858 Reviewed by Timothy Hatcher. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection): 2016-07-07 Joseph Pecoraro Web Inspector, regression: JS/JSON pretty-printing sporadically broken in STP8 https://bugs.webkit.org/show_bug.cgi?id=159511 Reviewed by Timothy Hatcher. * UserInterface/Workers/Formatter/FormatterWorker.js: (FormatterWorker.prototype.formatJavaScript): Attempt to format invalid JSON that can be evaluated to an object. 2016-07-07 Timothy Hatcher Web Inspector: scrolled Snapshot list is reset to top and drawn blank after switching back from Snapshot Comparison view https://bugs.webkit.org/show_bug.cgi?id=158218 rdar://problem/26545000 Reviewed by Brian Burg. * UserInterface/Views/ClusterContentView.js: (WebInspector.ClusterContentView.prototype.get scrollableElements): Added. A default implementation for all cluster views. * UserInterface/Views/DOMStorageContentView.js: (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Deleted. This was duplicated in the class, removed one. * UserInterface/Views/HeapAllocationsTimelineView.js: (WebInspector.HeapAllocationsTimelineView): Initialize _snapshotListScrollTop. (WebInspector.HeapAllocationsTimelineView.prototype.get scrollableElements): Added. Return elements based on what is showing. (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList): Restore the scroll position of the DataGrid after it is added to the view. (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord): Save the scroll position of the DataGrid before it is removed from the view. * UserInterface/Views/ScriptClusterTimelineView.js: (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Deleted. Handled by the base class now. 2016-07-06 Timothy Hatcher Web Inspector: REGRESSION: Hitting ⌘T in Web Inspector no longer opens in new tab in Safari https://bugs.webkit.org/show_bug.cgi?id=159487 rdar://problem/27188047 Change Command-T to Command-Option-T to open a new tab. I also changed Command-1, etc. to Command-Option-1, etc. to switch tabs. The number commands conflicted similarly with Safari and didn't work for me as a Web Inspector shortcut at all. We can't use Command-Shift because of Command-Shift-3 and Command-Shift-4 for screenshots. Reviewed by Joseph Pecoraro. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): 2016-07-06 Joseph Pecoraro Web Inspector: sometimes reloading a page with main resource selected will show an empty content view https://bugs.webkit.org/show_bug.cgi?id=158069 Reviewed by Timothy Hatcher. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView): Continue until we get one that works. * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement): Avoid showing a content view for a background tab if it could steal the content view from a foreground tab. This is a targeted fix for reload + tab content view loading behavior. A more general fix would be reducing the work done by non-foreground tabs. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser.prototype._tabBarItemSelected): Update navigation sidebar first so it is set when showing the TabContentView. 2016-07-06 Brian Burg Web Inspector: Uncaught Exception reporter should include the currently dispatching protocol event or request/response if applicable https://bugs.webkit.org/show_bug.cgi?id=159320 Reviewed by Timothy Hatcher and Joseph Pecoraro. Keep track of the currently dispatched protocol response or protocol event and make them available to the uncaught exception reporter. If an internal exception is reported while dispatching an event or response, dump the protocol message(s) into the pre-filled bug report. * UserInterface/Debug/UncaughtExceptionReporter.js: (stringifyAndTruncateObject): Added. Rearrange the code that generates the pre-filled report so it's easier to add optional sections. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass): (InspectorBackendClass.prototype.get currentDispatchState): Expose the dispatching state. (InspectorBackendClass.prototype._sendCommandToBackendWithCallback): (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise): Store the originating command request with the pendingResponse data so that we can examine the originating request if the response causes an error. This will cause request message objects to be garbage-collected after their responses are dispatched rather than when the request is sent. But, I don't forsee this being a performance problem since we should always get a command response and pending command responses do not typically accumulate except when the inspector first loads. (InspectorBackendClass.prototype._dispatchResponse): Save the response being dispatched. (InspectorBackendClass.prototype._dispatchResponseToCallback): Simplify exception reporting. (InspectorBackendClass.prototype._dispatchEvent): Save the event being dispatched. 2016-07-05 Timothy Hatcher Web Inspector: Switch last uses of -webkit-linear-gradient() to linear-gradient() https://bugs.webkit.org/show_bug.cgi?id=159438 rdar://problem/27183417 Reviewed by Joseph Pecoraro. * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css: (.timeline-overview-graph.rendering-frame > .frame-marker): (body.window-inactive .timeline-overview-graph.rendering-frame > .frame-marker): * UserInterface/Views/TimelineRecordFrame.css: (.timeline-record-frame.tall): (.timeline-record-frame.selected): (body.window-inactive .timeline-record-frame.selected): 2016-07-05 Timothy Hatcher Web Inspector: Drop -webkit-calc() in completions and a single use https://bugs.webkit.org/show_bug.cgi?id=159435 rdar://problem/27179340 Reviewed by Dean Jackson. * UserInterface/Models/CSSKeywordCompletions.js: * UserInterface/Views/VisualStylePropertyEditorLink.css: (.visual-style-property-editor-link > .visual-style-property-editor-link-border): 2016-07-05 Timothy Hatcher Web Inspector: Drop the prefix from -webkit-image-set() https://bugs.webkit.org/show_bug.cgi?id=159433 rdar://problem/27178887 Reviewed by Dean Jackson. * UserInterface/Models/CSSKeywordCompletions.js: * UserInterface/Views/ApplicationCacheIcons.css: (.application-cache-manifest .icon): (.application-cache-frame .icon): * UserInterface/Views/CookieIcon.css: (.cookie-icon .icon): * UserInterface/Views/DOMStorageIcons.css: (.local-storage-icon .icon): (.session-storage-icon .icon): * UserInterface/Views/DatabaseIcon.css: (.database-icon .icon): * UserInterface/Views/DatabaseTableIcon.css: (.database-table-icon .icon): * UserInterface/Views/FolderIcon.css: (.folder-icon .icon): * UserInterface/Views/GradientSlider.css: (.gradient-slider-knob): (.gradient-slider-knob.selected): * UserInterface/Views/HoverMenu.css: (.hover-menu > img): * UserInterface/Views/ResourceIcons.css: (.resource-icon .icon): (.resource-icon.resource-type-document .icon): (.resource-icon.resource-type-image .icon): (.resource-icon.resource-type-font .icon): (.resource-icon.resource-type-stylesheet .icon): (.resource-icon.resource-type-script .icon): (.anonymous-script-icon .icon): (.source-map-resource.resource-icon .icon): (.source-map-resource.resource-icon.resource-type-stylesheet .icon): (.source-map-resource.resource-icon.resource-type-script .icon): (.large .resource-icon .icon): (.large .resource-icon.resource-type-document .icon): (.large .resource-icon.resource-type-image .icon): (.large .resource-icon.resource-type-font .icon): (.large .resource-icon.resource-type-stylesheet .icon): (.large .resource-icon.resource-type-script .icon): (.large .anonymous-script-icon .icon): (.large .source-map-resource.resource-icon .icon): (.large .source-map-resource.resource-icon.resource-type-stylesheet .icon): (.large .source-map-resource.resource-icon.resource-type-script .icon): * UserInterface/Views/Slider.css: (.slider > img): (.slider > img.dragging): * UserInterface/Views/SourceCodeTextEditor.css: (.hover-menu.color > img): * UserInterface/Views/TextEditor.css: (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before): (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before): (.text-editor > .CodeMirror .execution-line .CodeMirror-linenumber::after): * UserInterface/Views/TimelineIcons.css: (body:not(.mac-platform, .windows-platform) .network-icon .icon): (body:not(.mac-platform, .windows-platform) .network-icon.large .icon): (body:not(.mac-platform, .windows-platform) .layout-icon .icon): (body:not(.mac-platform, .windows-platform) .layout-icon.large .icon): (body:not(.mac-platform, .windows-platform) .script-icon .icon): (body:not(.mac-platform, .windows-platform) .script-icon.large .icon): (body:not(.mac-platform, .windows-platform) .rendering-frame-icon .icon): (body:not(.mac-platform, .windows-platform) .memory-icon .icon): (body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon): (body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon): 2016-07-02 Joseph Pecoraro Web Inspector: CallFrame console.assert seen in tests (sourceCodeLocation instanceof SourceCodeLocation) https://bugs.webkit.org/show_bug.cgi?id=159368 Reviewed by Timothy Hatcher. * UserInterface/Test.html: SourceCodeLocation was already included earlier. This redefines it and thereby breaks some things. 2016-07-02 Joseph Pecoraro inspector/debugger/command-line-api-exception.html flakily times out on mac https://bugs.webkit.org/show_bug.cgi?id=152029 Reviewed by Timothy Hatcher. * UserInterface/Base/Object.js: (WebInspector.Object.addEventListener): Return the listener, this makes it cleaner to write tests. 2016-07-01 Joseph Pecoraro Web Inspector: Make enabling protocol logging in inspector tests easy to remember https://bugs.webkit.org/show_bug.cgi?id=159323 Reviewed by Brian Burg. Now you just need to type InspectorTest.debug() or ProtocolTest.debug() and it will include stderr logging. * UserInterface/Test/FrontendTestHarness.js: (FrontendTestHarness.prototype.debug): * UserInterface/Test/ProtocolTestHarness.js: (ProtocolTestHarness.prototype.debug): (ProtocolTestHarness): * UserInterface/Test/TestHarness.js: (TestHarness.prototype.debug): 2016-06-30 Matt Baker Unreviewed build fix. * Localizations/en.lproj/localizedStrings.js: Add "Area" localized string. 2016-06-30 Joseph Pecoraro Web Inspector: Wrong function name next to scope https://bugs.webkit.org/show_bug.cgi?id=158210 Reviewed by Timothy Hatcher. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): Include new payload data in the construction call. All the new data is optional, so we gracefully handle legacy backends. * UserInterface/Models/ScopeChainNode.js: (WebInspector.ScopeChainNode): (WebInspector.ScopeChainNode.prototype.get type): (WebInspector.ScopeChainNode.prototype.get objects): (WebInspector.ScopeChainNode.prototype.get name): (WebInspector.ScopeChainNode.prototype.get location): (WebInspector.ScopeChainNode.prototype.get hash): Hash is a rough (name:sourceId:line:column) string for quick comparisons. (WebInspector.ScopeChainNode.prototype.makeLocalScope): Make this an action you take on a scope, to avoid having to do it at construction time, or making it a generic setting. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection): This was wrong before. Move the work to CallFrame and change it to be correct. * UserInterface/CallFrame.js: (WebInspector.CallFrame.prototype.mergedScopeChain): This transforms the scope chain for a call frame from: scope1 scope2 scope3 scope4 scope5 scope6 scope7 foo foo foo bar bar - - Block Closure Closure Closure Closure GLE GBL To: scope1 scope2&3 scope4&5 scope6 scope7 foo foo* bar* - - Block Local Closure GLE GBL Doing a few things: - Merge the first two Closure scopes sharing a location. These are the "var" and "let" Closure scopes in a function, and it is better to present these together in the UI. - Mark the first Closure scope within a function (*). When this is displayed in the UI, we can provide the name of the function: "Closure Scope (name)", and we even have location information that we can use to display a goto arrow if needed. - Make the first Closure scope the Local scope if it matches the Call Frame's function name. This lets us display the section as "Local Variables". 2016-06-30 Matt Baker Web Inspector: add pixel area column to layout timeline view https://bugs.webkit.org/show_bug.cgi?id=148677 Reviewed by Timothy Hatcher. The view can simply add the column. LayoutTimelineDataGridNode already includes area data and cell formatting. * UserInterface/Views/LayoutTimelineView.js: (WebInspector.LayoutTimelineView): 2016-06-30 Brian Burg Web Inspector: the last normal tab cannot be closed with "Close Tab" context menu item https://bugs.webkit.org/show_bug.cgi?id=159317 Reviewed by Timothy Hatcher. * UserInterface/Views/TabBarItem.js: (WebInspector.TabBarItem.prototype._handleContextMenuEvent): (WebInspector.TabBarItem): fix the expression that controls whether the item is disabled. 2016-06-30 Nikita Vasilyev Web Inspector: Add "spring" to transition-timing-function value autocompletion https://bugs.webkit.org/show_bug.cgi?id=159313 Reviewed by Timothy Hatcher. * UserInterface/Models/CSSKeywordCompletions.js: 2016-06-30 Commit Queue Unreviewed, rolling out r202659. https://bugs.webkit.org/show_bug.cgi?id=159305 The test for this change times out on mac-wk2 debug and caused an existing test to crash. (Requested by ryanhaddad on #webkit). Reverted changeset: "Web Inspector: Wrong function name next to scope" https://bugs.webkit.org/show_bug.cgi?id=158210 http://trac.webkit.org/changeset/202659 2016-06-29 Joseph Pecoraro Web Inspector: Wrong function name next to scope https://bugs.webkit.org/show_bug.cgi?id=158210 Reviewed by Brian Burg. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): Include new payload data in the construction call. All the new data is optional, so we gracefully handle legacy backends. * UserInterface/Models/ScopeChainNode.js: (WebInspector.ScopeChainNode): (WebInspector.ScopeChainNode.prototype.get type): (WebInspector.ScopeChainNode.prototype.get objects): (WebInspector.ScopeChainNode.prototype.get name): (WebInspector.ScopeChainNode.prototype.get location): (WebInspector.ScopeChainNode.prototype.get hash): Hash is a rough (name:sourceId:line:column) string for quick comparisons. (WebInspector.ScopeChainNode.prototype.makeLocalScope): Make this an action you take on a scope, to avoid having to do it at construction time, or making it a generic setting. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection): This was wrong before. Move the work to CallFrame and change it to be correct. * UserInterface/CallFrame.js: (WebInspector.CallFrame.prototype.mergedScopeChain): This transforms the scope chain for a call frame from: scope1 scope2 scope3 scope4 scope5 scope6 scope7 foo foo foo bar bar - - Block Closure Closure Closure Closure GLE GBL To: scope1 scope2&3 scope4&5 scope6 scope7 foo foo* bar* - - Block Local Closure GLE GBL Doing a few things: - Merge the first two Closure scopes sharing a location. These are the "var" and "let" Closure scopes in a function, and it is better to present these together in the UI. - Mark the first Closure scope within a function (*). When this is displayed in the UI, we can provide the name of the function: "Closure Scope (name)", and we even have location information that we can use to display a goto arrow if needed. - Make the first Closure scope the Local scope if it matches the Call Frame's function name. This lets us display the section as "Local Variables". 2016-06-29 Brian Burg Web Inspector: Uncaught Exception page never shows if exception is thrown while processing a protocol event https://bugs.webkit.org/show_bug.cgi?id=159182 Reviewed by Joseph Pecoraro. Since we catch exceptions raised during the handling of protocol responses and events, there is no way for these exceptions to trigger the global exception handler that shows the Uncaught Exception Reporter sheet. We should show these in the sheet because it makes them get fixed faster. Add a new entry point, WebInspector.reportInternalError, that takes an error or string and a free-form map of strings to strings for storing additional information such as message data. Pass the error and any other relevant details to this entry point, which decides whether to show the uncaught exception reporter or quietly log the error to Inspector^2 console. In future patches, I would like to do the following once the common errors are fixed: - enable reporting via Uncaught Exception Reporter for all engineering builds - move internal console.error call sites to use WebInspector.reportInternalError * UserInterface/Base/Main.js: Add reportInternalError, which redirects to the uncaught exception reporter sheet or does console.error. It also adds a console.assert that could cause the debugger to pause if desired. * UserInterface/Debug/UncaughtExceptionReporter.css: (.sheet-container): Make the report scrollable now that we could potentially show a lot of text. * UserInterface/Debug/UncaughtExceptionReporter.js: (handleError): Also pass along the 'details' poperty. (formattedEntry): Refactor the code so it additionally prints out the keys and values of the 'details' property. It does not do any coercions, so callers must convert values to strings. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass.prototype._dispatchResponse): Inlined a function. (InspectorBackendClass.prototype._dispatchResponseToCallback): (InspectorBackendClass.prototype._dispatchEvent): Report uncaught exceptions via WebInspector.reportInternalError. (InspectorBackendClass.prototype._reportProtocolError): Deleted, inlined into the single use site. 2016-06-29 Joseph Pecoraro Web Inspector: Show Shadow Root type in DOM Tree https://bugs.webkit.org/show_bug.cgi?id=159236 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: "Shadow Content (type)" string. * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode): (WebInspector.DOMNode.prototype.shadowRoots): (WebInspector.DOMNode.prototype.shadowRootType): Initialize state and add accessors. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.shadowRootTypeDisplayName): (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Better string when an element is a Shadow Root. * UserInterface/Views/DOMTreeElementPathComponent.js: (WebInspector.DOMTreeElementPathComponent): Better to check the Shadow Root type. * UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom .html-fragment.shadow): Opacity looks poor when there is a selection. Switch to gray. 2016-06-28 Nikita Vasilyev REGRESSION (r188730): Web Inspector: Warning icons incorrectly positioned in CSS Rules sidebar https://bugs.webkit.org/show_bug.cgi?id=157869 Reviewed by Timothy Hatcher. Before r188730, CSS text always had a line break as a prefix. r188730 started trimming text. This patch keeps trimming unnecessary whitespace but brings back required line break prefix. * UserInterface/Models/CSSStyleDeclaration.js: (WebInspector.CSSStyleDeclaration.prototype.set text): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: Make PrefixWhitespace and SuffixWhitespace public. (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent): (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Remove an if conditional as it's always true. 2016-06-28 Brian Burg Web Inspector: QuickConsole should update its selection when RuntimeManager.defaultExecutionContextIdentifier changes https://bugs.webkit.org/show_bug.cgi?id=159183 Reviewed by Timothy Hatcher. Currently, the UI listens for state changes in the Frame tree to decide when to reset the selected execution context back to its default value. This is no good, because this should happen even if we have no UI (i.e., testing models only). The UI should simply display changes to the model rather than driving them based on other model changes. Move the logic to reset the execution context into RuntimeManager. When the selected context changes, an event is fired which causes the QuickConsole to rebuild its path components. * UserInterface/Controllers/RuntimeManager.js: (WebInspector.RuntimeManager): (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier): Fire an event when the execution context actually changes. (WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared): Added. If the selected context was cleared, reset back to default. * UserInterface/Models/Frame.js: (WebInspector.Frame.prototype.clearExecutionContexts): Include the contexts that were cleared so clients can match against them. * UserInterface/Views/QuickConsole.js: (WebInspector.QuickConsole): Use the proper constant name. Both the old and new names evaluated to `undefined`. No need to keep track of the selected path component, it will always match the defaultExecutionContextIdentifier in RuntimeManager. (WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier): (WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier): Forward to RuntimeManager. This name is less awkward for the UI code that manages selections. (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay): Special-case for the main frame execution context. (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged): Remove indirection. (WebInspector.QuickConsole.prototype._frameExecutionContextsCleared): Fix the guard to handle undefined execution contexts in the case where it represents the main frame (undefined). (WebInspector.QuickConsole.prototype._defaultExecutionContextChanged): Rebuild when the model changes. (WebInspector.QuickConsole.prototype._pathComponentSelected): Simplify. (WebInspector.QuickConsole.prototype.get executionContextIdentifier): (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame): Move the fallback selection behavior into RuntimeManager. (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): Deleted. This has been dead code ever since we removed iOS 6 legacy support. 2016-06-27 Joseph Pecoraro Web Inspector: When modifying sessionStorage, localStorage gets updated https://bugs.webkit.org/show_bug.cgi?id=159181 Reviewed by Timothy Hatcher. * UserInterface/Test/Test.js: (WebInspector.loaded): Add registration for StorageManager and StorageObserver. 2016-06-27 Brian Burg Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole https://bugs.webkit.org/show_bug.cgi?id=128092 Reviewed by Timothy Hatcher. This is a layering violation which makes it harder to use RuntimeManager.evaluateInInspectedWindow from a testing context where the QuickConsole view does not exist. Store the selected execution context identifier on RuntimeManager and use it when doing subsequent evaluations that act on the currently selected frame. * UserInterface/Controllers/RuntimeManager.js: (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow): (WebInspector.RuntimeManager.prototype.saveResult): Use local state. (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier): (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier): Added. (WebInspector.RuntimeManager): * UserInterface/Models/ExecutionContext.js: (WebInspector.ExecutionContext): Move the symbolic name for the top level execution context to RuntimeManager. * UserInterface/Test/Test.js: (WebInspector.loaded): No need to stub out WebInspector.QuickConsole any more. * UserInterface/Views/QuickConsole.js: (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged): (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame): (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): (WebInspector.QuickConsole.prototype._pathComponentSelected): For now, set RuntimeManager's selected execution context whenever we set the selected path component. In a future patch, we should invert the dependency and have the selected component change whenever RuntimeManager.defaultExecutionContext changes. 2016-06-23 Joseph Pecoraro Web Inspector: first heap snapshot taken when a page is reloaded happens before the reload navigation https://bugs.webkit.org/show_bug.cgi?id=158995 Reviewed by Brian Burg. Let instruments decide to do work or not based on programmatic (backend initiated) starts and stop. Programmatic start can happen due to Auto Capture or console.profile. Programmatic stop can happen due to console.profileEnd. For example, this allows the frontend to avoid sending agents start/stop messages when the backend would have already started/stopped the agents. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager): (WebInspector.TimelineManager.prototype.startCapturing): (WebInspector.TimelineManager.prototype.capturingStopped): (WebInspector.TimelineManager.prototype.autoCaptureStarted): (WebInspector.TimelineManager.prototype.programmaticCaptureStarted): Call Recording.start/stop with a programmatic flag so the frontend instruments can perform a more informed start/stop. * UserInterface/Models/TimelineRecording.js: (WebInspector.TimelineRecording.prototype.start): (WebInspector.TimelineRecording.prototype.stop): Let the instruments decide to do work based on the start/stop being initiated by the backend or not. * UserInterface/Models/HeapAllocationsInstrument.js: (WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation): (WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation): * UserInterface/Models/Instrument.js: (WebInspector.Instrument.startLegacyTimelineAgent): (WebInspector.Instrument.prototype.startInstrumentation): (WebInspector.Instrument.prototype.stopInstrumentation): (WebInspector.Instrument): * UserInterface/Models/MemoryInstrument.js: (WebInspector.MemoryInstrument.prototype.startInstrumentation): (WebInspector.MemoryInstrument.prototype.stopInstrumentation): (WebInspector.MemoryInstrument): * UserInterface/Models/NetworkInstrument.js: * UserInterface/Models/ScriptInstrument.js: (WebInspector.ScriptInstrument.prototype.startInstrumentation): (WebInspector.ScriptInstrument.prototype.stopInstrumentation): (WebInspector.ScriptInstrument): Avoid sending start/stop tracking messages when programmatic. This still allows the instruments to do their own frontend tracking, such as the Heap agent triggering periodic snapshots. 2016-06-23 Joseph Pecoraro Web Inspector: Snapshots should be cleared at some point https://bugs.webkit.org/show_bug.cgi?id=157907 Reviewed by Timothy Hatcher. Invalidate HeapSnapshotProxy objects when the page navigates. This allows us to clear our frontend data for the snapshots. When a snapshot is invalidated, it is disabled in the UI. This means you cannot select the snapshot or see content views for the snapshot. If you are in a snapshot when it is invalidated, you are taken out to the snapshot list. * UserInterface/Main.html: New files. * UserInterface/Proxies/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy): (WebInspector.HeapSnapshotProxy.invalidateSnapshotProxies): (WebInspector.HeapSnapshotProxy.prototype.get invalid): (WebInspector.HeapSnapshotProxy.prototype._invalidate): Keep track of valid snapshots, and provide a static method to invalidate them. (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent): (WebInspector.HeapSnapshotProxy.prototype.allocationBucketCounts): (WebInspector.HeapSnapshotProxy.prototype.instancesWithClassName): (WebInspector.HeapSnapshotProxy.prototype.update): (WebInspector.HeapSnapshotProxy.prototype.nodeWithIdentifier): UI should only act on valid snapshots. * UserInterface/Proxies/HeapSnapshotDiffProxy.js: (WebInspector.HeapSnapshotDiffProxy.prototype.get invalid): (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent): (WebInspector.HeapSnapshotDiffProxy.prototype.allocationBucketCounts): (WebInspector.HeapSnapshotDiffProxy.prototype.instancesWithClassName): (WebInspector.HeapSnapshotDiffProxy.prototype.update): (WebInspector.HeapSnapshotDiffProxy.prototype.nodeWithIdentifier): UI should only act on valid snapshots. * UserInterface/Proxies/HeapSnapshotWorkerProxy.js: (WebInspector.HeapSnapshotWorkerProxy.prototype._mainResourceDidChange): Invalidate and discard snapshots when the main frame navigates. (WebInspector.HeapSnapshotWorkerProxy.prototype._handleMessage): (WebInspector.HeapSnapshotWorkerProxy): * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js: (HeapSnapshotWorker.prototype.clearSnapshots): (HeapSnapshotWorker.prototype._handleMessage): (HeapSnapshotWorker): A message may come in for a snapshot before it has been cleared. If that is the case, the object may not exist. Return an error so that the callback can be deleted on the calling side. * UserInterface/Views/HeapAllocationsTimelineDataGridNodePathComponent.js: (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get previousSibling): (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get nextSibling): (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent): Don't show invalid snapshots in page component picker. * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css: (.timeline-overview-graph.heap-allocations > img.snapshot.invalid): * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js: (WebInspector.HeapAllocationsTimelineDataGridNode): (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent): (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCells): (WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotInvalidated): Give invalid snapshots an invalidated appearance in the snapshot list. * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js: (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout): * UserInterface/Views/HeapAllocationsTimelineView.css: (.timeline-view.heap-allocations > .data-grid tr.invalid): (.timeline-view.heap-allocations > .data-grid:not(:focus, .force-focus) tr.selected.invalid): Give invalid snapshots an invalidated appearance in the overview graph. * UserInterface/Views/HeapAllocationsTimelineView.js: (WebInspector.HeapAllocationsTimelineView): (WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents): (WebInspector.HeapAllocationsTimelineView.prototype.closed): (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent.updateHeapSnapshotForEvent): (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent): (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotInvalidated): (WebInspector.HeapAllocationsTimelineView.prototype._updateCompareHeapSnapshotButton): (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected): Handle interactions when snapshots in the list are invalidated. 2016-06-22 Brian Burg Web Inspector: don't start auto capturing if the Inspector window is not visible https://bugs.webkit.org/show_bug.cgi?id=159014 Reviewed by Joseph Pecoraro. Followup, add a missing super.closed() call mentioned in review comments. * UserInterface/Views/TimelineTabContentView.js: (WebInspector.TimelineTabContentView.prototype.closed): 2016-06-22 Brian Burg Web Inspector: don't start auto capturing if the Inspector window is not visible https://bugs.webkit.org/show_bug.cgi?id=159014 Reviewed by Joseph Pecoraro. TimelineTabContentView should not tell the timeline manager to enable auto-capturing unless the Web Inspector UI is visible. If it is preloaded but not shown to the user, then auto-capturing may inadvertently disable the debugger, causing it to miss `debugger` statements and not bring the inspector to front. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad): Bail out if nothing changed. Coerce to a boolean since the backend requires a boolean. * UserInterface/Views/TimelineTabContentView.js: (WebInspector.TimelineTabContentView): Listen for UI visibility changes. (WebInspector.TimelineTabContentView.prototype.shown): Enable auto-capturing if the UI is visible. (WebInspector.TimelineTabContentView.prototype.closed): Added. Remove listeners on global objects so this tab doesn't leak. (WebInspector.TimelineTabContentView.prototype._inspectorVisibilityChanged): Update the auto-capturing setting if the UI became visible or not visible. 2016-06-22 Nikita Vasilyev Web Inspector: Simplify CSS rule for ContentBrowser navigation bar items https://bugs.webkit.org/show_bug.cgi?id=159000 Reviewed by Timothy Hatcher. * UserInterface/Views/ContentBrowser.css: (.content-browser > .navigation-bar > .item): Both these values result in 28px, but `100%` is simplier. 2016-06-21 Nikita Vasilyev REGRESSION(r201177): Web Inspector: ContentBrowser navigation bar should fit on a single line https://bugs.webkit.org/show_bug.cgi?id=158700 Reviewed by Joseph Pecoraro. * UserInterface/Views/ContentBrowser.css: (.content-browser > .navigation-bar > .item): Set the height to 28px, as it was before r201177. Make it one pixel shorter than the navigation bar for better vertical alignment. 2016-06-20 Joseph Pecoraro Web Inspector: UncaughtExceptionReporter should handle null event.error https://bugs.webkit.org/show_bug.cgi?id=158971 Reviewed by Brian Burg. * UserInterface/Debug/UncaughtExceptionReporter.js: Since `typeof null === "object"` handle uncaught exceptions where the Error object itself is null. 2016-06-20 Joseph Pecoraro Web Inspector: Snapshot List should show the total size and the total live size https://bugs.webkit.org/show_bug.cgi?id=157904 Reviewed by Brian Burg. Include the live size of a snapshot in the snapshot list. * Localizations/en.lproj/localizedStrings.js: New "Live Size" string. * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js: (HeapSnapshot): (HeapSnapshot.updateCategoriesAndMetadata): (HeapSnapshot.prototype.update): (HeapSnapshot.prototype.serialize): (HeapSnapshotDiff): (HeapSnapshotDiff.prototype.update): (HeapSnapshot.buildCategories): Deleted. (HeapSnapshot.prototype.updateCategories): Deleted. (HeapSnapshotDiff.prototype.updateCategories): Deleted. * UserInterface/Proxies/HeapSnapshotDiffProxy.js: (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent): (WebInspector.HeapSnapshotDiffProxy.prototype.update): (WebInspector.HeapSnapshotDiffProxy.prototype.updateCategories): Deleted. * UserInterface/Proxies/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy): (WebInspector.HeapSnapshotProxy.deserialize): (WebInspector.HeapSnapshotProxy.prototype.get liveSize): (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent): (WebInspector.HeapSnapshotProxy.prototype.update): (WebInspector.HeapSnapshotProxy.prototype.updateCategories): Deleted. Rename "updateCategories" to "update" and update both categories and metadata, like the liveSize. * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js: (WebInspector.HeapAllocationsTimelineDataGridNode): (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent): (WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotCollectedNodes): Update live size after collection. * UserInterface/Views/HeapAllocationsTimelineView.js: (WebInspector.HeapAllocationsTimelineView): Include a live size column in the DataGrid. (WebInspector.HeapAllocationsTimelineView.prototype.closed): Cleanup listeners appropriately. 2016-06-20 Joseph Pecoraro Web Inspector: console.profile should use the new Sampling Profiler https://bugs.webkit.org/show_bug.cgi?id=153499 Reviewed by Timothy Hatcher. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager.prototype.programmaticCaptureStarted): (WebInspector.TimelineManager.prototype.programmaticCaptureStopped): (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted): (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped): For programmatic captures, automatically show the Script Timeline, since that is guarenteed to have been started by the backend. Start capturing without creating a new recording. * UserInterface/Models/TimelineRecording.js: (WebInspector.TimelineRecording.prototype.stop): (WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture): When stopping for programmatic capture we don't need to disable instruments, the backend would have already done this. * UserInterface/Protocol/ScriptProfilerObserver.js: (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted): (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped): (WebInspector.ScriptProfilerObserver): * UserInterface/Protocol/TimelineObserver.js: (WebInspector.TimelineObserver.prototype.programmaticCaptureStarted): (WebInspector.TimelineObserver.prototype.programmaticCaptureStopped): (WebInspector.TimelineObserver): Pass through Web and JSContext programmatic capture events. 2016-06-19 Nikita Vasilyev Web Inspector: Remove Sidebar z-index:0 workaround for scrollbars and position:sticky section headers https://bugs.webkit.org/show_bug.cgi?id=158882 Reviewed by Darin Adler. The z-index:0 workaround is no longer needed as it doesn't change anything. * UserInterface/Views/Sidebar.css: (.sidebar > .panel): Deleted. 2016-06-17 Commit Queue Unreviewed, rolling out r202152. https://bugs.webkit.org/show_bug.cgi?id=158897 The new test is very unstable, timing out frequently (Requested by ap on #webkit). Reverted changeset: "Web Inspector: console.profile should use the new Sampling Profiler" https://bugs.webkit.org/show_bug.cgi?id=153499 http://trac.webkit.org/changeset/202152 2016-06-16 Joseph Pecoraro Web Inspector: console.profile should use the new Sampling Profiler https://bugs.webkit.org/show_bug.cgi?id=153499 Reviewed by Timothy Hatcher. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager.prototype.programmaticCaptureStarted): (WebInspector.TimelineManager.prototype.programmaticCaptureStopped): (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted): (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped): For programmatic captures, automatically show the Script Timeline, since that is guarenteed to have been started by the backend. Start capturing without creating a new recording. * UserInterface/Models/TimelineRecording.js: (WebInspector.TimelineRecording.prototype.stop): (WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture): When stopping for programmatic capture we don't need to disable instruments, the backend would have already done this. * UserInterface/Protocol/ScriptProfilerObserver.js: (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted): (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped): (WebInspector.ScriptProfilerObserver): * UserInterface/Protocol/TimelineObserver.js: (WebInspector.TimelineObserver.prototype.programmaticCaptureStarted): (WebInspector.TimelineObserver.prototype.programmaticCaptureStopped): (WebInspector.TimelineObserver): Pass through Web and JSContext programmatic capture events. 2016-06-16 Joseph Pecoraro REGRESSION (r201538): Web Inspector: Border over Allocations Views is too thick https://bugs.webkit.org/show_bug.cgi?id=158846 Reviewed by Timothy Hatcher. * UserInterface/Views/HeapAllocationsTimelineView.css: (.timeline-view.heap-allocations > .content-view-container > .content-view): Deleted. 2016-06-16 Matt Baker Unreviewed build fix. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid.prototype.createSettings): "showColumn" -> "setColumnVisible". 2016-06-16 Matt Baker Web Inspector: DataGrid should manage its own settings https://bugs.webkit.org/show_bug.cgi?id=158675 Reviewed by Timothy Hatcher. Move grid sorting settings (sort order, column identifier) into DataGrid, removing duplicated code from various views. A new grid method, "createSettings", takes an identifier which is used as a prefix for naming the grid's settings. So that the new behavior is easy to use and hard to misuse, default values for each setting are set to the current value of the associated property. The result is that: grid.sortColumnIdentifier = "columnA"; grid.createSettings("myGrid"); will use "columnA" as the default value the first time the setting is created. * UserInterface/Views/ApplicationCacheFrameContentView.js: (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid): * UserInterface/Views/CookieStorageContentView.js: (WebInspector.CookieStorageContentView.prototype._rebuildTable): * UserInterface/Views/DOMStorageContentView.js: (WebInspector.DOMStorageContentView): * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid): (WebInspector.DataGrid.prototype.createSettings): (WebInspector.DataGrid.prototype.get identifier): Deleted. (WebInspector.DataGrid.prototype.set identifier): Deleted. (WebInspector.DataGrid.prototype.set sortOrderSetting): Deleted. (WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Deleted. * UserInterface/Views/HeapAllocationsTimelineView.js: (WebInspector.HeapAllocationsTimelineView): * UserInterface/Views/HeapSnapshotContentView.js: (WebInspector.HeapSnapshotContentView): * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection): * UserInterface/Views/LayoutTimelineView.js: (WebInspector.LayoutTimelineView): * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView): * UserInterface/Views/ProfileView.js: (WebInspector.ProfileView): * UserInterface/Views/RenderingFrameTimelineView.js: (WebInspector.RenderingFrameTimelineView): * UserInterface/Views/ScriptDetailsTimelineView.js: (WebInspector.ScriptDetailsTimelineView): 2016-06-15 Joseph Pecoraro Uncaught Exception: TypeError: undefined is not an object (evaluating 'imageElement.classList') https://bugs.webkit.org/show_bug.cgi?id=158808 Reviewed by Brian Burg. * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js: (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers): If the record is out of the layout bounds of the overview graph, the overview graph may not have created an image element yet, so bail. Later, when the image element is created, it would get the appropriate style if the record is selected. 2016-06-14 Matt Baker Web Inspector: Rename DataGrid.showColumn to setColumnVisible https://bugs.webkit.org/show_bug.cgi?id=158764 Reviewed by Joseph Pecoraro. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid): Drive-by update to initialize "this._columnChooserEnabled". (WebInspector.DataGrid.prototype.set identifier): (WebInspector.DataGrid.prototype.insertColumn): (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell): Use new method name. (WebInspector.DataGrid.prototype._contextMenuInHeader): Drive-by style update. 2016-06-14 Matt Baker Web Inspector: Storage tab should allow hiding columns in the cookies grid https://bugs.webkit.org/show_bug.cgi?id=158767 Reviewed by Joseph Pecoraro. * UserInterface/Views/CookieStorageContentView.js: (WebInspector.CookieStorageContentView.prototype._rebuildTable): Enable column chooser, exclude Name and Value columns. 2016-06-14 Nikita Vasilyev Web Inspector: Visual Sidebar: Remove "Text -> Content" subsection https://bugs.webkit.org/show_bug.cgi?id=158758 Reviewed by Timothy Hatcher. "content" CSS property only works with pseudo elements ::before and ::after. It doesn't do anything for regular (non pseudo) elements. Remove it to reduce UI clutter. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout): (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection): Deleted. * UserInterface/Views/VisualStylePropertyEditor.css: (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)): Deleted. 2016-06-14 Joseph Pecoraro Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments https://bugs.webkit.org/show_bug.cgi?id=158762 Reviewed by Timothy Hatcher. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments): (WebInspector.TimelineManager): 2016-06-14 Benjamin Poulain Add the unprefixed version of the pseudo element ::placeholder https://bugs.webkit.org/show_bug.cgi?id=158653 Reviewed by Dean Jackson. * UserInterface/Views/FilterBar.css: (.filter-bar > input[type="search"]::placeholder): (.filter-bar > input[type="search"]::-webkit-input-placeholder): Deleted. * UserInterface/Views/FindBanner.css: (.find-banner.console-find-banner > input[type="search"]::placeholder): (.find-banner.console-find-banner > input[type="search"]::-webkit-input-placeholder): Deleted. * UserInterface/Views/GoToLineDialog.css: (.go-to-line-dialog > div > input::placeholder): (.go-to-line-dialog > div > input::-webkit-input-placeholder): Deleted. * UserInterface/Views/OpenResourceDialog.css: (.open-resource-dialog > .field > input::placeholder): (.open-resource-dialog > .field > input::-webkit-input-placeholder): Deleted. * UserInterface/Views/SearchBar.css: (.search-bar > input[type="search"]::placeholder): (.search-bar > input[type="search"]::-webkit-input-placeholder): Deleted. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css: 2016-06-14 Nikita Vasilyev Web Inspector: Introduce --navigation-bar-height CSS variable https://bugs.webkit.org/show_bug.cgi?id=158752 Reviewed by Timothy Hatcher. Abstract a commonly repeated height value (29px) into a variable. * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content.has-filter-bar): * UserInterface/Views/DebuggerSidebarPanel.css: (.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)): * UserInterface/Views/FilterBar.css: (.filter-bar): * UserInterface/Views/NavigationBar.css: (.navigation-bar): * UserInterface/Views/NavigationSidebarPanel.css: (.sidebar > .panel.navigation > .content): (.sidebar > .panel.navigation > .overflow-shadow.top): * UserInterface/Views/NetworkSidebarPanel.css: (.sidebar > .panel.navigation.network > .title-bar): * UserInterface/Views/ResourceSidebarPanel.css: (.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)): * UserInterface/Views/SearchSidebarPanel.css: (.sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)): (.sidebar > .panel.navigation.search > .search-bar): * UserInterface/Views/Sidebar.css: (.sidebar.has-navigation-bar > .panel): * UserInterface/Views/StorageSidebarPanel.css: (.sidebar > .panel.navigation.storage > :matches(.content, .empty-content-placeholder)): * UserInterface/Views/TimelineRecordingContentView.css: (.content-view.timeline-recording > .content-browser .recording-progress): * UserInterface/Views/Variables.css: (:root): 2016-06-14 Saam Barati Follow up to: Web Inspector: Call Trees view should have a 'Top Functions'-like mode https://bugs.webkit.org/show_bug.cgi?id=158555 Unreviewed follow up patch. - Move a long if-else sequence to a switch statement. - Fix a copy-paste typo in a Symbol(.) enum. * UserInterface/Models/CallingContextTree.js: (WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace): 2016-06-13 Joseph Pecoraro Web Inspector: Show Exception Stack in UncaughtExceptionReporter view https://bugs.webkit.org/show_bug.cgi?id=158657 Reviewed by Darin Adler. * UserInterface/Debug/UncaughtExceptionReporter.css: (.uncaught-exception-sheet li): Make newlines significant. * UserInterface/Debug/UncaughtExceptionReporter.js: (unblockEventHandlers): (handleError): (handleLinkClick): (formattedEntry): Format the exception and a possible stack with a bit of sanitizing. 2016-06-13 Matt Baker Web Inspector: Filter Records not applying to new records https://bugs.webkit.org/show_bug.cgi?id=158213 Reviewed by Timothy Hatcher. This patch makes the following improvements to timeline grid filtering: - Records are filtered as they are added to the grid. - Timeline view no longer triggers a filter refresh while the current time changes while recording. - Filters are refreshed whenever the current timeline view changes. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid.prototype.hasFilters): Helper function to check for custom and text filters. (WebInspector.DataGrid.prototype._applyFiltersToNodeAndDispatchEvent): Encapsulate node state change and event dispatch, which was previously done in multiple places. (WebInspector.DataGrid.prototype.insertChild): Filter incoming node if needed. (WebInspector.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered): (WebInspector.DataGrid.prototype._updateFilter): (WebInspector.DataGrid.prototype.yieldableTaskWillProcessItem): Use new convenience functions. (WebInspector.DataGrid.prototype.hasCustomFilters): Deleted. Renamed `hasFilters`. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange): Refresh grid filters on view change. * UserInterface/Views/TimelineView.js: (WebInspector.TimelineView.prototype.set startTime): (WebInspector.TimelineView.prototype.set endTime): Schedule filter change notification when selection bounds changes. (WebInspector.TimelineView.prototype._timesDidChange): (WebInspector.TimelineView.prototype._scheduleFilterDidChange): (WebInspector.TimelineView): 2016-06-13 Saam Barati Web Inspector: Call Trees view should have a 'Top Functions'-like mode https://bugs.webkit.org/show_bug.cgi?id=158555 Reviewed by Timothy Hatcher. This patch adds a Top Functions view that is similar to Instruments' Top Functions view. I really wanted to add this view because I've been doing a lot of performance debugging and I've exclusively used the Top Functions view and I want the Inspector to also have this view. I like to think of it as a more sophisticated version of the bottom-up view. Top Functions works by treating every frame as a root in the tree. Top functions view then presents a list of "roots". This is the same as all other views, which also present a list of roots, but in this case, every frame is a root. Bottom Up is great for nailing in specific performance problems in exactly one frame. But Bottom Up doesn't give you good context about where a specific frame is in the call tree and how frames are related by having a caller or some path of shared callers. For example, consider this call tree: (program) / \ / \ (many nodes...) / / (parent) / \ / \ (leaf1) (leaf2) Suppose that 'leaf1' is super hot, and 'leaf2' is moderately hot. If we look at this through Bottom Up view, we will see 'leaf1' is super hot, but it will take more scrolling to see that 'leaf2' is moderately hot. Lets say that 'parent' is also moderately hot, but that the majority of its time isn't self time. With Bottom Up view, there is no good way to see that 'leaf1' and 'leaf2' are both nodes under 'parent'. With Top Down, you can find this information, but it requires a ton of drilling down into the tree (i.e, you must expand past the 'many nodes...' I drew above). It's inconvenient to use Top Down here for indentation alone. Bottom up will tell you that 'leaf1' is super hot, and that 'leaf2' and 'parent' are moderately hot, but it doesn't show how they're related in the original tree. It's important to see that 'parent's total time is very high because it itself is moderately hot, and it has a child node that is super hot, and another child that's moderately 'hot'. For the sake of this example, let's pretend that 85% of the program's time is spent inside 'parent'. Seeing this information through 'Top Functions' is easy because this information filters to the top of the list. Specifically, when using 'Top Functions' sorted by Total Time. Because every node is a root, there will be a top-level entry for every frame in the program. Specifically, there will be a top-level node for 'parent' in my above example. Because I've sorted this view by Total Time, I will see '(program)' first. That's because 100% of execution time is under the '(program)' frame. Then, I might see a few other nodes that also run the entire time because '(program)' calls them, and they eventually call into other things that never leave the stack. These will also have time ranges near 100%. But, only a few nodes after that, I'll see 'parent' in the list because it accounts for 85% of execution time. Immediately, I will see that it has some self time, and that it has two child nodes that have self time. This is really helpful. Let's consider another example where it's not easy in Top Down to get the full picture of 'parent': (program) / | \ (... many nodes...) / \ (many nodes...) (many nodes...) / \ parent parent | | leaf1 leaf2 If we viewed this program in Top Down, we don't get a full picture of 'parent' because it has its time distributed in two different subsections of the tree. Specifically, lets say it has 70% of time in the leaf1 path, and 30% of the time in the leaf2 path. We want a way to see these things together. It's impossible to do this in Top Down or Bottom Up. But, in Top Functions view, we get the view that we want to see because we treat 'parent' as a root of the tree. Because we do this, we will create the following sub tree in the Top Functions view: parent / \ leaf1 leaf2 This happens naturally because when 'parent' is a root, we add all its children to its subtree. Constructing this tree is really easy. What we do is take any arbitrary stack trace of length n, and treat is as n separate stack traces. Specifically, we perform the following operation for any stack trace S. S = [A, B, C, D] (A is the entry frame, and D is the top of the stack). We will transform this into a list of stack traces S' like so: S' = [[A, B, C, D], [B, C, D], [C, D], [D]] If we then run the normal top down tree algorithm on this set of stack traces, all nodes get treated as roots, and voila, we get the Top Functions view. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Controllers/TimelineManager.js: * UserInterface/Main.html: * UserInterface/Models/CallingContextTree.js: * UserInterface/Models/TimelineRecording.js: * UserInterface/Views/ScriptProfileTimelineView.js: * UserInterface/Views/TextToggleButtonNavigationItem.css: Added. * UserInterface/Views/TextToggleButtonNavigationItem.js: Added. 2016-06-13 Matt Baker Web Inspector: Add ability to show/hide DataGird columns https://bugs.webkit.org/show_bug.cgi?id=158676 Reviewed by Timothy Hatcher. Make it possible to show/hide grid columns using the grid header context menu. This patch enables the new behavior for most of the timeline grids. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid): (WebInspector.DataGrid.prototype.get identifier): (WebInspector.DataGrid.prototype.set identifier): An identifier for the grid instance, for managing per-grid settings. Setting the id causes settings to be created, and their values to be applied to the grid. (WebInspector.DataGrid.prototype.get columnChooserEnabled): (WebInspector.DataGrid.prototype.set columnChooserEnabled): Enable showing/hiding columns via the grid header. (WebInspector.DataGrid.prototype.insertColumn): (WebInspector.DataGrid.prototype.showColumn): Set column visibility and hidden column setting, then perform layout. (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell): (WebInspector.DataGrid.prototype._contextMenuInHeader): Create column chooser menu items if necessary. (WebInspector.DataGrid.prototype._showColumn): Deleted. (WebInspector.DataGrid.prototype._hideColumn): Deleted. Replaced by `showColumn`. * UserInterface/Views/LayoutTimelineView.js: (WebInspector.LayoutTimelineView): Always show "type" and "name" columns. * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView): * UserInterface/Views/RenderingFrameTimelineView.js: (WebInspector.RenderingFrameTimelineView): * UserInterface/Views/ScriptDetailsTimelineView.js: (WebInspector.ScriptDetailsTimelineView): Always show "name" column. * UserInterface/Views/TimelineDataGrid.js: (WebInspector.TimelineDataGrid): Enable column chooser. 2016-06-10 Joseph Pecoraro Web Inspector: