blob: e8ce5f631852f9abc2ff6ed8bbabcd2a3e583a0d [file] [log] [blame]
2016-01-11 Johan K. Jensen <jj@johanjensen.dk>
Web Inspector: Copying JS object output from console shouldn't include trailing '= $n'
https://bugs.webkit.org/show_bug.cgi?id=119347
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
2016-01-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add basic Content section to Visual Sidebar
https://bugs.webkit.org/show_bug.cgi?id=152972
Reviewed by Timothy Hatcher.
Since the "content" property has so many different types of values, a
simple text input editor should be added to provide some support for
the CSS property until a better, more specialized editor is created.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor):
Moved margin-left to new rule in VisualStylePropertyEditor.css.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
Adds the basic editor under the Text section in a new subsection
called Content.
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)):
Adds a left margin to property editors without a title.
2016-01-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual sidebar minor bug fixes
https://bugs.webkit.org/show_bug.cgi?id=152967
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.refresh):
Only update sections when it is not a significant change, as they are
updated when the selector changes.
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
Only reset links if the refresh is a significant change (node or selected
style changes).
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype.get value):
Removed unreachable return.
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown.adjustValue):
_updatedValues.propertyMissing was changed to _propertyMissing in a
prior patch.
2016-01-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Migrate Page Timeline recording to ScriptProfiler
https://bugs.webkit.org/show_bug.cgi?id=152727
Reviewed by Brian Burg.
* UserInterface/Images/TimelineRecordAPI.svg: Added.
* UserInterface/Images/gtk/TimelineRecordAPI.svg: Added.
New [S] image for API initiated script evaluations.
Display matches the existing [S] Script Evaluated.
Colors match the gray [N] Native image colors.
* UserInterface/Models/ScriptInstrument.js:
(WebInspector.ScriptInstrument.prototype.startInstrumentation):
(WebInspector.ScriptInstrument.prototype.stopInstrumentation):
(WebInspector.ScriptInstrument):
Use ScriptProfiler, if available, in Web debuggables.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.capturingStarted):
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._scriptProfilerTypeToScriptTimelineRecordType):
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingUpdated):
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords.let.nextRecord):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords.let.recordContainsRecord):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords):
When running a timeline on a web debuggable the frontend receives both
Timeline event records and ScriptProfiler events. Timeline (Web) records
are high level web events like "Script Evaluated", "Event Dispatched",
"Timer Fired". The timestamps for these records should always be wrapping
a ScriptProfiler event and its associated profile data. So, at the end
of a recording we merge ScriptProfiler profile data into the original
Timeline (Web) record.
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype.get profilePayload):
(WebInspector.ScriptTimelineRecord.prototype.set profilePayload):
(WebInspector.ScriptTimelineRecord.prototype.setProfilePayload): Deleted.
Replace method with getter/setter.
(WebInspector.ScriptTimelineRecord.EventType.displayName):
Add a new event type for API records, but share display name with Script Evaluated.
* UserInterface/Views/NavigationSidebarPanel.js:
Fix typo.
* UserInterface/Views/ScriptTimelineView.css:
(.timeline-view.script > .data-grid .eventType-column): Deleted.
There is no "eventType" column in the ScriptTimelineView datagrid, so remove styles.
* UserInterface/Views/TimelineIcons.css:
(.api-record .icon):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
For API Script Evaluation records use the new icon.
2016-01-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught Exception selecting IndexedDB host folder in Storage tab
https://bugs.webkit.org/show_bug.cgi?id=152943
Reviewed by Brian Burg.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
Another type of specialized folder tree element.
2016-01-10 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._scopeChain[i].object.deprecatedGetAllProperties')
https://bugs.webkit.org/show_bug.cgi?id=152944
<rdar://problem/24119827>
Reviewed by Brian Burg.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.prototype.collectScopeChainVariableNames):
Missed one place where `object` needed to change to `objects`.
Here the list will always contain a single object, only UI
generated scopes for the sidebar may have multiple objects.
2016-01-10 Johan K. Jensen <jj@johanjensen.dk>
Web Inspector: Dashboard log message count doesn't include console.time messages
https://bugs.webkit.org/show_bug.cgi?id=151280
Reviewed by Brian Burg.
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
Make Info and Debug levels increment the log count.
2016-01-09 Dan Bernstein <mitz@apple.com>
[Cocoa] Allow overriding the frameworks directory independently of using a staging install path
https://bugs.webkit.org/show_bug.cgi?id=152926
Reviewed by Tim Horton.
Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines
where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets
WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari.
Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces.
* Configurations/Base.xcconfig:
- Replace STAGED_FRAMEWORKS_SEARCH_PATH in FRAMEWORK_SEARCH_PATHS with
WK_OVERRIDE_FRAMEWORKS_DIR and add quotes to account for spaces.
* Configurations/WebInspectorUIFramework.xcconfig:
- Define INSTALL_PATH and PRODUCTION_FRAMEWORKS_DIR based on WK_OVERRIDE_FRAMEWORKS_DIR.
2016-01-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Test Resources should not be included in Production builds unless FORCE_TOOL_INSTALL
https://bugs.webkit.org/show_bug.cgi?id=152941
<rdar://problem/24119013>
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
Combine inspector resources in production, but not test resources.
* Configurations/DebugRelease.xcconfig:
Do not combine inspector resources in Release/Debug. Combine test resources.
* Configurations/WebInspectorUIFramework.xcconfig:
Simplify by moving to other config files.
* Scripts/copy-user-interface-resources.pl:
Have FORCE_TOOL_INSTALL combine test resources as well.
* WebInspectorUI.vcxproj/build-webinspectorui.pl:
Only combine test resources in non-Production.
2016-01-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Initiated section of Resource Details Sidebar should not display as empty and should update as the list changes
https://bugs.webkit.org/show_bug.cgi?id=152907
<rdar://problem/24109927>
Reviewed by Timothy Hatcher.
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.addInitiatedResource):
Dispatch an event when the list of initiated resources changes.
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
Add/remove event listeners for initiated resources changes to refresh
the related resources section.
(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
Show/hide the related resources section depending on if we have something or not.
2016-01-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught exception: TypeError: this._initiatorSourceCodeLocation.sourceCode.addInitiatedResource is not a function
https://bugs.webkit.org/show_bug.cgi?id=152905
<rdar://problem/24109809>
Reviewed by Brian Burg.
* UserInterface/Models/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.addInitiatedResource):
Only Resource has addInitiatedResource, so only call it if the
SourceCode in the SourceCodeLocation is a Resource.
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add warnings to section that require specific values of other properties
https://bugs.webkit.org/show_bug.cgi?id=148254
Reviewed by Timothy Hatcher.
Added a function to VisualStylePropertyEditor to allow dependencies to be set which,
whenever the editor is updated or changed, will be checked against the computed styles
of the element to see if all the necessary property values are set.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype.refresh):
(WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFlexboxSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateOutlineSection):
Added dependencies to relevant property editors.
(WebInspector.VisualStyleDetailsPanel.prototype._prepareForChange): Deleted.
No longer needed as the sidebar panel will refresh whenever triggered.
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container.layout-reversed > .visual-style-property-title):
(.visual-style-property-container > .visual-style-property-title > .property-reference-info):
(.visual-style-property-container > .visual-style-property-editor-warning):
(.visual-style-property-container.layout-reversed > .visual-style-property-editor-warning):
(.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency):
(.visual-style-property-container > .visual-style-property-value-container):
(.visual-style-property-container.layout-reversed > .visual-style-property-value-container):
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):
(WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
(WebInspector.VisualStylePropertyEditor.prototype.addDependency):
(WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
(WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
Looks at the computed style for the node to see if any dependent properties do not
have one of the required values.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem):
(WebInspector.VisualStyleSelectorSection.prototype._styleTextReset): Deleted.
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Allow error items on Exception page to be selected
https://bugs.webkit.org/show_bug.cgi?id=152861
Reviewed by Brian Burg.
* UserInterface/Debug/UncaughtExceptionReporter.css:
(.uncaught-exception-sheet li):
Allowed user-select on text.
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add border-image properties to Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=152755
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Switched the order of VisualStyleURLInput and VisualStyleUnitSlider
to be ordered alphabetically.
* UserInterface/Views/VisualStyleBackgroundPicker.js:
(WebInspector.VisualStyleBackgroundPicker.prototype._keywordSelectMouseDown):
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content > .group + .group > .row:first-child):
(.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.border .visual-style-property-container.keyword-checkbox.border-image-slice):
Since the checkbox is so small, give it less room.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection.generateBorderImagePropertyEditors):
The three properties "border-image-width", "border-image-outset", and
"border-image-slice" all have the same syntax, so one function to generate
the layout for all three is much simpler.
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
Added the border image properties to a seperate group under Background > Border.
* UserInterface/Views/VisualStyleKeywordPicker.js:
(WebInspector.VisualStyleKeywordPicker.prototype._keywordSelectMouseDown):
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype.set units):
Reordered logic to allow a value of ""/null to set the units to the "Number"
value if it is allowed for that editor.
(WebInspector.VisualStyleNumberInputBox.prototype.get synthesizedValue):
Instead of relying upon whether the editor has any units, just check to see if
the selected units are "Number" and, if not, add them to the value.
(WebInspector.VisualStyleNumberInputBox.prototype._unitsElementTextContent):
* UserInterface/Views/VisualStylePropertyCombiner.js:
(WebInspector.VisualStylePropertyCombiner):
Now has another argument that, when true, assumes the combiner has at least 4
numerical values and is of the form (can have units):
property-name: value1 [value2 [value3 [value4 [...]]]];
(WebInspector.VisualStylePropertyCombiner.prototype.get synthesizedValue):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
If the new argument is true, assigns the existing values in the following way:
- If there is 1 value, assign it to all of the editors.
- If there are 2 values, assign the 1st one to editors 1 and 3 and the 2nd one
to editors 2 and 4.
- If there are 3 values, assign the 1st one to editor 1, the 2nd one to editors
2 and 4, and the 3rd one to editor 3.
- If there are 4 or more values, assign them normally.
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedKeyword):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedKeyword):
Removed call to this.value to prevent recursion from VisualStyleNumberInputBox.
(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedUnit):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedUnit):
Removed call to this.units to prevent recursion from VisualStyleNumberInputBox.
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add indicator that element has pseudo-class in DOM tree
https://bugs.webkit.org/show_bug.cgi?id=152680
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement):
(WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
Added an event listener to the node for when pseudo-classes change.
* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline li.pseudo-class-enabled > .selection::before):
(.dom-tree-outline:focus li.selected.pseudo-class-enabled > .selection::before):
Used the hover/selected background style element to ensure that the indicator
is always positioned evenly with the first line of the opening tag.
(.dom-tree-outline li.hovered:not(.selected) .selection):
(.dom-tree-outline li .selection):
(.dom-tree-outline li.selected .selection):
(.dom-tree-outline li.elements-drag-over .selection):
Removed "display: none;" (as well as the "block" declarations) to allow
the ::before pseudo-element to display.
2016-01-07 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Make creating new rules in the Styles sidebar simpler
https://bugs.webkit.org/show_bug.cgi?id=152726
Reviewed by Timothy Hatcher.
When creating a new rules of any kind, first look to see if it already exists in
another rule that has no properties. If found, focus/select it instead of creating
a new rule. Otherwise, create the new rule like normal.
Also changed the way in which previously-focused sections/tree-items are saved
to rely upon the selector of the new rule and whether the section for that rule
is empty and an inspector rule.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.isInspectorRule):
Returns true if the style is an inspector rule.
(WebInspector.CSSStyleDeclaration.prototype.hasProperties):
Returns true if the style has CSS properties.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.rulesForSelector.ruleHasSelector):
(WebInspector.DOMNodeStyles.prototype.rulesForSelector):
Returns a list of CSSRule that match the given selector and are not
in media queries.
* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.commentAllProperties):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.cssStyleDeclarationSectionEditorFocused):
Now saves the newly focused section as the previously-focused section.
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNewInspectorRuleWithSelector):
Renamed from cssStyleDeclarationSectionFocusNextNewInspectorRule. Now needs
a selector argument.
(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
(WebInspector.RulesStyleDetailsPanel.prototype.sectionForStyle):
Returns the first section that has a style with matching selector.
(WebInspector.RulesStyleDetailsPanel.prototype.focusEmptySectionWithStyle):
Finds the section corresponding to the given style and, if empty, focuses it.
(WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
No longer clears the previously-focused section.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
(WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem):
(WebInspector.VisualStyleSelectorSection.prototype.update):
(WebInspector.VisualStyleSelectorSection.prototype.treeItemForStyle):
Returns the first tree item that has a style with matching selector.
(WebInspector.VisualStyleSelectorSection.prototype.selectEmptyStyleTreeItem):
Finds the tree item corresponding to the given style and, if empty, selects it.
(WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem):
Now requires a delegate object.
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2016-01-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CRASH Attempting to pause on CSP violation not inside of script
https://bugs.webkit.org/show_bug.cgi?id=152825
<rdar://problem/24021276>
Reviewed by Timothy Hatcher.
* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.expectThat):
(TestHarness.prototype.pass):
(TestHarness.prototype.fail):
Add a simple way to output a standard pass/fail message. These are
often nicer than expectThat(true, ...) or assert(false, ...).
2016-01-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: DOMContentLoaded label in the Timeline tab should be "DOM Content Loaded"
https://bugs.webkit.org/show_bug.cgi?id=152746
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.addMarker):
2016-01-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Scope chain shows too many scopes for functions (`let` and `var` in the same function are two scopes)
https://bugs.webkit.org/show_bug.cgi?id=152349
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Closure Variables (%s)" string for including the function name alongside
the closure scope section.
* UserInterface/Models/ScopeChainNode.js:
(WebInspector.ScopeChainNode):
(WebInspector.ScopeChainNode.prototype.get objects):
(WebInspector.ScopeChainNode.prototype.get object): Deleted.
Allow a ScopeChainNode to hold onto multiple RemoteObjects (for multiple JSScopes).
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Simplify the legacy case and convert "Local" to "Closure". The UI will now
determine and display "Local" where appropriate in a backwards compatible way.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
Associate ScopeChain nodes with CallFrame frames so that we can better combine
variable sections and better label closure sections.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
(.scope-chain .details-section > .content > .group > .row.properties:not(.empty)):
(.scope-chain .details-section > .content > .group > .row.properties:not(.empty):last-child):
Styles for two object trees property sections next to eachother.
2016-01-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add basic Animation section to Visual Sidebar
https://bugs.webkit.org/show_bug.cgi?id=152692
Reviewed by Timothy Hatcher.
Adds a non-autocompleting section to the "Effects" section (renamed from
"Animations") of the Visual sidebar for setting CSS Animation values.
* Scripts/copy-user-interface-resources.pl:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/AnimationPlayStatePaused.svg: Added.
* UserInterface/Images/AnimationPlayStateRunning.svg: Added.
* UserInterface/Main.html:
* UserInterface/Views/VisualStyleBasicInput.js: Added.
(WebInspector.VisualStyleBasicInput):
(WebInspector.VisualStyleBasicInput.prototype.get value):
(WebInspector.VisualStyleBasicInput.prototype.set value):
(WebInspector.VisualStyleBasicInput.prototype.get synthesizedValue):
(WebInspector.VisualStyleBasicInput.prototype._handleInputElementInput):
Very basic editor that is just an input box with a given placeholder.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAnimationSection):
Creates the necessary property editors and adds them to their respective rows.
2016-01-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add remaining background style properties to Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=152757
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
Added background-blend-mode and background-origin property editors.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype._handleMouseOver):
Unrelated error that occurred when the user was hovering over a selector item
before the tree outline was able to create the selected item.
2016-01-05 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION(r187929): Web Inspector: Forced Layout and Style Recalculation records do not show up in Layout & Rendering timeline DataGrid
https://bugs.webkit.org/show_bug.cgi?id=152747
Reviewed by Timothy Hatcher.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
We want top-level Layout records. Not necessarily Layout records that are
at the top of all records. Layout events such as style recalculation
and forced layout may be triggered by script and therefore not be at
the top of all records.
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Timelines view doesn't remember how I like to sort things
https://bugs.webkit.org/show_bug.cgi?id=152626
Reviewed by Joseph Pecoraro.
Currently, all instances of DataGrid have their sort column reset with each
open/close of Web Inspector. This doesn't really make sense seeing as we save
the user's settings in many other cases, so the sort method (which column)
should be saved between inspector sessions.
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.set sortColumnIdentifier):
Moved the logic for classLists and events to _updateSortedColumn.
(WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting):
Instead of just setting the original sort method when instantiating the DataGrid,
a WebInspector.Setting object is now able to be passed in via this setter
to give the DataGrid access to the stored sort method value.
(WebInspector.DataGrid.prototype._updateSortedColumn):
Updates the classLists and fires events. If a sort column setting object
exists, update its value.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add debounce to URL inputs in the Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=152655
Reviewed by Joseph Pecoraro.
Adding a debounce to url() based Visual sidebar editors will prevent needless
errors from being thrown as the user types, since incomplete URL's will not
be able to be located.
* UserInterface/Base/Utilities.js:
(Function.prototype.debounce):
Prevents the given function from executing more than once in the specified amount of time.
* UserInterface/Views/VisualStyleBackgroundPicker.js:
(WebInspector.VisualStyleBackgroundPicker):
* UserInterface/Views/VisualStyleURLInput.js:
(WebInspector.VisualStyleURLInput):
2016-01-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Fix debug context menu string and reload without cache tooltip string
https://bugs.webkit.org/show_bug.cgi?id=152725
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: add context menu items to switch CSS color property value syntax between RGB, HSL, etc
https://bugs.webkit.org/show_bug.cgi?id=151918
Reviewed by Timothy Hatcher.
Created a ColorSwatch class to hold all functionality for color swatches,
allowing all context menu and popover events to be centralized.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Models/Color.js:
Changed all 'var' to 'let' and 'nickname' to 'keyword' as per the spec.
Mostly mechanical changes.
(WebInspector.Color.prototype.isKeyword):
Looks at the RGB values of each keyword to see if the current color
matches any of them.
(WebInspector.Color.prototype.canBeSerializedAsShortHEX):
Fixed to account for alpha values, since HEXAlpha is now supported.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch): Deleted.
(@media (-webkit-max-device-pixel-ratio: 1)): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch > span): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:hover > span): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:active > span): Deleted.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked.updateCodeMirror.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked.updateCodeMirror): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked): Deleted.
* UserInterface/Views/ColorSwatch.css: Copied from Source/WebInspectorUI/UserInterface/Views/VisualStyleColorPicker.css.
(.color-swatch):
(@media (-webkit-max-device-pixel-ratio: 1)):
(.color-swatch > span):
(.color-swatch:hover > span):
(.color-swatch:active > span):
* UserInterface/Views/ColorSwatch.js: Added.
(WebInspector.ColorSwatch):
(WebInspector.ColorSwatch.prototype.get element):
(WebInspector.ColorSwatch.prototype.set color):
(WebInspector.ColorSwatch.prototype.get color):
(WebInspector.ColorSwatch.prototype._colorSwatchClicked):
(WebInspector.ColorSwatch.prototype._colorPickerColorDidChange):
(WebInspector.ColorSwatch.prototype._handleContextMenuEvent):
(WebInspector.ColorSwatch.prototype._getNextValidHEXFormat.hexMatchesCurrentColor):
(WebInspector.ColorSwatch.prototype._getNextValidHEXFormat):
Loops through the list of HEX formats to find the first format that is valid
for the current color in the list after the current format.
(WebInspector.ColorSwatch.prototype._updateSwatch):
* UserInterface/Views/VisualStyleColorPicker.css:
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch):
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch > span):
* UserInterface/Views/VisualStyleColorPicker.js:
(WebInspector.VisualStyleColorPicker):
(WebInspector.VisualStyleColorPicker.prototype._colorSwatchColorChanged):
(WebInspector.VisualStyleColorPicker.prototype._updateColorSwatch):
(WebInspector.VisualStyleColorPicker.prototype._colorSwatchClicked): Deleted.
(WebInspector.VisualStyleColorPicker.prototype._colorPickerColorDidChange): Deleted.
2016-01-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Mark last parameter of webkitGetUserMedia as non-optional to match updated IDL
https://bugs.webkit.org/show_bug.cgi?id=152702
Reviewed by Brian Burg.
* UserInterface/Models/NativeFunctionParameters.js:
New IDL, and tests, show that the error callback is non-optional.
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add context menu items to CSS selectors to auto-generate pseudo selectors
https://bugs.webkit.org/show_bug.cgi?id=152657
Reviewed by Timothy Hatcher.
Instead of having to copy a selector, create a new one, paste it, and then add
a pseudo class or element, a context menu item has been added to automate this
process for the user for each CSS pseudo-selector.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/CSSStyleManager.js:
Added a static object containing the list of CSS pseudo-element names.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addRule.completed):
(WebInspector.DOMNodeStyles.prototype.addRule.styleChanged):
(WebInspector.DOMNodeStyles.prototype.addRule.addedRule):
(WebInspector.DOMNodeStyles.prototype.addRule):
Now accepts a second argument for setting the starting text value of the new rule.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2016-01-04 Brian Burg <bburg@apple.com>
Web Inspector: add a DebugUI context menu item for saving inspector protocol traffic to file
https://bugs.webkit.org/show_bug.cgi?id=152671
Reviewed by Timothy Hatcher.
Add a new tracer that captures all messages, and debug context menu
items to control whether to capture protocol traffic and export it.
In later patches, a reciprocal "Import..." context menu item will
allow opening saved protocol traces and viewing them in a debug UI
content view for debugging/visualizing protocol traffic.
* UserInterface/Base/Main.js:
* UserInterface/Debug/CapturingProtocolTracer.js: Copied from Source/WebInspectorUI/UserInterface/Protocol/ProtocolTracer.js.
This tracer saves everything into a flat array. JSON protocol
messages are saved as escaped strings, in case they are not
valid JSON. We want to be able to debug such scenarios.
(WebInspector.CapturingProtocolTracer):
(WebInspector.CapturingProtocolTracer.prototype.get trace):
(WebInspector.CapturingProtocolTracer.prototype.logFrontendException):
(WebInspector.CapturingProtocolTracer.prototype.logProtocolError):
(WebInspector.CapturingProtocolTracer.prototype.logFrontendRequest):
(WebInspector.CapturingProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.CapturingProtocolTracer.prototype.logDidHandleEvent):
(WebInspector.CapturingProtocolTracer.prototype._stringifyMessage):
(WebInspector.CapturingProtocolTracer.prototype._processEntry):
* UserInterface/Debug/ProtocolTrace.js: Added.
This is a dumb container that holds protocol trace data. It will
be responsible for deserializing saved trace files in later work.
(WebInspector.ProtocolTrace):
(WebInspector.ProtocolTrace.prototype.addEntry):
(WebInspector.ProtocolTrace.prototype.get saveData):
* UserInterface/Main.html:
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
Simplify the implementation. Now there are one or two tracers
at any given time. The default tracer handles legacy logging
behavior and always exists. The custom tracer is installed when
the "Capture Protocol Traffic" context menu item is toggled.
Dispatch to the array of active tracers at each trace point.
Tracers now get the actual JSON message instead of a stringified
version passed as an argument.
(InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.set dumpInspectorTimeStats):
(InspectorBackendClass.prototype.set customTracer):
(InspectorBackendClass.prototype.get activeTracers):
(InspectorBackendClass.prototype._startOrStopAutomaticTracing):
(InspectorBackendClass.prototype._sendMessageToBackend):
(InspectorBackendClass.prototype._dispatchResponse):
(InspectorBackendClass.prototype._dispatchEvent):
(InspectorBackendClass.prototype.set activeTracer): Deleted.
(InspectorBackendClass.prototype.get activeTracer): Deleted.
* UserInterface/Protocol/LoggingProtocolTracer.js:
(WebInspector.LoggingProtocolTracer.prototype._processEntry):
(WebInspector.LoggingProtocolTracer):
(WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest):
(WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse):
(WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent):
(WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent):
* UserInterface/Protocol/ProtocolTracer.js:
(WebInspector.ProtocolTracer.prototype.logFrontendException):
(WebInspector.ProtocolTracer.prototype.logProtocolError):
(WebInspector.ProtocolTracer.prototype.logFrontendRequest):
(WebInspector.ProtocolTracer.prototype.logWillHandleResponse):
(WebInspector.ProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.ProtocolTracer.prototype.logWillHandleEvent):
(WebInspector.ProtocolTracer.prototype.logDidHandleEvent):
2016-01-04 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Comma separated values in the Visual sidebar are appended with )
https://bugs.webkit.org/show_bug.cgi?id=152653
Reviewed by Timothy Hatcher.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
Modified the RexExp used to split the comma separated value to account for strings
with commas inside parenthesis (such as rgba() or hsla()) as well as ones without
commas (such as "arial" and "red").
2016-01-03 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Visual sidebar selector section displays inherited section for non-editable rules
https://bugs.webkit.org/show_bug.cgi?id=152659
Reviewed by Brian Burg.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype.update):
Only add a new inherited section header if it will contain at least one inherited rule.
2016-01-02 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: List all resources that are initiated by the selected resource in the Network tab
https://bugs.webkit.org/show_bug.cgi?id=152647
Reviewed by Timothy Hatcher.
Selecting resources in the Network tab will now display a list of all resources
that the selected resource loaded, allowing for easier understanding of the
relationship between all the resources loaded on a page.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
Added functions to generate link(s) to Resource instead of SourceCodeLocation.
* UserInterface/Models/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.get initiatedResources):
(WebInspector.Resource.prototype.addInitiatedResource):
Each time a resource is added, if it has an initiator, it adds itself to the
initiator's list of initiated resources.
* UserInterface/Views/Main.css:
(.resource-list > .resource-link):
(.resource-list > .resource-link::before):
(.resource-list > .resource-link + .resource-link):
(.resource-link):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
2016-01-02 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Add list-style properties to Visual Sidebar
https://bugs.webkit.org/show_bug.cgi?id=152631
Reviewed by Timothy Hatcher.
Seeing as lists are very common in web pages across the internet, adding
a section to let users edit the properties unique to lists seems prudent.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/ListStylePositionInside.svg: Added.
* UserInterface/Images/ListStylePositionOutside.svg: Added.
* UserInterface/Main.html:
Re-added UserInterface/Views/VisualStyleURLInput.js
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateListStyleSection):
* UserInterface/Views/VisualStyleKeywordIconList.css:
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon):
Added specified color property to ensure that :active doesn't break the color of the svg.
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon:matches(.computed, .selected)):
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected):
Changed the background-color and border-color values to match the rest of Web Inspector.
* UserInterface/Views/VisualStyleKeywordIconList.js:
(WebInspector.VisualStyleKeywordIconList):
(WebInspector.VisualStyleKeywordIconList.dashToCapital): Deleted.
(WebInspector.VisualStyleKeywordIconList.createListItem):
The "initial" keyword will also use UserInterface/Images/VisualStyleNone.svg
* UserInterface/Views/VisualStyleURLInput.js: Added.
Previously removed in r192705.
2016-01-02 Alberto Garcia <berto@igalia.com>
[GTK] webkit 2.3.5 build failure with python 3.3.4
https://bugs.webkit.org/show_bug.cgi?id=128971
Reviewed by Michael Catanzaro.
Make sure that the stdin encoding is 'UTF-8' if using Python 3,
otherwise the build will break.
* Scripts/cssmin.py:
2016-01-01 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: shadow visual sidebar section can be confused with the box shadow section
https://bugs.webkit.org/show_bug.cgi?id=148107
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
Changed title of "Shadow" sub-section in "Background" to "Box Shadow".
2016-01-01 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: The Computed Styles Properties section shows warning icons and doesn't update if collapsed
https://bugs.webkit.org/show_bug.cgi?id=152609
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
If the CodeMirror instance is read-only, don't add any warning icons.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel):
(WebInspector.ComputedStyleDetailsPanel.prototype._handleCollapsedStateChanged):
The properties text editor will now refresh whenever the details section
becomes un-collapsed.
* UserInterface/Views/DetailsSection.js:
(WebInspector.DetailsSection.prototype.set collapsed):
Now fires an event with the current collapsed state as data.
2015-12-31 Matt Baker <mattbaker@apple.com>
Web Inspector: "No Filter Results" message overlaps Debugger sidebar sections
https://bugs.webkit.org/show_bug.cgi?id=150608
Reviewed by Brian Burg.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.showResourcesWithIssuesOnlyFilterFunction):
Style cleanup.
(WebInspector.DebuggerSidebarPanel):
Add breakpoints tree to the details section before adding Global Breakpoint
elements, since adding them will trigger filtering.
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
Simplified selection management between the various tree outlines.
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
Style cleanup.
(WebInspector.DebuggerSidebarPanel.prototype.get hasSelectedElement): Deleted.
Defer to the base class implementation.
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectCallStackContentTreeElements): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectBreakpointContentTreeElements): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectPauseReasonContentTreeElements): Deleted.
These are no longer needed, since the list of visible tree elements list can be used
to manage tree element selection is a more general way.
* UserInterface/Views/NavigationSidebarPanel.css:
Empty content placeholders are now inserted into the DOM as a sibling of the
tree that was filtered. As such, they can be a child of a details section, or
the sidebar's content element.
(.sidebar > .panel.navigation > .content .empty-content-placeholder):
Styles for all empty content placeholders.
(.sidebar > .panel.navigation > .content > .empty-content-placeholder):
Styles for empty content placeholders that fill the sidebar's content element.
(.sidebar > .panel.navigation > .content .message):
Styles for all empty content placeholders.
(.sidebar > .panel.navigation > .empty-content-placeholder): Deleted.
(.sidebar > .panel.navigation > .empty-content-placeholder > .message): Deleted.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
Track the tree outline which currently has a selection.
Manage a map of content placeholders
(WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype.get hasSelectedElement):
Check all visible content trees for a selected element.
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype.treeElementForRepresentedObject):
Check all visible content trees for the represented object.
(WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
No sidebars currently have more than one filterable content tree outline, but in
the future we will want to support this. Empty content placeholder visibility
is now done per tree outline.
(WebInspector.NavigationSidebarPanel.prototype.show):
Focus the tree outline that most recently had the selection, or the
first tree outline in the visible tree list, if it exists.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults.checkTreeOutlineForEmptyFilterResults):
Tree is considered filtered if no visible filterable tree elements are found.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
Check all visible trees that support filtering.
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
Support for filtering multiple content trees.
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
Check if the element's tree outline supports filtering, before applying filters.
(WebInspector.NavigationSidebarPanel.prototype._treeSelectionDidChange):
Update the selected tree outline.
(WebInspector.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded):
Create a new empty content placeholder element for the tree.
(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Deleted.
No longer used.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.get hasSelectedElement): Deleted.
Defer to the base class implementation.
2015-12-29 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Styling of invalid selector persists when changing the selected node
https://bugs.webkit.org/show_bug.cgi?id=152456
Reviewed by Brian Burg.
If the user changes the selector of a CSS rule to be invalid (e.g. having
a { or ; character), it is expected that the invalid indicator will be removed
once the user changes nodes or reverts the selector to its previous value.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header > .icon.toggle-able:hover):
(.style-declaration-section > .header > .icon.toggle-able:active):
(.style-declaration-section:not(.invalid-selector) > .header > .icon.toggle-able:hover): Deleted.
Added better :hover and :active styles.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
(WebInspector.CSSStyleDeclarationSection.prototype._handleIconElementClicked):
If the selector is invalid, simply refresh the section to regenerate the
original selector with correct content, specificity, and highlighting.
(WebInspector.CSSStyleDeclarationSection.prototype.get _hasInvalidSelector): Deleted.
Moved the state of the invalid selector to a member
variable instead of a DOM class.
(WebInspector.CSSStyleDeclarationSection.prototype._updateSelectorIcon):
Renamed from _markSelector for clarity.
* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item.selector-invalid > .icon:hover):
(.item.visual-style-selector-item.selector-invalid > .icon:active):
(.item.visual-style-selector-item.selector-invalid > .icon):
Added :hover and :active styles.
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem):
(WebInspector.VisualStyleSelectorTreeItem.prototype.onattach):
(WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector):
(WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleIconElementClicked):
(WebInspector.VisualStyleSelectorTreeItem.prototype._selectorChanged): Deleted.
Changed the names of a few functions to provide better
consistency across the classes in the Style sidebar.
2015-12-27 Brian Burg <bburg@apple.com>
Web Inspector: improve pre-filled bugzilla link on Uncaught Exception reporter sheet
https://bugs.webkit.org/show_bug.cgi?id=152402
Reviewed by Joseph Pecoraro.
Include the UA string, inspected page URL, and a template that includes
steps to reproduce and notes. Other common headings (regression, expected,
results, summary) are omitted because they are unlikely to be known when
an uncaught exception occurs, or are obvious ("shouldn't throw exception").
* UserInterface/Debug/UncaughtExceptionReporter.js:
2015-12-21 Nikita Vasilyev <nvasilyev@apple.com>
WebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithTypeAllowed is not a function
https://bugs.webkit.org/show_bug.cgi?id=152471
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector._updateNewTabButtonState):
Don't use arrow functions because of https://webkit.org/b/152497 "Arrow functions: 'this' isn't lexically bound"
2015-12-21 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Remove unused WebInspector.Object.removeAllListeners
https://bugs.webkit.org/show_bug.cgi?id=152474
Reviewed by Timothy Hatcher.
* UserInterface/Base/Object.js:
(WebInspector.Object.removeAllListeners): Deleted.
(WebInspector.Object.prototype.removeAllListeners): Deleted.
2015-12-20 Dan Bernstein <mitz@apple.com>
Remove unused setToolbarHeight
https://bugs.webkit.org/show_bug.cgi?id=152466
Reviewed by Darin Adler.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Protocol/InspectorFrontendHostStub.js:
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.setToolbarHeight): Deleted.
2015-12-19 Dan Bernstein <mitz@apple.com>
[Mac] WebKit contains dead source code for OS X Mavericks and earlier
https://bugs.webkit.org/show_bug.cgi?id=152462
Reviewed by Alexey Proskuryakov.
- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
that became uniform across all OS X versions as a result:
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Scripts/copy-user-interface-resources.pl: Removed code to delete Images/Legacy.
* UserInterface/Images/Legacy: Removed this empty directory.
2015-12-18 Matt Baker <mattbaker@apple.com>
Web Inspector: Make it possible to debug injected scripts when the Debug UI is enabled
https://bugs.webkit.org/show_bug.cgi?id=152445
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
Added function to check for debug UI.
* UserInterface/Base/Object.js:
Added notification for debug UI enabled state change.
* UserInterface/Base/Utilities.js:
(isWebInspectorInternalScript):
(isWebInspectorDebugScript):
Added functions to check for internal and debug inspector scripts.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager):
Maintain a list of inspector debug scripts, so that the manager can
add and remove them when the debug UI is enabled/disabled.
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
(WebInspector.DebuggerManager.prototype.reset):
Clear the list of inspector debug scripts.
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
Skip internal inspector scripts. Debug inspector scripts are tracked,
and an added event is dispatched if the debug UI is enabled.
(WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange):
Dispatch added/removed events for inspector debug scripts.
* UserInterface/Debug/Bootstrap.js:
(WebInspector.runBootstrapOperations):
Expose changes to the debug UI setting to the reset of the UI, by dispatching
a WebInspector.Notification.DebugUIEnabledDidChange event.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Only resolve inspector debug source locations when the debug UI is enabled.
* UserInterface/Test/Test.js:
Reimplemented debug UI check for tests. Always returns false.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
Removed check for inspector debug scripts. DebuggerManager filters scripts as needed.
(WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved):
Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved):
Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts.
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
Removed check for inspector debug scripts. DebuggerManager filters scripts as needed.
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove "local" scope type from the protocol
https://bugs.webkit.org/show_bug.cgi?id=152409
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CSS warning's fake CallFrame is not creating a valid payload
https://bugs.webkit.org/show_bug.cgi?id=152413
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
This attempts to create a CallFrame from a Console.CallFrame payload,
but this was missing the required functionName string parameter.
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Provide a way to distinguish a nested lexical block from a function's lexical block
https://bugs.webkit.org/show_bug.cgi?id=152361
Reviewed by Saam Barati.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
New "Block Variables" string.
* UserInterface/Models/ScopeChainNode.js:
New "Block" scope type, and update existing types.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Parse the protocol type to frontend types. Use the protocol generated enum.
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve names in Debugger Call Stack section when paused
https://bugs.webkit.org/show_bug.cgi?id=152398
Reviewed by Brian Burg.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Use a new fromPayload helper to construct the CallFrame and share code.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.functionNameFromPayload):
(WebInspector.CallFrame.programCodeFromPayload):
(WebInspector.CallFrame.fromDebuggerPayload):
(WebInspector.CallFrame.fromPayload):
Add a new way to construct a call frame. There are two kinds of
CallFrame payloads in the protocol:
- Debugger.CallFrame, this new path
- Console.CallFrame, the pre-existing path
2015-12-17 Brian Burg <bburg@apple.com>
Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting
https://bugs.webkit.org/show_bug.cgi?id=151635
Reviewed by Joseph Pecoraro.
Follow-up fix to stop double-logging everything.
* UserInterface/Protocol/LoggingProtocolTracer.js:
(WebInspector.LoggingProtocolTracer.prototype._processEntry):
2015-12-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve console.trace, make it more like console.assert and inline the message
https://bugs.webkit.org/show_bug.cgi?id=152352
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Trace" related strings.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.expand):
Since we auto-expand Trace messages for their Call Stack, don't also
auto-expand a single inner object, which may be big and push the
actual stack trace off the screen.
(WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):
Behave like Assert messages and absorb a message string, and include
extra arguments gracefully.
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
For expandable messages with simple extra arguments (console.trace with
primitives and backtrace, or console.assert with primitives and backtrace)
we were hiding the inline lossless previews and not showing them as a
bulleted list below. We can just keep the lossless previews inline in the
title, since they were only put there because they are small and lossless.
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
No need to hard code "console.trace()" in the clipboard.
* UserInterface/Views/ConsoleMessageView.css:
(.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider):not(.inline-lossless)):
(.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider)): Deleted.
Don't hide the inline lossless preview in the console message title when it is inline-lossless.
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.expand):
Do not allow expanding a loss-less preview.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add JSContext Script Profiling
https://bugs.webkit.org/show_bug.cgi?id=151899
Reviewed by Brian Burg.
Enable the Timeline tab for JSContext inspection. Currently only
JSContext inspection will use the ScriptProfiler domain, it will
be enabled for Page inspection in a follow-up.
First pass at the UI creates basic ScriptTimelineRecords for
ScriptProfiler events. At the end of recording, when profiles
are downloaded, it attaches profiles to the timeline records
and refreshes the Scripts timeline.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.defaultInstruments):
(WebInspector.TimelineManager.prototype.computeElapsedTime):
(WebInspector.TimelineManager.prototype.scriptProfilerIsTracking):
(WebInspector.TimelineManager.prototype._loadNewRecording):
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
(WebInspector.TimelineManager.prototype._resourceWasAdded):
(WebInspector.TimelineManager.prototype._garbageCollected):
(WebInspector.TimelineManager.prototype._addRecord): Deleted.
* UserInterface/Main.html:
* UserInterface/Models/Instrument.js:
(WebInspector.Instrument.startLegacyTimelineAgent):
* UserInterface/Models/ScriptInstrument.js:
(WebInspector.ScriptInstrument.prototype.startInstrumentation):
(WebInspector.ScriptInstrument.prototype.stopInstrumentation):
(WebInspector.ScriptInstrument):
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype.get profilePayload):
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.EventType.displayName):
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.refresh):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.sourceCodeTimelinesSupported):
(WebInspector.TimelineRecording.prototype.timelineForRecordType):
(WebInspector.TimelineRecording.prototype.addRecord):
* UserInterface/Protocol/ScriptProfilerObserver.js: Copied from Source/WebInspectorUI/UserInterface/Models/ScriptInstrument.js.
(WebInspector.ScriptProfilerObserver.prototype.trackingStart):
(WebInspector.ScriptProfilerObserver.prototype.trackingUpdate):
(WebInspector.ScriptProfilerObserver.prototype.trackingComplete):
(WebInspector.ScriptProfilerObserver):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
(WebInspector.ScriptTimelineView.prototype._processPendingRecords):
(WebInspector.ScriptTimelineView.prototype._scriptTimelineRecordRefreshed):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.isTabAllowed):
2015-12-17 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r193913): Popover covers completion suggestions
https://bugs.webkit.org/show_bug.cgi?id=152369
Reviewed by Timothy Hatcher.
* UserInterface/Views/Variables.css:
(:root):
Swap popover and tooltip z-index ordering.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION: Web Inspector: console.dir(...) should force allowing object expansion
https://bugs.webkit.org/show_bug.cgi?id=152328
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameter):
Propogate the force parameter down.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve copy of console messages with multiple arguments - console.log(obj1, obj2)
https://bugs.webkit.org/show_bug.cgi?id=152330
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
Copy the inner text of the extra arguments list as well, for
console messages with multiple objects. Rearrange the sections
that, if there is a stack trace it comes at the end after
multiple arguments. If there is no stack trace, include the
location info next to the top line, before multiple arguments.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve copy of console message containing Array and Map output
https://bugs.webkit.org/show_bug.cgi?id=152329
Reviewed by Timothy Hatcher.
Introduce a real space in the content instead of style specific
margins so the existing copy/paste mechanism (innerText)
will have spaces between index/key and value.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-name): Deleted.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeArrayIndexTreeElement):
* UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
(.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name): Deleted.
* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.titleFragment):
(WebInspector.ObjectTreeMapEntryTreeElement):
* UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeSetIndexTreeElement):
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Typing object literal in the console causes a parse error
https://bugs.webkit.org/show_bug.cgi?id=141737
Reviewed by Timothy Hatcher.
Provide a convenience in console evaluations for JSON object like input.
If the console input starts with '{' and ends with '}' wrap the input
in parenthesis to force evaluation as an expression.
For example, input "{a:1}" would be convenience wrapped to "({a:1})"
and produce the expected object. This helps avoid the unusual treatment
of "{a:1}" as program containing a labeled statement, which is often
not what the user expects. And in more realistic cases, like "{a:1, b:2}",
produce a SyntaxError.
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Detect and convenience wrap the given expression.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception View has undefined exception URL
https://bugs.webkit.org/show_bug.cgi?id=152327
Reviewed by Darin Adler.
* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleUncaughtException):
Use ErrorEvent's filename property, not url which is undefined.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: ReferenceError: Can't find variable: resolvedValue
https://bugs.webkit.org/show_bug.cgi?id=152326
Reviewed by Darin Adler.
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
This identifier is used later on, so assign it here.
2015-12-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Localize "global code" and "eval code" strings
https://bugs.webkit.org/show_bug.cgi?id=152313
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.fromPayload):
Localize the strings given to use from the backend.
2015-12-15 Matt Baker <mattbaker@apple.com>
Web Inspector: Convert Sidebar classes to use View
https://bugs.webkit.org/show_bug.cgi?id=152274
Reviewed by Brian Burg.
Updated Sidebar and SidebarPanel to inherit from View. Mostly mechanical changes.
Once the DetailsSection class family inherits from View (https://webkit.org/b/152269),
directly modifying a sidebar's 'contentView' element will rarely be necessary.
* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
Add/remove panels as subviews of the sidebar.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._filterDidChange):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildLayerInfoSection):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WebInspector.ProbeDetailsSidebarPanel.prototype.set inspectedProbeSets):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
* UserInterface/Views/SidebarPanel.js:
Inherit from View.
(WebInspector.SidebarPanel):
Replace the content element (the portion of the view excluding navigation
bars, filter bars, etc.) with a View object. A sidebar's content can be a mixture
of unwrapped DOM elements and View objects. For now, the content view's element
will be mutated directly, but once the DetailsSection class family inherits from
the View class the handling of details sections will be simplified.
(WebInspector.SidebarPanel.prototype.get contentView):
(WebInspector.SidebarPanel.prototype.shown):
(WebInspector.SidebarPanel.prototype.hidden):
(WebInspector.SidebarPanel.prototype.get contentElement): Deleted.
Replaced by WebInspector.SidebarPanel.prototype.get contentView.
* UserInterface/Views/StyleDetailsPanel.js:
Inherit from View.
(WebInspector.StyleDetailsPanel):
(WebInspector.StyleDetailsPanel.prototype.get element): Deleted.
Defer to View.element getter.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
2015-12-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Stack traces in console incorrectly show "(anonymous function)" for global code
https://bugs.webkit.org/show_bug.cgi?id=152280
Reviewed by Brian Burg.
* UserInterface/Images/Program.svg: Added.
* UserInterface/Images/gtk/Program.svg: Added.
Copied from TimelineRecordScriptEvaluated.svg.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame):
(WebInspector.CallFrame.prototype.get programCode):
Add a new property to check if this call frame is in program code.
(WebInspector.CallFrame.fromPayload):
Detect different sources of program code (global, eval, module).
* UserInterface/Views/CallFrameIcons.css:
(.program-icon .icon):
* UserInterface/Views/CallFrameView.js:
(WebInspector.CallFrameView.iconClassNameForCallFrame):
Give program code the [S] global script icon like in profiles.
2015-12-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Copy message from console with a stack trace does not include source code locations
https://bugs.webkit.org/show_bug.cgi?id=152270
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
When the the StackTrace was upgraded to a real collection of CallFrame
object's the CallFrame's got real SourceCodeLocation properties.
2015-12-13 Matt Baker <mattbaker@apple.com>
Web Inspector: Make TimelineOverview's graph container a subview
https://bugs.webkit.org/show_bug.cgi?id=152235
Reviewed by Brian Burg.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Create graph container subview.
(WebInspector.TimelineOverview.prototype._instrumentAdded):
Add overview to the graph container view.
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
Remove overview from the graph container view.
(WebInspector.TimelineOverview.prototype.layout):
No longer necessary to manually lay out overview graphs.
(WebInspector.TimelineOverview.prototype._needsLayout): Deleted.
Removed dead code.
2015-12-12 Matt Baker <mattbaker@apple.com>
Web Inspector: CodeMirrorTokenTrackingController handles symbols in class definitions incorrectly
https://bugs.webkit.org/show_bug.cgi?id=152218
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
Stop checking for object literal shorthand property if an open parenthesis is found.
This check became necessary with the introduction of ES6 class syntax.
* UserInterface/Views/CodeMirrorAdditions.js:
Use localState when available, to prevent passing a state that doesn't define a tokenize property.
2015-12-12 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION (r191613): Web Inspector: Can't type spaces when editing DOM nodes
https://bugs.webkit.org/show_bug.cgi?id=152173
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
Disable the keyboard shortcuts when they are created. They will be
enabled when the panel is shown / hidden. It doesn't really make sense
that these are on the sidebar panel instead of the tab, but things
will be changing in Timelines soon anyways so just fix this now.
2015-12-12 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: "Selected Element" should use sans-serif font, not monospace
https://bugs.webkit.org/show_bug.cgi?id=152212
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.css:
(.console-user-command.special-user-log > .console-message-text):
2015-12-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: When logging strings, detect stack traces and show them as StackTraceView
https://bugs.webkit.org/show_bug.cgi?id=149790
Reviewed by Timothy Hatcher.
* UserInterface/Models/StackTrace.js:
(WebInspector.StackTrace.isLikelyStackTrace): Added.
* UserInterface/Views/ConsoleMessageView.css:
(.console-message-extra-parameter .stack-trace):
Display stack trace view on the same line as a list bullet point from
console message extra parameter.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
Don't format with string substitutions for stack traces. E.g. there is
no need to replace %s with the next argument.
(WebInspector.ConsoleMessageView.prototype._isStackTrace): Added.
(WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
Detect stack traces and format them appropriately.
2015-12-10 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: debugger dashboard's switching arrows are positioned too close to the dashboard border
https://bugs.webkit.org/show_bug.cgi?id=151867
Reviewed by Timothy Hatcher.
* UserInterface/Views/DashboardContainerView.css:
(.dashboard-container .advance-arrow):
2015-12-10 Matt Baker <mattbaker@apple.com>
Web Inspector: debugger popover should have source location link when showing function source
https://bugs.webkit.org/show_bug.cgi?id=151866
Reviewed by Brian Burg.
Added source code location link to function popover header.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
Create source code location link from response payload.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
2015-12-10 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: [Meta] Unify z-index values in Inspector's CSS
https://bugs.webkit.org/show_bug.cgi?id=151978
Introduce CSS variables for z-index due to recurring issues with incorrectly overlapping elements.
From now on, all z-index values >= 64 must be defined as variables.
Values below 64 must not.
Reviewed by Timothy Hatcher.
* UserInterface/Views/Variables.css:
(:root):
Introduce z-index variables.
* UserInterface/Debug/UncaughtExceptionReporter.css:
(.sheet-container):
* UserInterface/Views/BoxModelDetailsSectionRow.css:
(.details-section .row.box-model .editing):
* UserInterface/Views/CompletionSuggestionsView.css:
(.completion-suggestions):
* UserInterface/Views/DashboardContainerView.css:
(.dashboard-container .advance-arrow):
* UserInterface/Views/DataGrid.css:
(.data-grid .resizer):
* UserInterface/Views/DetailsSection.css:
(.details-section > .header):
(.details-section .details-section > .header):
* UserInterface/Views/FindBanner.css:
(.find-banner):
(.find-banner > button.segmented:active):
* UserInterface/Views/Main.css:
(#docked-resizer):
(.message-text-view):
(.bouncy-highlight):
* UserInterface/Views/Popover.css:
(.popover):
* UserInterface/Views/Resizer.css:
(.resizer):
(.glass-pane-for-drag):
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > .scroll-container):
* UserInterface/Views/VisualStyleSelectorSection.css:
(.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider):
2015-12-09 Matt Baker <mattbaker@apple.com>
Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
https://bugs.webkit.org/show_bug.cgi?id=151876
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
Use root view singleton instead of creating it explicitly.
* UserInterface/Views/View.js:
(WebInspector.View):
(WebInspector.View.rootView):
Singleton root view access. Lazily create and return a view backed
by the document's body element.
(WebInspector.View.prototype.isDescendantOf):
(WebInspector.View.prototype.insertSubviewBefore):
(WebInspector.View.prototype.removeSubview):
(WebInspector.View.prototype.didMoveToWindow):
Notify the view when it becomes, or is no longer, descended from the root view.
(WebInspector.View.prototype.didMoveToParent):
Notify the view when it's added to, or removed from, a parent view.
(WebInspector.View._scheduleLayoutForView):
(WebInspector.View._cancelScheduledLayoutForView):
(WebInspector.View.prototype.makeRootView): Deleted.
No longer needed.
(WebInspector.View.prototype.didAttach): Deleted.
(WebInspector.View.prototype.didDetach): Deleted.
Replaced by didMoveToParent.
2015-12-09 Brian Burg <bburg@apple.com>
Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting
https://bugs.webkit.org/show_bug.cgi?id=151635
Reviewed by Timothy Hatcher.
When closing and reopening the inspector, the setting for whether
to dump protocol messages should be persisted. Otherwise, enabling
dumping from the debug-only UI will miss the initial flood of
messages that are processed when the Inspector loads initial data.
To support a persistent setting, and build some infrastructure for
more advanced uses of collected protocol messages, this patch adds
a new object to trace protocol events. It gets callbacks for each
and implements the console-dumping functionality previously baked in
to InspectorBackend.
In follow-up patches, other protocol tracers will be added to save
protocol data to disk, marshall it to a higher inspection level,
or provide more fine-grained control over what is logged.
This change moves Setting.js into the Base/ directory,
since it is used by Views, Models, and now Protocol classes.
* UserInterface/Base/Setting.js: Renamed from Source/WebInspectorUI/UserInterface/Models/Setting.js.
(WebInspector.Setting):
(WebInspector.Setting.prototype.get name):
(WebInspector.Setting.prototype.get value):
(WebInspector.Setting.prototype.set value):
* UserInterface/Main.html:
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
We still want to support the legacy way to enable dumping:
`InspectorBackend.dumpInspectorProtocolMessages = true`. This
is because some tests always use it, and it's easier to set this
flag in a custom Bootstrap.js file than to configure the Setting.
(InspectorBackendClass.prototype.set dumpInspectorTimeStats):
(InspectorBackendClass.prototype.get dumpInspectorTimeStats):
We still want to support the legacy way to enable dumping:
`InspectorBackend.dumpInspectorTimeStats = true`. This is
because MessageDispatcher checks this flag for its logging.
(InspectorBackendClass.prototype.set activeTracer):
(InspectorBackendClass.prototype.get activeTracer):
Set the active tracer, finalizing and removing any active tracer
if one exists. If removing a custom tracer (setting to null), then
re-sync activeTracer with the automatic tracing Setting.
(InspectorBackendClass.prototype.dispatch):
(InspectorBackendClass.prototype._startOrStopAutomaticTracing):
Sync the Setting with activeTracer. If an custom tracer is active,
don't replace it with the automatic logging tracer.
(InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
(InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
(InspectorBackendClass.prototype._sendMessageToBackend):
(InspectorBackendClass.prototype._dispatchResponse):
(InspectorBackendClass.prototype._dispatchEvent):
(InspectorBackendClass.prototype._flushPendingScripts):
* UserInterface/Protocol/LoggingProtocolTracer.js: Added.
(WebInspector.LoggingProtocolTracer):
(WebInspector.LoggingProtocolTracer.prototype.set dumpMessagesToConsole):
(WebInspector.LoggingProtocolTracer.prototype.get dumpMessagesToConsole):
(WebInspector.LoggingProtocolTracer.prototype.set dumpTimingDataToConsole):
(WebInspector.LoggingProtocolTracer.prototype.get dumpTimingDataToConsole):
(WebInspector.LoggingProtocolTracer.prototype.logFrontendException):
(WebInspector.LoggingProtocolTracer.prototype.logProtocolError):
(WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest):
(WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse):
(WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent):
(WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent):
(WebInspector.LoggingProtocolTracer.prototype._processEntry):
* UserInterface/Protocol/ProtocolTracer.js: Added.
(WebInspector.ProtocolTracer.prototype.logStarted):
(WebInspector.ProtocolTracer.prototype.logFrontendException):
(WebInspector.ProtocolTracer.prototype.logProtocolError):
(WebInspector.ProtocolTracer.prototype.logFrontendRequest):
(WebInspector.ProtocolTracer.prototype.logWillHandleResponse):
(WebInspector.ProtocolTracer.prototype.logDidHandleResponse):
(WebInspector.ProtocolTracer.prototype.logWillHandleEvent):
(WebInspector.ProtocolTracer.prototype.logDidHandleEvent): (WebInspector.ProtocolTracer.prototype.logFinished):
(WebInspector.ProtocolTracer):
* UserInterface/Test.html:
2015-12-09 Brian Burg <bburg@apple.com>
Web Inspector: zoom with Ctrl +/- doesn't work correctly when inspector is docked
https://bugs.webkit.org/show_bug.cgi?id=152076
Reviewed by Timothy Hatcher.
When computing the new width or height of the inspector, take the zoom level into
account. window.inner{Width,Height} are in document pixels, but we need to specify
device pixels to InspectorFrontendHost.
* UserInterface/Base/Main.js:
2015-12-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Workaround arrow function issue in TimelineOverviewGraph.js
https://bugs.webkit.org/show_bug.cgi?id=152031
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
Workaround an existing arrow function issue by moving off of arrow functions here.
2015-12-08 Matt Baker <mattbaker@apple.com>
Web Inspector: Add a hidden property to TreeOutline
https://bugs.webkit.org/show_bug.cgi?id=152014
Reviewed by Timothy Hatcher.
* UserInterface/Views/NavigationSidebarPanel.js:
Removed static property for "hidden" CSS class. No longer used.
(WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
Fixed bug in order of visibleTreeOutlines add/remove.
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline):
(WebInspector.TreeOutline.prototype.get hidden):
(WebInspector.TreeOutline.prototype.set hidden):
Added hidden property, set DOM element hidden attribute.
(WebInspector.TreeElement.prototype.set hidden):
Remove CSS class, set DOM element hidden attribute.
(WebInspector.TreeElement.prototype._attach):
(WebInspector.TreeElement.prototype.expand):
2015-12-08 Matt Baker <mattbaker@apple.com>
Web Inspector: Global Breakpoints should always be visible
https://bugs.webkit.org/show_bug.cgi?id=151066
Reviewed by Timothy Hatcher.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
Turn off filtering for Global Breakpoints elements.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
Allow filtering to be turned off for specific tree elements.
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
Make element visible if filtering suppressed.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
Visible elements with filtering disabled aren't considered when
showing/hiding the empty content placeholder.
2015-12-07 Brian Burg <bburg@apple.com>
Web Inspector: Uncaught Exception page should have better styles and handle more error cases
https://bugs.webkit.org/show_bug.cgi?id=151923
Reviewed by Timothy Hatcher.
Restructure the Uncaught Exception reporting page to act more like
a modal sheet. Distinguish between uncaught exceptions before and
after the frontend is initially loaded. If the frontend is loaded,
add a clickable link that dismisses the sheet and ignores the error.
If the inspector finished loading, then only show at most one
exception at a time, since subsequent interactions can cause spurious
errors when the sheet is active.
Split existing code into multiple functions so it's easier to follow.
Add miscellaneous guards against internal corruption and weird cases.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Store the flag on the global object
in case WebInspector becomes shadowed or otherwise unusable.
* UserInterface/Debug/UncaughtExceptionReporter.css: Renamed from Source/WebInspectorUI/UserInterface/Debug/CatchEarlyErrors.css.
(div.sheet-container):
(div.uncaught-exception-sheet):
(div.uncaught-exception-sheet a):
(div.uncaught-exception-sheet a:active):
(div.uncaught-exception-sheet h2):
(div.uncaught-exception-sheet h1 > img):
(div.uncaught-exception-sheet h2 > img):
(div.uncaught-exception-sheet dl):
(div.uncaught-exception-sheet dt):
(div.uncaught-exception-sheet dd):
(div.uncaught-exception-sheet ul):
(div.uncaught-exception-sheet li):
* UserInterface/Debug/UncaughtExceptionReporter.js: Renamed from CatchEarlyErrors.js.
(stopEventPropagation): Allow clicking whitelisted links on the sheet.
(blockEventHandlers):
(unblockEventHandlers):
(handleUncaughtException):
(dismissErrorSheet):
(createErrorSheet.insertWordBreakCharacters):
(createErrorSheet):
(handleLinkClick):
* UserInterface/Main.html:
* UserInterface/Protocol/MessageDispatcher.js:
(WebInspector.dispatchMessageFromBackend): Don't try to dispatch
messages from the backend when showing the error sheet. They will
probably fail, so suspend dispatching until the sheet is dismissed.
2015-12-06 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Regression (r192936) - changing selectors in the visual styles sidebar is broken
https://bugs.webkit.org/show_bug.cgi?id=151924
Reviewed by Brian Burg.
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
(WebInspector.VisualStyleSelectorSection.prototype._selectorChanged):
Now uses an event listener instead of an "onselect" function.
2015-12-06 Matt Baker <mattbaker@apple.com>
Web Inspector: Comparisons in setters should use the massaged value (" = x || 0/false/null/etc")
https://bugs.webkit.org/show_bug.cgi?id=151910
Reviewed by Timothy Hatcher.
Updated setters that use default values to convert falsy inputs to the default value
before compariing against the current value.
* UserInterface/Models/TimelineMarker.js:
(WebInspector.TimelineMarker.prototype.set time):
Assert new value is a number.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.set hidden):
(WebInspector.DataGridNode.prototype.set data):
Assert new value is of type object. Use shallowEqual compare before setting value.
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set classNames):
Use shallowEqual compare before setting value.
(WebInspector.GeneralTreeElement.prototype.set mainTitle):
(WebInspector.GeneralTreeElement.prototype.set subtitle):
(WebInspector.GeneralTreeElement.prototype.set status):
(WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.set startTime):
(WebInspector.TimelineOverview.prototype.set currentTime):
(WebInspector.TimelineOverview.prototype.set endTime):
(WebInspector.TimelineOverview.prototype.set scrollStartTime):
(WebInspector.TimelineOverview.prototype.set selectionStartTime):
Check current ruler selectionStartTime before setting value.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype.set zeroTime):
(WebInspector.TimelineOverviewGraph.prototype.set startTime):
(WebInspector.TimelineOverviewGraph.prototype.set endTime):
(WebInspector.TimelineOverviewGraph.prototype.set currentTime):
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler):
(WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
(WebInspector.TimelineRuler.prototype.set formatLabelCallback):
(WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
(WebInspector.TimelineRuler.prototype.set zeroTime):
(WebInspector.TimelineRuler.prototype.set startTime):
(WebInspector.TimelineRuler.prototype.set endTime):
(WebInspector.TimelineRuler.prototype.set secondsPerPixel):
(WebInspector.TimelineRuler.prototype.set selectionStartTime):
(WebInspector.TimelineRuler.prototype.set selectionEndTime):
(WebInspector.TimelineRuler.prototype.set duration): Deleted.
The ruler duration and "pinned" state are controlled by setting an end
time. Removed since it wasn't being used, and there shouldn't be two
ways to the exact same thing.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.set zeroTime):
(WebInspector.TimelineView.prototype.set startTime):
(WebInspector.TimelineView.prototype.set endTime):
2015-12-04 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r193486.
https://bugs.webkit.org/show_bug.cgi?id=151904
Causes Infinite Recursion in Timeline Recording (Requested by
JoePeck on #webkit).
Reverted changeset:
"Web Inspector: when a marked-dirty subview is attached to a
parent View, dirtyDescendantsCount gets out of sync"
https://bugs.webkit.org/show_bug.cgi?id=151876
http://trac.webkit.org/changeset/193486
2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught Exception with Reload shortcut in JSContext Inspector
https://bugs.webkit.org/show_bug.cgi?id=151896
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Do not implicitly prevent default on these keyboard shortcuts
so we can system beep if we do not do anything.
(WebInspector._reloadPage):
(WebInspector._reloadPageIgnoringCache):
Bail if there is no PageAgent without preventing default for
a beep system beep. Prevent default if we did something.
2015-12-04 Matt Baker <mattbaker@apple.com>
Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
https://bugs.webkit.org/show_bug.cgi?id=151876
Reviewed by Brian Burg.
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView.prototype._updateShownTabs):
Removed workaround added in https://bugs.webkit.org/show_bug.cgi?id=151594.
* UserInterface/Views/View.js:
(WebInspector.View._scheduleLayoutForView):
Always perform a synchronous layout when a view that isn't descended from the
root view schedules a layout.
2015-12-04 Brian Burg <bburg@apple.com>
Web Inspector: support runtime registration of tab type associations
https://bugs.webkit.org/show_bug.cgi?id=151594
Reviewed by Joseph Pecoraro.
We want to add special tabs that only exist in engineering builds
for debugging purposes. Though the relevant models and views can be
put in the Debug/ directory to exclude them from production builds,
there's no way to register tabs conditionally at runtime; tabs are
hardcoded.
This patch makes it possible to register new tab types at runtime.
First, WebInspector keeps a map of known, registered tab classes.
Details that were hardcoded before---whether to show in New Tab,
whether a tab can be instantiated given the active domains, UI text,
etc.---are now static methods on the base TabContentView or overidden
in its subclasses. Lastly, a public method allows code in Bootstrap.js
to register tabs at runtime. Doing so sends a notification so the
NewTabContentView can show the newly available tab item.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector.isTabTypeAllowed):
(WebInspector.knownTabClasses): Added, used by NewTabContentView.
(WebInspector._createTabContentViewForType): Renamed from _tabContentViewForType.
(WebInspector._rememberOpenTabs):
(WebInspector._updateNewTabButtonState):
(WebInspector._tryToRestorePendingTabs): Added.
Whenever a new tab is registered, try to restore pending tabs, since
an extra tab won't be added initially when production tabs are added.
But, it could have been saved in the Setting for opened tabs.
(WebInspector.showNewTabTab):
(WebInspector.isNewTabWithTypeAllowed):
(WebInspector.createNewTabWithType):
(WebInspector._tabContentViewForType): Deleted.
* UserInterface/Base/Object.js:
* UserInterface/Views/ConsoleTabContentView.js:
(WebInspector.ConsoleTabContentView):
(WebInspector.ConsoleTabContentView.tabInfo): Added.
* UserInterface/Views/DebuggerTabContentView.js:
(WebInspector.DebuggerTabContentView):
(WebInspector.DebuggerTabContentView.tabInfo): Added.
* UserInterface/Views/ElementsTabContentView.js:
(WebInspector.ElementsTabContentView):
(WebInspector.ElementsTabContentView.tabInfo): Added.
(WebInspector.ElementsTabContentView.isTabAllowed): Added.
* UserInterface/Views/NetworkTabContentView.js:
(WebInspector.NetworkTabContentView):
(WebInspector.NetworkTabContentView.tabInfo): Added.
(WebInspector.NetworkTabContentView.isTabAllowed): Added.
* UserInterface/Views/NewTabContentView.js:
Keep a list of shown tab items, so we don't have to query the DOM
to update enabled/disabled state. Put tree construction inside a
layout() override and dirty the view whenever known tab types change.
(WebInspector.NewTabContentView):
(WebInspector.NewTabContentView.tabInfo): Added.
(WebInspector.NewTabContentView.isEphemeral): Added.
(WebInspector.NewTabContentView.shouldSaveTab): Added.
(WebInspector.NewTabContentView.prototype.layout): Added.
(WebInspector.NewTabContentView.prototype._updateShownTabs): Added.
(WebInspector.NewTabContentView.prototype._allowableTabTypes):
(WebInspector.NewTabContentView.prototype._updateTabItems):
(WebInspector.NewTabContentView.prototype.get tabItemElements): Deleted.
* UserInterface/Views/ResourcesTabContentView.js:
(WebInspector.ResourcesTabContentView):
(WebInspector.ResourcesTabContentView.tabInfo): Added.
* UserInterface/Views/SearchTabContentView.js:
(WebInspector.SearchTabContentView):
(WebInspector.SearchTabContentView.tabInfo): Added.
(WebInspector.SearchTabContentView.isEphemeral): Added.
* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.isTabAllowed): Added.
(WebInspector.SettingsTabContentView.shouldSaveTab): Added.
* UserInterface/Views/StorageTabContentView.js:
(WebInspector.StorageTabContentView):
(WebInspector.StorageTabContentView.tabInfo): Added.
(WebInspector.StorageTabContentView.isTabAllowed): Added.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser.showTabForContentView):
Add a workaround for <https://webkit.org/b/151876>. This bug is
revealed by the changes to NewTabContentView in this patch.
* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView.isTabAllowed): Added.
(WebInspector.TabContentView.isEphemeral): Added.
(WebInspector.TabContentView.shouldSaveTab): Added.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView):
(WebInspector.TimelineTabContentView.tabInfo): Added.
(WebInspector.TimelineTabContentView.isTabAllowed): Added.
2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove untested and unused Worker inspection
https://bugs.webkit.org/show_bug.cgi?id=151848
Reviewed by Brian Burg.
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:
* Versions/Inspector-iOS-9.0.json:
Since this was untested in older releases as well, remove
the protocol interfaces for legacy versions.
2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Specifically Identify the Global Lexical Environment Scope
https://bugs.webkit.org/show_bug.cgi?id=151828
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
* UserInterface/Models/ScopeChainNode.js:
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
Include a new scope type and give it a localized string.
2015-12-03 Anders Carlsson <andersca@apple.com>
Remove Objective-C GC support
https://bugs.webkit.org/show_bug.cgi?id=151819
rdar://problem/23746991
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
2015-12-03 Matt Baker <mattbaker@apple.com>
Uncaught Exception in Web Inspector: TypeError: null is not an object (evaluating 'dataGridNode.element.classList')
https://bugs.webkit.org/show_bug.cgi?id=151790
Reviewed by Timothy Hatcher.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode):
(WebInspector.DataGridNode.prototype.get hidden):
(WebInspector.DataGridNode.prototype.set hidden):
Make hidden a property, so it can be set before the grid node's DOM element exists.
(WebInspector.DataGridNode.prototype.get selectable):
(WebInspector.DataGridNode.prototype.get element):
Add hidden style, if needed, when element is created.
* UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
(WebInspector.TreeOutlineDataGridSynchronizer):
Don't access the grid node's element directly, since it may not exist yet.
2015-12-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Handle YieldExpressions in the ScriptSyntaxTree
https://bugs.webkit.org/show_bug.cgi?id=151730
Reviewed by Brian Burg.
* UserInterface/Models/NativeFunctionParameters.js:
Add the Generator API.
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
Handle YieldExpressions.
2015-12-01 Matt Baker <mattbaker@apple.com>
Web Inspector: TreeOutline should just dispatch events via WebInspector.Object
https://bugs.webkit.org/show_bug.cgi?id=148067
Reviewed by Timothy Hatcher.
TreeOutline now dispatches most events via WebInspector.Object. The onselect and
ondeselect callbacks are replaced by a SelectionDidChange event, which includes
both the selected and deselected elements in its event data. The onexpand and oncollapse
callbacks are replaced by an ElementDisclosureDidChange event. This is consistent with the
behavior of onhidden, which had no corresponding onvisible callback.
Alas, TimelineView and TreeOutlineDataGridSynchronizer depended on the order in which
TreeOutline.onselect callbacks were chained together. The synchronizer added its
callback after the timeline view, which ensured that the tree and grid were in sync
before the view handled onselect and dispatched a SelectionPathComponentsDidChange.
The change notification causes the view's path components to be read, and timeline
views need the grid selection to be in a valid state to build path components.
This is addressed by having timeline views dispatch SelectionPathComponentsDidChange
events when the grid selection changes, instead of the tree selection. The change
required that the synchronizer no longer suppress notifications when selecting grid nodes.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype._treeSelectionDidChange):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Deleted.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementAdded):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementDisclosureDidChange):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler): Deleted.
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler): Deleted.
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel):
(WebInspector.SearchSidebarPanel.prototype._treeSelectionDidChange):
(WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Deleted.
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel._treeSelectionDidChange):
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._createPopoverContent):
(WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange):
(WebInspector.TimelineDataGrid):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype._recordingsTreeSelectionDidChange):
(WebInspector.TimelineSidebarPanel.prototype._timelinesTreeSelectionDidChange):
(WebInspector.TimelineSidebarPanel.prototype._timelinesTreeElementSelected): Deleted.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype._treeSelectionDidChange):
(WebInspector.TimelineView.prototype.treeElementSelected):
Don't dispatch SelectionPathComponentsDidChange. Timeline views already do this
in response to grid selection events.
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline.prototype.appendChild):
(WebInspector.TreeOutline.prototype.insertChild):
(WebInspector.TreeOutline.prototype.removeChildAtIndex):
(WebInspector.TreeOutline.prototype.removeChildren):
(WebInspector.TreeOutline.prototype.removeChildrenRecursive):
(WebInspector.TreeOutline.prototype._treeElementDidChange):
(WebInspector.TreeElement.prototype.set hidden):
(WebInspector.TreeElement.prototype.collapse):
(WebInspector.TreeElement.prototype.expand):
(WebInspector.TreeElement.prototype.select):
(WebInspector.TreeElement.prototype.deselect):
(WebInspector.TreeElement.prototype.get childrenListElement): Deleted.
Removed dead code.
* UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
(WebInspector.TreeOutlineDataGridSynchronizer):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeSelectionDidChange):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementDisclosureDidChange):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onadd): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onremove): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onexpand): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.oncollapse): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onhidden): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onselect): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed): Deleted.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged): Deleted.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeSelectionDidChange):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeElementSelected): Deleted.
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Timestamp in Tooltip of Event Markers is incorrect
https://bugs.webkit.org/show_bug.cgi?id=151722
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.addMarker):
Convert the marker's time, to be relative to the start of the recording.
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed common typo fix "occurance" => "occurrence".
* Scripts/combine-resources.pl:
(concatenateFiles):
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline tab after reloading the page
https://bugs.webkit.org/show_bug.cgi?id=151530
Reviewed by Timothy Hatcher.
If reloading the page caused the console to clear, that was triggering
the console prompt to be focused. When the console prompt is focused,
keyboard input like Spacebar, was just inputing characters instead of
triggering the keyboard shortcut that was expected.
This also means that console.clear() in the inspected page would cause
the inspector to focus the console. That is unexpected as well.
Focusing the console prompt whenever the console log is cleared
is not ideal. If we do want to focus the prompt the caller should
make that determination, not clear.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.clear):
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update Timeline UI based on the Instruments in the Active Recording
https://bugs.webkit.org/show_bug.cgi?id=151374
Reviewed by Brian Burg.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
Modernize as I was in this code while looking into this patch.
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted.
(.sidebar > .panel.navigation.timeline > .timelines-content): Deleted.
These defaults are no longer necessary, the UI overrides them anyways.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
Include both the basic and rendering frames toolbars. They will be
mutually exclusive based on if the FPSIntrument is available.
(WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
(WebInspector.TimelineSidebarPanel.prototype._clearInstruments):
When loading a new Recording clear the UI.
(WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
(WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
(WebInspector.TimelineSidebarPanel.prototype._addedFPSInstrument):
(WebInspector.TimelineSidebarPanel.prototype._removedFPSInstrument):
Handle toggling the toolbars when the FPS instrument is added/removed.
(WebInspector.TimelineSidebarPanel.prototype._timelineCountChanged):
(WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
Properly update the sidebar's understanding of the TimelineOverview size.
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Initial support for variable timelines
https://bugs.webkit.org/show_bug.cgi?id=151372
Reviewed by Brian Burg.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.defaultInstruments):
(WebInspector.TimelineManager.prototype._loadNewRecording):
Keep the status quo which is the same set of instruments for each recording.
(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.stopCapturing):
Push responsibility of capturing to the Recording, which has a specific set
of instruments that know what they need to turn on an off from the backend.
* UserInterface/Main.html:
* UserInterface/Models/Instrument.js: Added.
(WebInspector.Instrument):
(WebInspector.Instrument.startLegacyTimelineAgent):
(WebInspector.Instrument.stopLegacyTimelineAgent):
(WebInspector.Instrument.prototype.get timelineRecordType):
(WebInspector.Instrument.prototype.startInstrumentation):
(WebInspector.Instrument.prototype.stopInstrumentation):
New class representing something that can be turned on and off
from the backend and produces a set of Timeline record types.
Currently instruments are 1-to-1 to a Timeline type.
* UserInterface/Models/LayoutInstrument.js: Added.
(WebInspector.LayoutInstrument.prototype.get timelineRecordType):
(WebInspector.LayoutInstrument):
* UserInterface/Models/NetworkInstrument.js: Added.
(WebInspector.NetworkInstrument.prototype.get timelineRecordType):
(WebInspector.NetworkInstrument.prototype.startInstrumentation):
(WebInspector.NetworkInstrument.prototype.stopInstrumentation):
(WebInspector.NetworkInstrument):
* UserInterface/Models/ScriptInstrument.js: Added.
(WebInspector.ScriptInstrument.prototype.get timelineRecordType):
(WebInspector.ScriptInstrument):
The default set of instruments. Currently they all enable the TimelineAgent,
so they share code to enable/disable in the base class to avoid duplication.
* UserInterface/Models/FPSInstrument.js: Added.
(WebInspector.FPSInstrument):
(WebInspector.FPSInstrument.supported):
(WebInspector.FPSInstrument.prototype.get timelineRecordType):
Provide a "supported" static method and simplify other code that
checks whether or not RenderingFrames is available or not.
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.get displayName): Deleted.
(WebInspector.Timeline.prototype.get iconClassName): Deleted.
Move these to a View class, as this is primarily View logic.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.get instruments):
(WebInspector.TimelineRecording.prototype.start):
(WebInspector.TimelineRecording.prototype.stop):
(WebInspector.TimelineRecording.prototype.timelineForInstrument):
(WebInspector.TimelineRecording.prototype.addInstrument):
(WebInspector.TimelineRecording.prototype.removeInstrument):
(WebInspector.TimelineRecording.prototype.addEventMarker):
(WebInspector.TimelineRecording.prototype.addTimeline): Deleted.
(WebInspector.TimelineRecording.prototype.removeTimeline): Deleted.
A recording now has a set of Instruments and its own start/stop
which starts/stops its set of Instruments! Treat Instruments as
the variable property of a Recording instead of Timelines.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._instrumentAdded):
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
(WebInspector.TimelineOverview.prototype._timelineAdded): Deleted.
(WebInspector.TimelineOverview.prototype._timelineRemoved): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
(WebInspector.TimelineRecordingContentView.prototype._instrumentRemoved):
(WebInspector.TimelineRecordingContentView.prototype._timelineAdded): Deleted.
(WebInspector.TimelineRecordingContentView.prototype._timelineRemoved): Deleted.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.displayNameForTimeline):
(WebInspector.TimelineSidebarPanel.iconClassNameForTimeline):
(WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection):
(WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
(WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
(WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
(WebInspector.TimelineSidebarPanel.prototype._timelineAdded): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._timelineRemoved): Deleted.
Update all TimelineAdded/TimelineRemoved clients to instead check
InstrumentAdded/InstrumentRemoved. Immediately convert from an Instrument
to a Timeline to keep the patch simple.
2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Broken Inspector when resources are minified
https://bugs.webkit.org/show_bug.cgi?id=151711
Reviewed by Timothy Hatcher.
* Scripts/combine-resources.pl:
(concatenateFiles):
Provide a way to just strip resources matches a pattern.
* Scripts/copy-user-interface-resources.pl:
Strip "Debug/" resources before combining / minifying others.
* UserInterface/Views/View.js:
(WebInspector.View.prototype.makeRootView):
(WebInspector.View.prototype.didDetach):
Address warnings from the console.assert stripping phase
for console.assert statements lacking a trailing semicolon.
2015-11-30 Brian Burg <bburg@apple.com>
Web Inspector: show something useful when the inspector frontend fails to load
https://bugs.webkit.org/show_bug.cgi?id=151643
Reviewed by Timothy Hatcher.
When a parse error or other early error happens before the inspector
is fully loaded, we can't use the second-level inspector to tell what's
going on. It would be better to catch any early errors and list them.
This patch adds an error page that shows the early errors that happened
during loading. It provides a list of errors, a link to reload the
inspector, and a link to submit a pre-filled bug report about the error.
For now, this page only shows up in engineering builds because it's
located in the Debug/ directory. We can move it later when it works
better in all cases. Follow-up patches can address smaller issues,
such as the transparent title bar and broken text selection.
* UserInterface/Debug/CatchEarlyErrors.css: Added.
* UserInterface/Debug/CatchEarlyErrors.js: Added.
* UserInterface/Main.html:
* UserInterface/Main.js: Abort setting up the UI if something happened.
2015-11-30 Brian Burg <bburg@apple.com>
Web Inspector: delete-by-word and similar shortcuts should add text to the WebCore kill ring
https://bugs.webkit.org/show_bug.cgi?id=151312
Reviewed by Darin Adler.
Add support for other kill ring-eligible keybindinsg, such as
deleting by word, group, or line forwards and backwards.
* UserInterface/Controllers/CodeMirrorTextKillController.js:
(WebInspector.CodeMirrorTextKillController):
(WebInspector.CodeMirrorTextKillController.prototype._handleTextKillCommand): Renamed from _handleKillLine.
Parameterize the function so it can handle any keybinding and
command. Take a kill ring insertion mode argument, too.
(WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
Add some special casing for changes received from Delete Line
(Cmd-D) so the right text is added to the kill ring. Thread the
kill ring insertion mode to the frontend host call.
(WebInspector.CodeMirrorTextKillController.prototype._handleKillLine): Deleted.
2015-11-29 Brian Burg <bburg@apple.com>
Web Inspector: Add context menu item to Reload the Inspector
https://bugs.webkit.org/show_bug.cgi?id=141742
Reviewed by Timothy Hatcher.
Add a global context menu and global shortcut (Cmd-Opt-Shift-R) to
reload the Web Inspector frontend without closing the browser.
This should make it possible to more quickly fix typos, small nits,
etc. without having to relaunch. It might also make state
restoration bugs more visible in engineering builds, since there
is hardly any delay between seeing the old and reloaded frontends.
Note that this functionality reloads scripts from the configuration's
build directory, so you still need to "build" WebInspectorUI to ensure
that any changed files are properly minified and staged.
* UserInterface/Base/Main.js:
(WebInspector.unlocalizedString):
Added. Make it obvious when strings are intentionally not localized.
(WebInspector._contextMenuRequested):
If the "Show Debug UI" setting is available and true, add
a global "Reload Web Inspector" menu item to every context
menu. Otherwise, don't eagerly create a context menu.
* UserInterface/Debug/Bootstrap.js: Add Cmd-Opt-Shift-R shortcut.
2015-11-29 Brian Burg <bburg@apple.com>
Web Inspector: allow multiple UI components to add menu items upon getting a "contextmenu" event
https://bugs.webkit.org/show_bug.cgi?id=151629
Reviewed by Timothy Hatcher.
The existing Context Menu system assumes that only one UI component
will need to provide context menu items. But in some scenarios, there
are multiple UI components that could provide relevant menu items. For
example, right-clicking on an DOM element in the console should show
menu items relevant to 1) the DOM element, 2) the console in general,
and 3) global menu items. Existing code shows menu items provided by
the first object that handles the event and calls ContextMenu.show().
This patch changes behavior so that a context menu can be built up
by multiple 'contextmenu' event handlers. A ContextMenu instance is
hidden on the 'contextmenu' event object; client code calls a
factory method that digs out this existing context menu or creates a
new one as needed. To actually show the context menu through the
InspectorFrontendHost methods, the top-level app controller adds a
bubbling listener for 'contextmenu' and shows the event's context
menu if one has been created.
Along the way, do some cleanup. Do s/var/let/, arrowize some functions,
use Array.{map,some}, and simplify some other code as a result.
No new tests yet, since we can't trigger context menu easily from
an inspector test. All affected context menus were manually verified.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
* UserInterface/Views/CSSStyleDeclarationSection.js:
* UserInterface/Views/ContextMenu.js:
(WebInspector.ContextMenuItem.prototype._buildDescriptor):
(WebInspector.ContextMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendItem):
(WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
(WebInspector.ContextSubMenuItem.prototype._pushItem):
(WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
(WebInspector.ContextSubMenuItem):
(WebInspector.ContextMenu.createFromEvent):
(WebInspector.ContextMenu.prototype.show):
(WebInspector.ContextMenu.prototype.handleEvent):
(WebInspector.ContextMenu.prototype._buildDescriptor):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.removeAllResourceBreakpoints): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.toggleAllResourceBreakpoints): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
(WebInspector.ObjectPreviewView):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.continueToLocation): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.addBreakpoint): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.removeBreakpoints): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.toggleBreakpoints): Deleted.
* UserInterface/Views/TabBarItem.js:
(WebInspector.TabBarItem.prototype._handleContextMenuEvent):
(WebInspector.TabBarItem):
(WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeTab): Deleted.
(WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeOtherTabs): Deleted.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar):
(WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar.toggleReplayInterface): Deleted.
* UserInterface/Views/Toolbar.js:
(WebInspector.Toolbar.prototype._handleContextMenuEvent):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2015-11-28 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Styles sidebar placeholder is misaligned
https://bugs.webkit.org/show_bug.cgi?id=151638
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):
2015-11-28 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: REGRESSION: "Duplicate Selector" context menu item doesn't work
https://bugs.webkit.org/show_bug.cgi?id=151628
Reviewed by Brian Burg.
Merged the two "add rule" functions inside DOMNodeStyles to create a
new rule with the given selector and use the generated best selector
for that node otherwise. This also preserves all fallbacks across all
functions for creating new CSS rules.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addEmptyRule): Deleted.
(WebInspector.DOMNodeStyles.prototype.addRuleWithSelector): Deleted.
(WebInspector.DOMNodeStyles.prototype.addRule):
Creates a new CSS rule using either the provided selector or the best
selector for the current node.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
2015-11-24 Brian Burg <bburg@apple.com>
Web Inspector: save Inspector's breakpoints to localStorage whenever they are modified
https://bugs.webkit.org/show_bug.cgi?id=151581
Reviewed by Timothy Hatcher.
Serialize all breakpoints to the "breakpoints" Setting in local storage
whenever any breakpoint model object is added, removed, or modified.
Remove the old listener that attempted to save breakpoints on the
pagehide event. It did not fire in important scenarios like exiting
the browser via Cmd-Q or killing the process via Ctrl-C / SIGKILL.
This is not expected to be a performance problem because most people
do not keep thousands of breakpoints active, and breakpoints are not
set very often. If it's a problem, we can mitigate it with coalescing.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.addBreakpoint):
(WebInspector.DebuggerManager.prototype.removeBreakpoint):
(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
(WebInspector.DebuggerManager.prototype._saveBreakpoints):
(WebInspector.DebuggerManager.prototype._inspectorClosing): Deleted.
2015-11-24 Brian Burg <bburg@apple.com>
Web Inspector: Cmd-1 to Cmd-9 shortcuts should select tabs by ordinal
https://bugs.webkit.org/show_bug.cgi?id=151577
Reviewed by Timothy Hatcher.
The shortcuts only work if a tab at the specified ordinal exists.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: Add a keyboard shortcut to restore the default zoom level
https://bugs.webkit.org/show_bug.cgi?id=151237
Reviewed by Timothy Hatcher.
The Cmd-0 shortcut matches the keybindings of Safari and other browsers.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: inspector settings should not be shared between different inspection levels
https://bugs.webkit.org/show_bug.cgi?id=151151
Reviewed by Timothy Hatcher.
It's really annoying to have shared settings between Inspector^1 and Inspector^2, because
they are not designed to respond to external changes to local storage keys. As a result,
the two inspectors seemingly have different settings while both are open, but the settings
clobber each other depending on which inspector is closed first. On the next inspector
being opened, it has settings that reflect whichever inspector closed last.
To fix this, alter the local storage key prefix to incude the inspection level when it is
greater than 1 (i.e., inspecting the inspector). The storage prefix becomes
"com.apple.WebInspector-${inspectionLevel}." in this case.
This is backwards-compatible for normal Inspector, who keeps the same storage prefix.
Alternate approaches that were considered and abandoned:
- Use separate WKWebSiteDataStores for each inspection level. This API (as it currently is)
does not support multiple on-disk storage locations. We don't want to add an entirely new
Library directory for each inspector level, and sharing a single location doesn't fix the
shared-settings bug. Changing storage location would lose all existing Inspector settings.
- Sync settings between multiple open Inspectors. This would be catastrophic, as changing
the active tab on one inspector would immediately propagate to the other open inspectors.
* UserInterface/Models/Setting.js:
(WebInspector.Setting):
* UserInterface/Protocol/InspectorFrontendHostStub.js:
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.inspectionLevel):
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: use Cmd-Option-L and Cmd-Option-R for toggling navigation and details sidebars
https://bugs.webkit.org/show_bug.cgi?id=151572
Reviewed by Timothy Hatcher.
The previous shortcuts were Cmd-0 and Cmd-Option-0, but these didn't match Safari's
sidebar shortcuts and conflict with Cmd-0 as the cross-browser way to reset page zoom.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: when inspecting the inspector, add the inspection level to the title bar
https://bugs.webkit.org/show_bug.cgi?id=151555
Reviewed by Timothy Hatcher.
Drive-by update to remove some localization strings that are no longer used.
* Localizations/en.lproj/localizedStrings.js:
2015-11-22 Matt Baker <mattbaker@apple.com>
Web Inspector: Clean up FolderizedTreeElement folder settings
https://bugs.webkit.org/show_bug.cgi?id=151539
Reviewed by Brian Burg.
The expanded state for each folder was stored as an external property on the folder
tree element. Now FolderizedTreeElement keeps a map of folders to settings.
* UserInterface/Views/FolderizedTreeElement.js:
(WebInspector.FolderizedTreeElement):
(WebInspector.FolderizedTreeElement.prototype.removeChildren):
(WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
(WebInspector.FolderizedTreeElement.prototype._folderTreeElementExpandedStateChange):
== Rolled over to ChangeLog-2015-11-21 ==