blob: f5e76027622aa4bf16aabc7f734a9008ef51a950 [file] [log] [blame]
2016-09-25 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r203437): DOM not updated when editing Box Model values (border, margin, etc)
https://bugs.webkit.org/show_bug.cgi?id=162522
<rdar://problem/28458203>
Reviewed by Brian Burg.
* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._refresh):
(WebInspector.BoxModelDetailsSectionRow.prototype._highlightDOMNode):
(WebInspector.BoxModelDetailsSectionRow.prototype._editingEnded):
Drive-by style fix for `delete`. Also removed unused properties.
(WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode.toggleInlineStyleProperty):
Use priority "important" instead of "!important".
2016-09-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Fix typo in event name
https://bugs.webkit.org/show_bug.cgi?id=162519
Reviewed by Matt Baker.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2016-09-21 Matt Baker <mattbaker@apple.com>
Web Inspector: Improve output of TestHarness.expect* failures
https://bugs.webkit.org/show_bug.cgi?id=162177
<rdar://problem/28367186>
Reviewed by Joseph Pecoraro.
This patch adds specific expectation functions to TestHarness, to better
express intent when writing tests, and to allow more details to be logged
in the event of a failure.
For functions taking both `actual` and `expected` parameters, the `actual`
parameter comes first. This convention simplifies the implementation of
TestHarness, improves the readability of tests involving inequalities,
and is consistent with XCTest assertions.
* UserInterface/Test/TestHarness.js:
(TestHarness):
(TestHarness.prototype.expectThat):
(TestHarness.prototype.expectFalse):
(TestHarness.prototype.expectNull):
(TestHarness.prototype.expectNotNull):
(TestHarness.prototype.expectEqual):
(TestHarness.prototype.expectNotEqual):
(TestHarness.prototype.expectShallowEqual):
(TestHarness.prototype.expectNotShallowEqual):
(TestHarness.prototype.expectEqualWithAccuracy):
(TestHarness.prototype.expectLessThan):
(TestHarness.prototype.expectLessThanOrEqual):
(TestHarness.prototype.expectGreaterThan):
(TestHarness.prototype.expectGreaterThanOrEqual):
New expectation functions, all of which call _expect under the hood.
(TestHarness.prototype._expect):
Helper method which calls pass or fail. Creates a message when no user
message is provided, and logs expected and actual values in the event
of a failure.
(TestHarness.prototype._expectationValueAsString):
(TestHarness.prototype._expectationMessageFormat):
Get a message format string for the expectation type. Used to create
pass/fail message when no user message is provided.
(TestHarness.prototype._expectedValueFormat):
Get a format string for displaying the expected value. Used to create
the "Expected: " failure message line.
2016-09-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reload unexpectedly switches to Storage Tab
https://bugs.webkit.org/show_bug.cgi?id=162323
<rdar://problem/28393954>
Reviewed by Matt Baker.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
We aren't stealing if the ContentView doesn't yet have a parent!
This fixes restoration when switching to the Storage tab at a
later time after a reload.
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel._treeSelectionDidChange):
Don't showRepresentedObject if we aren't visible. That would force this
tab to the foreground and we don't want that. This only happens when
tree elements are removed (main frame navigation) and TreeOutline
selects the next available tree element.
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
Simplify and close all content views. We were missing IndexedDB content views.
2016-09-19 Matt Baker <mattbaker@apple.com>
Unreviewed, reverting changeset https://trac.webkit.org/changeset/206101.
Revert https://bugs.webkit.org/show_bug.cgi?id=162165:
Web Inspector: Make it easier to create a view from an existing DOM element.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Views/View.js:
(WebInspector.View):
2016-09-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Scope sidebar shows "Closure" instead of "Local" when paused in anonymous function
https://bugs.webkit.org/show_bug.cgi?id=162113
<rdar://problem/28348954>
Reviewed by Brian Burg.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame):
Default the functionName to the empty string. This will compare
favorably against other empty function names instead of null.
2016-09-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Color picker in Style sidebar stops working after 1st color change
https://bugs.webkit.org/show_bug.cgi?id=162115
<rdar://problem/28349875>
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.createSwatch):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchActivated):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchDeactivated):
Listen for swatch activated / inactivated events to set some state.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged):
Do not wipe markers if there is an active inline swatch. That
would break behavior for that active swatch.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged):
Eliminate old, incorrect, and now unnecessary code for trying to recover
a textMarker for an inline swatch if the textMarker went away. Besides being
incorrect, if an inline swatch's textMarker goes away, then we will already
have issues, because any active popover will still be connected to the
original marker and swatch element that no longer appear in the editor.
* UserInterface/Views/ColorPicker.js:
(WebInspector.ColorPicker):
(WebInspector.ColorPicker.prototype.set color):
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch.prototype.didDismissPopover):
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
2016-09-18 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: null is not an object (evaluating 'this.listItemElement.classList')
https://bugs.webkit.org/show_bug.cgi?id=162123
<rdar://problem/28352900>
Reviewed by Matt Baker.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.onexpand):
If not attached yet, don't update title. We will update title
when attaching, so this avoids work and avoids doing that
work when the tree element is not fully setup.
(WebInspector.DOMTreeElement.prototype._startEditing):
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
(WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
Switch to the public name instead of the private name.
2016-09-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Implement Copy CSS Selector and Copy Xpath Selector context menus
https://bugs.webkit.org/show_bug.cgi?id=158881
<rdar://problem/8181156>
Reviewed by Matt Baker.
This is based off of the Blink implementation (DOMPresentationUtils)
with some minor modifications and using our own utility methods.
* Localizations/en.lproj/localizedStrings.js:
New context menu strings.
* UserInterface/Base/DOMUtilities.js:
(WebInspector.cssPath):
(WebInspector.cssPathComponent.classNames):
(WebInspector.cssPathComponent):
(WebInspector.xpath):
(WebInspector.xpathIndex.isSimiliarNode):
(WebInspector.xpathIndex):
Build strings for a CSS selector path or XPath path to a node.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
Include copy path context menu items on nodes.
Pseudo elements do not get Copy XPath.
Non-node elements do not get Copy Selector Path.
2016-09-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Make console session dividers more pronounced
https://bugs.webkit.org/show_bug.cgi?id=161938
<rdar://problem/28291166>
Reviewed by Brian Burg.
Instead of using a dim dashed line as a console session separator, include time and reason why
the new session started, which could be one of the following values:
- Console opened (for the first time)
- Console cleared
- Page reloaded
- Page navigated
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.clear):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
Remove previous session if it doesn't have any messages.
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype._mainResourceDidChange):
(WebInspector.LogManager):
Session separator wasn't appended when navigating to a different web page. Always dispatch
SessionStarted events when the main resource changes. Distinguish between reload and navigation.
* UserInterface/Views/ConsoleSession.js:
(WebInspector.ConsoleSession):
(WebInspector.ConsoleSession.prototype.addMessageView):
(WebInspector.ConsoleSession.prototype.append):
(WebInspector.ConsoleSession.prototype.hasMessages):
* UserInterface/Views/LogContentView.css:
(.console-session-header):
(.console-session:first-of-type .console-session-header):
(.console-session:not(:first-of-type)):
(.console-session:not(:first-of-type) .console-session-header):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._sessionStarted):
2016-09-16 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: make Object.awaitEvent synchronously add an event listener
https://bugs.webkit.org/show_bug.cgi?id=162066
Reviewed by Brian Burg.
* UserInterface/Base/Object.js:
(WebInspector.Object.awaitEvent):
Utilize a WebInspector.WrappedPromise to not worry about adding the singleFireEventListener
on the next tick due to the promise construction.
* UserInterface/TestStub.html:
Add WebInspector.WrappedPromise.
2016-09-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Include JavaScript completion for ES6 keywords and global variables
https://bugs.webkit.org/show_bug.cgi?id=162027
Reviewed by Brian Burg.
* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
Include ES6 keywords and provide them when they may be available.
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.set mimeType):
For editors that might want to provide completion for global variables
use the mode with options way of setting the mode for CodeMirror. The
only mode that cares about "globalVars" are the JavaScript variants.
2016-09-15 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: support drag and drop of CSS classes and ids onto DOM nodes
https://bugs.webkit.org/show_bug.cgi?id=16529
Reviewed by Joseph Pecoraro.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.toggleClass.resolvedNode.inspectedPage_node_toggleClass):
(WebInspector.DOMNode.prototype.toggleClass.resolvedNode):
(WebInspector.DOMNode.prototype.toggleClass):
Moved from WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
Added z-index to fix overlapping with selector origin.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._classToggleButtonClicked):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._addClassInputBlur):
Added a setting for auto-expanding the Classes toggle list based on the previous state.
Also renamed the existing _lastSelectedSectionSetting to _lastSelectedPanelSetting since the
setting doesn't have anything to do with the last selected section.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName):
(WebInspector.CSSStyleDetailsSidebarPanel.ToggledClassesDragType):
Added functionality to allow dragging of a className toggle's text (not the checkbox) by
using a custom type, preventing the value from being dropped anywhere except the DOM tree.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName.classNameToggleChanged):
Restructured to use arrow function to avoid function binding.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode.toggleClass): Deleted.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode): Deleted.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass): Deleted.
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._ondragover):
(WebInspector.DOMTreeOutline.prototype._ondrop.callback):
(WebInspector.DOMTreeOutline.prototype._ondrop):
Allow dragging when the dataTransfer object contains the type specified by
WebInspector.CSSStyleDetailsSidebarPanel.ToggledClassesDragType. The value for that type
will be added to the dropped element's classList.
2016-09-15 Matt Baker <mattbaker@apple.com>
Web Inspector: Use more global color variables in TreeOutline and DataGrid
https://bugs.webkit.org/show_bug.cgi?id=161940
<rdar://problem/28292555>
Reviewed by Brian Burg.
* UserInterface/Views/DataGrid.css:
(.data-grid tr.selected):
(.data-grid:matches(:focus, .force-focus) tr.selected):
Use global color vars.
* UserInterface/Views/TreeOutline.css:
(.tree-outline .item.selected):
Use global color vars.
(body.window-inactive .tree-outline .item.selected): Deleted.
Not needed. Unfocused color is the same when window is inactive.
* UserInterface/Views/Variables.css:
(:root):
Add --selected-background-color-unfocused.
2016-09-14 Matt Baker <mattbaker@apple.com>
Web Inspector: Call frame is sometimes not selected in Debugger sidebar on initial pause
https://bugs.webkit.org/show_bug.cgi?id=161835
<rdar://problem/28236680>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
If a tree other than the newly selected element's tree has the selection,
deselect it to prevent multiple tree selections.
(WebInspector.NavigationSidebarPanel.prototype.show): Deleted.
Not needed since the selected tree is no longer tracked. Incidentally,
SidebarPanel.show was only called by SearchSidebarPanel, which doesn't need
to manage selection across multiple tree outlines.
2016-09-14 Matt Baker <mattbaker@apple.com>
Web Inspector: Call Stack tree in the Debugger sidebar should mark the active call frame
https://bugs.webkit.org/show_bug.cgi?id=161945
<rdar://problem/28293451>
Reviewed by Joseph Pecoraro.
Add an indicator for the active call frame tree element, patterned after
Xcode's call stack UI. The indicator should be positioned on the left,
with a fill color based on the tree element's selected/focused state.
* UserInterface/Images/ActiveCallFrame.svg: Added.
Image for "active call frame" tree element status.
* UserInterface/Main.html:
New file.
* UserInterface/Views/CallFrameTreeElement.css: Added.
(.tree-outline .item.call-frame .status):
(.tree-outline .item.call-frame .status > .status-image):
(.tree-outline .item.call-frame.selected .status > .status-image):
(.tree-outline:matches(:focus, .force-focus) .item.call-frame.selected .status > .status-image):
New tree element styles.
* UserInterface/Views/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
(WebInspector.CallFrameTreeElement.prototype.get callFrame):
(WebInspector.CallFrameTreeElement.prototype.get isActiveCallFrame):
(WebInspector.CallFrameTreeElement.prototype.set isActiveCallFrame):
Add property for toggling active call frame indicator.
(WebInspector.CallFrameTreeElement.prototype.onattach):
(WebInspector.CallFrameTreeElement.prototype._updateStatus):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
* UserInterface/Views/Variables.css:
(:root):
New global for dark border color.
2016-09-13 Matt Baker <mattbaker@apple.com>
Web Inspector: Use Array.shallowEqual instead of Object.shallowEqual in more places
https://bugs.webkit.org/show_bug.cgi?id=161867
<rdar://problem/28261328>
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Utilities.js:
(value):
Array.shallowEqual should return false if passed a non-array.
* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.update):
* UserInterface/Models/Color.js:
(WebInspector.Color.prototype.isKeyword):
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype.refresh):
* UserInterface/Models/Geometry.js:
(WebInspector.CubicBezier.prototype.toString):
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set classNames):
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView.prototype._updateShownTabs):
Prefer Array.shallowEqual over Obejct.shallowEqual if the arguments
will always be arrays.
2016-09-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Should be able to pretty print module code (import / export statements)
https://bugs.webkit.org/show_bug.cgi?id=161891
<rdar://problem/28272784>
Reviewed by Yusuke Suzuki.
* Tools/Formatting/EsprimaFormatterDebug.js:
* Tools/Formatting/index.html:
Update the formatting tool to toggle between source type modes.
* UserInterface/Proxies/FormatterWorkerProxy.js:
* UserInterface/Workers/Formatter/FormatterWorker.js:
(FormatterWorker.prototype.formatJavaScript):
Provide a flag to parse the input as a module instead of a script/program.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
Using the formatter here, we may have module scripts in the future.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
Using the formatter for a function is not module source.
* UserInterface/Workers/Formatter/ESTreeWalker.js:
(ESTreeWalker.prototype._walkChildren):
Visit children of Export/Import nodes.
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
Output tokens with appropriate whitespace.
2016-09-13 Chris Dumez <cdumez@apple.com>
Drop support for <isindex>
https://bugs.webkit.org/show_bug.cgi?id=7139
Reviewed by Ryosuke Niwa.
Drop references to isindex.
* UserInterface/Views/DOMTreeElement.js:
2016-09-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Improve clarity of inspector tests by adding TestHarness.expect* functions similar to XCTest
https://bugs.webkit.org/show_bug.cgi?id=161278
<rdar://problem/28039741>
Reviewed by Joseph Pecoraro.
Under the hood they all call TestHarness.expectThat.
* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.expectFalse):
(TestHarness.prototype.expectNull):
(TestHarness.prototype.expectNotNull):
(TestHarness.prototype.expectEqual):
(TestHarness.prototype.expectNotEqual):
(TestHarness.prototype.expectShallowEqual):
(TestHarness.prototype.expectNotShallowEqual):
(TestHarness.prototype.expectEqualWithAccuracy):
(TestHarness.prototype.expectLessThan):
(TestHarness.prototype.expectLessThanOrEqual):
(TestHarness.prototype.expectGreaterThan):
(TestHarness.prototype.expectGreaterThanOrEqual):
2016-09-12 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r205223): Web Inspector: Debugger popover title and code aren't horizontally aligned
https://bugs.webkit.org/show_bug.cgi?id=161848
<rdar://problem/28250703>
Reviewed by Matt Baker.
* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content > .title):
(.popover .debugger-popover-content.function > .body):
Make left and right padding the same.
(.popover .debugger-popover-content.function > .body .CodeMirror pre):
Override left padding defined in CodeMirrorOverrides.css by `.CodeMirror pre` rule.
2016-09-12 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Hide ["PrivateSymbol.concatSlowPath"] and other PrivateSymbols from memory edges
https://bugs.webkit.org/show_bug.cgi?id=156763
Reviewed by Joseph Pecoraro.
* UserInterface/Proxies/HeapSnapshotEdgeProxy.js:
(WebInspector.HeapSnapshotEdgeProxy.prototype.isPrivateSymbol):
Checks that the edge data does not begin with "PrivateSymbol".
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
Only add child nodes if they are not PrivateSymbol nodes.
2016-09-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Object.shallowEqual() should return false if object prototype chains differ
https://bugs.webkit.org/show_bug.cgi?id=161852
Reviewed by Joseph Pecoraro.
Improve Object.shallowEqual so it won't produce false positives.
* UserInterface/Base/Utilities.js:
(value):
Object.shallowEqual should return false for non-array arguments.
Since typeof null === "object", use `instanceof` instead to avoid separate
null checks. Also use Array.shallowEqual fast path when both arguments are arrays.
2016-09-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Combine similar SVG files for Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=161071
Reviewed by Joseph Pecoraro.
* UserInterface/Images/StyleRule.svg: Added.
* UserInterface/Images/StyleRulePseudoElement.svg: Added.
Replaced <defs> with <symbol> give CSS some access to the referenced DOM inside <symbol>.
Since <symbol> uses Shadow DOM, applying CSS variables to the :target element and using
them inside <symbol> allows for variable styling of the content. Using a more basic
`#foo .bar` selector would not be valid since Shadow DOM separates the stylesheet selectors.
* UserInterface/Images/gtk/StyleRule.svg: Added.
* UserInterface/Images/gtk/StyleRulePseudoElement.svg: Added.
* UserInterface/Images/StyleRuleAuthor.svg: Removed.
* UserInterface/Images/StyleRuleInherited.svg: Removed.
* UserInterface/Images/StyleRuleInspector.svg: Removed.
* UserInterface/Images/StyleRuleUser.svg: Removed.
* UserInterface/Images/StyleRuleUserAgent.svg: Removed.
* UserInterface/Images/gtk/StyleRuleAuthor.svg: Removed.
* UserInterface/Images/gtk/StyleRuleInherited.svg: Removed.
* UserInterface/Images/gtk/StyleRuleInspector.svg: Removed.
* UserInterface/Images/gtk/StyleRuleUser.svg: Removed.
* UserInterface/Images/gtk/StyleRuleUserAgent.svg: Removed.
Merged into StyleRule.svg by using IDs in the URL.
* UserInterface/Images/StyleRuleAuthorPseudo.svg: Removed.
* UserInterface/Images/StyleRuleInspectorPseudo.svg: Removed.
* UserInterface/Images/StyleRuleUserAgentPseudo.svg: Removed.
* UserInterface/Images/StyleRuleUserPseudo.svg: Removed.
Merged into StyleRulePseudoElement.svg by using IDs in the URL.
* UserInterface/Views/StyleRuleIcons.css:
(.author-style-rule-icon .icon):
(.author-style-rule-icon.pseudo-element-selector .icon):
(.user-style-rule-icon .icon):
(.user-style-rule-icon.pseudo-element-selector .icon):
(.user-agent-style-rule-icon .icon):
(.user-agent-style-rule-icon.pseudo-element-selector .icon):
(.inspector-style-rule-icon .icon):
(.inspector-style-rule-icon.pseudo-element-selector .icon):
(.inherited-style-rule-icon .icon):
2016-09-11 Devin Rousso <dcrousso+webkit@gmail.com>
REGRESSION (r205754): Web Inspector: Cannot click on links to stylesheets in Rules sidebar
https://bugs.webkit.org/show_bug.cgi?id=161838
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header > textarea):
(.style-declaration-section > .header > .origin):
Added z-index to the non-selector elements of the header. Also limited the size of the
selector textarea to just the size of the displayed selector text.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
Fixed invalid enum value for propertyVisibilityMode.
2016-09-09 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Command-Z doesn't work when editing CSS selectors in Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=159734
Reviewed by Brian Burg.
Replace the current usage of -webkit-user-select with a textarea sized exactly the same as
the selector text which holds the current value of the selector.
* UserInterface/Test.html: Add WrappedPromise.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector.ruleSelectorChanged):
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector):
Ensure that the promise returned by changeRuleSelector is only resolved once the initiated
refresh has completed, ensuring that all matched selectors are parsed and available.
* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header):
(.style-declaration-section.locked > .header::before):
(.style-declaration-section.rule-disabled > .header > .icon):
(.style-declaration-section > .header > textarea):
(.style-declaration-section > .header > textarea:focus):
(.style-declaration-section > .header > textarea:focus + .selector):
(.style-declaration-section > .header > .selector):
(.style-declaration-section > .header > .selector:empty):
(.style-declaration-section > .header > .selector .matched):
(.style-declaration-section:not(.invalid-selector).rule-disabled > .header > .icon): Deleted.
(.style-declaration-section > .header > .selector:empty::before): Deleted.
(.style-declaration-section > .header > .selector:focus): Deleted.
(.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector): Deleted.
(.style-declaration-section > .header > .selector > .matched): Deleted.
(.style-declaration-section.invalid-selector > .header > .icon): Deleted.
(.style-declaration-section.invalid-selector > .header > .selector): Deleted.
Added styling to make textarea invisible when not focused.
Also removed the .invalid-selector styles as the section now refreshed on all changes.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelectorTextKnownToMatch):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
(WebInspector.CSSStyleDeclarationSection.prototype.focusRuleSelector):
(WebInspector.CSSStyleDeclarationSection.prototype.get selectorEditable):
(WebInspector.CSSStyleDeclarationSection.prototype.get _currentSelectorText):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
(WebInspector.CSSStyleDeclarationSection.prototype.get selectorLocked): Deleted.
Added a hidden textarea for modifying the selector of the represented style.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorPreviousRule):
Now use new getters on CSSSTyleDeclarationSection for determining if a selector is editable.
* UserInterface/Views/Variables.css:
(:root):
Added --style-declaration-section-header-padding CSS variable.
2016-09-08 Brian Burg <bburg@apple.com>
Web Inspector: make copy-user-interface-resources.pl easier to read
https://bugs.webkit.org/show_bug.cgi?id=161772
Reviewed by Joseph Pecoraro.
* Scripts/copy-user-interface-resources.pl:
Break long script invocations across multiple lines so that the
options and values are paired together.
2016-09-08 Brian Burg <bburg@apple.com>
Web Inspector: get rid of extra copies of jsmin.py and cssmin.py
https://bugs.webkit.org/show_bug.cgi?id=161770
<rdar://problem/28216813>
Reviewed by Joseph Pecoraro.
* Scripts/copy-user-interface-resources-dryrun.rb:
- Keep track of the original working directory.
- Stage scripts from PrivateHeaders into the temporary directory.
- Add a comment to clarify what this script is simulating.
- Use system instead of exec so we can print an error message.
* Scripts/copy-user-interface-resources.pl:
- Use jsmin.py and cssmin.py from JavaScriptCore instead of
WebInspectorUI. There are no differences between the two copies.
* Scripts/cssmin.py: Removed.
* Scripts/jsmin.py: Removed.
* WebInspectorUI.xcodeproj/project.pbxproj:
- Remove unused copies of jsmin.py and cssmin.py.
2016-09-08 Matt Baker <mattbaker@apple.com>
Web Inspector: TimelineDataGridNode should refresh when graph column is resized
https://bugs.webkit.org/show_bug.cgi?id=161765
<rdar://problem/28215674>
Reviewed by Brian Burg.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.resizerDragging):
Call `DataGridNode.didResizeColumn` for all visible nodes in the columns
to the left and right of the column resizer.
* UserInterface/Views/DataGridNode.js:
(WebInspector.DataGridNode.prototype.didResizeColumn):
Add protected base class method for subclasses to override.
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.didResizeColumn):
Refresh the node's graph when the "graph" column is resized.
Renamed `left/rightCellIndex` -> `left/rightColumnIndex`.
2016-09-08 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Add a button to navigation bar to toggle Control Flow Profiler
https://bugs.webkit.org/show_bug.cgi?id=160973
<rdar://problem/27912606>
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
Add "Fade unexecuted code" and "Do not fade unexecuted code".
* UserInterface/Base/Main.js:
(WebInspector.loaded):
Add a setting to remember whether Code Coverage Profiler is on or off between Web Inspector reloads.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.shown):
(WebInspector.SourceCodeTextEditor.prototype.canShowTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.canShowCoverageHints):
(WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.toggleUnexecutedCodeHighlights):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._proceedPopulateWithContent):
(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
(WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
(WebInspector.SourceCodeTextEditor.prototype._enableScrollEventsForTypeTokenAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._enableScrollEventsForControlFlowAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._disableScrollEventsForControlFlowAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._createTypeTokenScrollEventHandler):
(WebInspector.SourceCodeTextEditor.prototype._createControlFlowScrollEventHandler):
(WebInspector.SourceCodeTextEditor.prototype.canBeFormatted): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.dialogWasDismissed): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.showPopoverForTypes): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._addBreakpointWithEditorLineInfo): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._removeBreakpointWithEditorLineInfo): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._dismissEditingController): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.editingControllerDidStartEditing): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.editingControllerDidFinishEditing): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._getAssociatedScript): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._createTypeTokenAnnotator): Deleted.
Make Code Coverage profiler independent from Type Profiler.
* UserInterface/Views/TextContentView.js:
(WebInspector.TextContentView):
(WebInspector.TextContentView.prototype.get navigationItems):
(WebInspector.TextContentView.prototype.get textEditor): Deleted.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.get hasModified):
(WebInspector.TextEditor.prototype.canShowCoverageHints):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView):
(WebInspector.TextResourceContentView.prototype.get navigationItems):
(WebInspector.TextResourceContentView.prototype._contentDidPopulate):
(WebInspector.TextResourceContentView.prototype._toggleTypeAnnotations):
(WebInspector.TextResourceContentView.prototype._toggleUnexecutedCodeHighlights):
(WebInspector.TextResourceContentView.prototype._enableControlFlowProfilerSettingChanged):
(WebInspector.TextResourceContentView.prototype._contentWillPopulate): Deleted.
* UserInterface/Views/ScriptContentView.js:
(WebInspector.ScriptContentView):
(WebInspector.ScriptContentView.prototype.get navigationItems):
(WebInspector.ScriptContentView.prototype._contentDidPopulate):
(WebInspector.ScriptContentView.prototype._toggleTypeAnnotations):
(WebInspector.ScriptContentView.prototype._toggleUnexecutedCodeHighlights):
(WebInspector.ScriptContentView.prototype._enableControlFlowProfilerSettingChanged):
(WebInspector.ScriptContentView.prototype._contentWillPopulate): Deleted.
Add the [C] icon right next to the [T] (Type Profiler) icon.
2016-09-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Debugger sidebar should include a warning message breakpoints are disabled
https://bugs.webkit.org/show_bug.cgi?id=156719
<rdar://problem/25787932>
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
New strings for breakpoints disabled warning banner.
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .warning-banner):
(.sidebar > .panel.navigation.debugger .warning-banner > a):
Generalize the class name to "warning-banner".
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointsEnabledDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingWillStart):
(WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingStopped):
(WebInspector.DebuggerSidebarPanel.prototype._updateBreakpointsDisabledBanner):
Show / hide a breakpoints disabled warning banner as needed.
Only one banner shows at a time, so either the timing warning
or the generic breakpoints disabled banner will show.
2016-09-07 Johan K. Jensen <johan_jensen@apple.com>
Web Inspector: Show resource timing details in Network waterfall
https://bugs.webkit.org/show_bug.cgi?id=160062
This patch adds a popover to network tab's and timeline tab's resource rows, when hovering
the recordbar. It shows times for the various parts of the resource load if they are available,
or it shows the reason for why not as text (e.g. cached resource, data URI).
Reviewed by Matt Baker.
* Localizations/en.lproj/localizedStrings.js:
Added new strings.
* UserInterface/Main.html:
Include new files.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype.initialLayout):
Updated to use DataGrid property to hide header.
* UserInterface/Views/DataGrid.css:
(.data-grid.no-header > .header-wrapper):
(.data-grid.no-header > .header-wrapper > table.header): Deleted.
Hide the whole DataGrid header.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.get headerVisible):
(WebInspector.DataGrid.prototype.set headerVisible):
Add property to control header visibility, so grid clients aren't forced to manipulate internal grid styles.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView.prototype._processPendingRecords):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype._processPendingRecords):
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
Pass in new parameter for whether or not to show the popover for resources.
* UserInterface/Views/ResourceTimelineDataGridNode.css: Added.
(.resource-timing-popover-content .data-grid):
(.resource-timing-popover-content .data-grid .graph-column > .cell-content):
(.resource-timing-popover-content .data-grid td):
(.resource-timing-popover-content .data-grid td.graph-column):
(.resource-timing-popover-content .data-grid table.data):
(.resource-timing-popover-content .data-grid tr:nth-last-child(2)):
Add styling for the popover.
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode):
(WebInspector.ResourceTimelineDataGridNode.prototype.didAddRecordBar):
(WebInspector.ResourceTimelineDataGridNode.prototype.didRemoveRecordBar):
(WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
Creates the popover for a RecordBar and shows detailed info about segments.
* UserInterface/Views/ResourceTimingPopoverDataGridNode.js: Added.
(WebInspector.ResourceTimingPopoverDataGridNode):
(WebInspector.ResourceTimingPopoverDataGridNode.prototype.get records):
(WebInspector.ResourceTimingPopoverDataGridNode.prototype.get data):
(WebInspector.ResourceTimingPopoverDataGridNode.prototype.get selectable):
(WebInspector.ResourceTimingPopoverDataGridNode.prototype.createCellContent):
DataGridNode for the popover.
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.refreshGraph.createBar):
(WebInspector.TimelineDataGridNode.prototype.refreshGraph):
(WebInspector.TimelineDataGridNode.prototype.didAddRecordBar):
(WebInspector.TimelineDataGridNode.prototype.didRemoveRecordBar):
(WebInspector.TimelineDataGridNode):
Added hooks for notifying subclasses.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar):
(WebInspector.TimelineRecordBar.fromElement):
Added symbol and static method to get the recordBar from a given element.
2016-09-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: clicking Computed Styles sidebar "Show All" checkbox doesn't trigger relayout of Properties section
https://bugs.webkit.org/show_bug.cgi?id=161652
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):
Fixed style issues from r205518 <webkit.org/b/161405>.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype.get regionFlow):
(WebInspector.ComputedStyleDetailsPanel.prototype.get contentFlow):
(WebInspector.ComputedStyleDetailsPanel.prototype.get containerRegions):
Added missing space between semicolon and curly-brace.
(WebInspector.ComputedStyleDetailsPanel.prototype._computedStyleShowAllCheckboxValueChanged):
Added updateLayout call to resize and repopulate the CodeMirror instance.
2016-09-07 Chris Dumez <cdumez@apple.com>
Drop legacy canvas.probablySupportsContext()
https://bugs.webkit.org/show_bug.cgi?id=161692
Reviewed by Alex Christensen.
* UserInterface/Models/NativeFunctionParameters.js:
2016-09-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Avoid linkifying some schemes in console logs
https://bugs.webkit.org/show_bug.cgi?id=161648
<rdar://problem/16413270>
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
Don't linkify some kinds of links.
2016-09-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Allow hiding of CSS variables in Computed styles panel
https://bugs.webkit.org/show_bug.cgi?id=161405
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/CSSProperty.js:
(WebInspector.CSSProperty.prototype.update):
(WebInspector.CSSProperty.prototype.get variable):
Sets a member variable if the CSS property begins with "--", indicating that it is a variable.
(WebInspector.CSSProperty.prototype.get name):
(WebInspector.CSSProperty.prototype.get value):
(WebInspector.CSSProperty.prototype.get priority):
(WebInspector.CSSProperty.prototype.get overridden):
(WebInspector.CSSProperty.prototype.get anonymous):
(WebInspector.CSSProperty.prototype.get inherited):
(WebInspector.CSSProperty.prototype.get valid):
(WebInspector.CSSProperty.prototype.get styleSheetTextRange):
(WebInspector.CSSProperty.prototype.get relatedShorthandProperty):
(WebInspector.CSSProperty.prototype.get relatedLonghandProperties):
Changed styling to be one line getters.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.PropertyVisibilityMode):
Dictionary for the three possible states of CSS property visibility:
- ShowAll
- HideVariables
- HideNonVariables
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get shownProperties):
Added member variable that holds the list of properties resulting from the filter inside
WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get propertyVisibilityMode):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.set propertyVisibilityMode):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):
Added member variable controlling the visibility of CSS properties.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get delegate):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get style):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get showsImplicitProperties):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get sortProperties):
Changed styling to be one line getters.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype.refresh):
(WebInspector.ComputedStyleDetailsPanel.prototype.filterDidChange):
(WebInspector.ComputedStyleDetailsPanel.prototype.initialLayout):
(WebInspector.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged):
Added an additional text editor that displays the list of CSS Variables visible to the
selected node. Also ties this new editor into the refresh/collapse/filter event handlers.
(WebInspector.ComputedStyleDetailsPanel.prototype._handlePropertiesSectionCollapsedStateChanged):
Renamed from WebInspector.ComputedStyleDetailsPanel.prototype._handleCollapsedStateChanged.
(WebInspector.ComputedStyleDetailsPanel.prototype.get regionFlow):
(WebInspector.ComputedStyleDetailsPanel.prototype.get contentFlow):
(WebInspector.ComputedStyleDetailsPanel.prototype.get containerRegions):
Changed styling to be one line getters.
2016-09-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: CodeMirror in resource content view should not show 'CR' characters
https://bugs.webkit.org/show_bug.cgi?id=160465
Reviewed by Brian Burg.
* UserInterface/Views/CodeMirrorOverrides.css:
(.CodeMirror .cm-invalidchar):
Hide all invalid characters.
2016-09-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Cannot undo in breakpoint editor
https://bugs.webkit.org/show_bug.cgi?id=152858
Reviewed by Brian Burg.
* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorBeforeChange):
Since the breakpoint editor only allows a single line of JavaScript, it attempts to remove
all "\n" characters. During an "undo" action, this is not possible.
2016-09-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Enable and enforce some recommended and stylistic ESLint rules
https://bugs.webkit.org/show_bug.cgi?id=161567
Reviewed by Brian Burg.
* .eslintrc:
* UserInterface/Base/EventListener.js:
* UserInterface/Base/EventListenerSet.js:
* UserInterface/Base/MIMETypeUtilities.js:
* UserInterface/Base/Main.js:
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
* UserInterface/Controllers/DOMTreeManager.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Models/CSSKeywordCompletions.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Models/DOMNodeStyles.js:
* UserInterface/Models/Frame.js:
* UserInterface/Models/Geometry.js:
* UserInterface/Models/ProfileNode.js:
* UserInterface/Models/RenderingFrameTimelineRecord.js:
* UserInterface/Models/SourceCodeLocation.js:
* UserInterface/Protocol/RemoteObject.js:
* UserInterface/Views/ApplicationCacheFrameContentView.js:
* UserInterface/Views/ContextMenu.js:
* UserInterface/Views/DOMTreeContentView.js:
* UserInterface/Views/DOMTreeElement.js:
* UserInterface/Views/DataGrid.js:
* UserInterface/Views/GeneralTreeElement.js:
* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
* UserInterface/Views/LogContentView.js:
* UserInterface/Views/OpenResourceDialog.js:
* UserInterface/Views/StyleDetailsPanel.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
* UserInterface/Views/VisualStyleKeywordPicker.js:
* UserInterface/Views/VisualStylePropertyEditor.js:
* UserInterface/Workers/Formatter/FormatterWorker.js:
2016-09-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Run ESLint over UserInterface/Views
https://bugs.webkit.org/show_bug.cgi?id=161564
Reviewed by Brian Burg.
* .eslintrc:
* UserInterface/Views/BoxModelDetailsSectionRow.js:
* UserInterface/Views/ButtonNavigationItem.js:
* UserInterface/Views/CSSStyleDeclarationSection.js:
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
* UserInterface/Views/CodeMirrorAdditions.js:
* UserInterface/Views/CodeMirrorEditor.js:
* UserInterface/Views/CodeMirrorFormatters.js:
* UserInterface/Views/ColorWheel.js:
* UserInterface/Views/ComputedStyleDetailsPanel.js:
* UserInterface/Views/ConsoleMessageView.js:
* UserInterface/Views/ContentViewContainer.js:
* UserInterface/Views/CookieStorageContentView.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
* UserInterface/Views/DOMStorageContentView.js:
* UserInterface/Views/DOMTreeElement.js:
* UserInterface/Views/DOMTreeOutline.js:
* UserInterface/Views/DashboardContainerView.js:
* UserInterface/Views/DataGrid.js:
* UserInterface/Views/DataGridNode.js:
* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/DefaultDashboardView.js:
* UserInterface/Views/FontResourceContentView.js:
* UserInterface/Views/FormattedValue.js:
* UserInterface/Views/GradientEditor.js:
* UserInterface/Views/GradientSlider.js:
* UserInterface/Views/HeapSnapshotContentView.js:
* UserInterface/Views/HeapSnapshotDataGridTree.js:
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
* UserInterface/Views/HoverMenu.js:
* UserInterface/Views/LogContentView.js:
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
* UserInterface/Views/MemoryTimelineView.js:
* UserInterface/Views/NavigationSidebarPanel.js:
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
* UserInterface/Views/NewTabContentView.js:
* UserInterface/Views/ObjectPreviewView.js:
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
* UserInterface/Views/OverviewTimelineView.js:
* UserInterface/Views/Popover.js:
* UserInterface/Views/ProbeSetDetailsSection.js:
* UserInterface/Views/ProfileDataGridNode.js:
* UserInterface/Views/ProfileDataGridTree.js:
* UserInterface/Views/ProfileView.js:
* UserInterface/Views/ResourceSidebarPanel.js:
* UserInterface/Views/RulesStyleDetailsPanel.js:
* UserInterface/Views/ScopeRadioButtonNavigationItem.js:
* UserInterface/Views/ScriptClusterTimelineView.js:
* UserInterface/Views/ScriptDetailsTimelineView.js:
* UserInterface/Views/ScriptProfileTimelineView.js:
* UserInterface/Views/StackedLineChart.js:
* UserInterface/Views/StorageSidebarPanel.js:
* UserInterface/Views/TabBrowser.js:
* UserInterface/Views/TextEditor.js:
* UserInterface/Views/TimelineDataGridNode.js:
* UserInterface/Views/TimelineOverview.js:
* UserInterface/Views/TimelineRecordFrame.js:
* UserInterface/Views/TimelineRecordingContentView.js:
* UserInterface/Views/TimelineTabContentView.js:
* UserInterface/Views/TreeOutline.js:
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
* UserInterface/Views/VisualStylePropertyEditor.js:
* UserInterface/Views/VisualStyleSelectorSection.js:
2016-09-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update ESLint rules and run it over most of UserInterface
https://bugs.webkit.org/show_bug.cgi?id=161561
Reviewed by Brian Burg.
* .eslintrc:
Updated ESLint rules.
* UserInterface/Base/InspectorFrontendHostStub.js:
* UserInterface/Base/Main.js:
* UserInterface/Base/Object.js:
* UserInterface/Base/Platform.js:
* UserInterface/Base/Setting.js:
* UserInterface/Controllers/CSSStyleManager.js:
* UserInterface/Controllers/CodeMirrorCompletionController.js:
* UserInterface/Controllers/CodeMirrorTextKillController.js:
* UserInterface/Controllers/DebuggerManager.js:
* UserInterface/Controllers/DragToAdjustController.js:
* UserInterface/Controllers/ReplayManager.js:
* UserInterface/Controllers/SourceMapManager.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Controllers/TypeTokenAnnotator.js:
* UserInterface/Controllers/VisualStyleCompletionsController.js:
* UserInterface/Debug/Bootstrap.js:
* UserInterface/Debug/UncaughtExceptionReporter.js:
* UserInterface/Models/CSSRule.js:
* UserInterface/Models/CallingContextTree.js:
* UserInterface/Models/CallingContextTreeNode.js:
* UserInterface/Models/ConsoleCommandResultMessage.js:
* UserInterface/Models/CookieStorageObject.js:
* UserInterface/Models/Frame.js:
* UserInterface/Models/Geometry.js:
* UserInterface/Models/IssueMessage.js:
* UserInterface/Models/LayoutTimelineRecord.js:
* UserInterface/Models/MemoryTimeline.js:
* UserInterface/Models/NativeFunctionParameters.js:
* UserInterface/Models/ProfileNode.js:
* UserInterface/Models/RenderingFrameTimelineRecord.js:
* UserInterface/Models/Resource.js:
* UserInterface/Models/ScriptSyntaxTree.js:
* UserInterface/Models/ScriptTimelineRecord.js:
* UserInterface/Models/StackTrace.js:
* UserInterface/Models/TypeSet.js:
* UserInterface/Models/WrappedPromise.js:
* UserInterface/Protocol/InspectorBackend.js:
* UserInterface/Protocol/InspectorFrontendAPI.js:
* UserInterface/Protocol/RemoteObject.js:
* UserInterface/Protocol/ScriptProfilerObserver.js:
* UserInterface/Test/FrontendTestHarness.js:
* UserInterface/Test/InspectorProtocol.js:
* UserInterface/Test/ProtocolTestHarness.js:
* UserInterface/Test/Test.js:
* UserInterface/Test/TestHarness.js:
* UserInterface/Test/TestSuite.js:
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
* UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
2016-09-04 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r205415.
https://bugs.webkit.org/show_bug.cgi?id=161573
Many bots see inspector test failures, rolling out now and
investigating later. (Requested by brrian on #webkit).
Reverted changeset:
"Web Inspector: unify Main.html and Test.html sources and
generate different copies with the preprocessor"
https://bugs.webkit.org/show_bug.cgi?id=161212
http://trac.webkit.org/changeset/205415
2016-09-01 Brian Burg <bburg@apple.com>
Web Inspector: unify Main.html and Test.html sources and generate different copies with the preprocessor
https://bugs.webkit.org/show_bug.cgi?id=161212
<rdar://problem/28017961>
Reviewed by Joseph Pecoraro.
Add a Derived Sources build phase to WebInspectorUI project. Generate
Test.html and Main.html from a combined Inspector.html.in which has preprocessor
macros to include/exclude files not needed by all main resource versions.
Similarly, start generating these Inspector files in WebInspectorUI/CMakeLists.txt.
Move platform-specific bundling commands into PlatformGTK.cmake.
* CMakeLists.txt: Added.
Set up a list of common frontend resources that specific ports can extend, such as
with their own port-specific image resources. This list is the input to port-specific
packaging/bundling scripts. Eventually, minification and concatenation should happen
independently of the specific port by constructing the list of resources dynamically.
To ensure resources are always generated in WebInspectorUI and accessible from WebKit2,
add a dummy target that is always out of date and depends on generated files, causing
them to be built.
Also create a macro to run the preprocessor over Inspector.html.in using various
preprocessor macro definitions. These are customizable by ports to control the
appearance of ENGINEERING_BUILD, which guards resources not meant for shipping builds.
* Configurations/WebInspectorUIFramework.xcconfig:
We need to use preprocessor.pm from WebCore. On Mac, this is a private header.
Teach xcodebuild how to compute WEBCORE_PRIVATE_HEADERS_DIR. This is copied
from WebKit2's configuration files.
* PlatformGTK.cmake: Added.
Add GTK image resources to the resource list. Generate GResource catalog and embedded
C file into DerivedSources. WebKit2 will copy over this file and compile it.
* Scripts/combine-resources.pl:
(concatenateFiles):
Remove the --strip option as this patch removes the only use of it.
* DerivedSources.make: Added.
Generate Test.html and Main.html from the new combined Inspector.html.in.
The 'preprocess_main_resource' rule was copied from WebCore's DerivedSources.make.
* Scripts/cssmin.py: Removed.
* Scripts/jsmin.py: Removed.
These scripts are copied from JavaScriptCore but nobody uses these copies. Remove them.
* Scripts/copy-user-interface-resources-dryrun.rb: Do some cleanup.
- Stage scripts from SRCROOT into the tmpdir so dryrun doesn't require
a previous build to process WebInspectorUI resources.
- Run DerivedSources.make before copying/processing resources.
- Add some environment variables for new phase and group by script affected.
- Add a comment to clarify what this script is simulating.
* Scripts/copy-user-interface-resources.pl:
- Use Main.html and Test.html from DerivedSources/ instead of SRCROOT.
- Copy over Main.html and Test.html manually if not combining resources.
- Remove the command to strip files from Debug/ for production. This is
now redundant with ENGINEERING_BUILD guards in Inspector.html.in.
- Use jsmin.py from JavaScriptCore instead of the local copy.
- Wrap all multi-argument 'system' invocations so they are readable.
* Scripts/generate-webinspectorui-derived-sources: Added.
Added boilerplate script to run DerivedSources.make for Mac port.
* Scripts/preprocess-main-resource.pl: Added.
Trivially invoke the preprocessor on $0 using the given defines.
* UserInterface/Inspector.html.in: Renamed from Source/WebInspectorUI/UserInterface/Main.html.
* UserInterface/Test.html: Removed.
Combine Test.html and Main.html into Inspector.html.in. Add these guards:
- INCLUDE_TEST_RESOURCES: for resources excluded from Main.html.
- INCLUDE_UI_RESOURCES: for resources excluded from model tests.
- ENGINEERING_BUILD: for resources not to be shipped (Debug/ directory).
* WebInspectorUI.xcodeproj/project.pbxproj:
- Add new aggregate target 'Derived Sources' to project 'WebInspectorUI'.
- Add dependency on 'Derived Sources' to WebInspectorUI.framework.
- Remove unused copies of jsmin.py and cssmin.py.
2016-09-03 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Change Cmd-D from kill line to selecting next occurrence
https://bugs.webkit.org/show_bug.cgi?id=161514
Reviewed by Brian Burg.
* UserInterface/Controllers/CodeMirrorTextKillController.js:
(WebInspector.CodeMirrorTextKillController):
(WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
Remove Cmd-D mapping.
* UserInterface/External/CodeMirror/sublime.js:
* UserInterface/Main.html:
Add Sublime Text keybinding support.
* UserInterface/Views/CodeMirrorAdditions.js:
Use Sublime text selectNextOccurrence for Cmd-D instead of deleteLine.
2016-09-03 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add keyboard shortcut for switching to last used dock configuration
https://bugs.webkit.org/show_bug.cgi?id=110328
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector.updateDockedState):
(WebInspector._togglePreviousDockConfiguration):
Added variable for saving the previous dock state, which is used by the new Cmd+Shift+D
shortcut to toggle the docked state between the current and previous states.
(WebInspector._undock):
(WebInspector._dockBottom):
(WebInspector._dockRight):
(WebInspector._updateDockNavigationItems):
(WebInspector._dockedResizerMouseDown):
(WebInspector._dockedResizerMouseDown.dockedResizerDrag):
Make use of new WebInspector.DockConfiguration instead of hardcoded strings.
(WebInspector.DockConfiguration):
Create enum for different WebInspector dock modes:
- Right
- Bottom
- Undocked
2016-09-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Address ESLint undefined variable errors
https://bugs.webkit.org/show_bug.cgi?id=161563
Reviewed by Darin Adler.
* UserInterface/Controllers/CSSStyleManager.js:
(WebInspector.CSSStyleManager.protocolMediaSourceToEnum):
* UserInterface/Models/IssueMessage.js:
(WebInspector.IssueMessage):
* UserInterface/Protocol/InspectorBackend.js:
2016-09-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Address ESLint undefined variable errors in UserInterface/Views
https://bugs.webkit.org/show_bug.cgi?id=161565
Reviewed by Darin Adler.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.columnWidthsMap):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
* UserInterface/Views/TextContentView.js:
(WebInspector.TextContentView.prototype._togglePrettyPrint):
2016-09-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide a way to open an inspector frontend for a remote target
https://bugs.webkit.org/show_bug.cgi?id=161515
<rdar://problem/13182127>
Reviewed by Brian Burg.
* UserInterface/Base/InspectorFrontendHostStub.js:
(WebInspector.InspectorFrontendHostStub.prototype.backendCommandsURL):
Stub new InspectorFrontendHost methods. This value causes the
frontend to load the latest protocol.
* UserInterface/Protocol/LoadInspectorBackendCommands.js:
Use formalized backendCommandsURL, and if empty load the latest protocol.
2016-09-02 Johan K. Jensen <johan_jensen@apple.com>
Web Inspector: NetworkTimelineOverviewGraph.MinimumBarPaddingTime is undefined
https://bugs.webkit.org/show_bug.cgi?id=161510
Reviewed by Brian Burg.
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
(WebInspector.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded):
(WebInspector.NetworkTimelineOverviewGraph):
Calculate the minimumBarPaddingTime in similar ways to TimelineRecordBar,
by using MinimumWidthPixel, MinimumMarginPixel and MinimumDurationPerPixel as the secondsPerPixel value.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Make Minimum/MaximumDurationPerPixel public properties.
2016-09-01 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add visual indicator for shadow content in DOM tree
https://bugs.webkit.org/show_bug.cgi?id=160874
Reviewed by Brian Burg.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
(WebInspector.DOMTreeElement.prototype._buildTagDOM):
Moved "shadow" class to parent element to allow easier styling.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom):
(.tree-outline.dom li):
(.tree-outline.dom .shadow):
(.tree-outline.dom li.parent.shadow::after):
(.tree-outline.dom li.parent.shadow + ol.children.expanded):
(.tree-outline.dom .html-fragment.shadow): Deleted.
2016-09-01 Matt Baker <mattbaker@apple.com>
Web Inspector: Value checks of secondsPerPixel cause errors
https://bugs.webkit.org/show_bug.cgi?id=161304
<rdar://problem/28050070>
Reviewed by Brian Burg.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype.reset):
Clear resource node map, which is used to determine which nodes
to refresh during layout.
(WebInspector.NetworkTimelineView.prototype.layout):
Like OverviewTimelineView, only refresh node graphs when times change.
This prevents refreshing nodes when (endTime - startTime) === 0.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._recordingReset):
TimelineViews must be cleared before calling _updateTimes to avoid
doing layouts in timeline views containing stale data.
2016-09-01 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: add Object.awaitEvent which is like singleFireEventListener but returns a promise
https://bugs.webkit.org/show_bug.cgi?id=161451
Reviewed by Brian Burg.
* UserInterface/Base/Object.js:
(WebInspector.Object.awaitEvent):
(WebInspector.Object.prototype.awaitEvent):
2016-09-01 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Minification detection produces false positives for small resources
https://bugs.webkit.org/show_bug.cgi?id=161159
<rdar://problem/27995306>
Reviewed by Brian Burg.
Improve minification detection algorithm. Minified resources rarely have tabs and usually
have a very few line breaks. Counting tabs as 4 spaces and line breaks as 8 makes minification
detection heuristic more accurate. Increase ratio thresholds to accommodate for the changes in
whitespaceScore.
* UserInterface/Base/Utilities.js:
(isTextLikelyMinified):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._prepareEditorForInitialContent):
(WebInspector.SourceCodeTextEditor.prototype._isLikelyMinified): Deleted.
2016-09-01 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r201454): Web Inspector: Text caret isn't visible when editing an attribute
https://bugs.webkit.org/show_bug.cgi?id=160986
<rdar://problem/27916207>
Reviewed by Brian Burg.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li .selection-area):
(.tree-outline.dom li > span):
Place selection area under the edited field, the way it was before r201454.
2016-09-01 Brian Burg <bburg@apple.com>
Web Inspector: tweak one UIString for "reasons for compositing"
https://bugs.webkit.org/show_bug.cgi?id=161495
<rdar://problem/13718387>
Reviewed by Simon Fraser.
Change "Element establishes a stacking context" to "Element may overlap other compositing element".
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._populateListOfCompositingReasons):
(WebInspector.LayerTreeDetailsSidebarPanel):
2016-08-30 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Remove largest common indentation spacing in debugger popover
https://bugs.webkit.org/show_bug.cgi?id=161417
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content.function > .body):
(.popover .debugger-popover-content.function > .body .CodeMirror):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
Use CodeMirror and FormatterWorker to display a non-editable popover.
* UserInterface/Workers/Formatter/FormatterWorker.js:
(FormatterWorker.prototype.formatJavaScript):
Reworked logic to always attempt to format by wrapping content in "(...)". This is
necessary for unnamed functions, since they are not valid programs by themselves.
2016-08-30 Johan K. Jensen <johan_jensen@apple.com>
Web Inspector: Add resource timing model with timing information
https://bugs.webkit.org/show_bug.cgi?id=161314
Reviewed by Joseph Pecoraro.
Add a resource timing data model and populate it with info from the
response from the backend.
* UserInterface/Controllers/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
Forward timing data from response to Resource.js.
* UserInterface/Main.html: Add new ResourceTimingData.js.
* UserInterface/Test.html: Add new ResourceTimingData.js.
* UserInterface/Models/Resource.js:
(WebInspector.Resource): Instantiate ResourceTimingData object.
(WebInspector.Resource.prototype.get timing):
(WebInspector.Resource.prototype.get firstTimestamp):
(WebInspector.Resource.prototype.get lastTimestamp):
(WebInspector.Resource.prototype.get duration):
(WebInspector.Resource.prototype.get latency):
(WebInspector.Resource.prototype.get receiveDuration):
Update getters to use new timing model.
(WebInspector.Resource.prototype.updateForResponse):
Update timing object with info from response.
(WebInspector.Resource.prototype.markAsFinished):
Log response end time.
* UserInterface/Models/ResourceTimelineRecord.js:
(WebInspector.ResourceTimelineRecord.prototype.get startTime):
(WebInspector.ResourceTimelineRecord.prototype.get activeStartTime):
(WebInspector.ResourceTimelineRecord.prototype.get endTime):
Update getters to use new timing model.
* UserInterface/Models/ResourceTimingData.js: Added.
(WebInspector.ResourceTimingData):
(WebInspector.ResourceTimingData.fromPayload):
(WebInspector.ResourceTimingData.prototype.get startTime):
(WebInspector.ResourceTimingData.prototype.get domainLookupStart):
(WebInspector.ResourceTimingData.prototype.get domainLookupEnd):
(WebInspector.ResourceTimingData.prototype.get connectStart):
(WebInspector.ResourceTimingData.prototype.get connectEnd):
(WebInspector.ResourceTimingData.prototype.get secureConnectionStart):
(WebInspector.ResourceTimingData.prototype.get requestStart):
(WebInspector.ResourceTimingData.prototype.get responseStart):
(WebInspector.ResourceTimingData.prototype.get responseEnd):
(WebInspector.ResourceTimingData.prototype.markResponseEndTime):
Add new ResourceTimingData model and fall back on old timestamps
for when data is unavailable.
2016-08-30 Alex Christensen <achristensen@webkit.org>
Fix WebInspectorUI in internal Windows build
https://bugs.webkit.org/show_bug.cgi?id=161221
rdar://problem/28019023
Reviewed by Brent Fulgham and Joseph Pecoraro.
* WebInspectorUI.vcxproj/WebInspectorUI.make:
* WebInspectorUI.vcxproj/WebInspectorUI.proj:
2016-08-29 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Unify Resource entry context menus
https://bugs.webkit.org/show_bug.cgi?id=161301
Reviewed by Brian Burg.
* UserInterface/Main.html:
Add ContextMenuUtilities.
* UserInterface/Views/ContextMenuUtilities.js: Added.
(WebInspector.appendContextMenuItemsForResource):
Appends the following items to the given WebInspector.ContextMenu object with a WebInspector.Resource:
- Open in New Tab
- Copy Link Address
- Copy as cURL (only if the resource is not from a data URL)
- Save File
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
Make use of new WebInspector.appendContextMenuItemsForResource.
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent):
Make use of new WebInspector.appendContextMenuItemsForResource.
2016-08-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Make localizedString.js diff and commit friendly (UTF16 -> UTF8)
https://bugs.webkit.org/show_bug.cgi?id=28685
<rdar://problem/16460975>
Reviewed by Darin Adler.
* Localizations/en.lproj/localizedStrings.js:
* WebInspectorUI.xcodeproj/project.pbxproj:
Convert the file to UTF-8. Future diffs should display as text.
2016-08-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add protocol version for iOS 10
https://bugs.webkit.org/show_bug.cgi?id=161266
<rdar://problem/28036594>
Rubber-stamped by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
Update missing localized strings.
* Versions/Inspector-iOS-10.0.json: Added.
Protocol for iOS 10.
* UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
Re-generate the legacy backend commands files.
2016-08-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Show IndexedDB Database/ObjectStore/Index data in a details sidebar
https://bugs.webkit.org/show_bug.cgi?id=161180
<rdar://problem/28003417>
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and file.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Instantiate the global details sidebar.
* UserInterface/Views/StorageTabContentView.js:
(WebInspector.StorageTabContentView):
Include the new details sidebar in the Storage tab.
* UserInterface/Controllers/StorageManager.js:
(WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processKeyPath):
Use the protocol generated types.
* UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js: Added.
(WebInspector.IndexedDatabaseDetailsSidebarPanel):
(WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.inspect):
(WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.layout):
(WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype._keyPathString):
Show the sidebar for an IndexedDatabase, ObjectStore, or Index.
Show each section if we can based on the objects we have.
2016-08-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide a way to clear an IndexedDB object store
https://bugs.webkit.org/show_bug.cgi?id=161167
<rdar://problem/27996932>
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
"Clear object store".
* UserInterface/Controllers/StorageManager.js:
(WebInspector.StorageManager.prototype.clearObjectStore):
Provide a wrapper for clearing an object store.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WebInspector.IndexedDatabaseObjectStoreContentView):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get navigationItems):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._clearButtonClicked):
Add a navigation button on ObjectStore content views to clear the object store.
2016-08-26 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Some CSS selectors in the UI aren't escaped
https://bugs.webkit.org/show_bug.cgi?id=151378
Reviewed by Joseph Pecoraro.
* UserInterface/Base/DOMUtilities.js:
(WebInspector.displayNameForNode): Deleted.
(WebInspector.linkifyNodeReference):
Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.get escapedIdSelector):
(WebInspector.DOMNode.prototype.get escapedClassSelector):
(WebInspector.DOMNode.prototype.get displayName):
(WebInspector.DOMNode.prototype.appropriateSelectorFor):
Rework escaping of ids and class names into separate public functions using CSS.escape.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
* UserInterface/Views/DOMTreeDataGridNode.js:
(WebInspector.DOMTreeDataGridNode.prototype._createNameCellDocumentFragment):
Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
* UserInterface/Views/DOMTreeElementPathComponent.js:
(WebInspector.DOMTreeElementPathComponent):
Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
* UserInterface/Views/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype.set layer):
Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype.update):
Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
2016-08-24 Matt Baker <mattbaker@apple.com>
Web Inspector: unexpected cursor changes while dragging ruler handle in rendering frames timeline
https://bugs.webkit.org/show_bug.cgi?id=161101
<rdar://problem/27974117>
Reviewed by Brian Burg.
-webkit-grab(bing) cursor styles shouldn't be applied to the selection
drag element when resizing.
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag):
(.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag:active):
(.timeline-ruler:not(.disabled) > .selection-drag): Deleted.
(.timeline-ruler:not(.disabled) > .selection-drag:active): Deleted.
2016-08-24 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Shift-Tab should unindent selected line
https://bugs.webkit.org/show_bug.cgi?id=159316
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CodeMirrorAdditions.js:
(CodeMirror.keyMap["default"]):
Changed "Shift-Tab" mapping to "indentLess".
2016-08-23 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: resource tree elements should provide "Download File" context menu items
https://bugs.webkit.org/show_bug.cgi?id=158035
Reviewed by Joseph Pecoraro.
Add a context menu item to elements representing resources that
initiates a download of that resource.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.saveDataToFile):
Add support for saving base64 objects.
* UserInterface/Base/MIMETypeUtilities.js:
(WebInspector.fileExtensionForMIMEType):
Returns a file extension for the given MIME type if able.
* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.onattach):
Add contextmenu event listener since superclass onattach call is explicitly not used.
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
Add Save File context menu item.
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype.onattach):
(WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent):
Add contextmenu event listener and Save File context menu item.
2016-08-23 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: No open/copy src resource in context menu
https://bugs.webkit.org/show_bug.cgi?id=159028
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
Add options in the context menu of link attributes of DOM nodes to
- Open in New Tab
- Reveal in Resources Tab
- Copy Link Address
2016-08-23 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add visual editor for spring() timing-function
https://bugs.webkit.org/show_bug.cgi?id=159315
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Base/Utilities.js:
(Number.prototype.maxDecimals):
Limits the number of decimals for the number object via rounding.
* UserInterface/Controllers/CodeMirrorSpringEditingController.js:
(WebInspector.CodeMirrorSpringEditingController.prototype.get initialValue):
(WebInspector.CodeMirrorSpringEditingController.prototype.get cssClassName):
(WebInspector.CodeMirrorSpringEditingController.prototype.popoverWillPresent):
(WebInspector.CodeMirrorSpringEditingController.prototype.popoverDidPresent):
(WebInspector.CodeMirrorSpringEditingController.prototype.popoverDidDismiss):
(WebInspector.CodeMirrorSpringEditingController.prototype._springEditorSpringChanged):
Controller for Spring editors inside CodeMirror instances.
* UserInterface/Models/Geometry.js:
(WebInspector.Spring):
(WebInspector.Spring.fromValues):
(WebInspector.Spring.fromString):
(WebInspector.Spring.prototype.copy):
(WebInspector.Spring.prototype.toString):
(WebInspector.Spring.prototype.solve):
(WebInspector.Spring.prototype.calculateDuration):
Spring data class based on <https://webkit.org/demos/spring/>.
* UserInterface/Models/TextMarker.js:
(WebInspector.TextMarker.Type):
Added Spring marker type.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged.update):
* UserInterface/Views/CodeMirrorTextMarkers.js:
(createCodeMirrorSpringTextMarkers):
* UserInterface/Views/InlineSwatch.css:
(.inline-swatch:matches(.bezier, .spring)):
(.inline-swatch:matches(.bezier, .spring):hover):
(.inline-swatch:matches(.bezier, .spring):active):
(.inline-swatch:matches(.bezier, .spring) > span):
(.inline-swatch.bezier): Deleted.
(.inline-swatch.bezier:hover): Deleted.
(.inline-swatch.bezier:active): Deleted.
(.inline-swatch.bezier > span): Deleted.
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch):
(WebInspector.InlineSwatch.prototype._fallbackValue):
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
(WebInspector.InlineSwatch.prototype._valueEditorValueDidChange):
(WebInspector.InlineSwatch.Type):
Added support for Spring editor Inline Swatches.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._updateEditableMarkers):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
* UserInterface/Views/SpringEditor.css:
(.spring-editor):
(.spring-editor > .spring-preview):
(.spring-editor > .spring-preview > div):
(.spring-editor > .spring-timing):
(.spring-editor > .spring-timing > div):
(.spring-editor > .spring-timing:matches(::before, ::after)):
(.spring-editor > .spring-timing::before):
(.spring-editor > .spring-timing::after):
(.spring-editor > :matches(.spring-preview, .spring-timing) > div):
(.spring-editor > .animate:matches(.spring-preview, .spring-timing) > div):
(.spring-editor > .number-input-container > .number-input-row):
(.spring-editor > .number-input-container > .number-input-row > .number-input-row-title):
(.spring-editor > .number-input-container > .number-input-row > input):
(.spring-editor > .number-input-container > .number-input-row > input[type="range"]):
* UserInterface/Views/SpringEditor.js:
(WebInspector.SpringEditor):
(WebInspector.SpringEditor.prototype.get element):
(WebInspector.SpringEditor.prototype.set spring):
(WebInspector.SpringEditor.prototype.get spring):
(WebInspector.SpringEditor.prototype._handleNumberInputInput):
(WebInspector.SpringEditor.prototype._handleNumberInputKeydown):
(WebInspector.SpringEditor.prototype._handleNumberSliderInput):
(WebInspector.SpringEditor.prototype._handleNumberSliderMousedown):
(WebInspector.SpringEditor.prototype._handleNumberSliderMouseup):
(WebInspector.SpringEditor.prototype._changeSpringForInput):
(WebInspector.SpringEditor.prototype._resetPreviewAnimation):
(WebInspector.SpringEditor.prototype._updatePreviewAnimation):
(WebInspector.SpringEditor.Event):
Visual editor for CSS Spring timing function values. Organized into 5 rows:
- Preview: shows movement of spring and total duration
- Mass: slider and input for "mass" parameter
- Stiffness: slider and input for "stiffness" parameter
- Damping: slider and input for "damping" parameter
- Initial Velocity: slider and input for "initial velocity" parameter
The preview animation will loop indefinitely until the user clicks the animation row
or changes the value of one of the parameters, at which point the duration will also
be recalculated.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.createSpringMarkers):
(WebInspector.TextEditor.prototype.editingControllerForMarker):
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties):
Add support for CSS spring timing functions by allowing parenthesis in comma separated
values so long as there are no commas inside the parenthesis.
* UserInterface/Views/VisualStyleTimingEditor.css:
(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch:matches(.bezier, .spring)):
(.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.spring-value) > .inline-swatch.spring):
(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch.bezier): Deleted.
(.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.bezier-value) > .inline-swatch.bezier): Deleted.
* UserInterface/Views/VisualStyleTimingEditor.js:
(WebInspector.VisualStyleTimingEditor):
(WebInspector.VisualStyleTimingEditor.prototype.get value):
(WebInspector.VisualStyleTimingEditor.prototype.set value):
(WebInspector.VisualStyleTimingEditor.prototype.get synthesizedValue):
(WebInspector.VisualStyleTimingEditor.prototype.parseValue):
(WebInspector.VisualStyleTimingEditor.prototype.get _bezierValue):
(WebInspector.VisualStyleTimingEditor.prototype.set _bezierValue):
(WebInspector.VisualStyleTimingEditor.prototype.get _springValue):
(WebInspector.VisualStyleTimingEditor.prototype.set _springValue):
(WebInspector.VisualStyleTimingEditor.prototype._handleKeywordChanged):
(WebInspector.VisualStyleTimingEditor.prototype._springSwatchValueChanged):
(WebInspector.VisualStyleTimingEditor.prototype.get bezierValue): Renamed.
(WebInspector.VisualStyleTimingEditor.prototype.set bezierValue): Renamed.
Duplicate Bezier custom timing function logic for Spring timing functions.
2016-08-22 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Styles -> Computed -> Box Model shows NaN x NaN for invisible elements
https://bugs.webkit.org/show_bug.cgi?id=161038
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Utilities.js:
Add figureDash variable.
* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement):
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
Moved isNaN check of value to common createElement.
2016-08-22 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual styles sidebar should do something sane for SVG elements
https://bugs.webkit.org/show_bug.cgi?id=148269
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.get ownerSVGElement):
(WebInspector.DOMNode.prototype.isSVGElement):
Climbs ancestor tree to determine if node is an SVG node.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
(WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateDimensionsSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFillSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateStrokeSection):
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container.inactive):
(.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)):
* UserInterface/Views/VisualStyleRelativeNumberSlider.css:
(.visual-style-property-container.number-input-box.relative-number-slider > .relative-slider):
* UserInterface/Views/VisualStyleUnitSlider.css:
(.visual-style-property-container.unit-slider > .visual-style-property-value-container > .slider):
(.visual-style-property-container.unit-slider.opacity > .visual-style-property-value-container > .slider): Deleted.
2016-08-22 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual Styles: "Text -> Content" section should only be visible for pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=158272
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive):
(.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive > *):
(.visual-style-property-container.transition): Deleted.
(.visual-style-property-container.animation): Deleted.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
(WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
2016-08-22 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Entering ":n" in Open Resource Dialog, where n > number of lines, should jump to the last line
https://bugs.webkit.org/show_bug.cgi?id=160840
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TextEditor.js:
(TextEditor.prototype.revealPosition):
Limit the given line and column to the maximum number of lines and the column count on the
resulting line.
2016-08-22 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add indicator to matched selector being a pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=160893
Reviewed by Joseph Pecoraro.
Instead of using "{}" icons for CSS rules, use a "P" icon with the same coloring to identify
that the rule contains a pseudo-selector that is currently being applied to the selected element.
* UserInterface/Base/Utilities.js:
(Array.prototype.toggleIncludes):
Toggles whether or not to include the given value in the array based on its existence or a
"force" flag parameter.
* UserInterface/Images/StyleRuleAuthorPseudo.svg:
* UserInterface/Images/StyleRuleInspectorPseudo.svg:
* UserInterface/Images/StyleRuleUserAgentPseudo.svg:
* UserInterface/Images/StyleRuleUserPseudo.svg:
* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.hasMatchedPseudoElementSelector):
* UserInterface/Models/CSSSelector.js:
(WebInspector.CSSSelector.prototype.isPseudoElementSelector):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
* UserInterface/Views/StyleRuleIcons.css:
(.author-style-rule-icon.pseudo-element-selector .icon):
(.user-style-rule-icon.pseudo-element-selector .icon):
(.user-agent-style-rule-icon.pseudo-element-selector .icon):
(.inspector-style-rule-icon.pseudo-element-selector .icon):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem):
(WebInspector.VisualStyleSelectorTreeItem.prototype.get iconClassName):
(WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):
2016-08-19 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Make an icon for Code Coverage Profiler
https://bugs.webkit.org/show_bug.cgi?id=160872
<rdar://problem/27855650>
Reviewed by Joseph Pecoraro.
Add a "C" icon, similar to the existing "T" (Type Profiler) icon.
"C" can stand for Code Coverage or Control Flow.
* UserInterface/Images/NavigationItemCodeCoverage.svg: Added.
2016-08-19 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Console log counter on the dashboard should be better at displaying large numbers
https://bugs.webkit.org/show_bug.cgi?id=160054
Reviewed by Matt Baker.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Utilities.js:
(Number.abbreviate):
Add logic for formatting a number as "#K", "#M", and "#B" when it is very large.
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView.prototype._updateDisplay):
(WebInspector.DefaultDashboardView.prototype._formatPossibleLargeNumber): Deleted.
(WebInspector.DefaultDashboardView.prototype._setConsoleItemValue):
2016-08-17 Matt Baker <mattbaker@apple.com>
Web Inspector: Network Tab should not layout if not visible
https://bugs.webkit.org/show_bug.cgi?id=160920
<rdar://problem/27876629>
Reviewed by Timothy Hatcher.
Avoid updating the current time when the Network tab is hidden.
The timer, and any debounced timer cancellations, need to be stopped
as soon as the view is hidden.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView.prototype.hidden):
(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
(WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
(WebInspector.NetworkGridContentView):
2016-08-17 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Select elements in DOM hierarchy are misaligned
https://bugs.webkit.org/show_bug.cgi?id=160885
Reviewed by Timothy Hatcher.
* UserInterface/Views/HierarchicalPathComponent.css:
(.hierarchical-path-component > select):
2016-08-17 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: rapid updates to status icons in Visual Styles sidebar causes flicker
https://bugs.webkit.org/show_bug.cgi?id=160887
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleBasicInput.js:
(WebInspector.VisualStyleBasicInput):
* UserInterface/Views/VisualStyleColorPicker.js:
(WebInspector.VisualStyleColorPicker):
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown):
* UserInterface/Views/VisualStylePropertyNameInput.js:
(WebInspector.VisualStylePropertyNameInput):
2016-08-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: DOM nodes shift when hovering over them in Console
https://bugs.webkit.org/show_bug.cgi?id=160789
<rdar://problem/27815600>
Reviewed by Matt Baker.
* UserInterface/Views/FormattedValue.css:
(.formatted-node > .tree-outline.dom ol): Deleted.
2016-08-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Data grid has a double left border when the first column is hidden
https://bugs.webkit.org/show_bug.cgi?id=160723
<rdar://problem/27778081>
Reviewed by Timothy Hatcher.
This patch exploits the fact hiding columns that aren't first in DataGrid don't create double
borders.
* UserInterface/Views/DataGrid.css:
(.data-grid table.header,):
(.data-grid :matches(th, td):first-child):
(@media (-webkit-min-device-pixel-ratio: 2)):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
2016-08-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Do not request Scope Chain lists if section is collapsed (mainly Global Variables)
https://bugs.webkit.org/show_bug.cgi?id=140567
<rdar://problem/19504745>
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
New file name.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
Avoid fetching object properties until the user expands the section.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
Avoid fetching scope variable properties until the user expands the section.
* UserInterface/Views/ObjectPropertiesDetailSectionRow.js: Renamed from Source/WebInspectorUI/UserInterface/Views/DetailsSectionPropertiesRow.js.
(WebInspector.ObjectPropertiesDetailSectionRow):
(WebInspector.ObjectPropertiesDetailSectionRow.prototype.get objectTree):
(WebInspector.ObjectPropertiesDetailSectionRow.prototype._detailsSectionCollapsedStateChanged):
Rename and simplify the class since it always has an ObjectTreeView.
By default the section will auto-expand the ObjectTreeView, however
if provided a details section group, it will defer expanion until
the group expands.
2016-08-16 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: add "Copy Selected" context menu item to Console
https://bugs.webkit.org/show_bug.cgi?id=151836
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
(WebInspector.LogContentView.prototype._mousedown):
2016-08-16 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual Styles: "Text -> Content" isn't escaped
https://bugs.webkit.org/show_bug.cgi?id=158271
Reviewed by Timothy Hatcher.
* UserInterface/Base/Utilities.js:
(String.prototype.hasMatchingEscapedQuotes):
Checks that the given string has property escaped quotes (single or double).
* UserInterface/Views/VisualStyleBasicInput.js:
(WebInspector.VisualStyleBasicInput):
(WebInspector.VisualStyleBasicInput.prototype._handleInputElementInput):
2016-08-16 Joseph Pecoraro <pecoraro@apple.com>
Modernize model objects simple getters
https://bugs.webkit.org/show_bug.cgi?id=160863
Reviewed by Timothy Hatcher.
Simplify the style of many Model objects with basic accessors.
We reduce them to a single line and group them together so
that they can be more easily read at a glance.
* UserInterface/Models/AnalyzerMessage.js:
* UserInterface/Models/ApplicationCacheFrame.js:
* UserInterface/Models/ApplicationCacheManifest.js:
* UserInterface/Models/BreakpointAction.js:
* UserInterface/Models/CSSMedia.js:
* UserInterface/Models/CSSSelector.js:
* UserInterface/Models/CollectionEntry.js:
* UserInterface/Models/CollectionEntryPreview.js:
* UserInterface/Models/DOMStorageObject.js:
* UserInterface/Models/DatabaseObject.js:
* UserInterface/Models/DatabaseTableObject.js:
* UserInterface/Models/ExecutionContext.js:
* UserInterface/Models/GarbageCollection.js:
* UserInterface/Models/IndexedDatabase.js:
* UserInterface/Models/IndexedDatabaseObjectStore.js:
* UserInterface/Models/IndexedDatabaseObjectStoreIndex.js:
* UserInterface/Models/ObjectPreview.js:
* UserInterface/Models/ProbeSet.js:
* UserInterface/Models/PropertyDescriptor.js:
* UserInterface/Models/PropertyPath.js:
* UserInterface/Models/PropertyPreview.js:
* UserInterface/Models/SourceCodePosition.js:
* UserInterface/Models/SourceCodeSearchMatchObject.js:
* UserInterface/Models/SourceCodeTimeline.js:
* UserInterface/Models/StructureDescription.js:
* UserInterface/Models/TextRange.js:
* UserInterface/Models/Timeline.js:
* UserInterface/Models/TimelineRecording.js:
* UserInterface/Models/TypeDescription.js:
2016-08-15 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Large class lists are not easily discoverable with "Classes" quick-toggle
https://bugs.webkit.org/show_bug.cgi?id=160856
Reviewed by Joseph Pecoraro.
* UserInterface/Base/DOMUtilities.js:
(WebInspector.linkifyNodeReference):
Add option to truncate the text of the linkified node.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .class-list-container):
Increase the max-height to partially show additional classes if many are set.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
Trucate the name of inherited nodes so they don't take up as much space in the sidebar.
* UserInterface/Views/VisualStyleSelectorSection.css:
(.details-section.visual-style-selector-section > .header > .current-selector): Deleted.
(.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider > .titles): Deleted.
Removed since they are already inherited.
2016-08-15 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Close button on selected item in Network tab is misaligned
https://bugs.webkit.org/show_bug.cgi?id=160884
Reviewed by Matt Baker.
* UserInterface/Views/NetworkSidebarPanel.css:
(.sidebar > .panel.navigation.network .status .close.status-button):
2016-08-15 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Error/Warning icons are misplaced in the Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=160875
Reviewed by Matt Baker.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder): Deleted.
Reworked to apply more generally to editors without titles.
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container.missing-dependency > .visual-style-property-editor-warning):
(.visual-style-property-container.invalid-value > .visual-style-property-editor-warning):
(.visual-style-property-container:matches(.missing-dependency, .invalid-value) > *:first-child:matches(.visual-style-property-value-container)):
(.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container) > .visual-style-special-property-placeholder):
(.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency): Deleted.
(.visual-style-property-container > .visual-style-property-editor-warning.invalid-value): Deleted.
Reworked class names to be on the element container instead of the icon.
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype.update):
(WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
(WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
(WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
2016-08-15 Saam Barati <sbarati@apple.com>
Web Inspector: Introduce a method to enable code coverage profiler without enabling type profiler
https://bugs.webkit.org/show_bug.cgi?id=160750
<rdar://problem/27793469>
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
2016-08-12 Timothy Hatcher <timothy@apple.com>
Web Inspector: Add application/vnd.api+json as a valid JSON MIME-type
https://bugs.webkit.org/show_bug.cgi?id=160834
rdar://problem/27608536
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CodeMirrorAdditions.js: Add Add application/vnd.api+json to extraJSONTypes.
2016-08-12 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Command-Shift-O causes infinite loop if web page has frames
https://bugs.webkit.org/show_bug.cgi?id=160810
Reviewed by Joseph Pecoraro.
* UserInterface/Views/OpenResourceDialog.js:
(WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
"frame" doesn't change inside the loop.
2016-08-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Support for :lineNumber syntax in Open Resource Dialog
https://bugs.webkit.org/show_bug.cgi?id=159732
<rdar://problem/27684491>
Reviewed by Matt Baker.
Allow the Open Resource Dialog to support line/column syntax.
Other tools allow "<name>:<line>:<column>" syntax, where the
location data at the end is optional. If the <name> portion
is missing, the location can be used for the active content
view, assuming it has text data and has lines.
* UserInterface/Base/Main.js:
(WebInspector.focusedOrVisibleContentView):
Expose a function to access the current focused / visible content view.
(WebInspector.dialogWasDismissed):
Include passing on cookie data when showing a represented object.
* UserInterface/Views/Dialog.js:
(WebInspector.Dialog):
(WebInspector.Dialog.prototype.get visible):
(WebInspector.Dialog.prototype.get delegate):
(WebInspector.Dialog.prototype.get representedObject):
(WebInspector.Dialog.prototype.get cookie):
(WebInspector.Dialog.prototype.dismiss):
* UserInterface/Models/ResourceQueryResult.js:
(WebInspector.ResourceQueryResult):
(WebInspector.ResourceQueryResult.prototype.get cookie):
Include cookie data along with the represented object in matches
and dialog results.
* UserInterface/Controllers/ResourceQueryController.js:
(WebInspector.ResourceQueryController.prototype.executeQuery):
Cut off location data from a query, and stash it on the query result.
A query can be "<name>:<line>:<column>", and the line/column data
becomes cookie data for the resource.
* UserInterface/Views/OpenResourceDialog.js:
(WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
If the query is just ":<line>:<column>" have it jump to a location
in the current content view if applicable.
(WebInspector.OpenResourceDialog.prototype._handleKeydownEvent):
(WebInspector.OpenResourceDialog.prototype._treeSelectionDidChange):
When dismissing, include cookie data.
2016-08-11 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r204264): Web Inspector: Uncaught Exception in Network tab when reloading a web page
https://bugs.webkit.org/show_bug.cgi?id=160781
<rdar://problem/27810452>
Reviewed by Matt Baker.
WebInspector.TimelineDataGrid.prototype.closed was removed in r204264.
Define a stub method on DataGrid so it's available to all its subclasses.
* UserInterface/Views/DataGrid.js:
this._dataGrid.closed()
2016-08-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Should be able to Edit Node Attributes and Styles for non-UserAgent Shadow DOM nodes
https://bugs.webkit.org/show_bug.cgi?id=160762
<rdar://problem/27798271>
Reviewed by Ryosuke Niwa.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.isInUserAgentShadowTree):
(WebInspector.DOMNode.prototype.isShadowRoot):
(WebInspector.DOMNode.prototype.isUserAgentShadowRoot):
(WebInspector.DOMNode.prototype.ancestorShadowRoot):
(WebInspector.DOMNode.prototype.ancestorShadowHost):
Add methods for determining the shadow root, host, and easily
checking the type of shadow tree a node is in.
* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.get editable):
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.get editable):
(WebInspector.DOMTreeElement.prototype._startEditingTarget):
(WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
Allow editing shadow DOM nodes as long as they are not in a UserAgent shadow tree.
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
Disallow "Log Element" on UserAgent shadow tree nodes.
2016-08-10 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Can't click on the lower half of "S" icon in JavaScript Allocations timeline
https://bugs.webkit.org/show_bug.cgi?id=160743
<rdar://problem/27790098>
Reviewed by Timothy Hatcher.
"S" icons are covered by .scroll-container, which has `z-index: calc(var(--z-index-resizer) + 1)`.
Set larger z-index on the "S" icons.
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
(.timeline-overview-graph.heap-allocations > img.snapshot):
2016-08-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Popover for Color Picker should update position when window resizes
https://bugs.webkit.org/show_bug.cgi?id=160321
Reviewed by Brian Burg.
* UserInterface/Views/Popover.js:
(WebInspector.Popover):
(WebInspector.Popover.prototype.set windowResizeHandler):
(WebInspector.Popover.prototype.dismiss):
(WebInspector.Popover.prototype.handleEvent):
(WebInspector.Popover.prototype._addListenersIfNeeded):
The popover already has a set of window listeners, add "resize" to
the list. If there is a resize, invoke a resize handler. The resize
handler will only be called while the popover is visible.
* UserInterface/Views/HeapSnapshotDataGridTree.js:
(WebInspector.HeapSnapshotDataGridTree):
(WebInspector.HeapSnapshotDataGridTree.prototype.get visible):
(WebInspector.HeapSnapshotDataGridTree.prototype.get popoverNode):
(WebInspector.HeapSnapshotDataGridTree.prototype.set popoverNode):
(WebInspector.HeapSnapshotDataGridTree.prototype.get popoverTargetElement):
(WebInspector.HeapSnapshotDataGridTree.prototype.set popoverTargetElement):
(WebInspector.HeapSnapshotDataGridTree.prototype.get popover):
(WebInspector.HeapSnapshotDataGridTree.prototype.willDismissPopover):
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
Update heap snapshot popovers to reposition on window resize.
Set a target to reposition around, since the popover is shared.
* UserInterface/Views/ProbeSetDetailsSection.js:
(WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
Update probe expression popover to respect window resizes.
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype._showPropertyInfoPopover):
Though not yet visible, update this to respect window resizes.
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
Add a window resize handler to reposition over the swatch element.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode):
(WebInspector.LayerTreeDetailsSidebarPanel): Deleted.
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._windowResized): Deleted.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
(WebInspector.TimelineDataGrid): Deleted.
(WebInspector.TimelineDataGrid.prototype.closed): Deleted.
(WebInspector.TimelineDataGrid.prototype.handleEvent): Deleted.
(WebInspector.TimelineDataGrid.prototype._windowResized): Deleted.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
Replace custom popover repositioning with standard Popover handling.
2016-08-07 Matt Baker <mattbaker@apple.com>
REGRESSION (r201245): switching between Computed and Visual Styles panels causes internal error
https://bugs.webkit.org/show_bug.cgi?id=160604
<rdar://problem/27723416>
Reviewed by Timothy Hatcher.
* UserInterface/Views/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype.shown):
Only perform a layout if needed. Subclasses access node style
data during layout, which may not exist yet.
2016-08-06 Matt Baker <mattbaker@apple.com>
REGRESSION (r203253): Node details sidebar flickers while resizing
https://bugs.webkit.org/show_bug.cgi?id=160631
<rdar://problem/27733024>
Reviewed by Timothy Hatcher.
Sidebar panel layouts can be expensive, and should be performed only
when necessary (i.e., when the panel is shown for the first time, or
model data changed while the panel was hidden).
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype._recalculateWidth):
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.shown):
* UserInterface/Views/View.js:
(WebInspector.View.prototype.updateLayoutIfNeeded):
Update the layout if an initial layout was never performed.
2016-08-04 Matt Baker <mattbaker@apple.com>
Web Inspector: UI polish for Edit Breakpoint dialog
https://bugs.webkit.org/show_bug.cgi?id=160566
<rdar://problem/27706378>
Reviewed by Timothy Hatcher.
* UserInterface/Images/BreakpointActionAdd.svg: Removed.
* UserInterface/Images/BreakpointActionRemove.svg: Removed.
Use Plus13.svg and Minus.svg instead.
* UserInterface/Views/BreakpointActionView.css:
(.breakpoint-action-button-container):
(.breakpoint-action-append-button,):
(.breakpoint-action-append-button):
(.breakpoint-action-remove-button):
Button styles should match Xcode.
(.breakpoint-action-append-button:active,): Deleted.
Brightness on activation no longer needed.
* UserInterface/Views/BreakpointActionView.js:
(WebInspector.BreakpointActionView):
Add a button container so buttons can float together.
* UserInterface/Views/BreakpointPopoverController.css:
(.wide .edit-breakpoint-popover-condition > .CodeMirror):
Increase condition field width by the same amount as the popover.
2016-08-04 Matt Baker <mattbaker@apple.com>
Web Inspector: Popover's arrow is misplaced
https://bugs.webkit.org/show_bug.cgi?id=151236
<rdar://problem/23527296>
Reviewed by Brian Burg.
* UserInterface/Views/Popover.js:
(WebInspector.Popover.prototype._setAnchorPoint):
Drive-by style fix.
(WebInspector.Popover.prototype._drawFrame):
Position the arrow so that the arrow head doesn't overlap the
rounded corners of its edge.
2016-08-04 Matt Baker <mattbaker@apple.com>
Web Inspector: Add placeholder graphs to TimelineOverview while editing
https://bugs.webkit.org/show_bug.cgi?id=160485
<rdar://problem/27670755>
Reviewed by Brian Burg.
Insert placeholder elements in TimelineOverview's graph container
when editing instruments. This allows alternating overview graph styles
to be shown for disabled instruments, and ensures that every tree element
has a corresponding element in the overview during dragging/reordering
of instruments (see https://webkit.org/b/157957).
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._startEditingInstruments):
(WebInspector.TimelineOverview.prototype._stopEditingInstruments):
2016-08-04 Matt Baker <mattbaker@apple.com>
Web Inspector: UI polish for Open Quickly and Goto Line dialogs
https://bugs.webkit.org/show_bug.cgi?id=159849
<rdar://problem/27383068>
Reviewed by Brian Burg.
* UserInterface/Images/Search.svg: Added.
Magnifying glass icon.
* UserInterface/Views/GoToLineDialog.css:
(.go-to-line-dialog):
(.go-to-line-dialog > div):
(.go-to-line-dialog > div::before):
* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog > .field):
(.open-resource-dialog > .field::before):
(.open-resource-dialog.has-results > .tree-outline):
(.open-resource-dialog > .tree-outline .item):
Add search icon to left of the input field in both dialogs,
and adjust styles to better match Xcode 8.
* UserInterface/Views/OpenResourceDialog.js:
(WebInspector.OpenResourceDialog):
Remove "input" event listener, as styles are now toggled in _updateFilter.
(WebInspector.OpenResourceDialog.prototype._updateFilter):
Toggle "has-results" and "non-empty" class names.
(WebInspector.OpenResourceDialog.prototype._handleInputEvent): Deleted.
(WebInspector.OpenResourceDialog.prototype._clear): Deleted.
Moved class toggle to _updateFilter.
2016-08-03 Chris Dumez <cdumez@apple.com>
Drop DocumentType.internalSubset attribute
https://bugs.webkit.org/show_bug.cgi?id=160530
Reviewed by Alex Christensen.
Drop DocumentType.internalSubset attribute.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode): Deleted.
* UserInterface/Models/DOMSearchMatchObject.js:
(WebInspector.DOMSearchMatchObject.titleForDOMNode): Deleted.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Deleted.
2016-08-03 Matt Baker <mattbaker@apple.com>
Web Inspector: Cmd-L shortcut for Jump to Line conflicts with selecting URL of inspected page
https://bugs.webkit.org/show_bug.cgi?id=158028
<rdar://problem/26516663>
Reviewed by Timothy Hatcher.
Remove Command-L shortcut for opening the Line Number dialog, since
we already support Control-G.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor): Deleted.
2016-08-01 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Don't set `width:calc(100% - 0px); left:0px` on console messages
https://bugs.webkit.org/show_bug.cgi?id=160428
<rdar://problem/27646033>
Reviewed by Timothy Hatcher.
Console messages inside console.group() are indented. Console messages outside of
console.group() aren't and there is no reason to set inline styles that do nothing
on each one of them.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
2016-08-01 Matt Baker <mattbaker@apple.com>
Web Inspector: Grid column resizer elements positioned incorrectly
https://bugs.webkit.org/show_bug.cgi?id=160311
<rdar://problem/27595586>
Reviewed by Brian Burg.
Perform a resize layout on a newly shown tab content view if the tab
browser was resized before showing the tab.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype.layout):
Mark all recent tab content views (except for the current view)
as needing a resize layout.
(WebInspector.TabBrowser.prototype._tabBarItemSelected):
If the tab browser was resized while the view was hidden, update the
view's layout for the new content view container size.
2016-08-01 Matt Baker <mattbaker@apple.com>
Web Inspector: Waterfall graph in Network tab shows too much whitespace/dead time
https://bugs.webkit.org/show_bug.cgi?id=160373
Reviewed by Timothy Hatcher.
Track the start and end time separate from the ruler to remove
leading/trailing whitespace in the graph. Also prevent network
record bars from being clipped.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.get zeroTime):
Set equal to the ruler start time.
(WebInspector.NetworkGridContentView.prototype.reset):
Reset start and end time.
(WebInspector.NetworkGridContentView.prototype.layout):
Set the initial values for ruler start/zero time if needed.
(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
Set the start time if needed.
Reduce debounce from 250ms to 150ms. This prevents the current time from
exceeding the end time by as wide a margin, while keeping the current
time "timer" from being restarted too frequently.
(WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
Update the ruler end time and schedule a layout.
Add padding equal to the time needed to draw a network bar at minimum width
to prevent bars from being clipped.
2016-07-29 Matt Baker <mattbaker@apple.com>
Web Inspector: Inactive/active network bar segments overlap when latency is zero
https://bugs.webkit.org/show_bug.cgi?id=160147
<rdar://problem/27516007>
Reviewed by Joseph Pecoraro.
TimelineRecordBar should hide the inactive segment when its duration
is less than the minimum displayable size. The active segment can
assume the whole width of the bar.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype.get secondsPerPixel):
Make secondsPerPixel available during TimelineRecordBars.refresh.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.prototype.refresh):
Check inactive duration against the minimum display size,
and add/remove DOM nodes and bar styles as needed.
2016-07-29 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r195456): Web Inspector: Changing tabs in Styles sidebar shouldn't change sidebar's width
https://bugs.webkit.org/show_bug.cgi?id=159646
<rdar://problem/27286338>
Reviewed by Brian Burg.
Remember sidebar width on per tab basis. For example, Node, Styles, and Layers sidebar panels in
Elements tab should all have the same width, but Resource sidebar panel in Debugger tab should NOT
share its width Element tab's sidebar.
TabContentView stores the width but TabBrowser manages saving and restoring it.
The same way collapsed sidebar state is handled.
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.set collapsed):
Don't change sidebar's width when sidebar panels change.
(WebInspector.Sidebar.prototype._recalculateWidth):
(WebInspector.Sidebar.prototype.set selectedSidebarPanel): Deleted.
Pass newWidth as an argument so it can be saved in TabBrowser.
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel): Deleted.
(WebInspector.SidebarPanel.prototype.get savedWidth): Deleted.
(WebInspector.SidebarPanel.prototype.sizeDidChange): Deleted.
Remove the per sidebar panel width setting that was added in r195456.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype._detailsSidebarWidthDidChange):
(WebInspector.TabBrowser.prototype._showDetailsSidebarPanelsForTabContentView):
* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView):
(WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting):
Store details sidebar width on TabContentView.
2016-07-29 Matt Baker <mattbaker@apple.com>
Web Inspector: Assertion in NetworkGridContentView when updating data grid for the first time
https://bugs.webkit.org/show_bug.cgi?id=160330
<rdar://problem/27600905>
Reviewed by Brian Burg.
When the first grid node is added, a view layout and current time update
are scheduled. A view layout occurring before the current time is updated
should be skipped, since the ruler end time hasn't been set.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView.prototype.layout):
Skip layout until current time is updated.
(WebInspector.NetworkGridContentView.prototype._update):
Remove unused variables `startTime` and `endTime`. Don't force a layout
if the elapsed time is zero.
2016-07-28 Chris Dumez <cdumez@apple.com>
Parameters to Event.initEvent() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160320
Reviewed by Darin Adler.
Update WebInspector accordingly.
* UserInterface/Models/NativeFunctionParameters.js:
2016-07-28 Chris Dumez <cdumez@apple.com>
First parameter to canvas.getContext() / probablySupportsContext() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160312
Reviewed by Darin Adler.
Update WebInspector accordingly.
* UserInterface/Models/NativeFunctionParameters.js:
2016-07-28 Matt Baker <mattbaker@apple.com>
Web Inspector: Hiding a column which contains a TimelineRuler as the headerview, doesn't hide the headerView
https://bugs.webkit.org/show_bug.cgi?id=160093
<rdar://problem/27499300>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._positionHeaderViews):
Remove early return so that a header view in a hidden column will have
its width resized to zero, matching the column.
2016-07-28 Johan K. Jensen <johan_jensen@apple.com>
Web Inspector: Waterfall view should be visible in Network tab and Network Timeline
https://bugs.webkit.org/show_bug.cgi?id=160061
Reviewed by Joseph Pecoraro.
Adds a Timeline-column (waterfall) to the Network tab and Network Timeline.
* Localizations/en.lproj/localizedStrings.js:
Add "Timeline" localized string.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
Add the Timeline-column with a TimelineRuler as the headerview,
and properties for updating current time.
(WebInspector.NetworkGridContentView.prototype.get secondsPerPixel):
(WebInspector.NetworkGridContentView.prototype.get startTime):
(WebInspector.NetworkGridContentView.prototype.get currentTime):
(WebInspector.NetworkGridContentView.prototype.get endTime):
Acting as a graphDataSource used by TimelineDataGridNode.
(WebInspector.NetworkGridContentView.prototype.shown):
(WebInspector.NetworkGridContentView.prototype.reset):
(WebInspector.NetworkGridContentView.prototype.layout):
Refresh graphs and update the TimelineRuler on layout changes.
(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
Add listeners for when resources are finished to stop the timer.
(WebInspector.NetworkGridContentView.prototype._update):
(WebInspector.NetworkGridContentView.prototype._startUpdatingCurrentTime):
(WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
Adding a timer which updates the TimelineRuler and the layout
if any non-finished requests are running.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
Add the Timeline-column with a TimelineRuler as the headerview.
(WebInspector.NetworkTimelineView.prototype.get secondsPerPixel):
(WebInspector.NetworkTimelineView.prototype.layout):
Refresh graphs on layout changes.
* UserInterface/Views/TimelineDataGrid.css:
(.tree-outline.timeline-data-grid .item:hover .subtitle):
(.data-grid.timeline th):
(.data-grid.timeline th.graph-column > .timeline-ruler):
(.data-grid.timeline td.graph-column):
(.data-grid.timeline td.graph-column > .cell-content):
(.data-grid.timeline td.graph-column .timeline-record-bar):
2016-07-28 Chris Dumez <cdumez@apple.com>
Parameter to table.deleteRow() / body.deleteRow() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160307
Reviewed by Ryosuke Niwa.
Update WebInspector accordingly.
* UserInterface/Models/NativeFunctionParameters.js:
2016-07-28 Chris Dumez <cdumez@apple.com>
2 first parameters to input.setSelectionRange() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160310
Reviewed by Alex Christensen.
Update WebInspector accordingly.
* UserInterface/Models/NativeFunctionParameters.js:
2016-07-28 Chris Dumez <cdumez@apple.com>
Parameter to tr.deleteCell() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160308
Reviewed by Ryosuke Niwa.
Report tr.deleteCell() parameter as mandatory.
* UserInterface/Models/NativeFunctionParameters.js:
2016-07-27 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Visual Styles Sidebar should have only one column when it's narrow
https://bugs.webkit.org/show_bug.cgi?id=159905
<rdar://problem/27413248>
Reviewed by Joseph Pecoraro.
Many CSS values often get clipped in the two colunm layout. Change the layout to one colunm
when visual style rows get too narrow.
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row):
(.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .metric-section-row):
Wrap all rows except for position/padding/margin controls.
(.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row > .visual-style-property-container:not(.layout-reversed):last-child): Deleted.
Margin between the first and the second column doesn't make sense one column layout.
Set the margin in .visual-style-property-container instead.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows):
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container):
2016-07-27 Joseph Pecoraro <pecoraro@apple.com>
[Mac] Web Inspector: CodeMirror-based editor bindings for Home and End don't match system behavior
https://bugs.webkit.org/show_bug.cgi?id=160267
<rdar://problem/27575553>
Reviewed by Brian Burg.
* UserInterface/Views/CodeMirrorEditor.js:
(WebInspector.CodeMirrorEditor.create):
(WebInspector.CodeMirrorEditor):
Add some key map overrides for Home and End to better match system Mac
behavior. This scrolls to the start or end of a document and does not
change the cursor position.
2016-07-27 Brian Burg <bburg@apple.com>
Regression(r203535): Uncaught Exception: TypeError: Not enough arguments at LayerTreeDataGridNode.js:47
https://bugs.webkit.org/show_bug.cgi?id=160187
<rdar://problem/27540435>
Reviewed by Eric Carlson.
After r203535, document.createTextNode() requires an argument.
* UserInterface/Views/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
Since this use-site is for creating a cell in an unknown column,
initialize it to '–'. Previously it would have been the string
"undefined" or empty.
2016-07-24 Matt Baker <mattbaker@apple.com>
Web Inspector: Filtering is broken in the Overview timeline view
https://bugs.webkit.org/show_bug.cgi?id=160152
<rdar://problem/27517481>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.filterableDataForColumn):
Non-resource nodes should be filtered based on their display name.
2016-07-23 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r202876): Web Inspector: Switching away from Console tab with a lot of messages is slow
https://bugs.webkit.org/show_bug.cgi?id=160112
Reviewed by Joseph Pecoraro.
Showing NavigationSidebar before removing previous TabContentView can be very slow when
TabContentView is ConsoleTabContentView with a lot of messages. The order of operations
(show sidebar, change content view, show sidebar) caused more forced layouts. This patch
reduces the number of forced layouts by changes the order to: show content view, show sidebar,
show sidebar.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser.prototype._tabBarItemSelected):
2016-07-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Pausing when Debugger tab is closed opens tab in wrong state
https://bugs.webkit.org/show_bug.cgi?id=159946
<rdar://problem/27429886>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
At the end of construction, update the UI to match the current state
of the world. Such as updating the UI if we are paused, or if the
Timeline is capturing and we are temporarily disabling breakpoints.
2016-07-15 Timothy Hatcher <timothy@apple.com>
Web Inspector: Make Open Quickly and Goto Line dialogs match Xcode 8
https://bugs.webkit.org/show_bug.cgi?id=159823
rdar://problem/27376501
Reviewed by Brian Burg.
* UserInterface/Views/GoToLineDialog.css:
(.go-to-line-dialog):
(.go-to-line-dialog > div > input):
(.go-to-line-dialog > div > input::placeholder):
(.go-to-line-dialog > div > img):
(.go-to-line-dialog > div): Deleted.
* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog):
(.open-resource-dialog > .field):
(.open-resource-dialog > .field > input):
(.open-resource-dialog > .field > input::placeholder):
(.open-resource-dialog > .field > img):
(.open-resource-dialog > .tree-outline .item): Deleted.
(.open-resource-dialog > .tree-outline .item:first-child): Deleted.
2016-07-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Rename CCTNode to CallingContextTreeNode
https://bugs.webkit.org/show_bug.cgi?id=159782
Reviewed by Timothy Hatcher.
* UserInterface/Models/CallingContextTree.js:
* UserInterface/Models/CallingContextTreeNode.js:
Extra to its own file and rename.
* UserInterface/Main.html:
* UserInterface/Test.html:
* UserInterface/TestStub.html:
Include the new file.
* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode):
* UserInterface/Views/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
Rename shorthand "cctnode".
2016-07-14 Matt Baker <mattbaker@apple.com>
Web Inspector: SidebarPanel classes should use View.layout instead of "refresh"
https://bugs.webkit.org/show_bug.cgi?id=159745
<rdar://problem/27335252>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.set applicationCacheFrame):
Use needsLayout.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.layout):
Move refresh logic to layout.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._styleSheetAddedOrRemoved):
Defer layout to coalesce updates.
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Deleted.
* UserInterface/Views/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel.prototype.set domNode):
Use needsLayout.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
Move refresh logic to layout.
* UserInterface/Views/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel.prototype.shown): Deleted.
Base class already forces a layout when shown.
(WebInspector.DetailsSidebarPanel.prototype.needsRefresh): Deleted.
No longer needed.
(WebInspector.DetailsSidebarPanel.prototype.refresh): Deleted.
Renamed layout.
(WebInspector.DetailsSidebarPanel): Deleted.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype.supportsDOMNode):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._layerTreeDidChange):
Use needsLayout.
(WebInspector.LayerTreeDetailsSidebarPanel.prototype.shown):
Base class already forces a layout when shown.
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
Use needsLayout.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.set callFrame):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpression):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._removeWatchExpression):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._clearAllWatchExpressions):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._refreshAllWatchExpressionsButtonClicked):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._didEvaluateExpression):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._mainResourceDidChange):
Use needsLayout.
2016-07-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Maintain selected function when switching between different profile representations
https://bugs.webkit.org/show_bug.cgi?id=159778
<rdar://problem/27355913>
Reviewed by Timothy Hatcher.
* UserInterface/Models/CallingContextTree.js:
(WebInspector.CCTNode):
(WebInspector.CCTNode.prototype.get hash):
(WebInspector.CCTNode.prototype.findOrMakeChild):
(WebInspector.CCTNode.prototype.equals):
Expose the hash so two nodes can be compared cheaply.
* UserInterface/Views/ProfileView.js:
(WebInspector.ProfileView.prototype._repopulateDataGridFromTree):
(WebInspector.ProfileView.prototype._restoreSharedState):
(WebInspector.ProfileView.prototype._dataGridNodeSelected):
Share data between multiple ProfileViews. Currently just remembering
and restoring the selected function.
* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView):
(WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
Include the shared data when constructing new ProfileViews.
2016-07-13 Matt Baker <mattbaker@apple.com>
Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.showsFilterBar')
https://bugs.webkit.org/show_bug.cgi?id=159696
<rdar://problem/27312356>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
Early return if content view not visible, since the event is sent during
tab teardown and the current TimelineView may be invalid.
2016-07-12 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION(r192789): Web Inspector: Log Value context menu appears twice
https://bugs.webkit.org/show_bug.cgi?id=159681
<rdar://problem/27304804>
Reviewed by Brian Burg.
In r192789 contextmenu events may bubble up so that multiple handlers
may append ContextMenuItems. In nested ObjectTrees / ObjectPreviews
this could result in duplicate items. Add a flag on the bubbling event
so that we only include Object Tree context menu items for the deepest
part of the Object Tree, but still allow bubbling up to the root.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
(WebInspector.ObjectPreviewView):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
2016-07-12 Johan K. Jensen <johan_jensen@apple.com>
Web Inspector: ER: Copy as cURL
https://bugs.webkit.org/show_bug.cgi?id=159380
Reviewed by Joseph Pecoraro.
Inspired by https://chromium.googlesource.com/chromium/src/+/b7c1115dbae65030ad96e773d9a270465a05f5c4/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
This "Copy as cURL" feature only approximates the original request as only some parts of
that request is known to the frontend.
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix.escapeCharacter):
(WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix):
(WebInspector.Resource.prototype.generateCURLCommand):
(WebInspector.Resource):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
2016-07-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Use separate files for TreeOutline/TreeElement and DataGrid/DataGridNode
https://bugs.webkit.org/show_bug.cgi?id=159659
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/Views/DataGrid.js:
* UserInterface/Views/DataGridNode.js: Added.
* UserInterface/Views/TreeElement.js: Added.
* UserInterface/Views/TreeOutline.js:
Extra the component classes to their own file.
2016-07-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ProfileView sometimes shows Top Functions data despite Top Functions being disabled
https://bugs.webkit.org/show_bug.cgi?id=159660
<rdar://problem/27291647>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView.prototype._profileOrientationButtonClicked):
Pass the value of the setting, not the setting itself.
2016-07-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Transition and Animation sections in Visual Styles sidebar should have more spacing to their left
https://bugs.webkit.org/show_bug.cgi?id=159633
<rdar://problem/27281805>
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.visual-style-property-container.animation):
2016-07-08 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Command-Shift-S in the Styles sidebar should always show the save dialog
https://bugs.webkit.org/show_bug.cgi?id=156858
<rdar://problem/25859098>
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
2016-07-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector, regression: JS/JSON pretty-printing sporadically broken in STP8
https://bugs.webkit.org/show_bug.cgi?id=159511
<rdar://problem/27218435>
Reviewed by Timothy Hatcher.
* UserInterface/Workers/Formatter/FormatterWorker.js:
(FormatterWorker.prototype.formatJavaScript):
Attempt to format invalid JSON that can be evaluated to an object.
2016-07-07 Timothy Hatcher <timothy@apple.com>
Web Inspector: scrolled Snapshot list is reset to top and drawn blank after switching back from Snapshot Comparison view
https://bugs.webkit.org/show_bug.cgi?id=158218
rdar://problem/26545000
Reviewed by Brian Burg.
* UserInterface/Views/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get scrollableElements): Added.
A default implementation for all cluster views.
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.get scrollableElements): Deleted.
This was duplicated in the class, removed one.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView): Initialize _snapshotListScrollTop.
(WebInspector.HeapAllocationsTimelineView.prototype.get scrollableElements): Added. Return elements
based on what is showing.
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList): Restore the scroll position
of the DataGrid after it is added to the view.
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord): Save the scroll position
of the DataGrid before it is removed from the view.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Deleted. Handled by the base class now.
2016-07-06 Timothy Hatcher <timothy@apple.com>
Web Inspector: REGRESSION: Hitting ⌘T in Web Inspector no longer opens in new tab in Safari
https://bugs.webkit.org/show_bug.cgi?id=159487
rdar://problem/27188047
Change Command-T to Command-Option-T to open a new tab.
I also changed Command-1, etc. to Command-Option-1, etc. to switch tabs. The number commands
conflicted similarly with Safari and didn't work for me as a Web Inspector shortcut at all.
We can't use Command-Shift because of Command-Shift-3 and Command-Shift-4 for screenshots.
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2016-07-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: sometimes reloading a page with main resource selected will show an empty content view
https://bugs.webkit.org/show_bug.cgi?id=158069
<rdar://problem/26516710>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView):
Continue until we get one that works.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
Avoid showing a content view for a background tab if it could steal
the content view from a foreground tab. This is a targeted fix for
reload + tab content view loading behavior. A more general fix would
be reducing the work done by non-foreground tabs.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser.prototype._tabBarItemSelected):
Update navigation sidebar first so it is set when showing the TabContentView.
2016-07-06 Brian Burg <bburg@apple.com>
Web Inspector: Uncaught Exception reporter should include the currently dispatching protocol event or request/response if applicable
https://bugs.webkit.org/show_bug.cgi?id=159320
<rdar://problem/27117754>
Reviewed by Timothy Hatcher and Joseph Pecoraro.
Keep track of the currently dispatched protocol response or protocol event and make
them available to the uncaught exception reporter. If an internal exception is reported
while dispatching an event or response, dump the protocol message(s) into the pre-filled
bug report.
* UserInterface/Debug/UncaughtExceptionReporter.js:
(stringifyAndTruncateObject): Added.
Rearrange the code that generates the pre-filled report so it's easier to add optional sections.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackendClass.prototype.get currentDispatchState): Expose the dispatching state.
(InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
(InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
Store the originating command request with the pendingResponse data so that we can examine
the originating request if the response causes an error. This will cause request message objects
to be garbage-collected after their responses are dispatched rather than when the request is sent.
But, I don't forsee this being a performance problem since we should always get a command response
and pending command responses do not typically accumulate except when the inspector first loads.
(InspectorBackendClass.prototype._dispatchResponse): Save the response being dispatched.
(InspectorBackendClass.prototype._dispatchResponseToCallback): Simplify exception reporting.
(InspectorBackendClass.prototype._dispatchEvent): Save the event being dispatched.
2016-07-05 Timothy Hatcher <timothy@apple.com>
Web Inspector: Switch last uses of -webkit-linear-gradient() to linear-gradient()
https://bugs.webkit.org/show_bug.cgi?id=159438
rdar://problem/27183417
Reviewed by Joseph Pecoraro.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
(.timeline-overview-graph.rendering-frame > .frame-marker):
(body.window-inactive .timeline-overview-graph.rendering-frame > .frame-marker):
* UserInterface/Views/TimelineRecordFrame.css:
(.timeline-record-frame.tall):
(.timeline-record-frame.selected):
(body.window-inactive .timeline-record-frame.selected):
2016-07-05 Timothy Hatcher <timothy@apple.com>
Web Inspector: Drop -webkit-calc() in completions and a single use
https://bugs.webkit.org/show_bug.cgi?id=159435
rdar://problem/27179340
Reviewed by Dean Jackson.
* UserInterface/Models/CSSKeywordCompletions.js:
* UserInterface/Views/VisualStylePropertyEditorLink.css:
(.visual-style-property-editor-link > .visual-style-property-editor-link-border):
2016-07-05 Timothy Hatcher <timothy@apple.com>
Web Inspector: Drop the prefix from -webkit-image-set()
https://bugs.webkit.org/show_bug.cgi?id=159433
rdar://problem/27178887
Reviewed by Dean Jackson.
* UserInterface/Models/CSSKeywordCompletions.js:
* UserInterface/Views/ApplicationCacheIcons.css:
(.application-cache-manifest .icon):
(.application-cache-frame .icon):
* UserInterface/Views/CookieIcon.css:
(.cookie-icon .icon):
* UserInterface/Views/DOMStorageIcons.css:
(.local-storage-icon .icon):
(.session-storage-icon .icon):
* UserInterface/Views/DatabaseIcon.css:
(.database-icon .icon):
* UserInterface/Views/DatabaseTableIcon.css:
(.database-table-icon .icon):
* UserInterface/Views/FolderIcon.css:
(.folder-icon .icon):
* UserInterface/Views/GradientSlider.css:
(.gradient-slider-knob):
(.gradient-slider-knob.selected):
* UserInterface/Views/HoverMenu.css:
(.hover-menu > img):
* UserInterface/Views/ResourceIcons.css:
(.resource-icon .icon):
(.resource-icon.resource-type-document .icon):
(.resource-icon.resource-type-image .icon):
(.resource-icon.resource-type-font .icon):
(.resource-icon.resource-type-stylesheet .icon):
(.resource-icon.resource-type-script .icon):
(.anonymous-script-icon .icon):
(.source-map-resource.resource-icon .icon):
(.source-map-resource.resource-icon.resource-type-stylesheet .icon):
(.source-map-resource.resource-icon.resource-type-script .icon):
(.large .resource-icon .icon):
(.large .resource-icon.resource-type-document .icon):
(.large .resource-icon.resource-type-image .icon):
(.large .resource-icon.resource-type-font .icon):
(.large .resource-icon.resource-type-stylesheet .icon):
(.large .resource-icon.resource-type-script .icon):
(.large .anonymous-script-icon .icon):
(.large .source-map-resource.resource-icon .icon):
(.large .source-map-resource.resource-icon.resource-type-stylesheet .icon):
(.large .source-map-resource.resource-icon.resource-type-script .icon):
* UserInterface/Views/Slider.css:
(.slider > img):
(.slider > img.dragging):
* UserInterface/Views/SourceCodeTextEditor.css:
(.hover-menu.color > img):
* UserInterface/Views/TextEditor.css:
(.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
(.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before):
(.text-editor > .CodeMirror .execution-line .CodeMirror-linenumber::after):
* UserInterface/Views/TimelineIcons.css:
(body:not(.mac-platform, .windows-platform) .network-icon .icon):
(body:not(.mac-platform, .windows-platform) .network-icon.large .icon):
(body:not(.mac-platform, .windows-platform) .layout-icon .icon):
(body:not(.mac-platform, .windows-platform) .layout-icon.large .icon):
(body:not(.mac-platform, .windows-platform) .script-icon .icon):
(body:not(.mac-platform, .windows-platform) .script-icon.large .icon):
(body:not(.mac-platform, .windows-platform) .rendering-frame-icon .icon):
(body:not(.mac-platform, .windows-platform) .memory-icon .icon):
(body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon):
(body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon):
2016-07-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CallFrame console.assert seen in tests (sourceCodeLocation instanceof SourceCodeLocation)
https://bugs.webkit.org/show_bug.cgi?id=159368
Reviewed by Timothy Hatcher.
* UserInterface/Test.html:
SourceCodeLocation was already included earlier. This redefines it and
thereby breaks some things.
2016-07-02 Joseph Pecoraro <pecoraro@apple.com>
inspector/debugger/command-line-api-exception.html flakily times out on mac
https://bugs.webkit.org/show_bug.cgi?id=152029
<rdar://problem/23813812>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Object.js:
(WebInspector.Object.addEventListener):
Return the listener, this makes it cleaner to write tests.
2016-07-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Make enabling protocol logging in inspector tests easy to remember
https://bugs.webkit.org/show_bug.cgi?id=159323
Reviewed by Brian Burg.
Now you just need to type InspectorTest.debug() or
ProtocolTest.debug() and it will include stderr logging.
* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness.prototype.debug):
* UserInterface/Test/ProtocolTestHarness.js:
(ProtocolTestHarness.prototype.debug):
(ProtocolTestHarness):
* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.debug):
2016-06-30 Matt Baker <mattbaker@apple.com>
Unreviewed build fix.
* Localizations/en.lproj/localizedStrings.js:
Add "Area" localized string.
2016-06-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Wrong function name next to scope
https://bugs.webkit.org/show_bug.cgi?id=158210
<rdar://problem/26543093>
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Include new payload data in the construction call.
All the new data is optional, so we gracefully handle
legacy backends.
* UserInterface/Models/ScopeChainNode.js:
(WebInspector.ScopeChainNode):
(WebInspector.ScopeChainNode.prototype.get type):
(WebInspector.ScopeChainNode.prototype.get objects):
(WebInspector.ScopeChainNode.prototype.get name):
(WebInspector.ScopeChainNode.prototype.get location):
(WebInspector.ScopeChainNode.prototype.get hash):
Hash is a rough (name:sourceId:line:column) string for quick comparisons.
(WebInspector.ScopeChainNode.prototype.makeLocalScope):
Make this an action you take on a scope, to avoid having to
do it at construction time, or making it a generic setting.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
This was wrong before. Move the work to CallFrame
and change it to be correct.
* UserInterface/CallFrame.js:
(WebInspector.CallFrame.prototype.mergedScopeChain):
This transforms the scope chain for a call frame from:
scope1 scope2 scope3 scope4 scope5 scope6 scope7
foo foo foo bar bar - -
Block Closure Closure Closure Closure GLE GBL
To:
scope1 scope2&3 scope4&5 scope6 scope7
foo foo* bar* - -
Block Local Closure GLE GBL
Doing a few things:
- Merge the first two Closure scopes sharing a location.
These are the "var" and "let" Closure scopes in a function,
and it is better to present these together in the UI.
- Mark the first Closure scope within a function (*). When
this is displayed in the UI, we can provide the name of
the function: "Closure Scope (name)", and we even have
location information that we can use to display a goto
arrow if needed.
- Make the first Closure scope the Local scope if it
matches the Call Frame's function name. This lets us
display the section as "Local Variables".
2016-06-30 Matt Baker <mattbaker@apple.com>
Web Inspector: add pixel area column to layout timeline view
https://bugs.webkit.org/show_bug.cgi?id=148677
<rdar://problem/22518762>
Reviewed by Timothy Hatcher.
The view can simply add the column. LayoutTimelineDataGridNode
already includes area data and cell formatting.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
2016-06-30 Brian Burg <bburg@apple.com>
Web Inspector: the last normal tab cannot be closed with "Close Tab" context menu item
https://bugs.webkit.org/show_bug.cgi?id=159317
<rdar://problem/27042491>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TabBarItem.js:
(WebInspector.TabBarItem.prototype._handleContextMenuEvent):
(WebInspector.TabBarItem): fix the expression that controls whether the item is disabled.
2016-06-30 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Add "spring" to transition-timing-function value autocompletion
https://bugs.webkit.org/show_bug.cgi?id=159313
<rdar://problem/27114269>
Reviewed by Timothy Hatcher.
* UserInterface/Models/CSSKeywordCompletions.js:
2016-06-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r202659.
https://bugs.webkit.org/show_bug.cgi?id=159305
The test for this change times out on mac-wk2 debug and caused
an existing test to crash. (Requested by ryanhaddad on
#webkit).
Reverted changeset:
"Web Inspector: Wrong function name next to scope"
https://bugs.webkit.org/show_bug.cgi?id=158210
http://trac.webkit.org/changeset/202659
2016-06-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Wrong function name next to scope
https://bugs.webkit.org/show_bug.cgi?id=158210
<rdar://problem/26543093>
Reviewed by Brian Burg.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Include new payload data in the construction call.
All the new data is optional, so we gracefully handle
legacy backends.
* UserInterface/Models/ScopeChainNode.js:
(WebInspector.ScopeChainNode):
(WebInspector.ScopeChainNode.prototype.get type):
(WebInspector.ScopeChainNode.prototype.get objects):
(WebInspector.ScopeChainNode.prototype.get name):
(WebInspector.ScopeChainNode.prototype.get location):
(WebInspector.ScopeChainNode.prototype.get hash):
Hash is a rough (name:sourceId:line:column) string for quick comparisons.
(WebInspector.ScopeChainNode.prototype.makeLocalScope):
Make this an action you take on a scope, to avoid having to
do it at construction time, or making it a generic setting.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
This was wrong before. Move the work to CallFrame
and change it to be correct.
* UserInterface/CallFrame.js:
(WebInspector.CallFrame.prototype.mergedScopeChain):
This transforms the scope chain for a call frame from:
scope1 scope2 scope3 scope4 scope5 scope6 scope7
foo foo foo bar bar - -
Block Closure Closure Closure Closure GLE GBL
To:
scope1 scope2&3 scope4&5 scope6 scope7
foo foo* bar* - -
Block Local Closure GLE GBL
Doing a few things:
- Merge the first two Closure scopes sharing a location.
These are the "var" and "let" Closure scopes in a function,
and it is better to present these together in the UI.
- Mark the first Closure scope within a function (*). When
this is displayed in the UI, we can provide the name of
the function: "Closure Scope (name)", and we even have
location information that we can use to display a goto
arrow if needed.
- Make the first Closure scope the Local scope if it
matches the Call Frame's function name. This lets us
display the section as "Local Variables".
2016-06-29 Brian Burg <bburg@apple.com>
Web Inspector: Uncaught Exception page never shows if exception is thrown while processing a protocol event
https://bugs.webkit.org/show_bug.cgi?id=159182
Reviewed by Joseph Pecoraro.
Since we catch exceptions raised during the handling of protocol responses and events, there
is no way for these exceptions to trigger the global exception handler that shows the Uncaught
Exception Reporter sheet. We should show these in the sheet because it makes them get fixed faster.
Add a new entry point, WebInspector.reportInternalError, that takes an error or string and
a free-form map of strings to strings for storing additional information such as message data.
Pass the error and any other relevant details to this entry point, which decides whether to
show the uncaught exception reporter or quietly log the error to Inspector^2 console.
In future patches, I would like to do the following once the common errors are fixed:
- enable reporting via Uncaught Exception Reporter for all engineering builds
- move internal console.error call sites to use WebInspector.reportInternalError
* UserInterface/Base/Main.js: Add reportInternalError, which redirects to the uncaught
exception reporter sheet or does console.error. It also adds a console.assert that could
cause the debugger to pause if desired.
* UserInterface/Debug/UncaughtExceptionReporter.css:
(.sheet-container): Make the report scrollable now that we could potentially show a lot of text.
* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleError): Also pass along the 'details' poperty.
(formattedEntry): Refactor the code so it additionally prints out the keys and values of
the 'details' property. It does not do any coercions, so callers must convert values to strings.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype._dispatchResponse): Inlined a function.
(InspectorBackendClass.prototype._dispatchResponseToCallback):
(InspectorBackendClass.prototype._dispatchEvent):
Report uncaught exceptions via WebInspector.reportInternalError.
(InspectorBackendClass.prototype._reportProtocolError): Deleted, inlined into the single use site.
2016-06-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Show Shadow Root type in DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=159236
<rdar://problem/27068521>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
"Shadow Content (type)" string.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode):
(WebInspector.DOMNode.prototype.shadowRoots):
(WebInspector.DOMNode.prototype.shadowRootType):
Initialize state and add accessors.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.shadowRootTypeDisplayName):
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
Better string when an element is a Shadow Root.
* UserInterface/Views/DOMTreeElementPathComponent.js:
(WebInspector.DOMTreeElementPathComponent):
Better to check the Shadow Root type.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom .html-fragment.shadow):
Opacity looks poor when there is a selection. Switch to gray.
2016-06-28 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r188730): Web Inspector: Warning icons incorrectly positioned in CSS Rules sidebar
https://bugs.webkit.org/show_bug.cgi?id=157869
<rdar://problem/26356520>
Reviewed by Timothy Hatcher.
Before r188730, CSS text always had a line break as a prefix. r188730 started trimming text.
This patch keeps trimming unnecessary whitespace but brings back required line break prefix.
* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.set text):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
Make PrefixWhitespace and SuffixWhitespace public.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
Remove an if conditional as it's always true.
2016-06-28 Brian Burg <bburg@apple.com>
Web Inspector: QuickConsole should update its selection when RuntimeManager.defaultExecutionContextIdentifier changes
https://bugs.webkit.org/show_bug.cgi?id=159183
Reviewed by Timothy Hatcher.
Currently, the UI listens for state changes in the Frame tree to decide when to reset
the selected execution context back to its default value. This is no good, because this
should happen even if we have no UI (i.e., testing models only). The UI should simply
display changes to the model rather than driving them based on other model changes.
Move the logic to reset the execution context into RuntimeManager. When the selected
context changes, an event is fired which causes the QuickConsole to rebuild its path components.
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager):
(WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
Fire an event when the execution context actually changes.
(WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
Added. If the selected context was cleared, reset back to default.
* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.clearExecutionContexts):
Include the contexts that were cleared so clients can match against them.
* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole):
Use the proper constant name. Both the old and new names evaluated to `undefined`.
No need to keep track of the selected path component, it will always match the
defaultExecutionContextIdentifier in RuntimeManager.
(WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier):
(WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier):
Forward to RuntimeManager. This name is less awkward for the UI code that manages selections.
(WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
Special-case for the main frame execution context.
(WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
Remove indirection.
(WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
Fix the guard to handle undefined execution contexts in the case where it represents the main frame (undefined).
(WebInspector.QuickConsole.prototype._defaultExecutionContextChanged):
Rebuild when the model changes.
(WebInspector.QuickConsole.prototype._pathComponentSelected): Simplify.
(WebInspector.QuickConsole.prototype.get executionContextIdentifier):
(WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
Move the fallback selection behavior into RuntimeManager.
(WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): Deleted.
This has been dead code ever since we removed iOS 6 legacy support.
2016-06-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: When modifying sessionStorage, localStorage gets updated
https://bugs.webkit.org/show_bug.cgi?id=159181
<rdar://problem/27043447>
Reviewed by Timothy Hatcher.
* UserInterface/Test/Test.js:
(WebInspector.loaded):
Add registration for StorageManager and StorageObserver.
2016-06-27 Brian Burg <bburg@apple.com>
Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole
https://bugs.webkit.org/show_bug.cgi?id=128092
<rdar://problem/15966526>
Reviewed by Timothy Hatcher.
This is a layering violation which makes it harder to use RuntimeManager.evaluateInInspectedWindow
from a testing context where the QuickConsole view does not exist.
Store the selected execution context identifier on RuntimeManager and use it
when doing subsequent evaluations that act on the currently selected frame.
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
(WebInspector.RuntimeManager.prototype.saveResult):
Use local state.
(WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier):
(WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
Added.
(WebInspector.RuntimeManager):
* UserInterface/Models/ExecutionContext.js:
(WebInspector.ExecutionContext):
Move the symbolic name for the top level execution context to RuntimeManager.
* UserInterface/Test/Test.js:
(WebInspector.loaded): No need to stub out WebInspector.QuickConsole any more.
* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
(WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
(WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
(WebInspector.QuickConsole.prototype._pathComponentSelected):
For now, set RuntimeManager's selected execution context whenever we set the
selected path component. In a future patch, we should invert the dependency and have
the selected component change whenever RuntimeManager.defaultExecutionContext changes.
2016-06-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: first heap snapshot taken when a page is reloaded happens before the reload navigation
https://bugs.webkit.org/show_bug.cgi?id=158995
<rdar://problem/26923778>
Reviewed by Brian Burg.
Let instruments decide to do work or not based on programmatic
(backend initiated) starts and stop.
Programmatic start can happen due to Auto Capture or console.profile.
Programmatic stop can happen due to console.profileEnd.
For example, this allows the frontend to avoid sending agents start/stop
messages when the backend would have already started/stopped the agents.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.capturingStopped):
(WebInspector.TimelineManager.prototype.autoCaptureStarted):
(WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
Call Recording.start/stop with a programmatic flag so the frontend
instruments can perform a more informed start/stop.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.start):
(WebInspector.TimelineRecording.prototype.stop):
Let the instruments decide to do work based on the start/stop
being initiated by the backend or not.
* UserInterface/Models/HeapAllocationsInstrument.js:
(WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation):
(WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation):
* UserInterface/Models/Instrument.js:
(WebInspector.Instrument.startLegacyTimelineAgent):
(WebInspector.Instrument.prototype.startInstrumentation):
(WebInspector.Instrument.prototype.stopInstrumentation):
(WebInspector.Instrument):
* UserInterface/Models/MemoryInstrument.js:
(WebInspector.MemoryInstrument.prototype.startInstrumentation):
(WebInspector.MemoryInstrument.prototype.stopInstrumentation):
(WebInspector.MemoryInstrument):
* UserInterface/Models/NetworkInstrument.js:
* UserInterface/Models/ScriptInstrument.js:
(WebInspector.ScriptInstrument.prototype.startInstrumentation):
(WebInspector.ScriptInstrument.prototype.stopInstrumentation):
(WebInspector.ScriptInstrument):
Avoid sending start/stop tracking messages when programmatic.
This still allows the instruments to do their own frontend tracking,
such as the Heap agent triggering periodic snapshots.
2016-06-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Snapshots should be cleared at some point
https://bugs.webkit.org/show_bug.cgi?id=157907
<rdar://problem/26373610>
Reviewed by Timothy Hatcher.
Invalidate HeapSnapshotProxy objects when the page navigates.
This allows us to clear our frontend data for the snapshots.
When a snapshot is invalidated, it is disabled in the UI.
This means you cannot select the snapshot or see content
views for the snapshot. If you are in a snapshot when it is
invalidated, you are taken out to the snapshot list.
* UserInterface/Main.html:
New files.
* UserInterface/Proxies/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProxy):
(WebInspector.HeapSnapshotProxy.invalidateSnapshotProxies):
(WebInspector.HeapSnapshotProxy.prototype.get invalid):
(WebInspector.HeapSnapshotProxy.prototype._invalidate):
Keep track of valid snapshots, and provide a static method to invalidate them.
(WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
(WebInspector.HeapSnapshotProxy.prototype.allocationBucketCounts):
(WebInspector.HeapSnapshotProxy.prototype.instancesWithClassName):
(WebInspector.HeapSnapshotProxy.prototype.update):
(WebInspector.HeapSnapshotProxy.prototype.nodeWithIdentifier):
UI should only act on valid snapshots.
* UserInterface/Proxies/HeapSnapshotDiffProxy.js:
(WebInspector.HeapSnapshotDiffProxy.prototype.get invalid):
(WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
(WebInspector.HeapSnapshotDiffProxy.prototype.allocationBucketCounts):
(WebInspector.HeapSnapshotDiffProxy.prototype.instancesWithClassName):
(WebInspector.HeapSnapshotDiffProxy.prototype.update):
(WebInspector.HeapSnapshotDiffProxy.prototype.nodeWithIdentifier):
UI should only act on valid snapshots.
* UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
(WebInspector.HeapSnapshotWorkerProxy.prototype._mainResourceDidChange):
Invalidate and discard snapshots when the main frame navigates.
(WebInspector.HeapSnapshotWorkerProxy.prototype._handleMessage):
(WebInspector.HeapSnapshotWorkerProxy):
* UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
(HeapSnapshotWorker.prototype.clearSnapshots):
(HeapSnapshotWorker.prototype._handleMessage):
(HeapSnapshotWorker):
A message may come in for a snapshot before it has been cleared.
If that is the case, the object may not exist. Return an error so
that the callback can be deleted on the calling side.
* UserInterface/Views/HeapAllocationsTimelineDataGridNodePathComponent.js:
(WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get previousSibling):
(WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get nextSibling):
(WebInspector.HeapAllocationsTimelineDataGridNodePathComponent):
Don't show invalid snapshots in page component picker.
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
(.timeline-overview-graph.heap-allocations > img.snapshot.invalid):
* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
(WebInspector.HeapAllocationsTimelineDataGridNode):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCells):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotInvalidated):
Give invalid snapshots an invalidated appearance in the snapshot list.
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/HeapAllocationsTimelineView.css:
(.timeline-view.heap-allocations > .data-grid tr.invalid):
(.timeline-view.heap-allocations > .data-grid:not(:focus, .force-focus) tr.selected.invalid):
Give invalid snapshots an invalidated appearance in the overview graph.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
(WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent.updateHeapSnapshotForEvent):
(WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent):
(WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotInvalidated):
(WebInspector.HeapAllocationsTimelineView.prototype._updateCompareHeapSnapshotButton):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
Handle interactions when snapshots in the list are invalidated.
2016-06-22 Brian Burg <bburg@apple.com>
Web Inspector: don't start auto capturing if the Inspector window is not visible
https://bugs.webkit.org/show_bug.cgi?id=159014
Reviewed by Joseph Pecoraro.
<rdar://problem/26931269>
Followup, add a missing super.closed() call mentioned in review comments.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype.closed):
2016-06-22 Brian Burg <bburg@apple.com>
Web Inspector: don't start auto capturing if the Inspector window is not visible
https://bugs.webkit.org/show_bug.cgi?id=159014
<rdar://problem/26931269>
Reviewed by Joseph Pecoraro.
TimelineTabContentView should not tell the timeline manager to enable
auto-capturing unless the Web Inspector UI is visible. If it is preloaded
but not shown to the user, then auto-capturing may inadvertently disable
the debugger, causing it to miss `debugger` statements and not bring the
inspector to front.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
Bail out if nothing changed. Coerce to a boolean since the backend requires a boolean.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView): Listen for UI visibility changes.
(WebInspector.TimelineTabContentView.prototype.shown):
Enable auto-capturing if the UI is visible.
(WebInspector.TimelineTabContentView.prototype.closed): Added.
Remove listeners on global objects so this tab doesn't leak.
(WebInspector.TimelineTabContentView.prototype._inspectorVisibilityChanged):
Update the auto-capturing setting if the UI became visible or not visible.
2016-06-22 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Simplify CSS rule for ContentBrowser navigation bar items
https://bugs.webkit.org/show_bug.cgi?id=159000
Reviewed by Timothy Hatcher.
* UserInterface/Views/ContentBrowser.css:
(.content-browser > .navigation-bar > .item):
Both these values result in 28px, but `100%` is simplier.
2016-06-21 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r201177): Web Inspector: ContentBrowser navigation bar should fit on a single line
https://bugs.webkit.org/show_bug.cgi?id=158700
<rdar://problem/26772058>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ContentBrowser.css:
(.content-browser > .navigation-bar > .item):
Set the height to 28px, as it was before r201177.
Make it one pixel shorter than the navigation bar for better vertical alignment.
2016-06-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: UncaughtExceptionReporter should handle null event.error
https://bugs.webkit.org/show_bug.cgi?id=158971
Reviewed by Brian Burg.
* UserInterface/Debug/UncaughtExceptionReporter.js:
Since `typeof null === "object"` handle uncaught exceptions where the
Error object itself is null.
2016-06-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Snapshot List should show the total size and the total live size
https://bugs.webkit.org/show_bug.cgi?id=157904
<rdar://problem/26372833>
Reviewed by Brian Burg.
Include the live size of a snapshot in the snapshot list.
* Localizations/en.lproj/localizedStrings.js:
New "Live Size" string.
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot):
(HeapSnapshot.updateCategoriesAndMetadata):
(HeapSnapshot.prototype.update):
(HeapSnapshot.prototype.serialize):
(HeapSnapshotDiff):
(HeapSnapshotDiff.prototype.update):
(HeapSnapshot.buildCategories): Deleted.
(HeapSnapshot.prototype.updateCategories): Deleted.
(HeapSnapshotDiff.prototype.updateCategories): Deleted.
* UserInterface/Proxies/HeapSnapshotDiffProxy.js:
(WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
(WebInspector.HeapSnapshotDiffProxy.prototype.update):
(WebInspector.HeapSnapshotDiffProxy.prototype.updateCategories): Deleted.
* UserInterface/Proxies/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProxy):
(WebInspector.HeapSnapshotProxy.deserialize):
(WebInspector.HeapSnapshotProxy.prototype.get liveSize):
(WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
(WebInspector.HeapSnapshotProxy.prototype.update):
(WebInspector.HeapSnapshotProxy.prototype.updateCategories): Deleted.
Rename "updateCategories" to "update" and update both categories
and metadata, like the liveSize.
* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
(WebInspector.HeapAllocationsTimelineDataGridNode):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotCollectedNodes):
Update live size after collection.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
Include a live size column in the DataGrid.
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
Cleanup listeners appropriately.
2016-06-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: console.profile should use the new Sampling Profiler
https://bugs.webkit.org/show_bug.cgi?id=153499
<rdar://problem/24352431>
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
(WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
(WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
(WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
For programmatic captures, automatically show the Script Timeline, since
that is guarenteed to have been started by the backend. Start capturing
without creating a new recording.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.stop):
(WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
When stopping for programmatic capture we don't need to disable
instruments, the backend would have already done this.
* UserInterface/Protocol/ScriptProfilerObserver.js:
(WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
(WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
(WebInspector.ScriptProfilerObserver):
* UserInterface/Protocol/TimelineObserver.js:
(WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
(WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
(WebInspector.TimelineObserver):
Pass through Web and JSContext programmatic capture events.
2016-06-19 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Remove Sidebar z-index:0 workaround for scrollbars and position:sticky section headers
https://bugs.webkit.org/show_bug.cgi?id=158882
Reviewed by Darin Adler.
The z-index:0 workaround is no longer needed as it doesn't change anything.
* UserInterface/Views/Sidebar.css:
(.sidebar > .panel): Deleted.
2016-06-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r202152.
https://bugs.webkit.org/show_bug.cgi?id=158897
The new test is very unstable, timing out frequently
(Requested by ap on #webkit).
Reverted changeset:
"Web Inspector: console.profile should use the new Sampling
Profiler"
https://bugs.webkit.org/show_bug.cgi?id=153499
http://trac.webkit.org/changeset/202152
2016-06-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: console.profile should use the new Sampling Profiler
https://bugs.webkit.org/show_bug.cgi?id=153499
<rdar://problem/24352431>
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
(WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
(WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
(WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
For programmatic captures, automatically show the Script Timeline, since
that is guarenteed to have been started by the backend. Start capturing
without creating a new recording.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.stop):
(WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
When stopping for programmatic capture we don't need to disable
instruments, the backend would have already done this.
* UserInterface/Protocol/ScriptProfilerObserver.js:
(WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
(WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
(WebInspector.ScriptProfilerObserver):
* UserInterface/Protocol/TimelineObserver.js:
(WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
(WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
(WebInspector.TimelineObserver):
Pass through Web and JSContext programmatic capture events.
2016-06-16 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION (r201538): Web Inspector: Border over Allocations Views is too thick
https://bugs.webkit.org/show_bug.cgi?id=158846
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapAllocationsTimelineView.css:
(.timeline-view.heap-allocations > .content-view-container > .content-view): Deleted.
2016-06-16 Matt Baker <mattbaker@apple.com>
Unreviewed build fix.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.createSettings):
"showColumn" -> "setColumnVisible".
2016-06-16 Matt Baker <mattbaker@apple.com>
Web Inspector: DataGrid should manage its own settings
https://bugs.webkit.org/show_bug.cgi?id=158675
<rdar://problem/26761338>
Reviewed by Timothy Hatcher.
Move grid sorting settings (sort order, column identifier) into DataGrid,
removing duplicated code from various views. A new grid method, "createSettings",
takes an identifier which is used as a prefix for naming the grid's settings.
So that the new behavior is easy to use and hard to misuse, default values
for each setting are set to the current value of the associated property.
The result is that:
grid.sortColumnIdentifier = "columnA";
grid.createSettings("myGrid");
will use "columnA" as the default value the first time the setting is created.
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.createSettings):
(WebInspector.DataGrid.prototype.get identifier): Deleted.
(WebInspector.DataGrid.prototype.set identifier): Deleted.
(WebInspector.DataGrid.prototype.set sortOrderSetting): Deleted.
(WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Deleted.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
* UserInterface/Views/HeapSnapshotContentView.js:
(WebInspector.HeapSnapshotContentView):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/ProfileView.js:
(WebInspector.ProfileView):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView):
2016-06-15 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: TypeError: undefined is not an object (evaluating 'imageElement.classList')
https://bugs.webkit.org/show_bug.cgi?id=158808
<rdar://problem/26821034>
Reviewed by Brian Burg.
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
If the record is out of the layout bounds of the overview graph, the overview graph
may not have created an image element yet, so bail. Later, when the image element
is created, it would get the appropriate style if the record is selected.
2016-06-14 Matt Baker <mattbaker@apple.com>
Web Inspector: Rename DataGrid.showColumn to setColumnVisible
https://bugs.webkit.org/show_bug.cgi?id=158764
<rdar://problem/26801448>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
Drive-by update to initialize "this._columnChooserEnabled".
(WebInspector.DataGrid.prototype.set identifier):
(WebInspector.DataGrid.prototype.insertColumn):
(WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
Use new method name.
(WebInspector.DataGrid.prototype._contextMenuInHeader):
Drive-by style update.
2016-06-14 Matt Baker <mattbaker@apple.com>
Web Inspector: Storage tab should allow hiding columns in the cookies grid
https://bugs.webkit.org/show_bug.cgi?id=158767
<rdar://problem/26803568>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
Enable column chooser, exclude Name and Value columns.
2016-06-14 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Visual Sidebar: Remove "Text -> Content" subsection
https://bugs.webkit.org/show_bug.cgi?id=158758
<rdar://problem/26799628>
Reviewed by Timothy Hatcher.
"content" CSS property only works with pseudo elements ::before and ::after.
It doesn't do anything for regular (non pseudo) elements. Remove it to
reduce UI clutter.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
(WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection): Deleted.
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)): Deleted.
2016-06-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments
https://bugs.webkit.org/show_bug.cgi?id=158762
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments):
(WebInspector.TimelineManager):
2016-06-14 Benjamin Poulain <bpoulain@apple.com>
Add the unprefixed version of the pseudo element ::placeholder
https://bugs.webkit.org/show_bug.cgi?id=158653
Reviewed by Dean Jackson.
* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]::placeholder):
(.filter-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
* UserInterface/Views/FindBanner.css:
(.find-banner.console-find-banner > input[type="search"]::placeholder):
(.find-banner.console-find-banner > input[type="search"]::-webkit-input-placeholder): Deleted.
* UserInterface/Views/GoToLineDialog.css:
(.go-to-line-dialog > div > input::placeholder):
(.go-to-line-dialog > div > input::-webkit-input-placeholder): Deleted.
* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog > .field > input::placeholder):
(.open-resource-dialog > .field > input::-webkit-input-placeholder): Deleted.
* UserInterface/Views/SearchBar.css:
(.search-bar > input[type="search"]::placeholder):
(.search-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
2016-06-14 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Introduce --navigation-bar-height CSS variable
https://bugs.webkit.org/show_bug.cgi?id=158752
Reviewed by Timothy Hatcher.
Abstract a commonly repeated height value (29px) into a variable.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content.has-filter-bar):
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)):
* UserInterface/Views/FilterBar.css:
(.filter-bar):
* UserInterface/Views/NavigationBar.css:
(.navigation-bar):
* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content):
(.sidebar > .panel.navigation > .overflow-shadow.top):
* UserInterface/Views/NetworkSidebarPanel.css:
(.sidebar > .panel.navigation.network > .title-bar):
* UserInterface/Views/ResourceSidebarPanel.css:
(.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)):
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.search > .search-bar):
* UserInterface/Views/Sidebar.css:
(.sidebar.has-navigation-bar > .panel):
* UserInterface/Views/StorageSidebarPanel.css:
(.sidebar > .panel.navigation.storage > :matches(.content, .empty-content-placeholder)):
* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser .recording-progress):
* UserInterface/Views/Variables.css:
(:root):
2016-06-14 Saam Barati <sbarati@apple.com>
Follow up to: Web Inspector: Call Trees view should have a 'Top Functions'-like mode
https://bugs.webkit.org/show_bug.cgi?id=158555
<rdar://problem/26712544>
Unreviewed follow up patch.
- Move a long if-else sequence to a switch statement.
- Fix a copy-paste typo in a Symbol(.) enum.
* UserInterface/Models/CallingContextTree.js:
(WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
2016-06-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Show Exception Stack in UncaughtExceptionReporter view
https://bugs.webkit.org/show_bug.cgi?id=158657
<rdar://problem/26754441>
Reviewed by Darin Adler.
* UserInterface/Debug/UncaughtExceptionReporter.css:
(.uncaught-exception-sheet li):
Make newlines significant.
* UserInterface/Debug/UncaughtExceptionReporter.js:
(unblockEventHandlers):
(handleError):
(handleLinkClick):
(formattedEntry):
Format the exception and a possible stack with a bit of sanitizing.
2016-06-13 Matt Baker <mattbaker@apple.com>
Web Inspector: Filter Records not applying to new records
https://bugs.webkit.org/show_bug.cgi?id=158213
<rdar://problem/26543912>
Reviewed by Timothy Hatcher.
This patch makes the following improvements to timeline grid filtering:
- Records are filtered as they are added to the grid.
- Timeline view no longer triggers a filter refresh while the
current time changes while recording.
- Filters are refreshed whenever the current timeline view changes.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.hasFilters):
Helper function to check for custom and text filters.
(WebInspector.DataGrid.prototype._applyFiltersToNodeAndDispatchEvent):
Encapsulate node state change and event dispatch, which was previously
done in multiple places.
(WebInspector.DataGrid.prototype.insertChild):
Filter incoming node if needed.
(WebInspector.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
(WebInspector.DataGrid.prototype._updateFilter):
(WebInspector.DataGrid.prototype.yieldableTaskWillProcessItem):
Use new convenience functions.
(WebInspector.DataGrid.prototype.hasCustomFilters): Deleted.
Renamed `hasFilters`.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
Refresh grid filters on view change.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.set startTime):
(WebInspector.TimelineView.prototype.set endTime):
Schedule filter change notification when selection bounds changes.
(WebInspector.TimelineView.prototype._timesDidChange):
(WebInspector.TimelineView.prototype._scheduleFilterDidChange):
(WebInspector.TimelineView):
2016-06-13 Saam Barati <sbarati@apple.com>
Web Inspector: Call Trees view should have a 'Top Functions'-like mode
https://bugs.webkit.org/show_bug.cgi?id=158555
<rdar://problem/26712544>
Reviewed by Timothy Hatcher.
This patch adds a Top Functions view that is similar to Instruments'
Top Functions view. I really wanted to add this view because I've
been doing a lot of performance debugging and I've exclusively
used the Top Functions view and I want the Inspector to also have
this view. I like to think of it as a more sophisticated version of the bottom-up view.
Top Functions works by treating every frame as a root in the tree.
Top functions view then presents a list of "roots". This is the same
as all other views, which also present a list of roots, but in this case,
every frame is a root. Bottom Up is great for nailing in specific performance
problems in exactly one frame. But Bottom Up doesn't give you good context about where
a specific frame is in the call tree and how frames are related by having
a caller or some path of shared callers. For example, consider this call tree:
(program)
/ \
/ \
(many nodes...)
/
/
(parent)
/ \
/ \
(leaf1) (leaf2)
Suppose that 'leaf1' is super hot, and 'leaf2' is moderately hot.
If we look at this through Bottom Up view, we will see 'leaf1'
is super hot, but it will take more scrolling to see that 'leaf2'
is moderately hot. Lets say that 'parent' is also moderately hot,
but that the majority of its time isn't self time. With Bottom Up view,
there is no good way to see that 'leaf1' and 'leaf2' are both nodes under 'parent'.
With Top Down, you can find this information, but it requires a ton of drilling down into
the tree (i.e, you must expand past the 'many nodes...' I drew above). It's inconvenient to
use Top Down here for indentation alone. Bottom up will tell you that 'leaf1' is super hot,
and that 'leaf2' and 'parent' are moderately hot, but it doesn't show how they're related
in the original tree. It's important to see that 'parent's total time is very high
because it itself is moderately hot, and it has a child node that is super hot, and
another child that's moderately 'hot'. For the sake of this example, let's pretend
that 85% of the program's time is spent inside 'parent'. Seeing this information through
'Top Functions' is easy because this information filters to the top of the list. Specifically,
when using 'Top Functions' sorted by Total Time. Because every node is a root, there will be
a top-level entry for every frame in the program. Specifically, there will be a top-level node
for 'parent' in my above example. Because I've sorted this view by Total Time, I will see '(program)'
first. That's because 100% of execution time is under the '(program)' frame. Then, I might see
a few other nodes that also run the entire time because '(program)' calls them, and they eventually
call into other things that never leave the stack. These will also have time ranges near 100%.
But, only a few nodes after that, I'll see 'parent' in the list because it accounts for 85% of
execution time. Immediately, I will see that it has some self time, and that it has two child
nodes that have self time. This is really helpful.
Let's consider another example where it's not easy in Top Down to get the full picture of 'parent':
(program)
/ | \
(... many nodes...)
/ \
(many nodes...) (many nodes...)
/ \
parent parent
| |
leaf1 leaf2
If we viewed this program in Top Down, we don't get a full picture of 'parent'
because it has its time distributed in two different subsections of the tree.
Specifically, lets say it has 70% of time in the leaf1 path, and 30% of the
time in the leaf2 path. We want a way to see these things together. It's impossible
to do this in Top Down or Bottom Up. But, in Top Functions view, we get the view that
we want to see because we treat 'parent' as a root of the tree. Because we do this,
we will create the following sub tree in the Top Functions view:
parent
/ \
leaf1 leaf2
This happens naturally because when 'parent' is a root, we add all its children
to its subtree.
Constructing this tree is really easy. What we do is take any arbitrary stack
trace of length n, and treat is as n separate stack traces. Specifically, we
perform the following operation for any stack trace S.
S = [A, B, C, D]
(A is the entry frame, and D is the top of the stack).
We will transform this into a list of stack traces S' like so:
S' = [[A, B, C, D], [B, C, D], [C, D], [D]]
If we then run the normal top down tree algorithm on this set of stack
traces, all nodes get treated as roots, and voila, we get the Top Functions view.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Main.html:
* UserInterface/Models/CallingContextTree.js:
* UserInterface/Models/TimelineRecording.js:
* UserInterface/Views/ScriptProfileTimelineView.js:
* UserInterface/Views/TextToggleButtonNavigationItem.css: Added.
* UserInterface/Views/TextToggleButtonNavigationItem.js: Added.
2016-06-13 Matt Baker <mattbaker@apple.com>
Web Inspector: Add ability to show/hide DataGird columns
https://bugs.webkit.org/show_bug.cgi?id=158676
<rdar://problem/26761573>
Reviewed by Timothy Hatcher.
Make it possible to show/hide grid columns using the grid header
context menu. This patch enables the new behavior for most of the
timeline grids.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.get identifier):
(WebInspector.DataGrid.prototype.set identifier):
An identifier for the grid instance, for managing per-grid settings.
Setting the id causes settings to be created, and their values to be
applied to the grid.
(WebInspector.DataGrid.prototype.get columnChooserEnabled):
(WebInspector.DataGrid.prototype.set columnChooserEnabled):
Enable showing/hiding columns via the grid header.
(WebInspector.DataGrid.prototype.insertColumn):
(WebInspector.DataGrid.prototype.showColumn):
Set column visibility and hidden column setting, then perform layout.
(WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
(WebInspector.DataGrid.prototype._contextMenuInHeader):
Create column chooser menu items if necessary.
(WebInspector.DataGrid.prototype._showColumn): Deleted.
(WebInspector.DataGrid.prototype._hideColumn): Deleted.
Replaced by `showColumn`.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
Always show "type" and "name" columns.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView):
Always show "name" column.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
Enable column chooser.
2016-06-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: <template> content should not be hidden as Shadow Content
https://bugs.webkit.org/show_bug.cgi?id=158654
Reviewed by Ryosuke Niwa.
* Localizations/en.lproj/localizedStrings.js:
New "Template Content" string.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode):
Don't treat template content as shadow content.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
Custom string for template content fragment.
2016-06-10 Matt Baker <mattbaker@apple.com>
Web Inspector: heap snapshot comparison view shows nothing if later snapshot is chosen first
https://bugs.webkit.org/show_bug.cgi?id=158584
<rdar://problem/26727849>
Reviewed by Timothy Hatcher.
ALways compare the the later snapshot to the earlier snapshot,
regardless of selection order.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
Swap shapshots if the first has a greater identifier than the second.
Drive-by cleanup: null out `_baselineDataGridNode` since it isn't used
after the comparison completes.
2016-06-10 Matt Baker <mattbaker@apple.com>
Web Inspector: rendering frames timeline "60fps" horizontal guide is mispositioned after switching timeline modes
https://bugs.webkit.org/show_bug.cgi?id=158587
<rdar://problem/26728174>
Reviewed by Timothy Hatcher.
When the view mode changes we iterate over all overview graphs, updating
their visibility as needed. Graphs being shown perform layout, even though
the overview's state is in transition: its offset height may still change.
A simple fix is to use TimelineOverviewGraph.height instead of the graph
element's offset height when performing layout.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):
2016-06-10 Matt Baker <mattbaker@apple.com>
REGRESSION (r201538): Web Inspector: 1px gap above timeline progress view
https://bugs.webkit.org/show_bug.cgi?id=158626
Reviewed by Joseph Pecoraro.
Adjust progress view top position to account for grid border changes.
* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser .recording-progress):
2016-06-10 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r201538): Web Inspector: Border under JS Call Trees content view is too thick
https://bugs.webkit.org/show_bug.cgi?id=158624
<rdar://problem/26743633>
Reviewed by Joseph Pecoraro.
Remove top border from <th> elements.
* UserInterface/Views/ProfileView.css:
(.profile > .data-grid th): Deleted.
2016-06-09 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION: Web Inspector: IndexedDB does not show ObjectStore data
https://bugs.webkit.org/show_bug.cgi?id=158592
<rdar://problem/26730696>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._noteRowRemoved):
(WebInspector.DataGridNode.prototype._detach):
When rows are removed in the non-Virtual DataGrids, we should
actually remove the row.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WebInspector.IndexedDatabaseObjectStoreContentView):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData.processEntries):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData):
Don't use the delete operator. Use a boolean.
2016-06-09 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Support Command-P for quick open
https://bugs.webkit.org/show_bug.cgi?id=158579
<rdar://problem/26726751>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2016-06-09 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r194717): Web Inspector: Elements tab: an element loses focus when selected by Up/Down key
https://bugs.webkit.org/show_bug.cgi?id=157768
<rdar://problem/26311155>
Reviewed by Timothy Hatcher.
Remove _previousFocusedSection and _newInspectorRuleSelector since it was used only
to focus on a newly created section (added by clicking on "+" button).
Introduce _inspectorSection and _isInspectorSectionPendingFocus.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorBlurActiveEditor): Deleted.
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste): Deleted.
No longer needed, it was only used by _previousFocusedSection and _newInspectorRuleSelector.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.): Deleted.
No londer needed, it was only used by _previousFocusedSection.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
(WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorFocused): Deleted.
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionBlurActiveEditor): Deleted.
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNewInspectorRuleWithSelector): Deleted.
2016-06-08 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
https://bugs.webkit.org/show_bug.cgi?id=158548
<rdar://problem/26708513>
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Switch the many parameters to an options dictionary.
Include a new option for sourceURL appender, so that
Console evaluations can have its own append.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
Use the appendWebInspectorConsoleEvaluationSourceURL appender.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection.):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
Use the new options dictionary.
2016-06-08 Brian Burg <bburg@apple.com>
Web Inspector: an error is encountered when trying to delete nodes that have children
https://bugs.webkit.org/show_bug.cgi?id=158541
<rdar://problem/26705901>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.adjustCollapsedRange):
Offset into the array variable instead of a variable holding its length.
2016-06-08 Brian Burg <bburg@apple.com>
Web Inspector: DOMTreeOutline selection areas should be created and updated lazily
https://bugs.webkit.org/show_bug.cgi?id=158513
<rdar://problem/26689646>
Reviewed by Timothy Hatcher.
Selection areas for DOMTreeElements are used for several things: drag markers,
element hover styles, element selection styles, and showing forced pseudo states
for an element. Fortunately it's easy to tell when any of these things is necessary.
Change DOMTreeOutline and DOMTreeElement so they don't create selection areas
unless they are needed for one of these tasks. This significantly reduces
forced layouts that are required to update the selection area height in case the
element has new attributes that cause the tag to become more or less wrapped.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.set hovered):
Modernize this method a bit.
(WebInspector.DOMTreeElement.prototype.updateSelectionArea):
If a selection area is not necessary, don't create one.
If one exists and it's not needed, then remove it.
(WebInspector.DOMTreeElement.prototype.onattach):
Remove redundant calls to updateSelection(). This is already called in
updateTitle().
(WebInspector.DOMTreeElement.prototype.onselect):
Ask the DOMTreeOutline to update the selection rather than forcing the
element to do it. This is consistent with other updates to user selection.
(WebInspector.DOMTreeElement.prototype._insertInLastAttributePosition):
(WebInspector.DOMTreeElement.prototype._startEditingAsHTML.dispose):
(WebInspector.DOMTreeElement.prototype._startEditingAsHTML):
Use renamed method.
(WebInspector.DOMTreeElement.prototype.updateTitle):
Add a comment to explain why the selection area is nulled out here.
(WebInspector.DOMTreeElement.prototype.get pseudoClassesEnabled):
(WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
Update the selection area in case one does not exist for this tree element.
The indicator for forced pseudo classes is a pseudo element of the selection area.
(WebInspector.DOMTreeElement.prototype.updateSelection): Renamed.
(WebInspector.DOMTreeElement.prototype.onexpand):
(WebInspector.DOMTreeElement.prototype.oncollapse):
Remove redundant calls to updateSelection(). This is already called in
updateTitle().
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom):
(.tree-outline.dom li.hovered:not(.selected) .selection-area):
(.tree-outline.dom li .selection-area):
(.tree-outline.dom li.selected .selection-area):
(.tree-outline.dom li.elements-drag-over .selection-area):
(.tree-outline.dom:focus li.selected .selection-area):
(.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
(.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before):
(.tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
(.tree-outline.dom li .selection): Deleted.
(.tree-outline.dom li.selected .selection): Deleted.
(.tree-outline.dom li.elements-drag-over .selection): Deleted.
(.tree-outline.dom:focus li.selected .selection): Deleted.
(.tree-outline.dom li.pseudo-class-enabled > .selection::before): Deleted.
(.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection::before): Deleted.
Rename the selector to be less ambiguous.
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.updateSelection): Simplify. The call
to update the selection area will bail out if there is nothing to be done.
(WebInspector.DOMTreeOutline.prototype.findTreeElement):
(WebInspector.DOMTreeOutline.prototype._onmousemove):
(WebInspector.DOMTreeOutline.prototype._onmouseout):
Clean up and use let and arrow functions.
(WebInspector.DOMTreeOutline.prototype._ondragover):
(WebInspector.DOMTreeOutline.prototype._clearDragOverTreeElementMarker):
Clear the dragging element before updating the selection area since it looks at
the dragging element to determine whether anything needs to be done.
* UserInterface/Views/FormattedValue.css:
(.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection-area):
(.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
Rename the selector to be less ambiguous.
2016-06-08 Brian Burg <bburg@apple.com>
Uncaught Exception in TimelineDataGrid._updatePopoverForSelectedNode()
https://bugs.webkit.org/show_bug.cgi?id=158502
<rdar://problem/26687038>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
It appears that this expression was moved around since it accesses
targetFrame before it's initialized. Check rect.size.height directly.
2016-06-08 Brian Burg <bburg@apple.com>
Web Inspector: reduce redundant attribute modification updates in DOMTreeUpdater and DOMTreeElement
https://bugs.webkit.org/show_bug.cgi?id=158504
<rdar://problem/25561452>
Reviewed by Timothy Hatcher.
When the frontend gets lots of DOM.attributeModified events, it forwards these on to
DOMTreeUpdater, which pushes a record for every single modification. It then updates
the DOM elements with the attibute changes on an animation frame. However, since it
doesn't do any deduplication of the modification records, a lot of time is wasted
on updating DOMTreeElements with intermediate (non-final) attribute values.
This patch rewrites DOMTreeUpdater to precisely track which nodes and attributes
of each node need to be updated on the next animation frame. This is done using
Sets and Maps that only hold onto the most recent attribute values rather than
pushing a record object for every single mutation.
This improves the performance of the Elements tab on an SVG particle simulator
dramatically so that the Inspector will not immediately hang. It still only achieves
a few updates per second in this case, so there is still optimization to be done on
the frontend and throttling to be done on the backend.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement):
(WebInspector.DOMTreeElement.prototype.attributeDidChange):
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
(WebInspector.DOMTreeElement.prototype._markNodeChanged):
(WebInspector.DOMTreeElement.prototype._nodeChangedAnimationEnd):
(WebInspector.DOMTreeElement.prototype._fireDidChange):
(WebInspector.DOMTreeElement.prototype.nodeStateChanged): Deleted.
Simplify the list of modified attributes a little bit. This still uses a worklist
approach, so it's possible that duplicate updates for the same attribute could accumulate
if DOMTreeUpdater pushes updates faster than DOMTreeElement can render them.
* UserInterface/Views/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater):
(WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
(WebInspector.DOMTreeUpdater.prototype._characterDataModified):
(WebInspector.DOMTreeUpdater.prototype._nodeAttributeModified):
(WebInspector.DOMTreeUpdater.prototype._nodeInserted):
(WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
(WebInspector.DOMTreeUpdater.prototype._childNodeCountUpdated):
(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
(WebInspector.DOMTreeUpdater.prototype._reset):
Rewrite this class to separately track insertions, deletions, and modifications. Use
Sets and Maps so redundant entries are not kept around. Split the main work loop
and use fewer enum-like properties to control how each DOM element change is handled.
Attempt to update all inserted children before modifying their attributes. This
wasn't done previously, but enough duplicate attribute modifications occurred that
usually some of them would be processed after being added to the tree. There is only
one chance to do this now.
2016-06-08 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r158219): Web Inspector: Border under the default Timeline content view is too thick
https://bugs.webkit.org/show_bug.cgi?id=158533
Reviewed by Timothy Hatcher.
* UserInterface/Views/OverviewTimelineView.css:
(.timeline-view.overview > .data-grid th): Deleted.
2016-06-08 Timothy Hatcher <timothy@apple.com>
Web Inspector: Command-W should not close Web Inspector tabs; it should close the window
https://bugs.webkit.org/show_bug.cgi?id=158538
rdar://problem/26699215
Reviewed by Brian Burg.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser): Change shortcut to Command-Shift-W.
2016-06-07 Brian Burg <bburg@apple.com>
Web Inspector: reduce timer churn when processing many DOM.attributeModified messages
https://bugs.webkit.org/show_bug.cgi?id=158491
<rdar://problem/25561452>
Reviewed by Timothy Hatcher.
When the backend sends thousands of DOM.attributeModified events to the frontend, it
slows to a crawl. This is partly because redundant messages are being sent, and
because the frontend is taking too long to render attribute updates in the elements tab.
This patch is a first step to improve performance by reducing unnecessary work. It
coalesces all attribute state updates to only happen once per animation frame. This
reduces timer churn because we previously used a debouncing timer with interval of 0ms,
and that had to be cleared and restarted on every call. This change also eliminates
forced layouts when updating the selection highlights, since the DOM tree outline has
been reflowed by the time we start updating selections in a requestAnimationFrame callback.
There is still a lot of optimization to be done here, but this reduces the problem
considerably by keeping the event loop clear and making it obvious which selection
update operations are still too expensive.
* UserInterface/Base/Utilities.js:
Add a 'onNextFrame' proxy to Object. It works like debounce, except it coalesces calls
up until the next animation frame rather than a fixed timeout. It also does not extend
the timeout interval for each call.
* UserInterface/Views/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
(WebInspector.DOMTreeUpdater.prototype._characterDataModified):
(WebInspector.DOMTreeUpdater.prototype._nodeInserted):
(WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
Update on the next frame rather than on a zero delay timeout.
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline.WebInspector.TreeElement.prototype.didChange):
(WebInspector.TreeOutline.WebInspector.TreeElement.prototype._fireDidChange):
Update on the next frame rather than on a zero delay timeout.
2016-06-07 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r158219): Web Inspector: Border under Memory content view is too thick
https://bugs.webkit.org/show_bug.cgi?id=158495
<rdar://problem/26683428>
Reviewed by Timothy Hatcher.
* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory): Deleted.
2016-06-07 Brian Burg <bburg@apple.com>
Web Inspector: add a keyboard shortcut to open the new tab tab
https://bugs.webkit.org/show_bug.cgi?id=158365
<rdar://problem/26631897>
Unreviewed, fix a typo introduced in r201692.
This caused the new tab button to stop working.
* UserInterface/Base/Main.js:
(WebInspector._updateNewTabButtonState):
2016-06-05 Matt Baker <mattbaker@apple.com>
REGRESSION (r201686): Web Inspector: Fix typo causing an internal error
https://bugs.webkit.org/show_bug.cgi?id=158392
<rdar://problem/26640467>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
Fixed typo.
2016-06-04 Brian Burg <bburg@apple.com>
Web Inspector: add a keyboard shortcut to open the new tab tab
https://bugs.webkit.org/show_bug.cgi?id=158365
<rdar://problem/26631897>
Reviewed by Timothy Hatcher.
Make Cmd-t show the new tab tab if it's not already open and
there is at least one tab type that's not currently in the tab bar.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._updateNewTabButtonState):
(WebInspector.showNewTabTab):
(WebInspector.isNewTabWithTypeAllowed):
Clean up the code that decides whether we can show the new tab tab.
It is now a special case inside WebInspector.isNewTabWithTypeAllowed.
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView.prototype._updateShownTabs):
Use Array.from.
2016-06-04 Matt Baker <mattbaker@apple.com>
Web Inspector: discontinuous recordings should have discontinuities in the timeline memory graph
https://bugs.webkit.org/show_bug.cgi?id=158052
<rdar://problem/26516695>
Reviewed by Joseph Pecoraro.
Add gaps to the overview and category line charts where discontinuities
exist in the timeline recording.
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.recordsInTimeRange):
Replaces `_visibleRecords` methods found in various views.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.reset):
(WebInspector.TimelineRecording.prototype.addDiscontinuity):
(WebInspector.TimelineRecording.prototype.discontinuitiesInTimeRange):
Allow discontinuities to be added to the recording, and have a means to
look up gaps within a time range.
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords): Deleted.
Replaced by Timeline helper method.
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout):
Insert zero-points into the chart at discontinuity boundaries to create
gaps. Data points for records immediately before or after a gap are extended
to the edge of the discontinuity.
(WebInspector.MemoryTimelineOverviewGraph.prototype._visibleRecords): Deleted.
Replaced by Timeline helper method.
* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype.layout):
Insert zero-points into each category chart at discontinuity boundaries
to create gaps.
Insert zero-points into the chart to create gaps.
(WebInspector.MemoryTimelineView.prototype._visibleRecords): Deleted.
Replaced by Timeline helper method.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.discontinuitiesInTimeRange):
Forward to the TimelineRecording, which isn't exposed to clients.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
(WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
(WebInspector.TimelineRecordingContentView.prototype._recordingReset):
Track discontinuities (recording stop followed by a start) and add them
to the current recording.
2016-06-03 Brian Burg <bburg@apple.com>
Web Inspector: add a keyboard shortcut to close the current tab bar item
https://bugs.webkit.org/show_bug.cgi?id=158363
<rdar://problem/22677254>
Reviewed by Timothy Hatcher.
Make Cmd-w close the current tab. This matches Safari's keyboard shortcut.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):
Don't do anything if the New Tab tab is the only tab bar item besides the
pinned "new tab" button.
2016-06-03 Brian Burg <bburg@apple.com>
Web Inspector: setter for debugging flag InspectorBackend.dumpInspectorTimeStats does not work
https://bugs.webkit.org/show_bug.cgi?id=158366
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.set dumpInspectorTimeStats):
Actually update the backing member when the setter is called.
2016-06-03 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Remove unused WebInspector.CSSCompletions methods
https://bugs.webkit.org/show_bug.cgi?id=158352
Reviewed by Joseph Pecoraro.
* UserInterface/Models/CSSCompletions.js:
(WebInspector.CSSCompletions.prototype.firstStartsWith): Deleted.
(WebInspector.CSSCompletions.prototype.isLonghandPropertyName): Deleted.
(WebInspector.CSSCompletions.prototype.longhandsForShorthand): Deleted.
2016-06-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update NativeFunctionParameters (FontFaceSet, HTMLSlotElement, EventTarget)
https://bugs.webkit.org/show_bug.cgi?id=158333
Reviewed by Brian Burg.
* UserInterface/Models/NativeFunctionParameters.js:
Replace FontLoader with FontFaceSet. Add HTMLSlotElement API.
EventTarget is now actually in the prototype chain, so add it as
a first class citizen and keep mixing it in for legacy backends.
2016-06-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Modernize Array.prototype.every/some callsites to arrow functions
https://bugs.webkit.org/show_bug.cgi?id=158330
Reviewed by Brian Burg.
* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
* UserInterface/Models/ProfileNode.js:
(WebInspector.ProfileNode):
* UserInterface/Models/ScopeChainNode.js:
(WebInspector.ScopeChainNode):
* UserInterface/Models/StackTrace.js:
(WebInspector.StackTrace):
* UserInterface/Models/StructureDescription.js:
(WebInspector.StructureDescription):
* UserInterface/Models/TypeDescription.js:
(WebInspector.TypeDescription):
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Command.prototype.supports):
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.showContentView):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie.treeElementMatchesCookie):
(WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
* UserInterface/Views/ScopeBar.js:
(WebInspector.ScopeBar.prototype.get selectedItems):
(WebInspector.ScopeBar.prototype.hasNonDefaultItemSelected):
* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView):
(WebInspector.TabContentView.console.assert): Deleted.
2016-06-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Modernize some function expressions that bind(this) to arrow functions
https://bugs.webkit.org/show_bug.cgi?id=158315
Reviewed by Brian Burg.
Convert a common "function(x) { ... }.bind(this)" pattern to use arrow
functions "(x) => { ... }", which lexically binds `this`, slightly faster,
and uses less memory.
* UserInterface/Base/Main.js:
(WebInspector._updateNewTabButtonState):
* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype.insertAnnotations):
(WebInspector.TypeTokenAnnotator.prototype.insertAnnotations.): Deleted.
* UserInterface/Models/RenderingFrameTimelineRecord.js:
(WebInspector.RenderingFrameTimelineRecord.prototype._calculateDurationRemainder):
(WebInspector.RenderingFrameTimelineRecord):
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.requestContent):
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.requestScriptSyntaxTree):
(WebInspector.Script.prototype.requestScriptSyntaxTree.makeSyntaxTreeAndCallCallback): Deleted.
* UserInterface/Models/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
* UserInterface/Models/WrappedPromise.js:
(WebInspector.WrappedPromise):
* UserInterface/Views/BreakpointActionView.js:
(WebInspector.BreakpointActionView.prototype._updateBody):
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype._dataUpdated):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem.set item):
(WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem):
* UserInterface/Views/ErrorObjectView.js:
(WebInspector.ErrorObjectView.prototype.update):
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.onattach):
(WebInspector.GeneralTreeElement.prototype.onattach.this._boundContextMenuEventHandler): Deleted.
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch.prototype._getNextValidHEXFormat):
(WebInspector.InlineSwatch):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype.refresh):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._showPopoverForSelectedNode):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._contentForPopover):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._mouseup):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement):
(WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement.): Deleted.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype._updateEntries):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeElementAddContextMenuItems):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked.this._codeMirror.addKeyMap): Deleted.
* UserInterface/Views/TabBar.js:
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
2016-05-31 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Storage DataGrids have a half-pixel transparent/white border below the header
https://bugs.webkit.org/show_bug.cgi?id=156699
<rdar://problem/25778260>
Reviewed by Timothy Hatcher.
Increase the width of the border below the DataGrid's header to match the border in the left sidebar.
* UserInterface/Views/DataGrid.css:
(.data-grid > .header-wrapper):
2016-05-31 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Snapshot List scroll bar occludes border of containing view in top-right
https://bugs.webkit.org/show_bug.cgi?id=158219
<rdar://problem/26545018>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline th): Deleted.
* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser > .navigation-bar):
Make the border line span across the whole navigation bar, not just its table cells.
2016-05-30 Brian Burg <bburg@apple.com>
Web Inspector: Timelines: "-0.000ms" in Self Time
https://bugs.webkit.org/show_bug.cgi?id=158162
<rdar://problem/26523350>
Reviewed by Darin Adler.
Values such as -0.0000 and +0.00001 seem to indicate there is
some floating point error accumulating in profile node data.
Since the sampling profiler isn't accurate to that precision,
let's clean up the data so near-zero numbers are simply zero.
* UserInterface/Models/ProfileNode.js:
Round selfTime down to zero if it's less than the
smallest value we would show in the user interface.
2016-05-30 Brian Burg <bburg@apple.com>
Web Inspector: Uncaught exception page should pre-populate the bug's URL with the inspected page URL
https://bugs.webkit.org/show_bug.cgi?id=158055
<rdar://problem/26516693>
Reviewed by Saam Barati.
* UserInterface/Debug/UncaughtExceptionReporter.js:
Include the encoded URL in the query string if it is not empty.
2016-05-30 Matt Baker <mattbaker@apple.com>
Web Inspector: Right-clicking in Snapshot's DataGrid throws an exception
https://bugs.webkit.org/show_bug.cgi?id=157934
<rdar://problem/26380910>
Reviewed by Brian Burg.
Check that click event target is actually a cell, as it can be a row
when focusing the table after dismissing a popup menu.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle):
2016-05-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Not all transitively dominated nodes display their retained size
https://bugs.webkit.org/show_bug.cgi?id=158174
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
Use the parent reference changing in the loop instead of always using the same parent.
2016-05-27 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add indicators to show nesting levels inside DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=157468
<rdar://problem/26162640>
Reviewed by Timothy Hatcher.
Add CSS rules to give all expanded node children lists a small line on the
left border indicating that all items under the line are descendants.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li .selection):
(.tree-outline.dom li > span):
(.tree-outline.dom ol):
(.tree-outline.dom .tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
(.tree-outline.dom li.selected + ol.children.expanded):
(.tree-outline.dom li.parent::before):
2016-05-26 Matt Baker <mattbaker@apple.com>
Uncaught Exception: TypeError: undefined is not an object (evaluating 'records[endIndex].endTime')
https://bugs.webkit.org/show_bug.cgi?id=158057
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
When the entire recording is selected, rendering frames should use the
record count as its end time instead of the recording's end time.
2016-05-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'collectionData.affectedSnapshots')
https://bugs.webkit.org/show_bug.cgi?id=158051
Reviewed by Brian Burg.
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
* UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
(HeapSnapshotWorker.prototype.createSnapshot):
If by the time the timeout fires we had cleared our snapshot list, then
updateDeadNodesAndGatherCollectionData could bail. Handle gracefully.
2016-05-23 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Split console navigation bar doesn't wrap as expected
https://bugs.webkit.org/show_bug.cgi?id=157950
<rdar://problem/26395573>
Reviewed by Timothy Hatcher.
* UserInterface/Views/Main.css:
(#split-content-browser > .navigation-bar .item):
Fix the split console and don't touch any other navigation bars.
2016-05-22 Brady Eidson <beidson@apple.com>
Move to C++14.
https://bugs.webkit.org/show_bug.cgi?id=157948
Reviewed by Michael Catanzaro.
* Configurations/Base.xcconfig:
2016-05-21 Matt Baker <mattbaker@apple.com>
Web Inspector: Creating the CSSStyleDetailsSidebarPanel takes about 50ms (20%) of main load
https://bugs.webkit.org/show_bug.cgi?id=156707
<rdar://problem/25780404>
Reviewed by Timothy Hatcher.
This patch adds new View concepts, `initialLayout` and `widthDidChange`,
making it possible for hidden views to postpone the creation of their
UI subtree until they are shown for the first time.
Sidebar panels get this performance improvement by virtue of SidebarPanel
and StyleDetailsPanel, which trigger a layout when shown. This can be
removed once <https://webkit.org/b/150741> is fixed, and this is done
automatically by View.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
Should subclass View.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.layout):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get element): Deleted.
Handled in View base class.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.updateLayout): Deleted.
Relocate to `layout` override, ignore unused parameter `force`.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
Create the minimum required initial state and UI elements. Relocate
anything that can be lazy loaded to `initialLayout`.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.sizeDidChange):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Deleted.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel):
Relocate anything that can be lazy loaded to `initialLayout`.
(WebInspector.ComputedStyleDetailsPanel.prototype.initialLayout):
(WebInspector.ComputedStyleDetailsPanel.prototype.shown): Deleted.
(WebInspector.ComputedStyleDetailsPanel.prototype.widthDidChange): Deleted.
Handled in View base class.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.layout):
Resize logic can be safely moved to `sizeDidChange`, since columns are
always initialized when the width changes.
(WebInspector.DataGrid.prototype.sizeDidChange):
Reposition headers, scrollbars.
(WebInspector.DataGrid.prototype._updateHeaderAndScrollbar):
Broke out header repositioning, which needs to be called whenever
column widths are initialized or the view size changes.
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype.layout):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.sizeDidChange):
(WebInspector.RulesStyleDetailsPanel.prototype.widthDidChange): Deleted.
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype._recalculateWidth):
Width changes need to be coordinated by the View base class, since the
initial layout must have occurred before handling a width change.
Force a layout with a resize layout reason.
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.get displayName):
Drive-by style fix: add getter so that CSSStyleDetailsSidebarPanel
doesn't have to read the private property directly.
(WebInspector.SidebarPanel.prototype.shown):
Force a layout whenever the panel is shown.
(WebInspector.SidebarPanel.prototype.sizeDidChange):
(WebInspector.SidebarPanel):
(WebInspector.SidebarPanel.prototype.widthDidChange): Deleted.
* UserInterface/Views/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype.shown):
Schedule a layout when shown. A forced layout isn't necessary.
Unlike SidebarPanels, the initial state of style panels doesn't depend
on its layout, and can be safely initialized by the next rAF.
(WebInspector.StyleDetailsPanel.prototype.hidden):
Cancel a pending layout if the panel is hidden before the next AF.
(WebInspector.StyleDetailsPanel.prototype.widthDidChange): Deleted.
Not needed, defined in View base class.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.sizeDidChange):
(WebInspector.TimelineOverview.prototype.layout):
Moved resize logic to `sizeDidChange`.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.sizeDidChange):
(WebInspector.TimelineRuler.prototype.layout):
Moved resize logic to `sizeDidChange`.
* UserInterface/Views/View.js:
(WebInspector.View):
(WebInspector.View.prototype.updateLayout):
(WebInspector.View.prototype.cancelLayout):
Allow a pending layout to be canceled. Useful when a view with a
pending layout is hidden before the layout occurs.
(WebInspector.View.prototype.get layoutReason):
Protected getter for subclasses that need to check the layout reason
outside `sizeDidChange`.
(WebInspector.View.prototype.initialLayout):
Subclass hook to create UI subtree the first time a layout occurs.
Called only once during the lifetime of the View.
(WebInspector.View.prototype.layout):
Drive-by comment fix.
(WebInspector.View.prototype.sizeDidChange):
New layout cycle hook for subclasses.
(WebInspector.View.prototype._layoutSubtree):
Do an initial layout the first time layout is called.
Call the `sizeDidChange` hook so that subclasses can update state
which depends on size/position before doing layout.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
Create the minimum required initial state and UI elements. Relocate
anything that can be lazy loaded to `initialLayout`.
(WebInspector.VisualStyleDetailsPanel.prototype.refresh):
No changes, shifting line numbers confused the diff.
(WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
(WebInspector.VisualStyleDetailsPanel.prototype.sizeDidChange):
(WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange): Deleted.
2016-05-21 Matt Baker <mattbaker@apple.com>
Assertion Failed: StyleDetailsPanel.markAsNeedsRefresh() called with null domNode
https://bugs.webkit.org/show_bug.cgi?id=157955
<rdar://problem/26398943>
Reviewed by Timothy Hatcher.
CSSStyleDetailsSidebarPanel `visible` is true while the panel is being
removed from the details sidebar, even after calling `hidden()`. This
causes it to refresh its current StyleDetailsPanel with a null DOM node.
Unfortunately, SidebarPanel.visible isn't toggled by calling shown/hidden.
Since SidebarPanel.visible is only true if the panel is selected, we should
deselect panels before removing them.
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.removeSidebarPanel):
Deselect the panel being removed before calling visibiltyDidChange.
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.toggle): Deleted.
(WebInspector.SidebarPanel.prototype.willRemove): Deleted.
Drive-by update to remove some unused methods.
2016-05-20 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION(r200740): Web Inspector: TimelineRecordBar class lists not properly cleared, bleeding colors when zooming in and out
https://bugs.webkit.org/show_bug.cgi?id=157959
<rdar://problem/26393067>
Reviewed by Brian Burg.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.prototype.set records):
When records are cleared, clear all classes.
2016-05-20 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Split Console is auto opening all the time when using Inspect Element context menu
https://bugs.webkit.org/show_bug.cgi?id=157910
<rdar://problem/26374066>
Reviewed by Timothy Hatcher.
Currently, "synthetic" property is only used to decide whether adding a console message should
open the console or not. Replace it with "shouldRevealConsole".
* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.inspectNodeObject.nodeAvailable):
(WebInspector.DOMTreeManager.prototype.inspectNodeObject):
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult.saveResultCallback):
(WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted.printResult):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
* UserInterface/Models/ConsoleCommandResultMessage.js:
(WebInspector.ConsoleCommandResultMessage):
(WebInspector.ConsoleCommandResultMessage.prototype.get shouldRevealConsole):
(WebInspector.ConsoleCommandResultMessage.prototype.get synthetic): Deleted.
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.):
(WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
2016-05-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Can't resume Debugger after breaking on exception in Promise
https://bugs.webkit.org/show_bug.cgi?id=157240
<rdar://problem/26030890>
Reviewed by Timothy Hatcher.
If we pause but have no source code to show we paused in purely internal
code. In such cases we were attempting to resume without actually
telling the backend to resume, so the backend and frontend were out of
sync. The frontend thinking it is "paused" without an activeCallFrame
and the backend actually being paused.
This change more gracefully handles this situation. It actually resumes
both the frontend and the backend.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Resume the backend and the frontend.
(WebInspector.DebuggerManager.prototype._didResumeInternal):
Don't look at the active call frame, look at the paused state.
This may issue a Resumed event without actually triggering a
Paused event if this was the only pause, but that is harmless.
2016-05-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Main Resource with <scripts> not showing up in debugger sidebar after reload
https://bugs.webkit.org/show_bug.cgi?id=157939
<rdar://problem/26385691>
Reviewed by Timothy Hatcher.
The order of events on a reload are:
- MainResourceChanged, add main resource
- ScriptsCleared, remove all elements
This change makes it so ScriptsCleared add the main resource (and
potentially other resources). This also avoids the work in
MainResourceChanged on reloads / navigations that would be wasted if
ScriptsCleared were to just remove it. However, this is still needed
for initial load where ScriptsCleared does not happen.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange):
Only add the main resource tree here when we are first loading.
(WebInspector.DebuggerSidebarPanel.prototype._scriptsCleared):
Add the main resource tree after we remove all children in navigations.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
This was not gracefully handling if there was no selected tree element.
2016-05-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Visual Style connectors are not always centered properly
https://bugs.webkit.org/show_bug.cgi?id=157932
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStylePropertyEditorLink.css:
(.visual-style-property-editor-link):
Remove the 1px margin on @2x that would cause jitter at different
sidebar widths. It is however needed on @1x.
(.visual-style-property-editor-link:not(.link-all)):
Make the height 20 so these both move closer to the center of the
<select> elements they are next to. They are not perfectly centered
as that would require a half pixel.
(.visual-style-property-editor-link.link-vertical):
Move the top line up a pixel so it is "up 0.5" from center and
the bottom one is already "down 0.5" from the center.
2016-05-19 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r189385): Web Inspector: CSS properties modified via JS don't update in the Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=157918
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager):
(WebInspector.DOMTreeManager.prototype._inlineStyleInvalidated):
(WebInspector.DOMTreeManager.prototype._loadNodeAttributes):
Set the initial value of _loadNodeAttributesTimeout to be 0,
as setTimeout always returns a positive integer.
2016-05-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Heap Snapshots taken before timeline view has a zero time do not get shown
https://bugs.webkit.org/show_bug.cgi?id=157923
<rdar://problem/26377366>
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
(WebInspector.HeapAllocationsTimelineDataGridNode):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.updateTimestamp):
Show emDash for the timestamp if we don't yet have a zero time.
Update when we get a zero time.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype.layout):
(WebInspector.HeapAllocationsTimelineView.prototype.reset):
Save a list of nodes pre-zero time and update them when we get a zero time.
2016-05-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: HeapSnapshot Instances view should remove dead objects
https://bugs.webkit.org/show_bug.cgi?id=157920
<rdar://problem/26375866>
Reviewed by Timothy Hatcher.
* UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
(HeapSnapshotWorker):
(HeapSnapshotWorker.prototype.clearSnapshots):
(HeapSnapshotWorker.prototype.createSnapshot):
Preserve a list of snapshots for this page's session. When
new snapshots come in we can determine which nodes have died
and update previous snapshots. Emit a CollectionEvent
containing the nodes that were deleted and affected snapshots.
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot):
Stash the largest node identifier.
Create a byte-per-node list to mark it as dead or alive.
All snapshots start with all live nodes.
(HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
(HeapSnapshot.prototype._markDeadNodes):
When we get a new snapshot we can mark dead nodes in previous
snapshots. Determine the nodeIdentifiers of dead nodes, and
mark them as dead if they existed in previous snapshots.
(HeapSnapshot.buildCategories):
(HeapSnapshot.prototype.updateCategories):
(HeapSnapshotDiff.prototype.updateCategories):
Include a "deadCount" in category data. And provide a method
to return an updated category list.
(HeapSnapshot.prototype.serializeNode):
Include a "dead" property on nodes when they are first fetched.
* UserInterface/Proxies/HeapSnapshotDiffProxy.js:
(WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
(WebInspector.HeapSnapshotDiffProxy.prototype.updateCategories):
* UserInterface/Proxies/HeapSnapshotNodeProxy.js:
(WebInspector.HeapSnapshotNodeProxy):
(WebInspector.HeapSnapshotNodeProxy.deserialize):
* UserInterface/Proxies/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
(WebInspector.HeapSnapshotProxy.prototype.updateCategories):
Update snapshot proxies from a collection event by updating properties
and dispatching an event from the model object.
* UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
(WebInspector.HeapSnapshotWorkerProxy):
(WebInspector.HeapSnapshotWorkerProxy.prototype.clearSnapshots):
(WebInspector.HeapSnapshotWorkerProxy.prototype._mainResourceDidChange):
Clear the session snapshot list when the main resource changes.
However we can't yet clear the HeapSnapshot objects on the worker
because we may still have UI that interact with them.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
Register and unregister for HeapSnapshot collection events.
(WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent.updateHeapSnapshotForEvent):
(WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent):
Update all the snapshots we know about when a collection event happens.
* UserInterface/Views/HeapSnapshotClassDataGridNode.js:
(WebInspector.HeapSnapshotClassDataGridNode.prototype.removeCollectedNodes):
(WebInspector.HeapSnapshotClassDataGridNode.prototype.updateCount):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._fetchBatch):
* UserInterface/Views/HeapSnapshotContentView.js:
(WebInspector.HeapSnapshotContentView.prototype._heapSnapshotDataGridTreeDidPopulate):
(WebInspector.HeapSnapshotContentView):
* UserInterface/Views/HeapSnapshotDataGridTree.js:
(WebInspector.HeapSnapshotDataGridTree):
(WebInspector.HeapSnapshotDataGridTree.prototype.removeChild):
(WebInspector.HeapSnapshotDataGridTree.prototype.removeCollectedNodes):
(WebInspector.HeapSnapshotDataGridTree.prototype._heapSnapshotCollectedNodes):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.removeCollectedNodes):
(WebInspector.HeapSnapshotInstancesDataGridTree):
Update the Instances DataGridTree UI when a collection event happens.
Remove any top level InstanceDataGridNodes that may be showing for collected nodes.
Update the category counts on the ClassDataGridNodes.
Update FetchMoreDataGridNodes to have updated counts (and replace removed nodes).
2016-05-19 Timothy Hatcher <timothy@apple.com>
Web Inspector: REGRESSION: Search magnifying glass shifted in Search tab input field
https://bugs.webkit.org/show_bug.cgi?id=157913
rdar://problem/26374424
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]): Removed padding-left.
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]::-webkit-search-results-button):
Added. Add margin-right here instead.
2016-05-19 Timothy Hatcher <timothy@apple.com>
Web Inspector: Timelines "Edit" button should be right-aligned
https://bugs.webkit.org/show_bug.cgi?id=157909
rdar://problem/26373969
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button.text-only): Deleted height: auto. Now inherited.
* UserInterface/Views/NavigationBar.css:
(.navigation-bar .item): Change height to auto to support any NavigationBar height.
This is needed since the Timelines tab has a shorter NavigationBar height, and
flexible items were overflowing.
* UserInterface/Views/TextNavigationItem.css:
(.navigation-bar .item.text): Deleted height: auto. Now inherited.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview): Add a FlexibleSpaceNavigationItem before the Edit button.
2016-05-19 Brian Burg <bburg@apple.com>
Web Inspector: timelines should not update via requestAnimationFrame unless Web Inspector is visible
https://bugs.webkit.org/show_bug.cgi?id=157897
<rdar://problem/26330802>
Reviewed by Timothy Hatcher.
The timelines overview tries to animate using requestAnimationFrame, even if the
inspector frontend is not really visible. When it does this, requestAnimationFrame
simply stalls out until the inspector becomes visible. If a recording is started
while the inspector is not visible, then when it is shown again, the timeline will
start to animate from 0s instead of the current time. This happens because the
requestAnimationFrame was requested when the current time actually was 0, and it
finally executes some time later, when the current time is no longer accurate.
Since the timelines animate by calculating time elapsed since the previous frame
rather than using event timestamps, there is no way for the timelines to skip forward
in their animations in scenarios where the current time becomes arbitrarily skewed.
To fix this, consider the visibility state of the frontend as reported by the UIProcess.
Fire a global notification when visibility state changes, and start or stop updating
the current time as the frontend becomes visible or not shown.
This does not affect most other uses of requestAnimationFrame, which are used as
timers to call updateLayout at an appropriate time. The timelines case is different
because the current time is fixed prior to requesting an animation frame, and
later animation frames are only triggered by earlier requests, so there's nothing to
coalesce.
* UserInterface/Base/Main.js:
(WebInspector.loaded): Initialize WebInspector.visible.
* UserInterface/Base/Object.js: Add new event.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setIsVisible): Added.
* UserInterface/Test/Test.js:
(WebInspector.updateVisibilityState): Add a stub.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._inspectorVisibilityStateChanged):
If visibility state changes while capturing, then start or stop updating the
current time as appropriate. Otherwise, refresh the timelines with updated
times so that they know about the recording's updated start/current/end time.
(WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
Bail out if the Web Inspector frontend is not visible to the user and won't be
able to service requestAnimationFrames immediately.
2016-05-18 Timothy Hatcher <timothy@apple.com>
Web Inspector: Classes toggle wraps in some localizations
https://bugs.webkit.org/show_bug.cgi?id=157878
rdar://problem/26108859
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
Add white-space: nowrap.
2016-05-18 Matt Baker <mattbaker@apple.com>
Web Inspector: unable to switch between navigation tree outlines using up/down arrow keys
https://bugs.webkit.org/show_bug.cgi?id=157713
<rdar://problem/26287086>
Reviewed by Timothy Hatcher.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
Listen for TreeOutline focus changes, and associate trees and their DOM
elements for quick lookup when handling focus events.
(WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineDidFocus):
(WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
When selecting a tree element causes an element in a different tree outline
to be deselected, remember the old selection so that it can be restored
the next time the tree outline get the focus.
2016-05-18 Matt Baker <mattbaker@apple.com>
Web Inspector: Checkbox disappears when unchecking CSS property with value containing a semicolon
https://bugs.webkit.org/show_bug.cgi?id=157862
<rdar://problem/16214480>
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createCommentedCheckboxMarker):
Modify regex to match CSS properties with url() and quoted values,
which can contain semicolons.
2016-05-18 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: ugly gaps in Call Trees data grid when expanding more than one level
https://bugs.webkit.org/show_bug.cgi?id=157829
<rdar://problem/26339922>
Reviewed by Timothy Hatcher.
Make a more specific CSS selector to avoid style conflicts.
* UserInterface/Views/DataGrid.css:
(.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > div): Deleted.
(.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > .cell-content):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.createCell):
2016-05-18 Brian Burg <bburg@apple.com>
Web Inspector: InspectorFrontendAPI.setTimelineProfilingEnabled should not implicitly show Timelines tab
https://bugs.webkit.org/show_bug.cgi?id=157846
Reviewed by Timothy Hatcher.
Currently, if the Web Inspector opens for an in-progress or finished automation session,
it will always show the Timelines tab, disregarding any previous user view state. This
is annoying and is a bad user experience when trying to debug the same test repeatedly.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled): Don't implicitly show Timelines tab.
(InspectorFrontendAPI.showTimelines): Added. This is called explicitly when desired.
2016-05-18 Brian Burg <bburg@apple.com>
Web Inspector: DebuggerSidebarPanel doesn't need to help manage temporarily disabling breakpoints while capturing
https://bugs.webkit.org/show_bug.cgi?id=157854
Reviewed by Timothy Hatcher.
Duplicate the event listeners in DebuggerManager and move non-view-related
state updates out of DebuggerSidebarPanel's listeners into DebuggerManager's listeners.
This allows a test to exercise the temporary-disablement code paths during capturing.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
Use this to make the code a bit more readable.
(WebInspector.DebuggerManager.prototype._startDisablingBreakpointsTemporarily):
(WebInspector.DebuggerManager.prototype._stopDisablingBreakpointsTemporarily):
(WebInspector.DebuggerManager.prototype.startDisablingBreakpointsTemporarily): Deleted.
(WebInspector.DebuggerManager.prototype.stopDisablingBreakpointsTemporarily): Deleted.
Make this private since it's not used by other classes anymore.
(WebInspector.DebuggerManager.prototype._timelineCapturingWillStart): Added.
(WebInspector.DebuggerManager.prototype._timelineCapturingStopped): Added.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingWillStart): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingStopped): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingWillStart): Added.
(WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingStopped): Added.
Make the listener names consistent with TimelineManager: timelineCapturing{WillStart,Stopped}.
2016-05-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve console.takeHeapSnapshot documentation in console
https://bugs.webkit.org/show_bug.cgi?id=157853
Reviewed by Timothy Hatcher.
* UserInterface/Models/NativeFunctionParameters.js:
Mention optional label argument.
2016-05-18 Brian Burg <bburg@apple.com>
Web Inspector: race between frontend and backend both starting timeline recordings causes console assert
https://bugs.webkit.org/show_bug.cgi?id=157850
<rdar://problem/26349229>
Reviewed by Joseph Pecoraro.
If TimelineManager has created a fresh recording and the Timeline.autoCaptureStarted
event comes before Timeline.recordingStarted, then the manager will try to start the
same recording twice. In this scenario, the manager should just wait until the
Timeline.recordingStarted event comes, since it causes TimelineMangare to set up
the isCapturing flag and other state.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.capturingStarted):
(WebInspector.TimelineManager.prototype.autoCaptureStarted):
Add a new flag, this._waitingForCapturingStartedEvent. If true, don't start the
recording in response to this event.
2016-05-18 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION(r197488): Incorrect start time in Rendering Frames timeline grid
https://bugs.webkit.org/show_bug.cgi?id=157840
<rdar://problem/26344937>
Reviewed by Brian Burg.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
The Rendering Frames timeline view needs a valid zero time.
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
Adjust ruler selection path component values by the zero time unless
the current view is the Rendering Frames timeline view.
2016-05-17 Matt Baker <mattbaker@apple.com>
Web Inspector: NavigationSidebarPanel should coordinate item selection between its tree outlines
https://bugs.webkit.org/show_bug.cgi?id=157813
<rdar://problem/26331779>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
Deselecting elements in other tree outlines is now done in the base class.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
Listen for selection changed events on all content tree outlines.
(WebInspector.NavigationSidebarPanel.prototype.treeElementAddedOrChanged):
Moved stub from the public section to the protected section.
(WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
Deselect tree elements in any content tree outline that is not the
parent of the selected element.
(WebInspector.NavigationSidebarPanel.prototype._treeSelectionDidChange): Deleted.
Rename _contentTreeOutlineTreeSelectionDidChange, to prevent being
shadowed by subclasses with _treeSelectionDidChange event handlers.
2016-05-17 Matt Baker <mattbaker@apple.com>
Web Inspector: Remove TimelineSidebarPanel.js as it's no longer referenced anywhere
https://bugs.webkit.org/show_bug.cgi?id=157819
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineSidebarPanel.js: Removed.
Removed unused file.
2016-05-17 Brian Burg <bburg@apple.com>
Web Inspector: inspector tests should redirect and log console.trace() calls in test output
https://bugs.webkit.org/show_bug.cgi?id=157802
<rdar://problem/26325671>
Reviewed by Timothy Hatcher.
* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness.prototype.redirectConsoleToTestOutput.createProxyConsoleHandler):
Remove bind() that is now unnecessary. Also redirect console.warn.
(FrontendTestHarness.prototype.redirectConsoleToTestOutput):
For console.trace(), throw and catch a dummy Error to get a stack trace.
Do some post processing on it to remove useless frames and sanitize file paths.
2016-05-17 Brian Burg <bburg@apple.com>
Web Inspector: Filtering huge data grids should yield occasionally so the UI remains responsive
https://bugs.webkit.org/show_bug.cgi?id=157702
<rdar://problem/26282898>
Based on a patch by Matt Baker <mattbaker@apple.com> on 2016-05-16
Reviewed by Timothy Hatcher.
This patch adds a new class, YieldableTask, for processing large
data sets without starving the runloop. A yieldable task takes a delegate,
an iterator that produces the items to be processed by the delegate, and
the "work interval" time slice and "idle interval" to wait between time slices.
It works by using `yield` to suspend processing when the current time
slice is exceeded, and setting a timeout to wait out the idle interval.
The iterator is responsible for deciding a good traversal order for items,
and the delegate is responsible for processing each item in turn. Tasks
cannot be reused once cancelled or processing completes.
Change DataGrid to use a yieldable task for filtering data grid nodes.
When the filtering criteria changes, cancel the task and run a new task.
* UserInterface/Base/YieldableTask.js: Added.
(WebInspector.YieldableTask.prototype.get processing):
(WebInspector.YieldableTask.prototype.get cancelled):
(WebInspector.YieldableTask.prototype.get idleInterval):
(WebInspector.YieldableTask.prototype.get workInterval):
Add getters.
(WebInspector.YieldableTask.prototype.start.createIteratorForProcessingItems):
(WebInspector.YieldableTask.prototype.start):
Set up an iterator that cranks through items to be processed until the
time slice is exceeded. Check to see if the task is cancelled before and
after calling out to the delegate to perform processing on the item.
(WebInspector.YieldableTask.prototype.cancel):
Set the cancel flag. Tell the delegate the task is finished soon.
(WebInspector.YieldableTask.prototype._processPendingItems):
Request the next item from the cranking iterator so it tries to process
more items. If it yields but still has more items to process, set a timeout
and continue processing more items after the idle interval.
(WebInspector.YieldableTask.prototype._willYield): Notify the delegate.
(WebInspector.YieldableTask.prototype._didFinish): Clear state and notify.
(WebInspector.YieldableTask):
* UserInterface/Main.html:
* UserInterface/Test.html: Add new file.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.filterDidChange):
Cancel the currently running filter task, if any exists.
(WebInspector.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
(WebInspector.DataGrid.prototype._updateFilter):
Set up and start a new filtering task when the filter updates.
(WebInspector.DataGrid.prototype.yieldableTaskWillProcessItem):
(WebInspector.DataGrid.prototype.yieldableTaskDidYield):
(WebInspector.DataGrid.prototype.yieldableTaskDidFinish):
Batch up notifications about filtered nodes changing since this can
cause a lot of unnecessary work by event listeners.
2016-05-17 Brian Burg <bburg@apple.com>
Web Inspector: breakpoints in sourceURL named scripts are not persisted
https://bugs.webkit.org/show_bug.cgi?id=157714
<rdar://problem/26287099>
Reviewed by Joseph Pecoraro.
The Inspector frontend doesn't try to persist a breakpoint that
lacks a URL, even if the breakpoint has a sourceURL. Similarly, for
breakpoints without a URL, the frontend asks the backend to create
the breakpoint for a specific script identifier rather than a
URL-based breakpoint. This prevents breakpoints in injected scripts
from being resolved if the page is reloaded.
The Inspector backend knows how to resolve URL-based breakpoints
by matching against the script's URL or sourceURL, so we just need
to teach the frontend when either is appropriate to use.
This patch adds SourceCode.contentIdentifier, which is roughly
`url || sourceURL` for content that is not emphemeral, such as
console evaluations. Change breakpoint and debugger code to use
`contentIdentifier` rather than `url`, and pass contentIdentifier
to the backend when setting a breakpoint by URL.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
(WebInspector.DebuggerManager.prototype.scriptsForURL):
(WebInspector.DebuggerManager.prototype.get searchableScripts):
(WebInspector.DebuggerManager.prototype.removeBreakpoint):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
(WebInspector.DebuggerManager.prototype._setBreakpoint):
(WebInspector.DebuggerManager.prototype._saveBreakpoints):
(WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.get contentIdentifier):
(WebInspector.Breakpoint.prototype.get info):
(WebInspector.Breakpoint.prototype.saveIdentityToCookie):
(WebInspector.Breakpoint.prototype.get url): Deleted.
Replace uses of Breakpoint.prototype.get url with
contentIdentifier inside the class and at all callsites.
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.get contentIdentifier):
Added. Use the URL, or the sourceURL unless the script is
ephemeral and only run once, like as a console evaluation.
* UserInterface/Models/SourceCode.js:
(WebInspector.SourceCode.prototype.get url): Added.
All subclasses already override this getter. Add it here so that
the default implementation of contentIdentifier can use it.
(WebInspector.SourceCode.prototype.get contentIdentifier): Added.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.get filterableData):
* UserInterface/Views/ProbeSetDetailsSection.js:
(WebInspector.ProbeSetDetailsSection.prototype._updateLinkElement):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._matchesBreakpoint):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects):
2016-05-16 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: TypeError: null is not an object (evaluating 'event.data.pathComponent.domTreeElement')
https://bugs.webkit.org/show_bug.cgi?id=157759
<rdar://problem/26309427>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._pathComponentSelected):
Handle possible null path components.
* UserInterface/Views/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent.prototype.get selectedPathComponent):
When there is a list of just one that is triggered, the Clicked
event should produce that one, to be consistent with clicking
on a list of multiple elements and selecting the same value.
2016-05-16 Saam barati <sbarati@apple.com>
Hook up ShadowChicken to the debugger to show tail deleted frames
https://bugs.webkit.org/show_bug.cgi?id=156685
<rdar://problem/25770521>
Reviewed by Filip Pizlo and Mark Lam and Joseph Pecoraro.
This patch makes the WebInspector display tail deleted frames.
We show tail deleted frames with a gray [f] instead of a green
[f]. We also put text in the tooltip to indicate that the frame
is tail deleted. Other than that, tail deleted frames behave like
normal frames. You can evaluate in them, inspect their scope, etc.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/TailDeletedFunction.svg: Added.
* UserInterface/Images/gtk/TailDeletedFunction.svg: Added.
* UserInterface/Models/CallFrame.js:
* UserInterface/Views/CallFrameIcons.css:
* UserInterface/Views/CallFrameTreeElement.js:
* UserInterface/Views/CallFrameView.js:
2016-05-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars
https://bugs.webkit.org/show_bug.cgi?id=157590
Reviewed by Timothy Hatcher.
Set the right padding of the DataGrid header to match the scrollbar width.
* UserInterface/Views/DataGrid.css:
(.data-grid .data-container):
(.data-grid.inline .data-container):
Don't show scrollbars for inline data grids.
(.data-grid > .header-wrapper):
(.data-grid.no-header > .header-wrapper > table.header):
(.data-grid.no-header > table.header): Deleted.
(.data-grid th): Deleted.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
We can't add padding-rigth to a table. Wrap the table in div.header-wrapper.
(WebInspector.DataGrid.prototype._updateScrollbarPadding):
(WebInspector.DataGrid.prototype.layout):
2016-05-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Background stripes don't span the width of Network sidebar
https://bugs.webkit.org/show_bug.cgi?id=157744
Reviewed by Timothy Hatcher.
* UserInterface/Views/NetworkSidebarPanel.css:
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content):
2016-05-16 Antoine Quint <graouts@apple.com>
Web Inspector: Computed style shows both prefixed and unprefixed variants of properties
https://bugs.webkit.org/show_bug.cgi?id=157674
<rdar://problem/24339756>
Reviewed by Timothy Hatcher.
We make the CSSProperty `implicit` property read-write, and in the case where a computed style
has a property marked as explicit, we also check that it's found in matching rules to consider
it non-implicit. This correctly filters out variants of properties set explicitly.
* UserInterface/Models/CSSProperty.js:
(WebInspector.CSSProperty.prototype.set implicit):
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
(WebInspector.DOMNodeStyles):
2016-05-14 Timothy Hatcher <timothy@apple.com>
Web Inspector: DataGrid _updateVisibleRows dominates profiles of timeline recordings when data grid (Overview or TimelineDataGrids) is showing
https://bugs.webkit.org/show_bug.cgi?id=157664
rdar://problem/26262219
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid): Added new members.
(WebInspector.DataGrid.prototype.layout): Reset _cachedScrollTop and _cachedScrollHeight on resize.
(WebInspector.DataGrid.prototype._noteScrollPositionChanged): Added.
(WebInspector.DataGrid.prototype._updateVisibleRows): Cache sizes and positions when possible.
(WebInspector.DataGridNode.prototype.set hidden): Added call to _noteRowsChanged.
(WebInspector.DataGridNode.prototype.collapse): Call _noteRowsChanged instead of needsLayout.
(WebInspector.DataGridNode.prototype.expand): Call _noteRowsChanged instead of needsLayout.
(WebInspector.DataGrid.prototype._updateFilter): Removed direct call to _updateVisibleRows, this is
better handled by DataGridNode's hidden setter.
2016-05-14 Timothy Hatcher <timothy@apple.com>
Web Inspector: Many DataGrid instances do not save/restore their scroll position
https://bugs.webkit.org/show_bug.cgi?id=157709
rdar://problem/26286090
Reviewed by Brian Burg.
* UserInterface/Models/BackForwardEntry.js:
(WebInspector.BackForwardEntry.prototype.makeCopy): Added.
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.showContentView): Copy the last entry for the view.
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.get scrollableElements): Added.
* UserInterface/Views/HeapSnapshotContentView.js:
(WebInspector.HeapSnapshotContentView.prototype.get scrollableElements): Added.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get scrollableElements): Added.
* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype.get scrollableElements): Added.
* UserInterface/Views/ProfileView.js:
(WebInspector.ProfileView.prototype.get scrollableElements): Added.
(WebInspector.ProfileView.prototype._repopulateDataGridFromTree): Removed unused skipRefresh argument.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Added.
* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView.prototype.get scrollableElements): Added.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get scrollableElements): Added.
2016-05-14 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Empty line shows arrow when hovering over Animation Frame Requested in timeline recording
https://bugs.webkit.org/show_bug.cgi?id=157707
Reviewed by Timothy Hatcher.
* UserInterface/Views/DataGrid.css:
(.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > div):
2016-05-13 Simon Fraser <simon.fraser@apple.com>
Unprefix -webkit-cross-fade()
https://bugs.webkit.org/show_bug.cgi?id=157632
Reviewed by Darin Adler.
* UserInterface/Models/CSSKeywordCompletions.js:
2016-05-13 Matt Baker <mattbaker@apple.com>
Web Inspector: Typing "layout" in filter for Layout and Rendering Timeline matches everything
https://bugs.webkit.org/show_bug.cgi?id=157684
<rdar://problem/26276588>
Reviewed by Joseph Pecoraro.
Hidden columns should not participate in built-in grid filtering
using DataGrid.filterText. Hidden columns can still be custom filtered,
which is how TimelineDataGrid filters scopebar columns.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.get filterableData):
Skip hidden columns.
2016-05-13 Matt Baker <mattbaker@apple.com>
Web Inspector: Script ProfileViews should be searchable
https://bugs.webkit.org/show_bug.cgi?id=157581
<rdar://problem/26228530>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.get filterText):
Make filterText readable.
* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode.prototype.get callingContextTreeNode):
(WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
Add filterable data for the "function" column.
(WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
(WebInspector.ProfileDataGridNode.prototype.get node): Deleted.
Renamed callingContextTreeNode to be less ambiguous.
* UserInterface/Views/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
* UserInterface/Views/ProfileView.js:
(WebInspector.ProfileView.prototype.get dataGrid):
Expose data grid for use in parent view.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.selectRecord):
Drive-by fix: forward property to current child TimelineView.
* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView):
(WebInspector.ScriptProfileTimelineView.prototype._scopeBarSelectionDidChange):
(WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
Helper function to switch profile views. Persist filter text when
switching to the new profile view.
(WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar): Deleted.
Remove FIXME and show filter bar.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.setupDataGrid):
Support switching to a new data grid.
(WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters):
Hooking up filtering causes data grid nodes to be filtered based on the
ruler selection. Although ScriptProfileTimelineView performs its own
time-based filtering, this is necessary to prevent an assert.
(WebInspector.TimelineView.prototype._timelineDataGridSelectedNodeChanged):
(WebInspector.TimelineView.prototype._timelineDataGridNodeWasFiltered):
Converted arrow functions to member functions to allow unregistering
event listeners on outgoing data grid when swapping grids.
2016-05-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Remove "Extra Scripts" folder from Resources sidebar if all children removed
https://bugs.webkit.org/show_bug.cgi?id=157656
Reviewed by Timothy Hatcher.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved):
Remove parent folder after last script tree element removed.
2016-05-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Can't filter Rendering Frames by duration
https://bugs.webkit.org/show_bug.cgi?id=157654
Reviewed by Timothy Hatcher.
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
Call filterDidChange on the grid, not the base class.
TimelineView.filterDidChange exists to let TimelineViews perform
additional work when the grid filter changes (see LayoutTimelineView).
(WebInspector.RenderingFrameTimelineView):
2016-05-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Deleting nodes in DOM Tree sometimes changes selection to parent instead of sibling
https://bugs.webkit.org/show_bug.cgi?id=157649
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._updateChildren): Deleted.
When pressing delete, we remove the node via DOM.removeNode()
and remove the DOMTreeElement when we receive a successful response.
However, the backend could send a DOM.childNodeRemoved event before
the response from DOM.removeNode, and the frontend would have a race
between DOMTreeUpdater's timeout and the removeNode callback.
In DOMTreeUpdater's path, DOMTreeElement updateChildren would notice
a removed node and set the selection to the parent node.
In the DOM.removeNode path, TreeOutline would update the selection
based on availability of a previousSibling/nextSibling/parent.
Remove the custom code in DOMTreeElement updateChildren, so that it
can just do the normal TreeOutline behavior via removeChildAtIndex.
2016-05-12 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION: Web Inspector: Fails to load sourceMappingURL with relative URL
https://bugs.webkit.org/show_bug.cgi?id=157650
<rdar://problem/26133763>
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/SourceMapManager.js:
Wrong order of arguments. The intent was to pass the incoming
baseURL as the partialURL, because if it was not absolute by
that point we could make it relative to the main resource.
However we accidentally put the main resource as the partial
portion, which would just always return the main resource url.
Swap the order, so that if the incoming base is absolute
(such as a resource.url) that will be used, but if the
incoming base is relative (e.g. an incomplete sourceURL) we
can make it absolute with the main resource.
2016-05-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Uncaught exception when removing selected Timeline instrument
https://bugs.webkit.org/show_bug.cgi?id=157639
<rdar://problem/26252938>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
Remove timeline tree element before modifying state. Removing the tree
element triggers a SelectionDidChange event, which can have side effects.
2016-05-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timeline Reset button only resets the one active Script TimelineView
https://bugs.webkit.org/show_bug.cgi?id=157638
Reviewed by Timothy Hatcher.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.reset):
Reset should reset all the views.
(WebInspector.ScriptClusterTimelineView.prototype.get navigationSidebarTreeOutline): Deleted.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView.prototype.get navigationSidebarTreeOutline): Deleted.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineScopeBar): Deleted.
Remove dead code. Nobody calls these getters.
2016-05-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Layout timeline popovers are inconsistently shown
https://bugs.webkit.org/show_bug.cgi?id=157640
<rdar://problem/26253394>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
Fix the bug by clearing _showPopoverTimeout when we show the popover.
(WebInspector.TimelineDataGrid.prototype._hidePopover):
Modernize the code to use arrow functions and avoid binds.
(WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
Updating with presentNewContentWithFrame animates the popover to the correct
position instead of jumping and ending up at the wrong location.
2016-05-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove forced layouts caused by DOMTreeElement during Timeline recording
https://bugs.webkit.org/show_bug.cgi?id=157641
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.updateSelection): Deleted.
This triggers forced layout and I could never actually get it to trigger anyways.
Its history is from the original import, so I don't know why it was added to begin with.
Just remove it.
2016-05-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r200718.
https://bugs.webkit.org/show_bug.cgi?id=157637
Data grid column dividers are misaligned (Requested by NVI on
#webkit).
Reverted changeset:
"Web Inspector: Contents of Duration column are covered by
always on (legacy) scroll bars"
https://bugs.webkit.org/show_bug.cgi?id=157590
http://trac.webkit.org/changeset/200718
2016-05-12 Matt Baker <mattbaker@apple.com>
Web Inspector: 11% of time in TimelineRecording spent updating DataGrid that is not visible
https://bugs.webkit.org/show_bug.cgi?id=157612
<rdar://problem/26239051>
Reviewed by Timothy Hatcher.
During recording, a timeline view is constantly having its cached time
values updated. These updates should only trigger forced layouts if the
view supports live data.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.set zeroTime):
Drive-by fix, add call to _filterTimesDidChange.
(WebInspector.TimelineView.prototype.set startTime):
(WebInspector.TimelineView.prototype.set endTime):
(WebInspector.TimelineView.prototype.set currentTime):
Don't update layout directly.
(WebInspector.TimelineView.prototype._timesDidChange):
Force a layout if the view supports live data. When not recording,
a layout is always performed.
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype._filterTimesDidChange.delayedWork): Deleted.
Changed to an arrow function.
(WebInspector.TimelineView.prototype._filterTimesDidChange): Deleted.
Renamed _timesDidChange, since the method now does more than throttle
a filterDidChange call.
2016-05-12 Fujii Hironori <Hironori.Fujii@sony.com>
Web Inspector: Windows Perl fails to run copy-user-interface-resources.pl
https://bugs.webkit.org/show_bug.cgi?id=157620
<rdar://problem/26241548>
Reviewed by Timothy Hatcher.
There are two problems on Windows platform. 'cat' command is
missing and can not execute shebang.
* Scripts/copy-user-interface-resources.pl: Invoke Perl scripts
with explicitly specifying Perl command instead of relying on
shebang. Add a new subroutine 'appendFile' to concatenate files
instread of 'cat' command.
2016-05-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: 3.8% of timeline recording spent in NavigationSidebarPanel _updateContentOverflowShadowVisibility for background tab
https://bugs.webkit.org/show_bug.cgi?id=157616
Reviewed by Timothy Hatcher.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
Don't update or schedule and update if we aren't visible.
When we are shown we will force an update.
2016-05-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reduce rAF churn in DefaultDashboardView on pages with lots of resources
https://bugs.webkit.org/show_bug.cgi?id=157618
Reviewed by Timothy Hatcher.
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView):
(WebInspector.DefaultDashboardView.prototype._updateDisplaySoon):
(WebInspector.DefaultDashboardView.prototype._updateDisplay):
Previously we were scheduling multiple rAFs that would all fire with
the same data, each time a resource was added. Coalesce into one.
2016-05-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Improve snapshot selection in heap allocations overview graph
https://bugs.webkit.org/show_bug.cgi?id=157588
<rdar://problem/26231245>
Reviewed by Joseph Pecoraro.
Heap snapshot icon selection now uses the built-in record selection
behavior provided by TimelineOverview/TimelineOverviewGraph. The marker
representing the selected heap snapshot now has a "selected" style, and
clicking an icon when the HeapAllocationsTimeline is not selected causes
the timeline to become selected.
* UserInterface/Images/HeapSnapshotSelected.svg: Added.
New art for selected snapshot icon.
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
(.timeline-overview-graph.heap-allocations > img.snapshot.selected):
(.timeline-overview-graph.heap-allocations:not(.selected) > img.snapshot.selected):
Selected icon styles for selected/unselected overview graph.
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
(WebInspector.HeapAllocationsTimelineOverviewGraph):
Track selected image element.
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
Associate image elements with their snapshot record, and reuse image
elements between layouts. Image element click handler can just set the
selectedRecord in the TimelineOverviewGraph base class.
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.updateSelectedRecord):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
Refresh snapshot icon styles when selected record changes.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.selectRecord):
Show snapshot list if no record selected.
(WebInspector.HeapAllocationsTimelineView.prototype.userSelectedRecordFromOverview): Deleted.
No longer needed.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype._updateFrameMarker):
No need to call dispatchSelectedRecordChangedEvent manually anymore,
method has been removed from base class.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
(WebInspector.TimelineOverviewGraph):
(WebInspector.TimelineOverviewGraph.prototype.dispatchSelectedRecordChangedEvent): Deleted.
No longer needed. Event dispatched automatically by the rAF callback.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._recordSelected):
Allow switching to another timeline, if the selected record does not
belong to the current timeline.
2016-05-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: 3.5% of time in toFixed in TimelineRecordBar updating element positions
https://bugs.webkit.org/show_bug.cgi?id=157608
Reviewed by Timothy Hatcher.
Avoid using toFixed to do an approximation comparison of two floating point numbers.
Instead keep in Numbers by just doing the approximation with Math.round(num * 100).
Since toFixed was doing stringification it was very expensive.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.prototype._updateElementPosition):
(WebInspector.TimelineRecordBar):
* UserInterface/Views/TimelineRecordFrame.js:
(WebInspector.TimelineRecordFrame.prototype._updateElementPosition):
(WebInspector.TimelineRecordFrame):
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._updatePositionOfElement):
2016-05-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: 4% of time in TimelineOverviewGraph adding/removing classList styles on TimelineRecordBar
https://bugs.webkit.org/show_bug.cgi?id=157607
Reviewed by Brian Burg.
This gets us down to about 0.5% of time.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.prototype.set records):
Only modify the classLists when the record changes.
(WebInspector.TimelineRecordBar.prototype.refresh):
Set unfinished once for either the uses active or not uses active cases.
2016-05-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Unexpected unread notification icon next to Log after clearing via clear()
https://bugs.webkit.org/show_bug.cgi?id=157598
Reviewed by Timothy Hatcher.
We always show ConsoleCommand and ConsoleCommandResult messages no matter
what the filter is. So it doesn't make sense to mark the "log" filter
as having an unread notification for a ConsoleCommandResult when we can
see the result.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
(WebInspector.LogContentView.prototype._markScopeBarItemUnread):
2016-05-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Console unread indicators should be cleared however the console clears
https://bugs.webkit.org/show_bug.cgi?id=157594
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._logCleared):
(WebInspector.LogContentView.prototype._clearLog):
Move code that clears unread indicators from clearLog to logCleared
to handle all possible clear cases.
2016-05-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars
https://bugs.webkit.org/show_bug.cgi?id=157590
Reviewed by Timothy Hatcher.
* UserInterface/Views/DataGrid.css:
(.data-grid .data-container):
Always show vertical scrollbars.
(.data-grid > .header-wrapper):
(.data-grid > .header-wrapper::-webkit-scrollbar):
Show invisible scrollbar for DataGrid's header to align the header table with the content.
(.data-grid.no-header > .header-wrapper > table.header):
(.data-grid.no-header > table.header): Deleted.
(.data-grid th): Deleted.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
`overflow-y: scroll` doesn't work on a table element. Wrap table in a div.
2016-05-11 Matt Baker <mattbaker@apple.com>
Web Inspector: Make it possible to do special styling on selected TimelineOverviewGraphs
https://bugs.webkit.org/show_bug.cgi?id=157593
<rdar://problem/26232886>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange.updateGraphSelectedState):
(WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange):
Select the new overview graph and deselect the old one.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph):
(WebInspector.TimelineOverviewGraph.prototype.get selected):
(WebInspector.TimelineOverviewGraph.prototype.set selected):
New property, toggles "selected" class on the graph element.
2016-05-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: "Selected Element" is hard to read when searching for "Element"
https://bugs.webkit.org/show_bug.cgi?id=157542
<rdar://problem/26207464>
Reviewed by Timothy Hatcher.
Change the style of highlighted text to match Xcode.
* UserInterface/Views/LogContentView.css:
(.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-text .highlighted):
* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog > .tree-outline .item.selected .highlighted):
* UserInterface/Views/Variables.css:
(:root):
2016-05-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Hide filter bar in TimelineViews where it is not needed or not yet working
https://bugs.webkit.org/show_bug.cgi?id=157583
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.get showsFilterBar):
(WebInspector.HeapAllocationsTimelineView.prototype.layout):
(WebInspector.HeapAllocationsTimelineView.prototype.updateFilter):
Filter bar not yet hooked up for HeapSnapshot views.
Make filtering work for the main timeline grid.
It doesn't use the normal TimelineView filter based on selected range.
This is intentional because it may be the case that a snapshot happens
outside the selected time range (via the navigation bar button) and
we want to show it. Otherwise a user might be confused why it is not
showing up in the list.
* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype.get showsFilterBar):
Filter bar not needed in the Memory timeline view.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.get showsFilterBar):
Filter bar works for the Events timeline view.
* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar):
Filter bar not yet hooked up for Profile views.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateFilterBar):
Update the filter bar when the selection path components change, since
that triggers when arbitrarily deep sub-content-views change.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get showsFilterBar):
Default is yes.
2016-05-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Avoid unnecessary timeout identifier churn in TimelineManager
https://bugs.webkit.org/show_bug.cgi?id=157535
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.capturingStarted):
(WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
Don't re-tickle if we tickled in the last 10ms.
2016-05-10 Matt Baker <mattbaker@apple.com>
Web Inspector: Can't select record bar in Frames timeline
https://bugs.webkit.org/show_bug.cgi?id=156963
<rdar://problem/25898256>
Reviewed by Timothy Hatcher.
Sync record selection between the Rendering Frames grid and overview graph.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.hasAncestor):
Add helper function needed by TimelineView.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype._mouseClicked):
Don't deselect the selected record when clicked. Initially this seemed
like a good idea but it complicates the UI for no added value.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
Get path components from the current TimelineView instead of the
TimelineRecordingContentView, now that the selected record appears
in the bottom ContentBrowser's navigation bar.
2016-05-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Backend should initiate timeline recordings on page navigations to ensure nothing is missed
https://bugs.webkit.org/show_bug.cgi?id=157504
<rdar://problem/26188642>
Reviewed by Brian Burg.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
(WebInspector.TimelineManager.prototype.set enabledTimelineTypes):
(WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments):
For backends that support it, enable/disable auto capture and the instruments to use.
(WebInspector.TimelineManager.prototype.autoCaptureStarted):
New event, stop and start a new recording. Set a flag that we should
detect the auto capturing resource so we know when the stop the
auto capture.
(WebInspector.TimelineManager.prototype._loadNewRecording):
(WebInspector.TimelineManager.prototype._addRecord):
(WebInspector.TimelineManager.prototype._startAutoCapturing): Renamed.
(WebInspector.TimelineManager.prototype._attemptAutoCapturingForFrame):
(WebInspector.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
(WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
(WebInspector.TimelineManager.prototype._resetAutoRecordingMaxTimeTimeout):
(WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords):
Factor out the new path, old path, and shared code for auto capturing.
Renamed _startAutoCapturing to _attemptAutoCapturingForFrame which
better matches what it tries to do.
* UserInterface/Protocol/TimelineObserver.js:
(WebInspector.TimelineObserver.prototype.autoCaptureStarted):
Inform TimelineManager.
2016-05-10 Matt Baker <mattbaker@apple.com>
Web Inspector: Debugger sidebar should refresh when Debug UI enabled/disabled
https://bugs.webkit.org/show_bug.cgi?id=157540
<rdar://problem/26207064>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved.removeScript):
(WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved):
Remove element from both tree outlines, if it exists.
2016-05-10 Matt Baker <mattbaker@apple.com>
Web Inspector: TimelineOverview assertion failed: Missing overview graph for timeline type undefined
https://bugs.webkit.org/show_bug.cgi?id=157533
<rdar://problem/26204033>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._recordWasFiltered):
The OverviewTimelineView's represented object is the entire recording,
and TimelineOverview.recordWasFiltered expects a timeline. Return early
since no graph in the overview needs updating.
2016-05-10 Matt Baker <mattbaker@apple.com>
Web Inspector: Call Trees and Memory view blank
https://bugs.webkit.org/show_bug.cgi?id=157486
<rdar://problem/26178404>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
Setting current time now handled by _updateTimelineViewTimes.
(WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
Update times for the current TimelineView when the recording ends.
This ensures that views that don't call TimelineView.setupDataGrid are
able to update state that depends on the ruler selection.
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
Renamed from _updateTimelineViewSelection. Sets start, end, and current times.
2016-05-10 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Cleanup super getter/setter now that underlying issue is fixed
https://bugs.webkit.org/show_bug.cgi?id=157488
<rdar://problem/26179120>
Reviewed by Brian Burg.
Addressed FIXMEs for bug 147064:
<https://webkit.org/b/147064> Getter and setter on super are called with wrong "this" object
* UserInterface/Views/VisualStyleKeywordPicker.js:
(WebInspector.VisualStyleKeywordPicker.prototype.get value):
(WebInspector.VisualStyleKeywordPicker.prototype.set value):
(WebInspector.VisualStyleKeywordPicker.prototype.get synthesizedValue):
(WebInspector.VisualStyleKeywordPicker.prototype._getValue): Deleted.
(WebInspector.VisualStyleKeywordPicker.prototype._setValue): Deleted.
(WebInspector.VisualStyleKeywordPicker.prototype._generateSynthesizedValue): Deleted.
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set specialPropertyPlaceholderElementText):
* UserInterface/Views/VisualStyleTimingEditor.js:
(WebInspector.VisualStyleTimingEditor.prototype.get value):
(WebInspector.VisualStyleTimingEditor.prototype.set value):
(WebInspector.VisualStyleTimingEditor.prototype.get synthesizedValue):
(WebInspector.VisualStyleTimingEditor.prototype._getValue): Deleted.
(WebInspector.VisualStyleTimingEditor.prototype._setValue): Deleted.
(WebInspector.VisualStyleTimingEditor.prototype._generateSynthesizedValue): Deleted.
2016-05-09 Matt Baker <mattbaker@apple.com>
Web Inspector: Filtering by Errors/Warnings should not filter Breakpoints list
https://bugs.webkit.org/show_bug.cgi?id=157481
<rdar://problem/26177346>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New UI strings.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.showResourcesWithIssuesOnlyFilterFunction):
Only filter tree elements belonging to the scripts tree outline.
(WebInspector.DebuggerSidebarPanel):
Drive-by cleanup of Issues filter button tooltips.
2016-05-09 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION: Web Inspector: DOM path bar blinks when modifying inline styles
https://bugs.webkit.org/show_bug.cgi?id=149258
<rdar://problem/22737843>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Utilities.js:
(Array.shallowEqual):
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
(WebInspector.ContentBrowser.prototype._removeAllNavigationItems):
Don't re-render the navigation bar when all new navigation items match the previous ones.
* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.set components.let.componentsEqual):
(WebInspector.HierarchicalPathNavigationItem.prototype.set components):
Don't re-render HierarchicalPathComponent when all new path components match the previous ones.
2016-05-09 Matt Baker <mattbaker@apple.com>
Web Inspector: Remove Global Breakpoints folder
https://bugs.webkit.org/show_bug.cgi?id=157478
<rdar://problem/26176524>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
Remove UI string.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
Remove references to folder tree element.
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint):
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
Top level comparison should check for "special" breakpoints.
2016-05-09 Matt Baker <mattbaker@apple.com>
Web Inspector: Heap Snapshot Timeline view can be live
https://bugs.webkit.org/show_bug.cgi?id=157487
<rdar://problem/26178439>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.get showsLiveRecordingData): Deleted.
Don't override, should return true.
2016-05-09 Manuel Rego Casasnovas <rego@igalia.com>
[css-grid] Update Grid Layout properties in CSSKeywordCompletions.js
https://bugs.webkit.org/show_bug.cgi?id=157166
Reviewed by Timothy Hatcher.
The CSS Grid Layout properties have been changing on the spec,
however they haven't been updated in CSSKeywordCompletions for a long time.
Update them using the last spec draft:
https://drafts.csswg.org/css-grid/#property-index
* UserInterface/Models/CSSKeywordCompletions.js:
2016-05-09 Matt Baker <mattbaker@apple.com>
Web Inspector: Cleanup issue tree elements in the Debugger sidebar
https://bugs.webkit.org/show_bug.cgi?id=157469
<rdar://problem/26162999>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._addIssue):
Don't add duplicate issue tree elements.
(WebInspector.DebuggerSidebarPanel.prototype._handleIssuesCleared):
Remove issues from the correct tree outline.
* UserInterface/Views/IssueTreeElement.css:
(.issue .icon):
(.issue.warning .icon):
(.issue.error .icon):
Match dashboard icons.
2016-05-09 Matt Baker <mattbaker@apple.com>
Web Inspector: Show in progress message in Timeline views that do not show data until the recording finishes
https://bugs.webkit.org/show_bug.cgi?id=156761
<rdar://problem/25970771>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New UI strings.
* UserInterface/Main.html:
New view class.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.get showsLiveRecordingData):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.prototype.get showsLiveRecordingData):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView.prototype.get showsLiveRecordingData):
* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView.prototype.get showsLiveRecordingData):
Don't show live recording data.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.get showsLiveRecordingData):
Forward property to current child TimelineView.
* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser .recording-progress):
(.content-view.timeline-recording > .content-browser .recording-progress > .status):
(.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
New progress view styles.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
(WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
Refresh progress view visibility.
(WebInspector.TimelineRecordingContentView.prototype._updateProgressView):
Show the progress view if we're currently capturing, and showing a view
that doesn't support showing live data.
* UserInterface/Views/TimelineRecordingProgressView.js:
(WebInspector.TimelineRecordingProgressView):
(WebInspector.TimelineRecordingProgressView.prototype.get visible):
(WebInspector.TimelineRecordingProgressView.prototype.set visible):
Show a status message, indeterminate progress spinner, and Stop Recording
button while timeline data is being recorded.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get showsLiveRecordingData):
Implemented by TimelineViews that don't support showing data while recording.
* UserInterface/Views/Variables.css:
(:root):
Add --panel-background-color-light for the progress view.
2016-05-08 Matt Baker <mattbaker@apple.com>
Web Inspector: Add Breakpoints and Scripts folders to Debugger sidebar
https://bugs.webkit.org/show_bug.cgi?id=151119
<rdar://problem/23488916>
Reviewed by Timothy Hatcher.
Add a collapsible Sources section to the Debugger beneath the existing
Breakpoints section.
* UserInterface/Views/DebuggerSidebarPanel.css:
Remove unused CSS class names.
(.sidebar > .panel.navigation.debugger .details-section.scripts:not(.collapsed)):
Hide scripts section bottom border when expanded. As the last
section, a border only adds visual clutter.
(.sidebar > .panel.navigation.debugger .details-section.scripts): Deleted.
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts): Deleted.
(.sidebar > .panel.navigation.debugger .details-section.scripts .header): Deleted.
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header): Deleted.
(.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content): Deleted.
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content): Deleted.
No longer needed.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
Create separate "Breakpoints" and "Sources" sections, and make filter
placeholder text generic. Remove unused class from breakpoints tree.
(WebInspector.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject):
Check both breakpoint and scripts tree outlines.
(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
(WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToTreeOutline):
Make helper function generic.
(WebInspector.DebuggerSidebarPanel.prototype._addResource):
(WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
Add resources to the scripts tree.
(WebInspector.DebuggerSidebarPanel.prototype._scriptsCleared):
Clear the scripts tree.
(WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
Remove script element when last breakpoint is removed.
(WebInspector.DebuggerSidebarPanel.prototype._addIssue):
(WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToContentTreeOutline): Deleted.
Renamed _addTreeElementForSourceCodeToTreeOutline.
2016-05-08 Matt Baker <mattbaker@apple.com>
Web Inspector: SourceCodeTextEditor issue widgets/line styles should reset when log is cleared
https://bugs.webkit.org/show_bug.cgi?id=157460
<rdar://problem/26159633>
Reviewed by Timothy Hatcher.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._logCleared):
Clear issue widgets and CodeMirror line class names when log cleared.
2016-05-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Inspect Element and Element Selection searching should work with Shadow DOM Nodes
https://bugs.webkit.org/show_bug.cgi?id=157446
<rdar://problem/24688447>
Reviewed by Ryosuke Niwa.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode):
Shadow DOM nodes did not have a parent, and so when attempting
to create DOM Tree elements up the chain, we were failing at
shadow boundaries. Create the parent relationship, the parent
already treats it as a child.
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._revealAndSelectNode):
Whenever we try to reveal and select an element in a shadow tree
but the setting to show shadow DOM is disabled, walk up until
we are out of the shadow tree.
2016-05-06 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Unexpected white border at the bottom of Debugger filter bar
https://bugs.webkit.org/show_bug.cgi?id=157430
<rdar://problem/26146602>
Reviewed by Timothy Hatcher.
Remove the semi-transparent white borders.
* UserInterface/Views/NavigationBar.css:
(.navigation-bar): Deleted.
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search > .search-bar): Deleted.
2016-05-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove HeapSnapshot Summary View
https://bugs.webkit.org/show_bug.cgi?id=157385
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WebInspector.HeapSnapshotClusterContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype.showSummary): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
* UserInterface/Views/HeapSnapshotSummaryContentView.css: Removed.
* UserInterface/Views/HeapSnapshotSummaryContentView.js: Removed.
* UserInterface/Views/Variables.css:
(:root):
2016-05-06 Manuel Rego Casasnovas <rego@igalia.com>
[css-grid] Unprefix CSS Grid Layout properties
https://bugs.webkit.org/show_bug.cgi?id=157137
Reviewed by Simon Fraser.
Remove "-webkit" prefix from all the grid layout properties,
including the display value.
Update the source code to remove the prefix where it was used too.
* UserInterface/Models/CSSKeywordCompletions.js:
2016-05-05 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION(r200474): Exception in autocompletion - `getCompletions` not found
https://bugs.webkit.org/show_bug.cgi?id=157408
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
This function was renamed, but this instance was missed.
2016-05-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide go-to links next to Functions in GC Root Path popover
https://bugs.webkit.org/show_bug.cgi?id=157381
<rdar://problem/26122531>
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
For functions, create a go-to-link. Insert a placeholder to replace
so that the popover sizes itself with a potential go-to arrow, as
it won't resize when the go-to arrows get inserted.
* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot-instance-popover-content .node .go-to-link):
Move down 1px to align better with the text.
2016-05-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: HeapSnapshot should exploratory Object Graph view
https://bugs.webkit.org/show_bug.cgi?id=157371
<rdar://problem/26107304>
Reviewed by Timothy Hatcher.
HeapSnapshots now have two ContentViews for viewing the graph.
HeapSnapshotInstancesContentView:
- top level are Class Categories nodes
- categories expand to Instances
- instances expand to show what they retain
- retained sizes only shown for dominated nodes of the instance
HeapSnapshotObjectGraphContentView:
- top level are GlobalObject or Window nodes
- expand to show what they retain
- retained sizes are shown for all nodes, everything is shown
This also provides a custom preview for Window instances. Instead of
showing an ObjectPreview, it just shows the `window.location.href`
for that instance, which is useful when there are multiple Window
instances for different frames.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New "Object Graph" string and new files.
* UserInterface/Images/HeapSnapshotObjectGraph.svg: Added.
* UserInterface/Images/gtk/HeapSnapshotObjectGraph.svg: Added.
* UserInterface/Views/PathComponentIcons.css:
(.heap-snapshot-object-graph-icon .icon):
Copy the red [{}] icon from Style Rules.
* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WebInspector.HeapSnapshotClusterContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get objectGraphContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.showObjectGraph):
(WebInspector.HeapSnapshotClusterContentView.prototype._supportsObjectGraph):
(WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
Include an "Object Graph" content view. This is unavailable in Diff views
but is available for individual HeapSnapshots.
* UserInterface/Views/HeapSnapshotContentView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js.
(WebInspector.HeapSnapshotContentView):
(WebInspector.HeapSnapshotContentView.prototype.shown):
(WebInspector.HeapSnapshotContentView.prototype.hidden):
(WebInspector.HeapSnapshotContentView.prototype._sortDataGrid):
(WebInspector.HeapSnapshotContentView.prototype._heapSnapshotDataGridTreeDidPopulate):
(WebInspector.HeapSnapshotInstancesContentView):
(WebInspector.HeapSnapshotObjectGraphContentView):
Share and generalize a HeapSnapshot ContentView. The only differences are
the DataGrid columns, DataGridTree class, and identifier prefix for settings.
* UserInterface/Views/HeapSnapshotDataGridTree.js: Renamed from Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js.
(WebInspector.HeapSnapshotDataGridTree):
(WebInspector.HeapSnapshotDataGridTree.buildSortComparator):
(WebInspector.HeapSnapshotDataGridTree.prototype.get heapSnapshot):
(WebInspector.HeapSnapshotDataGridTree.prototype.get visible):
(WebInspector.HeapSnapshotDataGridTree.prototype.get popover):
(WebInspector.HeapSnapshotDataGridTree.prototype.get popoverNode):
(WebInspector.HeapSnapshotDataGridTree.prototype.set popoverNode):
(WebInspector.HeapSnapshotDataGridTree.prototype.get children):
(WebInspector.HeapSnapshotDataGridTree.prototype.appendChild):
(WebInspector.HeapSnapshotDataGridTree.prototype.insertChild):
(WebInspector.HeapSnapshotDataGridTree.prototype.removeChildren):
(WebInspector.HeapSnapshotDataGridTree.prototype.set sortComparator):
(WebInspector.HeapSnapshotDataGridTree.prototype.sort):
(WebInspector.HeapSnapshotDataGridTree.prototype.shown):
(WebInspector.HeapSnapshotDataGridTree.prototype.hidden):
(WebInspector.HeapSnapshotDataGridTree.prototype.willDismissPopover):
(WebInspector.HeapSnapshotDataGridTree.prototype.get alwaysShowRetainedSize):
(WebInspector.HeapSnapshotDataGridTree.prototype.populateTopLevel):
(WebInspector.HeapSnapshotDataGridTree.prototype.didPopulate):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get alwaysShowRetainedSize):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotObjectGraphDataGridTree.prototype.get alwaysShowRetainedSize):
(WebInspector.HeapSnapshotObjectGraphDataGridTree.prototype.populateTopLevel):
(WebInspector.HeapSnapshotObjectGraphDataGridTree):
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
Start using different previews based on instance type.
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateError):
Common preview error logic. Also, don't output "Internal object" next to things
like Structure, InferredType, etc. Just don't output anything. Eventually, if
we provide preview data, something will show, but for now nothing is fine.
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview.inspectedPage_window_getLocationHref):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview):
Custom preview logic for Window's gets `window.location.href` on the instance if it is alive.
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
Normal preview logic.
* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot > .data-grid tr:not(.selected) td .preview-error): Deleted.
The red text for errors was standing out too much. Make it the default black.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
Better variable name.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getArrayCompletions):
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getCompletions):
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.getArrayCompletions): Deleted.
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.getCompletions): Deleted.
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
Try to be clearer about functions that run on the inspected page
by using the pattern with inspectedPage_<thisObject>_functionName.
2016-05-05 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Console is unresponsive for >10 seconds when it tries to render 10,000 messages
https://bugs.webkit.org/show_bug.cgi?id=157368
<rdar://problem/26103657>
Reviewed by Timothy Hatcher.
Render only up to 100 messages per animation frame to keep the Inspector's UI responsive.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.renderPendingMessages):
2016-05-05 Joseph Pecoraro <pecoraro@apple.com>
Crash if you type "debugger" in the console and continue
https://bugs.webkit.org/show_bug.cgi?id=156924
<rdar://problem/25884189>
Reviewed by Mark Lam.
* UserInterface/Test/InspectorProtocol.js:
(InspectorProtocol.sendCommand):
Simplify sending a command with no parameters.
2016-05-04 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r200401): Web Inspector: TypeError: undefined is not an object (evaluating 'messageElement.classList')
https://bugs.webkit.org/show_bug.cgi?id=157356
<rdar://problem/26097424>
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
Don't filter messages since we already do that in didAppendConsoleMessageView.
2016-05-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: GC Root Path sometimes does not go up to Window
https://bugs.webkit.org/show_bug.cgi?id=156768
<rdar://problem/25816131>
Reviewed by Geoffrey Garen.
* UserInterface/Proxies/HeapSnapshotNodeProxy.js:
(WebInspector.HeapSnapshotNodeProxy.prototype.retainers):
Include paths for debugging.
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.prototype.shortestGCRootPath):
(HeapSnapshot.prototype._isNodeGlobalObject):
Prefer the shortest GC Root Path that contains a known
global object, otherwise fallback to the shortest.
(HeapSnapshot.prototype.retainers):
Include paths for debugging.
2016-05-03 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Adding a new console message shouldn't modify DOM when the console log is hidden
https://bugs.webkit.org/show_bug.cgi?id=155629
<rdar://problem/25235470>
Reviewed by Timothy Hatcher.
Instead of rendering console messages right away, store them (in _pendingMessages)
and render only when the console tab or the split console is visible.
Also, batch rendering operations using requestAnimationFrame.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
Store console message views in _pendingMessages.
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
(WebInspector.JavaScriptLogViewController.prototype.renderPendingMessages):
Use requestAnimationFrame batching. Run isScrolledToBottom() at most only once
per batch.
(WebInspector.JavaScriptLogViewController.prototype.renderPendingMessagesSoon):
(WebInspector.JavaScriptLogViewController.prototype._didRenderConsoleMessageView):
There is no need to run scrollToBottom again.
* UserInterface/Views/ConsoleCommandView.js:
(WebInspector.ConsoleCommandView):
Move all DOM operations to a new render method.
(WebInspector.ConsoleCommandView.prototype.render):
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
(WebInspector.ConsoleMessageView.prototype.render):
(WebInspector.ConsoleMessageView.prototype.set repeatCount):
(WebInspector.ConsoleMessageView.prototype._renderRepeatCount):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.shown):
When the console tab or the split console is opened render all pending messages.
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
Don't call needsLayout on every added console message. Call it only once per
requestAnimationFrame. Also, no need to scrollToBottom once again.
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
(WebInspector.LogContentView.prototype._scopeFromMessageLevel): Deleted.
(WebInspector.LogContentView.prototype._markScopeBarItemUnread): Added.
Rename _pulseScopeBarItemBorder. In the very first version the border was pulsing,
but now we use small colored circles instead.
2016-05-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Give console.time/timeEnd a default label and warnings
https://bugs.webkit.org/show_bug.cgi?id=157325
<rdar://problem/26073290>
Reviewed by Timothy Hatcher.
* UserInterface/Models/NativeFunctionParameters.js:
Update the convenience signature.
2016-05-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update window.console function API description strings in Console
https://bugs.webkit.org/show_bug.cgi?id=157298
Reviewed by Timothy Hatcher.
* UserInterface/Models/NativeFunctionParameters.js:
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
The Console object changed how it works. Work with the new
structure, and the older structure for legacy backends.
2016-05-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Allow format specifiers in console.assert and console.trace
https://bugs.webkit.org/show_bug.cgi?id=157295
<rdar://problem/26056039>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):
Treat the first argument as a format specifier.
2016-05-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r200337.
https://bugs.webkit.org/show_bug.cgi?id=157294
Console hangs when evaluating expresisons (Requested by
JoePeck on #webkit).
Reverted changeset:
"Web Inspector: Adding a new console message shouldn't modify
DOM when the console log is hidden"
https://bugs.webkit.org/show_bug.cgi?id=155629
http://trac.webkit.org/changeset/200337
2016-05-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Unexpected "Script Element #" resources in Debugger Sidebar
https://bugs.webkit.org/show_bug.cgi?id=157280
Reviewed by Timothy Hatcher.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
Don't include Script Element resources in the debugger sidebar by default.
2016-05-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Prefer "Console Evaluation" to "Eval Code" if we know it was a console evaluation
https://bugs.webkit.org/show_bug.cgi?id=157278
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
"Console Evaluation" string.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload): Deleted.
Delete an assert that would throw when the location is noSourceID:-1:-1.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.fromDebuggerPayload):
(WebInspector.CallFrame.fromPayload):
(WebInspector.CallFrame):
When this is in a Console Evalution provide better values.
* UserInterface/Models/GarbageCollection.js:
(WebInspector.GarbageCollection):
Drive-by address a common assertions seen while paused.
2016-05-02 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Adding a new console message shouldn't modify DOM when the console log is hidden
https://bugs.webkit.org/show_bug.cgi?id=155629
<rdar://problem/25235470>
Reviewed by Timothy Hatcher.
Instead of rendering console messages right away, store them (in _pendingMessages)
and render only when the console tab or the split console is visible.
Also, batch rendering operations using requestAnimationFrame.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
Store console message views in _pendingMessages.
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
(WebInspector.JavaScriptLogViewController.prototype.renderPendingMessages):
Use requestAnimationFrame batching. Run isScrolledToBottom() at most only once
per batch.
(WebInspector.JavaScriptLogViewController.prototype.renderPendingMessagesSoon):
(WebInspector.JavaScriptLogViewController.prototype._didRenderConsoleMessageView):
There is no need to run scrollToBottom again.
* UserInterface/Views/ConsoleCommandView.js:
(WebInspector.ConsoleCommandView):
Move all DOM operations to a new render method.
(WebInspector.ConsoleCommandView.prototype.render):
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
(WebInspector.ConsoleMessageView.prototype.render):
(WebInspector.ConsoleMessageView.prototype.set repeatCount):
(WebInspector.ConsoleMessageView.prototype._renderRepeatCount):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.shown):
When the console tab or the split console is opened render all pending messages.
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
No need to scrollToBottom once again.
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
(WebInspector.LogContentView.prototype._scopeFromMessageLevel): Deleted.
(WebInspector.LogContentView.prototype._markScopeBarItemUnread): Added.
Rename _pulseScopeBarItemBorder. In the very first version the border was pulsing,
but now we use small colored circles instead.
2016-05-02 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: TypeError: null is not an object (evaluating 'sourceCodeLocation.formattedLineNumber')
https://bugs.webkit.org/show_bug.cgi?id=157239
<rdar://problem/26030791>
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/IssueManager.js:
(WebInspector.IssueManager.issueMatchSourceCode):
Require a sourceCodeLocation for Script errors.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._addIssue):
Be safe against a missing sourceCodeLocation.
* UserInterface/Views/SourceCodeTextEditor.css:
(.source-code.text-editor > .CodeMirror .issue-widget.inline > .arrow):
(@media (-webkit-min-device-pixel-ratio: 2)):
Adjust the style, on non-Retina the inline message arrow would sometimes
be detached from the warning message.
2016-05-02 Timothy Hatcher <timothy@apple.com>
Web Inspector: Zooming of docked Web Inspector affects the webpage, but reset to 0 does not
https://bugs.webkit.org/show_bug.cgi?id=157234
rdar://problem/26027177
Always prevent default for the zoom keyboard shortcuts to avoid passing the event back to
Safari to handle and add explicit beeps when max/min is hit.
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Removed setting implicitlyPreventsDefault on zoom keyboard shortcuts.
(WebInspector._increaseZoom): Add explicit beep and remove preventDefault call.
(WebInspector._decreaseZoom): Ditto.
2016-05-01 Dan Bernstein <mitz@apple.com>
WebInspectorUI.framework/Versions/A/Resources/Images/Legacy is empty
https://bugs.webkit.org/show_bug.cgi?id=157248
Reviewed by Timothy Hatcher.
* UserInterface/Images/Legacy: Removed.
2016-04-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Issues inspecting the inspector, pausing on breakpoints causes content to not load
https://bugs.webkit.org/show_bug.cgi?id=157198
<rdar://problem/26011049>
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
(InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
While auditing, use simpler check.
* UserInterface/Proxies/FormatterWorkerProxy.js:
(WebInspector.FormatterWorkerProxy.canFormat): Deleted.
While auditing, remove dead code.
2016-04-29 Timothy Hatcher <timothy@apple.com>
Web Inspector: Scrolling in Timelines causes flashing of the DataGrid
https://bugs.webkit.org/show_bug.cgi?id=157212
rdar://problem/25994717
Listen for mousewheel events too so we can update the visible rows sooner.
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid): Call _updateScrollListeners.
(WebInspector.DataGrid.prototype.set inline): Use _updateScrollListeners.
(WebInspector.DataGrid.prototype.set variableHeightRows): Use _updateScrollListeners.
(WebInspector.DataGrid.prototype._updateScrollListeners): Added. Listen for mousewheel too.
2016-04-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Jump to Line in auto formatted JavaScript does not work the first time
https://bugs.webkit.org/show_bug.cgi?id=157194
<rdar://problem/26008471>
Reviewed by Timothy Hatcher.
When doing asynchronous formatting we set the content of the editor
twice. First to prime the editors back/foward list with the original
content, and then again after we get the formatted content from the
Worker, and then display the content.
The TextEditor attempts to reveal a position when the initial string
has been set. Back when autoformatting was synchronous this was fine.
Asynchronously however, this ends up happening between the original
and formatted value. Also, the TextEditor has no idea that the
SourceCodeTextEditor is going to format / defer displaying the
contents. Add a "defer" property to the TextEditor that the
SourceCodeTextEditor can use in this circumstance.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
Avoid revealing a position when setting the original content. We will
be formatting and we will want to reveal the position afterwards.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.set deferReveal):
Provide another reason to defer revealing.
2016-04-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: FormatterWorker fails to find "External/Esprima.js" in Production builds
https://bugs.webkit.org/show_bug.cgi?id=157162
<rdar://problem/25996556>
Reviewed by Timothy Hatcher.
Workers have relative include paths. FormatterWorker has an includes
that looks like:
importScripts(...[
"../../External/Esprima/esprima.js",
...
]);
In optimized builds (Production) the esprima resources are combined
and moved out of an External directory to "Esprima.js". We need to
update the path of this include in optimized builds.
This adds a script to do some basic rewrites of paths. It will also
produce a build error if there are any other External paths that
may have been unhandled.
* Scripts/copy-user-interface-resources.pl:
Run a new script to fix up the Worker imports for new pathes.
* Scripts/fix-worker-imports-for-optimized-builds.pl: Added.
(fixWorkerImportsInFile):
(fixWorkerImportsInDirectory):
Replace "/External/Esprima/esprima.js" with "/Esprima.js" in imports.
Fatal error for any unhandled "/External" lines that were not replaced.
2016-04-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Missing CSS autocompletion suggestions for -webkit-user-select
https://bugs.webkit.org/show_bug.cgi?id=157104
Reviewed by Timothy Hatcher.
* UserInterface/Models/CSSKeywordCompletions.js:
2016-04-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Clarify Heap Snapshot instance Retained Size by hiding retained size of non-dominated children
https://bugs.webkit.org/show_bug.cgi?id=157018
Reviewed by Timothy Hatcher.
* UserInterface/Proxies/HeapSnapshotNodeProxy.js:
(WebInspector.HeapSnapshotNodeProxy):
(WebInspector.HeapSnapshotNodeProxy.deserialize):
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.prototype.serializeNode):
Include dominatorNodeIdentifier in the default proxy properties.
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get node):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByBase):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot > .data-grid td .sub-retained):
Save the base HeapSnapshotInstanceDataGridNode so that it can be referenced by
children. When expanding an instance, hide the retained size for children
that are not dominated by the base object. Show the retained size for children
for children that are dominated. If dominated directly, show the size in the
normal black. If dominated transitively, show the size in a dimmed gray.
2016-04-25 Matt Baker <mattbaker@apple.com>
Web Inspector: hook up grid row filtering in the new Timelines UI
https://bugs.webkit.org/show_bug.cgi?id=154924
<rdar://problem/24934607>
Reviewed by Timothy Hatcher.
Re-implement timeline data grid filtering that previously existed in the
navigation sidebar. This patch adds support for filter text, scope bars,
and filtering based on ruler selection.
Multi-column filter support is now part of DataGrid. The grid checks compares
filter text against cell data of type string. DataGridNode subclasses may
provide custom string data for columns that format complex objects (such
as SourceCodeLocations). Cells containing data of type number are not
considered for filtering at this time.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.set filterText):
(WebInspector.DataGrid.prototype.get filterDelegate):
(WebInspector.DataGrid.prototype.set filterDelegate):
(WebInspector.DataGrid.prototype.filterDidChange):
Called internally by the grid whenever the filter text or delegate changes.
Also called by clients that implement a filter delegate, to inform the
grid that a custom filter has changed.
(WebInspector.DataGrid.prototype.hasCustomFilters):
(WebInspector.DataGrid.prototype.matchNodeAgainstCustomFilters):
Calls the filter delegate, if it exists, and provides a hook for
subclasses to provide custom filtering.
(WebInspector.DataGrid.prototype._applyFiltersToNode.matchTextFilter):
(WebInspector.DataGrid.prototype._applyFiltersToNode.makeVisible):
(WebInspector.DataGrid.prototype._applyFiltersToNode):
Filters data grid nodes and fires filter events as needed.
(WebInspector.DataGrid.prototype._hasFilterDelegate):
Helper function.
(WebInspector.DataGrid.prototype._updateVisibleRows):
Exclude hidden nodes from revealed rows.
(WebInspector.DataGrid.prototype._updateFilter):
Filtering entry point, called on an animation frame. Updates visible
rows if any node was filtered/unfiltered.
(WebInspector.DataGridNode):
(WebInspector.DataGridNode.prototype.get filterableData):
Gets an array of filterable strings for the node.
(WebInspector.DataGridNode.prototype.refresh):
Resets cached filterable strings.
(WebInspector.DataGridNode.prototype.filterableDataForColumn):
Can be overridden by subclasses to provide filterable text for complex
cell data, like as objects formatted as document fragments.
* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.get data):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
Register grid and remove logic that has been moved to the base class.
(WebInspector.LayoutTimelineView.prototype.filterDidChange):
Update highlight after grid filter change.
(WebInspector.LayoutTimelineView.prototype._dataGridSelectedNodeChanged):
Update highlight when selection changes.
(WebInspector.LayoutTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
(WebInspector.LayoutTimelineView.prototype.treeElementDeselected): Deleted.
(WebInspector.LayoutTimelineView.prototype._dataGridFiltersDidChange): Deleted.
(WebInspector.LayoutTimelineView.prototype._dataGridNodeSelected): Deleted.
No longer needed.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
Register grid and remove logic that has been moved to the base class.
(WebInspector.NetworkTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
(WebInspector.NetworkTimelineView.prototype._dataGridFiltersDidChange): Deleted.
(WebInspector.NetworkTimelineView.prototype._dataGridNodeSelected): Deleted.
No longer needed.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
Register grid and remove logic that has been moved to the base class.
(WebInspector.OverviewTimelineView.prototype._dataGridNodeSelected): Deleted.
No longer needed.
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
Register grid and remove logic that has been moved to the base class.
(WebInspector.RenderingFrameTimelineView.prototype.get filterStartTime):
(WebInspector.RenderingFrameTimelineView.prototype.get filterEndTime):
Convert selection indices into filter start and end times.
(WebInspector.RenderingFrameTimelineView.prototype.matchDataGridNodeAgainstCustomFilters):
Perform custom filtering on rendering frame duration.
(WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
Inform grid of custom filter change.
(WebInspector.RenderingFrameTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
(WebInspector.RenderingFrameTimelineView.prototype._dataGridNodeSelected): Deleted.
No longer needed.
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.filterableDataForColumn):
Use URL string for filtering "name" column.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.updateFilter):
Forwarding for TimelineView API.
(WebInspector.ScriptClusterTimelineView.prototype.matchDataGridNodeAgainstCustomFilters):
(WebInspector.ScriptClusterTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
Renamed to matchDataGridNodeAgainstCustomFilters.
(WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange): Deleted.
Removed FIXME comment. Updating TimelineView times is sufficient to trigger filtering.
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView):
Register grid and remove logic that has been moved to the base class.
(WebInspector.ScriptDetailsTimelineView.prototype._dataGridFiltersDidChange): Deleted.
(WebInspector.ScriptDetailsTimelineView.prototype._dataGridNodeSelected): Deleted.
No longer needed.
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.filterableDataForColumn):
Use main title and subtitle strings for filtering "name" column.
(WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
(WebInspector.ScriptTimelineDataGridNode.prototype._subtitle):
Break out for use in filterableDataForColumn.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
Cleanup variable names.
(WebInspector.TimelineDataGrid.prototype.hasCustomFilters):
Always true because filtering on ruler selection always occurs.
(WebInspector.TimelineDataGrid.prototype.matchNodeAgainstCustomFilters):
Match nodes against scope bar filters.
(WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
Inform grid of custom filter change.
(WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters): Deleted.
Re-implemented as _nodeMatchesActiveScopeFilters.
(WebInspector.TimelineDataGrid.prototype._updateScopeBarForcedVisibility): Deleted.
Old UI. No longer needed.
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.filterableDataForColumn):
Filter strings for SourceCodeLocation and CallFrame objects.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Listen for FilterBar changes and TimelineView record filtering.
(WebInspector.TimelineRecordingContentView.prototype._filterDidChange):
Update grid filters when filter bar changes.
(WebInspector.TimelineRecordingContentView.prototype._recordWasFiltered):
Update overview when records are filtered/unfiltered.
(WebInspector.TimelineRecordingContentView.prototype.filterDidChange): Deleted.
(WebInspector.TimelineRecordingContentView.prototype.recordWasFiltered): Deleted.
(WebInspector.TimelineRecordingContentView.prototype.matchTreeElementAgainstCustomFilters.checkTimeBounds): Deleted.
(WebInspector.TimelineRecordingContentView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
Re-implemented in DataGrid.
(WebInspector.TimelineRecordingContentView.prototype._updateTimes): Deleted.
FIXME comment removed. Filtering occurs when TimelineView times are updated.
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged): Deleted.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.get navigationItems):
Used by TimelineRecordingContentView to add scope bar items to the
lower content browser's navigation bar.
(WebInspector.TimelineView.prototype.set startTime):
(WebInspector.TimelineView.prototype.set endTime):
(WebInspector.TimelineView.prototype.set currentTime):
Update grid filter when recording times change.
(WebInspector.TimelineView.prototype.get filterStartTime):
(WebInspector.TimelineView.prototype.get filterEndTime):
Let subclasses (RenderingFrameTimelineView) provide filter start/end times.
(WebInspector.TimelineView.prototype.setupDataGrid):
Register the grid used by the TimelineView subclass, allowing the base
class to hook into common event listeners and provide boilerplate functionality.
(WebInspector.TimelineView.prototype.updateFilter):
For data grid views, updates grid filters and sets new filter text.
(WebInspector.TimelineView.prototype.matchDataGridNodeAgainstCustomFilters):
(WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters.checkTimeBounds):
(WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters):
DataGrid filter delegate. Lets subclasses apply custom filters first,
then filters based on ruler selection if needed.
(WebInspector.TimelineView.prototype.filterDidChange):
Hook for subclasses to respond to filter changes.
(WebInspector.TimelineView.prototype._filterTimesDidChange.delayedWork):
(WebInspector.TimelineView.prototype._filterTimesDidChange):
Helper function for coalescing ruler selection updates into a single
filter update.
(WebInspector.TimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
(WebInspector.TimelineView.prototype.filterUpdated): Deleted.
No longer needed.
2016-04-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: React.js JSXTransformer produces bogus error locations
https://bugs.webkit.org/show_bug.cgi?id=150010
<rdar://problem/23062233>
Reviewed by Timothy Hatcher.
Show dynamically added <script> elements added to a frame as resources.
For cases where the scripts had source map resources or error messages
we have a root from which to associate them to.
* Localizations/en.lproj/localizedStrings.js:
"Script Element %d" tree element title.
* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.commitProvisionalLoad):
(WebInspector.Frame.prototype.get extraScripts):
(WebInspector.Frame.prototype.addExtraScript):
Have a frame keep a list of its extra scripts.
* UserInterface/Models/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.get displayName):
(WebInspector.Script.prototype.get dynamicallyAddedScriptElement):
Identify dynamically added script elements and associate them
with the frame, instead of the frame's main resource.
* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.onpopulate):
(WebInspector.FrameTreeElement.prototype._extraScriptAdded):
Show named / source mapped dynamic script elements under a frame.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
Dynamically added script element Scripts will be added by the frame that
owns them.
* UserInterface/Views/ScriptTreeElement.js:
(WebInspector.ScriptTreeElement):
Don't include a subtitle for dynamicallyAddedScriptElement, details match
the frame that owns them.
2016-04-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Line error widget showed in the wrong resource
https://bugs.webkit.org/show_bug.cgi?id=150009
<rdar://problem/23062199>
Reviewed by Timothy Hatcher.
This addresses a few long standing issues:
- IssueMessage and ConsoleMessage should not fight eachother
- Displayed issue messages now correctly have format string formatting, e.g. console.error("Foo %s", str)
- IssueMessage wraps a ConsoleMessage, so we don't duplicate everything
- Gives ConsoleMessage a sourceCodeLocation (lazy)
- Since a sourceCodeLocation can have the exact SourceCode, if it was a Script
without a Resource, we can only show the error in the Script's editor.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.fromPayload):
Prefer the script identifier lookup first. And from the Script go
to a resource if possible. This allows us to distinguish a location
that should be in a Script that doesn't have a Resource when there
exists a Resource with the same URL. This will soon be the case
for dyanamic <script> elements append to a document.
* UserInterface/Controllers/IssueManager.js:
(WebInspector.IssueManager.issueMatchSourceCode):
Consolidate all the different checks to this one function.
(WebInspector.IssueManager.prototype.issueWasAdded):
Create IssueMessages with ConsoleMessages.
(WebInspector.IssueManager.prototype.issuesForSourceCode):
Simplify now that we have the better check.
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
Once a ConsoleMessage has been created (and modified `parameters` for us)
create the IssueMessage if it was an issue.
* UserInterface/Models/ConsoleMessage.js:
(WebInspector.ConsoleMessage.prototype.get sourceCodeLocation):
Lazily create a source code from the best possible location. This can
be the top call frame or the url/line/column combination.
* UserInterface/Models/IssueMessage.js:
(WebInspector.IssueMessage):
Creation and most properties just call through to a ConsoleMessage.
The `type` and `text` are Issue specific. Anything that uses location
data should use the sourceCodeLocation.
(WebInspector.IssueMessage.prototype.saveIdentityToCookie):
Fix implementation that didn't account for a null sourceCodeLocation.
(WebInspector.IssueMessage.prototype._formatTextIfNecessary):
Basic text format message formatting.
* UserInterface/Protocol/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
No longer call IssueMessage from the observer. Let LogManager trigger issues.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.resolvedRepresentedObjectForRepresentedObject):
(WebInspector.ContentView.isViewable):
An IssueMessage represented object for an IssueMessageTreeElement should be
restorable by just going to the sourceCodeLocation it references. This is
identical to a Breakpoint.
* UserInterface/Views/IssueTreeElement.js:
(WebInspector.IssueTreeElement.prototype._updateTitles):
(WebInspector.IssueTreeElement):
* UserInterface/Views/ResourceContentView.js:
(WebInspector.ResourceContentView.prototype._issueWasAdded):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._issueWasAdded):
(WebInspector.SourceCodeTextEditor.prototype._addIssue):
(WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues):
(WebInspector.SourceCodeTextEditor.prototype._matchesIssue): Deleted.
Update to use Issue's sourceCodeLocation or IssueManager's new APIs.
2016-04-24 Matt Baker <mattbaker@apple.com>
Web Inspector: Can't sort by name/source code location columns in Timeline data grids
https://bugs.webkit.org/show_bug.cgi?id=156965
<rdar://problem/25898716>
Reviewed by Timothy Hatcher.
Add support for sorting SourceCodeLocation objects to TimelineDataGrid,
and include a grid delegate so that views can extend sorting logic for
other document fragment columns.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
(WebInspector.NetworkTimelineView.prototype.dataGridSortComparator):
Sort "name" column by display name first, then resource URL.
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView):
(WebInspector.ScriptDetailsTimelineView.prototype.dataGridSortComparator):
Sort "name" column by display name first, then subtitle.
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.get subtitle):
Make subtitle accessible externally for sorting.
(WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
(WebInspector.ScriptTimelineDataGridNode):
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype.get sortDelegate):
(WebInspector.TimelineDataGrid.prototype.set sortDelegate):
Fire a SortChanged event if the delegate changed and the grid is sorted.
(WebInspector.TimelineDataGrid.prototype._sort):
If a sort delegate exists, and it returns a numeric value, skip the
default compare.
(WebInspector.TimelineDataGrid.prototype._sortComparator):
Add support for sorting SourceCodeLocation columns.
2016-04-24 Matt Baker <mattbaker@apple.com>
Web Inspector: Error when selecting a bar in the Frames timeline
https://bugs.webkit.org/show_bug.cgi?id=156960
<rdar://problem/25897955>
Reviewed by Timothy Hatcher.
Fixes timeline grid node selection when record selected in the overview.
Adds general purpose `findNode` method to DataGrid.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.findNode):
Basic find function for locating a grid node in linear time.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._recordSelected):
Remove tree outline references, call generic select method.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.selectRecord):
If a data grid was set, deselect current selection and select the node
associated with the timeline record.
2016-04-24 Matt Baker <mattbaker@apple.com>
Web Inspector: Events in JavaScript & Events timeline have no profile children
https://bugs.webkit.org/show_bug.cgi?id=156627
<rdar://problem/25749740>
Reviewed by Timothy Hatcher.
ProfileNodeDataGridNode should handle `populate` events when expanded.
This was previously done by ProfileNodeTreeElement, which is no longer
used in the Timelines tab.
* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
(WebInspector.ProfileDataGridNode.prototype._populate):
(WebInspector.ProfileDataGridNode):
DataGridNode sets `shouldRefreshChildren` to false after populating
child nodes. No need to track with a separate flag.
* UserInterface/Views/ProfileNodeDataGridNode.js:
(WebInspector.ProfileNodeDataGridNode):
(WebInspector.ProfileNodeDataGridNode.prototype._populate):
2016-04-22 Matt Baker <mattbaker@apple.com>
Web Inspector: HeapAllocationsTimeline grid should use built-in grid column icons
https://bugs.webkit.org/show_bug.cgi?id=156934
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
(WebInspector.HeapAllocationsTimelineDataGridNode):
Use existing base class helper function to create main title text.
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
Add icon class names to cell, remove icon element.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
Turn on icons for the column.
2016-04-22 Timothy Hatcher <timothy@apple.com>
Change an assert to a warn based on post review feedback.
https://bugs.webkit.org/show_bug.cgi?id=156919
rdar://problem/25857118
Rubber-stamped by Joseph Pecoraro.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
2016-04-22 Timothy Hatcher <timothy@apple.com>
Web Inspector: Debugger statement in console does not provide any call frames and debugger UI is confused
https://bugs.webkit.org/show_bug.cgi?id=156919
rdar://problem/25857118
This makes console expressions show up in the Debugger tab sidebar if a ScriptContentView is shown for them.
We now also show call frames that originate from a console expression, so the call frames in the sidebar is not empty.
Also fix a bug where when there are no call frames we auto resume the debugger and don't leave it in a broken state.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Base/Utilities.js:
(appendWebInspectorSourceURL): Don't append if another sourceURL is already added.
(appendWebInspectorConsoleEvaluationSourceURL): Added.
(isWebInspectorConsoleEvaluationScript): Added.
(isWebKitInternalScript): Return false for isWebInspectorConsoleEvaluationScript().
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause): Resume if call frames is empty. This is not as common now
since console expression call frames are not skipped.
(WebInspector.DebuggerManager.prototype.scriptDidParse): Change an early return for isWebInspectorInternalScript() that
was skipping adding internal scripts to the known script lists, but it should only do that when the debug UI is disabled.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
Call appendWebInspectorConsoleEvaluationSourceURL so the console expressions are tagged before evaluateInInspectedWindow
added the internal sourceURL name.
* UserInterface/Models/Script.js:
(WebInspector.Script): Assign unique identifiers to console scripts so they are named correctly.
(WebInspector.Script.resetUniqueDisplayNameNumbers): Reset _nextUniqueConsoleDisplayNameNumber.
(WebInspector.Script.prototype.get displayName): Special case console expressions with a better name.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject): Add a script tree element on demand
like the ResourceSidebarPanel does for anonymous scripts.
(WebInspector.DebuggerSidebarPanel.prototype._addScript): Return treeElement so treeElementForRepresentedObject can use it.
2016-04-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: sourceMappingURL not loaded in generated script
https://bugs.webkit.org/show_bug.cgi?id=156022
<rdar://problem/25438595>
Reviewed by Geoffrey Garen.
* UserInterface/Controllers/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype.downloadSourceMap):
If the sourceMapURL is a dataURL at this point, we can just pass it on,
otherwise we would have returned and skipped it.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.fromPayload):
Add handling for "scriptId" if it is available in the Console.CallFrame.
Don't automatically mark CallFrames that didn't have a "url" as native,
instead try to get a SourceCode.
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.get displayURL):
Used by SourceCodeLocation formatting, so behave more like Resources
when we have only have a sourceURL name. This produces output like:
"foo.js:#:#" instead of "foo.js (line #:#)"
(WebInspector.Script.prototype.get anonymous):
Easy accessor to see if this would be treated as anonymous or not.
* UserInterface/Models/SourceMap.js:
(WebInspector.SourceMap.prototype.get sourceMappingBasePathURLComponents):
Gracefully handle no path.
* UserInterface/Models/StackTrace.js:
(WebInspector.StackTrace.prototype.get firstNonNativeCallFrame):
(WebInspector.StackTrace.prototype.get firstNonNativeNonAnonymousCallFrame):
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
Now that "Eval Code" with a sourceURL is no longer native, we still don't
want to show it in the Web Inspector if it is anonymous. So include a stricter
version that skips native and anonymous call frames.
2016-04-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Debugger statement gets a space after it when pretty printed
https://bugs.webkit.org/show_bug.cgi?id=156867
<rdar://problem/25862308>
Reviewed by Geoffrey Garen.
* Tools/Formatting/index.html:
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
Handle the unhandled DebuggerStatement node type.
2016-04-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: console.table(navigator) throws exception about `rowPreview.propertyPreviews.length`
https://bugs.webkit.org/show_bug.cgi?id=156698
<rdar://problem/25778244>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameterAsTable):
Handle a row with a value preview but no sub-property previews (a function).
2016-04-19 Timothy Hatcher <timothy@apple.com>
Web Inspector: Use debounce proxies in a couple more places
https://bugs.webkit.org/show_bug.cgi?id=156759
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent):
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
(WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon): Deleted.
* UserInterface/Views/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
(WebInspector.DOMTreeUpdater.prototype._characterDataModified):
(WebInspector.DOMTreeUpdater.prototype._nodeInserted):
(WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodesSoon): Deleted.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WebInspector.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibilitySoon): Deleted.
2016-04-19 Timothy Hatcher <timothy@apple.com>
Web Inspector: Make debounce use an ES6 Proxy
https://bugs.webkit.org/show_bug.cgi?id=156756
rdar://problem/25809771
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Utilities.js:
(Object.prototype.soon): Added.
(Object.prototype.debounce): Added.
(Function.prototype.debounce): Deleted.
(Function.prototype.cancelDebounce): Added.
* UserInterface/Views/BezierEditor.js:
(WebInspector.BezierEditor.createBezierInput): Use new debounce proxy.
* UserInterface/Views/VisualStyleBackgroundPicker.js:
(WebInspector.VisualStyleBackgroundPicker): Ditto.
* UserInterface/Views/VisualStyleURLInput.js:
(WebInspector.VisualStyleURLInput): Ditto.
2016-04-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Picking Snapshot from navigation bar popup does to switch views
https://bugs.webkit.org/show_bug.cgi?id=156762
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineDataGridNodePathComponent.js:
(WebInspector.TimelineDataGridNodePathComponent.prototype.get previousSibling):
(WebInspector.TimelineDataGridNodePathComponent.prototype.get nextSibling):
Wrong represented object provided by TimelineDataGridNodePathComponent.
2016-04-18 Timothy Hatcher <timothy@apple.com>
Web Inspector: DataGrid should be virtualized so it only renders visible rows
https://bugs.webkit.org/show_bug.cgi?id=156663
rdar://problem/25765256
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype.set containerRegions):
Call updateLayoutIfNeeded since we don't use views here.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameterAsTable):
Set inline and variableHeightRows to true, remove direct classList add. Call updateLayoutIfNeeded since we don't use views here.
* UserInterface/Views/DOMTreeDataGrid.js:
(WebInspector.DOMTreeDataGrid):
Set inline to true, remove direct classList add.
* UserInterface/Views/DataGrid.css:
(.data-grid td):
(.data-grid table.data):
(.data-grid:not(.variable-height-rows) table.data):
(.data-grid:not(.variable-height-rows) table.data.odd-first-zebra-stripe):
(.data-grid.variable-height-rows table.data tr:nth-child(odd)):
(.data-grid.variable-height-rows table.data tr:nth-child(even)):
(.data-grid.variable-height-rows.odd-first-zebra-stripe table.data tr:nth-child(odd)):
(.data-grid.variable-height-rows.odd-first-zebra-stripe table.data tr:nth-child(even)):
(.data-grid.variable-height-rows table.data tr.filler):
Updated styles to support variable height rows directly and flipping the order of the stripes
when the virtual table starts at an odd row.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid): Added rowHeight and rows.
(WebInspector.DataGrid.prototype.get inline): Added.
(WebInspector.DataGrid.prototype.set inline): Added.
(WebInspector.DataGrid.prototype.get variableHeightRows): Added.
(WebInspector.DataGrid.prototype.set variableHeightRows): Added.
(WebInspector.DataGrid.prototype.layout): Call _updateVisibleRows.
(WebInspector.DataGrid.prototype._noteRowsChanged): Added.
(WebInspector.DataGrid.prototype._updateVisibleRows): Added.
(WebInspector.DataGrid.prototype._sortNodesCallback): Update to not use the DOM.
(WebInspector.DataGridNode.prototype.set hasChildren): Call needsLayout.
(WebInspector.DataGridNode.prototype.collapse): Call needsLayout.
(WebInspector.DataGridNode.prototype.expand): Call needsLayout.
(WebInspector.DataGridNode.prototype._attach): Call _noteRowsChanged.
(WebInspector.DataGridNode.prototype._detach): Call _noteRowsChanged.
* UserInterface/Views/DatabaseUserQuerySuccessView.js:
(WebInspector.DatabaseUserQuerySuccessView):
Set inline to true, remove direct classList add. Call updateLayoutIfNeeded since we don't use views here.
* UserInterface/Views/DetailsSection.css:
(.details-section > .content .data-grid td.value-column):
(.details-section > .content .data-grid table.data): Deleted.
(.details-section > .content .data-grid tr:nth-child(even)): Deleted.
(.details-section > .content .data-grid tr:nth-child(odd)): Deleted.
Now handled by DataGrid.css directly.
* UserInterface/Views/DetailsSectionDataGridRow.js:
(WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid):
Set inline and variableHeightRows to true, remove direct classList add. Call updateLayoutIfNeeded since we don't use views here.
* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot > .data-grid tr:matches(.selected, :hover) td .go-to-arrow):
(.heap-snapshot .icon):
Remove margin-top to fit inside 20px row instead of 21px.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
(.content-view.indexed-database-object-store > .data-grid table.data): Deleted.
(.content-view.indexed-database-object-store > .data-grid table.data tr:nth-child(even)): Deleted.
(.content-view.indexed-database-object-store > .data-grid table.data tr:nth-child(odd)): Deleted.
(.content-view.indexed-database-object-store > .data-grid table.data tr.filler): Deleted.
Now handled by DataGrid.css directly.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WebInspector.IndexedDatabaseObjectStoreContentView):
Set variableHeightRows to true.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
Set inline to true, remove direct classList add. Call updateLayoutIfNeeded since we don't use views here.
* UserInterface/Views/LogContentView.css:
(.console-item .data-grid table.data): Deleted.
(.console-item .data-grid table.data tr:nth-child(even)): Deleted.
Now handled by DataGrid.css directly.
* UserInterface/Views/NetworkGridContentView.css:
(.content-view.network-grid > .data-grid td): Deleted.
(.content-view.network-grid > .data-grid table.data): Deleted.
Now handled by DataGrid.css directly.
* UserInterface/Views/ProbeSetDataGrid.js:
(WebInspector.ProbeSetDataGrid):
Set inline to true, remove direct classList add.
* UserInterface/Views/ProfileView.css:
(.profile > .data-grid td .icon):
(.profile > .data-grid tr:matches(.selected, :hover) .go-to-arrow):
Remove margin-top to fit inside 20px row instead of 21px.
* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid td): Deleted.
(.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid table.data): Deleted.
Now handled by DataGrid.css directly.
* UserInterface/Views/Variables.css:
(:root): Added zebra stripe colors.
2016-04-19 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION (r199635) Web Inspector: Percentages in Heap Allocations view are too large
https://bugs.webkit.org/show_bug.cgi?id=156729
<rdar://problem/25796002>
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
Fix callsite that failed to be updated once percentageString
required 0..1 input instead of 0..100.
2016-04-18 Timothy Hatcher <timothy@apple.com>
Web Inspector: NavigationSidebarPanel does a lot of style recalc and layout on busy sites
https://bugs.webkit.org/show_bug.cgi?id=156704
rdar://problem/25778744
Reviewed by Brian Burg.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
Use _updateContentOverflowShadowVisibilitySoon in more places so the style recalc
and layout changes are coalesced into one action after all rapid fire calls.
2016-04-18 Timothy Hatcher <timothy@apple.com>
Web Inspector: Database query result DataGrids have misaligned header columns
https://bugs.webkit.org/show_bug.cgi?id=156701
rdar://problem/25778310
Reviewed by Brian Burg.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.autoSizeColumns): Set the width on the <col> element
for the body table to match the <col> in the header.
2016-04-18 Timothy Hatcher <timothy@apple.com>
Web Inspector: Fix the debounce function
https://bugs.webkit.org/show_bug.cgi?id=156696
rdar://problem/25778133
Reviewed by Brian Burg.
* UserInterface/Base/Utilities.js:
(Function.prototype.debounce): Store the timeout on the original function instead
of the bound function. Also simplify the implementation with arrow functions
and eliminate the bind altogether.
2016-04-16 Matt Baker <mattbaker@apple.com>
Web Inspector: Adopt Number.prototype.toLocaleString For All Sizes and Times
https://bugs.webkit.org/show_bug.cgi?id=152033
<rdar://problem/23815589>
Reviewed by Timothy Hatcher.
Update string formatters to localize float and percentage strings. Hook up
console message formatters to use String.standardFormatters so that console
statements (e.g. console.log("%.3f", 3.14159)) are properly formatted.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Utilities.js:
(value):
tokenizeFormatString should default to 6 digits when no precision
sub-specifier is provided.
percentageString should localize formatting, and take a fraction value
(0 to 1) instead of a percentage.
secondsToString should perform special-case formatting for zero values
("0ms") instead of the general purpose float formatter.
(value.d):
Switch to parseInt to floor floating point values and support numeric strings.
Return NaN instead of zero when passed a value that can't be converted to integer.
(value.f):
Switch to parseFloat to support numeric strings, and localize formatting.
Remove precision check, as it will never be less than zero. Return NaN
instead of zero when passed a value that can't be converted to float.
(prettyFunctionName):
Convert substitutions (an arguments object) to an array before calling join.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.floatFormatter):
Use String.standardFormatters.f.
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.integerFormatter):
Use String.standardFormatters.d.
* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
(WebInspector.LayoutTimelineDataGridNode):
Use integer formatting for pixel values.
* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode.prototype._recalculateData):
(WebInspector.ProfileDataGridNode.prototype._totalTimeContent):
Treat percentage as a fraction from 0 to 1.
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
Use integer formatting for pixel values.
2016-04-16 Matt Baker <mattbaker@apple.com>
Web Inspector: Network timeline grid nodes aren't refreshed on LoadingFinished
https://bugs.webkit.org/show_bug.cgi?id=156666
<rdar://problem/25765811>
Reviewed by Timothy Hatcher.
Fix a regression caused by the recent Timelines UI redesign, and
reorder TimelineDataGrid's constructor arguments now that most
timeline views no longer have an associated tree outline.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView):
Reorder constructor parameters and omit optional treeOutline and
synchronizerDelegate arguments when they aren't needed.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
Reorder constructor arguments so that treeOutline can be optional.
(WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
Nodes should be refreshed and re-inserted in the data grid without
requiring a grid synchronizer. If a synchronizer exists, re-insert
the tree element for the node. Since the syncronizer is disabled the
order of grid/tree operations doesn't matter.
2016-04-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: sourceMappingURL not used when sourceURL is set
https://bugs.webkit.org/show_bug.cgi?id=156021
<rdar://problem/25438417>
Reviewed by Timothy Hatcher.
Previously Debugger.sourceParsed only providing the sourceURL, and
wiping out the resourceURL, meant that a Script from a Resource that
set a sourceURL directive would fail to be associated with its Resource.
This would result in duplicated tree elements in the Resources Sidebar,
one for the Resource, and one for the Script. With the Script getting
ultimately getting the SourceMap resources. However, since the frontend
prefers Resources over Scripts when possible, an error that generated
from the script would point to a location in the Resource, not following
source maps.
By always providing the resource URL in Debugger.sourceParsed, a Script
can better be associated with its Resource. The result is now a single
shared tree element in the Resources Sidebar, and the Resource getting
the SourceMap resources. Now the script error goes through the Resource
to its SourceMap resources as we would expect.
* UserInterface/Protocol/DebuggerObserver.js:
(WebInspector.DebuggerObserver):
(WebInspector.DebuggerObserver.prototype.scriptParsed):
We now have to handle two different signatures of scriptParsed. One
for legacy, and one for non-legacy. Cache that value early on, since
scriptParsed happens a lot.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Agent.prototype.hasEventParameter):
Runtime check a protocol event to see if it has a parameter. This
is used to check if Debugger.sourceParsed is legacy or not based
on if it has the legacy "hasSourceURL" parameter.
* UserInterface/Models/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.get sourceURL):
Treat sourceURL and url separately.
(WebInspector.Script.prototype.get displayName):
Handle both the url and sourceURL in displayName.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Update code that checks the sourceURL to explicitly use sourceURL.
* UserInterface/Controllers/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype.downloadSourceMap):
For legacy backends, or in case we get a resource that has an incomplete
baseURL, attempt to get an absolute URL based on the main resource.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
Ignore scripts without a url or sourceURL.
2016-04-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Cleanup inspector/debugger tests
https://bugs.webkit.org/show_bug.cgi?id=156619
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Controllers/DebuggerManager.js:
Remove agent checks for agents that are always available.
2016-04-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add a JavaScript Formatting test for template strings
https://bugs.webkit.org/show_bug.cgi?id=156600
Reviewed by Brian Burg.
* Tools/Formatting/index.html:
2016-04-14 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION: Web Inspector: Remote inspector doesn't work
https://bugs.webkit.org/show_bug.cgi?id=156543
Reviewed by Timothy Hatcher.
WebSocket connection is blocked by CSP, but needed by the remote web inspector to work, so allow connect to ws
URLs from the web inspector. Also add stubs for zoomFactor and setZoomFactor to InspectorFrontendHostStub,
required after r199396.
* UserInterface/Base/InspectorFrontendHostStub.js:
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.setZoomFactor):
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.zoomFactor):
* UserInterface/Main.html:
2016-04-12 Brian Burg <bburg@apple.com>
Web Inspector: save inspector's zoom factor as a persistent setting across sessions
https://bugs.webkit.org/show_bug.cgi?id=156522
<rdar://problem/25635774>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
Initialize the setting and immediately set the zoom before the frontend page loads.
(WebInspector._increaseZoom):
(WebInspector._decreaseZoom):
(WebInspector._resetZoom):
Use the internal get/set method which updates the WebInspector.Setting.
(WebInspector._setZoomFactor):
Added. Round-trip through the frontend host method in case it further clamps the value.
(WebInspector._zoomFactor):
Added. Just return the setting, since there's no other way for zoom to have changed.
2016-04-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Show the normal Native icon for all Internal objects in Heap Snapshots
https://bugs.webkit.org/show_bug.cgi?id=156513
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
Show the native icon for internal objects.
2016-04-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Keyboard shortcut for "Inspect Element" only works when Web Inspector is open.
https://bugs.webkit.org/show_bug.cgi?id=111193
<rdar://problem/13325889>
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.set inspectModeEnabled):
(WebInspector.DOMTreeManager.set inspectModeEnabled.callback):
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setElementSelectionEnabled):
Frontend API to enable element selection.
2016-04-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Should be able to expand Objects in Heap Allocations View to see exactly what it retains
https://bugs.webkit.org/show_bug.cgi?id=156419
<rdar://problem/25633863>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Remove strings, and fix sort.
* UserInterface/Models/HeapSnapshotRootPath.js:
(WebInspector.HeapSnapshotRootPath.pathComponentForIndividualEdge):
(WebInspector.HeapSnapshotRootPath.canPropertyNameBeDotAccess):
(WebInspector.HeapSnapshotRootPath.prototype.appendPropertyName):
(WebInspector.HeapSnapshotRootPath.prototype._canPropertyNameBeDotAccess):
Provide a helper to get an path component string for an individual edge.
* UserInterface/Models/PropertyPreview.js:
(WebInspector.PropertyPreview):
Fix an assert that may have errantly fired for an empty string name.
* UserInterface/Proxies/HeapSnapshotNodeProxy.js:
(WebInspector.HeapSnapshotNodeProxy):
(WebInspector.HeapSnapshotNodeProxy.deserialize):
Include "hasChildren" property in the original proxy message.
(WebInspector.HeapSnapshotNodeProxy.prototype.retainedNodes):
The method now also returns a list of edges for each of the retained nodes.
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.sort):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
An instance DataGrid node can now show children. It can expand to show
its retained node graph.
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.instancesWithClassName):
(HeapSnapshot.prototype.dominatedNodes):
(HeapSnapshot.prototype.retainers):
(HeapSnapshot.prototype.serializeNode):
Remove unnecessary calls to bind in favor of using the `thisObject` argument.
(HeapSnapshot.prototype.retainedNodes):
Return a parallel list of edges for each of the nodes.
* UserInterface/Views/HeapSnapshotClassDataGridNode.js:
(WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get instancesContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.shown):
(WebInspector.HeapSnapshotClusterContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get navigationItems): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype._contentViewExtraArguments): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype._toggleShowInternalObjectsSetting): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype._updateViewsForShowInternalObjectsSettingValue): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype._updateShowInternalObjectsButtonNavigationItem): Deleted.
* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView):
(WebInspector.HeapSnapshotInstancesContentView.prototype.get showInternalObjects): Deleted.
(WebInspector.HeapSnapshotInstancesContentView.prototype.set showInternalObjects): Deleted.
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get includeInternalObjects): Deleted.
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set includeInternalObjects): Deleted.
* UserInterface/Views/HeapSnapshotSummaryContentView.js:
Remove the show/hide internal objects button. In the Instances view we will
only show non-Internal objects at the top level, and show internal objects
when those instances are expanded.
2016-04-12 Matt Baker <mattbaker@apple.com>
Web Inspector: clearing the console should exit all console groups
https://bugs.webkit.org/show_bug.cgi?id=156496
<rdar://problem/25676416>
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._logCleared):
Reset nesting level to zero.
2016-04-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Tab Bar items get unreadable at narrow window widths, should collapse earlier
https://bugs.webkit.org/show_bug.cgi?id=156477
Reviewed by Timothy Hatcher.
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype.layout):
Hide-titles sooner since a width of 60 results in only a few characters
and looks poor.
2016-04-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Unstyled nodes in ObjectTree previews look poor
https://bugs.webkit.org/show_bug.cgi?id=156475
<rdar://problem/25667351>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendPreview):
Treat nodes as simple values.
(WebInspector.ObjectPreviewView.prototype._initTitleElement):
(WebInspector.ObjectPreviewView.prototype._appendValuePreview):
Format nodes nicely, and treat them as lossy since they have properties.
2016-04-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: HeapSnapshot instance property path popover should include a descriptive header
https://bugs.webkit.org/show_bug.cgi?id=156431
<rdar://problem/25633594>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendTitle):
Title for the popover. Because localization may change the location of the @1234
in the string, localize first with a placeholder, and then replace the placeholder
with the @1234 link.
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
Give the table a container for extra padding.
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
Do not include the space before @1234 as part of the clickable link.
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
Include a title when the popover shows a root path.
* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot-instance-popover-content > .title):
(.heap-snapshot-instance-popover-content):
(.heap-snapshot-instance-popover-content > .table-container):
(.heap-snapshot-instance-popover-content table):
Provide styles for the title. Let the title extend across the entire
popover horizontally, but pad the table so that it appears more
centered under the title. Because the table has border collapse we have
to wrap it in a container to give it back the padding we want.
2016-04-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: XHRs and Web Worker scripts are not searchable
https://bugs.webkit.org/show_bug.cgi?id=154214
<rdar://problem/24643587>
Reviewed by Timothy Hatcher.
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
Carry forward the requestId property if it is available.
2016-04-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Allocation snapshot hover persists after switching tabs
https://bugs.webkit.org/show_bug.cgi?id=156430
<rdar://problem/25633800>
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
Don't show the popover if the tree is no longer visible.
* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView.prototype.shown):
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get visible):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.shown):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
Give the tree a visible state and have its containing ContentView
update it with normal ContentView shown/hidden.
* UserInterface/Views/Popover.js:
We are presenting while we were dismissing, so completely clear the
dismissing state.
2016-04-08 Joseph Pecoraro <pecoraro@apple.com>
JSContext Inspector: Fix asserts and uncaught exception showing Timeline Tab
https://bugs.webkit.org/show_bug.cgi?id=156411
Reviewed by Timothy Hatcher.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.closed):
Gracefully handle if we do not have a Network Timeline.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._changeViewMode):
This function is always called by the constructor, so the assert
is not useful since it can be called when FPS is not supported.
2016-04-08 Matt Baker <mattbaker@apple.com>
Web Inspector: Attempting to dismiss a popover that is already being dismissed causes an error
https://bugs.webkit.org/show_bug.cgi?id=156385
<rdar://problem/25617962>
Reviewed by Timothy Hatcher.
The Popover element is removed from the DOM once it's fade-out transition
completes. Since Popover.dismiss proceeds as long as it's element has a
parent, successive calls to dismiss can run before the popover is removed.
Rather than rely on the presence of the popover in the DOM, set a "dismissing"
flag the first time dismiss is called, before the fade-out animation begins.
* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey):
Check for null popover.
* UserInterface/Views/Popover.js:
(WebInspector.Popover):
(WebInspector.Popover.prototype.dismiss):
Do nothing if already dismissing.
(WebInspector.Popover.prototype.handleEvent):
Reset dismissing flag after style transition completes.
2016-04-08 Matt Baker <mattbaker@apple.com>
Web Inspector: Quick Open fails to match pattern "bB" in file "abBc"
https://bugs.webkit.org/show_bug.cgi?id=156398
Reviewed by Timothy Hatcher.
Correct an off-by-one error in the backtrack routine that set the dead
branch index to the character just before the match that was popped.
The dead branch index should equal the index of the popped match.
* UserInterface/Controllers/ResourceQueryController.js:
(WebInspector.ResourceQueryController.prototype._findQueryMatches.backtrack):
(WebInspector.ResourceQueryController.prototype._findQueryMatches):
2016-04-07 Matt Baker <mattbaker@apple.com>
Web Inspector: OpenResourceDialog should keep its resources list up-to-date
https://bugs.webkit.org/show_bug.cgi?id=155321
<rdar://problem/25093890>
Reviewed by Timothy Hatcher.
The Quick Open dialog should listen for resource change events, refreshing
the resource list and current query results as needed.
* UserInterface/Views/OpenResourceDialog.js:
(WebInspector.OpenResourceDialog):
(WebInspector.OpenResourceDialog.prototype.didDismissDialog):
Unregister resource event handlers.
(WebInspector.OpenResourceDialog.prototype.didPresentDialog):
Register resource event handlers and add main frame resources.
(WebInspector.OpenResourceDialog.prototype._addResource):
Add resource to the query controller, if valid. Optionally suppress
the potentially expensive filter update, which is useful when adding
multiple resources at once.
(WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
Add the entire frame resource tree and update dialog filter.
(WebInspector.OpenResourceDialog.prototype._mainResourceDidChange):
(WebInspector.OpenResourceDialog.prototype._resourceWasAdded):
2016-04-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ProfileView source links are off by 1 line, worse in pretty printed code
https://bugs.webkit.org/show_bug.cgi?id=156371
Reviewed by Timothy Hatcher.
* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode.prototype._displayContent):
Switch the 1-based locations in the CCT data structure to 0-based for SourceCodeLocation.
2016-04-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught Exception: No resource with given URL found
https://bugs.webkit.org/show_bug.cgi?id=156259
<rdar://problem/25564749>
Reviewed by Timothy Hatcher.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
SourceCode.prototype.requestContent will reject if it cannot load
content for the given resource. In that case, we already have an
earlier catch handler that displays an error message in the
ContentView, so we shouldn't show an Uncaught Exception page.
Really, we should not reject the original promise here, and
instead resolve it with an object describing the error, but
short term we should remove the uncaught exception handler for
this case.
2016-04-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Take snapshot navigation button should match navigation button styles
https://bugs.webkit.org/show_bug.cgi?id=156355
<rdar://problem/25325172>
Reviewed by Timothy Hatcher.
* UserInterface/Images/Camera.svg: Added.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
Use the new image for the navigation bar button.
2016-04-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Inspector hangs when trying to view a large XHR resource
https://bugs.webkit.org/show_bug.cgi?id=144107
<rdar://problem/20669463>
Reviewed by Timothy Hatcher.
Previously auto formatting (initial pretty print of source code) in TextEditor
was done synchronously in this order:
(1) revealing the Editor as soon as we have content
(2) set the CodeMirror value
(3) pretty print with the CodeMirror editor
(4) set the CodeMirror value
=> Layout
At the end, CodeMirror would layout once with the new content. This approach
performs very poorly when step (3) is an asynchronous action, because it would
mean CodeMirror would layout for both (2) and at the end (4) and the layout
itself can be very costly if the content is minified and so has very long
lines at the top of the file that need to be syntax highlighted and visible
since we do not wrap.
This patch changes the order of operations to benefit asynchronous formatting.
When SourceCodeTextEditor determines that it can autoformat it:
(1) set the CodeMirror value
(2) pretty print to source text
(3) reveal the Editor when pretty printing is done
(4) set the CodeMirror value
=> Layout
This maintains the fact that to undo pretty printing we can just "undo" the
editor to get the original text. This also means we only do a single
CodeMirror layout, with the pretty printed and therefore more manageable
source text for highlighting. It also means we continue to show a loading
indicator in the editor while we are pretty printing. If this is truely
done asynchronously, which is the case for JavaScript with FormatterWorker,
then the loading indicator will animate smoothly.
This sequence also works with the traditional synchronous formatters,
which we still have for CSS.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.contentViewForRepresentedObject):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
(WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
BreakpointTreeElements can now be restored and reselected when its
source code is null. Avoid deleting the pending cookie data if a
ContentView was not shown for the resource. When the Breakpoint
and SourceCode get hooked up, this code will run again and work.
* UserInterface/Views/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype._togglePrettyPrint):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype._togglePrettyPrint):
* UserInterface/Views/TextContentView.js:
(WebInspector.TextContentView.prototype._togglePrettyPrint):
New API for toggling formatting, now that it is an async operation.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
(WebInspector.SourceCodeTextEditor.prototype._proceedPopulateWithContent):
(WebInspector.SourceCodeTextEditor.prototype._prepareEditorForInitialContent):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent):
(WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Deleted.
Move auto formatting logic into SourceCodeTextEditor, because it
determines if content should be auto formatted, and it loads the
initial content so it can determine when to show the editor for
the first time.
When we get the initial content and determine we have to autoformat,
setup the TextEditor, but don't proceed with WillPopulate/DidPopulate
until after we have formatted text.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.set string.update):
(WebInspector.TextEditor.prototype.set string):
(WebInspector.TextEditor.prototype.updateFormattedState):
(WebInspector.TextEditor.prototype.hasFormatter):
(WebInspector.TextEditor.prototype._format):
(WebInspector.TextEditor.prototype.prettyPrint):
(WebInspector.TextEditor.prototype._canUseFormatterWorker):
(WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
(WebInspector.TextEditor.prototype._startCodeMirrorPrettyPrint):
(WebInspector.TextEditor.prototype._finishPrettyPrint):
(WebInspector.TextEditor.prototype._undoFormatting):
(WebInspector.TextEditor.prototype._updateAfterFormatting):
Break up the synchronous pretty printing code into multiple steps.
One path can be asynchronous formatting via FormatterWorker, another
path may be synchronous formatting using the CodeMirror formatters.
(WebInspector.TextEditor.prototype.set formatted): Deleted.
Remove the synchronous `set formatted` setter. Replace with
updateFormattedState().
(WebInspector.TextEditor.prototype.set autoFormat): Deleted.
Remove the TextEditor's autoformat. Since formatting can be async, having
the TextEditor showing and asynchronously format its initial contents is
a recipe for poor performance causing multiple layouts of different content.
Instead, autoformatting is handled by SourceCodeTextEditor, and TextEditor
can then be shown when it has the right data.
2016-04-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve JavaScript pretty printing
https://bugs.webkit.org/show_bug.cgi?id=156178
<rdar://problem/25535719>
Reviewed by Timothy Hatcher.
Add a new EsprimaFormatter which pretty prints JavaScript source text
using the Esprima AST and Tokens. Currently we use CodeMirror's
tokenizer for pretty printing. By moving to Esprima for pretty
printing we get a few advantages: (1) can be used within a Worker
as there are no dependencies on DOM objects, (2) a full featured AST
gives more context to handling individual tokens. One disadvantage
is that Esprima requires valid input, so scripts with syntax errors
will not work.
EsprimaFormatter works by:
- Getting the Esprima AST and token stream.
- Walk all AST nodes:
- when entering an AST node, handle any tokens before the start of this node
- when leaving an AST node, handle any tokens that were inside the node
- Whenever we handle a new node or token check if we should preserve any
newlines or comments that do not show up in the AST or token stream.
This allows us to handle any token based on its context. Currently the
formatter prefers to operate on tokens based on their context. So the
formatter has a case for each AST node type and handles the tokens
within that AST node. A small exception is made to special case the
handling of semicolons.
* Scripts/copy-user-interface-resources-dryrun.rb:
Add a generic check for -h, -help, --help to print usage.
* Tools/Formatting/EsprimaFormatterDebug.js: Added.
(EsprimaFormatterDebug):
(EsprimaFormatterDebug.prototype.get debugText):
(EsprimaFormatterDebug.prototype._pad):
(EsprimaFormatterDebug.prototype._debugHeader):
(EsprimaFormatterDebug.prototype._debugFooter):
(EsprimaFormatterDebug.prototype._debug):
(EsprimaFormatterDebug.prototype._debugComments):
(EsprimaFormatterDebug.prototype._debugAfterProgramNode):
(EsprimaFormatterDebug.prototype._before):
(EsprimaFormatterDebug.prototype._after):
* Tools/Formatting/codemirror-additions.css: Copied from Source/WebInspectorUI/Tools/PrettyPrinting/codemirror-additions.css.
* Tools/Formatting/index.html: Added.
* Tools/PrettyPrinting/codemirror-additions.css:
(pre): Deleted.
(a.download): Deleted.
* Tools/PrettyPrinting/index.html:
* Tools/PrettyPrinting/populate/jquery.min.js: Removed.
Add a Formatter tool that is similiar to the PrettyPrinting tool but
outputs debug information for Esprima tokens. This is useful for
iterating on tests, performance measurements, and general debugging
of token stream for any input.
* UserInterface/Controllers/FormatterSourceMap.js:
(WebInspector.FormatterSourceMap.fromSourceMapData):
(WebInspector.FormatterSourceMap.fromBuilder): Deleted.
Switch to constructing with a common data objects, instead of a Builder.
* UserInterface/Main.html:
* UserInterface/Test.html:
New files and moved files.
* UserInterface/Proxies/FormatterWorkerProxy.js: Added.
(WebInspector.FormatterWorkerProxy):
(WebInspector.FormatterWorkerProxy.singleton):
(WebInspector.FormatterWorkerProxy.canFormat):
(WebInspector.FormatterWorkerProxy.prototype.formatJavaScript):
(WebInspector.FormatterWorkerProxy.prototype.performAction):
(WebInspector.FormatterWorkerProxy.prototype._postMessage):
(WebInspector.FormatterWorkerProxy.prototype._handleMessage):
Main world object which provides a static formatJavaScript action.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContentFromEditor):
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.prettyPrint.prettyPrintAndUpdateEditor):
(WebInspector.TextEditor.prototype.prettyPrint):
* UserInterface/Workers/Formatter/FormatterContentBuilder.js: Renamed from Source/WebInspectorUI/UserInterface/Controllers/FormatterContentBuilder.js.
(FormatterContentBuilder):
Simplify construction of a Builder. The constructor objects were always
the same and often unnecessary. Also move out of the WebInspector
namespace signifying it can be used within a Worker.
(FormatterContentBuilder.prototype.get originalContent): Deleted.
(FormatterContentBuilder.prototype.get formattedContent): Deleted.
(FormatterContentBuilder.prototype.get sourceMapData): Added.
Simplify getting all the data needed for SourceMaps.
(FormatterContentBuilder.prototype.setOriginalLineEndings):
A client may wish to pre-fill line endings instead of filling
while building.
(FormatterContentBuilder.prototype.appendNewline):
Auto-clear trailing whitespace on the previous line.
* UserInterface/Workers/Formatter/ESTreeWalker.js: Added.
(ESTreeWalker):
(ESTreeWalker.prototype.walk):
(ESTreeWalker.prototype._walk):
(ESTreeWalker.prototype._walkArray):
(ESTreeWalker.prototype._walkChildren):
Walk AST nodes in an ESTree format. Due to the spec's incompleteness
this is essentially Esprima's ESTree.
* UserInterface/Workers/Formatter/EsprimaFormatter.js: Added.
(EsprimaFormatter):
(EsprimaFormatter.isWhitespace):
(EsprimaFormatter.prototype.get formattedText):
(EsprimaFormatter.prototype.get sourceMapData):
(EsprimaFormatter.prototype._insertNewlinesBeforeToken):
(EsprimaFormatter.prototype._insertComment):
(EsprimaFormatter.prototype._insertSameLineTrailingComments):
(EsprimaFormatter.prototype._insertCommentsAndNewlines):
(EsprimaFormatter.prototype._before):
(EsprimaFormatter.prototype._after):
(EsprimaFormatter.prototype._isInForHeader):
(EsprimaFormatter.prototype._isRangeWhitespace):
(EsprimaFormatter.prototype._handleTokenAtNode):
(EsprimaFormatter.prototype._exitNode):
(EsprimaFormatter.prototype._afterProgram):
Pretty print source text.
* UserInterface/Workers/Formatter/FormatterUtilities.js: Added.
(Array.prototype.lastValue):
(String.prototype.lineEndings):
(isECMAScriptWhitespace):
(isECMAScriptLineTerminator):
Helpers used by the classes in the Worker code.
* UserInterface/Workers/Formatter/FormatterWorker.js: Added.
(FormatterWorker):
(FormatterWorker.prototype.formatJavaScript):
(FormatterWorker.prototype._handleMessage):
Handle the formatJavaScript action.
2016-04-06 Matt Baker <mattbaker@apple.com>
Web Inspector: Improve filtering in OpenResourceDialog
https://bugs.webkit.org/show_bug.cgi?id=155324
<rdar://problem/25094504>
Reviewed by Joseph Pecoraro and Timothy Hatcher.
* UserInterface/Base/Utilities.js:
(value):
Added String methods isLowerCase, isUpperCase, removeWhitespace.
* UserInterface/Controllers/ResourceQueryController.js: Added.
(WebInspector.ResourceQueryController):
(WebInspector.ResourceQueryController.prototype.addResource):
(WebInspector.ResourceQueryController.prototype.removeResource):
Add and remove the resources to be queried.
(WebInspector.ResourceQueryController.prototype.reset):
Reset controller state. Current just clears resources.
(WebInspector.ResourceQueryController.prototype.executeQuery):
Executes a query against the list of resources and returns a list of
QueryResult objects, with at most one result per resource, ordered by
descending rank.
The query string is stripped of whitespace characters and lowercased
before use. Prior to running the query, resources undergo a one-time
pre-processing step to locate special characters.
(WebInspector.ResourceQueryController.prototype._findQueryMatches.pushMatch):
(WebInspector.ResourceQueryController.prototype._findQueryMatches.matchNextSpecialCharacter):
(WebInspector.ResourceQueryController.prototype._findQueryMatches.backtrack):
(WebInspector.ResourceQueryController.prototype._findQueryMatches):
Returns a list of query matches for a single resource, along with metadata
which is used to rank the matches. The algorithm attempts to match the
entire query, first comparing each query character against "special" characters
in the resource (commonly used filename separators, the first character,
and camel-case word boundaries).
If there are remaining query characters after exhausting special characters,
regular characters are matched starting from the last matched special
character. Failing that, the algorithm attempts to find a match by backtracking.
To backtrack, the last match is discarded and the query position decremented.
If a special match is now the last match, matching starts again from the
next character in the filename after the match. If a normal match is now
the last match, keep discarding until a special match is found or no matches
remain. The query fails if no matches remain. For example, consider:
Query: "abcd"
Filename: "AxBcdCx"
The capital A, B, and C are all special characters, and are successfully
matched with the first three query characters. Having exhausted the special
characters the "d" at the end of the query is compared with the "x" at
the end of the filename, and fails to match. Backtracking then kicks in.
The last match, "C", is discarded and the search position in the query
decremented. The search resumes after the next to last match, "B", and now
matches the non-special characters "cd", yielding the following: "A Bcd ".
(WebInspector.ResourceQueryController.prototype._findSpecialCharacterIndices):
Pre-processing step for resources. Locates the positions of special
characters in the resource filename. Special characters are defined as:
1. The first character
2. Common filename separators, and the character immediately following.
3. A capital letter that follows a lowercase character.
* UserInterface/Models/ResourceQueryMatch.js: Added.
Helper class used internally by the controller and QueryResult classes.
(WebInspector.ResourceQueryMatch):
(WebInspector.ResourceQueryMatch.prototype.get type):
(WebInspector.ResourceQueryMatch.prototype.get index):
(WebInspector.ResourceQueryMatch.prototype.get queryIndex):
* UserInterface/Models/ResourceQueryResult.js: Added.
Holds a resource that matched the executed query.
(WebInspector.ResourceQueryResult):
(WebInspector.ResourceQueryResult.prototype.get resource):
(WebInspector.ResourceQueryResult.prototype.get rank):
Ranking relative to other results returned by the query. Used by
the ResourceQueryController to sort results.
(WebInspector.ResourceQueryResult.prototype.get matchingTextRanges):
Get TextRanges for matching substrings in the resource display name.
(WebInspector.ResourceQueryResult.prototype._calculateRank):
Calculate the rank of the result. Matches are scored based on the type
of match (Special vs. Normal), the location of the match within the filename
(matches closer to the beginning are scored higher), and whether the match
is adjacent to the previous match.
Values assigned to each ranking criteria are somewhat arbitrary, and may
be fine-tuned over time to produce better results.
(WebInspector.ResourceQueryResult.prototype._createMatchingTextRanges):
(WebInspector.ResourceQueryResult.prototype.__test_createMatchesMask):
Test API for visualizing matches. For a result returned from the query
"abce", run against a filename "abcde", the mask is "a c e".
* UserInterface/Main.html:
* UserInterface/Test.html:
New files.
* UserInterface/Views/Dialog.js:
(WebInspector.Dialog.prototype.dismiss):
(WebInspector.Dialog.prototype.didDismissDialog):
Add hook for subclasses to perform actions after on dialog dismissal.
* UserInterface/Views/OpenResourceDialog.js:
(WebInspector.OpenResourceDialog):
(WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline.createHighlightedTitleFragment):
(WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
Add tree elements for each QueryResult returned by the last query, creating
titles with contiguous matching query characters wrapped in highlight spans.
(WebInspector.OpenResourceDialog.prototype.didDismissDialog):
Clear resources from the ResourceQueryController.
(WebInspector.OpenResourceDialog.prototype.didPresentDialog):
Add resources to the ResourceQueryController.
(WebInspector.OpenResourceDialog.prototype._updateFilter):
Execute the filter text as a resource query.
* UserInterface/Views/TreeOutline.css:
(.tree-outline.large .item .titles): Deleted.
Line height too small, hid the bottom border of highlighted matches in
tree element title spans. Removing the style had no negative visual impact
on the Quick Open or Timelines tree outlines (the only "large" trees).
2016-04-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Do not create CodeMirror color/gradient markers in JavaScript resources
https://bugs.webkit.org/show_bug.cgi?id=156278
<rdar://problem/25570404>
Reviewed by Timothy Hatcher.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._hasStyleSheetContents):
(WebInspector.SourceCodeTextEditor.prototype._updateEditableMarkers):
Only spend the time to create style markers for style sheet contents.
2016-04-05 Timothy Hatcher <timothy@apple.com>
Web Inspector: Make the Timelines sidebar wider
https://bugs.webkit.org/show_bug.cgi?id=156257
rdar://problem/25564218
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview): Added. Set define --timeline-sidebar-width.
(.timeline-overview > .navigation-bar.timelines): Use --timeline-sidebar-width.
(.timeline-overview > .tree-outline.timelines): Ditto.
(.timeline-overview > .scroll-container): Ditto.
(.timeline-overview > .timeline-ruler): Ditto.
(.timeline-overview > .graphs-container): Ditto.
2016-04-05 Timothy Hatcher <timothy@apple.com>
Web Inspector: Command-Option-R opens Inspector details sidebar or Responsive Design Mode, should only do one
https://bugs.webkit.org/show_bug.cgi?id=156258
rdar://problem/25483871
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Change shortcuts to Command-Option-0 and Command-Shift-0.
2016-04-05 Matt Baker <mattbaker@apple.com>
Web Inspector: Should not allow selecting no Timelines when editing in Timeline tab
https://bugs.webkit.org/show_bug.cgi?id=156223
<rdar://problem/25552221>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._startEditingInstruments):
Register EnabledDidChange event handler for all tree elements.
(WebInspector.TimelineOverview.prototype._stopEditingInstruments):
Unregister event handler for enabled tree elements. The rest are removed
from the tree outline once editing has completed.
(WebInspector.TimelineOverview.prototype._timelineTreeElementEnabledDidChange):
Enable "Done" button if at least one timeline is enabled.
* UserInterface/Views/TimelineTreeElement.js:
Dispatch a new event, EnabledDidChange, when the checkbox state changes.
(WebInspector.TimelineTreeElement.prototype._showCheckbox):
(WebInspector.TimelineTreeElement.prototype._clickHandler):
(WebInspector.TimelineTreeElement.prototype._dispatchEnabledDidChangeEvent):
(WebInspector.TimelineTreeElement):
2016-04-04 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: Error: Can't make a ContentView for an unknown representedObject (ApplicationCacheManifest)
https://bugs.webkit.org/show_bug.cgi?id=156139
<rdar://problem/25511926>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
Improve the error message to get the name of the represented object.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
Treat ApplicationCacheManifestTreeElement like other Host elements. Nothing to save/show.
* UserInterface/Views/ApplicationCacheManifestTreeElement.js:
(WebInspector.ApplicationCacheManifestTreeElement):
* UserInterface/Views/DatabaseHostTreeElement.js:
(WebInspector.DatabaseHostTreeElement):
* UserInterface/Views/IndexedDatabaseHostTreeElement.js:
(WebInspector.IndexedDatabaseHostTreeElement):
Auto-expand these folders, as they are not useful when collapsed.
2016-04-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught exception in CSS with string "constructor" (WebInspector.Color.fromString())
https://bugs.webkit.org/show_bug.cgi?id=156183
<rdar://problem/25539279>
Reviewed by Brian Burg.
* UserInterface/Models/Color.js:
(WebInspector.Color.fromString):
Fix the uncaught exception issue. Only look at own properties of
our keyword map to avoid values like "toString" and "constructor".
* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleError):
(handleUncaughtException):
(handleUncaughtExceptionRecord):
Generalize uncaught exception handler error sheet to get
exception records from both uncaught exceptions (window.onerror)
and general Runtime Error objects (TypeError, etc).
* UserInterface/Base/Utilities.js:
(window.promiseLogError.window.promiseLogError):
Add a fallback log exception helper.
* UserInterface/Controllers/AnalyzerManager.js:
(WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
Add catch handlers to Promises to log exceptions.
2016-04-01 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed follow-up to r198968. Remove debug statements.
* Scripts/remove-console-asserts.pl:
(removeConsoleAssertsInFile):
2016-04-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove console.asserts from Worker code in optimized builds
https://bugs.webkit.org/show_bug.cgi?id=156124
<rdar://problem/25505031>
Reviewed by Timothy Hatcher.
* Scripts/copy-user-interface-resources.pl:
Remove console asserts on the Worker results directory.
* Scripts/remove-console-asserts.pl:
(removeConsoleAssertsInFile):
(removeConsoleAssertsInDirectory):
Refactor into functions for a file and a file for
recursing through directories.
2016-03-31 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ScriptSyntaxTree doesn't handle RestElement AST nodes
https://bugs.webkit.org/show_bug.cgi?id=156085
Reviewed by Saam Barati.
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
When searching for identifiers in Function parameters, pass
through the RestElement to its argument.
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
Create a ScriptSyntaxTree RestElement node.
Also, every case in recurse visits the current
node, so simplify the code!
2016-03-30 Joseph Pecoraro <pecoraro@apple.com>
Remove unused ScriptProfiler.Samples.totalTime
https://bugs.webkit.org/show_bug.cgi?id=156002
Reviewed by Saam Barati.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
* UserInterface/Models/CallingContextTree.js:
(WebInspector.CallingContextTree.prototype.get totalExecutionTime): Deleted.
(WebInspector.CallingContextTree.prototype.reset): Deleted.
(WebInspector.CallingContextTree.prototype.increaseExecutionTime): Deleted.
Remove unused totalExecutionTime.
2016-03-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Calculate more accurate time per-sample instead of assuming 1ms
https://bugs.webkit.org/show_bug.cgi?id=155961
<rdar://problem/25404505>
Reviewed by Geoffrey Garen.
Give each sample a duration based on the best time bounds we have available.
Script Profiler Events give us time bounds for (nearly) all script evaluations.
The only evaluations that are missed are Inspector scripts.
The duration per-sample is computed per-event:
durationPerSample = (event.endTime - event.startTime) / numSamplesInTimeRange.
If a 10ms Script Event contains 5 samples, they would each get a 2ms duration.
If a 0.5ms Script Event contains 1 sample, it would get a 0.5ms duration.
We were seeing an average of 1.6-1.8ms per sample for events that had more
than 3 samples.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
Associate a time duration per sample. For each Script Event we compute
an average time for all the samples in the event and assign it to the sample.
* UserInterface/Models/CallingContextTree.js:
(WebInspector.CallingContextTree.prototype.totalDurationInTimeRange):
(WebInspector.CallingContextTree.prototype.numberOfSamplesInTimeRange): Deleted.
Accumulate the duration by checking each sample. Number of samples
is now meaningless.
(WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
(WebInspector.CCTNode):
(WebInspector.CCTNode.prototype.addTimestampAndExpressionLocation):
Give CCTNodes a list of durations and leafDurations that parallels
the timestamps and leafTimestamps lists of individual samples.
(WebInspector.CCTNode.prototype.filteredTimestampsAndDuration):
(WebInspector.CCTNode.prototype.filteredLeafTimestampsAndDuration):
(WebInspector.CCTNode.prototype.filteredTimestamps): Deleted.
(WebInspector.CCTNode.prototype.numberOfLeafTimestamps): Deleted.
Whenever we get a list of timestamps, also compute the duration
of those timestamps at the same time.
* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode):
(WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
(WebInspector.ProfileDataGridNode.prototype._recalculateData):
* UserInterface/Views/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridTree):
(WebInspector.ProfileDataGridTree.prototype.get totalSampleTime):
(WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
(WebInspector.ProfileDataGridTree.prototype.get sampleInterval): Deleted.
(WebInspector.ProfileDataGridTree.prototype.get numberOfSamples): Deleted.
Instead of computing total time from (samples * sampleInterval),
accumulate it by adding up the duration of each individual sample.
Update the Profile Data Grid nodes to use the new calculations.
2016-03-29 Dana Burkart and Matthew Hanson <dburkart@apple.com>
Web Inspector: JS PrettyPrinting in do/while loops, "while" should be on the same line as "}" if there was a closing brace
https://bugs.webkit.org/show_bug.cgi?id=117616
<rdar://problem/15796884>
Reviewed by Joseph Pecoraro.
This patch fixes the formatting of do / while loops in the WebInspector CodeFormatter.
Before:
do {
"x"
}
while (0);
After:
do {
"x"
} while (0);
* UserInterface/Views/CodeMirrorFormatters.js:
(shouldHaveSpaceBeforeToken):
If we encounter a while token and the last token was a closing brace, we *should* add a space if that closing
brace was closing a do block.
(removeLastNewline):
If we encounter a while token and the last token was a closing brace, we *should not* add a newline if that closing
brace closes a do block.
(modifyStateForTokenPre):
We should keep track of the last token that we encountered before entering into a block. We do this by setting
a lastContentBeforeBlock property on openBraceStartMarker / state objects.
In addition, this fixes a bug where we do not pop a state object off of openBraceStartMarkers if our indentCount
is 0. Without doing this, we cannot reliably determine whether or not our while token needs to be inline or not.
2016-03-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION: ⌘E and ⌘G text searching does not work
https://bugs.webkit.org/show_bug.cgi?id=155981
<rdar://problem/25418983>
Reviewed by Timothy Hatcher.
Disable the unused find banner in the RecordingContentView's
ContentBrowser. This is a workaround for the background tab
thinking it is visible, but still useful since the find
banner wouldn't be used in the TimelineContentView anyways so
can avoid being created.
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
Add a construction option to not create a FindBanner.
(WebInspector.ContentBrowser.prototype.handleFindEvent):
(WebInspector.ContentBrowser.prototype.shown):
(WebInspector.ContentBrowser.prototype.hidden):
(WebInspector.ContentBrowser.prototype._contentViewNumberOfSearchResultsDidChange):
(WebInspector.ContentBrowser.prototype._updateFindBanner):
Handle when we don't have a find banner.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Do not create a FindBanner in the RecordingContentView.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
This global content browser can also avoid creating a FindBanner.
2016-03-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: We should have a way to capture heap snapshots programatically.
https://bugs.webkit.org/show_bug.cgi?id=154407
<rdar://problem/24726292>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Protocol/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.heapSnapshot):
(WebInspector.ConsoleObserver):
Create a HeapSnapshot with an optional title and add to the timeline.
(WebInspector.HeapAllocationsTimelineDataGridNode):
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.displayNameForRecord):
Share code for snapshot display names which may now include a title.
* UserInterface/Proxies/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProxy):
(WebInspector.HeapSnapshotProxy.deserialize):
(WebInspector.HeapSnapshotProxy.prototype.get title):
* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot):
(HeapSnapshot.prototype.serialize):
* UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
(HeapSnapshotWorker.prototype.createSnapshot):
Include an optional title in a HeapSnapshot.
2016-03-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Ensure maximum accuracy while profiling
https://bugs.webkit.org/show_bug.cgi?id=155809
<rdar://problem/25325035>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New strings.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager):
When starting the inspector, if it was previously closed while
breakpoints were temporarily disabled, restore the correct
breakpoints enabled state.
(WebInspector.DebuggerManager.prototype.set breakpointsEnabled):
Warn if we ever try to enable breakpoints during timeline recordings.
(WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
(WebInspector.DebuggerManager.prototype.startDisablingBreakpointsTemporarily):
(WebInspector.DebuggerManager.prototype.stopDisablingBreakpointsTemporarily):
Method to start/stop temporarily disabling breakpoints.
(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
(WebInspector.DebuggerManager.prototype._setBreakpoint):
When temporarily disabling breakpoints avoid the convenience behavior of
enabling all breakpoints when enabling or setting a single breakpoint.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.startCapturing):
Emit a will start capturing event to do work before enabling instruments.
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .timeline-recording-warning):
(.sidebar > .panel.navigation.debugger .timeline-recording-warning > a):
Styles for a warning section in the Debugger Sidebar when the Debugger
is temporarily disabled due to a Timeline recording.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingWillStart):
(WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingStopped):
Modify the Debugger state and UI before and after a Timeline recording.
2016-03-28 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Use font-variant-numeric: tabular-nums instead of -apple-system-monospaced-numbers
https://bugs.webkit.org/show_bug.cgi?id=155826
<rdar://problem/25330631>
Reviewed by Myles C. Maxfield.
* UserInterface/Views/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-linenumber):
* UserInterface/Views/DataGrid.css:
(.data-grid td):
* UserInterface/Views/DefaultDashboardView.css:
(.toolbar .dashboard.default > .item):
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-name):
2016-03-28 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Add font-variant-numeric to CSS autocompletions
https://bugs.webkit.org/show_bug.cgi?id=155941
<rdar://problem/25381735>
Reviewed by Timothy Hatcher.
Also, remove -apple-system-monospaced-numbers.
`font-variant-numeric: tabular-nuns` should be used instead.
* UserInterface/Models/CSSKeywordCompletions.js:
2016-03-28 Matt Baker <mattbaker@apple.com>
REGRESSION (r195303): Web Inspector: Wrong indentation in the type coverage profiler popovers
https://bugs.webkit.org/show_bug.cgi?id=155930
<rdar://problem/25377042>
Reviewed by Timothy Hatcher.
Increased specificity of TypeTreeView CSS selectors, and added new
overrides for rules made global by r195303, which don't apply to the
TypeTreeView's or its tree elements.
* UserInterface/Views/TypeTreeElement.css:
(.item.type-tree-element):
(.item.type-tree-element > .titles):
(.item.type-tree-element > .disclosure-button):
(.item.type-tree-element.parent > .disclosure-button):
(.item.type-tree-element.parent.expanded > .disclosure-button):
(.item.type-tree-element > .icon):
(.item.type-tree-element.prototype):
(.item.type-tree-element.prototype:focus):
(.item.type-tree-element.prototype + ol):
(.type-tree-element): Deleted.
(.type-tree-element > .titles): Deleted.
(.type-tree-element > .disclosure-button): Deleted.
(.type-tree-element.parent > .disclosure-button): Deleted.
(.type-tree-element.parent.expanded > .disclosure-button): Deleted.
(.type-tree-element > .icon): Deleted.
(.type-tree-element.prototype): Deleted.
(.type-tree-element.prototype:focus): Deleted.
(.type-tree-element.prototype + ol): Deleted.
* UserInterface/Views/TypeTreeView.css:
(.tree-outline.type li):
* UserInterface/Views/TypeTreeView.js:
(WebInspector.TypeTreeView):
Use custom indentation.
2016-03-28 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Large repaints while typing in the console tab
https://bugs.webkit.org/show_bug.cgi?id=155627
<rdar://problem/25234875>
Reviewed by Timothy Hatcher.
Specify the height of flexbox elements to reduce repaint areas.
* UserInterface/Views/Main.css:
(#navigation-sidebar):
(#content): z-index doesn't affect repaint areas once the height is set.
(#details-sidebar):
2016-03-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Sometimes clearing focused nodes in ProfileView leaves a dangling call stack that can never be removed
https://bugs.webkit.org/show_bug.cgi?id=155915
Reviewed by Timothy Hatcher.
* UserInterface/Views/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridTree.prototype.addFocusNode):
(WebInspector.ProfileDataGridTree.prototype.rollbackFocusNode):
(WebInspector.ProfileDataGridTree.prototype.clearFocusNodes):
(WebInspector.ProfileDataGridTree.prototype._focusChanged):
(WebInspector.ProfileDataGridTree.prototype._saveFocusedNodeOriginalParent):
(WebInspector.ProfileDataGridTree.prototype._restoreFocusedNodeToOriginalParent):
Be a little more explicit about saving and resotring nodes.
When restoring, work around a DataGrid issue by temporarily
collapsing and expanding the part of the node we are being
reattached to. This is a cheap workaround for an otherwise
complex DataGrid / DataGridTree issue.
2016-03-25 Matt Baker <mattbaker@apple.com>
Web Inspector: Clicking a result in Quick Open dialog dismisses the dialog, does nothing
https://bugs.webkit.org/show_bug.cgi?id=155892
<rdar://problem/25361220>
Reviewed by Timothy Hatcher.
* UserInterface/Views/OpenResourceDialog.js:
(WebInspector.OpenResourceDialog):
Allow repeat selection so clicking a selected element makes a selection
and dismisses the dialog.
(WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
Suppress select and deselect. Only user clicks should cause a selection event.
(WebInspector.OpenResourceDialog.prototype._handleBlurEvent):
Prevent the dialog from being dismissed before tree item selection occurs.
(WebInspector.OpenResourceDialog.prototype._treeSelectionDidChange):
Set the represented object (dialog result) and dismiss.
2016-03-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r198619.
https://bugs.webkit.org/show_bug.cgi?id=155902
Switching to Console tab sometimes results in blank tab.
(Requested by JoePeck on #webkit).
Reverted changeset:
"Web Inspector: Large repaints while typing in the console
tab"
https://bugs.webkit.org/show_bug.cgi?id=155627
http://trac.webkit.org/changeset/198619
2016-03-25 Matt Baker <mattbaker@apple.com>
Web Inspector: Scrolling/selection is broken in Quick Open dialog resource tree
https://bugs.webkit.org/show_bug.cgi?id=155877
<rdar://problem/25356149>
Reviewed by Timothy Hatcher.
Dialog and tree outline now use "display: flex", causing the height of the
tree outline to be based on the height of the dialog. Overflow scrolling
in the tree outline now has the expected behavior.
* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog):
(.open-resource-dialog > .tree-outline):
2016-03-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reduce forced layouts
https://bugs.webkit.org/show_bug.cgi?id=155852
<rdar://problem/25345197>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.layout):
(WebInspector.DataGrid.prototype._positionResizerElements):
(WebInspector.DataGrid.prototype._positionHeaderViews):
In loops, force layout once, calculate values, then set styles.
* UserInterface/Views/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem):
(WebInspector.RadioButtonNavigationItem.prototype.updateLayout):
Force layout once to calculate the min-width, then never again.
2016-03-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Open Resource Dialog should not system beep when using Enter to select an item
https://bugs.webkit.org/show_bug.cgi?id=155853
Reviewed by Timothy Hatcher.
* UserInterface/Views/OpenResourceDialog.js:
(WebInspector.OpenResourceDialog.prototype._handleKeydownEvent):
Prevent default when handling Enter with a selected result.
2016-03-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Miscellaneous performance fixes in Timeline recording
https://bugs.webkit.org/show_bug.cgi?id=155832
Reviewed by Timothy Hatcher.
* UserInterface/Models/CallingContextTree.js:
(WebInspector.CCTNode.prototype.hasChildren):
No need to allocate an array with all of the properties, we can just
check if there is at least one property using a short circuit for..in.
Performance was always faster for empty, small, and large objects
in micro benchmarks.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.layout):
Avoid causing DOM layout when positioning resizers. They only need
a layout if we are resizing the DataGrid, or the initial layout.
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar):
(WebInspector.NavigationBar.prototype.needsLayout):
(WebInspector.NavigationBar.prototype.layout):
Avoid causing DOM layout every View layout. In fact, only do a
DOM layout when someone has triggered a needsLayout on this
navigation bar. A basic dirty layout (triggered by a parent)
should not have caused us to resize.
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
* UserInterface/Views/LayoutTimelineOverviewGraph.js:
(WebInspector.LayoutTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WebInspector.MemoryTimelineOverviewGraph.prototype.reset):
(WebInspector.MemoryTimelineOverviewGraph.prototype._updateLegend):
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
Avoid doing any work in non-visible graphs. This was very common
because the RenderingFrameTimelineOverviewGraph is never visible
when the other timeline graphs are, but was performing lots of work.
* UserInterface/Views/MemoryCategoryView.js:
(WebInspector.MemoryCategoryView.prototype.clear):
(WebInspector.MemoryCategoryView.prototype._updateDetails):
(WebInspector.MemoryCategoryView):
* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype.reset):
(WebInspector.MemoryTimelineView.prototype._updateUsageLegend):
(WebInspector.MemoryTimelineView.prototype._updateMaxComparisonLegend):
Cache values to avoid textContent calls even if the content did not change.
This reduces unnecessary work when the values wouldn't change.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.createCombinedBars):
(WebInspector.TimelineRecordBar.prototype.set records):
Revert to fast loop and as this code path is very hot and for..of iteration
was showing up in profiles. Remove assert which seems rather pointless but
showed up in profiles.
2016-03-24 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Large repaints while typing in the console tab
https://bugs.webkit.org/show_bug.cgi?id=155627
<rdar://problem/25234875>
Reviewed by Timothy Hatcher.
Use a `position: absolute` workaround to reduce large repaint areas caused by flexbox.
* UserInterface/Views/LogContentView.css:
(body.selected-tab-console #content):
This selector must only affect the console tab as it breaks sidebars in other tabs.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._tabBarItemSelected):
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype.set selectedTabBarItem):
Add "selected-tab-console" class to <body> when the console tab is selected.
2016-03-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timeline range selection changes with ProfileView should not cause navigation bar items to flicker
https://bugs.webkit.org/show_bug.cgi?id=155834
Reviewed by Timothy Hatcher.
* UserInterface/Views/ProfileView.js:
(WebInspector.ProfileView.prototype._recreate):
The only reason our selection path components would change is if we
had focus nodes before and do not anymore.
2016-03-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Allow clicking the Timeline in Editing Mode to toggle the checkbox
https://bugs.webkit.org/show_bug.cgi?id=155815
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._startEditingInstruments):
Remove unused variable.
* UserInterface/Views/TimelineTreeElement.js:
(WebInspector.TimelineTreeElement.prototype.onattach):
(WebInspector.TimelineTreeElement.prototype._clickHandler):
Make clicking on the tree element toggle the checkbox.
2016-03-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timeline Tab sometimes restores as blank
https://bugs.webkit.org/show_bug.cgi?id=155811
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype.restoreFromCookie):
When early bailing in restore, if there is no content view to restore,
then at least fallback to showing the Overview.
2016-03-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION: Timeline Reset does not clear datagrids
https://bugs.webkit.org/show_bug.cgi?id=155804
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.shown):
(WebInspector.HeapAllocationsTimelineView.prototype.hidden):
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
(WebInspector.HeapAllocationsTimelineView.prototype.reset):
Although we don't use the popover features of TimelineDataGrid,
be a good citizen and call methods on the datagrid.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.reset):
Clear the datagrid on reset.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.reset):
Clear the datagrid on reset.
2016-03-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught exceptions closing Timeline tab
https://bugs.webkit.org/show_bug.cgi?id=155805
Reviewed by Timothy Hatcher.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
Gracefully handle if there is no content view.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.closed): Deleted.
Fix typo.
2016-03-23 Matt Baker <mattbaker@apple.com>
Web Inspector: Quick Open dialog has fuzzy icons at 1x
https://bugs.webkit.org/show_bug.cgi?id=155557
<rdar://problem/25200217>
Reviewed by Timothy Hatcher.
New resource icons (documents and clippings) for large tree items,
for use in the Quick Open dialog's tree outline.
* UserInterface/Images/ClippingCSSLarge.png: Added.
* UserInterface/Images/ClippingCSSLarge@2x.png: Added.
* UserInterface/Images/ClippingGenericLarge.png: Added.
* UserInterface/Images/ClippingGenericLarge@2x.png: Added.
* UserInterface/Images/ClippingJSLarge.png: Added.
* UserInterface/Images/ClippingJSLarge@2x.png: Added.
* UserInterface/Images/DocumentCSSLarge.png: Added.
* UserInterface/Images/DocumentCSSLarge@2x.png: Added.
* UserInterface/Images/DocumentFontLarge.png: Added.
* UserInterface/Images/DocumentFontLarge@2x.png: Added.
* UserInterface/Images/DocumentGenericLarge.png: Added.
* UserInterface/Images/DocumentGenericLarge@2x.png: Added.
* UserInterface/Images/DocumentImageLarge.png: Added.
* UserInterface/Images/DocumentImageLarge@2x.png: Added.
* UserInterface/Images/DocumentJSLarge.png: Added.
* UserInterface/Images/DocumentJSLarge@2x.png: Added.
* UserInterface/Images/DocumentMarkupLarge.png: Added.
* UserInterface/Images/DocumentMarkupLarge@2x.png: Added.
32px icons at 1x and 2x.
* UserInterface/Views/ResourceIcons.css:
(.large .resource-icon .icon):
(.large .resource-icon.resource-type-document .icon):
(.large .resource-icon.resource-type-image .icon):
(.large .resource-icon.resource-type-font .icon):
(.large .resource-icon.resource-type-stylesheet .icon):
(.large .resource-icon.resource-type-script .icon):
(.large .anonymous-script-icon .icon):
(.large .source-map-resource.resource-icon .icon):
(.large .source-map-resource.resource-icon.resource-type-stylesheet .icon):
(.large .source-map-resource.resource-icon.resource-type-script .icon):
Large icon styles.
2016-03-22 Timothy Hatcher <timothy@apple.com>
Web Inspector: String double quoting in the console and elsewhere needs to escape backslash too
https://bugs.webkit.org/show_bug.cgi?id=155752
rdar://problem/25293141
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Utilities.js:
(doubleQuotedString): Escape backslashes too.
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createLinkifiedElementString): Ditto.
2016-03-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION: Switching Timelines via Path Component does not work
https://bugs.webkit.org/show_bug.cgi?id=155767
<rdar://problem/25298945>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._timelinePathComponentSelected):
(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
2016-03-22 Timothy Hatcher <timothy@apple.com>
Web Inspector: Consider Automation script names as internal and hide them
https://bugs.webkit.org/show_bug.cgi?id=155753
rdar://problem/25293310
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Utilities.js:
(isWebKitInternalScript): Renamed from isWebInspectorDebugScript.
Check for "__Web" prefix and "__" suffix.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
(WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange):
Renamed _inspectorDebugScripts to _internalWebKitScripts. And renamed
isWebInspectorDebugScript to isWebKitInternalScript.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Renamed isWebInspectorDebugScript to isWebKitInternalScript.
2016-03-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION: Shift + Click on record button should create a new recording
https://bugs.webkit.org/show_bug.cgi?id=155763
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._recordButtonClicked):
Use the shiftKey from the DOM Event.
2016-03-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Switching Away and Back to Timelines Tab may select a different Timeline
https://bugs.webkit.org/show_bug.cgi?id=155742
<rdar://problem/25284330>
Reviewed by Timothy Hatcher.
When switching to the Timeline tab, or switching recordings within the
the Timeline tab, the TimelineTabContentView does work to correctly
save/restore its view state.
When switching to the Timeline tab, the TimelineTabContentView correctly
restores the state of the tab, but when showing the RecordingContentView
the RecordingContentView restores its state from a stale cookie.
Since TimelineTabContentView already seems to handle correctly restoring
RecordingContentViews on its own. Removing the RecordingContentView's
implementation of save/restore made everything work as expected.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie): Deleted.
(WebInspector.TimelineRecordingContentView.prototype.restoreFromCookie): Deleted.
2016-03-22 Matt Baker <mattbaker@apple.com>
Web Inspector: remove the remaining TimelineSidebarPanel references
https://bugs.webkit.org/show_bug.cgi?id=155765
<rdar://problem/25296980>
Reviewed by Timothy Hatcher.
Remove dead code from TimelineView and TimelineTabContentView.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
(WebInspector.OverviewTimelineView.prototype.showContentViewForTreeElement): Deleted.
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
(WebInspector.RenderingFrameTimelineView.prototype.showContentViewForTreeElement): Deleted.
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
(WebInspector.ScriptDetailsTimelineView.prototype.showContentViewForTreeElement): Deleted.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView):
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.canShowContentViewForTreeElement): Deleted.
(WebInspector.TimelineView.prototype.showContentViewForTreeElement): Deleted.
2016-03-22 Matt Baker <mattbaker@apple.com>
Web Inspector: Timelines UI redesign: Provide a way to configure which instruments to use
https://bugs.webkit.org/show_bug.cgi?id=153672
<rdar://problem/24417575>
Reviewed by Timothy Hatcher.
Adds UI for configuring a timeline recording's instrument list. TimelineManager
maintains the list of supported timeline types, and tracks the subset
of user-configured timelines which are used to create the instrument list
that is passed to new recordings.
* Localizations/en.lproj/localizedStrings.js:
New strings for "Edit" Timelines button.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
Added setting for user-configured (enabled) timeline types.
Initialized to the default timeline types.
(WebInspector.TimelineManager.defaultTimelineTypes):
(WebInspector.TimelineManager.availableTimelineTypes):
Get the list of all supported timeline types, which is a superset
of the list of default timeline types.
(WebInspector.TimelineManager.prototype.get enabledTimelineTypes):
(WebInspector.TimelineManager.prototype.set enabledTimelineTypes):
List of user-configured timeline types, backed by a Setting.
(WebInspector.TimelineManager.prototype._loadNewRecording):
Create new recordings with the current user-configured instrument list.
(WebInspector.TimelineManager.defaultInstruments): Deleted.
Renamed defaultTimelineTypes.
* UserInterface/Main.html:
New class, TimelineTreeElement.
* UserInterface/Models/Instrument.js:
(WebInspector.Instrument.createForTimelineType):
Factory method for creating Instruments.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
Replace fixed instrument list with TimelineManager's list.
(WebInspector.TimelineRecording.prototype.instrumentForTimeline):
Get the instrument in the recording for a given timeline.
(WebInspector.TimelineRecording.prototype.addInstrument):
(WebInspector.TimelineRecording.prototype.removeInstrument):
Drive-by syntax error fixes: Array.prototype.contains doesn't exist.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > .navigation-bar.timelines):
(.navigation-bar.timelines .item.button.toggle-edit-instruments:not(.disabled):matches(:focus, .activate.activated, .radio.selected)):
(.navigation-bar.timelines .item.button.toggle-edit-instruments:not(.disabled):active:matches(:focus, .activate.activated, .radio.selected)):
(.navigation-bar.timelines .item.button.toggle-edit-instruments.disabled):
(.navigation-bar.timelines .toggle-edit-instruments:not(.disabled):active):
(.timeline-overview > .tree-outline.timelines):
(.timeline-overview.edit-instruments > .tree-outline.timelines):
(.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
(.timeline-overview > .tree-outline.timelines input[type=checkbox].status-button):
(.timeline-overview.frames > :matches(.tree-outline.timelines, .navigation-bar.timelines)):
(.timeline-overview > .tree-outline.timelines::before): Deleted.
(.timeline-overview.frames > .tree-outline.timelines): Deleted.
Styles for the "Edit" navigation bar above the timelines tree outline,
and tree element styles for showing checkboxes and hiding the current
selection while in edit mode.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Create "Edit" button and navigation bar and add event handlers for
capturing events, so that timeline editing can be closed and
disabled when capturing begins.
(WebInspector.TimelineOverview.prototype.set selectedTimeline):
Prevent timeline selection while in edit mode.
(WebInspector.TimelineOverview.prototype.get editingInstruments):
(WebInspector.TimelineOverview.prototype.set viewMode):
Prevent view mode change while in edit mode.
(WebInspector.TimelineOverview.prototype._instrumentAdded):
Create a TimelineTreeElement, and insert into the tree outline and graph
container in sorted order instead of appending timeline elements.
(WebInspector.TimelineOverview.prototype._toggleEditingInstruments):
Handler for Edit button click event.
(WebInspector.TimelineOverview.prototype._editingInstrumentsDidChange):
Update UI in response to editing mode change: toggle CSS, enable/disable
the timeline ruler and wheel/gesture events, and update Edit button appearance.
(WebInspector.TimelineOverview.prototype._updateEditInstrumentsButton):
Update label text and button state.
(WebInspector.TimelineOverview.prototype._updateWheelAndGestureHandlers):
Add/remove event handlers based on editing state.
(WebInspector.TimelineOverview.prototype._startEditingInstruments):
Enable edit mode UI. Placeholder elements are added for timelines that
aren't included in the recording, and all tree elements have checkboxes
for toggling their associated timelines.
(WebInspector.TimelineOverview.prototype._stopEditingInstruments):
Disable edit mode UI. Unchecked instruments are first removed from the
recording, then placeholder tree elements are removed, and their instruments
added, as needed. TimelineManager's list of user-configured timeline types
is then updated.
(WebInspector.TimelineOverview.prototype._capturingStarted):
(WebInspector.TimelineOverview.prototype._capturingStopped):
Enable/disable the Edit button. Quit editing mode when capturing starts.
(WebInspector.TimelineOverview.prototype._compareTimelineTreeElements):
Special sorting for the timelines tree outline. The sort order is:
1. Instruments that are in the recording, except Rendering Frames.
2. Instruments that aren't in the recording (placeholders).
3. Rendering Frames.
Timelines in groups 1 & 2 are sorted based on the order of the list returned
by TimelineManager.availableTimelineTypes(). The Rendering Frames tree
element must be last, since it's always hidden and would otherwise interfere
with the alternating tree element CSS styles.
* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording.edit-instruments > .timeline-overview):
(.content-view.timeline-recording.edit-instruments > .content-browser):
Hide lower content browser and extend timelines tree height in edit mode.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Listen for edit mode changes on TimelineOverview.
(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
When in edit mode, remove inline style rule for TimelineOverview height.
(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
(WebInspector.TimelineRecordingContentView.prototype._editingInstrumentsDidChange):
Update CSS and TimelineOverview height when edit mode changes.
(WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight): Deleted.
No longer used.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.displayNameForTimelineType):
(WebInspector.TimelineTabContentView.iconClassNameForTimelineType):
(WebInspector.TimelineTabContentView.genericClassNameForTimelineType):
(WebInspector.TimelineTabContentView.displayNameForTimeline): Deleted.
(WebInspector.TimelineTabContentView.iconClassNameForTimeline): Deleted.
(WebInspector.TimelineTabContentView.genericClassNameForTimeline): Deleted.
Helper functions now take a timeline type instead of a timeline object.
* UserInterface/Views/TimelineTreeElement.js: Added.
New tree element class to encapsulate behavior specific to the timelines
tree outline, such as status element changes and disabling selection
when editing.
(WebInspector.TimelineTreeElement):
(WebInspector.TimelineTreeElement.prototype.get placeholder):
(WebInspector.TimelineTreeElement.prototype.get editing):
(WebInspector.TimelineTreeElement.prototype.set editing):
(WebInspector.TimelineTreeElement.prototype._showCloseButton):
(WebInspector.TimelineTreeElement.prototype._showCheckbox):
(WebInspector.TimelineTreeElement.prototype._updateStatusButton):
2016-03-21 Matt Baker <mattbaker@apple.com>
Web Inspector: New icon for Heap Allocations timeline
https://bugs.webkit.org/show_bug.cgi?id=155731
<rdar://problem/25275494>
Reviewed by Joseph Pecoraro and Timothy Hatcher.
* UserInterface/Images/HeapAllocationsInstrument.svg: Added.
New artwork from Jon Davis.
* UserInterface/Views/TimelineIcons.css:
(.heap-allocations-icon .icon):
(body:not(.mac-platform, .windows-platform) .memory-icon .icon):
(body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon):
New icon styles/fallbacks for GTK.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.iconClassNameForTimeline):
Add new icon class to UI helper method.
2016-03-20 Dan Bernstein <mitz@apple.com>
[Mac] Determine TARGET_MAC_OS_X_VERSION_MAJOR from MACOSX_DEPLOYMENT_TARGET rather than from MAC_OS_X_VERSION_MAJOR
https://bugs.webkit.org/show_bug.cgi?id=155707
<rdar://problem/24980691>
Reviewed by Darin Adler.
* Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
component of MACOSX_DEPLOYMENT_TARGET.
* Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.
2016-03-20 Dan Bernstein <mitz@apple.com>
Update build settings
Rubber-stamped by Andy Estes.
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
2016-03-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Bullet misaligned when expanding console log message
https://bugs.webkit.org/show_bug.cgi?id=155669
<rdar://problem/25250721>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree):
(.object-tree .object-tree): Deleted.
Make object tree's inline-block again.
* UserInterface/Views/ConsoleMessageView.css:
(.console-top-level-message .object-tree):
(.console-top-level-message .object-tree .object-tree):
Since the Console is the only place that requires a non-inline-block
object-tree, and only at the top level, have the console override
the styles of object trees as it needs.
2016-03-18 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode')
https://bugs.webkit.org/show_bug.cgi?id=155671
<rdar://problem/25249401>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._sort):
2016-03-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Fix ObjectTree Map styling, key/value look cramped
https://bugs.webkit.org/show_bug.cgi?id=155668
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.tree-outline .item.object-tree-array-index):
* UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
(.tree-outline .item.object-tree-map-entry):
When creating generic tree outline styles generic object tree
styles were getting overriden by generic tree outline styles
with higher specificity.
2016-03-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timeline reset issues after Navigation Sidebar removal
https://bugs.webkit.org/show_bug.cgi?id=155658
<rdar://problem/25245292>
Reviewed by Timothy Hatcher.
* UserInterface/Views/CircleChart.js:
(WebInspector.CircleChart.prototype.set values):
If the segments have never been set the values list will be empty.
Allow clearing to set empty values again.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
(WebInspector.ScriptClusterTimelineView):
Timeline sidebar no longer exists. Replace with the common
FIXME added to the other TimelineViews.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.reset):
Timeline sidebar and content tree outline no longer exist.
Replace with the common comment indicating this method
is intended for subclasses.
2016-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION (r197724): [GTK] Web Inspector: Images being blocked by CSP 2.0
https://bugs.webkit.org/show_bug.cgi?id=155432
Reviewed by Daniel Bates.
Allow Web Inspector to load resource: image resources.
* UserInterface/Main.html:
2016-03-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Prefer retained size to the shallow size in Heap Snapshot data grids
https://bugs.webkit.org/show_bug.cgi?id=155597
<rdar://problem/25225087>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New datagrid column and tooltip strings.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.insertColumn):
Allow a column definition to provide a tooltip for the header cell.
* UserInterface/Views/HeapSnapshotClassDataGridNode.js:
(WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
Include retained size column data.
(WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
Fix non-batched populate to sort instances on first population.
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
Include retained size column data.
* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView):
Include a retained size column. Update initial sort and column widths.
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree.buildSortComparator):
Include a numeric sort comparator for the new retained size column.
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
Include retained size, and lazily calculate percentage later.
2016-03-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: HeapSnapshots are slow and use too much memory
https://bugs.webkit.org/show_bug.cgi?id=155571
Reviewed by Timothy Hatcher.
This is the first inclusion of Workers into Web Inspector. In this case
the Main side merely needs to make requests of the Worker and get back
objects that it can interact with more.
New file heirarchies:
UserInterface/Proxies
- new Proxy classes in the Main page.
- treat like Model classes, but not quite model.
UserInterface/Workers/HeapSnapshotWorker
- new Worker classes for Workers. No WebInspector namespace.
- no minification of these resources, they are simply copied.
Remote procedure call interface between the Main/Worker page happens
through the WorkerProxy and Worker classes. There are simple ways
to perform factory style methods and call methods on objects, and
get the result in a callback. Similiar to frontend <-> backend agent
communication:
HeapSnapshotWorkerProxy: (Main world)
- creates the worker
- performAction("actionName", arguments, callback)
- callMethod(objectId, "methodName", arguments, callback)
- handle message => dispatch event or invoke callback
HeapSnapshotWorker: (Worker world)
- sendEvent("eventName", eventData)
- handle message => dispatch action or method on object
Proxy object methods are boilerplate calls to performAction/callMethod
with deserialization of responses. The rest of the frontend can just
treat Proxy objects as Model objects with some data and async methods.
Because the Node/Edge data is so small, objects are cheaply created
when needed and not cached. This means that there may be duplicate
HeapSnapshotNode's for the same node. For example if different Views
both request instancesWithClassName("Foo"). This is fine, as none
of our Views really care about object uniqueness, they are only
interested in the data or querying for more data.
* Scripts/combine-resources.pl:
* Scripts/copy-user-interface-resources.pl:
Copy the Workers directory to the resources directory.
Its code is only meant to be loaded by Workers, so it
shouldn't be included in the Main page.
* UserInterface/Main.html:
* UserInterface/Test.html:
* UserInterface/Models/HeapSnapshot.js: Removed.
* UserInterface/Models/HeapSnapshotDiff.js: Removed.
* UserInterface/Models/HeapSnapshotEdge.js: Removed.
* UserInterface/Models/HeapSnapshotNode.js: Removed.
Replace the old simple Model classes with Proxy classes that interact
with the Worker.
* UserInterface/Models/HeapAllocationsInstrument.js:
(WebInspector.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
(WebInspector.HeapAllocationsInstrument):
* UserInterface/Models/HeapAllocationsTimelineRecord.js:
(WebInspector.HeapAllocationsTimelineRecord):
* UserInterface/Models/HeapSnapshotRootPath.js:
(WebInspector.HeapSnapshotRootPath):
(WebInspector.HeapSnapshotRootPath.prototype.appendEdge):
* UserInterface/Protocol/HeapObserver.js:
(WebInspector.HeapObserver.prototype.trackingStart):
(WebInspector.HeapObserver.prototype.trackingComplete):
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
(WebInspector.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
(WebInspector.HeapAllocationsTimelineView):
* UserInterface/Views/HeapSnapshotClassDataGridNode.js:
(WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
* UserInterface/Views/HeapSnapshotClusterContentView.js:
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode):
(WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.):
(WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.stringifyEdge):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView):
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree):
* UserInterface/Views/HeapSnapshotSummaryContentView.js:
(WebInspector.HeapSnapshotSummaryContentView):
Update existing code to expect the new Proxy objects or create
the new HeapSnapshot using workers.
* UserInterface/Proxies/HeapSnapshotDiffProxy.js: Added.
(WebInspector.HeapSnapshotDiffProxy):
(WebInspector.HeapSnapshotDiffProxy.deserialize):
(WebInspector.HeapSnapshotDiffProxy.prototype.get snapshot1):
(WebInspector.HeapSnapshotDiffProxy.prototype.get snapshot2):
(WebInspector.HeapSnapshotDiffProxy.prototype.get totalSize):
(WebInspector.HeapSnapshotDiffProxy.prototype.get totalObjectCount):
(WebInspector.HeapSnapshotDiffProxy.prototype.get categories):
(WebInspector.HeapSnapshotDiffProxy.prototype.allocationBucketCounts):
(WebInspector.HeapSnapshotDiffProxy.prototype.instancesWithClassName):
(WebInspector.HeapSnapshotDiffProxy.prototype.nodeWithIdentifier):
A HeapSnapshotDiffProxy looks like a HeapSnapshotProxy and responds to
the same methods, but has the extra snapshot1/2 pointers.
* UserInterface/Proxies/HeapSnapshotEdgeProxy.js:
(WebInspector.HeapSnapshotEdgeProxy):
(WebInspector.HeapSnapshotEdgeProxy.deserialize):
Edge data. No methods are proxied at this point.
* UserInterface/Proxies/HeapSnapshotNodeProxy.js: Added.
(WebInspector.HeapSnapshotNodeProxy):
(WebInspector.HeapSnapshotNodeProxy.deserialize):
(WebInspector.HeapSnapshotNodeProxy.prototype.shortestGCRootPath):
(WebInspector.HeapSnapshotNodeProxy.prototype.dominatedNodes):
(WebInspector.HeapSnapshotNodeProxy.prototype.retainedNodes):
(WebInspector.HeapSnapshotNodeProxy.prototype.retainers):
Node data and methods to query for node relationships.
* UserInterface/Proxies/HeapSnapshotProxy.js: Added.
(WebInspector.HeapSnapshotProxy):
(WebInspector.HeapSnapshotProxy.deserialize):
(WebInspector.HeapSnapshotProxy.prototype.get proxyObjectId):
(WebInspector.HeapSnapshotProxy.prototype.get identifier):
(WebInspector.HeapSnapshotProxy.prototype.get totalSize):
(WebInspector.HeapSnapshotProxy.prototype.get totalObjectCount):
(WebInspector.HeapSnapshotProxy.prototype.get categories):
(WebInspector.HeapSnapshotProxy.prototype.allocationBucketCounts):
(WebInspector.HeapSnapshotProxy.prototype.instancesWithClassName):
(WebInspector.HeapSnapshotProxy.prototype.nodeWithIdentifier):
Snapshot data and methods to query for nodes.
* UserInterface/Proxies/HeapSnapshotWorkerProxy.js: Added.
(WebInspector.HeapSnapshotWorkerProxy):
(WebInspector.HeapSnapshotWorkerProxy.singleton):
(WebInspector.HeapSnapshotWorkerProxy.prototype.createSnapshot):
(WebInspector.HeapSnapshotWorkerProxy.prototype.createSnapshotDiff):
(WebInspector.HeapSnapshotWorkerProxy.prototype.performAction):
(WebInspector.HeapSnapshotWorkerProxy.prototype.callMethod):
(WebInspector.HeapSnapshotWorkerProxy.prototype._postMessage):
(WebInspector.HeapSnapshotWorkerProxy.prototype._handleMessage):
Singleton factory for the worker and proxied communication with the worker.
Provide means for invoking "factory actions" and "object methods".
* UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js: Added.
(HeapSnapshotWorker):
(HeapSnapshotWorker.prototype.createSnapshot):
(HeapSnapshotWorker.prototype.createSnapshotDiff):
(HeapSnapshotWorker.prototype.sendEvent):
(HeapSnapshotWorker.prototype._handleMessage):
Main worker code. Handle dispatching actions and methods.
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js: Added.
(HeapSnapshot):
(HeapSnapshot.buildCategories):
(HeapSnapshot.allocationBucketCounts):
(HeapSnapshot.instancesWithClassName):
(HeapSnapshot.prototype.allocationBucketCounts):
(HeapSnapshot.prototype.instancesWithClassName):
(HeapSnapshot.prototype.nodeWithIdentifier):
(HeapSnapshot.prototype.shortestGCRootPath):
(HeapSnapshot.prototype.dominatedNodes):
(HeapSnapshot.prototype.retainedNodes):
(HeapSnapshot.prototype.retainers):
(HeapSnapshot.prototype.serialize):
(HeapSnapshot.prototype.serializeNode):
(HeapSnapshot.prototype.serializeEdge):
(HeapSnapshot.prototype._buildOutgoingEdges):
(HeapSnapshot.prototype._buildIncomingEdges):
(HeapSnapshot.prototype._buildPostOrderIndexes):
(HeapSnapshot.prototype._buildDominatorIndexes):
(HeapSnapshot.prototype._buildRetainedSizes):
(HeapSnapshot.prototype._gcRootPathes.visitNode):
(HeapSnapshot.prototype._gcRootPathes):
(HeapSnapshotDiff):
(HeapSnapshotDiff.prototype.allocationBucketCounts):
(HeapSnapshotDiff.prototype.instancesWithClassName):
(HeapSnapshotDiff.prototype.nodeWithIdentifier):
(HeapSnapshotDiff.prototype.shortestGCRootPath):
(HeapSnapshotDiff.prototype.dominatedNodes):
(HeapSnapshotDiff.prototype.retainedNodes):
(HeapSnapshotDiff.prototype.retainers):
(HeapSnapshotDiff.prototype.serialize):
New HeapSnapshot data processing implementation. Instead of creating
a new object per Node or per Edge create data arrays containing data
per-Node. Operate on these lists of data instead of creating many objects.
2016-03-17 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Large repaints when typing any character in console
https://bugs.webkit.org/show_bug.cgi?id=155387
<rdar://problem/25125720>
Reviewed by Timothy Hatcher.
* UserInterface/Views/Main.css:
(#content):
2016-03-16 Matt Baker <mattbaker@apple.com>
Uncaught Exception: SyntaxError: Invalid regular expression: \ at end of pattern
https://bugs.webkit.org/show_bug.cgi?id=155556
<rdar://problem/25200058>
Reviewed by Timothy Hatcher.
Use simpleGlobStringToRegExp, which returns a valid regular expression
for strings with trailing backslashes, and also provides globbing.
String.escapeForRegExp returns a JS string ending in "\\", which isn't
a valid regular expression.
* UserInterface/Views/OpenResourceDialog.js:
(WebInspector.OpenResourceDialog):
(WebInspector.OpenResourceDialog.prototype._handleMousedownEvent):
Fixed typo.
(WebInspector.OpenResourceDialog.prototype._updateFilter):
Switch to simpleGlobStringToRegExp.
2016-03-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Show path from root to instances in the Heap Snapshot content view
https://bugs.webkit.org/show_bug.cgi?id=155478
<rdar://problem/25157408>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and resources.
* UserInterface/Models/HeapSnapshotNode.js:
(WebInspector.HeapSnapshotNode.prototype.get shortestGCRootPath):
(WebInspector.HeapSnapshotNode.prototype._gcRootPaths.visitNode):
(WebInspector.HeapSnapshotNode.prototype._gcRootPaths):
Helper to get the shortest path from a GC root to the node.
* UserInterface/Models/HeapSnapshotRootPath.js: Added.
(WebInspector.HeapSnapshotRootPath):
(WebInspector.HeapSnapshotRootPath.emptyPath):
(WebInspector.HeapSnapshotRootPath.prototype.get node):
(WebInspector.HeapSnapshotRootPath.prototype.get parent):
(WebInspector.HeapSnapshotRootPath.prototype.get pathComponent):
(WebInspector.HeapSnapshotRootPath.prototype.get rootNode):
(WebInspector.HeapSnapshotRootPath.prototype.get fullPath):
(WebInspector.HeapSnapshotRootPath.prototype.isRoot):
(WebInspector.HeapSnapshotRootPath.prototype.isEmpty):
(WebInspector.HeapSnapshotRootPath.prototype.isGlobalScope):
(WebInspector.HeapSnapshotRootPath.prototype.isPathComponentImpossible):
(WebInspector.HeapSnapshotRootPath.prototype.isFullPathImpossible):
(WebInspector.HeapSnapshotRootPath.prototype.appendInternal):
(WebInspector.HeapSnapshotRootPath.prototype.appendArrayIndex):
(WebInspector.HeapSnapshotRootPath.prototype.appendPropertyName):
(WebInspector.HeapSnapshotRootPath.prototype.appendVariableName):
(WebInspector.HeapSnapshotRootPath.prototype.appendGlobalScopeName):
(WebInspector.HeapSnapshotRootPath.prototype.appendEdge):
(WebInspector.HeapSnapshotRootPath.prototype._canPropertyNameBeDotAccess):
Helper class, like PropertyPath, for building a string path to
a HeapSnapshotNode. Typically the path is built up with
HeapSnapshotEdges and so you can build a string such as:
`window.foo[0]["prop erty"]._foo`.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
(WebInspector.HeapAllocationsTimelineView.prototype.shown):
(WebInspector.HeapAllocationsTimelineView.prototype.hidden):
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
Propogate shown/hidden to the contentViewContainer.
Cleanup the contentViewContainer when closing.
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
Helper for logging a HeapSnapshotNode value to the console. If the
path is possible from the root, just output the path in the console
otherwise use a synthetic "Heap Snapshot Object (@1234)" like string.
For strings, just get the preview as we won't get a real RemoteObject.
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.sanitizeClassName):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.stringifyEdge):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
Give the @1234 id element a mouseover handler to display a popover
with the path from a root. Stop the path at "Window" if possible
to avoid displaying internals like "JSDOMWindowShell".
* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot .object-id):
(.heap-snapshot .object-id:hover):
(.heap-snapshot > .data-grid tr:not(.selected) td .object-id): Deleted.
(.heap-snapshot .icon):
(.heap-snapshot-instance-popover-content):
(.heap-snapshot-instance-popover-content table):
(.heap-snapshot-instance-popover-content tr):
(.heap-snapshot-instance-popover-content td):
(.heap-snapshot-instance-popover-content td.edge-name):
(.heap-snapshot-instance-popover-content td.object-data):
(.heap-snapshot-instance-popover-content .node):
(.heap-snapshot-instance-popover-content .node *):
Styles for contents of the popover.
* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView.prototype.hidden):
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get popover):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get popoverNode):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set popoverNode):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.willDismissPopover):
Have a single popover for the entire tree. Cache and clear
contents of the popover when appropriate.
2016-03-14 Daniel Bates <dabates@apple.com>
Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements
https://bugs.webkit.org/show_bug.cgi?id=155466
<rdar://problem/25152480>
Reviewed by Joseph Pecoraro and Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js: Add English localized string for the CSP hash UI label.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode): Initialize the instance variable this._contentSecurityPolicyHash
with the value passed from the Inspector back end.
(WebInspector.DOMNode.prototype.contentSecurityPolicyHash): Returns the CSP hash for this node.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel): Append a row to the end of section Identity to display
the CSP hash (if applicable).
(WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh): Query the underlying WebInspector.DOMNode
for the CSP hash of the selected node.
2016-03-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION(r197974): HeapAllocationsTimelineView broken, doesn't handle Timeline Sidebar Navigation removal
https://bugs.webkit.org/show_bug.cgi?id=155458
<rdar://problem/25150803>
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
(WebInspector.HeapAllocationsTimelineView.prototype.layout):
(WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
(WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
Update the TimelineView now that there is no sidebar.
Remove any TreeOutline logic and replace with DataGrid logic.
2016-03-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION(r198026): Can't click on Snapshot in Timeline Overview
https://bugs.webkit.org/show_bug.cgi?id=155457
<rdar://problem/25150706>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._handleClick):
The conditional was accidentally inverted in r198026.
2016-03-14 Timothy Hatcher <timothy@apple.com>
Web Inspector: cssmin.py does not handle calc(var(--toolbar-height) + var(--tab-bar-height))
https://bugs.webkit.org/show_bug.cgi?id=155464
rdar://problem/25152196
Reviewed by Joseph Pecoraro.
* Scripts/cssmin.py:
(cssminify): Check for var when stripping spaces around + and -.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._viewModeDidChange):
Drive-by fix to add a missing semi-colon found by the copy-user-interface-resources-dryrun.rb script.
2016-03-14 Joseph Pecoraro <pecoraro@apple.com>
Reduce generated JSON HeapSnapshot size
https://bugs.webkit.org/show_bug.cgi?id=155460
Reviewed by Geoffrey Garen.
* UserInterface/Models/HeapSnapshot.js:
(WebInspector.HeapSnapshot.fromPayload):
Update for the slightly modified format.
2016-03-14 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r198095.
https://bugs.webkit.org/show_bug.cgi?id=155467
Made text look poor (Requested by JoePeck on #webkit).
Reverted changeset:
"Web Inspector: Large repaints when typing any character in
console"
https://bugs.webkit.org/show_bug.cgi?id=155387
http://trac.webkit.org/changeset/198095
2016-03-14 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Reduce unnecessary dashboard repaints
https://bugs.webkit.org/show_bug.cgi?id=155425
<rdar://problem/25138247>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem.):
newText is a number for console message counters.
2016-03-13 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Large repaints when typing any character in console
https://bugs.webkit.org/show_bug.cgi?id=155387
<rdar://problem/25125720>
Reviewed by Timothy Hatcher.
* UserInterface/Views/Main.css:
(#content):
2016-03-13 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Memory timeline pie charts are misaligned when there is no recording
https://bugs.webkit.org/show_bug.cgi?id=155421
Reviewed by Timothy Hatcher.
* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory > .content > .overview):
Removed top padding to match bottom padding.
(.timeline-view.memory .legend > .row):
(.timeline-view.memory .legend):
Moved specified width to prevent unrecorded timelines from having graphs
that are offset horizontally.
2016-03-13 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: REGRESSION: Styles sidebar inline swatches are oddly shaped
https://bugs.webkit.org/show_bug.cgi?id=155410
Reviewed by Timothy Hatcher.
* UserInterface/Views/InlineSwatch.css:
(.inline-swatch):
(.inline-swatch > span):
Added more consistent border-radius with UserInterface/Images/CubicBezier.svg.
* UserInterface/Views/VisualStyleColorPicker.css:
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color):
Made border-radius consistent with the adjacent input field.
2016-03-12 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Convert toolbar and tab bar to position absolute to reduce repaint areas
https://bugs.webkit.org/show_bug.cgi?id=155386
Reviewed by Timothy Hatcher.
Using CSS flexbox causes unnecessary large repaints.
Convert top level elements (.toolbar, .tab-bar, #main)
from flexbox to "position: absolute".
* UserInterface/Views/Main.css:
(#main):
* UserInterface/Views/TabBar.css:
(.tab-bar):
* UserInterface/Views/Toolbar.css:
(.toolbar):
(body.mac-platform:not(.docked, .mavericks) .toolbar):
(body.mac-platform:not(.docked, .mavericks)):
(body.window-inactive:not(.mavericks) .toolbar): Deleted.
* UserInterface/Views/Variables.css:
(:root):
2016-03-11 Matt Baker <mattbaker@apple.com>
Web Inspector: Wrong TimelineOverview height after switching from Events to Frames
https://bugs.webkit.org/show_bug.cgi?id=155366
<rdar://problem/25111028>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
Update the overview height after setting a new view mode.
2016-03-11 Matt Baker <mattbaker@apple.com>
Web Inspector: Make it possible to disable TimelineRuler UI
https://bugs.webkit.org/show_bug.cgi?id=155348
<rdar://problem/25103505>
Reviewed by Timothy Hatcher.
Adds an "enabled" property to TimelineRuler, allowing the selection UI
to be disabled without removing the current selection.
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler.allows-time-range-selection:not(.disabled)):
(.timeline-ruler > .selection-drag):
(.timeline-ruler:not(.disabled) > .selection-drag):
(.timeline-ruler:not(.disabled) > .selection-drag:active):
(.timeline-ruler.disabled > .selection-handle):
(.timeline-ruler.allows-time-range-selection): Deleted.
(.timeline-ruler > .selection-drag:active): Deleted.
Updated ruler styles for "disabled" state: pointer events are disabled,
selection handles hidden, and the default cursor is shown.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler):
(WebInspector.TimelineRuler.prototype.get enabled):
(WebInspector.TimelineRuler.prototype.set enabled):
New property.
(WebInspector.TimelineRuler.prototype._handleClick):
Corrected code which always reset the pointer events to "all", instead
of setting it back to the original value.
2016-03-10 Daniel Strokis <dstrokis@icloud.com>
Web Inspector: color swatch and border are misaligned in Visual Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=154471
Reviewed by Timothy Hatcher.
Color swatches in the Visual Styles sidebar now have only their left corners rounded (thanks to Matt Baker for the idea).
* UserInterface/Views/InlineSwatch.css:
(.inline-swatch > span):
(.inline-swatch): Deleted.
* UserInterface/Views/VisualStyleColorPicker.css:
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color):
2016-03-10 Matt Baker <mattbaker@apple.com>
Web Inspector: Timelines UI redesign: remove navigation sidebar
https://bugs.webkit.org/show_bug.cgi?id=153036
<rdar://problem/24195627>
Reviewed by Timothy Hatcher.
Removed TimelineView methods used by the sidebar to setup the content tree
outline and handle tree element events, which are no longer used. Tree elements
are no longer created by TimelineViews as records are processed.
* UserInterface/Main.html:
Removed files.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
Removed tree outline event listeners and data grid parameter.
(WebInspector.LayoutTimelineView.prototype._processPendingRecords):
(WebInspector.LayoutTimelineView.prototype._dataGridFiltersDidChange):
(WebInspector.LayoutTimelineView.prototype._hoveredOrSelectedRecord):
Get record from data grid node instead of tree element.
(WebInspector.LayoutTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
(WebInspector.LayoutTimelineView.prototype._mouseOverTreeOutline): Deleted.
(WebInspector.LayoutTimelineView.prototype._mouseLeaveTreeOutline): Deleted.
No longer needed, highlighting performed by data grid event handlers.
* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
No longer needed.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._updateFilter): Deleted.
Removed hack which was specific to TimelineSidebarPanel.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
Removed sidebar styles and tree outline data grid parameter.
(WebInspector.NetworkTimelineView.prototype._processPendingRecords):
(WebInspector.NetworkTimelineView.prototype._dataGridFiltersDidChange):
(WebInspector.NetworkTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
(WebInspector.NetworkTimelineView.prototype.treeElementSelected): Deleted.
No longer needed.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.get selectionPathComponents):
(WebInspector.OverviewTimelineView.prototype.dataGridNodePathComponentSelected):
Create path components from the grid selection. This should have been
included in https://webkit.org/b/154954.
(WebInspector.OverviewTimelineView.prototype._compareDataGridNodesByStartTime.getStartTime):
(WebInspector.OverviewTimelineView.prototype._compareDataGridNodesByStartTime):
(WebInspector.OverviewTimelineView.prototype._insertDataGridNode):
(WebInspector.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
(WebInspector.OverviewTimelineView.prototype._addSourceCodeTimeline):
Refactored to accept grid nodes instead of tree elements.
(WebInspector.OverviewTimelineView.prototype._processPendingRepresentedObjects):
(WebInspector.OverviewTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
(WebInspector.OverviewTimelineView.prototype.shown):
(WebInspector.OverviewTimelineView.prototype.treeElementPathComponentSelected): Deleted.
(WebInspector.OverviewTimelineView.prototype._compareTreeElementsByDetails): Deleted.
Not used anywhere.
(WebInspector.OverviewTimelineView.prototype._compareTreeElementsByStartTime.getStartTime): Deleted.
(WebInspector.OverviewTimelineView.prototype._compareTreeElementsByStartTime): Deleted.
(WebInspector.OverviewTimelineView.prototype._insertTreeElement): Deleted.
(WebInspector.OverviewTimelineView.prototype._addResourceToTreeIfNeeded): Deleted.
Reimplemented as _compareDataGridNodesByStartTime, _insertDataGridNode and _addResourceToDataGridIfNeeded.
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
Removed sidebar styles and tree outline data grid parameter.
(WebInspector.RenderingFrameTimelineView.prototype.get selectionPathComponents):
(WebInspector.RenderingFrameTimelineView.prototype.dataGridNodePathComponentSelected):
Create path components from the grid selection. This should have been
included in https://webkit.org/b/154954.
(WebInspector.RenderingFrameTimelineView.prototype._processPendingRecords):
(WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
(WebInspector.RenderingFrameTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
(WebInspector.RenderingFrameTimelineView.prototype.treeElementDeselected): Deleted.
(WebInspector.RenderingFrameTimelineView.prototype.treeElementSelected): Deleted.
(WebInspector.RenderingFrameTimelineView.prototype.treeElementPathComponentSelected): Deleted.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView):
Don't hold reference to extraArguments, just pass to subviews.
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView):
Removed sidebar styles and tree outline data grid parameter.
(WebInspector.ScriptDetailsTimelineView.prototype._processPendingRecords):
(WebInspector.ScriptDetailsTimelineView.prototype._dataGridFiltersDidChange):
(WebInspector.ScriptDetailsTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
(WebInspector.ScriptDetailsTimelineView.prototype.treeElementSelected): Deleted.
(WebInspector.ScriptDetailsTimelineView.prototype.dataGridNodeForTreeElement): Deleted.
(WebInspector.ScriptDetailsTimelineView.prototype.populateProfileNodeTreeElement): Deleted.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.addRowInSortOrder):
Fixed failure when treeElement and parentTreeElementOrDataGridNode are both null.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Removed extraArguments and sidebar panel references.
(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
Use icon style from the tab, instead of the sidebar.
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
Removed updates to the sidebar.
(WebInspector.TimelineRecordingContentView.prototype._pathComponentSelected):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
Removed sidebar reference when creating new TimelineViews.
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
* UserInterface/Views/TimelineSidebarPanel.css: Removed.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView):
Removed hidden sidebar FIXME.
(WebInspector.TimelineTabContentView.prototype._addRecording):
New location for sidebar style class constant StopwatchIconStyleClass.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.get navigationItems): Deleted.
(WebInspector.TimelineView.prototype.get navigationSidebarTreeOutline): Deleted.
(WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
(WebInspector.TimelineView.prototype.get timelineSidebarPanel): Deleted.
(WebInspector.TimelineView.prototype.treeElementPathComponentSelected): Deleted.
(WebInspector.TimelineView.prototype.treeElementDeselected): Deleted.
(WebInspector.TimelineView.prototype.treeElementSelected): Deleted.
(WebInspector.TimelineView.prototype._treeSelectionDidChange): Deleted.
Sidebar logic for panel and content tree outline removed.
2016-03-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Enable Memory Timelines by default if supported
https://bugs.webkit.org/show_bug.cgi?id=155333
<rdar://problem/25097319>
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.defaultInstruments):
2016-03-10 Matt Baker <mattbaker@apple.com>
Web Inspector: Add "Quick Open" dialog to debugger and resources tabs
https://bugs.webkit.org/show_bug.cgi?id=153028
<rdar://problem/24194239>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New placeholder text for open resource dialog field.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Keep a reference to the content element to use as global dialog parent,
and create keyboard shortcut for new dialog.
(WebInspector._showOpenResourceDialog):
Create dialog if needed, return if already visible.
(WebInspector.dialogWasDismissed):
Show represented object, if any, when dialog is dismissed.
* UserInterface/Main.html:
New files.
* UserInterface/Views/Dialog.js: Added.
Base class for modal dialog popovers. Implements basic setup and
teardown, and logic for validating and returning a represented object.
(WebInspector.Dialog):
(WebInspector.Dialog.prototype.get visible):
(WebInspector.Dialog.prototype.get delegate):
(WebInspector.Dialog.prototype.get representedObject):
(WebInspector.Dialog.prototype.present):
(WebInspector.Dialog.prototype.dismiss):
(WebInspector.Dialog.prototype.didPresetDialog):
(WebInspector.Dialog.prototype.representedObjectIsValid):
* UserInterface/Views/GoToLineDialog.js:
Subclass the Dialog base class.
(WebInspector.GoToLineDialog):
(WebInspector.GoToLineDialog.prototype.didPresentDialog):
Implement base class behavior hook. Replaces "present".
(WebInspector.GoToLineDialog.prototype._handleInputEvent):
(WebInspector.GoToLineDialog.prototype._handleKeydownEvent):
Line number validation handled by base class/delegate.
(WebInspector.GoToLineDialog.prototype._clear):
(WebInspector.GoToLineDialog.prototype.present): Deleted.
(WebInspector.GoToLineDialog.prototype.dismiss): Deleted.
No longer needed, handled by base class.
* UserInterface/Views/OpenResourceDialog.css: Added.
(.open-resource-dialog):
(.open-resource-dialog > .field):
(.open-resource-dialog > .field > input):
(.open-resource-dialog > .field > input::-webkit-input-placeholder):
(.open-resource-dialog > .field > img):
(.open-resource-dialog > .field > img:active):
(.open-resource-dialog.non-empty > .field > img):
(.open-resource-dialog > .tree-outline):
(.open-resource-dialog > .tree-outline .item):
(.open-resource-dialog > .tree-outline .item:first-child):
(.open-resource-dialog > .tree-outline .item.selected):
(.open-resource-dialog > .tree-outline .item.selected .subtitle):
Styles for "quick open" dialog.
* UserInterface/Views/OpenResourceDialog.js: Added.
New dialog type, based on the Quick Open dialog found in Xcode (and its
equivalent in most modern editors).
(WebInspector.OpenResourceDialog):
(WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline.createTreeElement):
(WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
Populate the auto-completion tree from the list of filtered resources.
(WebInspector.OpenResourceDialog.prototype.didPresentDialog):
Build resource list once, when the dialog is presented. Update the list
when resources are added/removed in a follow-up: https://webkit.org/b/155321.
(WebInspector.OpenResourceDialog.prototype._handleInputEvent):
(WebInspector.OpenResourceDialog.prototype._handleKeydownEvent):
Escape key: dismiss dialog if input is empty, otherwise clear input.
Enter key: dismiss dialog if object selected.
Key up/down: cycle through auto-completion tree items, if any.
(WebInspector.OpenResourceDialog.prototype._handleKeyupEvent):
(WebInspector.OpenResourceDialog.prototype._handleBlurEvent):
(WebInspector.OpenResourceDialog.prototype._handleMousedownEvent):
(WebInspector.OpenResourceDialog.prototype._handleClickEvent):
(WebInspector.OpenResourceDialog.prototype._clear):
(WebInspector.OpenResourceDialog.prototype._updateFilter):
Rebuild filter regular expressions and apply to all resources. Each
resource is given a weight based on the first matching filter. Filters
are ordered by relevancy, from most to least relevant. Filtered resources
are sorted based on weight. If no matches are found, the tree is hidden.
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype.get filterableData):
make filterable resource data more fine-grained. Priority should be given
to the resource's name, before the complete URL.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.showGoToLineDialog):
(WebInspector.SourceCodeTextEditor.prototype.dialogWasDismissed):
(WebInspector.SourceCodeTextEditor.prototype.goToLineDialogValueWasValidated): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.goToLineDialogWasDismissed): Deleted.
Updated for new Dialog delegate behavior.
* UserInterface/Views/TreeOutline.css:
(.tree-outline.large .item .titles):
(.tree-outline.large .item .titles.no-subtitle): Deleted.
Styles for tree elements in "quick open" dialog auto-completion tree.
2016-03-10 Matt Baker <mattbaker@apple.com>
Web Inspector: TreeOutlineDataGridSynchronizer should be optional in TimelineDataGrid
https://bugs.webkit.org/show_bug.cgi?id=155318
<rdar://problem/25091949>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
TreeOutline is optional, and if non-null a tree outline synchronizer is created.
(WebInspector.TimelineDataGrid.prototype.shown):
(WebInspector.TimelineDataGrid.prototype.treeElementForDataGridNode):
(WebInspector.TimelineDataGrid.prototype.dataGridNodeForTreeElement):
(WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters):
Safety checks for the synchronizer.
(WebInspector.TimelineDataGrid.prototype.addRowInSortOrder):
treeElement is now an optional parameter. If non-null, a tree synchronizer
should exist. The third parameter has been overloaded, to allow passing
a parent tree element or data grid node.
(WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
(WebInspector.TimelineDataGrid.prototype._sort):
Safety checks for the synchronizer.
2016-03-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JavaScript Heap Allocations Timeline
https://bugs.webkit.org/show_bug.cgi?id=155287
<rdar://problem/25078088>
Reviewed by Timothy Hatcher.
Initial JavaScript Heap Allocations Timeline includes:
- Snapshot markers in the timeline
- Initial/Periodic/End snapshots during recording
- Ability to manually take a snapshot
- View of all objects in a Snapshot and Diff between snapshots
- Summary view - rough display of the size/count of large objects
- Instances view - view each of the individual objects
* UserInterface/Main.html:
* UserInterface/Test.html:
* UserInterface/Images/Compare.svg: Added.
* UserInterface/Images/HeapSnapshot.svg: Added.
* UserInterface/Images/HeapSnapshotDiff.svg: Added.
* UserInterface/Images/HeapSnapshotInstances.svg: Added.
* UserInterface/Images/HeapSnapshotSummary.svg: Added.
* Localizations/en.lproj/localizedStrings.js:
New resources and strings.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.heapTrackingStarted):
(WebInspector.TimelineManager.prototype.heapTrackingCompleted):
(WebInspector.TimelineManager.prototype.heapSnapshotAdded):
* UserInterface/Protocol/HeapObserver.js:
(WebInspector.HeapObserver.prototype.trackingStart):
(WebInspector.HeapObserver.prototype.trackingComplete):
(WebInspector.HeapObserver):
Add snapshot records to the active recording's timeline.
* UserInterface/Models/HeapAllocationsInstrument.js: Added.
(WebInspector.HeapAllocationsInstrument):
(WebInspector.HeapAllocationsInstrument.supported):
(WebInspector.HeapAllocationsInstrument.prototype.get timelineRecordType):
(WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation):
(WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation):
(WebInspector.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
Start, stop, and periodic snapshots.
* UserInterface/Models/HeapAllocationsTimelineRecord.js:
(WebInspector.HeapAllocationsTimelineRecord):
(WebInspector.HeapAllocationsTimelineRecord.prototype.get timestamp):
(WebInspector.HeapAllocationsTimelineRecord.prototype.get heapSnapshot):
* UserInterface/Models/TimelineRecord.js:
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.addRecord):
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.createForTimeline):
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.displayNameForTimeline):
(WebInspector.TimelineTabContentView.iconClassNameForTimeline):
(WebInspector.TimelineTabContentView.genericClassNameForTimeline):
(WebInspector.TimelineTabContentView.iconClassNameForRecord):
(WebInspector.TimelineTabContentView.displayNameForRecord):
New timeline and record type.
* UserInterface/Models/HeapSnapshotDiff.js: Added.
(WebInspector.HeapSnapshotDiff):
(WebInspector.HeapSnapshotDiff.prototype.get snapshot1):
(WebInspector.HeapSnapshotDiff.prototype.get snapshot2):
(WebInspector.HeapSnapshotDiff.prototype.get addedInstances):
(WebInspector.HeapSnapshotDiff.prototype.get removedInstances):
(WebInspector.HeapSnapshotDiff.prototype.get sizeDifference):
(WebInspector.HeapSnapshotDiff.prototype.get growth):
(WebInspector.HeapSnapshotDiff.prototype.snapshotForDiff):
Compare two snapshots and create a "diff snapshot" which is just
the newly added objects.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):
A HeapSnapshot creates a HeapSnapshotClusterView.
* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js: Added.
(WebInspector.HeapAllocationsTimelineDataGridNode):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.get record):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.get data):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.markAsBaseline):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.clearBaseline):
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css: Copied from Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js.
(.timeline-overview-graph.heap-allocations):
(.timeline-overview-graph.heap-allocations > img.snapshot):
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js: Added.
(WebInspector.HeapAllocationsTimelineOverviewGraph):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.reset):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout.xScale):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._heapAllocationTimelineRecordAdded):
* UserInterface/Views/HeapAllocationsTimelineView.css: Copied from Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js.
(.timeline-view.heap-allocations > .data-grid):
(.timeline-view.heap-allocations > .data-grid td .icon.heap-snapshot):
(.timeline-view.heap-allocations > .data-grid tr.baseline):
(.timeline-view.heap-allocations > .content-view-container):
(.timeline-view.heap-allocations > .content-view-container > .content-view):
* UserInterface/Views/HeapAllocationsTimelineView.js: Added.
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
(WebInspector.HeapAllocationsTimelineView.prototype.get navigationItems):
(WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
(WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.HeapAllocationsTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.HeapAllocationsTimelineView.prototype.userSelectedRecordFromOverview):
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
(WebInspector.HeapAllocationsTimelineView.prototype.layout):
(WebInspector.HeapAllocationsTimelineView.prototype.reset):
(WebInspector.HeapAllocationsTimelineView.prototype._heapAllocationsTimelineRecordAdded):
(WebInspector.HeapAllocationsTimelineView.prototype._snapshotListPathComponentClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._snapshotPathComponentSelected):
(WebInspector.HeapAllocationsTimelineView.prototype._currentContentViewDidChange):
(WebInspector.HeapAllocationsTimelineView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.HeapAllocationsTimelineView.prototype._updateCompareHeapSnapshotButton):
(WebInspector.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._cancelSelectComparisonHeapSnapshots):
(WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/HeapSnapshotClassDataGridNode.js: Added.
(WebInspector.HeapSnapshotClassDataGridNode):
(WebInspector.HeapSnapshotClassDataGridNode.prototype.get data):
(WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotClassDataGridNode.prototype.sort):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._fetchBatch):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._updateBatchedSort):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._updateBatchedChildren):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._removeFetchMoreDataGridNode):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._appendFetchMoreDataGridNode):
* UserInterface/Views/HeapSnapshotClusterContentView.js: Added.
(WebInspector.HeapSnapshotClusterContentView.createPathComponent):
(WebInspector.HeapSnapshotClusterContentView):
(WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
(WebInspector.HeapSnapshotClusterContentView.prototype.get heapSnapshot):
(WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get instancesContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get navigationItems):
(WebInspector.HeapSnapshotClusterContentView.prototype.get selectionPathComponents):
(WebInspector.HeapSnapshotClusterContentView.prototype.shown):
(WebInspector.HeapSnapshotClusterContentView.prototype.closed):
(WebInspector.HeapSnapshotClusterContentView.prototype.saveToCookie):
(WebInspector.HeapSnapshotClusterContentView.prototype.restoreFromCookie):
(WebInspector.HeapSnapshotClusterContentView.prototype.showSummary):
(WebInspector.HeapSnapshotClusterContentView.prototype.showInstances):
(WebInspector.HeapSnapshotClusterContentView.prototype._contentViewExtraArguments):
(WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
(WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentSelected):
(WebInspector.HeapSnapshotClusterContentView.prototype._toggleShowInternalObjectsSetting):
(WebInspector.HeapSnapshotClusterContentView.prototype._updateViewsForShowInternalObjectsSettingValue):
(WebInspector.HeapSnapshotClusterContentView.prototype._updateShowInternalObjectsButtonNavigationItem):
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js: Added.
(WebInspector.HeapSnapshotInstanceDataGridNode):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get data):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get selectable):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCells):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.sort):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._contextMenuHandler.):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._contextMenuHandler):
* UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js: Added.
(WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode):
(WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode.prototype.sort):
* UserInterface/Views/HeapSnapshotInstancesContentView.css: Added.
* UserInterface/Views/HeapSnapshotInstancesContentView.js: Added.
(WebInspector.HeapSnapshotInstancesContentView):
(WebInspector.HeapSnapshotInstancesContentView.prototype.get showInternalObjects):
(WebInspector.HeapSnapshotInstancesContentView.prototype.set showInternalObjects):
(WebInspector.HeapSnapshotInstancesContentView.prototype._sortDataGrid):
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js: Added.
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.buildSortComparator):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get heapSnapshot):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get includeInternalObjects):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set includeInternalObjects):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get children):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.appendChild):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.insertChild):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.removeChildren):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set sortComparator):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.sort):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
* UserInterface/Views/HeapSnapshotSummaryContentView.css: Added.
* UserInterface/Views/HeapSnapshotSummaryContentView.js: Added.
(WebInspector.HeapSnapshotSummaryContentView.createChartContainer):
(WebInspector.HeapSnapshotSummaryContentView.appendLegendRow):
(WebInspector.HeapSnapshotSummaryContentView.appendEmptyMessage):
(WebInspector.HeapSnapshotSummaryContentView):
(WebInspector.HeapSnapshotSummaryContentView.prototype.layout):
* UserInterface/Views/PathComponentIcons.css:
(.heap-snapshot-summary-icon .icon):
(.heap-snapshot-instances-icon .icon):
(.snapshot-list-icon .icon):
(.snapshot-diff-icon .icon):
(body:not(.mac-platform, .windows-platform) .snapshot-diff-icon .icon):
(body:not(.mac-platform, .windows-platform) .call-trees-icon .icon): Deleted.
* UserInterface/Views/TextNavigationItem.css:
(.navigation-bar .item.text):
* UserInterface/Views/TextNavigationItem.js:
(WebInspector.TextNavigationItem):
(WebInspector.TextNavigationItem.prototype.get text):
(WebInspector.TextNavigationItem.prototype.set text):
* UserInterface/Views/TimelineIcons.css:
(.heap-snapshot-record .icon):
* UserInterface/Views/Variables.css:
(:root):
New views.
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNodePreview):
(WebInspector.FormattedValue.createElementForFunctionWithName):
(WebInspector.FormattedValue.createObjectPreviewOrFormattedValueForObjectPreview):
Better display for a raw object preview.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.userSelectedRecord):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype.timelineOverviewUserSelectedRecord):
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
(WebInspector.TimelineRuler.prototype._handleClick):
(WebInspector.TimelineRuler.prototype._handleMouseDown):
(WebInspector.TimelineRuler.prototype._handleMouseMove):
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.userSelectedRecordFromOverview):
Hook up a way for clicking in the TimelineOverview / TimelineRuler
to redispatch to an OverviewGraph element, and provide a patch for
the Overview -> RecordingContentView -> TimelineView for records.
2016-03-09 Matt Baker <mattbaker@apple.com>
Web Inspector: LayoutTimelineView path components should reflect grid row nesting
https://bugs.webkit.org/show_bug.cgi?id=155279
<rdar://problem/25075355>
Reviewed by Timothy Hatcher.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype.get selectionPathComponents):
Walk grid nodes to build path component array.
2016-03-09 Matt Baker <mattbaker@apple.com>
Web Inspector: Timelines UI redesign: use DataGridNode for TimelineView selection path components
https://bugs.webkit.org/show_bug.cgi?id=154954
<rdar://problem/24947939>
Reviewed by Timothy Hatcher.
This patch adds a new path component, TimelineDataGridNodePathComponent,
for creating a path component from the current grid selection. This is
needed since TimelineViews will no longer have an associated content tree
outline once the navigation sidebar is removed.
TimelineDataGridNode has new protected methods, "displayName" and
"iconClassNames", which are used to populate hierarchical path components,
create grid node data, and create cell content.
TimelineView subclasses share a certain amount of boilerplate code for
getting selection path components and handling path component selection.
In the future we may be able to reduce this code by introducing a new
DataGridTimelineView base class.
* UserInterface/Main.html:
Added/removed files.
* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.get data):
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
(WebInspector.LayoutTimelineDataGridNode):
(WebInspector.LayoutTimelineDataGridNode.prototype.get record): Deleted.
Moved to base class.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype.get selectionPathComponents):
(WebInspector.LayoutTimelineView.prototype.dataGridNodePathComponentSelected):
(WebInspector.LayoutTimelineView.prototype.treeElementPathComponentSelected): Deleted.
TimelineView tree outlines are going away.
* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype.treeElementPathComponentSelected): Deleted.
TimelineView tree outlines are going away.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype.get selectionPathComponents):
(WebInspector.NetworkTimelineView.prototype.dataGridNodePathComponentSelected):
(WebInspector.NetworkTimelineView.prototype.treeElementPathComponentSelected): Deleted.
TimelineView tree outlines are going away.
* UserInterface/Views/ProfileNodeDataGridNode.js:
(WebInspector.ProfileNodeDataGridNode.prototype.get data):
(WebInspector.ProfileNodeDataGridNode.prototype.createCellContent):
(WebInspector.ProfileNodeDataGridNode.prototype.displayName):
(WebInspector.ProfileNodeDataGridNode.prototype.iconClassNames):
(WebInspector.ProfileNodeDataGridNode):
(WebInspector.ProfileNodeDataGridNode.prototype._iconClassNameForProfileNode): Deleted.
(WebInspector.ProfileNodeDataGridNode.prototype._titleForProfileNode): Deleted.
Re-implemented as overrides of the base class methods "iconClassNames"
and "displayName".
* UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
(WebInspector.RenderingFrameTimelineDataGridNode):
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.get record): Deleted.
Moved to base class.
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ResourceTimelineDataGridNode.prototype.displayName):
(WebInspector.ResourceTimelineDataGridNode.prototype.iconClassNames):
Override base class methods, making it possible to remove ResourceTimelineDataGridNodePathComponent,
and treat all TimelineDataGridNodes in a uniform manner.
(WebInspector.ResourceTimelineDataGridNode.prototype._createNameCellDocumentFragment):
Replace duplicated code with call to "displayName".
* UserInterface/Views/ResourceTimelineDataGridNodePathComponent.js: Removed.
Replaced by more generic solution, TimelineDataGridNodePathComponent.
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView.prototype.get selectionPathComponents):
(WebInspector.ScriptDetailsTimelineView.prototype.dataGridNodePathComponentSelected):
(WebInspector.ScriptDetailsTimelineView.prototype.treeElementPathComponentSelected): Deleted.
TimelineView tree outlines are going away.
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
Replace duplicated code with call to "displayName".
(WebInspector.ScriptTimelineDataGridNode):
(WebInspector.ScriptTimelineDataGridNode.prototype.get record): Deleted.
Moved to base class.
* UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.createCellContent):
(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype._createNameCellContent):
Replace duplicated code with call to "displayName".
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.get record):
Implemented in terms of the "records" getter, since all subclasses simply returned the
node's first (or only) record.
(WebInspector.TimelineDataGridNode.prototype.displayName):
(WebInspector.TimelineDataGridNode.prototype.iconClassNames):
Base class implementations, using utility methods in TimelineTabContentView
to get display data based on the node's timeline record. Can be overridden
by nodes that either don't have a timeline record (ProfileNodeDataGridNode)
* UserInterface/Views/TimelineDataGridNodePathComponent.js:
(WebInspector.TimelineDataGridNodePathComponent):
(WebInspector.TimelineDataGridNodePathComponent.prototype.get timelineDataGridNode):
(WebInspector.TimelineDataGridNodePathComponent.prototype.get previousSibling):
(WebInspector.TimelineDataGridNodePathComponent.prototype.get nextSibling):
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.get selectionPathComponents):
Must be implemented by subclasses since not all TimelineViews use a DataGrid.
2016-03-09 Matt Baker <mattbaker@apple.com>
Web Inspector: Nodes in Computed Styles > Container Regions formatted incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=155277
<rdar://problem/25072711>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeDataGrid.js:
(WebInspector.DOMTreeDataGrid):
Enable icon column property.
* UserInterface/Views/DOMTreeDataGridNode.js:
(WebInspector.DOMTreeDataGridNode):
Removed calls to unused methods.
(WebInspector.DOMTreeDataGridNode.prototype.createCellContent):
(WebInspector.DOMTreeDataGridNode.prototype._createNameCellDocumentFragment):
Simplified cell content creation.
(WebInspector.DOMTreeDataGridNode.prototype._updateNodeName): Deleted.
(WebInspector.DOMTreeDataGridNode.prototype._makeNameCell): Deleted.
Renamed _createNameCellDocumentFragment to be consistent with similar
methods in other data grid node classes.
(WebInspector.DOMTreeDataGridNode.prototype._updateNameCellData): Deleted.
No longer needed.
2016-03-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unnecessary constructor
https://bugs.webkit.org/show_bug.cgi?id=155249
Reviewed by Timothy Hatcher.
* UserInterface/Views/ScriptTimelineDataGrid.js:
(WebInspector.ScriptTimelineDataGrid):
2016-03-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timelines keeps switching to overview instead of keeping the selected timeline
https://bugs.webkit.org/show_bug.cgi?id=155212
<rdar://problem/25052504>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie):
The sidebar was using out of date information in its tree outline causing it to
switch to the wrong sidebar. Use the up to date information from the recording view.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._recordingSelected):
Fix typo not getting the right timeline type.
2016-03-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Memory Timeline should show MemoryPressure events
https://bugs.webkit.org/show_bug.cgi?id=155158
<rdar://problem/25026610>
Reviewed by Brian Burg.
* UserInterface/Main.html:
New resources.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Controllers/MemoryManager.js:
(WebInspector.MemoryManager):
(WebInspector.MemoryManager.prototype.memoryPressure):
* UserInterface/Protocol/MemoryObserver.js:
(WebInspector.MemoryObserver.prototype.memoryPressure):
New manager for Memory domain events.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.defaultInstruments):
(WebInspector.TimelineManager.prototype._memoryPressure):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.addMemoryPressureEvent):
Add events to the Memory Timeline of the active recording.
* UserInterface/Models/MemoryTimeline.js:
(WebInspector.MemoryTimeline.prototype.get memoryPressureEvents):
(WebInspector.MemoryTimeline.prototype.addMemoryPressureEvent):
(WebInspector.MemoryTimeline.prototype.reset):
(WebInspector.MemoryTimeline):
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.create):
Create a specific MemoryTimeline to hold records and memory pressure events.
* UserInterface/Models/MemoryPressureEvent.js:
(WebInspector.MemoryPressureEvent):
(WebInspector.MemoryPressureEvent.fromPayload):
(WebInspector.MemoryPressureEvent.prototype.get timestamp):
(WebInspector.MemoryPressureEvent.prototype.get severity):
Model object for a memory pressure event.
* UserInterface/Views/MemoryTimelineOverviewGraph.css:
(.timeline-overview-graph.memory .memory-pressure-event):
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WebInspector.MemoryTimelineOverviewGraph):
(WebInspector.MemoryTimelineOverviewGraph.prototype.reset):
(WebInspector.MemoryTimelineOverviewGraph.prototype._visibleMemoryPressureEvents):
(WebInspector.MemoryTimelineOverviewGraph.prototype._memoryTimelineMemoryPressureEventAdded):
Include markers for memory pressure events.
2016-03-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add Heap domain start/stop tracking commands
https://bugs.webkit.org/show_bug.cgi?id=155190
Reviewed by Brian Burg.
* UserInterface/Protocol/HeapObserver.js:
(WebInspector.HeapObserver.prototype.trackingStart):
(WebInspector.HeapObserver.prototype.trackingComplete):
To be used when we have a HeapAllocationsInstrument and timeline.
2016-03-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Make debugging Test.html easier
https://bugs.webkit.org/show_bug.cgi?id=155207
Reviewed by Brian Burg.
* UserInterface/Base/InspectorFrontendHostStub.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendHostStub.js.
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.unbufferedLog):
Add new stub for test function.
* UserInterface/Main.html:
* UserInterface/Test.html:
Move the stub to the Base directory.
2016-03-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add a way to create a Heap Snapshot
https://bugs.webkit.org/show_bug.cgi?id=155188
Reviewed by Brian Burg.
* UserInterface/Main.html:
* UserInterface/Test.html:
Add new Model resources.
* UserInterface/Models/HeapSnapshot.js: Added.
(WebInspector.HeapSnapshotClassCategory):
(WebInspector.HeapSnapshot):
(WebInspector.HeapSnapshot.fromPayload):
(WebInspector.HeapSnapshot.prototype.get rootNode):
(WebInspector.HeapSnapshot.prototype.get nodes):
(WebInspector.HeapSnapshot.prototype.get identifier):
(WebInspector.HeapSnapshot.prototype.get instances):
(WebInspector.HeapSnapshot.prototype.get categories):
(WebInspector.HeapSnapshot.prototype.get totalSize):
(WebInspector.HeapSnapshot.prototype.get totalObjectCount):
(WebInspector.HeapSnapshot.prototype.instancesWithClassName):
(WebInspector.HeapSnapshot.prototype.nodeWithObjectIdentifier):
* UserInterface/Models/HeapSnapshotEdge.js: Added.
(WebInspector.HeapSnapshotEdge):
(WebInspector.HeapSnapshotEdge.prototype.stringify):
* UserInterface/Models/HeapSnapshotNode.js: Added.
(WebInspector.HeapSnapshotNode):
Data structures for a HeapSnapshot.
2016-03-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Miscellaneous inspector fixes for typos / stale code
https://bugs.webkit.org/show_bug.cgi?id=155193
Reviewed by Timothy Hatcher.
* UserInterface/Models/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype._locationString):
Fix whitespace.
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView):
Remove unused class name.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
Remove inferredName, as that was never sent by our backend and is getting removed.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._handleMouseUp):
Fix variable name typo.
2016-03-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Images being blocked by CSP 2.0
https://bugs.webkit.org/show_bug.cgi?id=155182
<rdar://problem/25040640>
Reviewed by Daniel Bates.
* UserInterface/Main.html:
Allow Web Inspector to load file: and blob: image resources.
Also blob: media and font resources.
2016-03-06 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Use half-pixel borders for data grids
https://bugs.webkit.org/show_bug.cgi?id=154437
<rdar://problem/24736365>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DataGrid.css:
(.data-grid.inline):
(.data-grid th):
(.data-grid :matches(th, td):not(:last-child)):
Half-pixel borders round to 1px on 1x (non-retina) screens since r192444.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._positionResizerElements):
Use getBoundingClientRect for better precision since it provides subpixel values.
2016-03-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Have separate path component for Script Timeline content views
https://bugs.webkit.org/show_bug.cgi?id=155075
<rdar://problem/24996564>
Reviewed by Timothy Hatcher.
* UserInterface/Images/CallTrees.svg: Added.
* UserInterface/Images/Events.svg: Added.
New icons based off of ResultLine.svg.
* UserInterface/Views/PathComponentIcons.css:
(.events-icon .icon):
(.call-trees-icon .icon):
(body:not(.mac-platform, .windows-platform) .call-trees-icon .icon):
Use the new icons and fallback to ResultLine.svg for other ports.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView):
(WebInspector.ScriptClusterTimelineView.prototype.get eventsContentView):
(WebInspector.ScriptClusterTimelineView.prototype.showEvents):
(WebInspector.ScriptClusterTimelineView.prototype.showProfile):
(WebInspector.ScriptClusterTimelineView.prototype._pathComponentForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._identifierForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._showContentViewForIdentifier):
(WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
(WebInspector.ScriptClusterTimelineView.prototype.get detailsContentView): Deleted.
(WebInspector.ScriptClusterTimelineView.prototype.showDetails): Deleted.
Rename "Details" to "Events".
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject): Deleted.
Always include the top level "Details" component.
2016-03-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add back support for a heavy / bottom up profile view
https://bugs.webkit.org/show_bug.cgi?id=140578
<rdar://problem/19506794>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and resources.
* UserInterface/Base/Utilities.js:
(Number.secondsToMillisecondsString):
Helper for providing a consistent milliseconds string used in profiles.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
The calling context tree should be stored on a Recording, not on the global
TimelineManager. Also create two trees, one top down and one bottom up.
* UserInterface/Models/CallingContextTree.js:
(WebInspector.CallingContextTree):
(WebInspector.CallingContextTree.prototype.get type):
(WebInspector.CallingContextTree.prototype.get totalExecutionTime):
(WebInspector.CallingContextTree.prototype.reset):
(WebInspector.CallingContextTree.prototype.numberOfSamplesInTimeRange):
(WebInspector.CallingContextTree.prototype.increaseExecutionTime):
Give a CallingContextTree a type (TopDown / BottomUp) and some getters.
(WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
Build a bottom up or top down tree from samples.
(WebInspector.CallingContextTree.prototype.forEachChild):
Allow iterating from the root.
(WebInspector.CCTNode):
(WebInspector.CCTNode.prototype.hasChildrenInTimeRange):
(WebInspector.CCTNode.prototype.numberOfLeafTimestamps):
(WebInspector.CCTNode.prototype.addTimestampAndExpressionLocation):
(WebInspector.CCTNode.prototype.equals):
(WebInspector.CCTNode.prototype.hasChildren): Deleted.
Give a CCTNode a list of leaf timestamps alongside the list of all timestamps.
Leaf timestamps will count as "self time" in a profile view.
* UserInterface/Models/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype._locationString):
Nobody was using "ColumnStyle.Hidden" so repurpose it to be even simpler.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.get topDownCallingContextTree):
(WebInspector.TimelineRecording.prototype.get bottomUpCallingContextTree):
(WebInspector.TimelineRecording.prototype.reset):
Store the two types of calling context trees and allow reseting them.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.contextMenuItemSelected):
Helper for debugging uncaught exceptions in context menus.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):
A ScriptTimeline now has a cluster view.
A CallingContextTree now has a ProfileView.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.insertChild):
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
(WebInspector.DataGridNode.prototype.refreshRecursively):
(WebInspector.DataGridNode.prototype.elementWithColumnIdentifier):
(WebInspector.DataGridNode.prototype.forEachImmediateChild):
(WebInspector.DataGridNode.prototype.forEachChildInSubtree):
(WebInspector.DataGridNode.prototype.isInSubtreeOfNode):
Provide some helpers for iterating DataGridNodes, useful when the
actual DataGrid comes from a DataGridTree.
(WebInspector.DataGridNode.prototype.select):
(WebInspector.DataGridNode.prototype.deselect):
The indent width of DataGridNodes was not getting reset when a
node was removed and re-added to a tree due to a cached padding.
(WebInspector.DataGridNode.prototype.appendContextMenuItems):
Allow DataGridNodes to provide context menu items by overriding this method.
* UserInterface/Views/PathComponentIcons.css:
(.function-icon .icon):
(.native-icon .icon):
(.program-icon .icon):
Icons for profile nodes in path components.
* UserInterface/Views/ProfileDataGridNode.js: Added.
(WebInspector.ProfileDataGridNode):
(WebInspector.ProfileDataGridNode.prototype.get node):
(WebInspector.ProfileDataGridNode.prototype.displayName):
(WebInspector.ProfileDataGridNode.prototype.iconClassName):
(WebInspector.ProfileDataGridNode.prototype.get data):
(WebInspector.ProfileDataGridNode.prototype.createCellContent):
(WebInspector.ProfileDataGridNode.prototype.sort):
(WebInspector.ProfileDataGridNode.prototype.refresh):
(WebInspector.ProfileDataGridNode.prototype.appendContextMenuItems):
(WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
(WebInspector.ProfileDataGridNode.prototype._recalculateData):
(WebInspector.ProfileDataGridNode.prototype._totalTimeContent):
(WebInspector.ProfileDataGridNode.prototype._displayContent):
(WebInspector.ProfileDataGridNode.prototype._populate):
CCTNode DataGridNode. A row in the ProfileDataGridTree. Handles
tree modifiers like charge to caller.
* UserInterface/Views/ProfileDataGridTree.js: Added.
(WebInspector.ProfileDataGridTree):
(WebInspector.ProfileDataGridTree.buildSortComparator):
(WebInspector.ProfileDataGridTree.prototype.get callingContextTree):
(WebInspector.ProfileDataGridTree.prototype.get sampleInterval):
(WebInspector.ProfileDataGridTree.prototype.get focusNodes):
(WebInspector.ProfileDataGridTree.prototype.get currentFocusNode):
(WebInspector.ProfileDataGridTree.prototype.get modifiers):
(WebInspector.ProfileDataGridTree.prototype.get startTime):
(WebInspector.ProfileDataGridTree.prototype.get endTime):
(WebInspector.ProfileDataGridTree.prototype.get numberOfSamples):
(WebInspector.ProfileDataGridTree.prototype.get children):
(WebInspector.ProfileDataGridTree.prototype.appendChild):
(WebInspector.ProfileDataGridTree.prototype.insertChild):
(WebInspector.ProfileDataGridTree.prototype.removeChildren):
(WebInspector.ProfileDataGridTree.prototype.set sortComparator):
(WebInspector.ProfileDataGridTree.prototype.sort):
(WebInspector.ProfileDataGridTree.prototype.refresh):
(WebInspector.ProfileDataGridTree.prototype.addFocusNode):
(WebInspector.ProfileDataGridTree.prototype.rollbackFocusNode):
(WebInspector.ProfileDataGridTree.prototype.clearFocusNodes):
(WebInspector.ProfileDataGridTree.prototype.hasModifiers):
(WebInspector.ProfileDataGridTree.prototype.addModifier):
(WebInspector.ProfileDataGridTree.prototype.clearModifiers):
(WebInspector.ProfileDataGridTree.prototype._repopulate):
(WebInspector.ProfileDataGridTree.prototype._focusChanged):
(WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
(WebInspector.ProfileDataGridTree.prototype._restoreFocusedNodeToOriginalParent):
(WebInspector.ProfileDataGridTree.prototype._modifiersChanged):
Start of a DataGridTree for a CallingContextTree.
Contains special logic for focused nodes and modifiers.
* UserInterface/Views/ProfileView.css: Added.
(.profile > .data-grid):
(.profile > .data-grid th):
(.profile > .data-grid td .icon):
(.profile > .data-grid td .percentage):
(.profile > .data-grid td .location):
(.profile > .data-grid:matches(:focus, .force-focus) tr.selected td .location):
(.profile > .data-grid td .icon.function-icon):
(.profile > .data-grid td .icon.native-icon):
(.profile > .data-grid td .icon.program-icon):
(.profile > .data-grid tr:matches(.selected, :hover) .go-to-arrow):
(.profile > .data-grid td.function-column):
(.profile > .data-grid td .guidance):
(.profile > .data-grid td .guidance.hover):
(.profile > .data-grid td .guidance.base):
(.profile > .data-grid tr:not(.expanded) td .guidance.base):
(.profile > .data-grid tr.expanded td .guidance.base):
* UserInterface/Views/ProfileView.js: Added.
(WebInspector.ProfileView):
(WebInspector.ProfileView.prototype.get callingContextTree):
(WebInspector.ProfileView.prototype.get startTime):
(WebInspector.ProfileView.prototype.get endTime):
(WebInspector.ProfileView.prototype.setStartAndEndTime):
(WebInspector.ProfileView.prototype.hasFocusNodes):
(WebInspector.ProfileView.prototype.clearFocusNodes):
(WebInspector.ProfileView.prototype.get selectionPathComponents):
(WebInspector.ProfileView.prototype._recreate):
(WebInspector.ProfileView.prototype._repopulateDataGridFromTree):
(WebInspector.ProfileView.prototype._pathComponentClicked):
(WebInspector.ProfileView.prototype._dataGridTreeFocusChanged):
(WebInspector.ProfileView.prototype._dataGridTreeModifiersChanged):
(WebInspector.ProfileView.prototype._dataGridSortChanged):
(WebInspector.ProfileView.prototype._dataGridNodeSelected):
(WebInspector.ProfileView.prototype._dataGridNodeExpanded):
(WebInspector.ProfileView.prototype._mouseOverDataGrid):
(WebInspector.ProfileView.prototype._mouseLeaveDataGrid):
(WebInspector.ProfileView.prototype._guidanceElementKey):
(WebInspector.ProfileView.prototype._removeGuidanceElement):
(WebInspector.ProfileView.prototype._appendGuidanceElement):
ProfileView holds a data grid which is populated from the data grid tree.
Special handing for guidance markers when hovering / selecting parts of the tree.
* UserInterface/Views/ScriptClusterTimelineView.js: Added.
(WebInspector.ScriptClusterTimelineView.createPathComponent):
(WebInspector.ScriptClusterTimelineView):
(WebInspector.ScriptClusterTimelineView.prototype.get zeroTime):
(WebInspector.ScriptClusterTimelineView.prototype.set zeroTime):
(WebInspector.ScriptClusterTimelineView.prototype.get startTime):
(WebInspector.ScriptClusterTimelineView.prototype.set startTime):
(WebInspector.ScriptClusterTimelineView.prototype.get endTime):
(WebInspector.ScriptClusterTimelineView.prototype.set endTime):
(WebInspector.ScriptClusterTimelineView.prototype.get currentTime):
(WebInspector.ScriptClusterTimelineView.prototype.set currentTime):
(WebInspector.ScriptClusterTimelineView.prototype.get navigationSidebarTreeOutline):
(WebInspector.ScriptClusterTimelineView.prototype.reset):
(WebInspector.ScriptClusterTimelineView.prototype.filterDidChange):
(WebInspector.ScriptClusterTimelineView.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.ScriptClusterTimelineView.prototype.get detailsContentView):
(WebInspector.ScriptClusterTimelineView.prototype.get profileContentView):
(WebInspector.ScriptClusterTimelineView.prototype.get selectionPathComponents):
(WebInspector.ScriptClusterTimelineView.prototype.saveToCookie):
(WebInspector.ScriptClusterTimelineView.prototype.restoreFromCookie):
(WebInspector.ScriptClusterTimelineView.prototype.showDetails):
(WebInspector.ScriptClusterTimelineView.prototype.showProfile):
(WebInspector.ScriptClusterTimelineView.prototype._pathComponentForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._identifierForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._showContentViewForIdentifier):
(WebInspector.ScriptClusterTimelineView.prototype._pathComponentSelected):
(WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
Script Timeline ClusterContentView. Toggle between the normal "Details" data grid
and the new "Call Tree" profile view. Currently the recording expects child content
views to be TimelineViews, this ClusterContentView forwards TimelineView relevant
methods to the real TimelineView children.
* UserInterface/Views/ScriptDetailsTimelineView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ScriptTimelineView.js.
(WebInspector.ScriptDetailsTimelineView):
(WebInspector.ScriptDetailsTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.ScriptDetailsTimelineView.prototype.shown):
(WebInspector.ScriptDetailsTimelineView.prototype.hidden):
(WebInspector.ScriptDetailsTimelineView.prototype.closed):
(WebInspector.ScriptDetailsTimelineView.prototype.get selectionPathComponents):
(WebInspector.ScriptDetailsTimelineView.prototype.reset):
(WebInspector.ScriptDetailsTimelineView.prototype.canShowContentViewForTreeElement):
(WebInspector.ScriptDetailsTimelineView.prototype.showContentViewForTreeElement):
(WebInspector.ScriptDetailsTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.ScriptDetailsTimelineView.prototype.treeElementSelected):
(WebInspector.ScriptDetailsTimelineView.prototype.dataGridNodeForTreeElement):
(WebInspector.ScriptDetailsTimelineView.prototype.populateProfileNodeTreeElement):
(WebInspector.ScriptDetailsTimelineView.prototype.layout):
(WebInspector.ScriptDetailsTimelineView.prototype._processPendingRecords):
(WebInspector.ScriptDetailsTimelineView.prototype._scriptTimelineRecordAdded):
(WebInspector.ScriptDetailsTimelineView.prototype._scriptTimelineRecordRefreshed):
(WebInspector.ScriptDetailsTimelineView.prototype._dataGridFiltersDidChange):
(WebInspector.ScriptDetailsTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/ScriptProfileTimelineView.js: Added.
(WebInspector.ScriptProfileTimelineView):
(WebInspector.ScriptProfileTimelineView.prototype.closed):
(WebInspector.ScriptProfileTimelineView.prototype.get navigationItems):
(WebInspector.ScriptProfileTimelineView.prototype.get selectionPathComponents):
(WebInspector.ScriptProfileTimelineView.prototype.layout):
(WebInspector.ScriptProfileTimelineView.prototype._callingContextTreeForOrientation):
(WebInspector.ScriptProfileTimelineView.prototype._profileViewSelectionPathComponentsDidChange):
(WebInspector.ScriptProfileTimelineView.prototype._scriptTimelineRecordRefreshed):
(WebInspector.ScriptProfileTimelineView.prototype._updateProfileOrientationButtonItem):
(WebInspector.ScriptProfileTimelineView.prototype._toggleProfileOrientation):
(WebInspector.ScriptProfileTimelineView.prototype._updateClearFocusNodesButtonItem):
(WebInspector.ScriptProfileTimelineView.prototype._clearFocusNodes):
The two TimelineViews.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
The timeline content browser may now hold a ClusterContentView. It is not exactly a TimelineView,
but it holds TimelineViews, so treat it like one. Assume the ClusterContentView will add its own
path components.
(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
Add extra information other than the sidebar to TimelineViews. The ProfileView looks
at the recording for the calling context trees.
2016-03-03 Timothy Hatcher <timothy@apple.com>
Web Inspector: Temporarily hide the TimelineSidebarPanel
https://bugs.webkit.org/show_bug.cgi?id=154974
rdar://problem/24956380
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView): Remove _showNavigationSidebarItem and hide the sidebar.
2016-03-03 Matt Baker <mattbaker@apple.com>
Web Inspector: Selected range path component should be zero time corrected
https://bugs.webkit.org/show_bug.cgi?id=154950
<rdar://problem/24947022>
Reviewed by Timothy Hatcher.
Subtracts zero time from TimelineRange start and end values, and corrects
a cosmetic issue in TimelineRuler which showed selection handle tooltips
that weren't adjusted for the ruler's zero time.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._updateSelection):
2016-03-03 Matt Baker <mattbaker@apple.com>
Web Inspector: Events and Frames mode switch does not fully switch until first zoom
https://bugs.webkit.org/show_bug.cgi?id=154971
<rdar://problem/24955871>
Reviewed by Timothy Hatcher.
Switching modes toggles the visibility of the tree outline, which changes
the width of the overview's ruler, graphs, and scroll container. When the
view mode changes, the overview needs a forced "resize" layout.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._viewModeDidChange):
2016-03-03 Matt Baker <mattbaker@apple.com>
Web Inspector: Assertion Failed: Cannot show timeline because it does not belong to the shown recording. – "overview"
https://bugs.webkit.org/show_bug.cgi?id=154972
<rdar://problem/24956233>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._showTimelineViewForType):
Just show the overview if the recording has no timeline of the given type.
2016-03-02 Matt Baker <mattbaker@apple.com>
Web Inspector: Update MemoryTimelineView for new ruler height
https://bugs.webkit.org/show_bug.cgi?id=153904
<rdar://problem/24517259>
Reviewed by Timothy Hatcher.
* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory > .content > .details > .timeline-ruler):
(.timeline-view.memory > .content > .details > .subtitle):
Adjust ruler top and subtitle padding for shorter timeline ruler.
Also reduced padding in the Categories heading area to tighen up
the layout a bit.
2016-03-02 Matt Baker <mattbaker@apple.com>
Web Inspector: Timelines UI redesign: replace content view container with a content browser
https://bugs.webkit.org/show_bug.cgi?id=153033
<rdar://problem/24195565>
Reviewed by Timothy Hatcher.
This patch replaces the ContentViewContainer in the Timelines tab with a ContentBrowser,
moves filtering controls from the sidebar to the new browser's navigation bar, and adds
a new leaf path component for the current ruler selection to the main content browser's
navigation bar.
* Localizations/en.lproj/localizedStrings.js:
New UI strings.
* UserInterface/Base/Utilities.js:
Added global en dash string.
* UserInterface/Main.html:
* UserInterface/Test.html:
New files.
* UserInterface/Models/TimelineRange.js:
(WebInspector.TimelineRange):
(WebInspector.TimelineRange.prototype.get startValue):
(WebInspector.TimelineRange.prototype.set startValue):
(WebInspector.TimelineRange.prototype.get endValue):
(WebInspector.TimelineRange.prototype.set endValue):
New represented object used by ruler selection path components.
* UserInterface/Views/FilterBarNavigationItem.js:
(WebInspector.FilterBarNavigationItem):
(WebInspector.FilterBarNavigationItem.prototype.get filterBar):
Adapter class for using a FilterBar as a NavigationItem.
* UserInterface/Views/TimelineIcons.css:
(.time-icon .icon):
Icon class used by ruler selection path component.
* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser):
(.content-view.timeline-recording > .content-browser > .navigation-bar):
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple):
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows):
(.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid td):
(.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid table.data):
(.content-view.timeline-recording > .content-view-container): Deleted.
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid td): Deleted.
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid table.data): Deleted.
New styles for the ContentBrowser that replaces the ContentViewContainer.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Create the ContentBrowser, ruler selection path components, and the browser's filter bar.
(WebInspector.TimelineRecordingContentView.prototype.showOverviewTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
Implemented by the content browser instead of the view container.
(WebInspector.TimelineRecordingContentView.prototype.get selectionPathComponents):
Add timeline and selection path components. Components for the current TimelineView
are now located in the lower content browser's navigation bar.
(WebInspector.TimelineRecordingContentView.prototype.get supplementalRepresentedObjects):
(WebInspector.TimelineRecordingContentView.prototype.get handleCopyEvent):
(WebInspector.TimelineRecordingContentView.prototype.get supportsSave):
(WebInspector.TimelineRecordingContentView.prototype.get saveData):
(WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.shown):
(WebInspector.TimelineRecordingContentView.prototype.hidden):
(WebInspector.TimelineRecordingContentView.prototype.closed):
(WebInspector.TimelineRecordingContentView.prototype.canGoBack):
(WebInspector.TimelineRecordingContentView.prototype.canGoForward):
(WebInspector.TimelineRecordingContentView.prototype.goBack):
(WebInspector.TimelineRecordingContentView.prototype.goForward):
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie):
Implemented by the content browser instead of the view container.
(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
Create the root tree element for the lower content browser's navigation bar.
(WebInspector.TimelineRecordingContentView.prototype._timeRangePathComponentSelected):
Update the ruler selection based on the new path component.
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
Implemented by the content browser instead of the view container.
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
Update the currently selected path component when the ruler selection changes.
If the entire range is selected, show the "Entire Recording" path component,
otherwise update the TimelineRange of the path component for the user-defined
selection and refresh all timeline range path components.
(WebInspector.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
Update title text and sibling relationships for ruler selection path components.
(WebInspector.TimelineRecordingContentView.prototype._createTimelineRangePathComponent):
Helper function for creating TimelineRange path components.
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
The TimelineView scope bar is no longer added to the sidebar. The UI has been moved
to the lower content browser navigation bar.
(WebInspector.TimelineRecordingContentView.prototype._updateFrameSelection): Deleted.
No longer needed since the selected range is shown in the navigation bar.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get navigationItems):
Adds the TimelineView's scope bar (if any) to the lower content browser's navigation
bar. Items are inserted before the filter bar, which is always the right-most item.
2016-03-02 Matt Baker <mattbaker@apple.com>
Web Inspector: Timelines UI redesign: show content tree outline records in timeline data grids
https://bugs.webkit.org/show_bug.cgi?id=153032
<rdar://problem/24195317>
Reviewed by Timothy Hatcher.
This patch relocates the data shown in the Timelines navigation sidebar content tree outline
to a new grid column in each TimelineDataGrid. Logic for creating subtitles, goto arrow buttons,
and status elements (the progress spinner used for network resources) has been replicated in
the appropriate TimelineDataGridNode classes.
Duplicate logic contained in TimelineRecordTreeElement classes is left in place for now, but
will be removed in <https://webkit.org/b/153036>.
* UserInterface/Views/DataGrid.css:
(.data-grid td.error):
Use --error-text-color CSS variable.
* UserInterface/Views/DataGrid.js:
Removed GoToArrowClicked event.
(WebInspector.DataGridNode.prototype.createGoToArrowButton.buttonClicked): Deleted.
(WebInspector.DataGridNode.prototype.createGoToArrowButton): Deleted.
Now part of TimelineDataGridNode.
* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode):
(WebInspector.LayoutTimelineDataGridNode.prototype.get data):
Add name cell to row data.
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
Create name cell.
* UserInterface/Views/LayoutTimelineView.css:
(.timeline-view.layout > .data-grid .eventType-column): Deleted.
Column border no longer hidden.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
Setup name column.
* UserInterface/Views/NetworkTimelineView.css:
(.timeline-view.network > .data-grid .name-column .subtitle):
Don't show subtitles in the Network grid's name column.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
Setup name column.
* UserInterface/Views/OverviewTimelineView.css:
(.timeline-view.overview > .data-grid th.graph-column > .timeline-ruler):
(.timeline-view.overview > .data-grid th.graph-column > .timeline-ruler > .header):
(.timeline-view.overview > .data-grid th):
(body.window-inactive .timeline-view.overview > .data-grid th):
(.timeline-view.overview .timeline-ruler > .event-markers):
(.timeline-view.overview > .data-grid):
(.timeline-view.overview > .timeline-ruler): Deleted.
(.timeline-view.overview > .timeline-ruler > .header): Deleted.
(body.window-inactive .timeline-view.overview > .timeline-ruler > .header): Deleted.
(.timeline-view.overview > .timeline-ruler > .event-markers): Deleted.
New styles for adding grid column headers and using a TimelineRuler as the
graph column header.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
Setup name column and add ruler to graph column header.
* UserInterface/Views/ProfileNodeDataGridNode.js:
(WebInspector.ProfileNodeDataGridNode):
Use cached data instead of creating row data at construction time.
(WebInspector.ProfileNodeDataGridNode.prototype.get data):
Add name cell to row data.
(WebInspector.ProfileNodeDataGridNode.prototype.createCellContent):
Create name cell.
(WebInspector.ProfileNodeDataGridNode.prototype._iconClassNameForProfileNode):
(WebInspector.ProfileNodeDataGridNode.prototype._titleForProfileNode):
Copied from ProfileNodeTreeElement.
* UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
(WebInspector.RenderingFrameTimelineDataGridNode):
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.get data):
Add name cell to row data.
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
Create name cell.
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
Setup name column.
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode):
Renamed "graphOnly" to "includesGraph", since resource rows in the overview
now show the name column in addition to the graph column. Resource events
LoadingDidFinish and LoadingDidFail now need to be handled for both types
of resource rows.
(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
Update resource status element and create name cell content.
(WebInspector.ResourceTimelineDataGridNode.prototype._createNameCellDocumentFragment):
Create DOM fragment with titles. Based on code in TimelineRecordTreeElement.
(WebInspector.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked):
Show resource when goto arrow is clicked.
(WebInspector.ResourceTimelineDataGridNode.prototype._updateStatus):
Update name cell's text color and progress spinner.
* UserInterface/Views/ResourceTreeElement.css:
(.item.resource.failed):
(.item.resource.failed .subtitle):
Use --error-text-color CSS variable.
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
Create DOM fragment with titles. Based on code in TimelineRecordTreeElement.
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
Setup name column.
* UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.createCellContent):
Added now that this node type is no longer "graph only".
(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype._createNameCellContent):
Create DOM fragment with titles. Based on code in TimelineRecordTreeElement.
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode):
Renamed `graphOnly` to `includesGraph`.
(WebInspector.TimelineDataGridNode.prototype.createCellContent):
Removed icon element creation. This is now handled by the DataGrid.
(WebInspector.TimelineDataGridNode.prototype.refresh):
Refresh of all node cells after updating the graph.
(WebInspector.TimelineDataGridNode.prototype.createGoToArrowButton):
(WebInspector.TimelineDataGridNode.prototype.createGoToArrowButton.buttonClicked):
Relocated from DataGrid, as it's only used by TimelineDataGridNodes.
* UserInterface/Views/TimelineView.css:
(.timeline-view > .data-grid .indeterminate-progress-spinner):
Styles for grid cell progress spinners.
* UserInterface/Views/Variables.css:
(:root):
Added --error-text-color variable to remove duplication.
2016-03-02 Matt Baker <mattbaker@apple.com>
Web Inspector: Timelines UI redesign: relocate recording controls to TimelineTabContentView's content browser
https://bugs.webkit.org/show_bug.cgi?id=153532
<rdar://problem/24361611>
Reviewed by Timothy Hatcher.
This patch shifts UI controller responsibilities from the sidebar panel
to the tab content view. Controls for starting/stopping the recording and
switching view modes are now located in the tab's navigation bar, as is
the hidden tree outline of open timeline recordings.
* Localizations/en.lproj/localizedStrings.js:
New UI strings. Renamed view-mode radio buttons located from the sidebar
to "Events" and "Frames". UI for switching modes isn't final, and the
labels may change or be removed entirely in favor of image-only buttons.
* UserInterface/Main.html:
New file.
* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView.prototype.contentBrowserTreeElementForRepresentedObject):
(WebInspector.ContentBrowserTabContentView.prototype.treeElementForRepresentedObject):
Allow subclasses to override behavior for retrieving the tree element
for a represented object. Default behavior delegates the implementation
to the navigation sidebar.
(WebInspector.ContentBrowserTabContentView.prototype._contentBrowserCurrentContentViewDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
(WebInspector.ContentBrowserTabContentView):
(WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObjectInNavigationSidebar): Deleted.
Renamed to _revealAndSelectRepresentedObject as it's no longer specific
to the sidebar.
* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView):
(WebInspector.TabContentView.prototype.restoreStateFromCookie):
(WebInspector.TabContentView.prototype.saveStateToCookie):
A navigation sidebar shouldn't be required to save/restore cookie state.
* UserInterface/Views/TimelineTabContentView.css: Added.
(.timeline.tab.content-view .navigation-bar > .item.toggle-navigation-sidebar.activate.button):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop:hover):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop:active):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop *):
(.timeline.tab.content-view .navigation-bar > .item.radio):
Styles for new navigation items: record button and view mode radio buttons.
* UserInterface/Views/TimelineTabContentView.js:
Logic for maintaining the timeline recording hierarchy and the state
of the active recording has been added to the tab content view.
(WebInspector.TimelineTabContentView):
(WebInspector.TimelineTabContentView.prototype.shown):
(WebInspector.TimelineTabContentView.prototype.hidden):
(WebInspector.TimelineTabContentView.prototype.canShowRepresentedObject):
Objects other than recordings are no longer shown in the tab's content
browser. Displaying other objects (such as timeline resources) in the
content browser will be addressed in a follow-up patch: https://bugs.webkit.org/show_bug.cgi?id=154920.
(WebInspector.TimelineTabContentView.prototype.get supportsSplitContentBrowser):
(WebInspector.TimelineTabContentView.prototype.restoreFromCookie):
(WebInspector.TimelineTabContentView.prototype.saveToCookie):
Persist view state that was previously located in the sidebar.
(WebInspector.TimelineTabContentView.prototype.treeElementForRepresentedObject):
Implements logic previously limited to the navigation sidebar. Only tree
elements for timeline recordings are supported, since other represented
objects (timeline resources) no longer have content tree outline tree elements.
(WebInspector.TimelineTabContentView.prototype._capturingStartedOrStopped):
(WebInspector.TimelineTabContentView.prototype._toggleRecordingOnSpacebar):
(WebInspector.TimelineTabContentView.prototype._toggleNewRecordingOnSpacebar):
(WebInspector.TimelineTabContentView.prototype._toggleRecording):
(WebInspector.TimelineTabContentView.prototype._recordButtonClicked):
(WebInspector.TimelineTabContentView.prototype._recordingsTreeSelectionDidChange):
(WebInspector.TimelineTabContentView.prototype._recordingCreated):
(WebInspector.TimelineTabContentView.prototype._addRecording):
(WebInspector.TimelineTabContentView.prototype._recordingCountChanged):
(WebInspector.TimelineTabContentView.prototype._recordingLoaded):
Implementations copied from the sidebar panel.
(WebInspector.TimelineTabContentView.prototype._recordingSelected):
Implementation similar to that which existed in the sidebar panel, except
that logic related to instruments isn't needed. Updates to timeline view
filters will be implemented in a follow-up patch: https://bugs.webkit.org/show_bug.cgi?id=154924.
(WebInspector.TimelineTabContentView.prototype._viewModeSelected):
This method is now limited to the handling of the radio button event only.
Additional logic which existed in the sidebar panel's implementation has
been pushed into _changeViewMode, which does the actual work of toggling
view modes.
(WebInspector.TimelineTabContentView.prototype._changeViewMode):
Updates the current view mode state. If triggered by a user selection (was
called by the radio button event handler), the correct timeline view for
the new mode is shown.
(WebInspector.TimelineTabContentView.prototype._showTimelineViewForType):
Helper function for showing the view for the specified timeline type, if
the timeline exists in the current recording. Otherwise the overview timeline
view is displayed.
(WebInspector.TimelineTabContentView.prototype._displayedContentViewNavigationItemsDidChange):
Keep the view mode in sync with the content browser.
(WebInspector.TimelineTabContentView.prototype._getTimelineForCurrentContentView):
Helper function for getting the currently displayed timeline.
2016-03-02 Matt Baker <mattbaker@apple.com>
Web Inspector: Timelines UI redesign: add the timelines tree outline to the TimelineOverview
https://bugs.webkit.org/show_bug.cgi?id=153034
<rdar://problem/24195628>
Reviewed by Timothy Hatcher.
Move the Timelines tree outline to the overview, in preparation for <https://webkit.org/b/153036>.
* UserInterface/Views/OverviewTimelineView.css:
(.timeline-view.overview > .timeline-ruler > .header): Deleted.
(.timeline-view.overview > .timeline-ruler > .event-markers): Deleted.
These are now part of the default ruler style.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > .tree-outline.timelines):
(.timeline-overview > .tree-outline.timelines::before):
(body.window-inactive .timeline-overview > .tree-outline.timelines):
(.timeline-overview.frames > .tree-outline.timelines):
(.timeline-overview > .tree-outline.timelines .close-button):
(.timeline-overview > .tree-outline.timelines .item.selected .close-button):
(.timeline-overview > .tree-outline.timelines .item:not(.selected):nth-child(even)):
(.timeline-overview > .tree-outline.timelines .item:not(.selected):not(:first-child)):
(.timeline-overview > .tree-outline.timelines .item.selected + .item):
(body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item):
(.timeline-overview > .tree-outline.timelines :focus .item.selected + .item):
(.timeline-overview > .scroll-container):
(.timeline-overview.frames > .scroll-container):
(.timeline-overview > .timeline-ruler):
(.timeline-overview.frames > .timeline-ruler):
(.timeline-overview > .timeline-ruler > .markers):
(.timeline-overview > .graphs-container):
(.timeline-overview.frames > .graphs-container):
Styles for the timelines tree outline. A content element is inserted before the
tree to fill the gap created by the timeline ruler. For now the tree has a fixed
width of 185px, and is hidden when displaying the FPS instrument.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.get selectedTimeline):
(WebInspector.TimelineOverview.prototype.set selectedTimeline):
Make the selected timeline accessible to the parent view, since the overview doesn't
have a "represented object", or receive ContentView change notifications.
(WebInspector.TimelineOverview.prototype._instrumentAdded):
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
(WebInspector.TimelineOverview.prototype._viewModeDidChange):
Add and remove instrument tree elements. Each tree element is created with a height
equal to it's overview graph, and is shown/hidden based on the current view mode.
(WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange):
Update the selected timeline and dispatch change event.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype._timelineSelected):
Sync the overview's timeline selection with the current ContentView's represented object.
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .header):
(.timeline-ruler > .header > .divider > .label):
(.timeline-ruler > .selection-drag):
(.timeline-ruler > .selection-handle):
Ruler height changed to 23px, to be consistent with the DataGrid header.
* UserInterface/Views/TreeOutline.css:
(.tree-outline.large .item .icon):
Large icon style updated to match TimelineSidebarPanel.css. The 32px
size is outdated and no longer used.
* UserInterface/Views/Variables.css:
(:root):
New color variables, used by TimelineOverview.css.
2016-02-29 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add direct number inputs to Bezier editor
https://bugs.webkit.org/show_bug.cgi?id=154809
<rdar://problem/24881465>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector._updateWindowKeydownListener):
Now only adds the shared event listener when the first keydown listener
is added via WebInspector.addWindowKeydownListener
* UserInterface/Controllers/CodeMirrorBezierEditingController.js:
(WebInspector.CodeMirrorBezierEditingController.prototype.popoverDidDismiss):
* UserInterface/Controllers/CodeMirrorEditingController.js:
(WebInspector.CodeMirrorEditingController.prototype.popoverDidDismiss):
(WebInspector.CodeMirrorEditingController.prototype.didDismissPopover):
Added function that is called when the popover is dismissed so that
removing event listeners is possible.
* UserInterface/Views/BezierEditor.css:
(.bezier-editor):
(.bezier-editor > .number-input-container):
(.bezier-editor > .number-input-container > input):
* UserInterface/Views/BezierEditor.js:
(WebInspector.BezierEditor.createControl):
(WebInspector.BezierEditor.createBezierInput):
(WebInspector.BezierEditor):
Added usage of Element.prototype.createChild for ease of readability.
Also added input elements for manually changing the values of each bezier
point's x and y values.
(WebInspector.BezierEditor.prototype.set bezier):
(WebInspector.BezierEditor.prototype.removeListeners):
(WebInspector.BezierEditor.prototype._handleMousedown):
(WebInspector.BezierEditor.prototype._updateBezier):
(WebInspector.BezierEditor.prototype._updateBezierPreview):
(WebInspector.BezierEditor.prototype._triggerPreviewAnimation):
(WebInspector.BezierEditor.prototype._handleNumberInputInput):
(WebInspector.BezierEditor.prototype._handleNumberInputKeydown):
(WebInspector.BezierEditor.prototype._changeBezierForInput):
Refactored code to make it more reusable, as well as adding event listeners
to the newly created inputs, including value chaning from the arrow keys.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.didDismissPopover): Deleted.
Removed unused code.
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch):
(WebInspector.InlineSwatch.prototype.didDismissPopover):
Removes any global event listeners added by the current editor if able.
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
Now saves the current editor object as a member variable.
2016-02-28 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: DataGrid's resizers aren't horizontally centered
https://bugs.webkit.org/show_bug.cgi?id=154787
<rdar://problem/24876901>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DataGrid.css:
(.data-grid .resizer):
Use CSS transforms as margin-left doesn't support sub-pixel values.
2016-02-26 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Increase clickable area of the console prompt
https://bugs.webkit.org/show_bug.cgi?id=154719
<rdar://problem/24854538>
Reviewed by Timothy Hatcher.
Clicking on the area around CodeMirror element now moves
focus to the console prompt.
* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole.prototype._handleMouseDown):
Only capture mousedown events on .quick-console.
Don't capture clicks on CodeMirror.
* UserInterface/Views/QuickConsole.css:
(.quick-console > .console-prompt):
(.quick-console > .console-prompt > .CodeMirror):
Make sure .console-prompt is never an event.target for _handleMouseDown.
2016-02-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused member variables from overview graphs
https://bugs.webkit.org/show_bug.cgi?id=154774
Reviewed by Timothy Hatcher.
* UserInterface/Views/LayoutTimelineOverviewGraph.js:
(WebInspector.LayoutTimelineOverviewGraph.prototype.reset):
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph.prototype.reset):
2016-02-26 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r196741): Web Inspector: Bottom section of Layers sidebar is 1px shorter than the console prompt
https://bugs.webkit.org/show_bug.cgi?id=154773
<rdar://problem/24873345>
Reviewed by Timothy Hatcher.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
(.sidebar > .panel.details.layer-tree > .content):
(.panel.details.layer-tree .bottom-bar):
2016-02-26 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Custom transition bezier curve editor preview should loop when not editing curve
https://bugs.webkit.org/show_bug.cgi?id=154738
<rdar://problem/24861563>
Reviewed by Timothy Hatcher.
Added extra frames to bezier preview animation to allow it to infinitely
repeat without being jarring to watch.
* UserInterface/Views/BezierEditor.css:
(.bezier-editor > .bezier-preview-timing.animate):
(@keyframes bezierPreview):
* UserInterface/Views/BezierEditor.js:
2016-02-26 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Keyboard controls to nudge control points in custom transition bezier curve editor would be nice
https://bugs.webkit.org/show_bug.cgi?id=154739
<rdar://problem/24861498>
Reviewed by Timothy Hatcher.
Adds ability for user to nudge the most recently selected bezier control
handle by using the arrow keys. Also makes the currently selected bezier
control line snap to an axis, which is defined when the user mouses down,
whenever the mouse is dragged while the shift key is pressed.
* UserInterface/Views/BezierEditor.js:
(WebInspector.BezierEditor):
(WebInspector.BezierEditor.prototype.handleKeydownEvent):
(WebInspector.BezierEditor.prototype._handleMouseup):
(WebInspector.BezierEditor.prototype._updateControlPointsForMouseEvent):
2016-02-26 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Option-clicking on the a CSS property sometimes doesn't work
https://bugs.webkit.org/show_bug.cgi?id=154384
<rdar://problem/24714755>
Reviewed by Timothy Hatcher.
It seems as though there were race conditions between CodeMirror's event
and the native mousemove such that if CodeMirror fired second, the current
candidate was cleared, and would not reset itself until the cursor was
moved, at which point the same issue could happen. To fix this, the current
candidate is no longer cleared by CodeMirror's event and is instead only
modified by the native mouse-events.
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._hidePopover):
2016-02-25 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Unify selected item colors
https://bugs.webkit.org/show_bug.cgi?id=154668
<rdar://problem/24832178>
Reviewed by Timothy Hatcher.
Use the same CSS variable color for all selected items.
* UserInterface/Views/TreeOutline.css:
(.tree-outline:matches(:focus, .force-focus) .item.selected):
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item.selected):
* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item.selected):
* UserInterface/Views/VisualStyleTabbedPropertiesRow.css:
(.visual-style-tabbed-properties-row > .visual-style-tabbed-properties-row-container > button.selected):
2016-02-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Expose Proxy target and handler internal properties to Inspector
https://bugs.webkit.org/show_bug.cgi?id=154663
Reviewed by Timothy Hatcher.
* UserInterface/Models/NativeFunctionParameters.js:
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
Improve the native parameter list for the global Reflect object methods.
Include "enumerate" even though it is deprecated, because we implement it.
2016-02-24 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual Styles sidebar should support multiple animations
https://bugs.webkit.org/show_bug.cgi?id=154546
<rdar://problem/24773861>
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection):
Set additional flags on the optional properties of transition to ensure
that the initial value of a new row is not considered invalid.
(WebInspector.VisualStyleDetailsPanel.prototype._populateAnimationSection):
Added a comma-separated keyword list to provide support for multiple
animations per rule.
2016-02-24 Timothy Hatcher <timothy@apple.com>
Web Inspector: Remove unused Profile.png images
https://bugs.webkit.org/show_bug.cgi?id=154647
rdar://problem/24820825
Reviewed by Brian Burg.
* UserInterface/Images/Profile.png: Removed.
* UserInterface/Images/Profile@2x.png: Removed.
* UserInterface/Images/gtk/Profile.png: Removed.
* UserInterface/Images/gtk/Profile@2x.png: Removed.
* UserInterface/Views/TimelineIcons.css:
(.profile-icon .icon): Deleted.
2016-02-24 Matt Baker <mattbaker@apple.com>
Web Inspector: TimelineViews should use the recording's end time when entire ruler range is selected
https://bugs.webkit.org/show_bug.cgi?id=154644
<rdar://problem/24818442>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
Update current timeline view when entire range selected.
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
Live-update the OverviewTimelineView during recording when entire range selected.
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewSelection):
Update timeline view start and end times. When entire range selected, use the recording
end time or current time (while capturing).
2016-02-24 Timothy Hatcher <timothy@apple.com>
Follow up fix for the TimelineRuler "select all" mode to fix zeroTime.
https://bugs.webkit.org/show_bug.cgi?id=154561
rdar://problem/24779872
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.set zeroTime): Change selectionStartTime
before _zeroTime so the check for entireRangeSelected still works.
2016-02-24 Matt Baker <mattbaker@apple.com>
Web Inspector: TimelineRuler should have a "select all" mode
https://bugs.webkit.org/show_bug.cgi?id=154561
<rdar://problem/24779872>
Reviewed by Timothy Hatcher.
TimelineRuler is initialized with a selected range of [0, Number.MAX_VALUE),
indicating the entire timeline is selected. This patch makes it possible to
return the ruler to this state, after being overwritten by a custom selection.
When no custom selection exists, the selection handles are hidden.
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler.selection-hidden > :matches(.selection-drag, .selection-handle, .shaded-area)):
Style for hiding selection controls as needed.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler):
Represent unbounded selection interval as [0, Number.MAX_VALUE).
(WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
Register double-click event listener.
(WebInspector.TimelineRuler.prototype.set zeroTime):
(WebInspector.TimelineRuler.prototype.get entireRangeSelected):
(WebInspector.TimelineRuler.prototype.selectEntireRange):
Let clients check and set the selection of the entire range without needing
to use the internal sentinel values 0 and Number.MAX_VALUE.
(WebInspector.TimelineRuler.prototype._updateSelection):
Update ruler styles and dispatch selection change event when entire
range is selected.
(WebInspector.TimelineRuler.prototype._handleDoubleClick):
If a user-defined selection exists, select the entire range.
2016-02-24 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Dim selected items when docked Inspector window is inactive
https://bugs.webkit.org/show_bug.cgi?id=154526
<rdar://problem/24764365>
Abstract selected item and SVG glyph colors into CSS variables.
Reviewed by Timothy Hatcher.
* UserInterface/Views/BezierEditor.css:
(.bezier-editor > .bezier-preview > div):
* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button > .glyph):
(.navigation-bar .item.button:not(.disabled):active > .glyph):
(.navigation-bar .item.button:not(.disabled):matches(:focus, .activate.activated, .radio.selected) > .glyph):
(.navigation-bar .item.button:not(.disabled):active:matches(:focus, .activate.activated, .radio.selected) > .glyph):
(.navigation-bar .item.button.disabled > .glyph):
* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph):
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover):
* UserInterface/Views/ConsoleMessageView.css:
(.console-user-command.special-user-log > .console-message-text):
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li.pseudo-class-enabled > .selection::before):
* UserInterface/Views/Main.css:
(input[type=range]::-webkit-slider-runnable-track::before):
* UserInterface/Views/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only:hover):
(.navigation-bar .item.radio.button.text-only.selected):
(.navigation-bar .item.radio.button.text-only:active):
(.navigation-bar .item.radio.button.text-only.selected:active):
* UserInterface/Views/ScopeBar.css:
(.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows):
(.scope-bar > li:hover):
(.scope-bar > li.selected):
(.scope-bar > li:active):
(.scope-bar > li.selected:active):
* UserInterface/Views/Variables.css:
(:root):
(body.window-inactive):
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section .details-section.has-set-property > .header > span::after):
* UserInterface/Views/VisualStyleKeywordIconList.css:
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon:matches(.computed, .selected)):
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected):
2016-02-23 Dan Bernstein <mitz@apple.com>
[Xcode] Linker errors display mangled names, but no longer should
https://bugs.webkit.org/show_bug.cgi?id=154632
Reviewed by Sam Weinig.
* Configurations/Base.xcconfig: Stop setting LINKER_DISPLAYS_MANGLED_NAMES to YES.
2016-02-22 Matt Baker <mattbaker@apple.com>
Web Inspector: Timelines sidebar and overview attempt to access undefined properties when FPS instrument is absent
https://bugs.webkit.org/show_bug.cgi?id=154567
<rdar://problem/24781536>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
The viewMode property should be in a valid state before attempting
to access the current view mode settings.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.get minimumWidth):
(WebInspector.TimelineSidebarPanel.prototype._updateViewModeIfNeeded):
(WebInspector.TimelineSidebarPanel):
Added missing checks for FPSInstrument support.
2016-02-22 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r196620): Web Inspector: Filter bar in the left sidebar is 1px shorter than the console prompt
https://bugs.webkit.org/show_bug.cgi?id=154529
Reviewed by Timothy Hatcher.
* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .overflow-shadow):
2016-02-20 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Opacity slider thumb sometimes goes past the bar in Visual Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=154497
Reviewed by Timothy Hatcher.
Since WebInspector.Slider uses CSS transforms to move the slider knob
along the track, if the width of the track changes then the position
of the knob would stay the same since it was translated instead of
adjusting its position relative to the new width.
* UserInterface/Views/Slider.js:
(WebInspector.Slider.prototype.recalculateKnobX):
Resets the maxX value to 0 to ensure that a new maxX is calculated with
the current width.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set specifiedWidth): Deleted.
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.recalculateWidth):
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange):
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
(WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection):
* UserInterface/Views/VisualStyleUnitSlider.js:
(WebInspector.VisualStyleUnitSlider.prototype.recalculateWidth):
2016-02-20 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual Styles: Modifying background expands Font section
https://bugs.webkit.org/show_bug.cgi?id=154491
<rdar://problem/24755440>
Reviewed by Timothy Hatcher.
When the user selects a new style, the Visual sidebar examines the property
editors in each subsection to see if any have a value and expands/collapses
the subsection accordingly. This issue was happening because that logic was
also being triggered when the user didn't select a new style, which is
controlled by DOMNodeStyles and the significantChange value in refresh().
* UserInterface/Base/Utilities.js:
(String.prototype.toCamelCase):
Added utility function to transform a string into a camel-cased version.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
Dropped unused variable and added checks to make sure doubly-matching styles
don't count as a significant change and cause refreshes of the styles sidebar.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
If this function has an event, meaning it was triggered by a newly selected
selector in the selector section, loop through each subsection and perform
the logic described above, but instead only to open sections.
(WebInspector.VisualStyleDetailsPanel.prototype._generateSection.replaceDashWithCapital): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
Removed logic that was already being called by _sectionModified().
2016-02-20 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Text Align segmented control blinks while editing other properties in Visual Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=154487
<rdar://problem/24754703>
Reviewed by Timothy Hatcher.
The icon list property editor blinking issue was caused by the fact that
the selected value was toggled on/off each time the value was set on the
editor. In order to prevent this, the logic for the setter value() was
modified to just match a keyword icon to the given value and select it.
* UserInterface/Views/VisualStyleKeywordIconList.js:
(WebInspector.VisualStyleKeywordIconList.prototype.set value):
(WebInspector.VisualStyleKeywordIconList.prototype._handleKeywordChanged):
2016-02-20 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Placeholder text in Visual Styles sidebar table row should be white
https://bugs.webkit.org/show_bug.cgi?id=154488
<rdar://problem/24754715>
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle):
2016-02-19 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Inherited selector rows have text too low
https://bugs.webkit.org/show_bug.cgi?id=154489
<rdar://problem/24754774>
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleSelectorSection.css:
(.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider):
2016-02-19 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Color picker in Visual Styles sidebar should not default to zero alpha
https://bugs.webkit.org/show_bug.cgi?id=154474
<rdar://problem/24750217>
Reviewed by Timothy Hatcher.
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch.prototype._fallbackValue):
Changed the fallback value for color from transparent to white so that
the color picker starts out with an alpha value of 1.
(WebInspector.InlineSwatch.prototype._handleContextMenuEvent):
Prevents context menu events from having an effect if there is no value
for them to modify.
2016-02-19 Matt Baker <mattbaker@apple.com>
Web Inspector: CSS var() function should be syntax highlighted
https://bugs.webkit.org/show_bug.cgi?id=154406
<rdar://problem/24726136>
Reviewed by Timothy Hatcher.
* UserInterface/Models/CSSCompletions.js:
Added "var" to CodeMirror value keywords for syntax highlighting.
* UserInterface/Models/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
Added "var" to accepted keywords for auto-completion.
2016-02-18 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Styles Sidebar focus jumps when trying to edit a color
https://bugs.webkit.org/show_bug.cgi?id=154404
<rdar://problem/24725744>
Reviewed by Timothy Hatcher.
Clicking an inline swatch in the CSS Rules sidebar causes any focused
editor, if any, to become blurred and therefore fire its handler function.
This causes an issue because when a CodeMirror instance in the styles
sidebar becomes blurred, it is possible for the entire Rules sidebar to
refresh and recreate all of the sections (r187714), meaning that it will
reselect whatever editor was previously selected before the refresh,
causing the swatch popup to be blurred and therefore dismiss.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorBlurActiveEditor):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.createSwatch):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchBeforeClicked):
Add listener for new event and call to delegate function for handling it.
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
Now fires an event before the clicked logic happens, but still after the
click event is fired on the element.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionBlurActiveEditor):
Clears the previously focused editor so when a reset happens no editor
is refocused.
2016-02-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add Native Parameter Lists to Console prototype functions
https://bugs.webkit.org/show_bug.cgi?id=154419
<rdar://problem/24730314>
Reviewed by Timothy Hatcher.
* UserInterface/Models/NativeFunctionParameters.js:
2016-02-18 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Align console prompt with execution context selector
https://bugs.webkit.org/show_bug.cgi?id=154381
Reviewed by Timothy Hatcher.
* UserInterface/Views/QuickConsole.css:
(.quick-console > .console-prompt > .CodeMirror):
(.quick-console .execution-context):
2016-02-18 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Storage tab navigation bar should fit on a single line
https://bugs.webkit.org/show_bug.cgi?id=152473
<rdar://problem/24023435>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Utilities.js:
(Number.constrain):
Reworked logic to ensure that the returned value is never less than the
given minimum value.
2016-02-17 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: In the styles sidebar, Option-clicking on --css-variable should jump to its definition
https://bugs.webkit.org/show_bug.cgi?id=154082
<rdar://problem/24593361>
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked.showRangeInSourceCode):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
Now tests to see if the highlighted token was a CSS variable and if
so, attempts to show the declaration of the CSS variable instead of
the location where it is used.
2016-02-17 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r196620): Web Inspector: DataGrid headers and resizers are misaligned when the scrollbar is visible
https://bugs.webkit.org/show_bug.cgi?id=154280
<rdar://problem/24670567>
Reviewed by Timothy Hatcher.
Revert back to "overflow-y: overlay".
* UserInterface/Views/DataGrid.css:
(.data-grid .data-container):
* UserInterface/Views/DatabaseContentView.css:
(.storage-view.query):
2016-02-17 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r196620): Web Inspector: When the scrollbars are always visible, the console prompt is 1px taller
https://bugs.webkit.org/show_bug.cgi?id=154328
<rdar://problem/24692996>
Introduce a CSS variable to ensure that the quick console is the
same height as the bottom right section of the styles sidebar.
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .options-container):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container):
* UserInterface/Views/QuickConsole.css:
(.quick-console):
* UserInterface/Views/Variables.css:
(:root):
2016-02-17 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add Context menu separators to Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=154360
Reviewed by Joseph Pecoraro.
In the Styles sidebar, there are three main sections for the context menu:
- Copy and Duplicate/Show-source
- Add pseudo-class rules
- Add/Select pseudo-element rules
These three sections were all put together in the same context menu, which
was very crowded as a result. Separators have been added to make it so that
these three sections are now separated and clearly show their different uses.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2016-02-17 Matt Baker <mattbaker@apple.com>
Web Inspector: add CSS variables for common border/background colors
https://bugs.webkit.org/show_bug.cgi?id=154302
<rdar://problem/24680944>
Reviewed by Timothy Hatcher.
Added CSS variables for commonly used border and background colors, and removed
duplicate CSS variables with less generic names. Inactive border colors declared in
rules with a body.window-inactive selector have been removed. A new rule using this
selector in Variables.css sets "--border-color" to the inactive color.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content > .pseudo-classes):
(.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
(.sidebar > .panel.details.css-style > .content.filter-in-progress .style-declaration-section:not(.filter-section-has-label)):
* UserInterface/Views/DataGrid.css:
(.data-grid.inline):
(.data-grid th):
(.data-grid :matches(th, td):not(:last-child)):
(body.window-inactive .data-grid th): Deleted.
(body.window-inactive .data-grid :matches(th, td):not(:last-child)): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts):
* UserInterface/Views/DetailsSection.css:
(.details-section):
(.details-section .details-section:first-child):
(.details-section > .header):
(.details-section > .content > .group):
(.details-section > .content > .group:nth-child(even) > .row:matches(.simple:first-child > *, :not(.simple):first-child)):
* UserInterface/Views/FilterBar.css:
(.filter-bar):
* UserInterface/Views/FindBanner.css:
(.find-banner):
(body.window-inactive .find-banner): Deleted.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
(.panel.details.layer-tree .bottom-bar):
* UserInterface/Views/Main.css:
(body.docked.bottom):
(body.docked.right):
(#split-content-browser):
(#split-content-browser > .navigation-bar):
(body.window-inactive.docked.bottom): Deleted.
(body.window-inactive.docked.right): Deleted.
(body.window-inactive #split-content-browser): Deleted.
* UserInterface/Views/MemoryCategoryView.css:
(.memory-category-view):
(.memory-category-view > .details):
(body.window-inactive .memory-category-view): Deleted.
(body.window-inactive .memory-category-view > .details): Deleted.
* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory):
(.timeline-view.memory > .content > .overview):
(.timeline-view.memory > .content > .details > .subtitle):
(.timeline-view.memory > .content > .overview > .divider):
(body.window-inactive .timeline-view.memory): Deleted.
(body.window-inactive .timeline-view.memory > .content > .overview): Deleted.
(body.window-inactive .timeline-view.memory > .content > .details > .subtitle): Deleted.
(body.window-inactive .timeline-view.memory > .content > .overview > .divider): Deleted.
* UserInterface/Views/NavigationBar.css:
(.navigation-bar):
(body.window-inactive .navigation-bar): Deleted.
* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .overflow-shadow):
(body.window-inactive .sidebar > .panel.navigation > .overflow-shadow): Deleted.
* UserInterface/Views/NetworkSidebarPanel.css:
(.sidebar > .panel.navigation.network > .title-bar):
(body.window-inactive .sidebar > .panel.navigation.network > .title-bar): Deleted.
* UserInterface/Views/OverviewTimelineView.css:
(.timeline-view.overview > .timeline-ruler > .header):
(body.window-inactive .timeline-view.overview > .timeline-ruler > .header): Deleted.
* UserInterface/Views/QuickConsole.css:
(.quick-console):
(body.window-inactive .quick-console): Deleted.
* UserInterface/Views/Sidebar.css:
(.sidebar):
(.sidebar.left):
(.sidebar.right):
(body.window-inactive .sidebar.left): Deleted.
(body.window-inactive .sidebar.right): Deleted.
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline th):
(body.window-inactive .data-grid.timeline th): Deleted.
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .header):
(body.window-inactive .timeline-ruler > .header): Deleted.
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .title-bar):
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events):
(body.window-inactive .sidebar > .panel.navigation.timeline > .title-bar): Deleted.
(body.window-inactive .sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted.
* UserInterface/Views/Toolbar.css:
(body.latest-mac .toolbar .dashboard-container):
* UserInterface/Views/Variables.css:
(:root):
(body.window-inactive *):
* UserInterface/Views/VisualStyleSelectorSection.css:
(.details-section.visual-style-selector-section:not(.collapsed) > .header):
(.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider):
2016-02-17 Matt Baker <mattbaker@apple.com>
Web Inspector: Add singular and plural cases for "Ignore n times before stopping" label in breakpoint editor
https://bugs.webkit.org/show_bug.cgi?id=154335
<rdar://problem/24655491>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
Added string for singular ignore count.
* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
Remove unused variable "this._ignoreCount" and update ignore count text.
(WebInspector.BreakpointPopoverController.prototype._popoverIgnoreInputChanged):
Update ignore count text as value changes.
(WebInspector.BreakpointPopoverController.prototype._updateIgnoreCountText):
Set singular text when count === 1, otherwise set plural text.
2016-02-16 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r196620): Web Inspector: Selecting last message in the console makes the scrollbar visible
https://bugs.webkit.org/show_bug.cgi?id=154326
<rdar://problem/24692717>
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.css:
(.console-item.selected::after):
Make sure the selected message marker (blue vertical line) doesn't
go over the content view.
2016-02-16 Joseph Pecoraro <pecoraro@apple.com>
JSContext Inspector: Support for inline source maps
https://bugs.webkit.org/show_bug.cgi?id=154303
<rdar://problem/24670392>
Reviewed by Timothy Hatcher.
* UserInterface/Base/URLUtilities.js:
(parseDataURL):
Break a data URL into components.
* UserInterface/Controllers/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
Handle a data URL without using NetworkAgent. Also move references
to a main frame after checking for NetworkAgent.
* UserInterface/Models/SourceMap.js:
(WebInspector.SourceMap.prototype.get sourceMappingBasePathURLComponents):
* UserInterface/Models/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.get sourceMapDisplaySubpath):
Handle JavaScript debuggable script URLs which may not be complete URLs.
(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
Also handle if NetworkAgent does not exist.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
When connected to a JavaScript debuggable we were hiding disclosure
triangles as we did not expect resources to have subresources. If
a SourceMap is added, show them again.
2016-02-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Increase the width of the find banner's search field
https://bugs.webkit.org/show_bug.cgi?id=154284
Reviewed by Timothy Hatcher.
* UserInterface/Views/FindBanner.css:
(.find-banner > input[type="search"]):
Keep the minimum width the same as the current width.
(body .find-banner.console-find-banner):
Overwrite ".navigation-bar .item {flex-wrap: nowrap}".
2016-02-15 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Non-overlay scrollbars obscure the ends of lines in the console and sidebars
https://bugs.webkit.org/show_bug.cgi?id=154276
Reviewed by Timothy Hatcher.
* UserInterface/Views/DataGrid.css:
(.data-grid .data-container):
* UserInterface/Views/DatabaseContentView.css:
(.storage-view.query):
* UserInterface/Views/LogContentView.css:
(.content-view.log):
Replace all occurrences of "overflow-y: overlay" with "overflow-y: auto".
2016-02-15 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual sidebar minor regression fixes
https://bugs.webkit.org/show_bug.cgi?id=154237
<rdar://problem/24653135>
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder):
Do not display the placeholder, as it is not used in comma separated value
property editors.
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle::before):
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle): Deleted.
Added ::before to get rid of the "-" on subtitle elements (r196266).
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange):
Recalculates the width for all comma separated value elements (r196266).
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
Only open/close sections with properties that have values when a new node
or selector item is selected.
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
Make copies of the default unit lists to prevent modifying the values used
later in other sections (r194728).
2016-02-15 Matt Baker <mattbaker@apple.com>
Web Inspector: eliminate the linear and rendering frames TimelineOverview subclasses
https://bugs.webkit.org/show_bug.cgi?id=154000
<rdar://problem/24553105>
Reviewed by Timothy Hatcher.
This patch eliminates the TimelineOverview subclasses, and moves logic for switching between
a time-based or frame-based graph into the overview itself. The values of the overview's start
time, current time, and end time now match the values in the timeline recording regardless of the
current view mode. When viewing the rendering frames graph, the recording times are ignored and
all frames are included. The overview maintains separate zoom level and ruler selection settings
for each view mode.
* UserInterface/Main.html:
* UserInterface/Views/LinearTimelineOverview.js: Removed.
* UserInterface/Views/RenderingFrameTimelineOverview.js: Removed.
Removed TimelineOverview subclasses.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.get height):
Set FPS graph height to 108 pixels.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:nth-child(even)):
(.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:not(:first-child)):
(.timeline-overview > .graphs-container > .timeline-overview-graph:nth-child(even)): Deleted.
(.timeline-overview > .graphs-container > .timeline-overview-graph:not(:first-child)): Deleted.
Disable alternating graph styles when showing FPS instrument.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Create separate settings for timelines and FPS view modes.
(WebInspector.TimelineOverview.prototype.get viewMode):
(WebInspector.TimelineOverview.prototype.set viewMode):
(WebInspector.TimelineOverview.prototype.set startTime):
Adjust the current ruler selection when start time changes. Not necessary
when showing the FPS instrument, which doesn't have a start time.
(WebInspector.TimelineOverview.prototype.get secondsPerPixel):
(WebInspector.TimelineOverview.prototype.set secondsPerPixel):
Now a wrapper around the corresponding view mode setting.
(WebInspector.TimelineOverview.prototype.set pixelAlignDuration):
(WebInspector.TimelineOverview.prototype.get scrollStartTime):
(WebInspector.TimelineOverview.prototype.set scrollStartTime):
Now a wrapper around the corresponding view mode setting.
(WebInspector.TimelineOverview.prototype.get visibleDuration):
(WebInspector.TimelineOverview.prototype.get height):
Return the sum height of all visible overview graphs.
(WebInspector.TimelineOverview.prototype.shown):
Show overview graphs for the current view mode.
(WebInspector.TimelineOverview.prototype.hidden):
(WebInspector.TimelineOverview.prototype.reset):
(WebInspector.TimelineOverview.prototype.recordWasFiltered):
(WebInspector.TimelineOverview.prototype.selectRecord):
(WebInspector.TimelineOverview.prototype.updateLayoutIfNeeded):
(WebInspector.TimelineOverview.prototype.layout):
Layout for both view modes is largely identical, and differs only in the treatment
of the overview's start time, current time, and end time. Time-based instruments
use time values from the recording, while the FPS instrument has a fixed start time
of zero, and a current and end time pinned to the last rendering frame.
(WebInspector.TimelineOverview.prototype._handleScrollEvent):
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
(WebInspector.TimelineOverview._handleGestureStart):
(WebInspector.TimelineOverview.prototype._handleGestureChange):
(WebInspector.TimelineOverview.prototype._instrumentAdded):
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
(WebInspector.TimelineOverview.prototype._timelineRulerMouseClicked):
(WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
Save the selection for the current view mode.
(WebInspector.TimelineOverview.prototype._recordSelected):
(WebInspector.TimelineOverview.prototype._resetSelection.reset):
(WebInspector.TimelineOverview.prototype._resetSelection):
(WebInspector.TimelineOverview.prototype._canShowTimelineType):
(WebInspector.TimelineOverview.prototype._viewModeDidChange):
Sets zoom level, ruler selection, and graph visibility based on current view mode.
(WebInspector.TimelineOverview.prototype._createViewModeSettings):
Helper function for creating an object to track the zoom level and ruler
selection of each view mode.
(WebInspector.TimelineOverview.prototype.get _currentSettings):
Internal getter for retrieving the settings for the current view mode.
(WebInspector.TimelineOverview.prototype.canShowTimeline): Deleted.
Not needed now that the overview contains all timelines.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph):
(WebInspector.TimelineOverviewGraph.prototype.shown):
(WebInspector.TimelineOverviewGraph.prototype.hidden):
Toggle CSS hidden class.
* UserInterface/Views/TimelineRecordFrame.js:
No need to query offsetHeight now that TimelineOverviewGraph has a height property.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Create a single timeline overview.
(WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype.shown):
(WebInspector.TimelineRecordingContentView.prototype.hidden):
(WebInspector.TimelineRecordingContentView.prototype.recordWasFiltered):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
Update the timeline overview's mode based on the current timeline view.
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
Removed special handling for the FPS overview.
Removed selection start time adjustment, which is now handled internally by TimelineOverview.
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype._recordingReset):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
(WebInspector.TimelineRecordingContentView.prototype._updateFrameSelection):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie):
(WebInspector.TimelineSidebarPanel.prototype._renderingFrameTimelineTimesUpdated):
(WebInspector.TimelineSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
Refresh the view mode when the content view changes.
(WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
(WebInspector.TimelineSidebarPanel.prototype._viewModeSelected):
(WebInspector.TimelineSidebarPanel.prototype._viewModeForTimeline):
(WebInspector.TimelineSidebarPanel.prototype._updateViewModeIfNeeded):
Sync the tree outline, frames chart, and navigation bar with the current view mode.
(WebInspector.TimelineSidebarPanel.prototype.shown):
Refreshing the frame selection is unnecessary. It's updated by the recording content
view whenever the ruler selection changes.
(WebInspector.TimelineSidebarPanel.prototype.get viewMode): Deleted.
No longer public, since the timeline overview now owns the view mode. Internally the sidebar
still tracks the current state so it can determine when the value has changed.
(WebInspector.TimelineSidebarPanel.prototype.showTimelineOverview):
(WebInspector.TimelineSidebarPanel.prototype.showTimelineViewForTimeline):
The sidebar should only be synced to the overview after the content view has changed.
(WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection):
Removed unnecessary assertion.
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode): Deleted.
Replaced by _updateViewModeIfNeeded.
2016-02-15 Timothy Hatcher <timothy@apple.com>
Web Inspector: Show inherited CSS variables in the Style sidebar
https://bugs.webkit.org/show_bug.cgi?id=154215
rdar://problem/24644058
Reviewed by Joseph Pecoraro.
* UserInterface/Models/CSSProperty.js:
(WebInspector.CSSProperty.isInheritedPropertyName): Added.
(WebInspector.CSSProperty.prototype.update): Use WebInspector.CSSProperty.isInheritedPropertyName.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): Use WebInspector.CSSProperty.isInheritedPropertyName.
2016-02-15 Timothy Hatcher <timothy@apple.com>
Web Inspector: Sidebars are defaulting to their minimum width, instead of a good width
https://bugs.webkit.org/show_bug.cgi?id=154218
rdar://problem/24644192
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel): Default the setting value to 300 instead of 0, so the minimum isn't used.
2016-02-15 Timothy Hatcher <timothy@apple.com>
Web Inspector: CSS variables are not formatted correctly
https://bugs.webkit.org/show_bug.cgi?id=154217
rdar://problem/24644154
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CodeMirrorFormatters.js:
(newlineBeforeToken): Check for `variable-2` token in the `maybeprop` state.
2016-02-15 Timothy Hatcher <timothy@apple.com>
Web Inspector: CodeMirror styles needs updated for CSS variables
https://bugs.webkit.org/show_bug.cgi?id=154216
rdar://problem/24644146
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
(.cm-s-default .cm-m-css:matches(.cm-atom, .cm-meta, .cm-variable-2, .cm-variable-3, .cm-property)): Added .cm-variable-2.
(.cm-s-default .basic-block-has-not-executed.cm-m-css:matches(.cm-atom, .cm-meta, .cm-variable-2, .cm-variable-3, .cm-property)): Ditto.
2016-02-13 Dan Bernstein <mitz@apple.com>
Removed the unused Frameworks group.
Rubber-stamped by Sam Weinig.
* WebInspectorUI.xcodeproj/project.pbxproj:
2016-02-13 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: DataGrid Header Cells should have Context Menu for Sorting
https://bugs.webkit.org/show_bug.cgi?id=154050
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.set sortOrder):
(WebInspector.DataGrid.prototype._toggledSortOrder):
Returns the opposite sort order from the current order.
(WebInspector.DataGrid.prototype._selectSortColumnAndSetOrder):
Changes the selected column to the one with the specified identifier and
then switches the sort order to the given order.
(WebInspector.DataGrid.prototype._headerCellClicked):
Moved logic for switching cells/sort-order to a separate function for
better reusability.
(WebInspector.DataGrid.prototype._contextMenuInHeader):
Adds context menu items on DataGrid header items to change the current
sort order to the specified order. If the context menu is on the selected
header item, only show the sort order that is not currently applied.
2016-02-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Rename domAgent to domTreeManager in DOMNode
https://bugs.webkit.org/show_bug.cgi?id=154194
Reviewed by Timothy Hatcher.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode):
2016-02-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Avoid including ESLint until it is used
https://bugs.webkit.org/show_bug.cgi?id=154196
Reviewed by Timothy Hatcher.
* Scripts/copy-user-interface-resources.pl:
Do not include ESLint in optimized output yet.
* UserInterface/Controllers/AnalyzerManager.js:
Do not reference `eslint` until we use it.
* UserInterface/Main.html:
Remove include to ESLint until we need it.
2016-02-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Tabs: Conflicts with multiple Formatters per SourceCode
https://bugs.webkit.org/show_bug.cgi?id=144717
<rdar://problem/20845163>
Reviewed by Timothy Hatcher.
The underlying issue here is that each tab may create its own ContentView,
and therefore SourceCodeTextEditor, per-SourceCode. Each SourceCodeTextEditor
was mutating the SourceCode's state without listening for or expecting
updates from the other. This causes a bunch of different issues:
- editing in one tab does not get reflected in another tab for
the same resource. This is common when using the Search tab
to find and make an edit, then debug in another tab.
- one tab may auto format (pretty print) a resource and set
the formatter on the SourceCode to make SourceCodeLocations
know about formatted locations. However, a jump to location
that opens a new ContentView for the same Resource will
start out un-formatted, and misunderstand the location.
This often results in an unexpected jump to 0:0.
The solution taken by this change is to have a single ContentView
per represented object. When that ContentView gets shown in a new
ContentViewContainer it gets transferred, leaving a tombstone in the
previous ContentViewContainer that can be revived later. This keeps
back foward lists with expected values. It also means there is a
single ContentView that doesn't need to worry about having the
state of its represented object getting overrun.
Currently this makes the assumption that we won't ever show multiple
ContentViews for the same represented object at the same time. This
may need to change if we were to support split pane editor or
something like that.
This also makes the assumption that ContentViewContainer's showEntry
and hideEntry do not modify the back forward list. That has not been
the case, and I think it is safe to assume it will never be the case.
The contracts this patch maintains:
- a ContentView is always owned by one ViewContainer.
This ViewContainer is the one showing the ContentView.
- when another ViewContainer wants to share the ContentView
ownership is transferred. Creating tombstones in the old
ViewContainer and Reviving tombstones in the new ViewContainer.
- ViewContainer's have a tombstone per-BackForwardEntry that
references the ContentView.
- In order to ensure a ContentView always gets closed, when
the owning ViewContainer would close the ContentView it
checks if it should instead transfer ownership of the
ContentView to another interested ViewContainer.
This also maintains the contract that a ContentView should only be
closed once. When the ContentView is transferred between two
ContentViewContainers it should hide/show from the old to the new.
The last ContentViewContainer to reference a ContentView should
be the one to close the ContentView.
* UserInterface/Models/BackForwardEntry.js:
(WebInspector.BackForwardEntry):
(WebInspector.BackForwardEntry.prototype.get tombstone):
(WebInspector.BackForwardEntry.prototype.set tombstone):
(WebInspector.BackForwardEntry.prototype.prepareToShow):
(WebInspector.BackForwardEntry.prototype.prepareToHide):
Tombstone state and assertions that we don't show/hide tombstones,
that should all be done before a back forward entry has become a tombstone.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.contentViewForRepresentedObject):
(WebInspector.ContentView.closedContentViewForRepresentedObject):
(WebInspector.ContentView.resolvedRepresentedObjectForRepresentedObject):
Helpers for getting / creating / clearing the single ContentView that
is associated with a represented object.
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.contentViewForRepresentedObject):
(WebInspector.ContentViewContainer.prototype.showContentView):
Eliminate code that dealt with multiple content views per represented object.
That is replaced by multiple ContentViewContainers per ContentView.
(WebInspector.ContentViewContainer.prototype.replaceContentView):
This is called in special places where we don't need to worry about a tombstone.
It is an in replace of a content view.
(WebInspector.ContentViewContainer.closeAllContentViewsOfPrototype):
(WebInspector.ContentViewContainer.prototype.closeContentView):
(WebInspector.ContentViewContainer.prototype.closeAllContentViews):
(WebInspector.ContentViewContainer.prototype._disassociateFromContentView):
Deal with closing BackForwardEntrys that are tombstones.
(WebInspector.ContentViewContainer.prototype._takeOwnershipOfContentView):
(WebInspector.ContentViewContainer.prototype._placeTombstonesForContentView):
(WebInspector.ContentViewContainer.prototype._clearTombstonesForContentView):
Helpers for transfering ownership of a ContentView to a ContentViewContainer.
There is always one owner of the ContentView. Non-owners have tombstone
BackForward entries.
(WebInspector.ContentViewContainer.prototype._showEntry):
If we are showing a tombstone, gain ownership.
(WebInspector.ContentViewContainer.prototype._hideEntry):
This may happen in closing, for simplicity we bail here instead of include
messy logic at the call site. We would have already hidden this entry
when making it a tombstone.
2016-02-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: SourceCodeTextEditor close() generates removeEventListener warnings
https://bugs.webkit.org/show_bug.cgi?id=154150
Reviewed by Timothy Hatcher.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.close):
Remove the event listeners in the cases that we would have added them.
If we have SourceMap information we should remove the key listener,
and if we don't we should remove the SourceMapAdded listener.
2016-02-10 Timothy Hatcher <timothy@apple.com>
Web Inspector: Add new icon for the Timeline Recording navigation bar item
https://bugs.webkit.org/show_bug.cgi?id=154089
rdar://problem/24595652
Reviewed by Brian Burg.
* UserInterface/Images/Stopwatch.png: Removed.
* UserInterface/Images/Stopwatch@2x.png: Removed.
* UserInterface/Images/Stopwatch.svg: Added.
* UserInterface/Views/TimelineIcons.css:
(.stopwatch-icon .icon): Use Stopwatch.svg.
(body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon): Added for GTK+.
2016-02-10 Matt Baker <mattbaker@apple.com>
Web Inspector: Switching actions in Edit Breakpoint popover causes a jerk
https://bugs.webkit.org/show_bug.cgi?id=154093
<rdar://problem/24597869>
Reviewed by Timothy Hatcher.
Adjusted CodeMirror eval editor styles to match vanilla input field.
* UserInterface/Views/BreakpointActionView.css:
(.breakpoint-action-eval-editor):
2016-02-09 Joseph Pecoraro <pecoraro@apple.com>
Regression: Web Inspector: Sometimes in Elements panel two elements showed as selected at the same time
https://bugs.webkit.org/show_bug.cgi?id=149742
<rdar://problem/24492481>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.moveChild):
Since removing and re-adding this tree element may forgot its
entire child tree, re-select the selected child that may have
just been lost in the shuffle.
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline.prototype._forgetTreeElement):
When forgetting the selected tree element, also deselect the
forgotten tree element so it clears its selected state.
2016-02-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Allow copying all headers in the request/response header tables
https://bugs.webkit.org/show_bug.cgi?id=154048
<rdar://problem/24576302>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Copy Table" string.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype._contextMenuInHeader):
Add context menu support for table header cells, and give them a
"Copy Table" context menu if there is copyable data.
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
Add "Copy Table" context menu for copyable rows.
(WebInspector.DataGrid.prototype._copyTextForDataGridNode):
(WebInspector.DataGrid.prototype._copyTextForDataGridHeaders):
(WebInspector.DataGrid.prototype._copyTable):
(WebInspector.DataGrid.prototype._hasCopyableData):
Helpers for determining copyability and copying tab separated data.
2016-02-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: localStorage inspector very slow on big values
https://bugs.webkit.org/show_bug.cgi?id=123750
<rdar://problem/15384930>
Reviewed by Timothy Hatcher.
It is not useful to show very large strings in the DOM Storage DataGrid.
This change truncates display strings to roughly 200 characters. If the
developer really wants the full value of the string they can just access
it through localStorage.
* UserInterface/Models/DOMStorageObject.js:
(WebInspector.DOMStorageObject.prototype.getEntries.innerCallback):
(WebInspector.DOMStorageObject.prototype.getEntries):
(WebInspector.DOMStorageObject.prototype.itemUpdated):
Modernize.
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
(WebInspector.DOMStorageContentView.prototype.itemRemoved):
Modernize.
(WebInspector.DOMStorageContentView.prototype.itemAdded):
(WebInspector.DOMStorageContentView.prototype.itemUpdated):
(WebInspector.DOMStorageContentView.prototype._truncateValue):
(WebInspector.DOMStorageContentView.prototype._populate):
Whenever we get a value that we will display, truncate it to
just 200 characters.
2016-02-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Expiration column in Storage tab can't be sorted
https://bugs.webkit.org/show_bug.cgi?id=154043
<rdar://problem/24572272>
Reviewed by Brian Burg.
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._sortDataGrid.expiresCompare):
Sort Session as the shortest time, not the longest time. Use the
cookie.expires date when sorting, not the locale string.
2016-02-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Limit max and min zoom factor of Inspector
https://bugs.webkit.org/show_bug.cgi?id=154041
<rdar://problem/24571326>
Reviewed by Brian Burg.
Chose reasonable zoom levels that looked good to my eye and
roughly matched Safari's page zoom levels.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Do not implicitly prevent default for zoom in/out keyboard shortcuts to
allow for a system beep if we do not do anything.
(WebInspector._increaseZoom):
(WebInspector._decreaseZoom):
Do not go beyond a max or min zoom level. Prevent default in the case
where we actually zoom, but don't prevent default where we do not
actually zoom to cause a system beep. Allow for a slight drift of
the floating point value as it increases / decreases by 0.2 at the
different zoom factors.
(WebInspector._resetZoom):
(WebInspector._showTabAtIndex):
Remove redundant prevent default calls, since it would happen
implicitly for these keyboard shortcuts.
2016-02-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught exception merging script profiler records
https://bugs.webkit.org/show_bug.cgi?id=154004
Reviewed by Brian Burg.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords):
Stop if we've merged all script profiler records.
2016-02-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Search doesn't seem to find text that is present in multiple places
https://bugs.webkit.org/show_bug.cgi?id=154016
<rdar://problem/23391307>
Reviewed by Brian Burg.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get searchableScripts):
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.performSearch):
Only search scripts with a URL. Don't search the potentially
large number of anonymous scripts.
2016-02-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Zooming in on the timeline graph does not increase its time resolution from minutes
https://bugs.webkit.org/show_bug.cgi?id=154013
<rdar://problem/23844527>
Reviewed by Brian Burg.
* UserInterface/Base/Utilities.js:
(Number.secondsToString):
Simplify logic and ensure that when under high resolution we
don't go above seconds for our units.
(Number.bytesToString):
Simplify logic.
* UserInterface/Views/LinearTimelineOverview.js:
(WebInspector.LinearTimelineOverview):
Reduce the rather large maximum seconds per pixel from 60 seconds
per pixel to 2 seconds per pixel. This means when the user zooms
out of a timeline they don't see such large time values.
2016-02-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Extract a few common unicode characters into global variables
https://bugs.webkit.org/show_bug.cgi?id=154008
Reviewed by Timothy Hatcher.
* UserInterface/Base/Utilities.js:
Create global variables for `emDash` and `ellipsis` to use all over the tools.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameterAsTable): Deleted.
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView.prototype._updateDisplay):
* UserInterface/Views/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent.prototype._updateElementTitleAndText):
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption):
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement):
* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout):
* UserInterface/Views/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype.set layer):
* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
(WebInspector.LayoutTimelineDataGridNode):
* UserInterface/Views/MemoryCategoryView.js:
(WebInspector.MemoryCategoryView.prototype._updateDetails): Deleted.
(WebInspector.MemoryCategoryView): Deleted.
* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype._clearUsageLegend):
(WebInspector.MemoryTimelineView.prototype._updateUsageLegend):
(WebInspector.MemoryTimelineView.prototype._clearMaxComparisonLegend):
(WebInspector.MemoryTimelineView.prototype._updateMaxComparisonLegend):
* UserInterface/Views/MultipleScopeBarItem.js:
(WebInspector.MultipleScopeBarItem.set scopeBarItems.createOption):
(WebInspector.MultipleScopeBarItem.prototype.set scopeBarItems):
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
* UserInterface/Views/ProfileNodeDataGridNode.js:
(WebInspector.ProfileNodeDataGridNode.prototype.createCellContent):
(WebInspector.ProfileNodeDataGridNode):
* UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
(WebInspector.RenderingFrameTimelineDataGridNode):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Deleted.
(WebInspector.ResourceDetailsSidebarPanel.prototype._valueForSize): Deleted.
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ScriptTimelineDataGridNode):
* UserInterface/Views/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement.truncateAndHighlightTitle):
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.createCellContent):
* UserInterface/Views/TypeTreeElement.js:
(WebInspector.TypeTreeElement.prototype.onpopulate):
* UserInterface/Views/TypeTreeView.js:
(WebInspector.TypeTreeView.prototype._populate):
(WebInspector.TypeTreeView):
2016-02-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ⇧⌘→ when editing text in the Elements tree shouldn't switch inspector tab
https://bugs.webkit.org/show_bug.cgi?id=154006
<rdar://problem/22892489>
Reviewed by Timothy Hatcher.
* UserInterface/Views/EditingSupport.js:
(WebInspector.isEventTargetAnEditableField):
Check the WebInspector's custom __editing state.
2016-02-08 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Long values for comma separated CSS properties overflow the Visual sidebar area
https://bugs.webkit.org/show_bug.cgi?id=153890
<rdar://problem/24510216>
Reviewed by Timothy Hatcher.
For especially long values in comma-separated CSS properties (such as
background-image), the text will not be clipped as expected due to the
way in which the width is calculated for the element (the value, inside
the title element, is the only child with a specified width other than
100%). This overflowing causes the width of the section containing that
property to expand, pushing content outside of the inspector window. To
remedy this, a specified width is set on the relevant properties based
on the width of the sidebar to ensure proper text clipping.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item.visual-style-font-family-list-item > .visual-style-comma-separated-keyword-item-editor):
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles):
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle):
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container): Deleted.
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list): Deleted.
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item): Deleted.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set specifiedWidth):
Calculates the necessary subtractions from the given width value based on
the margins and size of sibling elements.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFontSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection):
Added another list to each group which, if set, will pass the current
sidebar width to all contained property editors.
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype.update):
Somewhat unrelated (r196146), but added another check to ensure that the
CSS property exists before checking to see if it has an invalid value.
2016-02-08 Matt Baker <mattbaker@apple.com>
Web Inspector: WebInspector.Setting should have a "reset" method
https://bugs.webkit.org/show_bug.cgi?id=153971
<rdar://problem/24544101>
Reviewed by Brian Burg.
Currently UI needing to restore a setting to its default must retain a copy
of the default value. This should be a basic operation of WebInspector.Setting.
* UserInterface/Base/Setting.js:
(WebInspector.Setting):
(WebInspector.Setting.prototype.reset):
Sets value to a copy of the default.
2016-02-06 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r195432): Web Inspector: bottom right section of the styles sidebar is 1px taller than the console prompt
https://bugs.webkit.org/show_bug.cgi?id=153959
<rdar://problem/24541053>
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .options-container):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container)::
Revert the height to what it used to be prior r195432.
2016-02-05 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual Styles sidebar should be more forgiving to long labels
https://bugs.webkit.org/show_bug.cgi?id=153927
<rdar://problem/24343897>
Reviewed by Timothy Hatcher.
If a label is too long for it's container, it overflows and is visible
above the rest of the elements nearby.
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container > .visual-style-property-title):
Adds text overflow to properties that extend beyond the container's width.
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):
Now also adds the label value as a title attribute to the element, just in
case the content overflows.
2016-02-05 Saam barati <sbarati@apple.com>
Web Inspector: Include SamplingProfiler's expression-level data for stack frames in the protocol
https://bugs.webkit.org/show_bug.cgi?id=153455
<rdar://problem/24335884>
Reviewed by Joseph Pecoraro.
JSC has been collecting expression-level data in the sampling
profiler, and with this patch, we now get that information
in the inspector. With this information, we probably have
all the data we need to make real heat maps.
* UserInterface/Models/CallingContextTree.js:
(WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
(WebInspector.CCTNode):
(WebInspector.CCTNode.prototype.findOrMakeChild):
(WebInspector.CCTNode.prototype.addTimestampAndExpressionLocation):
(WebInspector.CCTNode.prototype.addTimestamp): Deleted.
2016-02-05 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Navigation bar in sidebars should always fit on a single line
https://bugs.webkit.org/show_bug.cgi?id=153412
<rdar://problem/24318706>
Reviewed by Timothy Hatcher.
This happened because the allowed maximum width of the sidebar was greater
than the minimum width derived from the currently visible sidebar.
* UserInterface/Base/Utilities.js:
(Number.constrain):
Added logic to reverse the values of min and max if max is less than min.
2016-02-05 Timothy Hatcher <timothy@apple.com>
Web Inspector: Don't wrap labels in Breakpoint Editor popover
https://bugs.webkit.org/show_bug.cgi?id=153926
rdar://problem/24149542
Reviewed by Brian Burg.
* UserInterface/Views/BreakpointPopoverController.css:
(.popover .edit-breakpoint-popover-content > table > tr > th): Added white-space: nowrap.
2016-02-05 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Replace all instances of '%s' with “%s“
https://bugs.webkit.org/show_bug.cgi?id=153891
<rdar://problem/24510236>
Reviewed by Timothy Hatcher.
Switched all WebInspector.UIString() from using '' to ““.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype.update):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):
2016-02-05 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r193913): Web Inspector: Wrong z-index of inner sections
https://bugs.webkit.org/show_bug.cgi?id=153914
Reviewed by Timothy Hatcher.
* UserInterface/Views/DetailsSection.css:
(.details-section .details-section > .header):
2016-02-05 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Decrease font-weight of inner sections
https://bugs.webkit.org/show_bug.cgi?id=153913
<rdar://problem/24520326>
Reviewed by Timothy Hatcher.
* UserInterface/Views/DetailsSection.css:
(.details-section .details-section > .header):
2016-02-04 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: console.table background stripes are misaligned
https://bugs.webkit.org/show_bug.cgi?id=152954
<rdar://problem/24197735>
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.css:
(.console-item .data-grid table.data):
(.console-item .data-grid table.data tr:nth-child(even)):
Replace CSS gradient that produces fixed height stripes with
a rule that sets background only on even table rows.
2016-02-04 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed, follow-up fix to r196151 that removes some more images.
* UserInterface/Images/Colors.png: Removed.
* UserInterface/Images/Colors@2x.png: Removed.
* UserInterface/Images/Network.png: Removed.
* UserInterface/Images/Network@2x.png: Removed.
* UserInterface/Images/Script.png: Removed.
* UserInterface/Images/Script@2x.png: Removed.
These images were supposed to also be removed.
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
Also remove references to now removed images.
2016-02-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: New timeline images for instruments
https://bugs.webkit.org/show_bug.cgi?id=153884
<rdar://problem/24509429>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.iconClassNameForTimeline):
Better names and give Memory timeline a name for an icon.
* UserInterface/Views/TreeOutline.css:
(.tree-outline.large .item .icon):
Add more padding next to large icons.
* UserInterface/Images/ColorsLarge.png: Removed.
* UserInterface/Images/ColorsLarge@2x.png: Removed.
* UserInterface/Images/Frames.png: Removed.
* UserInterface/Images/Frames@2x.png: Removed.
* UserInterface/Images/LayoutInstrument.svg: Added.
* UserInterface/Images/MemoryInstrument.svg: Added.
* UserInterface/Images/NetworkInstrument.svg: Added.
* UserInterface/Images/NetworkLarge.png: Removed.
* UserInterface/Images/NetworkLarge@2x.png: Removed.
* UserInterface/Images/RenderingFramesInstrument.svg: Added.
* UserInterface/Images/ScriptLarge.png: Removed.
* UserInterface/Images/ScriptLarge@2x.png: Removed.
Remove old timeline pngs.
* UserInterface/Images/ScriptsInstrument.svg: Added.
* UserInterface/Views/TimelineIcons.css:
(.network-icon .icon):
(.script-icon .icon):
(.memory-icon .icon):
(.layout-icon .icon):
(.rendering-frame-icon .icon):
Use the new SVGs.
(body:not(.mac-platform, .windows-platform) .network-icon .icon):
(body:not(.mac-platform, .windows-platform) .network-icon.large .icon):
(body:not(.mac-platform, .windows-platform) .layout-icon .icon):
(body:not(.mac-platform, .windows-platform) .layout-icon.large .icon):
(body:not(.mac-platform, .windows-platform) .script-icon .icon):
(body:not(.mac-platform, .windows-platform) .script-icon.large .icon):
(body:not(.mac-platform, .windows-platform) .rendering-frame-icon .icon):
Fallback to old icons for non-Mac/Windows ports using Images/gtk images.
2016-02-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Show error icons if invalid values already exist for properties in the Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=153702
<rdar://problem/24424025>
Reviewed by Timothy Hatcher.
When CSS properties have invalid values, instead of displaying the computed
value for that property in the Visual sidebar, show an error icon with the
the invalid value.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleNumberInputBox.css:
(.visual-style-property-container > .visual-style-property-value-container > .number-input-container > .number-input-value):
(.visual-style-property-container > .visual-style-property-value-container > .visual-style-special-property-placeholder[hidden] ~ .number-input-container > .number-input-value):
By default, do not allow any pointer events to interact with the input element.
Instead, only allow interaction when the placeholder element is hidden to ensure
that the user cannot add a value when the computed value is displayed.
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set specialPropertyPlaceholderElementText):
Reset the selected keyword to "Unchanged" since this is either a warning
message or the computed value.
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency):
(.visual-style-property-container > .visual-style-property-editor-warning.invalid-value):
(.visual-style-property-container > .visual-style-property-editor-warning):
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):
Replaced document.createElement with [element].createChild for simplicity.
(WebInspector.VisualStylePropertyEditor.prototype.update):
Before assigning the value of the property to the editor, check to see if
the property is valid. If not, display an Error icon and message stating
that the current value is invalid.
(WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
(WebInspector.VisualStylePropertyEditor.prototype.set specialPropertyPlaceholderElementText):
Unhides the special placeholder element with the given text as its content.
(WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
(WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
(WebInspector.VisualStylePropertyEditor.prototype.addDependency):
2016-02-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JS PrettyPrinting unary - and + issues
https://bugs.webkit.org/show_bug.cgi?id=134007
<rdar://problem/17351953>
Reviewed by Timothy Hatcher.
* UserInterface/Views/CodeMirrorFormatters.js:
(shouldHaveSpaceBeforeToken):
(shouldHaveSpaceAfterLastToken):
(removeLastNewline):
(modifyStateForTokenPre):
(modifyStateForTokenPost):
2016-02-03 Dave Hyatt <hyatt@apple.com>
Add hanging-punctuation property to Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=153841
Reviewed by Zalan Bujtas.
* UserInterface/Models/CSSKeywordCompletions.js:
2016-02-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught exception TimelineRuler.prototype.resize no longer exists
https://bugs.webkit.org/show_bug.cgi?id=153839
Reviewed by Brian Burg.
* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype.shown):
After r195995 the resize method was eliminated in favor of this approach.
2016-02-02 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: TypeError: undefined is not an object (evaluating 'highlightedRange.from')
https://bugs.webkit.org/show_bug.cgi?id=153685
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype.highlightRange):
The highlighted range could have just gotten removed, in which case the
marker would return undefined. Just bail in such cases.
2016-02-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Option+Up/Down should not move cursor outside of number
https://bugs.webkit.org/show_bug.cgi?id=153784
<rdar://problem/24453133>
Reviewed by Timothy Hatcher.
* UserInterface/Views/CodeMirrorAdditions.js:
When selectionStart === selectionEnd we were duplicating the
movement mutation by performing it twice on the same object.
After much experimentation, I left in the existing code path
for handling mutation with a selection. It is not perfect,
but it is better then just applying the ch diff.
2016-02-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: High Level Memory Overview Instrument
https://bugs.webkit.org/show_bug.cgi?id=153516
<rdar://problem/24356378>
Reviewed by Brian Burg.
Use the new "Memory" domain to track page memory size over time.
This allows the timeline to help visualize total process memory
broken down into a few different categories. The timeline graph
allows seeing the total size over time, and you can drill in to
a specific section and get a better breakdown and comparison
of the different categories of memory that we currently track.
* Localizations/en.lproj/localizedStrings.js:
New UI strings.
* UserInterface/Main.html:
New files.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Protocol/MemoryObserver.js:
(WebInspector.MemoryObserver.prototype.trackingStart):
(WebInspector.MemoryObserver.prototype.trackingUpdate):
(WebInspector.MemoryObserver.prototype.trackingComplete):
Add a memory observer.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.defaultInstruments):
(WebInspector.TimelineManager.prototype.memoryTrackingStart):
(WebInspector.TimelineManager.prototype.memoryTrackingUpdate):
(WebInspector.TimelineManager.prototype.memoryTrackingComplete):
Create Memory timeline records from Memory tracking updates.
* UserInterface/Models/MemoryCategory.js:
(WebInspector.MemoryCategory):
Consolidate some of the raw data of categories we get from the backend
into a set of 4 user-facing categories.
* UserInterface/Models/MemoryTimelineRecord.js: Added.
(WebInspector.MemoryTimelineRecord):
(WebInspector.MemoryTimelineRecord.memoryCategoriesFromProtocol):
(WebInspector.MemoryTimelineRecord.prototype.get timestamp):
(WebInspector.MemoryTimelineRecord.prototype.get categories):
(WebInspector.MemoryTimelineRecord.prototype.get totalSize):
(WebInspector.MemoryTimelineRecord.prototype.get startTime):
(WebInspector.MemoryTimelineRecord.prototype.get endTime):
Memory timeline record for the event data.
* UserInterface/Models/MemoryInstrument.js:
(WebInspector.MemoryInstrument):
(WebInspector.MemoryInstrument.supported):
(WebInspector.MemoryInstrument.prototype.get timelineRecordType):
(WebInspector.MemoryInstrument.prototype.startInstrumentation):
(WebInspector.MemoryInstrument.prototype.stopInstrumentation):
Instrument to start / stop memory tracking.
* UserInterface/Models/TimelineRecord.js:
Add a new "Memory" Timeline type.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
Add the new "Memory" Timeline.
(WebInspector.TimelineRecording.prototype.addRecord):
Memory timeline records do not show in the SourceCode Timelines Overview.
* UserInterface/Views/CircleChart.css:
(.circle-chart):
(.circle-chart > svg > path.background):
(.circle-chart > .center):
* UserInterface/Views/CircleChart.js: Added.
(WebInspector.CircleChart):
(WebInspector.CircleChart.prototype.get element):
(WebInspector.CircleChart.prototype.get points):
(WebInspector.CircleChart.prototype.get size):
(WebInspector.CircleChart.prototype.get centerElement):
(WebInspector.CircleChart.prototype.get segments):
(WebInspector.CircleChart.prototype.set segments):
(WebInspector.CircleChart.prototype.get values):
(WebInspector.CircleChart.prototype.set values):
(WebInspector.CircleChart.prototype.clear):
(WebInspector.CircleChart.prototype.needsLayout):
(WebInspector.CircleChart.prototype.updateLayout):
(WebInspector.CircleChart.prototype._needsLayout):
(WebInspector.CircleChart.prototype._createCompleteCirclePathData):
(WebInspector.CircleChart.prototype._createSegmentPathData):
(WebInspector.CircleChart.prototype._updateLayout):
Standalone circle "donut" chart, copied mostly from Rendering Frames Timeline.
Initialize the chart's segments, then feed it a set of ([v1, v2, ...]) values
corresponding to each of the segments.
* UserInterface/Views/LineChart.js: Added.
(WebInspector.LineChart):
(WebInspector.LineChart.prototype.get element):
(WebInspector.LineChart.prototype.get points):
(WebInspector.LineChart.prototype.get size):
(WebInspector.LineChart.prototype.set size):
(WebInspector.LineChart.prototype.addPoint):
(WebInspector.LineChart.prototype.clear):
(WebInspector.LineChart.prototype.needsLayout):
(WebInspector.LineChart.prototype.updateLayout):
(WebInspector.LineChart.prototype._needsLayout):
(WebInspector.LineChart.prototype._updateLayout):
Standalone line chart. Uses a single SVG path, given a set of (x, y) points.
* UserInterface/Views/StackedLineChart.js: Added.
(WebInspector.StackedLineChart):
(WebInspector.StackedLineChart.prototype.get element):
(WebInspector.StackedLineChart.prototype.get points):
(WebInspector.StackedLineChart.prototype.get size):
(WebInspector.StackedLineChart.prototype.set size):
(WebInspector.StackedLineChart.prototype.initializeSections):
(WebInspector.StackedLineChart.prototype.addPointSet):
(WebInspector.StackedLineChart.prototype.clear):
(WebInspector.StackedLineChart.prototype.needsLayout):
(WebInspector.StackedLineChart.prototype.updateLayout):
(WebInspector.StackedLineChart.prototype._needsLayout):
(WebInspector.StackedLineChart.prototype._updateLayout):
Standalone stacked line chart. Initialize the chart's sections,
then feed it a set of (x, [y1, y2 ...]) points where the y
values correspond to each of the sections.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.get scrollContainerWidth):
Add a way to get this value without forcing layout all the time.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.displayNameForTimeline):
(WebInspector.TimelineTabContentView.iconClassNameForTimeline):
(WebInspector.TimelineTabContentView.genericClassNameForTimeline):
(WebInspector.TimelineTabContentView.iconClassNameForRecord):
(WebInspector.TimelineTabContentView.displayNameForRecord):
Add placeholders for the new Memory Timeline Type.
* UserInterface/Views/MemoryCategoryView.css:
(.memory-category-view):
(.memory-category-view > .details):
(.memory-category-view > .details > .name):
(.memory-category-view > .graph):
* UserInterface/Views/MemoryCategoryView.js: Added.
(WebInspector.MemoryCategoryView):
(WebInspector.MemoryCategoryView.prototype.get element):
(WebInspector.MemoryCategoryView.prototype.get category):
(WebInspector.MemoryCategoryView.prototype.clear):
(WebInspector.MemoryCategoryView.prototype.layoutWithDataPoints):
(WebInspector.MemoryCategoryView.prototype._updateDetails):
* UserInterface/Views/MemoryTimelineOverviewGraph.css:
(body .timeline-overview > .graphs-container > .timeline-overview-graph.memory):
(.timeline-overview-graph.memory):
(.timeline-overview-graph.memory > .legend):
(.timeline-overview-graph.memory > .stacked-line-chart > svg > path.javascript):
(.timeline-overview-graph.memory > .stacked-line-chart > svg > path.images):
(.timeline-overview-graph.memory > .stacked-line-chart > svg > path.layers):
(.timeline-overview-graph.memory > .stacked-line-chart > svg > path.page):
* UserInterface/Views/MemoryTimelineOverviewGraph.js: Added.
(WebInspector.MemoryTimelineOverviewGraph):
(WebInspector.MemoryTimelineOverviewGraph.prototype.get height):
(WebInspector.MemoryTimelineOverviewGraph.prototype.reset):
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout.timeToX):
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout.sizeToY):
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout.sizesToYs):
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout.ysForRecord):
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout):
(WebInspector.MemoryTimelineOverviewGraph.prototype._updateLegend):
(WebInspector.MemoryTimelineOverviewGraph.prototype._visibleRecords):
(WebInspector.MemoryTimelineOverviewGraph.prototype._memoryTimelineRecordAdded):
* UserInterface/Views/MemoryTimelineView.css: Added.
(.timeline-view.memory):
(.timeline-view.memory > .content):
(.timeline-view.memory > .content > .overview):
(.timeline-view.memory > .content .title):
(.timeline-view.memory > .content .subtitle):
(.timeline-view.memory > .content > .details > .timeline-ruler):
(.timeline-view.memory > .content > .details > .subtitle):
(.timeline-view.memory > .content > .overview > .chart):
(.timeline-view.memory > .content > .overview > .chart > .subtitle):
(.timeline-view.memory > .content > .overview > .chart > .container):
(.timeline-view.memory > .content > .overview > .divider):
(.timeline-view.memory > .content > .overview .max-percentage):
(.timeline-view.memory .legend):
(.timeline-view.memory .legend > .row):
(.timeline-view.memory .legend > .row > .swatch):
(.timeline-view.memory .legend > .row > p):
(.timeline-view.memory .legend > .row > .label):
(.timeline-view.memory .legend > .row > .size):
(.timeline-view.memory .legend > .row > .swatch.javascript):
(.timeline-view.memory .legend > .row > .swatch.images):
(.timeline-view.memory .legend > .row > .swatch.layers):
(.timeline-view.memory .legend > .row > .swatch.page):
(.memory-category-view.javascript .line-chart > svg > path):
(.memory-category-view.images .line-chart > svg > path):
(.memory-category-view.layers .line-chart > svg > path):
(.memory-category-view.page .line-chart > svg > path):
(.timeline-view.memory .legend > .row > .swatch.current):
(.timeline-view.memory .circle-chart > svg > path.current):
(.timeline-view.memory .circle-chart > svg > path.remainder):
* UserInterface/Views/MemoryTimelineView.js: Added.
(WebInspector.MemoryTimelineView):
(WebInspector.MemoryTimelineView.displayNameForCategory):
(WebInspector.MemoryTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.MemoryTimelineView.prototype.shown):
(WebInspector.MemoryTimelineView.prototype.hidden):
(WebInspector.MemoryTimelineView.prototype.closed):
(WebInspector.MemoryTimelineView.prototype.reset):
(WebInspector.MemoryTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.MemoryTimelineView.prototype.layout.timeToX):
(WebInspector.MemoryTimelineView.prototype.layout.sizeToY):
(WebInspector.MemoryTimelineView.prototype.layout.layoutCategoryView):
(WebInspector.MemoryTimelineView.prototype.layout):
(WebInspector.MemoryTimelineView.prototype._clearUsageLegend):
(WebInspector.MemoryTimelineView.prototype._updateUsageLegend):
(WebInspector.MemoryTimelineView.prototype._clearMaxComparisonLegend):
(WebInspector.MemoryTimelineView.prototype._updateMaxComparisonLegend):
(WebInspector.MemoryTimelineView.prototype._visibleRecords):
(WebInspector.MemoryTimelineView.prototype._initializeCategoryViews.appendLegendRow):
(WebInspector.MemoryTimelineView.prototype._initializeCategoryViews):
(WebInspector.MemoryTimelineView.prototype._memoryTimelineRecordAdded):
* UserInterface/Views/Variables.css:
(:root):
Memory timeline view styles.
2016-02-01 Matt Baker <mattbaker@apple.com>
Web Inspector: add a LayoutReason enum to the View base class
https://bugs.webkit.org/show_bug.cgi?id=153731
<rdar://problem/24430938>
Reviewed by Brian Burg.
Added a LayoutReason enum to the View base class, which can be passed as an optional
argument to needsLayout() and updateLayout(). The value is propagated to the view's
subtree during layout.
* UserInterface/Base/Main.js:
Update top-level views with Resize layout reason when window is resized.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._positionHeaderViews):
Update header view with Resize layout reason when column is resized.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.shown):
Assume the view has been resized when shown, and update layout.
(WebInspector.OverviewTimelineView.prototype.updateLayoutForResize): Deleted.
No longer needed, handled by the View base class.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.shown):
Assume the view has been resized when shown, and update layout.
(WebInspector.TimelineOverview.prototype.layout):
Invalidate cached scroll container width if resized.
(WebInspector.TimelineOverview.prototype.updateLayoutForResize): Deleted.
No longer needed, handled by the View base class.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.layout): Deleted.
No longer needed, handled by the View base class.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.needsLayout):
(WebInspector.TimelineRuler.prototype.layout):
Update cached client width if resized.
(WebInspector.TimelineRuler.prototype.resize): Deleted.
Moved resize logic to layout override.
* UserInterface/Views/View.js:
(WebInspector.View):
(WebInspector.View.prototype.updateLayout):
Set layout reason.
(WebInspector.View.prototype.needsLayout):
Set layout reason even if an animation frame has already been scheduled,
since the layout reason could have changed.
(WebInspector.View.prototype._layoutSubtree):
Propagate layout reason to subtree, and reset the value when done.
(WebInspector.View.prototype._setLayoutReason):
Helper method for updating the layout reason. Ensures that LayoutReason.Resize
has priority over the default (LayoutReason.Dirty).
2016-02-01 Matt Baker <mattbaker@apple.com>
Web Inspector: Rendering Frames timeline draws all frame bars at minimum height
https://bugs.webkit.org/show_bug.cgi?id=153736
<rdar://problem/21946301>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
Update the new timeline overview's height before it's shown. Showing the
overview causes the rendering frames graph to do a layout, which requires
the height of the containing view to be a valid value.
2016-02-01 Matt Baker <mattbaker@apple.com>
Web Inspector: DataGridNode should support adding go-to arrow buttons to any cell
https://bugs.webkit.org/show_bug.cgi?id=153733
<rdar://problem/24431813>
Reviewed by Brian Burg.
Provide a way to add go-to arrow buttons to any grid cell from within a
DataGridNode subclass's implementation of createCellContent.
* UserInterface/Views/DataGrid.js:
New event type, GoToArrowClicked.
(WebInspector.DataGridNode.prototype.createGoToArrowButton.buttonClicked):
(WebInspector.DataGridNode.prototype.createGoToArrowButton):
Adds a go-to arrow button to the cell's content element. Clicking the button
dispatches an event on the DataGrid, with event data containing the
DataGridNode and identifier of the cell containing the arrow button.
2016-01-31 Jeremy Jones <jeremyj@apple.com>
Add resize event for HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=125715
Reviewed by Darin Adler.
Add a display name for "resize" event.
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.EventType.displayName):
2016-01-30 Dave Hyatt <hyatt@apple.com>
Add the break-* properties to Web Inspector's completion set
https://bugs.webkit.org/show_bug.cgi?id=153706
Reviewed by Darin Adler.
* UserInterface/Models/CSSKeywordCompletions.js:
2016-01-30 Matt Baker <mattbaker@apple.com>
Web Inspector: Network panel is empty until the window is resized
https://bugs.webkit.org/show_bug.cgi?id=153701
<rdar://problem/24423739>
Reviewed by Timothy Hatcher.
NetworkGridContentView shouldn't prevent a layout from being scheduled
when the network sidebar is collapsed.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView.prototype.needsLayout): Deleted.
Removed View.prototype.needsLayout override that was preventing
layouts from being scheduled as timeline records are added.
2016-01-30 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Object tree parent items are misaligned
https://bugs.webkit.org/show_bug.cgi?id=153699
<rdar://problem/24423683>
Reviewed by Darin Adler.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree .object-tree):
Ensure that toplevel Object preview trees are displayed properly while also
making child trees inline.
* UserInterface/Views/TreeOutline.css:
(.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon):
(.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon): Deleted.
This would apply to all .icon elements contained within a non-parent item,
which is not the desired effect. Instead, this should only apply to only the
.icon element of that particular non-parent item.
2016-01-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add support for variable size timeline graphs
https://bugs.webkit.org/show_bug.cgi?id=153690
<rdar://problem/24421696>
Reviewed by Timothy Hatcher.
* UserInterface/Views/LayoutTimelineDataGrid.js:
(WebInspector.LayoutTimelineDataGrid): Deleted.
Remove unnecessary constructor.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype.set selectedRecord):
Default graph height.
* UserInterface/Views/RenderingFrameTimelineOverview.js:
(WebInspector.RenderingFrameTimelineOverview.prototype.get height):
Custom graph height.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.get height):
Provide a way to get the height of the overview which accumulates graph heights.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
Switch from assuming certain graph heights to asking the overview for its height.
2016-01-29 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Object previews in the Console are misaligned
https://bugs.webkit.org/show_bug.cgi?id=153676
<rdar://problem/24418796>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree .tree-outline.object.compact):
(.object-tree): Deleted.
2016-01-29 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Provide a way to clear the network panel
https://bugs.webkit.org/show_bug.cgi?id=153632
<rdar://problem/23317773>
Reviewed by Timothy Hatcher.
Added a navigation item to the Network tab that resets the network grid's content.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.get navigationItems):
(WebInspector.NetworkGridContentView.prototype._clearNetworkItems):
2016-01-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: WebInspector.Setting should not access localStorage if the value did not change
https://bugs.webkit.org/show_bug.cgi?id=153671
<rdar://problem/24417029>
Reviewed by Brian Burg.
* UserInterface/Base/Setting.js:
(WebInspector.Setting.prototype.set value):
2016-01-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Duplicate tab-types being saved to setting, causing duplicate tabs to be opened
https://bugs.webkit.org/show_bug.cgi?id=153659
<rdar://problem/24413157>
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._rememberOpenTabs):
De-duplicate the setting when building the list of tabs for existing
cases where the setting has duplicates and de-duplicate storing into
the setting, which was causing the issue to begin with.
2016-01-29 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add font-variant-* to the visual styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=148720
<rdar://problem/22569974>
Reviewed by Timothy Hatcher.
Added another subsection to the "Text" section for font-variant-*
properties.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/FontVariantSmallCaps.svg: Removed.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
Added another keyword grouping with the "normal" value since it is used
frequently in multiple subsections.
(WebInspector.VisualStyleDetailsPanel.prototype._populateFontSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFontVariantsSection):
Added the five new font-variant-* properties specified in
<https://webkit.org/blog/5735/css-font-features/>.
(WebInspector.VisualStyleDetailsPanel.prototype._populateTextSpacingSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAnimationSection):
Replaced the hardcoded "normal" keyword with the new grouping.
* UserInterface/Views/VisualStyleKeywordCheckbox.css:
(.visual-style-property-container.keyword-checkbox.font-variant > .visual-style-property-value-container > input::after): Deleted.
2016-01-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Avoid recreating Timeline's DataGridNode data multiple times
https://bugs.webkit.org/show_bug.cgi?id=153608
Reviewed by Timothy Hatcher.
* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.get data):
* UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.get data):
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
Cache the data when we create it the first time.
2016-01-28 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Tabs height should be 2px less to match Safari
https://bugs.webkit.org/show_bug.cgi?id=153581
<rdar://problem/24383501>
Reviewed by Darin Adler.
* UserInterface/Views/TabBar.css:
(.tab-bar):
(.tab-bar > .item):
(.tab-bar > .item.pinned):
Make the new tab button ("+") a square.
2016-01-27 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Don't show hand cursor for edited attribute
https://bugs.webkit.org/show_bug.cgi?id=152211
<rdar://problem/23870523>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/Editing.css:
(.editing, .editing *):
2016-01-27 Saam barati <sbarati@apple.com>
CodeMirror will strip out "\r" from files with "\r\n" as newlines causing our offsets into the file to be incorrect
https://bugs.webkit.org/show_bug.cgi?id=153529
<rdar://problem/24376799>
Reviewed by Timothy Hatcher.
This problem manifested in the type token annotator inserting
tokens in the wrong places. Because our offsets are computed
based on the resource we get from backend, CodeMirror changing
the source text will cause all of our offsets to be incorrect.
* UserInterface/Views/CodeMirrorEditor.js:
(WebInspector.CodeMirrorEditor.create):
(WebInspector.CodeMirrorEditor):
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.set string.update):
(WebInspector.TextEditor.prototype.set string):
2016-01-27 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Regression (r195303) - Changes to TreeOutline break styling of lists in Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=153563
Reviewed by Timothy Hatcher.
Removed duplicate properties and used new methods of TreeOutline to achieve
the desired styling effects.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item.visual-style-font-family-list-item > .visual-style-comma-separated-keyword-item-editor):
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles): Deleted.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item > .icon):
(.item.visual-style-selector-item > .titles):
(.item.visual-style-selector-item > .titles > .subtitle):
(.item.visual-style-selector-item.selected > .titles > .subtitle):
(.item.visual-style-selector-item > .titles > .subtitle::before): Deleted.
2016-01-27 Simon Fraser <simon.fraser@apple.com>
Support CSS3 Images values for the image-rendering property
https://bugs.webkit.org/show_bug.cgi?id=153556
Reviewed by Dean Jackson.
Add "crisp-edges", "pixelated" to the suggestions for image-rendering.
* UserInterface/Models/CSSKeywordCompletions.js:
2016-01-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused FramesLarge.png variants, only the smaller Frames icon is used for the Rendering Frames timeline
https://bugs.webkit.org/show_bug.cgi?id=153523
Reviewed by Timothy Hatcher.
* UserInterface/Images/FramesLarge.png: Removed.
* UserInterface/Images/FramesLarge@2x.png: Removed.
* UserInterface/Images/gtk/FramesLarge.png: Removed.
* UserInterface/Images/gtk/FramesLarge@2x.png: Removed.
* UserInterface/Views/TimelineIcons.css:
(.rendering-frame-icon.large .icon): Deleted.
2016-01-25 Skachkov Oleksandr <gskachkov@gmail.com>
[ES6] Arrow function syntax. Arrow function specific features. Lexical bind "arguments"
https://bugs.webkit.org/show_bug.cgi?id=145132
Reviewed by Saam Barati.
Current patch is implementing lexical bind of arguments, so in this callback we need
to return to ordinary function.
* UserInterface/Base/Object.js:
(WebInspector.Object.singleFireEventListener.let.wrappedCallback):
(WebInspector.Object.singleFireEventListener):
2016-01-25 Saam barati <sbarati@apple.com>
Web Inspector: Have top-level ScriptTimelineDataGridNode events show sample counts
https://bugs.webkit.org/show_bug.cgi?id=153447
<rdar://problem/24334137>
Reviewed by Joseph Pecoraro.
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.prototype.get profile):
(WebInspector.ScriptTimelineRecord.prototype.get callCount):
(WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection):
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
2016-01-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reduce unnecessary forced layouts in TimelineOverview
https://bugs.webkit.org/show_bug.cgi?id=153392
<rdar://problem/24312344>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.layout):
Ignore setting the scrollLeft if we would be setting it to 0.
This helps avoid a forced layout in common cases.
2016-01-25 Johan K. Jensen <jj@johanjensen.dk>
Web Inspector: timelines clear button should be inactive if nothing can be cleared
https://bugs.webkit.org/show_bug.cgi?id=132756
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.shown):
Enable clear button if timeline is not readonly and contains data, when switching timelines.
(WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
Enable clear button when a capturing starts.
(WebInspector.TimelineRecordingContentView.prototype._recordingReset):
Disable clear button after resetting recording.
2016-01-25 Matt Baker <mattbaker@apple.com>
Web Inspector: Timelines: "Timer Installed150ms delay" — no space before the delay number
https://bugs.webkit.org/show_bug.cgi?id=153416
Reviewed by Timothy Hatcher.
Fix for tree element subtitle rule that regressed in https://bugs.webkit.org/show_bug.cgi?id=153146.
* UserInterface/Views/TreeOutline.css:
(.tree-outline .item .alternate-subtitle::before):
Em dash should be inserted before both subtitle types.
2016-01-24 Matt Baker <mattbaker@apple.com>
Web Inspector: add support for placing Views in DataGrid column headers
https://bugs.webkit.org/show_bug.cgi?id=153387
<rdar://problem/24310797>
Reviewed by Timothy Hatcher.
This patch adds a new DataGrid column property, `headerView`, allowing a
custom View object to be placed in a column's header cell. The grid ensures
that the left and right edges of the view are kept in sync as columns are
resized. As most views use absolute positioning and are styled in CSS, the
vertical position and height of the view isn't set by the grid.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.insertColumn):
If the new column includes the `headerView` column data property,
it should take priority over `titleDOMFragment` and title text.
The specified View object is inserted into the DOM under the
column's <th> element, and added as a subview of the data grid.
(WebInspector.DataGrid.prototype.layout):
Update header views after performing default layout.
(WebInspector.DataGrid.prototype._showColumn):
Set `hidden` column property false instead of deleting it.
(WebInspector.DataGrid.prototype._positionHeaderViews):
Update the left and right style positions for all Views embedded in
column header cells, then update their layouts.
(WebInspector.DataGrid.prototype.resizerDragging):
Update header views after column resizers are repositioned.
2016-01-24 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Highlight timeline range handles on hover
https://bugs.webkit.org/show_bug.cgi?id=153395
<rdar://problem/24312364>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .selection-handle.clamped):
Gardening. No need to repeat "1px solid".
(.timeline-ruler > .selection-handle:hover, .timeline-ruler > .selection-handle:active):
":active" pseudo selector is needed to keep the handle highligted while it's being dragged
regardress if the mouse cursor is hovering over it or not.
2016-01-23 Aaron Chu <arona.chu@gmail.com>
Web Inspector: AXI: node-link-list should be collapsible
https://bugs.webkit.org/show_bug.cgi?id=130911
Reviewed by Timothy Hatcher.
Accessibility Inspector: for a very long children node list, only the first 5 nodes are shown.
Remaining nodes are hidden by a "# More…" link by which a user can click to reveal the remainder
of the node list.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.linkListForNodeIds):
* UserInterface/Views/Main.css:
(.expand-list-button):
(.node-link-list, .node-link-list li:not([hidden])):
(.node-link-list, .node-link-list li): Deleted.
2016-01-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reduce unnecessary forced layouts in TimelineRuler
https://bugs.webkit.org/show_bug.cgi?id=153390
<rdar://problem/24312241>
Reviewed by Timothy Hatcher.
TimelineRuler's width rarely changes. It should only need to calculate
its width when added to the DOM or if the content view containing it
has resized and the bounds of the ruler may have changed.
Switch everything in TimelineRuler to using a cached width, and add
an explicit method, resize, to update this width. This eliminated
frequent hangs I was seeing while recording timelines.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.shown):
(WebInspector.OverviewTimelineView.prototype.updateLayoutForResize):
Resize the ruler when the view is shown or resized.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.shown):
(WebInspector.TimelineOverview.prototype.updateLayoutForResize):
Resize the ruler when the view is shown or resized.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.layout):
Inform the current content view of a resize if possible.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.resize):
Update the width.
(WebInspector.TimelineRuler.prototype._recalculate):
(WebInspector.TimelineRuler.prototype._needsMarkerLayout):
(WebInspector.TimelineRuler.prototype._needsSelectionLayout):
(WebInspector.TimelineRuler.prototype._handleMouseMove):
(WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseMove):
Use cached width.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.createCombinedBars): Deleted.
Remove some stale code.
2016-01-22 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Sidebar's should remember their width's
https://bugs.webkit.org/show_bug.cgi?id=153007
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange):
Now calls superclass function.
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.set selectedSidebarPanel):
Now calls _recalculateWidth with the saved width value of the sidebar as
the first parameter.
(WebInspector.Sidebar.prototype.set collapsed):
Now only calls _recalculateWidth if the selected sidebar panel is visible,
seeing as if it is hidden the width is irrelevant.
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel):
Creates a setting object using the panel's identifier to store the current width.
(WebInspector.SidebarPanel.prototype.get savedWidth):
(WebInspector.SidebarPanel.prototype.widthDidChange):
So long as the current width has a value, save it to the setting object.
2016-01-22 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Class toggle add icon flashes when changing nodes
https://bugs.webkit.org/show_bug.cgi?id=153341
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._populateClassToggles):
Changed the way in which the class toggles are repopulated to prevent the
add class icon from being removed and re-added.
2016-01-21 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r195305): Web Inspector: WebInspector.Object can dispatch constructor-level events multiple times
https://bugs.webkit.org/show_bug.cgi?id=153269
<rdar://problem/24253106>
Reviewed by Timothy Hatcher.
Bring back object.hasOwnProperty("_listeners") check.
* UserInterface/Base/Object.js:
(WebInspector.Object.prototype.dispatchEventToListeners.dispatch):
(WebInspector.Object.prototype.dispatchEventToListeners):
(WebInspector.Object):
Check !object._listeners before !object.hasOwnProperty("_listeners")
because !object._listeners is more common case thus we can exit earlier
most of the time.
2016-01-21 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add toggle-able list of classes for each element
https://bugs.webkit.org/show_bug.cgi?id=152678
Reviewed by Timothy Hatcher.
Adds a button to the CSS sidebar that, when toggled, displays a section
directly above it containing all the classes for the selected node that,
when toggled, adds or removes the class from the node.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.callFunction.mycallback):
(WebInspector.RemoteObject.prototype.callFunction):
Add extra handling of arguments to allow nicer looking calls by other classes.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
Changed next-sibling selector (+) to general-sibling selector (~).
(.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
(.sidebar > .panel.details.css-style > .content:not(.supports-new-rule, .has-filter-bar) ~ :matches(.options-container, .class-list-container)):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container[hidden]):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > input[type="checkbox"]):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .add-class-icon):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class:not(.active) > .class-name-input):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container > *:matches(.new-class, .class-toggle)):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
Also changed the few instances of "var" to "let".
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.addEventListeners):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._handleNodeAttributeModified):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._handleNodeAttributeRemoved):
Adds listeners to the DOMNode specifically listening for changes to the
class attribute and repopulates the class toggle list if fired.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._classToggleButtonClicked):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._addClassContainerClicked):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._addClassInputKeyPressed):
If the Enter key is pressed, add a new class equal to the input value.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._addClassInputBlur):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._populateClassToggles):
Loops through all the classes, including previously removed ones, for the
selected node and creates a toggle for each.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName.classNameToggleChanged):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._createToggleForClassName):
Creates a toggle element for the given className and adds it to the container.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode.toggleClass):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass.resolvedNode):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._toggleClass):
Uses the Element.classList to toggle the given className on the selected node.
2016-01-20 Saam barati <sbarati@apple.com>
Web Inspector: Hook the sampling profiler into the Timelines UI
https://bugs.webkit.org/show_bug.cgi?id=152766
<rdar://problem/24066360>
Reviewed by Joseph Pecoraro.
The main change in this patch is to swap in the SamplingProfiler
in place of the LegacyProfiler. To do this, we've created a data
structure called CallingContextTree which aggregates the SamplingProfiler's
data into an easy to manage tree. To see how the data structure works,
consider the following program:
```
function bar() { // run code here for a long time. }
function baz() { // run code here for a long time. }
function foo() { bar(); baz(); }
foo();
```
From this program, we will create a tree like this:
(program)
|
|
foo
| |
/ \
/ \
bar baz
From this type of tree, we can easily create a CPUProfile payload
object. Because the Timelines UI knows how to interact with the
CPUProfile object and display it, we currently map the tree to this object
to make it trivially easy to display the SamplingProfiler's data. In the future,
we may want to find ways to work directly with the CallingContextTree instead
of mapping it into another object.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Main.html:
* UserInterface/Models/CallingContextTree.js: Added.
* UserInterface/Models/ScriptInstrument.js:
* UserInterface/Protocol/ScriptProfilerObserver.js:
* UserInterface/TestStub.html:
* UserInterface/Views/ScriptTimelineView.js:
2016-01-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught exception when logging an Error object
https://bugs.webkit.org/show_bug.cgi?id=153258
<rdar://problem/24249068>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ErrorObjectView.js:
(WebInspector.ErrorObjectView):
Initialize members that are used later for clarity.
(WebInspector.ErrorObjectView.prototype.collapse):
(WebInspector.ErrorObjectView.prototype.expand):
This never has a previewView, remove it.
(WebInspector.ErrorObjectView.prototype.appendTitleSuffix):
Add the suffix ("= $1") after the description and before the
content tree outline.
2016-01-19 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Subclasses of WebInspector.Object shouldn't overwrite this._listeners
https://bugs.webkit.org/show_bug.cgi?id=153268
<rdar://problem/24252766>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Object.js:
(WebInspector.Object.prototype.dispatchEventToListeners):
Add a console.assert.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement):
(WebInspector.BreakpointTreeElement.prototype.onattach):
(WebInspector.BreakpointTreeElement.prototype.ondetach):
* UserInterface/Views/ProbeSetDataGrid.js:
(WebInspector.ProbeSetDataGrid):
(WebInspector.ProbeSetDataGrid.prototype.closed):
* UserInterface/Views/ProbeSetDetailsSection.js:
(WebInspector.ProbeSetDetailsSection):
(WebInspector.ProbeSetDetailsSection.prototype.closed):
Replace all instances of "this._listeners" with "this._listenerSet".
2016-01-19 Timothy Hatcher <timothy@apple.com>
Web Inspector: Add protocol version for iOS 9.3
https://bugs.webkit.org/show_bug.cgi?id=153256
rdar://problem/24247951
Reviewed by Joseph Pecoraro.
* UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: Added.
* Versions/Inspector-iOS-9.3.json: Added.
2016-01-19 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION: Web Inspector: Hovering linkified node references should show node highlight
https://bugs.webkit.org/show_bug.cgi?id=153248
<rdar://problem/24245518>
Reviewed by Timothy Hatcher.
* UserInterface/Base/DOMUtilities.js:
Show the complete node highlight details (colors and node info).
2016-01-19 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: WebInspector.Object.addEventListener is O(n), make it O(1)
https://bugs.webkit.org/show_bug.cgi?id=152422
<rdar://problem/24038047>
Reviewed by Timothy Hatcher.
Slow addEventListener was the main cause of Console sluggishness[1].
This patch changes:
addEventListener from O(n) to O(1)
removeEventListener from O(n) to O(1)
Now, addEventListener and removeEventListener take <1ms regardless of the
number of listeners attached.
removeEventListener(null, null, thisObject), a special case when all events
for thisObject are removed, was improved from O(n^2) to O(n).
* UserInterface/Base/LinkedList.js: Added.
(LinkedList):
(LinkedList.prototype.clear):
(LinkedList.prototype.get last):
(LinkedList.prototype.push):
(LinkedList.prototype.remove):
(LinkedList.prototype.forEach):
(LinkedList.prototype.toArray):
(LinkedList.prototype.toJSON):
(LinkedListNode):
LinkedList ensures O(1) time complexity for push and remove operations.
* UserInterface/Base/ListMultimap.js: Added.
(ListMultimap):
(ListMultimap.prototype.get size):
(ListMultimap.prototype.add):
(ListMultimap.prototype.delete):
(ListMultimap.prototype.deleteAll):
(ListMultimap.prototype.has):
(ListMultimap.prototype.clear):
(ListMultimap.prototype.forEach):
(ListMultimap.prototype.toArray):
(ListMultimap.prototype.toJSON):
ListMultimap unsures O(1) time complexity for add, has and delete operations.
ListMultimap preserves insertion order by using a LinkedList.
* UserInterface/Base/Object.js:
(WebInspector.Object):
(WebInspector.Object.addEventListener):
(WebInspector.Object.removeEventListener):
(WebInspector.Object.hasEventListeners):
(WebInspector.Object.retainedObjectsWithPrototype):
(WebInspector.Object.prototype.dispatchEventToListeners):
Replace this._listeners[eventType] from array of objects to ListMultimap.
* UserInterface/Main.html:
* UserInterface/Test.html:
* UserInterface/TestStub.html:
2016-01-19 Matt Baker <mattbaker@apple.com>
Web Inspector: cleanup TreeOutline class and separate styles from NavigationSidebarPanel
https://bugs.webkit.org/show_bug.cgi?id=153146
<rdar://problem/24213071>
Reviewed by Timothy Hatcher.
This patch consolidates and simplifies the tree outline styles that were previously
defined across various classes. A new stylesheet, TreeOutline.css, includes all
the styles needed to create a basic TreeOutline.
In addition, certain tree features which were previously controlled by manually
toggling class names have been promoted to properties of TreeOutline:
- compact: tree elements have reduced vertical spacing. Used by object trees.
The compact and large settings are mutually exclusive.
- large: tree elements (and their icons) are large. Used by TimelinesSidebarPanel.
Previously there existed a `small` class name which was enabled in every
case except TimelineSidebarPanel's Timelines tree. Since it was the rule rather
than the exception the class has been removed and is now the default style.
- disclosureButtons: control the appearance of disclosure buttons.
- customIndent: control use of generated style rules.
* UserInterface/Main.html:
New CSS file.
* UserInterface/Views/ApplicationCacheFrameTreeElement.js:
(WebInspector.ApplicationCacheFrameTreeElement): Deleted.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement): Deleted.
* UserInterface/Views/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement): Deleted.
* UserInterface/Views/ContentFlowTreeElement.js:
(WebInspector.ContentFlowTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom):
(.tree-outline.dom li.hovered:not(.selected) .selection):
(.tree-outline.dom li .selection):
(.tree-outline.dom li.selected .selection):
(.tree-outline.dom li.elements-drag-over .selection):
(.tree-outline.dom:focus li.selected .selection):
(.tree-outline.dom li.selected > span::after):
(.tree-outline.dom:focus li.selected > span::after):
(.tree-outline.dom ol):
(.tree-outline.dom ol.children):
(.tree-outline.dom ol.children.expanded):
(.tree-outline.dom li):
(.tree-outline.dom li.pseudo-class-enabled > .selection::before):
(.tree-outline.dom.single-node li):
(.tree-outline.dom:focus li.selected):
(.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection::before):
(.tree-outline.dom:focus li.selected *):
(.tree-outline.dom li.parent):
(.tree-outline.dom li .html-tag.close):
(.tree-outline.dom li.parent::before):
(.tree-outline.dom:focus li.parent.selected::before):
(.tree-outline.dom li.parent.expanded::before):
(.tree-outline.dom:focus li.parent.expanded.selected::before):
(.tree-outline.dom .html-text-node.large):
(.tree-outline.dom .html-pseudo-element):
(.tree-outline.dom .html-fragment.shadow):
(.showing-find-banner .tree-outline.dom .search-highlight):
(.dom-tree-outline): Deleted.
(.dom-tree-outline li.hovered:not(.selected) .selection): Deleted.
(.dom-tree-outline li .selection): Deleted.
(.dom-tree-outline li.selected .selection): Deleted.
(.dom-tree-outline li.elements-drag-over .selection): Deleted.
(.dom-tree-outline:focus li.selected .selection): Deleted.
(.dom-tree-outline li.selected > span::after): Deleted.
(.dom-tree-outline:focus li.selected > span::after): Deleted.
(.dom-tree-outline ol): Deleted.
(.dom-tree-outline ol.children): Deleted.
(.dom-tree-outline ol.children.expanded): Deleted.
(.dom-tree-outline li): Deleted.
(.dom-tree-outline li.pseudo-class-enabled > .selection::before): Deleted.
(.dom-tree-outline.single-node li): Deleted.
(.dom-tree-outline:focus li.selected): Deleted.
(.dom-tree-outline:focus li.selected.pseudo-class-enabled > .selection::before): Deleted.
(.dom-tree-outline:focus li.selected *): Deleted.
(.dom-tree-outline li.parent): Deleted.
(.dom-tree-outline li .html-tag.close): Deleted.
(.dom-tree-outline li.parent::before): Deleted.
(.dom-tree-outline:focus li.parent.selected::before): Deleted.
(.dom-tree-outline li.parent.expanded::before): Deleted.
(.dom-tree-outline:focus li.parent.expanded.selected::before): Deleted.
(.dom-tree-outline .html-text-node.large): Deleted.
(.dom-tree-outline .html-pseudo-element): Deleted.
(.dom-tree-outline .html-fragment.shadow): Deleted.
(.showing-find-banner .dom-tree-outline .search-highlight): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
Use default TreeOutline DOM element, and simplify element class name.
* UserInterface/Views/DatabaseTableTreeElement.js:
(WebInspector.DatabaseTableTreeElement): Deleted.
* UserInterface/Views/DatabaseTreeElement.js:
(WebInspector.DatabaseTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/ErrorObjectView.css:
(.error-object:not(.expanded) .tree-outline):
(.error-object .tree-outline):
(.error-object:not(.expanded) .error-object-outline): Deleted.
(.error-object-outline): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/ErrorObjectView.js:
(WebInspector.ErrorObjectView): Deleted.
Removed unused tree outline class name.
* UserInterface/Views/FolderTreeElement.js:
(WebInspector.FolderTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/FormattedValue.css:
(.formatted-node > .tree-outline.dom):
(.formatted-node > .tree-outline.dom ol):
(.formatted-node > .tree-outline.dom li):
(.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection):
(.formatted-node > .dom-tree-outline): Deleted.
(.formatted-node > .dom-tree-outline ol): Deleted.
(.formatted-node > .dom-tree-outline li): Deleted.
(.formatted-node > .dom-tree-outline li.hovered:not(.selected) .selection): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype._updateTitleTooltip):
(WebInspector.GeneralTreeElement.prototype.get small): Deleted.
(WebInspector.GeneralTreeElement.prototype.set small): Deleted.
(WebInspector.GeneralTreeElement.prototype.get twoLine): Deleted.
(WebInspector.GeneralTreeElement.prototype.set twoLine): Deleted.
Removed properties `small` and `twoLine`. The first is no longer needed as
it is now the default tree element style. The second was not being used.
* UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js:
(WebInspector.IndexedDatabaseObjectStoreIndexTreeElement): Deleted.
* UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js:
(WebInspector.IndexedDatabaseObjectStoreTreeElement): Deleted.
* UserInterface/Views/IndexedDatabaseTreeElement.js:
(WebInspector.IndexedDatabaseTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/IssueTreeElement.css:
(.navigation-sidebar-panel-content-tree-outline .item.small.issue .icon): Deleted.
No longer needed.
* UserInterface/Views/IssueTreeElement.js:
(WebInspector.IssueTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/LayoutTimelineView.css:
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .tree-outline.layout .item .subtitle):
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.layout .item .subtitle): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/LogTreeElement.js:
(WebInspector.LogTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline .children): Deleted.
(.navigation-sidebar-panel-content-tree-outline .children.expanded): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item): Deleted.
(.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons > .children): Deleted.
(.navigation-sidebar-panel-content-tree-outline > .children.hide-disclosure-buttons > .children): Deleted.
(.navigation-sidebar-panel-content-tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon): Deleted.
(.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons .item.small): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .disclosure-button): Deleted.
(.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons .item .disclosure-button): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.parent .disclosure-button): Deleted.
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .disclosure-button): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.expanded .disclosure-button): Deleted.
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected.expanded .disclosure-button): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .icon): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .status): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .status:empty): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.selected): Deleted.
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected): Deleted.
(body.window-inactive .navigation-sidebar-panel-content-tree-outline .item.selected): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .titles): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .highlighted): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .titles.no-subtitle): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .title::after): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .subtitle): Deleted.
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .subtitle): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .subtitle:empty): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small .icon): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small .status): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small .status .indeterminate-progress-spinner): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small .titles): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line .status): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles.no-subtitle): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small .subtitle): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line .icon): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .title::after): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .subtitle::before): Deleted.
Generic tree outline styles removed, cleaned up, and relocated to TreeOutline.css.
* UserInterface/Views/NavigationSidebarPanel.js:
Removed static property HideDisclosureButtonsStyleClassName, which is now
encapsulated by TreeOutline.
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
Use default TreeOutline DOM element instead of creating it.
(WebInspector.NavigationSidebarPanel): Deleted.
Remove call to generate style rules.
(WebInspector.NavigationSidebarPanel.prototype._generateStyleRulesIfNeeded): Deleted.
Moved to TreeOutline.js.
* UserInterface/Views/NetworkSidebarPanel.css:
(.sidebar > .panel.navigation.network.network-grid-content-view-showing .tree-outline.network-grid .item .subtitle):
(.sidebar > .panel.navigation.network > .content > .tree-outline):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .tree-outline):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing .navigation-sidebar-panel-content-tree-outline.network-grid .item .subtitle): Deleted.
(.sidebar > .panel.navigation.network > .content > .navigation-sidebar-panel-content-tree-outline): Deleted.
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/NetworkSidebarPanel.js:
(WebInspector.NetworkSidebarPanel):
Disable tree outline disclosure buttons.
* UserInterface/Views/NetworkTimelineView.css:
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .tree-outline.network .item .subtitle):
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.network .item .subtitle): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
Disable tree outline disclosure buttons.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-value .object-tree .tree-outline.object):
(.object-tree-array-index .index-value .formatted-node .tree-outline.dom):
(.object-tree-array-index .index-value .object-tree .object-tree-outline): Deleted.
(.object-tree-array-index .index-value .formatted-node .dom-tree-outline): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.tree-outline .item.object-tree-property):
(.item.object-tree-property.prototype-property):
(.item.object-tree-property.prototype-property + ol):
(.object-tree-property): Deleted.
(.object-tree-property > .titles): Deleted.
(.object-tree-property > .disclosure-button): Deleted.
(.object-tree-property.parent > .disclosure-button): Deleted.
(.object-tree-property.parent.expanded > .disclosure-button): Deleted.
(.object-tree-property > .icon): Deleted.
(.object-tree-property.prototype-property): Deleted.
(.object-tree-property.prototype-property + ol): Deleted.
Updated selectors with new tree outline class names, removed styles which
are now provided by TreeOutline.css.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree .tree-outline.object):
(.object-tree.expanded > .tree-outline.object):
(.tree-outline.object):
(.object-tree.properties-only .tree-outline.object):
(.tree-outline.object li):
(.tree-outline.object ol):
(.tree-outline.object ol.expanded):
(.tree-outline.object li .empty-message):
(.object-tree .object-tree-outline): Deleted.
(.object-tree.expanded > .object-tree-outline): Deleted.
(.object-tree-outline): Deleted.
(.object-tree.properties-only .object-tree-outline): Deleted.
(.object-tree-outline li): Deleted.
(.object-tree-outline ol): Deleted.
(.object-tree-outline ol.expanded): Deleted.
(.object-tree-outline li .empty-message): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
Use default TreeOutline DOM element, and simplify element class name.
Enable custom indent (disables generated style rules).
* UserInterface/Views/ProfileNodeTreeElement.js:
(WebInspector.ProfileNodeTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/RenderingFrameTimelineView.css:
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .tree-outline.rendering-frame .item:not(.paint-record):not(.layout-record) .subtitle):
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.rendering-frame .item:not(.paint-record):not(.layout-record) .subtitle): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
Disable tree outline disclosure buttons.
(WebInspector.ResourceSidebarPanel.prototype._extraDomainsActivated):
Enable tree outline disclosure buttons.
* UserInterface/Views/ScriptTimelineView.css:
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .tree-outline.script .item .subtitle):
(.sidebar > .panel.navigation.timeline:not(.timeline-recording-content-view-showing) .tree-outline.script .item .alternate-subtitle):
(.tree-outline .item .alternate-subtitle):
(.tree-outline:matches(:focus, .force-focus) .item.selected .alternate-subtitle):
(.tree-outline .item.small:not(.two-line) .alternate-subtitle::before):
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.script .item .subtitle): Deleted.
(.sidebar > .panel.navigation.timeline:not(.timeline-recording-content-view-showing) .navigation-sidebar-panel-content-tree-outline.script .item .alternate-subtitle): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item .alternate-subtitle): Deleted.
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .alternate-subtitle): Deleted.
(.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .alternate-subtitle::before): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement): Deleted.
* UserInterface/Views/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement): Deleted.
* UserInterface/Views/StorageTreeElement.js:
(WebInspector.StorageTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/TimelineDataGrid.css:
(.tree-outline.timeline-data-grid .item:hover):
(.tree-outline.timeline-data-grid .item:hover .subtitle):
(.timeline-data-grid-tree-outline): Deleted.
(.timeline-data-grid-tree-outline .item): Deleted.
(.timeline-data-grid-tree-outline .item .status): Deleted.
(.timeline-data-grid-tree-outline .item .icon): Deleted.
(.timeline-data-grid-tree-outline .item:hover): Deleted.
(.timeline-data-grid-tree-outline .item .titles): Deleted.
(.timeline-data-grid-tree-outline .item .title::after): Deleted.
(.timeline-data-grid-tree-outline .item .subtitle): Deleted.
(.timeline-data-grid-tree-outline .item:hover .subtitle): Deleted.
(.timeline-data-grid-tree-outline .item .subtitle:empty): Deleted.
(.timeline-data-grid-tree-outline .item.small): Deleted.
(.timeline-data-grid-tree-outline .item.small .icon): Deleted.
(.timeline-data-grid-tree-outline .item.small .status): Deleted.
(.timeline-data-grid-tree-outline .item.small .titles): Deleted.
(.timeline-data-grid-tree-outline .item.small .subtitle): Deleted.
(.timeline-data-grid-tree-outline .item.small:not(.two-line) .title::after): Deleted.
(.timeline-data-grid-tree-outline .item.small:not(.two-line) .subtitle::before): Deleted.
Updated selectors with new tree outline class names, removed styles which
are now provided by TreeOutline.css.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._createPopoverContent):
Use default TreeOutline DOM element, and simplify element class name.
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .timelines-content .close-button): Deleted.
Removed styles which are now provided by TreeOutline.css.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
Disable tree outline disclosure buttons, enable large tree style.
* UserInterface/Views/TimelineView.css:
(.panel.navigation.timeline > .content > .tree-outline):
(.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .tree-outline):
(.panel.navigation.timeline > .content > .navigation-sidebar-panel-content-tree-outline): Deleted.
(.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/TreeOutline.css: Added.
(.tree-outline .children):
(.tree-outline .children.expanded):
(.tree-outline .item):
(.tree-outline.compact .item):
(.tree-outline.large .item):
(.tree-outline.hide-disclosure-buttons > .children):
(.tree-outline > .children.hide-disclosure-buttons > .children):
(.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon):
(.tree-outline .item .disclosure-button):
(.tree-outline.hide-disclosure-buttons .item .disclosure-button):
(.tree-outline .item.parent .disclosure-button):
(.tree-outline:matches(:focus, .force-focus) .item.selected .disclosure-button):
(.tree-outline .item.expanded .disclosure-button):
(.tree-outline:matches(:focus, .force-focus) .item.selected.expanded .disclosure-button):
(.tree-outline .item .icon):
(.tree-outline.compact .item .icon):
(.tree-outline.large .item .icon):
(.tree-outline .item .status):
(.tree-outline.large .item .status):
(.tree-outline .item .status:empty):
(.tree-outline .item.selected):
(.tree-outline:matches(:focus, .force-focus) .item.selected):
(body.window-inactive .tree-outline .item.selected):
(.tree-outline .item .titles):
(.tree-outline.compact .item .titles):
(.tree-outline.large .item .titles):
(.tree-outline .item .highlighted):
(.tree-outline.large .item .titles.no-subtitle):
(.tree-outline .item .title::after):
(.tree-outline .item .subtitle):
(.tree-outline.large .item .subtitle):
(.tree-outline:matches(:focus, .force-focus) .item.selected .subtitle):
(.tree-outline .item .subtitle:empty):
(.tree-outline:not(.large) .item .status .indeterminate-progress-spinner):
(.tree-outline .item .subtitle::before):
Relocated tree outlines styles from NavigationSidebarPanel.css.
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline):
(WebInspector.TreeOutline.prototype.get compact):
(WebInspector.TreeOutline.prototype.set compact):
(WebInspector.TreeOutline.prototype.get large):
(WebInspector.TreeOutline.prototype.set large):
(WebInspector.TreeOutline.prototype.get disclosureButtons):
(WebInspector.TreeOutline.prototype.set disclosureButtons):
(WebInspector.TreeOutline.prototype.get customIndent):
(WebInspector.TreeOutline.prototype.set customIndent):
Added properties for tree element appearance and indentation
behavior, so clients don't need to manually toggle style classes.
(WebInspector.TreeOutline._generateStyleRulesIfNeeded):
Relocated from NavigationSidebarPanel.js.
* UserInterface/Views/TypeTreeElement.js:
(WebInspector.TypeTreeElement): Deleted.
Removed call to obsolete TreeOutline.prototype.small setter.
* UserInterface/Views/TypeTreeView.css:
(.tree-outline.type):
(.tree-outline.type li):
(.tree-outline.type ol):
(.tree-outline.type ol.expanded):
(.tree-outline.type li .empty-message):
(.type-tree-outline): Deleted.
(.type-tree-outline li): Deleted.
(.type-tree-outline ol): Deleted.
(.type-tree-outline ol.expanded): Deleted.
(.type-tree-outline li .empty-message): Deleted.
Updated selectors with new tree outline class names.
* UserInterface/Views/TypeTreeView.js:
(WebInspector.TypeTreeView):
Use default TreeOutline DOM element, and simplify element class name.
2016-01-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Inspector should use the last sourceURL / sourceMappingURL directive
https://bugs.webkit.org/show_bug.cgi?id=153072
<rdar://problem/24168312>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Utilities.js:
Prepend instead of append the sourceURL so the provided string
can include a sourceURL and override it. Such as manually
evaluating a script through the quick console with a sourceURL.
* UserInterface/Models/SourceMapResource.js:
Fix an incorrectly named property.
2016-01-13 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add support for the existing GradientEditor in the CSS Rules sidebar
https://bugs.webkit.org/show_bug.cgi?id=153004
Reviewed by Timothy Hatcher.
Both the Visual sidebar and Resource view have editors for CSS gradient
values, but the Rules sidebar instead only adds editors for basic color
values. Instead of duplicating the code for gradient swatches, existing
code will be used to give this same functionality to the Rules sidebar.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Models/Gradient.js:
(WebInspector.Gradient):
(WebInspector.Gradient.fromString):
(WebInspector.Gradient.stopsWithComponents):
(WebInspector.Gradient.prototype.copy):
(WebInspector.Gradient.prototype.toString):
Refactored WebInspector.Gradient into its own class.
(WebInspector.LinearGradient):
(WebInspector.LinearGradient.prototype.toString):
Now uses WebInspector.Gradient inheritance and methods.
(WebInspector.RadialGradient):
(WebInspector.RadialGradient.prototype.toString):
Now uses WebInspector.Gradient inheritance and methods.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
Use InlineSwatch.css values instead.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .cubic-bezier-marker): Deleted.
(@media (-webkit-max-device-pixel-ratio: 1)): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .cubic-bezier-marker:hover): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .cubic-bezier-marker:active): Deleted.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.didDismissPopover): Deleted.
Removed unused popover member variable.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.createSwatch):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches):
Renamed variables for more consistent naming and reimplemented the logic
to use the new WebInspector.InlineSwatch methods. As a result, it was
possible to consolidate the 3 different type of swatch functions into a
single function.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._commentProperty.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._uncommentRange.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.createSwatch): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createBezierEditors.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createBezierEditors): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked.updateCodeMirror.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked.updateCodeMirror): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked): Deleted.
* UserInterface/Views/CodeMirrorTextMarkers.js:
(createCodeMirrorColorTextMarkers.matchFunction):
Added logic so that if the matched color string is found inside a gradient,
it will not have a marker created for it.
* UserInterface/Views/InlineSwatch.css: Renamed from Source/WebInspectorUI/UserInterface/Views/ColorSwatch.css.
Consolidated the various swatch CSS classes into one file.
(.inline-swatch):
(.inline-swatch.bezier):
(.inline-swatch.bezier:hover):
(.inline-swatch.bezier:active):
(@media (-webkit-max-device-pixel-ratio: 1)):
(.inline-swatch > span):
Ensured that the inner swatch element can not be selected so that the "click"
listener on its parent always fires.
(.inline-swatch:hover > span):
(.inline-swatch:active > span):
(.inline-swatch.bezier > span):
* UserInterface/Views/InlineSwatch.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ColorSwatch.js.
(WebInspector.InlineSwatch):
Now accepts a new first argument to indicate what type of color swatch
to create and what functionality it will have. Currently has options
for WebInspector.Color, WebInspector.Gradient, and WebInspector.CubicBezier.
(WebInspector.InlineSwatch.prototype.get element):
(WebInspector.InlineSwatch.prototype.get value):
(WebInspector.InlineSwatch.prototype.set value):
(WebInspector.InlineSwatch.prototype._fallbackValue):
(WebInspector.InlineSwatch.prototype._updateSwatch):
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
(WebInspector.InlineSwatch.prototype._valueEditorValueDidChange):
(WebInspector.InlineSwatch.prototype._handleContextMenuEvent):
(WebInspector.InlineSwatch.prototype._getNextValidHEXFormat.hexMatchesCurrentColor):
(WebInspector.InlineSwatch.prototype._getNextValidHEXFormat):
* UserInterface/Views/VisualStyleBackgroundPicker.css:
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient):
(.visual-style-property-container.background-picker > .visual-style-property-value-container:not(.gradient-value) > .inline-swatch.gradient):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient:hover):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient:active):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient > span):
(.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .inline-swatch.gradient + .value-input):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container:not(.gradient-value) > .color-swatch): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch:hover): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch:active): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch > span): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .color-swatch + .value-input): Deleted.
* UserInterface/Views/VisualStyleBackgroundPicker.js:
Removed the specific code for the gradient swatch and moved to using a
gradient-type InlineSwatch for gradient values instead.
(WebInspector.VisualStyleBackgroundPicker):
(WebInspector.VisualStyleBackgroundPicker.prototype.set value):
(WebInspector.VisualStyleBackgroundPicker.prototype._updateGradient):
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchColorChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._valueInputValueChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._handleKeywordChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._updateGradientSwatch): Deleted.
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked.handleColorPickerToggled): Deleted.
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked): Deleted.
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientEditorGradientChanged): Deleted.
* UserInterface/Views/VisualStyleColorPicker.css:
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color):
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color:hover):
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color:active):
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color > span):
Add override CSS to ensure that the color-type InlineSwatch displays nicely
next to the flexbox style Visual sidebar.
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch): Deleted.
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch:hover): Deleted.
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch:active): Deleted.
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch > span): Deleted.
Refactored to only use overriding properties of the basic .inline-swatch values.
* UserInterface/Views/VisualStyleColorPicker.js:
(WebInspector.VisualStyleColorPicker):
(WebInspector.VisualStyleColorPicker.prototype._colorSwatchColorChanged):
(WebInspector.VisualStyleColorPicker.prototype._updateColorSwatch):
* UserInterface/Views/VisualStyleTimingEditor.css:
(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch.bezier):
(.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.bezier-value) > .inline-swatch.bezier):
(@media (-webkit-min-device-pixel-ratio: 2)):
Add override CSS to ensure that the color-type InlineSwatch displays nicely
next to the flexbox style Visual sidebar.
(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .bezier-editor): Deleted.
(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .bezier-editor:hover): Deleted.
(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .bezier-editor:active): Deleted.
Refactored to only use overriding properties of the basic .inline-swatch values.
* UserInterface/Views/VisualStyleTimingEditor.js:
Removed the specific code for the cubic-bezier swatch and moved to using a
cubic-bezier-type InlineSwatch for gradient values instead.
(WebInspector.VisualStyleTimingEditor):
(WebInspector.VisualStyleTimingEditor.prototype.get bezierValue):
(WebInspector.VisualStyleTimingEditor.prototype.set bezierValue):
(WebInspector.VisualStyleTimingEditor.prototype._setValue):
(WebInspector.VisualStyleTimingEditor.prototype._handleKeywordChanged):
(WebInspector.VisualStyleTimingEditor.prototype._bezierSwatchValueChanged):
(WebInspector.VisualStyleTimingEditor.prototype._bezierMarkerClicked): Deleted.
2016-01-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Timeline recording controls should use NavigationBar
https://bugs.webkit.org/show_bug.cgi?id=152997
Reviewed by Brian Burg.
NavigtaionBar should always be preferred over manually editing the DOM.
Reusing existing button types for the record button and status element lets us
eliminate a bunch of CSS, and will make future changes to the Timelines UI
(such as adding addition recording controls), easier to implement.
* Localizations/en.lproj/localizedStrings.js:
New tooltip strings.
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop):
(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop:hover):
(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop:active):
Replaced similar styles used for the record glyph.
(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop *):
Prevent multiple mouseover/mouseout events while hovering the navigation item.
(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.flexible-space):
Replaced similar styles used for the record status element.
(.sidebar > .panel.navigation.timeline > .status-bar): Deleted.
(body.window-inactive .sidebar > .panel.navigation.timeline > .status-bar): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph:hover): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph:active): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph.recording): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-status): Deleted.
(.panel.timeline .navigation-bar.timelines-view): Deleted.
No longer used.
* UserInterface/Views/TimelineSidebarPanel.js:
Removed unused CSS static variables.
(WebInspector.TimelineSidebarPanel):
Create navigation bar, remove status bar DOM elements. Create keyboard shortcut
before the record button, so the shortcut's display name can be used in tooltips.
(WebInspector.TimelineSidebarPanel.prototype._capturingStartedOrStopped):
Update record button state and flexible space (status) text.
(WebInspector.TimelineSidebarPanel.prototype._recordButtonClicked):
Toggle recording state, and update record button state and flexible space (status) text.
(WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOver):
(WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOut):
Update flexible space (status) text.
(WebInspector.TimelineSidebarPanel.prototype._updateRecordButton):
(WebInspector.TimelineSidebarPanel.prototype._updateReplayInterfaceVisibility):
(WebInspector.TimelineSidebarPanel.prototype._toggleRecording): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._capturingStarted): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._capturingStopped): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOver): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOut): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphClicked): Deleted.
No longer used.
2016-01-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Move helper methods for getting icons/text to TimelineTabContentView
https://bugs.webkit.org/show_bug.cgi?id=152996
Reviewed by Brian Burg.
In preparation for the Timelines UI redesign, helper methods which existed
in the sidebar panel and timeline tree elements need to be relocated,
since the sidebar won't exist in the new UI.
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
Removed icon/title code, replaced with calls to new helper methods.
Code to create the alternate subtitle was broken out form the rest
of the icon/title code, and kept in the constructor.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
Updated calls to helper methods.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
(WebInspector.TimelineSidebarPanel.displayNameForTimeline): Deleted.
(WebInspector.TimelineSidebarPanel.iconClassNameForTimeline): Deleted.
Moved to TimelineTabContentView.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.displayNameForTimeline):
(WebInspector.TimelineTabContentView.iconClassNameForTimeline):
Relocated from TimelineSidebarPanel.
(WebInspector.TimelineTabContentView.iconClassNameForRecord):
(WebInspector.TimelineTabContentView.displayNameForRecord):
New helper methods. Previously part of TimelineRecordTreeElement.
2016-01-12 Brian Burg <bburg@apple.com>
Web Inspector: fix some common misspellings in localized strings
https://bugs.webkit.org/show_bug.cgi?id=153030
<rdar://problem/24153340>
Reviewed by Joseph Pecoraro.
Replace 'occured', 'transfered' with 'occurred' and 'transferred'.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView.prototype._queryError):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
2016-01-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Fix DataGrid row disclosure appearance and behavior
https://bugs.webkit.org/show_bug.cgi?id=152991
Reviewed by Brian Burg.
* UserInterface/Views/DataGrid.css:
(.data-grid tr.parent td.disclosure::before):
Ensure triangle is vertically aligned for any row height.
(.data-grid tr:not(.parent) td.disclosure):
Fix indent size.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.createCell):
Added `icon` column property, encapsulate icon element creation.
(WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle):
Fix hit test logic by computing left padding.
2016-01-12 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: REGRESSION (r194879) - Opening views without being previously opened causes an Uncaught Exception
https://bugs.webkit.org/show_bug.cgi?id=153006
Reviewed by Brian Burg.
* UserInterface/Views/MultipleScopeBarItem.js:
(WebInspector.MultipleScopeBarItem.prototype.displaySelectedItem):
If there is no selected item, default to the first item in the list.
2016-01-12 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: creating a gradient in the Visual sidebar causes a crash
https://bugs.webkit.org/show_bug.cgi?id=153003
Reviewed by Brian Burg.
* UserInterface/Views/VisualStyleBackgroundPicker.js:
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked):
If a gradient does not already exist when the swatch is clicked, create a basic
gradient using the current type and two "transparent" color stops (a minimum of
two color stops are needed for a valid gradient).
2016-01-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Storage tab navigation bar should fit on a single line
https://bugs.webkit.org/show_bug.cgi?id=152473
Reviewed by Timothy Hatcher.
The wrapping of the navigation bar on the Storage tab was caused by the
fact that Sidebar.js used a minimum width of 200px, regardless of the
content within the sidebar (unless it had a NavigationBar). Logic has
been added that causes the sidebar to use the selected panel's own
minimum width calculation if it is greater than 200px.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.get minimumWidth):
* UserInterface/Views/MultipleScopeBarItem.js:
(WebInspector.MultipleScopeBarItem.prototype.set selectedScopeBarItem):
(WebInspector.MultipleScopeBarItem.prototype.displaySelectedItem):
Sets the displayed text to the currently selected item.
(WebInspector.MultipleScopeBarItem.prototype.displayWidestItem):
Sets the displayed text to the widest (pixel wise) item in the select element.
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype._calculateMinimumWidth):
Now uses NavigationItem.prototype.get minimumWidth.
* UserInterface/Views/NavitationItem.js:
(WebInspector.NavitationItem.prototype.get minimumWidth):
Returns the element's realOffsetWidth.
* UserInterface/Views/NetworkSidebarPanel.js:
(WebInspector.NetworkSidebarPanel.prototype.get minimumWidth):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.get minimumWidth):
* UserInterface/Views/ScopeBar.js:
(WebInspector.ScopeBar):
(WebInspector.ScopeBar.prototype.get minimumWidth):
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.set selectedSidebarPanel):
(WebInspector.Sidebar.prototype.get minimumWidth):
(WebInspector.Sidebar.prototype.set width):
(WebInspector.Sidebar.prototype.set collapsed):
(WebInspector.Sidebar.prototype._recalculateWidth):
Whenever the sidebar changes (e.g. tab change, sidebar becomes
visible/hidden, etc.), a width recalculation is necessary to ensure
that the navigation bar never wraps.
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.get minimumWidth):
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype.get minimumWidth):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.get minimumWidth):
2016-01-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Make Timelines view also remember sort order
https://bugs.webkit.org/show_bug.cgi?id=152811
Reviewed by Timothy Hatcher.
Changeset r194574 introduced the ability for WebInspector.Setting objects to
be passed to DataGrid instances to save the sort column for that grid. These
changes also add the ability for the sort order to be save as well.
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.set sortOrder):
If a WebInspector.Setting object has been given, save the new sort order.
(WebInspector.DataGrid.prototype.set sortOrderSetting):
Saves the given WebInspector.Setting object for modification whenever the user
changes the sort order.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
2016-01-11 Johan K. Jensen <jj@johanjensen.dk>
Web Inspector: Copying JS object output from console shouldn't include trailing '= $n'
https://bugs.webkit.org/show_bug.cgi?id=119347
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
2016-01-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add basic Content section to Visual Sidebar
https://bugs.webkit.org/show_bug.cgi?id=152972
Reviewed by Timothy Hatcher.
Since the "content" property has so many different types of values, a
simple text input editor should be added to provide some support for
the CSS property until a better, more specialized editor is created.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor):
Moved margin-left to new rule in VisualStylePropertyEditor.css.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
Adds the basic editor under the Text section in a new subsection
called Content.
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)):
Adds a left margin to property editors without a title.
2016-01-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual sidebar minor bug fixes
https://bugs.webkit.org/show_bug.cgi?id=152967
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.refresh):
Only update sections when it is not a significant change, as they are
updated when the selector changes.
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
Only reset links if the refresh is a significant change (node or selected
style changes).
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype.get value):
Removed unreachable return.
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown.adjustValue):
_updatedValues.propertyMissing was changed to _propertyMissing in a
prior patch.
2016-01-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Migrate Page Timeline recording to ScriptProfiler
https://bugs.webkit.org/show_bug.cgi?id=152727
Reviewed by Brian Burg.
* UserInterface/Images/TimelineRecordAPI.svg: Added.
* UserInterface/Images/gtk/TimelineRecordAPI.svg: Added.
New [S] image for API initiated script evaluations.
Display matches the existing [S] Script Evaluated.
Colors match the gray [N] Native image colors.
* UserInterface/Models/ScriptInstrument.js:
(WebInspector.ScriptInstrument.prototype.startInstrumentation):
(WebInspector.ScriptInstrument.prototype.stopInstrumentation):
(WebInspector.ScriptInstrument):
Use ScriptProfiler, if available, in Web debuggables.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.capturingStarted):
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._scriptProfilerTypeToScriptTimelineRecordType):
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingUpdated):
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords.let.nextRecord):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords.let.recordContainsRecord):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords):
When running a timeline on a web debuggable the frontend receives both
Timeline event records and ScriptProfiler events. Timeline (Web) records
are high level web events like "Script Evaluated", "Event Dispatched",
"Timer Fired". The timestamps for these records should always be wrapping
a ScriptProfiler event and its associated profile data. So, at the end
of a recording we merge ScriptProfiler profile data into the original
Timeline (Web) record.
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype.get profilePayload):
(WebInspector.ScriptTimelineRecord.prototype.set profilePayload):
(WebInspector.ScriptTimelineRecord.prototype.setProfilePayload): Deleted.
Replace method with getter/setter.
(WebInspector.ScriptTimelineRecord.EventType.displayName):
Add a new event type for API records, but share display name with Script Evaluated.
* UserInterface/Views/NavigationSidebarPanel.js:
Fix typo.
* UserInterface/Views/ScriptTimelineView.css:
(.timeline-view.script > .data-grid .eventType-column): Deleted.
There is no "eventType" column in the ScriptTimelineView datagrid, so remove styles.
* UserInterface/Views/TimelineIcons.css:
(.api-record .icon):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
For API Script Evaluation records use the new icon.
2016-01-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught Exception selecting IndexedDB host folder in Storage tab
https://bugs.webkit.org/show_bug.cgi?id=152943
Reviewed by Brian Burg.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
Another type of specialized folder tree element.
2016-01-10 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._scopeChain[i].object.deprecatedGetAllProperties')
https://bugs.webkit.org/show_bug.cgi?id=152944
<rdar://problem/24119827>
Reviewed by Brian Burg.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.prototype.collectScopeChainVariableNames):
Missed one place where `object` needed to change to `objects`.
Here the list will always contain a single object, only UI
generated scopes for the sidebar may have multiple objects.
2016-01-10 Johan K. Jensen <jj@johanjensen.dk>
Web Inspector: Dashboard log message count doesn't include console.time messages
https://bugs.webkit.org/show_bug.cgi?id=151280
Reviewed by Brian Burg.
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
Make Info and Debug levels increment the log count.
2016-01-09 Dan Bernstein <mitz@apple.com>
[Cocoa] Allow overriding the frameworks directory independently of using a staging install path
https://bugs.webkit.org/show_bug.cgi?id=152926
Reviewed by Tim Horton.
Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines
where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets
WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari.
Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces.
* Configurations/Base.xcconfig:
- Replace STAGED_FRAMEWORKS_SEARCH_PATH in FRAMEWORK_SEARCH_PATHS with
WK_OVERRIDE_FRAMEWORKS_DIR and add quotes to account for spaces.
* Configurations/WebInspectorUIFramework.xcconfig:
- Define INSTALL_PATH and PRODUCTION_FRAMEWORKS_DIR based on WK_OVERRIDE_FRAMEWORKS_DIR.
2016-01-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Test Resources should not be included in Production builds unless FORCE_TOOL_INSTALL
https://bugs.webkit.org/show_bug.cgi?id=152941
<rdar://problem/24119013>
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
Combine inspector resources in production, but not test resources.
* Configurations/DebugRelease.xcconfig:
Do not combine inspector resources in Release/Debug. Combine test resources.
* Configurations/WebInspectorUIFramework.xcconfig:
Simplify by moving to other config files.
* Scripts/copy-user-interface-resources.pl:
Have FORCE_TOOL_INSTALL combine test resources as well.
* WebInspectorUI.vcxproj/build-webinspectorui.pl:
Only combine test resources in non-Production.
2016-01-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Initiated section of Resource Details Sidebar should not display as empty and should update as the list changes
https://bugs.webkit.org/show_bug.cgi?id=152907
<rdar://problem/24109927>
Reviewed by Timothy Hatcher.
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.addInitiatedResource):
Dispatch an event when the list of initiated resources changes.
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
Add/remove event listeners for initiated resources changes to refresh
the related resources section.
(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
Show/hide the related resources section depending on if we have something or not.
2016-01-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught exception: TypeError: this._initiatorSourceCodeLocation.sourceCode.addInitiatedResource is not a function
https://bugs.webkit.org/show_bug.cgi?id=152905
<rdar://problem/24109809>
Reviewed by Brian Burg.
* UserInterface/Models/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.addInitiatedResource):
Only Resource has addInitiatedResource, so only call it if the
SourceCode in the SourceCodeLocation is a Resource.
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add warnings to section that require specific values of other properties
https://bugs.webkit.org/show_bug.cgi?id=148254
Reviewed by Timothy Hatcher.
Added a function to VisualStylePropertyEditor to allow dependencies to be set which,
whenever the editor is updated or changed, will be checked against the computed styles
of the element to see if all the necessary property values are set.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype.refresh):
(WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFlexboxSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateOutlineSection):
Added dependencies to relevant property editors.
(WebInspector.VisualStyleDetailsPanel.prototype._prepareForChange): Deleted.
No longer needed as the sidebar panel will refresh whenever triggered.
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container.layout-reversed > .visual-style-property-title):
(.visual-style-property-container > .visual-style-property-title > .property-reference-info):
(.visual-style-property-container > .visual-style-property-editor-warning):
(.visual-style-property-container.layout-reversed > .visual-style-property-editor-warning):
(.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency):
(.visual-style-property-container > .visual-style-property-value-container):
(.visual-style-property-container.layout-reversed > .visual-style-property-value-container):
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):
(WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
(WebInspector.VisualStylePropertyEditor.prototype.addDependency):
(WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
(WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
Looks at the computed style for the node to see if any dependent properties do not
have one of the required values.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem):
(WebInspector.VisualStyleSelectorSection.prototype._styleTextReset): Deleted.
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Allow error items on Exception page to be selected
https://bugs.webkit.org/show_bug.cgi?id=152861
Reviewed by Brian Burg.
* UserInterface/Debug/UncaughtExceptionReporter.css:
(.uncaught-exception-sheet li):
Allowed user-select on text.
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add border-image properties to Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=152755
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Switched the order of VisualStyleURLInput and VisualStyleUnitSlider
to be ordered alphabetically.
* UserInterface/Views/VisualStyleBackgroundPicker.js:
(WebInspector.VisualStyleBackgroundPicker.prototype._keywordSelectMouseDown):
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content > .group + .group > .row:first-child):
(.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.border .visual-style-property-container.keyword-checkbox.border-image-slice):
Since the checkbox is so small, give it less room.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection.generateBorderImagePropertyEditors):
The three properties "border-image-width", "border-image-outset", and
"border-image-slice" all have the same syntax, so one function to generate
the layout for all three is much simpler.
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
Added the border image properties to a seperate group under Background > Border.
* UserInterface/Views/VisualStyleKeywordPicker.js:
(WebInspector.VisualStyleKeywordPicker.prototype._keywordSelectMouseDown):
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype.set units):
Reordered logic to allow a value of ""/null to set the units to the "Number"
value if it is allowed for that editor.
(WebInspector.VisualStyleNumberInputBox.prototype.get synthesizedValue):
Instead of relying upon whether the editor has any units, just check to see if
the selected units are "Number" and, if not, add them to the value.
(WebInspector.VisualStyleNumberInputBox.prototype._unitsElementTextContent):
* UserInterface/Views/VisualStylePropertyCombiner.js:
(WebInspector.VisualStylePropertyCombiner):
Now has another argument that, when true, assumes the combiner has at least 4
numerical values and is of the form (can have units):
property-name: value1 [value2 [value3 [value4 [...]]]];
(WebInspector.VisualStylePropertyCombiner.prototype.get synthesizedValue):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
If the new argument is true, assigns the existing values in the following way:
- If there is 1 value, assign it to all of the editors.
- If there are 2 values, assign the 1st one to editors 1 and 3 and the 2nd one
to editors 2 and 4.
- If there are 3 values, assign the 1st one to editor 1, the 2nd one to editors
2 and 4, and the 3rd one to editor 3.
- If there are 4 or more values, assign them normally.
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedKeyword):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedKeyword):
Removed call to this.value to prevent recursion from VisualStyleNumberInputBox.
(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedUnit):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedUnit):
Removed call to this.units to prevent recursion from VisualStyleNumberInputBox.
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add indicator that element has pseudo-class in DOM tree
https://bugs.webkit.org/show_bug.cgi?id=152680
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement):
(WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
Added an event listener to the node for when pseudo-classes change.
* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline li.pseudo-class-enabled > .selection::before):
(.dom-tree-outline:focus li.selected.pseudo-class-enabled > .selection::before):
Used the hover/selected background style element to ensure that the indicator
is always positioned evenly with the first line of the opening tag.
(.dom-tree-outline li.hovered:not(.selected) .selection):
(.dom-tree-outline li .selection):
(.dom-tree-outline li.selected .selection):
(.dom-tree-outline li.elements-drag-over .selection):
Removed "display: none;" (as well as the "block" declarations) to allow
the ::before pseudo-element to display.
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Make creating new rules in the Styles sidebar simpler
https://bugs.webkit.org/show_bug.cgi?id=152726
Reviewed by Timothy Hatcher.
When creating a new rules of any kind, first look to see if it already exists in
another rule that has no properties. If found, focus/select it instead of creating
a new rule. Otherwise, create the new rule like normal.
Also changed the way in which previously-focused sections/tree-items are saved
to rely upon the selector of the new rule and whether the section for that rule
is empty and an inspector rule.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.isInspectorRule):
Returns true if the style is an inspector rule.
(WebInspector.CSSStyleDeclaration.prototype.hasProperties):
Returns true if the style has CSS properties.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.rulesForSelector.ruleHasSelector):
(WebInspector.DOMNodeStyles.prototype.rulesForSelector):
Returns a list of CSSRule that match the given selector and are not
in media queries.
* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.commentAllProperties):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.cssStyleDeclarationSectionEditorFocused):
Now saves the newly focused section as the previously-focused section.
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNewInspectorRuleWithSelector):
Renamed from cssStyleDeclarationSectionFocusNextNewInspectorRule. Now needs
a selector argument.
(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
(WebInspector.RulesStyleDetailsPanel.prototype.sectionForStyle):
Returns the first section that has a style with matching selector.
(WebInspector.RulesStyleDetailsPanel.prototype.focusEmptySectionWithStyle):
Finds the section corresponding to the given style and, if empty, focuses it.
(WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
No longer clears the previously-focused section.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
(WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem):
(WebInspector.VisualStyleSelectorSection.prototype.update):
(WebInspector.VisualStyleSelectorSection.prototype.treeItemForStyle):
Returns the first tree item that has a style with matching selector.
(WebInspector.VisualStyleSelectorSection.prototype.selectEmptyStyleTreeItem):
Finds the tree item corresponding to the given style and, if empty, selects it.
(WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem):
Now requires a delegate object.
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2016-01-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CRASH Attempting to pause on CSP violation not inside of script
https://bugs.webkit.org/show_bug.cgi?id=152825
<rdar://problem/24021276>
Reviewed by Timothy Hatcher.
* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.expectThat):
(TestHarness.prototype.pass):
(TestHarness.prototype.fail):
Add a simple way to output a standard pass/fail message. These are
often nicer than expectThat(true, ...) or assert(false, ...).
2016-01-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: DOMContentLoaded label in the Timeline tab should be "DOM Content Loaded"
https://bugs.webkit.org/show_bug.cgi?id=152746
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.addMarker):
2016-01-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Scope chain shows too many scopes for functions (`let` and `var` in the same function are two scopes)
https://bugs.webkit.org/show_bug.cgi?id=152349
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Closure Variables (%s)" string for including the function name alongside
the closure scope section.
* UserInterface/Models/ScopeChainNode.js:
(WebInspector.ScopeChainNode):
(WebInspector.ScopeChainNode.prototype.get objects):
(WebInspector.ScopeChainNode.prototype.get object): Deleted.
Allow a ScopeChainNode to hold onto multiple RemoteObjects (for multiple JSScopes).
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Simplify the legacy case and convert "Local" to "Closure". The UI will now
determine and display "Local" where appropriate in a backwards compatible way.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
Associate ScopeChain nodes with CallFrame frames so that we can better combine
variable sections and better label closure sections.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
(.scope-chain .details-section > .content > .group > .row.properties:not(.empty)):
(.scope-chain .details-section > .content > .group > .row.properties:not(.empty):last-child):
Styles for two object trees property sections next to eachother.
2016-01-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add basic Animation section to Visual Sidebar
https://bugs.webkit.org/show_bug.cgi?id=152692
Reviewed by Timothy Hatcher.
Adds a non-autocompleting section to the "Effects" section (renamed from
"Animations") of the Visual sidebar for setting CSS Animation values.
* Scripts/copy-user-interface-resources.pl:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/AnimationPlayStatePaused.svg: Added.
* UserInterface/Images/AnimationPlayStateRunning.svg: Added.
* UserInterface/Main.html:
* UserInterface/Views/VisualStyleBasicInput.js: Added.
(WebInspector.VisualStyleBasicInput):
(WebInspector.VisualStyleBasicInput.prototype.get value):
(WebInspector.VisualStyleBasicInput.prototype.set value):
(WebInspector.VisualStyleBasicInput.prototype.get synthesizedValue):
(WebInspector.VisualStyleBasicInput.prototype._handleInputElementInput):
Very basic editor that is just an input box with a given placeholder.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAnimationSection):
Creates the necessary property editors and adds them to their respective rows.
2016-01-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add remaining background style properties to Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=152757
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
Added background-blend-mode and background-origin property editors.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype._handleMouseOver):
Unrelated error that occurred when the user was hovering over a selector item
before the tree outline was able to create the selected item.
2016-01-05 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION(r187929): Web Inspector: Forced Layout and Style Recalculation records do not show up in Layout & Rendering timeline DataGrid
https://bugs.webkit.org/show_bug.cgi?id=152747
Reviewed by Timothy Hatcher.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
We want top-level Layout records. Not necessarily Layout records that are
at the top of all records. Layout events such as style recalculation
and forced layout may be triggered by script and therefore not be at
the top of all records.
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Timelines view doesn't remember how I like to sort things
https://bugs.webkit.org/show_bug.cgi?id=152626
Reviewed by Joseph Pecoraro.
Currently, all instances of DataGrid have their sort column reset with each
open/close of Web Inspector. This doesn't really make sense seeing as we save
the user's settings in many other cases, so the sort method (which column)
should be saved between inspector sessions.
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.set sortColumnIdentifier):
Moved the logic for classLists and events to _updateSortedColumn.
(WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting):
Instead of just setting the original sort method when instantiating the DataGrid,
a WebInspector.Setting object is now able to be passed in via this setter
to give the DataGrid access to the stored sort method value.
(WebInspector.DataGrid.prototype._updateSortedColumn):
Updates the classLists and fires events. If a sort column setting object
exists, update its value.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add debounce to URL inputs in the Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=152655
Reviewed by Joseph Pecoraro.
Adding a debounce to url() based Visual sidebar editors will prevent needless
errors from being thrown as the user types, since incomplete URL's will not
be able to be located.
* UserInterface/Base/Utilities.js:
(Function.prototype.debounce):
Prevents the given function from executing more than once in the specified amount of time.
* UserInterface/Views/VisualStyleBackgroundPicker.js:
(WebInspector.VisualStyleBackgroundPicker):
* UserInterface/Views/VisualStyleURLInput.js:
(WebInspector.VisualStyleURLInput):
2016-01-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Fix debug context menu string and reload without cache tooltip string
https://bugs.webkit.org/show_bug.cgi?id=152725
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: add context menu items to switch CSS color property value syntax between RGB, HSL, etc
https://bugs.webkit.org/show_bug.cgi?id=151918
Reviewed by Timothy Hatcher.
Created a ColorSwatch class to hold all functionality for color swatches,
allowing all context menu and popover events to be centralized.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Models/Color.js:
Changed all 'var' to 'let' and 'nickname' to 'keyword' as per the spec.
Mostly mechanical changes.
(WebInspector.Color.prototype.isKeyword):
Looks at the RGB values of each keyword to see if the current color
matches any of them.
(WebInspector.Color.prototype.canBeSerializedAsShortHEX):
Fixed to account for alpha values, since HEXAlpha is now supported.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch): Deleted.
(@media (-webkit-max-device-pixel-ratio: 1)): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch > span): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:hover > span): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:active > span): Deleted.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked.updateCodeMirror.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked.updateCodeMirror): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked): Deleted.
* UserInterface/Views/ColorSwatch.css: Copied from Source/WebInspectorUI/UserInterface/Views/VisualStyleColorPicker.css.
(.color-swatch):
(@media (-webkit-max-device-pixel-ratio: 1)):
(.color-swatch > span):
(.color-swatch:hover > span):
(.color-swatch:active > span):
* UserInterface/Views/ColorSwatch.js: Added.
(WebInspector.ColorSwatch):
(WebInspector.ColorSwatch.prototype.get element):
(WebInspector.ColorSwatch.prototype.set color):
(WebInspector.ColorSwatch.prototype.get color):
(WebInspector.ColorSwatch.prototype._colorSwatchClicked):
(WebInspector.ColorSwatch.prototype._colorPickerColorDidChange):
(WebInspector.ColorSwatch.prototype._handleContextMenuEvent):
(WebInspector.ColorSwatch.prototype._getNextValidHEXFormat.hexMatchesCurrentColor):
(WebInspector.ColorSwatch.prototype._getNextValidHEXFormat):
Loops through the list of HEX formats to find the first format that is valid
for the current color in the list after the current format.
(WebInspector.ColorSwatch.prototype._updateSwatch):
* UserInterface/Views/VisualStyleColorPicker.css:
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch):
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch > span):
* UserInterface/Views/VisualStyleColorPicker.js:
(WebInspector.VisualStyleColorPicker):
(WebInspector.VisualStyleColorPicker.prototype._colorSwatchColorChanged):
(WebInspector.VisualStyleColorPicker.prototype._updateColorSwatch):
(WebInspector.VisualStyleColorPicker.prototype._colorSwatchClicked): Deleted.
(WebInspector.VisualStyleColorPicker.prototype._colorPickerColorDidChange): Deleted.
2016-01-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Mark last parameter of webkitGetUserMedia as non-optional to match updated IDL
https://bugs.webkit.org/show_bug.cgi?id=152702
Reviewed by Brian Burg.
* UserInterface/Models/NativeFunctionParameters.js:
New IDL, and tests, show that the error callback is non-optional.
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add context menu items to CSS selectors to auto-generate pseudo selectors
https://bugs.webkit.org/show_bug.cgi?id=152657
Reviewed by Timothy Hatcher.
Instead of having to copy a selector, create a new one, paste it, and then add
a pseudo class or element, a context menu item has been added to automate this
process for the user for each CSS pseudo-selector.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/CSSStyleManager.js:
Added a static object containing the list of CSS pseudo-element names.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addRule.completed):
(WebInspector.DOMNodeStyles.prototype.addRule.styleChanged):
(WebInspector.DOMNodeStyles.prototype.addRule.addedRule):
(WebInspector.DOMNodeStyles.prototype.addRule):
Now accepts a second argument for setting the starting text value of the new rule.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2016-01-04 Brian Burg <bburg@apple.com>
Web Inspector: add a DebugUI context menu item for saving inspector protocol traffic to file
https://bugs.webkit.org/show_bug.cgi?id=152671
Reviewed by Timothy Hatcher.
Add a new tracer that captures all messages, and debug context menu
items to control whether to capture protocol traffic and export it.
In later patches, a reciprocal "Import..." context menu item will
allow opening saved protocol traces and viewing them in a debug UI
content view for debugging/visualizing protocol traffic.
* UserInterface/Base/Main.js:
* UserInterface/Debug/CapturingProtocolTracer.js: Copied from Source/WebInspectorUI/UserInterface/Protocol/ProtocolTracer.js.
This tracer saves everything into a flat array. JSON protocol
messages are saved as escaped strings, in case they are not
valid JSON. We want to be able to debug such scenarios.
(WebInspector.CapturingProtocolTracer):
(WebInspector.CapturingProtocolTracer.prototype.get trace):
(WebInspector.CapturingProtocolTracer.prototype.logFrontendException):
(WebInspector.CapturingProtocolTracer.prototype.logProtocolError):
(WebInspector.CapturingProtocolTracer.prototype.logFrontendRequest):
(WebInspector.CapturingProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.CapturingProtocolTracer.prototype.logDidHandleEvent):
(WebInspector.CapturingProtocolTracer.prototype._stringifyMessage):
(WebInspector.CapturingProtocolTracer.prototype._processEntry):
* UserInterface/Debug/ProtocolTrace.js: Added.
This is a dumb container that holds protocol trace data. It will
be responsible for deserializing saved trace files in later work.
(WebInspector.ProtocolTrace):
(WebInspector.ProtocolTrace.prototype.addEntry):
(WebInspector.ProtocolTrace.prototype.get saveData):
* UserInterface/Main.html:
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
Simplify the implementation. Now there are one or two tracers
at any given time. The default tracer handles legacy logging
behavior and always exists. The custom tracer is installed when
the "Capture Protocol Traffic" context menu item is toggled.
Dispatch to the array of active tracers at each trace point.
Tracers now get the actual JSON message instead of a stringified
version passed as an argument.
(InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.set dumpInspectorTimeStats):
(InspectorBackendClass.prototype.set customTracer):
(InspectorBackendClass.prototype.get activeTracers):
(InspectorBackendClass.prototype._startOrStopAutomaticTracing):
(InspectorBackendClass.prototype._sendMessageToBackend):
(InspectorBackendClass.prototype._dispatchResponse):
(InspectorBackendClass.prototype._dispatchEvent):
(InspectorBackendClass.prototype.set activeTracer): Deleted.
(InspectorBackendClass.prototype.get activeTracer): Deleted.
* UserInterface/Protocol/LoggingProtocolTracer.js:
(WebInspector.LoggingProtocolTracer.prototype._processEntry):
(WebInspector.LoggingProtocolTracer):
(WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest):
(WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse):
(WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent):
(WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent):
* UserInterface/Protocol/ProtocolTracer.js:
(WebInspector.ProtocolTracer.prototype.logFrontendException):
(WebInspector.ProtocolTracer.prototype.logProtocolError):
(WebInspector.ProtocolTracer.prototype.logFrontendRequest):
(WebInspector.ProtocolTracer.prototype.logWillHandleResponse):
(WebInspector.ProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.ProtocolTracer.prototype.logWillHandleEvent):
(WebInspector.ProtocolTracer.prototype.logDidHandleEvent):
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Comma separated values in the Visual sidebar are appended with )
https://bugs.webkit.org/show_bug.cgi?id=152653
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
Modified the RexExp used to split the comma separated value to account for strings
with commas inside parenthesis (such as rgba() or hsla()) as well as ones without
commas (such as "arial" and "red").
2016-01-03 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual sidebar selector section displays inherited section for non-editable rules
https://bugs.webkit.org/show_bug.cgi?id=152659
Reviewed by Brian Burg.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype.update):
Only add a new inherited section header if it will contain at least one inherited rule.
2016-01-02 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: List all resources that are initiated by the selected resource in the Network tab
https://bugs.webkit.org/show_bug.cgi?id=152647
Reviewed by Timothy Hatcher.
Selecting resources in the Network tab will now display a list of all resources
that the selected resource loaded, allowing for easier understanding of the
relationship between all the resources loaded on a page.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
Added functions to generate link(s) to Resource instead of SourceCodeLocation.
* UserInterface/Models/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.get initiatedResources):
(WebInspector.Resource.prototype.addInitiatedResource):
Each time a resource is added, if it has an initiator, it adds itself to the
initiator's list of initiated resources.
* UserInterface/Views/Main.css:
(.resource-list > .resource-link):
(.resource-list > .resource-link::before):
(.resource-list > .resource-link + .resource-link):
(.resource-link):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
2016-01-02 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add list-style properties to Visual Sidebar
https://bugs.webkit.org/show_bug.cgi?id=152631
Reviewed by Timothy Hatcher.
Seeing as lists are very common in web pages across the internet, adding
a section to let users edit the properties unique to lists seems prudent.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/ListStylePositionInside.svg: Added.
* UserInterface/Images/ListStylePositionOutside.svg: Added.
* UserInterface/Main.html:
Re-added UserInterface/Views/VisualStyleURLInput.js
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateListStyleSection):
* UserInterface/Views/VisualStyleKeywordIconList.css:
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon):
Added specified color property to ensure that :active doesn't break the color of the svg.
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon:matches(.computed, .selected)):
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected):
Changed the background-color and border-color values to match the rest of Web Inspector.
* UserInterface/Views/VisualStyleKeywordIconList.js:
(WebInspector.VisualStyleKeywordIconList):
(WebInspector.VisualStyleKeywordIconList.dashToCapital): Deleted.
(WebInspector.VisualStyleKeywordIconList.createListItem):
The "initial" keyword will also use UserInterface/Images/VisualStyleNone.svg
* UserInterface/Views/VisualStyleURLInput.js: Added.
Previously removed in r192705.
2016-01-02 Alberto Garcia <berto@igalia.com>
[GTK] webkit 2.3.5 build failure with python 3.3.4
https://bugs.webkit.org/show_bug.cgi?id=128971
Reviewed by Michael Catanzaro.
Make sure that the stdin encoding is 'UTF-8' if using Python 3,
otherwise the build will break.
* Scripts/cssmin.py:
2016-01-01 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: shadow visual sidebar section can be confused with the box shadow section
https://bugs.webkit.org/show_bug.cgi?id=148107
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
Changed title of "Shadow" sub-section in "Background" to "Box Shadow".
2016-01-01 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: The Computed Styles Properties section shows warning icons and doesn't update if collapsed
https://bugs.webkit.org/show_bug.cgi?id=152609
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
If the CodeMirror instance is read-only, don't add any warning icons.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel):
(WebInspector.ComputedStyleDetailsPanel.prototype._handleCollapsedStateChanged):
The properties text editor will now refresh whenever the details section
becomes un-collapsed.
* UserInterface/Views/DetailsSection.js:
(WebInspector.DetailsSection.prototype.set collapsed):
Now fires an event with the current collapsed state as data.
2015-12-31 Matt Baker <mattbaker@apple.com>
Web Inspector: "No Filter Results" message overlaps Debugger sidebar sections
https://bugs.webkit.org/show_bug.cgi?id=150608
Reviewed by Brian Burg.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.showResourcesWithIssuesOnlyFilterFunction):
Style cleanup.
(WebInspector.DebuggerSidebarPanel):
Add breakpoints tree to the details section before adding Global Breakpoint
elements, since adding them will trigger filtering.
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
Simplified selection management between the various tree outlines.
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
Style cleanup.
(WebInspector.DebuggerSidebarPanel.prototype.get hasSelectedElement): Deleted.
Defer to the base class implementation.
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectCallStackContentTreeElements): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectBreakpointContentTreeElements): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectPauseReasonContentTreeElements): Deleted.
These are no longer needed, since the list of visible tree elements list can be used
to manage tree element selection is a more general way.
* UserInterface/Views/NavigationSidebarPanel.css:
Empty content placeholders are now inserted into the DOM as a sibling of the
tree that was filtered. As such, they can be a child of a details section, or
the sidebar's content element.
(.sidebar > .panel.navigation > .content .empty-content-placeholder):
Styles for all empty content placeholders.
(.sidebar > .panel.navigation > .content > .empty-content-placeholder):
Styles for empty content placeholders that fill the sidebar's content element.
(.sidebar > .panel.navigation > .content .message):
Styles for all empty content placeholders.
(.sidebar > .panel.navigation > .empty-content-placeholder): Deleted.
(.sidebar > .panel.navigation > .empty-content-placeholder > .message): Deleted.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
Track the tree outline which currently has a selection.
Manage a map of content placeholders
(WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype.get hasSelectedElement):
Check all visible content trees for a selected element.
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype.treeElementForRepresentedObject):
Check all visible content trees for the represented object.
(WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
No sidebars currently have more than one filterable content tree outline, but in
the future we will want to support this. Empty content placeholder visibility
is now done per tree outline.
(WebInspector.NavigationSidebarPanel.prototype.show):
Focus the tree outline that most recently had the selection, or the
first tree outline in the visible tree list, if it exists.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults.checkTreeOutlineForEmptyFilterResults):
Tree is considered filtered if no visible filterable tree elements are found.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
Check all visible trees that support filtering.
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
Support for filtering multiple content trees.
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
Check if the element's tree outline supports filtering, before applying filters.
(WebInspector.NavigationSidebarPanel.prototype._treeSelectionDidChange):
Update the selected tree outline.
(WebInspector.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded):
Create a new empty content placeholder element for the tree.
(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Deleted.
No longer used.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.get hasSelectedElement): Deleted.
Defer to the base class implementation.
2015-12-29 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Styling of invalid selector persists when changing the selected node
https://bugs.webkit.org/show_bug.cgi?id=152456
Reviewed by Brian Burg.
If the user changes the selector of a CSS rule to be invalid (e.g. having
a { or ; character), it is expected that the invalid indicator will be removed
once the user changes nodes or reverts the selector to its previous value.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header > .icon.toggle-able:hover):
(.style-declaration-section > .header > .icon.toggle-able:active):
(.style-declaration-section:not(.invalid-selector) > .header > .icon.toggle-able:hover): Deleted.
Added better :hover and :active styles.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
(WebInspector.CSSStyleDeclarationSection.prototype._handleIconElementClicked):
If the selector is invalid, simply refresh the section to regenerate the
original selector with correct content, specificity, and highlighting.
(WebInspector.CSSStyleDeclarationSection.prototype.get _hasInvalidSelector): Deleted.
Moved the state of the invalid selector to a member
variable instead of a DOM class.
(WebInspector.CSSStyleDeclarationSection.prototype._updateSelectorIcon):
Renamed from _markSelector for clarity.
* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item.selector-invalid > .icon:hover):
(.item.visual-style-selector-item.selector-invalid > .icon:active):
(.item.visual-style-selector-item.selector-invalid > .icon):
Added :hover and :active styles.
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem):
(WebInspector.VisualStyleSelectorTreeItem.prototype.onattach):
(WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector):
(WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleIconElementClicked):
(WebInspector.VisualStyleSelectorTreeItem.prototype._selectorChanged): Deleted.
Changed the names of a few functions to provide better
consistency across the classes in the Style sidebar.
2015-12-27 Brian Burg <bburg@apple.com>
Web Inspector: improve pre-filled bugzilla link on Uncaught Exception reporter sheet
https://bugs.webkit.org/show_bug.cgi?id=152402
Reviewed by Joseph Pecoraro.
Include the UA string, inspected page URL, and a template that includes
steps to reproduce and notes. Other common headings (regression, expected,
results, summary) are omitted because they are unlikely to be known when
an uncaught exception occurs, or are obvious ("shouldn't throw exception").
* UserInterface/Debug/UncaughtExceptionReporter.js:
2015-12-21 Nikita Vasilyev <nvasilyev@apple.com>
WebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithTypeAllowed is not a function
https://bugs.webkit.org/show_bug.cgi?id=152471
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector._updateNewTabButtonState):
Don't use arrow functions because of https://webkit.org/b/152497 "Arrow functions: 'this' isn't lexically bound"
2015-12-21 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Remove unused WebInspector.Object.removeAllListeners
https://bugs.webkit.org/show_bug.cgi?id=152474
Reviewed by Timothy Hatcher.
* UserInterface/Base/Object.js:
(WebInspector.Object.removeAllListeners): Deleted.
(WebInspector.Object.prototype.removeAllListeners): Deleted.
2015-12-20 Dan Bernstein <mitz@apple.com>
Remove unused setToolbarHeight
https://bugs.webkit.org/show_bug.cgi?id=152466
Reviewed by Darin Adler.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Protocol/InspectorFrontendHostStub.js:
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.setToolbarHeight): Deleted.
2015-12-19 Dan Bernstein <mitz@apple.com>
[Mac] WebKit contains dead source code for OS X Mavericks and earlier
https://bugs.webkit.org/show_bug.cgi?id=152462
Reviewed by Alexey Proskuryakov.
- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
that became uniform across all OS X versions as a result:
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Scripts/copy-user-interface-resources.pl: Removed code to delete Images/Legacy.
* UserInterface/Images/Legacy: Removed this empty directory.
2015-12-18 Matt Baker <mattbaker@apple.com>
Web Inspector: Make it possible to debug injected scripts when the Debug UI is enabled
https://bugs.webkit.org/show_bug.cgi?id=152445
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
Added function to check for debug UI.
* UserInterface/Base/Object.js:
Added notification for debug UI enabled state change.
* UserInterface/Base/Utilities.js:
(isWebInspectorInternalScript):
(isWebInspectorDebugScript):
Added functions to check for internal and debug inspector scripts.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager):
Maintain a list of inspector debug scripts, so that the manager can
add and remove them when the debug UI is enabled/disabled.
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
(WebInspector.DebuggerManager.prototype.reset):
Clear the list of inspector debug scripts.
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
Skip internal inspector scripts. Debug inspector scripts are tracked,
and an added event is dispatched if the debug UI is enabled.
(WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange):
Dispatch added/removed events for inspector debug scripts.
* UserInterface/Debug/Bootstrap.js:
(WebInspector.runBootstrapOperations):
Expose changes to the debug UI setting to the reset of the UI, by dispatching
a WebInspector.Notification.DebugUIEnabledDidChange event.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Only resolve inspector debug source locations when the debug UI is enabled.
* UserInterface/Test/Test.js:
Reimplemented debug UI check for tests. Always returns false.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
Removed check for inspector debug scripts. DebuggerManager filters scripts as needed.
(WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved):
Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved):
Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts.
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
Removed check for inspector debug scripts. DebuggerManager filters scripts as needed.
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove "local" scope type from the protocol
https://bugs.webkit.org/show_bug.cgi?id=152409
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CSS warning's fake CallFrame is not creating a valid payload
https://bugs.webkit.org/show_bug.cgi?id=152413
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
This attempts to create a CallFrame from a Console.CallFrame payload,
but this was missing the required functionName string parameter.
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Provide a way to distinguish a nested lexical block from a function's lexical block
https://bugs.webkit.org/show_bug.cgi?id=152361
Reviewed by Saam Barati.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
New "Block Variables" string.
* UserInterface/Models/ScopeChainNode.js:
New "Block" scope type, and update existing types.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Parse the protocol type to frontend types. Use the protocol generated enum.
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve names in Debugger Call Stack section when paused
https://bugs.webkit.org/show_bug.cgi?id=152398
Reviewed by Brian Burg.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Use a new fromPayload helper to construct the CallFrame and share code.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.functionNameFromPayload):
(WebInspector.CallFrame.programCodeFromPayload):
(WebInspector.CallFrame.fromDebuggerPayload):
(WebInspector.CallFrame.fromPayload):
Add a new way to construct a call frame. There are two kinds of
CallFrame payloads in the protocol:
- Debugger.CallFrame, this new path
- Console.CallFrame, the pre-existing path
2015-12-17 Brian Burg <bburg@apple.com>
Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting
https://bugs.webkit.org/show_bug.cgi?id=151635
Reviewed by Joseph Pecoraro.
Follow-up fix to stop double-logging everything.
* UserInterface/Protocol/LoggingProtocolTracer.js:
(WebInspector.LoggingProtocolTracer.prototype._processEntry):
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve console.trace, make it more like console.assert and inline the message
https://bugs.webkit.org/show_bug.cgi?id=152352
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Trace" related strings.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.expand):
Since we auto-expand Trace messages for their Call Stack, don't also
auto-expand a single inner object, which may be big and push the
actual stack trace off the screen.
(WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):
Behave like Assert messages and absorb a message string, and include
extra arguments gracefully.
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
For expandable messages with simple extra arguments (console.trace with
primitives and backtrace, or console.assert with primitives and backtrace)
we were hiding the inline lossless previews and not showing them as a
bulleted list below. We can just keep the lossless previews inline in the
title, since they were only put there because they are small and lossless.
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
No need to hard code "console.trace()" in the clipboard.
* UserInterface/Views/ConsoleMessageView.css:
(.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider):not(.inline-lossless)):
(.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider)): Deleted.
Don't hide the inline lossless preview in the console message title when it is inline-lossless.
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.expand):
Do not allow expanding a loss-less preview.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add JSContext Script Profiling
https://bugs.webkit.org/show_bug.cgi?id=151899
Reviewed by Brian Burg.
Enable the Timeline tab for JSContext inspection. Currently only
JSContext inspection will use the ScriptProfiler domain, it will
be enabled for Page inspection in a follow-up.
First pass at the UI creates basic ScriptTimelineRecords for
ScriptProfiler events. At the end of recording, when profiles
are downloaded, it attaches profiles to the timeline records
and refreshes the Scripts timeline.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.defaultInstruments):
(WebInspector.TimelineManager.prototype.computeElapsedTime):
(WebInspector.TimelineManager.prototype.scriptProfilerIsTracking):
(WebInspector.TimelineManager.prototype._loadNewRecording):
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
(WebInspector.TimelineManager.prototype._resourceWasAdded):
(WebInspector.TimelineManager.prototype._garbageCollected):
(WebInspector.TimelineManager.prototype._addRecord): Deleted.
* UserInterface/Main.html:
* UserInterface/Models/Instrument.js:
(WebInspector.Instrument.startLegacyTimelineAgent):
* UserInterface/Models/ScriptInstrument.js:
(WebInspector.ScriptInstrument.prototype.startInstrumentation):
(WebInspector.ScriptInstrument.prototype.stopInstrumentation):
(WebInspector.ScriptInstrument):
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype.get profilePayload):
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.EventType.displayName):
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.refresh):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.sourceCodeTimelinesSupported):
(WebInspector.TimelineRecording.prototype.timelineForRecordType):
(WebInspector.TimelineRecording.prototype.addRecord):
* UserInterface/Protocol/ScriptProfilerObserver.js: Copied from Source/WebInspectorUI/UserInterface/Models/ScriptInstrument.js.
(WebInspector.ScriptProfilerObserver.prototype.trackingStart):
(WebInspector.ScriptProfilerObserver.prototype.trackingUpdate):
(WebInspector.ScriptProfilerObserver.prototype.trackingComplete):
(WebInspector.ScriptProfilerObserver):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
(WebInspector.ScriptTimelineView.prototype._processPendingRecords):
(WebInspector.ScriptTimelineView.prototype._scriptTimelineRecordRefreshed):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.isTabAllowed):
2015-12-17 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r193913): Popover covers completion suggestions
https://bugs.webkit.org/show_bug.cgi?id=152369
Reviewed by Timothy Hatcher.
* UserInterface/Views/Variables.css:
(:root):
Swap popover and tooltip z-index ordering.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION: Web Inspector: console.dir(...) should force allowing object expansion
https://bugs.webkit.org/show_bug.cgi?id=152328
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameter):
Propogate the force parameter down.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve copy of console messages with multiple arguments - console.log(obj1, obj2)
https://bugs.webkit.org/show_bug.cgi?id=152330
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
Copy the inner text of the extra arguments list as well, for
console messages with multiple objects. Rearrange the sections
that, if there is a stack trace it comes at the end after
multiple arguments. If there is no stack trace, include the
location info next to the top line, before multiple arguments.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve copy of console message containing Array and Map output
https://bugs.webkit.org/show_bug.cgi?id=152329
Reviewed by Timothy Hatcher.
Introduce a real space in the content instead of style specific
margins so the existing copy/paste mechanism (innerText)
will have spaces between index/key and value.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-name): Deleted.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeArrayIndexTreeElement):
* UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
(.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name): Deleted.
* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.titleFragment):
(WebInspector.ObjectTreeMapEntryTreeElement):
* UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeSetIndexTreeElement):
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Typing object literal in the console causes a parse error
https://bugs.webkit.org/show_bug.cgi?id=141737
Reviewed by Timothy Hatcher.
Provide a convenience in console evaluations for JSON object like input.
If the console input starts with '{' and ends with '}' wrap the input
in parenthesis to force evaluation as an expression.
For example, input "{a:1}" would be convenience wrapped to "({a:1})"
and produce the expected object. This helps avoid the unusual treatment
of "{a:1}" as program containing a labeled statement, which is often
not what the user expects. And in more realistic cases, like "{a:1, b:2}",
produce a SyntaxError.
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Detect and convenience wrap the given expression.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception View has undefined exception URL
https://bugs.webkit.org/show_bug.cgi?id=152327
Reviewed by Darin Adler.
* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleUncaughtException):
Use ErrorEvent's filename property, not url which is undefined.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: ReferenceError: Can't find variable: resolvedValue
https://bugs.webkit.org/show_bug.cgi?id=152326
Reviewed by Darin Adler.
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
This identifier is used later on, so assign it here.
2015-12-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Localize "global code" and "eval code" strings
https://bugs.webkit.org/show_bug.cgi?id=152313
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.fromPayload):
Localize the strings given to use from the backend.
2015-12-15 Matt Baker <mattbaker@apple.com>
Web Inspector: Convert Sidebar classes to use View
https://bugs.webkit.org/show_bug.cgi?id=152274
Reviewed by Brian Burg.
Updated Sidebar and SidebarPanel to inherit from View. Mostly mechanical changes.
Once the DetailsSection class family inherits from View (https://webkit.org/b/152269),
directly modifying a sidebar's 'contentView' element will rarely be necessary.
* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
Add/remove panels as subviews of the sidebar.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._filterDidChange):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildLayerInfoSection):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WebInspector.ProbeDetailsSidebarPanel.prototype.set inspectedProbeSets):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
* UserInterface/Views/SidebarPanel.js:
Inherit from View.
(WebInspector.SidebarPanel):
Replace the content element (the portion of the view excluding navigation
bars, filter bars, etc.) with a View object. A sidebar's content can be a mixture
of unwrapped DOM elements and View objects. For now, the content view's element
will be mutated directly, but once the DetailsSection class family inherits from
the View class the handling of details sections will be simplified.
(WebInspector.SidebarPanel.prototype.get contentView):
(WebInspector.SidebarPanel.prototype.shown):
(WebInspector.SidebarPanel.prototype.hidden):
(WebInspector.SidebarPanel.prototype.get contentElement): Deleted.
Replaced by WebInspector.SidebarPanel.prototype.get contentView.
* UserInterface/Views/StyleDetailsPanel.js:
Inherit from View.
(WebInspector.StyleDetailsPanel):
(WebInspector.StyleDetailsPanel.prototype.get element): Deleted.
Defer to View.element getter.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
2015-12-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Stack traces in console incorrectly show "(anonymous function)" for global code
https://bugs.webkit.org/show_bug.cgi?id=152280
Reviewed by Brian Burg.
* UserInterface/Images/Program.svg: Added.
* UserInterface/Images/gtk/Program.svg: Added.
Copied from TimelineRecordScriptEvaluated.svg.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame):
(WebInspector.CallFrame.prototype.get programCode):
Add a new property to check if this call frame is in program code.
(WebInspector.CallFrame.fromPayload):
Detect different sources of program code (global, eval, module).
* UserInterface/Views/CallFrameIcons.css:
(.program-icon .icon):
* UserInterface/Views/CallFrameView.js:
(WebInspector.CallFrameView.iconClassNameForCallFrame):
Give program code the [S] global script icon like in profiles.
2015-12-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Copy message from console with a stack trace does not include source code locations
https://bugs.webkit.org/show_bug.cgi?id=152270
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
When the the StackTrace was upgraded to a real collection of CallFrame
object's the CallFrame's got real SourceCodeLocation properties.
2015-12-13 Matt Baker <mattbaker@apple.com>
Web Inspector: Make TimelineOverview's graph container a subview
https://bugs.webkit.org/show_bug.cgi?id=152235
Reviewed by Brian Burg.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Create graph container subview.
(WebInspector.TimelineOverview.prototype._instrumentAdded):
Add overview to the graph container view.
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
Remove overview from the graph container view.
(WebInspector.TimelineOverview.prototype.layout):
No longer necessary to manually lay out overview graphs.
(WebInspector.TimelineOverview.prototype._needsLayout): Deleted.
Removed dead code.
2015-12-12 Matt Baker <mattbaker@apple.com>
Web Inspector: CodeMirrorTokenTrackingController handles symbols in class definitions incorrectly
https://bugs.webkit.org/show_bug.cgi?id=152218
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
Stop checking for object literal shorthand property if an open parenthesis is found.
This check became necessary with the introduction of ES6 class syntax.
* UserInterface/Views/CodeMirrorAdditions.js:
Use localState when available, to prevent passing a state that doesn't define a tokenize property.
2015-12-12 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION (r191613): Web Inspector: Can't type spaces when editing DOM nodes
https://bugs.webkit.org/show_bug.cgi?id=152173
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
Disable the keyboard shortcuts when they are created. They will be
enabled when the panel is shown / hidden. It doesn't really make sense
that these are on the sidebar panel instead of the tab, but things
will be changing in Timelines soon anyways so just fix this now.
2015-12-12 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: "Selected Element" should use sans-serif font, not monospace
https://bugs.webkit.org/show_bug.cgi?id=152212
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.css:
(.console-user-command.special-user-log > .console-message-text):
2015-12-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: When logging strings, detect stack traces and show them as StackTraceView
https://bugs.webkit.org/show_bug.cgi?id=149790
Reviewed by Timothy Hatcher.
* UserInterface/Models/StackTrace.js:
(WebInspector.StackTrace.isLikelyStackTrace): Added.
* UserInterface/Views/ConsoleMessageView.css:
(.console-message-extra-parameter .stack-trace):
Display stack trace view on the same line as a list bullet point from
console message extra parameter.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
Don't format with string substitutions for stack traces. E.g. there is
no need to replace %s with the next argument.
(WebInspector.ConsoleMessageView.prototype._isStackTrace): Added.
(WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
Detect stack traces and format them appropriately.
2015-12-10 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: debugger dashboard's switching arrows are positioned too close to the dashboard border
https://bugs.webkit.org/show_bug.cgi?id=151867
Reviewed by Timothy Hatcher.
* UserInterface/Views/DashboardContainerView.css:
(.dashboard-container .advance-arrow):
2015-12-10 Matt Baker <mattbaker@apple.com>
Web Inspector: debugger popover should have source location link when showing function source
https://bugs.webkit.org/show_bug.cgi?id=151866
Reviewed by Brian Burg.
Added source code location link to function popover header.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
Create source code location link from response payload.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
2015-12-10 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: [Meta] Unify z-index values in Inspector's CSS
https://bugs.webkit.org/show_bug.cgi?id=151978
Introduce CSS variables for z-index due to recurring issues with incorrectly overlapping elements.
From now on, all z-index values >= 64 must be defined as variables.
Values below 64 must not.
Reviewed by Timothy Hatcher.
* UserInterface/Views/Variables.css:
(:root):
Introduce z-index variables.
* UserInterface/Debug/UncaughtExceptionReporter.css:
(.sheet-container):
* UserInterface/Views/BoxModelDetailsSectionRow.css:
(.details-section .row.box-model .editing):
* UserInterface/Views/CompletionSuggestionsView.css:
(.completion-suggestions):
* UserInterface/Views/DashboardContainerView.css:
(.dashboard-container .advance-arrow):
* UserInterface/Views/DataGrid.css:
(.data-grid .resizer):
* UserInterface/Views/DetailsSection.css:
(.details-section > .header):
(.details-section .details-section > .header):
* UserInterface/Views/FindBanner.css:
(.find-banner):
(.find-banner > button.segmented:active):
* UserInterface/Views/Main.css:
(#docked-resizer):
(.message-text-view):
(.bouncy-highlight):
* UserInterface/Views/Popover.css:
(.popover):
* UserInterface/Views/Resizer.css:
(.resizer):
(.glass-pane-for-drag):
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > .scroll-container):
* UserInterface/Views/VisualStyleSelectorSection.css:
(.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider):
2015-12-09 Matt Baker <mattbaker@apple.com>
Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
https://bugs.webkit.org/show_bug.cgi?id=151876
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
Use root view singleton instead of creating it explicitly.
* UserInterface/Views/View.js:
(WebInspector.View):
(WebInspector.View.rootView):
Singleton root view access. Lazily create and return a view backed
by the document's body element.
(WebInspector.View.prototype.isDescendantOf):
(WebInspector.View.prototype.insertSubviewBefore):
(WebInspector.View.prototype.removeSubview):
(WebInspector.View.prototype.didMoveToWindow):
Notify the view when it becomes, or is no longer, descended from the root view.
(WebInspector.View.prototype.didMoveToParent):
Notify the view when it's added to, or removed from, a parent view.
(WebInspector.View._scheduleLayoutForView):
(WebInspector.View._cancelScheduledLayoutForView):
(WebInspector.View.prototype.makeRootView): Deleted.
No longer needed.
(WebInspector.View.prototype.didAttach): Deleted.
(WebInspector.View.prototype.didDetach): Deleted.
Replaced by didMoveToParent.
2015-12-09 Brian Burg <bburg@apple.com>
Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting
https://bugs.webkit.org/show_bug.cgi?id=151635
Reviewed by Timothy Hatcher.
When closing and reopening the inspector, the setting for whether
to dump protocol messages should be persisted. Otherwise, enabling
dumping from the debug-only UI will miss the initial flood of
messages that are processed when the Inspector loads initial data.
To support a persistent setting, and build some infrastructure for
more advanced uses of collected protocol messages, this patch adds
a new object to trace protocol events. It gets callbacks for each
and implements the console-dumping functionality previously baked in
to InspectorBackend.
In follow-up patches, other protocol tracers will be added to save
protocol data to disk, marshall it to a higher inspection level,
or provide more fine-grained control over what is logged.
This change moves Setting.js into the Base/ directory,
since it is used by Views, Models, and now Protocol classes.
* UserInterface/Base/Setting.js: Renamed from Source/WebInspectorUI/UserInterface/Models/Setting.js.
(WebInspector.Setting):
(WebInspector.Setting.prototype.get name):
(WebInspector.Setting.prototype.get value):
(WebInspector.Setting.prototype.set value):
* UserInterface/Main.html:
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
We still want to support the legacy way to enable dumping:
`InspectorBackend.dumpInspectorProtocolMessages = true`. This
is because some tests always use it, and it's easier to set this
flag in a custom Bootstrap.js file than to configure the Setting.
(InspectorBackendClass.prototype.set dumpInspectorTimeStats):
(InspectorBackendClass.prototype.get dumpInspectorTimeStats):
We still want to support the legacy way to enable dumping:
`InspectorBackend.dumpInspectorTimeStats = true`. This is
because MessageDispatcher checks this flag for its logging.
(InspectorBackendClass.prototype.set activeTracer):
(InspectorBackendClass.prototype.get activeTracer):
Set the active tracer, finalizing and removing any active tracer
if one exists. If removing a custom tracer (setting to null), then
re-sync activeTracer with the automatic tracing Setting.
(InspectorBackendClass.prototype.dispatch):
(InspectorBackendClass.prototype._startOrStopAutomaticTracing):
Sync the Setting with activeTracer. If an custom tracer is active,
don't replace it with the automatic logging tracer.
(InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
(InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
(InspectorBackendClass.prototype._sendMessageToBackend):
(InspectorBackendClass.prototype._dispatchResponse):
(InspectorBackendClass.prototype._dispatchEvent):
(InspectorBackendClass.prototype._flushPendingScripts):
* UserInterface/Protocol/LoggingProtocolTracer.js: Added.
(WebInspector.LoggingProtocolTracer):
(WebInspector.LoggingProtocolTracer.prototype.set dumpMessagesToConsole):
(WebInspector.LoggingProtocolTracer.prototype.get dumpMessagesToConsole):
(WebInspector.LoggingProtocolTracer.prototype.set dumpTimingDataToConsole):
(WebInspector.LoggingProtocolTracer.prototype.get dumpTimingDataToConsole):
(WebInspector.LoggingProtocolTracer.prototype.logFrontendException):
(WebInspector.LoggingProtocolTracer.prototype.logProtocolError):
(WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest):
(WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse):
(WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent):
(WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent):
(WebInspector.LoggingProtocolTracer.prototype._processEntry):
* UserInterface/Protocol/ProtocolTracer.js: Added.
(WebInspector.ProtocolTracer.prototype.logStarted):
(WebInspector.ProtocolTracer.prototype.logFrontendException):
(WebInspector.ProtocolTracer.prototype.logProtocolError):
(WebInspector.ProtocolTracer.prototype.logFrontendRequest):
(WebInspector.ProtocolTracer.prototype.logWillHandleResponse):
(WebInspector.ProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.ProtocolTracer.prototype.logWillHandleEvent):
(WebInspector.ProtocolTracer.prototype.logDidHandleEvent): (WebInspector.ProtocolTracer.prototype.logFinished):
(WebInspector.ProtocolTracer):
* UserInterface/Test.html:
2015-12-09 Brian Burg <bburg@apple.com>
Web Inspector: zoom with Ctrl +/- doesn't work correctly when inspector is docked
https://bugs.webkit.org/show_bug.cgi?id=152076
Reviewed by Timothy Hatcher.
When computing the new width or height of the inspector, take the zoom level into
account. window.inner{Width,Height} are in document pixels, but we need to specify
device pixels to InspectorFrontendHost.
* UserInterface/Base/Main.js:
2015-12-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Workaround arrow function issue in TimelineOverviewGraph.js
https://bugs.webkit.org/show_bug.cgi?id=152031
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
Workaround an existing arrow function issue by moving off of arrow functions here.
2015-12-08 Matt Baker <mattbaker@apple.com>
Web Inspector: Add a hidden property to TreeOutline
https://bugs.webkit.org/show_bug.cgi?id=152014
Reviewed by Timothy Hatcher.
* UserInterface/Views/NavigationSidebarPanel.js:
Removed static property for "hidden" CSS class. No longer used.
(WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
Fixed bug in order of visibleTreeOutlines add/remove.
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline):
(WebInspector.TreeOutline.prototype.get hidden):
(WebInspector.TreeOutline.prototype.set hidden):
Added hidden property, set DOM element hidden attribute.
(WebInspector.TreeElement.prototype.set hidden):
Remove CSS class, set DOM element hidden attribute.
(WebInspector.TreeElement.prototype._attach):
(WebInspector.TreeElement.prototype.expand):
2015-12-08 Matt Baker <mattbaker@apple.com>
Web Inspector: Global Breakpoints should always be visible
https://bugs.webkit.org/show_bug.cgi?id=151066
Reviewed by Timothy Hatcher.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
Turn off filtering for Global Breakpoints elements.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
Allow filtering to be turned off for specific tree elements.
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
Make element visible if filtering suppressed.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
Visible elements with filtering disabled aren't considered when
showing/hiding the empty content placeholder.
2015-12-07 Brian Burg <bburg@apple.com>
Web Inspector: Uncaught Exception page should have better styles and handle more error cases
https://bugs.webkit.org/show_bug.cgi?id=151923
Reviewed by Timothy Hatcher.
Restructure the Uncaught Exception reporting page to act more like
a modal sheet. Distinguish between uncaught exceptions before and
after the frontend is initially loaded. If the frontend is loaded,
add a clickable link that dismisses the sheet and ignores the error.
If the inspector finished loading, then only show at most one
exception at a time, since subsequent interactions can cause spurious
errors when the sheet is active.
Split existing code into multiple functions so it's easier to follow.
Add miscellaneous guards against internal corruption and weird cases.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Store the flag on the global object
in case WebInspector becomes shadowed or otherwise unusable.
* UserInterface/Debug/UncaughtExceptionReporter.css: Renamed from Source/WebInspectorUI/UserInterface/Debug/CatchEarlyErrors.css.
(div.sheet-container):
(div.uncaught-exception-sheet):
(div.uncaught-exception-sheet a):
(div.uncaught-exception-sheet a:active):
(div.uncaught-exception-sheet h2):
(div.uncaught-exception-sheet h1 > img):
(div.uncaught-exception-sheet h2 > img):
(div.uncaught-exception-sheet dl):
(div.uncaught-exception-sheet dt):
(div.uncaught-exception-sheet dd):
(div.uncaught-exception-sheet ul):
(div.uncaught-exception-sheet li):
* UserInterface/Debug/UncaughtExceptionReporter.js: Renamed from CatchEarlyErrors.js.
(stopEventPropagation): Allow clicking whitelisted links on the sheet.
(blockEventHandlers):
(unblockEventHandlers):
(handleUncaughtException):
(dismissErrorSheet):
(createErrorSheet.insertWordBreakCharacters):
(createErrorSheet):
(handleLinkClick):
* UserInterface/Main.html:
* UserInterface/Protocol/MessageDispatcher.js:
(WebInspector.dispatchMessageFromBackend): Don't try to dispatch
messages from the backend when showing the error sheet. They will
probably fail, so suspend dispatching until the sheet is dismissed.
2015-12-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Regression (r192936) - changing selectors in the visual styles sidebar is broken
https://bugs.webkit.org/show_bug.cgi?id=151924
Reviewed by Brian Burg.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
(WebInspector.VisualStyleSelectorSection.prototype._selectorChanged):
Now uses an event listener instead of an "onselect" function.
2015-12-06 Matt Baker <mattbaker@apple.com>
Web Inspector: Comparisons in setters should use the massaged value (" = x || 0/false/null/etc")
https://bugs.webkit.org/show_bug.cgi?id=151910
Reviewed by Timothy Hatcher.
Updated setters that use default values to convert falsy inputs to the default value
before compariing against the current value.
* UserInterface/Models/TimelineMarker.js:
(WebInspector.TimelineMarker.prototype.set time):
Assert new value is a number.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.set hidden):
(WebInspector.DataGridNode.prototype.set data):
Assert new value is of type object. Use shallowEqual compare before setting value.
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set classNames):
Use shallowEqual compare before setting value.
(WebInspector.GeneralTreeElement.prototype.set mainTitle):
(WebInspector.GeneralTreeElement.prototype.set subtitle):
(WebInspector.GeneralTreeElement.prototype.set status):
(WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.set startTime):
(WebInspector.TimelineOverview.prototype.set currentTime):
(WebInspector.TimelineOverview.prototype.set endTime):
(WebInspector.TimelineOverview.prototype.set scrollStartTime):
(WebInspector.TimelineOverview.prototype.set selectionStartTime):
Check current ruler selectionStartTime before setting value.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype.set zeroTime):
(WebInspector.TimelineOverviewGraph.prototype.set startTime):
(WebInspector.TimelineOverviewGraph.prototype.set endTime):
(WebInspector.TimelineOverviewGraph.prototype.set currentTime):
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler):
(WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
(WebInspector.TimelineRuler.prototype.set formatLabelCallback):
(WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
(WebInspector.TimelineRuler.prototype.set zeroTime):
(WebInspector.TimelineRuler.prototype.set startTime):
(WebInspector.TimelineRuler.prototype.set endTime):
(WebInspector.TimelineRuler.prototype.set secondsPerPixel):
(WebInspector.TimelineRuler.prototype.set selectionStartTime):
(WebInspector.TimelineRuler.prototype.set selectionEndTime):
(WebInspector.TimelineRuler.prototype.set duration): Deleted.
The ruler duration and "pinned" state are controlled by setting an end
time. Removed since it wasn't being used, and there shouldn't be two
ways to the exact same thing.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.set zeroTime):
(WebInspector.TimelineView.prototype.set startTime):
(WebInspector.TimelineView.prototype.set endTime):
2015-12-04 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r193486.
https://bugs.webkit.org/show_bug.cgi?id=151904
Causes Infinite Recursion in Timeline Recording (Requested by
JoePeck on #webkit).
Reverted changeset:
"Web Inspector: when a marked-dirty subview is attached to a
parent View, dirtyDescendantsCount gets out of sync"
https://bugs.webkit.org/show_bug.cgi?id=151876
http://trac.webkit.org/changeset/193486
2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught Exception with Reload shortcut in JSContext Inspector
https://bugs.webkit.org/show_bug.cgi?id=151896
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Do not implicitly prevent default on these keyboard shortcuts
so we can system beep if we do not do anything.
(WebInspector._reloadPage):
(WebInspector._reloadPageIgnoringCache):
Bail if there is no PageAgent without preventing default for
a beep system beep. Prevent default if we did something.
2015-12-04 Matt Baker <mattbaker@apple.com>
Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
https://bugs.webkit.org/show_bug.cgi?id=151876
Reviewed by Brian Burg.
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView.prototype._updateShownTabs):
Removed workaround added in https://bugs.webkit.org/show_bug.cgi?id=151594.
* UserInterface/Views/View.js:
(WebInspector.View._scheduleLayoutForView):
Always perform a synchronous layout when a view that isn't descended from the
root view schedules a layout.
2015-12-04 Brian Burg <bburg@apple.com>
Web Inspector: support runtime registration of tab type associations
https://bugs.webkit.org/show_bug.cgi?id=151594
Reviewed by Joseph Pecoraro.
We want to add special tabs that only exist in engineering builds
for debugging purposes. Though the relevant models and views can be
put in the Debug/ directory to exclude them from production builds,
there's no way to register tabs conditionally at runtime; tabs are
hardcoded.
This patch makes it possible to register new tab types at runtime.
First, WebInspector keeps a map of known, registered tab classes.
Details that were hardcoded before---whether to show in New Tab,
whether a tab can be instantiated given the active domains, UI text,
etc.---are now static methods on the base TabContentView or overidden
in its subclasses. Lastly, a public method allows code in Bootstrap.js
to register tabs at runtime. Doing so sends a notification so the
NewTabContentView can show the newly available tab item.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector.isTabTypeAllowed):
(WebInspector.knownTabClasses): Added, used by NewTabContentView.
(WebInspector._createTabContentViewForType): Renamed from _tabContentViewForType.
(WebInspector._rememberOpenTabs):
(WebInspector._updateNewTabButtonState):
(WebInspector._tryToRestorePendingTabs): Added.
Whenever a new tab is registered, try to restore pending tabs, since
an extra tab won't be added initially when production tabs are added.
But, it could have been saved in the Setting for opened tabs.
(WebInspector.showNewTabTab):
(WebInspector.isNewTabWithTypeAllowed):
(WebInspector.createNewTabWithType):
(WebInspector._tabContentViewForType): Deleted.
* UserInterface/Base/Object.js:
* UserInterface/Views/ConsoleTabContentView.js:
(WebInspector.ConsoleTabContentView):
(WebInspector.ConsoleTabContentView.tabInfo): Added.
* UserInterface/Views/DebuggerTabContentView.js:
(WebInspector.DebuggerTabContentView):
(WebInspector.DebuggerTabContentView.tabInfo): Added.
* UserInterface/Views/ElementsTabContentView.js:
(WebInspector.ElementsTabContentView):
(WebInspector.ElementsTabContentView.tabInfo): Added.
(WebInspector.ElementsTabContentView.isTabAllowed): Added.
* UserInterface/Views/NetworkTabContentView.js:
(WebInspector.NetworkTabContentView):
(WebInspector.NetworkTabContentView.tabInfo): Added.
(WebInspector.NetworkTabContentView.isTabAllowed): Added.
* UserInterface/Views/NewTabContentView.js:
Keep a list of shown tab items, so we don't have to query the DOM
to update enabled/disabled state. Put tree construction inside a
layout() override and dirty the view whenever known tab types change.
(WebInspector.NewTabContentView):
(WebInspector.NewTabContentView.tabInfo): Added.
(WebInspector.NewTabContentView.isEphemeral): Added.
(WebInspector.NewTabContentView.shouldSaveTab): Added.
(WebInspector.NewTabContentView.prototype.layout): Added.
(WebInspector.NewTabContentView.prototype._updateShownTabs): Added.
(WebInspector.NewTabContentView.prototype._allowableTabTypes):
(WebInspector.NewTabContentView.prototype._updateTabItems):
(WebInspector.NewTabContentView.prototype.get tabItemElements): Deleted.
* UserInterface/Views/ResourcesTabContentView.js:
(WebInspector.ResourcesTabContentView):
(WebInspector.ResourcesTabContentView.tabInfo): Added.
* UserInterface/Views/SearchTabContentView.js:
(WebInspector.SearchTabContentView):
(WebInspector.SearchTabContentView.tabInfo): Added.
(WebInspector.SearchTabContentView.isEphemeral): Added.
* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.isTabAllowed): Added.
(WebInspector.SettingsTabContentView.shouldSaveTab): Added.
* UserInterface/Views/StorageTabContentView.js:
(WebInspector.StorageTabContentView):
(WebInspector.StorageTabContentView.tabInfo): Added.
(WebInspector.StorageTabContentView.isTabAllowed): Added.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser.showTabForContentView):
Add a workaround for <https://webkit.org/b/151876>. This bug is
revealed by the changes to NewTabContentView in this patch.
* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView.isTabAllowed): Added.
(WebInspector.TabContentView.isEphemeral): Added.
(WebInspector.TabContentView.shouldSaveTab): Added.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView):
(WebInspector.TimelineTabContentView.tabInfo): Added.
(WebInspector.TimelineTabContentView.isTabAllowed): Added.
2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove untested and unused Worker inspection
https://bugs.webkit.org/show_bug.cgi?id=151848
Reviewed by Brian Burg.
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:
* Versions/Inspector-iOS-9.0.json:
Since this was untested in older releases as well, remove
the protocol interfaces for legacy versions.
2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Specifically Identify the Global Lexical Environment Scope
https://bugs.webkit.org/show_bug.cgi?id=151828
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
* UserInterface/Models/ScopeChainNode.js:
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
Include a new scope type and give it a localized string.
2015-12-03 Anders Carlsson <andersca@apple.com>
Remove Objective-C GC support
https://bugs.webkit.org/show_bug.cgi?id=151819
rdar://problem/23746991
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
2015-12-03 Matt Baker <mattbaker@apple.com>
Uncaught Exception in Web Inspector: TypeError: null is not an object (evaluating 'dataGridNode.element.classList')
https://bugs.webkit.org/show_bug.cgi?id=151790
Reviewed by Timothy Hatcher.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode):
(WebInspector.DataGridNode.prototype.get hidden):
(WebInspector.DataGridNode.prototype.set hidden):
Make hidden a property, so it can be set before the grid node's DOM element exists.
(WebInspector.DataGridNode.prototype.get selectable):
(WebInspector.DataGridNode.prototype.get element):
Add hidden style, if needed, when element is created.
* UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
(WebInspector.TreeOutlineDataGridSynchronizer):
Don't access the grid node's element directly, since it may not exist yet.
2015-12-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Handle YieldExpressions in the ScriptSyntaxTree
https://bugs.webkit.org/show_bug.cgi?id=151730
Reviewed by Brian Burg.
* UserInterface/Models/NativeFunctionParameters.js:
Add the Generator API.
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
Handle YieldExpressions.
2015-12-01 Matt Baker <mattbaker@apple.com>
Web Inspector: TreeOutline should just dispatch events via WebInspector.Object
https://bugs.webkit.org/show_bug.cgi?id=148067
Reviewed by Timothy Hatcher.
TreeOutline now dispatches most events via WebInspector.Object. The onselect and
ondeselect callbacks are replaced by a SelectionDidChange event, which includes
both the selected and deselected elements in its event data. The onexpand and oncollapse
callbacks are replaced by an ElementDisclosureDidChange event. This is consistent with the
behavior of onhidden, which had no corresponding onvisible callback.
Alas, TimelineView and TreeOutlineDataGridSynchronizer depended on the order in which
TreeOutline.onselect callbacks were chained together. The synchronizer added its
callback after the timeline view, which ensured that the tree and grid were in sync
before the view handled onselect and dispatched a SelectionPathComponentsDidChange.
The change notification causes the view's path components to be read, and timeline
views need the grid selection to be in a valid state to build path components.
This is addressed by having timeline views dispatch SelectionPathComponentsDidChange
events when the grid selection changes, instead of the tree selection. The change
required that the synchronizer no longer suppress notifications when selecting grid nodes.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype._treeSelectionDidChange):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Deleted.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementAdded):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementDisclosureDidChange):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler): Deleted.
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler): Deleted.
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel):
(WebInspector.SearchSidebarPanel.prototype._treeSelectionDidChange):
(WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Deleted.
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel._treeSelectionDidChange):
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._createPopoverContent):
(WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange):
(WebInspector.TimelineDataGrid):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype._recordingsTreeSelectionDidChange):
(WebInspector.TimelineSidebarPanel.prototype._timelinesTreeSelectionDidChange):
(WebInspector.TimelineSidebarPanel.prototype._timelinesTreeElementSelected): Deleted.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype._treeSelectionDidChange):
(WebInspector.TimelineView.prototype.treeElementSelected):
Don't dispatch SelectionPathComponentsDidChange. Timeline views already do this
in response to grid selection events.
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline.prototype.appendChild):
(WebInspector.TreeOutline.prototype.insertChild):
(WebInspector.TreeOutline.prototype.removeChildAtIndex):
(WebInspector.TreeOutline.prototype.removeChildren):
(WebInspector.TreeOutline.prototype.removeChildrenRecursive):
(WebInspector.TreeOutline.prototype._treeElementDidChange):
(WebInspector.TreeElement.prototype.set hidden):
(WebInspector.TreeElement.prototype.collapse):
(WebInspector.TreeElement.prototype.expand):
(WebInspector.TreeElement.prototype.select):
(WebInspector.TreeElement.prototype.deselect):
(WebInspector.TreeElement.prototype.get childrenListElement): Deleted.
Removed dead code.
* UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
(WebInspector.TreeOutlineDataGridSynchronizer):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeSelectionDidChange):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementDisclosureDidChange):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onadd): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onremove): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onexpand): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.oncollapse): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onhidden): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onselect): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged): Deleted.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeSelectionDidChange):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeElementSelected): Deleted.
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timestamp in Tooltip of Event Markers is incorrect
https://bugs.webkit.org/show_bug.cgi?id=151722
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.addMarker):
Convert the marker's time, to be relative to the start of the recording.
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed common typo fix "occurance" => "occurrence".
* Scripts/combine-resources.pl:
(concatenateFiles):
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline tab after reloading the page
https://bugs.webkit.org/show_bug.cgi?id=151530
Reviewed by Timothy Hatcher.
If reloading the page caused the console to clear, that was triggering
the console prompt to be focused. When the console prompt is focused,
keyboard input like Spacebar, was just inputing characters instead of
triggering the keyboard shortcut that was expected.
This also means that console.clear() in the inspected page would cause
the inspector to focus the console. That is unexpected as well.
Focusing the console prompt whenever the console log is cleared
is not ideal. If we do want to focus the prompt the caller should
make that determination, not clear.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.clear):
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update Timeline UI based on the Instruments in the Active Recording
https://bugs.webkit.org/show_bug.cgi?id=151374
Reviewed by Brian Burg.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
Modernize as I was in this code while looking into this patch.
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted.
(.sidebar > .panel.navigation.timeline > .timelines-content): Deleted.
These defaults are no longer necessary, the UI overrides them anyways.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
Include both the basic and rendering frames toolbars. They will be
mutually exclusive based on if the FPSIntrument is available.
(WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
(WebInspector.TimelineSidebarPanel.prototype._clearInstruments):
When loading a new Recording clear the UI.
(WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
(WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
(WebInspector.TimelineSidebarPanel.prototype._addedFPSInstrument):
(WebInspector.TimelineSidebarPanel.prototype._removedFPSInstrument):
Handle toggling the toolbars when the FPS instrument is added/removed.
(WebInspector.TimelineSidebarPanel.prototype._timelineCountChanged):
(WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
Properly update the sidebar's understanding of the TimelineOverview size.
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Initial support for variable timelines
https://bugs.webkit.org/show_bug.cgi?id=151372
Reviewed by Brian Burg.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.defaultInstruments):
(WebInspector.TimelineManager.prototype._loadNewRecording):
Keep the status quo which is the same set of instruments for each recording.
(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.stopCapturing):
Push responsibility of capturing to the Recording, which has a specific set
of instruments that know what they need to turn on an off from the backend.
* UserInterface/Main.html:
* UserInterface/Models/Instrument.js: Added.
(WebInspector.Instrument):
(WebInspector.Instrument.startLegacyTimelineAgent):
(WebInspector.Instrument.stopLegacyTimelineAgent):
(WebInspector.Instrument.prototype.get timelineRecordType):
(WebInspector.Instrument.prototype.startInstrumentation):
(WebInspector.Instrument.prototype.stopInstrumentation):
New class representing something that can be turned on and off
from the backend and produces a set of Timeline record types.
Currently instruments are 1-to-1 to a Timeline type.
* UserInterface/Models/LayoutInstrument.js: Added.
(WebInspector.LayoutInstrument.prototype.get timelineRecordType):
(WebInspector.LayoutInstrument):
* UserInterface/Models/NetworkInstrument.js: Added.
(WebInspector.NetworkInstrument.prototype.get timelineRecordType):
(WebInspector.NetworkInstrument.prototype.startInstrumentation):
(WebInspector.NetworkInstrument.prototype.stopInstrumentation):
(WebInspector.NetworkInstrument):
* UserInterface/Models/ScriptInstrument.js: Added.
(WebInspector.ScriptInstrument.prototype.get timelineRecordType):
(WebInspector.ScriptInstrument):
The default set of instruments. Currently they all enable the TimelineAgent,
so they share code to enable/disable in the base class to avoid duplication.
* UserInterface/Models/FPSInstrument.js: Added.
(WebInspector.FPSInstrument):
(WebInspector.FPSInstrument.supported):
(WebInspector.FPSInstrument.prototype.get timelineRecordType):
Provide a "supported" static method and simplify other code that
checks whether or not RenderingFrames is available or not.
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.get displayName): Deleted.
(WebInspector.Timeline.prototype.get iconClassName): Deleted.
Move these to a View class, as this is primarily View logic.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.get instruments):
(WebInspector.TimelineRecording.prototype.start):
(WebInspector.TimelineRecording.prototype.stop):
(WebInspector.TimelineRecording.prototype.timelineForInstrument):
(WebInspector.TimelineRecording.prototype.addInstrument):
(WebInspector.TimelineRecording.prototype.removeInstrument):
(WebInspector.TimelineRecording.prototype.addEventMarker):
(WebInspector.TimelineRecording.prototype.addTimeline): Deleted.
(WebInspector.TimelineRecording.prototype.removeTimeline): Deleted.
A recording now has a set of Instruments and its own start/stop
which starts/stops its set of Instruments! Treat Instruments as
the variable property of a Recording instead of Timelines.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._instrumentAdded):
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
(WebInspector.TimelineOverview.prototype._timelineAdded): Deleted.
(WebInspector.TimelineOverview.prototype._timelineRemoved): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
(WebInspector.TimelineRecordingContentView.prototype._instrumentRemoved):
(WebInspector.TimelineRecordingContentView.prototype._timelineAdded): Deleted.
(WebInspector.TimelineRecordingContentView.prototype._timelineRemoved): Deleted.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.displayNameForTimeline):
(WebInspector.TimelineSidebarPanel.iconClassNameForTimeline):
(WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection):
(WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
(WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
(WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
(WebInspector.TimelineSidebarPanel.prototype._timelineAdded): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._timelineRemoved): Deleted.
Update all TimelineAdded/TimelineRemoved clients to instead check
InstrumentAdded/InstrumentRemoved. Immediately convert from an Instrument
to a Timeline to keep the patch simple.
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Broken Inspector when resources are minified
https://bugs.webkit.org/show_bug.cgi?id=151711
Reviewed by Timothy Hatcher.
* Scripts/combine-resources.pl:
(concatenateFiles):
Provide a way to just strip resources matches a pattern.
* Scripts/copy-user-interface-resources.pl:
Strip "Debug/" resources before combining / minifying others.
* UserInterface/Views/View.js:
(WebInspector.View.prototype.makeRootView):
(WebInspector.View.prototype.didDetach):
Address warnings from the console.assert stripping phase
for console.assert statements lacking a trailing semicolon.
2015-11-30 Brian Burg <bburg@apple.com>
Web Inspector: show something useful when the inspector frontend fails to load
https://bugs.webkit.org/show_bug.cgi?id=151643
Reviewed by Timothy Hatcher.
When a parse error or other early error happens before the inspector
is fully loaded, we can't use the second-level inspector to tell what's
going on. It would be better to catch any early errors and list them.
This patch adds an error page that shows the early errors that happened
during loading. It provides a list of errors, a link to reload the
inspector, and a link to submit a pre-filled bug report about the error.
For now, this page only shows up in engineering builds because it's
located in the Debug/ directory. We can move it later when it works
better in all cases. Follow-up patches can address smaller issues,
such as the transparent title bar and broken text selection.
* UserInterface/Debug/CatchEarlyErrors.css: Added.
* UserInterface/Debug/CatchEarlyErrors.js: Added.
* UserInterface/Main.html:
* UserInterface/Main.js: Abort setting up the UI if something happened.
2015-11-30 Brian Burg <bburg@apple.com>
Web Inspector: delete-by-word and similar shortcuts should add text to the WebCore kill ring
https://bugs.webkit.org/show_bug.cgi?id=151312
Reviewed by Darin Adler.
Add support for other kill ring-eligible keybindinsg, such as
deleting by word, group, or line forwards and backwards.
* UserInterface/Controllers/CodeMirrorTextKillController.js:
(WebInspector.CodeMirrorTextKillController):
(WebInspector.CodeMirrorTextKillController.prototype._handleTextKillCommand): Renamed from _handleKillLine.
Parameterize the function so it can handle any keybinding and
command. Take a kill ring insertion mode argument, too.
(WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
Add some special casing for changes received from Delete Line
(Cmd-D) so the right text is added to the kill ring. Thread the
kill ring insertion mode to the frontend host call.
(WebInspector.CodeMirrorTextKillController.prototype._handleKillLine): Deleted.
2015-11-29 Brian Burg <bburg@apple.com>
Web Inspector: Add context menu item to Reload the Inspector
https://bugs.webkit.org/show_bug.cgi?id=141742
Reviewed by Timothy Hatcher.
Add a global context menu and global shortcut (Cmd-Opt-Shift-R) to
reload the Web Inspector frontend without closing the browser.
This should make it possible to more quickly fix typos, small nits,
etc. without having to relaunch. It might also make state
restoration bugs more visible in engineering builds, since there
is hardly any delay between seeing the old and reloaded frontends.
Note that this functionality reloads scripts from the configuration's
build directory, so you still need to "build" WebInspectorUI to ensure
that any changed files are properly minified and staged.
* UserInterface/Base/Main.js:
(WebInspector.unlocalizedString):
Added. Make it obvious when strings are intentionally not localized.
(WebInspector._contextMenuRequested):
If the "Show Debug UI" setting is available and true, add
a global "Reload Web Inspector" menu item to every context
menu. Otherwise, don't eagerly create a context menu.
* UserInterface/Debug/Bootstrap.js: Add Cmd-Opt-Shift-R shortcut.
2015-11-29 Brian Burg <bburg@apple.com>
Web Inspector: allow multiple UI components to add menu items upon getting a "contextmenu" event
https://bugs.webkit.org/show_bug.cgi?id=151629
Reviewed by Timothy Hatcher.
The existing Context Menu system assumes that only one UI component
will need to provide context menu items. But in some scenarios, there
are multiple UI components that could provide relevant menu items. For
example, right-clicking on an DOM element in the console should show
menu items relevant to 1) the DOM element, 2) the console in general,
and 3) global menu items. Existing code shows menu items provided by
the first object that handles the event and calls ContextMenu.show().
This patch changes behavior so that a context menu can be built up
by multiple 'contextmenu' event handlers. A ContextMenu instance is
hidden on the 'contextmenu' event object; client code calls a
factory method that digs out this existing context menu or creates a
new one as needed. To actually show the context menu through the
InspectorFrontendHost methods, the top-level app controller adds a
bubbling listener for 'contextmenu' and shows the event's context
menu if one has been created.
Along the way, do some cleanup. Do s/var/let/, arrowize some functions,
use Array.{map,some}, and simplify some other code as a result.
No new tests yet, since we can't trigger context menu easily from
an inspector test. All affected context menus were manually verified.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
* UserInterface/Views/CSSStyleDeclarationSection.js:
* UserInterface/Views/ContextMenu.js:
(WebInspector.ContextMenuItem.prototype._buildDescriptor):
(WebInspector.ContextMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendItem):
(WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
(WebInspector.ContextSubMenuItem.prototype._pushItem):
(WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
(WebInspector.ContextSubMenuItem):
(WebInspector.ContextMenu.createFromEvent):
(WebInspector.ContextMenu.prototype.show):
(WebInspector.ContextMenu.prototype.handleEvent):
(WebInspector.ContextMenu.prototype._buildDescriptor):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.removeAllResourceBreakpoints): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.toggleAllResourceBreakpoints): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
(WebInspector.ObjectPreviewView):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.continueToLocation): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.addBreakpoint): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.removeBreakpoints): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.toggleBreakpoints): Deleted.
* UserInterface/Views/TabBarItem.js:
(WebInspector.TabBarItem.prototype._handleContextMenuEvent):
(WebInspector.TabBarItem):
(WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeTab): Deleted.
(WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeOtherTabs): Deleted.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar):
(WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar.toggleReplayInterface): Deleted.
* UserInterface/Views/Toolbar.js:
(WebInspector.Toolbar.prototype._handleContextMenuEvent):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2015-11-28 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Styles sidebar placeholder is misaligned
https://bugs.webkit.org/show_bug.cgi?id=151638
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):
2015-11-28 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: REGRESSION: "Duplicate Selector" context menu item doesn't work
https://bugs.webkit.org/show_bug.cgi?id=151628
Reviewed by Brian Burg.
Merged the two "add rule" functions inside DOMNodeStyles to create a
new rule with the given selector and use the generated best selector
for that node otherwise. This also preserves all fallbacks across all
functions for creating new CSS rules.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addEmptyRule): Deleted.
(WebInspector.DOMNodeStyles.prototype.addRuleWithSelector): Deleted.
(WebInspector.DOMNodeStyles.prototype.addRule):
Creates a new CSS rule using either the provided selector or the best
selector for the current node.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
2015-11-24 Brian Burg <bburg@apple.com>
Web Inspector: save Inspector's breakpoints to localStorage whenever they are modified
https://bugs.webkit.org/show_bug.cgi?id=151581
Reviewed by Timothy Hatcher.
Serialize all breakpoints to the "breakpoints" Setting in local storage
whenever any breakpoint model object is added, removed, or modified.
Remove the old listener that attempted to save breakpoints on the
pagehide event. It did not fire in important scenarios like exiting
the browser via Cmd-Q or killing the process via Ctrl-C / SIGKILL.
This is not expected to be a performance problem because most people
do not keep thousands of breakpoints active, and breakpoints are not
set very often. If it's a problem, we can mitigate it with coalescing.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.addBreakpoint):
(WebInspector.DebuggerManager.prototype.removeBreakpoint):
(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
(WebInspector.DebuggerManager.prototype._saveBreakpoints):
(WebInspector.DebuggerManager.prototype._inspectorClosing): Deleted.
2015-11-24 Brian Burg <bburg@apple.com>
Web Inspector: Cmd-1 to Cmd-9 shortcuts should select tabs by ordinal
https://bugs.webkit.org/show_bug.cgi?id=151577
Reviewed by Timothy Hatcher.
The shortcuts only work if a tab at the specified ordinal exists.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: Add a keyboard shortcut to restore the default zoom level
https://bugs.webkit.org/show_bug.cgi?id=151237
Reviewed by Timothy Hatcher.
The Cmd-0 shortcut matches the keybindings of Safari and other browsers.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: inspector settings should not be shared between different inspection levels
https://bugs.webkit.org/show_bug.cgi?id=151151
Reviewed by Timothy Hatcher.
It's really annoying to have shared settings between Inspector^1 and Inspector^2, because
they are not designed to respond to external changes to local storage keys. As a result,
the two inspectors seemingly have different settings while both are open, but the settings
clobber each other depending on which inspector is closed first. On the next inspector
being opened, it has settings that reflect whichever inspector closed last.
To fix this, alter the local storage key prefix to incude the inspection level when it is
greater than 1 (i.e., inspecting the inspector). The storage prefix becomes
"com.apple.WebInspector-${inspectionLevel}." in this case.
This is backwards-compatible for normal Inspector, who keeps the same storage prefix.
Alternate approaches that were considered and abandoned:
- Use separate WKWebSiteDataStores for each inspection level. This API (as it currently is)
does not support multiple on-disk storage locations. We don't want to add an entirely new
Library directory for each inspector level, and sharing a single location doesn't fix the
shared-settings bug. Changing storage location would lose all existing Inspector settings.
- Sync settings between multiple open Inspectors. This would be catastrophic, as changing
the active tab on one inspector would immediately propagate to the other open inspectors.
* UserInterface/Models/Setting.js:
(WebInspector.Setting):
* UserInterface/Protocol/InspectorFrontendHostStub.js:
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.inspectionLevel):
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: use Cmd-Option-L and Cmd-Option-R for toggling navigation and details sidebars
https://bugs.webkit.org/show_bug.cgi?id=151572
Reviewed by Timothy Hatcher.
The previous shortcuts were Cmd-0 and Cmd-Option-0, but these didn't match Safari's
sidebar shortcuts and conflict with Cmd-0 as the cross-browser way to reset page zoom.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: when inspecting the inspector, add the inspection level to the title bar
https://bugs.webkit.org/show_bug.cgi?id=151555
Reviewed by Timothy Hatcher.
Drive-by update to remove some localization strings that are no longer used.
* Localizations/en.lproj/localizedStrings.js:
2015-11-22 Matt Baker <mattbaker@apple.com>
Web Inspector: Clean up FolderizedTreeElement folder settings
https://bugs.webkit.org/show_bug.cgi?id=151539
Reviewed by Brian Burg.
The expanded state for each folder was stored as an external property on the folder
tree element. Now FolderizedTreeElement keeps a map of folders to settings.
* UserInterface/Views/FolderizedTreeElement.js:
(WebInspector.FolderizedTreeElement):
(WebInspector.FolderizedTreeElement.prototype.removeChildren):
(WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
(WebInspector.FolderizedTreeElement.prototype._folderTreeElementExpandedStateChange):
== Rolled over to ChangeLog-2015-11-21 ==