blob: 83d3a725da07a06116c0c2a8176549edb15931ee [file] [log] [blame]
2015-03-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Adopt ES6 Class Syntax for all Model Objects
https://bugs.webkit.org/show_bug.cgi?id=142858
Reviewed by Timothy Hatcher.
- Convert WebInspector.Object to a class
- Convert all UserInterface/Models objects to classes
- Convert constructor functions to constructor methods
- Convert "constructor.method" to class static methods where possible
- Convert all methods to method syntax, eliminate commas between methods
- Convert all superclass calls in classes to use "super"
- Workaround <https://webkit.org/b/142862> and add empty constructors
- Added "deprecated" prefix to addConstructorFunctions, since it is not needed with classes
- Added many missing calls to super in constructors
- Added FIXME to WebInspector.Object subclasses not yet moved to classes.
- Cleaned up SourceMap global properties, moved to constructor instead of prototype
- Cleaned up Timeline factory constructor to static "create" factory method
- Fixed any style issues noticed in the mass edit
- Fixed strict mode issues now that classes enforce strict mode
- RunLoopTimelineRecord.js was missing a `var` for a local variable
- "const" is not allowed, converted to "var"
- "arguments.callee" is not allowed in strict mode
* UserInterface/**/*.js:
Many files modified mostly mechanically.
2015-03-19 Jono Wells <jonowells@apple.com>
Web Inspector: Debugger sidebar header should say "Scripts" instead of "Breakpoints", appear only on pause
https://bugs.webkit.org/show_bug.cgi?id=142847
Reviewed by Timothy Hatcher.
Add a `paused` class on the debugger sidebar panel. Use that class to adjust the sidebar styles so that, when
the debugger is not paused: there is no header for the scripts section, there is no border beneath the scripts
section, and the scripts section cannot be collapsed (which could be done while the debugger is paused). The
header has changed to say "Scripts" instead of "Breakpoints" when it is showing.
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .details-section.scripts):
(.sidebar > .panel.navigation.debugger .details-section.scripts .header):
(.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content):
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts):
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header):
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content):
Adjust styles to hide header and border.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
Add a `paused` class to the debugger sidebar when it is paused.
2015-03-19 Jono Wells <jonowells@apple.com>
Web Inspector: FilterBar for debugger sidebar hides breakpoints for displayed resources
https://bugs.webkit.org/show_bug.cgi?id=142777
Reviewed by Brian Burg.
Typing into the text input on the filter bar for the debugger sidebar no longer incorrectly hides the
breakpoints for scripts that match the text input.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.get filterableData): Added.
2015-03-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Replace last use of ObjectPropertiesSection with ObjectTreeView
https://bugs.webkit.org/show_bug.cgi?id=142834
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
Use properties only ObjectTreeView instead of ObjectPropertiesSection.
This doesn't fix the functionality issues, but fixes the appearance.
* UserInterface/Views/DetailsSection.css:
(.details-section > .content > .group:first-child > .row.simple:first-child > *): Deleted.
(body.mac-platform.legacy .details-section > .content > .group:first-child > .row.simple:first-child > *): Deleted.
(.details-section > .content > .group > .row.properties:not(.empty)): Deleted.
(body.mac-platform.legacy .details-section > .content > .group > .row.properties:not(.empty)): Deleted.
Re-add back the small padding at the top of sections. This actually
broke padding in a few sections (Event Listeners) at the expense
of eliminating a few pixels of whitespace at the top of other sections.
We should focus on addressing the extra whitespace separately.
* UserInterface/Main.html:
* UserInterface/Views/ObjectPropertiesSection.js: Removed.
* UserInterface/Views/TypePropertiesSection.js:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
Remove new unused class.
2015-03-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Debugger Popovers and Probes should use FormattedValue/ObjectTreeView instead of Custom/ObjectPropertiesSection
https://bugs.webkit.org/show_bug.cgi?id=142830
Reviewed by Timothy Hatcher.
* UserInterface/Views/ProbeSetDataGrid.css:
(.details-section.probe-set .data-grid .object-tree > :matches(.title, .object-preview)::before):
Another line-height fix for object tree disclosure triangles.
* UserInterface/Views/ProbeSetDataGridNode.js:
(WebInspector.ProbeSetDataGridNode.prototype.createCellContent):
Create an ObjectTree / FormattedValue for the RemoteObject.
* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content > .title):
(.popover .debugger-popover-content > .body):
(.popover .debugger-popover-content.function > .body):
Be more specific and don't accidentally style ".title" within the body.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
Show a properties only ObjectTree instead of an ObjectPropertiesSection.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForString): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForRegExp): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverWithFormattedValue):
Reduce most of these to a single popover for formatted values.
2015-03-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Scopes sidebar should use new ObjectTreeView and not ObjectPropertiesSection
https://bugs.webkit.org/show_bug.cgi?id=142808
Reviewed by Timothy Hatcher.
* UserInterface/Models/PropertyPath.js:
(WebInspector.PropertyPath):
(WebInspector.PropertyPath.emptyPropertyPathForScope):
Allow a special property empty path for "Scopes". This way for a
"<scopeObject>.property" we can show just the tooltip "property".
* UserInterface/Views/ObjectTreeView.css:
(.object-tree.properties-only > :matches(.title, .object-preview)):
(.object-tree.properties-only .object-tree-outline):
(.object-tree.properties-only .object-tree-property .property-name):
Tweak styles for only properties view, which won't have a top-level
preview and doesn't fade out enumerable properties.
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.get treeOutline):
Access the TreeOutline.
(WebInspector.ObjectTreeView.prototype.showOnlyProperties):
Properties only view modifies the display slightly.
(WebInspector.ObjectTreeView.prototype.appendExtraPropertyDescriptor):
(WebInspector.ObjectTreeView.prototype._updateProperties):
Allow the client to add its own property descriptors to display
as a property in this ObjectTreeView.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
Switch to using an ObjectTreeView.
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._propertyPathIdentifierForTreeElement):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeAddHandler):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler):
Keep track of what properties were expanded so we can auto-expand
them again when the sidebar refreshes.
* UserInterface/Main.html:
* UserInterface/Views/ScopeVariableTreeElement.js: Removed.
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
Remove the now unused ScopeVariableTreeElement.js.
2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Debugger Sidebar Icons Misaligned
https://bugs.webkit.org/show_bug.cgi?id=142654
Reviewed by Timothy Hatcher.
The debugger sidebar content was accidentally 1px too small. The
TreeOutline being inside of a .detail-section was getting a smaller
font-size. We should just have the normal font-size for the
debugger navigation sidebar. This matches the Resources sidebar
in the TreeOutline, and icons line up better.
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .details-section):
2015-03-17 Tobias Reiss <tobi+webkit@basecode.de>
Web Inspector: Removal of multiline completion hint broken in Details sidebar
https://bugs.webkit.org/show_bug.cgi?id=142796
Reviewed by Joseph Pecoraro.
Prioritize CodeMirrorCompletionController over CSSStyleDeclarationTextEditor.
Both classes control the current CodeMirror instance of the Details Sidebar.
This change prevents possible race conditions during complete or delete-complete phases,
especially during operations on multiple styles in one line.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
2015-03-17 Matt Baker <mattbaker@apple.com>
Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
https://bugs.webkit.org/show_bug.cgi?id=142029
Reviewed by Timothy Hatcher.
Add UI for showing runloop records and their child records as a frame histogram,
with the recording time on the x-axis and the frame duration on the y-axis. Each frame
is comprised of colored regions representing the time spent in various activities (script,
layout, etc).
Eventually the Frames timeline will replace the Layout & Rendering timeline. Until the views
for the new timeline are finalized the Layout & Rendering timeline will remain in place.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New string and files.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype.pageDidLoad):
(WebInspector.TimelineManager.prototype._processNestedRecords):
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._processEvent):
(WebInspector.TimelineManager.prototype._loadNewRecording):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Deleted.
Added support for new runloop record type and nested record handling.
* UserInterface/Images/Frames.png: Added.
* UserInterface/Images/Frames@2x.png: Added.
* UserInterface/Images/FramesLarge.png: Added.
* UserInterface/Images/FramesLarge@2x.png: Added.
New images for runloop timeline overview graph and runloop tree records.
* UserInterface/Models/RunLoopTimelineRecord.js: Added.
(WebInspector.RunLoopTimelineRecord):
(WebInspector.RunLoopTimelineRecord.prototype.get children):
(WebInspector.RunLoopTimelineRecord.prototype.get durationRemainder):
(WebInspector.RunLoopTimelineRecord.prototype.durationForRecords.get var):
Extends TimelineRecord to add child records and subframe duration details.
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.get displayName):
(WebInspector.Timeline.prototype.get iconClassName):
New UI strings and icons.
* UserInterface/Models/TimelineRecord.js:
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
Added support for new runloop record type.
* UserInterface/Views/RunLoopTimelineOverviewGraph.css: Added.
(.timeline-overview-graph.runloop > .divider):
(.timeline-overview-graph.runloop > .divider > span):
New styles for runloop timeline graph.
* UserInterface/Views/RunLoopTimelineOverviewGraph.js: Added.
(WebInspector.RunLoopTimelineOverviewGraph):
(WebInspector.RunLoopTimelineOverviewGraph.prototype.updateLayout.createFrame):
(WebInspector.RunLoopTimelineOverviewGraph.prototype.get graphHeightSeconds.this):
(WebInspector.RunLoopTimelineOverviewGraph.prototype.get graphHeightSeconds):
(WebInspector.RunLoopTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition.get if):
New overview graph for displaying TimelineRecordFrames and horizontal frame budget dividers.
* UserInterface/Views/TimelineIcons.css:
(.runloop-icon .icon):
(.runloop-icon.large .icon):
(.runloop-record .icon):
* UserInterface/Views/TimelineSidebarPanel.js:
New runloop icon styles.
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph):
Updated factory to support creation of the new overview graph.
* UserInterface/Views/TimelineRecordFrame.css: Added.
(.timeline-record-frame):
(.timeline-record-frame > .frame):
(.timeline-record-frame > .dropped):
(.timeline-record-frame > .frame > .duration):
(.timeline-record-frame > .frame > .duration:first-child):
(.timeline-record-frame > .frame > .duration:last-child):
(.timeline-record-frame > .frame > .duration.timeline-record-type-network):
(.timeline-record-frame > .frame > .duration.timeline-record-type-layout):
(.timeline-record-frame > .frame > .duration.timeline-record-type-script):
New styles for frame bars in the runloop timeline graph.
* UserInterface/Views/TimelineRecordFrame.js: Added.
(WebInspector.TimelineRecordFrame):
(WebInspector.TimelineRecordFrame.createCombinedFrames):
(WebInspector.TimelineRecordFrame.prototype.get element):
(WebInspector.TimelineRecordFrame.prototype.get duration):
(WebInspector.TimelineRecordFrame.prototype.get records):
(WebInspector.TimelineRecordFrame.prototype.set records):
(WebInspector.TimelineRecordFrame.prototype._updateChildElements.createDurationElement):
New view representing a single frame within the runloop overview graph.
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
New files.
2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add more DOM Native Function parameter strings
https://bugs.webkit.org/show_bug.cgi?id=142760
Reviewed by Timothy Hatcher.
* UserInterface/Models/NativeFunctionParameters.js:
Add native parameter strings generated and hand modified
for DOM built-in classes.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
For native constructors "FooConstructor" the description is just
the name of the Constructor not the function string.
2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Object Previews in Indexed DB tables
https://bugs.webkit.org/show_bug.cgi?id=140813
Reviewed by Timothy Hatcher.
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
Add a boolean param for ObjectTree construction if it should force allowing object expansion.
* UserInterface/Views/IndexedDatabaseEntryDataGridNode.js:
(WebInspector.IndexedDatabaseEntryDataGridNode.prototype.createCellContent):
Switch to creating an ObjectTree or FormattedValue.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
(.content-view.indexed-database-object-store > .data-grid tr.selected):
Change row selection color to match the console's lighter blue instead of dark blue.
(.content-view.indexed-database-object-store > .data-grid .object-tree > :matches(.title, .object-preview)::before):
Adjust object tree disclosure triangle placement for larger line heights.
(.content-view.indexed-database-object-store > .data-grid td .section .header): Deleted.
(.content-view.indexed-database-object-store > .data-grid td .section .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid td .section .header .title): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section.expanded .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent.expanded::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li *): Deleted.
Remove now unnecessary styles.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree .object-tree-array-index > .icon):
Increase the specificity to override ".data-grid td .icon" styles.
2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Better Console Previews for Arrays / Small Objects
https://bugs.webkit.org/show_bug.cgi?id=142322
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectPreviewView.js:
If there is a sub-preview, show the sub-preview.
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
For an ObjectTree that is not a root (e.g. one inside of
an array/set/map property tree element) allow it to be
expanded even if the preview is lossless.
2015-03-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage and LegacyConsoleMessageImpl respectively
https://bugs.webkit.org/show_bug.cgi?id=142712
As a first step of ConsoleMessage refactoring (https://bugs.webkit.org/show_bug.cgi?id=142599):
- Rename WebInspector.ConsoleMessage class to WebInspector.LegacyConsoleMessage
- Rename WebInspector.ConsoleMessageImpl class to WebInspector.LegacyConsoleMessageImpl
- Rename ConsoleMessage.js file to LegacyConsoleMessage.js
- Rename ConsoleMessageImpl file to LegacyConsoleMessageImpl.js
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
* UserInterface/Main.html:
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
* UserInterface/Views/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.prototype.toMessageElement):
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.render):
* UserInterface/Views/LegacyConsoleMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js.
(WebInspector.LegacyConsoleMessage):
(WebInspector.LegacyConsoleMessage.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessage.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessage.prototype.clone):
(WebInspector.LegacyConsoleMessage.create):
* UserInterface/Views/LegacyConsoleMessageImpl.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js.
(WebInspector.LegacyConsoleMessageImpl):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldDumpStackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldHideURL):
(WebInspector.LegacyConsoleMessageImpl.prototype._firstNonNativeCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.get message):
(WebInspector.LegacyConsoleMessageImpl.prototype.get formattedMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyLocation):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessageImpl.prototype._format):
(WebInspector.LegacyConsoleMessageImpl.prototype._isExpandable):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameter):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsValue):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.LegacyConsoleMessageImpl.prototype._rootPropertyPathForObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._userProvidedColumnNames):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
(WebInspector.LegacyConsoleMessageImpl.prototype.):
(WebInspector.LegacyConsoleMessageImpl.prototype.stringFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.floatFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.integerFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.styleFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.isWhitelistedProperty):
(WebInspector.LegacyConsoleMessageImpl.prototype.append):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatWithSubstitutionString):
(WebInspector.LegacyConsoleMessageImpl.prototype.decorateMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype._populateStackTraceTreeElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessageImpl.prototype.toString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get text):
(WebInspector.LegacyConsoleMessageImpl.prototype.isEqual):
(WebInspector.LegacyConsoleMessageImpl.prototype.get stackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype.clone):
(WebInspector.LegacyConsoleMessageImpl.prototype.get levelString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get clipboardPrefixString):
(WebInspector.LegacyConsoleMessageImpl.prototype.toClipboardString):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._filterMessages):
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
2015-03-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r181517.
https://bugs.webkit.org/show_bug.cgi?id=142718
This patch broke GTK+ build (Requested by NVI on #webkit).
Reverted changeset:
"Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl
to LegacyConsoleMessage and LegacyConsoleMessageImpl
respectively"
https://bugs.webkit.org/show_bug.cgi?id=142712
http://trac.webkit.org/changeset/181517
2015-03-15 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Console Scrolls Unexpectedly when Clicking inside un-selected Expanding Object
https://bugs.webkit.org/show_bug.cgi?id=142655
Don't scroll when selection change is triggered by clicking, e.g.
only scroll on arrow up and down key press events.
Reviewed by Joseph Pecoraro.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._mousemove):
(WebInspector.LogContentView.prototype._updateMessagesSelection):
(WebInspector.LogContentView.prototype._upArrowWasPressed):
(WebInspector.LogContentView.prototype._downArrowWasPressed):
2015-03-15 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage and LegacyConsoleMessageImpl respectively
https://bugs.webkit.org/show_bug.cgi?id=142712
As a first step of ConsoleMessage refactoring (https://bugs.webkit.org/show_bug.cgi?id=142599):
- Rename WebInspector.ConsoleMessage class to WebInspector.LegacyConsoleMessage
- Rename WebInspector.ConsoleMessageImpl class to WebInspector.LegacyConsoleMessageImpl
- Rename ConsoleMessage.js file to LegacyConsoleMessage.js
- Rename ConsoleMessageImpl file to LegacyConsoleMessageImpl.js
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
* UserInterface/Main.html:
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
* UserInterface/Views/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.prototype.toMessageElement):
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.render):
* UserInterface/Views/LegacyConsoleMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js.
(WebInspector.LegacyConsoleMessage):
(WebInspector.LegacyConsoleMessage.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessage.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessage.prototype.clone):
(WebInspector.LegacyConsoleMessage.create):
* UserInterface/Views/LegacyConsoleMessageImpl.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js.
(WebInspector.LegacyConsoleMessageImpl):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldDumpStackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldHideURL):
(WebInspector.LegacyConsoleMessageImpl.prototype._firstNonNativeCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.get message):
(WebInspector.LegacyConsoleMessageImpl.prototype.get formattedMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyLocation):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessageImpl.prototype._format):
(WebInspector.LegacyConsoleMessageImpl.prototype._isExpandable):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameter):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsValue):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.LegacyConsoleMessageImpl.prototype._rootPropertyPathForObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._userProvidedColumnNames):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
(WebInspector.LegacyConsoleMessageImpl.prototype.):
(WebInspector.LegacyConsoleMessageImpl.prototype.stringFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.floatFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.integerFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.styleFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.isWhitelistedProperty):
(WebInspector.LegacyConsoleMessageImpl.prototype.append):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatWithSubstitutionString):
(WebInspector.LegacyConsoleMessageImpl.prototype.decorateMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype._populateStackTraceTreeElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessageImpl.prototype.toString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get text):
(WebInspector.LegacyConsoleMessageImpl.prototype.isEqual):
(WebInspector.LegacyConsoleMessageImpl.prototype.get stackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype.clone):
(WebInspector.LegacyConsoleMessageImpl.prototype.get levelString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get clipboardPrefixString):
(WebInspector.LegacyConsoleMessageImpl.prototype.toClipboardString):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._filterMessages):
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
2015-03-12 Jono Wells <jonowells@apple.com>
Web Inspector: Debugger sidebar should group global breakpoints together
https://bugs.webkit.org/show_bug.cgi?id=142607
Reviewed by Timothy Hatcher.
Update the DebuggerSidebarPanel class to hold global breakpoints such as "All Exceptions" in one container. This
will be the place future such breakpoints are added.
* Localizations/en.lproj/localizedStrings.js: Added string.
* UserInterface/Main.html: Small rearrangement.
* UserInterface/Views/DebuggerSidebarPanel.js: Change how exception breaking options are displayed.
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
* UserInterface/Views/FolderTreeElement.js: Support additional classes for icons.
* UserInterface/Views/ResourceSidebarPanel.js: Change call to FolderTreeElement constructor.
2015-03-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Console Errors during provisional document loads get lost with "Clear Log on Reload"
https://bugs.webkit.org/show_bug.cgi?id=142603
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._provisionalLoadStarted):
Detect a provisional load has started to start save messages that come in at this time.
(WebInspector.LogContentView.prototype._sessionStarted):
Reappend provisional load messages if we auto-cleared.
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
(WebInspector.LogContentView.prototype._clearProvisionalState):
Helpers for dealing with the provisional loading state.
2015-03-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CSS parser errors in the console should include column numbers
https://bugs.webkit.org/show_bug.cgi?id=114313
Reviewed by Darin Adler.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
Column numbers in console messages are also 1 based and should be adjusted.
2015-03-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r181367.
https://bugs.webkit.org/show_bug.cgi?id=142581
Caused crashes on the debug bots (Requested by cdumez on
#webkit).
Reverted changeset:
"Web Inspector: CSS parser errors in the console should
include column numbers"
https://bugs.webkit.org/show_bug.cgi?id=114313
http://trac.webkit.org/changeset/181367
2015-03-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reload after Global Search results in empty Resources Sidebar.
https://bugs.webkit.org/show_bug.cgi?id=142572
Reviewed by Timothy Hatcher.
If you reload when the search content tree outline is showing, break out
to show the resource tree outline.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._showResourcesContentTreeOutline):
(WebInspector.ResourceSidebarPanel.prototype._showSearchContentTreeOutline):
2015-03-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: SearchResultTreeElement.representedObject is missing a saveIdentityToCookie implementation
https://bugs.webkit.org/show_bug.cgi?id=134698
Reviewed by Timothy Hatcher.
This will restore selection of a global search tree element if you
close and reopen the inspector in such a case.
* UserInterface/Models/DOMSearchMatchObject.js:
(WebInspector.DOMSearchMatchObject.prototype.get resource):
(WebInspector.DOMSearchMatchObject.titleForDOMNode):
Cookie has the resource URL, DOM Node title, and text range.
* UserInterface/Models/SourceCodeSearchMatchObject.js:
(WebInspector.SourceCodeSearchMatchObject.prototype.get sourceCodeTextRange):
Cookie has the source code URL and text range.
2015-03-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CSS parser errors in the console should include column numbers
https://bugs.webkit.org/show_bug.cgi?id=114313
Reviewed by Benjamin Poulain.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
Column numbers in console messages are also 1 based and should be adjusted.
2015-03-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: console.error output broken, does not produce ObjectTree
https://bugs.webkit.org/show_bug.cgi?id=142554
Reviewed by Timothy Hatcher.
* UserInterface/Models/IssueMessage.js:
(WebInspector.IssueMessage):
* UserInterface/Protocol/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
2015-03-10 Saam Barati <saambarati1@gmail.com>
Web Inspector: Destructuring function parameters should show type information
https://bugs.webkit.org/show_bug.cgi?id=142233
Reviewed by Joseph Pecoraro.
JSC supports a function's formal parameter being a destructuring pattern,
and so should the type profiler in the Inspector. This was just an oversight
not to have this in bug 141215.
This patch also does a bit of refactoring to not have duplicate code
that traverses AST nodes in TypeTokenAnnotator and ScriptSyntaxTree.
Before, both of these classes were responsible for traversing the AST
in an identical way, this is bad. Now, ScriptSyntaxTree contains the
canonical implementation of how the AST should be traversed and which
AST nodes should be collected for type profiling. ScriptSyntaxTree will
pass this information back to TypeTokenAnnotator.
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeToken):
(WebInspector.TypeTokenAnnotator.prototype._insertTypeTokensForEachNode): Deleted.
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype.):
(WebInspector.ScriptSyntaxTree.prototype.updateTypes):
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
(WebInspector.ScriptSyntaxTree.prototype.gatherIdentifiersInVariableDeclaration): Deleted.
2015-03-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Inline Error / Warning message for Issues
https://bugs.webkit.org/show_bug.cgi?id=142520
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and new files.
* UserInterface/Controllers/IssueManager.js:
(WebInspector.IssueManager.prototype.issueWasAdded):
* UserInterface/Models/IssueMessage.js:
(WebInspector.IssueMessage):
(WebInspector.IssueMessage.prototype.get columnNumber):
* UserInterface/Protocol/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
Correctly pass the column number into IssueMessage.
* UserInterface/Models/LineWidget.js:
(WebInspector.LineWidget):
(WebInspector.LineWidget.prototype.get codeMirrorLineWidget):
(WebInspector.LineWidget.prototype.get widgetElement):
Create a new Model class for a LineWidget. The root element
should never change, but its children can be updated.
* UserInterface/Views/SourceCodeTextEditor.css:
(.source-code.text-editor .CodeMirror-linewidget):
Override styles so that widgets can overlap line content.
(.source-code.text-editor > .CodeMirror .issue-widget):
(.source-code.text-editor > .CodeMirror .issue-widget.inline):
Float issue widgets to the right side of the editor.
(.source-code.text-editor > .CodeMirror .issue-widget > .arrow):
(.source-code.text-editor > .CodeMirror .issue-widget.inline > .arrow):
Pure CSS arrow for widgets on the same line as their issue.
(.source-code.text-editor > .CodeMirror .issue-widget > .icon):
(.source-code.text-editor > .CodeMirror .issue-widget > .icon.icon-warning):
(.source-code.text-editor > .CodeMirror .issue-widget > .icon.icon-error):
Issue icon styles for the different issue types.
(.source-code.text-editor > .CodeMirror .issue-widget.warning):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.warning):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.warning > .arrow):
(.source-code.text-editor > .CodeMirror .issue-widget.error):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.error):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.error > .arrow):
Different colors for the different issue types.
(.source-code.text-editor > .CodeMirror .issue-widget > .text):
(.source-code.text-editor > .CodeMirror .issue-widget.inline > .text):
Text positioning when on the same line or when expanded.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._addIssue):
(WebInspector.SourceCodeTextEditor.prototype._iconClassNameForIssueLevel):
(WebInspector.SourceCodeTextEditor.prototype._updateIssueWidgetForIssues):
(WebInspector.SourceCodeTextEditor.prototype._isWidgetToggleable):
(WebInspector.SourceCodeTextEditor.prototype._handleWidgetClick):
Create widgets for issues.
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
(WebInspector.SourceCodeTextEditor.prototype._clearWidgets):
(WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues):
Update all widgets in certain cases.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.addStyleClassToLine):
This assertion is known to happen for issues added to an editor
before the content has loaded.
(WebInspector.TextEditor.prototype.createWidgetForLine):
Create a widget for a line.
2015-03-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JS Pretty Printing: "case" or "default" outside of switch causes unbalanced indentation
https://bugs.webkit.org/show_bug.cgi?id=142428
Reviewed by Timothy Hatcher.
* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* UserInterface/Views/CodeMirrorFormatters.js:
Fix "case" and "default" indentation rules to only happen inside a switch.
* Tools/PrettyPrinting/js-tests/switch-case-default-expected.js:
* Tools/PrettyPrinting/js-tests/switch-case-default.js:
Add tests for "case" and "default" nested inside and outside of switches.
2015-03-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ES6: Improved Support for Iterator Objects
https://bugs.webkit.org/show_bug.cgi?id=142420
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl):
Treat an iterator like an object.
* UserInterface/Views/ObjectPreviewView.js:
Output iterator previews with []s, not {}s.
2015-03-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Adopt Object Literal Method Property Syntax
https://bugs.webkit.org/show_bug.cgi?id=142409
Reviewed by Timothy Hatcher.
Mechanical change touching lots of files.
2015-03-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Adopt Object Literal Shorthand Property Construction Syntax
https://bugs.webkit.org/show_bug.cgi?id=142374
Reviewed by Timothy Hatcher.
Mechanical change touching lots of files.
2015-03-06 Jono Wells <jonowells@apple.com>
Web Inspector: Populate Debugger sidebar with all debuggable resources
https://bugs.webkit.org/show_bug.cgi?id=141232
Reviewed by Timothy Hatcher.
All debuggable resources now show in the debugger sidebar. The _resourceAdded handler now adds a script resource
to the sidebar regardless of whether it has any breakpoints set on it. The new function
_getTreeElementForSourceCodeAndAddToContentTreeOutline adds the element to the debugger sidebar before
_addBreakpointsForSourceCode is called. Removing all breakpoints from a resource no longer removes that
resource from the debugger sidebar. TreeOutline.prototype.removeChild has been updated so the disclosure
button will disappear and reappear correctly when removing/adding breakpoints.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint): Expand resource if first breakpoint is added.
(WebInspector.DebuggerSidebarPanel.prototype._getTreeElementForSourceCodeAndAddToContentTreeOutline): Created.
(WebInspector.DebuggerSidebarPanel.prototype._resourceAdded): Checks resource type and adds scripts to sidebar.
(WebInspector.DebuggerSidebarPanel.prototype._mainResourceChanged):
(WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
(WebInspector.DebuggerSidebarPanel.prototype._removeBreakpointTreeElement): No longer removes empty parent.
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected): Displays scripts without breakpoints now.
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.get disclosureButton): Drive-by fix. Unused. Deleted.
* UserInterface/Views/TreeOutline.js:
(TreeOutline.prototype.removeChild):
Remove parent class and set hasChildren to false if necessary to properly hide and reveal disclosure button
for elements whose children have been removed.
2015-03-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Follow-up fixes to ObjectTreeBaseTreeElement
https://bugs.webkit.org/show_bug.cgi?id=142367
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.propertyPathType):
* UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
(WebInspector.ObjectTreeSetIndexTreeElement.prototype.resolvedValuePropertyPath):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
2015-03-05 Tobias Reiss <tobi+webkit@basecode.de>
Web Inspector: console.debug/info should show up in Log Console Filter
https://bugs.webkit.org/show_bug.cgi?id=142300
Reviewed by Joseph Pecoraro.
Add WebInspector.ConsoleMessage.MessageLevel.Debug case that allows console.debug/info
to show up in Log Console Filter.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._filterMessages):
2015-03-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add ObjectTreeBaseTreeElement to share functionality
https://bugs.webkit.org/show_bug.cgi?id=142323
Reviewed by Timothy Hatcher.
By making this change:
- Share lots of duplicated code.
- Array / Set / Map tree elements get context menu support
* UserInterface/Main.html:
* UserInterface/Views/ObjectTreeBaseTreeElement.js: Added.
(WebInspector.ObjectTreeBaseTreeElement):
(WebInspector.ObjectTreeBaseTreeElement.prototype.get property):
(WebInspector.ObjectTreeBaseTreeElement.prototype.get propertyPath):
(WebInspector.ObjectTreeBaseTreeElement.prototype.oncontextmenu):
(WebInspector.ObjectTreeBaseTreeElement.prototype.resolvedValue):
(WebInspector.ObjectTreeBaseTreeElement.prototype.resolvedValuePropertyPath):
(WebInspector.ObjectTreeBaseTreeElement.prototype.thisPropertyPath):
(WebInspector.ObjectTreeBaseTreeElement.prototype.hadError):
(WebInspector.ObjectTreeBaseTreeElement.prototype.propertyPathType):
(WebInspector.ObjectTreeBaseTreeElement.prototype.propertyPathString):
(WebInspector.ObjectTreeBaseTreeElement.prototype.createInteractiveGetterElement):
(WebInspector.ObjectTreeBaseTreeElement.prototype.createReadOnlyIconElement):
New file, copying most of the code from PropertyTreeElement so it can be shared.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
(WebInspector.ObjectTreeArrayIndexTreeElement):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype.invokedGetter):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype.get property): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValue): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathType): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValuePropertyPath): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._thisPropertyPath): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathString): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._updateTitle): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createInteractiveGetterElement.): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createReadOnlyIconElement): Deleted.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype.invokedGetter):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTooltips):
(WebInspector.ObjectTreePropertyTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitleAPIStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._alwaysDisplayAsProperty):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildrenInternal):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
(WebInspector.ObjectTreePropertyTreeElement.prototype.get property): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype.oncontextmenu): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._propertyPathType): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement.): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._createReadOnlyIconElement): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype): Deleted.
Subclass ObjectTreeBaseTreeElement and eliminate the code now
automatically handled by the base class.
* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.resolvedValue):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype._propertyPathString): Deleted.
* UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
(WebInspector.ObjectTreeSetIndexTreeElement):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype.resolvedValue):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._resolvedValuePropertyPath): Deleted.
Override resolved value since these are not about PropertyDescriptors.
This will make context menus work automatically.
2015-03-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve display of previews with overflow
https://bugs.webkit.org/show_bug.cgi?id=142321
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
2015-03-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Array/Collection Sizes should be visible and distinct
https://bugs.webkit.org/show_bug.cgi?id=142254
Reviewed by Timothy Hatcher.
* UserInterface/Models/ObjectPreview.js:
(WebInspector.ObjectPreview):
(WebInspector.ObjectPreview.fromPayload):
(WebInspector.ObjectPreview.prototype.get size):
(WebInspector.ObjectPreview.prototype.hasSize):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromPrimitiveValue):
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.prototype.get size):
(WebInspector.RemoteObject.prototype.hasSize):
Check if this type has a size and get the size.
Gracefully handle construction for legacy protocols.
* UserInterface/Views/ObjectPreviewView.css:
(.object-preview > .size):
* UserInterface/Views/FormattedValue.css:
(:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap) > .size):
Style the array/collection size.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView):
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
(WebInspector.FormattedValue.createElementForRemoteObject):
(WebInspector.FormattedValue.createElementForObjectPreview):
(WebInspector.FormattedValue.createElementForPropertyPreview):
Add an element showing the array/collection size.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype):
Remove special handling for Array sizes now that this is handled earlier.
* UserInterface/Controllers/StorageManager.js:
(WebInspector.StorageManager.prototype.processData):
(WebInspector.StorageManager.prototype.requestIndexedDatabaseData):
Fix what looks like broken RemoteObject construction.
2015-03-04 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: TimelineViews should be displayed in a ContentViewContainer
https://bugs.webkit.org/show_bug.cgi?id=142290
Reviewed by Timothy Hatcher.
TimelineRecordingContentView has a bunch of logic to manage the currently visible TimelineView.
This could be delegated to a ContentViewContainer to simplify the logic. It also opens the possibility
for other views to be displayed beneath the timeline overview graphs when it makes sense to do so.
In order to be displayable in the container, TimelineView and its subclasses have been upgraded to
be ContentView subclasses. This also reduces some code duplication for basic view management.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView): Move base class instantiation pattern from TimelineView to here.
(WebInspector.ContentView.isViewable):
* UserInterface/Views/LayoutTimelineView.js: Use ContentView events and base methods.
(WebInspector.LayoutTimelineView.prototype.shown):
(WebInspector.LayoutTimelineView.prototype.hidden):
(WebInspector.LayoutTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/NetworkTimelineView.js: Use ContentView events and base methods.
(WebInspector.NetworkTimelineView.prototype.shown):
(WebInspector.NetworkTimelineView.prototype.hidden):
(WebInspector.NetworkTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/OverviewTimelineView.js: Use ContentView events and base methods.
(WebInspector.OverviewTimelineView.prototype.shown):
(WebInspector.OverviewTimelineView.prototype._dataGridNodeSelected):
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
* UserInterface/Views/ScriptTimelineView.js: Use ContentView events and base methods.
(WebInspector.ScriptTimelineView.prototype.shown):
(WebInspector.ScriptTimelineView.prototype.hidden):
(WebInspector.ScriptTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/TimelineRecordingContentView.css: Use WebInspector.ContentViewContainer class.
(.content-view.timeline-recording > .content-view-container):
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid td):
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid table.data):
(.content-view.timeline-recording > .view-container): Deleted.
(.content-view.timeline-recording > .view-container > .timeline-view > .data-grid td): Deleted.
(.content-view.timeline-recording > .view-container > .timeline-view > .data-grid table.data): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
Many of the changes here mirror the implementation of ClusterContentView. Searching is disabled since
none of the timeline views are currently searchable using ContentViewContainer's full-text search.
In cases where we update the current timeline view, the currentTimelineView accessor returns the
content view if a TimelineView is shown in the content view container, otherwise null.
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype.showOverviewTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
(WebInspector.TimelineRecordingContentView.prototype.get supplementalRepresentedObjects):
(WebInspector.TimelineRecordingContentView.prototype.get handleCopyEvent):
(WebInspector.TimelineRecordingContentView.prototype.get supportsSave):
(WebInspector.TimelineRecordingContentView.prototype.get saveData):
(WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.shown):
(WebInspector.TimelineRecordingContentView.prototype.hidden):
(WebInspector.TimelineRecordingContentView.prototype.closed):
(WebInspector.TimelineRecordingContentView.prototype.canGoBack):
(WebInspector.TimelineRecordingContentView.prototype.canGoForward):
(WebInspector.TimelineRecordingContentView.prototype.goBack):
(WebInspector.TimelineRecordingContentView.prototype.goForward):
(WebInspector.TimelineRecordingContentView.prototype.updateLayout):
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie):
(WebInspector.TimelineRecordingContentView.prototype.get filterDidChange):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
(WebInspector.TimelineRecordingContentView.prototype._timelineRemoved):
(WebInspector.TimelineRecordingContentView.prototype._timelineCountChanged):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
(WebInspector.TimelineRecordingContentView.prototype.filterDidChange): Deleted.
(WebInspector.TimelineRecordingContentView.prototype._timelineViewSelectionPathComponentsDidChange): Deleted.
(WebInspector.TimelineRecordingContentView.prototype._showTimelineView): Deleted.
* UserInterface/Views/TimelineView.js: Remove duplicated functionality and use ContentView equivalents instead.
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.filterUpdated):
(WebInspector.TimelineView.prototype.needsLayout):
(WebInspector.TimelineView.prototype.get representedObject): Deleted.
(WebInspector.TimelineView.prototype.get visible): Deleted.
(WebInspector.TimelineView.prototype.shown): Deleted.
(WebInspector.TimelineView.prototype.hidden): Deleted.
2015-03-03 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: selecting overview timeline tree elements without source locations doesn't update selection components
https://bugs.webkit.org/show_bug.cgi?id=142248
Reviewed by Timothy Hatcher.
Add a missing event dispatch to trigger recalculation of path components when showing the overview timeline view.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
2015-03-03 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Refactoring: separate ConsoleSession from ConsoleGroup
https://bugs.webkit.org/show_bug.cgi?id=142141
ConsoleSession doesn't have a title and it's not collapsible either.
Simplify ConsoleSession by removing excessive markup.
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
(WebInspector.JavaScriptLogViewController.prototype.get topConsoleGroup): Deleted.
* UserInterface/Main.html:
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup):
(WebInspector.ConsoleGroup.prototype.render):
(WebInspector.ConsoleGroup.prototype.addMessage):
(WebInspector.ConsoleGroup.prototype.append):
(WebInspector.ConsoleGroup.prototype.hasMessages): Deleted.
* UserInterface/Views/ConsoleSession.js: Added.
(WebInspector.ConsoleSession):
(WebInspector.ConsoleSession.prototype.addMessage):
(WebInspector.ConsoleSession.prototype.append):
(WebInspector.ConsoleSession.prototype.hasMessages):
* UserInterface/Views/LogContentView.css:
(.console-session + .console-session):
(.console-group.new-session .console-group-messages .console-item:first-child): Deleted.
(.console-group.new-session): Deleted.
2015-03-03 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: popover should use requestAnimationFrame to drive move/resize animations
https://bugs.webkit.org/show_bug.cgi?id=142218
Reviewed by Timothy Hatcher.
Remove setTimeout workaround now that Inspector runs in its own process.
* UserInterface/Views/Popover.js:
(WebInspector.Popover.prototype.drawBackground):
(WebInspector.Popover.prototype._animateFrame):
2015-03-03 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: Console log level selector loses selection on reload
https://bugs.webkit.org/show_bug.cgi?id=142199
Reviewed by Timothy Hatcher.
The selected items in the console scope bar were being saved as settings,
but the "All" scope is forcibly selected on reload due to a logic bug.
* UserInterface/Base/Main.js:
(WebInspector.showFullHeightConsole):
The scope bar may already have selected items restored from WebInspector.Settings.
Don't select a scope unless explicitly requested (i.e., clicking on dashboard buttons)
or if no scopes are selected at all. (In the latter case, "All" is the default scope.)
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView): Don't specify a default value here to avoid trampling
settings. The "All" scope is selected by default in showFullHeightConsole if
nothing else is selected.
2015-03-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove native extensions now built-in
https://bugs.webkit.org/show_bug.cgi?id=142203
Reviewed by Timothy Hatcher.
* UserInterface/Base/Utilities.js:
2015-03-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Context Menu to Log a Particular Object
https://bugs.webkit.org/show_bug.cgi?id=142198
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.saveResultCallback):
(WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult):
Add a way to show an execution and result immediately in the Log View.
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype.pushHistoryItem):
(WebInspector.ConsolePrompt.prototype.commitTextOrInsertNewLine):
(WebInspector.ConsolePrompt.prototype._handleEnterKey):
(WebInspector.ConsolePrompt.prototype._commitHistoryEntry):
Add a way to append a history item to the console prompt history.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype):
Add a context menu item to object tree properties to log the value.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.createCallArgument):
(WebInspector.RemoteObject.prototype.callFunction):
(WebInspector.RemoteObject.prototype.asCallArgument):
Simplify CallArgument creation.
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.mycallback):
(WebInspector.RuntimeManager.prototype.saveResult):
Wrap RuntimeAgent.saveResult. If supported, run the backend command
and fetch a saved result index from the backend for the given value.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.get logViewController):
Misc.
2015-03-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add Context Menus to Object Tree properties
https://bugs.webkit.org/show_bug.cgi?id=142125
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired):
(WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired.revealFunction):
Fix legacy implementation.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
Give prototype buttons a tooltip.
(WebInspector.ObjectTreePropertyTreeElement.prototype.oncontextmenu):
(WebInspector.ObjectTreePropertyTreeElement.prototype._contextMenuHandler):
(WebInspector.ObjectTreePropertyTreeElement.prototype._appendMenusItemsForObject):
Context Menus based on the selected object.
2015-02-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Use Maps in ResourceCollection instead of objects
https://bugs.webkit.org/show_bug.cgi?id=142101
Reviewed by Timothy Hatcher.
* UserInterface/Models/ResourceCollection.js:
(WebInspector.ResourceCollection):
(WebInspector.ResourceCollection.prototype.resourcesWithType):
(WebInspector.ResourceCollection.prototype.removeAllResources):
(WebInspector.ResourceCollection.prototype.resourceForURL):
(WebInspector.ResourceCollection.prototype._associateWithResource):
(WebInspector.ResourceCollection.prototype._disassociateWithResource):
(WebInspector.ResourceCollection.prototype._resourceURLDidChange):
(WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
Use Maps instead of objects.
2015-02-26 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Add a subtle blue background for selected console messages
https://bugs.webkit.org/show_bug.cgi?id=142073
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.css:
(.console-item.selected::after):
(.console-messages:focus .console-item.selected):
(.console-messages:focus .console-item.selected + .console-item):
(.console-error-level + .console-item):
(.console-error-level .section .header .title):
(.console-warning-level):
(.console-warning-level + .console-item):
2015-02-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Colored console messages apply text color to object tree properties
https://bugs.webkit.org/show_bug.cgi?id=142051
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectPreviewView.css:
(.object-preview):
* UserInterface/Views/ObjectTreeView.css:
(.object-tree):
Default the color to black within Object Tree and Object Preview views.
2015-02-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Clear Log on Reload clears some logs that were after reload
https://bugs.webkit.org/show_bug.cgi?id=142070
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._sessionStarted):
We can bail after calling clearLog, since that will already start
a new session for us.
(WebInspector.LogContentView.prototype._clearLog):
Don't trigger a backend clear messages, since that will cause us to
clear messages received between the request and response.
2015-02-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
https://bugs.webkit.org/show_bug.cgi?id=142061
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evalCallback):
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Add a saveResult parameter for the new protocol command in parameter.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatMessage):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageImpl.prototype._rootPropertyPathForObject):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.appendTitleSuffix):
For console evaluation results, show a "= $n" when the evaluation was
given a saved result index.
* UserInterface/Views/LogContentView.css:
(.console-saved-variable):
* UserInterface/Views/ObjectPreviewView.css:
(.object-preview-name):
Make $n and class names in previews always non-italics.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.printResult):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(get WebInspector.JavaScriptRuntimeCompletionProvider.prototype.):
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messagesCleared):
(WebInspector.LogManager.prototype._mainResourceDidChange):
Try to provide better autocompletion for $n, by populating autocompletion menus
from $1-$n where n is the maximum saved result index seen. Clear the maximum
when we clear the console.
* UserInterface/Views/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.clearMaximumSavedResultIndex):
Keep track of the maximum savedResultIndex for console evaluation results.
2015-02-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Set/Map appear as lossless when they have lossy entries
https://bugs.webkit.org/show_bug.cgi?id=142050
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
Take into account the lossless states of entry keys and values.
2015-02-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: New ObjectTree UI for Arrays / Maps / Sets
https://bugs.webkit.org/show_bug.cgi?id=142037
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Miscellaneous changes.
* UserInterface/Models/PropertyDescriptor.js:
(WebInspector.PropertyDescriptor.prototype.isIndexProperty):
Useful for quickly checking if this property is numeric and possibly
an array index.
* UserInterface/Models/PropertyPath.js:
(WebInspector.PropertyPath.prototype.appendMapKey):
(WebInspector.PropertyPath.prototype.appendMapValue):
(WebInspector.PropertyPath.prototype.appendSetIndex):
Be specific about property paths into maps / sets. Note that a map
value may be displayable if the key is simple.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.hasValue):
A simple value RemoteObject may have the value "undefined". So provide
a falsey proof helper that actually checks if we have a value.
(WebInspector.RemoteObject.prototype.isArray):
(WebInspector.RemoteObject.prototype.backendGetOwnPropertyDescriptor):
(WebInspector.RemoteObject.prototype.wrappedCallback):
(WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor):
Currently backend APIs exist only to get all properties. In the case
of collections, we often want to get only one property (__proto__).
This is a simple implementation on top of callFunctionOn.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageImpl.prototype.appendUndefined): Deleted.
(WebInspector.ConsoleMessageImpl.prototype._printArray): Deleted.
(WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry): Deleted.
Simplify array formatted to just use an ObjectTreeView. Add fixmes
that we should seed the ObjectTreeView with a starting property path.
* UserInterface/Views/FormattedValue.css:
(.formatted-node > ol):
Sometimes, a node's display was getting overridden by various console styles.
Force a node to always display block. We may be able to remove this later.
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
Helper for formatting a node / object / value more easily. This
is used by all collection types.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
We lost the nice sparse array support when switching to the new preview path,
we should add it back.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index):
(.object-tree-array-index > .titles):
(.object-tree-array-index > .icon):
(.object-tree-array-index .index-name):
(.object-tree-array-index .index-value .object-tree):
(.object-tree-array-index .index-value .object-tree .object-tree-outline):
(.object-tree-property + ol .object-tree-array-index):
New styles specific to array index tree elements.
* UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
(.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name):
(.object-tree-map-entry.key):
(.object-tree-map-entry.key:first-of-type):
(.object-tree-map-entry):
New styles specific to map key/value tree elements.
* UserInterface/Views/ObjectTreeCollectionTreeElement.js: Removed.
Remove old collection implementation.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js: Added.
(WebInspector.ObjectTreeArrayIndexTreeElement):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype.get property):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValue):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathType):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValuePropertyPath):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._thisPropertyPath):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathString):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._updateTitle):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createInteractiveGetterElement.):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createReadOnlyIconElement):
Index followed by formatted value. Unfortunately a page can hack up an array
with getter properties, so also support getter values in an array. This ends
up copying a lot of ObjectTreePropertyTreeElement as a result.
* UserInterface/Views/ObjectTreeMapEntryTreeElement.js: Added.
(WebInspector.ObjectTreeMapEntryTreeElement):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.get object):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype._propertyPathString):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeMapKeyTreeElement):
(WebInspector.ObjectTreeMapKeyTreeElement.prototype.displayPropertyName):
(WebInspector.ObjectTreeMapKeyTreeElement.prototype.resolvedValuePropertyPath):
(WebInspector.ObjectTreeMapValueTreeElement):
(WebInspector.ObjectTreeMapValueTreeElement.prototype.displayPropertyName):
(WebInspector.ObjectTreeMapValueTreeElement.prototype.resolvedValuePropertyPath):
Key/value followed by formatted value.
* UserInterface/Views/ObjectTreeSetIndexTreeElement.js: Added.
(WebInspector.ObjectTreeSetIndexTreeElement):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype.get object):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._resolvedValuePropertyPath):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
Dot followed by formatted value.
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property > .titles):
Reformat.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree-property :matches(.formatted-string, .formatted-regexp)):
Upgrade generic styles.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue):
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildrenInternal):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
(WebInspector.ObjectTreeView.emptyMessageElement):
(WebInspector.ObjectTreeView.prototype.expand):
(WebInspector.ObjectTreeView.prototype.collapse):
(WebInspector.ObjectTreeView.prototype.update):
(WebInspector.ObjectTreeView.prototype._updateChildren):
(WebInspector.ObjectTreeView.prototype._updateEntries):
(WebInspector.ObjectTreeView.prototype._updateProperties):
(WebInspector.ObjectTreeView.prototype._handlePreviewOrTitleElementClick):
Both ObjectTreeView and ObjectTreePropertyTreeElement will fetch only collection
entries or properties depending on the type of the object being expanded.
(WebInspector.ObjectTreeView.prototype._trackWeakEntries):
(WebInspector.ObjectTreeView.prototype._untrackWeakEntries):
Allow WeakMap entries to be Garbage Collected when the ObjectTreeView
collapses or the console is cleared. FIXME for handling sub-tree WeakMaps.
2015-02-26 Brent Fulgham <bfulgham@apple.com>
[Win] Make build logs more legible by reducing noise
https://bugs.webkit.org/show_bug.cgi?id=142034
Reviewed by Alexey Proskuryakov.
Modify batch files, makefiles, and DOS commands to remove
uninteresting/unhelpful output.
* WebInspectorUI.vcxproj/WebInspectorUI.make:
2015-02-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve Regex/Error output in Object Tree and Previews
https://bugs.webkit.org/show_bug.cgi?id=142010
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView):
(WebInspector.ObjectPreviewView.prototype._initTitleElement):
Since some object types may be formatted as simple values, ensure they get
the formatted style even in the title view.
(WebInspector.ObjectPreviewView.prototype._appendPreview):
Those object types that can be formatted as simple values should skip
to the value formatting phase.
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
Do not show property previews for error objects. Always assume lossy
so that it can be expanded.
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
Make a similiar improvement for ObjectTree titles when previews are
unavailable. This will make dir(value) show a stylized value in the
title of the Object Tree.
2015-02-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve PropertyPath display strings for getters / values
https://bugs.webkit.org/show_bug.cgi?id=142008
Reviewed by Timothy Hatcher.
* UserInterface/Base/Utilities.js:
(doubleQuotedString):
Helper to double quote a string and escape double quotes with-in it.
* UserInterface/Models/PropertyPath.js:
(WebInspector.PropertyPath.prototype.get reducedPath):
Compute the path eliminating unnecessary __proto__s. Note we don't
property handle the case where a .__proto__.x is override earlier
by a .x, but that case is rare.
(WebInspector.PropertyPath.prototype.displayPath):
Helper for choosing fullPath or reducedPath display strings.
(WebInspector.PropertyPath.prototype.appendPropertyName):
(WebInspector.PropertyPath.prototype.appendGetterPropertyName):
(WebInspector.PropertyPath.prototype.appendSetterPropertyName):
(WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
When appending a descriptor, specify if it is for a getter/setter or value.
For getters / setters the actual function can be directly fetched via
__lookupGetter__/__lookupSetter__. Continue to use the property name for values.
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._propertyPathType):
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
(WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath):
(WebInspector.ObjectTreePropertyTreeElement.prototype):
2015-02-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Eliminate console-formatted-* class names in favor of formatted-*
https://bugs.webkit.org/show_bug.cgi?id=141948
Reviewed by Timothy Hatcher.
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNode):
Helper for formatting a node as a DOMTreeOutline.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageImpl.prototype.appendUndefined):
(WebInspector.ConsoleMessageImpl.prototype._printArray):
(WebInspector.ConsoleMessageImpl.prototype.): Deleted.
* UserInterface/Views/LogContentView.css:
(.console-user-command-result):
(.console-formatted-object): Deleted.
(.console-object-preview): Deleted.
(.expanded .console-object-preview): Deleted.
(.console-object-preview .name): Deleted.
(.expanded .console-object-preview > .console-object-preview-body): Deleted.
(.console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap): Deleted.
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .section): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._leftArrowWasPressed):
(WebInspector.LogContentView.prototype._rightArrowWasPressed):
Add FIXMEs since this will no longer work with ObjectTree.
* UserInterface/Views/ObjectPreviewView.css:
(.object-preview):
* UserInterface/Views/ObjectTreeView.css:
(.object-tree):
Copy over the font styles from console-formatted-object.
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype.update):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForString):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForRegExp):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined):
Convert to formatted value class names.
2015-02-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Make Getter/Setter RemoteObject property and ObjectPreview handling consistent
https://bugs.webkit.org/show_bug.cgi?id=141587
Reviewed by Timothy Hatcher.
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.prototype.collectScopeChainVariableNames):
* UserInterface/Models/PropertyDescriptor.js:
(WebInspector.PropertyDescriptor.prototype.get nativeGetter):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.prototype.getOwnPropertyDescriptors):
(WebInspector.RemoteObject.prototype.getAllPropertyDescriptors):
(WebInspector.RemoteObject.prototype.getDisplayablePropertyDescriptors):
(WebInspector.RemoteObject.prototype._getPropertyDescriptors):
(WebInspector.RemoteObject.prototype.if):
(WebInspector.RemoteObject.prototype.deprecatedGetOwnProperties):
(WebInspector.RemoteObject.prototype.deprecatedGetAllProperties):
(WebInspector.RemoteObject.prototype._deprecatedGetProperties):
(WebInspector.RemoteObject.prototype.getOwnAndGetterPropertyDescriptors): Deleted.
(WebInspector.RemoteObject.prototype.callback): Deleted.
(WebInspector.RemoteObject.prototype.getOwnProperties): Deleted.
(WebInspector.RemoteObject.prototype.getOwnAndGetterProperties): Deleted.
(WebInspector.RemoteObject.prototype.getAllProperties): Deleted.
(WebInspector.RemoteObject.prototype.set else): Deleted.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady):
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.prototype.update):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype.):
(WebInspector.ObjectTreePropertyTreeElement.prototype):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.update):
2015-02-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: New Object Tree View UI
https://bugs.webkit.org/show_bug.cgi?id=141932
Reviewed by Timothy Hatcher.
Part 1: Majority of the UI.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/Eye.svg: Added.
* UserInterface/Images/TypeBoolean.svg: Added.
* UserInterface/Images/TypeNull.svg: Added.
* UserInterface/Images/TypeNumber.svg: Added.
* UserInterface/Images/TypeObject.svg: Added.
* UserInterface/Images/TypeRegex.svg: Added.
* UserInterface/Images/TypeString.svg: Added.
* UserInterface/Images/TypeSymbol.svg: Added.
* UserInterface/Images/TypeUndefined.svg: Added.
* UserInterface/Main.html:
Miscellaneous.
* UserInterface/Views/FormattedValue.css:
(.formatted-boolean):
Give booleans a light purple color.
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
Previously we were truncating function value logging in the console. E.g.
js> multiLineFunction
<- function multiLineFunction() {
No longer truncate so we display the full string.
* UserInterface/Models/PropertyPath.js: Added.
(WebInspector.PropertyPath):
(WebInspector.PropertyPath.prototype.get object):
(WebInspector.PropertyPath.prototype.get parent):
(WebInspector.PropertyPath.prototype.get isPrototype):
(WebInspector.PropertyPath.prototype.get rootObject):
(WebInspector.PropertyPath.prototype.get lastNonPrototypeObject):
(WebInspector.PropertyPath.prototype.get pathComponent):
(WebInspector.PropertyPath.prototype.get fullPath):
(WebInspector.PropertyPath.prototype.isRoot):
(WebInspector.PropertyPath.prototype.isPathComponentImpossible):
(WebInspector.PropertyPath.prototype.isFullPathImpossible):
(WebInspector.PropertyPath.prototype.appendPropertyName):
(WebInspector.PropertyPath.prototype.appendPropertySymbol):
(WebInspector.PropertyPath.prototype.appendInternalPropertyName):
(WebInspector.PropertyPath.prototype.appendArrayIndex):
(WebInspector.PropertyPath.prototype.appendCollectionIndex):
(WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
(WebInspector.PropertyPath.prototype._canPropertyNameBeDotAccess):
PropertyPaths are a linked list of remote object / patch component pairs.
For a property like "foo['property 1'].__proto__.baz" we will have a PropertyPath
chain with the RemoteObject for each component. This allows us to accurately
select the RemoteObject on which we should invoke a getter. It also allows
us to display the property path string from the root object, if possible.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.callFunction):
(WebInspector.RemoteObject.prototype.backendInvokeGetter):
(WebInspector.RemoteObject.prototype.invokeGetter):
Provide a way to invoke a getter function on a remote object if we
have a reference to the getter function. At the same time, improve
the mostly unused callFunction API to automatically convert
RemoteObjects / values to their Runtime.CallArgument format.
* UserInterface/Views/ObjectTreePropertyTreeElement.css: Added.
(.object-tree-property):
(.object-tree-property > .disclosure-button):
(.object-tree-property.parent > .disclosure-button):
(.object-tree-property.parent.expanded > .disclosure-button):
(.object-tree-property > .titles):
Focused styles for the ObjectTree property GeneralTreeElements.
Reuse navigation sidebar disclosure-triangles.
(.object-tree-property > .icon):
(.object-tree-property.boolean > .icon):
(.object-tree-property.function > .icon):
(.object-tree-property.number > .icon):
(.object-tree-property.object > .icon):
(.object-tree-property.object.null > .icon):
(.object-tree-property.object.node > .icon):
(.object-tree-property.regex > .icon):
(.object-tree-property.string > .icon):
(.object-tree-property.symbol > .icon):
(.object-tree-property.undefined > .icon):
Use different icons for different object types. Special case
"accessor" to be undefined.
(.object-tree-property .prototype-name):
(.object-tree-property .property-name.not-enumerable):
Style property names in sans-serif font.
Give non-enumerable properties a slightly transparent look.
(.object-tree-property.prototype-property):
(.object-tree-property.prototype-property > .icon):
(.object-tree-property.prototype-property + ol):
Special styles for prototype properties and their children.
(.object-tree-property .getter):
(.object-tree-property .getter:hover):
(.object-tree-property .read-only):
Styles for clickable getter button and non-interactive read-only indicator.
(.object-tree-property :matches(.formatted-string, .formatted-regexp)):
Do not allow wrapping for values that previously allowed wrapping.
(.object-tree-property .value.error):
If getting a value resulted in an error, display that error in red.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
Extend from GeneralTreeElement and set up class names on the root <li> object.
(WebInspector.ObjectTreePropertyTreeElement.prototype.onattach): Deleted.
No longer needed by using GeneralTreeElement.
(WebInspector.ObjectTreePropertyTreeElement.prototype.onexpand):
(WebInspector.ObjectTreePropertyTreeElement.prototype.oncollapse):
Expand / collapse an associated ObjectPreview if we have one.
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue):
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
This PropertyTreeElement may be displaying for a value, or a getter that has
gotten a value. Refer to this as the "resolvedValue".
(WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath):
A PropertyPath leaf used for tooltips.
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTooltips):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
Helpers for updating small parts of the UI. When a getter is invoked,
we need to update the entire UI of this TreeElement.
(WebInspector.ObjectTreePropertyTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitle): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitlePropertyStyle): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAPIStyle): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitleAPIStyle):
Create the UI for the mainTitle of this PropertyTreeElement.
(WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createReadOnlyIconElement):
Helpers for creating the small components of the title UI.
(WebInspector.ObjectTreePropertyTreeElement.prototype._alwaysDisplayAsProperty):
Establish when a property should still be displayed as a "property" even when in API mode.
For example a value property on a prototype, should still display as an expandable property.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree > :matches(.title, .object-preview)::before):
(.object-tree:not(.lossless-preview) > :matches(.title, .object-preview)):
(.object-tree.expanded > :matches(.title, .object-preview)::before):
(.object-tree .object-tree-outline):
(.object-tree-outline ol):
(.object-tree-outline li .empty-message):
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline):
(.object-tree > .title): Deleted.
(.object-tree-outline): Deleted.
(.object-tree-outline li): Deleted.
(.object-tree-outline li.parent): Deleted.
(.object-tree-outline li.parent::before): Deleted.
(.object-tree-outline li.parent.expanded::before): Deleted.
(.object-tree-property .name): Deleted.
(.object-tree-property .name.not-enumerable): Deleted.
(.object-tree-property .value.error): Deleted.
(.console-group-messages .object-tree:not(.lossless-preview)): Deleted.
(.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)): Deleted.
(.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)::before): Deleted.
(.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree): Deleted.
(.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline): Deleted.
Move most PropertyTreeElement specific styles into ObjectPropertyTreeElement.css.
Plenty of console specific files were eliminated.
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.update):
(WebInspector.ObjectTreeView.prototype._updateProperties):
Part 2: Provide better parameter lists for native functions.
When expanding an object's prototype chain, with authored code
you will accurately see parameter lists for user authored functions
because we can get this by parsing Function.prototype.toString.
For native code, we don't get any parameter information. In such cases
we can detect we are a native function, and provide our own strings.
This fills in most of the JavaScript built-ins and some DOM
functions, however we should autogenerate the rest of the DOM.
* UserInterface/Base/Utilities.js:
(isFunctionStringNativeCode):
Helper to check if a function is native or not based on its string.
* UserInterface/Main.html:
* UserInterface/Models/NativeFunctionParameters.js: Added.
Dictionary of parameter lists for native constructor functions
and prototype functions.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionPropertyString):
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
(WebInspector.ObjectTreePropertyTreeElement.prototype):
When we have a native function, try to provide a better parameter string.
Part 3: Better handle errors when invoking getters.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.callFunction):
(WebInspector.RemoteObject.prototype.invokeGetter):
Pass the error, wasThrown, and result through to the caller so they can
act on all the information possible. Provide encapsulation though
and auto-convert the result to a RemoteObject for the callback.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady):
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._createTooltipForNode.setTooltip):
(WebInspector.DOMTreeElement.prototype._createTooltipForNode.resolvedNode):
(WebInspector.DOMTreeElement.prototype._createTooltipForNode):
Update current users of callFunctionOn for the new callback parameters.
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property.had-error > .icon):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement.):
Better style getters with errors.
2015-02-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Do not show "{}" after Date description in Object Previews
https://bugs.webkit.org/show_bug.cgi?id=141898
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
Only show "{...}" section for Date objects that have user
defined properties. Otherwise, Dates do not have properties.
2015-02-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused console-object-preview styles - replaced by ObjectPreviewView
https://bugs.webkit.org/show_bug.cgi?id=141945
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.css:
(.console-object-preview): Deleted.
(.expanded .console-object-preview): Deleted.
(.console-object-preview .name): Deleted.
(.expanded .console-object-preview > .console-object-preview-body): Deleted.
(.console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
2015-02-23 Saam Barati <saambarati1@gmail.com>
Web Inspector: BasicBlockAnnotator ranges should be inclusive of both the start and end offset
https://bugs.webkit.org/show_bug.cgi?id=141334
Reviewed by Timothy Hatcher.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.addStyleToTextRange):
2015-02-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Lazily Create GeneralTreeElement Status Elements
https://bugs.webkit.org/show_bug.cgi?id=141873
Reviewed by Timothy Hatcher.
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set status):
(WebInspector.GeneralTreeElement.prototype.onattach):
(WebInspector.GeneralTreeElement.prototype._createElementsIfNeeded):
(WebInspector.GeneralTreeElement.prototype._updateStatusElement):
Lazily create and attach the status element container if
"this.status" is actually used by a GeneralTreeElement subclass.
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateStatus):
Set to the empty string instead of null to avoid inadvertently
creating status elements for no reason.
2015-02-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Give ObjectPreviewView a showTitle/showPreview toggle
https://bugs.webkit.org/show_bug.cgi?id=141874
Reviewed by Timothy Hatcher.
Refactor ObjectTree/ObjectPreview a bit to make it easier
to use expanding/collapsing previews in other places.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView):
(WebInspector.ObjectPreviewView.prototype.showTitle):
(WebInspector.ObjectPreviewView.prototype.showPreview):
Maintain both a titleElement and previewElement. Show only
one at a time based on showTitle/showPreview APIs.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree.expanded .object-preview):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
(WebInspector.ObjectTreeView.prototype.expand):
(WebInspector.ObjectTreeView.prototype.collapse):
If we have a preview, let PreviewView handle toggling
between a title and preview display.
2015-02-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Make Console UI icons / lines slightly larger
https://bugs.webkit.org/show_bug.cgi?id=141876
Reviewed by Timothy Hatcher.
In preparation for a new ObjectTree design with larger icons,
increase the size of existing output in the Console / Log
so they don't look so small in comparison. This:
- bumps minimum height of lines from 16px to 21px
- 10x10 icons to be 12x12
- recenters icons to match console prompt
- realigns icons with console log / object output
* UserInterface/Views/LogContentView.css:
(.console-user-command-result.console-log-level::before):
(.console-message, .console-user-command):
(.console-item::before):
(.console-user-command::before):
(:matches(.console-warning-level, .console-error-level, .console-log-level).console-message):
(:matches(.console-warning-level, .console-error-level, .console-log-level)::before):
(.outline-disclosure li):
(.outline-disclosure .expanded li):
Fix a case breaking single-line message height.
Only add padding to expanded trees, not collapsed trees.
* UserInterface/Views/QuickConsole.css:
(.quick-console > .console-prompt::before):
2015-02-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Generate Previews more often for RemoteObject interaction
https://bugs.webkit.org/show_bug.cgi?id=141875
Reviewed by Timothy Hatcher.
* UserInterface/Models/PropertyDescriptor.js:
(WebInspector.PropertyDescriptor.fromPayload):
Fix InternalPropertyDescriptor ingestion. There was no ".internal"
property on these objects, so take a flag.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype._getPropertyDescriptors):
Fix InternalPropertyDescriptor ingestion by specifying during
importing the internal properties. Also, get previews.
(WebInspector.RemoteObject.prototype.callFunction):
Always get previews when using callFunctionOn.
2015-02-20 Ronald Jett <rjett@apple.com>
Web Inspector: Add a setting for clearing the console on page reload
https://bugs.webkit.org/show_bug.cgi?id=134414
Reviewed by Timothy Hatcher.
Created a new setting "clear-log-on-reload", which defaults to true.
Users can toggle this setting with an item added to the console's context menu.
When enabled, the console will clear on page reload. When disabled, the console
content will remain during page reloads.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._sessionStarted):
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
(WebInspector.LogContentView.prototype._toggleClearLogOnReloadSetting):
2015-02-19 Saam Barati <saambarati1@gmail.com>
Web Inspector: merge in upstream Esprima to support parsing more of ES6
https://bugs.webkit.org/show_bug.cgi?id=141215
Reviewed by Timothy Hatcher.
This patch merges in a new esprima that has some ES6 support.
Specifically, the ES6 support ScriptSyntaxTree now has is:
- ForOf loops
- Object destructuring
- Array destructuring
ScriptSyntaxTree now uses Symbols for identifying AST node types
instead of strings. This will prevent any direct usage of strings
for node types instead of a direct property access off the
ScriptSyntaxTree constructor.
This patch also does some gardening work:
- TypeTokenAnnotator only walks over the incoming type information
data once to be more efficient.
- TypeTokenView is now smarter about updating its associated DOM node
only if its display name has changed.
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeTokensForEachNode):
* UserInterface/External/Esprima/esprima.js:
(.):
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype.gatherIdentifiersInVariableDeclaration):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
* UserInterface/Views/TypeTokenView.js:
(WebInspector.TypeTokenView.prototype.update):
2015-02-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Use of Array.from for NodeList/Arguments to Array conversion
https://bugs.webkit.org/show_bug.cgi?id=141819
Reviewed by Timothy Hatcher.
Array.from is clearer than Array.prototype.slice.call(arrayLike).
* UserInterface/Base/Test.js:
(.console.logType):
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Command.prototype.promise):
(InspectorBackend.Command.prototype._invokeWithArguments):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._allMessages):
2015-02-19 Joseph Pecoraro <pecoraro@apple.com>
Follow-up fix to r180371. formatParameterAsValue expects full object, not just a description.
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
2015-02-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Introduce FormattedValue helpers and use them in Console/ObjectTree
https://bugs.webkit.org/show_bug.cgi?id=141812
Reviewed by Timothy Hatcher.
There were a few different ways to get styled values. Try to consolidate them
all in FormattedValue. That is also a convenient place to have the styles.
* UserInterface/Main.html:
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatMessage):
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsValue):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.ConsoleMessageImpl.prototype._userProvidedColumnNames):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
(WebInspector.ConsoleMessageImpl.prototype._populateStackTraceTreeElement):
(WebInspector.ConsoleMessageImpl.prototype._propertyPreviewElement): Deleted.
Fix console.table after renaming ObjectPreview.properties to ObjectPreview.propertyPreviews.
Also, use FormattedValue to create the value elements. Also, remove class
"source-code" as I do not see it actually being used in a meaningful way.
* UserInterface/Views/FormattedValue.css: Added.
(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap):
(.formatted-number):
(.formatted-string, .formatted-regexp):
(.formatted-string):
(.formatted-regexp):
(.formatted-symbol):
(.formatted-null, .formatted-undefined):
* UserInterface/Views/FormattedValue.js: Added.
(WebInspector.FormattedValue.classNameForTypes):
(WebInspector.FormattedValue.classNameForObject):
(WebInspector.FormattedValue.createLinkifiedElementString):
(WebInspector.FormattedValue.createElementForTypesAndValue):
(WebInspector.FormattedValue.createElementForRemoteObject):
(WebInspector.FormattedValue.createElementForObjectPreview):
(WebInspector.FormattedValue.createElementForPropertyPreview):
Styles and formatted value element creation.
* UserInterface/Views/LogContentView.css:
(.expandable.source-code): Deleted.
Remove ".source-code". I do not see it actually being used in a meaningful way.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
(WebInspector.ObjectPreviewView.prototype._appendValuePreview):
(WebInspector.ObjectPreviewView.prototype._formattedObjectElementForPreview): Deleted.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._descriptionString): Deleted.
* UserInterface/Views/ObjectTreeView.css:
(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap): Deleted.
(.formatted-number): Deleted.
(.formatted-string, .formatted-regexp): Deleted.
(.formatted-string): Deleted.
(.formatted-regexp): Deleted.
(.formatted-symbol): Deleted.
(.formatted-null, .formatted-undefined): Deleted.
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.classNameForObject): Deleted.
Extract styles and value formatting to FormattedValue helpers.
2015-02-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Disable DOM Tree Editing / Styles Editing of Shadow DOM Nodes
https://bugs.webkit.org/show_bug.cgi?id=141793
Unreviewed follow-up. Fix prototypes.
* UserInterface/Views/ObjectPreviewView.js:
* UserInterface/Views/ObjectTreeView.js:
2015-02-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Create Separate Model and View Objects for RemoteObjects / ObjectPreview / PropertyDescriptor
https://bugs.webkit.org/show_bug.cgi?id=141696
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
Add new files.
* UserInterface/Models/CollectionEntry.js: Added.
(WebInspector.CollectionEntry):
(WebInspector.CollectionEntry.fromPayload):
(WebInspector.CollectionEntry.prototype.get key):
(WebInspector.CollectionEntry.prototype.get value):
* UserInterface/Models/CollectionEntryPreview.js: Added.
(WebInspector.CollectionEntryPreview):
(WebInspector.CollectionEntryPreview.fromPayload):
(WebInspector.CollectionEntryPreview.prototype.get keyPreview):
(WebInspector.CollectionEntryPreview.prototype.get valuePreview):
* UserInterface/Models/ObjectPreview.js: Added.
(WebInspector.ObjectPreview):
(WebInspector.ObjectPreview.fromPayload):
(WebInspector.ObjectPreview.prototype.get type):
(WebInspector.ObjectPreview.prototype.get subtype):
(WebInspector.ObjectPreview.prototype.get description):
(WebInspector.ObjectPreview.prototype.get lossless):
(WebInspector.ObjectPreview.prototype.get overflow):
(WebInspector.ObjectPreview.prototype.get properties):
(WebInspector.ObjectPreview.prototype.get entries):
* UserInterface/Models/PropertyPreview.js: Added.
(WebInspector.PropertyPreview):
(WebInspector.PropertyPreview.fromPayload):
(WebInspector.PropertyPreview.prototype.get name):
(WebInspector.PropertyPreview.prototype.get type):
(WebInspector.PropertyPreview.prototype.get subtype):
(WebInspector.PropertyPreview.prototype.get value):
(WebInspector.PropertyPreview.prototype.get valuePreview):
* UserInterface/Models/PropertyDescriptor.js: Added.
(WebInspector.PropertyDescriptor.fromPayload):
(WebInspector.PropertyDescriptor.prototype.get name):
(WebInspector.PropertyDescriptor.prototype.get value):
(WebInspector.PropertyDescriptor.prototype.get writable):
(WebInspector.PropertyDescriptor.prototype.get configurable):
(WebInspector.PropertyDescriptor.prototype.get enumerable):
(WebInspector.PropertyDescriptor.prototype.get isOwnProperty):
(WebInspector.PropertyDescriptor.prototype.get wasThrown):
(WebInspector.PropertyDescriptor.prototype.get isInternalProperty):
(WebInspector.PropertyDescriptor.prototype.hasValue):
(WebInspector.PropertyDescriptor.prototype.hasGetter):
(WebInspector.PropertyDescriptor.prototype.hasSetter):
New Model objects for different Protocol types.
The only customizations right now are compatibility modifications
and PropertyDescriptor's "hasValue", "hasGetter", and "hasSetter"
functions to return reliable checks based on the descriptors contents.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.resolveNode):
(WebInspector.RemoteObject.prototype.get value):
(WebInspector.RemoteObject.prototype._isSymbol):
(WebInspector.RemoteObject.prototype.isCollectionType):
(WebInspector.RemoteObject.prototype.isWeakCollection):
(WebInspector.RemoteObject.prototype.getCollectionEntries):
(WebInspector.RemoteObject.prototype.arrayLength):
Clean up the existing code to enforce more checks and use our
style of member variables and public accessors.
(WebInspector.RemoteObject.prototype.getOwnPropertyDescriptors):
(WebInspector.RemoteObject.prototype.getOwnAndGetterPropertyDescriptors):
(WebInspector.RemoteObject.prototype.getAllPropertyDescriptors):
(WebInspector.RemoteObject.prototype.callback):
Provide a new way of getting properties that returns Model objects
instead of raw protocol types.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._format):
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype._propertyPreviewElement):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
(WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry):
Always include a preview when possible. Now, when forced to be an object,
force expansion even if the preview is lossless.
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
Use an ObjectTreeView instead of ObjectPropertiesSection.
(WebInspector.ConsoleMessageImpl.prototype._appendPreview): Deleted.
(WebInspector.ConsoleMessageImpl.prototype._appendEntryPreviews): Deleted.
(WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews): Deleted.
(WebInspector.ConsoleMessageImpl.prototype._appendValuePreview): Deleted.
This code is moved into ObjectPreviewView.
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand.callback):
(WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand):
These types are now converted to Model types in Model objects, so do not do it here.
* UserInterface/Views/ObjectPreviewView.css: Added.
(.object-preview):
(.object-preview.lossless):
(.object-preview .name):
* UserInterface/Views/ObjectPreviewView.js: Added.
(WebInspector.ObjectPreviewView):
(WebInspector.ObjectPreviewView.prototype.get preview):
(WebInspector.ObjectPreviewView.prototype.get element):
(WebInspector.ObjectPreviewView.prototype.get mode):
(WebInspector.ObjectPreviewView.prototype.get lossless):
(WebInspector.ObjectPreviewView.prototype._numberOfPropertiesToShowInMode):
(WebInspector.ObjectPreviewView.prototype._appendPreview):
(WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
(WebInspector.ObjectPreviewView.prototype._appendValuePreview):
(WebInspector.ObjectPreviewView.prototype._formattedObjectElementForPreview):
An ObjectPreviewView can create a full/brief view given a ObjectPreview.
The view will contain formatted values everywhere possible.
* UserInterface/Views/ObjectTreePropertyTreeElement.js: Added.
(WebInspector.ObjectTreePropertyTreeElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype.get property):
(WebInspector.ObjectTreePropertyTreeElement.prototype.onpopulate):
(WebInspector.ObjectTreePropertyTreeElement.prototype.onattach):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAPIStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._descriptionString):
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
(WebInspector.ObjectTreePropertyTreeElement.prototype.mode):
(WebInspector.ObjectTreePropertyTreeElement.prototype):
* UserInterface/Views/ObjectTreeView.js: Added.
(WebInspector.ObjectTreeView):
(WebInspector.ObjectTreeView.classNameForObject):
(WebInspector.ObjectTreeView.ComparePropertyDescriptors):
(WebInspector.ObjectTreeView.prototype.get object):
(WebInspector.ObjectTreeView.prototype.get element):
(WebInspector.ObjectTreeView.prototype.get expanded):
(WebInspector.ObjectTreeView.prototype.expand):
(WebInspector.ObjectTreeView.prototype.collapse):
(WebInspector.ObjectTreeView.prototype.update):
(WebInspector.ObjectTreeView.prototype._updateProperties):
(WebInspector.ObjectTreeView.prototype._handlePreviewOrTitleElementClick):
Re-implementation of ObjectPropertiesSection for our Model objects
without "Section" semantics / dependencies. An ObjectTree will creates
an expandable tree for a RemoteObject. The top level clickable item
will be an ObjectPreview if possible, otherwise just a title element.
* UserInterface/Views/ObjectTreeView.css: Added.
(.object-tree):
(.object-tree > .title):
(.object-tree > :matches(.title, .object-preview)::before):
(.object-tree.expanded > :matches(.title, .object-preview)::before):
(.object-tree.lossless-preview > :matches(.title, .object-preview)::before):
(.object-tree-outline):
(.object-tree.expanded > .object-tree-outline):
(.object-tree-outline li):
(.object-tree-outline li.parent):
(.object-tree-outline li.parent::before):
(.object-tree-outline li.parent.expanded::before):
(.object-tree-outline ol):
(.object-tree-outline ol.expanded):
(.object-tree-outline li .empty-message):
(.object-tree-property .name):
(.object-tree-property .name.not-enumerable):
(.object-tree-property .value.error):
(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap):
(.formatted-number):
(.formatted-string, .formatted-regexp):
(.formatted-string):
(.formatted-regexp):
(.formatted-symbol):
(.formatted-null, .formatted-undefined):
(.console-group-messages .object-tree:not(.lossless-preview)):
(.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)):
(.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)::before):
(.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree):
(.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline):
All styles for ObjectTree / ObjectPreview. Independent from
other styles in the inspector. Most of this is a copy of
the styles applied to ObjectPropertiesSection, renamed.
* UserInterface/Views/ObjectTreeCollectionTreeElement.js: Added.
(WebInspector.ObjectTreeCollectionTreeElement):
(WebInspector.ObjectTreeCollectionTreeElement.propertyDescriptorForEntry):
(WebInspector.ObjectTreeCollectionTreeElement.prototype.get remoteObject):
(WebInspector.ObjectTreeCollectionTreeElement.prototype.onexpand.callback):
(WebInspector.ObjectTreeCollectionTreeElement.prototype.onexpand):
(WebInspector.ObjectTreeCollectionTreeElement.prototype.oncollapse):
(WebInspector.ObjectTreeCollectionTreeElement.prototype.ondetach):
(WebInspector.ObjectTreeCollectionTreeElement.prototype._trackWeakEntries):
(WebInspector.ObjectTreeCollectionTreeElement.prototype._untrackWeakEntries):
(WebInspector.ObjectTreeCollectionEntryTreeElement):
(WebInspector.ObjectTreeCollectionEntryTreeElement.prototype.onpopulate):
(WebInspector.ObjectTreeCollectionEntryTreeElement.prototype.onattach):
(WebInspector.ObjectTreeEmptyCollectionTreeElement):
Essentially a copy of ObjectPropertiesSection Collection handling using
the ObjectTree class names.
* UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
Fix prototype typo.
2015-02-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: DOMTree / Node Details Sidebar do not update as <input> content changes
https://bugs.webkit.org/show_bug.cgi?id=141790
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._characterDataModified):
Update Node "Value" details if character data changes.
* UserInterface/Views/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
Update the title of the parent. If the parent had a single text node child
and now doesn't, it will need to update its display.
2015-02-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Disable DOM Tree Editing / Styles Editing of Shadow DOM Nodes
https://bugs.webkit.org/show_bug.cgi?id=141793
Reviewed by Timothy Hatcher.
Currently the backend disallows editing of Shadow DOM nodes,
so the frontend should not provide options that do not work.
Long term we should allow editing Shadow DOM nodes.
* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.get editable):
Inline styles on a Shadow DOM node are not editable.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.ondelete):
(WebInspector.DOMTreeElement.prototype._startEditingTarget):
(WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
(WebInspector.DOMTreeElement.prototype._populateTextContextMenu):
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
(WebInspector.DOMTreeElement.prototype._startEditing):
Disable context menus and keyboard shortcuts on Shadow DOM nodes.
Only Context Menu item we keep is "Copy as HTML".
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
Eliminate double look-up.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.addNewRuleButton):
Do not add the New Rule Button to the Styles Sidebar of Shadow DOM Nodes.
Instead this will just be an empty divider.
2015-02-18 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: REGRESSION: Missing Divider line between console.log and console evaluation
https://bugs.webkit.org/show_bug.cgi?id=141770
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.css:
(.console-item):
(.console-message): Deleted.
2015-02-18 Jono Wells <jonowells@apple.com>
Web Inspector: Inspecting a page where resources are in folders forces folder organization on every subsequent page
https://bugs.webkit.org/show_bug.cgi?id=141397
Reviewed by Timothy Hatcher.
When removeChildren is called on an instance of a FolderizedTreeElement, the element's _groupedIntoFolders flag
will now be set to false. This will prevent unnecessary folderization upon a frame navigation. Also during an
onpopulate event, addChildForRepresentedObject is called repeatedly and much of the work done during each call
was unnecessary. That work has now been partially removed and partially relocated to a function that is only
called at the beginning of an onpopulate event.
* UserInterface/Views/FolderizedTreeElement.js:
(WebInspector.FolderizedTreeElement.prototype.set removeChildren): Set _groupedIntoFolders to false.
(WebInspector.FolderizedTreeElement.prototype.addChildForRepresentedObject): Remove unnecessary treeOutline
emptiness check, and move _shouldGroupIntoFolders() check to new function prepareToPopulate().
(WebInspector.FolderizedTreeElement.prototype.prepareToPopulate): Create.
(WebInspector.FolderizedTreeElement.prototype._populateFromNewChildQueue): Call prepareToPopulate().
* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.onpopulate): Call prepareToPopulate().
* UserInterface/Views/GeneralTreeElement.js: Drive-by inheritance style fix.
* UserInterface/Views/ResourceTreeElement.js: Drive-by inheritance style fix.
2015-02-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ES6: Improved Console Support for Promise Objects
https://bugs.webkit.org/show_bug.cgi?id=141634
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/RemoteObject.js:
For now just add Internal Properties and regular properties.
We will address the UI later.
2015-02-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Tweak the styles on the Console
https://bugs.webkit.org/show_bug.cgi?id=140580
- Use non-monospace (default sans-serif) font for console messages, but keep using monospace font
for objects, functions, and anything else that presumably code.
- Display all expandable objects on a separate row.
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleCommand.js:
(WebInspector.ConsoleCommand.prototype.decorateMessageElement):
(WebInspector.ConsoleCommand.prototype.toMessageElement):
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.addMessage):
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._format):
(WebInspector.ConsoleMessageImpl.prototype._isExpandable):
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype.append):
(WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
(WebInspector.ConsoleMessageImpl.prototype.decorateMessageElement):
(WebInspector.ConsoleMessageImpl.prototype.toMessageElement):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString): Deleted.
* UserInterface/Views/LogContentView.css:
(.console-messages):
(.console-formatted-object):
(.expandable.source-code):
(.console-message):
(.console-item.selected::after):
(.console-messages:focus .console-item.selected::after):
(.console-user-command-result.console-log-level::before):
(.console-item::before):
(.console-message .bubble):
(.console-error-level):
(.console-error-level .section .header .title):
(.console-error-level::before):
(.console-warning-level):
(.console-warning-level .console-message-text):
(.console-warning-level::before):
(.console-user-command::before):
(.console-group-messages .section):
(.console-group-messages .section .header::before):
(.console-group-messages .section .header .title):
(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap):
(.outline-disclosure li):
(.outline-disclosure li.parent::before):
(.console-item): Deleted.
(.console-item.selected): Deleted.
(.console-messages:focus .console-item.selected): Deleted.
(.console-item.selected .console-message::after): Deleted.
(.console-messages:focus .console-item.selected .data-grid tr.selected): Deleted.
(.console-messages:focus .console-item.selected .console-message::after): Deleted.
(.console-message, .console-user-command): Deleted.
(.console-message::before, .console-user-command::before, .javascript-prompt::before, .console-group-title::before): Deleted.
(.console-group): Deleted.
(.console-debug-level .console-message-text): Deleted.
(.console-debug-level::before): Deleted.
(.console-group-messages .section .header): Deleted.
(.console-group-messages .outline-disclosure): Deleted.
(.console-group-messages .outline-disclosure > ol): Deleted.
(.outline-disclosure li.elements-drag-over .selection): Deleted.
(.outline-disclosure ol:focus li.selected .selection): Deleted.
(.outline-disclosure > ol): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._mousemove):
(WebInspector.LogContentView.prototype._updateMessagesSelection):
(WebInspector.LogContentView.prototype._isMessageVisible):
(WebInspector.LogContentView.prototype._isMessageSelected):
(WebInspector.LogContentView.prototype._selectAllMessages):
(WebInspector.LogContentView.prototype._unfilteredMessages):
(WebInspector.LogContentView.prototype._visibleMessages):
(WebInspector.LogContentView.prototype._filterMessages):
(WebInspector.LogContentView.prototype._leftArrowWasPressed):
(WebInspector.LogContentView.prototype._propertiesSectionDidUpdateContent):
(WebInspector.LogContentView.prototype._performSearch):
* UserInterface/Views/Section.css:
(.section .header .title::before):
(.section.expanded .header .title::before):
(.section .header .title, .event-bar .header .title):
(.properties-tree li.parent::before):
(.section .header::before): Deleted.
(.section.expanded .header::before): Deleted.
2015-02-15 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: remove unused XHR replay code
https://bugs.webkit.org/show_bug.cgi?id=141622
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:
2015-02-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove specificity approximation
https://bugs.webkit.org/show_bug.cgi?id=141600
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
2015-02-13 Timothy Hatcher <timothy@apple.com>
Web Inspector: support better git diff of localizedStrings.js
https://bugs.webkit.org/show_bug.cgi?id=137237
Reviewed by Joseph Pecoraro.
* .gitattributes: Added.
2015-02-12 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: add keyboard shortcut to enable/disable all breakpoints
https://bugs.webkit.org/show_bug.cgi?id=141527
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel): Bind Command/Control + Y to toggle breakpoints button.
2015-02-12 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: support adding and removing timelines to the timeline sidebar panel and overview
https://bugs.webkit.org/show_bug.cgi?id=138434
Reviewed by Timothy Hatcher.
A timeline recording's timelines should not be static. This patch adds relevant machinery to
dynamically add and remove timelines from the Timeline model object and its various views.
From the model side, this is a simple change that adds TimelineAdded and TimelineRemoved events.
The timeline views and timeline sidebar require more extensive changes to support this functionality.
Instead of keeping a fixed set of timeline tree elements, the sidebar view now adds and removes
tree elements to reflect the available timelines for the displayed timeline recording.
This change also includes several minor cleanups, such as appending 'Element' to view properties that
are DOM elements, and renaming TimelineContentView to TimelineRecordingContentView.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._loadNewRecording):
Populate predefined network, layout, and script timelines here after constructing the recording.
* UserInterface/Main.html:
* UserInterface/Models/Timeline.js:
Move hardcoded class names and localized strings to these base class methods. This is not implemented
using overridden methods because not all timeline types have their own subclasses. Add a dummy
implementation of saveIdentityToCookie() to avoid warnings when saving sidebar panel selection state.
(WebInspector.Timeline.prototype.get type):
(WebInspector.Timeline.prototype.get displayName): Added.
(WebInspector.Timeline.prototype.get iconClassName): Added.
(WebInspector.Timeline.prototype.addRecord):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.addTimeline.set timeline): Added.
(WebInspector.TimelineRecording.prototype.addTimeline): Added.
(WebInspector.TimelineRecording.prototype.removeTimeline.get this): Added.
(WebInspector.TimelineRecording.prototype.removeTimeline): Added.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
* UserInterface/Views/LayoutTimelineView.css:
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.layout .item .subtitle):
(.sidebar > .panel.navigation.timeline.timeline-content-view-showing .navigation-sidebar-panel-content-tree-outline.layout .item .subtitle): Deleted.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._treeElementSelected):
(WebInspector.LayoutTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie): Fix error message formatting.
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
* UserInterface/Views/NetworkTimelineView.css:
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.network .item .subtitle):
(.sidebar > .panel.navigation.timeline.timeline-content-view-showing .navigation-sidebar-panel-content-tree-outline.network .item .subtitle): Deleted.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/ScriptTimelineView.css:
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.script .item .subtitle):
(.sidebar > .panel.navigation.timeline.timeline-content-view-showing .navigation-sidebar-panel-content-tree-outline.script .item .subtitle): Deleted.
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype._treeElementSelected):
(WebInspector.ScriptTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/TimelineOverview.js:
Convert this class to use the representedObject class pattern. It manages its own mapping from timelines
to overview graph views. Append 'Element' to some properties holding DOM elements.
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.get visibleDuration):
(WebInspector.TimelineOverview.prototype.reset):
(WebInspector.TimelineOverview.prototype.updateLayout):
(WebInspector.TimelineOverview.prototype._handleScrollEvent):
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
(WebInspector.TimelineOverview.prototype._timelineRemoved):
(WebInspector.TimelineOverview.prototype.updateLayoutIfNeeded):
(WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
* UserInterface/Views/TimelineRecordingContentView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/TimelineContentView.css.
Remove hard-coded top offsets and heights that need to be dynamically calculated.
(.content-view.timeline-recording > .timeline-overview):
(.content-view.timeline-recording > .view-container):
(.content-view.timeline-recording > .view-container > .timeline-view > .data-grid td):
(.content-view.timeline-recording > .view-container > .timeline-view > .data-grid table.data):
* UserInterface/Views/TimelineRecordingContentView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/TimelineContentView.js.
Manage timeline views and path components dynamically. Adjust view heights as necessary. Append 'Element'
to some properties holding DOM elements.
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype.showOverviewTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
(WebInspector.TimelineRecordingContentView.prototype.get allowedNavigationSidebarPanels):
(WebInspector.TimelineRecordingContentView.prototype.get supportsSplitContentBrowser):
(WebInspector.TimelineRecordingContentView.prototype.get navigationItems):
(WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.shown):
(WebInspector.TimelineRecordingContentView.prototype.hidden):
(WebInspector.TimelineRecordingContentView.prototype.filterDidChange):
(WebInspector.TimelineRecordingContentView.prototype.updateLayout):
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie):
(WebInspector.TimelineRecordingContentView.prototype.restoreFromCookie):
(WebInspector.TimelineRecordingContentView.prototype.get matchTreeElementAgainstCustomFilters.checkTimeBounds):
(WebInspector.TimelineRecordingContentView.prototype.get matchTreeElementAgainstCustomFilters):
(WebInspector.TimelineRecordingContentView.prototype._pathComponentSelected):
(WebInspector.TimelineRecordingContentView.prototype._timelineViewSelectionPathComponentsDidChange):
(WebInspector.TimelineRecordingContentView.prototype._showTimelineView):
(WebInspector.TimelineRecordingContentView.prototype._update):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
(WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
(WebInspector.TimelineRecordingContentView.prototype._stopUpdatingCurrentTime):
(WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
(WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
(WebInspector.TimelineRecordingContentView.prototype._debuggerPaused):
(WebInspector.TimelineRecordingContentView.prototype._debuggerResumed):
Fix a minor regression where we make a useless call to stop updating the time.
(WebInspector.TimelineRecordingContentView.prototype._recordingTimesUpdated):
(WebInspector.TimelineRecordingContentView.prototype._clearTimeline):
(WebInspector.TimelineRecordingContentView.prototype._timelineRemoved):
(WebInspector.TimelineRecordingContentView.prototype._timelineCountChanged):
(WebInspector.TimelineRecordingContentView.prototype._recordingReset):
(WebInspector.TimelineRecordingContentView.prototype._recordingUnloaded):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing > .content):
(.sidebar > .panel.navigation.timeline.timeline-content-view-showing > .content): Deleted.
* UserInterface/Views/TimelineSidebarPanel.js:
Manage timeline tree elements dynamically. Adjust view heights as necessary. Append 'Element'
to some properties holding DOM elements. Keep track of the displayed recording and view explicitly.
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype.shown):
(WebInspector.TimelineSidebarPanel.prototype.showDefaultContentView):
(WebInspector.TimelineSidebarPanel.prototype.treeElementForRepresentedObject.looselyCompareRepresentedObjects):
(WebInspector.TimelineSidebarPanel.prototype.showTimelineOverview):
(WebInspector.TimelineSidebarPanel.prototype.updateFilter):
(WebInspector.TimelineSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.TimelineSidebarPanel.prototype.canShowDifferentContentView):
(WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie):
(WebInspector.TimelineSidebarPanel.prototype.get if):
(WebInspector.TimelineSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
(WebInspector.TimelineSidebarPanel.prototype._recordingCountChanged):
(WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
(WebInspector.TimelineSidebarPanel.prototype._recordingLoaded):
(WebInspector.TimelineSidebarPanel.prototype._timelineRemoved):
(WebInspector.TimelineSidebarPanel.prototype._timelineCountChanged):
(WebInspector.TimelineSidebarPanel.createTimelineTreeElement): Deleted.
(WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie):
* UserInterface/Views/TimelineView.css:
(.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline):
(.panel.navigation.timeline.timeline-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline): Deleted.
2015-02-12 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: Large background image fails to load in inspector
https://bugs.webkit.org/show_bug.cgi?id=141405
Reviewed by Timothy Hatcher.
Convert base64-encoded resource data to binary data using Uint8Array and Blobs.
Use object URLs for blobs instead of data URLs when setting image 'src' attribute
and in @font-face urls. This conversion happens when the backend indicates that
resource content is base64-encoded.
Update image and font clients of resource-fetching functionality so that they use
object URLs correctly. Add some plumbing so that Blobs can be constructed with
the correct mime-type.
* UserInterface/Base/Utilities.js:
(decodeBase64ToBlob): Added.
* UserInterface/Models/CSSStyleSheet.js:
(WebInspector.CSSStyleSheet.prototype.get mimeType): Added.
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.createObjectURL): Added.
(WebInspector.Resource.prototype.getImageSize.imageDidLoad):
(WebInspector.Resource.prototype.getImageSize):
(WebInspector.Resource.prototype.get contentURL): Deleted.
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.get mimeType): Added.
* UserInterface/Models/SourceCode.js:
(WebInspector.SourceCode.prototype.get mimeType): Added.
(WebInspector.SourceCode.prototype._processContent):
(WebInspector.SourceCode.prototype.get contentIsBase64Encoded): Deleted.
* UserInterface/Models/SourceCodeRevision.js:
(WebInspector.SourceCodeRevision):
(WebInspector.SourceCodeRevision.prototype.copy):
(WebInspector.SourceCodeRevision.prototype.get contentIsBase64Encoded): Deleted.
(WebInspector.SourceCodeRevision.prototype.set contentIsBase64Encoded): Deleted.
* UserInterface/Views/FontResourceContentView.js:
(WebInspector.FontResourceContentView.prototype.hidden):
(WebInspector.FontResourceContentView.prototype.closed):
* UserInterface/Views/ImageResourceContentView.js:
(WebInspector.ImageResourceContentView.prototype.contentAvailable):
2015-02-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: REGRESSION: Clicking selected item in the sidebar second time should scroll to the corresponding line
https://bugs.webkit.org/show_bug.cgi?id=140280
Reviewed by Brian Burg.
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.showContentView):
Perform scolling regardless of the navigation history. Since scrolling source code doesn't introduce a BackForwardEntry,
it's possible that the actual content view has a different scroll position.
2015-02-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Better handle unknown release versions
https://bugs.webkit.org/show_bug.cgi?id=141454
Reviewed by Timothy Hatcher.
* UserInterface/Base/Platform.js:
If given an unknown Mac OS X version, at least parse
the version number in WebInspector.Platform.
2015-02-10 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Make collapsed sidebars undraggable
https://bugs.webkit.org/show_bug.cgi?id=140664
Reviewed by Timothy Hatcher.
* UserInterface/Views/Sidebar.css:
(.sidebar.collapsed):
(.sidebar.collapsed.right > .resizer): Deleted.
(.sidebar.collapsed.left > .resizer): Deleted.
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar):
(WebInspector.Sidebar.prototype._resizerMouseDown):
(WebInspector.Sidebar.prototype._resizerMouseMoved):
(WebInspector.Sidebar.prototype._resizerDoubleClicked): Deleted.
2015-02-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CSS Pretty Printing: still fails fails to put space between rgb(...) and numbers in minified gradients
https://bugs.webkit.org/show_bug.cgi?id=141411
Reviewed by Timothy Hatcher.
* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* UserInterface/Views/CodeMirrorFormatters.js:
Token actually was "number m-css" so we should check token strings
more robustly, like elsewhere in the formatters.
2015-02-09 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: Uncaught exception when reporting wrong backend command call signature
https://bugs.webkit.org/show_bug.cgi?id=141401
Reviewed by Joseph Pecoraro.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Command.prototype._invokeWithArguments): Fix wrong variable name.
2015-02-06 Jono Wells <jonowells@apple.com>
Web Inspector: REGRESSION: CSS Resource appears as empty after editing it via Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=140586
Reviewed by Timothy Hatcher.
Update SourceCode#_processContent to properly handle the promise returned from CSSAgent so that the content
will properly update when a style has changed. Properly clear the existing _requestContentPromise on the
stylesheet so that the content will update correctly.
* UserInterface/Controllers/CSSStyleManager.js: Drive-by style updates.
(WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets):
* UserInterface/Models/CSSStyleSheet.js: Drive-by inheritance style update.
(WebInspector.CSSStyleSheet.prototype.requestContentFromBackend): Remove unnecessary backend promise function call.
* UserInterface/Models/Resource.js: Drive-by removal of unused variable.
* UserInterface/Models/SourceCode.js:
(WebInspector.SourceCode.prototype.markContentAsStale): Clear _requestContentPromise.
(WebInspector.SourceCode.prototype._processContent): Handle `parameters.text` correctly.
2015-02-04 Jono Wells <jonowells@apple.com>
Web Inspector: REGRESSION: Inline SourceMap resources show empty content when opened.
https://bugs.webkit.org/show_bug.cgi?id=141225
Reviewed by Timothy Hatcher.
Change WebInspector.SourceMapResource.prototype.requestContentFromBackend to correctly and consistently handle
calls to NetworkAgent. The helper function sourceMapResourceLoaded will now properly handle parameters as a single
payload, including manual calls in the case where the source map content is in a data URI. Also
WebInspector.SourceCode.prototype._processContent now properly handles an error string used for displaying
resource loading error messages in the resource content view.
* UserInterface/Models/Resource.js: drive-by style fix.
* UserInterface/Models/SourceCode.js:
(WebInspector.SourceCode.prototype._processContent):
Properly handle error string.
* UserInterface/Models/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
(WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoaded):
Formerly sourceMapResourceLoadError, now handles parameters from the NetworkAgent correctly.
(WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoadError):
This function now handles NetworkAgent errors only.
2015-02-05 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: eliminate some unnecessary layout/painting in timeline overview and ruler
https://bugs.webkit.org/show_bug.cgi?id=141293
Reviewed by Timothy Hatcher.
The timeline overview's ruler was forcing repaints of divider labels even if the labels
had not changed since the last requestAnimationFrame. Bail out early if nothing changed.
The timeline overview and its graphs were updating layout using requestAnimationFrame
even when the TimelineContentView is not visible. Fix this by propagating visibility
changes to subviews, and not updating layout when hidden.
The above change also fixes an assertion sometimes encountered when the timeline view
tries to cache an element's offset width, but cannot because it isn't visible.
* UserInterface/Views/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype.shown):
(WebInspector.TimelineContentView.prototype.hidden):
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.get visible):
(WebInspector.TimelineOverview.prototype.shown):
(WebInspector.TimelineOverview.prototype.hidden):
(WebInspector.TimelineOverview.prototype._needsLayout):
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype.get visible):
(WebInspector.TimelineOverviewGraph.prototype.shown):
(WebInspector.TimelineOverviewGraph.prototype.hidden):
(WebInspector.TimelineOverviewGraph.prototype.needsLayout):
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.updateLayout):
2015-02-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ES6: Improved Console Support for Symbol Objects
https://bugs.webkit.org/show_bug.cgi?id=141173
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.prototype._isSymbol):
Symbols have an objectId because it is a non-primitive that cannot be passed
by value, however it cannot have properties, so handle some cases.
* UserInterface/Views/LogContentView.css:
(.console-formatted-symbol):
Give Symbol's their own color.
2015-02-04 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Insertion bar (caret) is hidden behind the placeholder text in the style editor
https://bugs.webkit.org/show_bug.cgi?id=139659
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):
Use non-monospace font to fit the placeholder text on a single line and
match the color if the native placeholder.
2015-02-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: console.table with columnName filter for non-existent property should still show column
https://bugs.webkit.org/show_bug.cgi?id=141066
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews):
(WebInspector.ConsoleMessageImpl.prototype._userProvidedColumnNames):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
If a second argument was provided to console.table, try to extract a list
of string names to use for the object properties. Output a table with
the provided column names, in the specified order. Also, use this
opportunity to mark missing properties with an em dash.
2015-02-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CSS Autocompletion: Autodetect many color supporting properties
https://bugs.webkit.org/show_bug.cgi?id=141166
Reviewed by Timothy Hatcher.
* UserInterface/Base/Utilities.js:
Add String.prototype.endsWith. Group String extensions together.
* UserInterface/Models/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
If a property name ends in "color", provide CSS color completions.
(WebInspector.CSSKeywordCompletions.isColorAwareProperty): Deleted.
This was unused and disagrees slightly with the implementation above.
2015-02-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Support console.table
https://bugs.webkit.org/show_bug.cgi?id=141058
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Index", "(Index)", "Value", table header strings.
* UserInterface/Views/ConsoleMessage.js:
Add "Table", but add FIXMEs to consider using the protocol generated enums.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._format):
Special case console.table messages.
(WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews):
(WebInspector.ConsoleMessageImpl.prototype._propertyPreviewElement):
Factor out ProjectPreview printing. Also, replace newlines in strings
with return characters, like we did elsewhere.
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
Ultimately try to create a DataGrid from the output. Search first
for rich object data in the list. If no rich object data is found
just check for simple values. If the table is lossy, also do
a log of the object in case the user wants to see more data.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
The for..in enumeration is unordered and may not give us the
column ordering we wanted. So include an optional preferred
column names list to get the preferred order.
(WebInspector.DataGrid.createSortableDataGrid):
Numerous bug fixes here. Accidental globals, typos, and sorting failures.
(WebInspector.DataGrid.prototype.autoSizeColumns):
(WebInspector.DataGrid.prototype.textForDataGridNodeColumn):
(WebInspector.DataGrid.prototype._copyTextForDataGridNode):
Create a generic method to get the text for a datagrid node in a column.
This is important for getting the text from console.table previews which
contains Nodes.
* UserInterface/Views/LogContentView.css:
(.console-messages:focus .console-item.selected .data-grid tr.selected):
(.console-item .data-grid tr.selected):
DataGrid selection colors while in the console which may or may
not have selected console items.
2015-02-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Extend CSS.getSupportedCSSProperties to provide values for properties for CSS Augmented JSContext
https://bugs.webkit.org/show_bug.cgi?id=141064
Reviewed by Timothy Hatcher.
* UserInterface/Models/CSSCompletions.js:
* UserInterface/Models/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.addCustomCompletions):
(WebInspector.CSSKeywordCompletions.addPropertyCompletionValues):
If a property is specified with custom values, extend the
keyword completions map to make those values available
in autocompletion.
2015-01-30 Joseph Pecoraro <pecoraro@apple.com>
Remote Web Inspector should not show undock toolbar buttons
https://bugs.webkit.org/show_bug.cgi?id=141061
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Be sure to update the toolbar's dock navigation icons because they
may need to be hidden (the default state).
2015-01-29 Saam Barati <saambarati1@gmail.com>
Web Inspector: Allow text selection when the BasicBlockAnnotator is enabled
https://bugs.webkit.org/show_bug.cgi?id=140987
Reviewed by Timothy Hatcher.
Because the BasicBlockAnnotator no longer sets the background color of
lines that haven't executed to gray, text selection while the
BasicBlockAnnotator is enabled no longer results in a bad user interface.
This patch both allows text selection while the BasicBlockAnnotator is
enabled and also removes the now unused listeners to CodeMirror's focus
and blur events.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler):
(WebInspector.SourceCodeTextEditor.prototype.gainedFocus): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.lostFocus): Deleted.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.gainedFocus): Deleted.
(WebInspector.TextEditor.prototype.lostFocus): Deleted.
2015-01-29 Saam Barati <saambarati1@gmail.com>
Web Inspector: Make BasicBlockAnnotator lessen the saturation of syntax highlighting instead of graying out unexecuted code
https://bugs.webkit.org/show_bug.cgi?id=141011
Reviewed by Timothy Hatcher.
This patch removes a lot of the complicated logic associated around
determining which code can be grayed out by the BasicBlockAnnotator.
Instead, the BasicBlockAnnotator now applies a CSS class to all the
code that has not executed which lessens the saturation of the
syntax coloring for the code. This creates both a nicer user
interface and a nicer user experience because it makes reading
source code with the BasicBlockAnnotator enabled more pleasant.
* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges.):
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
(WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock):
(WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyWhitespace): Deleted.
(WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyClosingBrace): Deleted.
(_canGrayOutEntireLine): Deleted.
(_grayOutLine): Deleted.
(_clearRangeForBasicBlockMarker.get marker): Deleted.
(_clearRangeForBasicBlockMarker): Deleted.
* UserInterface/Views/SourceCodeTextEditor.css:
(.hover-menu.color > img):
(.basic-block-has-not-executed): Deleted.
(.basic-block-has-not-executed-prepend::before): Deleted.
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
(.cm-s-default .basic-block-has-not-executed):
(.cm-s-default .basic-block-has-not-executed.cm-comment):
(.cm-s-default .basic-block-has-not-executed.cm-m-css:matches(.cm-atom, .cm-meta, .cm-variable-3, .cm-property)):
(.cm-s-default .basic-block-has-not-executed:matches(.cm-number, .cm-atom.cm-hex-color)):
(.cm-s-default .basic-block-has-not-executed.cm-string):
(.cm-s-default .basic-block-has-not-executed.cm-m-xml.cm-meta):
(.cm-s-default .basic-block-has-not-executed.cm-m-xml.cm-attribute):
2015-01-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ES6: Improved Console Format for Set and Map Objects (like Arrays)
https://bugs.webkit.org/show_bug.cgi?id=122867
Reviewed by Timothy Hatcher.
This includes Set/Map/WeakMap previews:
- Set previews: Set {1, 2, 3}
- Map/WeakMap previews: Map {1 => 2, "key" => "value"}
For WeakMaps:
- the preview itself shows up to 5 key/value pairs from when the object was logged
- the previews are strings only, and thus do not retain the actual keys/values
- when expanding, we get RemoteObjects and strongly retain the keys/values
- when collapsing / clearing, we release the RemoteObjects so they can get collected
Currently you collapse the <entries> section, and re-expand later the
collection may show you knew keys/values. The UI for this will change.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.isCollectionType):
(WebInspector.RemoteObject.prototype.isWeakCollection):
(WebInspector.RemoteObject.prototype.getCollectionEntries):
(WebInspector.RemoteObject.prototype.releaseWeakCollectionEntries):
(WebInspector.RemoteObject.prototype.arrayLength):
(WebInspector.RemoteObject.prototype._weakCollectionObjectGroup):
High level functions for dealing with a RemoteObject that may be a
collection / weak collection.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
Include default formatters for collection types.
(WebInspector.ConsoleMessageImpl.prototype._appendPreview):
(WebInspector.ConsoleMessageImpl.prototype._appendEntryPreviews):
(WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews):
(WebInspector.ConsoleMessageImpl.prototype._appendValuePreview):
(WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview): Deleted.
Refactor preview generation a bit and include a specific path for
generation the output of a preview with "entries".
* UserInterface/Views/LogContentView.css:
(.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object):
With nested Object previews ("Map {{a:1} => 1}") don't show "Object" for the inner
object preview. Only show it if it has a unique type ("Map {Foo {a:1} => 1}")
(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap):
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .section):
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .properties):
Make map/set/weakmap display like Objects.
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.prototype.update):
(WebInspector.ObjectPropertiesSection.prototype.updateProperties):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
(WebInspector.CollectionEntriesMainTreeElement):
(WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand.callback):
(WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand):
(WebInspector.CollectionEntriesMainTreeElement.prototype.oncollapse):
(WebInspector.CollectionEntriesMainTreeElement.prototype.ondetach):
(WebInspector.CollectionEntriesMainTreeElement.prototype._trackWeakEntries):
(WebInspector.CollectionEntriesMainTreeElement.prototype._untrackWeakEntries):
(WebInspector.CollectionEntryTreeElement):
(WebInspector.CollectionEntryTreeElement.prototype.onpopulate):
(WebInspector.CollectionEntryTreeElement.prototype.onattach):
(WebInspector.EmptyCollectionTreeElement):
(WebInspector.ObjectPropertiesSection.prototype.update.callback): Deleted.
Add a quick UI for exploring the entries of a collection. We are actively
changing the styles of objects in the Console, so this should change soon.
2015-01-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Change Main Frame Status Buttons when debugging Augmented JSContext
https://bugs.webkit.org/show_bug.cgi?id=141006
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Restart" string.
* UserInterface/Base/Main.js:
(WebInspector.canArchiveMainFrame):
* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.updateStatusForMainFrame):
(WebInspector.FrameTreeElement.prototype._updateDownloadButton):
Update the tooltip when in a non-Web debuggable, and only show
the Download button when in a Web debuggable.
* UserInterface/Views/TreeElementStatusButton.js:
(WebInspector.TreeElementStatusButton.prototype.set hidden):
Oops! The implementation was backwards. Simplify with classList.toggle.
2015-01-28 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: remove CSS.setPropertyText, CSS.toggleProperty and related dead code
https://bugs.webkit.org/show_bug.cgi?id=140961
Reviewed by Timothy Hatcher.
Setters for CSSProperty (except override) are not used, so delete them. These setters
and their callees in DOMNodeStyles were the only clients of the removed protocol commands.
* UserInterface/Models/CSSProperty.js:
(WebInspector.CSSProperty.prototype.update):
(WebInspector.CSSProperty.prototype.get name):
(WebInspector.CSSProperty.prototype.get value):
(WebInspector.CSSProperty.prototype.get priority):
(WebInspector.CSSProperty.prototype.hasOtherVendorNameOrKeyword):
(WebInspector.CSSProperty.prototype.set text): Deleted.
(WebInspector.CSSProperty.prototype.set name): Deleted.
(WebInspector.CSSProperty.prototype.set value): Deleted.
(WebInspector.CSSProperty.prototype.set important): Deleted.
(WebInspector.CSSProperty.prototype.set priority): Deleted.
(WebInspector.CSSProperty.prototype.set enabled): Deleted.
(WebInspector.CSSProperty.prototype.add): Deleted.
(WebInspector.CSSProperty.prototype.remove): Deleted.
(WebInspector.CSSProperty.prototype._updatePropertySoon.performUpdate): Deleted.
(WebInspector.CSSProperty.prototype._updatePropertySoon): Deleted.
(WebInspector.CSSProperty.prototype._cancelPendingUpdate): Deleted.
* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.addProperty): Deleted.
(WebInspector.CSSStyleDeclaration.prototype.removeProperty): Deleted.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addEmptyRule):
(WebInspector.DOMNodeStyles.prototype.addRule): Deleted.
(WebInspector.DOMNodeStyles.prototype.changeProperty): Deleted.
(WebInspector.DOMNodeStyles.prototype.changePropertyText): Deleted.
(WebInspector.DOMNodeStyles.prototype.changePropertyEnabledState): Deleted.
(WebInspector.DOMNodeStyles.prototype.addProperty): Deleted.
(WebInspector.DOMNodeStyles.prototype.removeProperty): Deleted.
(WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Deleted.
* UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype._newRuleClicked):
* Versions/Inspector-iOS-6.0.json:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:
2015-01-28 Dana Burkart <dburkart@apple.com>
Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=136765
Reviewed by Alexey Proskuryakov.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
2015-01-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Object Previews in the Console
https://bugs.webkit.org/show_bug.cgi?id=129204
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(get WebInspector.JavaScriptRuntimeCompletionProvider.prototype.):
Update RuntimeManager callsites that do not need object previews.
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evalCallback):
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Update the main evaluate method to include a boolean parameter for
object previews. Most callers do not need them. Also, since previews
were not available on iOS 6, switch to invoke, to conditionally
include the command parameter.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.prototype.get preview):
Store the preview from the payload.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._format):
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry):
Pass an explicit false for most formatters to not use a preview if available.
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
Currently only object types are previewed. Though we request previews
for arrays, we don't use the preview because we show a better preview
by just immediately requesting for a full non-preview property list.
(WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
Quickly output an object preview into the title element. The format
is "ClassName {prop: value...}". Elide the class name if it is "Object".
Also skip over certain preview properties that may not be useful
at a glance (like constructor, or accessors without values).
* UserInterface/Views/LogContentView.css:
(.console-object-preview):
(.console-formatted-array .console-object-preview):
(.console-object-preview-lossless):
(.expanded .console-object-preview):
Show lossy previews in italics.
Show lossless previews and array previews without italics.
Do not show the class name in the preview in italics when expanded.
(.console-object-preview .name):
Give preview property names the same color as ObjectPropertiesSection property names.
(.expanded .console-object-preview > .console-object-preview-body):
When expanding an object, hide the preview.
(.console-object-preview > .console-object-preview-name.console-object-preview-name-Object):
(.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object):
For "Object" previews, hide the name "Object" when not expanded, and show it when expanded.
2015-01-23 Saam Barati <saambarati1@gmail.com>
Web Inspector: Disable *Annotators on minified files that aren't pretty printed
https://bugs.webkit.org/show_bug.cgi?id=140550
Reviewed by Timothy Hatcher.
When SourceCodeTextEditor speculates that a file is minified it
sets a flag on itself that the Annotators will notice when pretty
printing and turning on type profiling.
SourceCodeTextEditor enforces the following two behaviors:
1. Always pretty print a file if we think it's minified while
viewing type annotations. So, while viewing a minified file,
if you press the type profiling button, the pretty printer will
first reformat the file, then the type profiler will insert type annotations.
2. If the type profiler is enabled and we're viewing a pretty
printed file that we think originally was minified, and the
pretty printer is disabled via pressing the button, then the
type profiler will also be disabled.
These two behaviors maintain a good user experience because
it prevents a bad visual representation of profiler data and
also prevents bad performance.
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype.toggleTypeAnnotations): Deleted.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.shown):
(WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
(WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
2015-01-22 Jonathan Wells <jonowells@apple.com>
Web Inspector: ResourceContentView.js incorrectly contains call to WebInspector.UIString with a variable parameter
https://bugs.webkit.org/show_bug.cgi?id=140268
Reviewed by Timothy Hatcher.
UIString no longer incorrectly used around variables. Drive-by fixes to prototype inheritance style.
Use of Promises corrected such that requesting content for a resource resolves rather than rejects if
a resource can't be found or has another error that isn't a web inspector error.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Models/Resource.js: Change reject to resolve.
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.requestContentFromBackend): Proper use of Error object.
* UserInterface/Models/SourceCode.js: Use correct inheritance style.
* UserInterface/Views/ResourceContentView.js:
(WebInspector.ResourceContentView.prototype._contentAvailable): Handle error now that promise resolves.
(WebInspector.ResourceContentView.prototype._contentError): Remove incorrect use of UIString.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Handle error now that promise resolves.
2015-01-22 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Expected gutter highlight when selecting console input line, just like output line
https://bugs.webkit.org/show_bug.cgi?id=140696
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.css:
2015-01-21 Saam Barati <saambarati1@gmail.com>
Web Inspector: Change Annotator's isActive getter into an isActive() function.
https://bugs.webkit.org/show_bug.cgi?id=140729
Reviewed by Timothy Hatcher.
This patch also makes the child classes of Annotator use
the function instead of accessing the property directly.
* UserInterface/Controllers/Annotator.js:
(WebInspector.Annotator.prototype.isActive):
(WebInspector.Annotator.prototype.get isActive): Deleted.
* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype.insertAnnotations):
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype.toggleTypeAnnotations):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState):
2015-01-21 Saam Barati <saambarati1@gmail.com>
Web Inspector: Don't allow the BasicBlockAnnotator to highlight a section if it's only a closing brace
https://bugs.webkit.org/show_bug.cgi?id=140727
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock):
(WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyClosingBrace):
BasicBlockAnnotator tries to no longer highlight a basic block if it is only
whitespace and a closing brace. These ranges are often after statements
that make these basic blocks unreachable, such as a return/break/continue
statement occurring inside a if/else/while/for block. This check won't
match every highlighted empty closing brace, but catches most of them
because it only does intra block analysis instead of inter block analysis.
2015-01-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Use spread operator in a few places
https://bugs.webkit.org/show_bug.cgi?id=140699
Reviewed by Geoffrey Garen.
* UserInterface/Controllers/ProbeManager.js:
(WebInspector.ProbeManager.prototype.get probeSets):
Simplify by using the spread operator.
* UserInterface/Models/TimelineRecording.js:
This actually fixes an issue. The one place this was used was expecting
an array and called ".length" on the result. However, the iterator being
returned does not have a ".length" property so it was always undefined.
2015-01-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Expanding event objects in console shows undefined for most values, it should have real values
https://bugs.webkit.org/show_bug.cgi?id=137306
Reviewed by Timothy Hatcher.
When first expanding an object, show all the object's own properties and any
getter properties that may be on its prototype chain. Now, we only fetch
own properties, for __proto__ properties.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.getOwnProperties):
(WebInspector.RemoteObject.prototype.getOwnAndGetterProperties):
(WebInspector.RemoteObject.prototype.getAllProperties):
(WebInspector.RemoteObject.prototype.get hasChildren): Deleted.
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection):
(WebInspector.ObjectPropertiesSection.prototype.update):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
2015-01-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Should show dynamic specificity values
https://bugs.webkit.org/show_bug.cgi?id=140647
Reviewed by Benjamin Poulain.
For dynamic selectors, provide text in the tooltip describing that the
specificity is dynamic and may change, and pointing out the element
the current value was calculated against.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/CSSSelector.js:
(WebInspector.CSSSelector):
(WebInspector.CSSSelector.prototype.get specificity):
(WebInspector.CSSSelector.prototype.get dynamic):
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseSelectorListPayload.return):
(WebInspector.DOMNodeStyles.prototype._parseSelectorListPayload):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
2015-01-19 Saam Barati <saambarati1@gmail.com>
Web Inspector: Provide a front end for JSC's Control Flow Profiler
https://bugs.webkit.org/show_bug.cgi?id=138454
Reviewed by Timothy Hatcher.
This patch creates a user interface for JSC's control flow profiler.
The Web Inspector gets basic block ranges from JSC, and displays
basic blocks that have not executed as having a gray background.
BasicBlockAnnotator is the class responsible for this UI logic.
It also does a few nifty things when presenting a UI for this gray
background color: if an entire line of code is within the basic
block's boundary, the annotator will not just highlight the background
behind the text, but the background of the entire line itself. This
provides a nicer experience when glancing through large JavaScript files.
This patch also adds some necessary wrapper methods inside TextEditor
for accessing CodeMirror's text highlighting functionality. It also
creates a way for TextEditor and SourceCodeTextEditor to listen
for focus events inside CodeMirror.
* UserInterface/Controllers/AnnotatorManager.js: Removed.
* UserInterface/Controllers/BasicBlockAnnotator.js: Added.
(WebInspector.BasicBlockAnnotator):
(WebInspector.BasicBlockAnnotator.prototype.clearAnnotations):
(WebInspector.BasicBlockAnnotator.prototype.insertAnnotations):
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges.):
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
(WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock):
(WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyWhitespace):
(WebInspector.BasicBlockAnnotator.prototype._canGrayOutEntireLine):
(WebInspector.BasicBlockAnnotator.prototype._grayOutLine):
(WebInspector.BasicBlockAnnotator.prototype._clearRangeForBasicBlockMarker.get marker):
(WebInspector.BasicBlockAnnotator.prototype._clearRangeForBasicBlockMarker):
* UserInterface/Main.html:
* UserInterface/Views/SourceCodeTextEditor.css:
(.basic-block-has-not-executed):
(.basic-block-has-not-executed-prepend::before):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.shown):
(WebInspector.SourceCodeTextEditor.prototype.hidden):
(WebInspector.SourceCodeTextEditor.prototype.canShowTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
(WebInspector.SourceCodeTextEditor.prototype.gainedFocus):
(WebInspector.SourceCodeTextEditor.prototype.lostFocus):
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._makeBasicBlockAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler):
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.getTextInRange):
(WebInspector.TextEditor.prototype.addStyleToTextRange):
(WebInspector.TextEditor.prototype.gainedFocus):
(WebInspector.TextEditor.prototype.lostFocus):
2015-01-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Make message selection in the console more readable
https://bugs.webkit.org/show_bug.cgi?id=140385
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.css:
(.console-item.selected):
(.console-messages:focus .console-item.selected):
(.console-item.selected .console-message::after):
(.console-messages:focus .console-item.selected .console-message::after):
(.console-messages:focus .console-item.selected .go-to-link):
* UserInterface/Views/Main.css:
(.go-to-link):
!important statements seem to be unnecessary, remove them.
2015-01-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused WebInspector.LocalJSONObject
https://bugs.webkit.org/show_bug.cgi?id=140570
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.fromLocalObject): Deleted.
(WebInspector.LocalJSONObject): Deleted.
(WebInspector.LocalJSONObject.prototype.get description.switch.case.string_appeared_here): Deleted.
(WebInspector.LocalJSONObject.prototype.get description.switch.default): Deleted.
(WebInspector.LocalJSONObject.prototype.get description): Deleted.
(WebInspector.LocalJSONObject.prototype._concatenate): Deleted.
(WebInspector.LocalJSONObject.prototype.get type): Deleted.
(WebInspector.LocalJSONObject.prototype.get subtype): Deleted.
(WebInspector.LocalJSONObject.prototype.get hasChildren): Deleted.
(WebInspector.LocalJSONObject.prototype.getOwnProperties): Deleted.
(WebInspector.LocalJSONObject.prototype.getAllProperties): Deleted.
(WebInspector.LocalJSONObject.prototype._children.buildProperty): Deleted.
(WebInspector.LocalJSONObject.prototype._children): Deleted.
(WebInspector.LocalJSONObject.prototype.isError): Deleted.
2015-01-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught exceptions, attempting to dispatch unimplemented Network WebSocket methods
https://bugs.webkit.org/show_bug.cgi?id=140532
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.webSocketFrameReceived):
(WebInspector.NetworkObserver.prototype.webSocketFrameError):
(WebInspector.NetworkObserver.prototype.webSocketFrameSent):
Add stubs to prevent an exception when trying to dispatch the event.
2015-01-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Reopening the inspector can selects a sub-frame instead of the Main Frame's DOM
https://bugs.webkit.org/show_bug.cgi?id=140513
Reviewed by Timothy Hatcher.
* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.saveIdentityToCookie):
Specifically identify the main frame, so that any sub-frames with the same
URL, don't get choosen over the main frame when restoring state from cookie.
2015-01-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: selecting Paint timeline records from sidebar does not trigger preview of paint quad
https://bugs.webkit.org/show_bug.cgi?id=139151
Reviewed by Brian Burg.
* UserInterface/Views/LayoutTimelineDataGrid.js:
(WebInspector.LayoutTimelineDataGrid):
(WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
(WebInspector.LayoutTimelineDataGrid.prototype.reset): Deleted.
(WebInspector.LayoutTimelineDataGrid.prototype.hidden): Deleted.
(WebInspector.LayoutTimelineDataGrid.prototype._layoutDataGridSelectedNodeChanged): Deleted.
(WebInspector.LayoutTimelineDataGrid.prototype._hideHighlightIfNeeded): Deleted.
Move the node highlight from the datagrid to the timeline view because
we want this to happen on both the Navigation sidebar and the datagrid.
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype.shown):
(WebInspector.LayoutTimelineView.prototype.hidden):
(WebInspector.LayoutTimelineView.prototype.filterDidChange):
(WebInspector.LayoutTimelineView.prototype.reset):
(WebInspector.LayoutTimelineView.prototype._treeElementDeselected):
(WebInspector.LayoutTimelineView.prototype._treeElementSelected):
Update the highlight for major view updates.
(WebInspector.LayoutTimelineView.prototype._updateHighlight):
(WebInspector.LayoutTimelineView.prototype._showHighlightForRecord):
(WebInspector.LayoutTimelineView.prototype._hideHighlightIfNeeded):
(WebInspector.LayoutTimelineView.prototype._hoveredOrSelectedRecord):
Show a highlight for what we are hovering, or what is selected.
Note the selected node may not be visible due to filtering.
(WebInspector.LayoutTimelineView.prototype._mouseOverDataGrid):
(WebInspector.LayoutTimelineView.prototype._mouseLeaveDataGrid):
(WebInspector.LayoutTimelineView.prototype._mouseOverTreeOutline):
(WebInspector.LayoutTimelineView.prototype._mouseLeaveTreeOutline):
Update hovered information mousing over the datagrid and tree outline.
* UserInterface/Views/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype.filterDidChange):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.updateFilter):
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.filterDidChange):
Include a "filterDidChange" TimelineView method that gets called after
updateFilter (things like the filter bar or timeline range changes).
* UserInterface/Views/TreeOutline.js:
(TreeOutline.prototype.treeElementFromNode):
(TreeOutline.prototype.treeElementFromPoint):
Provide a helper to get a tree element from an event target.
2015-01-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: TextEditor doesn't update when resizing console, white space instead of content
https://bugs.webkit.org/show_bug.cgi?id=140240
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector._consoleResizerMouseDown.dockedResizerDrag):
Dispatch the event that signals the console has changed size.
2015-01-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: I do not expect to see the same rule multiple times in styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=138185
Reviewed by Timothy Hatcher.
In the styles sidebar, don't show a duplicate, lesser-specificity rule even
if it matches the selected element multiple times with different selectors
in the list.
* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.isEqualTo):
CSSRule identifiers are objects.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
Remove duplicates from the ordered list of style declarations.
2015-01-12 Jonathan Wells <jonowells@apple.com>
Web Inspector: Timeline: when Network Requests view is selected, in progress requests are absent.
https://bugs.webkit.org/show_bug.cgi?id=140090
Reviewed by Timothy Hatcher.
TimelineContentView#_updateTimes() changed to call WebInspector.timelineSidebarPanel.updateFilter() in addition
to updating the layout of the current timeline view. TimelineSidebarPanel.updateFilter() now responsible for
updating filtered resources in a TimelineView.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
Now handles updating the UI associated with filtering of navigation sidebar tree elements.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.updateLayout):
No longer handles updating other UI along with the navigation sidebar tree elements. That is now handled by
WebInspector.TimelineView.prototype.filterUpdated.
(WebInspector.OverviewTimelineView.prototype._compareTreeElementsByDetails): Drive-by fix. Missing vars.
* UserInterface/Views/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype._updateTimes): Add call to updateFilter().
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.filterUpdated):
Function added to dispatch a SelectionPathComponentsDidChange event.
2015-01-09 Enrica Casucci <enrica@apple.com>
[iOS] Support additional text styles.
https://bugs.webkit.org/show_bug.cgi?id=140310
rdar://problem/18568864
Reviewed by Joseph Pecoraro.
Add support for three new text styles.
* UserInterface/Models/CSSKeywordCompletions.js:
2015-01-09 Timothy Hatcher <timothy@apple.com>
Web Inspector: REGRESSION: Navigation sidebar can show blank next to the Console view
https://bugs.webkit.org/show_bug.cgi?id=140291
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Don't restore collapsed false if selectedSidebarPanel is null.
(WebInspector._sidebarCollapsedStateDidChange): Support a _ignoreNavigationSidebarPanelCollapsedEvent flag
to avoid setting _navigationSidebarCollapsedSetting.
(WebInspector._navigationSidebarPanelSelected): Force collapsed if selectedSidebarPanel is null.
(WebInspector._contentBrowserCurrentContentViewDidChange): Set _ignoreNavigationSidebarPanelCollapsedEvent
when forcing the collapsed state to avoid setting _navigationSidebarCollapsedSetting and calling
_updateContentViewForCurrentNavigationSidebar.
2015-01-08 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: REGRESSION Showing debugger sidebar shouldn't change selected JS file
https://bugs.webkit.org/show_bug.cgi?id=139526
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar):
When switching to Debugger, show last selected JS or HTML resource.
(WebInspector.showSplitConsole):
(WebInspector.showFullHeightConsole):
(WebInspector.toggleConsoleView):
(WebInspector._sidebarCollapsedStateDidChange):
(WebInspector._updateContentViewForCurrentNavigationSidebar):
(WebInspector._navigationSidebarPanelSelected):
(WebInspector._contentBrowserCurrentContentViewDidChange):
(WebInspector._updateNavigationSidebarForCurrentContentView): Deleted.
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/DatabaseContentView.js:
(WebInspector.DatabaseContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/FontResourceContentView.js:
(WebInspector.FontResourceContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/FrameDOMTreeContentView.js:
(WebInspector.FrameDOMTreeContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.get allowedNavigationSidebarPanels):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView):
(WebInspector.ResourceSidebarPanel.prototype.showMainFrame):
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.removeSidebarPanel):
* UserInterface/Views/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype.get allowedNavigationSidebarPanels):
2015-01-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Phantom breakpoint appears on empty line after reload of minified file with a breakpoint
https://bugs.webkit.org/show_bug.cgi?id=140276
Reviewed by Timothy Hatcher.
Styles being set on lines (e.g. breakpoint styles) before content loaded can
carry forward with the empty line. It is safe for us to just remove all
the styles from the intial empty line before we load the initial content.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.set string.update):
(WebInspector.TextEditor.prototype.set string):
2015-01-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Pause Reason Improvements (Breakpoint, Debugger Statement, Pause on Next Statement)
https://bugs.webkit.org/show_bug.cgi?id=138991
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New UI strings for Pause Reasons.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.breakpointForIdentifier):
Provide a way to get the breakpoint with an identifier.
* UserInterface/Images/PausedBreakpoint.svg: Added.
* UserInterface/Images/gtk/PausedBreakpoint.svg: Added.
Copy PseudoElement.svg icon and give it a new name.
* UserInterface/Views/BreakpointTreeElement.css:
(.breakpoint-paused-icon .icon):
New icon for a breakpoint causing a pause.
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.removeStatusImage):
(WebInspector.BreakpointTreeElement.prototype._updateStatus):
Give API to remove the breakpoint status icon from a BreakpointTreeElement.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype.get hasSelectedElement):
(WebInspector.DebuggerSidebarPanel.prototype.deselectBreakpointContentTreeElements):
(WebInspector.DebuggerSidebarPanel.prototype.deselectPauseReasonContentTreeElements):
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
Give DebuggerSidebarPanel an optional pause reason tree outline. When available
include it in the pattern of ensuring a single exclusive selection.
(WebInspector.DebuggerSidebarPanel.prototype._breakpointRemoved):
When a breakpoint is removed, check if we should update the pause reason tree outline.
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReason):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
Update Pause Reason section contents depending on the reason.
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonGotoArrow):
Always try to include a goto arrow to jump to the original pause location
if it is available at the time of pausing.
2015-01-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Expected UserAgent styles to be crossed-out if overridden
https://bugs.webkit.org/show_bug.cgi?id=140154
Reviewed by Timothy Hatcher.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload):
Add a comment about anonymous styles. The getter is no longer used, and it is not
clear if we really care about this state, or if "anonymous" is an appropriate name.
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
Allow browser styles (user agent / html attributes) to be overridden.
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
When refreshing styles after changes, the Style object backing HTML attributes
was being completely replaced. Allow it to be remembered by a unique key.
2015-01-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Do not create rulesMap entries for rules without identifiers
https://bugs.webkit.org/show_bug.cgi?id=140237
Reviewed by Timothy Hatcher.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
We were accidentally converting a null into a string with a loose string
concatenation. Only do this if the mapKey is not-null.
2015-01-07 Saam Barati <saambarati1@gmail.com>
Web Inspector: Abstract common functions from TypeTokenAnnotator into a parent class and introduce an AnnotatorManager
https://bugs.webkit.org/show_bug.cgi?id=139426
Reviewed by Timothy Hatcher.
This patch creates a parent class, Annotator, that TypeTokenAnnotator
inherits from. Annotator defines a common set of functionality
that a text editor annotator can use to mark up UI. This
is in preparation other classes that will inherit from Annotator.
This patch also introduces AnnotatorManager which controls a
set of Annotators and provides a single interface for
controlling them.
* UserInterface/Controllers/Annotator.js: Added.
(WebInspector.Annotator):
(WebInspector.Annotator.prototype.get sourceCodeTextEditor):
(WebInspector.Annotator.prototype.get isActive):
(WebInspector.Annotator.prototype.pause):
(WebInspector.Annotator.prototype.resume):
(WebInspector.Annotator.prototype.refresh):
(WebInspector.Annotator.prototype.reset):
(WebInspector.Annotator.prototype.clear):
(WebInspector.Annotator.prototype.insertAnnotations):
(WebInspector.Annotator.prototype.clearAnnotations):
(WebInspector.Annotator.prototype._clearTimeoutIfNeeded):
* UserInterface/Controllers/AnnotatorManager.js: Added.
(WebInspector.AnnotatorManager):
(WebInspector.AnnotatorManager.prototype.addAnnotator):
(WebInspector.AnnotatorManager.prototype.isAnnotatorActive):
(WebInspector.AnnotatorManager.prototype.pauseAll):
(WebInspector.AnnotatorManager.prototype.resumeAll):
(WebInspector.AnnotatorManager.prototype.refreshAllIfActive):
(WebInspector.AnnotatorManager.prototype.resetAllIfActive):
(WebInspector.AnnotatorManager.prototype.clearAll):
(WebInspector.AnnotatorManager.prototype.removeAllAnnotators):
(WebInspector.AnnotatorManager.prototype._getAnnotators):
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator):
(WebInspector.TypeTokenAnnotator.prototype.insertAnnotations.):
(WebInspector.TypeTokenAnnotator.prototype.clearAnnotations):
(WebInspector.TypeTokenAnnotator.prototype._insertToken):
(WebInspector.TypeTokenAnnotator.prototype.get isActive): Deleted.
(WebInspector.TypeTokenAnnotator.prototype.get sourceCodeTextEditor): Deleted.
(WebInspector.TypeTokenAnnotator.prototype.pause): Deleted.
(WebInspector.TypeTokenAnnotator.prototype.resume): Deleted.
(WebInspector.TypeTokenAnnotator.prototype.refresh): Deleted.
(WebInspector.TypeTokenAnnotator.prototype.reset): Deleted.
(WebInspector.TypeTokenAnnotator.prototype._insertAnnotations.): Deleted.
(WebInspector.TypeTokenAnnotator.prototype._clearTimeoutIfNeeded): Deleted.
* UserInterface/Main.html:
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.shown):
(WebInspector.SourceCodeTextEditor.prototype.hidden):
(WebInspector.SourceCodeTextEditor.prototype.canShowTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState):
(WebInspector.SourceCodeTextEditor.prototype._getAssociatedScript):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler):
2015-01-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Do not style implicit CSS properties in the Style Rules section
https://bugs.webkit.org/show_bug.cgi?id=140161
Reviewed by Timothy Hatcher.
Previously, implicit properties being transparent in the Rules section
was confusing and not useful. Lets simplify what transparency means:
- Rules: transparency means a non-inheritable property in an inherited rule
- Computed: transparency means an implicit value
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.implicit, .not-inherited)): Deleted.
2015-01-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught Exception when dismissing Go To Line dialog
https://bugs.webkit.org/show_bug.cgi?id=139663
Reviewed by Timothy Hatcher.
Calling removeChild would trigger the blur event handler and do a
nested call of dismiss(), re-entering and removing while in the middle
of removing. Avoid re-entrancy to avoid the exception.
* UserInterface/Views/GoToLineDialog.js:
(WebInspector.GoToLineDialog):
(WebInspector.GoToLineDialog.prototype.dismiss):
2015-01-01 Darin Adler <darin@apple.com>
We often misspell identifier as "identifer"
https://bugs.webkit.org/show_bug.cgi?id=140025
Reviewed by Michael Saboff.
* UserInterface/Base/Main.js:
(WebInspector._updateNavigationSidebarForCurrentContentView):
(WebInspector._contentBrowserCurrentContentViewDidChange):
Fix misspellings.
2014-12-29 Jonathan Wells <jonowells@apple.com>
Web Inspector: SourceCode.requestContent should return a promise
https://bugs.webkit.org/show_bug.cgi?id=135777
Reviewed by Brian Burg.
Change SourceCode.js to request content from the backend using Promises. Change Resource.js to use this new
approach when determining whether a resource load has finished. Change all calls to the older
SourceCode#requestContentFromBackendIfNeeded to simply use requestContent and use a catch function
if a content request error needs to be handled. Fix a bug where the appropriate error message for an
invalid resource wasn't showing in the resource content view.
* UserInterface/Controllers/AnalyzerManager.js:
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode.):
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode):
* UserInterface/Controllers/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype._updateResourceContent.fetchedStyleSheetContent):
(WebInspector.CSSStyleManager.prototype._updateResourceContent.styleSheetReady):
* UserInterface/Models/CSSStyleSheet.js:
(WebInspector.CSSStyleSheet.prototype.requestContentFromBackend):
(WebInspector.CSSStyleSheet.prototype.canRequestContentFromBackend): Deleted.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.changeStyleText):
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.canRequestContent):
(WebInspector.Resource.prototype.requestContentFromBackend):
(WebInspector.Resource.prototype.markAsFinished):
(WebInspector.Resource.prototype.markAsFailed):
(WebInspector.Resource.prototype.getImageSize):
(WebInspector.Resource.prototype.canRequestContentFromBackend): Deleted.
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.requestContentFromBackend):
(WebInspector.Script.prototype.requestScriptSyntaxTree.catch):
(WebInspector.Script.prototype.canRequestContentFromBackend): Deleted.
* UserInterface/Models/SourceCode.js:
(WebInspector.SourceCode):
(WebInspector.SourceCode.prototype.requestContent):
(WebInspector.SourceCode.prototype.requestContentFromBackend):
(WebInspector.SourceCode.prototype._processContent):
(WebInspector.SourceCode.prototype.canRequestContentFromBackend): Deleted.
(WebInspector.SourceCode.prototype.requestContentFromBackendIfNeeded): Deleted.
(WebInspector.SourceCode.prototype.servicePendingContentRequests): Deleted.
* UserInterface/Models/SourceMapResource.js:
(WebInspector.SourceMapResource):
(WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoadError):
(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
(WebInspector.SourceMapResource.prototype.canRequestContentFromBackend): Deleted.
(WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoaded): Deleted.
* UserInterface/Views/ResourceContentView.js:
(WebInspector.ResourceContentView):
(WebInspector.ResourceContentView.prototype._contentAvailable):
(WebInspector.ResourceContentView.prototype._contentError):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._contentAvailable):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent):
(WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):
2014-12-26 Dan Bernstein <mitz@apple.com>
<rdar://problem/19348208> REGRESSION (r177027): iOS builds use the wrong toolchain
https://bugs.webkit.org/show_bug.cgi?id=139950
Reviewed by David Kilzer.
* Configurations/Base.xcconfig: Only define TOOLCHAINS when building for OS X, doing so
in a manner that works with Xcode 5.1.1.
2014-12-20 David Kilzer <ddkilzer@apple.com>
Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
<http://webkit.org/b/139463>
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig:
- Only set TOOLCHAINS on OS X.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
* Configurations/Version.xcconfig:
- Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
* Configurations/WebInspectorUIFramework.xcconfig:
- Set NORMAL_PRODUCTION_FRAMEWORKS_DIR,
PRODUCTION_FRAMEWORKS_DIR and
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production by SDK.
2014-12-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177574.
https://bugs.webkit.org/show_bug.cgi?id=139821
"Broke Production builds by installing
libWebCoreTestSupport.dylib in the wrong directory" (Requested
by ddkilzer on #webkit).
Reverted changeset:
"Switch from using PLATFORM_NAME to SDK selectors in WebCore,
WebInspectorUI, WebKit, WebKit2"
https://bugs.webkit.org/show_bug.cgi?id=139463
http://trac.webkit.org/changeset/177574
2014-12-19 David Kilzer <ddkilzer@apple.com>
Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
<http://webkit.org/b/139463>
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig:
- Only set TOOLCHAINS on OS X.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
* Configurations/Version.xcconfig:
- Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
* Configurations/WebInspectorUIFramework.xcconfig:
- Set NORMAL_PRODUCTION_FRAMEWORKS_DIR,
PRODUCTION_FRAMEWORKS_DIR and
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production by SDK.
2014-12-16 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION: Dragging undocked web inspector causes mouse to change from pointer to i-bar cursor over window title
https://bugs.webkit.org/show_bug.cgi?id=139720
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
Prevent default handling of the mouse event when clicking in the titlebar area. WebCore won't continue handling the event,
but docking buttons/context menu still function.
2014-12-15 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Clicking on the expand object arrow should always expand an object
https://bugs.webkit.org/show_bug.cgi?id=139382
Reviewed by Joseph Pecoraro.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._click): Deleted.
stopPropagation was preventing the object expansion from happening as expecting.
2014-12-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CSSStyleDeclarationTextEditor fails to update if computed properties changed from empty to non-empty
https://bugs.webkit.org/show_bug.cgi?id=139610
Reviewed by Timothy Hatcher.
The CSSStyleDeclarationTextEditor for Computed Style Properties always has
empty DOMNodeStyles text. However we would not reset contents if properties
changed and the actualy content was empty. So once empty, we could never
recover. In fact, we should always refresh for Computed Styles.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged):
2014-12-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Hide Compositing Borders Button if backend returns an error that it is unsupported
https://bugs.webkit.org/show_bug.cgi?id=139307
Reviewed by Darin Adler.
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
2014-12-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Uncaught Exceptions when attempting to show Content Flow
https://bugs.webkit.org/show_bug.cgi?id=139276
Reviewed by Brian Burg.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
LegacyJavaScriptProfileObject no longer exists, these references should be removed.
* UserInterface/Views/FolderizedTreeElement.js:
(WebInspector.FolderizedTreeElement.prototype._insertChildTreeElement):
This sort function references "this" and needed to be bound.
2014-12-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Network Timeline Filter Bar only has "All", missing Resource Type filters
https://bugs.webkit.org/show_bug.cgi?id=139268
Reviewed by Brian Burg.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.createColumnScopeBar):
Users of createColumnScopeBar pass a Map object now instead of a dictionary.
Iterate over the map appropriately.
2014-12-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: LayoutTests/inspector tests fail in Production builds due to missing test resources
https://bugs.webkit.org/show_bug.cgi?id=138898
Reviewed by Mark Rowe.
In Production builds, if FORCE_TOOL_INSTALL=YES is in the environment
we will copy all resources (for Tests) and still do the combine and
optimize phase for normal Production inspection resources.
* Scripts/copy-user-interface-resources.pl:
2014-12-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Missing getter, clients never see DragToAdjustController is enabled
https://bugs.webkit.org/show_bug.cgi?id=139228
Reviewed by Simon Fraser.
* UserInterface/Controllers/DragToAdjustController.js:
(WebInspector.DragToAdjustController.prototype.get enabled):
2014-12-02 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CSS Minification breaks some selectors with colons
https://bugs.webkit.org/show_bug.cgi?id=139206
Reviewed by Simon Fraser.
Do not remove spaces preceeding colons, as they may change the semantics
of selectors with colon prefixes (e.g. "a :not(b)").
At the same time, we can strip spaces around "!" characters, for example
a space is not required before "!important" priority.
* Scripts/cssmin.py:
(cssminify):
2014-12-01 Benjamin Poulain <benjamin@webkit.org>
Web Inspector: add more :not() and :matches() awesomeness
https://bugs.webkit.org/show_bug.cgi?id=138997
Reviewed by Joseph Pecoraro.
Simplify the Inspector's CSS when possible.
* UserInterface/Views/DatabaseContentView.css:
(:matches(.database-user-query, .database-query-prompt, .database-query-result)::before):
(.database-user-query::before, .database-query-prompt::before, .database-query-result::before): Deleted.
* UserInterface/Views/GradientSlider.css:
(.gradient-slider-knob > :matches(img, div)):
(.gradient-slider-knob > div): Deleted.
* UserInterface/Views/HoverMenu.css:
(.hover-menu > svg > :matches(path, rect)):
(.hover-menu > svg > rect): Deleted.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
(.panel.details.layer-tree .name-column :matches(.pseudo-element, .reflection)):
(.panel.details.layer-tree tr.selected .name-column :matches(.pseudo-element, .reflection)):
(.panel.details.layer-tree .name-column .reflection): Deleted.
(.panel.details.layer-tree tr.selected .name-column .reflection): Deleted.
* UserInterface/Views/ProbeDetailsSidebarPanel.css:
(.details-section.probe-set .options > :matches(.probe-remove, .probe-clear-samples, .probe-add)):
(.details-section.probe-set .options > .probe-add): Deleted.
* UserInterface/Views/ResourceSidebarPanel.css:
(.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)):
(body.mac-platform.legacy .sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.resource > .empty-content-placeholder): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.resource > .empty-content-placeholder): Deleted.
* UserInterface/Views/ScopeBar.css:
(.scope-bar > li:matches(.selected, :active)):
(.scope-bar > li:active): Deleted.
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
(.syntax-highlighted :matches(.css-comment, .javascript-comment, .html-comment)):
(.syntax-highlighted :matches(.css-keyword, .css-tag, .css-at-rule, .css-important, .javascript-keyword, .html-tag)):
(.syntax-highlighted :matches(.css-number, .javascript-number)):
(.syntax-highlighted :matches(.css-property, .css-selector, .javascript-ident)):
(.syntax-highlighted :matches(.css-string, .javascript-string, .javascript-regexp, .html-attribute-value)):
(.syntax-highlighted :matches(.html-doctype, .html-processing-instruction)):
(.syntax-highlighted .html-comment): Deleted.
(.syntax-highlighted .html-tag): Deleted.
(.syntax-highlighted .javascript-number): Deleted.
(.syntax-highlighted .javascript-ident): Deleted.
(.syntax-highlighted .html-attribute-value): Deleted.
(.syntax-highlighted .html-processing-instruction): Deleted.
It looks like ".cm-tag.cm-bracket" was there only to override the rule below.
From basic testing, it looks like "cm-tag" and "cm-bracket" always appear together. I removed the "cm-bracket" rule
from the second rule, and simplified the first rule.
* UserInterface/Views/TimelineSidebarPanel.css:
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > :matches(.content, .empty-content-placeholder)):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .empty-content-placeholder): Deleted.
* UserInterface/Views/Toolbar.css:
(body.mac-platform:not(.legacy, .docked) .toolbar):
(body.mac-platform:not(.legacy, .docked) .toolbar.icon-and-label-vertical):
(body.mac-platform:not(.legacy, .docked) .toolbar.icon-and-label-vertical.small-size):
(body.mac-platform:not(.legacy, .docked) .toolbar:matches(.icon-and-label-horizontal, .icon-only)):
(body.mac-platform:not(.legacy, .docked) .toolbar:matches(.icon-and-label-horizontal.small-size, .icon-only.small-size, .label-only)):
(.toolbar:matches(.icon-and-label-horizontal.small-size, .icon-only.small-size, .label-only) .control-section):
(body.mac-platform:not(.legacy):not(.docked) .toolbar): Deleted.
(body.mac-platform:not(.legacy):not(.docked) .toolbar.icon-and-label-vertical): Deleted.
(body.mac-platform:not(.legacy):not(.docked) .toolbar.icon-and-label-vertical.small-size): Deleted.
(body.mac-platform:not(.legacy):not(.docked) .toolbar.icon-only): Deleted.
(body.mac-platform:not(.legacy):not(.docked) .toolbar.label-only): Deleted.
(.toolbar.label-only .control-section): Deleted.
2014-11-27 Andres Gomez <agomez@igalia.com>
Web Inspector: Update NavigationItemProbes icon for the GTK+ port
https://bugs.webkit.org/show_bug.cgi?id=139074
Reviewed by Carlos Garcia Campos.
NavigationItemProbes was updated for the Mac port and we are now
having a similar ideogram in GTK+.
* UserInterface/Images/gtk/NavigationItemProbes.svg: Updated.
2014-11-21 Benjamin Poulain <bpoulain@apple.com>
Start using the new :not() and :matches() in the Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=138978
Reviewed by Joseph Pecoraro.
Start simpifying some definitions by using modern CSS.
* UserInterface/Views/CSSStyleDeclarationSection.css:
(body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:matches(.last-in-group, :last-child)):
(.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector):
(body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:last-child): Deleted.
(.style-declaration-section.selector-locked > .header > .selector): Deleted.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.disabled, .invalid, .other-vendor, .not-inherited, .overridden)):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.implicit, .not-inherited)):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property:matches(.disabled, .other-vendor, .not-inherited, .overridden)):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.overridden): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.overridden): Deleted.
* UserInterface/Views/ControlToolbarItem.css:
(.toolbar:matches(.icon-and-label-horizontal, .toolbar.icon-only) .item.control):
(.toolbar.icon-only .item.control): Deleted.
* UserInterface/Views/DOMStorageContentView.css:
* UserInterface/Views/DashboardContainerView.css:
(.toolbar.icon-and-label-vertical:matches(.small-size, .normal-size) .dashboard-container):
(.toolbar:matches(.label-only, .small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal)) .dashboard-container):
(.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard-container):
(.toolbar.normal-size.icon-and-label-vertical .dashboard-container): Deleted.
(.toolbar.small-size.icon-and-label-horizontal .dashboard-container): Deleted.
(.toolbar.normal-size.icon-and-label-horizontal .dashboard-container): Deleted.
* UserInterface/Views/DataGrid.css:
(.data-grid :matches(th, td):not(:last-child)):
(.data-grid th:matches(.sort-ascending, .sort-descending)):
(.data-grid :matches(th, td) > div):
(.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child):
(.data-grid tr:matches(.selected, :hover) .go-to-arrow):
(.data-grid :-webkit-any(th, td):not(:last-child)): Deleted.
(.data-grid th:-webkit-any(.sort-ascending, .sort-descending)): Deleted.
(.data-grid :-webkit-any(th, td) > div): Deleted.
(.data-grid th:-webkit-any(.sort-ascending, .sort-descending) > div:first-child): Deleted.
(.data-grid tr:-webkit-any(.selected, :hover) .go-to-arrow): Deleted.
* UserInterface/Views/DebuggerDashboardView.css:
(.toolbar.collapsed .dashboard.debugger > :not(.message, .navigation-bar )):
(.toolbar.collapsed .dashboard.debugger > :not(.message):not(.navigation-bar )): Deleted.
* UserInterface/Views/DefaultDashboardView.css:
(body.web .toolbar.collapsed .dashboard.default > :matches(.time, .resourcesSize, .logs)):
(body.javascript .toolbar .dashboard.default > :matches(.time, .resourcesSize, .resourcesCount)):
(.toolbar:matches(.label-only, .small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal)) .dashboard.default > .item):
(.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard.default > .item):
(body.web .toolbar.collapsed .dashboard.default > .logs): Deleted.
(body.javascript .toolbar .dashboard.default > .resourcesCount): Deleted.
(.toolbar.small-size.icon-and-label-horizontal .dashboard.default > .item): Deleted.
(.toolbar.normal-size.icon-and-label-horizontal .dashboard.default > .item): Deleted.
* UserInterface/Views/DetailsSection.css:
(.details-section > .header > :matches(.node-link, .go-to-arrow)):
(.details-section > .content > .group:nth-child(even) > .row:matches(.simple:first-child > *, :not(.simple):first-child)):
(body.mac-platform.legacy .details-section > .content > .group:matches(:nth-child(even), :last-child) > .row.simple:last-child > *):
(.details-section > .content > .group > .row:matches(.empty, .text)):
(body.mac-platform.legacy .details-section > .content > .group > .row:matches(.empty, .text)):
(.details-section > .header > .go-to-arrow): Deleted.
(.details-section > .content > .group:nth-child(even) > .row.simple:first-child > *): Deleted.
(body.mac-platform.legacy .details-section > .content > .group:last-child > .row.simple:last-child > *): Deleted.
(.details-section > .content > .group > .row.text): Deleted.
(body.mac-platform.legacy .details-section > .content > .group > .row.text): Deleted.
* UserInterface/Views/FindBanner.css:
(:matches(.find-banner, .supports-find-banner).no-find-banner-transition):
(.supports-find-banner.no-find-banner-transition): Deleted.
* UserInterface/Views/FlexibleSpaceNavigationItem.css:
(:matches(.navigation-bar, .toolbar) .item.flexible-space):
(.toolbar .item.flexible-space): Deleted.
2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: LayoutTests/inspector should not have localStorage side effects
https://bugs.webkit.org/show_bug.cgi?id=138895
Reviewed by Brian Burg.
When running inspector tests, do not restore/save WebInspector.Settings
to localStorage, as that will cause side effects. Instead each Setting
will be initialized with its default value and can be modified during
the run of the test.
* UserInterface/Base/Test.js:
(WebInspector.loaded):
Name the setting to match the normal setting name now that persistence
is not an issue.
* UserInterface/Models/Setting.js:
(WebInspector.Setting.prototype.get value):
(WebInspector.Setting.prototype.set value):
Do not restore/save when in tests.
2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JSContext inspection Resource search does not work
https://bugs.webkit.org/show_bug.cgi?id=131252
Reviewed by Timothy Hatcher.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourcesCallback):
Cleanup by reordering things a bit.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts):
(WebInspector.ResourceSidebarPanel.prototype.performSearch):
Search non-resource scripts individually.
(WebInspector.ResourceSidebarPanel.prototype._searchTreeElementForScript):
Lazily create a ScriptTreeElement for the search tree outline as needed.
(WebInspector.ResourceSidebarPanel.prototype._scriptsToSearch):
When searching scripts, just perform a shallow walk of the tree outline to find
Script resources that are not also Resources. Scripts are always guarenteed to
be in a folder when inspecting a web resource. For JSContext inspection, scripts
are promoted to the top level.
* UserInterface/Main.html:
* UserInterface/Models/SourceCodeSearchMatchObject.js: Renamed from Source/WebInspectorUI/UserInterface/Models/ResourceSearchMatchObject.js.
(WebInspector.SourceCodeSearchMatchObject):
* UserInterface/Views/SearchIcons.css:
(.source-code-match-icon .icon):
(.resource-match-icon .icon): Deleted.
* UserInterface/Views/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement):
Rename ResourceSearchMatchObject to SourceCodeSearchMatchObject.
2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide $exception in the console for the thrown exception value
https://bugs.webkit.org/show_bug.cgi?id=138726
Reviewed by Timothy Hatcher.
* UserInterface/Base/Test.js:
(WebInspector.loaded):
In order to use RuntimeManager to execute in the global context or on the
active debugger call frame, we need to expose the quickConsole controller.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
Expose $exception to completion when we paused because of an exception.
2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Debugger should not mutate variable when hovering mouse over ++n expression
https://bugs.webkit.org/show_bug.cgi?id=138839
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve basic JavaScript completion in inline <script>s
https://bugs.webkit.org/show_bug.cgi?id=138845
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
Fix up CodeMirror mode handling for JavaScript completion when inside of mixed mode
input (html). Also add completion for CodeMirror's localVars list.
== Rolled over to ChangeLog-2014-11-19 ==