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