2016-04-14 Carlos Garcia Campos Unreviewed. REGRESSION: Web Inspector: Remote inspector doesn't work https://bugs.webkit.org/show_bug.cgi?id=156543 WebSocket connection is blocked by CSP, but needed by the remote web inspector to work, so allow connect to ws URLs from the web inspector. * UserInterface/Main.html: 2016-03-17 Carlos Garcia Campos REGRESSION (r197724): [GTK] Web Inspector: Images being blocked by CSP 2.0 https://bugs.webkit.org/show_bug.cgi?id=155432 Reviewed by Daniel Bates. Allow Web Inspector to load resource: image resources. * UserInterface/Main.html: 2016-03-08 Joseph Pecoraro Web Inspector: Images being blocked by CSP 2.0 https://bugs.webkit.org/show_bug.cgi?id=155182 Reviewed by Daniel Bates. * UserInterface/Main.html: Allow Web Inspector to load file: and blob: image resources. Also blob: media and font resources. 2016-02-28 Nikita Vasilyev Web Inspector: DataGrid's resizers aren't horizontally centered https://bugs.webkit.org/show_bug.cgi?id=154787 Reviewed by Timothy Hatcher. * UserInterface/Views/DataGrid.css: (.data-grid .resizer): Use CSS transforms as margin-left doesn't support sub-pixel values. 2016-02-26 Nikita Vasilyev Web Inspector: Increase clickable area of the console prompt https://bugs.webkit.org/show_bug.cgi?id=154719 Reviewed by Timothy Hatcher. Clicking on the area around CodeMirror element now moves focus to the console prompt. * UserInterface/Views/QuickConsole.js: (WebInspector.QuickConsole.prototype._handleMouseDown): Only capture mousedown events on .quick-console. Don't capture clicks on CodeMirror. * UserInterface/Views/QuickConsole.css: (.quick-console > .console-prompt): (.quick-console > .console-prompt > .CodeMirror): Make sure .console-prompt is never an event.target for _handleMouseDown. 2016-02-26 Nikita Vasilyev REGRESSION (r196741): Web Inspector: Bottom section of Layers sidebar is 1px shorter than the console prompt https://bugs.webkit.org/show_bug.cgi?id=154773 Reviewed by Timothy Hatcher. * UserInterface/Views/LayerTreeDetailsSidebarPanel.css: (.sidebar > .panel.details.layer-tree > .content): (.panel.details.layer-tree .bottom-bar): 2016-02-26 Devin Rousso Web Inspector: Option-clicking on the a CSS property sometimes doesn't work https://bugs.webkit.org/show_bug.cgi?id=154384 Reviewed by Timothy Hatcher. It seems as though there were race conditions between CodeMirror's event and the native mousemove such that if CodeMirror fired second, the current candidate was cleared, and would not reset itself until the cursor was moved, at which point the same issue could happen. To fix this, the current candidate is no longer cleared by CodeMirror's event and is instead only modified by the native mouse-events. * UserInterface/Controllers/CodeMirrorTokenTrackingController.js: (WebInspector.CodeMirrorTokenTrackingController.prototype._hidePopover): 2016-02-22 Matt Baker Web Inspector: Timelines sidebar and overview attempt to access undefined properties when FPS instrument is absent https://bugs.webkit.org/show_bug.cgi?id=154567 Reviewed by Joseph Pecoraro. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview): The viewMode property should be in a valid state before attempting to access the current view mode settings. * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel.prototype.get minimumWidth): (WebInspector.TimelineSidebarPanel.prototype._updateViewModeIfNeeded): (WebInspector.TimelineSidebarPanel): Added missing checks for FPSInstrument support. 2016-02-22 Nikita Vasilyev REGRESSION (r196620): Web Inspector: Filter bar in the left sidebar is 1px shorter than the console prompt https://bugs.webkit.org/show_bug.cgi?id=154529 Reviewed by Timothy Hatcher. * UserInterface/Views/NavigationSidebarPanel.css: (.sidebar > .panel.navigation > .overflow-shadow): 2016-02-20 Devin Rousso Web Inspector: Opacity slider thumb sometimes goes past the bar in Visual Styles sidebar https://bugs.webkit.org/show_bug.cgi?id=154497 Reviewed by Timothy Hatcher. Since WebInspector.Slider uses CSS transforms to move the slider knob along the track, if the width of the track changes then the position of the knob would stay the same since it was translated instead of adjusting its position relative to the new width. * UserInterface/Views/Slider.js: (WebInspector.Slider.prototype.recalculateKnobX): Resets the maxX value to 0 to ensure that a new maxX is calculated with the current width. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set specifiedWidth): Deleted. (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.recalculateWidth): * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange): (WebInspector.VisualStyleDetailsPanel.prototype._updateProperties): (WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection): * UserInterface/Views/VisualStyleUnitSlider.js: (WebInspector.VisualStyleUnitSlider.prototype.recalculateWidth): 2016-02-20 Devin Rousso Web Inspector: Visual Styles: Modifying background expands Font section https://bugs.webkit.org/show_bug.cgi?id=154491 Reviewed by Timothy Hatcher. When the user selects a new style, the Visual sidebar examines the property editors in each subsection to see if any have a value and expands/collapses the subsection accordingly. This issue was happening because that logic was also being triggered when the user didn't select a new style, which is controlled by DOMNodeStyles and the significantChange value in refresh(). * UserInterface/Base/Utilities.js: (String.prototype.toCamelCase): Added utility function to transform a string into a camel-cased version. * UserInterface/Models/DOMNodeStyles.js: (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Dropped unused variable and added checks to make sure doubly-matching styles don't count as a significant change and cause refreshes of the styles sidebar. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype._updateSections): If this function has an event, meaning it was triggered by a newly selected selector in the selector section, loop through each subsection and perform the logic described above, but instead only to open sections. (WebInspector.VisualStyleDetailsPanel.prototype._generateSection.replaceDashWithCapital): Deleted. (WebInspector.VisualStyleDetailsPanel.prototype._updateProperties): Removed logic that was already being called by _sectionModified(). 2016-02-20 Devin Rousso Web Inspector: Text Align segmented control blinks while editing other properties in Visual Styles sidebar https://bugs.webkit.org/show_bug.cgi?id=154487 Reviewed by Timothy Hatcher. The icon list property editor blinking issue was caused by the fact that the selected value was toggled on/off each time the value was set on the editor. In order to prevent this, the logic for the setter value() was modified to just match a keyword icon to the given value and select it. * UserInterface/Views/VisualStyleKeywordIconList.js: (WebInspector.VisualStyleKeywordIconList.prototype.set value): (WebInspector.VisualStyleKeywordIconList.prototype._handleKeywordChanged): 2016-02-20 Nikita Vasilyev Web Inspector: Placeholder text in Visual Styles sidebar table row should be white https://bugs.webkit.org/show_bug.cgi?id=154488 Reviewed by Timothy Hatcher. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css: (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle): 2016-02-19 Nikita Vasilyev Web Inspector: Inherited selector rows have text too low https://bugs.webkit.org/show_bug.cgi?id=154489 Reviewed by Timothy Hatcher. * UserInterface/Views/VisualStyleSelectorSection.css: (.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider): 2016-02-19 Devin Rousso Web Inspector: Color picker in Visual Styles sidebar should not default to zero alpha https://bugs.webkit.org/show_bug.cgi?id=154474 Reviewed by Timothy Hatcher. * UserInterface/Views/InlineSwatch.js: (WebInspector.InlineSwatch.prototype._fallbackValue): Changed the fallback value for color from transparent to white so that the color picker starts out with an alpha value of 1. (WebInspector.InlineSwatch.prototype._handleContextMenuEvent): Prevents context menu events from having an effect if there is no value for them to modify. 2016-02-18 Devin Rousso Web Inspector: Styles Sidebar focus jumps when trying to edit a color https://bugs.webkit.org/show_bug.cgi?id=154404 Reviewed by Timothy Hatcher. Clicking an inline swatch in the CSS Rules sidebar causes any focused editor, if any, to become blurred and therefore fire its handler function. This causes an issue because when a CodeMirror instance in the styles sidebar becomes blurred, it is possible for the entire Rules sidebar to refresh and recreate all of the sections (r187714), meaning that it will reselect whatever editor was previously selected before the refresh, causing the swatch popup to be blurred and therefore dismiss. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorBlurActiveEditor): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.createSwatch): (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchBeforeClicked): Add listener for new event and call to delegate function for handling it. * UserInterface/Views/InlineSwatch.js: (WebInspector.InlineSwatch.prototype._swatchElementClicked): Now fires an event before the clicked logic happens, but still after the click event is fired on the element. * UserInterface/Views/RulesStyleDetailsPanel.js: (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionBlurActiveEditor): Clears the previously focused editor so when a reset happens no editor is refocused. 2016-02-18 Joseph Pecoraro Web Inspector: Add Native Parameter Lists to Console prototype functions https://bugs.webkit.org/show_bug.cgi?id=154419 Reviewed by Timothy Hatcher. * UserInterface/Models/NativeFunctionParameters.js: 2016-02-18 Nikita Vasilyev Web Inspector: Align console prompt with execution context selector https://bugs.webkit.org/show_bug.cgi?id=154381 Reviewed by Timothy Hatcher. * UserInterface/Views/QuickConsole.css: (.quick-console > .console-prompt > .CodeMirror): (.quick-console .execution-context): 2016-02-18 Devin Rousso Web Inspector: Storage tab navigation bar should fit on a single line https://bugs.webkit.org/show_bug.cgi?id=152473 Reviewed by Timothy Hatcher. * UserInterface/Base/Utilities.js: (Number.constrain): Reworked logic to ensure that the returned value is never less than the given minimum value. 2016-02-17 Devin Rousso Web Inspector: In the styles sidebar, Option-clicking on --css-variable should jump to its definition https://bugs.webkit.org/show_bug.cgi?id=154082 Reviewed by Timothy Hatcher. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked.showRangeInSourceCode): (WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked): Now tests to see if the highlighted token was a CSS variable and if so, attempts to show the declaration of the CSS variable instead of the location where it is used. 2016-02-17 Nikita Vasilyev REGRESSION (r196620): Web Inspector: DataGrid headers and resizers are misaligned when the scrollbar is visible https://bugs.webkit.org/show_bug.cgi?id=154280 Reviewed by Timothy Hatcher. Revert back to "overflow-y: overlay". * UserInterface/Views/DataGrid.css: (.data-grid .data-container): * UserInterface/Views/DatabaseContentView.css: (.storage-view.query): 2016-02-17 Nikita Vasilyev REGRESSION (r196620): Web Inspector: When the scrollbars are always visible, the console prompt is 1px taller https://bugs.webkit.org/show_bug.cgi?id=154328 Introduce a CSS variable to ensure that the quick console is the same height as the bottom right section of the styles sidebar. Reviewed by Timothy Hatcher. * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content ~ .options-container): (.sidebar > .panel.details.css-style > .content ~ .class-list-container): * UserInterface/Views/QuickConsole.css: (.quick-console): * UserInterface/Views/Variables.css: (:root): 2016-02-17 Devin Rousso Web Inspector: Add Context menu separators to Styles sidebar https://bugs.webkit.org/show_bug.cgi?id=154360 Reviewed by Joseph Pecoraro. In the Styles sidebar, there are three main sections for the context menu: - Copy and Duplicate/Show-source - Add pseudo-class rules - Add/Select pseudo-element rules These three sections were all put together in the same context menu, which was very crowded as a result. Separators have been added to make it so that these three sections are now separated and clearly show their different uses. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent): 2016-02-17 Matt Baker Web Inspector: add CSS variables for common border/background colors https://bugs.webkit.org/show_bug.cgi?id=154302 Reviewed by Timothy Hatcher. Added CSS variables for commonly used border and background colors, and removed duplicate CSS variables with less generic names. Inactive border colors declared in rules with a body.window-inactive selector have been removed. A new rule using this selector in Variables.css sets "--border-color" to the inactive color. * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content > .pseudo-classes): (.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)): (.sidebar > .panel.details.css-style > .content.filter-in-progress .style-declaration-section:not(.filter-section-has-label)): * UserInterface/Views/DataGrid.css: (.data-grid.inline): (.data-grid th): (.data-grid :matches(th, td):not(:last-child)): (body.window-inactive .data-grid th): Deleted. (body.window-inactive .data-grid :matches(th, td):not(:last-child)): Deleted. * UserInterface/Views/DebuggerSidebarPanel.css: (.sidebar > .panel.navigation.debugger.paused .details-section.scripts): * UserInterface/Views/DetailsSection.css: (.details-section): (.details-section .details-section:first-child): (.details-section > .header): (.details-section > .content > .group): (.details-section > .content > .group:nth-child(even) > .row:matches(.simple:first-child > *, :not(.simple):first-child)): * UserInterface/Views/FilterBar.css: (.filter-bar): * UserInterface/Views/FindBanner.css: (.find-banner): (body.window-inactive .find-banner): Deleted. * UserInterface/Views/LayerTreeDetailsSidebarPanel.css: (.panel.details.layer-tree .bottom-bar): * UserInterface/Views/Main.css: (body.docked.bottom): (body.docked.right): (#split-content-browser): (#split-content-browser > .navigation-bar): (body.window-inactive.docked.bottom): Deleted. (body.window-inactive.docked.right): Deleted. (body.window-inactive #split-content-browser): Deleted. * UserInterface/Views/MemoryCategoryView.css: (.memory-category-view): (.memory-category-view > .details): (body.window-inactive .memory-category-view): Deleted. (body.window-inactive .memory-category-view > .details): Deleted. * UserInterface/Views/MemoryTimelineView.css: (.timeline-view.memory): (.timeline-view.memory > .content > .overview): (.timeline-view.memory > .content > .details > .subtitle): (.timeline-view.memory > .content > .overview > .divider): (body.window-inactive .timeline-view.memory): Deleted. (body.window-inactive .timeline-view.memory > .content > .overview): Deleted. (body.window-inactive .timeline-view.memory > .content > .details > .subtitle): Deleted. (body.window-inactive .timeline-view.memory > .content > .overview > .divider): Deleted. * UserInterface/Views/NavigationBar.css: (.navigation-bar): (body.window-inactive .navigation-bar): Deleted. * UserInterface/Views/NavigationSidebarPanel.css: (.sidebar > .panel.navigation > .overflow-shadow): (body.window-inactive .sidebar > .panel.navigation > .overflow-shadow): Deleted. * UserInterface/Views/NetworkSidebarPanel.css: (.sidebar > .panel.navigation.network > .title-bar): (body.window-inactive .sidebar > .panel.navigation.network > .title-bar): Deleted. * UserInterface/Views/OverviewTimelineView.css: (.timeline-view.overview > .timeline-ruler > .header): (body.window-inactive .timeline-view.overview > .timeline-ruler > .header): Deleted. * UserInterface/Views/QuickConsole.css: (.quick-console): (body.window-inactive .quick-console): Deleted. * UserInterface/Views/Sidebar.css: (.sidebar): (.sidebar.left): (.sidebar.right): (body.window-inactive .sidebar.left): Deleted. (body.window-inactive .sidebar.right): Deleted. * UserInterface/Views/TimelineDataGrid.css: (.data-grid.timeline th): (body.window-inactive .data-grid.timeline th): Deleted. * UserInterface/Views/TimelineRuler.css: (.timeline-ruler > .header): (body.window-inactive .timeline-ruler > .header): Deleted. * UserInterface/Views/TimelineSidebarPanel.css: (.sidebar > .panel.navigation.timeline > .title-bar): (.sidebar > .panel.navigation.timeline > .title-bar.timeline-events): (body.window-inactive .sidebar > .panel.navigation.timeline > .title-bar): Deleted. (body.window-inactive .sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted. * UserInterface/Views/Toolbar.css: (body.latest-mac .toolbar .dashboard-container): * UserInterface/Views/Variables.css: (:root): (body.window-inactive *): * UserInterface/Views/VisualStyleSelectorSection.css: (.details-section.visual-style-selector-section:not(.collapsed) > .header): (.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider): 2016-02-17 Matt Baker Web Inspector: Add singular and plural cases for "Ignore n times before stopping" label in breakpoint editor https://bugs.webkit.org/show_bug.cgi?id=154335 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: Added string for singular ignore count. * UserInterface/Controllers/BreakpointPopoverController.js: (WebInspector.BreakpointPopoverController.prototype._createPopoverContent): Remove unused variable "this._ignoreCount" and update ignore count text. (WebInspector.BreakpointPopoverController.prototype._popoverIgnoreInputChanged): Update ignore count text as value changes. (WebInspector.BreakpointPopoverController.prototype._updateIgnoreCountText): Set singular text when count === 1, otherwise set plural text. 2016-02-16 Nikita Vasilyev REGRESSION (r196620): Web Inspector: Selecting last message in the console makes the scrollbar visible https://bugs.webkit.org/show_bug.cgi?id=154326 Reviewed by Timothy Hatcher. * UserInterface/Views/LogContentView.css: (.console-item.selected::after): Make sure the selected message marker (blue vertical line) doesn't go over the content view. 2016-02-16 Joseph Pecoraro JSContext Inspector: Support for inline source maps https://bugs.webkit.org/show_bug.cgi?id=154303 Reviewed by Timothy Hatcher. * UserInterface/Base/URLUtilities.js: (parseDataURL): Break a data URL into components. * UserInterface/Controllers/SourceMapManager.js: (WebInspector.SourceMapManager.prototype._loadAndParseSourceMap): Handle a data URL without using NetworkAgent. Also move references to a main frame after checking for NetworkAgent. * UserInterface/Models/SourceMap.js: (WebInspector.SourceMap.prototype.get sourceMappingBasePathURLComponents): * UserInterface/Models/SourceMapResource.js: (WebInspector.SourceMapResource.prototype.get sourceMapDisplaySubpath): Handle JavaScript debuggable script URLs which may not be complete URLs. (WebInspector.SourceMapResource.prototype.requestContentFromBackend): Also handle if NetworkAgent does not exist. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): When connected to a JavaScript debuggable we were hiding disclosure triangles as we did not expect resources to have subresources. If a SourceMap is added, show them again. 2016-02-16 Nikita Vasilyev Web Inspector: Increase the width of the find banner's search field https://bugs.webkit.org/show_bug.cgi?id=154284 Reviewed by Timothy Hatcher. * UserInterface/Views/FindBanner.css: (.find-banner > input[type="search"]): Keep the minimum width the same as the current width. (body .find-banner.console-find-banner): Overwrite ".navigation-bar .item {flex-wrap: nowrap}". 2016-02-15 Nikita Vasilyev Web Inspector: Non-overlay scrollbars obscure the ends of lines in the console and sidebars https://bugs.webkit.org/show_bug.cgi?id=154276 Reviewed by Timothy Hatcher. * UserInterface/Views/DataGrid.css: (.data-grid .data-container): * UserInterface/Views/DatabaseContentView.css: (.storage-view.query): * UserInterface/Views/LogContentView.css: (.content-view.log): Replace all occurrences of "overflow-y: overlay" with "overflow-y: auto". 2016-02-15 Devin Rousso Web Inspector: Visual sidebar minor regression fixes https://bugs.webkit.org/show_bug.cgi?id=154237 Reviewed by Timothy Hatcher. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css: (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder): Do not display the placeholder, as it is not used in comma separated value property editors. (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle::before): (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle): Deleted. Added ::before to get rid of the "-" on subtitle elements (r196266). * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange): Recalculates the width for all comma separated value elements (r196266). (WebInspector.VisualStyleDetailsPanel.prototype._updateSections): Only open/close sections with properties that have values when a new node or selector item is selected. (WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection): Make copies of the default unit lists to prevent modifying the values used later in other sections (r194728). 2016-02-15 Matt Baker Web Inspector: eliminate the linear and rendering frames TimelineOverview subclasses https://bugs.webkit.org/show_bug.cgi?id=154000 Reviewed by Timothy Hatcher. This patch eliminates the TimelineOverview subclasses, and moves logic for switching between a time-based or frame-based graph into the overview itself. The values of the overview's start time, current time, and end time now match the values in the timeline recording regardless of the current view mode. When viewing the rendering frames graph, the recording times are ignored and all frames are included. The overview maintains separate zoom level and ruler selection settings for each view mode. * UserInterface/Main.html: * UserInterface/Views/LinearTimelineOverview.js: Removed. * UserInterface/Views/RenderingFrameTimelineOverview.js: Removed. Removed TimelineOverview subclasses. * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js: (WebInspector.RenderingFrameTimelineOverviewGraph.prototype.get height): Set FPS graph height to 108 pixels. * UserInterface/Views/TimelineOverview.css: (.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:nth-child(even)): (.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:not(:first-child)): (.timeline-overview > .graphs-container > .timeline-overview-graph:nth-child(even)): Deleted. (.timeline-overview > .graphs-container > .timeline-overview-graph:not(:first-child)): Deleted. Disable alternating graph styles when showing FPS instrument. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview): Create separate settings for timelines and FPS view modes. (WebInspector.TimelineOverview.prototype.get viewMode): (WebInspector.TimelineOverview.prototype.set viewMode): (WebInspector.TimelineOverview.prototype.set startTime): Adjust the current ruler selection when start time changes. Not necessary when showing the FPS instrument, which doesn't have a start time. (WebInspector.TimelineOverview.prototype.get secondsPerPixel): (WebInspector.TimelineOverview.prototype.set secondsPerPixel): Now a wrapper around the corresponding view mode setting. (WebInspector.TimelineOverview.prototype.set pixelAlignDuration): (WebInspector.TimelineOverview.prototype.get scrollStartTime): (WebInspector.TimelineOverview.prototype.set scrollStartTime): Now a wrapper around the corresponding view mode setting. (WebInspector.TimelineOverview.prototype.get visibleDuration): (WebInspector.TimelineOverview.prototype.get height): Return the sum height of all visible overview graphs. (WebInspector.TimelineOverview.prototype.shown): Show overview graphs for the current view mode. (WebInspector.TimelineOverview.prototype.hidden): (WebInspector.TimelineOverview.prototype.reset): (WebInspector.TimelineOverview.prototype.recordWasFiltered): (WebInspector.TimelineOverview.prototype.selectRecord): (WebInspector.TimelineOverview.prototype.updateLayoutIfNeeded): (WebInspector.TimelineOverview.prototype.layout): Layout for both view modes is largely identical, and differs only in the treatment of the overview's start time, current time, and end time. Time-based instruments use time values from the recording, while the FPS instrument has a fixed start time of zero, and a current and end time pinned to the last rendering frame. (WebInspector.TimelineOverview.prototype._handleScrollEvent): (WebInspector.TimelineOverview.prototype._handleWheelEvent): (WebInspector.TimelineOverview._handleGestureStart): (WebInspector.TimelineOverview.prototype._handleGestureChange): (WebInspector.TimelineOverview.prototype._instrumentAdded): (WebInspector.TimelineOverview.prototype._instrumentRemoved): (WebInspector.TimelineOverview.prototype._timelineRulerMouseClicked): (WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged): Save the selection for the current view mode. (WebInspector.TimelineOverview.prototype._recordSelected): (WebInspector.TimelineOverview.prototype._resetSelection.reset): (WebInspector.TimelineOverview.prototype._resetSelection): (WebInspector.TimelineOverview.prototype._canShowTimelineType): (WebInspector.TimelineOverview.prototype._viewModeDidChange): Sets zoom level, ruler selection, and graph visibility based on current view mode. (WebInspector.TimelineOverview.prototype._createViewModeSettings): Helper function for creating an object to track the zoom level and ruler selection of each view mode. (WebInspector.TimelineOverview.prototype.get _currentSettings): Internal getter for retrieving the settings for the current view mode. (WebInspector.TimelineOverview.prototype.canShowTimeline): Deleted. Not needed now that the overview contains all timelines. * UserInterface/Views/TimelineOverviewGraph.js: (WebInspector.TimelineOverviewGraph): (WebInspector.TimelineOverviewGraph.prototype.shown): (WebInspector.TimelineOverviewGraph.prototype.hidden): Toggle CSS hidden class. * UserInterface/Views/TimelineRecordFrame.js: No need to query offsetHeight now that TimelineOverviewGraph has a height property. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView): Create a single timeline overview. (WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight): (WebInspector.TimelineRecordingContentView.prototype.shown): (WebInspector.TimelineRecordingContentView.prototype.hidden): (WebInspector.TimelineRecordingContentView.prototype.recordWasFiltered): (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange): Update the timeline overview's mode based on the current timeline view. (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange): (WebInspector.TimelineRecordingContentView.prototype._updateTimes): Removed special handling for the FPS overview. Removed selection start time adjustment, which is now handled internally by TimelineOverview. (WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight): (WebInspector.TimelineRecordingContentView.prototype._recordingReset): (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged): (WebInspector.TimelineRecordingContentView.prototype._updateFrameSelection): * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel): (WebInspector.TimelineSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): (WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie): (WebInspector.TimelineSidebarPanel.prototype._renderingFrameTimelineTimesUpdated): (WebInspector.TimelineSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange): Refresh the view mode when the content view changes. (WebInspector.TimelineSidebarPanel.prototype._recordingSelected): (WebInspector.TimelineSidebarPanel.prototype._viewModeSelected): (WebInspector.TimelineSidebarPanel.prototype._viewModeForTimeline): (WebInspector.TimelineSidebarPanel.prototype._updateViewModeIfNeeded): Sync the tree outline, frames chart, and navigation bar with the current view mode. (WebInspector.TimelineSidebarPanel.prototype.shown): Refreshing the frame selection is unnecessary. It's updated by the recording content view whenever the ruler selection changes. (WebInspector.TimelineSidebarPanel.prototype.get viewMode): Deleted. No longer public, since the timeline overview now owns the view mode. Internally the sidebar still tracks the current state so it can determine when the value has changed. (WebInspector.TimelineSidebarPanel.prototype.showTimelineOverview): (WebInspector.TimelineSidebarPanel.prototype.showTimelineViewForTimeline): The sidebar should only be synced to the overview after the content view has changed. (WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection): Removed unnecessary assertion. (WebInspector.TimelineSidebarPanel.prototype._changeViewMode): Deleted. Replaced by _updateViewModeIfNeeded. 2016-02-15 Timothy Hatcher Web Inspector: Show inherited CSS variables in the Style sidebar https://bugs.webkit.org/show_bug.cgi?id=154215 rdar://problem/24644058 Reviewed by Joseph Pecoraro. * UserInterface/Models/CSSProperty.js: (WebInspector.CSSProperty.isInheritedPropertyName): Added. (WebInspector.CSSProperty.prototype.update): Use WebInspector.CSSProperty.isInheritedPropertyName. * UserInterface/Models/DOMNodeStyles.js: (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): Use WebInspector.CSSProperty.isInheritedPropertyName. 2016-02-15 Timothy Hatcher Web Inspector: Sidebars are defaulting to their minimum width, instead of a good width https://bugs.webkit.org/show_bug.cgi?id=154218 rdar://problem/24644192 Reviewed by Joseph Pecoraro. * UserInterface/Views/SidebarPanel.js: (WebInspector.SidebarPanel): Default the setting value to 300 instead of 0, so the minimum isn't used. 2016-02-15 Timothy Hatcher Web Inspector: CSS variables are not formatted correctly https://bugs.webkit.org/show_bug.cgi?id=154217 rdar://problem/24644154 Reviewed by Joseph Pecoraro. * UserInterface/Views/CodeMirrorFormatters.js: (newlineBeforeToken): Check for `variable-2` token in the `maybeprop` state. 2016-02-15 Timothy Hatcher Web Inspector: CodeMirror styles needs updated for CSS variables https://bugs.webkit.org/show_bug.cgi?id=154216 rdar://problem/24644146 Reviewed by Joseph Pecoraro. * UserInterface/Views/SyntaxHighlightingDefaultTheme.css: (.cm-s-default .cm-m-css:matches(.cm-atom, .cm-meta, .cm-variable-2, .cm-variable-3, .cm-property)): Added .cm-variable-2. (.cm-s-default .basic-block-has-not-executed.cm-m-css:matches(.cm-atom, .cm-meta, .cm-variable-2, .cm-variable-3, .cm-property)): Ditto. 2016-02-13 Dan Bernstein Removed the unused Frameworks group. Rubber-stamped by Sam Weinig. * WebInspectorUI.xcodeproj/project.pbxproj: 2016-02-13 Devin Rousso Web Inspector: DataGrid Header Cells should have Context Menu for Sorting https://bugs.webkit.org/show_bug.cgi?id=154050 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid.prototype.set sortOrder): (WebInspector.DataGrid.prototype._toggledSortOrder): Returns the opposite sort order from the current order. (WebInspector.DataGrid.prototype._selectSortColumnAndSetOrder): Changes the selected column to the one with the specified identifier and then switches the sort order to the given order. (WebInspector.DataGrid.prototype._headerCellClicked): Moved logic for switching cells/sort-order to a separate function for better reusability. (WebInspector.DataGrid.prototype._contextMenuInHeader): Adds context menu items on DataGrid header items to change the current sort order to the specified order. If the context menu is on the selected header item, only show the sort order that is not currently applied. 2016-02-12 Joseph Pecoraro Web Inspector: Rename domAgent to domTreeManager in DOMNode https://bugs.webkit.org/show_bug.cgi?id=154194 Reviewed by Timothy Hatcher. * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode): 2016-02-12 Joseph Pecoraro Web Inspector: Avoid including ESLint until it is used https://bugs.webkit.org/show_bug.cgi?id=154196 Reviewed by Timothy Hatcher. * Scripts/copy-user-interface-resources.pl: Do not include ESLint in optimized output yet. * UserInterface/Controllers/AnalyzerManager.js: Do not reference `eslint` until we use it. * UserInterface/Main.html: Remove include to ESLint until we need it. 2016-02-12 Joseph Pecoraro Web Inspector: Tabs: Conflicts with multiple Formatters per SourceCode https://bugs.webkit.org/show_bug.cgi?id=144717 Reviewed by Timothy Hatcher. The underlying issue here is that each tab may create its own ContentView, and therefore SourceCodeTextEditor, per-SourceCode. Each SourceCodeTextEditor was mutating the SourceCode's state without listening for or expecting updates from the other. This causes a bunch of different issues: - editing in one tab does not get reflected in another tab for the same resource. This is common when using the Search tab to find and make an edit, then debug in another tab. - one tab may auto format (pretty print) a resource and set the formatter on the SourceCode to make SourceCodeLocations know about formatted locations. However, a jump to location that opens a new ContentView for the same Resource will start out un-formatted, and misunderstand the location. This often results in an unexpected jump to 0:0. The solution taken by this change is to have a single ContentView per represented object. When that ContentView gets shown in a new ContentViewContainer it gets transferred, leaving a tombstone in the previous ContentViewContainer that can be revived later. This keeps back foward lists with expected values. It also means there is a single ContentView that doesn't need to worry about having the state of its represented object getting overrun. Currently this makes the assumption that we won't ever show multiple ContentViews for the same represented object at the same time. This may need to change if we were to support split pane editor or something like that. This also makes the assumption that ContentViewContainer's showEntry and hideEntry do not modify the back forward list. That has not been the case, and I think it is safe to assume it will never be the case. The contracts this patch maintains: - a ContentView is always owned by one ViewContainer. This ViewContainer is the one showing the ContentView. - when another ViewContainer wants to share the ContentView ownership is transferred. Creating tombstones in the old ViewContainer and Reviving tombstones in the new ViewContainer. - ViewContainer's have a tombstone per-BackForwardEntry that references the ContentView. - In order to ensure a ContentView always gets closed, when the owning ViewContainer would close the ContentView it checks if it should instead transfer ownership of the ContentView to another interested ViewContainer. This also maintains the contract that a ContentView should only be closed once. When the ContentView is transferred between two ContentViewContainers it should hide/show from the old to the new. The last ContentViewContainer to reference a ContentView should be the one to close the ContentView. * UserInterface/Models/BackForwardEntry.js: (WebInspector.BackForwardEntry): (WebInspector.BackForwardEntry.prototype.get tombstone): (WebInspector.BackForwardEntry.prototype.set tombstone): (WebInspector.BackForwardEntry.prototype.prepareToShow): (WebInspector.BackForwardEntry.prototype.prepareToHide): Tombstone state and assertions that we don't show/hide tombstones, that should all be done before a back forward entry has become a tombstone. * UserInterface/Views/ContentView.js: (WebInspector.ContentView.contentViewForRepresentedObject): (WebInspector.ContentView.closedContentViewForRepresentedObject): (WebInspector.ContentView.resolvedRepresentedObjectForRepresentedObject): Helpers for getting / creating / clearing the single ContentView that is associated with a represented object. * UserInterface/Views/ContentViewContainer.js: (WebInspector.ContentViewContainer.prototype.contentViewForRepresentedObject): (WebInspector.ContentViewContainer.prototype.showContentView): Eliminate code that dealt with multiple content views per represented object. That is replaced by multiple ContentViewContainers per ContentView. (WebInspector.ContentViewContainer.prototype.replaceContentView): This is called in special places where we don't need to worry about a tombstone. It is an in replace of a content view. (WebInspector.ContentViewContainer.closeAllContentViewsOfPrototype): (WebInspector.ContentViewContainer.prototype.closeContentView): (WebInspector.ContentViewContainer.prototype.closeAllContentViews): (WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Deal with closing BackForwardEntrys that are tombstones. (WebInspector.ContentViewContainer.prototype._takeOwnershipOfContentView): (WebInspector.ContentViewContainer.prototype._placeTombstonesForContentView): (WebInspector.ContentViewContainer.prototype._clearTombstonesForContentView): Helpers for transfering ownership of a ContentView to a ContentViewContainer. There is always one owner of the ContentView. Non-owners have tombstone BackForward entries. (WebInspector.ContentViewContainer.prototype._showEntry): If we are showing a tombstone, gain ownership. (WebInspector.ContentViewContainer.prototype._hideEntry): This may happen in closing, for simplicity we bail here instead of include messy logic at the call site. We would have already hidden this entry when making it a tombstone. 2016-02-11 Joseph Pecoraro Web Inspector: SourceCodeTextEditor close() generates removeEventListener warnings https://bugs.webkit.org/show_bug.cgi?id=154150 Reviewed by Timothy Hatcher. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.close): Remove the event listeners in the cases that we would have added them. If we have SourceMap information we should remove the key listener, and if we don't we should remove the SourceMapAdded listener. 2016-02-10 Timothy Hatcher Web Inspector: Add new icon for the Timeline Recording navigation bar item https://bugs.webkit.org/show_bug.cgi?id=154089 rdar://problem/24595652 Reviewed by Brian Burg. * UserInterface/Images/Stopwatch.png: Removed. * UserInterface/Images/Stopwatch@2x.png: Removed. * UserInterface/Images/Stopwatch.svg: Added. * UserInterface/Views/TimelineIcons.css: (.stopwatch-icon .icon): Use Stopwatch.svg. (body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon): Added for GTK+. 2016-02-10 Matt Baker Web Inspector: Switching actions in Edit Breakpoint popover causes a jerk https://bugs.webkit.org/show_bug.cgi?id=154093 Reviewed by Timothy Hatcher. Adjusted CodeMirror eval editor styles to match vanilla input field. * UserInterface/Views/BreakpointActionView.css: (.breakpoint-action-eval-editor): 2016-02-09 Joseph Pecoraro Regression: Web Inspector: Sometimes in Elements panel two elements showed as selected at the same time https://bugs.webkit.org/show_bug.cgi?id=149742 Reviewed by Timothy Hatcher. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype.moveChild): Since removing and re-adding this tree element may forgot its entire child tree, re-select the selected child that may have just been lost in the shuffle. * UserInterface/Views/TreeOutline.js: (WebInspector.TreeOutline.prototype._forgetTreeElement): When forgetting the selected tree element, also deselect the forgotten tree element so it clears its selected state. 2016-02-09 Joseph Pecoraro Web Inspector: Allow copying all headers in the request/response header tables https://bugs.webkit.org/show_bug.cgi?id=154048 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: New "Copy Table" string. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid): (WebInspector.DataGrid.prototype._contextMenuInHeader): Add context menu support for table header cells, and give them a "Copy Table" context menu if there is copyable data. (WebInspector.DataGrid.prototype._contextMenuInDataTable): Add "Copy Table" context menu for copyable rows. (WebInspector.DataGrid.prototype._copyTextForDataGridNode): (WebInspector.DataGrid.prototype._copyTextForDataGridHeaders): (WebInspector.DataGrid.prototype._copyTable): (WebInspector.DataGrid.prototype._hasCopyableData): Helpers for determining copyability and copying tab separated data. 2016-02-09 Joseph Pecoraro Web Inspector: localStorage inspector very slow on big values https://bugs.webkit.org/show_bug.cgi?id=123750 Reviewed by Timothy Hatcher. It is not useful to show very large strings in the DOM Storage DataGrid. This change truncates display strings to roughly 200 characters. If the developer really wants the full value of the string they can just access it through localStorage. * UserInterface/Models/DOMStorageObject.js: (WebInspector.DOMStorageObject.prototype.getEntries.innerCallback): (WebInspector.DOMStorageObject.prototype.getEntries): (WebInspector.DOMStorageObject.prototype.itemUpdated): Modernize. * UserInterface/Views/DOMStorageContentView.js: (WebInspector.DOMStorageContentView): (WebInspector.DOMStorageContentView.prototype.itemRemoved): Modernize. (WebInspector.DOMStorageContentView.prototype.itemAdded): (WebInspector.DOMStorageContentView.prototype.itemUpdated): (WebInspector.DOMStorageContentView.prototype._truncateValue): (WebInspector.DOMStorageContentView.prototype._populate): Whenever we get a value that we will display, truncate it to just 200 characters. 2016-02-09 Joseph Pecoraro Web Inspector: Expiration column in Storage tab can't be sorted https://bugs.webkit.org/show_bug.cgi?id=154043 Reviewed by Brian Burg. * UserInterface/Views/CookieStorageContentView.js: (WebInspector.CookieStorageContentView.prototype._sortDataGrid.expiresCompare): Sort Session as the shortest time, not the longest time. Use the cookie.expires date when sorting, not the locale string. 2016-02-09 Joseph Pecoraro Web Inspector: Limit max and min zoom factor of Inspector https://bugs.webkit.org/show_bug.cgi?id=154041 Reviewed by Brian Burg. Chose reasonable zoom levels that looked good to my eye and roughly matched Safari's page zoom levels. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): Do not implicitly prevent default for zoom in/out keyboard shortcuts to allow for a system beep if we do not do anything. (WebInspector._increaseZoom): (WebInspector._decreaseZoom): Do not go beyond a max or min zoom level. Prevent default in the case where we actually zoom, but don't prevent default where we do not actually zoom to cause a system beep. Allow for a slight drift of the floating point value as it increases / decreases by 0.2 at the different zoom factors. (WebInspector._resetZoom): (WebInspector._showTabAtIndex): Remove redundant prevent default calls, since it would happen implicitly for these keyboard shortcuts. 2016-02-08 Joseph Pecoraro Web Inspector: Uncaught exception merging script profiler records https://bugs.webkit.org/show_bug.cgi?id=154004 Reviewed by Brian Burg. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager.prototype._mergeScriptProfileRecords): Stop if we've merged all script profiler records. 2016-02-08 Joseph Pecoraro Web Inspector: Search doesn't seem to find text that is present in multiple places https://bugs.webkit.org/show_bug.cgi?id=154016 Reviewed by Brian Burg. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.get searchableScripts): * UserInterface/Views/SearchSidebarPanel.js: (WebInspector.SearchSidebarPanel.prototype.performSearch): Only search scripts with a URL. Don't search the potentially large number of anonymous scripts. 2016-02-08 Joseph Pecoraro Web Inspector: Zooming in on the timeline graph does not increase its time resolution from minutes https://bugs.webkit.org/show_bug.cgi?id=154013 Reviewed by Brian Burg. * UserInterface/Base/Utilities.js: (Number.secondsToString): Simplify logic and ensure that when under high resolution we don't go above seconds for our units. (Number.bytesToString): Simplify logic. * UserInterface/Views/LinearTimelineOverview.js: (WebInspector.LinearTimelineOverview): Reduce the rather large maximum seconds per pixel from 60 seconds per pixel to 2 seconds per pixel. This means when the user zooms out of a timeline they don't see such large time values. 2016-02-08 Joseph Pecoraro Web Inspector: Extract a few common unicode characters into global variables https://bugs.webkit.org/show_bug.cgi?id=154008 Reviewed by Timothy Hatcher. * UserInterface/Base/Utilities.js: Create global variables for `emDash` and `ellipsis` to use all over the tools. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._formatParameterAsTable): Deleted. * UserInterface/Views/DefaultDashboardView.js: (WebInspector.DefaultDashboardView.prototype._updateDisplay): * UserInterface/Views/HierarchicalPathComponent.js: (WebInspector.HierarchicalPathComponent.prototype._updateElementTitleAndText): (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption): (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement): * UserInterface/Views/HierarchicalPathNavigationItem.js: (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): * UserInterface/Views/LayerTreeDataGridNode.js: (WebInspector.LayerTreeDataGridNode.prototype.set layer): * UserInterface/Views/LayoutTimelineDataGridNode.js: (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent): (WebInspector.LayoutTimelineDataGridNode): * UserInterface/Views/MemoryCategoryView.js: (WebInspector.MemoryCategoryView.prototype._updateDetails): Deleted. (WebInspector.MemoryCategoryView): Deleted. * UserInterface/Views/MemoryTimelineView.js: (WebInspector.MemoryTimelineView.prototype._clearUsageLegend): (WebInspector.MemoryTimelineView.prototype._updateUsageLegend): (WebInspector.MemoryTimelineView.prototype._clearMaxComparisonLegend): (WebInspector.MemoryTimelineView.prototype._updateMaxComparisonLegend): * UserInterface/Views/MultipleScopeBarItem.js: (WebInspector.MultipleScopeBarItem.set scopeBarItems.createOption): (WebInspector.MultipleScopeBarItem.prototype.set scopeBarItems): * UserInterface/Views/ObjectPreviewView.js: (WebInspector.ObjectPreviewView.prototype._appendEntryPreviews): (WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews): * UserInterface/Views/ProfileNodeDataGridNode.js: (WebInspector.ProfileNodeDataGridNode.prototype.createCellContent): (WebInspector.ProfileNodeDataGridNode): * UserInterface/Views/RenderingFrameTimelineDataGridNode.js: (WebInspector.RenderingFrameTimelineDataGridNode.prototype.createCellContent): (WebInspector.RenderingFrameTimelineDataGridNode): * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Deleted. (WebInspector.ResourceDetailsSidebarPanel.prototype._valueForSize): Deleted. * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): * UserInterface/Views/ScriptTimelineDataGridNode.js: (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): (WebInspector.ScriptTimelineDataGridNode): * UserInterface/Views/SearchResultTreeElement.js: (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): * UserInterface/Views/TimelineDataGridNode.js: (WebInspector.TimelineDataGridNode.prototype.createCellContent): * UserInterface/Views/TypeTreeElement.js: (WebInspector.TypeTreeElement.prototype.onpopulate): * UserInterface/Views/TypeTreeView.js: (WebInspector.TypeTreeView.prototype._populate): (WebInspector.TypeTreeView): 2016-02-08 Joseph Pecoraro Web Inspector: โ‡งโŒ˜โ†’ when editing text in the Elements tree shouldn't switch inspector tab https://bugs.webkit.org/show_bug.cgi?id=154006 Reviewed by Timothy Hatcher. * UserInterface/Views/EditingSupport.js: (WebInspector.isEventTargetAnEditableField): Check the WebInspector's custom __editing state. 2016-02-08 Devin Rousso Web Inspector: Long values for comma separated CSS properties overflow the Visual sidebar area https://bugs.webkit.org/show_bug.cgi?id=153890 Reviewed by Timothy Hatcher. For especially long values in comma-separated CSS properties (such as background-image), the text will not be clipped as expected due to the way in which the width is calculated for the element (the value, inside the title element, is the only child with a specified width other than 100%). This overflowing causes the width of the section containing that property to expand, pushing content outside of the inspector window. To remedy this, a specified width is set on the relevant properties based on the width of the sidebar to ensure proper text clipping. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css: (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item.visual-style-font-family-list-item > .visual-style-comma-separated-keyword-item-editor): (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles): (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle): (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container): Deleted. (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list): Deleted. (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item): Deleted. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set specifiedWidth): Calculates the necessary subtractions from the given width value based on the margins and size of sibling elements. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype._updateProperties): (WebInspector.VisualStyleDetailsPanel.prototype._populateFontSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection): Added another list to each group which, if set, will pass the current sidebar width to all contained property editors. * UserInterface/Views/VisualStylePropertyEditor.js: (WebInspector.VisualStylePropertyEditor.prototype.update): Somewhat unrelated (r196146), but added another check to ensure that the CSS property exists before checking to see if it has an invalid value. 2016-02-08 Matt Baker Web Inspector: WebInspector.Setting should have a "reset" method https://bugs.webkit.org/show_bug.cgi?id=153971 Reviewed by Brian Burg. Currently UI needing to restore a setting to its default must retain a copy of the default value. This should be a basic operation of WebInspector.Setting. * UserInterface/Base/Setting.js: (WebInspector.Setting): (WebInspector.Setting.prototype.reset): Sets value to a copy of the default. 2016-02-06 Nikita Vasilyev REGRESSION (r195432): Web Inspector: bottom right section of the styles sidebar is 1px taller than the console prompt https://bugs.webkit.org/show_bug.cgi?id=153959 Reviewed by Timothy Hatcher. * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content ~ .options-container): (.sidebar > .panel.details.css-style > .content ~ .class-list-container):: Revert the height to what it used to be prior r195432. 2016-02-05 Devin Rousso Web Inspector: Visual Styles sidebar should be more forgiving to long labels https://bugs.webkit.org/show_bug.cgi?id=153927 Reviewed by Timothy Hatcher. If a label is too long for it's container, it overflows and is visible above the rest of the elements nearby. * UserInterface/Views/VisualStylePropertyEditor.css: (.visual-style-property-container > .visual-style-property-title): Adds text overflow to properties that extend beyond the container's width. * UserInterface/Views/VisualStylePropertyEditor.js: (WebInspector.VisualStylePropertyEditor): Now also adds the label value as a title attribute to the element, just in case the content overflows. 2016-02-05 Saam barati Web Inspector: Include SamplingProfiler's expression-level data for stack frames in the protocol https://bugs.webkit.org/show_bug.cgi?id=153455 Reviewed by Joseph Pecoraro. JSC has been collecting expression-level data in the sampling profiler, and with this patch, we now get that information in the inspector. With this information, we probably have all the data we need to make real heat maps. * UserInterface/Models/CallingContextTree.js: (WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace): (WebInspector.CCTNode): (WebInspector.CCTNode.prototype.findOrMakeChild): (WebInspector.CCTNode.prototype.addTimestampAndExpressionLocation): (WebInspector.CCTNode.prototype.addTimestamp): Deleted. 2016-02-05 Devin Rousso Web Inspector: Navigation bar in sidebars should always fit on a single line https://bugs.webkit.org/show_bug.cgi?id=153412 Reviewed by Timothy Hatcher. This happened because the allowed maximum width of the sidebar was greater than the minimum width derived from the currently visible sidebar. * UserInterface/Base/Utilities.js: (Number.constrain): Added logic to reverse the values of min and max if max is less than min. 2016-02-05 Timothy Hatcher Web Inspector: Don't wrap labels in Breakpoint Editor popover https://bugs.webkit.org/show_bug.cgi?id=153926 rdar://problem/24149542 Reviewed by Brian Burg. * UserInterface/Views/BreakpointPopoverController.css: (.popover .edit-breakpoint-popover-content > table > tr > th): Added white-space: nowrap. 2016-02-05 Devin Rousso Web Inspector: Replace all instances of '%s' with โ€œ%sโ€œ https://bugs.webkit.org/show_bug.cgi?id=153891 Reviewed by Timothy Hatcher. Switched all WebInspector.UIString() from using '' to โ€œโ€œ. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): * UserInterface/Views/VisualStylePropertyEditor.js: (WebInspector.VisualStylePropertyEditor.prototype.update): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon): 2016-02-05 Nikita Vasilyev REGRESSION (r193913): Web Inspector: Wrong z-index of inner sections https://bugs.webkit.org/show_bug.cgi?id=153914 Reviewed by Timothy Hatcher. * UserInterface/Views/DetailsSection.css: (.details-section .details-section > .header): 2016-02-05 Nikita Vasilyev Web Inspector: Decrease font-weight of inner sections https://bugs.webkit.org/show_bug.cgi?id=153913 Reviewed by Timothy Hatcher. * UserInterface/Views/DetailsSection.css: (.details-section .details-section > .header): 2016-02-04 Nikita Vasilyev Web Inspector: console.table background stripes are misaligned https://bugs.webkit.org/show_bug.cgi?id=152954 Reviewed by Timothy Hatcher. * UserInterface/Views/LogContentView.css: (.console-item .data-grid table.data): (.console-item .data-grid table.data tr:nth-child(even)): Replace CSS gradient that produces fixed height stripes with a rule that sets background only on even table rows. 2016-02-04 Joseph Pecoraro Unreviewed, follow-up fix to r196151 that removes some more images. * UserInterface/Images/Colors.png: Removed. * UserInterface/Images/Colors@2x.png: Removed. * UserInterface/Images/Network.png: Removed. * UserInterface/Images/Network@2x.png: Removed. * UserInterface/Images/Script.png: Removed. * UserInterface/Images/Script@2x.png: Removed. These images were supposed to also be removed. * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj: Also remove references to now removed images. 2016-02-04 Joseph Pecoraro Web Inspector: New timeline images for instruments https://bugs.webkit.org/show_bug.cgi?id=153884 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineTabContentView.js: (WebInspector.TimelineTabContentView.iconClassNameForTimeline): Better names and give Memory timeline a name for an icon. * UserInterface/Views/TreeOutline.css: (.tree-outline.large .item .icon): Add more padding next to large icons. * UserInterface/Images/ColorsLarge.png: Removed. * UserInterface/Images/ColorsLarge@2x.png: Removed. * UserInterface/Images/Frames.png: Removed. * UserInterface/Images/Frames@2x.png: Removed. * UserInterface/Images/LayoutInstrument.svg: Added. * UserInterface/Images/MemoryInstrument.svg: Added. * UserInterface/Images/NetworkInstrument.svg: Added. * UserInterface/Images/NetworkLarge.png: Removed. * UserInterface/Images/NetworkLarge@2x.png: Removed. * UserInterface/Images/RenderingFramesInstrument.svg: Added. * UserInterface/Images/ScriptLarge.png: Removed. * UserInterface/Images/ScriptLarge@2x.png: Removed. Remove old timeline pngs. * UserInterface/Images/ScriptsInstrument.svg: Added. * UserInterface/Views/TimelineIcons.css: (.network-icon .icon): (.script-icon .icon): (.memory-icon .icon): (.layout-icon .icon): (.rendering-frame-icon .icon): Use the new SVGs. (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): Fallback to old icons for non-Mac/Windows ports using Images/gtk images. 2016-02-04 Devin Rousso Web Inspector: Show error icons if invalid values already exist for properties in the Visual sidebar https://bugs.webkit.org/show_bug.cgi?id=153702 Reviewed by Timothy Hatcher. When CSS properties have invalid values, instead of displaying the computed value for that property in the Visual sidebar, show an error icon with the the invalid value. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/VisualStyleNumberInputBox.css: (.visual-style-property-container > .visual-style-property-value-container > .number-input-container > .number-input-value): (.visual-style-property-container > .visual-style-property-value-container > .visual-style-special-property-placeholder[hidden] ~ .number-input-container > .number-input-value): By default, do not allow any pointer events to interact with the input element. Instead, only allow interaction when the placeholder element is hidden to ensure that the user cannot add a value when the computed value is displayed. * UserInterface/Views/VisualStyleNumberInputBox.js: (WebInspector.VisualStyleNumberInputBox.prototype.set specialPropertyPlaceholderElementText): Reset the selected keyword to "Unchanged" since this is either a warning message or the computed value. * UserInterface/Views/VisualStylePropertyEditor.css: (.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency): (.visual-style-property-container > .visual-style-property-editor-warning.invalid-value): (.visual-style-property-container > .visual-style-property-editor-warning): * UserInterface/Views/VisualStylePropertyEditor.js: (WebInspector.VisualStylePropertyEditor): Replaced document.createElement with [element].createChild for simplicity. (WebInspector.VisualStylePropertyEditor.prototype.update): Before assigning the value of the property to the editor, check to see if the property is valid. If not, display an Error icon and message stating that the current value is invalid. (WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues): (WebInspector.VisualStylePropertyEditor.prototype.set specialPropertyPlaceholderElementText): Unhides the special placeholder element with the given text as its content. (WebInspector.VisualStylePropertyEditor.prototype._valueDidChange): (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies): (WebInspector.VisualStylePropertyEditor.prototype.addDependency): 2016-02-03 Joseph Pecoraro Web Inspector: JS PrettyPrinting unary - and + issues https://bugs.webkit.org/show_bug.cgi?id=134007 Reviewed by Timothy Hatcher. * UserInterface/Views/CodeMirrorFormatters.js: (shouldHaveSpaceBeforeToken): (shouldHaveSpaceAfterLastToken): (removeLastNewline): (modifyStateForTokenPre): (modifyStateForTokenPost): 2016-02-03 Dave Hyatt Add hanging-punctuation property to Web Inspector https://bugs.webkit.org/show_bug.cgi?id=153841 Reviewed by Zalan Bujtas. * UserInterface/Models/CSSKeywordCompletions.js: 2016-02-03 Joseph Pecoraro Web Inspector: Uncaught exception TimelineRuler.prototype.resize no longer exists https://bugs.webkit.org/show_bug.cgi?id=153839 Reviewed by Brian Burg. * UserInterface/Views/MemoryTimelineView.js: (WebInspector.MemoryTimelineView.prototype.shown): After r195995 the resize method was eliminated in favor of this approach. 2016-02-02 Joseph Pecoraro Uncaught Exception: TypeError: undefined is not an object (evaluating 'highlightedRange.from') https://bugs.webkit.org/show_bug.cgi?id=153685 Reviewed by Timothy Hatcher. * UserInterface/Controllers/CodeMirrorTokenTrackingController.js: (WebInspector.CodeMirrorTokenTrackingController.prototype.highlightRange): The highlighted range could have just gotten removed, in which case the marker would return undefined. Just bail in such cases. 2016-02-01 Joseph Pecoraro Web Inspector: Option+Up/Down should not move cursor outside of number https://bugs.webkit.org/show_bug.cgi?id=153784 Reviewed by Timothy Hatcher. * UserInterface/Views/CodeMirrorAdditions.js: When selectionStart === selectionEnd we were duplicating the movement mutation by performing it twice on the same object. After much experimentation, I left in the existing code path for handling mutation with a selection. It is not perfect, but it is better then just applying the ch diff. 2016-02-01 Joseph Pecoraro Web Inspector: High Level Memory Overview Instrument https://bugs.webkit.org/show_bug.cgi?id=153516 Reviewed by Brian Burg. Use the new "Memory" domain to track page memory size over time. This allows the timeline to help visualize total process memory broken down into a few different categories. The timeline graph allows seeing the total size over time, and you can drill in to a specific section and get a better breakdown and comparison of the different categories of memory that we currently track. * Localizations/en.lproj/localizedStrings.js: New UI strings. * UserInterface/Main.html: New files. * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Protocol/MemoryObserver.js: (WebInspector.MemoryObserver.prototype.trackingStart): (WebInspector.MemoryObserver.prototype.trackingUpdate): (WebInspector.MemoryObserver.prototype.trackingComplete): Add a memory observer. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager.defaultInstruments): (WebInspector.TimelineManager.prototype.memoryTrackingStart): (WebInspector.TimelineManager.prototype.memoryTrackingUpdate): (WebInspector.TimelineManager.prototype.memoryTrackingComplete): Create Memory timeline records from Memory tracking updates. * UserInterface/Models/MemoryCategory.js: (WebInspector.MemoryCategory): Consolidate some of the raw data of categories we get from the backend into a set of 4 user-facing categories. * UserInterface/Models/MemoryTimelineRecord.js: Added. (WebInspector.MemoryTimelineRecord): (WebInspector.MemoryTimelineRecord.memoryCategoriesFromProtocol): (WebInspector.MemoryTimelineRecord.prototype.get timestamp): (WebInspector.MemoryTimelineRecord.prototype.get categories): (WebInspector.MemoryTimelineRecord.prototype.get totalSize): (WebInspector.MemoryTimelineRecord.prototype.get startTime): (WebInspector.MemoryTimelineRecord.prototype.get endTime): Memory timeline record for the event data. * UserInterface/Models/MemoryInstrument.js: (WebInspector.MemoryInstrument): (WebInspector.MemoryInstrument.supported): (WebInspector.MemoryInstrument.prototype.get timelineRecordType): (WebInspector.MemoryInstrument.prototype.startInstrumentation): (WebInspector.MemoryInstrument.prototype.stopInstrumentation): Instrument to start / stop memory tracking. * UserInterface/Models/TimelineRecord.js: Add a new "Memory" Timeline type. * UserInterface/Views/ContentView.js: (WebInspector.ContentView.createFromRepresentedObject): * UserInterface/Models/TimelineRecording.js: (WebInspector.TimelineRecording): Add the new "Memory" Timeline. (WebInspector.TimelineRecording.prototype.addRecord): Memory timeline records do not show in the SourceCode Timelines Overview. * UserInterface/Views/CircleChart.css: (.circle-chart): (.circle-chart > svg > path.background): (.circle-chart > .center): * UserInterface/Views/CircleChart.js: Added. (WebInspector.CircleChart): (WebInspector.CircleChart.prototype.get element): (WebInspector.CircleChart.prototype.get points): (WebInspector.CircleChart.prototype.get size): (WebInspector.CircleChart.prototype.get centerElement): (WebInspector.CircleChart.prototype.get segments): (WebInspector.CircleChart.prototype.set segments): (WebInspector.CircleChart.prototype.get values): (WebInspector.CircleChart.prototype.set values): (WebInspector.CircleChart.prototype.clear): (WebInspector.CircleChart.prototype.needsLayout): (WebInspector.CircleChart.prototype.updateLayout): (WebInspector.CircleChart.prototype._needsLayout): (WebInspector.CircleChart.prototype._createCompleteCirclePathData): (WebInspector.CircleChart.prototype._createSegmentPathData): (WebInspector.CircleChart.prototype._updateLayout): Standalone circle "donut" chart, copied mostly from Rendering Frames Timeline. Initialize the chart's segments, then feed it a set of ([v1, v2, ...]) values corresponding to each of the segments. * UserInterface/Views/LineChart.js: Added. (WebInspector.LineChart): (WebInspector.LineChart.prototype.get element): (WebInspector.LineChart.prototype.get points): (WebInspector.LineChart.prototype.get size): (WebInspector.LineChart.prototype.set size): (WebInspector.LineChart.prototype.addPoint): (WebInspector.LineChart.prototype.clear): (WebInspector.LineChart.prototype.needsLayout): (WebInspector.LineChart.prototype.updateLayout): (WebInspector.LineChart.prototype._needsLayout): (WebInspector.LineChart.prototype._updateLayout): Standalone line chart. Uses a single SVG path, given a set of (x, y) points. * UserInterface/Views/StackedLineChart.js: Added. (WebInspector.StackedLineChart): (WebInspector.StackedLineChart.prototype.get element): (WebInspector.StackedLineChart.prototype.get points): (WebInspector.StackedLineChart.prototype.get size): (WebInspector.StackedLineChart.prototype.set size): (WebInspector.StackedLineChart.prototype.initializeSections): (WebInspector.StackedLineChart.prototype.addPointSet): (WebInspector.StackedLineChart.prototype.clear): (WebInspector.StackedLineChart.prototype.needsLayout): (WebInspector.StackedLineChart.prototype.updateLayout): (WebInspector.StackedLineChart.prototype._needsLayout): (WebInspector.StackedLineChart.prototype._updateLayout): Standalone stacked line chart. Initialize the chart's sections, then feed it a set of (x, [y1, y2 ...]) points where the y values correspond to each of the sections. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview.prototype.get scrollContainerWidth): Add a way to get this value without forcing layout all the time. * UserInterface/Views/TimelineTabContentView.js: (WebInspector.TimelineTabContentView.displayNameForTimeline): (WebInspector.TimelineTabContentView.iconClassNameForTimeline): (WebInspector.TimelineTabContentView.genericClassNameForTimeline): (WebInspector.TimelineTabContentView.iconClassNameForRecord): (WebInspector.TimelineTabContentView.displayNameForRecord): Add placeholders for the new Memory Timeline Type. * UserInterface/Views/MemoryCategoryView.css: (.memory-category-view): (.memory-category-view > .details): (.memory-category-view > .details > .name): (.memory-category-view > .graph): * UserInterface/Views/MemoryCategoryView.js: Added. (WebInspector.MemoryCategoryView): (WebInspector.MemoryCategoryView.prototype.get element): (WebInspector.MemoryCategoryView.prototype.get category): (WebInspector.MemoryCategoryView.prototype.clear): (WebInspector.MemoryCategoryView.prototype.layoutWithDataPoints): (WebInspector.MemoryCategoryView.prototype._updateDetails): * UserInterface/Views/MemoryTimelineOverviewGraph.css: (body .timeline-overview > .graphs-container > .timeline-overview-graph.memory): (.timeline-overview-graph.memory): (.timeline-overview-graph.memory > .legend): (.timeline-overview-graph.memory > .stacked-line-chart > svg > path.javascript): (.timeline-overview-graph.memory > .stacked-line-chart > svg > path.images): (.timeline-overview-graph.memory > .stacked-line-chart > svg > path.layers): (.timeline-overview-graph.memory > .stacked-line-chart > svg > path.page): * UserInterface/Views/MemoryTimelineOverviewGraph.js: Added. (WebInspector.MemoryTimelineOverviewGraph): (WebInspector.MemoryTimelineOverviewGraph.prototype.get height): (WebInspector.MemoryTimelineOverviewGraph.prototype.reset): (WebInspector.MemoryTimelineOverviewGraph.prototype.layout.timeToX): (WebInspector.MemoryTimelineOverviewGraph.prototype.layout.sizeToY): (WebInspector.MemoryTimelineOverviewGraph.prototype.layout.sizesToYs): (WebInspector.MemoryTimelineOverviewGraph.prototype.layout.ysForRecord): (WebInspector.MemoryTimelineOverviewGraph.prototype.layout): (WebInspector.MemoryTimelineOverviewGraph.prototype._updateLegend): (WebInspector.MemoryTimelineOverviewGraph.prototype._visibleRecords): (WebInspector.MemoryTimelineOverviewGraph.prototype._memoryTimelineRecordAdded): * UserInterface/Views/MemoryTimelineView.css: Added. (.timeline-view.memory): (.timeline-view.memory > .content): (.timeline-view.memory > .content > .overview): (.timeline-view.memory > .content .title): (.timeline-view.memory > .content .subtitle): (.timeline-view.memory > .content > .details > .timeline-ruler): (.timeline-view.memory > .content > .details > .subtitle): (.timeline-view.memory > .content > .overview > .chart): (.timeline-view.memory > .content > .overview > .chart > .subtitle): (.timeline-view.memory > .content > .overview > .chart > .container): (.timeline-view.memory > .content > .overview > .divider): (.timeline-view.memory > .content > .overview .max-percentage): (.timeline-view.memory .legend): (.timeline-view.memory .legend > .row): (.timeline-view.memory .legend > .row > .swatch): (.timeline-view.memory .legend > .row > p): (.timeline-view.memory .legend > .row > .label): (.timeline-view.memory .legend > .row > .size): (.timeline-view.memory .legend > .row > .swatch.javascript): (.timeline-view.memory .legend > .row > .swatch.images): (.timeline-view.memory .legend > .row > .swatch.layers): (.timeline-view.memory .legend > .row > .swatch.page): (.memory-category-view.javascript .line-chart > svg > path): (.memory-category-view.images .line-chart > svg > path): (.memory-category-view.layers .line-chart > svg > path): (.memory-category-view.page .line-chart > svg > path): (.timeline-view.memory .legend > .row > .swatch.current): (.timeline-view.memory .circle-chart > svg > path.current): (.timeline-view.memory .circle-chart > svg > path.remainder): * UserInterface/Views/MemoryTimelineView.js: Added. (WebInspector.MemoryTimelineView): (WebInspector.MemoryTimelineView.displayNameForCategory): (WebInspector.MemoryTimelineView.prototype.get navigationSidebarTreeOutlineLabel): (WebInspector.MemoryTimelineView.prototype.shown): (WebInspector.MemoryTimelineView.prototype.hidden): (WebInspector.MemoryTimelineView.prototype.closed): (WebInspector.MemoryTimelineView.prototype.reset): (WebInspector.MemoryTimelineView.prototype.treeElementPathComponentSelected): (WebInspector.MemoryTimelineView.prototype.layout.timeToX): (WebInspector.MemoryTimelineView.prototype.layout.sizeToY): (WebInspector.MemoryTimelineView.prototype.layout.layoutCategoryView): (WebInspector.MemoryTimelineView.prototype.layout): (WebInspector.MemoryTimelineView.prototype._clearUsageLegend): (WebInspector.MemoryTimelineView.prototype._updateUsageLegend): (WebInspector.MemoryTimelineView.prototype._clearMaxComparisonLegend): (WebInspector.MemoryTimelineView.prototype._updateMaxComparisonLegend): (WebInspector.MemoryTimelineView.prototype._visibleRecords): (WebInspector.MemoryTimelineView.prototype._initializeCategoryViews.appendLegendRow): (WebInspector.MemoryTimelineView.prototype._initializeCategoryViews): (WebInspector.MemoryTimelineView.prototype._memoryTimelineRecordAdded): * UserInterface/Views/Variables.css: (:root): Memory timeline view styles. 2016-02-01 Matt Baker Web Inspector: add a LayoutReason enum to the View base class https://bugs.webkit.org/show_bug.cgi?id=153731 Reviewed by Brian Burg. Added a LayoutReason enum to the View base class, which can be passed as an optional argument to needsLayout() and updateLayout(). The value is propagated to the view's subtree during layout. * UserInterface/Base/Main.js: Update top-level views with Resize layout reason when window is resized. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid.prototype._positionHeaderViews): Update header view with Resize layout reason when column is resized. * UserInterface/Views/OverviewTimelineView.js: (WebInspector.OverviewTimelineView.prototype.shown): Assume the view has been resized when shown, and update layout. (WebInspector.OverviewTimelineView.prototype.updateLayoutForResize): Deleted. No longer needed, handled by the View base class. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview.prototype.shown): Assume the view has been resized when shown, and update layout. (WebInspector.TimelineOverview.prototype.layout): Invalidate cached scroll container width if resized. (WebInspector.TimelineOverview.prototype.updateLayoutForResize): Deleted. No longer needed, handled by the View base class. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype.layout): Deleted. No longer needed, handled by the View base class. * UserInterface/Views/TimelineRuler.js: (WebInspector.TimelineRuler.prototype.needsLayout): (WebInspector.TimelineRuler.prototype.layout): Update cached client width if resized. (WebInspector.TimelineRuler.prototype.resize): Deleted. Moved resize logic to layout override. * UserInterface/Views/View.js: (WebInspector.View): (WebInspector.View.prototype.updateLayout): Set layout reason. (WebInspector.View.prototype.needsLayout): Set layout reason even if an animation frame has already been scheduled, since the layout reason could have changed. (WebInspector.View.prototype._layoutSubtree): Propagate layout reason to subtree, and reset the value when done. (WebInspector.View.prototype._setLayoutReason): Helper method for updating the layout reason. Ensures that LayoutReason.Resize has priority over the default (LayoutReason.Dirty). 2016-02-01 Matt Baker Web Inspector: Rendering Frames timeline draws all frame bars at minimum height https://bugs.webkit.org/show_bug.cgi?id=153736 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange): Update the new timeline overview's height before it's shown. Showing the overview causes the rendering frames graph to do a layout, which requires the height of the containing view to be a valid value. 2016-02-01 Matt Baker Web Inspector: DataGridNode should support adding go-to arrow buttons to any cell https://bugs.webkit.org/show_bug.cgi?id=153733 Reviewed by Brian Burg. Provide a way to add go-to arrow buttons to any grid cell from within a DataGridNode subclass's implementation of createCellContent. * UserInterface/Views/DataGrid.js: New event type, GoToArrowClicked. (WebInspector.DataGridNode.prototype.createGoToArrowButton.buttonClicked): (WebInspector.DataGridNode.prototype.createGoToArrowButton): Adds a go-to arrow button to the cell's content element. Clicking the button dispatches an event on the DataGrid, with event data containing the DataGridNode and identifier of the cell containing the arrow button. 2016-01-31 Jeremy Jones Add resize event for HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=125715 Reviewed by Darin Adler. Add a display name for "resize" event. * UserInterface/Models/ScriptTimelineRecord.js: (WebInspector.ScriptTimelineRecord.EventType.displayName): 2016-01-30 Dave Hyatt Add the break-* properties to Web Inspector's completion set https://bugs.webkit.org/show_bug.cgi?id=153706 Reviewed by Darin Adler. * UserInterface/Models/CSSKeywordCompletions.js: 2016-01-30 Matt Baker Web Inspector: Network panel is empty until the window is resized https://bugs.webkit.org/show_bug.cgi?id=153701 Reviewed by Timothy Hatcher. NetworkGridContentView shouldn't prevent a layout from being scheduled when the network sidebar is collapsed. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView.prototype.needsLayout): Deleted. Removed View.prototype.needsLayout override that was preventing layouts from being scheduled as timeline records are added. 2016-01-30 Devin Rousso Web Inspector: Object tree parent items are misaligned https://bugs.webkit.org/show_bug.cgi?id=153699 Reviewed by Darin Adler. * UserInterface/Views/ObjectTreeView.css: (.object-tree .object-tree): Ensure that toplevel Object preview trees are displayed properly while also making child trees inline. * UserInterface/Views/TreeOutline.css: (.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon): (.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon): Deleted. This would apply to all .icon elements contained within a non-parent item, which is not the desired effect. Instead, this should only apply to only the .icon element of that particular non-parent item. 2016-01-29 Joseph Pecoraro Web Inspector: Add support for variable size timeline graphs https://bugs.webkit.org/show_bug.cgi?id=153690 Reviewed by Timothy Hatcher. * UserInterface/Views/LayoutTimelineDataGrid.js: (WebInspector.LayoutTimelineDataGrid): Deleted. Remove unnecessary constructor. * UserInterface/Views/TimelineOverviewGraph.js: (WebInspector.TimelineOverviewGraph.prototype.set selectedRecord): Default graph height. * UserInterface/Views/RenderingFrameTimelineOverview.js: (WebInspector.RenderingFrameTimelineOverview.prototype.get height): Custom graph height. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview.prototype.get height): Provide a way to get the height of the overview which accumulates graph heights. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight): (WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight): * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight): Switch from assuming certain graph heights to asking the overview for its height. 2016-01-29 Devin Rousso Web Inspector: Object previews in the Console are misaligned https://bugs.webkit.org/show_bug.cgi?id=153676 Reviewed by Timothy Hatcher. * UserInterface/Views/ObjectTreeView.css: (.object-tree .tree-outline.object.compact): (.object-tree): Deleted. 2016-01-29 Devin Rousso Web Inspector: Provide a way to clear the network panel https://bugs.webkit.org/show_bug.cgi?id=153632 Reviewed by Timothy Hatcher. Added a navigation item to the Network tab that resets the network grid's content. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): (WebInspector.NetworkGridContentView.prototype.get navigationItems): (WebInspector.NetworkGridContentView.prototype._clearNetworkItems): 2016-01-29 Joseph Pecoraro Web Inspector: WebInspector.Setting should not access localStorage if the value did not change https://bugs.webkit.org/show_bug.cgi?id=153671 Reviewed by Brian Burg. * UserInterface/Base/Setting.js: (WebInspector.Setting.prototype.set value): 2016-01-29 Joseph Pecoraro Web Inspector: Duplicate tab-types being saved to setting, causing duplicate tabs to be opened https://bugs.webkit.org/show_bug.cgi?id=153659 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): (WebInspector._rememberOpenTabs): De-duplicate the setting when building the list of tabs for existing cases where the setting has duplicates and de-duplicate storing into the setting, which was causing the issue to begin with. 2016-01-29 Devin Rousso Web Inspector: Add font-variant-* to the visual styles sidebar https://bugs.webkit.org/show_bug.cgi?id=148720 Reviewed by Timothy Hatcher. Added another subsection to the "Text" section for font-variant-* properties. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Images/FontVariantSmallCaps.svg: Removed. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel): Added another keyword grouping with the "normal" value since it is used frequently in multiple subsections. (WebInspector.VisualStyleDetailsPanel.prototype._populateFontSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateFontVariantsSection): Added the five new font-variant-* properties specified in . (WebInspector.VisualStyleDetailsPanel.prototype._populateTextSpacingSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateAnimationSection): Replaced the hardcoded "normal" keyword with the new grouping. * UserInterface/Views/VisualStyleKeywordCheckbox.css: (.visual-style-property-container.keyword-checkbox.font-variant > .visual-style-property-value-container > input::after): Deleted. 2016-01-28 Joseph Pecoraro Web Inspector: Avoid recreating Timeline's DataGridNode data multiple times https://bugs.webkit.org/show_bug.cgi?id=153608 Reviewed by Timothy Hatcher. * UserInterface/Views/LayoutTimelineDataGridNode.js: (WebInspector.LayoutTimelineDataGridNode.prototype.get data): * UserInterface/Views/RenderingFrameTimelineDataGridNode.js: (WebInspector.RenderingFrameTimelineDataGridNode.prototype.get data): * UserInterface/Views/ScriptTimelineDataGridNode.js: (WebInspector.ScriptTimelineDataGridNode.prototype.get data): Cache the data when we create it the first time. 2016-01-28 Nikita Vasilyev Web Inspector: Tabs height should be 2px less to match Safari https://bugs.webkit.org/show_bug.cgi?id=153581 Reviewed by Darin Adler. * UserInterface/Views/TabBar.css: (.tab-bar): (.tab-bar > .item): (.tab-bar > .item.pinned): Make the new tab button ("+") a square. 2016-01-27 Nikita Vasilyev Web Inspector: Don't show hand cursor for edited attribute https://bugs.webkit.org/show_bug.cgi?id=152211 Reviewed by Joseph Pecoraro. * UserInterface/Views/Editing.css: (.editing, .editing *): 2016-01-27 Saam barati CodeMirror will strip out "\r" from files with "\r\n" as newlines causing our offsets into the file to be incorrect https://bugs.webkit.org/show_bug.cgi?id=153529 Reviewed by Timothy Hatcher. This problem manifested in the type token annotator inserting tokens in the wrong places. Because our offsets are computed based on the resource we get from backend, CodeMirror changing the source text will cause all of our offsets to be incorrect. * UserInterface/Views/CodeMirrorEditor.js: (WebInspector.CodeMirrorEditor.create): (WebInspector.CodeMirrorEditor): * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.set string.update): (WebInspector.TextEditor.prototype.set string): 2016-01-27 Devin Rousso Web Inspector: Regression (r195303) - Changes to TreeOutline break styling of lists in Visual sidebar https://bugs.webkit.org/show_bug.cgi?id=153563 Reviewed by Timothy Hatcher. Removed duplicate properties and used new methods of TreeOutline to achieve the desired styling effects. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css: (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item.visual-style-font-family-list-item > .visual-style-comma-separated-keyword-item-editor): (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles): Deleted. * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection): * UserInterface/Views/VisualStyleSelectorTreeItem.css: (.item.visual-style-selector-item > .icon): (.item.visual-style-selector-item > .titles): (.item.visual-style-selector-item > .titles > .subtitle): (.item.visual-style-selector-item.selected > .titles > .subtitle): (.item.visual-style-selector-item > .titles > .subtitle::before): Deleted. 2016-01-27 Simon Fraser Support CSS3 Images values for the image-rendering property https://bugs.webkit.org/show_bug.cgi?id=153556 Reviewed by Dean Jackson. Add "crisp-edges", "pixelated" to the suggestions for image-rendering. * UserInterface/Models/CSSKeywordCompletions.js: 2016-01-26 Joseph Pecoraro Web Inspector: Remove unused FramesLarge.png variants, only the smaller Frames icon is used for the Rendering Frames timeline https://bugs.webkit.org/show_bug.cgi?id=153523 Reviewed by Timothy Hatcher. * UserInterface/Images/FramesLarge.png: Removed. * UserInterface/Images/FramesLarge@2x.png: Removed. * UserInterface/Images/gtk/FramesLarge.png: Removed. * UserInterface/Images/gtk/FramesLarge@2x.png: Removed. * UserInterface/Views/TimelineIcons.css: (.rendering-frame-icon.large .icon): Deleted. 2016-01-25 Skachkov Oleksandr [ES6] Arrow function syntax. Arrow function specific features. Lexical bind "arguments" https://bugs.webkit.org/show_bug.cgi?id=145132 Reviewed by Saam Barati. Current patch is implementing lexical bind of arguments, so in this callback we need to return to ordinary function. * UserInterface/Base/Object.js: (WebInspector.Object.singleFireEventListener.let.wrappedCallback): (WebInspector.Object.singleFireEventListener): 2016-01-25 Saam barati Web Inspector: Have top-level ScriptTimelineDataGridNode events show sample counts https://bugs.webkit.org/show_bug.cgi?id=153447 Reviewed by Joseph Pecoraro. * UserInterface/Models/ScriptTimelineRecord.js: (WebInspector.ScriptTimelineRecord): (WebInspector.ScriptTimelineRecord.prototype.get profile): (WebInspector.ScriptTimelineRecord.prototype.get callCount): (WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection): (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload): * UserInterface/Views/ScriptTimelineDataGridNode.js: (WebInspector.ScriptTimelineDataGridNode.prototype.get data): 2016-01-25 Joseph Pecoraro Web Inspector: Reduce unnecessary forced layouts in TimelineOverview https://bugs.webkit.org/show_bug.cgi?id=153392 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview.prototype.layout): Ignore setting the scrollLeft if we would be setting it to 0. This helps avoid a forced layout in common cases. 2016-01-25 Johan K. Jensen Web Inspector: timelines clear button should be inactive if nothing can be cleared https://bugs.webkit.org/show_bug.cgi?id=132756 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype.shown): Enable clear button if timeline is not readonly and contains data, when switching timelines. (WebInspector.TimelineRecordingContentView.prototype._capturingStarted): Enable clear button when a capturing starts. (WebInspector.TimelineRecordingContentView.prototype._recordingReset): Disable clear button after resetting recording. 2016-01-25 Matt Baker Web Inspector: Timelines: "Timer Installed150ms delay" โ€” no space before the delay number https://bugs.webkit.org/show_bug.cgi?id=153416 Reviewed by Timothy Hatcher. Fix for tree element subtitle rule that regressed in https://bugs.webkit.org/show_bug.cgi?id=153146. * UserInterface/Views/TreeOutline.css: (.tree-outline .item .alternate-subtitle::before): Em dash should be inserted before both subtitle types. 2016-01-24 Matt Baker Web Inspector: add support for placing Views in DataGrid column headers https://bugs.webkit.org/show_bug.cgi?id=153387 Reviewed by Timothy Hatcher. This patch adds a new DataGrid column property, `headerView`, allowing a custom View object to be placed in a column's header cell. The grid ensures that the left and right edges of the view are kept in sync as columns are resized. As most views use absolute positioning and are styled in CSS, the vertical position and height of the view isn't set by the grid. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid.prototype.insertColumn): If the new column includes the `headerView` column data property, it should take priority over `titleDOMFragment` and title text. The specified View object is inserted into the DOM under the column's element, and added as a subview of the data grid. (WebInspector.DataGrid.prototype.layout): Update header views after performing default layout. (WebInspector.DataGrid.prototype._showColumn): Set `hidden` column property false instead of deleting it. (WebInspector.DataGrid.prototype._positionHeaderViews): Update the left and right style positions for all Views embedded in column header cells, then update their layouts. (WebInspector.DataGrid.prototype.resizerDragging): Update header views after column resizers are repositioned. 2016-01-24 Nikita Vasilyev Web Inspector: Highlight timeline range handles on hover https://bugs.webkit.org/show_bug.cgi?id=153395 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineRuler.css: (.timeline-ruler > .selection-handle.clamped): Gardening. No need to repeat "1px solid". (.timeline-ruler > .selection-handle:hover, .timeline-ruler > .selection-handle:active): ":active" pseudo selector is needed to keep the handle highligted while it's being dragged regardress if the mouse cursor is hovering over it or not. 2016-01-23 Aaron Chu Web Inspector: AXI: node-link-list should be collapsible https://bugs.webkit.org/show_bug.cgi?id=130911 Reviewed by Timothy Hatcher. Accessibility Inspector: for a very long children node list, only the first 5 nodes are shown. Remaining nodes are hidden by a "# Moreโ€ฆ" link by which a user can click to reveal the remainder of the node list. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.linkListForNodeIds): * UserInterface/Views/Main.css: (.expand-list-button): (.node-link-list, .node-link-list li:not([hidden])): (.node-link-list, .node-link-list li): Deleted. 2016-01-22 Joseph Pecoraro Web Inspector: Reduce unnecessary forced layouts in TimelineRuler https://bugs.webkit.org/show_bug.cgi?id=153390 Reviewed by Timothy Hatcher. TimelineRuler's width rarely changes. It should only need to calculate its width when added to the DOM or if the content view containing it has resized and the bounds of the ruler may have changed. Switch everything in TimelineRuler to using a cached width, and add an explicit method, resize, to update this width. This eliminated frequent hangs I was seeing while recording timelines. * UserInterface/Views/OverviewTimelineView.js: (WebInspector.OverviewTimelineView.prototype.shown): (WebInspector.OverviewTimelineView.prototype.updateLayoutForResize): Resize the ruler when the view is shown or resized. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview.prototype.shown): (WebInspector.TimelineOverview.prototype.updateLayoutForResize): Resize the ruler when the view is shown or resized. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype.layout): Inform the current content view of a resize if possible. * UserInterface/Views/TimelineRuler.js: (WebInspector.TimelineRuler.prototype.resize): Update the width. (WebInspector.TimelineRuler.prototype._recalculate): (WebInspector.TimelineRuler.prototype._needsMarkerLayout): (WebInspector.TimelineRuler.prototype._needsSelectionLayout): (WebInspector.TimelineRuler.prototype._handleMouseMove): (WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseMove): Use cached width. * UserInterface/Views/TimelineRecordBar.js: (WebInspector.TimelineRecordBar.createCombinedBars): Deleted. Remove some stale code. 2016-01-22 Devin Rousso Web Inspector: Sidebar's should remember their width's https://bugs.webkit.org/show_bug.cgi?id=153007 Reviewed by Timothy Hatcher. * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Now calls superclass function. * UserInterface/Views/Sidebar.js: (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Now calls _recalculateWidth with the saved width value of the sidebar as the first parameter. (WebInspector.Sidebar.prototype.set collapsed): Now only calls _recalculateWidth if the selected sidebar panel is visible, seeing as if it is hidden the width is irrelevant. * UserInterface/Views/SidebarPanel.js: (WebInspector.SidebarPanel): Creates a setting object using the panel's identifier to store the current width. (WebInspector.SidebarPanel.prototype.get savedWidth): (WebInspector.SidebarPanel.prototype.widthDidChange): So long as the current width has a value, save it to the setting object. 2016-01-22 Devin Rousso Web Inspector: Class toggle add icon flashes when changing nodes https://bugs.webkit.org/show_bug.cgi?id=153341 Reviewed by Timothy Hatcher. * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WebInspector.CSSStyleDetailsSidebarPanel.prototype._populateClassToggles): Changed the way in which the class toggles are repopulated to prevent the add class icon from being removed and re-added. 2016-01-21 Nikita Vasilyev REGRESSION (r195305): Web Inspector: WebInspector.Object can dispatch constructor-level events multiple times https://bugs.webkit.org/show_bug.cgi?id=153269 Reviewed by Timothy Hatcher. Bring back object.hasOwnProperty("_listeners") check. * UserInterface/Base/Object.js: (WebInspector.Object.prototype.dispatchEventToListeners.dispatch): (WebInspector.Object.prototype.dispatchEventToListeners): (WebInspector.Object): Check !object._listeners before !object.hasOwnProperty("_listeners") because !object._listeners is more common case thus we can exit earlier most of the time. 2016-01-21 Devin Rousso Web Inspector: Add toggle-able list of classes for each element https://bugs.webkit.org/show_bug.cgi?id=152678 Reviewed by Timothy Hatcher. Adds a button to the CSS sidebar that, when toggled, displays a section directly above it containing all the classes for the selected node that, when toggled, adds or removes the class from the node. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.prototype.callFunction.mycallback): (WebInspector.RemoteObject.prototype.callFunction): Add extra handling of arguments to allow nicer looking calls by other classes. * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: Changed next-sibling selector (+) to general-sibling selector (~). (.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)): (.sidebar > .panel.details.css-style > .content:not(.supports-new-rule, .has-filter-bar) ~ :matches(.options-container, .class-list-container)): (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle): (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected): (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover): (.sidebar > .panel.details.css-style > .content ~ .class-list-container): (.sidebar > .panel.details.css-style > .content ~ .class-list-container[hidden]): (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class): (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > input[type="checkbox"]): (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .add-class-icon): (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class:not(.active) > .class-name-input): (.sidebar > .panel.details.css-style > .content ~ .class-list-container > *:matches(.new-class, .class-toggle)): * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WebInspector.CSSStyleDetailsSidebarPanel): Also changed the few instances of "var" to "let". (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): (WebInspector.CSSStyleDetailsSidebarPanel.prototype.addEventListeners): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._handleNodeAttributeModified): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._handleNodeAttributeRemoved): Adds listeners to the DOMNode specifically listening for changes to the class attribute and repopulates the class toggle list if fired. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._classToggleButtonClicked): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._addClassContainerClicked): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._addClassInputKeyPressed): If the Enter key is pressed, add a new class equal to the input value. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._addClassInputBlur): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._populateClassToggles): Loops through all the classes, including previously removed ones, for the selected node and creates a toggle for each. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName.classNameToggleChanged): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName): Creates a toggle element for the given className and adds it to the container. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode.toggleClass): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass): Uses the Element.classList to toggle the given className on the selected node. 2016-01-20 Saam barati Web Inspector: Hook the sampling profiler into the Timelines UI https://bugs.webkit.org/show_bug.cgi?id=152766 Reviewed by Joseph Pecoraro. The main change in this patch is to swap in the SamplingProfiler in place of the LegacyProfiler. To do this, we've created a data structure called CallingContextTree which aggregates the SamplingProfiler's data into an easy to manage tree. To see how the data structure works, consider the following program: ``` function bar() { // run code here for a long time. } function baz() { // run code here for a long time. } function foo() { bar(); baz(); } foo(); ``` From this program, we will create a tree like this: (program) | | foo | | / \ / \ bar baz From this type of tree, we can easily create a CPUProfile payload object. Because the Timelines UI knows how to interact with the CPUProfile object and display it, we currently map the tree to this object to make it trivially easy to display the SamplingProfiler's data. In the future, we may want to find ways to work directly with the CallingContextTree instead of mapping it into another object. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Controllers/TimelineManager.js: * UserInterface/Main.html: * UserInterface/Models/CallingContextTree.js: Added. * UserInterface/Models/ScriptInstrument.js: * UserInterface/Protocol/ScriptProfilerObserver.js: * UserInterface/TestStub.html: * UserInterface/Views/ScriptTimelineView.js: 2016-01-19 Joseph Pecoraro Web Inspector: Uncaught exception when logging an Error object https://bugs.webkit.org/show_bug.cgi?id=153258 Reviewed by Timothy Hatcher. * UserInterface/Views/ErrorObjectView.js: (WebInspector.ErrorObjectView): Initialize members that are used later for clarity. (WebInspector.ErrorObjectView.prototype.collapse): (WebInspector.ErrorObjectView.prototype.expand): This never has a previewView, remove it. (WebInspector.ErrorObjectView.prototype.appendTitleSuffix): Add the suffix ("= $1") after the description and before the content tree outline. 2016-01-19 Nikita Vasilyev Web Inspector: Subclasses of WebInspector.Object shouldn't overwrite this._listeners https://bugs.webkit.org/show_bug.cgi?id=153268 Reviewed by Timothy Hatcher. * UserInterface/Base/Object.js: (WebInspector.Object.prototype.dispatchEventToListeners): Add a console.assert. * UserInterface/Views/BreakpointTreeElement.js: (WebInspector.BreakpointTreeElement): (WebInspector.BreakpointTreeElement.prototype.onattach): (WebInspector.BreakpointTreeElement.prototype.ondetach): * UserInterface/Views/ProbeSetDataGrid.js: (WebInspector.ProbeSetDataGrid): (WebInspector.ProbeSetDataGrid.prototype.closed): * UserInterface/Views/ProbeSetDetailsSection.js: (WebInspector.ProbeSetDetailsSection): (WebInspector.ProbeSetDetailsSection.prototype.closed): Replace all instances of "this._listeners" with "this._listenerSet". 2016-01-19 Timothy Hatcher Web Inspector: Add protocol version for iOS 9.3 https://bugs.webkit.org/show_bug.cgi?id=153256 rdar://problem/24247951 Reviewed by Joseph Pecoraro. * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: Added. * Versions/Inspector-iOS-9.3.json: Added. 2016-01-19 Joseph Pecoraro REGRESSION: Web Inspector: Hovering linkified node references should show node highlight https://bugs.webkit.org/show_bug.cgi?id=153248 Reviewed by Timothy Hatcher. * UserInterface/Base/DOMUtilities.js: Show the complete node highlight details (colors and node info). 2016-01-19 Nikita Vasilyev Web Inspector: WebInspector.Object.addEventListener is O(n), make it O(1) https://bugs.webkit.org/show_bug.cgi?id=152422 Reviewed by Timothy Hatcher. Slow addEventListener was the main cause of Console sluggishness[1]. This patch changes: addEventListener from O(n) to O(1) removeEventListener from O(n) to O(1) Now, addEventListener and removeEventListener take <1ms regardless of the number of listeners attached. removeEventListener(null, null, thisObject), a special case when all events for thisObject are removed, was improved from O(n^2) to O(n). * UserInterface/Base/LinkedList.js: Added. (LinkedList): (LinkedList.prototype.clear): (LinkedList.prototype.get last): (LinkedList.prototype.push): (LinkedList.prototype.remove): (LinkedList.prototype.forEach): (LinkedList.prototype.toArray): (LinkedList.prototype.toJSON): (LinkedListNode): LinkedList ensures O(1) time complexity for push and remove operations. * UserInterface/Base/ListMultimap.js: Added. (ListMultimap): (ListMultimap.prototype.get size): (ListMultimap.prototype.add): (ListMultimap.prototype.delete): (ListMultimap.prototype.deleteAll): (ListMultimap.prototype.has): (ListMultimap.prototype.clear): (ListMultimap.prototype.forEach): (ListMultimap.prototype.toArray): (ListMultimap.prototype.toJSON): ListMultimap unsures O(1) time complexity for add, has and delete operations. ListMultimap preserves insertion order by using a LinkedList. * UserInterface/Base/Object.js: (WebInspector.Object): (WebInspector.Object.addEventListener): (WebInspector.Object.removeEventListener): (WebInspector.Object.hasEventListeners): (WebInspector.Object.retainedObjectsWithPrototype): (WebInspector.Object.prototype.dispatchEventToListeners): Replace this._listeners[eventType] from array of objects to ListMultimap. * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/TestStub.html: 2016-01-19 Matt Baker Web Inspector: cleanup TreeOutline class and separate styles from NavigationSidebarPanel https://bugs.webkit.org/show_bug.cgi?id=153146 Reviewed by Timothy Hatcher. This patch consolidates and simplifies the tree outline styles that were previously defined across various classes. A new stylesheet, TreeOutline.css, includes all the styles needed to create a basic TreeOutline. In addition, certain tree features which were previously controlled by manually toggling class names have been promoted to properties of TreeOutline: - compact: tree elements have reduced vertical spacing. Used by object trees. The compact and large settings are mutually exclusive. - large: tree elements (and their icons) are large. Used by TimelinesSidebarPanel. Previously there existed a `small` class name which was enabled in every case except TimelineSidebarPanel's Timelines tree. Since it was the rule rather than the exception the class has been removed and is now the default style. - disclosureButtons: control the appearance of disclosure buttons. - customIndent: control use of generated style rules. * UserInterface/Main.html: New CSS file. * UserInterface/Views/ApplicationCacheFrameTreeElement.js: (WebInspector.ApplicationCacheFrameTreeElement): Deleted. * UserInterface/Views/BreakpointTreeElement.js: (WebInspector.BreakpointTreeElement): Deleted. * UserInterface/Views/CallFrameTreeElement.js: (WebInspector.CallFrameTreeElement): Deleted. * UserInterface/Views/ContentFlowTreeElement.js: (WebInspector.ContentFlowTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom): (.tree-outline.dom li.hovered:not(.selected) .selection): (.tree-outline.dom li .selection): (.tree-outline.dom li.selected .selection): (.tree-outline.dom li.elements-drag-over .selection): (.tree-outline.dom:focus li.selected .selection): (.tree-outline.dom li.selected > span::after): (.tree-outline.dom:focus li.selected > span::after): (.tree-outline.dom ol): (.tree-outline.dom ol.children): (.tree-outline.dom ol.children.expanded): (.tree-outline.dom li): (.tree-outline.dom li.pseudo-class-enabled > .selection::before): (.tree-outline.dom.single-node li): (.tree-outline.dom:focus li.selected): (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection::before): (.tree-outline.dom:focus li.selected *): (.tree-outline.dom li.parent): (.tree-outline.dom li .html-tag.close): (.tree-outline.dom li.parent::before): (.tree-outline.dom:focus li.parent.selected::before): (.tree-outline.dom li.parent.expanded::before): (.tree-outline.dom:focus li.parent.expanded.selected::before): (.tree-outline.dom .html-text-node.large): (.tree-outline.dom .html-pseudo-element): (.tree-outline.dom .html-fragment.shadow): (.showing-find-banner .tree-outline.dom .search-highlight): (.dom-tree-outline): Deleted. (.dom-tree-outline li.hovered:not(.selected) .selection): Deleted. (.dom-tree-outline li .selection): Deleted. (.dom-tree-outline li.selected .selection): Deleted. (.dom-tree-outline li.elements-drag-over .selection): Deleted. (.dom-tree-outline:focus li.selected .selection): Deleted. (.dom-tree-outline li.selected > span::after): Deleted. (.dom-tree-outline:focus li.selected > span::after): Deleted. (.dom-tree-outline ol): Deleted. (.dom-tree-outline ol.children): Deleted. (.dom-tree-outline ol.children.expanded): Deleted. (.dom-tree-outline li): Deleted. (.dom-tree-outline li.pseudo-class-enabled > .selection::before): Deleted. (.dom-tree-outline.single-node li): Deleted. (.dom-tree-outline:focus li.selected): Deleted. (.dom-tree-outline:focus li.selected.pseudo-class-enabled > .selection::before): Deleted. (.dom-tree-outline:focus li.selected *): Deleted. (.dom-tree-outline li.parent): Deleted. (.dom-tree-outline li .html-tag.close): Deleted. (.dom-tree-outline li.parent::before): Deleted. (.dom-tree-outline:focus li.parent.selected::before): Deleted. (.dom-tree-outline li.parent.expanded::before): Deleted. (.dom-tree-outline:focus li.parent.expanded.selected::before): Deleted. (.dom-tree-outline .html-text-node.large): Deleted. (.dom-tree-outline .html-pseudo-element): Deleted. (.dom-tree-outline .html-fragment.shadow): Deleted. (.showing-find-banner .dom-tree-outline .search-highlight): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/DOMTreeOutline.js: (WebInspector.DOMTreeOutline): Use default TreeOutline DOM element, and simplify element class name. * UserInterface/Views/DatabaseTableTreeElement.js: (WebInspector.DatabaseTableTreeElement): Deleted. * UserInterface/Views/DatabaseTreeElement.js: (WebInspector.DatabaseTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/ErrorObjectView.css: (.error-object:not(.expanded) .tree-outline): (.error-object .tree-outline): (.error-object:not(.expanded) .error-object-outline): Deleted. (.error-object-outline): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/ErrorObjectView.js: (WebInspector.ErrorObjectView): Deleted. Removed unused tree outline class name. * UserInterface/Views/FolderTreeElement.js: (WebInspector.FolderTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/FormattedValue.css: (.formatted-node > .tree-outline.dom): (.formatted-node > .tree-outline.dom ol): (.formatted-node > .tree-outline.dom li): (.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection): (.formatted-node > .dom-tree-outline): Deleted. (.formatted-node > .dom-tree-outline ol): Deleted. (.formatted-node > .dom-tree-outline li): Deleted. (.formatted-node > .dom-tree-outline li.hovered:not(.selected) .selection): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/GeneralTreeElement.js: (WebInspector.GeneralTreeElement.prototype._updateTitleTooltip): (WebInspector.GeneralTreeElement.prototype.get small): Deleted. (WebInspector.GeneralTreeElement.prototype.set small): Deleted. (WebInspector.GeneralTreeElement.prototype.get twoLine): Deleted. (WebInspector.GeneralTreeElement.prototype.set twoLine): Deleted. Removed properties `small` and `twoLine`. The first is no longer needed as it is now the default tree element style. The second was not being used. * UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js: (WebInspector.IndexedDatabaseObjectStoreIndexTreeElement): Deleted. * UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js: (WebInspector.IndexedDatabaseObjectStoreTreeElement): Deleted. * UserInterface/Views/IndexedDatabaseTreeElement.js: (WebInspector.IndexedDatabaseTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/IssueTreeElement.css: (.navigation-sidebar-panel-content-tree-outline .item.small.issue .icon): Deleted. No longer needed. * UserInterface/Views/IssueTreeElement.js: (WebInspector.IssueTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/LayoutTimelineView.css: (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .tree-outline.layout .item .subtitle): (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.layout .item .subtitle): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/LogTreeElement.js: (WebInspector.LogTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/NavigationSidebarPanel.css: (.navigation-sidebar-panel-content-tree-outline .children): Deleted. (.navigation-sidebar-panel-content-tree-outline .children.expanded): Deleted. (.navigation-sidebar-panel-content-tree-outline .item): Deleted. (.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons > .children): Deleted. (.navigation-sidebar-panel-content-tree-outline > .children.hide-disclosure-buttons > .children): Deleted. (.navigation-sidebar-panel-content-tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon): Deleted. (.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons .item.small): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .disclosure-button): Deleted. (.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons .item .disclosure-button): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.parent .disclosure-button): Deleted. (.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .disclosure-button): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.expanded .disclosure-button): Deleted. (.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected.expanded .disclosure-button): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .icon): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .status): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .status:empty): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.selected): Deleted. (.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected): Deleted. (body.window-inactive .navigation-sidebar-panel-content-tree-outline .item.selected): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .titles): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .highlighted): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .titles.no-subtitle): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .title::after): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .subtitle): Deleted. (.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .subtitle): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .subtitle:empty): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small .icon): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small .status): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small .status .indeterminate-progress-spinner): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small .titles): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .status): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles.no-subtitle): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small .subtitle): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .icon): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .title::after): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .subtitle::before): Deleted. Generic tree outline styles removed, cleaned up, and relocated to TreeOutline.css. * UserInterface/Views/NavigationSidebarPanel.js: Removed static property HideDisclosureButtonsStyleClassName, which is now encapsulated by TreeOutline. (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline): Use default TreeOutline DOM element instead of creating it. (WebInspector.NavigationSidebarPanel): Deleted. Remove call to generate style rules. (WebInspector.NavigationSidebarPanel.prototype._generateStyleRulesIfNeeded): Deleted. Moved to TreeOutline.js. * UserInterface/Views/NetworkSidebarPanel.css: (.sidebar > .panel.navigation.network.network-grid-content-view-showing .tree-outline.network-grid .item .subtitle): (.sidebar > .panel.navigation.network > .content > .tree-outline): (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .tree-outline): (.sidebar > .panel.navigation.network.network-grid-content-view-showing .navigation-sidebar-panel-content-tree-outline.network-grid .item .subtitle): Deleted. (.sidebar > .panel.navigation.network > .content > .navigation-sidebar-panel-content-tree-outline): Deleted. (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel): Disable tree outline disclosure buttons. * UserInterface/Views/NetworkTimelineView.css: (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .tree-outline.network .item .subtitle): (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.network .item .subtitle): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView): Disable tree outline disclosure buttons. * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css: (.object-tree-array-index .index-value .object-tree .tree-outline.object): (.object-tree-array-index .index-value .formatted-node .tree-outline.dom): (.object-tree-array-index .index-value .object-tree .object-tree-outline): Deleted. (.object-tree-array-index .index-value .formatted-node .dom-tree-outline): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/ObjectTreeBaseTreeElement.js: (WebInspector.ObjectTreeBaseTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/ObjectTreePropertyTreeElement.css: (.tree-outline .item.object-tree-property): (.item.object-tree-property.prototype-property): (.item.object-tree-property.prototype-property + ol): (.object-tree-property): Deleted. (.object-tree-property > .titles): Deleted. (.object-tree-property > .disclosure-button): Deleted. (.object-tree-property.parent > .disclosure-button): Deleted. (.object-tree-property.parent.expanded > .disclosure-button): Deleted. (.object-tree-property > .icon): Deleted. (.object-tree-property.prototype-property): Deleted. (.object-tree-property.prototype-property + ol): Deleted. Updated selectors with new tree outline class names, removed styles which are now provided by TreeOutline.css. * UserInterface/Views/ObjectTreeView.css: (.object-tree .tree-outline.object): (.object-tree.expanded > .tree-outline.object): (.tree-outline.object): (.object-tree.properties-only .tree-outline.object): (.tree-outline.object li): (.tree-outline.object ol): (.tree-outline.object ol.expanded): (.tree-outline.object li .empty-message): (.object-tree .object-tree-outline): Deleted. (.object-tree.expanded > .object-tree-outline): Deleted. (.object-tree-outline): Deleted. (.object-tree.properties-only .object-tree-outline): Deleted. (.object-tree-outline li): Deleted. (.object-tree-outline ol): Deleted. (.object-tree-outline ol.expanded): Deleted. (.object-tree-outline li .empty-message): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/ObjectTreeView.js: (WebInspector.ObjectTreeView): Use default TreeOutline DOM element, and simplify element class name. Enable custom indent (disables generated style rules). * UserInterface/Views/ProfileNodeTreeElement.js: (WebInspector.ProfileNodeTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/RenderingFrameTimelineView.css: (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .tree-outline.rendering-frame .item:not(.paint-record):not(.layout-record) .subtitle): (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.rendering-frame .item:not(.paint-record):not(.layout-record) .subtitle): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): Disable tree outline disclosure buttons. (WebInspector.ResourceSidebarPanel.prototype._extraDomainsActivated): Enable tree outline disclosure buttons. * UserInterface/Views/ScriptTimelineView.css: (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .tree-outline.script .item .subtitle): (.sidebar > .panel.navigation.timeline:not(.timeline-recording-content-view-showing) .tree-outline.script .item .alternate-subtitle): (.tree-outline .item .alternate-subtitle): (.tree-outline:matches(:focus, .force-focus) .item.selected .alternate-subtitle): (.tree-outline .item.small:not(.two-line) .alternate-subtitle::before): (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.script .item .subtitle): Deleted. (.sidebar > .panel.navigation.timeline:not(.timeline-recording-content-view-showing) .navigation-sidebar-panel-content-tree-outline.script .item .alternate-subtitle): Deleted. (.navigation-sidebar-panel-content-tree-outline .item .alternate-subtitle): Deleted. (.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .alternate-subtitle): Deleted. (.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .alternate-subtitle::before): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/SearchResultTreeElement.js: (WebInspector.SearchResultTreeElement): Deleted. * UserInterface/Views/SourceCodeTreeElement.js: (WebInspector.SourceCodeTreeElement): Deleted. * UserInterface/Views/StorageTreeElement.js: (WebInspector.StorageTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/TimelineDataGrid.css: (.tree-outline.timeline-data-grid .item:hover): (.tree-outline.timeline-data-grid .item:hover .subtitle): (.timeline-data-grid-tree-outline): Deleted. (.timeline-data-grid-tree-outline .item): Deleted. (.timeline-data-grid-tree-outline .item .status): Deleted. (.timeline-data-grid-tree-outline .item .icon): Deleted. (.timeline-data-grid-tree-outline .item:hover): Deleted. (.timeline-data-grid-tree-outline .item .titles): Deleted. (.timeline-data-grid-tree-outline .item .title::after): Deleted. (.timeline-data-grid-tree-outline .item .subtitle): Deleted. (.timeline-data-grid-tree-outline .item:hover .subtitle): Deleted. (.timeline-data-grid-tree-outline .item .subtitle:empty): Deleted. (.timeline-data-grid-tree-outline .item.small): Deleted. (.timeline-data-grid-tree-outline .item.small .icon): Deleted. (.timeline-data-grid-tree-outline .item.small .status): Deleted. (.timeline-data-grid-tree-outline .item.small .titles): Deleted. (.timeline-data-grid-tree-outline .item.small .subtitle): Deleted. (.timeline-data-grid-tree-outline .item.small:not(.two-line) .title::after): Deleted. (.timeline-data-grid-tree-outline .item.small:not(.two-line) .subtitle::before): Deleted. Updated selectors with new tree outline class names, removed styles which are now provided by TreeOutline.css. * UserInterface/Views/TimelineDataGrid.js: (WebInspector.TimelineDataGrid.prototype._createPopoverContent): Use default TreeOutline DOM element, and simplify element class name. * UserInterface/Views/TimelineRecordTreeElement.js: (WebInspector.TimelineRecordTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/TimelineSidebarPanel.css: (.sidebar > .panel.navigation.timeline > .timelines-content .close-button): Deleted. Removed styles which are now provided by TreeOutline.css. * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel): Disable tree outline disclosure buttons, enable large tree style. * UserInterface/Views/TimelineView.css: (.panel.navigation.timeline > .content > .tree-outline): (.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .tree-outline): (.panel.navigation.timeline > .content > .navigation-sidebar-panel-content-tree-outline): Deleted. (.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/TreeOutline.css: Added. (.tree-outline .children): (.tree-outline .children.expanded): (.tree-outline .item): (.tree-outline.compact .item): (.tree-outline.large .item): (.tree-outline.hide-disclosure-buttons > .children): (.tree-outline > .children.hide-disclosure-buttons > .children): (.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon): (.tree-outline .item .disclosure-button): (.tree-outline.hide-disclosure-buttons .item .disclosure-button): (.tree-outline .item.parent .disclosure-button): (.tree-outline:matches(:focus, .force-focus) .item.selected .disclosure-button): (.tree-outline .item.expanded .disclosure-button): (.tree-outline:matches(:focus, .force-focus) .item.selected.expanded .disclosure-button): (.tree-outline .item .icon): (.tree-outline.compact .item .icon): (.tree-outline.large .item .icon): (.tree-outline .item .status): (.tree-outline.large .item .status): (.tree-outline .item .status:empty): (.tree-outline .item.selected): (.tree-outline:matches(:focus, .force-focus) .item.selected): (body.window-inactive .tree-outline .item.selected): (.tree-outline .item .titles): (.tree-outline.compact .item .titles): (.tree-outline.large .item .titles): (.tree-outline .item .highlighted): (.tree-outline.large .item .titles.no-subtitle): (.tree-outline .item .title::after): (.tree-outline .item .subtitle): (.tree-outline.large .item .subtitle): (.tree-outline:matches(:focus, .force-focus) .item.selected .subtitle): (.tree-outline .item .subtitle:empty): (.tree-outline:not(.large) .item .status .indeterminate-progress-spinner): (.tree-outline .item .subtitle::before): Relocated tree outlines styles from NavigationSidebarPanel.css. * UserInterface/Views/TreeOutline.js: (WebInspector.TreeOutline): (WebInspector.TreeOutline.prototype.get compact): (WebInspector.TreeOutline.prototype.set compact): (WebInspector.TreeOutline.prototype.get large): (WebInspector.TreeOutline.prototype.set large): (WebInspector.TreeOutline.prototype.get disclosureButtons): (WebInspector.TreeOutline.prototype.set disclosureButtons): (WebInspector.TreeOutline.prototype.get customIndent): (WebInspector.TreeOutline.prototype.set customIndent): Added properties for tree element appearance and indentation behavior, so clients don't need to manually toggle style classes. (WebInspector.TreeOutline._generateStyleRulesIfNeeded): Relocated from NavigationSidebarPanel.js. * UserInterface/Views/TypeTreeElement.js: (WebInspector.TypeTreeElement): Deleted. Removed call to obsolete TreeOutline.prototype.small setter. * UserInterface/Views/TypeTreeView.css: (.tree-outline.type): (.tree-outline.type li): (.tree-outline.type ol): (.tree-outline.type ol.expanded): (.tree-outline.type li .empty-message): (.type-tree-outline): Deleted. (.type-tree-outline li): Deleted. (.type-tree-outline ol): Deleted. (.type-tree-outline ol.expanded): Deleted. (.type-tree-outline li .empty-message): Deleted. Updated selectors with new tree outline class names. * UserInterface/Views/TypeTreeView.js: (WebInspector.TypeTreeView): Use default TreeOutline DOM element, and simplify element class name. 2016-01-13 Joseph Pecoraro Web Inspector: Inspector should use the last sourceURL / sourceMappingURL directive https://bugs.webkit.org/show_bug.cgi?id=153072 Reviewed by Timothy Hatcher. * UserInterface/Base/Utilities.js: Prepend instead of append the sourceURL so the provided string can include a sourceURL and override it. Such as manually evaluating a script through the quick console with a sourceURL. * UserInterface/Models/SourceMapResource.js: Fix an incorrectly named property. 2016-01-13 Devin Rousso Web Inspector: Add support for the existing GradientEditor in the CSS Rules sidebar https://bugs.webkit.org/show_bug.cgi?id=153004 Reviewed by Timothy Hatcher. Both the Visual sidebar and Resource view have editors for CSS gradient values, but the Rules sidebar instead only adds editors for basic color values. Instead of duplicating the code for gradient swatches, existing code will be used to give this same functionality to the Rules sidebar. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Models/Gradient.js: (WebInspector.Gradient): (WebInspector.Gradient.fromString): (WebInspector.Gradient.stopsWithComponents): (WebInspector.Gradient.prototype.copy): (WebInspector.Gradient.prototype.toString): Refactored WebInspector.Gradient into its own class. (WebInspector.LinearGradient): (WebInspector.LinearGradient.prototype.toString): Now uses WebInspector.Gradient inheritance and methods. (WebInspector.RadialGradient): (WebInspector.RadialGradient.prototype.toString): Now uses WebInspector.Gradient inheritance and methods. * UserInterface/Views/CSSStyleDeclarationTextEditor.css: Use InlineSwatch.css values instead. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .cubic-bezier-marker): Deleted. (@media (-webkit-max-device-pixel-ratio: 1)): Deleted. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .cubic-bezier-marker:hover): Deleted. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .cubic-bezier-marker:active): Deleted. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype.didDismissPopover): Deleted. Removed unused popover member variable. (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.createSwatch): (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches): Renamed variables for more consistent naming and reimplemented the logic to use the new WebInspector.InlineSwatch methods. As a result, it was possible to consolidate the 3 different type of swatch functions into a single function. (WebInspector.CSSStyleDeclarationTextEditor.prototype._commentProperty.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._uncommentRange.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged): (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.createSwatch): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.update): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createBezierEditors.update): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createBezierEditors): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged.update): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked.updateCodeMirror.update): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked.updateCodeMirror): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked): Deleted. * UserInterface/Views/CodeMirrorTextMarkers.js: (createCodeMirrorColorTextMarkers.matchFunction): Added logic so that if the matched color string is found inside a gradient, it will not have a marker created for it. * UserInterface/Views/InlineSwatch.css: Renamed from Source/WebInspectorUI/UserInterface/Views/ColorSwatch.css. Consolidated the various swatch CSS classes into one file. (.inline-swatch): (.inline-swatch.bezier): (.inline-swatch.bezier:hover): (.inline-swatch.bezier:active): (@media (-webkit-max-device-pixel-ratio: 1)): (.inline-swatch > span): Ensured that the inner swatch element can not be selected so that the "click" listener on its parent always fires. (.inline-swatch:hover > span): (.inline-swatch:active > span): (.inline-swatch.bezier > span): * UserInterface/Views/InlineSwatch.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ColorSwatch.js. (WebInspector.InlineSwatch): Now accepts a new first argument to indicate what type of color swatch to create and what functionality it will have. Currently has options for WebInspector.Color, WebInspector.Gradient, and WebInspector.CubicBezier. (WebInspector.InlineSwatch.prototype.get element): (WebInspector.InlineSwatch.prototype.get value): (WebInspector.InlineSwatch.prototype.set value): (WebInspector.InlineSwatch.prototype._fallbackValue): (WebInspector.InlineSwatch.prototype._updateSwatch): (WebInspector.InlineSwatch.prototype._swatchElementClicked): (WebInspector.InlineSwatch.prototype._valueEditorValueDidChange): (WebInspector.InlineSwatch.prototype._handleContextMenuEvent): (WebInspector.InlineSwatch.prototype._getNextValidHEXFormat.hexMatchesCurrentColor): (WebInspector.InlineSwatch.prototype._getNextValidHEXFormat): * UserInterface/Views/VisualStyleBackgroundPicker.css: (.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient): (.visual-style-property-container.background-picker > .visual-style-property-value-container:not(.gradient-value) > .inline-swatch.gradient): (.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient:hover): (.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient:active): (.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient > span): (.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .inline-swatch.gradient + .value-input): (.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch): Deleted. (.visual-style-property-container.background-picker > .visual-style-property-value-container:not(.gradient-value) > .color-swatch): Deleted. (.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch:hover): Deleted. (.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch:active): Deleted. (.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch > span): Deleted. (.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .color-swatch + .value-input): Deleted. * UserInterface/Views/VisualStyleBackgroundPicker.js: Removed the specific code for the gradient swatch and moved to using a gradient-type InlineSwatch for gradient values instead. (WebInspector.VisualStyleBackgroundPicker): (WebInspector.VisualStyleBackgroundPicker.prototype.set value): (WebInspector.VisualStyleBackgroundPicker.prototype._updateGradient): (WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchColorChanged): (WebInspector.VisualStyleBackgroundPicker.prototype._valueInputValueChanged): (WebInspector.VisualStyleBackgroundPicker.prototype._handleKeywordChanged): (WebInspector.VisualStyleBackgroundPicker.prototype._updateGradientSwatch): Deleted. (WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked.handleColorPickerToggled): Deleted. (WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked): Deleted. (WebInspector.VisualStyleBackgroundPicker.prototype._gradientEditorGradientChanged): Deleted. * UserInterface/Views/VisualStyleColorPicker.css: (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color): (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color:hover): (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color:active): (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color > span): Add override CSS to ensure that the color-type InlineSwatch displays nicely next to the flexbox style Visual sidebar. (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch): Deleted. (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch:hover): Deleted. (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch:active): Deleted. (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch > span): Deleted. Refactored to only use overriding properties of the basic .inline-swatch values. * UserInterface/Views/VisualStyleColorPicker.js: (WebInspector.VisualStyleColorPicker): (WebInspector.VisualStyleColorPicker.prototype._colorSwatchColorChanged): (WebInspector.VisualStyleColorPicker.prototype._updateColorSwatch): * UserInterface/Views/VisualStyleTimingEditor.css: (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch.bezier): (.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.bezier-value) > .inline-swatch.bezier): (@media (-webkit-min-device-pixel-ratio: 2)): Add override CSS to ensure that the color-type InlineSwatch displays nicely next to the flexbox style Visual sidebar. (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .bezier-editor): Deleted. (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .bezier-editor:hover): Deleted. (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .bezier-editor:active): Deleted. Refactored to only use overriding properties of the basic .inline-swatch values. * UserInterface/Views/VisualStyleTimingEditor.js: Removed the specific code for the cubic-bezier swatch and moved to using a cubic-bezier-type InlineSwatch for gradient values instead. (WebInspector.VisualStyleTimingEditor): (WebInspector.VisualStyleTimingEditor.prototype.get bezierValue): (WebInspector.VisualStyleTimingEditor.prototype.set bezierValue): (WebInspector.VisualStyleTimingEditor.prototype._setValue): (WebInspector.VisualStyleTimingEditor.prototype._handleKeywordChanged): (WebInspector.VisualStyleTimingEditor.prototype._bezierSwatchValueChanged): (WebInspector.VisualStyleTimingEditor.prototype._bezierMarkerClicked): Deleted. 2016-01-12 Matt Baker Web Inspector: Timeline recording controls should use NavigationBar https://bugs.webkit.org/show_bug.cgi?id=152997 Reviewed by Brian Burg. NavigtaionBar should always be preferred over manually editing the DOM. Reusing existing button types for the record button and status element lets us eliminate a bunch of CSS, and will make future changes to the Timelines UI (such as adding addition recording controls), easier to implement. * Localizations/en.lproj/localizedStrings.js: New tooltip strings. * UserInterface/Views/TimelineSidebarPanel.css: (.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop): (.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop:hover): (.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop:active): Replaced similar styles used for the record glyph. (.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop *): Prevent multiple mouseover/mouseout events while hovering the navigation item. (.sidebar > .panel.navigation.timeline > .navigation-bar > .item.flexible-space): Replaced similar styles used for the record status element. (.sidebar > .panel.navigation.timeline > .status-bar): Deleted. (body.window-inactive .sidebar > .panel.navigation.timeline > .status-bar): Deleted. (.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph): Deleted. (.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph:hover): Deleted. (.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph:active): Deleted. (.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph.recording): Deleted. (.sidebar > .panel.navigation.timeline > .status-bar > .record-status): Deleted. (.panel.timeline .navigation-bar.timelines-view): Deleted. No longer used. * UserInterface/Views/TimelineSidebarPanel.js: Removed unused CSS static variables. (WebInspector.TimelineSidebarPanel): Create navigation bar, remove status bar DOM elements. Create keyboard shortcut before the record button, so the shortcut's display name can be used in tooltips. (WebInspector.TimelineSidebarPanel.prototype._capturingStartedOrStopped): Update record button state and flexible space (status) text. (WebInspector.TimelineSidebarPanel.prototype._recordButtonClicked): Toggle recording state, and update record button state and flexible space (status) text. (WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOver): (WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOut): Update flexible space (status) text. (WebInspector.TimelineSidebarPanel.prototype._updateRecordButton): (WebInspector.TimelineSidebarPanel.prototype._updateReplayInterfaceVisibility): (WebInspector.TimelineSidebarPanel.prototype._toggleRecording): Deleted. (WebInspector.TimelineSidebarPanel.prototype._capturingStarted): Deleted. (WebInspector.TimelineSidebarPanel.prototype._capturingStopped): Deleted. (WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOver): Deleted. (WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOut): Deleted. (WebInspector.TimelineSidebarPanel.prototype._recordGlyphClicked): Deleted. No longer used. 2016-01-12 Matt Baker Web Inspector: Move helper methods for getting icons/text to TimelineTabContentView https://bugs.webkit.org/show_bug.cgi?id=152996 Reviewed by Brian Burg. In preparation for the Timelines UI redesign, helper methods which existed in the sidebar panel and timeline tree elements need to be relocated, since the sidebar won't exist in the new UI. * UserInterface/Views/TimelineRecordTreeElement.js: (WebInspector.TimelineRecordTreeElement): Removed icon/title code, replaced with calls to new helper methods. Code to create the alternate subtitle was broken out form the rest of the icon/title code, and kept in the constructor. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._instrumentAdded): Updated calls to helper methods. * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel.prototype._instrumentAdded): (WebInspector.TimelineSidebarPanel.displayNameForTimeline): Deleted. (WebInspector.TimelineSidebarPanel.iconClassNameForTimeline): Deleted. Moved to TimelineTabContentView. * UserInterface/Views/TimelineTabContentView.js: (WebInspector.TimelineTabContentView.displayNameForTimeline): (WebInspector.TimelineTabContentView.iconClassNameForTimeline): Relocated from TimelineSidebarPanel. (WebInspector.TimelineTabContentView.iconClassNameForRecord): (WebInspector.TimelineTabContentView.displayNameForRecord): New helper methods. Previously part of TimelineRecordTreeElement. 2016-01-12 Brian Burg Web Inspector: fix some common misspellings in localized strings https://bugs.webkit.org/show_bug.cgi?id=153030 Reviewed by Joseph Pecoraro. Replace 'occured', 'transfered' with 'occurred' and 'transferred'. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/DatabaseTableContentView.js: (WebInspector.DatabaseTableContentView.prototype._queryError): * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView): * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel): 2016-01-12 Matt Baker Web Inspector: Fix DataGrid row disclosure appearance and behavior https://bugs.webkit.org/show_bug.cgi?id=152991 Reviewed by Brian Burg. * UserInterface/Views/DataGrid.css: (.data-grid tr.parent td.disclosure::before): Ensure triangle is vertically aligned for any row height. (.data-grid tr:not(.parent) td.disclosure): Fix indent size. * UserInterface/Views/DataGrid.js: (WebInspector.DataGridNode.prototype.createCell): Added `icon` column property, encapsulate icon element creation. (WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle): Fix hit test logic by computing left padding. 2016-01-12 Devin Rousso Web Inspector: REGRESSION (r194879) - Opening views without being previously opened causes an Uncaught Exception https://bugs.webkit.org/show_bug.cgi?id=153006 Reviewed by Brian Burg. * UserInterface/Views/MultipleScopeBarItem.js: (WebInspector.MultipleScopeBarItem.prototype.displaySelectedItem): If there is no selected item, default to the first item in the list. 2016-01-12 Devin Rousso Web Inspector: creating a gradient in the Visual sidebar causes a crash https://bugs.webkit.org/show_bug.cgi?id=153003 Reviewed by Brian Burg. * UserInterface/Views/VisualStyleBackgroundPicker.js: (WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked): If a gradient does not already exist when the swatch is clicked, create a basic gradient using the current type and two "transparent" color stops (a minimum of two color stops are needed for a valid gradient). 2016-01-11 Devin Rousso Web Inspector: Storage tab navigation bar should fit on a single line https://bugs.webkit.org/show_bug.cgi?id=152473 Reviewed by Timothy Hatcher. The wrapping of the navigation bar on the Storage tab was caused by the fact that Sidebar.js used a minimum width of 200px, regardless of the content within the sidebar (unless it had a NavigationBar). Logic has been added that causes the sidebar to use the selected panel's own minimum width calculation if it is greater than 200px. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype.get minimumWidth): * UserInterface/Views/MultipleScopeBarItem.js: (WebInspector.MultipleScopeBarItem.prototype.set selectedScopeBarItem): (WebInspector.MultipleScopeBarItem.prototype.displaySelectedItem): Sets the displayed text to the currently selected item. (WebInspector.MultipleScopeBarItem.prototype.displayWidestItem): Sets the displayed text to the widest (pixel wise) item in the select element. * UserInterface/Views/NavigationBar.js: (WebInspector.NavigationBar.prototype._calculateMinimumWidth): Now uses NavigationItem.prototype.get minimumWidth. * UserInterface/Views/NavitationItem.js: (WebInspector.NavitationItem.prototype.get minimumWidth): Returns the element's realOffsetWidth. * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel.prototype.get minimumWidth): * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype.get minimumWidth): * UserInterface/Views/ScopeBar.js: (WebInspector.ScopeBar): (WebInspector.ScopeBar.prototype.get minimumWidth): * UserInterface/Views/Sidebar.js: (WebInspector.Sidebar.prototype.set selectedSidebarPanel): (WebInspector.Sidebar.prototype.get minimumWidth): (WebInspector.Sidebar.prototype.set width): (WebInspector.Sidebar.prototype.set collapsed): (WebInspector.Sidebar.prototype._recalculateWidth): Whenever the sidebar changes (e.g. tab change, sidebar becomes visible/hidden, etc.), a width recalculation is necessary to ensure that the navigation bar never wraps. * UserInterface/Views/SidebarPanel.js: (WebInspector.SidebarPanel.prototype.get minimumWidth): * UserInterface/Views/StorageSidebarPanel.js: (WebInspector.StorageSidebarPanel.prototype.get minimumWidth): * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel.prototype.get minimumWidth): 2016-01-11 Devin Rousso Web Inspector: Make Timelines view also remember sort order https://bugs.webkit.org/show_bug.cgi?id=152811 Reviewed by Timothy Hatcher. Changeset r194574 introduced the ability for WebInspector.Setting objects to be passed to DataGrid instances to save the sort column for that grid. These changes also add the ability for the sort order to be save as well. * 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.set sortOrder): If a WebInspector.Setting object has been given, save the new sort order. (WebInspector.DataGrid.prototype.set sortOrderSetting): Saves the given WebInspector.Setting object for modification whenever the user changes the sort order. * 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/RenderingFrameTimelineView.js: (WebInspector.RenderingFrameTimelineView): * UserInterface/Views/ScriptTimelineView.js: (WebInspector.ScriptTimelineView): 2016-01-11 Johan K. Jensen Web Inspector: Copying JS object output from console shouldn't include trailing '= $n' https://bugs.webkit.org/show_bug.cgi?id=119347 Reviewed by Joseph Pecoraro. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype.toClipboardString): 2016-01-11 Devin Rousso Web Inspector: Add basic Content section to Visual Sidebar https://bugs.webkit.org/show_bug.cgi?id=152972 Reviewed by Timothy Hatcher. Since the "content" property has so many different types of values, a simple text input editor should be added to provide some support for the CSS property until a better, more specialized editor is created. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css: (.visual-style-property-container.comma-separated-keyword-editor): Moved margin-left to new rule in VisualStylePropertyEditor.css. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel): (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection): Adds the basic editor under the Text section in a new subsection called Content. * UserInterface/Views/VisualStylePropertyEditor.css: (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)): Adds a left margin to property editors without a title. 2016-01-11 Devin Rousso Web Inspector: Visual sidebar minor bug fixes https://bugs.webkit.org/show_bug.cgi?id=152967 Reviewed by Timothy Hatcher. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype.refresh): Only update sections when it is not a significant change, as they are updated when the selector changes. (WebInspector.VisualStyleDetailsPanel.prototype._updateProperties): Only reset links if the refresh is a significant change (node or selected style changes). * UserInterface/Views/VisualStyleNumberInputBox.js: (WebInspector.VisualStyleNumberInputBox): (WebInspector.VisualStyleNumberInputBox.prototype.get value): Removed unreachable return. (WebInspector.VisualStyleNumberInputBox.prototype.set value): (WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown.adjustValue): _updatedValues.propertyMissing was changed to _propertyMissing in a prior patch. 2016-01-11 Joseph Pecoraro Web Inspector: Migrate Page Timeline recording to ScriptProfiler https://bugs.webkit.org/show_bug.cgi?id=152727 Reviewed by Brian Burg. * UserInterface/Images/TimelineRecordAPI.svg: Added. * UserInterface/Images/gtk/TimelineRecordAPI.svg: Added. New [S] image for API initiated script evaluations. Display matches the existing [S] Script Evaluated. Colors match the gray [N] Native image colors. * UserInterface/Models/ScriptInstrument.js: (WebInspector.ScriptInstrument.prototype.startInstrumentation): (WebInspector.ScriptInstrument.prototype.stopInstrumentation): (WebInspector.ScriptInstrument): Use ScriptProfiler, if available, in Web debuggables. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager): (WebInspector.TimelineManager.prototype.capturingStarted): (WebInspector.TimelineManager.prototype._processRecord): (WebInspector.TimelineManager.prototype._scriptProfilerTypeToScriptTimelineRecordType): (WebInspector.TimelineManager.prototype.scriptProfilerTrackingUpdated): (WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted): (WebInspector.TimelineManager.prototype._mergeScriptProfileRecords.let.nextRecord): (WebInspector.TimelineManager.prototype._mergeScriptProfileRecords.let.recordContainsRecord): (WebInspector.TimelineManager.prototype._mergeScriptProfileRecords): When running a timeline on a web debuggable the frontend receives both Timeline event records and ScriptProfiler events. Timeline (Web) records are high level web events like "Script Evaluated", "Event Dispatched", "Timer Fired". The timestamps for these records should always be wrapping a ScriptProfiler event and its associated profile data. So, at the end of a recording we merge ScriptProfiler profile data into the original Timeline (Web) record. * UserInterface/Models/ScriptTimelineRecord.js: (WebInspector.ScriptTimelineRecord.prototype.get profilePayload): (WebInspector.ScriptTimelineRecord.prototype.set profilePayload): (WebInspector.ScriptTimelineRecord.prototype.setProfilePayload): Deleted. Replace method with getter/setter. (WebInspector.ScriptTimelineRecord.EventType.displayName): Add a new event type for API records, but share display name with Script Evaluated. * UserInterface/Views/NavigationSidebarPanel.js: Fix typo. * UserInterface/Views/ScriptTimelineView.css: (.timeline-view.script > .data-grid .eventType-column): Deleted. There is no "eventType" column in the ScriptTimelineView datagrid, so remove styles. * UserInterface/Views/TimelineIcons.css: (.api-record .icon): * UserInterface/Views/TimelineRecordTreeElement.js: (WebInspector.TimelineRecordTreeElement): For API Script Evaluation records use the new icon. 2016-01-10 Joseph Pecoraro Web Inspector: Uncaught Exception selecting IndexedDB host folder in Storage tab https://bugs.webkit.org/show_bug.cgi?id=152943 Reviewed by Brian Burg. * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject): Another type of specialized folder tree element. 2016-01-10 Joseph Pecoraro Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._scopeChain[i].object.deprecatedGetAllProperties') https://bugs.webkit.org/show_bug.cgi?id=152944 Reviewed by Brian Burg. * UserInterface/Models/CallFrame.js: (WebInspector.CallFrame.prototype.collectScopeChainVariableNames): Missed one place where `object` needed to change to `objects`. Here the list will always contain a single object, only UI generated scopes for the sidebar may have multiple objects. 2016-01-10 Johan K. Jensen Web Inspector: Dashboard log message count doesn't include console.time messages https://bugs.webkit.org/show_bug.cgi?id=151280 Reviewed by Brian Burg. * UserInterface/Models/DefaultDashboard.js: (WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType): Make Info and Debug levels increment the log count. 2016-01-09 Dan Bernstein [Cocoa] Allow overriding the frameworks directory independently of using a staging install path https://bugs.webkit.org/show_bug.cgi?id=152926 Reviewed by Tim Horton. Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari. Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces. * Configurations/Base.xcconfig: - Replace STAGED_FRAMEWORKS_SEARCH_PATH in FRAMEWORK_SEARCH_PATHS with WK_OVERRIDE_FRAMEWORKS_DIR and add quotes to account for spaces. * Configurations/WebInspectorUIFramework.xcconfig: - Define INSTALL_PATH and PRODUCTION_FRAMEWORKS_DIR based on WK_OVERRIDE_FRAMEWORKS_DIR. 2016-01-08 Joseph Pecoraro Web Inspector: Test Resources should not be included in Production builds unless FORCE_TOOL_INSTALL https://bugs.webkit.org/show_bug.cgi?id=152941 Reviewed by Dan Bernstein. * Configurations/Base.xcconfig: Combine inspector resources in production, but not test resources. * Configurations/DebugRelease.xcconfig: Do not combine inspector resources in Release/Debug. Combine test resources. * Configurations/WebInspectorUIFramework.xcconfig: Simplify by moving to other config files. * Scripts/copy-user-interface-resources.pl: Have FORCE_TOOL_INSTALL combine test resources as well. * WebInspectorUI.vcxproj/build-webinspectorui.pl: Only combine test resources in non-Production. 2016-01-08 Joseph Pecoraro Web Inspector: Initiated section of Resource Details Sidebar should not display as empty and should update as the list changes https://bugs.webkit.org/show_bug.cgi?id=152907 Reviewed by Timothy Hatcher. * UserInterface/Models/Resource.js: (WebInspector.Resource.prototype.addInitiatedResource): Dispatch an event when the list of initiated resources changes. * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Add/remove event listeners for initiated resources changes to refresh the related resources section. (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL): (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection): Show/hide the related resources section depending on if we have something or not. 2016-01-08 Joseph Pecoraro Web Inspector: Uncaught exception: TypeError: this._initiatorSourceCodeLocation.sourceCode.addInitiatedResource is not a function https://bugs.webkit.org/show_bug.cgi?id=152905 Reviewed by Brian Burg. * UserInterface/Models/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.addInitiatedResource): Only Resource has addInitiatedResource, so only call it if the SourceCode in the SourceCodeLocation is a Resource. 2016-01-07 Devin Rousso Web Inspector: Add warnings to section that require specific values of other properties https://bugs.webkit.org/show_bug.cgi?id=148254 Reviewed by Timothy Hatcher. Added a function to VisualStylePropertyEditor to allow dependencies to be set which, whenever the editor is updated or changed, will be checked against the computed styles of the element to see if all the necessary property values are set. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel): (WebInspector.VisualStyleDetailsPanel.prototype.refresh): (WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateFlexboxSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection): (WebInspector.VisualStyleDetailsPanel.prototype._populateOutlineSection): Added dependencies to relevant property editors. (WebInspector.VisualStyleDetailsPanel.prototype._prepareForChange): Deleted. No longer needed as the sidebar panel will refresh whenever triggered. * UserInterface/Views/VisualStylePropertyEditor.css: (.visual-style-property-container.layout-reversed > .visual-style-property-title): (.visual-style-property-container > .visual-style-property-title > .property-reference-info): (.visual-style-property-container > .visual-style-property-editor-warning): (.visual-style-property-container.layout-reversed > .visual-style-property-editor-warning): (.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency): (.visual-style-property-container > .visual-style-property-value-container): (.visual-style-property-container.layout-reversed > .visual-style-property-value-container): * UserInterface/Views/VisualStylePropertyEditor.js: (WebInspector.VisualStylePropertyEditor): (WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues): (WebInspector.VisualStylePropertyEditor.prototype.addDependency): (WebInspector.VisualStylePropertyEditor.prototype._valueDidChange): (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies): Looks at the computed style for the node to see if any dependent properties do not have one of the required values. * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem): (WebInspector.VisualStyleSelectorSection.prototype._styleTextReset): Deleted. * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent): 2016-01-07 Devin Rousso Web Inspector: Allow error items on Exception page to be selected https://bugs.webkit.org/show_bug.cgi?id=152861 Reviewed by Brian Burg. * UserInterface/Debug/UncaughtExceptionReporter.css: (.uncaught-exception-sheet li): Allowed user-select on text. 2016-01-07 Devin Rousso Web Inspector: Add border-image properties to Visual sidebar https://bugs.webkit.org/show_bug.cgi?id=152755 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: Switched the order of VisualStyleURLInput and VisualStyleUnitSlider to be ordered alphabetically. * UserInterface/Views/VisualStyleBackgroundPicker.js: (WebInspector.VisualStyleBackgroundPicker.prototype._keywordSelectMouseDown): * UserInterface/Views/VisualStyleDetailsPanel.css: (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content > .group + .group > .row:first-child): (.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.border .visual-style-property-container.keyword-checkbox.border-image-slice): Since the checkbox is so small, give it less room. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection.generateBorderImagePropertyEditors): The three properties "border-image-width", "border-image-outset", and "border-image-slice" all have the same syntax, so one function to generate the layout for all three is much simpler. (WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection): Added the border image properties to a seperate group under Background > Border. * UserInterface/Views/VisualStyleKeywordPicker.js: (WebInspector.VisualStyleKeywordPicker.prototype._keywordSelectMouseDown): * UserInterface/Views/VisualStyleNumberInputBox.js: (WebInspector.VisualStyleNumberInputBox): (WebInspector.VisualStyleNumberInputBox.prototype.set units): Reordered logic to allow a value of ""/null to set the units to the "Number" value if it is allowed for that editor. (WebInspector.VisualStyleNumberInputBox.prototype.get synthesizedValue): Instead of relying upon whether the editor has any units, just check to see if the selected units are "Number" and, if not, add them to the value. (WebInspector.VisualStyleNumberInputBox.prototype._unitsElementTextContent): * UserInterface/Views/VisualStylePropertyCombiner.js: (WebInspector.VisualStylePropertyCombiner): Now has another argument that, when true, assumes the combiner has at least 4 numerical values and is of the form (can have units): property-name: value1 [value2 [value3 [value4 [...]]]]; (WebInspector.VisualStylePropertyCombiner.prototype.get synthesizedValue): (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateEditor): (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor): (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText): If the new argument is true, assigns the existing values in the following way: - If there is 1 value, assign it to all of the editors. - If there are 2 values, assign the 1st one to editors 1 and 3 and the 2nd one to editors 2 and 4. - If there are 3 values, assign the 1st one to editor 1, the 2nd one to editors 2 and 4, and the 3rd one to editor 3. - If there are 4 or more values, assign them normally. * UserInterface/Views/VisualStylePropertyEditor.js: (WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedKeyword): (WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedKeyword): Removed call to this.value to prevent recursion from VisualStyleNumberInputBox. (WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedUnit): (WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedUnit): Removed call to this.units to prevent recursion from VisualStyleNumberInputBox. 2016-01-07 Devin Rousso Web Inspector: Add indicator that element has pseudo-class in DOM tree https://bugs.webkit.org/show_bug.cgi?id=152680 Reviewed by Timothy Hatcher. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement): (WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange): Added an event listener to the node for when pseudo-classes change. * UserInterface/Views/DOMTreeOutline.css: (.dom-tree-outline li.pseudo-class-enabled > .selection::before): (.dom-tree-outline:focus li.selected.pseudo-class-enabled > .selection::before): Used the hover/selected background style element to ensure that the indicator is always positioned evenly with the first line of the opening tag. (.dom-tree-outline li.hovered:not(.selected) .selection): (.dom-tree-outline li .selection): (.dom-tree-outline li.selected .selection): (.dom-tree-outline li.elements-drag-over .selection): Removed "display: none;" (as well as the "block" declarations) to allow the ::before pseudo-element to display. 2016-01-07 Devin Rousso Web Inspector: Make creating new rules in the Styles sidebar simpler https://bugs.webkit.org/show_bug.cgi?id=152726 Reviewed by Timothy Hatcher. When creating a new rules of any kind, first look to see if it already exists in another rule that has no properties. If found, focus/select it instead of creating a new rule. Otherwise, create the new rule like normal. Also changed the way in which previously-focused sections/tree-items are saved to rely upon the selector of the new rule and whether the section for that rule is empty and an inspector rule. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/CSSStyleDeclaration.js: (WebInspector.CSSStyleDeclaration.prototype.isInspectorRule): Returns true if the style is an inspector rule. (WebInspector.CSSStyleDeclaration.prototype.hasProperties): Returns true if the style has CSS properties. * UserInterface/Models/DOMNodeStyles.js: (WebInspector.DOMNodeStyles.prototype.rulesForSelector.ruleHasSelector): (WebInspector.DOMNodeStyles.prototype.rulesForSelector): Returns a list of CSSRule that match the given selector and are not in media queries. * UserInterface/Views/BoxModelDetailsSectionRow.js: (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics): * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype.commentAllProperties): * UserInterface/Views/RulesStyleDetailsPanel.js: (WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection): (WebInspector.RulesStyleDetailsPanel.prototype.refresh.cssStyleDeclarationSectionEditorFocused): Now saves the newly focused section as the previously-focused section. (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNewInspectorRuleWithSelector): Renamed from cssStyleDeclarationSectionFocusNextNewInspectorRule. Now needs a selector argument. (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked): (WebInspector.RulesStyleDetailsPanel.prototype.sectionForStyle): Returns the first section that has a style with matching selector. (WebInspector.RulesStyleDetailsPanel.prototype.focusEmptySectionWithStyle): Finds the section corresponding to the given style and, if empty, focuses it. (WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed): No longer clears the previously-focused section. * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection): (WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem): (WebInspector.VisualStyleSelectorSection.prototype.update): (WebInspector.VisualStyleSelectorSection.prototype.treeItemForStyle): Returns the first tree item that has a style with matching selector. (WebInspector.VisualStyleSelectorSection.prototype.selectEmptyStyleTreeItem): Finds the tree item corresponding to the given style and, if empty, selects it. (WebInspector.VisualStyleSelectorSection.prototype._addNewRule): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem): Now requires a delegate object. (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent): 2016-01-06 Joseph Pecoraro Web Inspector: CRASH Attempting to pause on CSP violation not inside of script https://bugs.webkit.org/show_bug.cgi?id=152825 Reviewed by Timothy Hatcher. * UserInterface/Test/TestHarness.js: (TestHarness.prototype.expectThat): (TestHarness.prototype.pass): (TestHarness.prototype.fail): Add a simple way to output a standard pass/fail message. These are often nicer than expectThat(true, ...) or assert(false, ...). 2016-01-07 Joseph Pecoraro Web Inspector: DOMContentLoaded label in the Timeline tab should be "DOM Content Loaded" https://bugs.webkit.org/show_bug.cgi?id=152746 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/TimelineRuler.js: (WebInspector.TimelineRuler.prototype.addMarker): 2016-01-06 Joseph Pecoraro Web Inspector: Scope chain shows too many scopes for functions (`let` and `var` in the same function are two scopes) https://bugs.webkit.org/show_bug.cgi?id=152349 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: New "Closure Variables (%s)" string for including the function name alongside the closure scope section. * UserInterface/Models/ScopeChainNode.js: (WebInspector.ScopeChainNode): (WebInspector.ScopeChainNode.prototype.get objects): (WebInspector.ScopeChainNode.prototype.get object): Deleted. Allow a ScopeChainNode to hold onto multiple RemoteObjects (for multiple JSScopes). * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): Simplify the legacy case and convert "Local" to "Closure". The UI will now determine and display "Local" where appropriate in a backwards compatible way. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection): Associate ScopeChain nodes with CallFrame frames so that we can better combine variable sections and better label closure sections. * UserInterface/Views/ScopeChainDetailsSidebarPanel.css: (.scope-chain .details-section > .content > .group > .row.properties:not(.empty)): (.scope-chain .details-section > .content > .group > .row.properties:not(.empty):last-child): Styles for two object trees property sections next to eachother. 2016-01-06 Devin Rousso Web Inspector: Add basic Animation section to Visual Sidebar https://bugs.webkit.org/show_bug.cgi?id=152692 Reviewed by Timothy Hatcher. Adds a non-autocompleting section to the "Effects" section (renamed from "Animations") of the Visual sidebar for setting CSS Animation values. * Scripts/copy-user-interface-resources.pl: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Images/AnimationPlayStatePaused.svg: Added. * UserInterface/Images/AnimationPlayStateRunning.svg: Added. * UserInterface/Main.html: * UserInterface/Views/VisualStyleBasicInput.js: Added. (WebInspector.VisualStyleBasicInput): (WebInspector.VisualStyleBasicInput.prototype.get value): (WebInspector.VisualStyleBasicInput.prototype.set value): (WebInspector.VisualStyleBasicInput.prototype.get synthesizedValue): (WebInspector.VisualStyleBasicInput.prototype._handleInputElementInput): Very basic editor that is just an input box with a given placeholder. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel): (WebInspector.VisualStyleDetailsPanel.prototype._populateAnimationSection): Creates the necessary property editors and adds them to their respective rows. 2016-01-06 Devin Rousso Web Inspector: Add remaining background style properties to Visual sidebar https://bugs.webkit.org/show_bug.cgi?id=152757 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection): Added background-blend-mode and background-origin property editors. * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection.prototype._handleMouseOver): Unrelated error that occurred when the user was hovering over a selector item before the tree outline was able to create the selected item. 2016-01-05 Joseph Pecoraro REGRESSION(r187929): Web Inspector: Forced Layout and Style Recalculation records do not show up in Layout & Rendering timeline DataGrid https://bugs.webkit.org/show_bug.cgi?id=152747 Reviewed by Timothy Hatcher. * UserInterface/Views/LayoutTimelineView.js: (WebInspector.LayoutTimelineView.prototype._layoutTimelineRecordAdded): We want top-level Layout records. Not necessarily Layout records that are at the top of all records. Layout events such as style recalculation and forced layout may be triggered by script and therefore not be at the top of all records. 2016-01-04 Devin Rousso Web Inspector: Timelines view doesn't remember how I like to sort things https://bugs.webkit.org/show_bug.cgi?id=152626 Reviewed by Joseph Pecoraro. Currently, all instances of DataGrid have their sort column reset with each open/close of Web Inspector. This doesn't really make sense seeing as we save the user's settings in many other cases, so the sort method (which column) should be saved between inspector sessions. * 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.set sortColumnIdentifier): Moved the logic for classLists and events to _updateSortedColumn. (WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Instead of just setting the original sort method when instantiating the DataGrid, a WebInspector.Setting object is now able to be passed in via this setter to give the DataGrid access to the stored sort method value. (WebInspector.DataGrid.prototype._updateSortedColumn): Updates the classLists and fires events. If a sort column setting object exists, update its value. * 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/RenderingFrameTimelineView.js: (WebInspector.RenderingFrameTimelineView): * UserInterface/Views/ScriptTimelineView.js: (WebInspector.ScriptTimelineView): 2016-01-04 Devin Rousso Web Inspector: Add debounce to URL inputs in the Visual sidebar https://bugs.webkit.org/show_bug.cgi?id=152655 Reviewed by Joseph Pecoraro. Adding a debounce to url() based Visual sidebar editors will prevent needless errors from being thrown as the user types, since incomplete URL's will not be able to be located. * UserInterface/Base/Utilities.js: (Function.prototype.debounce): Prevents the given function from executing more than once in the specified amount of time. * UserInterface/Views/VisualStyleBackgroundPicker.js: (WebInspector.VisualStyleBackgroundPicker): * UserInterface/Views/VisualStyleURLInput.js: (WebInspector.VisualStyleURLInput): 2016-01-04 Joseph Pecoraro Web Inspector: Fix debug context menu string and reload without cache tooltip string https://bugs.webkit.org/show_bug.cgi?id=152725 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): 2016-01-04 Devin Rousso Web Inspector: add context menu items to switch CSS color property value syntax between RGB, HSL, etc https://bugs.webkit.org/show_bug.cgi?id=151918 Reviewed by Timothy Hatcher. Created a ColorSwatch class to hold all functionality for color swatches, allowing all context menu and popover events to be centralized. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Models/Color.js: Changed all 'var' to 'let' and 'nickname' to 'keyword' as per the spec. Mostly mechanical changes. (WebInspector.Color.prototype.isKeyword): Looks at the RGB values of each keyword to see if the current color matches any of them. (WebInspector.Color.prototype.canBeSerializedAsShortHEX): Fixed to account for alpha values, since HEXAlpha is now supported. * UserInterface/Views/CSSStyleDeclarationTextEditor.css: (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch): Deleted. (@media (-webkit-max-device-pixel-ratio: 1)): Deleted. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch > span): Deleted. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:hover > span): Deleted. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:active > span): Deleted. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged): (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked.updateCodeMirror.update): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked.updateCodeMirror): Deleted. (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked): Deleted. * UserInterface/Views/ColorSwatch.css: Copied from Source/WebInspectorUI/UserInterface/Views/VisualStyleColorPicker.css. (.color-swatch): (@media (-webkit-max-device-pixel-ratio: 1)): (.color-swatch > span): (.color-swatch:hover > span): (.color-swatch:active > span): * UserInterface/Views/ColorSwatch.js: Added. (WebInspector.ColorSwatch): (WebInspector.ColorSwatch.prototype.get element): (WebInspector.ColorSwatch.prototype.set color): (WebInspector.ColorSwatch.prototype.get color): (WebInspector.ColorSwatch.prototype._colorSwatchClicked): (WebInspector.ColorSwatch.prototype._colorPickerColorDidChange): (WebInspector.ColorSwatch.prototype._handleContextMenuEvent): (WebInspector.ColorSwatch.prototype._getNextValidHEXFormat.hexMatchesCurrentColor): (WebInspector.ColorSwatch.prototype._getNextValidHEXFormat): Loops through the list of HEX formats to find the first format that is valid for the current color in the list after the current format. (WebInspector.ColorSwatch.prototype._updateSwatch): * UserInterface/Views/VisualStyleColorPicker.css: (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch): (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch > span): * UserInterface/Views/VisualStyleColorPicker.js: (WebInspector.VisualStyleColorPicker): (WebInspector.VisualStyleColorPicker.prototype._colorSwatchColorChanged): (WebInspector.VisualStyleColorPicker.prototype._updateColorSwatch): (WebInspector.VisualStyleColorPicker.prototype._colorSwatchClicked): Deleted. (WebInspector.VisualStyleColorPicker.prototype._colorPickerColorDidChange): Deleted. 2016-01-04 Joseph Pecoraro Web Inspector: Mark last parameter of webkitGetUserMedia as non-optional to match updated IDL https://bugs.webkit.org/show_bug.cgi?id=152702 Reviewed by Brian Burg. * UserInterface/Models/NativeFunctionParameters.js: New IDL, and tests, show that the error callback is non-optional. 2016-01-04 Devin Rousso Web Inspector: Add context menu items to CSS selectors to auto-generate pseudo selectors https://bugs.webkit.org/show_bug.cgi?id=152657 Reviewed by Timothy Hatcher. Instead of having to copy a selector, create a new one, paste it, and then add a pseudo class or element, a context menu item has been added to automate this process for the user for each CSS pseudo-selector. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Controllers/CSSStyleManager.js: Added a static object containing the list of CSS pseudo-element names. * UserInterface/Models/DOMNodeStyles.js: (WebInspector.DOMNodeStyles.prototype.addRule.completed): (WebInspector.DOMNodeStyles.prototype.addRule.styleChanged): (WebInspector.DOMNodeStyles.prototype.addRule.addedRule): (WebInspector.DOMNodeStyles.prototype.addRule): Now accepts a second argument for setting the starting text value of the new rule. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent): 2016-01-04 Brian Burg Web Inspector: add a DebugUI context menu item for saving inspector protocol traffic to file https://bugs.webkit.org/show_bug.cgi?id=152671 Reviewed by Timothy Hatcher. Add a new tracer that captures all messages, and debug context menu items to control whether to capture protocol traffic and export it. In later patches, a reciprocal "Import..." context menu item will allow opening saved protocol traces and viewing them in a debug UI content view for debugging/visualizing protocol traffic. * UserInterface/Base/Main.js: * UserInterface/Debug/CapturingProtocolTracer.js: Copied from Source/WebInspectorUI/UserInterface/Protocol/ProtocolTracer.js. This tracer saves everything into a flat array. JSON protocol messages are saved as escaped strings, in case they are not valid JSON. We want to be able to debug such scenarios. (WebInspector.CapturingProtocolTracer): (WebInspector.CapturingProtocolTracer.prototype.get trace): (WebInspector.CapturingProtocolTracer.prototype.logFrontendException): (WebInspector.CapturingProtocolTracer.prototype.logProtocolError): (WebInspector.CapturingProtocolTracer.prototype.logFrontendRequest): (WebInspector.CapturingProtocolTracer.prototype.logDidHandleResponse): (WebInspector.CapturingProtocolTracer.prototype.logDidHandleEvent): (WebInspector.CapturingProtocolTracer.prototype._stringifyMessage): (WebInspector.CapturingProtocolTracer.prototype._processEntry): * UserInterface/Debug/ProtocolTrace.js: Added. This is a dumb container that holds protocol trace data. It will be responsible for deserializing saved trace files in later work. (WebInspector.ProtocolTrace): (WebInspector.ProtocolTrace.prototype.addEntry): (WebInspector.ProtocolTrace.prototype.get saveData): * UserInterface/Main.html: * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass): Simplify the implementation. Now there are one or two tracers at any given time. The default tracer handles legacy logging behavior and always exists. The custom tracer is installed when the "Capture Protocol Traffic" context menu item is toggled. Dispatch to the array of active tracers at each trace point. Tracers now get the actual JSON message instead of a stringified version passed as an argument. (InspectorBackendClass.prototype.set dumpInspectorProtocolMessages): (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages): (InspectorBackendClass.prototype.set dumpInspectorTimeStats): (InspectorBackendClass.prototype.set customTracer): (InspectorBackendClass.prototype.get activeTracers): (InspectorBackendClass.prototype._startOrStopAutomaticTracing): (InspectorBackendClass.prototype._sendMessageToBackend): (InspectorBackendClass.prototype._dispatchResponse): (InspectorBackendClass.prototype._dispatchEvent): (InspectorBackendClass.prototype.set activeTracer): Deleted. (InspectorBackendClass.prototype.get activeTracer): Deleted. * UserInterface/Protocol/LoggingProtocolTracer.js: (WebInspector.LoggingProtocolTracer.prototype._processEntry): (WebInspector.LoggingProtocolTracer): (WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest): (WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse): (WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse): (WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent): (WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent): * UserInterface/Protocol/ProtocolTracer.js: (WebInspector.ProtocolTracer.prototype.logFrontendException): (WebInspector.ProtocolTracer.prototype.logProtocolError): (WebInspector.ProtocolTracer.prototype.logFrontendRequest): (WebInspector.ProtocolTracer.prototype.logWillHandleResponse): (WebInspector.ProtocolTracer.prototype.logDidHandleResponse): (WebInspector.ProtocolTracer.prototype.logWillHandleEvent): (WebInspector.ProtocolTracer.prototype.logDidHandleEvent): 2016-01-04 Devin Rousso Web Inspector: Comma separated values in the Visual sidebar are appended with ) https://bugs.webkit.org/show_bug.cgi?id=152653 Reviewed by Timothy Hatcher. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value): Modified the RexExp used to split the comma separated value to account for strings with commas inside parenthesis (such as rgba() or hsla()) as well as ones without commas (such as "arial" and "red"). 2016-01-03 Devin Rousso Web Inspector: Visual sidebar selector section displays inherited section for non-editable rules https://bugs.webkit.org/show_bug.cgi?id=152659 Reviewed by Brian Burg. * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection.prototype.update): Only add a new inherited section header if it will contain at least one inherited rule. 2016-01-02 Devin Rousso Web Inspector: List all resources that are initiated by the selected resource in the Network tab https://bugs.webkit.org/show_bug.cgi?id=152647 Reviewed by Timothy Hatcher. Selecting resources in the Network tab will now display a list of all resources that the selected resource loaded, allowing for easier understanding of the relationship between all the resources loaded on a page. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: Added functions to generate link(s) to Resource instead of SourceCodeLocation. * UserInterface/Models/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.get initiatedResources): (WebInspector.Resource.prototype.addInitiatedResource): Each time a resource is added, if it has an initiator, it adds itself to the initiator's list of initiated resources. * UserInterface/Views/Main.css: (.resource-list > .resource-link): (.resource-list > .resource-link::before): (.resource-list > .resource-link + .resource-link): (.resource-link): * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel): (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL): 2016-01-02 Devin Rousso Web Inspector: Add list-style properties to Visual Sidebar https://bugs.webkit.org/show_bug.cgi?id=152631 Reviewed by Timothy Hatcher. Seeing as lists are very common in web pages across the internet, adding a section to let users edit the properties unique to lists seems prudent. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Images/ListStylePositionInside.svg: Added. * UserInterface/Images/ListStylePositionOutside.svg: Added. * UserInterface/Main.html: Re-added UserInterface/Views/VisualStyleURLInput.js * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel): (WebInspector.VisualStyleDetailsPanel.prototype._populateListStyleSection): * UserInterface/Views/VisualStyleKeywordIconList.css: (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon): Added specified color property to ensure that :active doesn't break the color of the svg. (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon:matches(.computed, .selected)): (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected): Changed the background-color and border-color values to match the rest of Web Inspector. * UserInterface/Views/VisualStyleKeywordIconList.js: (WebInspector.VisualStyleKeywordIconList): (WebInspector.VisualStyleKeywordIconList.dashToCapital): Deleted. (WebInspector.VisualStyleKeywordIconList.createListItem): The "initial" keyword will also use UserInterface/Images/VisualStyleNone.svg * UserInterface/Views/VisualStyleURLInput.js: Added. Previously removed in r192705. 2016-01-02 Alberto Garcia [GTK] webkit 2.3.5 build failure with python 3.3.4 https://bugs.webkit.org/show_bug.cgi?id=128971 Reviewed by Michael Catanzaro. Make sure that the stdin encoding is 'UTF-8' if using Python 3, otherwise the build will break. * Scripts/cssmin.py: 2016-01-01 Devin Rousso Web Inspector: shadow visual sidebar section can be confused with the box shadow section https://bugs.webkit.org/show_bug.cgi?id=148107 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel): Changed title of "Shadow" sub-section in "Background" to "Box Shadow". 2016-01-01 Devin Rousso Web Inspector: The Computed Styles Properties section shows warning icons and doesn't update if collapsed https://bugs.webkit.org/show_bug.cgi?id=152609 Reviewed by Brian Burg. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): If the CodeMirror instance is read-only, don't add any warning icons. * UserInterface/Views/ComputedStyleDetailsPanel.js: (WebInspector.ComputedStyleDetailsPanel): (WebInspector.ComputedStyleDetailsPanel.prototype._handleCollapsedStateChanged): The properties text editor will now refresh whenever the details section becomes un-collapsed. * UserInterface/Views/DetailsSection.js: (WebInspector.DetailsSection.prototype.set collapsed): Now fires an event with the current collapsed state as data. 2015-12-31 Matt Baker Web Inspector: "No Filter Results" message overlaps Debugger sidebar sections https://bugs.webkit.org/show_bug.cgi?id=150608 Reviewed by Brian Burg. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.showResourcesWithIssuesOnlyFilterFunction): Style cleanup. (WebInspector.DebuggerSidebarPanel): Add breakpoints tree to the details section before adding Global Breakpoint elements, since adding them will trigger filtering. (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange): Simplified selection management between the various tree outlines. (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection): Style cleanup. (WebInspector.DebuggerSidebarPanel.prototype.get hasSelectedElement): Deleted. Defer to the base class implementation. (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectCallStackContentTreeElements): Deleted. (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectBreakpointContentTreeElements): Deleted. (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectPauseReasonContentTreeElements): Deleted. These are no longer needed, since the list of visible tree elements list can be used to manage tree element selection is a more general way. * UserInterface/Views/NavigationSidebarPanel.css: Empty content placeholders are now inserted into the DOM as a sibling of the tree that was filtered. As such, they can be a child of a details section, or the sidebar's content element. (.sidebar > .panel.navigation > .content .empty-content-placeholder): Styles for all empty content placeholders. (.sidebar > .panel.navigation > .content > .empty-content-placeholder): Styles for empty content placeholders that fill the sidebar's content element. (.sidebar > .panel.navigation > .content .message): Styles for all empty content placeholders. (.sidebar > .panel.navigation > .empty-content-placeholder): Deleted. (.sidebar > .panel.navigation > .empty-content-placeholder > .message): Deleted. * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel): Track the tree outline which currently has a selection. Manage a map of content placeholders (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline): (WebInspector.NavigationSidebarPanel.prototype.get hasSelectedElement): Check all visible content trees for a selected element. (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline): (WebInspector.NavigationSidebarPanel.prototype.treeElementForRepresentedObject): Check all visible content trees for the represented object. (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder): (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder): (WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder): No sidebars currently have more than one filterable content tree outline, but in the future we will want to support this. Empty content placeholder visibility is now done per tree outline. (WebInspector.NavigationSidebarPanel.prototype.show): Focus the tree outline that most recently had the selection, or the first tree outline in the visible tree list, if it exists. (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults.checkTreeOutlineForEmptyFilterResults): Tree is considered filtered if no visible filterable tree elements are found. (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults): Check all visible trees that support filtering. (WebInspector.NavigationSidebarPanel.prototype._updateFilter): Support for filtering multiple content trees. (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Check if the element's tree outline supports filtering, before applying filters. (WebInspector.NavigationSidebarPanel.prototype._treeSelectionDidChange): Update the selected tree outline. (WebInspector.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded): Create a new empty content placeholder element for the tree. (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Deleted. No longer used. * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel.prototype.get hasSelectedElement): Deleted. Defer to the base class implementation. 2015-12-29 Devin Rousso Web Inspector: Styling of invalid selector persists when changing the selected node https://bugs.webkit.org/show_bug.cgi?id=152456 Reviewed by Brian Burg. If the user changes the selector of a CSS rule to be invalid (e.g. having a { or ; character), it is expected that the invalid indicator will be removed once the user changes nodes or reverts the selector to its previous value. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CSSStyleDeclarationSection.css: (.style-declaration-section > .header > .icon.toggle-able:hover): (.style-declaration-section > .header > .icon.toggle-able:active): (.style-declaration-section:not(.invalid-selector) > .header > .icon.toggle-able:hover): Deleted. Added better :hover and :active styles. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection): (WebInspector.CSSStyleDeclarationSection.prototype.refresh): (WebInspector.CSSStyleDeclarationSection.prototype._handleIconElementClicked): If the selector is invalid, simply refresh the section to regenerate the original selector with correct content, specificity, and highlighting. (WebInspector.CSSStyleDeclarationSection.prototype.get _hasInvalidSelector): Deleted. Moved the state of the invalid selector to a member variable instead of a DOM class. (WebInspector.CSSStyleDeclarationSection.prototype._updateSelectorIcon): Renamed from _markSelector for clarity. * UserInterface/Views/VisualStyleSelectorTreeItem.css: (.item.visual-style-selector-item.selector-invalid > .icon:hover): (.item.visual-style-selector-item.selector-invalid > .icon:active): (.item.visual-style-selector-item.selector-invalid > .icon): Added :hover and :active styles. * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem): (WebInspector.VisualStyleSelectorTreeItem.prototype.onattach): (WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector): (WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon): (WebInspector.VisualStyleSelectorTreeItem.prototype._handleIconElementClicked): (WebInspector.VisualStyleSelectorTreeItem.prototype._selectorChanged): Deleted. Changed the names of a few functions to provide better consistency across the classes in the Style sidebar. 2015-12-27 Brian Burg Web Inspector: improve pre-filled bugzilla link on Uncaught Exception reporter sheet https://bugs.webkit.org/show_bug.cgi?id=152402 Reviewed by Joseph Pecoraro. Include the UA string, inspected page URL, and a template that includes steps to reproduce and notes. Other common headings (regression, expected, results, summary) are omitted because they are unlikely to be known when an uncaught exception occurs, or are obvious ("shouldn't throw exception"). * UserInterface/Debug/UncaughtExceptionReporter.js: 2015-12-21 Nikita Vasilyev WebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithTypeAllowed is not a function https://bugs.webkit.org/show_bug.cgi?id=152471 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WebInspector._updateNewTabButtonState): Don't use arrow functions because of https://webkit.org/b/152497 "Arrow functions: 'this' isn't lexically bound" 2015-12-21 Nikita Vasilyev Web Inspector: Remove unused WebInspector.Object.removeAllListeners https://bugs.webkit.org/show_bug.cgi?id=152474 Reviewed by Timothy Hatcher. * UserInterface/Base/Object.js: (WebInspector.Object.removeAllListeners): Deleted. (WebInspector.Object.prototype.removeAllListeners): Deleted. 2015-12-20 Dan Bernstein Remove unused setToolbarHeight https://bugs.webkit.org/show_bug.cgi?id=152466 Reviewed by Darin Adler. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): * UserInterface/Protocol/InspectorFrontendHostStub.js: (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.setToolbarHeight): Deleted. 2015-12-19 Dan Bernstein [Mac] WebKit contains dead source code for OS X Mavericks and earlier https://bugs.webkit.org/show_bug.cgi?id=152462 Reviewed by Alexey Proskuryakov. - Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions that became uniform across all OS X versions as a result: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Scripts/copy-user-interface-resources.pl: Removed code to delete Images/Legacy. * UserInterface/Images/Legacy: Removed this empty directory. 2015-12-18 Matt Baker Web Inspector: Make it possible to debug injected scripts when the Debug UI is enabled https://bugs.webkit.org/show_bug.cgi?id=152445 Reviewed by Joseph Pecoraro. * UserInterface/Base/Main.js: Added function to check for debug UI. * UserInterface/Base/Object.js: Added notification for debug UI enabled state change. * UserInterface/Base/Utilities.js: (isWebInspectorInternalScript): (isWebInspectorDebugScript): Added functions to check for internal and debug inspector scripts. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager): Maintain a list of inspector debug scripts, so that the manager can add and remove them when the debug UI is enabled/disabled. (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts): (WebInspector.DebuggerManager.prototype.reset): Clear the list of inspector debug scripts. (WebInspector.DebuggerManager.prototype.debuggerDidPause): (WebInspector.DebuggerManager.prototype.scriptDidParse): Skip internal inspector scripts. Debug inspector scripts are tracked, and an added event is dispatched if the debug UI is enabled. (WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange): Dispatch added/removed events for inspector debug scripts. * UserInterface/Debug/Bootstrap.js: (WebInspector.runBootstrapOperations): Expose changes to the debug UI setting to the reset of the UI, by dispatching a WebInspector.Notification.DebugUIEnabledDidChange event. * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation): Only resolve inspector debug source locations when the debug UI is enabled. * UserInterface/Test/Test.js: Reimplemented debug UI check for tests. Always returns false. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._addScript): Removed check for inspector debug scripts. DebuggerManager filters scripts as needed. (WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved): Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): (WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved): Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts. (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): Removed check for inspector debug scripts. DebuggerManager filters scripts as needed. 2015-12-17 Joseph Pecoraro Web Inspector: Remove "local" scope type from the protocol https://bugs.webkit.org/show_bug.cgi?id=152409 Reviewed by Timothy Hatcher. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): 2015-12-17 Joseph Pecoraro Web Inspector: CSS warning's fake CallFrame is not creating a valid payload https://bugs.webkit.org/show_bug.cgi?id=152413 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._appendLocationLink): This attempts to create a CallFrame from a Console.CallFrame payload, but this was missing the required functionName string parameter. 2015-12-17 Joseph Pecoraro Provide a way to distinguish a nested lexical block from a function's lexical block https://bugs.webkit.org/show_bug.cgi?id=152361 Reviewed by Saam Barati. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection): New "Block Variables" string. * UserInterface/Models/ScopeChainNode.js: New "Block" scope type, and update existing types. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): Parse the protocol type to frontend types. Use the protocol generated enum. 2015-12-17 Joseph Pecoraro Web Inspector: Improve names in Debugger Call Stack section when paused https://bugs.webkit.org/show_bug.cgi?id=152398 Reviewed by Brian Burg. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.debuggerDidPause): Use a new fromPayload helper to construct the CallFrame and share code. * UserInterface/Models/CallFrame.js: (WebInspector.CallFrame.functionNameFromPayload): (WebInspector.CallFrame.programCodeFromPayload): (WebInspector.CallFrame.fromDebuggerPayload): (WebInspector.CallFrame.fromPayload): Add a new way to construct a call frame. There are two kinds of CallFrame payloads in the protocol: - Debugger.CallFrame, this new path - Console.CallFrame, the pre-existing path 2015-12-17 Brian Burg Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting https://bugs.webkit.org/show_bug.cgi?id=151635 Reviewed by Joseph Pecoraro. Follow-up fix to stop double-logging everything. * UserInterface/Protocol/LoggingProtocolTracer.js: (WebInspector.LoggingProtocolTracer.prototype._processEntry): 2015-12-17 Joseph Pecoraro Web Inspector: Improve console.trace, make it more like console.assert and inline the message https://bugs.webkit.org/show_bug.cgi?id=152352 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: New "Trace" related strings. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype.expand): Since we auto-expand Trace messages for their Call Stack, don't also auto-expand a single inner object, which may be big and push the actual stack trace off the screen. (WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments): Behave like Assert messages and absorb a message string, and include extra arguments gracefully. (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments): For expandable messages with simple extra arguments (console.trace with primitives and backtrace, or console.assert with primitives and backtrace) we were hiding the inline lossless previews and not showing them as a bulleted list below. We can just keep the lossless previews inline in the title, since they were only put there because they are small and lossless. (WebInspector.ConsoleMessageView.prototype.toClipboardString): No need to hard code "console.trace()" in the clipboard. * UserInterface/Views/ConsoleMessageView.css: (.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider):not(.inline-lossless)): (.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider)): Deleted. Don't hide the inline lossless preview in the console message title when it is inline-lossless. * UserInterface/Views/ObjectTreeView.js: (WebInspector.ObjectTreeView.prototype.expand): Do not allow expanding a loss-less preview. 2015-12-16 Joseph Pecoraro Web Inspector: Add JSContext Script Profiling https://bugs.webkit.org/show_bug.cgi?id=151899 Reviewed by Brian Burg. Enable the Timeline tab for JSContext inspection. Currently only JSContext inspection will use the ScriptProfiler domain, it will be enabled for Page inspection in a follow-up. First pass at the UI creates basic ScriptTimelineRecords for ScriptProfiler events. At the end of recording, when profiles are downloaded, it attaches profiles to the timeline records and refreshes the Scripts timeline. * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager): (WebInspector.TimelineManager.defaultInstruments): (WebInspector.TimelineManager.prototype.computeElapsedTime): (WebInspector.TimelineManager.prototype.scriptProfilerIsTracking): (WebInspector.TimelineManager.prototype._loadNewRecording): (WebInspector.TimelineManager.prototype._mainResourceDidChange): (WebInspector.TimelineManager.prototype._resourceWasAdded): (WebInspector.TimelineManager.prototype._garbageCollected): (WebInspector.TimelineManager.prototype._addRecord): Deleted. * UserInterface/Main.html: * UserInterface/Models/Instrument.js: (WebInspector.Instrument.startLegacyTimelineAgent): * UserInterface/Models/ScriptInstrument.js: (WebInspector.ScriptInstrument.prototype.startInstrumentation): (WebInspector.ScriptInstrument.prototype.stopInstrumentation): (WebInspector.ScriptInstrument): * UserInterface/Models/ScriptTimelineRecord.js: (WebInspector.ScriptTimelineRecord.prototype.get profilePayload): (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload): (WebInspector.ScriptTimelineRecord): (WebInspector.ScriptTimelineRecord.EventType.displayName): * UserInterface/Models/Timeline.js: (WebInspector.Timeline.prototype.refresh): * UserInterface/Models/TimelineRecording.js: (WebInspector.TimelineRecording.sourceCodeTimelinesSupported): (WebInspector.TimelineRecording.prototype.timelineForRecordType): (WebInspector.TimelineRecording.prototype.addRecord): * UserInterface/Protocol/ScriptProfilerObserver.js: Copied from Source/WebInspectorUI/UserInterface/Models/ScriptInstrument.js. (WebInspector.ScriptProfilerObserver.prototype.trackingStart): (WebInspector.ScriptProfilerObserver.prototype.trackingUpdate): (WebInspector.ScriptProfilerObserver.prototype.trackingComplete): (WebInspector.ScriptProfilerObserver): * UserInterface/Views/ScriptTimelineView.js: (WebInspector.ScriptTimelineView): (WebInspector.ScriptTimelineView.prototype._processPendingRecords): (WebInspector.ScriptTimelineView.prototype._scriptTimelineRecordRefreshed): * UserInterface/Views/TimelineRecordTreeElement.js: (WebInspector.TimelineRecordTreeElement): * UserInterface/Views/TimelineTabContentView.js: (WebInspector.TimelineTabContentView.isTabAllowed): 2015-12-17 Matt Baker Web Inspector: REGRESSION (r193913): Popover covers completion suggestions https://bugs.webkit.org/show_bug.cgi?id=152369 Reviewed by Timothy Hatcher. * UserInterface/Views/Variables.css: (:root): Swap popover and tooltip z-index ordering. 2015-12-16 Joseph Pecoraro REGRESSION: Web Inspector: console.dir(...) should force allowing object expansion https://bugs.webkit.org/show_bug.cgi?id=152328 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._formatParameter): Propogate the force parameter down. 2015-12-16 Joseph Pecoraro Web Inspector: Improve copy of console messages with multiple arguments - console.log(obj1, obj2) https://bugs.webkit.org/show_bug.cgi?id=152330 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype.toClipboardString): Copy the inner text of the extra arguments list as well, for console messages with multiple objects. Rearrange the sections that, if there is a stack trace it comes at the end after multiple arguments. If there is no stack trace, include the location info next to the top line, before multiple arguments. 2015-12-16 Joseph Pecoraro Web Inspector: Improve copy of console message containing Array and Map output https://bugs.webkit.org/show_bug.cgi?id=152329 Reviewed by Timothy Hatcher. Introduce a real space in the content instead of style specific margins so the existing copy/paste mechanism (innerText) will have spaces between index/key and value. * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css: (.object-tree-array-index .index-name): Deleted. * UserInterface/Views/ObjectTreeArrayIndexTreeElement.js: (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment): (WebInspector.ObjectTreeArrayIndexTreeElement): * UserInterface/Views/ObjectTreeMapEntryTreeElement.css: (.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name): Deleted. * UserInterface/Views/ObjectTreeMapEntryTreeElement.js: (WebInspector.ObjectTreeMapEntryTreeElement.prototype.titleFragment): (WebInspector.ObjectTreeMapEntryTreeElement): * UserInterface/Views/ObjectTreeSetIndexTreeElement.js: (WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment): (WebInspector.ObjectTreeSetIndexTreeElement): 2015-12-16 Joseph Pecoraro Web Inspector: Typing object literal in the console causes a parse error https://bugs.webkit.org/show_bug.cgi?id=141737 Reviewed by Timothy Hatcher. Provide a convenience in console evaluations for JSON object like input. If the console input starts with '{' and ends with '}' wrap the input in parenthesis to force evaluation as an expression. For example, input "{a:1}" would be convenience wrapped to "({a:1})" and produce the expected object. This helps avoid the unusual treatment of "{a:1}" as program containing a labeled statement, which is often not what the user expects. And in more realistic cases, like "{a:1, b:2}", produce a SyntaxError. * UserInterface/Controllers/RuntimeManager.js: (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow): Detect and convenience wrap the given expression. 2015-12-16 Joseph Pecoraro Uncaught Exception View has undefined exception URL https://bugs.webkit.org/show_bug.cgi?id=152327 Reviewed by Darin Adler. * UserInterface/Debug/UncaughtExceptionReporter.js: (handleUncaughtException): Use ErrorEvent's filename property, not url which is undefined. 2015-12-16 Joseph Pecoraro Uncaught Exception: ReferenceError: Can't find variable: resolvedValue https://bugs.webkit.org/show_bug.cgi?id=152326 Reviewed by Darin Adler. * UserInterface/Views/ObjectTreeBaseTreeElement.js: (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler): This identifier is used later on, so assign it here. 2015-12-15 Joseph Pecoraro Web Inspector: Localize "global code" and "eval code" strings https://bugs.webkit.org/show_bug.cgi?id=152313 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/CallFrame.js: (WebInspector.CallFrame.fromPayload): Localize the strings given to use from the backend. 2015-12-15 Matt Baker Web Inspector: Convert Sidebar classes to use View https://bugs.webkit.org/show_bug.cgi?id=152274 Reviewed by Brian Burg. Updated Sidebar and SidebarPanel to inherit from View. Mostly mechanical changes. Once the DetailsSection class family inherits from View (https://webkit.org/b/152269), directly modifying a sidebar's 'contentView' element will rarely be necessary. * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js: (WebInspector.ApplicationCacheDetailsSidebarPanel): * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WebInspector.CSSStyleDetailsSidebarPanel): (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): (WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels): Add/remove panels as subviews of the sidebar. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._filterDidChange): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel): * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause): * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildLayerInfoSection): (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection): * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel): (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline): (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility): * UserInterface/Views/ProbeDetailsSidebarPanel.js: (WebInspector.ProbeDetailsSidebarPanel.prototype.set inspectedProbeSets): * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel): (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL): (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection): (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection): * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel): (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.): (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): * UserInterface/Views/SidebarPanel.js: Inherit from View. (WebInspector.SidebarPanel): Replace the content element (the portion of the view excluding navigation bars, filter bars, etc.) with a View object. A sidebar's content can be a mixture of unwrapped DOM elements and View objects. For now, the content view's element will be mutated directly, but once the DetailsSection class family inherits from the View class the handling of details sections will be simplified. (WebInspector.SidebarPanel.prototype.get contentView): (WebInspector.SidebarPanel.prototype.shown): (WebInspector.SidebarPanel.prototype.hidden): (WebInspector.SidebarPanel.prototype.get contentElement): Deleted. Replaced by WebInspector.SidebarPanel.prototype.get contentView. * UserInterface/Views/StyleDetailsPanel.js: Inherit from View. (WebInspector.StyleDetailsPanel): (WebInspector.StyleDetailsPanel.prototype.get element): Deleted. Defer to View.element getter. * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight): * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel): (WebInspector.VisualStyleDetailsPanel.prototype._updateSections): 2015-12-14 Joseph Pecoraro Web Inspector: Stack traces in console incorrectly show "(anonymous function)" for global code https://bugs.webkit.org/show_bug.cgi?id=152280 Reviewed by Brian Burg. * UserInterface/Images/Program.svg: Added. * UserInterface/Images/gtk/Program.svg: Added. Copied from TimelineRecordScriptEvaluated.svg. * UserInterface/Models/CallFrame.js: (WebInspector.CallFrame): (WebInspector.CallFrame.prototype.get programCode): Add a new property to check if this call frame is in program code. (WebInspector.CallFrame.fromPayload): Detect different sources of program code (global, eval, module). * UserInterface/Views/CallFrameIcons.css: (.program-icon .icon): * UserInterface/Views/CallFrameView.js: (WebInspector.CallFrameView.iconClassNameForCallFrame): Give program code the [S] global script icon like in profiles. 2015-12-14 Joseph Pecoraro Web Inspector: Copy message from console with a stack trace does not include source code locations https://bugs.webkit.org/show_bug.cgi?id=152270 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype.toClipboardString): When the the StackTrace was upgraded to a real collection of CallFrame object's the CallFrame's got real SourceCodeLocation properties. 2015-12-13 Matt Baker Web Inspector: Make TimelineOverview's graph container a subview https://bugs.webkit.org/show_bug.cgi?id=152235 Reviewed by Brian Burg. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview): Create graph container subview. (WebInspector.TimelineOverview.prototype._instrumentAdded): Add overview to the graph container view. (WebInspector.TimelineOverview.prototype._instrumentRemoved): Remove overview from the graph container view. (WebInspector.TimelineOverview.prototype.layout): No longer necessary to manually lay out overview graphs. (WebInspector.TimelineOverview.prototype._needsLayout): Deleted. Removed dead code. 2015-12-12 Matt Baker Web Inspector: CodeMirrorTokenTrackingController handles symbols in class definitions incorrectly https://bugs.webkit.org/show_bug.cgi?id=152218 Reviewed by Timothy Hatcher. * UserInterface/Controllers/CodeMirrorTokenTrackingController.js: (WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression): Stop checking for object literal shorthand property if an open parenthesis is found. This check became necessary with the introduction of ES6 class syntax. * UserInterface/Views/CodeMirrorAdditions.js: Use localState when available, to prevent passing a state that doesn't define a tokenize property. 2015-12-12 Joseph Pecoraro REGRESSION (r191613): Web Inspector: Can't type spaces when editing DOM nodes https://bugs.webkit.org/show_bug.cgi?id=152173 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel): Disable the keyboard shortcuts when they are created. They will be enabled when the panel is shown / hidden. It doesn't really make sense that these are on the sidebar panel instead of the tab, but things will be changing in Timelines soon anyways so just fix this now. 2015-12-12 Nikita Vasilyev Web Inspector: "Selected Element" should use sans-serif font, not monospace https://bugs.webkit.org/show_bug.cgi?id=152212 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.css: (.console-user-command.special-user-log > .console-message-text): 2015-12-11 Nikita Vasilyev Web Inspector: When logging strings, detect stack traces and show them as StackTraceView https://bugs.webkit.org/show_bug.cgi?id=149790 Reviewed by Timothy Hatcher. * UserInterface/Models/StackTrace.js: (WebInspector.StackTrace.isLikelyStackTrace): Added. * UserInterface/Views/ConsoleMessageView.css: (.console-message-extra-parameter .stack-trace): Display stack trace view on the same line as a list bullet point from console message extra parameter. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments): Don't format with string substitutions for stack traces. E.g. there is no need to replace %s with the next argument. (WebInspector.ConsoleMessageView.prototype._isStackTrace): Added. (WebInspector.ConsoleMessageView.prototype._formatParameterAsString): Detect stack traces and format them appropriately. 2015-12-10 Nikita Vasilyev Web Inspector: debugger dashboard's switching arrows are positioned too close to the dashboard border https://bugs.webkit.org/show_bug.cgi?id=151867 Reviewed by Timothy Hatcher. * UserInterface/Views/DashboardContainerView.css: (.dashboard-container .advance-arrow): 2015-12-10 Matt Baker Web Inspector: debugger popover should have source location link when showing function source https://bugs.webkit.org/show_bug.cgi?id=151866 Reviewed by Brian Burg. Added source code location link to function popover header. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails): Create source code location link from response payload. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction): 2015-12-10 Nikita Vasilyev Web Inspector: [Meta] Unify z-index values in Inspector's CSS https://bugs.webkit.org/show_bug.cgi?id=151978 Introduce CSS variables for z-index due to recurring issues with incorrectly overlapping elements. From now on, all z-index values >= 64 must be defined as variables. Values below 64 must not. Reviewed by Timothy Hatcher. * UserInterface/Views/Variables.css: (:root): Introduce z-index variables. * UserInterface/Debug/UncaughtExceptionReporter.css: (.sheet-container): * UserInterface/Views/BoxModelDetailsSectionRow.css: (.details-section .row.box-model .editing): * UserInterface/Views/CompletionSuggestionsView.css: (.completion-suggestions): * UserInterface/Views/DashboardContainerView.css: (.dashboard-container .advance-arrow): * UserInterface/Views/DataGrid.css: (.data-grid .resizer): * UserInterface/Views/DetailsSection.css: (.details-section > .header): (.details-section .details-section > .header): * UserInterface/Views/FindBanner.css: (.find-banner): (.find-banner > button.segmented:active): * UserInterface/Views/Main.css: (#docked-resizer): (.message-text-view): (.bouncy-highlight): * UserInterface/Views/Popover.css: (.popover): * UserInterface/Views/Resizer.css: (.resizer): (.glass-pane-for-drag): * UserInterface/Views/TimelineOverview.css: (.timeline-overview > .scroll-container): * UserInterface/Views/VisualStyleSelectorSection.css: (.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider): 2015-12-09 Matt Baker Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync https://bugs.webkit.org/show_bug.cgi?id=151876 Reviewed by Brian Burg. * UserInterface/Base/Main.js: Use root view singleton instead of creating it explicitly. * UserInterface/Views/View.js: (WebInspector.View): (WebInspector.View.rootView): Singleton root view access. Lazily create and return a view backed by the document's body element. (WebInspector.View.prototype.isDescendantOf): (WebInspector.View.prototype.insertSubviewBefore): (WebInspector.View.prototype.removeSubview): (WebInspector.View.prototype.didMoveToWindow): Notify the view when it becomes, or is no longer, descended from the root view. (WebInspector.View.prototype.didMoveToParent): Notify the view when it's added to, or removed from, a parent view. (WebInspector.View._scheduleLayoutForView): (WebInspector.View._cancelScheduledLayoutForView): (WebInspector.View.prototype.makeRootView): Deleted. No longer needed. (WebInspector.View.prototype.didAttach): Deleted. (WebInspector.View.prototype.didDetach): Deleted. Replaced by didMoveToParent. 2015-12-09 Brian Burg Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting https://bugs.webkit.org/show_bug.cgi?id=151635 Reviewed by Timothy Hatcher. When closing and reopening the inspector, the setting for whether to dump protocol messages should be persisted. Otherwise, enabling dumping from the debug-only UI will miss the initial flood of messages that are processed when the Inspector loads initial data. To support a persistent setting, and build some infrastructure for more advanced uses of collected protocol messages, this patch adds a new object to trace protocol events. It gets callbacks for each and implements the console-dumping functionality previously baked in to InspectorBackend. In follow-up patches, other protocol tracers will be added to save protocol data to disk, marshall it to a higher inspection level, or provide more fine-grained control over what is logged. This change moves Setting.js into the Base/ directory, since it is used by Views, Models, and now Protocol classes. * UserInterface/Base/Setting.js: Renamed from Source/WebInspectorUI/UserInterface/Models/Setting.js. (WebInspector.Setting): (WebInspector.Setting.prototype.get name): (WebInspector.Setting.prototype.get value): (WebInspector.Setting.prototype.set value): * UserInterface/Main.html: * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass): (InspectorBackendClass.prototype.set dumpInspectorProtocolMessages): (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages): We still want to support the legacy way to enable dumping: `InspectorBackend.dumpInspectorProtocolMessages = true`. This is because some tests always use it, and it's easier to set this flag in a custom Bootstrap.js file than to configure the Setting. (InspectorBackendClass.prototype.set dumpInspectorTimeStats): (InspectorBackendClass.prototype.get dumpInspectorTimeStats): We still want to support the legacy way to enable dumping: `InspectorBackend.dumpInspectorTimeStats = true`. This is because MessageDispatcher checks this flag for its logging. (InspectorBackendClass.prototype.set activeTracer): (InspectorBackendClass.prototype.get activeTracer): Set the active tracer, finalizing and removing any active tracer if one exists. If removing a custom tracer (setting to null), then re-sync activeTracer with the automatic tracing Setting. (InspectorBackendClass.prototype.dispatch): (InspectorBackendClass.prototype._startOrStopAutomaticTracing): Sync the Setting with activeTracer. If an custom tracer is active, don't replace it with the automatic logging tracer. (InspectorBackendClass.prototype._sendCommandToBackendWithCallback): (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise): (InspectorBackendClass.prototype._sendMessageToBackend): (InspectorBackendClass.prototype._dispatchResponse): (InspectorBackendClass.prototype._dispatchEvent): (InspectorBackendClass.prototype._flushPendingScripts): * UserInterface/Protocol/LoggingProtocolTracer.js: Added. (WebInspector.LoggingProtocolTracer): (WebInspector.LoggingProtocolTracer.prototype.set dumpMessagesToConsole): (WebInspector.LoggingProtocolTracer.prototype.get dumpMessagesToConsole): (WebInspector.LoggingProtocolTracer.prototype.set dumpTimingDataToConsole): (WebInspector.LoggingProtocolTracer.prototype.get dumpTimingDataToConsole): (WebInspector.LoggingProtocolTracer.prototype.logFrontendException): (WebInspector.LoggingProtocolTracer.prototype.logProtocolError): (WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest): (WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse): (WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse): (WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent): (WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent): (WebInspector.LoggingProtocolTracer.prototype._processEntry): * UserInterface/Protocol/ProtocolTracer.js: Added. (WebInspector.ProtocolTracer.prototype.logStarted): (WebInspector.ProtocolTracer.prototype.logFrontendException): (WebInspector.ProtocolTracer.prototype.logProtocolError): (WebInspector.ProtocolTracer.prototype.logFrontendRequest): (WebInspector.ProtocolTracer.prototype.logWillHandleResponse): (WebInspector.ProtocolTracer.prototype.logDidHandleResponse): (WebInspector.ProtocolTracer.prototype.logWillHandleEvent): (WebInspector.ProtocolTracer.prototype.logDidHandleEvent): (WebInspector.ProtocolTracer.prototype.logFinished): (WebInspector.ProtocolTracer): * UserInterface/Test.html: 2015-12-09 Brian Burg Web Inspector: zoom with Ctrl +/- doesn't work correctly when inspector is docked https://bugs.webkit.org/show_bug.cgi?id=152076 Reviewed by Timothy Hatcher. When computing the new width or height of the inspector, take the zoom level into account. window.inner{Width,Height} are in document pixels, but we need to specify device pixels to InspectorFrontendHost. * UserInterface/Base/Main.js: 2015-12-08 Joseph Pecoraro Web Inspector: Workaround arrow function issue in TimelineOverviewGraph.js https://bugs.webkit.org/show_bug.cgi?id=152031 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineOverviewGraph.js: (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout): Workaround an existing arrow function issue by moving off of arrow functions here. 2015-12-08 Matt Baker Web Inspector: Add a hidden property to TreeOutline https://bugs.webkit.org/show_bug.cgi?id=152014 Reviewed by Timothy Hatcher. * UserInterface/Views/NavigationSidebarPanel.js: Removed static property for "hidden" CSS class. No longer used. (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline): Fixed bug in order of visibleTreeOutlines add/remove. (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline): * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel): (WebInspector.TimelineSidebarPanel.prototype._changeViewMode): * UserInterface/Views/TreeOutline.js: (WebInspector.TreeOutline): (WebInspector.TreeOutline.prototype.get hidden): (WebInspector.TreeOutline.prototype.set hidden): Added hidden property, set DOM element hidden attribute. (WebInspector.TreeElement.prototype.set hidden): Remove CSS class, set DOM element hidden attribute. (WebInspector.TreeElement.prototype._attach): (WebInspector.TreeElement.prototype.expand): 2015-12-08 Matt Baker Web Inspector: Global Breakpoints should always be visible https://bugs.webkit.org/show_bug.cgi?id=151066 Reviewed by Timothy Hatcher. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): Turn off filtering for Global Breakpoints elements. * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements): Allow filtering to be turned off for specific tree elements. (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement): Make element visible if filtering suppressed. (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults): Visible elements with filtering disabled aren't considered when showing/hiding the empty content placeholder. 2015-12-07 Brian Burg Web Inspector: Uncaught Exception page should have better styles and handle more error cases https://bugs.webkit.org/show_bug.cgi?id=151923 Reviewed by Timothy Hatcher. Restructure the Uncaught Exception reporting page to act more like a modal sheet. Distinguish between uncaught exceptions before and after the frontend is initially loaded. If the frontend is loaded, add a clickable link that dismisses the sheet and ignores the error. If the inspector finished loading, then only show at most one exception at a time, since subsequent interactions can cause spurious errors when the sheet is active. Split existing code into multiple functions so it's easier to follow. Add miscellaneous guards against internal corruption and weird cases. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): Store the flag on the global object in case WebInspector becomes shadowed or otherwise unusable. * UserInterface/Debug/UncaughtExceptionReporter.css: Renamed from Source/WebInspectorUI/UserInterface/Debug/CatchEarlyErrors.css. (div.sheet-container): (div.uncaught-exception-sheet): (div.uncaught-exception-sheet a): (div.uncaught-exception-sheet a:active): (div.uncaught-exception-sheet h2): (div.uncaught-exception-sheet h1 > img): (div.uncaught-exception-sheet h2 > img): (div.uncaught-exception-sheet dl): (div.uncaught-exception-sheet dt): (div.uncaught-exception-sheet dd): (div.uncaught-exception-sheet ul): (div.uncaught-exception-sheet li): * UserInterface/Debug/UncaughtExceptionReporter.js: Renamed from CatchEarlyErrors.js. (stopEventPropagation): Allow clicking whitelisted links on the sheet. (blockEventHandlers): (unblockEventHandlers): (handleUncaughtException): (dismissErrorSheet): (createErrorSheet.insertWordBreakCharacters): (createErrorSheet): (handleLinkClick): * UserInterface/Main.html: * UserInterface/Protocol/MessageDispatcher.js: (WebInspector.dispatchMessageFromBackend): Don't try to dispatch messages from the backend when showing the error sheet. They will probably fail, so suspend dispatching until the sheet is dismissed. 2015-12-06 Devin Rousso Web Inspector: Regression (r192936) - changing selectors in the visual styles sidebar is broken https://bugs.webkit.org/show_bug.cgi?id=151924 Reviewed by Brian Burg. * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection): (WebInspector.VisualStyleSelectorSection.prototype._selectorChanged): Now uses an event listener instead of an "onselect" function. 2015-12-06 Matt Baker Web Inspector: Comparisons in setters should use the massaged value (" = x || 0/false/null/etc") https://bugs.webkit.org/show_bug.cgi?id=151910 Reviewed by Timothy Hatcher. Updated setters that use default values to convert falsy inputs to the default value before compariing against the current value. * UserInterface/Models/TimelineMarker.js: (WebInspector.TimelineMarker.prototype.set time): Assert new value is a number. * UserInterface/Views/DataGrid.js: (WebInspector.DataGridNode.prototype.set hidden): (WebInspector.DataGridNode.prototype.set data): Assert new value is of type object. Use shallowEqual compare before setting value. * UserInterface/Views/GeneralTreeElement.js: (WebInspector.GeneralTreeElement.prototype.set classNames): Use shallowEqual compare before setting value. (WebInspector.GeneralTreeElement.prototype.set mainTitle): (WebInspector.GeneralTreeElement.prototype.set subtitle): (WebInspector.GeneralTreeElement.prototype.set status): (WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately): * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview.prototype.set startTime): (WebInspector.TimelineOverview.prototype.set currentTime): (WebInspector.TimelineOverview.prototype.set endTime): (WebInspector.TimelineOverview.prototype.set scrollStartTime): (WebInspector.TimelineOverview.prototype.set selectionStartTime): Check current ruler selectionStartTime before setting value. * UserInterface/Views/TimelineOverviewGraph.js: (WebInspector.TimelineOverviewGraph.prototype.set zeroTime): (WebInspector.TimelineOverviewGraph.prototype.set startTime): (WebInspector.TimelineOverviewGraph.prototype.set endTime): (WebInspector.TimelineOverviewGraph.prototype.set currentTime): * UserInterface/Views/TimelineRuler.js: (WebInspector.TimelineRuler): (WebInspector.TimelineRuler.prototype.set allowsClippedLabels): (WebInspector.TimelineRuler.prototype.set formatLabelCallback): (WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection): (WebInspector.TimelineRuler.prototype.set zeroTime): (WebInspector.TimelineRuler.prototype.set startTime): (WebInspector.TimelineRuler.prototype.set endTime): (WebInspector.TimelineRuler.prototype.set secondsPerPixel): (WebInspector.TimelineRuler.prototype.set selectionStartTime): (WebInspector.TimelineRuler.prototype.set selectionEndTime): (WebInspector.TimelineRuler.prototype.set duration): Deleted. The ruler duration and "pinned" state are controlled by setting an end time. Removed since it wasn't being used, and there shouldn't be two ways to the exact same thing. * UserInterface/Views/TimelineView.js: (WebInspector.TimelineView.prototype.set zeroTime): (WebInspector.TimelineView.prototype.set startTime): (WebInspector.TimelineView.prototype.set endTime): 2015-12-04 Commit Queue Unreviewed, rolling out r193486. https://bugs.webkit.org/show_bug.cgi?id=151904 Causes Infinite Recursion in Timeline Recording (Requested by JoePeck on #webkit). Reverted changeset: "Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync" https://bugs.webkit.org/show_bug.cgi?id=151876 http://trac.webkit.org/changeset/193486 2015-12-04 Joseph Pecoraro Web Inspector: Uncaught Exception with Reload shortcut in JSContext Inspector https://bugs.webkit.org/show_bug.cgi?id=151896 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): Do not implicitly prevent default on these keyboard shortcuts so we can system beep if we do not do anything. (WebInspector._reloadPage): (WebInspector._reloadPageIgnoringCache): Bail if there is no PageAgent without preventing default for a beep system beep. Prevent default if we did something. 2015-12-04 Matt Baker Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync https://bugs.webkit.org/show_bug.cgi?id=151876 Reviewed by Brian Burg. * UserInterface/Views/NewTabContentView.js: (WebInspector.NewTabContentView.prototype._updateShownTabs): Removed workaround added in https://bugs.webkit.org/show_bug.cgi?id=151594. * UserInterface/Views/View.js: (WebInspector.View._scheduleLayoutForView): Always perform a synchronous layout when a view that isn't descended from the root view schedules a layout. 2015-12-04 Brian Burg Web Inspector: support runtime registration of tab type associations https://bugs.webkit.org/show_bug.cgi?id=151594 Reviewed by Joseph Pecoraro. We want to add special tabs that only exist in engineering builds for debugging purposes. Though the relevant models and views can be put in the Debug/ directory to exclude them from production builds, there's no way to register tabs conditionally at runtime; tabs are hardcoded. This patch makes it possible to register new tab types at runtime. First, WebInspector keeps a map of known, registered tab classes. Details that were hardcoded before---whether to show in New Tab, whether a tab can be instantiated given the active domains, UI text, etc.---are now static methods on the base TabContentView or overidden in its subclasses. Lastly, a public method allows code in Bootstrap.js to register tabs at runtime. Doing so sends a notification so the NewTabContentView can show the newly available tab item. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): (WebInspector.isTabTypeAllowed): (WebInspector.knownTabClasses): Added, used by NewTabContentView. (WebInspector._createTabContentViewForType): Renamed from _tabContentViewForType. (WebInspector._rememberOpenTabs): (WebInspector._updateNewTabButtonState): (WebInspector._tryToRestorePendingTabs): Added. Whenever a new tab is registered, try to restore pending tabs, since an extra tab won't be added initially when production tabs are added. But, it could have been saved in the Setting for opened tabs. (WebInspector.showNewTabTab): (WebInspector.isNewTabWithTypeAllowed): (WebInspector.createNewTabWithType): (WebInspector._tabContentViewForType): Deleted. * UserInterface/Base/Object.js: * UserInterface/Views/ConsoleTabContentView.js: (WebInspector.ConsoleTabContentView): (WebInspector.ConsoleTabContentView.tabInfo): Added. * UserInterface/Views/DebuggerTabContentView.js: (WebInspector.DebuggerTabContentView): (WebInspector.DebuggerTabContentView.tabInfo): Added. * UserInterface/Views/ElementsTabContentView.js: (WebInspector.ElementsTabContentView): (WebInspector.ElementsTabContentView.tabInfo): Added. (WebInspector.ElementsTabContentView.isTabAllowed): Added. * UserInterface/Views/NetworkTabContentView.js: (WebInspector.NetworkTabContentView): (WebInspector.NetworkTabContentView.tabInfo): Added. (WebInspector.NetworkTabContentView.isTabAllowed): Added. * UserInterface/Views/NewTabContentView.js: Keep a list of shown tab items, so we don't have to query the DOM to update enabled/disabled state. Put tree construction inside a layout() override and dirty the view whenever known tab types change. (WebInspector.NewTabContentView): (WebInspector.NewTabContentView.tabInfo): Added. (WebInspector.NewTabContentView.isEphemeral): Added. (WebInspector.NewTabContentView.shouldSaveTab): Added. (WebInspector.NewTabContentView.prototype.layout): Added. (WebInspector.NewTabContentView.prototype._updateShownTabs): Added. (WebInspector.NewTabContentView.prototype._allowableTabTypes): (WebInspector.NewTabContentView.prototype._updateTabItems): (WebInspector.NewTabContentView.prototype.get tabItemElements): Deleted. * UserInterface/Views/ResourcesTabContentView.js: (WebInspector.ResourcesTabContentView): (WebInspector.ResourcesTabContentView.tabInfo): Added. * UserInterface/Views/SearchTabContentView.js: (WebInspector.SearchTabContentView): (WebInspector.SearchTabContentView.tabInfo): Added. (WebInspector.SearchTabContentView.isEphemeral): Added. * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.isTabAllowed): Added. (WebInspector.SettingsTabContentView.shouldSaveTab): Added. * UserInterface/Views/StorageTabContentView.js: (WebInspector.StorageTabContentView): (WebInspector.StorageTabContentView.tabInfo): Added. (WebInspector.StorageTabContentView.isTabAllowed): Added. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser.showTabForContentView): Add a workaround for . This bug is revealed by the changes to NewTabContentView in this patch. * UserInterface/Views/TabContentView.js: (WebInspector.TabContentView.isTabAllowed): Added. (WebInspector.TabContentView.isEphemeral): Added. (WebInspector.TabContentView.shouldSaveTab): Added. * UserInterface/Views/TimelineTabContentView.js: (WebInspector.TimelineTabContentView): (WebInspector.TimelineTabContentView.tabInfo): Added. (WebInspector.TimelineTabContentView.isTabAllowed): Added. 2015-12-04 Joseph Pecoraro Web Inspector: Remove untested and unused Worker inspection https://bugs.webkit.org/show_bug.cgi?id=151848 Reviewed by Brian Burg. * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * Versions/Inspector-iOS-7.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: Since this was untested in older releases as well, remove the protocol interfaces for legacy versions. 2015-12-04 Joseph Pecoraro Web Inspector: Specifically Identify the Global Lexical Environment Scope https://bugs.webkit.org/show_bug.cgi?id=151828 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): * UserInterface/Models/ScopeChainNode.js: * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection): Include a new scope type and give it a localized string. 2015-12-03 Anders Carlsson Remove Objective-C GC support https://bugs.webkit.org/show_bug.cgi?id=151819 rdar://problem/23746991 Reviewed by Dan Bernstein. * Configurations/Base.xcconfig: 2015-12-03 Matt Baker Uncaught Exception in Web Inspector: TypeError: null is not an object (evaluating 'dataGridNode.element.classList') https://bugs.webkit.org/show_bug.cgi?id=151790 Reviewed by Timothy Hatcher. * UserInterface/Views/DataGrid.js: (WebInspector.DataGridNode): (WebInspector.DataGridNode.prototype.get hidden): (WebInspector.DataGridNode.prototype.set hidden): Make hidden a property, so it can be set before the grid node's DOM element exists. (WebInspector.DataGridNode.prototype.get selectable): (WebInspector.DataGridNode.prototype.get element): Add hidden style, if needed, when element is created. * UserInterface/Views/TreeOutlineDataGridSynchronizer.js: (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange): (WebInspector.TreeOutlineDataGridSynchronizer): Don't access the grid node's element directly, since it may not exist yet. 2015-12-02 Joseph Pecoraro Web Inspector: Handle YieldExpressions in the ScriptSyntaxTree https://bugs.webkit.org/show_bug.cgi?id=151730 Reviewed by Brian Burg. * UserInterface/Models/NativeFunctionParameters.js: Add the Generator API. * UserInterface/Models/ScriptSyntaxTree.js: (WebInspector.ScriptSyntaxTree.prototype._recurse): (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree): Handle YieldExpressions. 2015-12-01 Matt Baker Web Inspector: TreeOutline should just dispatch events via WebInspector.Object https://bugs.webkit.org/show_bug.cgi?id=148067 Reviewed by Timothy Hatcher. TreeOutline now dispatches most events via WebInspector.Object. The onselect and ondeselect callbacks are replaced by a SelectionDidChange event, which includes both the selected and deselected elements in its event data. The onexpand and oncollapse callbacks are replaced by an ElementDisclosureDidChange event. This is consistent with the behavior of onhidden, which had no corresponding onvisible callback. Alas, TimelineView and TreeOutlineDataGridSynchronizer depended on the order in which TreeOutline.onselect callbacks were chained together. The synchronizer added its callback after the timeline view, which ensured that the tree and grid were in sync before the view handled onselect and dispatched a SelectionPathComponentsDidChange. The change notification causes the view's path components to be read, and timeline views need the grid selection to be in a valid state to build path components. This is addressed by having timeline views dispatch SelectionPathComponentsDidChange events when the grid selection changes, instead of the tree selection. The change required that the synchronizer no longer suppress notifications when selecting grid nodes. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange): (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection): * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline): (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): (WebInspector.NetworkGridContentView.prototype._treeSelectionDidChange): * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange): (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Deleted. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementAdded): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementDisclosureDidChange): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler): Deleted. (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler): Deleted. * UserInterface/Views/SearchSidebarPanel.js: (WebInspector.SearchSidebarPanel): (WebInspector.SearchSidebarPanel.prototype._treeSelectionDidChange): (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Deleted. * UserInterface/Views/StorageSidebarPanel.js: (WebInspector.StorageSidebarPanel): (WebInspector.StorageSidebarPanel._treeSelectionDidChange): * UserInterface/Views/TimelineDataGrid.js: (WebInspector.TimelineDataGrid.prototype._createPopoverContent): (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange): (WebInspector.TimelineDataGrid): * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel): (WebInspector.TimelineSidebarPanel.prototype._recordingsTreeSelectionDidChange): (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeSelectionDidChange): (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeElementSelected): Deleted. * UserInterface/Views/TimelineView.js: (WebInspector.TimelineView): (WebInspector.TimelineView.prototype._treeSelectionDidChange): (WebInspector.TimelineView.prototype.treeElementSelected): Don't dispatch SelectionPathComponentsDidChange. Timeline views already do this in response to grid selection events. * UserInterface/Views/TreeOutline.js: (WebInspector.TreeOutline.prototype.appendChild): (WebInspector.TreeOutline.prototype.insertChild): (WebInspector.TreeOutline.prototype.removeChildAtIndex): (WebInspector.TreeOutline.prototype.removeChildren): (WebInspector.TreeOutline.prototype.removeChildrenRecursive): (WebInspector.TreeOutline.prototype._treeElementDidChange): (WebInspector.TreeElement.prototype.set hidden): (WebInspector.TreeElement.prototype.collapse): (WebInspector.TreeElement.prototype.expand): (WebInspector.TreeElement.prototype.select): (WebInspector.TreeElement.prototype.deselect): (WebInspector.TreeElement.prototype.get childrenListElement): Deleted. Removed dead code. * UserInterface/Views/TreeOutlineDataGridSynchronizer.js: (WebInspector.TreeOutlineDataGridSynchronizer): (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeSelectionDidChange): (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded): (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved): (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementDisclosureDidChange): (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange): (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onadd): Deleted. (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onremove): Deleted. (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onexpand): Deleted. (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.oncollapse): Deleted. (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onhidden): Deleted. (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onselect): Deleted. (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected): Deleted. (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded): Deleted. (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed): Deleted. (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged): Deleted. * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: (WebInspector.VisualStyleCommaSeparatedKeywordEditor): (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeSelectionDidChange): (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeElementSelected): Deleted. 2015-12-01 Joseph Pecoraro Web Inspector: Timestamp in Tooltip of Event Markers is incorrect https://bugs.webkit.org/show_bug.cgi?id=151722 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineRuler.js: (WebInspector.TimelineRuler.prototype.addMarker): Convert the marker's time, to be relative to the start of the recording. 2015-12-01 Joseph Pecoraro Unreviewed common typo fix "occurance" => "occurrence". * Scripts/combine-resources.pl: (concatenateFiles): 2015-12-01 Joseph Pecoraro Web Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline tab after reloading the page https://bugs.webkit.org/show_bug.cgi?id=151530 Reviewed by Timothy Hatcher. If reloading the page caused the console to clear, that was triggering the console prompt to be focused. When the console prompt is focused, keyboard input like Spacebar, was just inputing characters instead of triggering the keyboard shortcut that was expected. This also means that console.clear() in the inspected page would cause the inspector to focus the console. That is unexpected as well. Focusing the console prompt whenever the console log is cleared is not ideal. If we do want to focus the prompt the caller should make that determination, not clear. * UserInterface/Controllers/JavaScriptLogViewController.js: (WebInspector.JavaScriptLogViewController.prototype.clear): 2015-12-01 Joseph Pecoraro Web Inspector: Update Timeline UI based on the Instruments in the Active Recording https://bugs.webkit.org/show_bug.cgi?id=151374 Reviewed by Brian Burg. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight): Modernize as I was in this code while looking into this patch. * UserInterface/Views/TimelineSidebarPanel.css: (.sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted. (.sidebar > .panel.navigation.timeline > .timelines-content): Deleted. These defaults are no longer necessary, the UI overrides them anyways. * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel): Include both the basic and rendering frames toolbars. They will be mutually exclusive based on if the FPSIntrument is available. (WebInspector.TimelineSidebarPanel.prototype._recordingSelected): (WebInspector.TimelineSidebarPanel.prototype._clearInstruments): When loading a new Recording clear the UI. (WebInspector.TimelineSidebarPanel.prototype._instrumentAdded): (WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved): (WebInspector.TimelineSidebarPanel.prototype._addedFPSInstrument): (WebInspector.TimelineSidebarPanel.prototype._removedFPSInstrument): Handle toggling the toolbars when the FPS instrument is added/removed. (WebInspector.TimelineSidebarPanel.prototype._timelineCountChanged): (WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight): (WebInspector.TimelineSidebarPanel.prototype._changeViewMode): Properly update the sidebar's understanding of the TimelineOverview size. 2015-12-01 Joseph Pecoraro Web Inspector: Initial support for variable timelines https://bugs.webkit.org/show_bug.cgi?id=151372 Reviewed by Brian Burg. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager.defaultInstruments): (WebInspector.TimelineManager.prototype._loadNewRecording): Keep the status quo which is the same set of instruments for each recording. (WebInspector.TimelineManager.prototype.startCapturing): (WebInspector.TimelineManager.prototype.stopCapturing): Push responsibility of capturing to the Recording, which has a specific set of instruments that know what they need to turn on an off from the backend. * UserInterface/Main.html: * UserInterface/Models/Instrument.js: Added. (WebInspector.Instrument): (WebInspector.Instrument.startLegacyTimelineAgent): (WebInspector.Instrument.stopLegacyTimelineAgent): (WebInspector.Instrument.prototype.get timelineRecordType): (WebInspector.Instrument.prototype.startInstrumentation): (WebInspector.Instrument.prototype.stopInstrumentation): New class representing something that can be turned on and off from the backend and produces a set of Timeline record types. Currently instruments are 1-to-1 to a Timeline type. * UserInterface/Models/LayoutInstrument.js: Added. (WebInspector.LayoutInstrument.prototype.get timelineRecordType): (WebInspector.LayoutInstrument): * UserInterface/Models/NetworkInstrument.js: Added. (WebInspector.NetworkInstrument.prototype.get timelineRecordType): (WebInspector.NetworkInstrument.prototype.startInstrumentation): (WebInspector.NetworkInstrument.prototype.stopInstrumentation): (WebInspector.NetworkInstrument): * UserInterface/Models/ScriptInstrument.js: Added. (WebInspector.ScriptInstrument.prototype.get timelineRecordType): (WebInspector.ScriptInstrument): The default set of instruments. Currently they all enable the TimelineAgent, so they share code to enable/disable in the base class to avoid duplication. * UserInterface/Models/FPSInstrument.js: Added. (WebInspector.FPSInstrument): (WebInspector.FPSInstrument.supported): (WebInspector.FPSInstrument.prototype.get timelineRecordType): Provide a "supported" static method and simplify other code that checks whether or not RenderingFrames is available or not. * UserInterface/Models/Timeline.js: (WebInspector.Timeline.prototype.get displayName): Deleted. (WebInspector.Timeline.prototype.get iconClassName): Deleted. Move these to a View class, as this is primarily View logic. * UserInterface/Models/TimelineRecording.js: (WebInspector.TimelineRecording): (WebInspector.TimelineRecording.prototype.get instruments): (WebInspector.TimelineRecording.prototype.start): (WebInspector.TimelineRecording.prototype.stop): (WebInspector.TimelineRecording.prototype.timelineForInstrument): (WebInspector.TimelineRecording.prototype.addInstrument): (WebInspector.TimelineRecording.prototype.removeInstrument): (WebInspector.TimelineRecording.prototype.addEventMarker): (WebInspector.TimelineRecording.prototype.addTimeline): Deleted. (WebInspector.TimelineRecording.prototype.removeTimeline): Deleted. A recording now has a set of Instruments and its own start/stop which starts/stops its set of Instruments! Treat Instruments as the variable property of a Recording instead of Timelines. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview): (WebInspector.TimelineOverview.prototype._instrumentAdded): (WebInspector.TimelineOverview.prototype._instrumentRemoved): (WebInspector.TimelineOverview.prototype._timelineAdded): Deleted. (WebInspector.TimelineOverview.prototype._timelineRemoved): Deleted. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView): (WebInspector.TimelineRecordingContentView.prototype._instrumentAdded): (WebInspector.TimelineRecordingContentView.prototype._instrumentRemoved): (WebInspector.TimelineRecordingContentView.prototype._timelineAdded): Deleted. (WebInspector.TimelineRecordingContentView.prototype._timelineRemoved): Deleted. * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel): (WebInspector.TimelineSidebarPanel.displayNameForTimeline): (WebInspector.TimelineSidebarPanel.iconClassNameForTimeline): (WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection): (WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie): (WebInspector.TimelineSidebarPanel.prototype._recordingSelected): (WebInspector.TimelineSidebarPanel.prototype._instrumentAdded): (WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved): (WebInspector.TimelineSidebarPanel.prototype._changeViewMode): (WebInspector.TimelineSidebarPanel.prototype._timelineAdded): Deleted. (WebInspector.TimelineSidebarPanel.prototype._timelineRemoved): Deleted. Update all TimelineAdded/TimelineRemoved clients to instead check InstrumentAdded/InstrumentRemoved. Immediately convert from an Instrument to a Timeline to keep the patch simple. 2015-12-01 Joseph Pecoraro Web Inspector: Broken Inspector when resources are minified https://bugs.webkit.org/show_bug.cgi?id=151711 Reviewed by Timothy Hatcher. * Scripts/combine-resources.pl: (concatenateFiles): Provide a way to just strip resources matches a pattern. * Scripts/copy-user-interface-resources.pl: Strip "Debug/" resources before combining / minifying others. * UserInterface/Views/View.js: (WebInspector.View.prototype.makeRootView): (WebInspector.View.prototype.didDetach): Address warnings from the console.assert stripping phase for console.assert statements lacking a trailing semicolon. 2015-11-30 Brian Burg Web Inspector: show something useful when the inspector frontend fails to load https://bugs.webkit.org/show_bug.cgi?id=151643 Reviewed by Timothy Hatcher. When a parse error or other early error happens before the inspector is fully loaded, we can't use the second-level inspector to tell what's going on. It would be better to catch any early errors and list them. This patch adds an error page that shows the early errors that happened during loading. It provides a list of errors, a link to reload the inspector, and a link to submit a pre-filled bug report about the error. For now, this page only shows up in engineering builds because it's located in the Debug/ directory. We can move it later when it works better in all cases. Follow-up patches can address smaller issues, such as the transparent title bar and broken text selection. * UserInterface/Debug/CatchEarlyErrors.css: Added. * UserInterface/Debug/CatchEarlyErrors.js: Added. * UserInterface/Main.html: * UserInterface/Main.js: Abort setting up the UI if something happened. 2015-11-30 Brian Burg Web Inspector: delete-by-word and similar shortcuts should add text to the WebCore kill ring https://bugs.webkit.org/show_bug.cgi?id=151312 Reviewed by Darin Adler. Add support for other kill ring-eligible keybindinsg, such as deleting by word, group, or line forwards and backwards. * UserInterface/Controllers/CodeMirrorTextKillController.js: (WebInspector.CodeMirrorTextKillController): (WebInspector.CodeMirrorTextKillController.prototype._handleTextKillCommand): Renamed from _handleKillLine. Parameterize the function so it can handle any keybinding and command. Take a kill ring insertion mode argument, too. (WebInspector.CodeMirrorTextKillController.prototype._handleTextChange): Add some special casing for changes received from Delete Line (Cmd-D) so the right text is added to the kill ring. Thread the kill ring insertion mode to the frontend host call. (WebInspector.CodeMirrorTextKillController.prototype._handleKillLine): Deleted. 2015-11-29 Brian Burg Web Inspector: Add context menu item to Reload the Inspector https://bugs.webkit.org/show_bug.cgi?id=141742 Reviewed by Timothy Hatcher. Add a global context menu and global shortcut (Cmd-Opt-Shift-R) to reload the Web Inspector frontend without closing the browser. This should make it possible to more quickly fix typos, small nits, etc. without having to relaunch. It might also make state restoration bugs more visible in engineering builds, since there is hardly any delay between seeing the old and reloaded frontends. Note that this functionality reloads scripts from the configuration's build directory, so you still need to "build" WebInspectorUI to ensure that any changed files are properly minified and staged. * UserInterface/Base/Main.js: (WebInspector.unlocalizedString): Added. Make it obvious when strings are intentionally not localized. (WebInspector._contextMenuRequested): If the "Show Debug UI" setting is available and true, add a global "Reload Web Inspector" menu item to every context menu. Otherwise, don't eagerly create a context menu. * UserInterface/Debug/Bootstrap.js: Add Cmd-Opt-Shift-R shortcut. 2015-11-29 Brian Burg Web Inspector: allow multiple UI components to add menu items upon getting a "contextmenu" event https://bugs.webkit.org/show_bug.cgi?id=151629 Reviewed by Timothy Hatcher. The existing Context Menu system assumes that only one UI component will need to provide context menu items. But in some scenarios, there are multiple UI components that could provide relevant menu items. For example, right-clicking on an DOM element in the console should show menu items relevant to 1) the DOM element, 2) the console in general, and 3) global menu items. Existing code shows menu items provided by the first object that handles the event and calls ContextMenu.show(). This patch changes behavior so that a context menu can be built up by multiple 'contextmenu' event handlers. A ContextMenu instance is hidden on the 'contextmenu' event object; client code calls a factory method that digs out this existing context menu or creates a new one as needed. To actually show the context menu through the InspectorFrontendHost methods, the top-level app controller adds a bubbling listener for 'contextmenu' and shows the event's context menu if one has been created. Along the way, do some cleanup. Do s/var/let/, arrowize some functions, use Array.{map,some}, and simplify some other code as a result. No new tests yet, since we can't trigger context menu easily from an inspector test. All affected context menus were manually verified. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): * UserInterface/Controllers/BreakpointPopoverController.js: (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems): (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint): Deleted. (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint): Deleted. (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint): Deleted. (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue): Deleted. (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted. * UserInterface/Views/BreakpointTreeElement.js: (WebInspector.BreakpointTreeElement.prototype.oncontextmenu): * UserInterface/Views/CSSStyleDeclarationSection.js: * UserInterface/Views/ContextMenu.js: (WebInspector.ContextMenuItem.prototype._buildDescriptor): (WebInspector.ContextMenuItem): (WebInspector.ContextSubMenuItem.prototype.appendItem): (WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem): (WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem): (WebInspector.ContextSubMenuItem.prototype._pushItem): (WebInspector.ContextSubMenuItem.prototype._buildDescriptor): (WebInspector.ContextSubMenuItem): (WebInspector.ContextMenu.createFromEvent): (WebInspector.ContextMenu.prototype.show): (WebInspector.ContextMenu.prototype.handleEvent): (WebInspector.ContextMenu.prototype._buildDescriptor): * UserInterface/Views/DOMTreeOutline.js: (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired): (WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement): (WebInspector.DOMTreeOutline.prototype._populateContextMenu): * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid.prototype._contextMenuInDataTable): * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement): (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.removeAllResourceBreakpoints): Deleted. (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.toggleAllResourceBreakpoints): Deleted. * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView.prototype._handleContextMenuEvent): * UserInterface/Views/ObjectPreviewView.js: (WebInspector.ObjectPreviewView.prototype._contextMenuHandler): (WebInspector.ObjectPreviewView): * UserInterface/Views/ObjectTreeBaseTreeElement.js: (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler): (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject): (WebInspector.ObjectTreeBaseTreeElement): * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu): (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.continueToLocation): Deleted. (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.addBreakpoint): Deleted. (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar): Deleted. (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.removeBreakpoints): Deleted. (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.toggleBreakpoints): Deleted. * UserInterface/Views/TabBarItem.js: (WebInspector.TabBarItem.prototype._handleContextMenuEvent): (WebInspector.TabBarItem): (WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeTab): Deleted. (WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeOtherTabs): Deleted. * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar): (WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar.toggleReplayInterface): Deleted. * UserInterface/Views/Toolbar.js: (WebInspector.Toolbar.prototype._handleContextMenuEvent): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent): 2015-11-28 Devin Rousso Web Inspector: Styles sidebar placeholder is misaligned https://bugs.webkit.org/show_bug.cgi?id=151638 Reviewed by Brian Burg. * UserInterface/Views/CSSStyleDeclarationTextEditor.css: (.css-style-text-editor > .CodeMirror .CodeMirror-placeholder): 2015-11-28 Devin Rousso Web Inspector: REGRESSION: "Duplicate Selector" context menu item doesn't work https://bugs.webkit.org/show_bug.cgi?id=151628 Reviewed by Brian Burg. Merged the two "add rule" functions inside DOMNodeStyles to create a new rule with the given selector and use the generated best selector for that node otherwise. This also preserves all fallbacks across all functions for creating new CSS rules. * UserInterface/Models/DOMNodeStyles.js: (WebInspector.DOMNodeStyles.prototype.addEmptyRule): Deleted. (WebInspector.DOMNodeStyles.prototype.addRuleWithSelector): Deleted. (WebInspector.DOMNodeStyles.prototype.addRule): Creates a new CSS rule using either the provided selector or the best selector for the current node. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent): * UserInterface/Views/RulesStyleDetailsPanel.js: (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked): * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection.prototype._addNewRule): 2015-11-24 Brian Burg Web Inspector: save Inspector's breakpoints to localStorage whenever they are modified https://bugs.webkit.org/show_bug.cgi?id=151581 Reviewed by Timothy Hatcher. Serialize all breakpoints to the "breakpoints" Setting in local storage whenever any breakpoint model object is added, removed, or modified. Remove the old listener that attempted to save breakpoints on the pagehide event. It did not fire in important scenarios like exiting the browser via Cmd-Q or killing the process via Ctrl-C / SIGKILL. This is not expected to be a performance problem because most people do not keep thousands of breakpoints active, and breakpoints are not set very often. If it's a problem, we can mitigate it with coalescing. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.addBreakpoint): (WebInspector.DebuggerManager.prototype.removeBreakpoint): (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange): (WebInspector.DebuggerManager.prototype._saveBreakpoints): (WebInspector.DebuggerManager.prototype._inspectorClosing): Deleted. 2015-11-24 Brian Burg Web Inspector: Cmd-1 to Cmd-9 shortcuts should select tabs by ordinal https://bugs.webkit.org/show_bug.cgi?id=151577 Reviewed by Timothy Hatcher. The shortcuts only work if a tab at the specified ordinal exists. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): 2015-11-23 Brian Burg Web Inspector: Add a keyboard shortcut to restore the default zoom level https://bugs.webkit.org/show_bug.cgi?id=151237 Reviewed by Timothy Hatcher. The Cmd-0 shortcut matches the keybindings of Safari and other browsers. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): 2015-11-23 Brian Burg Web Inspector: inspector settings should not be shared between different inspection levels https://bugs.webkit.org/show_bug.cgi?id=151151 Reviewed by Timothy Hatcher. It's really annoying to have shared settings between Inspector^1 and Inspector^2, because they are not designed to respond to external changes to local storage keys. As a result, the two inspectors seemingly have different settings while both are open, but the settings clobber each other depending on which inspector is closed first. On the next inspector being opened, it has settings that reflect whichever inspector closed last. To fix this, alter the local storage key prefix to incude the inspection level when it is greater than 1 (i.e., inspecting the inspector). The storage prefix becomes "com.apple.WebInspector-${inspectionLevel}." in this case. This is backwards-compatible for normal Inspector, who keeps the same storage prefix. Alternate approaches that were considered and abandoned: - Use separate WKWebSiteDataStores for each inspection level. This API (as it currently is) does not support multiple on-disk storage locations. We don't want to add an entirely new Library directory for each inspector level, and sharing a single location doesn't fix the shared-settings bug. Changing storage location would lose all existing Inspector settings. - Sync settings between multiple open Inspectors. This would be catastrophic, as changing the active tab on one inspector would immediately propagate to the other open inspectors. * UserInterface/Models/Setting.js: (WebInspector.Setting): * UserInterface/Protocol/InspectorFrontendHostStub.js: (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.inspectionLevel): 2015-11-23 Brian Burg Web Inspector: use Cmd-Option-L and Cmd-Option-R for toggling navigation and details sidebars https://bugs.webkit.org/show_bug.cgi?id=151572 Reviewed by Timothy Hatcher. The previous shortcuts were Cmd-0 and Cmd-Option-0, but these didn't match Safari's sidebar shortcuts and conflict with Cmd-0 as the cross-browser way to reset page zoom. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): 2015-11-23 Brian Burg Web Inspector: when inspecting the inspector, add the inspection level to the title bar https://bugs.webkit.org/show_bug.cgi?id=151555 Reviewed by Timothy Hatcher. Drive-by update to remove some localization strings that are no longer used. * Localizations/en.lproj/localizedStrings.js: 2015-11-22 Matt Baker Web Inspector: Clean up FolderizedTreeElement folder settings https://bugs.webkit.org/show_bug.cgi?id=151539 Reviewed by Brian Burg. The expanded state for each folder was stored as an external property on the folder tree element. Now FolderizedTreeElement keeps a map of folders to settings. * UserInterface/Views/FolderizedTreeElement.js: (WebInspector.FolderizedTreeElement): (WebInspector.FolderizedTreeElement.prototype.removeChildren): (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject): (WebInspector.FolderizedTreeElement.prototype._folderTreeElementExpandedStateChange): == Rolled over to ChangeLog-2015-11-21 ==