2017-10-02 Joseph Pecoraro Web Inspector: Escape more characters in posix string conversion https://bugs.webkit.org/show_bug.cgi?id=177761 Reviewed by Brian Burg. * UserInterface/Models/Resource.js: (WI.Resource.prototype.generateCURLCommand.escapeStringPosix): Escape '!' to '\041' in posix strings ($'...') since '!' may have special behavior at times. 2017-09-08 Joseph Pecoraro Uncaught Exception: TypeError: this._heapSnapshot.addEventListener is not a function. https://bugs.webkit.org/show_bug.cgi?id=176633 Reviewed by Michael Saboff. * UserInterface/Proxies/HeapSnapshotDiffProxy.js: (WI.HeapSnapshotDiffProxy): This class has listeners of another object's events. It should extend WI.Object. 2017-08-14 Simon Fraser Remove Proximity Events and related code https://bugs.webkit.org/show_bug.cgi?id=175545 Reviewed by Daniel Bates. No platform enables Proximity Events, so remove code inside ENABLE(PROXIMITY_EVENTS) and other related code. * UserInterface/Models/ScriptTimelineRecord.js: (WI.ScriptTimelineRecord.EventType.displayName): 2017-08-08 Devin Rousso Web Inspector: Canvas: support editing WebGL shaders https://bugs.webkit.org/show_bug.cgi?id=124211 Reviewed by Matt Baker. * UserInterface/Models/ShaderProgram.js: (WI.ShaderProgram.prototype.updateVertexShader): (WI.ShaderProgram.prototype.updateFragmentShader): (WI.ShaderProgram.prototype._updateShader): * UserInterface/Views/ShaderProgramContentView.js: (WI.ShaderProgramContentView): (WI.ShaderProgramContentView.prototype._contentDidChange): 2017-08-07 Devin Rousso Web Inspector: Preview Canvas path when viewing a recording https://bugs.webkit.org/show_bug.cgi?id=174967 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Setting.js: * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): (WI.RecordingContentView.supportsCanvasPathDebugging): (WI.RecordingContentView.prototype.get navigationItems): (WI.RecordingContentView.prototype.shown): (WI.RecordingContentView.prototype._generateContentCanvas2D): (WI.RecordingContentView.prototype._actionModifiesPath): (WI.RecordingContentView.prototype._updateCanvasPath): (WI.RecordingContentView.prototype._showPathButtonClicked): Show each segment of the current path as an overlay when the setting is enabled. Drive-by: fix forgotten function rename. * UserInterface/Views/RecordingContentView.css: (.content-view:not(.tab).recording canvas.path): * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): Show the currentX/currentY in the current state. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction.isFunctionForType): (WI.RecordingAction.prototype.swizzle): Use Sets for better performance. 2017-08-04 Devin Rousso Web Inspector: add source view for WebGL shader programs https://bugs.webkit.org/show_bug.cgi?id=138593 Reviewed by Matt Baker. Shader programs are now listed in the Resources sidebar as items within the owner Canvas context. When selected, the shown content view has two editors, one for the Vertex shader and one for the Fragment shader. These editors use CodeMirror's "clike" mode for GLSL syntax. * Localizations/en.lproj/localizedStrings.js: * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj: * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters: * UserInterface/Main.html: * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager): (WI.CanvasManager.prototype.canvasRemoved): (WI.CanvasManager.prototype.programCreated): (WI.CanvasManager.prototype.programDeleted): (WI.CanvasManager.prototype._mainResourceDidChange): * UserInterface/Models/Collection.js: * UserInterface/Models/Canvas.js: (WI.Canvas.prototype.get shaderProgramCollection) * UserInterface/Models/ShaderProgram.js: (WI.ShaderProgram.prototype.requestVertexShaderSource): (WI.ShaderProgram.prototype.requestFragmentShaderSource): (WI.ShaderProgram.prototype._requestShaderSource): * UserInterface/Views/CanvasTreeElement.js: (WI.CanvasTreeElement): (WI.CanvasTreeElement.prototype.onattach): (WI.CanvasTreeElement.prototype.ondetach): (WI.CanvasTreeElement.prototype.onpopulate): (WI.CanvasTreeElement.prototype._shaderProgramAdded): (WI.CanvasTreeElement.prototype._shaderProgramRemoved): * UserInterface/Views/ShaderProgramTreeElement.js: Added. (WI.ShaderProgramTreeElement): * UserInterface/Views/ShaderProgramContentView.js: Added. (WI.ShaderProgramContentView): (WI.ShaderProgramContentView.prototype.shown): (WI.ShaderProgramContentView.prototype.hidden): (WI.ShaderProgramContentView.prototype.closed): (WI.ShaderProgramContentView.prototype.get supportsSave): (WI.ShaderProgramContentView.prototype.get saveData): (WI.ShaderProgramContentView.prototype.get supportsSearch): (WI.ShaderProgramContentView.prototype.get numberOfSearchResults): (WI.ShaderProgramContentView.prototype.get hasPerformedSearch): (WI.ShaderProgramContentView.prototype.set automaticallyRevealFirstSearchResult): (WI.ShaderProgramContentView.prototype.performSearch): (WI.ShaderProgramContentView.prototype.searchCleared): (WI.ShaderProgramContentView.prototype.searchQueryWithSelection): (WI.ShaderProgramContentView.prototype.revealPreviousSearchResult): (WI.ShaderProgramContentView.prototype.revealNextSearchResult): (WI.ShaderProgramContentView.prototype.revealPosition): (WI.ShaderProgramContentView.prototype._editorFocused): (WI.ShaderProgramContentView.prototype._numberOfSearchResultsDidChange): * UserInterface/Views/ShaderProgramContentView.css: Added. (.content-view.shader-program > .text-editor.shader): (body[dir=ltr] .content-view.shader-program > .text-editor.shader.vertex,): (body[dir=ltr] .content-view.shader-program > .text-editor.shader.fragment,): (body[dir=ltr] .content-view.shader-program > .text-editor.shader + .text-editor.shader): (body[dir=rtl] .content-view.shader-program > .text-editor.shader + .text-editor.shader): (.content-view.shader-program > .text-editor.shader > .type-title): (.content-view.shader-program > .text-editor.shader > .CodeMirror): * UserInterface/Images/DocumentGL.png: Added. * UserInterface/Images/DocumentGL@2x.png: Added. * UserInterface/Views/ResourceIcons.css: (.shader-program .icon): * UserInterface/Base/Main.js: * UserInterface/Views/ContentView.js: (WI.ContentView.createFromRepresentedObject): (WI.ContentView.isViewable): * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match): (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange): * UserInterface/Views/ResourcesTabContentView.js: (WI.ResourcesTabContentView.prototype.canShowRepresentedObject): Plumbing for displaying ShaderProgram content. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor): (WebInspector.TextEditor.prototype._editorFocused): * Scripts/update-codemirror-resources.rb: * UserInterface/External/CodeMirror/clike.js: Added. Add C-like mode for highlighting GLSL. 2017-08-03 Joseph Pecoraro JSContext Inspector: Scripts sometimes do not show in resources tab https://bugs.webkit.org/show_bug.cgi?id=175153 Reviewed by Matt Baker. * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel.prototype.initialLayout): When the ResourceSidebar is lazily created, be sure to add any scripts to the sidebar that are not backed by Resources. (WI.ResourceSidebarPanel.prototype._scriptWasAdded): (WI.ResourceSidebarPanel.prototype._addScript): Extract so it can be used outside of an event handler. 2017-08-03 Devin Rousso Web Inspector: add button to open Inspector^2 https://bugs.webkit.org/show_bug.cgi?id=175108 Reviewed by Brian Burg. * UserInterface/Debug/Bootstrap.js: (updateDebugUI): (WI.runBootstrapOperations): * UserInterface/Views/ButtonToolbarItem.js: (WI.ButtonToolbarItem): (WI.ButtonToolbarItem.prototype.get label): Deleted. (WI.ButtonToolbarItem.prototype.set label): Deleted. * UserInterface/Views/ButtonToolbarItem.css: (.toolbar .item.button): (.toolbar .item.button:not(.disabled):active): (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)): (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)): (.toolbar .item.button > .glyph): (.toolbar .item.button:not(.disabled):active > .glyph): Deleted. (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph): Deleted. (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph): Deleted. (.toolbar .item.button > .label): Deleted. * UserInterface/Views/ActivateButtonToolbarItem.js: (WI.ActivateButtonToolbarItem): (WI.ActivateButtonToolbarItem.prototype.get label): Deleted. (WI.ActivateButtonToolbarItem.prototype.set label): Deleted. * UserInterface/Base/Main.js: (WI.contentLoaded): Remove unused `label` parameter from Toolbar objects. 2017-08-03 Matt Baker Web Inspector: Instrument WebGLProgram created/deleted https://bugs.webkit.org/show_bug.cgi?id=175059 Reviewed by Devin Rousso. This patch adds frontend support for shader program instrumentation. The frontend creates a ShaderProgram model object for each WebGLProgram. Since only canvases with a WebGL context have programs, the Canvas model object does not contain any logic specific to programs. CanvasManager dispatches program added/removed events, and the parent Canvas can be accessed from ShaderProgram but not the other way around. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager): (WI.CanvasManager.prototype.get shaderPrograms): (WI.CanvasManager.prototype.canvasRemoved): (WI.CanvasManager.prototype.programCreated): (WI.CanvasManager.prototype.programDeleted): (WI.CanvasManager.prototype._mainResourceDidChange): (WI.CanvasManager.prototype._dispatchShaderProgramRemoved): * UserInterface/Main.html: * UserInterface/Models/Canvas.js: (WI.Canvas.prototype.nextShaderProgramDisplayNumber): (WI.Canvas): * UserInterface/Models/ShaderProgram.js: Added. (WI.ShaderProgram): (WI.ShaderProgram.prototype.get identifier): (WI.ShaderProgram.prototype.get canvas): (WI.ShaderProgram.prototype.get displayName): * UserInterface/Protocol/CanvasObserver.js: (WI.CanvasObserver.prototype.programCreated): (WI.CanvasObserver.prototype.programDeleted): (WI.CanvasObserver): * UserInterface/Test.html: 2017-08-03 Joseph Pecoraro JSContext Inspector: Recording tab should not be available in New Tab picker https://bugs.webkit.org/show_bug.cgi?id=175155 Reviewed by Brian Burg. * UserInterface/Views/RecordingTabContentView.js: (WI.RecordingTabContentView.isTabAllowed): Only allow the Recording Tab if we have a CanvasAgent. 2017-08-02 Devin Rousso Web Inspector: add stack trace information for each RecordingAction https://bugs.webkit.org/show_bug.cgi?id=174663 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Models/Recording.js: (WI.Recording.prototype.swizzle): Add Array type for swizzling array values. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction): (WI.RecordingAction.fromPayload): (WI.RecordingAction.prototype.get trace): (WI.RecordingAction.prototype.swizzle): (WI.RecordingAction.prototype.toJSON): * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: Added. (WI.RecordingTraceDetailsSidebarPanel): (WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass): (WI.RecordingTraceDetailsSidebarPanel.prototype.inspect): (WI.RecordingTraceDetailsSidebarPanel.prototype.set recording): (WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex): * UserInterface/Views/RecordingTraceDetailsSidebarPanel.css: Added. (.sidebar > .panel.details.recording-trace > .content > .call-frame): (.sidebar > .details.recording-trace > .content > .no-trace-data): (.sidebar > .details.recording-trace > .content > .no-trace-data > .message): * UserInterface/Views/RecordingTabContentView.js: (WI.RecordingTabContentView): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement.prototype.populateContextMenu): * UserInterface/Views/CallFrameView.css: (.call-frame): (body[dir=ltr] .call-frame .icon): (body[dir=rtl] .call-frame .icon): Apply the same trailing margin for CallFrameView icons as TreeElement. 2017-08-02 Devin Rousso Web Inspector: add TreeElement virtualization for the Recording tab https://bugs.webkit.org/show_bug.cgi?id=174968 Reviewed by Joseph Pecoraro. * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel): * UserInterface/Views/TreeOutline.js: (WI.TreeOutline): (WI.TreeOutline.prototype.get virtualized): (WI.TreeOutline.prototype.registerScrollVirtualizer): (WI.TreeOutline.prototype.updateVirtualizedElements.walk): (WI.TreeOutline.prototype.updateVirtualizedElements): Add spacer elements before and after the TreeOutline element that will size to ensure that the TreeOutline node still takes up the same amount of space after some of the TreeElements are removed. Whenever the scroll of the container view changes, recalculate the visible area and add/remove TreeElements based on whether they would be in that. This is only possible if every TreeElement has the same vertical height, which is given when setting up the scroll listener on the container view. * UserInterface/Views/TreeElement.js: (WI.TreeElement.prototype.set hidden): (WI.TreeElement.prototype._attach): (WI.TreeElement.prototype.collapse): (WI.TreeElement.prototype.expand): (WI.TreeElement.prototype.reveal): If the TreeOutline is being virtualized, don't add each TreeElement's node to the DOM. They will be added at the end of the frame (via setTimeout) if they are within the visible + padding area of the TreeOutline. 2017-08-01 Devin Rousso Web Inspector: simplify WebInspector with WI https://bugs.webkit.org/show_bug.cgi?id=175058 Reviewed by Joseph Pecoraro. * .eslintrc: * Tools/PrettyPrinting/FormatterDebug.js: * Tools/PrettyPrinting/index.html: * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/Base/*.js: * UserInterface/Controllers/*.js: * UserInterface/Debug/*.js: * UserInterface/Models/*.js: * UserInterface/Protocol/*.js: * UserInterface/Proxies/*.js: * UserInterface/Test/*.js: * UserInterface/Views/*.js: 2017-08-01 Devin Rousso Web Inspector: create Recording tab for displaying recordings https://bugs.webkit.org/show_bug.cgi?id=174484 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.recordingFinished): * UserInterface/Models/Canvas.js: (WebInspector.Canvas.prototype.toggleRecording): * UserInterface/Models/Recording.js: (WebInspector.Recording): (WebInspector.Recording.synthesizeError): (WebInspector.Recording.prototype.get actions): (WebInspector.Recording.prototype.get source): (WebInspector.Recording.prototype.set source): (WebInspector.Recording.prototype.swizzle): * UserInterface/Models/RecordingAction.js: (WebInspector.RecordingAction): (WebInspector.RecordingAction.isFunctionForType): (WebInspector.RecordingAction.get name): (WebInspector.RecordingAction.get parameters): (WebInspector.RecordingAction.prototype.get valid): (WebInspector.RecordingAction.prototype.set valid): (WebInspector.RecordingAction.get isFunction): (WebInspector.RecordingAction.get isGetter): (WebInspector.RecordingAction.get isVisual): (WebInspector.RecordingAction.get stateModifiers): (WebInspector.RecordingAction.prototype.swizzle): (WebInspector.RecordingAction.prototype.parameterSwizzleTypeForTypeAtIndex): * UserInterface/Models/RecordingInitialStateAction.js: Added. (WebInspector.RecordingInitialStateAction): * UserInterface/Views/RecordingTabContentView.js: Added. (WebInspector.RecordingTabContentView): (WebInspector.RecordingTabContentView.tabInfo): (WebInspector.RecordingTabContentView.prototype.get type): (WebInspector.RecordingTabContentView.prototype.canShowRepresentedObject): (WebInspector.RecordingTabContentView.prototype.showRepresentedObject): (WebInspector.RecordingTabContentView.prototype.restoreStateFromCookie): (WebInspector.RecordingTabContentView.prototype.saveStateToCookie): (WebInspector.RecordingTabContentView.prototype.closed): (WebInspector.RecordingTabContentView.prototype._updateActionIndex): (WebInspector.RecordingTabContentView.prototype._scrubberNavigationItemValueChanged): (WebInspector.RecordingTabContentView.prototype._navigationSidebarImport): (WebInspector.RecordingTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged): * UserInterface/Views/RecordingContentView.js: Added. (WebInspector.RecordingContentView): (WebInspector.RecordingContentView.prototype.get navigationItems): (WebInspector.RecordingContentView.prototype.updateActionIndex): (WebInspector.RecordingContentView.prototype.shown): (WebInspector.RecordingContentView.prototype.get supplementalRepresentedObjects): (WebInspector.RecordingContentView.prototype._generateContentCanvas2D): (WebInspector.RecordingContentView.prototype._applyAction): (WebInspector.RecordingContentView.prototype._updateImageGrid): (WebInspector.RecordingContentView.prototype._showGridButtonClicked): * UserInterface/Views/RecordingContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/CanvasContentView.css. (.content-view:not(.tab).recording): (.content-view:not(.tab).recording > .preview-container): (.content-view:not(.tab).recording canvas): * UserInterface/Views/RecordingNavigationSidebarPanel.js: Added. (WebInspector.RecordingNavigationSidebarPanel): (WebInspector.RecordingNavigationSidebarPanel.disallowInstanceForClass): (WebInspector.RecordingNavigationSidebarPanel.prototype.set recording): (WebInspector.RecordingNavigationSidebarPanel.prototype.updateActionIndex): (WebInspector.RecordingNavigationSidebarPanel.prototype.initialLayout): (WebInspector.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked): (WebInspector.RecordingNavigationSidebarPanel.prototype._exportNavigationItemClicked): * UserInterface/Views/RecordingNavigationSidebarPanel.css: Added. (.sidebar > .panel.navigation.recording > :matches(.content, .empty-content-placeholder)): (.sidebar > .panel.navigation.recording > .content > .tree-outline): (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action, .selected).expanded): (.sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): (body[dir=ltr] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): (body[dir=rtl] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="2"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="3"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="4"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="5"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="6"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="7"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content .action > .icon): (.sidebar > .panel.navigation.recording > .content .action.function > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.getter > .icon): (.sidebar > .panel.navigation.recording > .content .tree-outline:matches(:focus, .force-focus) .action.attribute.getter.selected > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.boolean > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.number > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.object > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.string > .icon): (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action) > .icon): (.sidebar > .panel.navigation.recording > .content .action:matches(.invalid, .missing) > .icon): (body[dir=ltr] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon): (body[dir=rtl] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon): (.sidebar > .panel.navigation.recording > .content .action.visual:not(.selected, .invalid)): (.sidebar > .panel.navigation.recording > .content .action:not(.selected, .initial-state) > .titles .parameter.swizzled): (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles .name,): * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: Added. (WebInspector.RecordingStateDetailsSidebarPanel): (WebInspector.RecordingStateDetailsSidebarPanel.disallowInstanceForClass): (WebInspector.RecordingStateDetailsSidebarPanel.prototype.inspect): (WebInspector.RecordingStateDetailsSidebarPanel.prototype.set recording): (WebInspector.RecordingStateDetailsSidebarPanel.prototype.updateActionIndex): (WebInspector.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): * UserInterface/Views/RecordingStateDetailsSidebarPanel.css: Added. (.sidebar > .panel.details.recording-state > .content > .data-grid): (.sidebar > .panel.details.recording-state > .content > .data-grid tr.modified): (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected).non-standard): (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected) .unavailable): * UserInterface/Views/RecordingActionTreeElement.js: Added. (WebInspector.RecordingActionTreeElement): (WebInspector.RecordingActionTreeElement._generateDOM): (WebInspector.RecordingActionTreeElement.prototype.get index): (WebInspector.RecordingActionTreeElement.get filterableData): (WebInspector.RecordingActionTreeElement.prototype.get filterableData): (WebInspector.RecordingActionTreeElement.prototype.onattach): (WebInspector.RecordingActionTreeElement.prototype.populateContextMenu): * UserInterface/Base/Main.js: (WebInspector.contentLoaded): (WebInspector.instanceForClass): * UserInterface/Base/FileUtilites.js: Added. (WebInspector.saveDataToFile): Moved from UserInterface/Base/Main.js (WebInspector.loadDataFromFile): * UserInterface/Views/ButtonNavigationItem.js: (WebInspector.ButtonNavigationItem.prototype._mouseClicked): Send the native event as part of the data. * UserInterface/Views/CanvasContentView.js: (WebInspector.CanvasContentView): (WebInspector.CanvasContentView.prototype.get navigationItems): (WebInspector.CanvasContentView.prototype.initialLayout): (WebInspector.CanvasContentView.prototype.closed): (WebInspector.CanvasContentView.prototype._toggleRecording): (WebInspector.CanvasContentView.prototype._recordingFinished): * UserInterface/Views/CanvasContentView.css: (.content-view.canvas): * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel.prototype.inspect): * UserInterface/Views/ContentBrowser.js: (WebInspector.ContentBrowser): (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): * UserInterface/Views/ContentBrowserTabContentView.js: (WebInspector.ContentBrowserTabContentView): * UserInterface/Views/ContentView.js: (WebInspector.ContentView.createFromRepresentedObject): (WebInspector.ContentView.isViewable): * UserInterface/Views/ScrubberNavigationItem.js: Added. (WebInspector.ScrubberNavigationItem): (WebInspector.ScrubberNavigationItem.prototype.get value): (WebInspector.ScrubberNavigationItem.prototype.set value): (WebInspector.ScrubberNavigationItem.prototype.get min): (WebInspector.ScrubberNavigationItem.prototype.set min): (WebInspector.ScrubberNavigationItem.prototype.get max): (WebInspector.ScrubberNavigationItem.prototype.set max): (WebInspector.ScrubberNavigationItem.prototype.set disabled): (WebInspector.ScrubberNavigationItem.prototype.get additionalClassNames): (WebInspector.ScrubberNavigationItem.prototype._sliderChanged): * UserInterface/Views/ScrubberNavigationItem.css: Added. (.navigation-bar .item.scrubber): (.navigation-bar .item.scrubber > input): (.navigation-bar .item.scrubber > input[disabled]): Allow the flexible space to be replaced with a navigation item at construction. * UserInterface/Views/DataGridNode.js: (WebInspector.DataGridNode): (WebInspector.DataGridNode.prototype.get element): Allow a list of CSS classes to be added to the node's element. * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.initialLayout): (WebInspector.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange): (WebInspector.SettingsTabContentView.prototype._createExperimentalSettingsView): (WebInspector.SettingsTabContentView.prototype._createDebugSettingsView): Move experimental settings to their own panel. * UserInterface/Views/TabContentView.js: (WebInspector.TabContentView.prototype.get navigationSidebarPanel): Save the NavigationSidebarPanel after it's constructed. * UserInterface/Base/Utilities.js: (Number.countDigits): * UserInterface/Images/Recording.svg: Added. * UserInterface/Images/RenderingFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/TimelineRecordRenderingFrame.svg. * UserInterface/Images/gtk/RenderingFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/TimelineRecordRenderingFrame.svg. * UserInterface/Views/TimelineIcons.css: (.rendering-frame-record .icon): * UserInterface/Views/DOMTreeOutline.css: (@keyframes node-state-changed): * UserInterface/Views/Main.css: (:matches(img, canvas).show-grid): (img.show-grid): Deleted. * UserInterface/Views/NavigationBar.css: (.navigation-bar): * UserInterface/Views/NetworkSidebarPanel.css: (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .tree-outline): * UserInterface/Views/TimelineTabContentView.css: (.timeline.tab.content-view .navigation-bar > .item.radio): * UserInterface/Views/TimelineView.css: (.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .tree-outline): * UserInterface/Views/Variables.css: (:root): Create CSS variables for the DOM modification flash color and the color striping. 2017-07-28 Devin Rousso Web Inspector: Cleanup unused/invalid parameters for TreeElements https://bugs.webkit.org/show_bug.cgi?id=173987 Reviewed by Brian Burg. * UserInterface/Views/TreeElement.js: * UserInterface/Views/GeneralTreeElement.js: * UserInterface/Views/ApplicationCacheFrameTreeElement.js: * UserInterface/Views/BreakpointTreeElement.js: * UserInterface/Views/CSSStyleSheetTreeElement.js: * UserInterface/Views/CallFrameTreeElement.js: * UserInterface/Views/ContentFlowTreeElement.js: * UserInterface/Views/DOMNodeTreeElement.js: * UserInterface/Views/DatabaseTableTreeElement.js: * UserInterface/Views/DatabaseTreeElement.js: * UserInterface/Views/FolderTreeElement.js: * UserInterface/Views/FolderizedTreeElement.js: * UserInterface/Views/FrameTreeElement.js: * UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js: * UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js: * UserInterface/Views/IndexedDatabaseTreeElement.js: * UserInterface/Views/IssueTreeElement.js: * UserInterface/Views/ObjectTreeBaseTreeElement.js: * UserInterface/Views/ProfileNodeTreeElement.js: * UserInterface/Views/ResourceTreeElement.js: * UserInterface/Views/ScriptTreeElement.js: * UserInterface/Views/SearchResultTreeElement.js: * UserInterface/Views/SourceCodeTreeElement.js: * UserInterface/Views/SourceMapResourceTreeElement.js: * UserInterface/Views/StorageTreeElement.js: * UserInterface/Views/TimelineRecordTreeElement.js: * UserInterface/Views/TypeTreeElement.js: 2017-07-26 Devin Rousso Uncaught Exception: undefined is not an object (evaluating 'this._memoryRow.value = Number.bytesToString(this._canvas.memoryCost)') https://bugs.webkit.org/show_bug.cgi?id=174823 Reviewed by Joseph Pecoraro. * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection): (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow): Early return if the view has not called initialLayout, as the rows might not have been constructed yet. * UserInterface/Views/View.js: (WebInspector.View.prototype.get didInitialLayout): Added. 2017-07-26 Devin Rousso Web Inspector: create protocol for recording Canvas contexts https://bugs.webkit.org/show_bug.cgi?id=174481 Reviewed by Joseph Pecoraro. Create model objects that effectively mirror the protocol objects sent for Canvas recordings. * .eslintrc: * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.recordingFinished): * UserInterface/Protocol/CanvasObserver.js: (WebInspector.CanvasObserver.prototype.recordingFinished): * UserInterface/Models/Recording.js: Added. (WebInspector.Recording): (WebInspector.Recording.fromPayload): (WebInspector.Recording.prototype.get type): (WebInspector.Recording.prototype.get initialState): (WebInspector.Recording.prototype.get frames): (WebInspector.Recording.prototype.get data): (WebInspector.Recording.prototype.toJSON): * UserInterface/Models/RecordingAction.js: Added. (WebInspector.RecordingAction): (WebInspector.RecordingAction.fromPayload): (WebInspector.RecordingAction.prototype.get name): (WebInspector.RecordingAction.prototype.get parameters): (WebInspector.RecordingAction.prototype.toJSON): * UserInterface/Models/RecordingFrame.js: Added. (WebInspector.RecordingFrame): (WebInspector.RecordingFrame.fromPayload): (WebInspector.RecordingFrame.prototype.get actions): (WebInspector.RecordingFrame.prototype.get incomplete): (WebInspector.RecordingFrame.prototype.toJSON): 2017-07-26 Brian Burg Remove WEB_TIMING feature flag https://bugs.webkit.org/show_bug.cgi?id=174795 Reviewed by Alex Christensen. Remove fallback for ports that lack WEB_TIMING. * UserInterface/Base/Utilities.js: (timestamp): Deleted. * UserInterface/Protocol/Connection.js: (InspectorBackend.Connection.prototype._dispatchResponse): (InspectorBackend.Connection.prototype._dispatchEvent): (InspectorBackend.Connection.prototype._sendCommandToBackendWithCallback): (InspectorBackend.Connection.prototype._sendCommandToBackendExpectingPromise): * UserInterface/Protocol/MessageDispatcher.js: (WebInspector.dispatchNextQueuedMessageFromBackend): 2017-07-25 Joseph Pecoraro Web Inspector: Don't output "No message" for multi-value logs like console.log(x, y) https://bugs.webkit.org/show_bug.cgi?id=174842 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: Removed "No message". * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments): Track whether or not outputting the next parameter will need a divider in front of it or not. 2017-07-25 Joseph Pecoraro Web Inspector: Fix warnings about console.assert lines without semicolons https://bugs.webkit.org/show_bug.cgi?id=174840 Reviewed by Brian Burg. * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.set selectedSettingsView): (WebInspector.SettingsTabContentView.prototype.setSettingsViewVisible): Add semicolon to assert lines so they can be stripped in optimized builds. 2017-07-25 Joseph Pecoraro Web Inspector: Inline multiple console log values if they are simple https://bugs.webkit.org/show_bug.cgi?id=174746 Reviewed by Matt Baker. * UserInterface/Models/IssueMessage.js: * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.type): Deleted. Remove this as it isn't as useful as directly checking the type. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._appendExtraParameters): (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments): (WebInspector.ConsoleMessageView.prototype._hasSimpleDisplay): (WebInspector.ConsoleMessageView.prototype._isStackTrace): For leading primitive/simple values, display them inline on the console message. * UserInterface/Views/FormattedValue.js: (WebInspector.FormattedValue.hasSimpleDisplay): Provide a helper to determine if a formatted value will be simple. 2017-07-25 Nikita Vasilyev Web Inspector: Styles: Add a switch for Spreadsheet model style editor to experimental settings https://bugs.webkit.org/show_bug.cgi?id=174741 Reviewed by Brian Burg. Show a blank panel when Spreadsheet Style Editor is enabled. * UserInterface/Base/Setting.js: * UserInterface/Main.html: * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WebInspector.CSSStyleDetailsSidebarPanel): (WebInspector.CSSStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.js: Added. (WebInspector.RulesStyleSpreadsheetDetailsPanel): (WebInspector.RulesStyleSpreadsheetDetailsPanel.prototype.filterDidChange): (WebInspector.RulesStyleSpreadsheetDetailsPanel.prototype.scrollToSectionAndHighlightProperty): * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings > .settings-view > .container.hidden): (.content-view.settings > .settings-view > .container-centered): (.content-view.settings > .settings-view > .container button): * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype._createDebugSettingsView): * UserInterface/Views/SettingsView.js: (WebInspector.SettingsView.prototype.addCenteredContainer): (WebInspector.SettingsView): Show "Reload Web Inspector" button when Spreadsheet Style Editor setting is modified. 2017-07-25 Devin Rousso Web Inspector: add context menu item for taking a screenshot of a node https://bugs.webkit.org/show_bug.cgi?id=174754 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/ContextMenuUtilities.js: (WebInspector.appendContextMenuItemsForDOMNode): Add "Capture Element Screenshot " context menu item that opens a save dialog with a picture of the node. * UserInterface/Base/Main.js: (WebInspector.saveDataToFile): Allow the saveData to specify whether the contained content is base64Encoded, instead of having to go through a Blob to save base64 data. * UserInterface/Base/Utilities.js: Add Number.pad to add leading zeros up to a certain width. Drive-by: fix failing test for Number.constrain. * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode.prototype.scrollIntoView.resolvedNode.scrollIntoView): Added. (WebInspector.DOMNode.prototype.scrollIntoView.resolvedNode): Added. (WebInspector.DOMNode.prototype.scrollIntoView): Added. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): (WebInspector.DOMTreeElement.prototype._scrollIntoView.resolvedNode.scrollIntoView): Deleted. (WebInspector.DOMTreeElement.prototype._scrollIntoView.resolvedNode): Deleted. (WebInspector.DOMTreeElement.prototype._scrollIntoView): Deleted. * UserInterface/Views/DOMTreeOutline.js: (WebInspector.DOMTreeOutline.prototype.populateContextMenu): Drive-by: move "Scroll Into View" context menu command to WebInspector.appendContextMenuItemsForDOMNode so that it can be triggered from more places than just the DOM tree. 2017-07-24 Nikita Vasilyev Web Inspector: Settings: Some controls overlay settings header https://bugs.webkit.org/show_bug.cgi?id=174804 Reviewed by Matt Baker. * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings .navigation-bar): 2017-07-24 Matt Baker Web Inspector: should only show Canvases in resource type filter if debug setting enabled https://bugs.webkit.org/show_bug.cgi?id=174765 Reviewed by Devin Rousso. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): 2017-07-21 Joseph Pecoraro Web Inspector: inspect(aFunction) should jump to function definition https://bugs.webkit.org/show_bug.cgi?id=149344 Reviewed by Matt Baker. * UserInterface/Protocol/InspectorObserver.js: (WebInspector.InspectorObserver.prototype.inspect): If we receive a function remote object jump to its location if available. 2017-07-21 Joseph Pecoraro Web Inspector: Avoid subclassing WebInspector.Object if we do not need to https://bugs.webkit.org/show_bug.cgi?id=174703 Reviewed by Brian Burg. * UserInterface/Models/LogObject.js: (WebInspector.LogObject): (WebInspector.LogObject.prototype.get startDate): Deleted. Remove unused startDate property as well. * UserInterface/Base/YieldableTask.js: * UserInterface/Debug/ProtocolTrace.js: * UserInterface/Models/AnalyzerMessage.js: * UserInterface/Models/ApplicationCacheFrame.js: * UserInterface/Models/ApplicationCacheManifest.js: * UserInterface/Models/BackForwardEntry.js: * UserInterface/Models/Branch.js: * UserInterface/Models/BreakpointAction.js: * UserInterface/Models/CSSMedia.js: * UserInterface/Models/CSSSelector.js: * UserInterface/Models/CallFrame.js: * UserInterface/Models/CallingContextTree.js: * UserInterface/Models/CallingContextTreeNode.js: * UserInterface/Models/CollectionEntry.js: * UserInterface/Models/CollectionEntryPreview.js: * UserInterface/Models/ConsoleMessage.js: * UserInterface/Models/DOMSearchMatchObject.js: * UserInterface/Models/DatabaseObject.js: * UserInterface/Models/DatabaseTableObject.js: * UserInterface/Models/DebuggerDashboard.js: * UserInterface/Models/DebuggerData.js: * UserInterface/Models/ExecutionContext.js: * UserInterface/Models/ExecutionContextList.js: * UserInterface/Models/GarbageCollection.js: * UserInterface/Models/HeapSnapshotRootPath.js: * UserInterface/Models/IndexedDatabase.js: * UserInterface/Models/IndexedDatabaseObjectStore.js: * UserInterface/Models/IndexedDatabaseObjectStoreIndex.js: * UserInterface/Models/Instrument.js: * UserInterface/Models/KeyboardShortcut.js: * UserInterface/Models/LineWidget.js: * UserInterface/Models/MemoryCategory.js: * UserInterface/Models/MemoryPressureEvent.js: * UserInterface/Models/ObjectPreview.js: * UserInterface/Models/Probe.js: * UserInterface/Models/ProbeSetDataFrame.js: * UserInterface/Models/Profile.js: * UserInterface/Models/ProfileNode.js: * UserInterface/Models/ProfileNodeCall.js: * UserInterface/Models/PropertyDescriptor.js: * UserInterface/Models/PropertyPath.js: * UserInterface/Models/PropertyPreview.js: * UserInterface/Models/ResourceQueryMatch.js: * UserInterface/Models/ResourceQueryResult.js: * UserInterface/Models/ResourceTimingData.js: * UserInterface/Models/Revision.js: * UserInterface/Models/ScopeChainNode.js: * UserInterface/Models/ScriptSyntaxTree.js: * UserInterface/Models/SourceCodePosition.js: * UserInterface/Models/SourceCodeSearchMatchObject.js: * UserInterface/Models/SourceMap.js: * UserInterface/Models/StackTrace.js: * UserInterface/Models/StructureDescription.js: * UserInterface/Models/TextMarker.js: * UserInterface/Models/TextRange.js: * UserInterface/Models/TimelineRange.js: * UserInterface/Models/TypeDescription.js: * UserInterface/Models/TypeSet.js: * UserInterface/Protocol/ProtocolTracer.js: * UserInterface/Proxies/FormatterWorkerProxy.js: * UserInterface/Proxies/HeapSnapshotDiffProxy.js: * UserInterface/Proxies/HeapSnapshotWorkerProxy.js: * UserInterface/Test/TestSuite.js: 2017-07-19 Chris Dumez Drop SQLException type https://bugs.webkit.org/show_bug.cgi?id=174665 Reviewed by Sam Weinig. Use SQLError instead of SQLException, this is what the script should really use here since it is checking the code of an SQLError. * .eslintrc: * UserInterface/Models/DatabaseObject.js: (WebInspector.DatabaseObject.prototype.executeSQL.queryCallback): (WebInspector.DatabaseObject.prototype.executeSQL): (WebInspector.DatabaseObject): 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_RANGE_LOOP_ANALYSIS https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Tim Horton. * Configurations/Base.xcconfig: 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_OBJC_LITERAL_CONVERSION https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Sam Weinig. * Configurations/Base.xcconfig: 2017-07-18 Brian Burg Web Inspector: adjust wording of "clear when page {navigates -> loads}" https://bugs.webkit.org/show_bug.cgi?id=174589 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype._createGeneralSettingsView): 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_NON_LITERAL_NULL_CONVERSION https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Dan Bernstein. * Configurations/Base.xcconfig: 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Darin Adler. * Configurations/Base.xcconfig: 2017-07-13 Joseph Pecoraro Web Inspector: Remove unused and untested Page domain commands https://bugs.webkit.org/show_bug.cgi?id=174429 Reviewed by Timothy Hatcher. * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: * Versions/Inspector-iOS-10.0.json: * Versions/Inspector-iOS-10.3.json: * Versions/Inspector-iOS-11.0.json: * Versions/Inspector-iOS-7.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: * Versions/Inspector-iOS-9.3.json: 2017-07-11 Joseph Pecoraro Web Inspector: Correct a typo in the .eslintrc https://bugs.webkit.org/show_bug.cgi?id=174389 Reviewed by Matt Baker. * .eslintrc: 2017-07-11 Joseph Pecoraro Web Inspector: Node Sidebar - Improve wording for Potential Custom Element lacking a Custom definition https://bugs.webkit.org/show_bug.cgi?id=174346 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementState): The text "Waiting to be upgraded" is poor. Any non-standard element with dashes in the name is considered custom, but does not need to be upgraded. Lets use different wording to indicate that it is detected as custom, and lacks a specific Custom Element definition. 2017-07-10 Devin Rousso Web Inspector: Highlight matching CSS canvas clients when hovering contexts in the Resources tab https://bugs.webkit.org/show_bug.cgi?id=174279 Reviewed by Matt Baker. * UserInterface/Controllers/DOMTreeManager.js: (WebInspector.DOMTreeManager.prototype.highlightDOMNodeList): (WebInspector.DOMTreeManager.prototype.highlightSelector): * UserInterface/Views/CanvasTreeElement.js: (WebInspector.CanvasTreeElement.prototype._handleMouseOver): 2017-07-03 Brian Burg Web Replay: remove some unused code https://bugs.webkit.org/show_bug.cgi?id=173903 Rubber-stamped by Joseph Pecoraro. * .eslintrc: * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Controllers/DashboardManager.js: (WebInspector.DashboardManager): * UserInterface/Controllers/ReplayManager.js: Removed. * UserInterface/Images/ReplayPauseButton.svg: Removed. * UserInterface/Images/ReplayPlayButton.svg: Removed. * UserInterface/Images/ReplayRecordingButton.svg: Removed. * UserInterface/Images/gtk/ReplayPauseButton.svg: Removed. * UserInterface/Images/gtk/ReplayPlayButton.svg: Removed. * UserInterface/Images/gtk/ReplayRecordingButton.svg: Removed. * UserInterface/Main.html: * UserInterface/Models/ReplayDashboard.js: Removed. * UserInterface/Models/ReplaySession.js: Removed. * UserInterface/Models/ReplaySessionSegment.js: Removed. * UserInterface/Protocol/ReplayObserver.js: Removed. * UserInterface/Test.html: * UserInterface/Test/Test.js: (WebInspector.loaded): * UserInterface/Views/DashboardView.js: (WebInspector.DashboardView.create): * UserInterface/Views/ReplayDashboardView.css: Removed. * UserInterface/Views/ReplayDashboardView.js: Removed. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._debuggerPaused): (WebInspector.TimelineRecordingContentView.prototype._debuggerResumed): 2017-07-07 Devin Rousso Web Inspector: Resources are sometimes missing from the tree outline right before folderizing https://bugs.webkit.org/show_bug.cgi?id=174277 Reviewed by Joseph Pecoraro. * UserInterface/Views/TreeElement.js: (WebInspector.TreeElement.prototype.expand): 2017-07-07 Devin Rousso Web Inspector: REGRESSION(r217258): WebSocket resource tree elements don't show the connection status https://bugs.webkit.org/show_bug.cgi?id=174274 Reviewed by Brian Burg. * UserInterface/Views/FrameTreeElement.js: (WebInspector.FrameTreeElement): * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.prototype.populateContextMenu): * UserInterface/Views/WebSocketResourceTreeElement.js: (WebInspector.WebSocketResourceTreeElement.prototype.populateContextMenu): Move "Log WebSocket" context menu item to WebSocketResourceTreeElement. 2017-07-07 Devin Rousso Web Inspector: Show all elements currently using a given CSS Canvas https://bugs.webkit.org/show_bug.cgi?id=173965 Reviewed by Joseph Pecoraro. * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.cssCanvasClientNodesChanged): * UserInterface/Models/Canvas.js: (WebInspector.Canvas.prototype.requestCSSCanvasClientNodes): (WebInspector.Canvas.prototype.cssCanvasClientNodesChanged): * UserInterface/Protocol/CanvasObserver.js: (WebInspector.CanvasObserver.prototype.cssCanvasClientNodesChanged): * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel): (WebInspector.CanvasDetailsSidebarPanel.prototype.set canvas): (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout): (WebInspector.CanvasDetailsSidebarPanel.prototype.layout): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection): (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow): Add CSS section for CSS canvases. Currently displays a list of node links, each of which is using the selected canvas via -webkit-canvas. * UserInterface/Main.html: * UserInterface/Views/CanvasDetailsSidebarPanel.css: Added. (.sidebar > .panel.details.canvas .details-section > .content .row.simple > .value > .node-link): * UserInterface/Controllers/DOMTreeManager.js: (WebInspector.DOMTreeManager.prototype.ensureDocument): * UserInterface/Models/Canvas.js: (WebInspector.Canvas.prototype.requestNode): * UserInterface/Views/SearchSidebarPanel.js: (WebInspector.SearchSidebarPanel.prototype.performSearch): Add convenience function that will call DOMAgent.getDocument with an empty function. Should be used when it is necessary that the document has been sent to the frontend, but the document node itself is not needed. 2017-07-07 Joseph Pecoraro Web Inspector: Clean up some unnecessary constructors https://bugs.webkit.org/show_bug.cgi?id=174236 Reviewed by Brian Burg. * UserInterface/Controllers/CodeMirrorBezierEditingController.js: * UserInterface/Controllers/CodeMirrorColorEditingController.js: * UserInterface/Controllers/CodeMirrorGradientEditingController.js: * UserInterface/Views/DividerNavigationItem.js: * UserInterface/Views/FlexibleSpaceNavigationItem.js: * UserInterface/Views/IdleTreeElement.js: 2017-07-06 Devin Rousso Web Inspector: Highlight matching canvas element when hovering contexts in the Resources tab https://bugs.webkit.org/show_bug.cgi?id=174209 Reviewed by Joseph Pecoraro. * UserInterface/Views/CanvasTreeElement.js: (WebInspector.CanvasTreeElement.prototype.onattach): (WebInspector.CanvasTreeElement.prototype._handleMouseOver): (WebInspector.CanvasTreeElement.prototype._handleMouseOut): 2017-07-06 Joseph Pecoraro Web Inspector: Add another Protocol Version https://bugs.webkit.org/show_bug.cgi?id=174193 Reviewed by Brian Burg. * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js: Added. * Versions/Inspector-iOS-11.0.json: Added. 2017-07-05 Devin Rousso Web Inspector: Group Inspector Style Sheets as part of the Stylesheets folder https://bugs.webkit.org/show_bug.cgi?id=173435 Reviewed by Joseph Pecoraro. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match): Add special case for CSSStyleSheetTreeElement. 2017-07-05 Devin Rousso Web Inspector: Split Canvas.svg into icons for 2D and 3D https://bugs.webkit.org/show_bug.cgi?id=174057 Reviewed by Matt Baker. * UserInterface/Images/Canvas2D.svg: Added. * UserInterface/Images/Canvas3D.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/Canvas.svg. * UserInterface/Views/ResourceIcons.css: (.canvas.canvas-2d .icon): (.canvas:matches(.webgl, .webgl2, .webgpu) .icon): (.canvas .icon): Deleted. 2017-07-05 Devin Rousso Web Inspector: Allow users to log any tracked canvas context https://bugs.webkit.org/show_bug.cgi?id=173397 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.resolveCanvasContext): * UserInterface/Views/CanvasTreeElement.js: (WebInspector.CanvasTreeElement.prototype.populateContextMenu): 2017-07-03 Devin Rousso Web Inspector: Support listing WebGL2 and WebGPU contexts https://bugs.webkit.org/show_bug.cgi?id=173396 Reviewed by Joseph Pecoraro. * UserInterface/Models/Canvas.js: (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.displayNameForContextType): 2017-07-01 Dan Bernstein [macOS] Remove code only needed when building for OS X Yosemite https://bugs.webkit.org/show_bug.cgi?id=174067 Reviewed by Tim Horton. * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: 2017-06-30 Joseph Pecoraro Web Inspector: Type token background color in debugger looks poor https://bugs.webkit.org/show_bug.cgi?id=174063 Reviewed by Devin Rousso. * UserInterface/Views/TextEditor.css: CodeMirror widgets do not get range styles like our (.execution-range-highlight). Make a best effort to carry over the styles to widgets. It isn't perfect, but it covers all common situations unless a selection ends inside the widget. The ultimate solution would be to get the expected range styles. 2017-06-30 Joseph Pecoraro Web Inspector: Initial search is sometimes performed twice, produces duplicate results https://bugs.webkit.org/show_bug.cgi?id=174047 Reviewed by Devin Rousso. * UserInterface/Views/SearchTabContentView.js: (WebInspector.SearchTabContentView.prototype.performSearch): The initial layout of the tab content view was setting state to force a search which may happen after a delay, however the global search field was causing its own search to happen. We can clear the flag when a search is being performed to prevent duplicating the search. 2017-06-30 Devin Rousso Web Inspector: Add small delay before showing the progress spinner when loading resources https://bugs.webkit.org/show_bug.cgi?id=173437 Reviewed by Joseph Pecoraro. * UserInterface/Views/ResourceContentView.js: (WebInspector.ResourceContentView): (WebInspector.ResourceContentView.prototype.removeLoadingIndicator): Added. (WebInspector.ResourceContentView.prototype._contentError): (WebInspector.ResourceContentView.prototype._hasContent): Delay the creation of the spinner for 100ms. If the content is available before then, just clear the timeout and the spinner will never be created/shown. We measured an average of 35ms to load and display images with slow cases being around 55ms. 100ms was chosen for the timeout to give some room to allow for abnormally slow loading while not being too long as to be outright noticable. * UserInterface/Views/FontResourceContentView.js: (WebInspector.FontResourceContentView.prototype.contentAvailable): * UserInterface/Views/ImageResourceContentView.js: (WebInspector.ImageResourceContentView.prototype.contentAvailable): * UserInterface/Views/TextResourceContentView.js: (WebInspector.TextResourceContentView.prototype._contentWillPopulate): Calls the new protected function removeLoadingIndicator to ensure that the spinner (and any other element) is removed. This is necessary because TextResourceContentView effectively has two phases of loading its content: getting the content and formatting it for display. The first follows the same path as the other ResourceContentView subclasses, the second waits for the ContentWillPopulate event on SourceCodeTextEditor before it actually adds the content as a subview. In this case, the spinner should only be removed right before the content is actually added, not once it's ready. 2017-06-30 Commit Queue Unreviewed, rolling out r218983. https://bugs.webkit.org/show_bug.cgi?id=174042 Broke Debugger Call Stack TreeOutline (Requested by drousso on #webkit). Reverted changeset: "Web Inspector: Remove unnecessary hasChildren from TreeOutline" https://bugs.webkit.org/show_bug.cgi?id=173986 http://trac.webkit.org/changeset/218983 2017-06-30 Devin Rousso Web Inspector: Default string comparisons to treat numeric characters as numbers https://bugs.webkit.org/show_bug.cgi?id=173984 Reviewed by Joseph Pecoraro. * UserInterface/Base/Utilities.js: (String.prototype.extendedLocaleCompare): * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames.compare): * UserInterface/Controllers/ResourceQueryController.js: (WebInspector.ResourceQueryController.prototype.executeQuery): * UserInterface/Views/ApplicationCacheFrameContentView.js: (WebInspector.ApplicationCacheFrameContentView.prototype._sortDataGrid.localeCompare): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties): * UserInterface/Views/CookieStorageContentView.js: (WebInspector.CookieStorageContentView.prototype._sortDataGrid.localeCompare): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAttributes): (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode): * UserInterface/Views/DOMStorageContentView.js: (WebInspector.DOMStorageContentView.prototype._sortDataGrid.comparator): * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements): * UserInterface/Views/FolderizedTreeElement.js: (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle): * UserInterface/Views/HeapSnapshotDataGridTree.js: (WebInspector.HeapSnapshotDataGridTree.buildSortComparator): * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView.prototype.dataGridSortComparator): * UserInterface/Views/NewTabContentView.js: (WebInspector.NewTabContentView.prototype._updateShownTabs): * UserInterface/Views/OverviewTimelineView.js: (WebInspector.OverviewTimelineView.prototype._compareDataGridNodesByStartTime): * UserInterface/Views/ProbeDetailsSidebarPanel.js: (WebInspector.ProbeDetailsSidebarPanel.prototype.inspect): * UserInterface/Views/QuickConsole.js: (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents): * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid.comparator): * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype._compareTreeElements): * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.compareResourceTreeElements): (WebInspector.ResourceTreeElement.compareFolderAndResourceTreeElements): * UserInterface/Views/ScriptDetailsTimelineView.js: (WebInspector.ScriptDetailsTimelineView.prototype.dataGridSortComparator): * UserInterface/Views/StorageSidebarPanel.js: (WebInspector.StorageSidebarPanel.prototype._compareTreeElements): * UserInterface/Views/TimelineDataGrid.js: (WebInspector.TimelineDataGrid.prototype._sortComparator): 2017-06-29 Devin Rousso Web Inspector: Provide a way for creating a new tab but not making it immediately selected https://bugs.webkit.org/show_bug.cgi?id=173983 Reviewed by Joseph Pecoraro. * UserInterface/Views/TabBar.js: (WebInspector.TabBar): (WebInspector.TabBar.prototype.addTabBarItem): (WebInspector.TabBar.prototype.insertTabBarItem): (WebInspector.TabBar.prototype.removeTabBarItem): (WebInspector.TabBar.prototype._handleClick): (WebInspector.TabBar.prototype._handleNewTabClick): * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser.prototype.addTabForContentView): (WebInspector.TabBrowser.prototype.showTabForContentView): (WebInspector.TabBrowser.prototype.closeTabForContentView): * UserInterface/Base/Main.js: (WebInspector.contentLoaded): (WebInspector._openDefaultTab): (WebInspector._tryToRestorePendingTabs): (WebInspector.showNewTabTab): (WebInspector.createNewTabWithType): Add `options` dictionaries instead of optional parameters. (WebInspector.tabContentViewClassForRepresentedObject): Drive-by fix: remove incorrect placement of WebInspector.Collection check. This function determines TabContentView classes, not ContentView. 2017-06-29 Devin Rousso Web Inspector: Remove unnecessary hasChildren from TreeOutline https://bugs.webkit.org/show_bug.cgi?id=173986 Reviewed by Joseph Pecoraro. * UserInterface/Views/TreeOutline.js: (WebInspector.TreeOutline): (WebInspector.TreeOutline.prototype.appendChild): (WebInspector.TreeOutline.prototype.insertChild): (WebInspector.TreeOutline.prototype.removeChildAtIndex): (WebInspector.TreeOutline.prototype.removeChild): (WebInspector.TreeOutline.prototype.get selectedTreeElementIndex): * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie): * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.get value): 2017-06-29 Devin Rousso Web Inspector: Cleanup unused/invalid parameters for SidebarPanels https://bugs.webkit.org/show_bug.cgi?id=173985 Reviewed by Joseph Pecoraro. * UserInterface/Views/SidebarPanel.js: * UserInterface/Views/NavigationSidebarPanel.js: * UserInterface/Views/NavigationSidebarPanel.css: (.sidebar > .panel.navigation > .overflow-shadow.top): Deleted. * UserInterface/Views/DetailsSidebarPanel.js: * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js: * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: * UserInterface/Views/DOMDetailsSidebarPanel.js: * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: * UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js: * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: * UserInterface/Views/ProbeDetailsSidebarPanel.js: * UserInterface/Views/ResourceDetailsSidebarPanel.js: * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: * UserInterface/Views/StorageSidebarPanel.js: 2017-06-29 Devin Rousso Web Inspector: Create a single -webkit-canvas for use inside popovers https://bugs.webkit.org/show_bug.cgi?id=173820 Reviewed by Matt Baker. * UserInterface/Views/Popover.css: (.popover): * UserInterface/Views/Popover.js: (WebInspector.Popover): (WebInspector.Popover.prototype._drawBackground): 2017-06-28 Devin Rousso Web Inspector: Instrument active pixel memory used by canvases https://bugs.webkit.org/show_bug.cgi?id=173087 Reviewed by Joseph Pecoraro. * .eslintrc: * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.canvasMemoryChanged): * UserInterface/Models/Canvas.js: (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.prototype.get memoryCost): (WebInspector.Canvas.prototype.set memoryCost): * UserInterface/Protocol/CanvasObserver.js: (WebInspector.CanvasObserver.prototype.canvasMemoryChanged): * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection): (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow): (WebInspector.CanvasDetailsSidebarPanel.prototype._canvasMemoryChanged): * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Utilities.js: (Number.bytesToString.value): Add support for gigabyte numbers. 2017-06-27 Joseph Pecoraro Web Inspector: Remove unused Inspector domain events https://bugs.webkit.org/show_bug.cgi?id=173905 Reviewed by Matt Baker. * UserInterface/Protocol/InspectorObserver.js: (WebInspector.InspectorObserver.prototype.detached): Deleted. * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: * Versions/Inspector-iOS-10.0.json: * Versions/Inspector-iOS-10.3.json: * Versions/Inspector-iOS-7.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: * Versions/Inspector-iOS-9.3.json: Remove from legacy backends as well since they did not send it. 2017-06-27 Matt Baker Web Inspector: no discoverable way to dismiss the split console https://bugs.webkit.org/show_bug.cgi?id=167034 Reviewed by Devin Rousso. This patch adds an Xcode-style toggle button to the left of the split console navigation bar. Additionally, the split console code has been broken out into it's own class to reduce the clutter in Main.js/css, and simplify future console maintenance. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WebInspector.loaded): Replace the "split" ContentBrowser with a new ConsoleDrawer class, which encapsulates the drawer height setting and resize behavior. (WebInspector.contentLoaded): The console drawer manages its own height. * UserInterface/Images/HideConsoleDrawer.svg: Added. * UserInterface/Images/ShowConsoleDrawer.svg: Added. Console drawer toggle button images. Styled after corresponding Xcode button. * UserInterface/Main.html: * UserInterface/Views/ConsoleDrawer.css: Added. Moved old #split-content-browser styles over from Main.css. (.console-drawer): (.console-drawer > .navigation-bar): (.console-drawer > .navigation-bar > .item.button:not(.clear-log)): Make button spacing less cramped. (.console-drawer > .navigation-bar > .item:not(.flexible-space)): (.console-drawer > .navigation-bar > :matches(.item.button, .log-scope-bar)): (.console-drawer > .navigation-bar > .item > .glyph,): * UserInterface/Views/ConsoleDrawer.js: Added. New class responsible for console drawer expand / collapse and resizer dragging, which was previously part of Main.js. The console drawer toolbar now has a toggle button, debugging controls, and a call frames path item. The "Show Console Tab" button has been removed. (WebInspector.ConsoleDrawer): (WebInspector.ConsoleDrawer.prototype.get collapsed): (WebInspector.ConsoleDrawer.prototype.set collapsed): (WebInspector.ConsoleDrawer.prototype.get height): (WebInspector.ConsoleDrawer.prototype.shown): (WebInspector.ConsoleDrawer.prototype.layout): (WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown.dockedResizerDrag): (WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown.dockedResizerDragEnd): (WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown): (WebInspector.ConsoleDrawer.prototype._restoreDrawerHeight): (WebInspector.ConsoleDrawer.prototype._updateDrawerHeight): (WebInspector.ConsoleDrawer.prototype._selectedTabContentViewDidChange): When switching to a tab that doesn't support showing the console drawer, hide it without altering the collapsed state. * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView.prototype.get navigationItems): * UserInterface/Views/Main.css: Renamed #split-content-browser to #console-drawer, and moved related styles to ConsoleDrawer.css. (#split-content-browser): Deleted. (#split-content-browser > .navigation-bar): Deleted. (#split-content-browser > .navigation-bar :matches(.find-banner, .find-banner + .divider)): Deleted. (#split-content-browser > .navigation-bar .item): Deleted. (#split-content-browser > .navigation-bar .item:not(.flexible-space)): Deleted. (#split-content-browser .hierarchical-path-component.log-icon .icon): Deleted. (#split-content-browser .hierarchical-path-component.log-icon .title): Deleted. (#split-content-browser .hierarchical-path-component.log-icon select): Deleted. (#split-content-browser > .navigation-bar > :matches(.hierarchical-path, .log-scope-bar)): Deleted. (#split-content-browser > .navigation-bar > .log-scope-bar > li): Deleted. * UserInterface/Views/QuickConsole.js: (WebInspector.QuickConsole): (WebInspector.QuickConsole.prototype._toggleOrFocus): (WebInspector.QuickConsole.prototype._updateStyles): Update top border style in response to change in selected TabBrowser tab or the console drawer collapsed state. (WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged): Deleted. (WebInspector.QuickConsole.prototype.set keyboardShortcutDisabled): Deleted. 2017-06-24 Joseph Pecoraro Remove Reflect.enumerate https://bugs.webkit.org/show_bug.cgi?id=173806 Reviewed by Yusuke Suzuki. * UserInterface/Models/NativeFunctionParameters.js: 2017-06-23 Joseph Pecoraro Web Inspector: Script Timeline bubbles sometimes appear to miss large events https://bugs.webkit.org/show_bug.cgi?id=173746 Reviewed by Brian Burg. * UserInterface/Models/Timeline.js: (WebInspector.Timeline.prototype.addRecord): (WebInspector.Timeline.prototype._tryInsertInSortedOrder): The list of records is assumed to be sorted by the code that draws bubbles however the order in which we receive them may not be sorted. Make a quick effort to sort recent records so that as we are drawing the timeline it is more accurate. 2017-06-23 Brian Burg Web Inspector: RTL: flip all go-to-arrow instances https://bugs.webkit.org/show_bug.cgi?id=173794 Reviewed by Joseph Pecoraro. Move the flipping transform so it applies to all go-to arrows. * UserInterface/Views/DataGrid.css: (body[dir=rtl] .data-grid td .go-to-arrow): * UserInterface/Views/Main.css: (body[dir=rtl] .go-to-arrow): 2017-06-22 Joseph Pecoraro Web Inspector: Pausing with a deep call stack can be very slow, avoid eagerly generating object previews https://bugs.webkit.org/show_bug.cgi?id=173698 Reviewed by Matt Baker. Introduce RemoteObject.prototype.updatePreview which can be used to update the preview of a RemoteObject with a current view for the object. Currently we only use this to fetch the preview that we did not have for the `thisObject` in the scope chain sidebar. However this could be used generically to update a RemoteObject's preview (ObjectPreview) at any time. * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.prototype.canLoadPreview): (WebInspector.RemoteObject.prototype.updatePreview): Allow a RemoteObject to update its preview property. Since this only makes sense on certain Object values include a helper to know when it is appropriate to fetch a preview. * UserInterface/Views/ObjectTreePropertyTreeElement.js: (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle): (WebInspector.ObjectTreePropertyTreeElement.prototype._loadPreviewLazilyIfNeeded): If the object being shown in the sidebar does not have a preview but can load a preview then attempt to load it lazily. This is the case for the `thisObject` which is injected into an ObjectTree in the scope chain sidebar. 2017-06-22 Fujii Hironori [GTK] Web Inspector: Add icon for Canvas.svg https://bugs.webkit.org/show_bug.cgi?id=173580 Reviewed by Carlos Garcia Campos. * UserInterface/Images/gtk/Canvas.svg: Added. 2017-06-21 Fujii Hironori [GTK] Web Inspector: Add NavigationItemCheckers.svg https://bugs.webkit.org/show_bug.cgi?id=173692 Reviewed by Carlos Garcia Campos. * UserInterface/Images/gtk/NavigationItemCheckers.svg: Added. 2017-06-20 Devin Rousso Web Inspector: change the selected ScopeBarItem on mousedown instead of click https://bugs.webkit.org/show_bug.cgi?id=173586 Reviewed by Matt Baker. Both the Tab bar and Sidebar navigation bar switch the active item on "mousedown" instead of on "click". ScopeBarItem should follow this pattern, as it is faster and keeps consistency. * UserInterface/Views/MultipleScopeBarItem.js: (WebInspector.MultipleScopeBarItem): (WebInspector.MultipleScopeBarItem.prototype._handleMouseDown): (WebInspector.MultipleScopeBarItem.prototype._clicked): Deleted. * UserInterface/Views/ScopeBarItem.js: (WebInspector.ScopeBarItem): (WebInspector.ScopeBarItem.prototype._handleMouseDown): (WebInspector.ScopeBarItem.prototype._clicked): Deleted. 2017-06-20 Devin Rousso Web Inspector: Send context attributes for tracked canvases https://bugs.webkit.org/show_bug.cgi?id=173327 Reviewed by Joseph Pecoraro. * UserInterface/Models/Canvas.js: (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.prototype.get contextAttributes): * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout): (WebInspector.CanvasDetailsSidebarPanel.prototype.layout): (WebInspector.CanvasDetailsSidebarPanel.prototype.sizeDidChange): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection): * UserInterface/Views/DataGridNode.js: (WebInspector.DataGridNode.prototype.createCellContent): Instead of checking if the value of the cell is falsy, check that the key exists in the data. This allows values like `false` to be displayed. 2017-06-19 Devin Rousso Web Inspector: create canvas content view and details sidebar panel https://bugs.webkit.org/show_bug.cgi?id=138941 Reviewed by Joseph Pecoraro. * UserInterface/Models/Canvas.js: (WebInspector.Canvas): (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.prototype.get displayName): (WebInspector.Canvas.requestNode): Added. (WebInspector.Canvas.prototype.requestContent): Added. (WebInspector.Canvas.prototype.saveIdentityToCookie): * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.canvasAdded): (WebInspector.CanvasManager.prototype.canvasRemoved): * UserInterface/Models/Collection.js: * UserInterface/Models/Frame.js: (WebInspector.Frame): (WebInspector.Frame.prototype.get canvasCollection): (WebInspector.Frame.prototype.commitProvisionalLoad): Create a Collection for Canvas in each Frame, and modify it when canvas events are fired. * UserInterface/Views/CanvasContentView.css: Added. (.content-view.canvas > .preview): (.content-view.canvas > .preview > img): * UserInterface/Views/CanvasContentView.js: Added. (WebInspector.CanvasContentView): (WebInspector.CanvasContentView.prototype.get navigationItems): (WebInspector.CanvasContentView.prototype.shown): (WebInspector.CanvasContentView.prototype.hidden): (WebInspector.CanvasContentView.prototype._showPreview): (WebInspector.CanvasContentView.prototype._updateImageGrid): (WebInspector.CanvasContentView.prototype._showGridButtonClicked): * UserInterface/Views/CanvasDetailsSidebarPanel.js: Added. (WebInspector.CanvasDetailsSidebarPanel): (WebInspector.CanvasDetailsSidebarPanel.prototype.inspect): (WebInspector.CanvasDetailsSidebarPanel.prototype.get canvas): (WebInspector.CanvasDetailsSidebarPanel.prototype.set canvas): (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout): (WebInspector.CanvasDetailsSidebarPanel.prototype.layout): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection.this._canvas.requestNode.): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection): * UserInterface/Views/CanvasTreeElement.js: Added. (WebInspector.CanvasTreeElement): * UserInterface/Views/FrameTreeElement.js: (WebInspector.FrameTreeElement.prototype.onattach): (WebInspector.FrameTreeElement.prototype.ondetach): (WebInspector.FrameTreeElement.prototype.onpopulate): (WebInspector.FrameTreeElement.prototype._canvasWasAdded): (WebInspector.FrameTreeElement.prototype._canvasWasRemoved): (WebInspector.FrameTreeElement): * UserInterface/Base/Main.js: * UserInterface/Views/ContentView.js: (WebInspector.ContentView.createFromRepresentedObject): (WebInspector.ContentView.isViewable): * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): (WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match): (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange): * UserInterface/Views/ResourcesTabContentView.js: (WebInspector.ResourcesTabContentView): (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject): Show Canvas objects and tie them to the correct ContentView and TreeElement subclasses. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Images/Canvas.svg: Added. * UserInterface/Views/ResourceIcons.css: (.canvas .icon): Added new files/rules/strings related to Canvas UI. * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings .navigation-bar): * UserInterface/Base/Setting.js: * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.initialLayout): (WebInspector.SettingsTabContentView.prototype._createGeneralSettingsView): (WebInspector.SettingsTabContentView.prototype._createDebugSettingsView): Add an experimental settings toggle in the Debug view for showing canvas contexts. * UserInterface/Views/FolderizedTreeElement.js: (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle): Drive-by fix: ensure that sorting also includes numbers, so that 1 < 2 < 10. * UserInterface/Views/ImageResourceContentView.js: (WebInspector.ImageResourceContentView.prototype.shown): (WebInspector.ImageResourceContentView.prototype.hidden): (WebInspector.ImageResourceContentView.prototype._updateImageGrid): (WebInspector.ImageResourceContentView.prototype._showGridButtonClicked): (WebInspector.ImageResourceContentView): Drive-by fix: change the activated state of the Show Grid navigation item if it changes in another view. 2017-06-19 Devin Rousso Web Inspector: Unify contextmenu items for all node links/previews https://bugs.webkit.org/show_bug.cgi?id=173187 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/ContextMenuUtilities.js: (WebInspector.appendContextMenuItemsForDOMNode.didGetFunctionDetails): Added. (WebInspector.appendContextMenuItemsForDOMNode.didGetProperty): Added. (WebInspector.appendContextMenuItemsForDOMNode.didResolveNode): Added. (WebInspector.appendContextMenuItemsForDOMNode): Added. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._populateTagContextMenu): (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): (WebInspector.DOMTreeElement.prototype._showCustomElementDefinition): Deleted. * UserInterface/Views/DOMTreeOutline.js: (WebInspector.DOMTreeOutline.prototype.populateContextMenu): (WebInspector.DOMTreeOutline.prototype._populateContextMenu.revealElement): Deleted. (WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement): Deleted. (WebInspector.DOMTreeOutline.prototype._populateContextMenu): Deleted. * UserInterface/Views/RulesStyleDetailsPanel.js: (WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel): Unify common DOM node context menu actions into a single helper function. * UserInterface/Base/DOMUtilities.js: (WebInspector.linkifyNodeReference): (WebInspector.linkifyNodeReferenceElement): Rework parameters to use options dictionary. 2017-06-16 Matt Baker Web Inspector: Instrument 2D/WebGL canvas contexts in the backend https://bugs.webkit.org/show_bug.cgi?id=172623 Reviewed by Devin Rousso and Joseph Pecoraro. * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Controllers/CanvasManager.js: Added. New frontend manager for the Canvas domain. (WebInspector.CanvasManager): (WebInspector.CanvasManager.prototype.get canvases): (WebInspector.CanvasManager.prototype.canvasAdded): (WebInspector.CanvasManager.prototype.canvasRemoved): (WebInspector.CanvasManager.prototype._mainResourceDidChange): * UserInterface/Main.html: New files. * UserInterface/Models/Canvas.js: Added. (WebInspector.Canvas): (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.displayNameForContextType): Get displayable text "2D" or "WebGL" based on context type. (WebInspector.Canvas.resetUniqueDisplayNameNumbers): Called by CanvasManager when canvases are cleared. (WebInspector.Canvas.prototype.get identifier): (WebInspector.Canvas.prototype.get contextType): (WebInspector.Canvas.prototype.get frame): (WebInspector.Canvas.prototype.get cssCanvasName): For CSS canvases, the identifier passed to getCSSCanvasContext. (WebInspector.Canvas.prototype.get displayName): Get displayable canvas name. The name depends on how the canvas was created, and the information available: - getCSSCanvasContext: "CSS Canvas " - getContext: "Canvas #" - Otherwise: "Canvas 1", "Canvas 2", ... (WebInspector.Canvas.saveIdentityToCookie): * UserInterface/Protocol/CanvasObserver.js: Added. (WebInspector.CanvasObserver.prototype.canvasAdded): (WebInspector.CanvasObserver.prototype.canvasRemoved): (WebInspector.CanvasObserver): * UserInterface/Test.html: * UserInterface/Test/Test.js: (WebInspector.loaded): 2017-06-16 Matt Lewis Unreviewed, rolling out r218376. The patch cause multiple Layout Test Crashes. Reverted changeset: "Web Inspector: Instrument 2D/WebGL canvas contexts in the backend" https://bugs.webkit.org/show_bug.cgi?id=172623 http://trac.webkit.org/changeset/218376 2017-06-15 Matt Baker Web Inspector: Instrument 2D/WebGL canvas contexts in the backend https://bugs.webkit.org/show_bug.cgi?id=172623 Reviewed by Devin Rousso. * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Controllers/CanvasManager.js: Added. New frontend manager for the Canvas domain. (WebInspector.CanvasManager): (WebInspector.CanvasManager.prototype.get canvases): (WebInspector.CanvasManager.prototype.canvasAdded): (WebInspector.CanvasManager.prototype.canvasRemoved): (WebInspector.CanvasManager.prototype._mainResourceDidChange): * UserInterface/Main.html: New files. * UserInterface/Models/Canvas.js: Added. (WebInspector.Canvas): (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.displayNameForContextType): Get displayable text "2D" or "WebGL" based on context type. (WebInspector.Canvas.resetUniqueDisplayNameNumbers): Called by CanvasManager when canvases are cleared. (WebInspector.Canvas.prototype.get identifier): (WebInspector.Canvas.prototype.get contextType): (WebInspector.Canvas.prototype.get frame): (WebInspector.Canvas.prototype.get cssCanvasName): For CSS canvases, the identifier passed to getCSSCanvasContext. (WebInspector.Canvas.prototype.get displayName): Get displayable canvas name. The name depends on how the canvas was created, and the information available: - getCSSCanvasContext: "CSS Canvas " - getContext: "Canvas #" - Otherwise: "Canvas 1", "Canvas 2", ... (WebInspector.Canvas.saveIdentityToCookie): * UserInterface/Protocol/CanvasObserver.js: Added. (WebInspector.CanvasObserver.prototype.canvasAdded): (WebInspector.CanvasObserver.prototype.canvasRemoved): (WebInspector.CanvasObserver): * UserInterface/Test.html: * UserInterface/Test/Test.js: (WebInspector.loaded): 2017-06-15 Joseph Pecoraro Web Inspector: Search highlight doesn't show up in resources when paused https://bugs.webkit.org/show_bug.cgi?id=173438 Reviewed by Matt Baker. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine): Previously we were bailing if executionLineNumber was NaN, which means that when we were paused we were incorrectly disabling highlights in any resource that does not have the active callframe. Relax this and make it match the intended behavior of only disabling highlights if the highlight line matches the execution line. 2017-06-15 Joseph Pecoraro Uncaught Exception: TypeError: null is not an object (evaluating 'this.contentBrowser.contentViewForRepresentedObject') https://bugs.webkit.org/show_bug.cgi?id=173425 Reviewed by Devin Rousso. * UserInterface/Views/ContentBrowserTabContentView.js: (WebInspector.ContentBrowserTabContentView.prototype.shown): Reorder slightly so the NavigationSidebar has its ContentBrowser set before anyone tries to restore views in the sidebar. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView): Try to select a script/resource content view instead of nothing. (WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie): When a resource is selected, save it using the normal path. * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel.prototype.canShowDifferentContentView): Remove a reference to an unused / stale member variable. 2017-06-14 Nikita Vasilyev Web Inspector: Pretty print / type info / code coverage buttons disappear after switching tabs https://bugs.webkit.org/show_bug.cgi?id=162515 Reviewed by Joseph Pecoraro. Each ContentView owns a list of NavigationItems. When the ContentView moves across Tabs (ContentBrowsers) it removes its NavigationItems from the old Tab's NavigationBar and adds them to the new Tab's NavigationBar. When switching back to the original tab the ContentView is restored, but its NavigationItems are not carried back. * UserInterface/Views/ContentBrowser.js: (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): Add a forceUpdate parameter that is needed when navigationItems are unchanged but navigationBar is different. (WebInspector.ContentBrowser.prototype._removeAllNavigationItems): Remove navigation items even when their navigationBar is no longer a current navigationBar, e.g. a navigationBar of the previous tab. (WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange): * UserInterface/Views/ContentViewContainer.js: (WebInspector.ContentViewContainer.prototype._takeOwnershipOfContentView): 2017-06-14 Devin Rousso Web Inspector: REGRESSION: SVG files and favicon don't display properly https://bugs.webkit.org/show_bug.cgi?id=173389 Reviewed by Joseph Pecoraro. * UserInterface/Views/ImageResourceContentView.css: (.content-view.resource.image img): Don't set a `min-width` as it has odd interactions with flexbox. 2017-06-13 Nikita Vasilyev Web Inspector: Console: Message icons overlay source location https://bugs.webkit.org/show_bug.cgi?id=173291 Reviewed by Matt Baker. * UserInterface/Views/ConsoleMessageView.css: (.console-message-location.call-frame): This should be a safe change since a method name and a source link already have max-width set to 20vw and 30vw respectively. 2017-06-13 Nikita Vasilyev Web Inspector: Don't use -webkit-user-modify CSS property https://bugs.webkit.org/show_bug.cgi?id=173232 Reviewed by Devin Rousso. Replace -webkit-user-modify CSS property with contentEditable HTML attribute. * UserInterface/Views/Editing.css: (.editing): * UserInterface/Views/EditingSupport.js: (cleanUpAfterEditing): * UserInterface/Views/VisualStyleSelectorTreeItem.css: (.item.visual-style-selector-item:not(.dom-element-icon).editable > .titles > .title): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype.ondeselect): (WebInspector.VisualStyleSelectorTreeItem.prototype._handleMainTitleMouseDown): (WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector): 2017-06-13 Sam Weinig Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec. https://bugs.webkit.org/show_bug.cgi?id=80733 Reviewed by Chris Dumez. * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js: (HeapSnapshot.prototype._isNodeGlobalObject): 2017-06-12 Devin Rousso Web Inspector: Add grid to images to clarify transparency and image size https://bugs.webkit.org/show_bug.cgi?id=173184 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Setting.js: Add setting for controlling the image grid. * UserInterface/Images/NavigationItemCheckers.svg: Added. * UserInterface/Views/ImageResourceContentView.css: (.content-view.resource.image): (.content-view.resource.image img): Replace the border spacing around the image with padding on the container. This is required because a border will extend the area that is effected by `background-image`, meaning that the checkerboard would appear in that area as well, giving misleading information as to the size of the image. * UserInterface/Views/ImageResourceContentView.js: (WebInspector.ImageResourceContentView): (WebInspector.ImageResourceContentView.prototype.get navigationItems): Added. (WebInspector.ImageResourceContentView.prototype.contentAvailable): (WebInspector.ImageResourceContentView.prototype.shown): Added. (WebInspector.ImageResourceContentView.prototype._toggleImageGrid): Added. (WebInspector.ImageResourceContentView.prototype._showGridButtonClicked): Added. (WebInspector.ImageResourceContentView.prototype.get imageElement): Deleted. Apply the CSS class for showing the grid when the added navigation item is activated. * UserInterface/Views/Main.css: (img.show-grid): Generates a checkerboard pattern via `background-image` using the following process: - four `linear-gradients` are drawn, one in each corner - each draws one half of a 20x20 square, specified by `background-size` - they are then repositioned using `background-position` so that the two halfs align +------+ \--2 |1 /\ 2| |\ | | / \ | => | \| |/ \| => 4--\ |\ /| => 1--/ | \ / | => | /| |4 \/ 3| |/ | +------+ /--3 2017-06-10 Dan Bernstein Reverted r218056 because it made the IDE reindex constantly. * Configurations/DebugRelease.xcconfig: 2017-06-10 Dan Bernstein [Xcode] With Xcode 9 developer beta, everything rebuilds when switching between command-line and IDE https://bugs.webkit.org/show_bug.cgi?id=173223 Reviewed by Sam Weinig. The rebuilds were happening due to a difference in the compiler options that the IDE and xcodebuild were specifying. Only the IDE was passing the -index-store-path option. To make xcodebuild pass that option, too, set CLANG_INDEX_STORE_ENABLE to YES if it is unset, and specify an appropriate path in CLANG_INDEX_STORE_PATH. * Configurations/DebugRelease.xcconfig: 2017-06-10 Devin Rousso Web Inspector: REGRESSION(r217749): Event listeners are removed even if they haven't been added https://bugs.webkit.org/show_bug.cgi?id=173185 Reviewed by Joseph Pecoraro. * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel): (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): (WebInspector.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners): Maintain a member variable flag such that event listeners are only removed if it is true. It is only set to true once the event listeners are added. 2017-06-09 Devin Rousso Web Inspector: REGRESSION(r217258): Misspelled variable names https://bugs.webkit.org/show_bug.cgi?id=173189 Reviewed by Joseph Pecoraro. * UserInterface/Base/Main.js: (WebInspector.tabContentViewClassForRepresentedObject): * UserInterface/Views/ResourceIcons.css: (.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): (.large .resource-icon.resource-type-stylesheet .icon): Deleted. 2017-06-09 Joseph Pecoraro Web Inspector: Web inspector does not show non-shadow children of an element with a shadow root (e.g.