blob: fb82b37dcf1da834fcb81343916c4486cbb8b53f [file] [log] [blame]
2013-06-10 Timothy Hatcher <timothy@apple.com>
Remove Xcode 4 skin and only have the Xcode 5 look.
Reviewed by Joseph Pecoraro.
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar .item.button.suppress-emboss.disabled > .glyph):
* UserInterface/CodeMirrorOverrides.css:
* UserInterface/DashboardView.css:
(.toolbar .dashboard):
(body.window-inactive .toolbar .dashboard):
(.toolbar.collapsed .dashboard):
(.toolbar.collapsed .dashboard > .logs):
* UserInterface/DashboardView.js:
(WebInspector.DashboardView):
(WebInspector.DashboardView.prototype._setItemEnabled):
* UserInterface/DetailsSection.css:
* UserInterface/DividerNavigationItem.css:
(.navigation-bar .item.divider):
* UserInterface/FilterBar.css:
(.filter-bar > input[type="search"]):
(.filter-bar > input[type="search"]::-webkit-input-placeholder):
(.filter-bar > input[type="search"]:valid):
* UserInterface/FindBanner.css:
(.find-banner > input[type="search"]):
(.find-banner > button):
* UserInterface/HierarchicalPathComponent.css:
* UserInterface/InstrumentSidebarPanel.css:
* UserInterface/LayerTreeSidebarPanel.css:
* UserInterface/Main.css:
(#split-content-browser > .navigation-bar):
* UserInterface/NavigationBar.css:
* UserInterface/NavigationSidebarPanel.css:
* UserInterface/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only.selected):
* UserInterface/ResourceSidebarPanel.css:
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
* UserInterface/ScopeBar.css:
(.scope-bar > li):
(.scope-bar > li:active):
(.scope-bar > li:hover):
(.scope-bar > li.selected):
* UserInterface/SearchBar.css:
(.search-bar > input[type="search"]):
(.search-bar > input[type="search"]::-webkit-input-placeholder):
(.search-bar > input[type="search"]:valid):
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
2013-06-08 Timothy Hatcher <timothy@apple.com>
Improve switching from the full view console to the Resource sidebar, so the previous resource is shown in the content browser again.
Also cleans up my earlier changes and removes an assert that can fire often now.
<rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.showFullHeightConsole):
(WebInspector._sidebarCollapsedStateDidChange): Call _updateNavigationSidebarForCurrentContentView for the navigation sidebar.
(WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Only do this work if the sidebar is not collapsed. We don't
want to deselect items if the sidebar is collapsed, preserving the selection is important when showing the sidebar later.
(WebInspector._updateNavigationSidebarForCurrentContentView): Added. Split off from _navigationSidebarPanelSelected. Only do this work
if the sidebar is not collapsed.
(WebInspector._navigationSidebarPanelSelected): Call _updateNavigationSidebarForCurrentContentView.
(WebInspector._contentBrowserCurrentContentViewDidChange): Clean up by returning early if there is no current content view.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Remove an assert that can happen a lot now.
2013-06-07 Antoine Quint <graouts@apple.com>
<rdar://problem/14094308> Styles should come before Layers details sidebar
Switch Layers and Styles.
Reviewed by Timothy Hatcher.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel):
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2013-06-07 Timothy Hatcher <timothy@apple.com>
Keep the selected tree element in sync with the current content view.
<rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Added.
(WebInspector._navigationSidebarPanelSelected): Call _revealAndSelectRepresentedObjectInNavigationSidebar.
(WebInspector._contentBrowserCurrentContentViewDidChange): Ditto.
2013-06-07 Timothy Hatcher <timothy@apple.com>
Keep the navigation sidebar and the current content view in sync with a set of allowed sidebars per content view.
<rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
Reviewed by Antoine Quint.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get allowedNavigationSidebarPanels): Added.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.get allowedNavigationSidebarPanels): Added.
* UserInterface/Main.js:
(WebInspector.showSplitConsole): Show the navigation sidebar if it was showing.
(WebInspector.showFullHeightConsole): Hide the navigation sidebar and remember if it was showing.
(WebInspector.toggleConsoleView): Show the sidebar if it was showing.
(WebInspector._navigationSidebarPanelSelected): Ensure the navigation sidebar panel is allowed by the current content view.
(WebInspector._contentBrowserCurrentContentViewDidChange): Ditto.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.showContentViewForCurrentSelection):
(WebInspector.NavigationSidebarPanel.prototype.shown):
* UserInterface/ProfileView.js:
(WebInspector.ProfileView.prototype.get allowedNavigationSidebarPanels): Added.
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.get allowedNavigationSidebarPanels): Added.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype.get allowedNavigationSidebarPanels): Added.
2013-06-06 Timothy Hatcher <timothy@apple.com>
Properly filter into resources with a source map if they haven't been expanded yet.
<rdar://problem/14072548> Resources filter shows "No Filter Results" after reload with SourceMaps
Reviewed by Joseph Pecoraro.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Pass false to
traverseNextTreeElement to cause the tree elements to be populated. This matches the interactive
case when typing into the filter bar, which already worked with source maps.
2013-06-05 Antoine Quint <graouts@apple.com>
<rdar://problem/14077407> Jumping to an error in a JS file form the console highlights to white first before going back to red
Remove the explicit ÒtoÓ color in the CSS animation we use to highlight a link
in the text editor as it is revealed, which means the ÒtoÓ color will be the
underlying color set on the element. This will animate to red for errors,
yellow for warnings, and transparent for regular lines.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.css:
(@-webkit-keyframes text-editor-highlight-fadeout):
2013-06-05 Antoine Quint <graouts@apple.com>
<rdar://problem/14077152> Activity viewer does not update error count for grouped errors when inspector is closed.
Take into account the repeat count of an error when incrementing
the message count.
Reviewed by Timothy Hatcher.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager.prototype._consoleMessageAdded):
(WebInspector.DashboardManager.prototype._consoleMessageWasRepeated):
(WebInspector.DashboardManager.prototype._incrementConsoleMessageType):
2013-06-05 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14072409> Pressing Enter/Esc when editing a breakpoint (conditional breakpoint) should dismiss popover
Handle Esc and Enter on the <input> to dismiss the popover.
This behaves like Xcode's breakpoint condition popover.
Reviewed by Timothy Hatcher.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype._popoverConditionInputKeyDown):
(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
(WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
2013-06-05 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14054886> Pressing Enter in a blank console should do nothing, not insert a newline
Reviewed by Antoine Quint.
* UserInterface/ConsolePrompt.js:
2013-06-05 Timothy Hatcher <timothy@apple.com>
Add/update copyright and license to all the user interface files in
preparation for open sourcing to WebKit.
Rubber-stamped by Antoine Quint.
* UserInterface/ActivateButtonNavigationItem.js:
* UserInterface/ActivateButtonToolbarItem.js:
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
* UserInterface/ApplicationCacheFrame.js:
* UserInterface/ApplicationCacheFrameContentView.css:
* UserInterface/ApplicationCacheFrameContentView.js:
* UserInterface/ApplicationCacheFrameTreeElement.js:
* UserInterface/ApplicationCacheIcons.css:
* UserInterface/ApplicationCacheManager.js:
* UserInterface/ApplicationCacheManifest.js:
* UserInterface/ApplicationCacheManifestTreeElement.js:
* UserInterface/ApplicationCacheObserver.js:
* UserInterface/BinarySearch.js:
* UserInterface/BlankStylePropertiesSection.js:
* UserInterface/BottomUpProfileDataGridTree.js:
* UserInterface/BoxModelDetailsSectionRow.css:
* UserInterface/BoxModelDetailsSectionRow.js:
* UserInterface/Branch.js:
* UserInterface/BranchManager.js:
* UserInterface/Breakpoint.css:
* UserInterface/Breakpoint.js:
* UserInterface/BreakpointIcons.css:
* UserInterface/BreakpointTreeElement.css:
* UserInterface/BreakpointTreeElement.js:
* UserInterface/ButtonNavigationItem.css:
* UserInterface/ButtonNavigationItem.js:
* UserInterface/ButtonToolbarItem.css:
* UserInterface/ButtonToolbarItem.js:
* UserInterface/CSSCompletions.js:
* UserInterface/CSSKeywordCompletions.js:
* UserInterface/CSSMedia.js:
* UserInterface/CSSObserver.js:
* UserInterface/CSSProperty.js:
* UserInterface/CSSRule.js:
* UserInterface/CSSSelectorProfileObject.js:
* UserInterface/CSSSelectorProfileType.js:
* UserInterface/CSSSelectorProfileView.js:
* UserInterface/CSSStyleDeclaration.js:
* UserInterface/CSSStyleDeclarationSection.css:
* UserInterface/CSSStyleDeclarationSection.js:
* UserInterface/CSSStyleDeclarationTextEditor.css:
* UserInterface/CSSStyleDeclarationTextEditor.js:
* UserInterface/CSSStyleDetailsSidebarPanel.css:
* UserInterface/CSSStyleDetailsSidebarPanel.js:
* UserInterface/CSSStyleManager.js:
* UserInterface/CSSStyleSheet.js:
* UserInterface/CallFrame.js:
* UserInterface/CallFrameIcons.css:
* UserInterface/CallFrameTreeElement.js:
* UserInterface/ClusterContentView.css:
* UserInterface/ClusterContentView.js:
* UserInterface/CodeMirrorAdditions.js:
* UserInterface/CodeMirrorCompletionController.css:
* UserInterface/CodeMirrorCompletionController.js:
* UserInterface/CodeMirrorFormatters.js:
* UserInterface/CodeMirrorOverrides.css:
* UserInterface/CodeMirrorTokenTrackingController.css:
* UserInterface/CodeMirrorTokenTrackingController.js:
* UserInterface/Color.js:
* UserInterface/CompletionSuggestionsView.css:
* UserInterface/CompletionSuggestionsView.js:
* UserInterface/ComputedStyleDetailsPanel.js:
* UserInterface/ConsoleCommand.js:
* UserInterface/ConsoleCommandResult.js:
* UserInterface/ConsoleGroup.js:
* UserInterface/ConsoleMessage.js:
* UserInterface/ConsoleMessageImpl.js:
* UserInterface/ConsoleObserver.js:
* UserInterface/ConsolePrompt.css:
* UserInterface/ConsolePrompt.js:
* UserInterface/ContentBrowser.css:
* UserInterface/ContentBrowser.js:
* UserInterface/ContentView.css:
* UserInterface/ContentView.js:
* UserInterface/ContentViewContainer.css:
* UserInterface/ContentViewContainer.js:
* UserInterface/ContextMenu.js:
* UserInterface/ControlToolbarItem.css:
* UserInterface/ControlToolbarItem.js:
* UserInterface/CookieIcon.css:
* UserInterface/CookieStorageContentView.css:
* UserInterface/CookieStorageContentView.js:
* UserInterface/CookieStorageObject.js:
* UserInterface/CookieStorageTreeElement.js:
* UserInterface/DOMDetailsSidebarPanel.js:
* UserInterface/DOMNode.js:
* UserInterface/DOMNodeDetailsSidebarPanel.js:
* UserInterface/DOMNodeStyles.js:
* UserInterface/DOMObserver.js:
* UserInterface/DOMSearchMatchObject.js:
* UserInterface/DOMStorageContentView.css:
* UserInterface/DOMStorageContentView.js:
* UserInterface/DOMStorageIcons.css:
* UserInterface/DOMStorageObject.js:
* UserInterface/DOMStorageObserver.js:
* UserInterface/DOMStorageTreeElement.js:
* UserInterface/DOMTree.js:
* UserInterface/DOMTreeContentView.css:
* UserInterface/DOMTreeContentView.js:
* UserInterface/DOMTreeElement.js:
* UserInterface/DOMTreeElementPathComponent.js:
* UserInterface/DOMTreeManager.js:
* UserInterface/DOMTreeOutline.css:
* UserInterface/DOMTreeOutline.js:
* UserInterface/DOMTreeUpdater.js:
* UserInterface/DOMUtilities.js:
* UserInterface/DashboardManager.js:
* UserInterface/DashboardView.css:
* UserInterface/DashboardView.js:
* UserInterface/DataGrid.css:
* UserInterface/DataGrid.js:
* UserInterface/DatabaseContentView.css:
* UserInterface/DatabaseContentView.js:
* UserInterface/DatabaseHostTreeElement.js:
* UserInterface/DatabaseIcon.css:
* UserInterface/DatabaseObject.js:
* UserInterface/DatabaseObserver.js:
* UserInterface/DatabaseTableContentView.css:
* UserInterface/DatabaseTableContentView.js:
* UserInterface/DatabaseTableIcon.css:
* UserInterface/DatabaseTableObject.js:
* UserInterface/DatabaseTableTreeElement.js:
* UserInterface/DatabaseTreeElement.js:
* UserInterface/DebuggerManager.js:
* UserInterface/DebuggerObserver.js:
* UserInterface/DebuggerSidebarPanel.css:
* UserInterface/DebuggerSidebarPanel.js:
* UserInterface/DetailsSection.css:
* UserInterface/DetailsSection.js:
* UserInterface/DetailsSectionDataGridRow.js:
* UserInterface/DetailsSectionGroup.js:
* UserInterface/DetailsSectionPropertiesRow.js:
* UserInterface/DetailsSectionRow.js:
* UserInterface/DetailsSectionSimpleRow.js:
* UserInterface/DetailsSidebarPanel.css:
* UserInterface/DetailsSidebarPanel.js:
* UserInterface/DividerNavigationItem.css:
* UserInterface/DividerNavigationItem.js:
* UserInterface/Editing.css:
* UserInterface/EditingSupport.js:
* UserInterface/EventHandler.js:
* UserInterface/EventListenerSection.js:
* UserInterface/EventListenerSectionGroup.css:
* UserInterface/EventListenerSectionGroup.js:
* UserInterface/ExecutionContext.js:
* UserInterface/ExecutionContextList.js:
* UserInterface/FilterBar.css:
* UserInterface/FilterBar.js:
* UserInterface/FindBanner.css:
* UserInterface/FindBanner.js:
* UserInterface/FlexibleSpaceNavigationItem.css:
* UserInterface/FlexibleSpaceNavigationItem.js:
* UserInterface/FolderIcon.css:
* UserInterface/FolderTreeElement.js:
* UserInterface/FontResourceContentView.css:
* UserInterface/FontResourceContentView.js:
* UserInterface/Formatter.js:
* UserInterface/FormatterContentBuilder.js:
* UserInterface/FormatterSourceMap.js:
* UserInterface/Frame.js:
* UserInterface/FrameContentView.js:
* UserInterface/FrameResourceManager.js:
* UserInterface/FrameTreeElement.js:
* UserInterface/GeneralTreeElement.js:
* UserInterface/GeneralTreeElementPathComponent.js:
* UserInterface/GenericResourceContentView.js:
* UserInterface/Geometry.js:
* UserInterface/HierarchicalPathComponent.css:
* UserInterface/HierarchicalPathComponent.js:
* UserInterface/HierarchicalPathNavigationItem.js:
* UserInterface/ImageResourceContentView.css:
* UserInterface/ImageResourceContentView.js:
* UserInterface/ImageUtilities.js:
* UserInterface/IndeterminateProgressSpinner.css:
* UserInterface/IndeterminateProgressSpinner.js:
* UserInterface/InspectorBackend.js:
* UserInterface/InspectorFrontendAPI.js:
* UserInterface/InspectorObserver.js:
* UserInterface/InstrumentIcons.css:
* UserInterface/InstrumentSidebarPanel.css:
* UserInterface/InstrumentSidebarPanel.js:
* UserInterface/IssueManager.js:
* UserInterface/IssueMessage.js:
* UserInterface/JavaScriptLogViewController.js:
* UserInterface/JavaScriptProfileObject.js:
* UserInterface/JavaScriptProfileType.js:
* UserInterface/JavaScriptProfileView.css:
* UserInterface/JavaScriptProfileView.js:
* UserInterface/KeyboardShortcut.js:
* UserInterface/LayerTreeDataGrid.js:
* UserInterface/LayerTreeDataGridNode.js:
* UserInterface/LayerTreeManager.js:
* UserInterface/LayerTreeObserver.js:
* UserInterface/LayerTreeSidebarPanel.css:
* UserInterface/LayerTreeSidebarPanel.js:
* UserInterface/LayoutTimelineDataGrid.js:
* UserInterface/LayoutTimelineDataGridNode.js:
* UserInterface/LayoutTimelineRecord.js:
* UserInterface/LoadInspectorBackendCommands.js:
* UserInterface/LoadLocalizedStrings.js:
* UserInterface/LogContentView.css:
* UserInterface/LogContentView.js:
* UserInterface/LogIcon.css:
* UserInterface/LogManager.js:
* UserInterface/LogObject.js:
* UserInterface/LogTreeElement.js:
* UserInterface/MIMETypeUtilities.js:
* UserInterface/Main.css:
* UserInterface/Main.html:
* UserInterface/Main.js:
* UserInterface/MetricsStyleDetailsPanel.js:
* UserInterface/NavigationBar.css:
* UserInterface/NavigationBar.js:
* UserInterface/NavigationItem.js:
* UserInterface/NavigationSidebarPanel.css:
* UserInterface/NavigationSidebarPanel.js:
* UserInterface/NetworkDataGrid.css:
* UserInterface/NetworkDataGrid.js:
* UserInterface/NetworkGraphCalculator.js:
* UserInterface/NetworkObserver.js:
* UserInterface/NetworkTimeline.css:
* UserInterface/Object.js:
* UserInterface/ObjectPropertiesSection.js:
* UserInterface/PageObserver.js:
* UserInterface/PathComponentIcons.css:
* UserInterface/Popover.css:
* UserInterface/Popover.js:
* UserInterface/ProfileManager.js:
* UserInterface/ProfileObject.js:
* UserInterface/ProfileType.js:
* UserInterface/ProfileView.css:
* UserInterface/ProfileView.js:
* UserInterface/ProfilerObserver.js:
* UserInterface/PropertiesSection.js:
* UserInterface/QuickConsole.css:
* UserInterface/QuickConsole.js:
* UserInterface/QuickConsoleNavigationBar.js:
* UserInterface/RadioButtonNavigationItem.css:
* UserInterface/RadioButtonNavigationItem.js:
* UserInterface/Resource.js:
* UserInterface/ResourceClusterContentView.js:
* UserInterface/ResourceCollection.js:
* UserInterface/ResourceContentView.js:
* UserInterface/ResourceDetailsSidebarPanel.js:
* UserInterface/ResourceIcons.css:
* UserInterface/ResourceSearchMatchObject.js:
* UserInterface/ResourceSidebarPanel.css:
* UserInterface/ResourceSidebarPanel.js:
* UserInterface/ResourceTimelineDataGridNode.js:
* UserInterface/ResourceTimelineDataGridNodePathComponent.js:
* UserInterface/ResourceTimelineRecord.js:
* UserInterface/ResourceTreeElement.css:
* UserInterface/ResourceTreeElement.js:
* UserInterface/Revision.js:
* UserInterface/RulesStyleDetailsPanel.css:
* UserInterface/RulesStyleDetailsPanel.js:
* UserInterface/RuntimeObserver.js:
* UserInterface/ScopeBar.css:
* UserInterface/ScopeBar.js:
* UserInterface/ScopeBarItem.js:
* UserInterface/ScopeChainDetailsSidebarPanel.js:
* UserInterface/ScopeChainNode.js:
* UserInterface/ScopeVariableTreeElement.js:
* UserInterface/Script.js:
* UserInterface/ScriptContentView.css:
* UserInterface/ScriptContentView.js:
* UserInterface/ScriptTimelineDataGrid.js:
* UserInterface/ScriptTimelineDataGridNode.js:
* UserInterface/ScriptTimelineRecord.js:
* UserInterface/ScriptTreeElement.js:
* UserInterface/SearchBar.css:
* UserInterface/SearchBar.js:
* UserInterface/SearchIcons.css:
* UserInterface/SearchResultTreeElement.js:
* UserInterface/Section.css:
* UserInterface/Section.js:
* UserInterface/Setting.js:
* UserInterface/Sidebar.css:
* UserInterface/Sidebar.js:
* UserInterface/SidebarPanel.js:
* UserInterface/SourceCode.js:
* UserInterface/SourceCodeLocation.js:
* UserInterface/SourceCodePosition.js:
* UserInterface/SourceCodeRevision.js:
* UserInterface/SourceCodeTextEditor.css:
* UserInterface/SourceCodeTextEditor.js:
* UserInterface/SourceCodeTextRange.js:
* UserInterface/SourceCodeTreeElement.js:
* UserInterface/SourceMap.js:
* UserInterface/SourceMapManager.js:
* UserInterface/SourceMapResource.js:
* UserInterface/SourceMapResourceTreeElement.js:
* UserInterface/StorageManager.js:
* UserInterface/StorageTreeElement.js:
* UserInterface/StyleDetailsPanel.js:
* UserInterface/StyleRuleIcons.css:
* UserInterface/SyntaxHighlightingDefaultTheme.css:
* UserInterface/SyntaxHighlightingSupport.js:
* UserInterface/TextContentView.css:
* UserInterface/TextContentView.js:
* UserInterface/TextEditor.css:
* UserInterface/TextEditor.js:
* UserInterface/TextRange.js:
* UserInterface/TextResourceContentView.css:
* UserInterface/TextResourceContentView.js:
* UserInterface/TimelineDataGrid.css:
* UserInterface/TimelineDataGrid.js:
* UserInterface/TimelineDecorations.css:
* UserInterface/TimelineDecorations.js:
* UserInterface/TimelineEventMarker.js:
* UserInterface/TimelineManager.js:
* UserInterface/TimelineObserver.js:
* UserInterface/TimelineOverview.css:
* UserInterface/TimelineOverview.js:
* UserInterface/TimelineRecord.js:
* UserInterface/TimelinesContentView.css:
* UserInterface/TimelinesContentView.js:
* UserInterface/TimelinesObject.js:
* UserInterface/ToggleButtonNavigationItem.js:
* UserInterface/ToggleControlToolbarItem.js:
* UserInterface/Toolbar.css:
* UserInterface/Toolbar.js:
* UserInterface/TreeOutline.js:
* UserInterface/Utilities.js:
* UserInterface/WebInspector.js:
2013-06-05 Timothy Hatcher <timothy@apple.com>
Properly update the boundaries for the NetworkTransferTimeCalculator.
It is expected that _lowerBound and _upperBound return NaN instead of 0.
<rdar://problem/14040314> Web Inspector says it takes ~15,000 days to load developer library
Reviewed by Joseph Pecoraro.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
* UserInterface/NetworkGraphCalculator.js:
(WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
(WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
2013-06-05 Timothy Hatcher <timothy@apple.com>
Unlocalize the box model labels.
<rdar://problem/14057745> [WebBrowser]: Euro: 13A476r: Box model should not be localized
Reviewed by Ada Chan.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
2013-06-05 Timothy Hatcher <timothy@apple.com>
Syntax highlight inherit, initial and function names in CSS as keywords.
Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions.propertyNamesCallback):
Strip function parenthesis from names. Process the color list to strip function parenthesis from rgb(), etc.
2013-06-05 Timothy Hatcher <timothy@apple.com>
Improve the implicit suffix handling when editing in the middle of a CSS value.
Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
2013-06-05 Timothy Hatcher <timothy@apple.com>
Autocomplete property names for transition and transition-property.
Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.prototype.get values):
* UserInterface/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
2013-06-04 Timothy Hatcher <timothy@apple.com>
Properly autocomplete CSS values if the property name is on a previous line.
Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
2013-06-03 Timothy Hatcher <timothy@apple.com>
Add property names to the value keywords list so they are highlighted for -webkit-transition.
<rdar://problem/14052662> "-webkit-transform" is not correctly highlighted when editing CSS resource
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
2013-06-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14047312> Add New Rules sometimes doesn't do anything
Better handle generating selectors for nodes with spaces in class or id attributes.
Tests: (Cases that were failing before)
<div class=" x "> => Before: (..x.) After: (.x)
<div id=" x "> => Before: (# x ) After: (div[id=" x "])
<div id='"x"'> => Before: (#"x") After: (div[id="\"x\""])
Reviewed by Timothy Hatcher.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode.prototype.appropriateSelectorFor):
* UserInterface/DOMUtilities.js:
(WebInspector.displayNameForNode):
2013-06-03 Antoine Quint <graouts@apple.com>
<rdar://problem/13932229> Update CSSKeywordCompletions.js for iOS properties
Add support for the new Ò-appleÓ-prefixed values for the ÒfontÓ property.
Reviewed by Timothy Hatcher.
* UserInterface/CSSKeywordCompletions.js:
2013-06-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14047029> Exception CallFrameTreeElement.js:19: TypeError: 'null' is not an object (evaluating 'callFrame.sourceCodeLocation.displaySourceCode')
Only include a subtitle for call frame tree elements if there is a
source code location, because that is used to determine the subtitle.
Reviewed by Timothy Hatcher.
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
2013-06-03 Timothy Hatcher <timothy@apple.com>
Hide the caret in read-only style declarations.
<rdar://problem/14047344> Locked rules (UA stylesheets) in Styles sidebar shouldn't display a caret
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor.read-only > .CodeMirror .CodeMirror-cursor): Added.
2013-06-03 Timothy Hatcher <timothy@apple.com>
Correctly stop auto recording the Timeline after the load event or a maximum duration (which ever comes first).
The original fix for <rdar://problem/13180009> was incorrect and caused <rdar://problem/13919974>
and also caused infinite auto recording on pages with indefinite timers that rapidly adds records.
<rdar://problem/14043180> REGRESSION (6.0.5-Curie): Safari Web Content: 100% CPU when using Inspector
Reviewed by Joseph Pecoraro.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
Don't call _stopAutoRecordingSoon for the DOMContent event.
(WebInspector.TimelineManager.prototype._addRecord):
Don't call _stopAutoRecordingSoon. Add the call to _resetAutoRecordingDeadTimeTimeout back.
(WebInspector.TimelineManager.prototype._startAutoRecording):
Use MaximumAutoRecordDuration instead of MaximumAutoRecordDurationAfterLastRecord for the timeout.
(WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
Remove the dead time timeout now that it is back in _addRecord.
2013-06-02 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14040519> BoxModelDetailsSectionRow.js:120: ERROR: TypeError: 'null' is not an object (evaluating 'style.propertyForName(width).value')
Make the sidebar resilient against the possibility of an empty computed
style object. The ultimate issue is that the DOM Tree does not have a
selected node, but this could should be resilient anyways.
Reviewed by Timothy Hatcher.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
2013-06-02 Joseph Pecoraro <pecoraro@apple.com>
Reveal line sometimes doesn't work with content right at the edge of the screen.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._isPositionVisible):
2013-05-31 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14039888> Should not have spellchecking during most HTML editing
Allow EditingConfig to specify whether or not spellchecking should be enabled.
Spellcheck is off by default, because most of the time it is code, and it is
only enabled when editing a TextNode in the DOM Tree.
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._startEditingTextNode):
* UserInterface/EditingSupport.js:
(WebInspector.EditingConfig):
(.cleanUpAfterEditing):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
Previously the SourceCodeTextEditor was automatically formatting the
content after the content was set on the TextEditor and some initial
processing; such as revealing a pending position. This change lets
the SourceCodeTextEditor signal to the TextEditor that it should
automatically format the incoming string before the extra processing
takes place. Now the pending position is updated in _prettyPrint,
and revealed appropriately.
Reviewed by Antoine Quint.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
(WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
Move the auto formatting decision from didPopulate to willPopulate.
If autoformatting is needed, we signal the TextEditor before setting
the string.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set string.update):
(WebInspector.TextEditor.prototype.set string):
(WebInspector.TextEditor.prototype.set autoFormat):
Keep a boolean for whether or not we should auto format when setting
the string. When setting the string, format if needed, after clearing
the history and before any pending position reveals.
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
Rename "revealLine" to "revealPosition". Now, if the first reveal is
for a position in pretty printed code, it can be remapped to an
appropriate (line, column), instead of whatever (line, 0) mapped to.
There is one bug fix here, the _prettyPrint in TextEditor was
incorrectly doing this._lineNumberToReveal.lineNumber, which should
have just been this._lineNumberToReveal. However, this code was not
getting reached in its current form. That will be addressed in the
next part.
Reviewed by Antoine Quint.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.showSourceCode):
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.showResponse):
(WebInspector.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeLocation):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalUnformattedSourceCodeLocation):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeTextRange):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.revealPosition):
* UserInterface/TextContentView.js:
(WebInspector.TextContentView.prototype.revealPosition):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set string.update):
(WebInspector.TextEditor.prototype.set string):
(WebInspector.TextEditor.prototype.revealNextSearchResult):
(WebInspector.TextEditor.prototype.line):
(WebInspector.TextEditor.prototype.updateLayout):
(WebInspector.TextEditor.prototype._textRangeFromCodeMirrorPosition):
(WebInspector.TextEditor.prototype._codeMirrorPositionFromTextRange):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.revealPosition):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
Add WebInspector.SourceCodePosition. Rather than passing lineNumber
and columnNumber as separate parameters all over the place, we can
pass a position object. Create positions as appropriate from other
classes like SourceCodeLocation and TextRange.
Reviewed by Antoine Quint.
* UserInterface/Main.html:
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.position):
(WebInspector.SourceCodeLocation.prototype.formattedPosition):
(WebInspector.SourceCodeLocation.prototype.displayPosition):
* UserInterface/SourceCodePosition.js: Added.
(WebInspector.SourceCodePosition):
(WebInspector.SourceCodePosition.prototype.get lineNumber):
(WebInspector.SourceCodePosition.prototype.get columnNumber):
* UserInterface/TextRange.js:
(WebInspector.TextRange.prototype.startPosition):
(WebInspector.TextRange.prototype.endPosition):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
Remove a reveal that always happens with line number 0.
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.toggleConsoleView):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
Unprefix uses of "-webkit-calc".
Reviewed by Timothy Hatcher.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14028576> Inspector finds CSS color names in other strings
Be a little more picky with our CSS regex, and include some post-processing
to act as a negative lookbehind, which is not supported in JavaScript regexes.
Do not allow color names that are prefixed or post-fixed with '-' or '.'.
Tests cases that previously would have produced swatches:
url(gold.png);
url("fools-gold.png");
url(fools.gold.png);
Using a regex is of course an imperfect solution, but it covers the majority
of cases and works well. It also allows us to detect colors in comments and
provide color swatches for those. This allows us to filter out some more
inappropriate cases.
Reviewed by Timothy Hatcher.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14023649> No -webkit-filter autocompletion
Add functions to CSS completion suggestions. When the completion
suggestion is showing it has both parens, when committed, the cursor is
placed inside the two parens so users can keep typing.
This adds a bunch of common function completions.
Reviewed by Timothy Hatcher.
* UserInterface/CSSKeywordCompletions.js:
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13994485> Hovering element breadcrumbs should highlight element on page
When hovering DOMTreeElementPathComponents highlight the associated
node on the page, like when you hover the DOMTreeElement.
Reviewed by Dean Jackson.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype._selectElementMouseOver):
(WebInspector.HierarchicalPathComponent.prototype._selectElementMouseOut):
Provide hooks for subclass mouseOver and mouseOut functions.
* UserInterface/DOMTreeElementPathComponent.js:
(WebInspector.DOMTreeElementPathComponent.prototype.get nextSibling):
(WebInspector.DOMTreeElementPathComponent.prototype.mouseOver):
(WebInspector.DOMTreeElementPathComponent.prototype.mouseOut):
Implement the mouseOver and mouseOut to show / hide the DOM highlight.
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14020206> Debugger popover not showing for "this"
Allow popover for the keyword "this".
Reviewed by Antoine Quint.
* UserInterface/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
2013-05-28 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14007495> Web Inspector has "Instruments," but this is already a feature in Xcode
Rename the "Instruments" Navigation Sidebar to "Timelines". Marketing
had concerns about using the same name in multiple places.
Rubber-stamped by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel):
2013-05-28 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14006550> Console errors persist when you navigate to other pages
The console can clear in two ways, handle both events.
Reviewed by Timothy Hatcher.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager):
2013-05-27 Timothy Hatcher <timothy@apple.com>
Fix copy handeling for DataGrid.
When text selection was disabled in r48866, that broke the copy event
handlers for DataGrid. That change prevents focus from making a caret
selection inside the DataGrid (it goes outside to the nearest selectable
text). This broke bubbling of the copy event to the right elements.
Reviewed by Antoine Quint.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.handleBeforeCopyEvent):
(WebInspector.DataGrid.prototype.handleCopyEvent):
* UserInterface/Main.js:
(WebInspector._beforecopy):
(WebInspector._copy):
2013-05-27 Timothy Hatcher <timothy@apple.com>
Allow data grid value column's in details sections wrap to multiple lines.
<rdar://problem/12329905> Can't easily view long header values
Reviewed by Antoine Quint.
* UserInterface/DataGrid.css:
(.data-grid tr.selected):
(.data-grid:focus tr.selected):
* UserInterface/DetailsSection.css:
(.details-section > .content .data-grid table.data):
(.details-section > .content .data-grid tr:nth-child(even)):
(.details-section > .content .data-grid tr:nth-child(odd)):
(.details-section > .content .data-grid td.value-column):
(.details-section > .content .data-grid td.value-column > div):
2013-05-27 Timothy Hatcher <timothy@apple.com>
Only add event markers for the main frame.
The event markers for frame heavy pages are too noisy and not very
useful. We also didn't distinguish frames in the marker tooltips.
Reviewed by Antoine Quint.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
2013-05-26 Timothy Hatcher <timothy@apple.com>
Stop using a CSS drop-shadow filter for the Web Inspector popover.
Use the existing background canvas to draw the drop shadow instead.
<rdar://problem/13991902> Stop using CSS filters for Popover
This also fixes:
<rdar://problem/13977466> Popover arrow is not perfectly centered with content
Reviewed by Joseph Pecoraro.
* UserInterface/Popover.css:
(.popover):
(.popover > .container):
* UserInterface/Popover.js:
(WebInspector.Popover.prototype._update):
(WebInspector.Popover.prototype._drawBackground):
(WebInspector.Popover.prototype._bestMetricsForEdge):
2013-05-25 Timothy Hatcher <timothy@apple.com>
Show the popover after a delay so quickly arrowing down the grid does not flash the popover.
Also prevent showing the popover if the element is hidden, which was happening sometimes for
rows at the bottom which were marked as offscreen still. Put MIN_Y before MAX_X so the popover
is more predictably positioned, and this matches NSPopover. Plus always clear the popover
TreeOutline after giving the popover time to animate out when hiding.
Reviewed by Joseph Pecoraro.
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
(WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon.delayedWork):
(WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
(WebInspector.TimelineDataGrid.prototype._hidePopover):
(WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Show a highlight quad on the screen when selecting a Layout/Paint record.
If we know the Quad / Rect of a Paint / Layout we can highlight that
portion on the inspected page. Unfortunately this information is not
very useful after the page scrolls, but it can be useful.
Reviewed by Timothy Hatcher.
* UserInterface/Geometry.js:
(WebInspector.Quad.prototype.toProtocol):
* UserInterface/LayoutTimelineDataGrid.js:
(WebInspector.LayoutTimelineDataGrid):
(WebInspector.LayoutTimelineDataGrid.prototype.reset):
(WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
(WebInspector.LayoutTimelineDataGrid.prototype.hidden):
(WebInspector.LayoutTimelineDataGrid.prototype._layoutDataGridSelectedNodeChanged):
(WebInspector.LayoutTimelineDataGrid.prototype._hideHighlightIfNeeded):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.shown):
(WebInspector.TimelineDataGrid.prototype.hidden):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype.showTimelineForRecordType):
(WebInspector.TimelinesContentView.prototype.shown):
(WebInspector.TimelinesContentView.prototype.hidden):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12656683> Show whole JS stack for layout & rendering triggers
Clear the popover's contents when the content view is reset so
we don't leak anything held by the CallFrameTreeElements.
Reviewed by Timothy Hatcher.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype.reset):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.reset):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12656683> Show whole JS stack for layout & rendering triggers
Stack trace information is already available from the backend. Display
it in a popover when the corresponding row in the data grid is selected.
Users can then click a call frame to jump to that source code location.
Because both Layout and Script timelines include call traces, this is
made generic an put in TimelineDataGrid. Subclasses tell the superclass
which element to anchor the popover next to, but the superclass handles
showing the popover.
Reviewed by Timothy Hatcher.
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Allow a CallFrameTreeElement for native code call frames. Such call
frames don't have a source code location, so they have no subtitle.
* UserInterface/Images/Native.pdf: Added.
* UserInterface/CallFrameIcons.css:
(.native-icon .icon):
This is a duplicate of the DOMNode.pdf gray [N] icon.
* UserInterface/Main.html:
Include new files.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid):
* UserInterface/ScriptTimelineDataGrid.js: Added.
(WebInspector.ScriptTimelineDataGrid):
(WebInspector.ScriptTimelineDataGrid.prototype.callFramePopoverAnchorElement):
* UserInterface/LayoutTimelineDataGrid.js: Added.
(WebInspector.LayoutTimelineDataGrid):
(WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
Give each TimelineDataGrid subclass its own class. Implement only
what is needed. The new subclasses provide the element for the
superclass to anchor the call frame popover.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
Instantiate the specific DataGrid types.
* UserInterface/TimelineDataGrid.css: Added.
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype.callFramePopoverAnchorElement):
(WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
(WebInspector.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
(WebInspector.TimelineDataGrid.prototype._windowResized):
(WebInspector.TimelineDataGrid.prototype._hidePopover):
(WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
Show and manager the popover.
(WebInspector.TimelineDataGrid.prototype._createPopoverContent):
(WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeElementSelected):
Popover content is a TreeOutline containing CallFrameTreeElements.
When a call frame is selected, reveal the source code location.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.elementWithColumnIdentifier):
Helper for accessing a specific <td> inside a <tr> by column name.
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Switch from "X" and "Y" to "Area" in the Layout Timeline
For transformed paint rects an X, Y, Width and Height, didn't make
sense, so the backend switched to quads. Instead of showing approximate
values, like the bounding box, lets just remove unknowns and switch
to showing the Area instead.
Reviewed by Timothy Hatcher.
* UserInterface/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Restore Width and Height values for Layouts and Paints in Timeline
The backend changed a while back from including rect values, to quad
values. We should move away from X and Y and instead show Area.
Reviewed by Timothy Hatcher.
* UserInterface/Geometry.js:
(WebInspector.Quad):
Provide a wrapper object for the protocol Quad representation.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
Ingest new and old Layout and Paint timeline record.
* UserInterface/LayoutTimelineRecord.js:
(WebInspector.LayoutTimelineRecord):
(WebInspector.LayoutTimelineRecord.prototype.get area):
(WebInspector.LayoutTimelineRecord.prototype.get rect):
(WebInspector.LayoutTimelineRecord.prototype.get quad):
A record may be wrapping a quad.
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Use SourceCodeLocations when displaying Script locations.
Using SourceCodeLocations allows the locations to show formatted
and display locations and is therefore more accurate. It also shows
the tooltip and display strings consistent with the rest of the UI.
Reviewed by Timothy Hatcher.
* UserInterface/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
* UserInterface/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.prototype.get lineNumber):
(WebInspector.ScriptTimelineRecord.prototype.get callFrames):
(WebInspector.ScriptTimelineRecord.prototype.get sourceCodeLocation):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Add Script Timeline records for Installing / Removing Timelines
We had records for TimerFired but not install / remove. It is sometimes
useful to see the stack traces where timers are added and removed.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.EventType.displayName):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Remove some unused old style DataGrid events.
These events are not used anywhere, and we have a new style event.
Reviewed by Timothy Hatcher.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.select):
(WebInspector.DataGridNode.prototype.deselect):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
Turn off spellchecking on some text inputs.
Reviewed by David Kilzer.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
* UserInterface/FindBanner.js:
(WebInspector.FindBanner):
2013-05-24 Timothy Hatcher <timothy@apple.com>
Tag all Web Inspector images with copyright info.
Added to all images: Copyright © 2013 Apple Inc. All rights reserved.
Requested by Joyce Chow.
* UserInterface/Images/ApplicationCache.png:
* UserInterface/Images/ApplicationCache@2x.png:
* UserInterface/Images/ApplicationCacheManifest.png:
* UserInterface/Images/ApplicationCacheManifest@2x.png:
* UserInterface/Images/BackArrow.pdf:
* UserInterface/Images/BottomUpTree.pdf:
* UserInterface/Images/Breakpoint.png:
* UserInterface/Images/Breakpoint@2x.png:
* UserInterface/Images/BreakpointButton.pdf:
* UserInterface/Images/BreakpointInactive.png:
* UserInterface/Images/BreakpointInactive@2x.png:
* UserInterface/Images/BreakpointInactiveButton.pdf:
* UserInterface/Images/ClippingCSS.png:
* UserInterface/Images/ClippingCSS@2x.png:
* UserInterface/Images/ClippingGeneric.png:
* UserInterface/Images/ClippingGeneric@2x.png:
* UserInterface/Images/ClippingJS.png:
* UserInterface/Images/ClippingJS@2x.png:
* UserInterface/Images/Close.pdf:
* UserInterface/Images/Colors.png:
* UserInterface/Images/Colors@2x.png:
* UserInterface/Images/Cookie.png:
* UserInterface/Images/Cookie@2x.png:
* UserInterface/Images/Crosshair.pdf:
* UserInterface/Images/DOMCharacterData.pdf:
* UserInterface/Images/DOMComment.pdf:
* UserInterface/Images/DOMDocument.pdf:
* UserInterface/Images/DOMDocumentType.pdf:
* UserInterface/Images/DOMElement.pdf:
* UserInterface/Images/DOMNode.pdf:
* UserInterface/Images/DOMTextNode.pdf:
* UserInterface/Images/DOMTree.pdf:
* UserInterface/Images/Database.png:
* UserInterface/Images/Database@2x.png:
* UserInterface/Images/DatabaseTable.png:
* UserInterface/Images/DatabaseTable@2x.png:
* UserInterface/Images/DisclosureTriangleSmallClosed.pdf:
* UserInterface/Images/DisclosureTriangleSmallOpen.pdf:
* UserInterface/Images/DisclosureTriangleTinyClosed.pdf:
* UserInterface/Images/DisclosureTriangleTinyOpen.pdf:
* UserInterface/Images/DockBottom.pdf:
* UserInterface/Images/DockRight.pdf:
* UserInterface/Images/DocumentCSS.png:
* UserInterface/Images/DocumentCSS@2x.png:
* UserInterface/Images/DocumentFont.png:
* UserInterface/Images/DocumentFont@2x.png:
* UserInterface/Images/DocumentGeneric.png:
* UserInterface/Images/DocumentGeneric@2x.png:
* UserInterface/Images/DocumentImage.png:
* UserInterface/Images/DocumentImage@2x.png:
* UserInterface/Images/DocumentJS.png:
* UserInterface/Images/DocumentJS@2x.png:
* UserInterface/Images/DocumentMarkup.png:
* UserInterface/Images/DocumentMarkup@2x.png:
* UserInterface/Images/Error.pdf:
* UserInterface/Images/ErrorSmall.pdf:
* UserInterface/Images/Errors.svg:
* UserInterface/Images/ErrorsEnabled.svg:
* UserInterface/Images/EventListener.pdf:
* UserInterface/Images/Exception.pdf:
* UserInterface/Images/FilterFieldGlyph.pdf:
* UserInterface/Images/FolderGeneric.png:
* UserInterface/Images/FolderGeneric@2x.png:
* UserInterface/Images/ForwardArrow.pdf:
* UserInterface/Images/Function.pdf:
* UserInterface/Images/GoToArrow.pdf:
* UserInterface/Images/HierarchicalNavigationItemChevron.pdf:
* UserInterface/Images/IndeterminateProgressSpinner1.pdf:
* UserInterface/Images/IndeterminateProgressSpinner10.pdf:
* UserInterface/Images/IndeterminateProgressSpinner11.pdf:
* UserInterface/Images/IndeterminateProgressSpinner12.pdf:
* UserInterface/Images/IndeterminateProgressSpinner2.pdf:
* UserInterface/Images/IndeterminateProgressSpinner3.pdf:
* UserInterface/Images/IndeterminateProgressSpinner4.pdf:
* UserInterface/Images/IndeterminateProgressSpinner5.pdf:
* UserInterface/Images/IndeterminateProgressSpinner6.pdf:
* UserInterface/Images/IndeterminateProgressSpinner7.pdf:
* UserInterface/Images/IndeterminateProgressSpinner8.pdf:
* UserInterface/Images/IndeterminateProgressSpinner9.pdf:
* UserInterface/Images/InstructionPointer.png:
* UserInterface/Images/InstructionPointer@2x.png:
* UserInterface/Images/Issues.svg:
* UserInterface/Images/IssuesEnabled.svg:
* UserInterface/Images/LayerBorders.pdf:
* UserInterface/Images/LessColumns.pdf:
* UserInterface/Images/LocalStorage.png:
* UserInterface/Images/LocalStorage@2x.png:
* UserInterface/Images/Locked.pdf:
* UserInterface/Images/Log.png:
* UserInterface/Images/Log@2x.png:
* UserInterface/Images/Logs.svg:
* UserInterface/Images/Memory.svg:
* UserInterface/Images/MoreColumns.pdf:
* UserInterface/Images/NavigationItemAngleBrackets.pdf:
* UserInterface/Images/NavigationItemBrushAndRuler.pdf:
* UserInterface/Images/NavigationItemBug.pdf:
* UserInterface/Images/NavigationItemCurleyBraces.pdf:
* UserInterface/Images/NavigationItemFile.pdf:
* UserInterface/Images/NavigationItemLayers.pdf:
* UserInterface/Images/NavigationItemLog.pdf:
* UserInterface/Images/NavigationItemMagnifyingGlass.pdf:
* UserInterface/Images/NavigationItemStopwatch.pdf:
* UserInterface/Images/NavigationItemStorage.pdf:
* UserInterface/Images/NavigationItemTrash.pdf:
* UserInterface/Images/NavigationItemVariable.pdf:
* UserInterface/Images/Network.png:
* UserInterface/Images/Network@2x.png:
* UserInterface/Images/NetworkBarBlue.png:
* UserInterface/Images/NetworkBarBlue@2x.png:
* UserInterface/Images/NetworkBarGray.png:
* UserInterface/Images/NetworkBarGray@2x.png:
* UserInterface/Images/NetworkBarGreen.png:
* UserInterface/Images/NetworkBarGreen@2x.png:
* UserInterface/Images/NetworkBarLabelCalloutLeft.pdf:
* UserInterface/Images/NetworkBarLabelCalloutRight.pdf:
* UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf:
* UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf:
* UserInterface/Images/NetworkBarOrange.png:
* UserInterface/Images/NetworkBarOrange@2x.png:
* UserInterface/Images/NetworkBarPurple.png:
* UserInterface/Images/NetworkBarPurple@2x.png:
* UserInterface/Images/NetworkBarRed.png:
* UserInterface/Images/NetworkBarRed@2x.png:
* UserInterface/Images/NetworkBarWhiteFlat.png:
* UserInterface/Images/NetworkBarWhiteFlat@2x.png:
* UserInterface/Images/NetworkBarYellow.png:
* UserInterface/Images/NetworkBarYellow@2x.png:
* UserInterface/Images/NetworkHollowBarBlue.png:
* UserInterface/Images/NetworkHollowBarBlue@2x.png:
* UserInterface/Images/NetworkHollowBarGray.png:
* UserInterface/Images/NetworkHollowBarGray@2x.png:
* UserInterface/Images/NetworkHollowBarGreen.png:
* UserInterface/Images/NetworkHollowBarGreen@2x.png:
* UserInterface/Images/NetworkHollowBarOrange.png:
* UserInterface/Images/NetworkHollowBarOrange@2x.png:
* UserInterface/Images/NetworkHollowBarPurple.png:
* UserInterface/Images/NetworkHollowBarPurple@2x.png:
* UserInterface/Images/NetworkHollowBarRed.png:
* UserInterface/Images/NetworkHollowBarRed@2x.png:
* UserInterface/Images/NetworkHollowBarYellow.png:
* UserInterface/Images/NetworkHollowBarYellow@2x.png:
* UserInterface/Images/Pause.pdf:
* UserInterface/Images/Percent.pdf:
* UserInterface/Images/Plus.pdf:
* UserInterface/Images/Profile.png:
* UserInterface/Images/Profile@2x.png:
* UserInterface/Images/PseudoElement.pdf:
* UserInterface/Images/Recording.png:
* UserInterface/Images/Recording@2x.png:
* UserInterface/Images/RecordingHovered.png:
* UserInterface/Images/RecordingHovered@2x.png:
* UserInterface/Images/RecordingStopped.png:
* UserInterface/Images/RecordingStopped@2x.png:
* UserInterface/Images/Reflection.pdf:
* UserInterface/Images/Reload.svg:
* UserInterface/Images/ReloadSelected.svg:
* UserInterface/Images/Request.pdf:
* UserInterface/Images/Resources.svg:
* UserInterface/Images/Response.pdf:
* UserInterface/Images/ResultLine.pdf:
* UserInterface/Images/Resume.pdf:
* UserInterface/Images/Script.png:
* UserInterface/Images/Script@2x.png:
* UserInterface/Images/SessionStorage.png:
* UserInterface/Images/SessionStorage@2x.png:
* UserInterface/Images/ShadowDOM.pdf:
* UserInterface/Images/SortIndicatorDownArrow.pdf:
* UserInterface/Images/SortIndicatorUpArrow.pdf:
* UserInterface/Images/SourceCode.pdf:
* UserInterface/Images/SplitToggleDown.pdf:
* UserInterface/Images/SplitToggleUp.pdf:
* UserInterface/Images/StepInto.pdf:
* UserInterface/Images/StepOut.pdf:
* UserInterface/Images/StepOver.pdf:
* UserInterface/Images/Stopwatch.png:
* UserInterface/Images/Stopwatch@2x.png:
* UserInterface/Images/StyleRuleAuthor.pdf:
* UserInterface/Images/StyleRuleInherited.pdf:
* UserInterface/Images/StyleRuleInheritedElement.pdf:
* UserInterface/Images/StyleRuleInspector.pdf:
* UserInterface/Images/StyleRuleUser.pdf:
* UserInterface/Images/StyleRuleUserAgent.pdf:
* UserInterface/Images/Time.svg:
* UserInterface/Images/TimelineBarBlue.png:
* UserInterface/Images/TimelineBarBlue@2x.png:
* UserInterface/Images/TimelineBarOrange.png:
* UserInterface/Images/TimelineBarOrange@2x.png:
* UserInterface/Images/TimelineBarPurple.png:
* UserInterface/Images/TimelineBarPurple@2x.png:
* UserInterface/Images/Undock.pdf:
* UserInterface/Images/UpDownArrows.svg:
* UserInterface/Images/UserInputPrompt.pdf:
* UserInterface/Images/UserInputPromptPrevious.pdf:
* UserInterface/Images/UserInputPromptPreviousSelected.pdf:
* UserInterface/Images/UserInputResult.pdf:
* UserInterface/Images/UserInputResultSelected.pdf:
* UserInterface/Images/Warning.pdf:
* UserInterface/Images/WarningSmall.pdf:
* UserInterface/Images/Weight.svg:
2013-05-24 Timothy Hatcher <timothy@apple.com>
Workaround an error with minifying the Web Inspector.
jsmin.py does not like: return //.test();
<rdar://problem/13983475> REGRESSION(r51583): Cannot show web inspector in recent spades
* UserInterface/External/CodeMirror/codemirror.js:
(window.CodeMirror):
2013-05-23 Timothy Hatcher <timothy@apple.com>
Update CodeMirror from 3.12 to 3.13.
Include the new comment.js addon and hook it up to Command-/.
Reviewed by Joseph Pecoraro.
* Scripts/update-codemirror-resources.rb: Added comment.js.
* UserInterface/CodeMirrorAdditions.js:
* UserInterface/External/CodeMirror/clojure.js:
* UserInterface/External/CodeMirror/codemirror.css:
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/coffeescript.js:
* UserInterface/External/CodeMirror/comment.js: Added.
* UserInterface/External/CodeMirror/css.js:
* UserInterface/External/CodeMirror/javascript.js:
* UserInterface/External/CodeMirror/less.js:
* UserInterface/External/CodeMirror/placeholder.js:
* UserInterface/External/CodeMirror/runmode.js:
* UserInterface/External/CodeMirror/sass.js:
* UserInterface/External/CodeMirror/searchcursor.js:
* UserInterface/External/CodeMirror/sql.js:
* UserInterface/External/CodeMirror/xml.js:
* UserInterface/Main.html: Include comment.js.
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13972577> ER: when deleting break points on a file, don't move up if you can't delete
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Don't implicitly preventDefault with the keyboard shortcut. This allows the
default behavior of populating the system find pasteboard.
Reviewed by Timothy Hatcher.
* UserInterface/FindBanner.js:
(WebInspector.FindBanner):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Pass the "changeFocus" parameter through the internal cursor relative reveal functions.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.revealPreviousSearchResult):
(WebInspector.TextEditor.prototype.revealNextSearchResult):
(WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
(WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Instead of continuing the binary search when we encounter an invalid entry,
just break out immediately. This way we can revalidate all of the search results
and accurately search forward or back.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorAdditions.js:
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._binarySearchInsertionIndexInSearchResults):
(WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
(WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
(WebInspector.TextEditor.prototype._cursorDoesNotMatchLastRevealedSearchResult):
(WebInspector.TextEditor.prototype._revalidateSearchResults):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Clear the automaticallyRevealFirstSearchResult state after revealing a search term.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
When searching forwards and backwards search relative to the current cursor position.
If we were already on a particular result we can keep the old path and just move
forward / back in the result list. Otherwise we binary search the closest position
to the cursor. Because results can be removed in the search path we have a
bit of added complexity.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set automaticallyRevealFirstSearchResult):
(WebInspector.TextEditor.prototype.addSearchResults.markRanges):
When automatically revealing, do so relative to the cursor.
(WebInspector.TextEditor.prototype.revealPreviousSearchResult):
(WebInspector.TextEditor.prototype.revealNextSearchResult):
(WebInspector.TextEditor.prototype._cursorDoesNotMatchLastRevealedSearchResult):
If we don't have a search result index, or if the cursor moved off
of the last search result index, search relative to the cursor.
(WebInspector.TextEditor.prototype._comparePositions):
(WebInspector.TextEditor.prototype._binarySearchInsertionIndexInSearchResults):
(WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
(WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
Binary search search results handling the possibility that a search result
could be null. I'm not sure if this works perfectly in such cases, but
it worked fine in practice.
(WebInspector.TextEditor.prototype._revalidateSearchResults):
When we try to traverse to a search result and it was deleted, revalidate
all the search results. This can happen if in a CSS file and the user
deleted some instances of a search result.
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Step 1, make Command+E populate the FindBanner's search query, and silently
perform the search so that Command+G and Shift+Command+G work. Expose a
new ContentView method "searchQueryWithSelection" to get a search query
from the selection in that ContentView. This currently only works with
TextEditor ContentViews.
Reviewed by Timothy Hatcher.
* UserInterface/FindBanner.js:
(WebInspector.FindBanner): Add the keyboard shortcut.
(WebInspector.FindBanner.prototype._populateSearchQueryFromSelection):
Ask the delegate (ContentBrowser) for a search query from selection.
If we get one, silently perform a search.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.searchQueryWithSelection):
Get the selection from CodeMirror and return that.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.searchQueryWithSelection):
Default implementation returns null, meaning no change.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.searchQueryWithSelection):
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.findBannerSearchQueryForSelection):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.searchQueryWithSelection):
* UserInterface/TextContentView.js:
(WebInspector.TextContentView.prototype.searchQueryWithSelection):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.searchQueryWithSelection):
Plumbing the message down the content views heirarchy.
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
Remove unnecessary return for setter.
This was just a copy / paste error from when it was originally written.
Reviewed by Timothy Hatcher.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.set automaticallyRevealFirstSearchResult):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
Remove unused instance variable TextEditor._pendingSearchResultLineNumbers
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13961791> Stopping recording clears the timeline
It actually seems like a non-main frame resource change causes the
timeline to clear. Only clear on main frame main resource changes.
Reviewed by Timothy Hatcher.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
When a BreakpointTreeElement is selected and the page is reloaded the
breakpoint tree elements are removed. When removing the tree element
the parent, ResourceTreeElement, was selected and the tree outline
created a content view to show for that resource. This content view
was being orphaned and replaced when new resources were loaded.
We never want to create a content view for a Script/ResourceTreeElement
in the DebuggerSidebarPanel when it has no children. That is a sign
that the tree element is about to be deleted.
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
Prevent the populate with script content path from requesting content
multiple times. This is just an optimization to prevent duplicated work.
This can happen the first time the debugger is paused, by setting the
active call frame, opening the resource, and then triggering the active
call frame did change notification.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent):
(WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
On iOS 6, when associating a Script with a Resource also update the type
to be Script, that way the resource will get a TextResourceContentView
instead of a GeneralResourceContentView and fall into the existing path
that will fetch Script Source for an editor when it is on a breakpoint
and cannot load the resource content.
Also, replace instances of "scriptsForResource" with the new scripts
accessor on WebInspector.Resource.
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.associateWithScript):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
Never loading content while on a breakpoint is possible in scripts if
the backend is paused executing the script before it has sent the
frontend information that the resource has finished loading. In these
cases, it is still possible for the frontend to get the "script source"
instead of the "resource content". These patches do that.
Start by creating an association between WebInspector.Resource and
WebInspector.Script. The order of events is always such that the Resource
is created first:
- Network.requestWillBeSent => create WebInspector.Resource
- Debugger.scriptParsed => create WebInspector.Script
So associate a Script with a Resource, if there is one, when the Script
is created. Currently we can only create the association with URLs,
which is not perfect if resources have the same URL but different
contents. That has never worked perfectly.
Reviewed by Timothy Hatcher.
* UserInterface/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.get resource):
(WebInspector.Script.prototype.requestContentFromBackend):
(WebInspector.Script.prototype._resolveResource):
On creation associate with a Resource via URL.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get scripts):
(WebInspector.Resource.prototype.associateWithScript):
Allow a Script to associate with this resource.
* UserInterface/FrameResourceManager.js:
Remove "resourceForScript". Script's now have a resource property.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
* UserInterface/Main.js:
(WebInspector.linkifyLocation):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
* UserInterface/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
Refactor to the simpler script.resource.
2013-05-21 Joseph Pecoraro <pecoraro@apple.com>
Remove generic event listeners when ClusterContentViews are closed.
Some event listeners were removed, but not all. This would have
caused the cluster content views to be leaked.
Reviewed by Timothy Hatcher.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.closed):
2013-05-21 Joseph Pecoraro <pecoraro@apple.com>
Remove the concept of left and right navigation items.
They are unused. So just remove them.
Reviewed by Timothy Hatcher.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
* UserInterface/Sidebar.js:
(WebInspector.Sidebar):
2013-05-22 Timothy Hatcher <timothy@apple.com>
Fix auto complete property caching.
<rdar://problem/13961832> Autocomplete of function return value causes side-effects multiple times
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
2013-05-21 Antoine Quint <graouts@apple.com>
<rdar://problem/13948862> REGRESSION (r150395): Sticky headers are mis-positioned
Reviewed by Joseph Pecoraro.
* UserInterface/DetailsSection.css:
(.details-section > .header):
(.details-section .details-section > .header):
Position and layer the headers correctly such that they snap to
the right position when scrolling.
* UserInterface/Main.js:
(WebInspector.updateDockedState):
(WebInspector._toolbarDisplayModeDidChange):
(WebInspector._toolbarSizeModeDidChange):
Remove unnecessary code now that sticky-positioned elements behave
as expected in Òoverflow: scrollÓ elements.
2013-05-21 Antoine Quint <graouts@apple.com>
<rdar://problem/13941438> Debugger popovers should prefer placement to the bottom/right over left to not cover expression
Reviewed by Timothy Hatcher.
Let Popover.present() be provided with a list of preferred edges in order
of preference and let the source code popovers prefer layout above, below and on
the right, in this order.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._updatePopoverForSelectedNode):
Adopt new Popover.present() parameter type.
* UserInterface/Popover.js:
(WebInspector.Popover):
(WebInspector.Popover.prototype.present):
Rename ÒpreferredEdgeÓ to ÒpreferredEdgesÓ (plural).
(WebInspector.Popover.prototype._update):
Instead of gathering metrics sorted by keys, gather them sorted in the
order of preference provided by the ÒpreferredEdgesÓ argument.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
Adopt new Popover.present() parameter type and provide the desired list
of preferred edges in order.
2013-05-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13945892> Console messages not working with iOS 6
Reviewed by Timothy Hatcher.
Don't use the enums right now. They were not generated for the iOS 6
InspectorBackend commands file. In the future we should generate it
for Legacy systems as well as trunk, and use constants instead of
magic values in code.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
2013-05-19 Timothy Hatcher <timothy@apple.com>
Prevent selection and deselect all messages when clicking disclosure triangles in the console.
This mostly worked before, but if a selection did happen it wouldn't go away by itself. Now
it will go away if a disclosure triangle is clicked. Also the initial focus mouse down always
selected the row, now it does not.
<rdar://problem/13839762> REGRESSION: When inspecting an object in the console, the entire object becomes highlighted
Reviewed by Joseph Pecoraro.
* UserInterface/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.addMessage):
(WebInspector.ConsoleGroup.prototype._titleMouseDown): Added.
(WebInspector.ConsoleGroup.prototype._titleClicked):
Don't select a group row when the title is clicked.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._onmousedown):
Prevent default instead of stopping propagation.
* UserInterface/LogContentView.css:
(.outline-disclosure li.parent::before):
Drive by disclosure triangle position tweak.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._mousedown):
Check for defaultPrevented and deselect all messages.
* UserInterface/TreeOutline.js:
(TreeElement.treeElementMouseDown):
Prevent default instead of stopping propagation.
2013-05-19 Timothy Hatcher <timothy@apple.com>
Fix the issue where console logs would overlap on reload.
Rejigger the console elements so the flex element can grow to fit and the parent does the scrolling.
<rdar://problem/13932826> REGRESSION (r147261): Reloading page causes overlapping console logs (116404)
Reviewed by Antoine Quint.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.isScrolledToBottom):
(WebInspector.JavaScriptLogViewController.prototype.scrollToBottom.delayedWork):
(WebInspector.JavaScriptLogViewController.prototype.scrollToBottom):
* UserInterface/LogContentView.css:
(.content-view.log):
(.console-messages):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.updateLayout):
(WebInspector.LogContentView.prototype.get scrollableElements):
(WebInspector.LogContentView.prototype._ensureMessageIsVisible):
(WebInspector.LogContentView.prototype._positionForMessage):
2013-05-18 Timothy Hatcher <timothy@apple.com>
Make prefixed keywords syntax highlight correctly.
CodeMirror parses the vendor prefix separate from the property or keyword name,
so we need to strip vendor prefixes from our all our names, not just properties.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions.nameForCodeMirror):
(WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
2013-05-18 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13774412> Update CSSKeywordCompletions.js for Curie + iOS
This is a pretty mechanical update to CSS autocompletion suggestions.
Also fix suggestions not working for "-webkit-" properties.
Most of this list was manually generated by looking at specifications
and walking CSSParser::parseValue, isValidKeywordPropertyAndValue,
CSSProperty::isInheritedProperty, the related .in files, and a bit
of sleuthing. It is not meant to be perfect, webkit differs from
specs slightly and doesn't implement all properties, but it does
a better job than before.
Rubber-stamped by Timothy Hatcher.
* UserInterface/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
2013-05-17 Timothy Hatcher <timothy@apple.com>
Drop -webkit- prefixes from CSS properties that no longer require them.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationSection.css:
* UserInterface/CodeMirrorOverrides.css:
* UserInterface/DOMTreeOutline.css:
* UserInterface/Editing.css:
* UserInterface/LogContentView.css:
* UserInterface/Main.css:
* UserInterface/NavigationSidebarPanel.css:
* UserInterface/Section.css:
* UserInterface/TimelinesContentView.css:
2013-05-17 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13919974> 11A368: Instruments tab of RWI is almost empty when loading apple.com on device
Fix a typo in the constant name. It was using a non-existent constant
which resulted in a 0ms timeout instead of the intended 15s.
Reviewed by Timothy Hatcher.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype._startAutoRecording):
2013-05-16 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13917982> Inconsistency between right-clicking and control-clicking in Debugger gutter
Ignore "Ctrl + Left Click" in more places:
* in drag / resize scenarios
* text editor gutter on a breakpoint
Reviewed by Timothy Hatcher.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype._startResizerDragging):
(WebInspector.DataGrid.prototype._resizerDragging):
(WebInspector.DataGrid.prototype._endResizerDragging):
* UserInterface/Main.js:
(WebInspector._dockedResizerMouseDown.dockedResizerDrag):
(WebInspector._dockedResizerMouseDown.dockedResizerDragEnd):
(WebInspector._dockedResizerMouseDown):
(WebInspector._moveWindowMouseDown.toolbarDrag):
(WebInspector._moveWindowMouseDown.toolbarDragEnd):
(WebInspector._moveWindowMouseDown):
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype._resizerMouseDown):
(WebInspector.Sidebar.prototype._resizerMouseUp):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._gutterMouseDown):
2013-05-17 Timothy Hatcher <timothy@apple.com>
Make clicking completions work again in the Style details sidebar.
<rdar://problem/13919341> REGRESSION: Mouse clicking a CSS autocompletion suggestion no longer works
Reviewed by Antoine Quint.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured):
Clicking a suggestion causes the editor to blur. We don't want to reset content in this case.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype.isHandlingClickEvent): Added.
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions): Use this.isHandlingClickEvent().
2013-05-16 Timothy Hatcher <timothy@apple.com>
Reset the branches when the main frame navigates.
This makes sure the SourceCodeRevisions don't stick around between page loads and take up memory.
Reviewed by Joseph Pecoraro.
* UserInterface/BranchManager.js:
(WebInspector.BranchManager):
(WebInspector.BranchManager.prototype.initialize):
(WebInspector.BranchManager.prototype.deleteBranch):
(WebInspector.BranchManager.prototype._mainResourceDidChange):
2013-05-16 Timothy Hatcher <timothy@apple.com>
Some random style tweaks.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header): Smaller top margin to align with the icon better.
* UserInterface/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-gutters): Lighter border color to match Xcode 5.
2013-05-16 Timothy Hatcher <timothy@apple.com>
Fix a case where we would enter an infinite loop, consuming memory and hang.
<rdar://problem/13911608> REGRESSION (r50998): Massive memory growth and hanging (115811)
Reviewed by Joseph Pecoraro.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.updateForRedirectResponse):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.prototype.increaseSize):
(WebInspector.Resource.prototype.markAsFinished):
(WebInspector.Resource.prototype.markAsFailed):
Timestamps are expected to be NaN instead of null. This wasn't an issue before because
the timeline code didn't use these timestamps. Now Resource.firstTimestamp uses them,
which is used by ResourceTimelineRecord.startTime.
2013-05-15 Timothy Hatcher <timothy@apple.com>
Allow Command-K to clear the console anywhere in the Inspector.
<rdar://problem/13888241> Command-K doesn't clear the Console unless it has focus
Reviewed by Antoine Quint.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
2013-05-15 Timothy Hatcher <timothy@apple.com>
Fix the Save As... keyboard shortcut.
Reviewed by Antoine Quint.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
Don't require the Option key. It is Command-Shift-S.
2013-05-15 Timothy Hatcher <timothy@apple.com>
Make clicking the console icons in the dashboard toggle the scope.
<rdar://problem/13884713> Improve console filtering via the dashboard buttons
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.showFullHeightConsole):
If the requested scope is already selected and the console is showing, then switch back to All.
2013-05-15 Timothy Hatcher <timothy@apple.com>
Make the tab key commit the completion of there is only one suggestion.
<rdar://problem/13897001> REGRESSION (Safari 6): Tab to accept autocomplete with 1 result
should dismiss completion suggestions popover
Reviewed by Antoine Quint.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._handleTabKey):
Commit the current completion if there is only one suggestion.
2013-05-14 Timothy Hatcher <timothy@apple.com>
Always evaluate the console prompt if the cursor is not at the last position.
<rdar://problem/13854691> New Return key behavior in Web Inspector breaks my typical usage
Reviewed by Joseph Pecoraro.
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype._handleEnterKey):
* UserInterface/JavaScriptLogViewController.js:
2013-05-14 Timothy Hatcher <timothy@apple.com>
Update Frame.securityOrigin when committing the provisional load.
Reviewed by Joseph Pecoraro.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.commitProvisionalLoad):
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate):
2013-05-14 Timothy Hatcher <timothy@apple.com>
Add DOMStorage when the main resource changes.
<rdar://problem/13844066> REGRESSION: If the Web Inspector is displayed when you refresh the page, local and session storage is not visible
Reviewed by Joseph Pecoraro.
* UserInterface/StorageManager.js:
(WebInspector.StorageManager.prototype._mainResourceDidChange):
(WebInspector.StorageManager.prototype._addDOMStorageIfNeeded):
(WebInspector.StorageManager.prototype._securityOriginDidChange):
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13876379> Pretty printing while paused in the debugger loses the execution line
When pretty printing we replace the entire contents of the editor. If
the display location didn't change at all, then when we re-set the
execution line number, we wouldn't update the style on the line.
This change makes updating the execution line more of the TextEditor's
responsibility on a pretty print. Previously it was working in most cases
but now it should always work as long as the TextEditor has been given
an accurate execution line and column number. In pretty print we delete
the execution line handle so we are guaranteed to recreate it.
Just in case, also update SourceCodeLocation to listen to any location
changes, not just display location changes.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.close):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.get executionColumnNumber):
(WebInspector.TextEditor.prototype.set executionColumnNumber):
2013-05-13 Timothy Hatcher <timothy@apple.com>
Fix the shortcut for the Layer details sidebar panel.
Also fix the naming of the toolbar buttons for the Style details sidebar and
Layer details sidebar so they are plural while the name in the tooltip is still singular.
<rdar://problem/13871872> Layers details sidebar shortcut should be control-shift-4, not control-shift-5
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel):
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
* UserInterface/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel):
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel):
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
2013-05-13 Timothy Hatcher <timothy@apple.com>
Tweak the console completions to work as expected in more cases.
Also prevent empty prefix completions unless it is the start of property access.
This was a regression from the fix for <rdar://problem/13860627>.
<rdar://problem/13871885> Command-line API functions don't autocomplete when passed as parameter
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype.completionControllerCompletionsNeeded):
* UserInterface/JavaScriptLogViewController.js:
2013-05-12 Timothy Hatcher <timothy@apple.com>
Update the toolbar height so the save sheet is positioned correctly and window gradient is accurate.
<rdar://problem/13871067> Save sheet on the Web Inspector does not come out from under the toolbar
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector.updateDockedState):
(WebInspector._updateToolbarHeight):
(WebInspector._toolbarDisplayModeDidChange):
(WebInspector._toolbarSizeModeDidChange):
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
Improve String.prototype.startsWith to not search the entire string.
Using the optional second parameter of lastIndexOf we can only search
for a substring from index 0, and not check the rest of the string.
I also went through and replaced all uses of str.indexOf(...) === 0 with
str.startsWith(...), or if a single character str.charAt(0) === "?".
Reviewed by Timothy Hatcher.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.prototype.startsWith):
(WebInspector.CSSCompletions.prototype._firstIndexOfPrefix):
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
* UserInterface/CookieStorageContentView.js:
(WebInspector.cookieMatchesResourceURL):
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
* UserInterface/EditingSupport.js:
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
* UserInterface/JavaScriptProfileView.js:
* UserInterface/Main.js:
(WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
* UserInterface/Resource.js:
(WebInspector.Resource.Type.fromMIMEType):
* UserInterface/Utilities.js:
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
Make mailto: href links behave correctly.
Test: data:text/html,<a href="mailto:pecoraro@apple.com?subject=email">Email Joe</a>
Reviewed by Timothy Hatcher.
* UserInterface/Utilities.js:
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13572739> REGRESSION: Styles sidebar url(...) should have a way to jump to the resource
TextEditor / SourceCodeTextEditor (most resources) already had behavior where
clicking a "link" would attempt to open it in the Inspector, and fallback to
opening a new browser tab for the URL. This hardens that behavior in the
"jump to symbol" case, and makes it work in the CSS Sidebar with Command+Click.
To encourage editing in the style sidebar, style url(...)s as strings,
which is how they displayed before these patches.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._openClickedLinks):
Cleanup the code a bit.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
Don't jump to symbol when clicking a link. Fallback to TextEditor's link opening behavior.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype):
Handle jump to symbol when clicking a link to behave link TextEditor's link opening behavior.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .cm-link):
In the Style sidebar editors display links as strings by default.
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13572739> REGRESSION: Styles sidebar url(...) should have a way to jump to the resource
Add extendedCSSToken, modeled after extendedXMLToken to parse url(...)
links and give them a "link" style class.
Normally CodeMirror parses "url", "(", <optionally quoted string>, ")".
We hook into this case and manually parse the optionally quoted string
ourselves so that we can handle quotes and whitespace exactly how we
want to.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorAdditions.js:
2013-05-15 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13865123> REGRESSION: Incorrect link tokenization of unquoted src/href links - <img src=...>
Handle unquoted attributes when we take over tokenization of link attribute values.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorAdditions.js:
2013-05-11 Timothy Hatcher <timothy@apple.com>
Make the tab behavior consistent among all CodeMirror editors.
Making this a setting is tracked by <rdar://problem/10593948>.
Reviewed by Darin Adler.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
2013-05-11 Timothy Hatcher <timothy@apple.com>
Allow editing any local file since edits can be saved and reloaded right from the Inspector.
Reviewed by Dean Jackson.
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype._contentWillPopulate):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype._contentWillPopulate):
2013-05-11 Timothy Hatcher <timothy@apple.com>
Support saving text resources and the console log to a local file.
<rdar://problem/5827275> PARITY (Chrome Developer Tools): Add an option to save a resource locally
Reviewed by Dean Jackson.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get supportsSave):
(WebInspector.ClusterContentView.prototype.get saveData):
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.toClipboardString): Always include the level. It was omitted
when we didn't have text range selection to make it easier to copy and paste. But we also include the
file and line info, so it was already has more info than just the message.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype._saveDataToFile):
(WebInspector.ContentBrowser.prototype._save):
(WebInspector.ContentBrowser.prototype._saveAs):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.get supportsSave):
(WebInspector.LogContentView.prototype.get saveData):
(WebInspector.LogContentView.prototype.handleCopyEvent):
(WebInspector.LogContentView.prototype._formatMessagesAsData.var):
(WebInspector.LogContentView.prototype._formatMessagesAsData):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.get supportsSave):
(WebInspector.ScriptContentView.prototype.get saveData):
* UserInterface/TextContentView.js:
(WebInspector.TextContentView.prototype.get supportsSave):
(WebInspector.TextContentView.prototype.get saveData):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.get supportsSave):
(WebInspector.TextResourceContentView.prototype.get saveData):
2013-05-11 Timothy Hatcher <timothy@apple.com>
Fix an exception I saw while navigating between pages.
I only reproduced this once, but the fix is a simple null check.
I'm assuming close was called a second time.
Reviewed by Anders Carlsson.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.close):
2013-05-10 Timothy Hatcher <timothy@apple.com>
Tweak layer borders icon.
<rdar://problem/13717886> Two layers buttons with different meanings
* UserInterface/Images/LayerBorders.pdf:
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
Add a "jump to symbol" mode when the command key is down for the CSS
style sidebar to jump to the display CSS Resource.
Reviewed by Timothy Hatcher.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.set style):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateJumpToSymbolTrackingMode):
Listen for GlobalModifierKeysDidChange events when the style for the
editor has an owner rule and that owner rule has a source code location.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
Jump to the display resource when clicking the highlighted range.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
Immediately highlight hovered ranges for jump to symbol mode.
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
Add a "jump to symbol" mode when the command key is down, to quickly
jump between a SourceMapResource and the original resources for the
hovered token. This mode takes precedence over debugger popovers if
enabled (because the command key is pressed).
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.hidden):
(WebInspector.SourceCodeTextEditor.prototype.close):
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
(WebInspector.SourceCodeTextEditor.prototype._shouldTrackTokenHovering):
Listen for GlobalModifierKeysDidChange events when this file has a source map
(either it is a SourceMapResource or it is a SourceCode with sourceMap resources).
(WebInspector.SourceCodeTextEditor.prototype._startTrackingTokenHoveringIfNeeded):
(WebInspector.SourceCodeTextEditor.prototype._stopTrackingTokenHoveringIfNeeded):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._sourceCodeSourceMapAdded):
In SourceCodeTextEditors there are 2 possible reasons we may have hover tracking,
when on a breakpoint for JavaScript or in Jump To Symbol tracking mode.
(WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
(WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
(WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
Switch between and different tracking modes with different settings.
(WebInspector.SourceCodeTextEditor.prototype._sourceCodeLocationForEditorPosition):
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
When in jump to symbol mode, determine the sourceCodeLocation relating to the
token that was clicked and jump between resources.
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
When in jump to symbol mode, that takes precedence. Highlight just the hovered token.
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
Move token tracking out of TextEditor into its own class with settings,
CodeMirrorTokenTrackingController. You can now set the token mode on
the controller to get different types of candidate hovered token results
back to the delegate (TextEditor subclass).
The CodeMirrorTokenTrackingController can start/stop tracking, highlight
a given text range, set delays for mousing over and out of tokens before
actions are taken, and provide different candidates depending the chosen
mode. The current modes are:
NonSymbolTokens - returns a candidate for just the hovered token.
JavaScriptExpression - returns a candidate for the hovered token with
extra information about the JavaScript expression ending at that token.
When tracking is enabled, the delegate may be notified of changes:
tokenTrackingControllerCanReleaseHighlightedRange - should remove the highlight
tokenTrackingControllerHighlightedRangeReleased - the highlight was removed
tokenTrackingControllerHighlightedRangeWasClicked - the highlight was clicked
tokenTrackingControllerNewHighlightCandidate - new hovered highlight candidate
A plus side of this is that TextEditor now no longer knows about
"JavaScript". It shouldn't need to know about a certain mode of
content that it contains.
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/CodeMirrorTokenTrackingController.css: Added.
(.CodeMirror .jump-to-symbol-highlight): Shared style for any type of editor.
* UserInterface/CodeMirrorTokenTrackingController.js: Added.
(WebInspector.CodeMirrorTokenTrackingController):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get delegate):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set delegate):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get mode):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set mode):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get mouseOverDelayDuration):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set mouseOverDelayDuration):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get mouseOutReleaseDelayDuration):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set mouseOutReleaseDelayDuration):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get classNameForHighlightedRange):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set classNameForHighlightedRange):
Different settings of the controller.
(WebInspector.CodeMirrorTokenTrackingController.prototype.get tracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get candidate):
Accessors for current state, but cannot be modified.
(WebInspector.CodeMirrorTokenTrackingController.prototype.startTracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype.stopTracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype.highlightRange):
(WebInspector.CodeMirrorTokenTrackingController.prototype.removeHighlightedRange):
API to make use of the tracker to start/stop/highlight.
(WebInspector.CodeMirrorTokenTrackingController.prototype.boundsForRange):
Helper for getting the bounds of a given codemirror text range.
(WebInspector.CodeMirrorTokenTrackingController.prototype.handleEvent):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedWithMarkedText):
(WebInspector.CodeMirrorTokenTrackingController.prototype._markedTextIsNoLongerHovered):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOutOfEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasPressedOverEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._windowLostFocus):
Events handled while tracking. Very few changes.
(WebInspector.CodeMirrorTokenTrackingController.prototype._processNewHoveredToken):
(WebInspector.CodeMirrorTokenTrackingController.prototype._processNonSymbolToken):
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
When a token is hovered, create a candidate depending on the controller's mode.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.get tokenTrackingController):
Create and expose the tokenTrackingController.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved):
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
(WebInspector.SourceCodeTextEditor.prototype._shouldTrackTokenHovering):
(WebInspector.SourceCodeTextEditor.prototype._startTrackingTokenHoveringIfNeeded):
(WebInspector.SourceCodeTextEditor.prototype._stopTrackingTokenHoveringIfNeeded):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
(WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
(WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerCanReleaseHighlightedRange):
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
Switch to the tracking controller instead of TextEditor methods and properties.
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror .hovered-expression-highlight):
(@-webkit-keyframes text-editor-hovered-expression-highlight-fadeout):
Renamed the class name for expressions to have "expression" in the name.
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
Introduce WebInspector.modifierKeys to know which modifier keys are
active at any time (command, option, shift). Trigger events on changes
through WebInspector.notifications.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._updateModifierKeys):
(WebInspector._windowKeyDown):
(WebInspector._windowKeyUp):
* UserInterface/Object.js:
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
Do a little renaming on ResourceSidebarPanel show methods for text
ranges. This better matches the showSourceCodeLocation method names.
Reviewed by Timothy Hatcher.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
2013-05-10 Timothy Hatcher <timothy@apple.com>
Make the console prompt suggest completions after typing "." or "[".
<rdar://problem/13860627> REGRESSION: Console autocompletion does not suggest anything until first character is typed
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
(WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
(WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
2013-05-09 Timothy Hatcher <timothy@apple.com>
Tell WebInspector.Resource about its type when it is created instead of changing it later.
This depends on: https://webkit.org/b/74935
<rdar://problem/13726105> Timeline network filters don't update as resources change type (74935)
Reviewed by David Kilzer.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate):
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
* UserInterface/InspectorBackendCommands.js:
* UserInterface/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.requestWillBeSent):
2013-05-09 Timothy Hatcher <timothy@apple.com>
Use a different image for the layer border toggle button.
<rdar://problem/13717886> Two layers buttons with different meanings
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
* UserInterface/Images/LayerBorders.pdf: Added.
2013-05-08 Timothy Hatcher <timothy@apple.com>
Fix the heirarchical path components for unrevealed source map resources.
<rdar://problem/13681487> Missing heirarchical path components selecting breakpoints in source map resources in Debugger sidebar
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
Special case WebInspector.SourceMapResource.
* UserInterface/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
Revert r50608.
2013-05-07 Timothy Hatcher <timothy@apple.com>
Fix the background color for the Timeline navigation bar.
The container is taller than the navigation bar, and it used for mouse over slop.
So the background color needs to be on the navigation bar.
Reviewed by Joseph Pecoraro.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid > .navigation-bar-container):
(.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
2013-05-07 Timothy Hatcher <timothy@apple.com>
Compare async resource types by their first timestamp so they are in chronological order.
<rdar://problem/13827118> Web Inspector: cannot see order of xhrs in resource inspector (115728)
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.compareResourceTreeElements):
2013-05-07 Timothy Hatcher <timothy@apple.com>
Fix and simplify the layout path for Toolbar.
<rdar://problem/13828232> REGRESSION: Toolbar overflows when using Icons and Text (Horizontal) mode
Reviewed by Joseph Pecoraro.
* UserInterface/Toolbar.css:
(.toolbar .control-section):
* UserInterface/Toolbar.js:
(WebInspector.Toolbar.prototype.customUpdateLayout.isOverflowingToolbar):
(WebInspector.Toolbar.prototype.customUpdateLayout):
2013-05-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13821139> After deleting a node when remote inspecting, Web Inspector is broken
When using the remote inspector, there is enough of a delay between
messages that the didRemoveNode handler triggers the DOMTreeUpdater to
refresh the portion of the tree before this removeNodeCallback happens.
Since removeNodeCallback is asynchronous anyways, we should bail if
the tree element was already removed from the tree (has no parent).
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.remove.removeNodeCallback):
(WebInspector.DOMTreeElement.prototype.remove):
2013-05-07 Joseph Pecoraro <pecoraro@apple.com>
Fix member name typo.
This was the only occurrence of _selectDOMNode. This looks
like it was just a typo of _selectedDOMNode.
Reviewed by Darin Adler.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
2013-05-07 Timothy Hatcher <timothy@apple.com>
Use a brighter blue for selected labels in the label-only toolbar mode.
This better matches the blue used in the selected toolbar icons.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/ButtonToolbarItem.css:
(.toolbar.label-only .item.activate.button.activated > .label):
2013-05-07 Timothy Hatcher <timothy@apple.com>
Only allow the LCD to be a single line, giving less difference between toolbar modes and sizes.
This better distributes the space in the LCD and makes it collapse down to 3 items when
there isn't enough room for all 6 items.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/DashboardView.css:
(.toolbar .dashboard):
(body.nightly-build .toolbar .dashboard):
(body.nightly-build .toolbar.collapsed .dashboard):
(body:not(.nightly-build) .toolbar.collapsed .dashboard):
(body:not(.nightly-build) .toolbar.collapsed .dashboard > .logs):
(.toolbar .dashboard > .item):
(.toolbar .dashboard > .resourcesSize):
(.toolbar .dashboard > .item > div):
(.toolbar.normal-size.icon-and-label-vertical .dashboard):
(.toolbar.normal-size.icon-and-label-horizontal .dashboard > .item):
* UserInterface/DashboardView.js:
(WebInspector.DashboardView):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Update the LCD background to match Xcode 5.
This change is conditional to non-nightlies.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Joseph Pecoraro.
* UserInterface/DashboardView.css:
(.toolbar .dashboard):
(body:not(.nightly-build) .toolbar .dashboard):
(body.window-inactive:not(.nightly-build) .toolbar .dashboard):
(body.nightly-build .toolbar .dashboard):
(.toolbar .dashboard > .item):
(.toolbar.small-size.icon-and-label-horizontal .dashboard):
(body.nightly-build .toolbar.small-size.icon-and-label-horizontal .dashboard):
(.toolbar.small-size.icon-and-label-horizontal .dashboard > .item):
(body.nightly-build .toolbar.small-size.icon-and-label-horizontal .dashboard > .item):
(.toolbar.normal-size.icon-and-label-horizontal .dashboard):
(body.nightly-build .toolbar.normal-size.icon-and-label-horizontal .dashboard):
(.toolbar.small-size.icon-and-label-vertical .dashboard):
(body.nightly-build .toolbar.small-size.icon-and-label-vertical .dashboard):
(.toolbar.normal-size.icon-and-label-vertical .dashboard):
(body.nightly-build .toolbar.normal-size.icon-and-label-vertical .dashboard):
(.toolbar.icon-and-label-vertical .dashboard > .item):
(body.nightly-build .toolbar.icon-and-label-vertical .dashboard > .item):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Update the filter field placeholder in the Resources sidebar when showing search results.
Reviewed by Antoine Quint.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ResourceSidebarPanel.js:
2013-05-06 Timothy Hatcher <timothy@apple.com>
Always have the HierarchicalPathComponent take space so it gives the last item some padding.
Reviewed by Antoine Quint.
* UserInterface/HierarchicalPathComponent.css:
(.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child > .separator):
Use visibility: hidden instead of display: none.
2013-05-06 Timothy Hatcher <timothy@apple.com>
Make ScopeBarItem and RadioButtonNavigationItem have a min-width so when they are selected the bold
weight does not cause the item to change its width.
This adds some updateLayout calls to places that needed it now or were missing it already.
This change is not conditional to non-nightlies. It does no harm to always do this.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.set label):
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
* UserInterface/Main.js:
(WebInspector._contentBrowserSizeDidChange):
* UserInterface/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem.prototype.get selected):
(WebInspector.RadioButtonNavigationItem.prototype.set selected):
(WebInspector.RadioButtonNavigationItem.prototype.get active):
(WebInspector.RadioButtonNavigationItem.prototype.set active):
(WebInspector.RadioButtonNavigationItem.prototype.updateLayout):
* UserInterface/ScopeBar.js:
(WebInspector.ScopeBar.prototype.updateLayout):
(WebInspector.ScopeBar.prototype._populate):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype.updateLayout):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Show overflow shadow pockets in the navigation sidebar when content can scroll.
This change is conditional to non-nightlies.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .overflow-shadow):
(body.nightly-build .sidebar > .panel.navigation > .overflow-shadow):
(.sidebar > .panel.navigation > .overflow-shadow.top):
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.shown):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WebInspector.NavigationSidebarPanel.prototype._treeElementExpandedOrCollapsed):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/TreeOutline.js:
(TreeElement.prototype.collapse):
(TreeElement.prototype.expand):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Update focus and active focus generated images to match the blues used by Xcode 5.
This change is not conditional to non-nightlies. It shouldn't be too revealing.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/ImageUtilities.js:
(.generateImage):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Update styles to match the majority of Xcode 5's design changes.
The style changes are conditional so they wont apply when running a WebKit nightly.
After WWDC we can remove the condition and the extra style rules this adds.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Rubber-stamped by Antoine Quint.
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar .item.button.text-only):
(body.nightly .navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
* UserInterface/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-gutters):
(.body.nightly-build .CodeMirror .CodeMirror-gutters):
(.CodeMirror .CodeMirror-linenumber):
* UserInterface/DetailsSection.css:
(.details-section > .header):
(.details-section .details-section > .header):
(body.nightly-build .details-section > .header):
(body.nightly-build .details-section .details-section > .header):
* UserInterface/DividerNavigationItem.css:
(.navigation-bar .item.divider):
(body.nightly .navigation-bar .item.divider):
* UserInterface/FilterBar.css:
(.filter-bar):
(body.nightly-build .filter-bar):
(body:not(.nightly-build) .filter-bar > input[type="search"]):
(body:not(.nightly-build) .filter-bar > input[type="search"]::-webkit-input-placeholder):
(body:not(.nightly-build) .filter-bar > input[type="search"]:valid):
* UserInterface/FilterBar.js:
(WebInspector.FilterBar):
* UserInterface/FindBanner.css:
(body.nightly-build .find-banner):
(body:not(.nightly) .find-banner > input[type="search"]):
(body:not(.nightly) .find-banner > button):
(.find-banner > button > .glyph):
(body.nightly .find-banner > button > .glyph):
* UserInterface/HierarchicalPathComponent.css:
(body.nightly .hierarchical-path-component > .separator):
(.hierarchical-path-component.text-only > select):
* UserInterface/InstrumentSidebarPanel.css:
(.sidebar > .panel.instrument > .title-bar):
(body.nightly-build .sidebar > .panel.instrument > .title-bar):
(.sidebar > .panel.instrument > .title-bar.profiles):
(body.nightly-build .sidebar > .panel.instrument > .title-bar.profiles):
* UserInterface/LayerTreeSidebarPanel.css:
(.layer-tree.panel .bottom-bar):
(body.nightly-build .layer-tree.panel .bottom-bar):
* UserInterface/Main.css:
(#split-content-browser > .navigation-bar):
(body.nightly-build #split-content-browser > .navigation-bar):
* UserInterface/NavigationBar.css:
(.navigation-bar):
(body.nightly-build .navigation-bar):
(body.nightly-build.window-inactive .navigation-bar):
* UserInterface/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content):
(body.nightly-build .sidebar > .panel.navigation > .content):
(.sidebar > .panel.navigation > .overflow-shadow):
(.sidebar > .panel.navigation > .overflow-shadow.top):
* UserInterface/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only.selected):
(body:not(.nightly) .navigation-bar .item.radio.button.text-only.selected):
(body.nightly .navigation-bar .item.radio.button.selected):
* UserInterface/ResourceSidebarPanel.css:
(.sidebar > .panel.resource > .empty-content-placeholder):
(body.nightly-build .sidebar > .panel.resource > .empty-content-placeholder):
(.sidebar > .panel.resource > .search-bar):
(body.nightly-build .sidebar > .panel.resource > .search-bar):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/ScopeBar.css:
(.scope-bar > li):
(body:not(.nightly-build) .scope-bar > li):
(body:not(.nightly-build) .scope-bar > li:active):
(body:not(.nightly-build) .scope-bar > li.selected):
(body.nightly-build .scope-bar > li):
(body.nightly-build .scope-bar > li:active):
(.scope-bar > li:hover):
(.scope-bar > li.selected):
(.scope-bar > li:active):
(body.nightly-build .scope-bar > li.selected):
* UserInterface/SearchBar.css:
(.search-bar > input[type="search"]):
(body:not(.nightly-build) .search-bar > input[type="search"]):
(body:not(.nightly-build) .search-bar > input[type="search"]::-webkit-input-placeholder):
(body:not(.nightly-build) .search-bar > input[type="search"]:valid):
* UserInterface/SearchBar.js:
(WebInspector.SearchBar):
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid):
(body.nightly-build .content-view.timelines > .data-grid):
(.content-view.timelines > .data-grid th):
(body.nightly-build .content-view.timelines > .data-grid th):
(.content-view.timelines > .data-grid th:not(:last-child)):
(body.nightly-build .content-view.timelines > .data-grid th:not(:last-child)):
(.content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
(body.nightly-build .content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
(.content-view.timelines > .data-grid th.sort-descending):
(body.nightly-build .content-view.timelines > .data-grid th.sort-descending):
(.content-view.timelines > .data-grid > .navigation-bar-container):
(.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
(body.nightly-build .content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Add a nightly-build class so we can hide new UI from nightly WebKit builds.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
Set the nightly-build class on body if we are in a nightly build.
2013-05-03 Timothy Hatcher <timothy@apple.com>
Add stubs for savedURL and appendedToURL.
https://webkit.org/b/115561
rdar://problem/13806055
Reviewed by Joseph Pecoraro.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.savedURL):
(InspectorFrontendAPI.appendedToURL):
2013-05-02 Timothy Hatcher <timothy@apple.com>
Fix the alignment of the titles in the Timelines sidebar.
Reviewed by Joseph Pecoraro.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype._updateTitleElements):
Only create a subtitle if the string has a value, not an empty string.
2013-05-01 Timothy Hatcher <timothy@apple.com>
Make the Dashboard timer and Timeline views more robust when going back/forward.
<rdar://problem/13612025> Dashboard: LCD timer never stops when going back/forward
<rdar://problem/13180009> Recording sometimes never stops because the load event marker is never added
<rdar://problem/13510955> Intermittently, timeline is in "days" after refreshing wsj.com site
Reviewed by Antoine Quint.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager):
(WebInspector.DashboardManager.prototype._mainResourceDidChange):
(WebInspector.DashboardManager.prototype._recordingStopped):
(WebInspector.DashboardManager.prototype._startUpdatingTime):
(WebInspector.DashboardManager.prototype._stopUpdatingTime): Added.
(WebInspector.DashboardManager.prototype._updateTime):
* UserInterface/NetworkGraphCalculator.js:
(WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
(WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
(WebInspector.NetworkTransferDurationCalculator.prototype._upperBound):
Don't return NaN for the bounds.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get firstTimestamp): Added.
Added as a helper to prevent using NaN as the start time.
* UserInterface/ResourceTimelineRecord.js:
(WebInspector.ResourceTimelineRecord.prototype.get startTime):
Use firstTimestamp.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.startRecording):
(WebInspector.TimelineManager.prototype.stopRecording):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype._clear):
(WebInspector.TimelineManager.prototype._addRecord):
(WebInspector.TimelineManager.prototype._startAutoRecording):
(WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
(WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
Fire an event on clear so the timeline view clears even if recording does not start.
Track the main resource object and not the request identifier, since a resource
might not have a request identifier in the back/forward case. Auto stop recording soon
after every record, not just the load event since we don't always have load events.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype._recordsCleared):
Use RecordsCleared event instead of RecordingStarted to clear the view.
2013-05-01 Timothy Hatcher <timothy@apple.com>
Reveal the line (if supplied) when showing a ScriptContentView.
<rdar://problem/13785027> REGRESSION: Extra Scripts: no autoscroll to debugger statement.
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
2013-05-01 Timothy Hatcher <timothy@apple.com>
Don't update the dashboard text unless it has changed.
Also step up the interval we update the time so it does not try to update every 50ms when the
duration is long enough to not matter.
<rdar://problem/13718056> While JS debugging, everything in the inspector window is repainting all the time
Reviewed by Joseph Pecoraro.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager.prototype._startUpdatingTime):
(WebInspector.DashboardManager.prototype._updateTime):
* UserInterface/DashboardView.js:
(WebInspector.DashboardView.prototype.set logs):
(WebInspector.DashboardView.prototype.set issues):
(WebInspector.DashboardView.prototype.set errors):
(WebInspector.DashboardView.prototype.set time):
(WebInspector.DashboardView.prototype.set resourcesCount):
(WebInspector.DashboardView.prototype.set resourcesSize):
(WebInspector.DashboardView.prototype._appendElementForNamedItem.):
2013-05-01 Timothy Hatcher <timothy@apple.com>
Breakpoint context menu items should appear for Extra and Anonymous Scripts.
<rdar://problem/13776299>
Reviewed by Joseph Pecoraro.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._breakpointsBeneathTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
Check for WebInspector.ScriptTreeElement in addition to WebInspector.ResourceTreeElement.
2013-04-30 Timothy Hatcher <timothy@apple.com>
Disable spellcheck and smart quotes in the console prompt.
I'll upstream this to CodeMirror once I get approval from legal.
<rdar://problem/13757709>
Reviewed by Ricky Mondello.
* UserInterface/External/CodeMirror/codemirror.js:
(window.CodeMirror):
2013-04-30 Timothy Hatcher <timothy@apple.com>
Tweak the Toolbar layout code to not hide the Dashboard when sizes are off by one.
This wasn't needed when sub-pixel layout was on, but that was disabled in http://webkit.org/b/149209.
<rdar://problem/13757354> REGRESSION: Toolbar thinks it is collapsed, so dashboard is hidden
Reviewed by Joseph Pecoraro.
* UserInterface/Toolbar.js:
(WebInspector.Toolbar.prototype.customUpdateLayout):
2013-04-30 Timothy Hatcher <timothy@apple.com>
Have dashboard buttons (console summary buttons) do filtering as well.
<rdar://problem/13685685>
Reviewed by Joseph Pecoraro.
* UserInterface/DashboardView.js:
(WebInspector.DashboardView):
(WebInspector.DashboardView.prototype._consoleItemWasClicked):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.get scopeBar):
* UserInterface/Main.js:
(WebInspector.showFullHeightConsole):
(WebInspector.showConsoleView):
2013-04-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12719925> Call stack should show live line number next to file name
Reviewed by Timothy Hatcher.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement):
(WebInspector.GeneralTreeElement.prototype.get tooltipHandledSeparately):
(WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):
(WebInspector.GeneralTreeElement.prototype._updateTitleElements):
Allow clients to handle the tooltip themselves, and to set subtitle as
an element, instead of a string (already possible with mainTitle).
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Set the subtitle as a live location <span>.
(WebInspector.CallFrameTreeElement.prototype.onattach):
Set the tooltip on the entire tree element once it is created.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationTooltip):
Allow an optional prefix before the location string.
2013-04-29 Timothy Hatcher <timothy@apple.com>
Remove an assert from StyleDetailsPanel.prototype.shown.
The shown function can be called multiple times. Just keep the early return.
Also make sure to call StyleDetailsPanel.prototype.hidden in another case.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
* UserInterface/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype.shown):
2013-04-29 Timothy Hatcher <timothy@apple.com>
Skip invalid properties when associating related properties.
<rdar://problem/13752586> DOMNodeStyles.js:981: console.assert(property.overridden); on html5please.com
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._associateRelatedProperties):
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
Don't allow Command+Enter in the Console with an empty expression.
Reviewed by Timothy Hatcher.
* UserInterface/ConsolePrompt.js:
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13616567> Can no longer clear the console with clear()
LogContentView starts listening for an event in the constructor which
was getting removed in close and not being added back. This ContentView
is already treated like a singleton with other events, treat this the
same and just avoid removing event listeners in close.
Reviewed by Timothy Hatcher.
* UserInterface/LogContentView.js:
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13765474> REGRESSION: Console should not clear on reload
The backend sends the frontend a messagesCleared messages for many reasons.
We should not clear the active log when there was a navigation. In those
cases the LogManager will send out a Cleared or SessionStarted event.
It would be messy and brittle to determine if we are in the middle of a
main resource load, so it is easier to do a setTimeout and send an event
if we did not do a navigation.
This works well with all common cases, but breaks:
js> console.log(1); console.clear(); console.log(2);
Filed the follow-up bug to handle fixing this by providing the frontend
with the information it needs in messagesCleared.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
Don't append a blank ConsoleMessage row for console.clear messages.
* UserInterface/LogManager.js:
(WebInspector.LogManager.prototype.messagesCleared):
(WebInspector.LogManager.prototype._mainResourceDidChange):
Defer ActiveLogCleared events so that we don't issue one while we
are reloading the page.
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13764663> Tooltips on live location links are no longer working
Changing the content in mousemove, even if the content was the same,
would cause the tooltip to disappear. Avoid changing the content unless
we absolutely need to.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.updateDisplayString):
Avoid unnecessary content updates.
(WebInspector.SourceCodeLocation.prototype._locationString):
Fix typo causing column numbers to not show up in tooltips.
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13763988> Jump to "rs.js" error location link not live on theverge.com
The URL in the ConsoleMessage is the URL of the Script, which contains
a fragment. The URL of the Resource does not contain the fragment. When
we create a sourceCodeLocation in linkifyLocation we want to get the
resource that has a sidebar item, because that is the resource in the
sidebar that will show a ContentView. So if we get a Script try to get
the Resource for that Script if one exists.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector.linkifyLocation):
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13442566> Console context selector should truncate or generate better names when the names are long
Truncate the context selector quick console nav bar item. And modify
how items are sorted in the context menu to show the frame name if one
is available.
Reviewed by Timothy Hatcher.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype.get displayName):
(WebInspector.HierarchicalPathComponent.prototype.set displayName):
(WebInspector.HierarchicalPathComponent.prototype.get truncatedDisplayNameLength):
(WebInspector.HierarchicalPathComponent.prototype.set truncatedDisplayNameLength):
Separate the display name property from the title element's content, so we
can truncate the display but store the real name.
(WebInspector.HierarchicalPathComponent.prototype._updateElementTitleAndText):
Truncate the display in the navigation bar.
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption):
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement):
Work around an NSMenu issue and truncate in the option text in the context menu.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
(WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
(WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
Set the Frame on the PathComponents to use later for sorting.
2013-04-29 Timothy Hatcher <timothy@apple.com>
Abort earlier when loading completions for a null or undefined value.
<rdar://problem/13764611> JavaScriptLogViewController.js:293: CONSOLEAPI ERROR: Unknown result type: undefined
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
Return early if the RemoteObject is null or undefined. Also release the completion group.
2013-04-29 Timothy Hatcher <timothy@apple.com>
Correct the layout of navigation items when an item has selector arrows.
<rdar://problem/13717922> Layer border toggle button disappears sometimes
Reviewed by Joseph Pecoraro.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype.get minimumWidth): Added.
(WebInspector.HierarchicalPathComponent.prototype.set forcedWidth):
(WebInspector.HierarchicalPathComponent.prototype.get selectorArrows): Added.
(WebInspector.HierarchicalPathComponent.prototype.set selectorArrows): Added.
Account for the width of the selector arrows when using minimum width.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout):
Ask HierarchicalPathComponent for its minimum width.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.updateLayout):
Skip flexible space items since they can take up no space at the minimum width.
2013-04-27 Dean Jackson <dino@apple.com>
<rdar://problem/13441708> Make the Web Inspector work if HiDPI canvas is disabled on OS X
Reviewed by Tim Hatcher.
For <rdar://problem/13437328>, HIGH_DPI_CANVAS was disabled on retina devices, so
the places in the inspector that use a canvas must double the dimensions of
the image buffers they request.
* UserInterface/DashboardView.css:
(.toolbar .dashboard): Since the image being pased in as background might be 2x,
make sure that it uses the element size for the background.
* UserInterface/DashboardView.js: Request a 2x canvas if necessary.
* UserInterface/ImageUtilities.js:
(generateColoredImage): No need to pass in scale, as this method is passed the
correct width and height the caller needs. Use get/setImageData methods.
(generateColoredImagesForCSS): Calculate a scaledWidth/Height to be used throughout
this method. Make sure we create contexts with the correct dimensions, and save/restore
them at full size.
(._drawImageShadow): Use scaledWidth/Height.
(._invertMaskImage): No need to pass in width and height..
(._applyImageMask): Ditto.
(generateEmbossedImages): Calculate a scaledWidth/Height to be used throughout
this method. Make sure we create contexts with the correct dimensions.
* UserInterface/Popover.js:
(WebInspector.Popover.prototype.set frame): Make sure to set the background size when
the frame is updated.
(WebInspector.Popover.prototype._drawBackground): Create a correctly scaled canvas,
and some minor code cleanup.
2013-04-27 Timothy Hatcher <timothy@apple.com>
Fix the speed of typing in the Web Inspector.
ToggleControlToolbarItem regenerates its images every time 'toggled' is set, even
if the flag does not change! And the dock button updates 'toggled' on keydown and
keyup to update when Option is pressed.
<rdar://problem/13756496> REGRESSION: Dock/undock buttons regenerates ever keydown and keyup!
Reviewed by Dean Jackson.
* UserInterface/ToggleButtonNavigationItem.js:
(WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Return early if flag does not change.
2013-04-27 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13143692> Object literal properties should not have popovers
Given test:
var foo = 300, o = { foo: 1 };
var result = o.foo;
This patch makes it so hovering "foo" in the object literal does not
show a popover, it used to show 300. While hovering the variable "foo"
or hovering the property access "o.foo" both show expected values.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._mouseMovedOverEditor):
If we are hovering a JavaScript token inside of a <script> in HTML resources
then the JavaScript state is actually token.state.localState. If it is in
a JavaScript resource then it is just token.state. Pass the most specific
state on our partial "token" object.
(WebInspector.TextEditor.prototype._checkHoveredToken):
Bail for JavaScript object literal properties.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13753106> SourceCodeTextEditor.js:815: JS ERROR: TypeError: undefined is not an object (evaluating this.hoveredToken.bounds)
We have a complete token in tokenWasHovered, however between then and
when the async DebuggerAgent.evaluateOnCallFrame callback happens the
hovered token can change. If it changed, bail, so we don't end up
trying to put the popover on the wrong hovered token or worse
hit this exception and break execution.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
Add asserts and preventative bails in multiple places to catch
similar issues in the future if new paths are added.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13746094> Esc inside a read only editor (JavaScript) should not bring up completion suggestions
Pass on "Esc" if the editor is read only.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13573902> Line numbers in JS console.log / console.error Messages should be live, they jump to the wrong location
<rdar://problem/13702357> Line numbers in JS Console Error Messages should be live, they jump to the wrong location
Make the ConsoleMessage and Profiler links live when possible. Create
a live link with createSourceCodeLocationLink or linkifyLocation.
ConsoleMessages's have line and column information now both at the
base and in stack traces. Profiler nodes don't have column info, but we
can still make them live, just not entirely accurate.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatMessage):
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
Use WebInspector.linkifyLocation with url, line, and column.
* UserInterface/Main.js:
(.showSourceCodeLocation):
(WebInspector.createSourceCodeLocationLink):
(WebInspector.linkifyLocation):
If we have the resource with url passed into linkifyLocation
it creates a link with a sourceCodeLocation. Otherwise it just
creates a basic link with the appropriate styles.
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorDataGridNode.prototype.createCell):
(WebInspector.CSSSelectorDataGridNode.prototype._linkifyLocation):
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype._linkifyLocation):
Use WebInspector.linkifyLocation with url and lineNumber. Add
a FIXME about the missing column number.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13573902> Line numbers in JS console.log / console.error Messages should be live, they jump to the wrong location
<rdar://problem/13702357> Line numbers in JS Console Error Messages should be live, they jump to the wrong location
Give ConsoleMessage a column number. The backend now sends us this info.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
* UserInterface/ConsoleMessage.js:
(WebInspector.ConsoleMessage):
(WebInspector.ConsoleMessage.create):
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl):
(WebInspector.ConsoleMessageImpl.prototype.get levelString):
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
* UserInterface/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13745104> First revealLine to SourceMapResource lineNumber is not working
SourceMapResource's may lazily load their data. In such cases the
ContentView for the resource will be Generic and ignore the revealLine.
Once loaded, the Generic ContentView will be replaced by a better view,
but the line number to reveal has been lost. Save that information in
the cluster content view, as long as the resource has not finished,
and pass it on to the new content view when the resource finishes.
Reviewed by Timothy Hatcher.
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
Mark as finished after updating types.
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.showResponse):
(WebInspector.ResourceClusterContentView.prototype._resourceTypeDidChange):
(WebInspector.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
If a revealLine comes in for a resource not yet finished loading, replay
the reveal line when the resource does finish. If subsequent reveals come
in, the most recent one wins.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor._prettyPrint.prettyPrintAndUpdateEditor):
When a file is formatted we updated the delayed line number to reveal, but
didn't update the delayed text range to select. Do that just in case.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701579> Styles sidebar should show source map location by default instead of on hover
When hovering a link with Command we are showing the original,
unformatted location. So make sure that when clicked we jump
to that exact, unformatted location.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector.createGoToArrowButton):
Handle Command+Click to jump to an unformatted location.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalUnformattedSourceCodeLocation):
Allow showing a source code that forces unformatting.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
(WebInspector.TextEditor.prototype.revealLine):
May need to unformat the resource before revealing the line.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.showSourceCode):
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.showResponse):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.revealLine):
* UserInterface/TextContentView.js:
(WebInspector.TextContentView.prototype.revealLine):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.revealLine):
Pass the forceUnformat option through revealLine paths.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701579> Styles sidebar should show source map location by default instead of on hover
Update the rules for a live location display.
- Show display location by default if there is one.
- Show display locations in italics, original locations display non-italics.
- Command+Mouseover a display location will show the original location.
- Provide different display styles for column numbers. Default to "OnlyIfLarge"
meaning only show column numbers if the column is > 80.
Reviewed by Timothy Hatcher.
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Simplify by using SourceCodeLocation.prototype.tooltipString.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.originalLocationString):
(WebInspector.SourceCodeLocation.prototype.formattedLocationString):
(WebInspector.SourceCodeLocation.prototype.displayLocationString):
Add the new column style parameter. Pass it through to _locationString.
(WebInspector.SourceCodeLocation.prototype.tooltipString):
Always show full URLs and columns in tooltips.
(WebInspector.SourceCodeLocation.prototype._locationString):
Respect the column style when including column numbers.
(WebInspector.SourceCodeLocation.prototype.updateDisplayString):
(WebInspector.SourceCodeLocation.prototype.mouseOverOrMove):
(WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
Update the default value to displayLocation. And the Command+Mouseover to originalLocation.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701576> SASS source map location is wrong on http://html5please.com
CSSRule.selectorList.range has column information, which allows us to
provide a much better location to jump to. So when selectorList and
its SourceRange is available, use that for its start line and column.
Fallback to the CSSRule.sourceLine which is always available.
Reviewed by Timothy Hatcher.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
2013-04-26 Timothy Hatcher <timothy@apple.com>
Update CodeMirror from 3.11+ to 3.12.
* UserInterface/External/CodeMirror/clojure.js: Updated.
* UserInterface/External/CodeMirror/codemirror.js: Updated.
* UserInterface/External/CodeMirror/javascript.js: Updated.
* UserInterface/External/CodeMirror/searchcursor.js: Updated.
* UserInterface/External/CodeMirror/sql.js: Updated.
2013-04-26 Timothy Hatcher <timothy@apple.com>
Make completions work after open brackets.
This also improves things to limit keywords to certain contexts.
<rdar://problem/13746491> Should have JavaScript completion suggestions after a base of all open bracket characters, e.g. "if (tr|"
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
2013-04-26 Timothy Hatcher <timothy@apple.com>
Improve multi-line support in the console prompt.
Pressing return at the end of the expression now does a parse to see if the expression
is ready to evaluate. We will insert a new line if the error is recoverable, otherwise
we will evaluate it. Pressing enter will insert a new line when there is no text, when
the cursor is not at the last position or there is a selection. Command-Enter will now
always evaluate the expression.
<rdar://problem/13747367>
Reviewed by Joseph Pecoraro.
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
(WebInspector.ConsolePrompt.prototype._handleEnterKey.positionsEqual): Added.
(WebInspector.ConsolePrompt.prototype._handleEnterKey.commitTextOrInsertNewLine): Added.
(WebInspector.ConsolePrompt.prototype._handleEnterKey):
(WebInspector.ConsolePrompt.prototype._handleCommandEnterKey):
* UserInterface/InspectorBackendCommands.js:
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptShouldCommitText):
2013-04-25 Timothy Hatcher <timothy@apple.com>
Fix some edge cases with the default JavaScript completions.
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
Correct the check for switch statements which was missing the "type" parts. Use "info"
instead to check for "switch". Substring the suffix, since there are cases it can be longer.
Also prevent keyword completions in var declarations, except for "this".
2013-04-25 Timothy Hatcher <timothy@apple.com>
Properly handle duplicate query parameters and form encoded POST data.
<rdar://problem/13737105> Duplicate query parameters only show the last item in the sidebar data grids
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
Pass true to parseQueryString to get an array of name/value pairs. Then build
the DataGrid using that result.
* UserInterface/Utilities.js:
(parseLocationQueryParameters):
(parseQueryString):
Added arrayResult parameter to allow getting all values, not just the last one.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Improve the sort order for array index completions.
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames.compare):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames):
Try to sort in numerical order first, then as strings.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Allow autocompletion after "({a:1,b:2})" to suggest "a" and "b" properties.
<rdar://problem/5866281> Console should allow autocompletion after symbols like ), ], }
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
Ignore stop characters when we are inside brackets.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Remove TextPrompt and JavaScriptTextPrompt.
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptTextPrompt.css: Removed.
* UserInterface/JavaScriptTextPrompt.js: Removed.
* UserInterface/Main.html:
* UserInterface/TextPrompt.css: Removed.
* UserInterface/TextPrompt.js: Removed.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Update DatabaseContentView to use ConsolePrompt.
Reviewed by Joseph Pecoraro.
* UserInterface/DatabaseContentView.css:
(.database-query-prompt):
(.database-user-query::before, .database-query-prompt::before, .database-query-result::before):
(.database-user-query):
(.database-query-result):
* UserInterface/DatabaseContentView.js:
(WebInspector.DatabaseContentView):
(WebInspector.DatabaseContentView.prototype.shown):
(WebInspector.DatabaseContentView.prototype.updateLayout):
(WebInspector.DatabaseContentView.prototype._messagesClicked):
(WebInspector.DatabaseContentView.prototype.accumulateMatches):
(WebInspector.DatabaseContentView.prototype.tableNamesCallback):
(WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded):
(WebInspector.DatabaseContentView.prototype.consolePromptTextCommited):
(WebInspector.DatabaseContentView.prototype._appendQueryResult):
2013-04-24 Timothy Hatcher <timothy@apple.com>
Implement live completions for the ConsolePrompt.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype.updateCompletions):
(WebInspector.ConsolePrompt.prototype.completionControllerCompletionsNeeded):
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.evaluated.getCompletions):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.evaluated):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNamesFromEvaluate):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
(WebInspector.JavaScriptLogViewController.prototype._clearLastProperties):
Most of this is copied and adapted from JavaScriptTextPrompt. The new part if the caching of property names.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Prevent the Escape key from toggling and triggering a completion.
When the prompt is empty we allow console toggling. When not empty it triggers completion.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
Call the completionControllerShouldAllowEscapeCompletion delegate function.
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype.completionControllerShouldAllowEscapeCompletion):
Added. Return true if the prompt is not empty.
* UserInterface/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut._handleKeyDown):
Don't process the shortcut if default was prevented. We know someone already handled
the key, but didn't call stopPropagation. CodeMirror does this.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Implement default completions for JavaScript in CodeMirrorCompletionController.
Also hook up completions in ConsolePrompt to get the default completions.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchKeywords):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchVariables.filterVariables):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchVariables):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
2013-04-24 Timothy Hatcher <timothy@apple.com>
Hook up the ConsolePrompt delegate to JavaScriptLogViewController.
This makes the prompt work and evaluate results. No auto completion yet.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptHistoryDidChange):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommited.printResult):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommited):
(WebInspector.JavaScriptLogViewController.prototype._evaluateInInspectedWindow.evalCallback):
(WebInspector.JavaScriptLogViewController.prototype._evaluateInInspectedWindow):
Copied from JavaScriptTextPrompt.evalInInspectedWindow.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Start using ConsolePrompt in the QuickConsole.
This simplifies the DOM structure of the QuickConsole and makes resizing happen
automatically using flex layout instead of JavaScript.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.clear):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
(WebInspector.JavaScriptLogViewController.prototype._handleClearShortcut):
(WebInspector.JavaScriptLogViewController.prototype._handleFindShortcut):
(WebInspector.JavaScriptLogViewController.prototype._handleFindNextShortcut):
(WebInspector.JavaScriptLogViewController.prototype._handleFindPreviousShortcut):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
Remove keydown and bind the the keyboard shortcuts to the messages element
and prompt element using specific event handlers.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.shown):
(WebInspector.LogContentView.prototype.searchBarWantsToLoseFocus): Match _escapeWasPressed.
(WebInspector.LogContentView.prototype._activeLogCleared):
(WebInspector.LogContentView.prototype._keyDown):
Removed keyboard shortcut handling that was using private properties
from JavaScriptLogViewController.
* UserInterface/Main.html:
Include ConsolePrompt.js and ConsolePrompt.css.
* UserInterface/QuickConsole.css:
(.quick-console):
(.quick-console > .console-prompt):
(.quick-console > .console-prompt::before):
(.quick-console > .console-prompt > .CodeMirror):
(.quick-console > .navigation-bar):
Simplified by removing redundant elements.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Removed redundant elements.
(WebInspector.QuickConsole.prototype.updateLayout):
Set max-height and stop calling _updateSize.
(WebInspector.QuickConsole.prototype._updateSize): Removed.
2013-04-23 Timothy Hatcher <timothy@apple.com>
Start using CodeMirror for the Console prompt.
This introduces a new class, ConsolePrompt.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/ConsolePrompt.css: Added.
(.console-prompt):
(.console-prompt > .CodeMirror):
(.console-prompt > .CodeMirror-scroll):
* UserInterface/ConsolePrompt.js: Added.
(WebInspector.ConsolePrompt):
(WebInspector.ConsolePrompt.prototype.get element):
(WebInspector.ConsolePrompt.prototype.get delegate):
(WebInspector.ConsolePrompt.prototype.set delegate):
(WebInspector.ConsolePrompt.prototype.get text):
(WebInspector.ConsolePrompt.prototype.set text):
(WebInspector.ConsolePrompt.prototype.get history):
(WebInspector.ConsolePrompt.prototype.set history):
(WebInspector.ConsolePrompt.prototype.get focused):
(WebInspector.ConsolePrompt.prototype.focus):
(WebInspector.ConsolePrompt.prototype.shown):
(WebInspector.ConsolePrompt.prototype._handlePreviousKey):
(WebInspector.ConsolePrompt.prototype._handleNextKey):
(WebInspector.ConsolePrompt.prototype._handleEnterKey):
(WebInspector.ConsolePrompt.prototype._restoreHistoryEntry):
(WebInspector.ConsolePrompt.prototype._historyEntryForCurrentText):
(WebInspector.ConsolePrompt.prototype._rememberCurrentTextInHistory):
2013-04-23 Antoine Quint <graouts@apple.com>
<rdar://problem/13681931> Debugger Popover should not dismiss when mouse is over the popover
We would always dismiss the popover when we'd hover more than 1 second
outside of the marked token in the text editor. This would also happen
if the mouse happened to be over the popover shown for the marked token.
We now track whether the mouse is over the presented popover and only
dismiss the popover when no longer hovering the marked text in case the
mouse is not over it.
Reviewed by Timothy Hatcher.
* UserInterface/EventHandler.js: Added.
(WebInspector.EventHandler):
(WebInspector.EventHandler.prototype.handleEvent):
New utility to handle events in a way that makes it convenient to start
and stop tracking events in the scope of that object without using closures.
* UserInterface/Main.html:
Add the new EventHandler helper.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.hidden):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype.hoveredTokenWasReleased):
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
(WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
(WebInspector.SourceCodeTextEditor.prototype._dismissPopover):
(WebInspector.SourceCodeTextEditor.prototype._trackPopoverEvents):
(WebInspector.SourceCodeTextEditor.prototype._popoverMouseover):
(WebInspector.SourceCodeTextEditor.prototype._popoverMouseout):
2013-04-22 Timothy Hatcher <timothy@apple.com>
Teach CodeMirror about the CSS properties, keywords and colors we support in WebKit.
This keeps syntax highlighting in sync with code completion.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
(WebInspector.CSSCompletions.requestCSSNameCompletions.updateCodeMirrorCSSMode):
(WebInspector.CSSCompletions.requestCSSNameCompletions):
2013-04-21 Timothy Hatcher <timothy@apple.com>
Fix some selection issues in the Console.
Allow command-click on a single row selection to deselect that row the first time.
Before it was requiring two clicks -- because it would become selected twice --
before it would deselect.
Also make sure to clear focusable children after populating delayed results,
like a the DOM tree.
Reviewed by Joseph Pecoraro.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._updateMessagesSelection):
2013-04-21 Timothy Hatcher <timothy@apple.com>
Allow the context menu and clicking on any link in the console.
There are other links in the console besides those with the console-message-url
style class that should work and get the normal context menu.
<rdar://problem/13702031> can't click on a "failed to load" url in console
Reviewed by Joseph Pecoraro.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
(WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
Check only for tag name, not class name.
2013-04-19 Timothy Hatcher <timothy@apple.com>
Allow both text and row selections in the Console.
Text selection switches to row selection if the text selection spans multiple rows.
<rdar://problem/13599610> REGRESSION: Can't select partial text of console output
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._onmousedown):
Call event.stopPropagation() to prevent row selection in the console.
* UserInterface/LogContentView.css:
(.console-message-text > span): Added. Allow text selection.
(.console-message::before, .console-user-command::before, .javascript-prompt::before, .console-group-title::before):
(.console-group-title::before):
Use px instead of em to fix a positioning issue.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._mousedown):
(WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
(WebInspector.LogContentView.prototype._mousemove):
Allow text selection that switches to row selection if the text selection spans multiple rows.
This involves delaying operations from mousedown until later in mousemove or mouseup.
* UserInterface/TreeOutline.js:
(TreeElement.treeElementMouseDown):
Call event.stopPropagation() to prevent row selection in the console.
2013-04-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701561> Improve SourceMap folder tree hierarchies
Implement a few improvements to folder tree hierarchies.
- if there is a sourceRoot in the sourceMap use that as the base for
subpaths, otherwise fallback to the sourceMappingURL (may change).
- if a source is an absolute URL on a different scheme / host, prefix
the subpath with a folder of the host name.
- flatten folder chains in the UI. Makes expanding folders easier.
Reviewed by Timothy Hatcher.
* UserInterface/SourceMap.js:
(WebInspector.SourceMap):
(WebInspector.SourceMap.prototype.get sourceMappingBasePathURLComponents):
(WebInspector.SourceMap.prototype._parseMap):
Save the sourceRoot. And return urlComponents for the basePath, instead of
just the path.
* UserInterface/Utilities.js:
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.get sourceMapDisplaySubpath):
Determine the subpath to display in the UI for this source map resource.
* UserInterface/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement.prototype.onpopulate.combineFolderChain):
(WebInspector.SourceCodeTreeElement.prototype.onpopulate.findAndCombineFolderChains):
(WebInspector.SourceCodeTreeElement.prototype.onpopulate):
Flatten folder chains.
2013-04-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701561> Improve SourceMap folder tree hierarchies
Correctly resolve dots when determining absolute URLs. Previously I had
left in extra "../s", however they should have been removed. And
absoluteURL should handle resolving any dots in the partialURL.
This fixes ASSERTs in Debug WebKit builds where we were calling