2015-01-19 Saam Barati Web Inspector: Provide a front end for JSC's Control Flow Profiler https://bugs.webkit.org/show_bug.cgi?id=138454 Reviewed by Timothy Hatcher. This patch creates a user interface for JSC's control flow profiler. The Web Inspector gets basic block ranges from JSC, and displays basic blocks that have not executed as having a gray background. BasicBlockAnnotator is the class responsible for this UI logic. It also does a few nifty things when presenting a UI for this gray background color: if an entire line of code is within the basic block's boundary, the annotator will not just highlight the background behind the text, but the background of the entire line itself. This provides a nicer experience when glancing through large JavaScript files. This patch also adds some necessary wrapper methods inside TextEditor for accessing CodeMirror's text highlighting functionality. It also creates a way for TextEditor and SourceCodeTextEditor to listen for focus events inside CodeMirror. * UserInterface/Controllers/AnnotatorManager.js: Removed. * UserInterface/Controllers/BasicBlockAnnotator.js: Added. (WebInspector.BasicBlockAnnotator): (WebInspector.BasicBlockAnnotator.prototype.clearAnnotations): (WebInspector.BasicBlockAnnotator.prototype.insertAnnotations): (WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges.): (WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges): (WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock): (WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyWhitespace): (WebInspector.BasicBlockAnnotator.prototype._canGrayOutEntireLine): (WebInspector.BasicBlockAnnotator.prototype._grayOutLine): (WebInspector.BasicBlockAnnotator.prototype._clearRangeForBasicBlockMarker.get marker): (WebInspector.BasicBlockAnnotator.prototype._clearRangeForBasicBlockMarker): * UserInterface/Main.html: * UserInterface/Views/SourceCodeTextEditor.css: (.basic-block-has-not-executed): (.basic-block-has-not-executed-prepend::before): * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor): (WebInspector.SourceCodeTextEditor.prototype.shown): (WebInspector.SourceCodeTextEditor.prototype.hidden): (WebInspector.SourceCodeTextEditor.prototype.canShowTypeAnnotations): (WebInspector.SourceCodeTextEditor.prototype.contentDidChange): (WebInspector.SourceCodeTextEditor.prototype.gainedFocus): (WebInspector.SourceCodeTextEditor.prototype.lostFocus): (WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations): (WebInspector.SourceCodeTextEditor.prototype.prettyPrint): (WebInspector.SourceCodeTextEditor.prototype._populateWithContent): (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause): (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume): (WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState): (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenAnnotator): (WebInspector.SourceCodeTextEditor.prototype._makeBasicBlockAnnotator): (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler): (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler): * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor): (WebInspector.TextEditor.prototype.getTextInRange): (WebInspector.TextEditor.prototype.addStyleToTextRange): (WebInspector.TextEditor.prototype.gainedFocus): (WebInspector.TextEditor.prototype.lostFocus): 2015-01-16 Nikita Vasilyev Web Inspector: Make message selection in the console more readable https://bugs.webkit.org/show_bug.cgi?id=140385 Reviewed by Timothy Hatcher. * UserInterface/Views/LogContentView.css: (.console-item.selected): (.console-messages:focus .console-item.selected): (.console-item.selected .console-message::after): (.console-messages:focus .console-item.selected .console-message::after): (.console-messages:focus .console-item.selected .go-to-link): * UserInterface/Views/Main.css: (.go-to-link): !important statements seem to be unnecessary, remove them. 2015-01-16 Joseph Pecoraro Web Inspector: Remove unused WebInspector.LocalJSONObject https://bugs.webkit.org/show_bug.cgi?id=140570 Reviewed by Timothy Hatcher. * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.fromLocalObject): Deleted. (WebInspector.LocalJSONObject): Deleted. (WebInspector.LocalJSONObject.prototype.get description.switch.case.string_appeared_here): Deleted. (WebInspector.LocalJSONObject.prototype.get description.switch.default): Deleted. (WebInspector.LocalJSONObject.prototype.get description): Deleted. (WebInspector.LocalJSONObject.prototype._concatenate): Deleted. (WebInspector.LocalJSONObject.prototype.get type): Deleted. (WebInspector.LocalJSONObject.prototype.get subtype): Deleted. (WebInspector.LocalJSONObject.prototype.get hasChildren): Deleted. (WebInspector.LocalJSONObject.prototype.getOwnProperties): Deleted. (WebInspector.LocalJSONObject.prototype.getAllProperties): Deleted. (WebInspector.LocalJSONObject.prototype._children.buildProperty): Deleted. (WebInspector.LocalJSONObject.prototype._children): Deleted. (WebInspector.LocalJSONObject.prototype.isError): Deleted. 2015-01-15 Joseph Pecoraro Web Inspector: Uncaught exceptions, attempting to dispatch unimplemented Network WebSocket methods https://bugs.webkit.org/show_bug.cgi?id=140532 Reviewed by Timothy Hatcher. * UserInterface/Protocol/NetworkObserver.js: (WebInspector.NetworkObserver.prototype.webSocketFrameReceived): (WebInspector.NetworkObserver.prototype.webSocketFrameError): (WebInspector.NetworkObserver.prototype.webSocketFrameSent): Add stubs to prevent an exception when trying to dispatch the event. 2015-01-15 Joseph Pecoraro Web Inspector: Reopening the inspector can selects a sub-frame instead of the Main Frame's DOM https://bugs.webkit.org/show_bug.cgi?id=140513 Reviewed by Timothy Hatcher. * UserInterface/Models/Frame.js: (WebInspector.Frame.prototype.saveIdentityToCookie): Specifically identify the main frame, so that any sub-frames with the same URL, don't get choosen over the main frame when restoring state from cookie. 2015-01-15 Joseph Pecoraro Web Inspector: selecting Paint timeline records from sidebar does not trigger preview of paint quad https://bugs.webkit.org/show_bug.cgi?id=139151 Reviewed by Brian Burg. * UserInterface/Views/LayoutTimelineDataGrid.js: (WebInspector.LayoutTimelineDataGrid): (WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement): (WebInspector.LayoutTimelineDataGrid.prototype.reset): Deleted. (WebInspector.LayoutTimelineDataGrid.prototype.hidden): Deleted. (WebInspector.LayoutTimelineDataGrid.prototype._layoutDataGridSelectedNodeChanged): Deleted. (WebInspector.LayoutTimelineDataGrid.prototype._hideHighlightIfNeeded): Deleted. Move the node highlight from the datagrid to the timeline view because we want this to happen on both the Navigation sidebar and the datagrid. * UserInterface/Views/LayoutTimelineView.js: (WebInspector.LayoutTimelineView.prototype.shown): (WebInspector.LayoutTimelineView.prototype.hidden): (WebInspector.LayoutTimelineView.prototype.filterDidChange): (WebInspector.LayoutTimelineView.prototype.reset): (WebInspector.LayoutTimelineView.prototype._treeElementDeselected): (WebInspector.LayoutTimelineView.prototype._treeElementSelected): Update the highlight for major view updates. (WebInspector.LayoutTimelineView.prototype._updateHighlight): (WebInspector.LayoutTimelineView.prototype._showHighlightForRecord): (WebInspector.LayoutTimelineView.prototype._hideHighlightIfNeeded): (WebInspector.LayoutTimelineView.prototype._hoveredOrSelectedRecord): Show a highlight for what we are hovering, or what is selected. Note the selected node may not be visible due to filtering. (WebInspector.LayoutTimelineView.prototype._mouseOverDataGrid): (WebInspector.LayoutTimelineView.prototype._mouseLeaveDataGrid): (WebInspector.LayoutTimelineView.prototype._mouseOverTreeOutline): (WebInspector.LayoutTimelineView.prototype._mouseLeaveTreeOutline): Update hovered information mousing over the datagrid and tree outline. * UserInterface/Views/TimelineContentView.js: (WebInspector.TimelineContentView.prototype.filterDidChange): * UserInterface/Views/TimelineSidebarPanel.js: (WebInspector.TimelineSidebarPanel.prototype.updateFilter): * UserInterface/Views/TimelineView.js: (WebInspector.TimelineView.prototype.filterDidChange): Include a "filterDidChange" TimelineView method that gets called after updateFilter (things like the filter bar or timeline range changes). * UserInterface/Views/TreeOutline.js: (TreeOutline.prototype.treeElementFromNode): (TreeOutline.prototype.treeElementFromPoint): Provide a helper to get a tree element from an event target. 2015-01-13 Joseph Pecoraro Web Inspector: TextEditor doesn't update when resizing console, white space instead of content https://bugs.webkit.org/show_bug.cgi?id=140240 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WebInspector._consoleResizerMouseDown.dockedResizerDrag): Dispatch the event that signals the console has changed size. 2015-01-13 Joseph Pecoraro Web Inspector: I do not expect to see the same rule multiple times in styles sidebar https://bugs.webkit.org/show_bug.cgi?id=138185 Reviewed by Timothy Hatcher. In the styles sidebar, don't show a duplicate, lesser-specificity rule even if it matches the selected element multiple times with different selectors in the list. * UserInterface/Models/CSSRule.js: (WebInspector.CSSRule.prototype.isEqualTo): CSSRule identifiers are objects. * UserInterface/Views/RulesStyleDetailsPanel.js: (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Remove duplicates from the ordered list of style declarations. 2015-01-12 Jonathan Wells Web Inspector: Timeline: when Network Requests view is selected, in progress requests are absent. https://bugs.webkit.org/show_bug.cgi?id=140090 Reviewed by Timothy Hatcher. TimelineContentView#_updateTimes() changed to call WebInspector.timelineSidebarPanel.updateFilter() in addition to updating the layout of the current timeline view. TimelineSidebarPanel.updateFilter() now responsible for updating filtered resources in a TimelineView. * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel.prototype._updateFilter): Now handles updating the UI associated with filtering of navigation sidebar tree elements. * UserInterface/Views/OverviewTimelineView.js: (WebInspector.OverviewTimelineView.prototype.updateLayout): No longer handles updating other UI along with the navigation sidebar tree elements. That is now handled by WebInspector.TimelineView.prototype.filterUpdated. (WebInspector.OverviewTimelineView.prototype._compareTreeElementsByDetails): Drive-by fix. Missing vars. * UserInterface/Views/TimelineContentView.js: (WebInspector.TimelineContentView.prototype._updateTimes): Add call to updateFilter(). * UserInterface/Views/TimelineView.js: (WebInspector.TimelineView.prototype.filterUpdated): Function added to dispatch a SelectionPathComponentsDidChange event. 2015-01-09 Enrica Casucci [iOS] Support additional text styles. https://bugs.webkit.org/show_bug.cgi?id=140310 rdar://problem/18568864 Reviewed by Joseph Pecoraro. Add support for three new text styles. * UserInterface/Models/CSSKeywordCompletions.js: 2015-01-09 Timothy Hatcher Web Inspector: REGRESSION: Navigation sidebar can show blank next to the Console view https://bugs.webkit.org/show_bug.cgi?id=140291 Reviewed by Joseph Pecoraro. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): Don't restore collapsed false if selectedSidebarPanel is null. (WebInspector._sidebarCollapsedStateDidChange): Support a _ignoreNavigationSidebarPanelCollapsedEvent flag to avoid setting _navigationSidebarCollapsedSetting. (WebInspector._navigationSidebarPanelSelected): Force collapsed if selectedSidebarPanel is null. (WebInspector._contentBrowserCurrentContentViewDidChange): Set _ignoreNavigationSidebarPanelCollapsedEvent when forcing the collapsed state to avoid setting _navigationSidebarCollapsedSetting and calling _updateContentViewForCurrentNavigationSidebar. 2015-01-08 Nikita Vasilyev Web Inspector: REGRESSION Showing debugger sidebar shouldn't change selected JS file https://bugs.webkit.org/show_bug.cgi?id=139526 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): When switching to Debugger, show last selected JS or HTML resource. (WebInspector.showSplitConsole): (WebInspector.showFullHeightConsole): (WebInspector.toggleConsoleView): (WebInspector._sidebarCollapsedStateDidChange): (WebInspector._updateContentViewForCurrentNavigationSidebar): (WebInspector._navigationSidebarPanelSelected): (WebInspector._contentBrowserCurrentContentViewDidChange): (WebInspector._updateNavigationSidebarForCurrentContentView): Deleted. * UserInterface/Views/ApplicationCacheFrameContentView.js: (WebInspector.ApplicationCacheFrameContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/CookieStorageContentView.js: (WebInspector.CookieStorageContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/DOMStorageContentView.js: (WebInspector.DOMStorageContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/DOMTreeContentView.js: (WebInspector.DOMTreeContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/DatabaseContentView.js: (WebInspector.DatabaseContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/DatabaseTableContentView.js: (WebInspector.DatabaseTableContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/FontResourceContentView.js: (WebInspector.FontResourceContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/FrameDOMTreeContentView.js: (WebInspector.FrameDOMTreeContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/ResourceClusterContentView.js: (WebInspector.ResourceClusterContentView.prototype.get allowedNavigationSidebarPanels): * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView): (WebInspector.ResourceSidebarPanel.prototype.showMainFrame): * UserInterface/Views/Sidebar.js: (WebInspector.Sidebar.prototype.removeSidebarPanel): * UserInterface/Views/TimelineContentView.js: (WebInspector.TimelineContentView.prototype.get allowedNavigationSidebarPanels): 2015-01-08 Joseph Pecoraro Web Inspector: Phantom breakpoint appears on empty line after reload of minified file with a breakpoint https://bugs.webkit.org/show_bug.cgi?id=140276 Reviewed by Timothy Hatcher. Styles being set on lines (e.g. breakpoint styles) before content loaded can carry forward with the empty line. It is safe for us to just remove all the styles from the intial empty line before we load the initial content. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype.set string.update): (WebInspector.TextEditor.prototype.set string): 2015-01-08 Joseph Pecoraro Web Inspector: Pause Reason Improvements (Breakpoint, Debugger Statement, Pause on Next Statement) https://bugs.webkit.org/show_bug.cgi?id=138991 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: New UI strings for Pause Reasons. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.breakpointForIdentifier): Provide a way to get the breakpoint with an identifier. * UserInterface/Images/PausedBreakpoint.svg: Added. * UserInterface/Images/gtk/PausedBreakpoint.svg: Added. Copy PseudoElement.svg icon and give it a new name. * UserInterface/Views/BreakpointTreeElement.css: (.breakpoint-paused-icon .icon): New icon for a breakpoint causing a pause. * UserInterface/Views/BreakpointTreeElement.js: (WebInspector.BreakpointTreeElement.prototype.removeStatusImage): (WebInspector.BreakpointTreeElement.prototype._updateStatus): Give API to remove the breakpoint status icon from a BreakpointTreeElement. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): (WebInspector.DebuggerSidebarPanel.prototype.get hasSelectedElement): (WebInspector.DebuggerSidebarPanel.prototype.deselectBreakpointContentTreeElements): (WebInspector.DebuggerSidebarPanel.prototype.deselectPauseReasonContentTreeElements): (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected): Give DebuggerSidebarPanel an optional pause reason tree outline. When available include it in the pattern of ensuring a single exclusive selection. (WebInspector.DebuggerSidebarPanel.prototype._breakpointRemoved): When a breakpoint is removed, check if we should update the pause reason tree outline. (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReason): (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection): Update Pause Reason section contents depending on the reason. (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonGotoArrow): Always try to include a goto arrow to jump to the original pause location if it is available at the time of pausing. 2015-01-08 Joseph Pecoraro Web Inspector: Expected UserAgent styles to be crossed-out if overridden https://bugs.webkit.org/show_bug.cgi?id=140154 Reviewed by Timothy Hatcher. * UserInterface/Models/DOMNodeStyles.js: (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Add a comment about anonymous styles. The getter is no longer used, and it is not clear if we really care about this state, or if "anonymous" is an appropriate name. (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Allow browser styles (user agent / html attributes) to be overridden. (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): When refreshing styles after changes, the Style object backing HTML attributes was being completely replaced. Allow it to be remembered by a unique key. 2015-01-07 Joseph Pecoraro Web Inspector: Do not create rulesMap entries for rules without identifiers https://bugs.webkit.org/show_bug.cgi?id=140237 Reviewed by Timothy Hatcher. * UserInterface/Models/DOMNodeStyles.js: (WebInspector.DOMNodeStyles.prototype._parseRulePayload): We were accidentally converting a null into a string with a loose string concatenation. Only do this if the mapKey is not-null. 2015-01-07 Saam Barati Web Inspector: Abstract common functions from TypeTokenAnnotator into a parent class and introduce an AnnotatorManager https://bugs.webkit.org/show_bug.cgi?id=139426 Reviewed by Timothy Hatcher. This patch creates a parent class, Annotator, that TypeTokenAnnotator inherits from. Annotator defines a common set of functionality that a text editor annotator can use to mark up UI. This is in preparation other classes that will inherit from Annotator. This patch also introduces AnnotatorManager which controls a set of Annotators and provides a single interface for controlling them. * UserInterface/Controllers/Annotator.js: Added. (WebInspector.Annotator): (WebInspector.Annotator.prototype.get sourceCodeTextEditor): (WebInspector.Annotator.prototype.get isActive): (WebInspector.Annotator.prototype.pause): (WebInspector.Annotator.prototype.resume): (WebInspector.Annotator.prototype.refresh): (WebInspector.Annotator.prototype.reset): (WebInspector.Annotator.prototype.clear): (WebInspector.Annotator.prototype.insertAnnotations): (WebInspector.Annotator.prototype.clearAnnotations): (WebInspector.Annotator.prototype._clearTimeoutIfNeeded): * UserInterface/Controllers/AnnotatorManager.js: Added. (WebInspector.AnnotatorManager): (WebInspector.AnnotatorManager.prototype.addAnnotator): (WebInspector.AnnotatorManager.prototype.isAnnotatorActive): (WebInspector.AnnotatorManager.prototype.pauseAll): (WebInspector.AnnotatorManager.prototype.resumeAll): (WebInspector.AnnotatorManager.prototype.refreshAllIfActive): (WebInspector.AnnotatorManager.prototype.resetAllIfActive): (WebInspector.AnnotatorManager.prototype.clearAll): (WebInspector.AnnotatorManager.prototype.removeAllAnnotators): (WebInspector.AnnotatorManager.prototype._getAnnotators): * UserInterface/Controllers/TypeTokenAnnotator.js: (WebInspector.TypeTokenAnnotator): (WebInspector.TypeTokenAnnotator.prototype.insertAnnotations.): (WebInspector.TypeTokenAnnotator.prototype.clearAnnotations): (WebInspector.TypeTokenAnnotator.prototype._insertToken): (WebInspector.TypeTokenAnnotator.prototype.get isActive): Deleted. (WebInspector.TypeTokenAnnotator.prototype.get sourceCodeTextEditor): Deleted. (WebInspector.TypeTokenAnnotator.prototype.pause): Deleted. (WebInspector.TypeTokenAnnotator.prototype.resume): Deleted. (WebInspector.TypeTokenAnnotator.prototype.refresh): Deleted. (WebInspector.TypeTokenAnnotator.prototype.reset): Deleted. (WebInspector.TypeTokenAnnotator.prototype._insertAnnotations.): Deleted. (WebInspector.TypeTokenAnnotator.prototype._clearTimeoutIfNeeded): Deleted. * UserInterface/Main.html: * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor): (WebInspector.SourceCodeTextEditor.prototype.shown): (WebInspector.SourceCodeTextEditor.prototype.hidden): (WebInspector.SourceCodeTextEditor.prototype.canShowTypeAnnotations): (WebInspector.SourceCodeTextEditor.prototype.contentDidChange): (WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations): (WebInspector.SourceCodeTextEditor.prototype.prettyPrint): (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause): (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume): (WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState): (WebInspector.SourceCodeTextEditor.prototype._getAssociatedScript): (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenAnnotator): (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler): (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler): 2015-01-06 Joseph Pecoraro Web Inspector: Do not style implicit CSS properties in the Style Rules section https://bugs.webkit.org/show_bug.cgi?id=140161 Reviewed by Timothy Hatcher. Previously, implicit properties being transparent in the Rules section was confusing and not useful. Lets simplify what transparency means: - Rules: transparency means a non-inheritable property in an inherited rule - Computed: transparency means an implicit value * UserInterface/Views/CSSStyleDeclarationTextEditor.css: (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited): (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.implicit, .not-inherited)): Deleted. 2015-01-06 Joseph Pecoraro Web Inspector: Uncaught Exception when dismissing Go To Line dialog https://bugs.webkit.org/show_bug.cgi?id=139663 Reviewed by Timothy Hatcher. Calling removeChild would trigger the blur event handler and do a nested call of dismiss(), re-entering and removing while in the middle of removing. Avoid re-entrancy to avoid the exception. * UserInterface/Views/GoToLineDialog.js: (WebInspector.GoToLineDialog): (WebInspector.GoToLineDialog.prototype.dismiss): 2015-01-01 Darin Adler We often misspell identifier as "identifer" https://bugs.webkit.org/show_bug.cgi?id=140025 Reviewed by Michael Saboff. * UserInterface/Base/Main.js: (WebInspector._updateNavigationSidebarForCurrentContentView): (WebInspector._contentBrowserCurrentContentViewDidChange): Fix misspellings. 2014-12-29 Jonathan Wells Web Inspector: SourceCode.requestContent should return a promise https://bugs.webkit.org/show_bug.cgi?id=135777 Reviewed by Brian Burg. Change SourceCode.js to request content from the backend using Promises. Change Resource.js to use this new approach when determining whether a resource load has finished. Change all calls to the older SourceCode#requestContentFromBackendIfNeeded to simply use requestContent and use a catch function if a content request error needs to be handled. Fix a bug where the appropriate error message for an invalid resource wasn't showing in the resource content view. * UserInterface/Controllers/AnalyzerManager.js: (set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode.): (set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode): * UserInterface/Controllers/CSSStyleManager.js: (WebInspector.CSSStyleManager.prototype._updateResourceContent.fetchedStyleSheetContent): (WebInspector.CSSStyleManager.prototype._updateResourceContent.styleSheetReady): * UserInterface/Models/CSSStyleSheet.js: (WebInspector.CSSStyleSheet.prototype.requestContentFromBackend): (WebInspector.CSSStyleSheet.prototype.canRequestContentFromBackend): Deleted. * UserInterface/Models/DOMNodeStyles.js: (WebInspector.DOMNodeStyles.prototype.changeStyleText): * UserInterface/Models/Resource.js: (WebInspector.Resource.prototype.canRequestContent): (WebInspector.Resource.prototype.requestContentFromBackend): (WebInspector.Resource.prototype.markAsFinished): (WebInspector.Resource.prototype.markAsFailed): (WebInspector.Resource.prototype.getImageSize): (WebInspector.Resource.prototype.canRequestContentFromBackend): Deleted. * UserInterface/Models/Script.js: (WebInspector.Script.prototype.requestContentFromBackend): (WebInspector.Script.prototype.requestScriptSyntaxTree.catch): (WebInspector.Script.prototype.canRequestContentFromBackend): Deleted. * UserInterface/Models/SourceCode.js: (WebInspector.SourceCode): (WebInspector.SourceCode.prototype.requestContent): (WebInspector.SourceCode.prototype.requestContentFromBackend): (WebInspector.SourceCode.prototype._processContent): (WebInspector.SourceCode.prototype.canRequestContentFromBackend): Deleted. (WebInspector.SourceCode.prototype.requestContentFromBackendIfNeeded): Deleted. (WebInspector.SourceCode.prototype.servicePendingContentRequests): Deleted. * UserInterface/Models/SourceMapResource.js: (WebInspector.SourceMapResource): (WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoadError): (WebInspector.SourceMapResource.prototype.requestContentFromBackend): (WebInspector.SourceMapResource.prototype.canRequestContentFromBackend): Deleted. (WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoaded): Deleted. * UserInterface/Views/ResourceContentView.js: (WebInspector.ResourceContentView): (WebInspector.ResourceContentView.prototype._contentAvailable): (WebInspector.ResourceContentView.prototype._contentError): * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor): (WebInspector.SourceCodeTextEditor.prototype._contentAvailable): (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable): (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent): (WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent): 2014-12-26 Dan Bernstein REGRESSION (r177027): iOS builds use the wrong toolchain https://bugs.webkit.org/show_bug.cgi?id=139950 Reviewed by David Kilzer. * Configurations/Base.xcconfig: Only define TOOLCHAINS when building for OS X, doing so in a manner that works with Xcode 5.1.1. 2014-12-20 David Kilzer Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: - Only set TOOLCHAINS on OS X. * Configurations/DebugRelease.xcconfig: - Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X. * Configurations/Version.xcconfig: - Set SYSTEM_VERSION_PREFIX separately for iOS and OS X. * Configurations/WebInspectorUIFramework.xcconfig: - Set NORMAL_PRODUCTION_FRAMEWORKS_DIR, PRODUCTION_FRAMEWORKS_DIR and JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production by SDK. 2014-12-19 Commit Queue Unreviewed, rolling out r177574. https://bugs.webkit.org/show_bug.cgi?id=139821 "Broke Production builds by installing libWebCoreTestSupport.dylib in the wrong directory" (Requested by ddkilzer on #webkit). Reverted changeset: "Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2" https://bugs.webkit.org/show_bug.cgi?id=139463 http://trac.webkit.org/changeset/177574 2014-12-19 David Kilzer Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: - Only set TOOLCHAINS on OS X. * Configurations/DebugRelease.xcconfig: - Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X. * Configurations/Version.xcconfig: - Set SYSTEM_VERSION_PREFIX separately for iOS and OS X. * Configurations/WebInspectorUIFramework.xcconfig: - Set NORMAL_PRODUCTION_FRAMEWORKS_DIR, PRODUCTION_FRAMEWORKS_DIR and JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production by SDK. 2014-12-16 Matt Baker Web Inspector: REGRESSION: Dragging undocked web inspector causes mouse to change from pointer to i-bar cursor over window title https://bugs.webkit.org/show_bug.cgi?id=139720 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: Prevent default handling of the mouse event when clicking in the titlebar area. WebCore won't continue handling the event, but docking buttons/context menu still function. 2014-12-15 Nikita Vasilyev Web Inspector: Clicking on the expand object arrow should always expand an object https://bugs.webkit.org/show_bug.cgi?id=139382 Reviewed by Joseph Pecoraro. * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView): (WebInspector.LogContentView.prototype._click): Deleted. stopPropagation was preventing the object expansion from happening as expecting. 2014-12-15 Joseph Pecoraro Web Inspector: CSSStyleDeclarationTextEditor fails to update if computed properties changed from empty to non-empty https://bugs.webkit.org/show_bug.cgi?id=139610 Reviewed by Timothy Hatcher. The CSSStyleDeclarationTextEditor for Computed Style Properties always has empty DOMNodeStyles text. However we would not reset contents if properties changed and the actualy content was empty. So once empty, we could never recover. In fact, we should always refresh for Computed Styles. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged): 2014-12-08 Joseph Pecoraro Web Inspector: Hide Compositing Borders Button if backend returns an error that it is unsupported https://bugs.webkit.org/show_bug.cgi?id=139307 Reviewed by Darin Adler. * UserInterface/Views/DOMTreeContentView.js: (WebInspector.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings): 2014-12-05 Joseph Pecoraro Web Inspector: Uncaught Exceptions when attempting to show Content Flow https://bugs.webkit.org/show_bug.cgi?id=139276 Reviewed by Brian Burg. * UserInterface/Views/ContentView.js: (WebInspector.ContentView): (WebInspector.ContentView.isViewable): LegacyJavaScriptProfileObject no longer exists, these references should be removed. * UserInterface/Views/FolderizedTreeElement.js: (WebInspector.FolderizedTreeElement.prototype._insertChildTreeElement): This sort function references "this" and needed to be bound. 2014-12-04 Joseph Pecoraro Web Inspector: Network Timeline Filter Bar only has "All", missing Resource Type filters https://bugs.webkit.org/show_bug.cgi?id=139268 Reviewed by Brian Burg. * UserInterface/Views/TimelineDataGrid.js: (WebInspector.TimelineDataGrid.createColumnScopeBar): Users of createColumnScopeBar pass a Map object now instead of a dictionary. Iterate over the map appropriately. 2014-12-04 Joseph Pecoraro Web Inspector: LayoutTests/inspector tests fail in Production builds due to missing test resources https://bugs.webkit.org/show_bug.cgi?id=138898 Reviewed by Mark Rowe. In Production builds, if FORCE_TOOL_INSTALL=YES is in the environment we will copy all resources (for Tests) and still do the combine and optimize phase for normal Production inspection resources. * Scripts/copy-user-interface-resources.pl: 2014-12-03 Joseph Pecoraro Web Inspector: Missing getter, clients never see DragToAdjustController is enabled https://bugs.webkit.org/show_bug.cgi?id=139228 Reviewed by Simon Fraser. * UserInterface/Controllers/DragToAdjustController.js: (WebInspector.DragToAdjustController.prototype.get enabled): 2014-12-02 Joseph Pecoraro Web Inspector: CSS Minification breaks some selectors with colons https://bugs.webkit.org/show_bug.cgi?id=139206 Reviewed by Simon Fraser. Do not remove spaces preceeding colons, as they may change the semantics of selectors with colon prefixes (e.g. "a :not(b)"). At the same time, we can strip spaces around "!" characters, for example a space is not required before "!important" priority. * Scripts/cssmin.py: (cssminify): 2014-12-01 Benjamin Poulain Web Inspector: add more :not() and :matches() awesomeness https://bugs.webkit.org/show_bug.cgi?id=138997 Reviewed by Joseph Pecoraro. Simplify the Inspector's CSS when possible. * UserInterface/Views/DatabaseContentView.css: (:matches(.database-user-query, .database-query-prompt, .database-query-result)::before): (.database-user-query::before, .database-query-prompt::before, .database-query-result::before): Deleted. * UserInterface/Views/GradientSlider.css: (.gradient-slider-knob > :matches(img, div)): (.gradient-slider-knob > div): Deleted. * UserInterface/Views/HoverMenu.css: (.hover-menu > svg > :matches(path, rect)): (.hover-menu > svg > rect): Deleted. * UserInterface/Views/LayerTreeDetailsSidebarPanel.css: (.panel.details.layer-tree .name-column :matches(.pseudo-element, .reflection)): (.panel.details.layer-tree tr.selected .name-column :matches(.pseudo-element, .reflection)): (.panel.details.layer-tree .name-column .reflection): Deleted. (.panel.details.layer-tree tr.selected .name-column .reflection): Deleted. * UserInterface/Views/ProbeDetailsSidebarPanel.css: (.details-section.probe-set .options > :matches(.probe-remove, .probe-clear-samples, .probe-add)): (.details-section.probe-set .options > .probe-add): Deleted. * UserInterface/Views/ResourceSidebarPanel.css: (.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)): (body.mac-platform.legacy .sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)): (.sidebar > .panel.navigation.resource > .empty-content-placeholder): Deleted. (body.mac-platform.legacy .sidebar > .panel.navigation.resource > .empty-content-placeholder): Deleted. * UserInterface/Views/ScopeBar.css: (.scope-bar > li:matches(.selected, :active)): (.scope-bar > li:active): Deleted. * UserInterface/Views/SyntaxHighlightingDefaultTheme.css: (.syntax-highlighted :matches(.css-comment, .javascript-comment, .html-comment)): (.syntax-highlighted :matches(.css-keyword, .css-tag, .css-at-rule, .css-important, .javascript-keyword, .html-tag)): (.syntax-highlighted :matches(.css-number, .javascript-number)): (.syntax-highlighted :matches(.css-property, .css-selector, .javascript-ident)): (.syntax-highlighted :matches(.css-string, .javascript-string, .javascript-regexp, .html-attribute-value)): (.syntax-highlighted :matches(.html-doctype, .html-processing-instruction)): (.syntax-highlighted .html-comment): Deleted. (.syntax-highlighted .html-tag): Deleted. (.syntax-highlighted .javascript-number): Deleted. (.syntax-highlighted .javascript-ident): Deleted. (.syntax-highlighted .html-attribute-value): Deleted. (.syntax-highlighted .html-processing-instruction): Deleted. It looks like ".cm-tag.cm-bracket" was there only to override the rule below. From basic testing, it looks like "cm-tag" and "cm-bracket" always appear together. I removed the "cm-bracket" rule from the second rule, and simplified the first rule. * UserInterface/Views/TimelineSidebarPanel.css: (body.mac-platform.legacy .sidebar > .panel.navigation.timeline > :matches(.content, .empty-content-placeholder)): (body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .empty-content-placeholder): Deleted. * UserInterface/Views/Toolbar.css: (body.mac-platform:not(.legacy, .docked) .toolbar): (body.mac-platform:not(.legacy, .docked) .toolbar.icon-and-label-vertical): (body.mac-platform:not(.legacy, .docked) .toolbar.icon-and-label-vertical.small-size): (body.mac-platform:not(.legacy, .docked) .toolbar:matches(.icon-and-label-horizontal, .icon-only)): (body.mac-platform:not(.legacy, .docked) .toolbar:matches(.icon-and-label-horizontal.small-size, .icon-only.small-size, .label-only)): (.toolbar:matches(.icon-and-label-horizontal.small-size, .icon-only.small-size, .label-only) .control-section): (body.mac-platform:not(.legacy):not(.docked) .toolbar): Deleted. (body.mac-platform:not(.legacy):not(.docked) .toolbar.icon-and-label-vertical): Deleted. (body.mac-platform:not(.legacy):not(.docked) .toolbar.icon-and-label-vertical.small-size): Deleted. (body.mac-platform:not(.legacy):not(.docked) .toolbar.icon-only): Deleted. (body.mac-platform:not(.legacy):not(.docked) .toolbar.label-only): Deleted. (.toolbar.label-only .control-section): Deleted. 2014-11-27 Andres Gomez Web Inspector: Update NavigationItemProbes icon for the GTK+ port https://bugs.webkit.org/show_bug.cgi?id=139074 Reviewed by Carlos Garcia Campos. NavigationItemProbes was updated for the Mac port and we are now having a similar ideogram in GTK+. * UserInterface/Images/gtk/NavigationItemProbes.svg: Updated. 2014-11-21 Benjamin Poulain Start using the new :not() and :matches() in the Web Inspector https://bugs.webkit.org/show_bug.cgi?id=138978 Reviewed by Joseph Pecoraro. Start simpifying some definitions by using modern CSS. * UserInterface/Views/CSSStyleDeclarationSection.css: (body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:matches(.last-in-group, :last-child)): (.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector): (body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:last-child): Deleted. (.style-declaration-section.selector-locked > .header > .selector): Deleted. * UserInterface/Views/CSSStyleDeclarationTextEditor.css: (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.disabled, .invalid, .other-vendor, .not-inherited, .overridden)): (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.implicit, .not-inherited)): (.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property:matches(.disabled, .other-vendor, .not-inherited, .overridden)): (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.overridden): Deleted. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited): Deleted. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.overridden): Deleted. * UserInterface/Views/ControlToolbarItem.css: (.toolbar:matches(.icon-and-label-horizontal, .toolbar.icon-only) .item.control): (.toolbar.icon-only .item.control): Deleted. * UserInterface/Views/DOMStorageContentView.css: * UserInterface/Views/DashboardContainerView.css: (.toolbar.icon-and-label-vertical:matches(.small-size, .normal-size) .dashboard-container): (.toolbar:matches(.label-only, .small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal)) .dashboard-container): (.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard-container): (.toolbar.normal-size.icon-and-label-vertical .dashboard-container): Deleted. (.toolbar.small-size.icon-and-label-horizontal .dashboard-container): Deleted. (.toolbar.normal-size.icon-and-label-horizontal .dashboard-container): Deleted. * UserInterface/Views/DataGrid.css: (.data-grid :matches(th, td):not(:last-child)): (.data-grid th:matches(.sort-ascending, .sort-descending)): (.data-grid :matches(th, td) > div): (.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child): (.data-grid tr:matches(.selected, :hover) .go-to-arrow): (.data-grid :-webkit-any(th, td):not(:last-child)): Deleted. (.data-grid th:-webkit-any(.sort-ascending, .sort-descending)): Deleted. (.data-grid :-webkit-any(th, td) > div): Deleted. (.data-grid th:-webkit-any(.sort-ascending, .sort-descending) > div:first-child): Deleted. (.data-grid tr:-webkit-any(.selected, :hover) .go-to-arrow): Deleted. * UserInterface/Views/DebuggerDashboardView.css: (.toolbar.collapsed .dashboard.debugger > :not(.message, .navigation-bar )): (.toolbar.collapsed .dashboard.debugger > :not(.message):not(.navigation-bar )): Deleted. * UserInterface/Views/DefaultDashboardView.css: (body.web .toolbar.collapsed .dashboard.default > :matches(.time, .resourcesSize, .logs)): (body.javascript .toolbar .dashboard.default > :matches(.time, .resourcesSize, .resourcesCount)): (.toolbar:matches(.label-only, .small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal)) .dashboard.default > .item): (.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard.default > .item): (body.web .toolbar.collapsed .dashboard.default > .logs): Deleted. (body.javascript .toolbar .dashboard.default > .resourcesCount): Deleted. (.toolbar.small-size.icon-and-label-horizontal .dashboard.default > .item): Deleted. (.toolbar.normal-size.icon-and-label-horizontal .dashboard.default > .item): Deleted. * UserInterface/Views/DetailsSection.css: (.details-section > .header > :matches(.node-link, .go-to-arrow)): (.details-section > .content > .group:nth-child(even) > .row:matches(.simple:first-child > *, :not(.simple):first-child)): (body.mac-platform.legacy .details-section > .content > .group:matches(:nth-child(even), :last-child) > .row.simple:last-child > *): (.details-section > .content > .group > .row:matches(.empty, .text)): (body.mac-platform.legacy .details-section > .content > .group > .row:matches(.empty, .text)): (.details-section > .header > .go-to-arrow): Deleted. (.details-section > .content > .group:nth-child(even) > .row.simple:first-child > *): Deleted. (body.mac-platform.legacy .details-section > .content > .group:last-child > .row.simple:last-child > *): Deleted. (.details-section > .content > .group > .row.text): Deleted. (body.mac-platform.legacy .details-section > .content > .group > .row.text): Deleted. * UserInterface/Views/FindBanner.css: (:matches(.find-banner, .supports-find-banner).no-find-banner-transition): (.supports-find-banner.no-find-banner-transition): Deleted. * UserInterface/Views/FlexibleSpaceNavigationItem.css: (:matches(.navigation-bar, .toolbar) .item.flexible-space): (.toolbar .item.flexible-space): Deleted. 2014-11-19 Joseph Pecoraro Web Inspector: LayoutTests/inspector should not have localStorage side effects https://bugs.webkit.org/show_bug.cgi?id=138895 Reviewed by Brian Burg. When running inspector tests, do not restore/save WebInspector.Settings to localStorage, as that will cause side effects. Instead each Setting will be initialized with its default value and can be modified during the run of the test. * UserInterface/Base/Test.js: (WebInspector.loaded): Name the setting to match the normal setting name now that persistence is not an issue. * UserInterface/Models/Setting.js: (WebInspector.Setting.prototype.get value): (WebInspector.Setting.prototype.set value): Do not restore/save when in tests. 2014-11-19 Joseph Pecoraro Web Inspector: JSContext inspection Resource search does not work https://bugs.webkit.org/show_bug.cgi?id=131252 Reviewed by Timothy Hatcher. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype.performSearch.resourceCallback): (WebInspector.ResourceSidebarPanel.prototype.performSearch.resourcesCallback): Cleanup by reordering things a bit. (WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts.scriptCallback): (WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts): (WebInspector.ResourceSidebarPanel.prototype.performSearch): Search non-resource scripts individually. (WebInspector.ResourceSidebarPanel.prototype._searchTreeElementForScript): Lazily create a ScriptTreeElement for the search tree outline as needed. (WebInspector.ResourceSidebarPanel.prototype._scriptsToSearch): When searching scripts, just perform a shallow walk of the tree outline to find Script resources that are not also Resources. Scripts are always guarenteed to be in a folder when inspecting a web resource. For JSContext inspection, scripts are promoted to the top level. * UserInterface/Main.html: * UserInterface/Models/SourceCodeSearchMatchObject.js: Renamed from Source/WebInspectorUI/UserInterface/Models/ResourceSearchMatchObject.js. (WebInspector.SourceCodeSearchMatchObject): * UserInterface/Views/SearchIcons.css: (.source-code-match-icon .icon): (.resource-match-icon .icon): Deleted. * UserInterface/Views/SearchResultTreeElement.js: (WebInspector.SearchResultTreeElement): Rename ResourceSearchMatchObject to SourceCodeSearchMatchObject. 2014-11-19 Joseph Pecoraro Web Inspector: Provide $exception in the console for the thrown exception value https://bugs.webkit.org/show_bug.cgi?id=138726 Reviewed by Timothy Hatcher. * UserInterface/Base/Test.js: (WebInspector.loaded): In order to use RuntimeManager to execute in the global context or on the active debugger call frame, we need to expose the quickConsole controller. * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: Expose $exception to completion when we paused because of an exception. 2014-11-19 Joseph Pecoraro Web Inspector: Debugger should not mutate variable when hovering mouse over ++n expression https://bugs.webkit.org/show_bug.cgi?id=138839 Reviewed by Timothy Hatcher. * UserInterface/Controllers/CodeMirrorTokenTrackingController.js: (WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression): 2014-11-19 Joseph Pecoraro Web Inspector: Improve basic JavaScript completion in inline