blob: 0e62cd36233c23182bb14de6e072e111c42726af [file] [log] [blame]
<
2015-11-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timeline does not immediately update current time after switching tabs while recording
https://bugs.webkit.org/show_bug.cgi?id=151528
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.shown):
Provide a number so that _startUpdatingCurrentTime doesn't decide
to wait until the next event to update current time.
(WebInspector.TimelineRecordingContentView.prototype._update):
When switching tabs we stop updating and hit this code. However
we want to keep _lastUpdateTimestamp so that if we switch back
to the tab we can re-compute the current time. So don't clear it
in cases where the view was hidden, as it might need to use
it when it is shown again.
2015-11-20 Matt Baker <mattbaker@apple.com>
Web Inspector: Remove "Show only resources with breakpoints" filter button
https://bugs.webkit.org/show_bug.cgi?id=151517
Reviewed by Timothy Hatcher.
Removed filter button in preparation for https://bugs.webkit.org/show_bug.cgi?id=151119.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.showResourcesWithBreakpointsOnlyFilterFunction): Deleted.
(WebInspector.DebuggerSidebarPanel): Deleted.
2015-11-20 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add support for Gradients in the Visual sidebar background editor
https://bugs.webkit.org/show_bug.cgi?id=150494
Reviewed by Timothy Hatcher.
Allows the editors in the Visual sidebar Background Style section to
work with gradients and data URIs.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/CodeMirrorGradientEditingController.css: Deleted.
Some styling was reused in VisualStyleBackgroundPicker.css.
* UserInterface/Controllers/CodeMirrorGradientEditingController.js:
(WebInspector.CodeMirrorGradientEditingController):
(WebInspector.CodeMirrorGradientEditingController.prototype.popoverWillPresent):
(WebInspector.CodeMirrorGradientEditingController.prototype.popoverDidPresent):
(WebInspector.CodeMirrorGradientEditingController.prototype._gradientEditorGradientChanged):
(WebInspector.CodeMirrorGradientEditingController.prototype.handleEvent): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype.gradientSliderStopsDidChange): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype.gradientSliderStopWasSelected): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype.dragToAdjustControllerWasAdjustedByAmount): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._handleInputEvent): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._angleInputValueDidChange): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._handleChangeEvent): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._colorPickerColorChanged): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._updateCSSClassForGradientType): Deleted.
Reworked gradient editor popup into WebInspector.GradientEditor.
* UserInterface/Main.html:
* UserInterface/Models/Gradient.js:
(WebInspector.Gradient.fromString):
(WebInspector.Gradient.stopsWithComponents):
(WebInspector.LinearGradient.linearGradientWithComponents):
Removed console.error statements as they didn't do anything but clog the console.
* UserInterface/Views/GradientEditor.css: Added.
(.gradient-editor):
(.gradient-editor.radial-gradient):
(.gradient-editor.editing-color):
(.gradient-editor.radial-gradient.editing-color):
(.gradient-editor > .gradient-type-select):
(.gradient-editor > .gradient-slider):
(.gradient-editor > .color-picker):
(.gradient-editor > .color-picker > .slider):
(.gradient-editor > .color-picker > .brightness):
(.gradient-editor > .color-picker > .opacity):
(.gradient-editor > .gradient-angle):
(.gradient-editor.radial-gradient > .gradient-angle):
(.gradient-editor > .gradient-angle > input):
* UserInterface/Views/GradientEditor.js: Added.
(WebInspector.GradientEditor):
(WebInspector.GradientEditor.prototype.get element):
(WebInspector.GradientEditor.prototype.set gradient):
(WebInspector.GradientEditor.prototype.get gradient):
(WebInspector.GradientEditor.prototype.gradientSliderStopsDidChange):
(WebInspector.GradientEditor.prototype.gradientSliderStopWasSelected):
(WebInspector.GradientEditor.prototype.dragToAdjustControllerWasAdjustedByAmount):
(WebInspector.GradientEditor.prototype._updateCSSClassForGradientType):
(WebInspector.GradientEditor.prototype._gradientTypeChanged):
(WebInspector.GradientEditor.prototype._colorPickerColorChanged):
(WebInspector.GradientEditor.prototype._angleChanged):
(WebInspector.GradientEditor.prototype._angleInputValueDidChange):
New standalone editor for CSS Gradients.
* UserInterface/Views/VisualStyleBackgroundPicker.css: Added.
(.visual-style-property-container.background-picker > .visual-style-property-value-container):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch:hover):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch:active):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch > span):
(.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .color-gradient-swatch):
(.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .color-gradient-swatch + .value-input):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-input):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-input[disabled]):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-type-picker-select):
* UserInterface/Views/VisualStyleBackgroundPicker.js: Added.
(WebInspector.VisualStyleBackgroundPicker):
(WebInspector.VisualStyleBackgroundPicker.prototype.get value):
(WebInspector.VisualStyleBackgroundPicker.prototype.set value):
(WebInspector.VisualStyleBackgroundPicker.prototype.get synthesizedValue):
(WebInspector.VisualStyleBackgroundPicker.prototype.parseValue):
(WebInspector.VisualStyleBackgroundPicker.prototype._updateValueInput):
(WebInspector.VisualStyleBackgroundPicker.prototype._updateGradientSwatch):
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked):
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientEditorGradientChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._valueInputValueChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._keywordSelectMouseDown):
(WebInspector.VisualStyleBackgroundPicker.prototype._handleKeywordChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._createValueOptions):
(WebInspector.VisualStyleBackgroundPicker.prototype._addAdvancedValues):
(WebInspector.VisualStyleBackgroundPicker.prototype._removeAdvancedValues):
(WebInspector.VisualStyleBackgroundPicker.prototype._toggleTabbingOfSelectableElements):
Visual property editor for the CSS background-image property. Supports
limited keywords, as well as url() and gradients.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
Fixed regular expression parsing to not match commas inside parenthesis.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
* UserInterface/Views/VisualStylePropertyEditorLink.css:
(.visual-style-property-editor-link:not(.link-all) > .visual-style-property-editor-link-border):
Fixed spacing of link line.
* UserInterface/Views/VisualStyleURLInput.js: Removed.
Reworked into VisualStyleBackgroundPicker.js.
2015-11-19 Brian Burg <bburg@apple.com>
Web Inspector: yank/kill shortcuts (CTRL+Y, K) don't work in Console / QuickConsole
https://bugs.webkit.org/show_bug.cgi?id=151157
Reviewed by Joseph Pecoraro.
CodeMirror maintains its own editor buffer and implements its own
`killLine` command but doesn't implement the yank command. So, text
that is "killed" with CTRL-k inside a CodeMirror instance isn't
added to WebCore's kill ring. Subsequent yank commands won't match
up with the killed text, instead returning text from a prior kill
that was handled by WebCore (i.e., in a contenteditable or form input).
This patch adds a host function so that the Inspector frontend can
append "missed" killed text to WebCore's kill ring. Subsequent
yanks handled by WebCore will then match the text killed by CodeMirror.
In the frontend, we implement our own key binding handler for
CTRL-k that captures killed text, detects whether the kill
should start a new sequence, and sends it to WebCore. Because this
involves several flags and listeners, and we want this behavior for
all editable CodeMirror instances, the text kill handling is
factored into its own CodeMirrorTextKillController.
To add this behavior to all instances, this patch centralizes the
code that constructs a base CodeMirror instance, and attaches the
CodeMirrorTextKillController to all instances. The shortcut
does nothing when its CodeMirror instance is read-only.
The particulars of the kill controller are documented inline.
No new tests, because we need to use both InspectorFrontendHost
and TestRunner.execCommand, but the latter is not available in
the inspector context where we would need to simulate a kill.
* UserInterface/Controllers/CodeMirrorTextKillController.js: Added.
(WebInspector.CodeMirrorTextKillController):
(WebInspector.CodeMirrorTextKillController.prototype._handleKillLine):
(WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
(WebInspector.CodeMirrorTextKillController.prototype._handleEditorBlur):
(WebInspector.CodeMirrorTextKillController.prototype._handleSelectionOrCaretChange):
* UserInterface/Main.html:
* UserInterface/Protocol/InspectorFrontendHostStub.js:
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.killText): Add a stub to avoid check-before-use.
* UserInterface/Views/BreakpointActionView.js:
(WebInspector.BreakpointActionView.prototype._updateBody):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
* UserInterface/Views/CodeMirrorEditor.js: Added.
(WebInspector.CodeMirrorEditor.create):
(WebInspector.CodeMirrorEditor):
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
2015-11-19 Matt Baker <mattbaker@apple.com>
Web Inspector: Convert remaining timeline views to use View base class
https://bugs.webkit.org/show_bug.cgi?id=151410
Reviewed by Timothy Hatcher.
Converted timeline views to use View base class. Mostly mechanical
changes (override View.prototype.layout, use let in more places).
* UserInterface/Views/LayoutTimelineOverviewGraph.js:
(WebInspector.LayoutTimelineOverviewGraph.prototype.layout):
(WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout): Deleted.
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
(WebInspector.NetworkTimelineOverviewGraph.prototype.layout.createBar):
(WebInspector.NetworkTimelineOverviewGraph.prototype.layout):
(WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout.createBar): Deleted.
(WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout): Deleted.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.updateLayout): Deleted.
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph.prototype.layout.createBar):
(WebInspector.ScriptTimelineOverviewGraph.prototype.layout):
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout.createBar): Deleted.
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout): Deleted.
* UserInterface/Views/TimelineOverview.js:
Extend View.
(WebInspector.TimelineOverview):
Add ruler as a subview.
(WebInspector.TimelineOverview.prototype.set startTime):
(WebInspector.TimelineOverview.prototype.set currentTime):
(WebInspector.TimelineOverview.prototype.set secondsPerPixel):
(WebInspector.TimelineOverview.prototype.set endTime):
(WebInspector.TimelineOverview.prototype.set scrollStartTime):
(WebInspector.TimelineOverview.prototype.updateLayoutIfNeeded):
(WebInspector.TimelineOverview.prototype.get timelineRuler):
(WebInspector.TimelineOverview.prototype.canShowTimeline):
(WebInspector.TimelineOverview.prototype.layout):
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
(WebInspector.TimelineOverview._handleGestureStart):
(WebInspector.TimelineOverview.prototype._handleGestureChange):
(WebInspector.TimelineOverview.prototype._timelineAdded):
(WebInspector.TimelineOverview.prototype._timelineRemoved):
(WebInspector.TimelineOverview.prototype.get element): Deleted.
(WebInspector.TimelineOverview.prototype.updateLayout): Deleted.
* UserInterface/Views/TimelineOverviewGraph.js:
Extend view.
(WebInspector.TimelineOverviewGraph):
(WebInspector.TimelineOverviewGraph.prototype.needsLayout):
(WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
(WebInspector.TimelineOverviewGraph.prototype.updateLayout): Deleted.
(WebInspector.TimelineOverviewGraph.prototype.updateLayoutIfNeeded): Deleted.
(WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout.update): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Add overview as a subview.
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
Use View.prototype.replaceSubview to swap overview graphs.
2015-11-18 Brian Burg <bburg@apple.com>
Web Inspector: Storage tab shouldn't hide cookies for .example.com when inspected page is foo.bar.example.com
https://bugs.webkit.org/show_bug.cgi?id=151408
Reviewed by Timothy Hatcher.
The regex should allow multiple subdomains to match a cookie for domain .example.com.
Test: inspector/page/filter-cookies-for-domain.html
* UserInterface/Models/CookieStorageObject.js:
(WebInspector.CookieStorageObject.cookieDomainMatchesResourceDomain):
Also make the group non-capturing. We don't use the match.
(WebInspector.CookieStorageObject.prototype.saveIdentityToCookie):
(WebInspector.CookieStorageObject):
* UserInterface/Test.html:
2015-11-18 Brian Burg <bburg@apple.com>
Web Inspector: move cookie url matching out of CookieStorageContentView and clean up some code
https://bugs.webkit.org/show_bug.cgi?id=151424
Reviewed by Timothy Hatcher.
Move the code that decides whether a cookie matches a resource URL to a model class.
This will make it possible to test this code easily without pulling Views into tests.
* UserInterface/Models/CookieStorageObject.js:
(WebInspector.CookieStorageObject.cookieMatchesResourceURL):
(WebInspector.CookieStorageObject.cookieDomainMatchesResourceDomain):
(WebInspector.CookieStorageObject.prototype.saveIdentityToCookie):
(WebInspector.CookieStorageObject):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype.update): use Promises.
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
(WebInspector.CookieStorageContentView.prototype._filterCookies):
Use Array.filter() and Array.some() to express this logic more directly.
(WebInspector.CookieStorageContentView.cookieMatchesResourceURL): Deleted.
(WebInspector.CookieStorageContentView.cookieDomainMatchesResourceDomain): Deleted.
(WebInspector.CookieStorageContentView.prototype.update.callback): Deleted.
2015-11-18 Matt Baker <mattbaker@apple.com>
Web Inspector: Clear watch expressions button using wrong icon
https://bugs.webkit.org/show_bug.cgi?id=151422
Reviewed by Timothy Hatcher.
Updated "clear" button to use trashcan image. This was broken by
https://bugs.webkit.org/show_bug.cgi?id=151377.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
2015-11-18 Matt Baker <mattbaker@apple.com>
Web Inspector: Reduce synchronous view layouts
https://bugs.webkit.org/show_bug.cgi?id=151058
Reviewed by Timothy Hatcher.
Replace calls to View.updateLayout with needsLayout, when a synchronous layout
isn't absolutely necessary.
* UserInterface/Models/BackForwardEntry.js:
(WebInspector.BackForwardEntry.prototype.prepareToShow):
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype.updateLayout): Deleted.
View subclasses shouldn't override updateLayout.
* UserInterface/Views/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.set label):
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
(WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
* UserInterface/Views/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView.prototype._queryFinished):
Just update DataGrid's layout, not the whole view. The grid is the only subview
so the result is identical, but the intent is cleared this way.
(WebInspector.DatabaseTableContentView.prototype.updateLayout): Deleted.
View subclasses shouldn't override updateLayout.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
(WebInspector.LogContentView.prototype.promptDidChangeHeight): Deleted.
Unused code.
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.set width):
(WebInspector.Sidebar.prototype.set collapsed):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype._contentWillPopulate):
Add TextEditor as a subview.
(WebInspector.TextResourceContentView.prototype.updateLayout): Deleted.
View subclasses shouldn't override updateLayout.
2015-11-18 Matt Baker <mattbaker@apple.com>
Web Inspector: Probes sidebar panel sections should use NavigationBar
https://bugs.webkit.org/show_bug.cgi?id=151373
Reviewed by Brian Burg.
Replaces image elements with a NavigationBar instance. The "Clear samples"
button is disabled when no samples exist in the probe set.
* Localizations/en.lproj/localizedStrings.js:
New navigation item labels.
* UserInterface/Models/ProbeSet.js:
(WebInspector.ProbeSet.prototype._sampleCollected):
Dispatch new event WebInspector.ProbeSet.Event.SampleAdded.
* UserInterface/Views/DetailsSection.css:
(.details-section > .header > .options > .navigation-bar):
(.details-section > .header > .options > .navigation-bar > .item):
Define consistent style for showing a NavigationBar inside the section header.
* UserInterface/Views/DetailsSection.js:
(WebInspector.DetailsSection):
Add "options" class name in the base class.
* UserInterface/Views/ProbeDetailsSidebarPanel.css:
(.details-section.probe-set .options > :matches(.probe-remove, .probe-clear-samples, .probe-add)): Deleted.
(.details-section.probe-set .options > .probe-clear-samples): Deleted.
(.details-section.probe-set .options > .probe-remove): Deleted.
(.details-section.probe-set .options > .probe-add): Deleted.
Remove <img> button styles.
* UserInterface/Views/ProbeSetDetailsSection.js:
(WebInspector.ProbeSetDetailsSection):
(WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked.createProbeFromEnteredExpression):
(WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
(WebInspector.ProbeSetDetailsSection.prototype._clearSamplesButtonClicked):
(WebInspector.ProbeSetDetailsSection.prototype._probeSetSamplesChanged):
Update "Clear samples" enabled state.
(WebInspector.ProbeSetDetailsSection.prototype._probeSetHasSamples):
Helper function to check if the probe set is empty.
2015-11-18 Matt Baker <mattbaker@apple.com>
Web Inspector: Watch Expressions details section should use NavigationBar
https://bugs.webkit.org/show_bug.cgi?id=151377
Reviewed by Timothy Hatcher.
Replaces image elements with a NavigationBar instance. The refresh and
clear buttons are disabled if no watch expressions exist.
* Localizations/en.lproj/localizedStrings.js:
New navigation item labels.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
(.details-section.watch-expressions .options > *): Deleted.
(.details-section.watch-expressions .options > *:active): Deleted.
(.details-section.watch-expressions .options > .watch-expression-add): Deleted.
(.details-section.watch-expressions .options > .watch-expression-clear): Deleted.
(.details-section.watch-expressions .options > .watch-expression-refresh): Deleted.
Remove <img> button styles.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked.presentPopoverOverTargetElement):
Use the navigation item element.
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._updateWatchExpressionsNavigationBar):
Enable/disable refresh and clear buttons.
2015-11-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Move Timeline creation into a recording
https://bugs.webkit.org/show_bug.cgi?id=151367
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._loadNewRecording): Deleted.
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.create):
(WebInspector.Timeline.prototype.get type):
(WebInspector.Timeline): Deleted.
(WebInspector.Timeline.prototype.get recording): Deleted.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.get readonly):
(WebInspector.TimelineRecording.prototype.unloaded):
(WebInspector.TimelineRecording.prototype.reset):
(WebInspector.TimelineRecording.prototype.isWritable): Deleted.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.shown):
2015-11-17 Matt Baker <mattbaker@apple.com>
Web Inspector: Breakpoint condition field should use CodeMirror
https://bugs.webkit.org/show_bug.cgi?id=151333
Reviewed by Joseph Pecoraro.
Updated breakpoint popover's condition field to use CodeMirror.
* UserInterface/Controllers/BreakpointPopoverController.js:
Removed keyboard shortcuts. Now handled by CodeMirror.
(WebInspector.BreakpointPopoverController.prototype.completionControllerShouldAllowEscapeCompletion):
Prevent handling of escape to allow tabbing to next element.
(WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
Create CodeMirror instance.
(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorChanged):
(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorBeforeChange):
Enforce single-line editor.
(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey):
(WebInspector.BreakpointPopoverController): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint):
Removed condition element select. CodeMirror sets focus when popover content is created.
(WebInspector.BreakpointPopoverController.prototype._popoverConditionInputChanged): Deleted.
Replaced by BreakpointPopoverController.prototype._conditionCodeMirrorChanged.
(WebInspector.BreakpointPopoverController.prototype._popoverConditionInputKeyDown): Deleted.
Replaced by BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey.
* UserInterface/Views/BreakpointPopoverController.css:
(.edit-breakpoint-popover-condition):
(.edit-breakpoint-popover-condition > .CodeMirror):
(#edit-breakpoint-popover-condition): Deleted.
Replace selector id with class, styled CodeMirror element to match original input element.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder): Deleted.
Moved common CodeMirror placeholder text style to CodeMirrorOverrides.css.
* UserInterface/Views/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-placeholder):
Add placeholder style.
2015-11-12 Matt Baker <mattbaker@apple.com>
Web Inspector: Deleting a probe should remove probe breakpoint actions only.
https://bugs.webkit.org/show_bug.cgi?id=151245
Reviewed by Brian Burg.
Fixed breakpoint action filter.
* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint.prototype.clearActions):
Missing return in named function expression.
2015-11-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Auto-log inspect node selected elements to the console
https://bugs.webkit.org/show_bug.cgi?id=151178
Reviewed by Brian Burg.
Auto-logging user selected elements to the console helps with
quick use in the console. $0 is not very discoverable, and $n
values are expendable. This also makes it convenient to use the
inspect node toolbar search option to select a few different
nodes and use each of them in the console without extra work.
* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.inspectNodeObject.nodeAvailable):
(WebInspector.DOMTreeManager.prototype.inspectNodeObject):
Log selected nodes to the console. Treat this as a synthetic log that
will not immediately open the console like normal evaluation results.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult.saveResultCallback):
(WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted.printResult):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
Initialize ConsoleCommandResultMessage's synthetic properties.
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
* UserInterface/Controllers/RuntimeManager.js:
Create a global for the special "console" object group used in multiple places.
* UserInterface/Models/ConsoleCommandResultMessage.js:
(WebInspector.ConsoleCommandResultMessage):
(WebInspector.ConsoleCommandResultMessage.prototype.get synthetic):
Add a synthetic property.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
When the ConsoleResult is a synthetic result, do not auto-open the console.
2015-11-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: timeline event markers are added to overview even when not capturing a timeline recording
https://bugs.webkit.org/show_bug.cgi?id=151166
Reviewed by Timothy Hatcher.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.addEventMarker):
Do not add event markers when not capturing. This would have resulted in more
and more markers showing in the Timeline for page loads when the Timeline was
not active. For example reloading when a non-Timeline tab was active.
2015-11-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add Debug toolbar button to toggle InspectorBackend.dumpInspectorProtocolMessages
https://bugs.webkit.org/show_bug.cgi?id=151175
Reviewed by Brian Burg.
Add debug UI and a way to toggle it on and off in non-production builds.
To enable the debug UI use a keyboard shortcut in Inspector:
Option+Shift+Command+D (Mac) or Option+Shift+Ctrl+D (Windows / Linux)
The debug UI setting is a persistent setting, so those of use developing
Web Inspector will turn it on and leave it on.
Currently the only debug UI is a new toolbar button to toggle
the frontend logging on or off.
* Scripts/combine-resources.pl:
(concatenateFiles):
Exclude "Debug" files when combining resources for minification.
* UserInterface/Main.html:
Rename "Base/Bootstrap.js" to "Debug/Bootstrap" so that we can easily exclude it.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Only evaluate bootstrap functions if they exist.
* UserInterface/Debug/Bootstrap.js: Renamed from Source/WebInspectorUI/UserInterface/Base/Bootstrap.js.
(WebInspector.runBootstrapOperations):
Add a debug setting, toolbar button, and keyboard shortcut.
2015-11-11 Brian Burg <bburg@apple.com>
Web Inspector: blank debugger tab when opening inspector on unvisited website
https://bugs.webkit.org/show_bug.cgi?id=151149
Reviewed by Joseph Pecoraro.
When Inspector tries to show default content when initially showing a tab upon opening,
there may not be any tree elements added to the navigation bar yet. In the case of an
unvisited website, there will be no state restoration cookie to trigger deferred selection.
So, showDefaultContentView finds no tree elements it can show, and the main view is blank.
We can fix this by speculatively showing the first script/resource that's added to the tree
if no content view is being shown. If a state restoration cookie exists, it will take priority
over the default-displayed content view.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addResource):
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
2015-11-11 Matt Baker <mattbaker@apple.com>
Web Inspector: Convert sidebars to use View base class
https://bugs.webkit.org/show_bug.cgi?id=151057
Reviewed by Timothy Hatcher.
This patch makes Sidebar a subclass of View. Mostly mechanical changes and cleanup,
such as adding navigation bars and panels as subviews, removing element getters,
and replacing external properties with symbols.
* UserInterface/Base/Main.js:
Added sidebars to view hierarchy.
* UserInterface/Views/DebuggerSidebarPanel.js:
Add navigation bar as a subview.
* UserInterface/Views/NetworkSidebarPanel.js:
Add navigation bar as a subview.
(WebInspector.NetworkSidebarPanel):
(WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):
(WebInspector.NetworkSidebarPanel.prototype._treeElementGoToArrowWasClicked):
External properties replaced with symbols.
* UserInterface/Views/ResourceSidebarPanel.js:
Add navigation bar as a subview.
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
External properties replaced with symbols.
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar):
(WebInspector.Sidebar.prototype.addSidebarPanel):
(WebInspector.Sidebar.prototype.removeSidebarPanel):
Panels are now added and removed as subviews.
(WebInspector.Sidebar.prototype.get width):
(WebInspector.Sidebar.prototype.set width):
(WebInspector.Sidebar.prototype.get collapsed):
(WebInspector.Sidebar.prototype.set collapsed):
"collapsed" property now backed by private class variable, not DOM state.
(WebInspector.Sidebar.prototype.get element): Deleted.
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel):
(WebInspector.SidebarPanel.prototype.get visible):
(WebInspector.SidebarPanel.prototype.get selected):
(WebInspector.SidebarPanel.prototype.set selected):
"selected" property now backed by private class variable, not DOM state.
(WebInspector.SidebarPanel.prototype.get parentSidebar):
No longer stored as separate property. Wrapper around View.prototype.parentView.
Original getter retained for clarity.
(WebInspector.SidebarPanel.prototype.show):
(WebInspector.SidebarPanel.prototype.hide):
(WebInspector.SidebarPanel.prototype.added):
(WebInspector.SidebarPanel.prototype.removed):
(WebInspector.SidebarPanel.prototype.get element): Deleted.
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
Add navigation bar as a subview.
2015-11-10 Matt Baker <mattbaker@apple.com>
Web Inspector: Enable/disable All Breakpoints not usable when "No Filter Results" displayed
https://bugs.webkit.org/show_bug.cgi?id=151062
Reviewed by Timothy Hatcher.
Position the placeholder element below the navigation bar. This was already being done
for the other navigation sidebars.
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.debugger > .content): Deleted.
2015-11-10 Matt Baker <mattbaker@apple.com>
Web Inspector: Batch all scheduled layouts and update the view tree in a single animation frame
https://bugs.webkit.org/show_bug.cgi?id=150993
Reviewed by Brian Burg.
Shifts responsibility for scheduling asynchronous layouts from view objects to a controller
layer, implemented as private static methods and properties in the View class. A single animation
frame callback performs a breadth-first traversal of the view tree starting at the root view,
updating views marked as needing a layout.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Setup root view.
* UserInterface/Views/View.js:
Added private class properties for root view reference and rAF identifier.
(WebInspector.View):
(WebInspector.View.prototype.get layoutPending):
(WebInspector.View.prototype.get parentView):
(WebInspector.View.prototype.makeRootView):
Set current view to be the root of the view hierarchy.
Can only be called once.
(WebInspector.View.prototype.insertSubviewBefore):
No longer appends subview element to parent element, if subview already in the DOM.
Checks that view being inserted isn't the root view.
(WebInspector.View.prototype.removeSubview):
(WebInspector.View.prototype.updateLayout):
Cancels any scheduled layouts for the view, then does a synchronous layout.
(WebInspector.View.prototype.updateLayoutIfNeeded):
(WebInspector.View.prototype.needsLayout):
Schedules view for the next asynchronous layout, if not already scheduled.
(WebInspector.View.prototype.didAttach):
(WebInspector.View.prototype.didDetach):
Inform view of changing parent view.
(WebInspector.View.prototype._layoutSubtree):
(WebInspector.View._scheduleLayoutForView):
Increments dirty counts on ancestor views, schedules a layout if needed.
(WebInspector.View._cancelScheduledLayoutForView):
Decrements dirty counts on ancestor views, cancels a pending layout if needed.
(WebInspector.View._visitViewTreeForLayout):
Animation frame callback. Does a breadth-first traversal of the view tree,
and updates the layout of views marked as dirty.
2015-11-10 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Code coverage profiler: incorrect "in-viewport" detection algorithm
https://bugs.webkit.org/show_bug.cgi?id=151116
Reviewed by Brian Burg.
* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
2015-11-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Support Gesture Events to zoom in / out of the Timeline
https://bugs.webkit.org/show_bug.cgi?id=151071
Reviewed by Timothy Hatcher.
Adjust the Timeline's secondsPerPixel value by the gesture event's scale factor.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
(WebInspector.TimelineOverview._handleGestureStart):
(WebInspector.TimelineOverview.prototype._handleGestureChange):
(WebInspector.TimelineOverview.prototype._handleGestureEnd):
2015-11-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught exception creating TimelineRecord alternate subtitles
https://bugs.webkit.org/show_bug.cgi?id=151046
Reviewed by Brian Burg.
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
We just need to create an element, it does not need to be
a child of subtitle, as it gets appended to the right
place later on.
2015-11-09 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: [Regression] [Mavericks] Top border of selected tab matches the background when Web Inspector is undocked
https://bugs.webkit.org/show_bug.cgi?id=150981
Reviewed by Timothy Hatcher.
* UserInterface/Views/TabBar.css:
(body.mavericks .tab-bar > .item:not(.disabled).selected): Added.
2015-11-09 Matt Baker <mattbaker@apple.com>
Web Inspector: Convert DatabaseContentView to use View base class
https://bugs.webkit.org/show_bug.cgi?id=150959
Reviewed by Timothy Hatcher.
Update DatabaseContentView to inherit from View. This required that query results be
promoted to a first-class view object, and that ConsolePrompt's DOM element not be wrapped
inside a container element.
Two new query result view classes (and their base class) wrap up DOM element creation
which was being performed by DatabaseContentView.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New files.
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
Removed unused parameter.
* UserInterface/Views/DatabaseContentView.css:
(.storage-view):
(.storage-view > .console-prompt):
(.storage-view > .console-prompt::before):
(:matches(.database-user-query, .database-query-result)::before):
(.database-query-result.no-results):
(.database-query-prompt): Deleted.
(:matches(.database-user-query, .database-query-prompt, .database-query-result)::before): Deleted.
(.database-query-prompt::before): Deleted.
Modified styles to create prompt without needing a wrapper element.
* UserInterface/Views/DatabaseContentView.js:
(WebInspector.DatabaseContentView):
(WebInspector.DatabaseContentView.prototype.shown):
(WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded.accumulateMatches):
(WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded.tableNamesCallback):
(WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded):
(WebInspector.DatabaseContentView.prototype._messagesClicked):
(WebInspector.DatabaseContentView.prototype._queryFinished):
(WebInspector.DatabaseContentView.prototype._queryError):
(WebInspector.DatabaseContentView.prototype.updateLayout): Deleted.
No longer needed.
(WebInspector.DatabaseContentView.prototype._appendViewQueryResult): Deleted.
(WebInspector.DatabaseContentView.prototype._appendErrorQueryResult): Deleted.
(WebInspector.DatabaseContentView.prototype._appendQueryResult): Deleted.
Removed methods subsumed under DatabaseUserQueryView.
* UserInterface/Views/DatabaseUserQueryErrorView.js: Added.
(WebInspector.DatabaseUserQueryErrorView):
Displays supplied error message.
* UserInterface/Views/DatabaseUserQuerySuccessView.js: Added.
(WebInspector.DatabaseUserQuerySuccessView):
Creates data grid if results exist, otherwise displays "no results" message.
(WebInspector.DatabaseUserQuerySuccessView.prototype.get dataGrid):
External access to view's data grid for autosizing columns, etc.
(WebInspector.DatabaseUserQuerySuccessView.prototype.layout):
Update grid layout manually, since the grid's parent in the DOM isn't the view's root element.
* UserInterface/Views/DatabaseUserQueryViewBase.js: Added.
Base class for success and error message views.
(WebInspector.DatabaseUserQueryViewBase):
Creates DOM common to subclasses.
(WebInspector.DatabaseUserQueryViewBase.prototype.get resultElement):
Protected getter exposing the content root for both subclasses.
2015-11-07 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: [Regression] [Mavericks] Toolbar is too dark while docked
https://bugs.webkit.org/show_bug.cgi?id=150977
Set the toolbar color of the docked inspector to be the same as on OS X 10.10+.
Undocked toolbar color on Mavericks is unnaffected.
Reviewed by Timothy Hatcher.
* UserInterface/Views/Toolbar.css:
(body.mavericks.docked .toolbar):
(body:not(.mavericks) .toolbar): Added.
2015-11-06 Timothy Hatcher <timothy@apple.com>
Web Inspector: Search Results tab causes jump to Resources tab on reload
https://bugs.webkit.org/show_bug.cgi?id=150817
Reviewed by Brian Burg.
Remove the "search on reload" behavior from the Search Results tab. It often didn't find everything
on large pages, since it only searched after 500ms of the main resource changing. The bug here
was caused by performSearch selecting the first result, even if it was a background tab. We now
avoid doing unnecessary search work in the background when the Search Results tab isn't visible.
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel): Deleted.
(WebInspector.SearchSidebarPanel.prototype._mainResourceDidChange): Remove children from the
sidebar since performSearch isn't doing it now and ScriptTreeElements were not being removed.
ResourceTreeElements were already being removed by NavigationSidebarPanel's prune behavior.
Removed the call to performSearch and related code.
(WebInspector.SearchSidebarPanel.prototype._mainResourceDidChange.delayedWork): Deleted.
2015-11-05 Matt Baker <mattbaker@apple.com>
Web Inspector: Convert remaining ContentViews to View base class
https://bugs.webkit.org/show_bug.cgi?id=150729
Reviewed by Brian Burg.
Refactor content views to reuse View features: remove updateLayout and
element getters, and use View.prototype.addSubview and removeSubview
where appropriate.
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
* UserInterface/Views/ClusterContentView.js:
(WebInspector.ClusterContentView):
(WebInspector.ClusterContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
(WebInspector.CookieStorageContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
(WebInspector.DOMStorageContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.layout):
(WebInspector.DOMTreeContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView):
(WebInspector.DatabaseTableContentView.prototype._queryFinished):
(WebInspector.DatabaseTableContentView.prototype._queryError):
* UserInterface/Views/FontResourceContentView.js:
(WebInspector.FontResourceContentView.prototype.layout):
(WebInspector.FontResourceContentView):
(WebInspector.FontResourceContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WebInspector.IndexedDatabaseObjectStoreContentView):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.layout):
(WebInspector.LogContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.needsLayout):
(WebInspector.NetworkGridContentView.prototype.layout):
(WebInspector.NetworkGridContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.layout): Deleted.
* UserInterface/Views/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype._contentWillPopulate):
(WebInspector.ScriptContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/TextContentView.js:
(WebInspector.TextContentView):
(WebInspector.TextContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.layout):
(WebInspector.TextEditor.prototype.get element): Deleted.
(WebInspector.TextEditor.prototype.updateLayout): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype.layout):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype.updateLayout): Deleted.
2015-11-05 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Pretty print falsely triggers on some JS that wasn't minified
https://bugs.webkit.org/show_bug.cgi?id=150876
Change the minification detection heuristic. Look for the ratio of whitespace to
non-whitespace characters in the first 5000 characters.
The previous heuristic looked for lines longer than 500 characters. Not only it was
slower on large unminified files, it also had a false positive on unminified codemirror.js.
Reviewed by Timothy Hatcher.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
(WebInspector.SourceCodeTextEditor.prototype._isLikelyMinified):
Exit early if whitespace to non-whitespace ratio drops below 5%.
2015-11-05 Matt Baker <mattbaker@apple.com>
Web Inspector: Convert TimelineRuler to View base class
https://bugs.webkit.org/show_bug.cgi?id=150703
Reviewed by Brian Burg.
Convert TimelineRuler to View base class. Ruler markers and selection elements
can be updated independent from its main layout. The logic for these additional
layouts is implemented as an override of View.prototype.needsLayout, and remains
largely unchanged.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
Add ruler as a subview.
(WebInspector.OverviewTimelineView.prototype.layout): Deleted.
Separate ruler layout no longer needed.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler):
(WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
(WebInspector.TimelineRuler.prototype.set formatLabelCallback):
(WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
(WebInspector.TimelineRuler.prototype.set zeroTime):
(WebInspector.TimelineRuler.prototype.set startTime):
(WebInspector.TimelineRuler.prototype.set duration):
(WebInspector.TimelineRuler.prototype.get endTime):
(WebInspector.TimelineRuler.prototype.set endTime):
(WebInspector.TimelineRuler.prototype.get secondsPerPixel):
(WebInspector.TimelineRuler.prototype.set secondsPerPixel):
(WebInspector.TimelineRuler.prototype.updateLayoutIfNeeded):
(WebInspector.TimelineRuler.prototype.needsLayout):
(WebInspector.TimelineRuler.prototype.layout):
(WebInspector.TimelineRuler.prototype._needsMarkerLayout):
(WebInspector.TimelineRuler.prototype._needsSelectionLayout):
(WebInspector.TimelineRuler.prototype._recalculate):
(WebInspector.TimelineRuler.prototype._updateMarkers):
(WebInspector.TimelineRuler.prototype._updateSelection):
(WebInspector.TimelineRuler.prototype._handleMouseDown):
(WebInspector.TimelineRuler.prototype._handleMouseMove):
(WebInspector.TimelineRuler.prototype._handleMouseUp):
(WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseDown):
(WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseMove):
(WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseUp):
Renamed methods to match new View.prototype methods and cleaned up
some code to use let, for...of.
(WebInspector.TimelineRuler.prototype.get element): Deleted.
No longer needed.
(WebInspector.TimelineRuler.prototype.updateLayout): Deleted.
Renamed to layout, overrides View.prototype.layout.
(WebInspector.TimelineRuler.prototype._needsLayout): Deleted.
Renamed to needsLayout, overrides View.prototype.needsLayout.
(WebInspector.TimelineRuler.prototype._needsMarkerLayout.update): Deleted.
(WebInspector.TimelineRuler.prototype._needsSelectionLayout.update): Deleted.
* UserInterface/Views/View.js:
(WebInspector.View.prototype.get isLayoutPending):
Added getter to check for pending layout.
2015-11-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ⌥⌘C sometimes ends ups up opening inspector without console prompt focused
https://bugs.webkit.org/show_bug.cgi?id=150916
Reviewed by Timothy Hatcher.
When first opening the inspector we hide the window until the document
is mostly ready / loaded. However once displaying the window WK2 would
set the initial focus, clearing what we already had and focusing the
first natural element (tabindex dictates the toolbar). Workaround this
by detecting when the document becomes visible and then focusing the
console prompt.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole):
(InspectorFrontendAPI.handleEvent):
2015-11-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Toolbar "Inspect Node" button not highlighting when active
https://bugs.webkit.org/show_bug.cgi?id=150938
Reviewed by Timothy Hatcher.
* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph):
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph):
Copy the navigation-bar button activated styles to toolbar.
2015-11-04 Matt Baker <mattbaker@apple.com>
Web Inspector: Load markers persist in timeline ruler after resetting recording
https://bugs.webkit.org/show_bug.cgi?id=150918
Reviewed by Joseph Pecoraro.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype._recordingReset):
Clears ruler markers on recording reset. Adds current time marker back.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._recordingReset):
Clears ruler markers on recording reset. Adds current time marker back.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.clearMarkers):
Added method to clear markers and marker elements.
2015-11-04 Matt Baker <mattbaker@apple.com>
Web Inspector: Uncaught Exception opening inspector - TypeError: Attempted to assign to readonly property.
https://bugs.webkit.org/show_bug.cgi?id=150913
Reviewed by Timothy Hatcher.
Fix invalid call to BackForwardEntry.prototype.contentView set.
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.replaceContentView):
Replace each BackForwardEntry matching the old content view with a new entry.
2015-11-04 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Uncaught exception mousing over CSS resource
https://bugs.webkit.org/show_bug.cgi?id=150917
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processMarkedToken): Add missing parameter.
2015-11-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: WebInspector.Color should support #rgba and #rrggbbaa syntax
https://bugs.webkit.org/show_bug.cgi?id=150894
Reviewed by Timothy Hatcher.
Support for hex with alpha color syntax.
* UserInterface/Models/Color.js:
(WebInspector.Color.fromString):
(WebInspector.Color.prototype.nextFormat):
(WebInspector.Color.prototype.copy):
(WebInspector.Color.prototype.toString):
(WebInspector.Color.prototype._toShortHEXAlphaString):
(WebInspector.Color.prototype._toHEXAlphaString):
Add support for new hex syntax. Address some minor issues
like case insensitivity and extra comma separate values.
* UserInterface/Views/CodeMirrorTextMarkers.js:
This prevent trailing hex characters from showing up
when cycling through color variants.
* UserInterface/Views/CodeMirrorAdditions.js:
When CodeMirror stops treating the new values as error
this will give them our hex-color styles.
2015-11-03 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r191612): Storage sidebar panel tree outline is broken
https://bugs.webkit.org/show_bug.cgi?id=150862
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ApplicationCacheFrameContentView.js:
Inherit from ContentView.
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._addDatabase):
Fixed syntax error.
(WebInspector.StorageSidebarPanel.prototype._addIndexedDatabase):
(WebInspector.StorageSidebarPanel.prototype._addFrameManifest):
WebInspector.TreeOutline.append doesn't exist; changed to appendChild.
2015-11-03 Matt Baker <mattbaker@apple.com>
Web Inspector: Create View base class, refactor some core view classes
https://bugs.webkit.org/show_bug.cgi?id=149186
Reviewed by Brian Burg and Timothy Hatcher.
This patch introduces a new View base class, which encapsulates DOM element creation,
layout scheduling, and subview management. The View class constructor accepts an optional
element parameter, allowing an existing DOM element to be associated with the View object,
rather than dynamically creating a new element. View also adds a `__view` property to its
associated DOM element to facilitate debugging the Inspector UI.
For the view classes refactored in this patch, the changes are largely mechanical. Dynamically
created DOM elements and redundant element getters have been removed. needsLayout has replaced
updateLayoutIfNeeded where appropriate. updateLayout has been removed entirely for views that
performed no layout other than to cascade layouts to their children.
* UserInterface/Base/Main.js:
Moved TabBar layout updates out of TabBrowser and into Main.js.
* UserInterface/Main.html:
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
(WebInspector.ConsolePrompt.prototype.layout):
(WebInspector.ConsolePrompt.prototype.get element): Deleted.
(WebInspector.ConsolePrompt.prototype.updateLayout): Deleted.
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype.get element): Deleted.
(WebInspector.ContentBrowser.prototype.updateLayout): Deleted.
* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView):
(WebInspector.ContentBrowserTabContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.prototype.get element): Deleted.
(WebInspector.ContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer):
(WebInspector.ContentViewContainer.prototype._showEntry):
(WebInspector.ContentViewContainer.prototype._hideEntry):
(WebInspector.ContentViewContainer.prototype.get element): Deleted.
(WebInspector.ContentViewContainer.prototype.updateLayout): Deleted.
(WebInspector.ContentViewContainer.prototype._addContentViewElement): Deleted.
(WebInspector.ContentViewContainer.prototype._removeContentViewElement): Deleted.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.autoSizeColumns):
(WebInspector.DataGrid.prototype.layout):
(WebInspector.DataGrid.prototype.applyColumnWidthsMap):
(WebInspector.DataGrid): Deleted.
(WebInspector.DataGrid.prototype.updateLayout): Deleted.
(WebInspector.DataGrid.prototype.resizerDragging): Deleted.
(WebInspector.DataGrid.prototype.resizerDragEnded): Deleted.
* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.set components):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
(WebInspector.LayoutTimelineView.prototype.layout):
(WebInspector.LayoutTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar):
(WebInspector.NavigationBar.prototype.insertNavigationItem):
(WebInspector.NavigationBar.prototype.removeNavigationItem):
(WebInspector.NavigationBar.prototype.get minimumWidth):
(WebInspector.NavigationBar.prototype.layout):
(WebInspector.NavigationBar.prototype._mouseDown):
(WebInspector.NavigationBar.prototype._mouseMoved):
(WebInspector.NavigationBar.prototype._mouseUp):
(WebInspector.NavigationBar.prototype._calculateMinimumWidth):
(WebInspector.NavigationBar.prototype.updateLayoutSoon.update): Deleted.
(WebInspector.NavigationBar.prototype.updateLayoutSoon): Deleted.
(WebInspector.NavigationBar.prototype.updateLayout): Deleted.
(WebInspector.NavigationBar.prototype.get element): Deleted.
* UserInterface/Views/NavigationItem.js:
(WebInspector.NavigationItem.prototype.set hidden):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
(WebInspector.NetworkTimelineView.prototype.layout):
(WebInspector.NetworkTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.layout):
(WebInspector.OverviewTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.layout):
(WebInspector.QuickConsole.prototype.get element): Deleted.
(WebInspector.QuickConsole.prototype.updateLayout): Deleted.
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
(WebInspector.RenderingFrameTimelineView.prototype.layout):
(WebInspector.RenderingFrameTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
(WebInspector.ScriptTimelineView.prototype.layout):
(WebInspector.ScriptTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar):
(WebInspector.TabBar.prototype.insertTabBarItem.animateTabs):
(WebInspector.TabBar.prototype.insertTabBarItem.removeStyles):
(WebInspector.TabBar.prototype.insertTabBarItem):
(WebInspector.TabBar.prototype.removeTabBarItem.animateTabs):
(WebInspector.TabBar.prototype.removeTabBarItem.removeStyles):
(WebInspector.TabBar.prototype.removeTabBarItem):
(WebInspector.TabBar.prototype.hasNormalTab):
(WebInspector.TabBar.prototype.layout):
(WebInspector.TabBar.prototype._recordTabBarItemSizesAndPositions):
(WebInspector.TabBar.prototype._finishExpandingTabsAfterClose.):
(WebInspector.TabBar.prototype._finishExpandingTabsAfterClose):
(WebInspector.TabBar.prototype._handleClick):
(WebInspector.TabBar.prototype._handleMouseMoved):
(WebInspector.TabBar.prototype._handleMouseUp):
(WebInspector.TabBar.prototype._handleMouseLeave):
(WebInspector.TabBar.prototype._handleNewTabMouseEnter):
(WebInspector.TabBar.prototype.updateLayoutSoon.update): Deleted.
(WebInspector.TabBar.prototype.updateLayoutSoon): Deleted.
(WebInspector.TabBar.prototype.updateLayout): Deleted.
(WebInspector.TabBar.prototype.get element): Deleted.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype.get element): Deleted.
(WebInspector.TabBrowser.prototype.updateLayout): Deleted.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.filterUpdated):
(WebInspector.TimelineView.prototype.needsLayout):
(WebInspector.TimelineView.prototype.updateLayout): Deleted.
(WebInspector.TimelineView.prototype.updateLayoutIfNeeded): Deleted.
(WebInspector.TimelineView): Deleted.
* UserInterface/Views/Toolbar.js:
(WebInspector.Toolbar):
(WebInspector.Toolbar.prototype.set displayMode):
(WebInspector.Toolbar.prototype.set sizeMode):
(WebInspector.Toolbar.prototype.addToolbarItem):
(WebInspector.Toolbar.prototype.layout):
(WebInspector.Toolbar.prototype.customUpdateLayout): Deleted.
Renamed to layout. This eliminated a layering violation in NavigationBar,
where the function previously known as updateLayout checked for a
a `customUpdateLayout` function property, and would call it instead of its
own layout logic if found.
* UserInterface/Views/View.js: Added.
(WebInspector.View):
(WebInspector.View.prototype.get element):
(WebInspector.View.prototype.get subviews):
(WebInspector.View.prototype.addSubview):
Appends a view to the end of the subview list.
(WebInspector.View.prototype.insertSubviewBefore):
Inserts a view into subview list before another subview.
(WebInspector.View.prototype.removeSubview):
(WebInspector.View.prototype.replaceSubview):
(WebInspector.View.prototype.updateLayout):
No longer overridden by subclasses.
(WebInspector.View.prototype.updateLayoutIfNeeded):
Forces a layout if one has been scheduled, otherwise does nothing.
(WebInspector.View.prototype.needsLayout):
Schedules a layout for the view.
(WebInspector.View.prototype.layout):
Overridden by views that require special layout logic. Layouts
cascade to child views automatically.
(WebInspector.View.prototype._layoutSubtree):
Main layout entry point. Called by requestAnimationFrame via needsLayut, by
updateLayout when forcing a synchronous layout, and called recursively during
subview traversal.
2015-11-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Handle or Remove ParseHTML Timeline Event Records
https://bugs.webkit.org/show_bug.cgi?id=150689
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):
2015-11-02 Andy Estes <aestes@apple.com>
[Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
https://bugs.webkit.org/show_bug.cgi?id=150819
Reviewed by Dan Bernstein.
This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
* Configurations/Base.xcconfig:
2015-10-30 Timothy Hatcher <timothy@apple.com>
Web Inspector: Unexpected background color behind the Continue button in the DebuggerDashboardView
https://bugs.webkit.org/show_bug.cgi?id=150734
Reviewed by Brian Burg.
* UserInterface/Views/DebuggerDashboardView.css:
(.dashboard.debugger .navigation-bar .item.button):
(.dashboard.debugger .navigation-bar .item.button > .glyph):
2015-10-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Make use of other Timer details in Timeline (timeout, singleShot)
https://bugs.webkit.org/show_bug.cgi?id=150697
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):
Create a small object for timer details.
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.EventType.displayName):
New details object requires new path to timer identifier.
* UserInterface/Views/ScriptTimelineView.css:
(.sidebar > .panel.navigation.timeline:not(.timeline-recording-content-view-showing) .navigation-sidebar-panel-content-tree-outline.script .item .alternate-subtitle):
(.navigation-sidebar-panel-content-tree-outline .item .alternate-subtitle):
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .alternate-subtitle):
(.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .alternate-subtitle::before):
Styles for an alternate-subtitle, a subtitle to show when the timeline
content view is showing and not a resource content view.
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
Create alternate subtitle for Timers with the timeout millisecond details.
Differentiate between setTimeout / setInterval.
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Deleted.
(WebInspector.ScriptTimelineDataGridNode): Deleted.
Remove dead code. Normally there would be a filter / scope bar for an eventType
column but no such column exists.
2015-10-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Display console.timeStamp(title) title in timeline markers
https://bugs.webkit.org/show_bug.cgi?id=150691
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._processEvent):
Detect unused timeline records.
* UserInterface/Models/TimelineMarker.js:
(WebInspector.TimelineMarker):
(WebInspector.TimelineMarker.prototype.get details):
Give markers an optional details argument.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.addMarker):
When a marker is a TimeStamp, use the details title in
the tooltip if one is available.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._refreshFrameSelectionChart):
Used \u in localized string. Kept this an endash since it is a range.
2015-10-29 Timothy Hatcher <timothy@apple.com>
Web Inspector: Navigation bar icons are missing
https://bugs.webkit.org/show_bug.cgi?id=150677
Reviewed by Joseph Pecoraro.
The glyph width and height were not being set correctly and it broke NavigationBar buttons.
The width and height attribute was being set on a div, when it should have used the style property.
Also remove the suppressEmboss flag, which is no longer used but the clients and subclasses still did.
* UserInterface/Base/ImageUtilities.js:
(useSVGSymbol): Use style property instead of setting width and height. The attributes
didn't accomplish the same thing in all cases. Use title and className property on the
wrapper element and remove the comments, which applied when there wasn't a wrapper.
* UserInterface/Views/ActivateButtonNavigationItem.js:
(WebInspector.ActivateButtonNavigationItem): Remove suppressEmboss.
* UserInterface/Views/ActivateButtonToolbarItem.js:
(WebInspector.ActivateButtonToolbarItem): Remove suppressEmboss.
* UserInterface/Views/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem): Remove suppressEmboss.
(WebInspector.ButtonNavigationItem.prototype.set image): Use style property instead of setting
width and height attributes. This assumed the SVG element was the glyph element, which changed
at one point without me remembering to fix this client.
* UserInterface/Views/ButtonToolbarItem.js:
(WebInspector.ButtonToolbarItem): Remove suppressEmboss.
* UserInterface/Views/DebuggerDashboardView.js:
(WebInspector.DebuggerDashboardView): Remove suppressEmboss use.
* UserInterface/Views/FilterBar.js:
(WebInspector.FilterBar.prototype.addFilterBarButton): Remove suppressEmboss.
* UserInterface/Views/FilterBarButton.js:
(WebInspector.FilterBarButton): Remove suppressEmboss.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel): Remove suppressEmboss use.
* UserInterface/Views/ToggleButtonNavigationItem.js:
(WebInspector.ToggleButtonNavigationItem): Remove suppressEmboss.
2015-10-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Clean up and audit TimelineRecordFactory records
https://bugs.webkit.org/show_bug.cgi?id=150660
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._processEvent):
Add FIXME for payload data which we are not yet using but could.
Fix typo in some rAF records where we were mistakenly using "timerId"
instead of "id" for the request identifier.
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.EventType.displayName):
Display the now correctly accessed rAF identifier in the Scripts timeline.
2015-10-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add "revert" to CSS value autocompletion
https://bugs.webkit.org/show_bug.cgi?id=150652
Reviewed by Timothy Hatcher.
* UserInterface/Models/CSSCompletions.js:
* UserInterface/Models/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
Treat "revert" like initial and unset. It is valid on all properties.
2015-10-28 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r191071): Web Inspector: Can't resize split console when the window is too narrow
https://bugs.webkit.org/show_bug.cgi?id=150492
Reviewed by Timothy Hatcher.
Make some items inside of the navigation bar click-through to incsease the draggable area.
* UserInterface/Views/Main.css:
(#split-content-browser > .navigation-bar > :matches(.hierarchical-path, .log-scope-bar)):
2015-10-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Show Timeline Markers again (DOMContentLoaded, Load, console.timeStamp)
https://bugs.webkit.org/show_bug.cgi?id=150612
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
Tooltip strings for the timeline markers.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.addEventMarker):
Dispatch an event so the views listening to this recording can add the markers.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype._markerAdded):
Add the marker to the OverviewTimelineView's ruler.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._markerAdded):
(WebInspector.TimelineOverview.prototype.addMarker): Deleted.
Add the marker to the TimelineOverview's ruler. Remove the unused method.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.addMarker):
Give some marker's a tooltip based on their type.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > .timeline-ruler > .markers):
(.timeline-overview.frames > .timeline-ruler > .markers > .marker:not(.current-time)):
Correct the height of markers in the timeline overview.
Hide markers non-current-time markers in the rendering frames view.
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .markers > .marker):
(.timeline-ruler > .markers > .marker::before):
Give markers a bit of width to make it easier to trigger their tooltip.
(.timeline-ruler > .markers > .marker.load-event):
(.timeline-ruler > .markers > .marker.dom-content-event):
(.timeline-ruler > .markers > .marker.timestamp):
Adjust coloring of the markers. hsla(0.5) was causing bleeding
with width 1px to 2px. hsl() with opacity it was always 1px.
2015-10-28 Timothy Hatcher <timothy@apple.com>
Web Inspector: Zoom never goes back to 100% size
https://bugs.webkit.org/show_bug.cgi?id=150637
Add and subtract 20% from the zoom level so the zoom factor can return
to the 1 starting zoom factor if you go back the other direction.
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector._increaseZoom): Add 0.2 instead of multiplying 1.2.
(WebInspector._decreaseZoom): Subtract 0.2 instead of multiplying 0.8.
2015-10-28 Matt Baker <mattbaker@apple.com>
Web Inspector: Rendering Frames pie chart does not update during initial selection of a timeline range
https://bugs.webkit.org/show_bug.cgi?id=150630
Reviewed by Geoffrey Garen.
No longer suppress selection changed events while dragging to create a new selection.
We dispatch selection changed events when adjusting an existing selection, so it makes
sense to treat both cases identically.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler): Deleted.
(WebInspector.TimelineRuler.prototype._dispatchTimeRangeSelectionChangedEvent): Deleted.
(WebInspector.TimelineRuler.prototype._handleMouseMove): Deleted.
2015-10-27 Timothy Hatcher <timothy@apple.com>
Web Inspector: Remove image generators and use SVG directly
https://bugs.webkit.org/show_bug.cgi?id=150602
Reviewed by Brian Burg.
This removes the code used to generate button image states as various canvas bitmaps.
With the simplification of the UI in Yosemite, we can now just style SVG images to change
the color used by the glyphs in these images. To do that we use the special "currentColor"
color keyword. That keyword represents the current value of the applied CSS text color.
This approach was used since it works across shadow DOM boundaries, which are there with
our new use of the SVG <use> element to import glyphs. This allows us to eliminate the
"stroked" and "filled" classes that were used to style some images that used the old
wrappedSVGDocument image utility.
Some of the SVG images had to be recreated -- specifically the removal of <clipPath> and
<text> elements. Those elements do not work or work well with the <use> element. We can
now only use graphical elements like <path>, <rect>, <circle>, etc.
* UserInterface/Images/*.svg: Added id to the top level for most images. Use currentColor instead of black. Sorted attributes.
* UserInterface/Images/gtk/*.svg: Added id to the top level for most images. Filed bug 150603 to track adopting currentColor.
* UserInterface/Base/ImageUtilities.js:
(useSVGSymbol): Added.
(catch): Deleted.
(_devicePixelRatioChanged): Deleted.
(_registerGeneratedImageUpdateFunction): Deleted.
(_logSQLError): Deleted.
(_logSQLTransactionError): Deleted.
(_prefetchCachedImagesAndUpdate): Deleted.
(_prefetchCachedImagesAndUpdate.): Deleted.
(else.): Deleted.
(restoreImageFromStorage): Deleted.
(imageLoaded): Deleted.
(ensureImageIsLoaded): Deleted.
(restoreImages.restoreActiveImages): Deleted.
(restoreImages): Deleted.
(restoreImage): Deleted.
(update): Deleted.
(generateImages.generateActiveImages): Deleted.
(generateImages): Deleted.
(generateImage): Deleted.
(_drawImageShadow): Deleted.
(_invertMaskImage): Deleted.
(_applyImageMask): Deleted.
(generateEmbossedImages): Deleted.
(invokeCallbackWithDocument): Deleted.
(imageLoad): Deleted.
(imageError): Deleted.
(wrappedSVGDocument): Deleted.
* UserInterface/Views/ActivateButtonNavigationItem.js:
(WebInspector.ActivateButtonNavigationItem.prototype.set activated):
(WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText): Deleted.
* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button):
(.navigation-bar .item.button > .glyph):
(.navigation-bar .item.button:not(.disabled):active > .glyph):
(.navigation-bar .item.button:not(.disabled):matches(:focus, .activate.activated, .radio.selected) > .glyph):
(.navigation-bar .item.button:not(.disabled):active:matches(:focus, .activate.activated, .radio.selected) > .glyph):
(body.window-inactive .navigation-bar .item.button > .glyph):
(.navigation-bar .item.button.disabled > .glyph):
(body.window-inactive .navigation-bar .item.button.disabled > .glyph):
(.navigation-bar .item.button.text-only): Deleted.
(body.window-inactive .navigation-bar .item.button:not(.suppress-emboss) > .glyph): Deleted.
(body.window-inactive .navigation-bar .item.button.disabled:not(.suppress-emboss) > .glyph): Deleted.
(.navigation-bar .item.button.suppress-emboss): Deleted.
(.navigation-bar .item.button.suppress-emboss > .glyph): Deleted.
(.navigation-bar .item.button.suppress-emboss:active > .glyph): Deleted.
(.navigation-bar .item.button.suppress-emboss.disabled > .glyph): Deleted.
* UserInterface/Views/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.set image):
(WebInspector.ButtonNavigationItem): Deleted.
(WebInspector.ButtonNavigationItem.prototype.get suppressBezel): Deleted.
(WebInspector.ButtonNavigationItem.prototype.set suppressBezel): Deleted.
(WebInspector.ButtonNavigationItem.prototype.generateStyleText): Deleted.
(WebInspector.ButtonNavigationItem.prototype._canvasIdentifier): Deleted.
(WebInspector.ButtonNavigationItem.prototype._updateImage): Deleted.
(WebInspector.ButtonNavigationItem.prototype._generateImages): Deleted.
* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button > .glyph):
(.toolbar .item.button:not(.disabled):active > .glyph):
* UserInterface/Views/ControlToolbarItem.css:
(.toolbar .item.control):
(.toolbar .item.control:hover):
* UserInterface/Views/MultipleScopeBarItem.js:
(WebInspector.MultipleScopeBarItem):
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype.updateLayoutSoon.update):
(WebInspector.NavigationBar.prototype.updateLayoutSoon):
(WebInspector.NavigationBar): Deleted.
(WebInspector.NavigationBar.prototype.insertNavigationItem): Deleted.
(WebInspector.NavigationBar.prototype.removeNavigationItem): Deleted.
(WebInspector.NavigationBar.prototype.updateLayout): Deleted.
(WebInspector.NavigationBar.prototype._updateStyle): Deleted.
* UserInterface/Views/NetworkSidebarPanel.js:
(WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):
* UserInterface/Views/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem.prototype.set active):
(WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Deleted.
* UserInterface/Views/ScopeBar.css:
(.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows):
(.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows svg .filled): Deleted.
(.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows svg .stroked): Deleted.
* UserInterface/Views/ScopeBarItem.js:
(WebInspector.ScopeBarItem):
* UserInterface/Views/ScopeRadioButtonNavigationItem.css:
(.scope-radio-button-navigation-item:hover > .arrows):
(.scope-radio-button-navigation-item.selected > .arrows > svg .stroked): Deleted.
* UserInterface/Views/ScopeRadioButtonNavigationItem.js:
(WebInspector.ScopeRadioButtonNavigationItem):
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events > .title-bar-scope-bar > .default-item-selected > .multiple .arrows):
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events > .title-bar-scope-bar > .default-item-selected > .multiple svg .filled): Deleted.
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events > .title-bar-scope-bar > .default-item-selected > .multiple svg .stroked): Deleted.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.treeElementAddedOrChanged):
(WebInspector.TimelineSidebarPanel.prototype._timelineAdded):
* UserInterface/Views/ToggleButtonNavigationItem.js:
(WebInspector.ToggleButtonNavigationItem): Deleted.
* UserInterface/Views/TreeElementStatusButton.css:
(.item > .status > .status-button):
(:matches(:focus, .force-focus) .item.selected > .status > .status-button):
(.item > .status > .status-button > svg .filled): Deleted.
(:matches(:focus, .force-focus) .item.selected > .status > .status-button > svg .filled): Deleted.
(.item > .status > .status-button > svg .stroked): Deleted.
(:matches(:focus, .force-focus) .item.selected > .status > .status-button > svg .stroked): Deleted.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor):
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section .details-section > .header > .visual-style-section-clear):
* UserInterface/Views/VisualStyleKeywordIconList.css:
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected):
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon:not(.selected) > div):
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected svg .stroked): Deleted.
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected svg .filled): Deleted.
* UserInterface/Views/VisualStyleKeywordIconList.js:
(WebInspector.VisualStyleKeywordIconList.createListItem):
(WebInspector.VisualStyleKeywordIconList):
* UserInterface/Views/VisualStylePropertyEditorLink.css:
(.visual-style-property-editor-link > .visual-style-property-editor-link-icon > :matches(.linked-icon, .unlinked-icon)):
(.visual-style-property-editor-link:not(.linked) > .visual-style-property-editor-link-icon > :matches(.linked-icon, .unlinked-icon)):
(.visual-style-property-editor-link > .visual-style-property-editor-link-icon): Deleted.
(.visual-style-property-editor-link > .visual-style-property-editor-link-icon > .unlinked-icon svg .filled): Deleted.
(.visual-style-property-editor-link > .visual-style-property-editor-link-icon > .unlinked-icon svg .stroked): Deleted.
* UserInterface/Views/VisualStylePropertyEditorLink.js:
(WebInspector.VisualStylePropertyEditorLink):
* UserInterface/Views/VisualStyleSelectorSection.css:
(.details-section.visual-style-selector-section > .header > .controls > .visual-style-selector-section-add-rule):
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
2015-10-28 Timothy Hatcher <timothy@apple.com>
Web Inspector: jsmin.py mistakenly removes whitespace from template literal strings
https://bugs.webkit.org/show_bug.cgi?id=148728
Reviewed by Joseph Pecoraro.
* Scripts/jsmin.py:
(JavascriptMinify.minify): Make backtick a quoting character.
2015-10-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timeline recording start button missing when WEB_REPLAY disabled (no ReplayAgent)
https://bugs.webkit.org/show_bug.cgi?id=150633
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._updateReplayInterfaceVisibility):
Ensure we pass a boolean to classList.toggle.
2015-10-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove Timeline MarkDOMContent and MarkLoad, data is already available
https://bugs.webkit.org/show_bug.cgi?id=150615
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processEvent):
Remove the now unneed mark event handling.
(WebInspector.TimelineManager.prototype.pageDOMContentLoadedEventFired):
(WebInspector.TimelineManager.prototype.pageLoadEventFired):
Update the main frame and create markers for the current recording.
* UserInterface/Protocol/PageObserver.js:
(WebInspector.PageObserver.prototype.domContentEventFired):
(WebInspector.PageObserver.prototype.loadEventFired):
Forward to TimelineManager.
2015-10-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused / duplicated XHR timeline instrumentation
https://bugs.webkit.org/show_bug.cgi?id=150605
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):
Remove unused events and add an assert that we don't miss
any script embedders.
2015-10-27 Matt Baker <mattbaker@apple.com>
REGRESSION: Web Inspector: DOM path bar blinks when modifying inline styles
https://bugs.webkit.org/show_bug.cgi?id=149258
Reviewed by Timothy Hatcher.
Now that Object now longer spams constructor event listeners, ContentBrowser can safely
update the NavigationBar synchronously. This fixes the issue, with zero impact on layout
responsiveness when selecting Rendering Frames tree elements.
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
Force NavigationBar to update synchronously.
2015-10-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timeline current time marker does not start moving when starting recording after just opening inspector
https://bugs.webkit.org/show_bug.cgi?id=150178
Reviewed by Brian Burg.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.capturingStarted):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.initializeTimeBoundsIfNecessary):
For a recording to start updating current time the recording itself
must have a start time. Provide a setter so that the start time can
be set without waiting for a timeline record. For example the
timestamp that the frontend receives when it starts a recording.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
When we have a startTime number (new backends) always use it as the current time.
Previously we were only doing this if current time was NaN, which would be when
re-starting a recording after it had stopped, but not for the initial recording
after opening the inspector.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.updateLayout):
Even if we do not need to create new time dividers we may need to perform
other updates like update the current time marker. So do work before bailing.
2015-10-26 Matt Baker <mattbaker@apple.com>
Web Inspector: WebInspector.Object can dispatch constructor-level events multiple times
https://bugs.webkit.org/show_bug.cgi?id=150579
Reviewed by Timothy Hatcher.
Use `hasOwnProperty` when checking for constructor event listeners when walking the
prototype chain. This prevents listeners registered with a base class constructor
from being dispatched multiple times by getting picked up higher in the prototype chain.
* UserInterface/Base/Object.js:
(WebInspector.Object.prototype.dispatchEventToListeners.dispatch):
(WebInspector.Object.prototype.dispatchEventToListeners):
(WebInspector.Object):
2015-10-26 Matt Baker <mattbaker@apple.com>
Web Inspector: Hundreds of failed assertions after switching to Rendering Frames after recording complete
https://bugs.webkit.org/show_bug.cgi?id=150568
Reviewed by Timothy Hatcher.
When the TimelineRecordingContentView responds to the current content view changing,
the TimelineOverview may be swapped out (if switching from a Timelines content view to a
Rendering Frames content view). This patch installs a new overview (if it's changing) prior
to setting the TimelineSidebarPanel's tree outline, as setting the tree outline forces
filters to run.
Filtering tree elements requires that the timeline overview is up to date, which was the
cause the assertion deluge.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
2015-10-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Spacebar to start recording should not cause system beep
https://bugs.webkit.org/show_bug.cgi?id=150573
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._toggleRecordingOnSpacebar):
(WebInspector.TimelineSidebarPanel.prototype._toggleNewRecordingOnSpacebar):
The keyboard shortcuts do not implicitly prevent default because they may bail.
So in cases where they do handle the key, prevent default to prevent system beeps.
2015-10-26 Matt Baker <mattbaker@apple.com>
Web Inspector: Cleanup sidebar panels, reduce `delete` and use Maps instead of objects
https://bugs.webkit.org/show_bug.cgi?id=150548
Reviewed by Timothy Hatcher.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._updateDataGrid):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._dataGridNodeForLayer):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.restoreStateFromCookie.finalAttemptToRestoreViewStateFromCookie):
(WebInspector.NavigationSidebarPanel.restoreStateFromCookie):
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
(WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
Switched to using Symbol() to set external properties on tree elements.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype._addDatabase):
(WebInspector.StorageSidebarPanel.prototype._addIndexedDatabase):
(WebInspector.StorageSidebarPanel.prototype._addFrameManifest):
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
2015-10-24 Nikita Vasilyev <nvasilyev@apple.com>
Unreviewed, rolling out r191419.
https://bugs.webkit.org/show_bug.cgi?id=150537
Reverted changeset:
"Web Inspector: Autocompletion previews in the CSS sidebar do not apply"
https://bugs.webkit.org/show_bug.cgi?id=147720
http://trac.webkit.org/changeset/191419
2015-10-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused ScrollLayer Timeline EventType
https://bugs.webkit.org/show_bug.cgi?id=150518
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:
* Versions/Inspector-iOS-9.0.json:
2015-10-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: xlink:href should be linkified
https://bugs.webkit.org/show_bug.cgi?id=150505
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
When opening a URL with a fragment, prefer opening a resource
that has the same URL without the fragment, otherwise this would
open in a new tab.
* UserInterface/Base/URLUtilities.js:
(absoluteURL):
Better handling absoluteURL("#frag", baseURL).
* UserInterface/Views/CodeMirrorAdditions.js:
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
Allow for more "href" style attributes, such as XML namespaced
"xlink:href" attribute names.
2015-10-23 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Command-Enter in Debugger should show a popover with evaluation result
https://bugs.webkit.org/show_bug.cgi?id=149195
Currenty, the only way to display the popover is to hover over the text with a mouse cursor.
Provide a way to display it via a keyboard shortcut.
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController): Deleted.
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions): Deleted.
Don't evaluate selected text from Debugger or Sources in the console.
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController):
(WebInspector.CodeMirrorTokenTrackingController.prototype._handleCommandEnterKey):
(WebInspector.CodeMirrorTokenTrackingController.prototype._hidePopover):
Cmd-Enter triggers the popover, Esc hides it.
(WebInspector.CodeMirrorTokenTrackingController.prototype.set mode):
(WebInspector.CodeMirrorTokenTrackingController.prototype.removeHighlightedRange):
Don't use delete.
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedWithMarkedText):
When a token isn't hovered, hide it only when it was triggered not by the keyboard.
(WebInspector.CodeMirrorTokenTrackingController.prototype._markedTextIsNoLongerHovered):
Don't use delete.
(WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
(WebInspector.CodeMirrorTokenTrackingController.prototype._getTokenInfoForPosition):
Abstract out a no side effects _getTokenInfoForPosition method, which is also used by _handleCommandEnterKey.
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOutOfEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
Don't use delete.
(WebInspector.CodeMirrorTokenTrackingController.prototype._processNewHoveredToken):
(WebInspector.CodeMirrorTokenTrackingController.prototype._processNonSymbolToken):
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
Pass tokenInfo as an argument to explicitly state that these methods require it.
(WebInspector.CodeMirrorTokenTrackingController.prototype._resetTrackingStates):
Don't use delete.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeReleased):
Allow to hide the popover regardless of mouse position. Used when the text cursor moves or
when Esc key is pressed.
2015-10-23 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual sidebar should support multiple backgrounds
https://bugs.webkit.org/show_bug.cgi?id=148310
Reviewed by Timothy Hatcher.
Changes the layout of the Background - Style section in the Visual sidebar
to be a list instead of a single editable field for a background-image URL.
Allows for comma-separated background properties (both shorthand and
longhand) and displays them all in a single list for editing.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleColorPicker.js:
(WebInspector.VisualStyleColorPicker):
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor):
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties.propertyValue):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.modifyPropertyText):
Comma separated properties will now try to assemble a value from related longhand
properties so that a single shorthand property with commas may be used.
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.background-style .visual-style-property-container.comma-separated-keyword-editor.background):
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection):
(WebInspector.VisualStyleDetailsPanel.prototype._noRemainingCommaSeparatedEditorItems):
(WebInspector.VisualStyleDetailsPanel.prototype._selectedCommaSeparatedEditorItemValueChanged):
(WebInspector.VisualStyleDetailsPanel.prototype._commaSeparatedEditorTreeItemSelected):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.noRemainingTreeItems): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.selectedBoxShadowItemValueChanged): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.boxShadowItemSelected): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.noRemainingTreeItems): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.selectedtransitionItemValueChanged): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.transitionItemSelected): Deleted.
Made the "background-image" property into a comma separated editor.
* UserInterface/Views/VisualStyleFontFamilyListEditor.js:
(WebInspector.VisualStyleFontFamilyListEditor):
* UserInterface/Views/VisualStyleKeywordIconList.js:
(WebInspector.VisualStyleKeywordIconList.prototype.set value):
(WebInspector.VisualStyleKeywordIconList.prototype._handleKeywordChanged):
(WebInspector.VisualStyleKeywordIconList):
* UserInterface/Views/VisualStyleKeywordPicker.js:
(WebInspector.VisualStyleKeywordPicker.prototype.updateEditorValues):
(WebInspector.VisualStyleKeywordPicker.prototype._setValue):
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
* UserInterface/Views/VisualStylePropertyCombiner.js:
(WebInspector.VisualStylePropertyCombiner):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):
(WebInspector.VisualStylePropertyEditor.prototype.update):
(WebInspector.VisualStylePropertyEditor.prototype.getValuesFromText):
(WebInspector.VisualStylePropertyEditor.prototype.get propertyMissing):
(WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
Moved "propertyMissing" into a member variable for better access.
* UserInterface/Views/VisualStyleURLInput.js:
(WebInspector.VisualStyleURLInput):
(WebInspector.VisualStyleURLInput.prototype.get synthesizedValue):
(WebInspector.VisualStyleURLInput.prototype.parseValue):
Added support for specific keywords to be used in the input field.
2015-10-22 Timothy Hatcher <timothy@apple.com>
Web Inspector: Remove generateColoredImagesForCSS and its clients
https://bugs.webkit.org/show_bug.cgi?id=150474
Reviewed by Joseph Pecoraro.
* UserInterface/Base/ImageUtilities.js:
(generateColoredImage): Deleted.
(imageLoaded): Deleted.
(ensureImageIsLoaded): Deleted.
(restoreImages.restoreActiveImages): Deleted.
(restoreImages): Deleted.
(restoreImage): Deleted.
(update): Deleted.
(generateImage): Deleted.
(generateColoredImagesForCSS): Deleted.
* UserInterface/Base/Main.js:
(WebInspector.loaded): Deleted call to _generateDisclosureTriangleImages.
(WebInspector._generateDisclosureTriangleImages): Deleted.
(WebInspector.createGoToArrowButton): Deleted code to generate the states.
* UserInterface/Images/BackArrow.svg: Removed.
* UserInterface/Images/BackForwardArrows.svg: Added.
* UserInterface/Images/DisclosureTriangleSmallClosed.svg: Removed.
* UserInterface/Images/DisclosureTriangleSmallOpen.svg: Removed.
* UserInterface/Images/DisclosureTriangleTinyClosed.svg: Removed.
* UserInterface/Images/DisclosureTriangleTinyOpen.svg: Removed.
* UserInterface/Images/DisclosureTriangles.svg: Added.
* UserInterface/Images/ForwardArrow.svg: Removed.
* UserInterface/Images/GoToArrow.svg:
* UserInterface/Images/Locked.svg: Moved fill color here.
* UserInterface/Images/SortIndicatorArrows.svg: Added.
* UserInterface/Images/SortIndicatorDownArrow.svg: Removed.
* UserInterface/Images/SortIndicatorUpArrow.svg: Removed.
* UserInterface/Images/gtk/BackArrow.svg: Removed.
* UserInterface/Images/gtk/BackForwardArrows.svg: Added.
* UserInterface/Images/gtk/DisclosureTriangleSmallClosed.svg: Removed.
* UserInterface/Images/gtk/DisclosureTriangleSmallOpen.svg: Removed.
* UserInterface/Images/gtk/DisclosureTriangleTinyClosed.svg: Removed.
* UserInterface/Images/gtk/DisclosureTriangleTinyOpen.svg: Removed.
* UserInterface/Images/gtk/DisclosureTriangles.svg: Added.
* UserInterface/Images/gtk/ForwardArrow.svg: Removed.
* UserInterface/Images/gtk/GoToArrow.svg:
* UserInterface/Images/gtk/Locked.svg: Moved fill color here.
* UserInterface/Images/gtk/SortIndicatorArrows.svg: Added.
* UserInterface/Images/gtk/SortIndicatorDownArrow.svg: Removed.
* UserInterface/Images/gtk/SortIndicatorUpArrow.svg: Removed.
* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section.locked > .header::before):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection): Deleted.
* UserInterface/Views/ConsoleMessageView.css:
(.console-message.expandable .console-top-level-message::before):
(.console-message.expandable.expanded .console-top-level-message::before):
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser): Use BackForwardArrows.svg.
* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline li.parent::before):
(.dom-tree-outline:focus li.parent.selected::before):
(.dom-tree-outline li.parent.expanded::before):
(.dom-tree-outline:focus li.parent.expanded.selected::before):
* UserInterface/Views/DataGrid.css:
(.data-grid th.sort-ascending > div:first-child::after):
(.data-grid th.sort-descending > div:first-child::after):
(.data-grid tr.parent td.disclosure::before):
(.data-grid tr.parent.expanded td.disclosure::before):
(.data-grid:matches(:focus, .force-focus) tr.parent.selected td.disclosure::before):
(.data-grid:matches(:focus, .force-focus) tr.parent.expanded.selected td.disclosure::before):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid): Deleted call to _generateSortIndicatorImagesIfNeeded.
(WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded): Deleted.
* UserInterface/Views/DetailsSection.css:
(.details-section > .header::before):
(.details-section > .header:not(.mouse-over-options-element):active::before):
(.details-section.collapsed > .header::before):
(.details-section.collapsed > .header:not(.mouse-over-options-element):active::before):
* UserInterface/Views/DetailsSection.js:
(WebInspector.DetailsSection): Deleted call to _generateDisclosureTrianglesIfNeeded.
(WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded): Deleted.
* UserInterface/Views/ErrorObjectView.css:
(.error-object > .formatted-error::before):
(.error-object.expanded > .formatted-error::before):
* UserInterface/Views/FindBanner.css:
(.find-banner > button.segmented.left > .glyph):
(.find-banner > button.segmented.left:active:not(:disabled) > .glyph):
(.find-banner > button.segmented.right > .glyph):
(.find-banner > button.segmented.right:active:not(:disabled) > .glyph):
* UserInterface/Views/FindBanner.js:
(WebInspector.FindBanner): Deleted call to _generateButtonsGlyphsIfNeeded.
(WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded): Deleted.
* UserInterface/Views/LogContentView.css:
(.console-group-title::before):
(.console-group.collapsed .console-group-title::before):
* UserInterface/Views/Main.css:
(.go-to-arrow):
(.go-to-arrow:active):
(:matches(:focus, .force-focus) .selected .go-to-arrow):
(:matches(:focus, .force-focus) .selected .go-to-arrow:active):
* UserInterface/Views/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline .item .disclosure-button):
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .disclosure-button):
(.navigation-sidebar-panel-content-tree-outline .item.expanded .disclosure-button):
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected.expanded .disclosure-button):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Deleted call to _generateDisclosureTrianglesIfNeeded.
(WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded): Deleted.
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property.parent > .disclosure-button):
(.object-tree-property.parent.expanded > .disclosure-button):
(.object-tree-property .read-only): Deleted.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree > :matches(.title, .object-preview)::before):
(.object-tree.expanded > :matches(.title, .object-preview)::before):
* UserInterface/Views/TypeTreeElement.css:
(.type-tree-element.parent > .disclosure-button):
(.type-tree-element.parent.expanded > .disclosure-button):
2015-10-22 Matt Baker <mattbaker@apple.com>
Web Inspector: CSS Data URIs count against page weight twice
https://bugs.webkit.org/show_bug.cgi?id=150101
Reviewed by Timothy Hatcher.
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._resourceSizeDidChange):
Exclude resources with a data URI from the total page weight.
* UserInterface/Models/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.updateForRedirectResponse):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.prototype.markAsFinished):
Removed uses of `delete`.
2015-10-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused Timeline GCEvent Record type
https://bugs.webkit.org/show_bug.cgi?id=150477
Reviewed by Timothy Hatcher.
iOS backends never emitted a GCEvent timeline event.
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:
* Versions/Inspector-iOS-9.0.json:
2015-10-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: srcset attributes should have hyperlinks to the resources
https://bugs.webkit.org/show_bug.cgi?id=150409
Reviewed by Timothy Hatcher.
Follow-up tweaks and fixes that were intended to be landed.
* UserInterface/Views/CodeMirrorAdditions.js:
(tokenizeSrcSetString):
Multiline parsing has issues recovering the state CodeMirror
expects, so we just bail in those cases. Leading whitespace
is also handled poorly, but expected to be rare.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
Trim to eliminate leading whitespace.
2015-10-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Restore :not(:placeholder-shown) behavior on search bars with comments
https://bugs.webkit.org/show_bug.cgi?id=150452
Reviewed by Timothy Hatcher.
* UserInterface/Views/FindBanner.css:
(.find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown)):
* UserInterface/Views/SearchBar.css:
(.search-bar > input[type="search"]:not(:placeholder-shown)):
Add back the placeholder-shown related styles and add a comment about what they are for.
2015-10-22 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Tabbing over CSS properties prepended by * doesn't move the highlighted range
https://bugs.webkit.org/show_bug.cgi?id=150294
Reviewed by Timothy Hatcher.
Moving the selected text when tabbing and shift-tabbing now relies upon
the last index of ";" if it exists instead of whether the line ends with it.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey):
2015-10-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: srcset attributes should have hyperlinks to the resources
https://bugs.webkit.org/show_bug.cgi?id=150409
Reviewed by Timothy Hatcher.
The "srcset" attribute parsing is a simplification of:
https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-srcset
The "srcset" attribute value is expected to be in comma
separated groups. Within each group we always expect a link,
and an optional descriptor. We want to linkify the link.
* UserInterface/Views/CodeMirrorAdditions.js:
(tokenizeSrcSetString):
(extendedXMLToken):
When parsing srcset attribute, parse links as link tokens
so that they are linkified in resource content views.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
When creating the DOMTree DOM for srcset attributes,
create link elements for the link values of attribute value.
2015-10-21 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Autocompletion previews in the CSS sidebar do not apply
https://bugs.webkit.org/show_bug.cgi?id=147720
Reviewed by Timothy Hatcher.
When autocompletion hints are added to styles or the console, the history
object used by CodeMirror was edited to remove the last entry. Instead of
using this method (which caused glitchy behaviour when undo-ing), call
CodeMirror.undo() and adjust accordingly. In addition, a marker was being
used as the completion hint instead of applying text, whereas these
changes use actual text, ensuring that completions are previewed in the page.
* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController):
(WebInspector.CodeMirrorCompletionController.prototype.close):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype._handleBeforeChange):
(WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker): Deleted.
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker): Deleted.
2015-10-21 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add forgotten WebInspector.UIString from r190521
https://bugs.webkit.org/show_bug.cgi?id=150425
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(UserInterface/Views/CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded)
2015-10-21 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Adjust usages of classList.toggle to ensure a true/false value instead of undefined
https://bugs.webkit.org/show_bug.cgi?id=150424
Reviewed by Timothy Hatcher.
Adds "!!" in front of force parameters in classList.toggle calls that
could possibly be undefined (thereby breaking the UI).
* UserInterface/Views/ScopeBarItem.js:
(WebInspector.ScopeBarItem):
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):
2015-10-21 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Option-Up doesn't increment certain attribute values
https://bugs.webkit.org/show_bug.cgi?id=149257
Reviewed by Brian Burg.
If the user tries to modify a numerical attribute in HTML and the cursor
was at the beginning of the attribute value, the range of the selection
was within a sibling element instead of the text node containin the value.
This patch fixes this issue and ensures that the correct text is selected.
* UserInterface/Views/EditingSupport.js:
(WebInspector.startEditing.handleEditingResult):
Replaced var with let.
2015-10-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Use some CSS Variables in Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=150405
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
Include the new variables stylesheet.
* UserInterface/Views/Variables.css: Added.
(:root):
Introduce new global variables.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .cm-link):
* UserInterface/Views/ConsoleMessageView.css:
(.console-message-preview-divider):
(.console-message-enclosed):
(.console-message .console-message-extra-parameters-container > li::before):
(.console-saved-variable):
* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline li.selected > span::after):
* UserInterface/Views/FormattedValue.css:
(:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset) > .size):
(.formatted-number):
(.formatted-boolean):
(.formatted-string):
(.formatted-regexp):
(.formatted-symbol):
* UserInterface/Views/ObjectPreviewView.css:
(.object-preview > .size):
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-name):
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
(.syntax-highlighted :matches(.css-keyword, .css-tag, .css-at-rule, .css-important, .javascript-keyword, .html-tag)):
(.syntax-highlighted :matches(.css-number, .javascript-number)):
(.syntax-highlighted :matches(.css-string, .javascript-string, .html-attribute-value)):
(.syntax-highlighted .javascript-regexp):
* UserInterface/Views/TypeTokenView.css:
(.type-token-symbol):
Make use of variables.
2015-10-21 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Typo in a property name: style.inerhited
https://bugs.webkit.org/show_bug.cgi?id=150391
Reviewed by Csaba Osztrogonác.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
2015-10-20 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Pressing Command-S while focused on the styles sidebar should save CSS file
https://bugs.webkit.org/show_bug.cgi?id=150298
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
Beep when saving didn't work. Inline CSS and CSS in style attributes aren't curently supported.
2015-10-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JavaScriptCore should parse sourceURL and sourceMappingURL directives
https://bugs.webkit.org/show_bug.cgi?id=150096
Reviewed by Geoffrey Garen.
* UserInterface/Test/InspectorProtocol.js:
(InspectorProtocol._sendMessage):
(InspectorProtocol.dispatchMessageFromBackend):
This is only used for tests, so avoid console.log
and just dump directly to the system console.
2015-10-19 Xabier Rodriguez Calvar <calvaris@igalia.com>
[Streams API] Add skeleton for initial WritableStream support
https://bugs.webkit.org/show_bug.cgi?id=149951
Reviewed by Darin Adler.
* UserInterface/Models/NativeFunctionParameters.js: Added support for WritableStream.
2015-10-19 James Craig <jcraig@apple.com>
Web Inspector: AX: console list 'input'/'output' markers are not perceivable
https://bugs.webkit.org/show_bug.cgi?id=133045
Enabling WebKit Web Inspector console pseudo-element labels using the new CSS4 'alt' property.
Reviewed by Brian Burg.
* UserInterface/Views/LogContentView.css:
(.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted.selected):
(.console-messages:focus .console-item.selected .console-user-command-result.console-log-level::before):
(@media reader): Deleted.
2015-10-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Console Search should update when console is cleared
https://bugs.webkit.org/show_bug.cgi?id=150141
Reviewed by Brian Burg.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._logCleared):
Reperform the search if there is a search query.
(WebInspector.LogContentView.prototype._filterMessageElements):
Reperform the current search.
2015-10-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add "unset" to CSS value autocompletion
https://bugs.webkit.org/show_bug.cgi?id=127616
Reviewed by Brian Burg.
* UserInterface/Models/CSSCompletions.js:
* UserInterface/Models/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
Treat "unset" similiar to "initial". Also, no need for "initial"
in an individual property's list. We always include it.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
Add "Unset" alongside "Initial".
2015-10-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Include Garbage Collection Event in Timeline
https://bugs.webkit.org/show_bug.cgi?id=142510
Reviewed by Geoffrey Garen and Brian Burg.
* UserInterface/Base/Utilities.js:
(Array.prototype.partition):
Helper to partition an Array into two arrays.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Test.html:
* UserInterface/Test/Test.js:
(WebInspector.loaded):
* UserInterface/Protocol/HeapObserver.js: Added.
(WebInspector.HeapObserver.prototype.garbageCollected):
(WebInspector.HeapObserver):
Create the new observer and manager.
* UserInterface/Models/GarbageCollection.js: Added.
(WebInspector.GarbageCollection):
(WebInspector.GarbageCollection.fromPayload):
(WebInspector.GarbageCollection.prototype.get type):
(WebInspector.GarbageCollection.prototype.get startTime):
(WebInspector.GarbageCollection.prototype.get endTime):
(WebInspector.GarbageCollection.prototype.get duration):
Model object for Heap.GarbageCollection.
* UserInterface/Controllers/HeapManager.js: Added.
(WebInspector.HeapManager):
(WebInspector.HeapManager.prototype.garbageCollected):
Dispatch events with the GC object.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype._garbageCollected):
Include new GC Timeline Events as Script events.
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
For the Script overview, make two sets of bars, one for Scripts and one for GCs.
The GCs bar will be overlaid on top of the the Scripts bar. This is particularly
useful since a GC can happen during script execution.
* UserInterface/Images/TimelineRecordGarbageCollection.svg: Added.
* UserInterface/Main.html:
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection):
(WebInspector.ScriptTimelineRecord.EventType.displayName):
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ScriptTimelineDataGridNode):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype._processPendingRecords):
* UserInterface/Views/SourceCodeTimelineTreeElement.js:
(WebInspector.SourceCodeTimelineTreeElement):
* UserInterface/Views/TimelineIcons.css:
(.garbage-collection-profile-record .icon):
* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar.timeline-record-type-script.script-timeline-record-garbage-collected > .segment):
UI for GC events.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.createCombinedBars):
Simplify by storing start time into a variable.
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
Icon for GC events.
2015-10-15 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r191135.
https://bugs.webkit.org/show_bug.cgi?id=150197
This patch causes 50+ LayoutTest crashes related to the
inspector (Requested by ryanhaddad on #webkit).
Reverted changeset:
"Web Inspector: JavaScriptCore should parse sourceURL and
sourceMappingURL directives"
https://bugs.webkit.org/show_bug.cgi?id=150096
http://trac.webkit.org/changeset/191135
2015-10-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JavaScriptCore should parse sourceURL and sourceMappingURL directives
https://bugs.webkit.org/show_bug.cgi?id=150096
Reviewed by Geoffrey Garen.
* UserInterface/Test/InspectorProtocol.js:
(InspectorProtocol._sendMessage):
(InspectorProtocol.dispatchMessageFromBackend):
This is only used for tests, so avoid console.log
and just dump directly to the system console.
2015-10-13 João Oliveira <hello@jxs.pt>
Web Inspector: Console SearchBar should work more like ContentBrowser FindBanner
https://bugs.webkit.org/show_bug.cgi?id=149505
Reviewed by Joseph Pecoraro.
Console tab now uses findBanner, adapted LogContentView to use findBanner,
and findBanner to be more agnostic to both usecases, either as fixed, on console tab,
and hideable on other inspector tabs.
* UserInterface/Views/FindBanner.css:
(.find-banner.console-find-banner):
(.find-banner.console-findbanner input[type="search"]):
* UserInterface/Views/FindBanner.js:
(WebInspector.FindBanner):
(WebInspector.FindBanner.set targetElement.delayedWork):
(WebInspector.FindBanner.prototype.set targetElement):
(WebInspector.FindBanner.prototype.get showing):
(WebInspector.FindBanner.prototype.focus):
(WebInspector.FindBanner.prototype._clearAndBlur):
(WebInspector.FindBanner.prototype.show.delayedWork):
(WebInspector.FindBanner.prototype.show):
(WebInspector.FindBanner.prototype.hide):
(WebInspector.FindBanner.prototype.get element): Deleted.
(WebInspector.FindBanner.prototype._inputFieldSearch): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.get navigationItems):
(WebInspector.LogContentView.prototype.handleFindEvent):
(WebInspector.LogContentView.prototype.findBannerRevealPreviousResult):
(WebInspector.LogContentView.prototype.findBannerRevealNextResult):
(WebInspector.LogContentView.prototype._filterMessageElements):
(WebInspector.LogContentView.prototype.findBannerPerformSearch):
(WebInspector.LogContentView.prototype.findBannerSearchCleared):
(WebInspector.LogContentView.prototype.revealNextSearchResult):
(WebInspector.LogContentView.prototype.revealPreviousSearchResult):
(WebInspector.LogContentView.prototype._performSearch):
(WebInspector.LogContentView.prototype.searchBarDidActivate): Deleted.
(WebInspector.LogContentView.prototype._searchTextDidChange): Deleted.
2015-10-13 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r189567): Web Inspector: Clipped filter icons when debugger sidebar is narrow
https://bugs.webkit.org/show_bug.cgi?id=150023
r189567 changed flexbox items' default min-width from 0 to auto.
Explicitly set it to 0 in CSS.
Reviewed by Brian Burg.
* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]):
2015-10-13 Yusuke Suzuki <utatane.tea@gmail.com>
Web Inspector: Don't shadow global Object constructor in WebInspector.Object class definition
https://bugs.webkit.org/show_bug.cgi?id=150093
Reviewed by Joseph Pecoraro.
Currently, class expression does not define any variables. So even in `class Object { }`,
we were able to touch the global Object constructor (like `Object.keys`).
However, that is a bug. After https://bugs.webkit.org/show_bug.cgi?id=150089 fixes that bug,
the global `Object` is shadowed by the user-defined `class Object` name.
To solve this issue, we changed the `class Object` to `class WebInspectorObject`.
And we expose this class as a `WebInspector.Object`.
* UserInterface/Base/Object.js:
2015-10-10 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Improve error messages for internal Inspector code
https://bugs.webkit.org/show_bug.cgi?id=149995
Don't log "error.stack" since the error view already includes a nicely formatted stacktrace.
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype._dispatchResponseToCallback):
(InspectorBackendClass.prototype._dispatchEvent):
2015-10-08 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Stack trace view doesn't properly display lines without function names
https://bugs.webkit.org/show_bug.cgi?id=149922
Reviewed by Timothy Hatcher.
* UserInterface/Models/StackTrace.js:
(WebInspector.StackTrace._parseStackTrace):
(WebInspector.StackTrace._parseLocation): Added.
2015-10-08 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: An error view doesn't get expanded by clicking on the expand arrow
https://bugs.webkit.org/show_bug.cgi?id=149917
Reviewed by Timothy Hatcher.
* UserInterface/Views/ErrorObjectView.css:
(.error-object > .formatted-error::before):
(.error-object.expanded > .formatted-error::before):
(.error-object::before): Deleted.
(.error-object.expanded::before): Deleted.
2015-10-06 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Clicking on a stack trace link does not navigate to the corresponding line
https://bugs.webkit.org/show_bug.cgi?id=149405
lineNumber should be a number type but it was a string.
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector.openURL):
(WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
Keep lineNumber undefined when it isn't present in the string.
WebInspector.linkifyStringAsFragmentWithCustomLinkifier is only used by
WebInspector.linkifyStringAsFragment and it expects lineNumber to be undefined
when it wasn't found in the parsed string.
2015-10-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Fix spacing of FindBanner prev/next buttons
https://bugs.webkit.org/show_bug.cgi?id=149717
Reviewed by Darin Adler.
The sizing and spacing of the previous and next buttons in the FindBanner
is slightly off and should be readjusted to ensure that both buttons are
the same size and have the same spacing.
* UserInterface/Views/FindBanner.css:
(.find-banner > button.segmented.right > .glyph):
(.find-banner > button.segmented):
(.find-banner > button.segmented > .glyph):
(.find-banner > button.segmented.left): Deleted.
(.find-banner > button.segmented.left > .glyph): Deleted.
(.find-banner > button.segmented.right): Deleted.
2015-10-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Simplify TimelineRecordBar a bit
https://bugs.webkit.org/show_bug.cgi?id=149733
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.prototype.set records):
2015-10-05 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Error displayed as an object when passed as a second argument to console.log
https://bugs.webkit.org/show_bug.cgi?id=149799
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendExtraParameters):
Don't format errors as objects.
(WebInspector.ConsoleMessageView.prototype._formatParameter):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsValue):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsObject):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsError):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsArray):
Replace an unnecessary span element with a document fragment.
* UserInterface/Views/ErrorObjectView.css:
(.error-object):
Display an error object on the same line as a list bullet.
2015-10-05 Myles C. Maxfield <mmaxfield@apple.com>
Unprefix -webkit-font-feature-settings
https://bugs.webkit.org/show_bug.cgi?id=149722
Reviewed by Sam Weinig.
* UserInterface/Models/CSSKeywordCompletions.js:
2015-10-04 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Wrong column numbers in error object views
https://bugs.webkit.org/show_bug.cgi?id=149795
Convert columnNumber and lineNumber properties from strings to numbers
to prevent accidental string concatenations.
Reviewed by Timothy Hatcher.
* UserInterface/Models/StackTrace.js:
(WebInspector.StackTrace._parseStackTrace):
2015-10-02 Matt Baker <mattbaker@apple.com>
Web Inspector: Add breakpoint option to ignore n times before stopping
https://bugs.webkit.org/show_bug.cgi?id=147664
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New strings for breakpoint popover labels.
* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
Add ignoreCount UI to popover, if backend support exists. UI based on same
feature in Xcode's breakpoint editing dialog.
(WebInspector.BreakpointPopoverController.prototype._popoverIgnoreInputChanged):
User input sanity checks on numeric input.
* UserInterface/Controllers/DebuggerManager.js:
Listen for changes to breakpoint ignoreCount property.
* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.get ignoreCount):
(WebInspector.Breakpoint.prototype.set ignoreCount):
New property for ignoreCount.
(WebInspector.Breakpoint.prototype.get options):
Added ignoreCount to options object.
(WebInspector.Breakpoint.prototype.get info):
Added ignoreCount to info object.
* UserInterface/Views/BreakpointPopoverController.css:
(#edit-breakpoint-popover-ignore):
New styles for breakpoint popover.
2015-10-02 Matt Baker <mattbaker@apple.com>
Web Inspector: Cleanup DebuggerManager, reduce `delete` and use Maps instead of objects
https://bugs.webkit.org/show_bug.cgi?id=149760
Reviewed by Joseph Pecoraro.
Replaced objects used as hashmaps with Map.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
(WebInspector.DebuggerManager.prototype.breakpointForIdentifier):
(WebInspector.DebuggerManager.prototype.scriptForIdentifier):
(WebInspector.DebuggerManager.prototype.scriptsForURL):
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
(WebInspector.DebuggerManager.prototype.removeBreakpoint):
(WebInspector.DebuggerManager.prototype.breakpointResolved):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
(WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
(WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
(WebInspector.DebuggerManager.prototype._setBreakpoint):
(WebInspector.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
(WebInspector.DebuggerManager.prototype._removeBreakpoint):
2015-10-02 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Copying inline style text puts "undefined" in the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=149155
Reviewed by Brian Burg.
CSSStyleDeclarations for inline styles do not have a owner CSSRule, which means
that they do not have a selector or media list. CSS strings must have a selector
and, for inline styles without an owner rule and selector, this was a problem.
* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.get mediaList):
(WebInspector.CSSStyleDeclaration.prototype.get selectorText):
(WebInspector.CSSStyleDeclaration.prototype.generateCSSRuleString):
Added getters for the list of media queries and selector text with fallbacks
for CSSStyleDeclarations that do not have an owner CSSRule (inline styles).
* UserInterface/Test.html:
Added CSSMedia include for new inspector/css/generate-css-rule-string.html test.
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
Removed parameter that no longer exists.
2015-10-02 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed, rolling out r190520, some tests assert / crash.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.loaded): Deleted.
* UserInterface/Base/Utilities.js:
(value): Deleted.
* UserInterface/Controllers/HeapManager.js: Removed.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager): Deleted.
(WebInspector.TimelineManager.prototype._garbageCollected): Deleted.
* UserInterface/Images/TimelineRecordGarbageCollection.svg: Removed.
* UserInterface/Main.html:
* UserInterface/Models/GarbageCollection.js: Removed.
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.EventType.displayName):
(WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection): Deleted.
* UserInterface/Protocol/HeapObserver.js: Removed.
* UserInterface/Test.html:
* UserInterface/Test/Test.js:
(WebInspector.loaded): Deleted.
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Deleted.
(WebInspector.ScriptTimelineDataGridNode): Deleted.
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype._processPendingRecords):
* UserInterface/Views/SourceCodeTimelineTreeElement.js:
(WebInspector.SourceCodeTimelineTreeElement):
* UserInterface/Views/TimelineIcons.css:
(.garbage-collection-profile-record .icon): Deleted.
* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar.timeline-record-type-script.script-timeline-record-garbage-collected > .segment): Deleted.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.createCombinedBars):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
2015-10-02 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Option-Click on a property name in the Computed view should jump to resource view
https://bugs.webkit.org/show_bug.cgi?id=149521
Reviewed by Timothy Hatcher.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.effectivePropertyForName):
Now tries to search for a non-canonical property before falling back to
the canonical version.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
If the user option-clicks the goto arrow, it shows the source for the
property instead.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorShowProperty.delegateShowProperty):
(WebInspector.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorShowProperty):
Attempts to show the source of the given property. Will fallback to
highlighting the property in the rules panel.
2015-10-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Include Garbage Collection Event in Timeline
https://bugs.webkit.org/show_bug.cgi?id=142510
Reviewed by Geoffrey Garen.
* UserInterface/Base/Utilities.js:
(Array.prototype.parition):
Helper to partition an Array into two arrays.
* UserInterface/Main.html:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Test.html:
* UserInterface/Test/Test.js:
(WebInspector.loaded):
* UserInterface/Protocol/HeapObserver.js:
(WebInspector.HeapObserver.prototype.garbageCollected):
(WebInspector.HeapObserver):
Create the new observer and manager.
* UserInterface/Models/GarbageCollection.js:
(WebInspector.GarbageCollection):
(WebInspector.GarbageCollection.fromPayload):
(WebInspector.GarbageCollection.prototype.get type):
(WebInspector.GarbageCollection.prototype.get startTime):
(WebInspector.GarbageCollection.prototype.get endTime):
(WebInspector.GarbageCollection.prototype.get duration):
Model object for Heap.GarbageCollection.
* UserInterface/Controllers/HeapManager.js:
(WebInspector.HeapManager):
(WebInspector.HeapManager.prototype.garbageCollected):
Dispatch events with.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype._garbageCollected):
Include new GC Timeline Events as Script events.
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
For the Script overview, make two sets of bars, one for Scripts and one for GCs.
The GCs bar will be on top of the the Scripts bar. This is particularly useful
since a GC can happen during script execution.
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ScriptTimelineDataGridNode):
Give a NaN call count to top level Script DataGridNodes.
In the UI, display the empty placeholder for NaN call counts.
* UserInterface/Images/TimelineRecordGarbageCollection.svg: Added.
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection):
(WebInspector.ScriptTimelineRecord.EventType.displayName):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype._processPendingRecords):
* UserInterface/Views/SourceCodeTimelineTreeElement.js:
(WebInspector.SourceCodeTimelineTreeElement):
* UserInterface/Views/TimelineIcons.css:
(.garbage-collection-profile-record .icon):
* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar.timeline-record-type-script.script-timeline-record-garbage-collected > .segment):
UI for GC events.
* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.createCombinedBars):
Simplify by storing start time into a variable.
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
Icon for GC events.
2015-10-02 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Fix indentation of console message parameters
https://bugs.webkit.org/show_bug.cgi?id=149740
Reviewed by Darin Adler.
* UserInterface/Views/ConsoleMessageView.css:
(.console-message .console-message-stack-trace-container > li):
(.console-message .console-message-extra-parameters-container > li::before):
2015-10-02 Andres Gomez <agomez@igalia.com>
[GTK] Web Inspector: Add GTK+ icons for new plus icons in the style sidebar
https://bugs.webkit.org/show_bug.cgi?id=149227
Reviewed by Carlos Garcia Campos.
* UserInterface/Images/gtk/NewTabPlus.svg: Updated.
* UserInterface/Images/gtk/Plus13.svg: Copied from Source/WebInspectorUI/UserInterface/Images/gtk/Plus.svg.
* UserInterface/Images/gtk/Plus15.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/Plus.svg.
2015-10-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Simplify filterableData processing
https://bugs.webkit.org/show_bug.cgi?id=149730
Reviewed by Timothy Hatcher.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.get filterableData):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter):
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype.get filterableData):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
* UserInterface/Views/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement.prototype.get filterableData):
(WebInspector.SearchResultTreeElement):
2015-10-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Do not immediately create all ProfileNodeTreeElements when showing JavaScript and Events timeline
https://bugs.webkit.org/show_bug.cgi?id=149726
Reviewed by Timothy Hatcher.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.shouldFilterPopulate):
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
We were populating during filtering if there were any custom filters.
However the TimelineSidebarPanel has custom filters (based on time and type)
but those don't need to trigger population. Delay population until it
would actually be needed (like a text search).
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.shouldFilterPopulate):
Do not populate on filter via this custom filters.
2015-10-01 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r189567): Toolbar collapses when inspector at minimum height with console open
https://bugs.webkit.org/show_bug.cgi?id=149725
Reviewed by Timothy Hatcher.
CSS Flexible Box Layout Module Level 1 introduces a new `auto` initial value for the min-{width|height}
of flex box items, breaking some areas of the inspector UI. This is fixed by setting a min-height of
zero for the #main <div>.
* UserInterface/Views/Main.css:
(#main):
2015-10-01 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Clip string previews
https://bugs.webkit.org/show_bug.cgi?id=149708
Only show first 140 characters in strings previews.
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Utilities.js:
(String.prototype.truncate): Added.
A smart trancate function that doesn't split words.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._shouldConsiderObjectLossless):
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
2015-09-30 João Oliveira <hello@jxs.pt>
Web Inspector: Adjust font size of Developer Tools using Command,+ or Command,-
https://bugs.webkit.org/show_bug.cgi?id=149590
Reviewed by Joseph Pecoraro.
Patch by João Oliveira and Brian Burg.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Add global keyboard shortcuts for zoom in and zoom out.
2015-10-01 Andres Gomez <agomez@igalia.com>
[GTK] Web Inspector: Add GTK+ icons for the numerical input and slider based Visual editors for CSS properties
https://bugs.webkit.org/show_bug.cgi?id=147847
Reviewed by Carlos Garcia Campos.
* UserInterface/Images/gtk/VisualStylePropertyLinked.svg: Added.
* UserInterface/Images/gtk/VisualStylePropertyUnlinked.svg: Added.
2015-10-01 Andres Gomez <agomez@igalia.com>
[GTK] Web Inspector: Add GTK+ icons for the different types of non-numerical Visual editors for CSS properties
https://bugs.webkit.org/show_bug.cgi?id=147846
Reviewed by Carlos Garcia Campos.
* UserInterface/Images/gtk/AUTHORS: Updated.
* UserInterface/Images/gtk/ClearBoth.svg: Added.
* UserInterface/Images/gtk/ClearLeft.svg: Added.
* UserInterface/Images/gtk/ClearRight.svg: Added.
* UserInterface/Images/gtk/CubicBezier.svg: Updated.
* UserInterface/Images/gtk/FloatLeft.svg: Added.
* UserInterface/Images/gtk/FloatRight.svg: Added.
* UserInterface/Images/gtk/FontStyleItalic.svg: Added.
* UserInterface/Images/gtk/FontStyleNormal.svg: Added.
* UserInterface/Images/gtk/FontVariantSmallCaps.svg: Added.
* UserInterface/Images/gtk/TextAlignCenter.svg: Added.
* UserInterface/Images/gtk/TextAlignJustify.svg: Added.
* UserInterface/Images/gtk/TextAlignLeft.svg: Added.
* UserInterface/Images/gtk/TextAlignRight.svg: Added.
* UserInterface/Images/gtk/TextDecorationLineThrough.svg: Added.
* UserInterface/Images/gtk/TextDecorationOverline.svg: Added.
* UserInterface/Images/gtk/TextDecorationUnderline.svg: Added.
* UserInterface/Images/gtk/TextTransformCapitalize.svg: Added.
* UserInterface/Images/gtk/TextTransformLowercase.svg: Added.
* UserInterface/Images/gtk/TextTransformUppercase.svg: Added.
* UserInterface/Images/gtk/VisualStyleNone.svg: Added.
2015-09-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reduce `delete` in Timeline related classes
https://bugs.webkit.org/show_bug.cgi?id=149686
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.capturingStopped):
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
(WebInspector.TimelineDataGrid.prototype._sort):
(WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.updateLayout):
(WebInspector.TimelineOverview.prototype._handleScrollEvent):
* UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeOutlineScrolled):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridScrolled):
* UserInterface/Views/ProbeSetDataGrid.js:
(WebInspector.ProbeSetDataGrid):
(WebInspector.ProbeSetDataGrid.prototype._teardownData):
Remove an unused member variable as well.
2015-09-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Thousands of timers fire after switching to JavaScript and Events timeline
https://bugs.webkit.org/show_bug.cgi?id=149682
Reviewed by Timothy Hatcher.
Setting the status element of a GeneralTreeElement was triggering a
TreeOutline.onchange event. For TreeOutlines with lots of tree elements
(JavaScript & Events with profile nodes) this could result in thousands
of onchange events that causes lots of unnecessary work and blocks
future timers (like scroll synchronization) from firing.
This change eliminates TreeOutline change events for tree element
changes that are not interesting.
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set status): Deleted.
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeElement.prototype.set tooltip): Deleted.
2015-09-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reduce `delete` in TreeElements and DataGridNodes
https://bugs.webkit.org/show_bug.cgi?id=149680
Reviewed by Timothy Hatcher.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement):
(WebInspector.BreakpointTreeElement.prototype._removeProbeSet):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._editingCommitted.moveToNextCell):
(WebInspector.DataGrid.prototype._editingCommitted):
(WebInspector.DataGrid.prototype._editingCancelled):
(WebInspector.DataGrid.prototype.removeColumn):
(WebInspector.DataGridNode.prototype.refreshIfNeeded):
(WebInspector.DataGridNode.prototype.refresh):
(WebInspector.DataGridNode.prototype.expand):
(WebInspector.DataGridNode.prototype.restorePosition):
(WebInspector.DataGridNode):
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.ondetach):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.refresh):
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeElement.prototype._fireDidChange):
(WebInspector.TreeElement.prototype.expand):
2015-09-30 Andres Gomez <agomez@igalia.com>
[GTK] Web Inspector: Add GTK+ icon for the Bezier curve visual editor
https://bugs.webkit.org/show_bug.cgi?id=147681
Reviewed by Joseph Pecoraro.
* UserInterface/Images/gtk/CubicBezier.svg: Added.
2015-09-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Console completion suggestions should include properties on Object (hasOwnProperty, toString, etc)
https://bugs.webkit.org/show_bug.cgi?id=149649
Reviewed by Darin Adler.
* UserInterface/Base/Utilities.js:
(value):
Since keySets in this instance are often used as hash maps with the
`in` operator, create a blank object that won't have Object.prototype
functions that would be seen by `in`.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames.compare):
Sort __defineGetter__ and __lookupGetter__ and friends last, since they
are rarely used properties.
2015-09-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Missing completions for Symbol objects, console.error warning
https://bugs.webkit.org/show_bug.cgi?id=149641
Reviewed by Darin Adler.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.getCompletions):
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
Include completions for symbol types.
2015-09-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Hitting ESC while editing element tag name leaves element in bad state
https://bugs.webkit.org/show_bug.cgi?id=149506
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._startEditingTagName.editingCancelled):
(WebInspector.DOMTreeElement.prototype._startEditingTagName):
When cancelling editing of a tag name, revert any changes we had
been making to the closing tag name.
2015-09-28 João Oliveira <hello@jxs.pt>
Web Inspector: search shortcut in split console moves focus to search box, but doesn't show caret
https://bugs.webkit.org/show_bug.cgi?id=149223
Reviewed by Timothy Hatcher.
When pressing console find shortcut (CMD+F) SearchBar now checks if there's text on _searchInput
if so text is selected, if the textbox is empty, textbox gains focus.
* UserInterface/Views/SearchBar.js:
(WebInspector.SearchBar.prototype.focus):
2015-09-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reloading the page causes the inspector tab to switch back to "Resources" tab
https://bugs.webkit.org/show_bug.cgi?id=148732
Reviewed by Darin Adler.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
Suppress selection of sibiling tree elements when removing extra folders.
2015-09-24 Ryosuke Niwa <rniwa@webkit.org>
Ran sort-Xcode-project-file.
* WebInspectorUI.xcodeproj/project.pbxproj:
2015-09-23 Saam barati <sbarati@apple.com>
Fix broken inspector tests.
Reviewed by Joseph Pecoraro and Brian Burg.
We can't redeclare a "let" variable and "var" variable using the same
identifier at the top-level of a function.
* UserInterface/Test/InspectorProtocol.js:
(InspectorProtocol.sendCommand):
(InspectorProtocol.addEventListener):
(InspectorProtocol.dispatchMessageFromBackend):
2015-09-23 Saam barati <sbarati@apple.com>
Web Inspector: Don't use bind() when creating internal AST, instead, pass in "this" parameter to map()
https://bugs.webkit.org/show_bug.cgi?id=149483
Reviewed by Joseph Pecoraro.
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):
2015-09-23 Saam barati <sbarati@apple.com>
Web Inspector: Type bubbles missing for computed methods and methods on object literals
https://bugs.webkit.org/show_bug.cgi?id=148562
Reviewed by Joseph Pecoraro.
This patch makes sure that computed methods are working
for both classes and object literals. Also, methods now
work on object literals. This patch also cleans up the
"isGetterOrSetter" and "getterOrSetterRange" fields.
Basically, we used this as a way to ask the type profiler
for the return types of a function. Now, we just have
a field called "typeProfilingReturnDivot" that is set
on all functions so we don't need to conditionally ask
if it's a getter or setter.
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeToken):
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.functionReturnDivot):
(WebInspector.ScriptSyntaxTree.prototype._recurseArray):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):
2015-09-22 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: The right sidebar always opens up on breakpoint
https://bugs.webkit.org/show_bug.cgi?id=149261
Reviewed by Timothy Hatcher.
Whenever the debugger was paused, the sidebar was being forced to open.
This has been removed in favor of letting the user decide.
* UserInterface/Base/Main.js:
(WebInspector._debuggerDidPause):
2015-09-22 Saam barati <sbarati@apple.com>
Web Inspector: [ES6] Improve Type Profiler Support for Arrow Functions
https://bugs.webkit.org/show_bug.cgi?id=143171
Reviewed by Joseph Pecoraro.
Esprima and JSC both support arrow functions. We just
need to support it in our AST and do the right things
to include support in the type profiler bits.
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeToken):
(WebInspector.TypeTokenAnnotator.prototype._translateToOffsetAfterFunctionParameterList.isLineTerminator):
(WebInspector.TypeTokenAnnotator.prototype._translateToOffsetAfterFunctionParameterList):
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype.containsNonEmptyReturnStatement.removeFunctionsFilter):
(WebInspector.ScriptSyntaxTree.prototype.containsNonEmptyReturnStatement):
(WebInspector.ScriptSyntaxTree.functionReturnDivot):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):
2015-09-22 Saam barati <sbarati@apple.com>
Web Inspector: update Esprima to latest version
https://bugs.webkit.org/show_bug.cgi?id=148960
Reviewed by Joseph Pecoraro.
Esprima version 2.6 further supports ES6. We're
updating to it so we can support more ES6 features
in our script syntax tree.
* UserInterface/External/Esprima/LICENSE:
* UserInterface/External/Esprima/esprima.js:
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):
2015-09-21 Matt Baker <mattbaker@apple.com>
Web Inspector: requestAnimationFrame continues to be called after stopping the timeline recording
https://bugs.webkit.org/show_bug.cgi?id=149390
Reviewed by Brian Burg.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._update):
Stop calling requestAnimationFrame if this._updating is false and recording end time is NaN.
2015-09-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Simplify some functional callbacks
https://bugs.webkit.org/show_bug.cgi?id=149333
Reviewed by Brian Burg.
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
* UserInterface/Models/Color.js:
(WebInspector.Color):
* UserInterface/Models/Geometry.js:
(WebInspector.CubicBezier.fromCoordinates):
* UserInterface/Models/ObjectPreview.js:
(WebInspector.ObjectPreview.fromPayload):
* UserInterface/Models/TypeDescription.js:
(WebInspector.TypeDescription.fromPayload):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.getCollectionEntries):
(WebInspector.RemoteObject.prototype.getCollectionEntries.): Deleted.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.get markers):
(WebInspector.TextEditor.prototype.markersAtPosition):
2015-09-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused canClearBrowserCookies / canClearBrowserCache protocol methods
https://bugs.webkit.org/show_bug.cgi?id=149307
Reviewed by Brian Burg.
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:
* Versions/Inspector-iOS-9.0.json:
Retroactively remove the protocol methods as they were unused
in these earlier versions as well.
2015-09-17 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION: Web Inspector: Double clicking on an attribute second time doesn't work
https://bugs.webkit.org/show_bug.cgi?id=149259
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
Be sure to clear the editing state when committed, even if the value did not change.
2015-09-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Make Find / Save keyboard shortcuts work better globally
https://bugs.webkit.org/show_bug.cgi?id=149198
Reviewed by Brian Burg.
Previously find/save keyboard shortcuts required the user have the
ContentView in the ContentBrowser focused. That means nothing would
happen if you clicked / focused in the Sidebars. This change considers
the keyboard shortcuts globally, like Copy.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Add global find and save keyboard shortcuts.
(WebInspector._focusChanged):
It is often useful to have the currentFocusedElement know if it is
in a TextEditor or other CodeMirror editor. When editable the <textarea>
is selected and not updating focused element.
(WebInspector._focusedContentBrowser):
(WebInspector._focusedContentView):
Provide helpers for getting a good approximation of the current focused
or visible content view that users would expect to be interacting with.
Since the focus event may not fire when clicking around to elements
like the <body>. Rather than make it explicitly focusable, check the
document.activeElement, and if it is body aim for the main content
browser instead of the currentFocusedElement which may be stale.
Likewise, if the QuickConsole is focused and the split console is
showing, treat it like the split browser is focused.
(WebInspector._focusedOrVisibleContentBrowser):
(WebInspector._focusedOrVisibleContentView):
If nothing is focused, default to the main content browser.
(WebInspector._find):
Pass on to the ContentView which typically handles Find
by showing its find banner.
(WebInspector._save):
(WebInspector._saveAs):
Check and save the current ContentView if supported.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.get supportsSearch):
(WebInspector.LogContentView.prototype.handleFindEvent):
Add custom find handling for LogContentView from the routed through the
BrowserController instead of special event handlers in the controller.
(WebInspector.LogContentView.prototype.get supportsSave):
(WebInspector.LogContentView.prototype.save): Deleted.
(WebInspector.LogContentView.prototype.saveAs): Deleted.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController): Deleted.
(WebInspector.JavaScriptLogViewController.prototype._handleFindShortcut): Deleted.
(WebInspector.JavaScriptLogViewController.prototype._save): Deleted.
(WebInspector.JavaScriptLogViewController.prototype._saveAs): Deleted.
Special save handling is no longer needed in the log view controller.
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.handleFindEvent):
(WebInspector.ContentBrowser): Deleted.
(WebInspector.ContentBrowser.prototype._save): Deleted.
(WebInspector.ContentBrowser.prototype._saveAs): Deleted.
(WebInspector.ContentBrowser.prototype._showFindBanner): Deleted.
Save functionality moved globally, find functionality moved to a
public method called like copy event handling.
2015-09-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Inactive window may cause many layers to be created due to Dashboard opacity
https://bugs.webkit.org/show_bug.cgi?id=149274
Reviewed by Brian Burg.
The dashboard container gets an opacity when the window is inactive. Combined
with the animating debugger continue button this caused a cascade of slightly
overlapping content causing a cascade of a lot of small layers. The simple
approach taken here is to stop the slight pulse animation when the window
is inactive.
* UserInterface/Views/DebuggerDashboardView.css:
(body.window-inactive .dashboard.debugger .navigation-bar .item.button > .glyph):
2015-09-17 Devin Rousso <dcrousso+webkit@gmail.com>
REGRESSION(r188427): Web Inspector: Extra whitespace left behind in styles sidebar after clicking in and out
https://bugs.webkit.org/show_bug.cgi?id=149197
Reviewed by Timothy Hatcher.
In r188427, logic was added to preserve the leading whitespace of styles in a CSS file.
An unfortunate side effect of this was that extra newlines in between CSS properties
were treated as valid and left where they were. This is undesired behaviour and often
clutters the styles sidebar. These changes remove the extra newlines.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):
2015-09-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reduce Annotation Update Frequency
https://bugs.webkit.org/show_bug.cgi?id=149250
Reviewed by Saam Barati.
* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype.insertAnnotations):
Set a lower bound of 500ms on update frequency for both annotators.
2015-09-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Fix common typo "supress" => "suppress"
https://bugs.webkit.org/show_bug.cgi?id=149199
Reviewed by Gyuyoung Kim.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.select):
(WebInspector.DataGridNode.prototype.deselect):
* UserInterface/Views/SearchBar.js:
(WebInspector.SearchBar):
2015-09-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Turn off line wrapping in resource text editors
https://bugs.webkit.org/show_bug.cgi?id=149121
Reviewed by Darin Adler.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
2015-09-15 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Picking unchanged for font-size does not reset back to the unchanged value
https://bugs.webkit.org/show_bug.cgi?id=148351
Reviewed by Brian Burg.
Visual number editors now save any new values in the special placeholder element
to display it whenever the "Unchanged" option is selected by the user.
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
(WebInspector.VisualStyleNumberInputBox.prototype.set units):
(WebInspector.VisualStyleNumberInputBox.prototype._setNumberInputIsEditable):
(WebInspector.VisualStyleNumberInputBox.prototype._keywordChanged):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown.adjustValue):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown):
2015-09-15 Brian Burg <bburg@apple.com>
Web Inspector: command-click in NewTabContentView should open new tab without switching to it
https://bugs.webkit.org/show_bug.cgi?id=149173
Reviewed by Joseph Pecoraro.
To allow a user to quickly restore tabs, it should be possible to command-click
all the tabs that are desired without going back through the [+] tab button.
* UserInterface/Base/Main.js:
(WebInspector.createNewTabWithType): Renamed.
Use an options object and split creating the tab from deleting the
replaced tab and showing the new tab. Add better error checking.
(WebInspector.createNewTab): Deleted.
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView):
(WebInspector.NewTabContentView.prototype._createNewTabWithType): Renamed.
If the meta key is pressed, don't switch to the new tab or remove this view
unless there are no more tabs that can be created beyond the current one.
(WebInspector.NewTabContentView.prototype._allowableTabTypes): Added.
(WebInspector.NewTabContentView.prototype._createNewTab): Deleted.
2015-09-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Watch Expressions uncaught exceptions on page reload
https://bugs.webkit.org/show_bug.cgi?id=149150
Reviewed by Brian Burg.
Instead of waiting 50ms to Resume, when the page navigates
Resume immediately. This ensures nobody is using a stale
activeCallFrame after the navigation.
Also clean up the manager a bit by removing some deletes.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.restoreBreakpointsSoon):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.debuggerDidResume):
(WebInspector.DebuggerManager.prototype._mainResourceDidChange):
(WebInspector.DebuggerManager.prototype._didResumeInternal):
(WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
(WebInspector.DebuggerManager.prototype.debuggerDidResume.delayedWork): Deleted.
2015-09-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Closing the final inspector tab should be allowed
https://bugs.webkit.org/show_bug.cgi?id=149130
Reviewed by Brian Burg.
Previously we did not allow closing the last inspector tab. Now, we
will allow closing all inspector tabs, and when the last is closed,
present an unclosable New Tab tab, which would then be used to create
a new tab.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
If we have no tabs to restore, show the New Tab tab.
(WebInspector._openDefaultTab):
When the last tab is closed, the tab bar requests we open a default tab.
Open the New Tab tab.
(WebInspector.TabBar.prototype._handleClick):
Disallow closing the single default tab.
(WebInspector._newTabItemClicked):
(WebInspector.showNewTabTab):
Share logic for showing the New Tab tab.
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView):
Mark the new tab's tab bar item as the "default" tab bar item. It gets
special behavior when it is the single normal tab (cannot be closed).
* UserInterface/Views/TabBar.css:
(body:not(.window-inactive) .tab-bar > .item:hover > .close):
(body:not(.window-inactive) .tab-bar.single-tab > .item.default-tab:hover > .close):
(.tab-bar.single-tab > .item.default-tab > .close):
(body:not(.window-inactive) .tab-bar:not(.single-tab) > .item:not(.hide-close-button):hover > .close): Deleted.
(.tab-bar > .item.hide-close-button > .close): Deleted.
Update styles to only disable the close button on the
"default-tab" when it is the "single-tab" open. Otherwise
always allow closing tabs.
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype.removeTabBarItem):
(WebInspector.TabBar.prototype.hasNormalTab):
(WebInspector.TabBar.prototype._openDefaultTab):
When removing the last normal tab, send an event to open
the default tab.
* UserInterface/Views/TabBarItem.js:
(WebInspector.TabBarItem.prototype.get default):
(WebInspector.TabBarItem.prototype.get isDefaultTab):
(WebInspector.TabBarItem.prototype.set isDefaultTab):
(WebInspector.TabBarItem.prototype.get hideCloseButton): Deleted.
(WebInspector.TabBarItem.prototype.set hideCloseButton): Deleted.
Switch to marking a tab bar item as the default tab. This tab
will be allowed when it is the single remaining tab. Currently
the default tab is always the "New Tab" tab.
2015-09-15 Brian Burg <bburg@apple.com>
Web Inspector: new tab content view should disallow split console
https://bugs.webkit.org/show_bug.cgi?id=149164
Reviewed by Joseph Pecoraro.
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView.prototype.get supportsSplitContentBrowser):
2015-09-14 Brian Burg <bburg@apple.com>
Web Inspector: tab bar stutters when moving mouse after closing tab
https://bugs.webkit.org/show_bug.cgi?id=149138
Reviewed by Joseph Pecoraro.
The tab bar lacked the 'static-layout' class between when the Promise microtask
ran and the beginning of the requestAnimationFrame. This caused a flash of
tabs that are way too wide.
Re-add the static-layout class immediately after measuring the 'after' tab size.
This code should probably just manually compute tab sizes since flexbox
layout is quite slow and our measurement code here forces layout several times.
* UserInterface/Views/TabBar.js:
2015-09-14 Brian Burg <bburg@apple.com>
Web Inspector: backend command promises are not rejected when a protocol error occurs
https://bugs.webkit.org/show_bug.cgi?id=141403
Reviewed by Joseph Pecoraro.
Fix a few corner cases for how InspectorBackend delivers command failures.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Command.prototype.deliverFailure): Added.
(InspectorBackend.Command.prototype._invokeWithArguments):
If argument-checking fails, return a rejected promise or invoke the supplied callback
on a zero-delay setTimeout to ensure that the reply is asynchronous.
2015-09-14 Brian Burg <bburg@apple.com>
Web Inspector: middle-clicking a tab in the tab bar should close it
https://bugs.webkit.org/show_bug.cgi?id=149135
Reviewed by Joseph Pecoraro.
This matches the behavior of the tab bar in Safari and other browsers.
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype._handleMouseDown):
(WebInspector.TabBar.prototype._handleClick):
2015-09-14 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Border under the styles filter field is clipped
https://bugs.webkit.org/show_bug.cgi?id=149115
Reviewed by Darin Adler.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content + .options-container > .filter-bar):
2015-09-11 Nan Wang <n_wang@apple.com>
AX: ARIA 1.1 @aria-current
https://bugs.webkit.org/show_bug.cgi?id=146012
Reviewed by Chris Fleizach.
Added support for ARIA 1.1 aria-current.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2015-09-10 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Styles sidebar says Media: all when it should say Media: screen
https://bugs.webkit.org/show_bug.cgi?id=148436
Reviewed by Timothy Hatcher.
Removed filter that prevented "Media: screen" from being displayed.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.filteredMediaList): Deleted.
2015-09-10 Matt Baker <mattbaker@apple.com>
Web Inspector: Prefer calling ContentViewContainer.updateLayout directly
https://bugs.webkit.org/show_bug.cgi?id=149041
Reviewed by Timothy Hatcher.
Cleaned up two places where a parent view duplicated logic encapsulated by ContentViewContainer.
* UserInterface/Views/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.updateLayout):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.updateLayout):
2015-09-08 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r189189): Missing breakpoint context menu for debugger sidebar tree elements
https://bugs.webkit.org/show_bug.cgi?id=148651
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Create BreakpointPopoverController singleton, expose as public property of global WebInspector object.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
Use BreakpointPopoverController singleton.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
Don't create BreakpointPopoverController instance.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
Use BreakpointPopoverController singleton.
2015-09-08 Joseph Pecoraro <pecoraro@apple.com>
Fix inspector/codemirror tests.
Rubber-stamped by Brian Burg.
* UserInterface/Test.html:
Reorder includes to be more like Main.html. This ensures that CodeMirror
resources are loaded before Inspector sources use it, like CodeMirrorAdditions
which gets merged into TestCombined.js.
2015-09-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Move PrettyPrinting tests into LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=148698
Reviewed by Timothy Hatcher.
* Tools/PrettyPrinting/index.html:
Modify the relative path to the tests which are now in LayoutTests.
* UserInterface/Test.html:
Load CodeMirror and related resources for Formatting.
2015-09-06 Andy Estes <aestes@apple.com>
WebKit.xcworkspace should be be able to build iOS platforms
https://bugs.webkit.org/show_bug.cgi?id=148881
Reviewed by Daniel Bates.
Since we don't want to create platform-specific schemes, all projects in the workspace's schemes need to build
for all supported platforms.
* Configurations/Base.xcconfig: Included iphoneos and iphonesimulator in SUPPORTED_PLATFORMS.
* Configurations/WebInspectorUIFramework.xcconfig: Skipped installing on iOS.
2015-09-04 Brian Burg <bburg@apple.com>
Web Inspector: combine Test.html resources to make tests run faster
https://bugs.webkit.org/show_bug.cgi?id=148726
Reviewed by Timothy Hatcher.
In an attempt to make inspector tests run faster, always combine resources
on the Test.html page. This cuts down from 110+ resource loads to 5 loads.
To avoid name clashes, add the 'Combined' suffix to files that would clash
with uncombined Test resources, and add the 'Test' prefix when combining
or minifying files that would clash with production minification. So, it
would be possible for Main.html and Test.html to have different minified
versions of CodeMirror or other external libraries if they use different
subsets.
Combining is unlikely to make debugging tests more difficult, since almost
all test code is marshalled and eval'd into existence anyway.
* Configurations/WebInspectorUIFramework.xcconfig:
* Scripts/combine-resources.pl: Drive-by spelling.
(concatenateFiles):
(concatinateFiles): Deleted.
* Scripts/copy-user-interface-resources-dryrun.rb:
* Scripts/copy-user-interface-resources.pl:
Drive-by spelling. Add a new code path for combining Test resources, which
doesn't require minification or handling CSS, images, or most externals.
* WebInspectorUI.vcxproj/build-webinspectorui.pl:
Always combine Test.html, but also ditto everything into place for
engineering builds.
2015-09-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Test Runtime.saveResult and $n values
https://bugs.webkit.org/show_bug.cgi?id=148837
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
Initialize the dump logging function different if we are in tests or not.
When in tests, using console.log as well as dumping system activity to
the system console results in an infinite loop of logging!
(InspectorBackendClass.prototype.dispatch):
(InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
Use the logging function we figured out earlier.
2015-09-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Clean up and modernize DOMTreeManager
https://bugs.webkit.org/show_bug.cgi?id=148821
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.requestDocument.onDocumentAvailable):
(WebInspector.DOMTreeManager.prototype.requestDocument):
(WebInspector.DOMTreeManager.prototype.pushNodeByPathToFrontend):
(WebInspector.DOMTreeManager.prototype._wrapClientCallback):
(WebInspector.DOMTreeManager.prototype._attributeModified):
(WebInspector.DOMTreeManager.prototype._attributeRemoved):
(WebInspector.DOMTreeManager.prototype._inlineStyleInvalidated):
(WebInspector.DOMTreeManager.prototype._loadNodeAttributes):
(WebInspector.DOMTreeManager.prototype.cancelSearch):
(WebInspector.DOMTreeManager.prototype.querySelector):
(WebInspector.DOMTreeManager.prototype.querySelectorAll):
(WebInspector.DOMTreeManager.prototype.highlightDOMNode):
(WebInspector.DOMTreeManager.prototype._buildHighlightConfig):
Cleanup and modernize where appropriate.
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.performSearch):
Callback is now required.
2015-09-04 Matt Baker <mattbaker@apple.com>
Web Inspector: Render Frames "Other" task filter checkbox misaligned with text
https://bugs.webkit.org/show_bug.cgi?id=148788
Reviewed by Timothy Hatcher.
* UserInterface/Views/ChartDetailsSectionRow.css:
(.details-section > .content > .group > .row.chart > .chart-content > .legend > .legend-item > label > .color-key):
Adjust "fake" checkbox margin to align with label text.
2015-09-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Expand Console domain test coverage
https://bugs.webkit.org/show_bug.cgi?id=148740
Reviewed by Brian Burg.
* UserInterface/Protocol/RemoteObject.js:
Add a few helpers for checking the RemoteObject type.
2015-09-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r189241.
https://bugs.webkit.org/show_bug.cgi?id=148703
These tests crash with assertions (Requested by ap on
#webkit).
Reverted changeset:
"Web Inspector: Move PrettyPrinting tests into LayoutTests"
https://bugs.webkit.org/show_bug.cgi?id=148698
http://trac.webkit.org/changeset/189241
2015-09-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Move PrettyPrinting tests into LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=148698
Reviewed by Timothy Hatcher.
* Tools/PrettyPrinting/index.html:
Modify the relative path to the tests which are now in LayoutTests.
* UserInterface/Test.html:
Load CodeMirror and related resources for Formatting.
2015-09-01 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r187873): Location column icon is missing in timeline data grids
https://bugs.webkit.org/show_bug.cgi?id=148691
Reviewed by Timothy Hatcher.