2017-12-19 Brian Burg Web Inspector: InspectorTest.evaluateInPage should return a rejection if an error was thrown https://bugs.webkit.org/show_bug.cgi?id=180956 Reviewed by Joseph Pecoraro. * UserInterface/Test/FrontendTestHarness.js: (FrontendTestHarness.prototype.evaluateInPage.translateResult): Renamed. (FrontendTestHarness.prototype.evaluateInPage): If the result was thrown, then reject with the error. Rename the helper method to match the same one in RemoteObject.prototype.fetchProperties. 2017-12-19 Joseph Pecoraro Web Inspector: Network Table - Redesign the waterfall popover showing timing data https://bugs.webkit.org/show_bug.cgi?id=180996 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New strings and files. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource): (WI.NetworkTableContentView.prototype._handleMousedownWaterfall): Use the ResourceTimingBreakdownView with a fixed width size. * UserInterface/Views/ResourceTimingContentView.css: Removed. * UserInterface/Views/ResourceTimingContentView.js: (WI.ResourceTimingContentView.prototype.initialLayout): (WI.ResourceTimingContentView.prototype._refreshTimingSection): (WI.ResourceTimingContentView.prototype._refreshTimingSection.createBlock): Deleted. (WI.ResourceTimingContentView.prototype._refreshTimingSection.createTimeLabel): Deleted. (WI.ResourceTimingContentView.prototype._refreshTimingSection.createRow): Deleted. Use the ResourceTimingBreakdownView with a flexible size. Also changed the loading indicator and empty message to match normal ContentView loading indicator and message only UI. * UserInterface/Views/ResourceTimingBreakdownView.css: (.waterfall-popover .resource-timing-breakdown): (.resource-timing-breakdown > table > tr > td.label): (.resource-timing-breakdown > table > tr > td.graph): (.resource-timing-breakdown > table > tr > td.time): (.resource-timing-breakdown > table > tr.empty): (.resource-timing-breakdown > table > tr.header:not(.total-row) > td): (.resource-timing-breakdown > table hr): (.resource-timing-breakdown .waterfall .block): (.resource-timing-breakdown): Deleted. (.resource-timing-breakdown > .waterfall): Deleted. (.resource-timing-breakdown > .waterfall .block): Deleted. (.resource-timing-breakdown ul): Deleted. (.resource-timing-breakdown ul > li): Deleted. (.resource-timing-breakdown ul > li > .row-label): Deleted. (body[dir=ltr] .resource-timing-breakdown ul > li > .row-label): Deleted. (body[dir=rtl] .resource-timing-breakdown ul > li > .row-label): Deleted. (.resource-timing-breakdown ul > li > .section-label): Deleted. (.resource-timing-breakdown ul > li > .time-label): Deleted. (.resource-timing-breakdown .time-section): Deleted. (.resource-timing-breakdown ul > li > .time-section > .label): Deleted. (.resource-timing-breakdown ul > li.total .block): Deleted. (.resource-timing-breakdown ul > li.total .time-label): Deleted. * UserInterface/Views/ResourceTimingBreakdownView.js: (WI.ResourceTimingBreakdownView): (WI.ResourceTimingBreakdownView.prototype._appendEmptyRow): (WI.ResourceTimingBreakdownView.prototype._appendHeaderRow): (WI.ResourceTimingBreakdownView.prototype._appendRow): (WI.ResourceTimingBreakdownView.prototype.initialLayout): (WI.ResourceTimingBreakdownView.prototype.initialLayout.createBlock): Deleted. (WI.ResourceTimingBreakdownView.prototype.initialLayout.createSectionLabel): Deleted. (WI.ResourceTimingBreakdownView.prototype.initialLayout.createTimeLabel): Deleted. (WI.ResourceTimingBreakdownView.prototype.initialLayout.createTimeSection): Deleted. (WI.ResourceTimingBreakdownView.prototype.initialLayout.createRow): Deleted. (WI.ResourceTimingBreakdownView.prototype.initialLayout.emptyRow): Deleted. (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendGraphRow): Deleted. (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendEmptyRow): Deleted. (WI.ResourceTimingBreakdownView.prototype.initialLayout.getCurrentSectionMetrics): Deleted. Redesign the breakdown view. 2017-12-19 Brian Burg Web Inspector: InspectorTest.expectException does not handle implicitly resolved async functions correctly https://bugs.webkit.org/show_bug.cgi?id=180944 Reviewed by Joseph Pecoraro. * UserInterface/Test/TestHarness.js: (TestHarness.prototype.expectException): Don't chain .catch after we might have just returned a rejected promise. 2017-12-19 Joseph Pecoraro Web Inspector: Network Table - Update the Time column to include the total duration not just the download duration https://bugs.webkit.org/show_bug.cgi?id=180998 Reviewed by Matt Baker. * UserInterface/Models/Resource.js: (WI.Resource.prototype.get totalDuration): (WI.Resource.prototype.get duration): Deleted. Rename and group getters to be clearer. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype._entryForResource): Use the totalDuration for the network table time column. * UserInterface/Views/ResourceTimelineDataGridNode.js: (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar graphDataSource.get secondsPerPixel): Using the download duration was incorrect here. 2017-12-19 Devin Rousso Web Inspector: Styles Redesign: Typing semicolon at the end of value should move to the next property https://bugs.webkit.org/show_bug.cgi?id=178498 Reviewed by Joseph Pecoraro. * UserInterface/Views/SpreadsheetStypeProperty.js: (WI.SpreadsheetStypeProperty.prototype._update): (WI.SpreadsheetStypeProperty.prototype._handleValueBeforeInput): Only move to the next property if there are no unbalanced quotes. For example, adding a semicolon after `url("foo` or `url('bar` would not move to the next property. * UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField.prototype.valueWithoutSuggestion): (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion): (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion): (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView): (WI.SpreadsheetTextField.prototype._updateCompletions): (WI.SpreadsheetTextField.prototype._getPrefix): Deleted. 2017-12-18 Nikita Vasilyev Web Inspector: Styles Redesign: Command-S should save changes in matching CSS resource https://bugs.webkit.org/show_bug.cgi?id=180900 Reviewed by Timothy Hatcher. When focused on a CSS selector, property name or value, pressing Command-S should save the CSS resource to the file system. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._save): 2017-12-18 Devin Rousso Web Inspector: Styles Redesign: add inline swatch for CSS variables https://bugs.webkit.org/show_bug.cgi?id=180798 Reviewed by Timothy Hatcher. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.updateStatus): (WI.SpreadsheetStyleProperty.prototype._renderValue): (WI.SpreadsheetStyleProperty.prototype._addVariableTokens): 2017-12-18 Devin Rousso Web Inspector: recording view and slider have jumbled layout at narrow widths https://bugs.webkit.org/show_bug.cgi?id=180597 Reviewed by Timothy Hatcher. * UserInterface/Views/RecordingContentView.css: (.content-view:not(.tab).recording > header > .slider-container): (.content-view:not(.tab).recording > header > .slider-container > *): (.content-view:not(.tab).recording > header > .slider-container > input[type=range]): 2017-12-18 Matt Baker Web Inspector: Canvas tab: placeholder/help text wrapping looks poor at narrow widths https://bugs.webkit.org/show_bug.cgi?id=180943 Reviewed by Timothy Hatcher. * UserInterface/Views/ContentView.css: (.content-view > .message-text-view > .description): * UserInterface/Views/Main.css: (.message-text-view .navigation-item-help): (.message-text-view .navigation-item-help .navigation-bar): (.message-text-view .navigation-item-help .navigation-bar > .item): 2017-12-18 Devin Rousso REGRESSION (r225569): Web Inspector: Commented out properties aren't properly highlighted https://bugs.webkit.org/show_bug.cgi?id=180687 Reviewed by Timothy Hatcher. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .property:not(.disabled) .name): (.spreadsheet-style-declaration-editor .property:not(.disabled) .value): (.spreadsheet-style-declaration-editor .property.disabled): (.spreadsheet-style-declaration-editor .name): Deleted. (.spreadsheet-style-declaration-editor .value): Deleted. (.spreadsheet-style-declaration-editor .property.disabled, .spreadsheet-style-declaration-editor .property.disabled > *): Deleted. 2017-12-18 Joseph Pecoraro Web Inspector: Network Tab - waterfall graph can be mis-sized after closing detail view https://bugs.webkit.org/show_bug.cgi?id=180903 Reviewed by Matt Baker. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype._hideResourceDetailView): Redraw waterfall column after hiding the detail view. 2017-12-15 Ryan Haddad Unreviewed, rolling out r225941. This change introduced LayoutTest crashes and assertion failures. Reverted changeset: "Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic" https://bugs.webkit.org/show_bug.cgi?id=180770 https://trac.webkit.org/changeset/225941 2017-12-15 Devin Rousso Web Inspector: Canvas Tab should be turned on by default https://bugs.webkit.org/show_bug.cgi?id=180594 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WI.loaded): 2017-12-15 Nikita Vasilyev Web Inspector: Styles Redesign: clicking above selector should prepend new property https://bugs.webkit.org/show_bug.cgi?id=180628 Reviewed by Devin Rousso. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .property): (.spreadsheet-style-declaration-editor .property-toggle): (.spreadsheet-style-declaration-editor .property.has-warning .warning): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: (.spreadsheet-css-declaration): (.spreadsheet-css-declaration :matches(.header, .header-media)): (.spreadsheet-css-declaration :matches(.header, .header-media):first-child): When header-media element is present, header element should have padding-top set to 0. (.spreadsheet-css-declaration .header.editing-selector .origin): (.spreadsheet-css-declaration .close-brace): 2017-12-14 David Kilzer Enable -Wstrict-prototypes for WebKit Rubber-stamped by Joseph Pecoraro. * Configurations/Base.xcconfig: (CLANG_WARN_STRICT_PROTOTYPES): Add. Set to YES. 2017-12-14 Brian Burg Web Inspector: InspectorTest.evaluateInPage should unwrap primitive values by default https://bugs.webkit.org/show_bug.cgi?id=180831 Reviewed by Joseph Pecoraro. * UserInterface/Test/FrontendTestHarness.js: (FrontendTestHarness.prototype.evaluateInPage.resultObjectToReturn): (FrontendTestHarness.prototype.evaluateInPage): Unwrap the resulting RemoteObject's value if it is a primitive. Add an `options` dictionary so this behavior can be opted out. * UserInterface/Test/TestHarness.js: Add documentation of how evaluateInPage works. 2017-12-14 Nikita Vasilyev Web Inspector: Styles Redesign: selecting text should not add new properties https://bugs.webkit.org/show_bug.cgi?id=180797 Reviewed by Devin Rousso. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick): 2017-12-14 Devin Rousso Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic https://bugs.webkit.org/show_bug.cgi?id=180770 Reviewed by Joseph Pecoraro. * UserInterface/Models/Canvas.js: (WI.Canvas.fromPayload): (WI.Canvas.prototype.get contextType): (WI.Canvas.prototype.saveIdentityToCookie): (WI.Canvas.prototype.get frame): Deleted. 2017-12-14 Joseph Pecoraro Web Inspector: Network Tab - URL filter should be case-insensitive like filter bars in other tabs https://bugs.webkit.org/show_bug.cgi?id=180824 Reviewed by Brian Burg. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype._resetFilters): (WI.NetworkTableContentView.prototype._urlFilterDidChange): Use a case-insensitive regex created from the search query and use that when filtering resources. (WI.NetworkTableContentView.prototype._checkURLFilterAgainstFinishedResource): Deleted. (WI.NetworkTableContentView.prototype._checkURLFilterAgainstResource): (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish): (WI.NetworkTableContentView.prototype._resourceLoadingDidFail): Rename the helper for checking the URL filter. 2017-12-14 Joseph Pecoraro Web Inspector: UncaughtExceptionReporter fails on early errors https://bugs.webkit.org/show_bug.cgi?id=180776 Reviewed by Brian Burg. * UserInterface/Debug/UncaughtExceptionReporter.js: (urlLastPathComponent): (handleError): (handleUncaughtException): URLUtilities parseURL might not be available, so have a small helper for getting a good name from a URL / filename. (handleUncaughtExceptionRecord): (dismissErrorSheet): Wrap `WI` namespace accesses in a try/catch since `WI` might not be available. Safely check global variables there were `Foo` as `window.Foo` to avoid errors if they are not actually available. 2017-12-13 Joseph Pecoraro Web Inspector: Network Tab - Make text filter just a URL filter and update incrementally https://bugs.webkit.org/show_bug.cgi?id=180796 Reviewed by Brian Burg. Revert the Network Tab's text filter back to being just a URL filter with the normal behaviors of our other text filters that update as you type (incremental). This also renames the "text filter" to "url filter" everywhere in the ContentView for clarity. A follow-up change will make the url filter be case-insensitive to fully match the filter bars in other tabs. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype.get filterNavigationItems): (WI.NetworkTableContentView.prototype._checkURLFilterAgainstFinishedResource): (WI.NetworkTableContentView.prototype._updateURLFilterActiveIndicator): (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish): (WI.NetworkTableContentView.prototype._resourceLoadingDidFail): (WI.NetworkTableContentView.prototype._hasURLFilter): (WI.NetworkTableContentView.prototype._hasActiveFilter): (WI.NetworkTableContentView.prototype._passURLFilter): (WI.NetworkTableContentView.prototype._passFilter): (WI.NetworkTableContentView.prototype._updateFilteredEntries): (WI.NetworkTableContentView.prototype._resetFilters): (WI.NetworkTableContentView.prototype._urlFilterDidChange): (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFinishedResource): Deleted. (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFailedResource): Deleted. (WI.NetworkTableContentView.prototype._updateTextFilterActiveIndicator): Deleted. (WI.NetworkTableContentView.prototype._hasTextFilter): Deleted. (WI.NetworkTableContentView.prototype._passTextFilter): Deleted. (WI.NetworkTableContentView.prototype._textFilterDidChange): Deleted. 2017-12-13 Joseph Pecoraro REGRESSION: Web Inspector: Opening inspector crashes page if there are empty resources https://bugs.webkit.org/show_bug.cgi?id=180787 Reviewed by Brian Burg. * UserInterface/Test/TestUtilities.js: Add a generic sanitizeURL used by many tests. * UserInterface/TestStub.html: Include TestUtilities. 2017-12-13 Devin Rousso Web Inspector: add instrumentation for ImageBitmapRenderingContext https://bugs.webkit.org/show_bug.cgi?id=180736 Reviewed by Joseph Pecoraro. * UserInterface/Base/ImageUtilities.js: (WI.ImageUtilities.promisifyLoad): (WI.ImageUtilities.imageFromImageBitmap): * UserInterface/Models/Canvas.js: (WI.Canvas.fromPayload): (WI.Canvas.displayNameForContextType): * UserInterface/Models/NativeFunctionParameters.js: * UserInterface/Models/Recording.js: (WI.Recording.displayNameForSwizzleType): (WI.Recording.prototype.async swizzle): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._generateDOM): (WI.RecordingActionTreeElement._generateDOM.createParameterElement): 2017-12-12 Nikita Vasilyev Web Inspector: Styles Redesign: navigating away from empty value should remove CSS property https://bugs.webkit.org/show_bug.cgi?id=180508 Reviewed by Devin Rousso. Remove a property when navigating away from it (e.g. to the next/previous property, or outside of the styles panel entirely) and either its name or value is empty: color: [ ]-> <-[ ]: red <-[color]: Don't remove a property when navigating from an empty value to a non-empty name: color: <-[ ] Always remove a property when both name and value are empty. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit): (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur): * UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField.prototype._handleBlur): (WI.SpreadsheetTextField.prototype.get valueBeforeEditing): Deleted. 2017-12-12 Brian Burg Web Inspector: support async setup() and async teardown() in AsyncTestSuite https://bugs.webkit.org/show_bug.cgi?id=180626 Reviewed by Timothy Hatcher. This can make some code simpler by removing Promise-related boilerplate. I'm splitting this patch from the new use-site in the interest of making it easier to review. * UserInterface/Test/TestSuite.js: (AsyncTestSuite.prototype.runTestCases): (AsyncTestSuite): 2017-12-12 Brian Burg Web Inspector: SyncTestSuite should complain if passed an async setup/test/teardown function https://bugs.webkit.org/show_bug.cgi?id=180717 Reviewed by Devin Rousso. * UserInterface/Test/TestSuite.js: (SyncTestSuite.prototype.addTestCase): Raise an exception if test/setup/teardown is an async function. It won't work. 2017-12-12 Brian Burg Web Inspector: add InspectorTest.expectException() and use it https://bugs.webkit.org/show_bug.cgi?id=180719 Reviewed by Matt Baker. This helps straighten out async test() functions that need to test exceptional cases. Without this, every such method needs try/catch boilerplate to leak the error outside the scope of the catch-block and then assert that it exists. * UserInterface/Test/TestHarness.js: (TestHarness.prototype.expectException): Added. This method takes a callback which is expected to raise an exception either by throwing an Error instance or returning a Promise that rejects with an Error instance. The method returns a Promise that is either resolved with the expected exception from one of the above sources, or is rejected with the non-exception result that was returned or resolved by the callback. 2017-12-12 Michael Catanzaro Don't require perl(File::Copy::Recursive) https://bugs.webkit.org/show_bug.cgi?id=180479 Reviewed by Daniel Bates. Fix the error handling. I added this at the last moment and failed to test. The logic is inverted, causing an error to always be reported on success. Add a missing 'mkdir -p' using File::Path::make_path. This has its own built-in error reporting, so no need to add our own. * Scripts/copy-user-interface-resources.pl: (ditto): 2017-12-12 Michael Catanzaro Unreviewed, don't print empty error message when copying resource fails Unsurprisingly, when system() fails, there is not any useful error to be printed, so don't. * Scripts/copy-user-interface-resources.pl: (ditto): 2017-12-08 Joseph Pecoraro ServiceWorker Inspector: Various issues inspecting service worker on mobile.twitter.com https://bugs.webkit.org/show_bug.cgi?id=180520 Reviewed by Brian Burg. * UserInterface/Main.html: * UserInterface/Test.html: New files. * UserInterface/Controllers/SourceMapManager.js: (WI.SourceMapManager.prototype._loadAndParseSourceMap): * UserInterface/Models/SourceMapResource.js: (WI.SourceMapResource.prototype.requestContentFromBackend): A ServiceWorker inspector doesn't have a main frame, fall back to an empty frameIdentifier, it is ignored by the Service Worker network agent. * UserInterface/Base/Main.js: Handle a Service Worker inspector where there is no frame. This can search the main resource's resource collection. * UserInterface/Controllers/DebuggerManager.js: (WI.DebuggerManager.prototype.scriptDidParse): * UserInterface/Controllers/FrameResourceManager.js: (WI.FrameResourceManager.prototype.resourceRequestDidFailLoading): In Service Workers the resources won't have a parent frame. (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget): (WI.FrameResourceManager.prototype._processServiceWorkerInitializationInfo): In service worker initialization fallback to using the script content as the main resource if we didn't get a Script that actually includes it. * UserInterface/Models/LocalScript.js: (WI.LocalScript): (WI.LocalScript.prototype.requestContentFromBackend): A way to create a local Script with content. * UserInterface/Views/SourceCodeTextEditor.js: (WI.SourceCodeTextEditor.prototype.get _supportsDebugging): Disallow breakpoints in a LocalScript since we have no way to tell the backend where to set breakpoints. * UserInterface/Models/TextRange.js: (WI.TextRange.fromText): Add a way to get a TextRange from static text. 2017-12-08 Michael Catanzaro Don't require perl(File::Copy::Recursive) https://bugs.webkit.org/show_bug.cgi?id=180479 Reviewed by Konstantin Tokarev. If File::Copy::Recursive is not installed, there is currently a Darwin fallback to the ditto command. That doesn't exist on Linux, but we can emulate it by running 'cp -R' on everything in the source directory. This should probably work everywhere except Windows. * Scripts/copy-user-interface-resources.pl: (ditto): 2017-12-07 Eric Carlson Simplify log channel configuration UI https://bugs.webkit.org/show_bug.cgi?id=180527 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/LoggingChannel.js: * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): 2017-12-07 Matt Lewis Unreviewed, rolling out r225634. This caused layout tests to time out. Reverted changeset: "Simplify log channel configuration UI" https://bugs.webkit.org/show_bug.cgi?id=180527 https://trac.webkit.org/changeset/225634 2017-12-07 Eric Carlson Simplify log channel configuration UI https://bugs.webkit.org/show_bug.cgi?id=180527 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/LoggingChannel.js: * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): 2017-12-06 Devin Rousso Web Inspector: Canvas: spurious warnings shown for commands that changed pixel contents https://bugs.webkit.org/show_bug.cgi?id=180505 Reviewed by Brian Burg. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction.prototype.apply.getContent): (WI.RecordingAction.prototype.apply): 2017-12-06 Devin Rousso Web Inspector: Style Redesign: filtering removes header if one rule has no match even if others do https://bugs.webkit.org/show_bug.cgi?id=180467 Reviewed by Timothy Hatcher. * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel.prototype.applyFilter): (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied): 2017-12-06 Matt Baker Web Inspector: Details section headers overlap Classes container in the Computed Styles panel https://bugs.webkit.org/show_bug.cgi?id=180380 Reviewed by Timothy Hatcher. * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)): 2017-12-06 Matt Baker Web Inspector: Canvas Tab initial user experience is poor when no canvases exist https://bugs.webkit.org/show_bug.cgi?id=179329 Reviewed by Timothy Hatcher. This patch adds a new method, WI.createNavigationItemHelp, for creating command help to display in a message text view. The method accepts a format string and NavigationItem, and returns a DOM element. For example, WI.createNavigationItemHelp("Press %s to do X.", navigationItem) returns: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.importRecording): Importing a recording should be a manager command with a corresponding event, so that it's decoupled from any specific location in the UI. * UserInterface/Views/CanvasOverviewContentView.js: (WI.CanvasOverviewContentView): * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView): (WI.CanvasTabContentView.prototype.attached): (WI.CanvasTabContentView.prototype._recordingImportedOrStopped): (WI.CanvasTabContentView.prototype._recordingStopped): Deleted. (WI.CanvasTabContentView.prototype._navigationSidebarImport): Deleted. * UserInterface/Views/Main.css: (.message-text-view .navigation-item-help): (.message-text-view .navigation-item-help .navigation-bar): (.message-text-view .navigation-item-help .navigation-bar > .item): New styles for a NavigationItem appearing inline as part of descriptive text. Wrapped in a fake navigation bar so navigation item styles are picked up. * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel.prototype.initialLayout): (WI.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked): Deleted. Moved import code to CanvasManager. 2017-12-06 Devin Rousso Web Inspector: REGRESSION(r225569): CSSStyleDetailsSidebarPanel no longer exists https://bugs.webkit.org/show_bug.cgi?id=180466 Reviewed by Joseph Pecoraro. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.applyFilter): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied): * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel.prototype.applyFilter): (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied): * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype.applyFilter): 2017-12-06 Devin Rousso Web Inspector: Styles Redesign: display related pseudo-elements https://bugs.webkit.org/show_bug.cgi?id=176187 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.applyFilter): (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied): * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css: (.spreadsheet-style-panel .section-header): (.spreadsheet-style-panel .section-header .node-link): (.spreadsheet-style-panel .section-header .node-link:hover): (.spreadsheet-style-panel .section-inherited): Deleted. (.spreadsheet-style-panel .section-inherited .node-link): Deleted. (.spreadsheet-style-panel .section-inherited .node-link:hover): Deleted. After all of the matched and inherited styles are added, loop over each pseudo-element, get the DOMNodeStyles for each, refresh them if needed, and then add the header and sections. * UserInterface/Models/DOMNodeStyles.js: (WI.DOMNodeStyles.prototype.refreshIfNeeded): (WI.DOMNodeStyles.prototype.refresh): Return a reference to the DOMNodeStyles object once the refresh promise is resolved. * UserInterface/Models/DOMNode.js: (WI.DOMNode.prototype.get displayName): If the node is a pseudo-element, display the pseudo-type instead of the node name. 2017-12-06 Devin Rousso Web Inspector: [PARITY] Styles Redesign: Ability to add new style rules https://bugs.webkit.org/show_bug.cgi?id=178329 Reviewed by Timothy Hatcher. * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.newRuleButtonClicked): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.newRuleButtonContextMenu): (WI.SpreadsheetRulesStyleDetailsPanel.prototype._addNewRule): Implement the two functions that CSSStyleDetailsSidebarPanel expects to exist in order for the selected panel to support adding a new rule. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector): If the _selectorElement has not been created yet, set a flag and focus it once layout() has been called (thereby ensuring that initialLayout() has been called). 2017-12-05 Devin Rousso Web Inspector: Styles Redesign: for newly added properties, pressing delete in empty value field should focus on name field https://bugs.webkit.org/show_bug.cgi?id=179831 Reviewed by Timothy Hatcher. * UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField.prototype._handleKeyDown): * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBackspace): 2017-12-05 Devin Rousso Web Inspector: [PARITY] Styles Redesign: Make filtering work https://bugs.webkit.org/show_bug.cgi?id=178331 Reviewed by Timothy Hatcher. Since both the sections and editors (per-section) use View semantics, we cannot simply search for instances of the filtered text since not all of the subviews may have called layout() yet. Instead, we have to rely on event listeners to relay information as to whether the filtered text was matched up the chain, applying the correct style classes along the way. * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.applyFilter): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.filterDidChange): (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied): Save the "Inherited From" elements so that they can be hidden if no styles inherited from that node match the filter. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.applyFilter): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied): Save the media header elements so that they can also be filtered. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.applyFilter): * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.applyFilter): (WI.SpreadsheetStyleProperty.prototype._update): Move the name and value elements to a new container so that filter highlight won't also apply to the checkbox or warning element. 2017-12-05 Nikita Vasilyev Web Inspector: Styles Redesign: adding a property before or after the first one appends it to the end https://bugs.webkit.org/show_bug.cgi?id=180321 Reviewed by Timothy Hatcher. * UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex): * UserInterface/Models/TextRange.js: (WI.TextRange.prototype.collapseToStart): 2017-12-05 Joseph Pecoraro Web Inspector: Empty Message View in Network Tab has padding at top https://bugs.webkit.org/show_bug.cgi?id=180453 Reviewed by Matt Baker. * UserInterface/Views/NetworkTableContentView.css: (.content-view.network .message-text-view): Deleted. 2017-12-05 Nikita Vasilyev Web Inspector: Styles: make Computed a top-level sidebar tab https://bugs.webkit.org/show_bug.cgi?id=174229 Reviewed by Matt Baker. Styles dropdown tab selector was removed. Styles and Computed are now top-level sidebar tabs. Visual styles is no longer visible in the Styles sidebar tabs by default but can be enabled in the settings. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Setting.js: * UserInterface/Main.html: * UserInterface/Views/CSSStyleDeclarationSection.js: (WI.CSSStyleDeclarationSection.prototype.findMatchingPropertiesAndSelectors): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WI.CSSStyleDeclarationTextEditor.prototype.findMatchingProperties): (WI.CSSStyleDeclarationTextEditor.prototype.removeNonMatchingProperties): * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js: Added. (WI.ComputedStyleDetailsSidebarPanel): * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline.prototype._ondragover): (WI.DOMTreeOutline.prototype._ondrop): * UserInterface/Views/ElementsTabContentView.js: (WI.ElementsTabContentView): * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css: Renamed from Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.css. * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js: Renamed from Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js. (WI.GeneralStyleDetailsSidebarPanel): (WI.GeneralStyleDetailsSidebarPanel.prototype.get panel): (WI.GeneralStyleDetailsSidebarPanel.prototype.visibilityDidChange): (WI.GeneralStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): (WI.GeneralStyleDetailsSidebarPanel.prototype.layout): (WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout): (WI.GeneralStyleDetailsSidebarPanel.prototype.sizeDidChange): (WI.GeneralStyleDetailsSidebarPanel.prototype.get _initialScrollOffset): (WI.GeneralStyleDetailsSidebarPanel.prototype._updateNoForcedPseudoClassesScrollOffset): (WI.GeneralStyleDetailsSidebarPanel.prototype._showPanel): (WI.GeneralStyleDetailsSidebarPanel.prototype._newRuleButtonClicked): (WI.GeneralStyleDetailsSidebarPanel.prototype._newRuleButtonContextMenu): (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles): (WI.GeneralStyleDetailsSidebarPanel.prototype._createToggleForClassName): (WI.GeneralStyleDetailsSidebarPanel.prototype._filterDidChange): Styles and Computed tabs share a few UI components, such as force state (:hover, :focus, etc.), filter field, and CSS class toggle components. To implement this, CSSStyleDetailsSidebarPanel was renamed to GeneralStyleDetailsSidebarPanel. CSSStyleDetailsSidebarPanel used to support several panels. This is no longer the case with GeneralStyleDetailsSidebarPanel: - _initiallySelectedPanel was removed. - _selectedPanel was replaced by _panel. * UserInterface/Views/GroupNavigationItem.js: (WI.GroupNavigationItem.prototype.get minimumWidth): * UserInterface/Views/NavigationBar.css: (.navigation-bar .item,): (.sidebar-navigation-bar): (.sidebar-navigation-bar .holder): * UserInterface/Views/NavigationBar.js: (WI.NavigationBar.prototype._calculateMinimumWidth): Minor optimization: don't toggle class names when there are no visible navigation items. * UserInterface/Views/RulesStyleDetailsPanel.js: (WI.RulesStyleDetailsPanel.prototype.filterDidChange): * UserInterface/Views/RulesStyleDetailsSidebarPanel.js: Copied from Source/WebInspectorUI/UserInterface/Views/NavigationBar.css. (WI.RulesStyleDetailsSidebarPanel): * UserInterface/Views/SearchTabContentView.js: (WI.SearchTabContentView): * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): * UserInterface/Views/Sidebar.js: (WI.Sidebar): * UserInterface/Views/SidebarNavigationBar.js: Copied from Source/WebInspectorUI/UserInterface/Views/NavigationBar.css. (WI.SidebarNavigationBar): (WI.SidebarNavigationBar.prototype.insertNavigationItem): (WI.SidebarNavigationBar.prototype._calculateMinimumWidth): SidebarNavigationBar wraps navigation items in an element so it can correctly calculate the width of all items with spacing between them. * UserInterface/Views/StyleDetailsPanel.js: (WI.StyleDetailsPanel.prototype.get _initialScrollOffset): * UserInterface/Views/VisualStyleDetailsSidebarPanel.js: Copied from Source/WebInspectorUI/UserInterface/Views/NavigationBar.css. (WI.VisualStyleDetailsSidebarPanel): 2017-12-05 Joseph Pecoraro Web Inspector: content views for resources loaded through XHR do not reflect declared mime-type https://bugs.webkit.org/show_bug.cgi?id=141389 Reviewed by Brian Burg. * UserInterface/Base/Utilities.js: Blob <-> Text conversion helpers. * UserInterface/Models/Resource.js: (WI.Resource.prototype.createObjectURL): Previously all Image resources were assumed to have base64Encoded data which we automatically convert to a Blob. Now that some image data can be transfered as text, convert that to a Blob here since the output is expected to be a Blob. * UserInterface/Views/ResourceContentView.js: (WI.ResourceContentView.prototype.showGenericNoContentMessage): * UserInterface/Views/TextResourceContentView.js: (WI.TextResourceContentView.prototype.contentAvailable): (WI.TextResourceContentView.prototype._contentDidPopulate): * UserInterface/Views/ImageResourceContentView.js: (WI.ImageResourceContentView.prototype.contentAvailable): Better handle no content cases. * UserInterface/Views/ResourceClusterContentView.js: (WI.ResourceClusterContentView.prototype.get responseContentView): (WI.ResourceClusterContentView.prototype._contentViewForResourceType): Make a best effort to find a good ContentView to show the resource data. This is done by looking at the ResourceType and MIME Type. * UserInterface/Views/SVGImageResourceClusterContentView.js: (WI.SVGImageResourceClusterContentView.prototype._showContentViewForIdentifier): Handle if image data is now text (the image/svg+xml case). 2017-12-05 Simon Fraser Remove webkitGetImageDataHD and webkitPutImageDataHD from canvas API https://bugs.webkit.org/show_bug.cgi?id=180387 Reviewed by Dean Jackson. CanvasRenderingContext2D.webkitGetImageDataHD and webkitPutImageDataHD were never standardized, and Blink removed support in 2014 (https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/FOPH5dloGG8). Since our canvas backing store is always 1x, they have no use anyway, so remove them. * UserInterface/Models/NativeFunctionParameters.js: * UserInterface/Models/RecordingAction.js: (WI.RecordingAction.prototype.getImageParameters): (WI.RecordingAction): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._classNameForAction.classNameForActionName): (WI.RecordingActionTreeElement._classNameForAction): 2017-12-04 Devin Rousso Web Inspector: provide method for recording CanvasRenderingContext2D from JavaScript https://bugs.webkit.org/show_bug.cgi?id=175166 Reviewed by Joseph Pecoraro. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.recordingFinished): If a `name` is sent with the payload, use it as the suggested name. * UserInterface/Models/NativeFunctionParameters.js: Add `console.record` and `console.recordEnd`. * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView.prototype.showRepresentedObject): Drive-by: remove logic that toggled the collapsed state of the navigation sidebar, as this was not very controllable by the user and often was aggravating. (WI.CanvasTabContentView.prototype._recordingStopped): Only show the recording if it was not started from the console. This can determined by CanvasManager when it recieves a recording if the recording's source is not the same as the current canvas being recorded. 2017-12-04 Matt Baker Web Inspector: Canvas Tab initial user interface needs some polish https://bugs.webkit.org/show_bug.cgi?id=179330 Reviewed by Joseph Pecoraro. Update the Canvas overview placeholder text and prevent appearance of the vertical scrollbar when no canvases exist. This patch also includes a bunch of cleanup of code that creates content placeholder text throughout the UI, and makes sure all text is styled consistently. * Localizations/en.lproj/localizedStrings.js: Updated Canvas overview message text. * UserInterface/Base/Main.js: Make the "message text view" a container with child message element, instead of a simple element with text content. This makes it simpler to customize the message (by adding buttons, more text, etc). * UserInterface/Views/CanvasDetailsSidebarPanel.css: (.sidebar > .panel.details.canvas .details-section.canvas-extensions .content > ul): (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder): Deleted. (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message): Deleted. * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WI.CanvasDetailsSidebarPanel.prototype.initialLayout): * UserInterface/Views/CanvasOverviewContentView.js: (WI.CanvasOverviewContentView): Customize the content placeholder to include a description beneath the "No Canvas Contexts" message. * UserInterface/Views/CollectionContentView.css: (.content-view.collection): Change overflow-y to auto, to prevent scrollbar from appearing when "Show scroll bars" system preference is enabled on macOS. * UserInterface/Views/CollectionContentView.js: Add support for custom content placeholders. (WI.CollectionContentView): (WI.CollectionContentView.prototype._showContentPlaceholder): (WI.CollectionContentView.prototype._hideContentPlaceholder): * UserInterface/Views/ContentView.css: (.content-view > .message-text-view): (.content-view > .message-text-view > .message): * UserInterface/Views/DebuggerSidebarPanel.css: (.sidebar > .panel.navigation.debugger > .content): (.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)): Deleted. * UserInterface/Views/DetailsSection.css: (.details-section > .content > .group > .row > .message-text-view): * UserInterface/Views/Main.css: (.message-text-view): (.message-text-view > .message): (.message-text-view.error): * UserInterface/Views/NavigationSidebarPanel.css: (.sidebar > .panel.navigation > .overflow-shadow): (.sidebar > .panel.navigation > .content .empty-content-placeholder): Deleted. (.sidebar > .panel.navigation > .content > .empty-content-placeholder): Deleted. (.sidebar > .panel.navigation > .content .empty-content-placeholder > .message): Deleted. * UserInterface/Views/NavigationSidebarPanel.js: (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder): (WI.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded): * UserInterface/Views/NetworkTableContentView.css: (.content-view.network .message-text-view): (.content-view.network .message-text-view > .message): Workaround to prevent "No Filter Results" message from being styled like "full width" messages displayed in ContentViews (large, bold font). This is needed because the placeholder message element is a immediate child of the network content view, rather than the network table. (.content-view.network .empty-content-placeholder): Deleted. (body[dir=ltr] .content-view.network .empty-content-placeholder): Deleted. (body[dir=rtl] .content-view.network .empty-content-placeholder): Deleted. (.content-view.network .empty-content-placeholder > .message): Deleted. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype._showEmptyFilterResultsMessage): * UserInterface/Views/RecordingNavigationSidebarPanel.css: (.sidebar > .panel.navigation.recording > .content): (.sidebar > .panel.navigation.recording > :matches(.content, .empty-content-placeholder)): Deleted. * UserInterface/Views/ResourceSidebarPanel.css: (.sidebar > .panel.navigation.resource > .content): (.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)): Deleted. * UserInterface/Views/RulesStyleDetailsPanel.css: (.sidebar > .panel.details.css-style > .content > .rules > .message-text-view): (.sidebar > .panel.details.css-style > .content > .rules:not(.filter-non-matching) > .message-text-view): (.sidebar > .panel.details.css-style > .content > .rules:not(.filter-non-matching) > .no-filter-results): Deleted. (.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results): Deleted. (.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results > .no-filter-results-message): Deleted. * UserInterface/Views/RulesStyleDetailsPanel.js: (WI.RulesStyleDetailsPanel): * UserInterface/Views/SearchSidebarPanel.css: (.sidebar > .panel.navigation.search > :matches(.content, .message-text-view)): (.sidebar > .panel.navigation.search.changed > :matches(.content, .message-text-view)): (.sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)): Deleted. (.sidebar > .panel.navigation.search.changed > :matches(.content, .empty-content-placeholder)): Deleted. * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel): * UserInterface/Views/StorageSidebarPanel.css: (.sidebar > .panel.navigation.storage > .content): (.sidebar > .panel.navigation.storage > :matches(.content, .empty-content-placeholder)): Deleted. * UserInterface/Views/Variables.css: (:root): 2017-11-29 Nikita Vasilyev Web Inspector: Styles Redesign: can't add new property after property without trailing semicolon https://bugs.webkit.org/show_bug.cgi?id=179587 Reviewed by Timothy Hatcher. * UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype._updateOwnerStyleText): (WI.CSSProperty.prototype._appendSemicolonIfNeeded): Add a semicolon before the new property if the last property doesn't have it already. 2017-11-29 Joseph Pecoraro Web Inspector: Console Tab navigation bar sometimes does not include filter bar, clear console sometimes does not work https://bugs.webkit.org/show_bug.cgi?id=180124 Reviewed by Brian Burg. * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype.closed): Avoid removing event listeners if this LogContentView singleton is ever closed. The singleton will always be alive so we don't want to remove the event listeners without a way to add them back. * UserInterface/Base/Main.js: (WI.showSplitConsole): * UserInterface/Views/ConsoleTabContentView.js: (WI.ConsoleTabContentView.prototype.shown): When showing the ConsoleTab immediately collapse the split console so that any following code that checks WI.isShowingSplitConsole will get the expected value. It is also now possible to share a ContentView across ContentBrowsers via tombstones, so remove the old code that would frequently close the LogContentView. 2017-11-28 Devin Rousso Web Inspector: remove extra space before call frames in Canvas backtraces https://bugs.webkit.org/show_bug.cgi?id=180129 Reviewed by Matt Baker. * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WI.CanvasDetailsSidebarPanel.prototype.initialLayout): * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: (WI.RecordingTraceDetailsSidebarPanel): Hide the disclosure buttons of these TreeOutlines as they don't have children. 2017-11-28 Matt Baker Web Inspector: Clean up backtrace in Canvas details sidebar https://bugs.webkit.org/show_bug.cgi?id=179807 Reviewed by Devin Rousso. * UserInterface/Controllers/CallFrameTreeController.js: Added. Display a list of call frames in a tree outline. Browse to the represented call frame's source code location when a tree element is clicked or selected. (WI.CallFrameTreeController): (WI.CallFrameTreeController.prototype.get treeOutline): (WI.CallFrameTreeController.prototype.get callFrames): (WI.CallFrameTreeController.prototype.set callFrames): (WI.CallFrameTreeController.prototype.disconnect): (WI.CallFrameTreeController.prototype._treeElementClicked): (WI.CallFrameTreeController.prototype._treeSelectionDidChange): (WI.CallFrameTreeController.prototype._showSourceCodeLocation): * UserInterface/Main.html: * UserInterface/Views/CanvasDetailsSidebarPanel.css: (.sidebar > .panel.details.canvas .details-section.canvas-backtrace .call-frame): Deleted. * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WI.CanvasDetailsSidebarPanel.prototype.initialLayout): (WI.CanvasDetailsSidebarPanel.prototype._refreshBacktraceSection): * UserInterface/Views/RecordingTraceDetailsSidebarPanel.css: (.sidebar > .panel.details.recording-trace > .content > .call-frame): Deleted. * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: (WI.RecordingTraceDetailsSidebarPanel): (WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction): * UserInterface/Views/TreeElement.js: (WI.TreeElement.treeElementToggled): (WI.TreeElement.prototype.selectOnMouseDown): Prevent selection if parent tree outline is not selectable. * UserInterface/Views/TreeOutline.css: (.tree-outline.non-selectable .item:hover): * UserInterface/Views/TreeOutline.js: Add `selectable` behavior, set at construction time. When false, clicking a tree element dispatches an event instead of selecting the tree element. Default true. (WI.TreeOutline): (WI.TreeOutline.prototype.get selectable): Dispatch click event when not selectable, and some drive-by cleanup. 2017-11-28 Joseph Pecoraro Web Inspector: Move console Preserve Log setting from Setting tab to Console navigation bar https://bugs.webkit.org/show_bug.cgi?id=180125 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/LogContentView.js: (WI.LogContentView): (WI.LogContentView.prototype.get navigationItems): (WI.LogContentView.prototype._clearLogOnNavigateSettingChanged): * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): 2017-11-28 Joseph Pecoraro Web Inspector: Remove Network "Clear on load" from Settings tab now that Network tab has a toggle for it https://bugs.webkit.org/show_bug.cgi?id=180123 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): 2017-11-28 Joseph Pecoraro Web Inspector: Network Tab - Add a toggle in the network tab to control automatically clearing or preserving log across loads https://bugs.webkit.org/show_bug.cgi?id=180110 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: New strings. * UserInterface/Views/CheckboxNavigationItem.css: (.navigation-bar .item.checkbox input[type=checkbox]): Tweak style to more center the checkbox vertically. * UserInterface/Views/CheckboxNavigationItem.js: (WI.CheckboxNavigationItem): Fix setting the initial value of a checkbox navigation item. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype.get navigationItems): (WI.NetworkTableContentView.prototype.closed): (WI.NetworkTableContentView.prototype._clearNetworkOnNavigateSettingChanged): Add a new checkbox for the clear on navigation setting. * UserInterface/Views/SettingEditor.js: (WI.SettingEditor.createForSetting): Update the editor checkbox if the setting changes outside of the setting editor. * UserInterface/Views/NavigationItem.js: (WI.NavigationItem.prototype.get tooltip): (WI.NavigationItem.prototype.set tooltip): * UserInterface/Views/ActivateButtonNavigationItem.js: (WI.ActivateButtonNavigationItem.prototype.set activated): * UserInterface/Views/ButtonNavigationItem.js: (WI.ButtonNavigationItem): (WI.ButtonNavigationItem.prototype.get toolTip): Deleted. (WI.ButtonNavigationItem.prototype.set toolTip): Deleted. * UserInterface/Views/ToggleButtonNavigationItem.js: (WI.ToggleButtonNavigationItem.prototype.set alternateToolTip): (WI.ToggleButtonNavigationItem.prototype.set toggled): Move tooltip to the base class and rename it from `toolTip` to `tooltip` to match existing generic places like TreeElement. 2017-11-28 Joseph Pecoraro Web Inspector: Include Beacon loads in the Network Table's "Other" filter https://bugs.webkit.org/show_bug.cgi?id=180113 Reviewed by Matt Baker. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): Ensure the Other filter will handle any type that hasn't already been handled. 2017-11-28 Joseph Pecoraro ServiceWorker Inspector: Frontend changes to support Network tab and sub resources https://bugs.webkit.org/show_bug.cgi?id=179642 Reviewed by Brian Burg. This patch makes use of the NetworkAgent and ServiceWorker agents in the frontend for a ServiceWorker inspection target. It also makes changes to ensure that the subresources requested by a ServiceWorker appear as expected in both the Resources and Network Tabs. The backends of ServiceWorkers and DedicatedWorkers for network requests are different, but we want the presentation to be very similiar. Ultimately we'd like to move to more similiar backends if possible. The first (after Inspector.enable) message a ServiceWorker inspector sends to the backend is ServiceWorker.getInitializationInfo. This parallels a Page inspector sending Page.getResourceTree. From the response we get enough information to setup the MainTarget with enough information (targetId, URL) to know what its main resource URL will be. Like DedicatedWorkers, the target's main resource will be filled in with the first WI.Script matching the URL. With this initialization message alone the ServiceWorker Target behaves almost identically to a Worker target and Network loads associated with the target (by targetId) are added as sub-resources as expected. The biggest tension in this patch is within FrameResourceManager. The class, as its name indicates, assumes page resources with Frames, navigation, and loader semantics. It takes a few modifications to make it better handle resources not associated with a Page. A follow-up will rename this to just ResourceManager as the class' main task is now to associate Resources with Targets. * UserInterface/Base/Main.js: (WI.loaded): There are assumptions in a few places that the main target is a Page. Those places can now be reached when the main target is a ServiceWorker. Add a convenience WI.pageTarget that can be used in these places. * UserInterface/Test/Test.js: (WI.loaded): Add pageTarget. * UserInterface/Controllers/DebuggerManager.js: (WI.DebuggerManager.prototype.scriptDidParse): Generalize the condition so the main target can have its main resource populated. This will be the case when a ServiceWorker is the main target and its main resource needs to be populated from a Script. * UserInterface/Controllers/FrameResourceManager.js: (WI.FrameResourceManager): (WI.FrameResourceManager.prototype._processServiceWorkerInitializationInfo): Handle ServiceWorker Resource initialization which is different from Page initialization. (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget): (WI.FrameResourceManager.prototype._addResourceToTarget): (WI.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Eliminate PageAgent, which might not be available in some targets. Use pageTarget instead of mainTarget where appropriate. * UserInterface/Controllers/TargetManager.js: (WI.TargetManager.prototype.targetForIdentifier): A ServiceWorker is the first time that the main target has an identifier, so let TargetManager find it by target id. * UserInterface/Models/Resource.js: (WI.Resource): (WI.Resource.resolvedType): (WI.Resource.prototype.updateForResponse): For Resource.Type.Other resources include a better type inferred from the MIME type. ServiceWorker loads currently don't have type information and this provides a great type for such loads. This should also provide nice types for CacheStorage.add* populated resources which are otherwise type-less fetches. * UserInterface/Protocol/Connection.js: Rename the class since this may no longer be a "Page". * UserInterface/Protocol/MainTarget.js: (WI.MainTarget): (WI.MainTarget.mainConnectionInfo): (WI.MainTarget.prototype.get mainResource): (WI.MainTarget.prototype.set mainResource): (WI.MainTarget.prototype.get displayName): Deleted. * UserInterface/Protocol/Target.js: (WI.Target.prototype.set identifier): (WI.Target.prototype.set name): (WI.Target.prototype.get mainResource): (WI.Target.prototype.set mainResource): (WI.Target.prototype.get displayName): Give richer types for the main target. And allow a few things to be initialized lazily, which will be necessary from an initialization message. * UserInterface/Views/NetworkTabContentView.js: (WI.NetworkTabContentView.isTabAllowed): Remove a PageAgent requirement for the Network tab. A ServiceWorker will not have a PageAgent, but it will have a NetworkAgent, which should be good enough. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded): Initial populate should populate all subresources of all targets. * UserInterface/Views/ResourceContentView.js: (WI.ResourceContentView.prototype.contentAvailable): This was getting used by ResourceType.Other without warning. Make it warn. * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel.prototype._addScript): (WI.ResourceSidebarPanel.prototype._addTargetWithMainResource): * UserInterface/Views/ScriptTreeElement.js: (WI.ScriptTreeElement): Allow WorkerTreeElements for ServiceWorker targets which may also be the main target. Also when adding such a tree element, promote the resource sidebar to a full tree outline, and stop hiding disclosure buttons. 2017-11-27 Nikita Vasilyev Web Inspector: Styles Redesign: selector's field shadow is clipped at the bottom https://bugs.webkit.org/show_bug.cgi?id=179961 Reviewed by Matt Baker. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: (.spreadsheet-css-declaration .selector): 2017-11-21 Tomas Popela Unreviewed compile warning fix WARNING: console.assert inside control flow statement without braces on line: 130487: console.assert(this._loggingChannelSources.includes(channel.source)); * UserInterface/Controllers/LogManager.js: (WI.LogManager): 2017-11-18 Joseph Pecoraro Web Inspector: Update the Trash / Clear icon https://bugs.webkit.org/show_bug.cgi?id=179850 Reviewed by Matt Baker. * UserInterface/Images/NavigationItemTrash.svg: Update the icon. * UserInterface/Views/ProbeDetailsSidebarPanel.css: (.sidebar > .panel.probes > .navigation-bar .item.clear-samples): * UserInterface/Views/ProbeSetDetailsSection.js: (WI.ProbeSetDetailsSection): * UserInterface/Views/ScopeChainDetailsSidebarPanel.css: (.scope-chain .navigation-bar .item.clear-watch-expressions): * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WI.ScopeChainDetailsSidebarPanel): Resize to 15x15 and move it down a pixel. 2017-11-17 Joseph Pecoraro Web Inspector: Network Tab - Add HAR Export button https://bugs.webkit.org/show_bug.cgi?id=179570 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: New strings. * UserInterface/Images/Export.svg: Added. * UserInterface/Images/Import.svg: Added. Add symmetric import/export buttons. * UserInterface/Base/Main.js: (WI.contentLoaded): Expose the save keyboard shortcut so we can show its display name in a tooltip. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype.get navigationItems): (WI.NetworkTableContentView.prototype.reset): (WI.NetworkTableContentView.prototype.layout): (WI.NetworkTableContentView.prototype._updateExportButton): Include the export button and enable/disable it when appropriate. (WI.NetworkTableContentView.prototype.closed): Add a missing event listener removal. 2017-11-17 Matt Baker Web Inspector: Disabled ImageAndText-style buttons should have gray text https://bugs.webkit.org/show_bug.cgi?id=179843 Reviewed by Joseph Pecoraro. * UserInterface/Views/ButtonNavigationItem.css: (.navigation-bar .item.button.disabled.image-and-text,): (.navigation-bar .item.button.disabled > .glyph): Deleted. 2017-11-17 Joseph Pecoraro Web Inspector: Network Tab - Update Ignore Caches button https://bugs.webkit.org/show_bug.cgi?id=179841 Reviewed by Matt Baker. * UserInterface/Images/IgnoreCaches.svg: This changes from an arrow over a cache to a slash through a cache. 2017-11-17 Matt Baker Web Inspector: Remove WI.instanceForClass https://bugs.webkit.org/show_bug.cgi?id=179746 Reviewed by Timothy Hatcher. The implementations of DetailsSidebarPanel subclasses assume that panels are closed and released when no longer needed. Keeping them alive with instanceForClass isn't the right choice, since sidebar panels remove their event listeners when closed. * UserInterface/Base/Main.js: (WI.instanceForClass): Deleted. * UserInterface/Views/DebuggerTabContentView.js: (WI.DebuggerTabContentView.prototype.showDetailsSidebarPanels): * UserInterface/Views/TabContentView.js: (WI.TabContentView.prototype.get detailsSidebarPanels): 2017-11-17 Matt Baker Web Inspector: ButtonNavigationItem should support image and text button style https://bugs.webkit.org/show_bug.cgi?id=179625 Reviewed by Joseph Pecoraro. * UserInterface/Main.html: * UserInterface/Views/ButtonNavigationItem.css: (.navigation-bar .item.button): (.navigation-bar .item.button.image-only): (.navigation-bar .item.button.image-and-text): (.navigation-bar .item.button.image-and-text > span): (.navigation-bar .item.button.text-only): (.navigation-bar .item.button.text-only.checkbox): Deleted. (.navigation-bar .item.button.text-only.checkbox label): Deleted. Checkbox styles have been moved to a separate CSS file. * UserInterface/Views/ButtonNavigationItem.js: Add backing data members for the image and label, allowing the DOM representation of the button to change as needed. (WI.ButtonNavigationItem): Remove duplicate role logic. The base class sets the role. (WI.ButtonNavigationItem.prototype.set label): (WI.ButtonNavigationItem.prototype.set image): (WI.ButtonNavigationItem.prototype.get buttonStyle): (WI.ButtonNavigationItem.prototype.set buttonStyle): (WI.ButtonNavigationItem.prototype.get additionalClassNames): (WI.ButtonNavigationItem.prototype._mouseClicked): (WI.ButtonNavigationItem.prototype._update): (WI.ButtonNavigationItem.prototype.updateButtonText): Deleted. * UserInterface/Views/CheckboxNavigationItem.css: Added. (.navigation-bar .item.checkbox): (.navigation-bar .item.checkbox label): * UserInterface/Views/CheckboxNavigationItem.js: Change base class to NavigationItem, since this item lacks an image and makes use of an actual label element instead of a span for its text. (WI.CheckboxNavigationItem): (WI.CheckboxNavigationItem.prototype._checkboxChanged): (WI.CheckboxNavigationItem.prototype.updateButtonText): Deleted. 2017-11-17 Joseph Pecoraro Web Inspector: Remove FIXMEs for GTK+ missing icons https://bugs.webkit.org/show_bug.cgi?id=155282 Reviewed by Michael Catanzaro. * UserInterface/Views/PathComponentIcons.css: (.source-icon .icon): (body:not(.mac-platform, .windows-platform) .heap-snapshot-record .icon,): Deleted. * UserInterface/Views/ResourceIcons.css: (.large .resource-icon.resource-type-websocket .icon): (body:not(.mac-platform, .windows-platform) .resource-icon.resource-type-ping .icon,): Deleted. (body:not(.mac-platform, .windows-platform) .large .resource-icon.resource-type-ping .icon,): Deleted. All ports now share the same images. 2017-11-15 Nikita Vasilyev Web Inspector: Styles Redesign: typing colon in property name should advance to value field https://bugs.webkit.org/show_bug.cgi?id=178795 Reviewed by Devin Rousso. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype._update): (WI.SpreadsheetStyleProperty.prototype._handleNameBeforeInput): Unlike pressing Tab or Enter, typing ":" in the property name should discard suggestion hint. (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider): We use 250ms debounce before updating this._property.name. When typing "font-f:", we want to discard suggestion hint (i.e. "font-family"), and immediately show autocomplete for "font-f" (in this case, invalid property). * UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField): (WI.SpreadsheetTextField.prototype.stopEditing): (WI.SpreadsheetTextField.prototype.discardCompletion): Call spreadsheetTextFieldDidChange when discarding non-empty suggestion hint. (WI.SpreadsheetTextField.prototype.detached): (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion): (WI.SpreadsheetTextField.prototype._handleBlur): (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView): (WI.SpreadsheetTextField.prototype._updateCompletions): (WI.SpreadsheetTextField.prototype._applyCompletionHint): (WI.SpreadsheetTextField.prototype._hideCompletions): Deleted. 2017-11-15 Matt Baker Web Inspector: REGRESSION (r217750): Navigation sidebar broken after closing and re-opening tab https://bugs.webkit.org/show_bug.cgi?id=179717 Reviewed by Devin Rousso. NavigationSidebarPanels should not be created with WI.instanceForClass. * UserInterface/Views/DebuggerSidebarPanel.js: * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel): * UserInterface/Views/SearchSidebarPanel.js: (WI.SearchSidebarPanel): * UserInterface/Views/StorageSidebarPanel.js: (WI.StorageSidebarPanel): * UserInterface/Views/TabContentView.js: (WI.TabContentView.prototype.get navigationSidebarPanel): 2017-11-15 Michael Catanzaro Remove GTK web inspector images https://bugs.webkit.org/show_bug.cgi?id=179716 Reviewed by Carlos Garcia Campos. * Scripts/copy-user-interface-resources.pl: * UserInterface/Images/gtk/AUTHORS: Removed. * UserInterface/Images/gtk/ActiveCallFrame.svg: Removed. * UserInterface/Images/gtk/AnimationPlayStatePaused.svg: Removed. * UserInterface/Images/gtk/AnimationPlayStateRunning.svg: Removed. * UserInterface/Images/gtk/ApplicationCache.png: Removed. * UserInterface/Images/gtk/ApplicationCache@2x.png: Removed. * UserInterface/Images/gtk/ApplicationCacheManifest.png: Removed. * UserInterface/Images/gtk/ApplicationCacheManifest@2x.png: Removed. * UserInterface/Images/gtk/ArrowUp.svg: Removed. * UserInterface/Images/gtk/Assertion.svg: Removed. * UserInterface/Images/gtk/BackForwardArrows.svg: Removed. * UserInterface/Images/gtk/Breakpoint.png: Removed. * UserInterface/Images/gtk/Breakpoint@2x.png: Removed. * UserInterface/Images/gtk/BreakpointButton.svg: Removed. * UserInterface/Images/gtk/BreakpointInactive.png: Removed. * UserInterface/Images/gtk/BreakpointInactive@2x.png: Removed. * UserInterface/Images/gtk/BreakpointInactiveButton.svg: Removed. * UserInterface/Images/gtk/Breakpoints.svg: Removed. * UserInterface/Images/gtk/COPYING: Removed. * UserInterface/Images/gtk/COPYING_CCBYSA3: Removed. * UserInterface/Images/gtk/COPYING_LGPL2: Removed. * UserInterface/Images/gtk/CSSVariable.svg: Removed. * UserInterface/Images/gtk/CallTrees.svg: Removed. * UserInterface/Images/gtk/Canvas.svg: Removed. * UserInterface/Images/gtk/Canvas2D.svg: Removed. * UserInterface/Images/gtk/Canvas3D.svg: Removed. * UserInterface/Images/gtk/CanvasOverview.svg: Removed. * UserInterface/Images/gtk/Checkers.svg: Removed. * UserInterface/Images/gtk/Circle.svg: Removed. * UserInterface/Images/gtk/ClearBoth.svg: Removed. * UserInterface/Images/gtk/ClearLeft.svg: Removed. * UserInterface/Images/gtk/ClearRight.svg: Removed. * UserInterface/Images/gtk/ClippingCSS.png: Removed. * UserInterface/Images/gtk/ClippingCSS@2x.png: Removed. * UserInterface/Images/gtk/ClippingCSSLarge.png: Removed. * UserInterface/Images/gtk/ClippingCSSLarge@2x.png: Removed. * UserInterface/Images/gtk/ClippingGeneric.png: Removed. * UserInterface/Images/gtk/ClippingGeneric@2x.png: Removed. * UserInterface/Images/gtk/ClippingGenericLarge.png: Removed. * UserInterface/Images/gtk/ClippingGenericLarge@2x.png: Removed. * UserInterface/Images/gtk/ClippingJS.png: Removed. * UserInterface/Images/gtk/ClippingJS@2x.png: Removed. * UserInterface/Images/gtk/ClippingJSLarge.png: Removed. * UserInterface/Images/gtk/ClippingJSLarge@2x.png: Removed. * UserInterface/Images/gtk/Close.svg: Removed. * UserInterface/Images/gtk/CloseLarge.svg: Removed. * UserInterface/Images/gtk/CloseWhite.svg: Removed. * UserInterface/Images/gtk/ColorIcon.png: Removed. * UserInterface/Images/gtk/ColorIcon@2x.png: Removed. * UserInterface/Images/gtk/Console.svg: Removed. * UserInterface/Images/gtk/Cookie.png: Removed. * UserInterface/Images/gtk/Cookie@2x.png: Removed. * UserInterface/Images/gtk/Crosshair.svg: Removed. * UserInterface/Images/gtk/CubicBezier.svg: Removed. * UserInterface/Images/gtk/DOMBreakpoint.svg: Removed. * UserInterface/Images/gtk/DOMCharacterData.svg: Removed. * UserInterface/Images/gtk/DOMComment.svg: Removed. * UserInterface/Images/gtk/DOMDocument.svg: Removed. * UserInterface/Images/gtk/DOMDocumentType.svg: Removed. * UserInterface/Images/gtk/DOMElement.svg: Removed. * UserInterface/Images/gtk/DOMNode.svg: Removed. * UserInterface/Images/gtk/DOMTextNode.svg: Removed. * UserInterface/Images/gtk/Database.png: Removed. * UserInterface/Images/gtk/Database@2x.png: Removed. * UserInterface/Images/gtk/DatabaseTable.png: Removed. * UserInterface/Images/gtk/DatabaseTable@2x.png: Removed. * UserInterface/Images/gtk/Debug.svg: Removed. * UserInterface/Images/gtk/Debugger.svg: Removed. * UserInterface/Images/gtk/DisclosureTriangles.svg: Removed. * UserInterface/Images/gtk/DockBottom.svg: Removed. * UserInterface/Images/gtk/DockLeft.svg: Removed. * UserInterface/Images/gtk/DockRight.svg: Removed. * UserInterface/Images/gtk/DocumentCSS.png: Removed. * UserInterface/Images/gtk/DocumentCSS@2x.png: Removed. * UserInterface/Images/gtk/DocumentCSSLarge.png: Removed. * UserInterface/Images/gtk/DocumentCSSLarge@2x.png: Removed. * UserInterface/Images/gtk/DocumentFont.png: Removed. * UserInterface/Images/gtk/DocumentFont@2x.png: Removed. * UserInterface/Images/gtk/DocumentFontLarge.png: Removed. * UserInterface/Images/gtk/DocumentFontLarge@2x.png: Removed. * UserInterface/Images/gtk/DocumentGeneric.png: Removed. * UserInterface/Images/gtk/DocumentGeneric@2x.png: Removed. * UserInterface/Images/gtk/DocumentGenericLarge.png: Removed. * UserInterface/Images/gtk/DocumentGenericLarge@2x.png: Removed. * UserInterface/Images/gtk/DocumentImage.png: Removed. * UserInterface/Images/gtk/DocumentImage@2x.png: Removed. * UserInterface/Images/gtk/DocumentImageLarge.png: Removed. * UserInterface/Images/gtk/DocumentImageLarge@2x.png: Removed. * UserInterface/Images/gtk/DocumentJS.png: Removed. * UserInterface/Images/gtk/DocumentJS@2x.png: Removed. * UserInterface/Images/gtk/DocumentJSLarge.png: Removed. * UserInterface/Images/gtk/DocumentJSLarge@2x.png: Removed. * UserInterface/Images/gtk/DocumentMarkup.png: Removed. * UserInterface/Images/gtk/DocumentMarkup@2x.png: Removed. * UserInterface/Images/gtk/DocumentMarkupLarge.png: Removed. * UserInterface/Images/gtk/DocumentMarkupLarge@2x.png: Removed. * UserInterface/Images/gtk/DownloadArrow.svg: Removed. * UserInterface/Images/gtk/Elements.svg: Removed. * UserInterface/Images/gtk/Error.svg: Removed. * UserInterface/Images/gtk/Errors.svg: Removed. * UserInterface/Images/gtk/ErrorsEnabled.svg: Removed. * UserInterface/Images/gtk/EventListener.svg: Removed. * UserInterface/Images/gtk/Events.svg: Removed. * UserInterface/Images/gtk/Exception.svg: Removed. * UserInterface/Images/gtk/Eye.svg: Removed. * UserInterface/Images/gtk/FilterFieldActiveGlyph.svg: Removed. * UserInterface/Images/gtk/FilterFieldGlyph.svg: Removed. * UserInterface/Images/gtk/FloatLeft.svg: Removed. * UserInterface/Images/gtk/FloatRight.svg: Removed. * UserInterface/Images/gtk/FolderGeneric.png: Removed. * UserInterface/Images/gtk/FolderGeneric@2x.png: Removed. * UserInterface/Images/gtk/FontStyleItalic.svg: Removed. * UserInterface/Images/gtk/FontStyleNormal.svg: Removed. * UserInterface/Images/gtk/Function.svg: Removed. * UserInterface/Images/gtk/Gear.svg: Removed. * UserInterface/Images/gtk/GoToArrow.svg: Removed. * UserInterface/Images/gtk/GradientStop.png: Removed. * UserInterface/Images/gtk/GradientStop@2x.png: Removed. * UserInterface/Images/gtk/GradientStopSelected.png: Removed. * UserInterface/Images/gtk/GradientStopSelected@2x.png: Removed. * UserInterface/Images/gtk/HeapAllocationsInstrument.svg: Removed. * UserInterface/Images/gtk/HeapSnapshotObjectGraph.svg: Removed. * UserInterface/Images/gtk/HierarchicalNavigationItemChevron.svg: Removed. * UserInterface/Images/gtk/HoverMenuButton.png: Removed. * UserInterface/Images/gtk/HoverMenuButton@2x.png: Removed. * UserInterface/Images/gtk/IgnoreCaches.svg: Removed. * UserInterface/Images/gtk/Image.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner1.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner10.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner11.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner12.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner2.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner3.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner4.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner5.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner6.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner7.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner8.svg: Removed. * UserInterface/Images/gtk/IndeterminateProgressSpinner9.svg: Removed. * UserInterface/Images/gtk/Info.svg: Removed. * UserInterface/Images/gtk/InstructionPointer.png: Removed. * UserInterface/Images/gtk/InstructionPointer@2x.png: Removed. * UserInterface/Images/gtk/Issues.svg: Removed. * UserInterface/Images/gtk/IssuesEnabled.svg: Removed. * UserInterface/Images/gtk/LayerBorders.svg: Removed. * UserInterface/Images/gtk/Layers.svg: Removed. * UserInterface/Images/gtk/LayoutInstrument.svg: Removed. * UserInterface/Images/gtk/ListStylePositionInside.svg: Removed. * UserInterface/Images/gtk/ListStylePositionOutside.svg: Removed. * UserInterface/Images/gtk/LocalStorage.png: Removed. * UserInterface/Images/gtk/LocalStorage@2x.png: Removed. * UserInterface/Images/gtk/Locked.svg: Removed. * UserInterface/Images/gtk/Log.svg: Removed. * UserInterface/Images/gtk/Logs.svg: Removed. * UserInterface/Images/gtk/MemoryInstrument.svg: Removed. * UserInterface/Images/gtk/Minus.svg: Removed. * UserInterface/Images/gtk/Native.svg: Removed. * UserInterface/Images/gtk/NavigationItemCheckers.svg: Removed. * UserInterface/Images/gtk/NavigationItemCodeCoverage.svg: Removed. * UserInterface/Images/gtk/NavigationItemCurleyBraces.svg: Removed. * UserInterface/Images/gtk/NavigationItemGarbageCollect.svg: Removed. * UserInterface/Images/gtk/NavigationItemTrash.svg: Removed. * UserInterface/Images/gtk/NavigationItemTypes.svg: Removed. * UserInterface/Images/gtk/Network.svg: Removed. * UserInterface/Images/gtk/NetworkInstrument.svg: Removed. * UserInterface/Images/gtk/NewTab.svg: Removed. * UserInterface/Images/gtk/NewTabPlus.svg: Removed. * UserInterface/Images/gtk/Paint.svg: Removed. * UserInterface/Images/gtk/Path.svg: Removed. * UserInterface/Images/gtk/Pause.svg: Removed. * UserInterface/Images/gtk/PausedBreakpoint.svg: Removed. * UserInterface/Images/gtk/Pencil.svg: Removed. * UserInterface/Images/gtk/Plus13.svg: Removed. * UserInterface/Images/gtk/Plus15.svg: Removed. * UserInterface/Images/gtk/Printer.svg: Removed. * UserInterface/Images/gtk/Program.svg: Removed. * UserInterface/Images/gtk/PseudoElement.svg: Removed. * UserInterface/Images/gtk/Receiving.svg: Removed. * UserInterface/Images/gtk/Record.svg: Removed. * UserInterface/Images/gtk/Recording.svg: Removed. * UserInterface/Images/gtk/Reflection.svg: Removed. * UserInterface/Images/gtk/ReloadFull.svg: Removed. * UserInterface/Images/gtk/ReloadToolbar.svg: Removed. * UserInterface/Images/gtk/RenderingFrame.svg: Removed. * UserInterface/Images/gtk/RenderingFramesInstrument.svg: Removed. * UserInterface/Images/gtk/Request.svg: Removed. * UserInterface/Images/gtk/Resources.svg: Removed. * UserInterface/Images/gtk/Response.svg: Removed. * UserInterface/Images/gtk/ResultLine.svg: Removed. * UserInterface/Images/gtk/Resume.svg: Removed. * UserInterface/Images/gtk/ScriptsInstrument.svg: Removed. * UserInterface/Images/gtk/Search.svg: Removed. * UserInterface/Images/gtk/SearchResults.svg: Removed. * UserInterface/Images/gtk/Sending.svg: Removed. * UserInterface/Images/gtk/SessionStorage.png: Removed. * UserInterface/Images/gtk/SessionStorage@2x.png: Removed. * UserInterface/Images/gtk/ShadowDOM.svg: Removed. * UserInterface/Images/gtk/SliderThumb.png: Removed. * UserInterface/Images/gtk/SliderThumb@2x.png: Removed. * UserInterface/Images/gtk/SliderThumbPressed.png: Removed. * UserInterface/Images/gtk/SliderThumbPressed@2x.png: Removed. * UserInterface/Images/gtk/SortIndicatorArrows.svg: Removed. * UserInterface/Images/gtk/Source.svg: Removed. * UserInterface/Images/gtk/SplitToggleUp.svg: Removed. * UserInterface/Images/gtk/StepInto.svg: Removed. * UserInterface/Images/gtk/StepOut.svg: Removed. * UserInterface/Images/gtk/StepOver.svg: Removed. * UserInterface/Images/gtk/Stop.svg: Removed. * UserInterface/Images/gtk/Stopwatch.svg: Removed. * UserInterface/Images/gtk/Storage.svg: Removed. * UserInterface/Images/gtk/StyleRule.svg: Removed. * UserInterface/Images/gtk/StyleRuleInheritedElement.svg: Removed. * UserInterface/Images/gtk/StyleRulePseudoElement.svg: Removed. * UserInterface/Images/gtk/TailDeletedFunction.svg: Removed. * UserInterface/Images/gtk/TextAlignCenter.svg: Removed. * UserInterface/Images/gtk/TextAlignJustify.svg: Removed. * UserInterface/Images/gtk/TextAlignLeft.svg: Removed. * UserInterface/Images/gtk/TextAlignRight.svg: Removed. * UserInterface/Images/gtk/TextDecorationLineThrough.svg: Removed. * UserInterface/Images/gtk/TextDecorationOverline.svg: Removed. * UserInterface/Images/gtk/TextDecorationUnderline.svg: Removed. * UserInterface/Images/gtk/TextTransformCapitalize.svg: Removed. * UserInterface/Images/gtk/TextTransformLowercase.svg: Removed. * UserInterface/Images/gtk/TextTransformUppercase.svg: Removed. * UserInterface/Images/gtk/Thread.svg: Removed. * UserInterface/Images/gtk/Time.svg: Removed. * UserInterface/Images/gtk/Timeline.svg: Removed. * UserInterface/Images/gtk/TimelineRecordAPI.svg: Removed. * UserInterface/Images/gtk/TimelineRecordAnimation.svg: Removed. * UserInterface/Images/gtk/TimelineRecordComposite.svg: Removed. * UserInterface/Images/gtk/TimelineRecordConsoleProfile.svg: Removed. * UserInterface/Images/gtk/TimelineRecordEvent.svg: Removed. * UserInterface/Images/gtk/TimelineRecordLayout.svg: Removed. * UserInterface/Images/gtk/TimelineRecordPaint.svg: Removed. * UserInterface/Images/gtk/TimelineRecordProbeSampled.svg: Removed. * UserInterface/Images/gtk/TimelineRecordScriptEvaluated.svg: Removed. * UserInterface/Images/gtk/TimelineRecordStyle.svg: Removed. * UserInterface/Images/gtk/TimelineRecordTimer.svg: Removed. * UserInterface/Images/gtk/ToggleLeftSidebar.svg: Removed. * UserInterface/Images/gtk/ToggleRightSidebar.svg: Removed. * UserInterface/Images/gtk/TypeBoolean.svg: Removed. * UserInterface/Images/gtk/TypeNull.svg: Removed. * UserInterface/Images/gtk/TypeNumber.svg: Removed. * UserInterface/Images/gtk/TypeObject.svg: Removed. * UserInterface/Images/gtk/TypeRegex.svg: Removed. * UserInterface/Images/gtk/TypeString.svg: Removed. * UserInterface/Images/gtk/TypeSymbol.svg: Removed. * UserInterface/Images/gtk/TypeUndefined.svg: Removed. * UserInterface/Images/gtk/Undock.svg: Removed. * UserInterface/Images/gtk/UpDownArrows.svg: Removed. * UserInterface/Images/gtk/UserInputPrompt.svg: Removed. * UserInterface/Images/gtk/UserInputPromptPrevious.svg: Removed. * UserInterface/Images/gtk/UserInputResult.svg: Removed. * UserInterface/Images/gtk/VisualStyleNone.svg: Removed. * UserInterface/Images/gtk/VisualStylePropertyLinked.svg: Removed. * UserInterface/Images/gtk/VisualStylePropertyUnlinked.svg: Removed. * UserInterface/Images/gtk/Warning.svg: Removed. * UserInterface/Images/gtk/WebSocket.png: Removed. * UserInterface/Images/gtk/WebSocket@2x.png: Removed. * UserInterface/Images/gtk/WebSocketLarge.png: Removed. * UserInterface/Images/gtk/WebSocketLarge@2x.png: Removed. * UserInterface/Images/gtk/Weight.svg: Removed. * UserInterface/Images/gtk/WorkerScript.png: Removed. * UserInterface/Images/gtk/WorkerScript@2x.png: Removed. * UserInterface/Images/gtk/WorkerScriptLarge.png: Removed. * UserInterface/Images/gtk/WorkerScriptLarge@2x.png: Removed. 2017-11-14 Joseph Pecoraro Relicense non-distributable web inspector images https://bugs.webkit.org/show_bug.cgi?id=166460 Reviewed by Brian Burg. * APPLE_IMAGES_LICENSE.rtf: Removed. Remove the restrictive Web Inspector images license and default to the same license as the rest of WebKit. The Apple Images license was never intended to restrict distribution of Web Inspector images when used as part of WebKit. Now, all contributions to Web Inspector, images and source, have the same licensing as all other WebKit contributions. 2017-11-14 Joseph Pecoraro Web Inspector: Network Detail Views - Split Metrics into Sizes and Timing https://bugs.webkit.org/show_bug.cgi?id=179569 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New resources and strings. * UserInterface/Views/NetworkResourceDetailView.js: (WI.NetworkResourceDetailView): (WI.NetworkResourceDetailView.prototype.initialLayout): (WI.NetworkResourceDetailView.prototype._showPreferredContentView): (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem): (WI.NetworkResourceDetailView.prototype.sizesContentViewGoToHeaders): Renamed. (WI.NetworkResourceDetailView.prototype.sizesContentViewGoToRequestBody): Renamed. (WI.NetworkResourceDetailView.prototype.sizesContentViewGoToResponseBody): Renamed. Split into two navigation items and views. * UserInterface/Views/ResourceMetricsContentView.css: Removed. * UserInterface/Views/ResourceMetricsContentView.js: Removed. * UserInterface/Views/ResourceSizesContentView.css: Added. * UserInterface/Views/ResourceSizesContentView.js: Added. * UserInterface/Views/ResourceTimingContentView.css: Added. * UserInterface/Views/ResourceTimingContentView.js: Added. Split Metrics into two views. 2017-11-14 Matt Baker Web Inspector: Cleanup navigation bar dividers and separators https://bugs.webkit.org/show_bug.cgi?id=179654 Reviewed by Devin Rousso. Update path separator icon, and reduce number of dividers used in the content browser's navigation bar, to more closely match modern Xcode. * UserInterface/Images/HierarchicalNavigationItemChevron.svg: Update icon, remove tapered arrow head. * UserInterface/Views/ContentBrowser.js: (WI.ContentBrowser): Remove divider between back/forward buttons and item name. (WI.ContentBrowser.prototype._updateContentViewNavigationItems): * UserInterface/Views/HierarchicalPathComponent.css: (.hierarchical-path-component > .separator): * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype.get navigationItems): Remove dividers between buttons provided by the current content view. 2017-11-13 Joseph Pecoraro Web Inspector: Network Details Views - make section headers more prominent https://bugs.webkit.org/show_bug.cgi?id=179565 Reviewed by Devin Rousso. * UserInterface/Views/ResourceDetailsSection.css: (.resource-details > section > .title): 2017-11-13 Nikita Vasilyev Web Inspector: Styles Redesign: make selector field inline-block when editing https://bugs.webkit.org/show_bug.cgi?id=179588 Reviewed by Brian Burg. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: (.spreadsheet-css-declaration .header.editing-selector .origin): When the selector field is multiline, it covers the source link entirely. When the selector field takes only one line, the source link remains where it was before editing. (.spreadsheet-css-declaration .selector): Make it `position: relative` to cover the source link. (.spreadsheet-css-declaration .selector.spreadsheet-selector-field.editing): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): 2017-11-13 Joseph Pecoraro REGRESSION(r223856): Web Inspector: Cannot view Request Data https://bugs.webkit.org/show_bug.cgi?id=179567 Reviewed by Brian Burg. * UserInterface/Views/ResourceClusterContentView.js: (WI.ResourceClusterContentView.prototype._canShowRequestContentView): This condition unintentionally got flipped in r223856. 2017-11-13 Matt Baker Web Inspector: Add CheckboxNavigationItem https://bugs.webkit.org/show_bug.cgi?id=179584 Reviewed by Brian Burg. * UserInterface/Main.html: * UserInterface/Views/ButtonNavigationItem.css: (.navigation-bar .item.button.text-only.checkbox): (.navigation-bar .item.button.text-only.checkbox label): * UserInterface/Views/ButtonNavigationItem.js: Cleanup and some tweaks to the label to make it work with subclasses regardless of how label is represented in the DOM. (WI.ButtonNavigationItem): (WI.ButtonNavigationItem.prototype.get toolTip): (WI.ButtonNavigationItem.prototype.set toolTip): (WI.ButtonNavigationItem.prototype.get label): (WI.ButtonNavigationItem.prototype.set label): (WI.ButtonNavigationItem.prototype.set image): (WI.ButtonNavigationItem.prototype.get enabled): (WI.ButtonNavigationItem.prototype.set enabled): (WI.ButtonNavigationItem.prototype.updateButtonText): * UserInterface/Views/CheckboxNavigationItem.js: Added. New button item with a checkbox and label. Dispatches a Clicked evennt whenever the checked state changes. (WI.CheckboxNavigationItem): (WI.CheckboxNavigationItem.prototype.get checked): (WI.CheckboxNavigationItem.prototype.set checked): (WI.CheckboxNavigationItem.prototype.get additionalClassNames): (WI.CheckboxNavigationItem.prototype.updateButtonText): (WI.CheckboxNavigationItem.prototype._checkboxChanged): 2017-11-13 Joseph Pecoraro Web Inspector: Give DataGrid/Table Header ContextMenu a section header to better describe its functions https://bugs.webkit.org/show_bug.cgi?id=179560 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: New string. * UserInterface/Views/DataGrid.js: (WI.DataGrid.prototype._contextMenuInHeader): * UserInterface/Views/Table.js: (WI.Table.prototype._handleHeaderContextMenu): Include a disabled context menu item as a section header. 2017-11-12 Carlos Garcia Campos REGRESSION(r224566): [GTK] 26 new timeouts on inspector related tests. https://bugs.webkit.org/show_bug.cgi?id=179471 Reviewed by Darin Adler. TestStub.html and TestStub.js was missing in resources bundle. * Scripts/copy-user-interface-resources.pl: Also combine resources for TestStub. 2017-11-11 Joseph Pecoraro Web Inspector: Network detail views - Include a newline between sections when copying https://bugs.webkit.org/show_bug.cgi?id=179577 Reviewed by Matt Baker. * UserInterface/Views/NetworkResourceDetailView.css: (.content-view.resource-details): * UserInterface/Views/ResourceDetailsSection.css: (.resource-details > section): (.resource-details > section > .title): Adjust styles now that there is a
taking up space between sections. After all the changes, the top section moved up 1px from where it was originally. * UserInterface/Views/ResourceDetailsSection.js: (WI.ResourceDetailsSection): Include a
to get newlines when copying. 2017-11-11 Joseph Pecoraro Web Inspector: Network waterfall graph - make connection part thinner https://bugs.webkit.org/show_bug.cgi?id=179561 Reviewed by Devin Rousso. * UserInterface/Views/NetworkTableContentView.css: (.waterfall .block): 2017-11-11 Devin Rousso Web Inspector: Canvas tab: show detailed status during canvas recording https://bugs.webkit.org/show_bug.cgi?id=178185 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Protocol/CanvasObserver.js: (WI.CanvasObserver.prototype.recordingProgress): * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager): (WI.CanvasManager.prototype.recordingProgress): (WI.CanvasManager.prototype.recordingFinished): Maintain arrays of recorded frames for each canvas and add new frames each time a progress event is fired. When the recording is finished, use the array as part of the payload for creating a WI.Recording object. * UserInterface/Models/Recording.js: (WI.Recording.fromPayload): * UserInterface/Models/RecordingAction.js: (WI.RecordingAction.prototype.apply.getContent): (WI.RecordingAction.prototype.apply): Drive-by fix: toDataURL is very slow, so add alternative ways of getting and comparing the content of the canvas to determine if the action has a visible effect. * UserInterface/Views/CanvasContentView.css: (.content-view.canvas:not(.tab)): (.content-view.canvas:not(.tab) > .progress): (.content-view.canvas:not(.tab) > .progress > .frame-count): * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView): (WI.CanvasContentView.prototype.attached): (WI.CanvasContentView.prototype._recordingStarted): (WI.CanvasContentView.prototype._recordingProgress): (WI.CanvasContentView.prototype._recordingStopped): Steal some space from the preview area to display a count of the number of recorded frames and the current buffer usage. * UserInterface/Views/CanvasOverviewContentView.css: (.content-view.canvas-overview .content-view.canvas > :matches(header, .progress, .preview, footer)): (.content-view.canvas-overview .content-view.canvas.selected > :matches(.progress, .preview, footer),): (.content-view.canvas-overview .content-view.canvas > :matches(.progress, .preview)): (.content-view.canvas-overview .content-view.canvas > .preview): (.content-view.canvas-overview .content-view.canvas > .progress ~ .preview): (.content-view.canvas-overview .content-view.canvas > :matches(header, .preview, footer)): Deleted. (.content-view.canvas-overview .content-view.canvas.selected > :matches(.preview, footer),): Deleted. 2017-11-09 Nikita Vasilyev Web Inspector: Styles Redesign: clicking on inline swatches and property checkboxes should not add a new property https://bugs.webkit.org/show_bug.cgi?id=179507 Reviewed by Brian Burg. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick): Don't add new properties when clicking on selector fields, source links, and property checkboxes. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype._update): It is safe to replace "change" event with "click" since it fires even when pressing Space key when the checkbox is focused. 2017-11-09 Devin Rousso Web Inspector: support undo/redo of insertAdjacentHTML https://bugs.webkit.org/show_bug.cgi?id=179283 Reviewed by Joseph Pecoraro. * UserInterface/Models/DOMNode.js: (WI.DOMNode.prototype.insertAdjacentHTML): * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype._startEditingAsHTML): Drive-by: only attempt to update the cursor if an initialValue is supplied. 2017-11-09 Joseph Pecoraro Web Inspector: Make domain availability a list of types instead of a single type https://bugs.webkit.org/show_bug.cgi?id=179457 Reviewed by Brian Burg. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass.prototype.activateDomain): The second value changed to be an optional list. Check if the active debuggable type is in the list or not. * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: * Versions/Inspector-iOS-10.0.json: * Versions/Inspector-iOS-10.3.json: * Versions/Inspector-iOS-11.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: * Versions/Inspector-iOS-9.3.json: Since this is a change to how we generate the frontend resource, update the legacy versioned backends and regenerate their resource. 2017-11-09 Carlos Garcia Campos REGRESSION(r224566): [GTK][WPE] Many inspector tests are failing after r224566 https://bugs.webkit.org/show_bug.cgi?id=179419 Reviewed by Carlos Alberto Lopez Perez. All of them fail with the following error: Uncaught exception in Inspector page: ReferenceError: Can't find variable: CodeMirror [TestCombined.js:36658:15] This is because Test.html, even when combined, is trying to load CodeMirror from External/CodeMirror, but CodeMirror was already combined for Main.html. We need to also combine CodeMirror for Test.html. * Scripts/copy-user-interface-resources.pl: 2017-11-08 Joseph Pecoraro Web Inspector: Show Internal properties of PaymentRequest in Web Inspector Console https://bugs.webkit.org/show_bug.cgi?id=179276 Reviewed by Andy Estes. * UserInterface/Test.html: * UserInterface/Test/FrontendTestHarness.js: (FrontendTestHarness.prototype.evaluateInPage): * UserInterface/Test/TestUtilities.js: Added. (promisify): Make async tests a little easier to work with by providing promises in some cases that would normally take a callback. 2017-11-08 Brian Burg Web Inspector: fix incorrect curly quote orientation in a UIString https://bugs.webkit.org/show_bug.cgi?id=179353 Reviewed by Joseph Pecoraro. I didn't see any other instances of this mistake in our localized strings. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/ResourceTimelineDataGridNode.js: Fix it. 2017-11-08 Joseph Pecoraro Web Inspector: Remove unused Page.ScriptIdentifier protocol type https://bugs.webkit.org/show_bug.cgi?id=179407 Reviewed by Matt Baker. * Versions/Inspector-iOS-10.0.json: * Versions/Inspector-iOS-10.3.json: * Versions/Inspector-iOS-11.0.json: * Versions/Inspector-iOS-7.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: * Versions/Inspector-iOS-9.3.json: Remove unused protocol type. 2017-11-06 Nikita Vasilyev Web Inspector: Styles Redesign: Display warnings https://bugs.webkit.org/show_bug.cgi?id=179215 Reviewed by Brian Burg. Display warning icons on the right of the property. For now, the warning icons have only three title messages: - Invalid property name; - Invalid property value; - Duplicate property. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .property): (.spreadsheet-style-declaration-editor .property-toggle): (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .value): (.spreadsheet-style-declaration-editor .property.has-warning): (.spreadsheet-style-declaration-editor .property .warning): Draw the warning arrow and icon using only one HTML element. Don't set "top" property so the element remains vertically where it would be if it had "position: static". (.spreadsheet-style-declaration-editor .property.has-warning .warning): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged): (WI.SpreadsheetCSSStyleDeclarationEditor): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: (.spreadsheet-css-declaration): (.spreadsheet-css-declaration :matches(.header, .header-media)): (.spreadsheet-css-declaration .close-brace): Make properties span the entire width of the styles sidebar. Unsupported properties have yellow background. There should be no gaps between the property element and sidebar left and right edges. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.updateStatus): (WI.SpreadsheetStyleProperty.prototype._update): (WI.SpreadsheetStyleProperty.prototype.updateClassNames): Deleted. Rename updateClassNames to updateStatus since it modifies title attribute of the warning element. 2017-11-06 Ross Kirsling Web Inspector: Two little Layers tab fixes https://bugs.webkit.org/show_bug.cgi?id=179273 Reviewed by Devin Rousso. * UserInterface/Views/LayerDetailsSidebarPanel.js: (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId): Even when we suppress refire of the selected event, we still want a popover. * UserInterface/Views/Layers3DContentView.js: (WI.Layers3DContentView): (WI.Layers3DContentView.prototype.shown): (WI.Layers3DContentView.prototype.hidden): (WI.Layers3DContentView.prototype.closed): (WI.Layers3DContentView.prototype._layerTreeDidChange): Opening WI directly to the Layers tab wasn't fetching layers right away. Let's fetch on every shown() and prune the hacky logic we were previously using -- it's overkill anyway, now that we're tracking mutations. 2017-11-06 Joseph Pecoraro Web Inspector: no way to navigate from Resource tree element to its entry in Network Tab https://bugs.webkit.org/show_bug.cgi?id=179328 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: New reveal in network tab string. * UserInterface/Base/Main.js: (WI.isShowingNetworkTab): Utility to know if the network tab is showing. * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): (showResourceWithOptions): (WI.appendContextMenuItemsForURL): Generalize context menus for just a URL. * UserInterface/Views/TabBrowser.js: (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject): Support more tab ignore options, this is starting to get icky. We may want to move to just a preferredTab approach, since that is what some of these want. * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype._populateTagContextMenu): Make use of new ContextMenu utility to add menu items for a URL. * UserInterface/Views/NetworkTabContentView.js: (WI.NetworkTabContentView.prototype.showRepresentedObject): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.showRepresentedObject): Handle showing a Resource in the NetworkTab. We immediately show the details view for it, otherwise we fallback to the list view. 2017-11-06 Joseph Pecoraro Uncaught Exception: TypeError: null is not an object (evaluating 'mimeType.endsWith') https://bugs.webkit.org/show_bug.cgi?id=179325 Reviewed by Brian Burg. * UserInterface/Base/MIMETypeUtilities.js: (WI.fileExtensionForMIMEType): (WI.shouldTreatMIMETypeAsText): Handle null mime types. 2017-11-06 Joseph Pecoraro Web Inspector: Selecting a DOM Search Result in Search Tab unexpectedly changes Tabs https://bugs.webkit.org/show_bug.cgi?id=179223 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: New string. * UserInterface/Views/SearchResultTreeElement.js: (WI.SearchResultTreeElement.prototype.populateContextMenu): Add a context menu for search results to jump to a different tab. These behaviors match the double click behavior for search results. * UserInterface/Views/SearchTabContentView.js: (WI.SearchTabContentView.prototype.canShowRepresentedObject): Always support showing a DOM Tree. Clients should be using ignoreSearchTab if they don't want to jump here. * UserInterface/Views/DOMTreeDataGridNode.js: (WI.DOMTreeDataGridNode.prototype._goToArrowWasClicked): * UserInterface/Views/LayerTreeDataGridNode.js: (WI.LayerTreeDataGridNode.prototype._goToArrowWasClicked): Use ignoreSearchTab just in case when showing a DOM Tree. * UserInterface/Views/ContentBrowser.js: (WI.ContentBrowser.prototype.shown): When showing, update our UI to reflect the values of the current content view, which for a while may have been owned by another ContentBrowser. (WI.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): (WI.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange): (WI.ContentBrowser.prototype._contentViewNavigationItemsDidChange): We can avoid work in a few places where we might not be the owning ContentBrowser of a ContentView that is changing. 2017-11-05 Nikita Vasilyev REGRESSION (r221338): Web Inspector: NavigationBar incorrectly calculates minimumWidth https://bugs.webkit.org/show_bug.cgi?id=179292 Reviewed by Devin Rousso. * UserInterface/Views/NavigationBar.js: (WI.NavigationBar.prototype._calculateMinimumWidth): totalItemWidth was the minimumWidth of the last item. 2017-11-05 Devin Rousso Web Inspector: Canvas Tab: selecting Frame tree element should update preview/slider, does nothing https://bugs.webkit.org/show_bug.cgi?id=179072 Reviewed by Matt Baker. * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged): * UserInterface/Views/RecordingActionTreeElement.css: (.item.action > .titles .parameter.swizzled): (.tree-outline:not(:focus, .force-focus) .item.action:not(.initial-state, .parent, .invalid) > .icon): Deleted. (body:not(.window-inactive, .window-docked-inactive) .item.action > .titles .parameter.swizzled): Deleted. Drive-by: remove extra :focus selectors to prevent icon flashing when the window is blurred. 2017-11-04 Devin Rousso Web Inspector: add contextmenu item to arbitrarily add HTML/Child to DOMTree https://bugs.webkit.org/show_bug.cgi?id=179042 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/DOMNode.js: (WI.DOMNode.prototype.insertAdjacentHTML.inspectedPage_node_insertAdjacentHTML): (WI.DOMNode.prototype.insertAdjacentHTML): Call-through to `insertAdjacentHTML` on the corresponding node in the inspected page. * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement): (WI.DOMTreeElement.prototype._populateNodeContextMenu): (WI.DOMTreeElement.prototype._startEditingAsHTML.dispose): (WI.DOMTreeElement.prototype._startEditingAsHTML): (WI.DOMTreeElement.prototype._insertAdjacentHTML.commitCallback): (WI.DOMTreeElement.prototype._insertAdjacentHTML): (WI.DOMTreeElement.prototype.updateTitle): (WI.DOMTreeElement.prototype._singleTextChild): (WI.DOMTreeElement.prototype._nodeTitleInfo): (WI.DOMTreeElement.prototype._addHTML): (WI.DOMTreeElement.prototype._addPreviousSibling): (WI.DOMTreeElement.prototype._addNextSibling): (WI.DOMTreeElement.prototype._editAsHTML): Adjust where the editing element is placed depending on the options passed to `_editAsHTML`. If the placement is as a child, put it inside the child list. If the placement is as a sibling, place it before/after the selected TreeElement. Otherwise, add it as a child. * UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom): (.tree-outline.dom li): (.tree-outline.dom li:not(.editing)): (.tree-outline.dom li.editing): (body[dir=ltr] .tree-outline.dom li): Deleted. (body[dir=rtl] .tree-outline.dom li): Deleted. Don't add padding when the list item is being edited. 2017-11-03 Nikita Vasilyev Web Inspector: Uncaught Exception: null is not an object (evaluating 'selector.specificity.map') (at SpreadsheetCSSStyleDeclarationSection.js:199:51) https://bugs.webkit.org/show_bug.cgi?id=179225 Reviewed by Joseph Pecoraro. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector): selector.specificity may not exist when the selector is dynamic and doesn't match the selected element. 2017-11-03 Ross Kirsling Web Inspector: Move Show Compositing Borders/Paint Flashing buttons from Elements tab to Layers tab https://bugs.webkit.org/show_bug.cgi?id=179211 Reviewed by Joseph Pecoraro. * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView.prototype.get navigationItems): (WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings): Guard old buttons with experimental flag. * UserInterface/Views/Layers3DContentView.js: (WI.Layers3DContentView): (WI.Layers3DContentView.prototype.get navigationItems): (WI.Layers3DContentView.prototype.shown): (WI.Layers3DContentView.prototype.closed): (WI.Layers3DContentView.prototype._showPaintRectsSettingChanged): (WI.Layers3DContentView.prototype._togglePaintFlashing): (WI.Layers3DContentView.prototype._updateCompositingBordersButtonState): (WI.Layers3DContentView.prototype._toggleCompositingBorders): Add buttons to new home. No need to guard for get/setCompositingBordersVisible anymore, as these were introduced in iOS 7. 2017-11-03 Devin Rousso Web Inspector: move top-level namespace functions in ImageUtilities to static class https://bugs.webkit.org/show_bug.cgi?id=179207 Reviewed by Brian Burg. * .eslintrc: * UserInterface/Base/ImageUtilities.js: (WI.ImageUtilities.useSVGSymbol): (WI.ImageUtilities.scratchCanvasContext2D): (WI.ImageUtilities.imageFromImageData): (WI.ImageUtilities.imageFromCanvasGradient): (WI.ImageUtilities): (useSVGSymbol): Deleted. (WI.scratchCanvasContext2D): Deleted. (WI.imageFromImageData): Deleted. (WI.imageFromCanvasGradient): Deleted. * UserInterface/Models/Recording.js: (WI.Recording.prototype.async swizzle): * UserInterface/Views/ButtonNavigationItem.js: (WI.ButtonNavigationItem.prototype.set image): * UserInterface/Views/CallFrameTreeElement.js: (WI.CallFrameTreeElement.prototype._updateStatus): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout): * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype._updateBreakpointStatus): * UserInterface/Views/MultipleScopeBarItem.js: (WI.MultipleScopeBarItem): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._generateDOM): (WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged): * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): * UserInterface/Views/ResourceMetricsContentView.js: (WI.ResourceMetricsContentView.prototype._refreshResourceSizeSection): * UserInterface/Views/ScopeRadioButtonNavigationItem.js: (WI.ScopeRadioButtonNavigationItem): * UserInterface/Views/ThreadTreeElement.js: (WI.ThreadTreeElement.prototype._updateStatus): * UserInterface/Views/TimelineTreeElement.js: (WI.TimelineTreeElement.prototype._showCloseButton): * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: (WI.VisualStyleCommaSeparatedKeywordEditor): * UserInterface/Views/VisualStyleKeywordIconList.js: (WI.VisualStyleKeywordIconList): * UserInterface/Views/VisualStylePropertyEditorLink.js: (WI.VisualStylePropertyEditorLink): * UserInterface/Views/VisualStyleSelectorSection.js: (WI.VisualStyleSelectorSection): * UserInterface/Views/WebSocketDataGridNode.js: (WI.WebSocketDataGridNode.prototype.createCellContent): 2017-11-03 Ross Kirsling Web Inspector: Hide legacy Layers sidebar on Search tab https://bugs.webkit.org/show_bug.cgi?id=179257 Reviewed by Joseph Pecoraro. * UserInterface/Views/SearchTabContentView.js: (WI.SearchTabContentView): 2017-11-03 Joseph Pecoraro Web Inspector: Network Table - Include a secure lock indicator in the domain column https://bugs.webkit.org/show_bug.cgi?id=179233 Reviewed by Devin Rousso. * UserInterface/Views/NetworkTableContentView.css: (.network-table .cell.domain > .lock): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.tablePopulateCell): (WI.NetworkTableContentView.prototype._populateDomainCell): Add a small lock icon by the domain if the request was https/wss. 2017-11-03 Devin Rousso Web Inspector: Canvas2D Profiling: highlight expensive context commands in the captured command log https://bugs.webkit.org/show_bug.cgi?id=178302 Reviewed by Brian Burg. * UserInterface/Models/RecordingFrame.js: (WI.RecordingFrame): (WI.RecordingFrame.fromPayload): (WI.RecordingFrame.prototype.get duration): (WI.RecordingFrame.prototype.toJSON): * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel.prototype.set recording): * UserInterface/Views/RecordingNavigationSidebarPanel.css: (.sidebar > .panel.navigation.recording > .content > .tree-outline .item.folder-icon > .status): 2017-11-02 Devin Rousso Web Inspector: Canvas Tab: show supported GL extensions for selected canvas https://bugs.webkit.org/show_bug.cgi?id=179070 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Protocol/CanvasObserver.js: (WI.CanvasObserver.prototype.extensionEnabled): * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.extensionEnabled): * UserInterface/Models/Canvas.js: (WI.Canvas.prototype.get extensions): (WI.Canvas.prototype.enableExtension): Maintain a Set of enabled extensions, and dispatch an event whenever an extension is enabled. * UserInterface/Views/CanvasDetailsSidebarPanel.css: (.sidebar > .panel.details.canvas .details-section.canvas-extensions .content > ul): * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WI.CanvasDetailsSidebarPanel.prototype.set canvas): (WI.CanvasDetailsSidebarPanel.prototype.initialLayout): (WI.CanvasDetailsSidebarPanel.prototype.layout): (WI.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection): (WI.CanvasDetailsSidebarPanel.prototype._refreshExtensionsSection): Drive-by: hide Attributes section when the canvas has no attributes. 2017-11-02 Joseph Pecoraro Make ServiceWorker a Remote Inspector debuggable target https://bugs.webkit.org/show_bug.cgi?id=179043 Reviewed by Brian Burg. Customize the Web Inspector frontend for a ServiceWorker target. Currently this just behaves like a JavaScript Context target because we haven't yet added support for Networking capabilities. * UserInterface/Controllers/DebuggerManager.js: (WI.DebuggerManager.prototype.get knownNonResourceScripts): Drive-by fix a bug where lazily initializing the Resources / Debugger tabs would show Console evaluation scripts. We should ignore them, like we do in other places. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Controllers/AppController.js: (WI.AppController): (WI.AppController.debuggableTypeFromHost): * UserInterface/Controllers/AppControllerBase.js: * UserInterface/Controllers/TimelineManager.js: (WI.TimelineManager.defaultTimelineTypes): (WI.TimelineManager.availableTimelineTypes): * UserInterface/Models/TimelineRecording.js: (WI.TimelineRecording.sourceCodeTimelinesSupported): * UserInterface/Protocol/MainTarget.js: (WI.MainTarget.prototype.get displayName): * UserInterface/Test/TestAppController.js: * UserInterface/Views/DashboardContainerView.css: (body:not(.web) .toolbar .dashboard-container): (body.javascript .toolbar .dashboard-container): Deleted. * UserInterface/Views/DefaultDashboardView.css: (body:not(.web) .toolbar .dashboard.default > :matches(.resourcesCount, .resourcesSize, .time)): (body.javascript .toolbar .dashboard.default > :matches(.resourcesCount, .resourcesSize, .time)): Deleted. * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel): (WI.ResourceSidebarPanel.shouldPlaceResourcesAtTopLevel): (WI.ResourceSidebarPanel.prototype.initialLayout): (WI.ResourceSidebarPanel.prototype._addScript): (WI.ResourceSidebarPanel.prototype._extraDomainsActivated): * UserInterface/Views/Toolbar.js: 2017-11-02 Devin Rousso Web Inspector: Canvas: recording parameters that include an Image should show an InlineSwatch (2D canvas) https://bugs.webkit.org/show_bug.cgi?id=177032 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Test.html: * UserInterface/Base/ImageUtilities.js: (WI.scratchCanvasContext2D): Creates a static canvas that can be used for scratch purposes, such as converting ImageData to an Image, or rendering the result of a CanvasGradient. The canvas is reset after each call of the function so it can be reused by other callers. (WI.imageFromImageData): (WI.imageFromCanvasGradient): Utility functions for getting a dataURL image of ImageData/CanvasGradient after drawing it onto WI.scratchCanvasContext2D. * UserInterface/Models/Recording.js: (WI.Recording.prototype.async.swizzle): Set the Image used to create a CanvasPattern as an expando property for later use. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction.prototype.getImageParameters): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._generateDOM): Add Image InlineSwatch elements for parameters that are viewable as an image. For ImageData and CanvasGradient, WI.scratchCanvasContext2D is used to draw the ImageData/CanvasGradient and get a dataURL to be used as the image. (WI.RecordingActionTreeElement._createSwatchForColorParameters): Drive-by: add checks that the parameter is not a CanvasGradient or CanvasPattern. * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): Add Image InlineSwatch elements for fillStyle/strokeStyle when the value is a CanvasGradient or a CanvasPattern. * UserInterface/Views/InlineSwatch.js: (WI.InlineSwatch): (WI.InlineSwatch.prototype._updateSwatch): (WI.InlineSwatch.prototype._swatchElementClicked): * UserInterface/Views/InlineSwatch.css: (.inline-swatch): (.inline-swatch:matches(.color, .gradient)): (.inline-swatch:matches(.bezier, .spring, .variable)): (.inline-swatch:not(.read-only):matches(.bezier, .spring, .variable):hover): (.inline-swatch:not(.read-only):matches(.bezier, .spring, .variable):active): (.inline-swatch:not(.read-only):active > span): (.inline-swatch:matches(.bezier, .spring, .variable) > span): (.inline-swatch.image > span): (.inline-swatch:matches(.bezier, .spring, .variable):hover): Deleted. (.inline-swatch:matches(.bezier, .spring, .variable):active): Deleted. (.inline-swatch:active > span): Deleted. (.inline-swatch:matches(.bezier, .spring) > span): Deleted. Add Image type for showing previews of images. Drive-by: simplify some styles. * UserInterface/Views/RecordingActionTreeElement.css: (.item.action > .titles .parameters > .inline-swatch): (.tree-outline:matches(:focus, .force-focus) .item.action > .titles .parameters > .inline-swatch): Deleted. Drive-by: remove the :focus requirement, as it would cause the InlineSwatch to shift when the user clicked out of the WebInspector window. 2017-11-02 Joseph Pecoraro Inspector should display service worker served responses properly https://bugs.webkit.org/show_bug.cgi?id=178597 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: New Service Worker related strings. * UserInterface/Controllers/HARBuilder.js: (WI.HARBuilder.entry): (WI.HARBuilder.timings): Only output timing data when we have real resource timing data. (WI.HARBuilder.fetchType): Output a new string for a Service Worker load in our custom field. * UserInterface/Models/ResourceTimingData.js: (WI.ResourceTimingData.prototype.get responseStart): Fallback further to the responseEnd. This can happen if the response itself is an error/failure and there was no response, so treat it as the same as response end. * UserInterface/Models/Resource.js: (WI.Resource.responseSourceFromPayload): (WI.Resource.prototype.updateForRedirectResponse): (WI.Resource.prototype.updateForResponse): A fetch response won't change the URL, so if the URL is empty don't change it from what the request's URL was. (WI.Resource.prototype.hasResponse): Failure is like finished. We should likely transition to an "isComplete" method. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype._populateTransferSizeCell): (WI.NetworkTableContentView.prototype._generateSortComparator): Output "(service worker)" in the transfer size field, to indicate this came from a Service worker. Sort such loads together. * UserInterface/Views/ResourceHeadersContentView.js: (WI.ResourceHeadersContentView.prototype._responseSourceDisplayString): (WI.ResourceHeadersContentView.prototype._refreshSummarySection): Include the Service Worker response source in this details view. Also include a FIXME, since we would like to link directly to the service worker in the future. 2017-11-02 Nikita Vasilyev Web Inspector: Styles Redesign: turn on CSS spreadsheet editor by default https://bugs.webkit.org/show_bug.cgi?id=179100 Reviewed by Brian Burg. Add a "Legacy Style Editor" checkbox and remove the experimental "Spreadsheet Style Editor" checkbox. Remove settings of the legacy styles editor: - Show inline warnings - Automatically insert newline - Select text on first click These settings are not applicable for the spreadsheet styles editor and now are always enabled for the legacy styles editor. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Setting.js: * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WI.CSSStyleDeclarationTextEditor): (WI.CSSStyleDeclarationTextEditor.prototype._handleMouseUp): (WI.CSSStyleDeclarationTextEditor.): * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WI.CSSStyleDetailsSidebarPanel): * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): 2017-11-01 Devin Rousso Web Inspector: consolidate DOMTreeElement contextmenu items into submenus https://bugs.webkit.org/show_bug.cgi?id=178996 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/ContextMenu.js: (WI.ContextSubMenuItem.prototype.appendItem): (WI.ContextSubMenuItem.prototype.appendSubMenuItem): (WI.ContextSubMenuItem.prototype.appendCheckboxItem): (WI.ContextSubMenuItem.prototype.pushItem): (WI.ContextSubMenuItem.prototype._pushItem): Deleted. Made `pushItem` public so that it is possible to create a ContextMenuItem without immediately adding it to the ContextMenu. (WI.ContextSubMenuItem.prototype._buildDescriptor): (WI.ContextMenu.prototype._buildDescriptor): Filter out submenus that have no items. * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForDOMNode): * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype.toggleElementVisibility): (WI.DOMTreeElement.prototype._populateTagContextMenu): (WI.DOMTreeElement.prototype._populateTextContextMenu): (WI.DOMTreeElement.prototype._populateNodeContextMenu): (WI.DOMTreeElement.prototype._populateForcedPseudoStateItems): Deleted. Add relevant items to the provided submenus and reorder the entire contextmenu for better readability and consistency. * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline.prototype.populateContextMenu): Create submenus for Add, Edit, Copy, and Delete, and pass them to the DOMTreeElement "populate*ContextMenu" functions so that they can add items to each submenu. (WI.DOMTreeOutline.prototype._hideElement): Move to DOMTreeElement so that it can be used by a contextmenu item. 2017-11-01 Ross Kirsling Web Inspector: Improve UX of Layers tab visualization https://bugs.webkit.org/show_bug.cgi?id=178966 Reviewed by Devin Rousso. * UserInterface/Views/Layers3DContentView.js: (WI.Layers3DContentView): (WI.Layers3DContentView.prototype.initialLayout): (WI.Layers3DContentView.prototype._canvasMouseDown): (WI.Layers3DContentView.prototype._createLayerGroup): Renamed from _addLayerGroup. (WI.Layers3DContentView.prototype._updateLayerGroupPosition): Merged into _updateLayers. Set up zoom and pan. (WI.Layers3DContentView.prototype._animate): (WI.Layers3DContentView.prototype._restrictPan): Restrict pan to bounding box on XY plane. (WI.Layers3DContentView.prototype.layout): (WI.Layers3DContentView.prototype._updateDocument): (WI.Layers3DContentView.prototype._resetCamera): On new document, throw out all old layers and center the camera on the new document layer. (WI.Layers3DContentView.prototype.selectLayerById): (WI.Layers3DContentView.prototype._centerOnSelection): Recenter the camera when layer group selection is updated programmatically. (WI.Layers3DContentView.prototype._updateLayers): (WI.Layers3DContentView.prototype._createLayerMesh): Fix visual artifact due to "depthWrite" flag. * UserInterface/Views/LayerDetailsSidebarPanel.js: (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId): Suppress selection update event when the data grid selection is updated programmatically. * UserInterface/Views/DataGridNode.js: (WI.DataGridNode.prototype.revealAndSelect): Allow forwarding of select()'s parameter. 2017-11-01 Joseph Pecoraro Web Inspector: Combine all storage icon files into a single file https://bugs.webkit.org/show_bug.cgi?id=179134 Reviewed by Devin Rousso. * UserInterface/Main.html: * UserInterface/Views/CookieIcon.css: Removed. * UserInterface/Views/DOMStorageIcons.css: Removed. * UserInterface/Views/DatabaseIcon.css: Removed. * UserInterface/Views/DatabaseTableIcon.css: Removed. * UserInterface/Views/StorageIcons.css: Added. (.application-cache-manifest .icon): (.application-cache-frame .icon): (.cookie-icon .icon): (.local-storage-icon .icon): (.session-storage-icon .icon): (.database-icon .icon): (.database-table-icon .icon): 2017-11-01 Nikita Vasilyev Web Inspector: Styles Redesign: Hovering over a selector should highlight matching elements on the page https://bugs.webkit.org/show_bug.cgi?id=179040 Reviewed by Devin Rousso. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): Use mouseenter/mouseleave events instead of mousein/mouseout (as in the old styles sidebar) to avoid unnecessary events being fired. (WI.SpreadsheetCSSStyleDeclarationSection.prototype._highlightNodesWithSelector): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._hideDOMNodeHighlight): 2017-10-30 Nikita Vasilyev Web Inspector: [PARITY] Styles Redesign: Ability to modify style attributes https://bugs.webkit.org/show_bug.cgi?id=178328 Reviewed by Joseph Pecoraro. Before this patch, modifying a property of a style attribute duplicated the old property and appended the new one. This happened because WI.TextRange.prototype.resolveOffsets didn't resolve offsets correctly when text didn't end with a trailing new line. Since WI.TextRange.prototype.resolveOffsets is used elsewhere and this could be expected behavior, append a line break before resolving a range. * UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype._updateOwnerStyleText): 2017-10-30 Ross Kirsling Web Inspector: Clicking filler in data grid should clear selection https://bugs.webkit.org/show_bug.cgi?id=179027 Reviewed by Brian Burg. * UserInterface/Views/DataGrid.js: (WI.DataGrid.prototype._mouseDownInDataTable): 2017-10-30 Devin Rousso Web Inspector: Canvas Tab: no path components shown in recording content view after selecting a recording via View Recordings... dropdown https://bugs.webkit.org/show_bug.cgi?id=178807 Reviewed by Brian Burg. When the first Recording is taken of a canvas, it is immediately added as a child. When the CanvasTreeElement is `attached`, however, it will attempt to regenerate its children if necessary. This is especially true for canvases with ShaderPrograms, as they are added with `addRepresentedObjectToNewChildQueue`, meaning that the child TreeElements aren't actually added until the next tick, preventing the ContentBrowser logic from generating path components correctly. This patch switches to using `addChildForRepresentedObject` so that there is no delay when adding children, and also ensures that any existing recordings are also added on regeneration. * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView.prototype._recordingAdded): Move logic for adding TreeElements for new Recordings to CanvasTreeElement. * UserInterface/Views/CanvasTreeElement.js: (WI.CanvasTreeElement.createRecordingTreeElement): (WI.CanvasTreeElement): (WI.CanvasTreeElement.prototype.onattach): (WI.CanvasTreeElement.prototype.ondetach): (WI.CanvasTreeElement.prototype.onpopulate): (WI.CanvasTreeElement.prototype._handleItemAdded): (WI.CanvasTreeElement.prototype._handleItemRemoved): (WI.CanvasTreeElement.prototype._shaderProgramAdded): Deleted. (WI.CanvasTreeElement.prototype._shaderProgramRemoved): Deleted. 2017-10-30 Fujii Hironori [GTK] Web Inspector: Add Path.svg https://bugs.webkit.org/show_bug.cgi?id=178432 Reviewed by Carlos Garcia Campos. * UserInterface/Images/gtk/Path.svg: Added. 2017-10-30 Nikita Vasilyev Web Inspector: [PARITY] Styles Redesign: clicking on the white space after the property should create a blank property https://bugs.webkit.org/show_bug.cgi?id=178022 Reviewed by Matt Baker. - Clicking on the whitespace on the right side of a property should insert a blank property after the clicked one. - Clicking on the whitespace at the end of a CSS rule should append a blank property. - Clicking on the whitespace before the first property should insert a blank property before the first one. * UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype.remove): (WI.CSSProperty.prototype._updateOwnerStyleText): Remove method previously didn't do anything for a newly added property. * UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration.prototype.newBlankProperty): Update indices of all properties after the newly added property. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.isFocused): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.addBlankProperty): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty): Deleted. (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._isFocused): Deleted. Re-layout SpreadsheetCSSStyleDeclarationEditor after adding a new property. Preserve edited property so we can restore editing state after the re-layout. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick): Clicking should add a new property only when we aren't editing an existing property. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.updateClassNames): (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit): Remove newlyAdded property of SpreadsheetStyleProperty. During layout SpreadsheetCSSStyleDeclarationEditor recreates SpreadsheetStyleProperty views and newlyAdded property gets lost. * UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField.prototype.get valueBeforeEditing): (WI.SpreadsheetTextField.prototype.startEditing): (WI.SpreadsheetTextField.prototype.stopEditing): (WI.SpreadsheetTextField.prototype._discardChange): 2017-10-27 Devin Rousso Web Inspector: Canvas Tab: no way to see backtrace of where a canvas context was created https://bugs.webkit.org/show_bug.cgi?id=178799 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/Canvas.js: (WI.Canvas.fromPayload): (WI.Canvas.prototype.get backtrace): * UserInterface/Views/CanvasDetailsSidebarPanel.css: (.sidebar > .panel.details.canvas .details-section.canvas-backtrace .call-frame): * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WI.CanvasDetailsSidebarPanel.prototype.initialLayout): (WI.CanvasDetailsSidebarPanel.prototype.layout): (WI.CanvasDetailsSidebarPanel.prototype._refreshBacktraceSection): * UserInterface/Views/ResourceIcons.css: (.canvas > .icon): (.canvas .icon): Deleted. 2017-10-26 Devin Rousso Web Inspector: Canvas Tab: canvas path components from old page stick around when page is reloaded https://bugs.webkit.org/show_bug.cgi?id=178806 Reviewed by Brian Burg. Before this change, the CanvasCollection was regenerated each time the Canvas tab was attached. This also caused the invisible TreeOutline, used for the path components and to manage selection, to be reset as well. Whenever the page refreshed, however, the old canvases, and associated recordings, were not removed. This patch reworks all of this logic to create the CanvasCollection on construction of the tab and add/remove canvases as needed. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.canvasAdded): (WI.CanvasManager.prototype.canvasRemoved): (WI.CanvasManager.prototype._removeCanvas): (WI.CanvasManager.prototype._mainResourceDidChange): Replaced the "Cleared" event by instead firing "CanvasRemoved" for every tracked canvas. This massively simplifies the logic for when the page navigates, as everything goes through a single event listener. Drive-by: changed existing event names to remove unnecessary words. * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView): (WI.CanvasTabContentView.prototype.attached): (WI.CanvasTabContentView.prototype.detached): (WI.CanvasTabContentView.prototype._addCanvas): (WI.CanvasTabContentView.prototype._removeCanvas): (WI.CanvasTabContentView.prototype._handleCanvasAdded): (WI.CanvasTabContentView.prototype._handleCanvasRemoved): (WI.CanvasTabContentView.prototype._canvasAdded): Deleted. (WI.CanvasTabContentView.prototype._canvasRemoved): Deleted. (WI.CanvasTabContentView.prototype._mainResourceDidChange): Deleted. Rework logic for the way that the CanvasCollection is maintained. It is no longer created/destroyed each time the view is attached/detached, and instead a diff is calculated for the added/existing/removed canvases and the content views are added/removed as such. * UserInterface/Views/CanvasOverviewContentView.js: (WI.CanvasOverviewContentView.prototype._selectionPathComponentsChanged): Drive-by: if an imported recording is selected on the Canvas Overview view, we should show it. 2017-10-26 Devin Rousso Web Inspector: Canvas Tab: canvases overview should support navigation via keyboard https://bugs.webkit.org/show_bug.cgi?id=178800 Reviewed by Brian Burg. Create a KeyboardShorcut for each of the following: - Up: selects the previous canvas in the selected column - Down: selects the next canvas in the selected column - Right: selects the next canvas in the selected row - Left: selects the previous canvas in the selected row - Space: toggle recording of the selected canvas - Shift+Space: toggle single-frame recording of the selected canvas The calculation for selected row/colum is based on the `offsetWidth` of the parent element and the selected item's content view element. Since this view uses a flexbox, all of the items are expected to have the same dimensions, meaning that this value is uniform. The intended functionality is that of a spreadsheet, where pressing pressing left/right will never change the selected row and up/down will never change the selected column. * UserInterface/Views/CanvasOverviewContentView.css: (.content-view.canvas-overview): (.content-view.canvas-overview .content-view.canvas): Move margin value to a CSS variable so that it can be easily retrieved via JavaScript. * UserInterface/Views/CanvasOverviewContentView.js: (WI.CanvasOverviewContentView): (WI.CanvasOverviewContentView.prototype.contentViewAdded): (WI.CanvasOverviewContentView.prototype.contentViewRemoved): (WI.CanvasOverviewContentView.prototype.attached): (WI.CanvasOverviewContentView.prototype.detached): (WI.CanvasOverviewContentView.prototype.get _itemMargin): (WI.CanvasOverviewContentView.prototype._changeSelectedItemVertically): (WI.CanvasOverviewContentView.prototype._changeSelectedItemHorizontally): (WI.CanvasOverviewContentView.prototype._updateNavigationItems): (WI.CanvasOverviewContentView.prototype._handleUp): (WI.CanvasOverviewContentView.prototype._handleRight): (WI.CanvasOverviewContentView.prototype._handleDown): (WI.CanvasOverviewContentView.prototype._handleLeft): (WI.CanvasOverviewContentView.prototype._handleSpace): (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange): Drive-by: call `_updateNavigationItems` whenever an item is added/removed so that if there are no items the navigation items cannot be clicked. 2017-10-26 Nikita Vasilyev Web Inspector: Styles Redesign: Make "Style Attribute" text darker and non-focusable https://bugs.webkit.org/show_bug.cgi?id=178837 Reviewed by Brian Burg. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: (.spreadsheet-css-declaration .selector.style-attribute): Use the same shade of gray as in the "Inherited from" sections. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): Only editable selectors should be focusable. 2017-10-26 Fujii Hironori [GTK] Web Inspector: Add CanvasOverview.svg and Canvas.svg https://bugs.webkit.org/show_bug.cgi?id=178426 Reviewed by Carlos Garcia Campos. * UserInterface/Images/gtk/Canvas.svg: Added. * UserInterface/Images/gtk/CanvasOverview.svg: Added. 2017-10-25 Devin Rousso Web Inspector: provide a way to enable/disable event listeners https://bugs.webkit.org/show_bug.cgi?id=177451 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Controllers/DOMTreeManager.js: (WI.DOMTreeManager.prototype.setEventListenerDisabled): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WI.DOMNodeDetailsSidebarPanel.prototype.attached): (WI.DOMNodeDetailsSidebarPanel.prototype.detached): (WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged): (WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners): Deleted. (WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners): Deleted. Listen for `WI.DOMNode.Event.EventListenersChanged` on all instances of WI.DOMNode, since we will still want to refresh the event listeners section in the event that an event listener is removed from a parent node. * UserInterface/Views/EventListenerSectionGroup.js: (WI.EventListenerSectionGroup): (WI.EventListenerSectionGroup.prototype._eventText): (WI.EventListenerSectionGroup.prototype._nodeTextOrLink): (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement): (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement.updateTitle): * UserInterface/Views/EventListenerSectionGroup.css: (.event-listener-section > .content input[type="checkbox"]): * UserInterface/Views/DetailsSectionSimpleRow.js: (WI.DetailsSectionSimpleRow.prototype.get label): (WI.DetailsSectionSimpleRow.prototype.set label): 2017-10-25 Devin Rousso Web Inspector: replace TypeVerifier with subclasses of WI.Collection https://bugs.webkit.org/show_bug.cgi?id=178045 Reviewed by Brian Burg. * UserInterface/Models/Collection.js: (WI.Collection): (WI.Collection.prototype.get displayName): (WI.Collection.prototype.objectIsRequiredType): (WI.Collection.prototype.add): (WI.Collection.prototype.get typeVerifier): Deleted. Instead of exposing the typeVerifier, we create a public predicate that returns whether the given object matches the expected type of the Collection. Subclasses can override it to limit the scope of the collection to a particular type. * UserInterface/Models/CollectionTypes.js: (WI.FrameCollection.prototype.get displayName): (WI.FrameCollection.prototype.objectIsRequiredType): (WI.FrameCollection): Deleted. (WI.ScriptCollection.prototype.get displayName): (WI.ScriptCollection.prototype.objectIsRequiredType): (WI.ScriptCollection): Deleted. (WI.CSSStyleSheetCollection.prototype.get displayName): (WI.CSSStyleSheetCollection.prototype.objectIsRequiredType): (WI.CSSStyleSheetCollection): Deleted. (WI.CanvasCollection.prototype.get displayName): (WI.CanvasCollection.prototype.objectIsRequiredType): (WI.CanvasCollection): Deleted. (WI.ShaderProgramCollection.prototype.get displayName): (WI.ShaderProgramCollection.prototype.objectIsRequiredType): (WI.ShaderProgramCollection): Deleted. (WI.RecordingCollection.prototype.get displayName): (WI.RecordingCollection.prototype.objectIsRequiredType): (WI.RecordingCollection): Deleted. * UserInterface/Models/ResourceCollection.js: (WI.ResourceCollection): (WI.ResourceCollection.prototype.get displayName): (WI.ResourceCollection.prototype.objectIsRequiredType): (WI.ResourceCollection.verifierForType): Deleted. * UserInterface/Views/TreeOutlineGroup.js: (WI.TreeOutlineGroup.prototype.objectIsRequiredType): (WI.TreeOutlineGroup): Deleted. Introduce additional subclasses of Collection for other model types. Modify existing subclasses to remove `typeVerifier` and instead extend `objectIsRequiredType`. * UserInterface/Models/Canvas.js: (WI.Canvas): * UserInterface/Models/Frame.js: (WI.Frame): * UserInterface/Protocol/Target.js: (WI.Target): * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): (WI.ResourceSidebarPanel.prototype._addScript): * UserInterface/Views/CollectionContentView.js: (WI.CollectionContentView): (WI.CollectionContentView.titleForCollection): Delete. * UserInterface/Views/ResourceCollectionContentView.js: (WI.ResourceCollectionContentView): Require that subclasses of Collection override `get displayName` if the CollectionContentView is not provided with a `contentPlaceholderText`. (WI.CollectionContentView.prototype.initialLayout): We don't need to create and add ContentView for each item of the Collection, as this is already done by attached(). (WI.CollectionContentView.prototype._showContentPlaceholder): Remove the 250ms delay before showing the placeholder TitleView. * UserInterface/Views/FolderizedTreeElement.js: (WI.FolderizedTreeElement.prototype._settingsForRepresentedObject): 2017-10-25 Joseph Pecoraro Web Inspector: Display fetch() initiated loads as "fetch" instead of "xhr" in the Network Tab https://bugs.webkit.org/show_bug.cgi?id=178826 Reviewed by Youenn Fablet. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.shortDisplayNameForResourceType): Fetch and XHR loads are still grouped under the succinct "XHR" filter, but at least display the better type name in the "Type" column of the table. 2017-10-25 Devin Rousso Web Inspector: Canvas Tab: selected canvas card loses selection outline style while recording https://bugs.webkit.org/show_bug.cgi?id=178814 Reviewed by Brian Burg. * UserInterface/Views/CanvasOverviewContentView.css: (.content-view.canvas-overview .content-view.canvas): (.content-view.canvas-overview .content-view.canvas > :matches(header, .preview, footer)): (.content-view.canvas-overview .content-view.canvas.selected > :matches(.preview, footer),): (.content-view.canvas-overview .content-view.canvas > header): (.content-view.canvas-overview .content-view.canvas.is-recording > header): (.content-view.canvas-overview .content-view.canvas > .preview): (.content-view.canvas-overview .content-view.canvas > footer): (.content-view.canvas-overview .content-view.canvas.selected:not(.is-recording)): Deleted. Instead of applying the border to the entire element, apply parts of the border to each of its children so that we can choose what colors to use for each part. 2017-10-25 Nikita Vasilyev Web Inspector: [PARITY] Styles Redesign: Add color gradient, bezier curve, and spring inline widgets https://bugs.webkit.org/show_bug.cgi?id=178404 Reviewed by Devin Rousso. Add inline widgets for the following CSS values: - Gradients, e.g. `background-image: linear-gradient(yellow, orange)` - Bezier curves, e.g. `transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55)` - Spring functions, e.g. `transition-timing-function: spring(1, 2, 2, 4)` * UserInterface/Models/Color.js: (WI.Color.prototype.toString): Don't throw. The are never try/catch blocks on the callsites. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype._renderValue): (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch): (WI.SpreadsheetStyleProperty.prototype._addGradientTokens): (WI.SpreadsheetStyleProperty.prototype._addColorTokens): (WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens): 2017-10-25 Nikita Vasilyev Web Inspector: Styles Redesign: Newly added invalid property isn't immediately shown as invalid https://bugs.webkit.org/show_bug.cgi?id=178488 Reviewed by Brian Burg. * UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration.prototype.newBlankProperty): Call this.update to update _properties, _allProperties, _visibleProperties, and _allVisibleProperties. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled)): (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled)): (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .value): When the property name is valid, but the value isn't, display red line-through only for the value. This is how it works in the old styles sidebar as well. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged): (WI.SpreadsheetCSSStyleDeclarationEditor): * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.updateClassNames): (WI.SpreadsheetStyleProperty.prototype._update): Introduce updateClassNames method. Unlike _update, it doesn't change text selection or focus and can be safely called on a property while it's being edited. 2017-10-25 Devin Rousso Web Inspector: Canvas Tab: clicking on a canvas card causes details sidebar to show and mess up card arrangement https://bugs.webkit.org/show_bug.cgi?id=178803 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CanvasDetailsSidebarPanel.css: (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder): (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message): * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WI.CanvasDetailsSidebarPanel): (WI.CanvasDetailsSidebarPanel.prototype.inspect): (WI.CanvasDetailsSidebarPanel.prototype.initialLayout): (WI.CanvasDetailsSidebarPanel.prototype.layout): * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel.disallowInstanceForClass): Deleted. * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: (WI.RecordingStateDetailsSidebarPanel.disallowInstanceForClass): Deleted. * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: (WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass): Deleted. Drive-by: these sidebar panels are now only used by the Canvas tab, so we no longer need to provide support for multiple instances of them. 2017-10-25 Devin Rousso Web Inspector: preserve Recordings for each Canvas after closing the Canvas tab https://bugs.webkit.org/show_bug.cgi?id=178767 Reviewed by Brian Burg. * UserInterface/Test.html: Include CollectionTypes for tests. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.recordingFinished): * UserInterface/Models/Canvas.js: (WI.Canvas): (WI.Canvas.prototype.get recordingCollection): * UserInterface/Models/CollectionTypes.js: (WI.CanvasCollection): (WI.RecordingCollection): * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView.prototype.initialLayout): (WI.CanvasContentView.prototype._addRecording): (WI.CanvasContentView.prototype._recordingStopped): * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView.prototype.attached): (WI.CanvasTabContentView.prototype._recordingAdded): 2017-10-24 Joseph Pecoraro REGRESSION(r222181): Web Inspector: Augmenting Agents Domains are not getting activated https://bugs.webkit.org/show_bug.cgi?id=178768 Reviewed by Brian Burg. * UserInterface/Base/Main.js: Simplify event dispatch. * UserInterface/Controllers/AppController.js: (WI.AppController.prototype.activateExtraDomains): Pass the domains on. 2017-10-24 Joseph Pecoraro Web Inspector: Console Drawer resizing doesn't match cursor position https://bugs.webkit.org/show_bug.cgi?id=178753 Reviewed by Brian Burg. * UserInterface/Views/ConsoleDrawer.js: (WI.ConsoleDrawer.prototype._updateDrawerHeight): Drive-by fix an early return that would never have worked. * UserInterface/Views/Main.css: (#content): Give the #content a flex grow of 1. This causes the space to grow as it already was but now it does not affect the size of the fixed height sibling. 2017-10-24 Eric Carlson Web Inspector: Enable WebKit logging configuration and display https://bugs.webkit.org/show_bug.cgi?id=177027 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: Add new localized strings. * UserInterface/Controllers/LogManager.js: (WI.LogManager): Initialize _loggingChannelSources, fetch _customLoggingChannels. (WI.LogManager.supportsLogChannels): New. (WI.LogManager.prototype.get customLoggingChannels): New. (WI.LogManager.prototype.get logChannelSources): New. * UserInterface/Main.html: * UserInterface/Models/ConsoleMessage.js: Add Media and WebRTC. * UserInterface/Models/IssueMessage.js: (WI.IssueMessage): Add media and webrtc. * UserInterface/Models/LoggingChannel.js: Added. (WI.LoggingChannel): (WI.LoggingChannel.fromPayload): (WI.LoggingChannel.prototype.get source): (WI.LoggingChannel.prototype.get level): * UserInterface/Views/LogContentView.js: (WI.LogContentView): Add new scope buttons for "Log", "Info", and "Debug". Create log channel scope buttons once logging has started. (WI.LogContentView.prototype.get navigationItems): Add the log message scope bar when necessary. (WI.LogContentView.prototype._scopeFromMessageSource): New. (WI.LogContentView.prototype._scopeFromMessageLevel): Don't group Info, Log, and Debug. (WI.LogContentView.prototype._messageAdded): Force a UI update the first time a WebKit log message is added. (WI.LogContentView.prototype._messageShouldBeVisible): New, deal with message source bar buttons. (WI.LogContentView.prototype._messageSourceBarSelectionDidChange): New. (WI.LogContentView.prototype._filterMessageElements): Deal with message source bar buttons. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): Create and initialize menus for each log channel. 2017-10-24 Joseph Pecoraro Uncaught Exception: TypeError: null is not an object (evaluating 'this.treeOutline.isXMLMimeType') https://bugs.webkit.org/show_bug.cgi?id=178745 Reviewed by Brian Burg. * UserInterface/Views/DOMTreeUpdater.js: (WI.DOMTreeUpdater.prototype._updateModifiedNodes): An earlier tree element update might have caused this other tree element's waiting to be updated to actually be removed. So just skip past them. 2017-10-24 Fujii Hironori [GTK] Web Inspector: Add Recording.svg https://bugs.webkit.org/show_bug.cgi?id=175045 Reviewed by Brian Burg. * UserInterface/Images/gtk/Recording.svg: Added. 2017-10-24 Devin Rousso Web Inspector: allow ShaderProgram to be shown in CanvasContentView https://bugs.webkit.org/show_bug.cgi?id=178714 Reviewed by Brian Burg. * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WI.CanvasDetailsSidebarPanel.prototype.inspect): Allow ShaderProgram to show the related Canvas information. * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView.prototype.canShowRepresentedObject): (WI.CanvasTabContentView.prototype.showRepresentedObject): (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange): If a ShaderProgram is selected in the path component, display a ShaderProgramContentView. 2017-10-24 Devin Rousso Web Inspector: remove canvases from Resources and experimental setting/UI https://bugs.webkit.org/show_bug.cgi?id=178711 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WI.tabContentViewClassForRepresentedObject): * UserInterface/Base/Setting.js: * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.canvasAdded): (WI.CanvasManager.prototype.canvasRemoved): * UserInterface/Models/Canvas.js: * UserInterface/Models/Frame.js: (WI.Frame): (WI.Frame.prototype.get extraScriptCollection): (WI.Frame.prototype.commitProvisionalLoad): (WI.Frame.prototype.get canvasCollection): Deleted. * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView.isTabAllowed): * UserInterface/Views/FrameTreeElement.js: (WI.FrameTreeElement): (WI.FrameTreeElement.prototype.onattach): (WI.FrameTreeElement.prototype.ondetach): (WI.FrameTreeElement.prototype.onpopulate): (WI.FrameTreeElement.prototype._styleSheetAdded): (WI.FrameTreeElement.prototype._canvasWasAdded): Deleted. (WI.FrameTreeElement.prototype._canvasWasRemoved): Deleted. * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel): (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match): (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange): * UserInterface/Views/ResourcesTabContentView.js: (WI.ResourcesTabContentView): (WI.ResourcesTabContentView.prototype.canShowRepresentedObject): * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): 2017-10-24 Devin Rousso Web Inspector: Show recordings in CanvasTabContentView https://bugs.webkit.org/show_bug.cgi?id=177606 Reviewed by Brian Burg. Original patch by Matt Baker . This patch folds canvas recordings into the new Canvas tab, which now supports showing both CanvasCollections and Recordings. When viewing recordings, a back button is shown at the start of the navigation bar, allowing the user to return to the overview. It has been styled with a back arrow, to make its function as clear as possible. Like other navigation path components, the item for the recording can clicked to select another recording taken from the same canvas. The recording action scrubber has been moved from the content browser's navigation bar to a more prominent location in the recording content view. Selecting a frame tree element in the navigation sidebar no longer selects the last action for that frame. This was changed to prevent the scrubber position from behaving non-monotonically when selecting actions in sequential order. While this patch retains support for importing recordings, the feature is not polished. Currently it is not possible to return to an imported recording after leaving closing the view. In the future we may want to consider including a navigation sidebar panel for the overview, which could list canvas recordings (and eventually shaders). * .eslintrc: Drive-by: remove duplicate key. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WI.contentLoaded): (WI.tabContentViewClassForRepresentedObject): * UserInterface/Main.html: * UserInterface/Views/RecordingTabContentView.js: Removed. Remove RecordingTabContentView. * UserInterface/Images/Recording.svg: New recording icon, used for tree elements and canvas preview UI. * UserInterface/Models/Recording.js: (WI.Recording): (WI.Recording.prototype.get visualActionIndexes): Visual action indexes should be computed by the recording. * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView): (WI.CanvasContentView.prototype.refresh): (WI.CanvasContentView.prototype.initialLayout): (WI.CanvasContentView.prototype.attached): (WI.CanvasContentView.prototype._recordingStopped): (WI.CanvasContentView.prototype._handleRecordingSelectElementChange): New UI for showing CanvasContentView as a CollectionView item. Includes recordings button and select for choosing a recording to view. * UserInterface/Views/CanvasOverviewContentView.css: (.content-view.canvas-overview .content-view.canvas > header): Switch to 13px, which is more frequently used. (.content-view.canvas-overview .content-view.canvas > header .subtitle::before): Switch to literal em dash. Surrounding spaces were ignored when using the backslash-escaped character. (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording, .selected) > header > .navigation-bar): (.content-view.canvas-overview .content-view.canvas > footer > .recordings): (.content-view.canvas-overview .content-view.canvas > footer > .recordings::before): (.content-view.canvas-overview .content-view.canvas > footer > .recordings > select): (.content-view.canvas-overview .content-view.canvas > footer .recordings > select:focus): (.content-view.canvas-overview .content-view.canvas > footer > .flexible-space): (.popover-content > .tree-outline .item.recording > .icon): (.popover-content > .tree-outline .item.recording:hover): (.popover-content > .tree-outline .item.recording:hover > .icon): (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording) > header > .navigation-bar): Deleted. (.content-view.canvas-overview .content-view.canvas > footer): Deleted. New styles for the recording picker. * UserInterface/Views/CanvasOverviewContentView.js: (WI.CanvasOverviewContentView): (WI.CanvasOverviewContentView.prototype.get selectionPathComponents): (WI.CanvasOverviewContentView.prototype.contentViewAdded): (WI.CanvasOverviewContentView.prototype.contentViewRemoved): (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange): (WI.CanvasOverviewContentView.prototype._selectedPathComponentChanged): Deleted. (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange.createCanvasPathComponent): Deleted. Canvas tree elements are now managed by CanvasTabContentView, which is now responsible for maintaining the tree of canvas objects. For now the tree holds canvases and recordings, but will eventually include shader programs. * UserInterface/Views/CanvasTabContentView.css: (.content-view.tab.canvas .navigation-bar > .item .recording > .icon): (.content-view.tab.canvas .navigation-bar > .item > .canvas-overview > .icon): Deleted. Add styles for recording path components. * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView): (WI.CanvasTabContentView.prototype.treeElementForRepresentedObject): (WI.CanvasTabContentView.prototype.canShowRepresentedObject): (WI.CanvasTabContentView.prototype.showRepresentedObject): (WI.CanvasTabContentView.prototype.shown): (WI.CanvasTabContentView.prototype.restoreStateFromCookie): (WI.CanvasTabContentView.prototype.attached): (WI.CanvasTabContentView.prototype.detached): (WI.CanvasTabContentView.prototype._canvasAdded): (WI.CanvasTabContentView.prototype._canvasRemoved): (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange): (WI.CanvasTabContentView.prototype._recordingStopped): (WI.CanvasTabContentView.prototype._navigationSidebarImport): (WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged): (WI.CanvasTabContentView.prototype._recordingAdded): (WI.CanvasTabContentView.prototype._recordingActionIndexChanged): (WI.CanvasTabContentView.prototype._updateActionIndex): (WI.CanvasTabContentView.prototype.restoreFromCookie): Deleted. (WI.CanvasTabContentView.prototype._overviewPathComponentClicked): Deleted. * UserInterface/Views/ContentView.js: (WI.ContentView.createFromRepresentedObject): * UserInterface/Views/RecordingActionTreeElement.css: (body:not(.window-inactive, .window-docked-inactive) .tree-outline:matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,): (body:not(.window-inactive, .window-docked-inactive) :matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,): Deleted. * UserInterface/Views/RecordingContentView.css: (.content-view:not(.tab).recording): (.content-view:not(.tab).recording > header): (.content-view:not(.tab).recording > header > .slider-container): (.content-view:not(.tab).recording > header > .slider-container > input[type=range]): (.content-view:not(.tab).recording > header > .slider-container > input[type=range]::-webkit-slider-runnable-track): (.content-view:not(.tab).recording > header > .slider-container > input[type=range]::-webkit-slider-thumb): (.content-view:not(.tab).recording > .preview-container): * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): (WI.RecordingContentView.prototype.updateActionIndex): (WI.RecordingContentView.prototype.initialLayout): (WI.RecordingContentView.prototype.async._generateContentCanvas2D): (WI.RecordingContentView.prototype._updateSliderValue): (WI.RecordingContentView.prototype._sliderChanged): (WI.RecordingContentView.prototype.get supplementalRepresentedObjects): Deleted. * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel.prototype.set recording): (WI.RecordingNavigationSidebarPanel.prototype.updateActionIndex): * UserInterface/Views/ResourceIcons.css: (.canvas .icon): (.canvas.canvas-2d .icon): Deleted. (.canvas:matches(.webgl, .webgl2, .webgpu) .icon): Deleted. 2017-10-24 Ross Kirsling Web Inspector: Layer mutations should be purely based on layerId, not based on nodeId https://bugs.webkit.org/show_bug.cgi?id=178554 Reviewed by Devin Rousso. * UserInterface/Controllers/LayerTreeManager.js: (WI.LayerTreeManager.prototype.layerTreeMutations): Looking for special cases involving nodeIds is incorrect, as nodeIds need not be unique in the layer list (such as when an element and a pseudo-element thereof each give rise to a layer). A layer object marked "preserved" in this way shares no data with its predecessor, meaning that no consumer can act upon this so-called preservation. A preserved layer should be nothing more or less than a recycled layerId (the thing that *is* unique). 2017-10-23 Nikita Vasilyev Web Inspector: Styles Redesign: Inline widgets don't hide when starting editing by tabbing from property name https://bugs.webkit.org/show_bug.cgi?id=178638 Reviewed by Joseph Pecoraro. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur): Blur event on the property name text field caused WI.SpreadsheetStyleProperty.prototype._renderValue, which displayed inline swatches. Display inline swatches only after blur event on the property value. 2017-10-23 Joseph Pecoraro Web Inspector: Please support HAR Export for network traffic https://bugs.webkit.org/show_bug.cgi?id=146692 Reviewed by Brian Burg. * UserInterface/Main.html: * UserInterface/Test.html: New resources. * UserInterface/Base/Platform.js: Include a build number as well. * UserInterface/Base/URLUtilities.js: (parseLocationQueryParameters): Deleted. Remove unused function. * UserInterface/Controllers/FrameResourceManager.js: (WI.FrameResourceManager.prototype.frameDidNavigate): (WI.FrameResourceManager.prototype.resourceRequestWillBeSent): (WI.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): (WI.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget): Pass along a walltime. * UserInterface/Protocol/NetworkObserver.js: (WI.NetworkObserver.prototype.requestWillBeSent): Pass along a walltime. This new parameter shifts old parameters. * UserInterface/Controllers/HARBuilder.js: Added. (WI.HARBuilder.async.buildArchive): (WI.HARBuilder.creator): (WI.HARBuilder.pages): (WI.HARBuilder.pageTimings): (WI.HARBuilder.entry): (WI.HARBuilder.request): (WI.HARBuilder.response): (WI.HARBuilder.cookies): (WI.HARBuilder.headers): (WI.HARBuilder.content): (WI.HARBuilder.postData): (WI.HARBuilder.cache): (WI.HARBuilder.timings): (WI.HARBuilder.ipAddress): (WI.HARBuilder.date): (WI.HARBuilder.fetchType): HAR construction and helpers. * UserInterface/Models/Cookie.js: (WI.Cookie.prototype.expirationDate): * UserInterface/Models/Resource.js: (WI.Resource.prototype.get queryStringParameters): (WI.Resource.prototype.get requestFormParameters): (WI.Resource.prototype.get requestSentWalltime): (WI.Resource.prototype.get requestSentDate): (WI.Resource.prototype.hasRequestFormParameters): Helpers for HAR generation and sub-sets of data. * UserInterface/Models/SourceCode.js: (WI.SourceCode.prototype._processContent): Capture the raw, unmodified, base64 encoded flag and content. This ends up getting used by HAR generation and is otherwise lost. * UserInterface/Test/TestHarness.js: (TestHarness.prototype.json): Helper for just logging JSON data with a filter. This defaults to a reasonable 2 space indent for JSON logs in our test output. * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView.prototype.get saveData): (WI.DOMTreeContentView.get saveData.saveHandler): Deleted. Drive-by simplify while looking at other save handlers. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.get supportsSave): (WI.NetworkTableContentView.prototype.get saveData): (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked): (WI.NetworkTableContentView.prototype._HARResources): (WI.NetworkTableContentView.prototype._exportHAR): Provide a context menu and save keyboard handler to export a HAR. This matches other browsers. * UserInterface/Views/ResourceClusterContentView.js: (WI.ResourceClusterContentView.prototype._canShowRequestContentView): Use code that is now available in Resource. 2017-10-20 Matt Baker Web Inspector: scrolling the editor while debugging shouldn't trigger popovers https://bugs.webkit.org/show_bug.cgi?id=178325 Reviewed by Devin Rousso. Ignore the next "mousemove" event immediately following a "mousewheel", when determining the hovered item for purposes of triggering a popover. * UserInterface/Controllers/CodeMirrorTokenTrackingController.js: (WI.CodeMirrorTokenTrackingController): (WI.CodeMirrorTokenTrackingController.prototype._startTracking): (WI.CodeMirrorTokenTrackingController.prototype._stopTracking): (WI.CodeMirrorTokenTrackingController.prototype.handleEvent): (WI.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor): 2017-10-20 Joseph Pecoraro Web Inspector: preview content view for MIME type application/json should be a collapsible tree outline https://bugs.webkit.org/show_bug.cgi?id=158938 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New files and strings. * UserInterface/Views/JSONResourceContentView.css: Added. (.content-view.resource.json): (.content-view.resource.json .object-tree .prototype-property): Some padding and scrolling for the JSON content view. * UserInterface/Views/JSONResourceContentView.js: Added. (WI.JSONResourceContentView): (WI.JSONResourceContentView.customContentViewDisplayName): (WI.JSONResourceContentView.prototype.contentAvailable): (WI.JSONResourceContentView.prototype.closed): JSON view evaluates the JSON content on the page and shows an ObjectTree for the resulting object. * UserInterface/Views/ResourceClusterContentView.js: (WI.ResourceClusterContentView): (WI.ResourceClusterContentView.prototype.get customResponseContentView): (WI.ResourceClusterContentView.prototype.get selectionPathComponents): (WI.ResourceClusterContentView.prototype.restoreFromCookie): (WI.ResourceClusterContentView.prototype.showResponse): (WI.ResourceClusterContentView.prototype._canShowRequestContentView): (WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView): (WI.ResourceClusterContentView.prototype._pathComponentForContentView): (WI.ResourceClusterContentView.prototype._identifierForContentView): (WI.ResourceClusterContentView.prototype._showContentViewForIdentifier): (WI.ResourceClusterContentView.prototype._resourceTypeDidChange): (WI.ResourceClusterContentView.prototype._resourceLoadingDidFinish): (WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView): (WI.ResourceClusterContentView.prototype._customContentViewConstructorForResource): Allow a custom content view to be used for a resource based on the response. Currently the only custom content view is the JSON content view. 2017-10-20 Joseph Pecoraro Web Inspector: Network Tab - Turn on the new tab by default, remove the legacy network tab https://bugs.webkit.org/show_bug.cgi?id=178559 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WI.contentLoaded): * UserInterface/Base/Setting.js: * UserInterface/Main.html: * UserInterface/Views/LegacyNetworkSidebarPanel.css: Removed. * UserInterface/Views/LegacyNetworkSidebarPanel.js: Removed. * UserInterface/Views/LegacyNetworkTabContentView.js: Removed. * UserInterface/Views/NetworkGridContentView.css: Removed. * UserInterface/Views/NetworkGridContentView.js: Removed. * UserInterface/Views/TabBrowser.js: (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject): Remove LegacyNetwork tab, its NetworkGridContentView, and associated content. * UserInterface/Views/NetworkTabContentView.js: (WI.NetworkTabContentView.isTabAllowed): Simplify now that this is the only Network tab. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): Remove experimental setting. 2017-10-19 Joseph Pecoraro Unreviewed localized strings update. * Localizations/en.lproj/localizedStrings.js: Add missing string after r223735. 2017-10-19 Joseph Pecoraro Web Inspector: Network Tab: Metrics Detail View https://bugs.webkit.org/show_bug.cgi?id=178323 Reviewed by Devin Rousso. Provide a Metrics detail view for resources in the Network tab. This detail view shows: - Transfer Size information (Header + Body bytes) - Resource Size information (Compression, MIME) - Timing information (ResourceTiming, Waterfall breakdown) The display of timing information isn't quite final. But this is a good starting point for all the information. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New resources and strings. * UserInterface/Base/MIMETypeUtilities.js: (WI.shouldTreatMIMETypeAsText): Helper for detecting text resources. * UserInterface/Images/Receiving.svg: Added. * UserInterface/Images/Sending.svg: Added. * UserInterface/Images/gtk/Receiving.svg: Added. * UserInterface/Images/gtk/Sending.svg: Added. Same images for main and linux ports with different licenses. * UserInterface/Views/NetworkResourceDetailView.js: (WI.NetworkResourceDetailView): (WI.NetworkResourceDetailView.prototype.metricsContentViewGoToHeaders): (WI.NetworkResourceDetailView.prototype.metricsContentViewGoToRequestBody): (WI.NetworkResourceDetailView.prototype.metricsContentViewGoToResponseBody): (WI.NetworkResourceDetailView.prototype.initialLayout): (WI.NetworkResourceDetailView.prototype._showPreferredContentView): (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem): Replace "Timing" and "Details" stubs with a single "Metrics" section. Handle delegate cases from the Metrics content view. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.displayNameForResource): (WI.NetworkTableContentView.prototype._displayType): Deleted. (WI.NetworkTableContentView.prototype._entryForResource): Promote this to a static helper in case anyone else wants it. (WI.NetworkTableContentView.prototype.closed): (WI.NetworkTableContentView.prototype.reset): (WI.NetworkTableContentView.prototype.networkResourceDetailViewClose): Reorder code a bit to reduce work since hiding the detail view currently forces a layout. * UserInterface/Views/ResourceHeadersContentView.js: (WI.ResourceHeadersContentView): (WI.ResourceHeadersContentView.prototype._refreshRequestDataSection): (WI.ResourceHeadersContentView.prototype._resourceResponseReceived): (WI.ResourceHeadersContentView.prototype._goToRequestDataClicked): Deleted. Simplify by making the delegate required. * UserInterface/Views/ResourceMetricsContentView.css: Added. (.resource-metrics): (.resource-metrics > .content): (.resource-metrics > .content .label): General metrics styles. (.resource-metrics > .content > section): (.resource-metrics > .content > section .subtitle): (.resource-metrics > .content > section:not(:last-of-type)): (.resource-metrics > .content > section.split): (.resource-metrics > .content > section.split > .subsection): (.resource-metrics > .content > section.split > .subsection > table): (.resource-metrics > .content > section.split > .divider): (.resource-metrics > .content > section.network > .subsection > .container): (.resource-metrics > .content > section.network .bytes-group): (.resource-metrics > .content > section.network .bytes): (body[dir=ltr] .resource-metrics > .content > section.network table > tr > td.label): (body[dir=rtl] .resource-metrics > .content > section.network table > tr > td.label): (.resource-metrics > .content > section.network .suffix): (.resource-metrics > .content > section.network img): (.resource-metrics > .content > section.network .go-to-arrow): (.resource-metrics > .content > section.network .warning): Styles for Sizes sections. (.resource-metrics > .content > section.timing): (.resource-metrics > .content > section.timing .subtitle): (.resource-metrics > .content > section.timing > ul): (.resource-metrics > .content > section.timing > ul > li): (.resource-metrics > .content > section.timing > .waterfall): (.resource-metrics > .content > section.timing > .waterfall .block): (.resource-metrics > .content > section.timing > ul > li > .row-label): (body[dir=ltr] .resource-metrics > .content > section.timing > ul > li > .row-label): (body[dir=rtl] .resource-metrics > .content > section.timing > ul > li > .row-label): (.resource-metrics > .content > section.timing > ul > li > .time-label): (.resource-metrics > .content > section.timing > ul > li.total .block): (.resource-metrics > .content > section.timing > ul > li.total .time-label): (.resource-metrics > .content > section.timing .indeterminate-progress-spinner): (.resource-metrics > .content > section.timing .empty): Styles for Timing section. * UserInterface/Views/ResourceMetricsContentView.js: Added. (WI.ResourceMetricsContentView): (WI.ResourceMetricsContentView.prototype.initialLayout.createSizeComponents): (WI.ResourceMetricsContentView.prototype.initialLayout): (WI.ResourceMetricsContentView.prototype.layout): (WI.ResourceMetricsContentView.prototype.closed): (WI.ResourceMetricsContentView.prototype._sizeComponents): (WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections.appendGoToArrow): (WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections): (WI.ResourceMetricsContentView.prototype._refreshResourceSizeSection): (WI.ResourceMetricsContentView.prototype._refreshTimingSection.createBlock): (WI.ResourceMetricsContentView.prototype._refreshTimingSection.createTimeLabel): (WI.ResourceMetricsContentView.prototype._refreshTimingSection.createRow): (WI.ResourceMetricsContentView.prototype._refreshTimingSection): (WI.ResourceMetricsContentView.prototype._resourceSizeDidChange): (WI.ResourceMetricsContentView.prototype._resourceTransferSizeDidChange): (WI.ResourceMetricsContentView.prototype._resourceMetricsDidChange): (WI.ResourceMetricsContentView.prototype._resourceTimestampsDidChange): Metrics content. This just creates all of the elements, and saves a few to get populated with data later on. 2017-10-19 Joseph Pecoraro Web Inspector: Network Tab - Improve graphical representation of network waterfall https://bugs.webkit.org/show_bug.cgi?id=147897 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New strings and resources. * UserInterface/Views/Variables.css: (:root): Global styles. * UserInterface/Views/NetworkTableContentView.css: (.network-table .header .cell.waterfall): (.network-table .timeline-ruler): (.network-table .timeline-ruler > .header): Styles for having a TimelineRuler in the Waterfall's table header. (.network-table :not(.header) .cell.waterfall): (.network-table :not(.header) .cell.waterfall .waterfall-container): (.waterfall .block): (.waterfall .block.request,): (.waterfall .block.mouse): (.waterfall .block.queue): (.waterfall .block.dns): (.waterfall .block.connect): (.waterfall .block.secure): (.waterfall .block.request): (.waterfall .block.response): Waterfall styles inside the Network Table. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype.reset): (WI.NetworkTableContentView.prototype.tablePopulateCell): (WI.NetworkTableContentView.prototype.initialLayout): (WI.NetworkTableContentView.prototype._updateWaterfallTimelineRuler): (WI.NetworkTableContentView.prototype._updateEntryForResource): (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish): (WI.NetworkTableContentView.prototype._resourceLoadingDidFail): (WI.NetworkTableContentView.prototype._networkTimelineRecordAdded): (WI.NetworkTableContentView.prototype._tableWaterfallColumnDidChangeWidth): Update the TimelineRuler and Waterfall column when the column's size changes or the time bounds change. The time bounds right now are the earliest and latest time of resources. Later we hope to bound this by a timeline selection. (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource): (WI.NetworkTableContentView.prototype._handleMousedownWaterfall): (WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock): (WI.NetworkTableContentView.prototype._populateWaterfallGraph): (WI.NetworkTableContentView.prototype._hidePopover): Create and manage a popover for the waterfall column. * UserInterface/Views/Popover.js: (WI.Popover): (WI.Popover.prototype.get element): (WI.Popover.prototype.get visible): (WI.Popover.prototype.get backgroundStyle): (WI.Popover.prototype.set backgroundStyle): (WI.Popover.prototype._drawBackground): Provide an option to have a white background popover. * UserInterface/Views/ResourceTimingBreakdownView.css: Added. (.resource-timing-breakdown): (.resource-timing-breakdown .waterfall): (.resource-timing-breakdown .waterfall .block): (.resource-timing-breakdown .waterfall .block.request): (body[dir=ltr] .resource-timing-breakdown .waterfall .block.queue,): (body[dir=ltr] .resource-timing-breakdown .waterfall .block.response): (body[dir=rtl] .resource-timing-breakdown .waterfall .block.queue,): (body[dir=rtl] .resource-timing-breakdown .waterfall .block.response): (.resource-timing-breakdown .numbers): (body[dir=ltr] .resource-timing-breakdown .numbers): (body[dir=rtl] .resource-timing-breakdown .numbers): Waterfall styles and sizes in the popover's breakdown view. (.resource-timing-breakdown .numbers > p): (.resource-timing-breakdown .numbers > p > .swatch): (.resource-timing-breakdown .numbers .swatch.queue): (.resource-timing-breakdown .numbers .swatch.dns): (.resource-timing-breakdown .numbers .swatch.connect): (.resource-timing-breakdown .numbers .swatch.secure): (.resource-timing-breakdown .numbers .swatch.request): (.resource-timing-breakdown .numbers .swatch.response): (.resource-timing-breakdown .numbers > p > .label): (.resource-timing-breakdown .numbers > p.total): Number and label styles in the popover's breakdown view. * UserInterface/Views/ResourceTimingBreakdownView.js: Added. (WI.ResourceTimingBreakdownView): (WI.ResourceTimingBreakdownView.prototype.initialLayout): (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendBlock): (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendRow): Show a section for a waterfall visualization and a section for the numbers. * UserInterface/Views/Table.js: (WI.Table.prototype.reloadVisibleColumnCells): (WI.Table.prototype.cellForRowAndColumn): (WI.Table.prototype.addColumn): (WI.Table.prototype.showColumn): (WI.Table.prototype.hideColumn): (WI.Table.prototype.resizerDragging): (WI.Table.prototype.resizerDragEnded): (WI.Table.prototype._resizeColumnsAndFiller): (WI.Table.prototype._applyColumnWidths): (WI.Table.prototype._positionHeaderViews): * UserInterface/Views/TableColumn.js: (WI.TableColumn.prototype.get headerView): Provide a way to include a WI.View with a TableColumn Header. This matches what we do with DataGrid, and ends up being pretty concise. * UserInterface/Views/TimelineRuler.css: (.timeline-ruler > .header): Make the height a variable so that other code can work off of it. 2017-10-19 Ross Kirsling Web Inspector: Remove superfluous file External/.eslintrc https://bugs.webkit.org/show_bug.cgi?id=178474 Reviewed by Joseph Pecoraro. * UserInterface/External/.eslintrc: Removed. 2017-10-19 Adrian Perez de Castro [GTK] Inspector UI does not use system font despite -webkit-system-font being supported https://bugs.webkit.org/show_bug.cgi?id=178388 Reviewed by Joseph Pecoraro. Change ocurrences of the "-apple-system" generic font name to "-webkit-system-font", which is also implemented by the GTK+ port. * UserInterface/Views/CodeMirrorOverrides.css: (.CodeMirror .CodeMirror-linenumber): (.CodeMirror .CodeMirror-placeholder): * UserInterface/Views/ConsoleMessageView.css: (.console-user-command.special-user-log > .console-message-text): (.console-message .console-message-extra-parameters-container > li::before): (.console-message .console-message-location): * UserInterface/Views/DataGrid.css: (.data-grid td): * UserInterface/Views/DefaultDashboardView.css: (.toolbar .dashboard.default > .item): * UserInterface/Views/HeapSnapshotInstancesContentView.css: (.heap-snapshot-instance-popover-content > .title): * UserInterface/Views/HierarchicalPathComponent.css: (.hierarchical-path-component): * UserInterface/Views/LogContentView.css: (.console-messages): * UserInterface/Views/Main.css: (body): * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css: (.object-tree-array-index .index-name): * UserInterface/Views/ObjectTreePropertyTreeElement.css: (.object-tree-property .property-name,): * UserInterface/Views/ObjectTreeView.css: (.tree-outline.object li .empty-message): * UserInterface/Views/RecordingActionTreeElement.css: (.item.action:not(.initial-state)::before): * UserInterface/Views/SourceCodeTextEditor.css: (.source-code.text-editor > .CodeMirror .line-indicator-widget > .text): (.popover .debugger-popover-content > .title): * UserInterface/Views/TypeTreeView.css: (.type-tree): * UserInterface/Views/VisualStyleFontFamilyTreeElement.js: 2017-10-18 Ross Kirsling Web Inspector: Layers sidebar footer should not have white background with full-width quick console https://bugs.webkit.org/show_bug.cgi?id=178493 Reviewed by Matt Baker. * UserInterface/Views/LayerDetailsSidebarPanel.css: Update CSS for new sidebar. * UserInterface/Views/LayerTreeDetailsSidebarPanel.css: Update CSS for legacy sidebar. 2017-10-18 Fujii Hironori [GTK] Web Inspector: Add Layers.svg https://bugs.webkit.org/show_bug.cgi?id=178430 Reviewed by Michael Catanzaro. * UserInterface/Images/gtk/Layers.svg: Added. 2017-10-18 Commit Queue Unreviewed, rolling out r223321. https://bugs.webkit.org/show_bug.cgi?id=178476 This protocol change broke some internal builds (Requested by brrian__ on #webkit). Reverted changeset: "Web Inspector: provide a way to enable/disable event listeners" https://bugs.webkit.org/show_bug.cgi?id=177451 https://trac.webkit.org/changeset/223321 2017-10-17 Nikita Vasilyev Web Inspector: [PARITY] Styles Redesign: Add color picker inline widget https://bugs.webkit.org/show_bug.cgi?id=178354 Reviewed by Joseph Pecoraro. Show color picker using the existing WI.InlineSwatch. * UserInterface/Models/Color.js: * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-comment): Syntax highlight comments in values. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype._renderValue): (WI.SpreadsheetStyleProperty.prototype._addColorTokens): Find colors in CodeMirror tokens and replace them with color token elements. 2017-10-17 Nikita Vasilyev Web Inspector: Styles: Command-click on a property name should jump to definition in Resources tab https://bugs.webkit.org/show_bug.cgi?id=174329 Reviewed by Joseph Pecoraro. * UserInterface/Base/Main.js: Add "meta-key-pressed" class to when Command key is pressed. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.meta-key-pressed .spreadsheet-css-declaration:not(.locked) :matches(.name, .value):not(.editing):hover): Use the same styles as in CodeMirrorTokenTrackingController.css. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype._update): (WI.SpreadsheetStyleProperty.prototype._setupJumpToSymbol): This is very similar to WI.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked, except it doesn't include special cases for CSS variables and links yet. 2017-10-16 Nikita Vasilyev Web Inspector: Styles Redesign: apply syntax highlighting to property values https://bugs.webkit.org/show_bug.cgi?id=178176 Reviewed by Matt Baker. - Highlight links blue and CSS strings dark red. - Truncate URLs and strings over 150 characters. * UserInterface/Views/CodeMirrorAdditions.js: Parse CSS values using CodeMirror. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-link): (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-string): * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype._update): (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldWillStartEditing): Replace trancated values with their full version. (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit): (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur): (WI.SpreadsheetStyleProperty.prototype._renderValue): Highlight links and CSS strings in values when not editing. * UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField.prototype.startEditing): Disabling of syntax highlighting moved to spreadsheetTextFieldWillStartEditing. * UserInterface/Views/SyntaxHighlightingDefaultTheme.css: (.syntax-highlighted a): * UserInterface/Views/Variables.css: (:root): Make link color a variable. 2017-10-16 Ross Kirsling Web Inspector: Layers tab mistakenly throws out the root element's layer. https://bugs.webkit.org/show_bug.cgi?id=178222 Reviewed by Brian Burg. * UserInterface/Controllers/LayerTreeManager.js: (WI.LayerTreeManager.prototype.layersForNode): Fix the issue at the manager level. * UserInterface/Views/Layers3DContentView.js: (WI.Layers3DContentView.prototype.layout): Update new sidebar based on simplified manager API. * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WI.LayerTreeDetailsSidebarPanel.prototype.layout): Move overtailored code from manager to legacy sidebar. 2017-10-15 Nikita Vasilyev Web Inspector: Modify CSS number values with up key and down key https://bugs.webkit.org/show_bug.cgi?id=170779 Reviewed by Matt Baker. Up key increments a number, Down key decrements it. Holding modifier keys changes the step value: - Option modifies the value by 0.1 - Shift modifies the value by 10 - Command modifies the value by 100 * UserInterface/Test.html: * UserInterface/Views/EditingSupport.js: (WI.incrementElementValue): Abstract away incrementElementValue into a public method. * UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField.prototype._handleKeyDown): 2017-10-15 Devin Rousso Web Inspector: show warning when recorded Canvas action caused no visual change https://bugs.webkit.org/show_bug.cgi?id=175282 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/RecordingAction.js: (WI.RecordingAction): (WI.RecordingAction.prototype.get valid): (WI.RecordingAction.prototype.get hasVisibleEffect): (WI.RecordingAction.prototype.markInvalid): (WI.RecordingAction.prototype.apply): (WI.RecordingAction.prototype.async._swizzle): If the selected action is visual, save a copy of the preview canvas' dataURL before applying the action and compare it to its dataURL after. If there is no difference, the action had no visual effect. * UserInterface/Models/Recording.js: (WI.Recording): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement): (WI.RecordingActionTreeElement.prototype._handleValidityChanged): (WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged): * UserInterface/Views/RecordingActionTreeElement.css: (.item.action.visual.no-visible-effect:not(.invalid) > .status > .warning): * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): (WI.RecordingContentView.prototype.async._generateContentCanvas2D): (WI.RecordingContentView.prototype._applyAction): Deleted. 2017-10-15 Nikita Vasilyev Web Inspector: [PARITY] Styles Redesign: clicking on the go-to arrow in Computed tab should work https://bugs.webkit.org/show_bug.cgi?id=178286 Reviewed by Joseph Pecoraro. Highlight the matching property using a yellow background and focus on the property value if the property is editable (e.g., not a User Agent style). * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor): (.spreadsheet-style-declaration-editor .property): Move left padding to the property element so there's no awkward gap on the left side when the property is highlighted. (.spreadsheet-style-declaration-editor .property.highlighted): (@keyframes style-property-highlight): Use the same animation duration as we used in `.text-editor > .CodeMirror .highlighted`. The highlight color was changed from light blue to yellow. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty): Use the same logic as in WI.CSSStyleDeclarationTextEditor.prototype.highlightProperty to find matching style property to highlight. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.highlightProperty): Use the same logic as in WI.CSSStyleDeclarationSection.prototype.highlightProperty. * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.nodeStylesRefreshed): Copied from WI.RulesStyleDetailsPanel. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.detached): (WI.SpreadsheetStyleProperty.prototype.highlight): 2017-10-14 Nikita Vasilyev REGRESSION (r223310): Web Inspector: Class list container is transparent and unreadable https://bugs.webkit.org/show_bug.cgi?id=178311 Reviewed by Devin Rousso. * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content ~ .class-list-container): Fix 1px hole below the class container. 2017-10-14 Matt Baker Web Inspector: Canvas tab: recordings should have a unique name https://bugs.webkit.org/show_bug.cgi?id=178188 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: New format string "Recording %d". * UserInterface/Base/FileUtilities.js: (WI.loadDataFromFile): Pass chosen filename to callback. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.recordingFinished): Create a unique name for the recording. * UserInterface/Models/Recording.js: (WI.Recording): (WI.Recording.fromPayload): (WI.Recording.prototype.get displayName): (WI.Recording.prototype.createDisplayName): * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView.prototype.get saveData): Use encodeURI so that special characters can be used in filenames, and to be consistent with other `saveData` implementations. * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel.prototype.set recording): (WI.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked): Drive-by fix: wait until actions are resolved before updating UI. * UserInterface/Views/RecordingTabContentView.js: (WI.RecordingTabContentView.prototype._navigationSidebarImport): Try to use the imported filename as the recording name. If the name collides with that of another imported recording, append a unique suffix. 2017-10-14 Devin Rousso Web Inspector: provide a way to enable/disable event listeners https://bugs.webkit.org/show_bug.cgi?id=177451 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Controllers/DOMTreeManager.js: (WI.DOMTreeManager.prototype.setEventListenerDisabled): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WI.DOMNodeDetailsSidebarPanel.prototype.attached): (WI.DOMNodeDetailsSidebarPanel.prototype.detached): (WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged): (WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners): Deleted. (WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners): Deleted. Listen for `WI.DOMNode.Event.EventListenersChanged` on all instances of WI.DOMNode, since we will still want to refresh the event listeners section in the event that an event listener is removed from a parent node. * UserInterface/Views/EventListenerSectionGroup.js: (WI.EventListenerSectionGroup): (WI.EventListenerSectionGroup.prototype._eventText): (WI.EventListenerSectionGroup.prototype._nodeTextOrLink): (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement): (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement.updateTitle): * UserInterface/Views/EventListenerSectionGroup.css: (.event-listener-section > .content input[type="checkbox"]): * UserInterface/Views/DetailsSectionSimpleRow.js: (WI.DetailsSectionSimpleRow.prototype.get label): (WI.DetailsSectionSimpleRow.prototype.set label): 2017-10-13 Devin Rousso Web Inspector: make split console full width of view https://bugs.webkit.org/show_bug.cgi?id=176635 Reviewed by Timothy Hatcher. * UserInterface/Main.html: * UserInterface/Views/Main.css: (#main): (#content): * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)): (.sidebar > .panel.details.css-style > .content ~ .options-container): 2017-10-13 Devin Rousso Web Inspector: fix ESLint errors https://bugs.webkit.org/show_bug.cgi?id=175065 Reviewed by Joseph Pecoraro. Removed trailing whitespace, extra parenthesis, and some unnecessary escape characters. Added missing semicolons, spacing around default values for parameters, and changed `==` to `===` where applicable. Specific changes to each file were removed for brevity. * .eslintrc: Alphabetize each list of global variables and add some missing utility functions. * UserInterface/Base/EventListener.js: * UserInterface/Base/EventListenerSet.js: * UserInterface/Base/Main.js: * UserInterface/Base/Setting.js: * UserInterface/Base/TextUtilities.js: * UserInterface/Base/URLUtilities.js: * UserInterface/Base/Utilities.js: * UserInterface/Base/YieldableTask.js: * UserInterface/Controllers/AppControllerBase.js: * UserInterface/Controllers/CanvasManager.js: * UserInterface/Controllers/CodeMirrorCompletionController.js: * UserInterface/Controllers/DOMDebuggerManager.js: * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: * UserInterface/Controllers/RuntimeManager.js: * UserInterface/Controllers/SourceMapManager.js: * UserInterface/Debug/DebugContentView.js: * UserInterface/Debug/UncaughtExceptionReporter.js: * UserInterface/Models/CSSKeywordCompletions.js: * UserInterface/Models/DOMNode.js: * UserInterface/Models/DOMNodeStyles.js: * UserInterface/Models/KeyboardShortcut.js: * UserInterface/Models/ProfileNode.js: * UserInterface/Models/Resource.js: * UserInterface/Models/ResourceCollection.js: * UserInterface/Models/Script.js: * UserInterface/Models/ScriptSyntaxTree.js: * UserInterface/Models/ScriptTimelineRecord.js: * UserInterface/Protocol/Connection.js: * UserInterface/Test/FrontendTestHarness.js: * UserInterface/Test/TestHarness.js: * UserInterface/Views/CSSStyleDeclarationSection.js: * UserInterface/Views/ChartDetailsSectionRow.js: * UserInterface/Views/CodeMirrorAdditions.js: * UserInterface/Views/CodeMirrorFormatters.js: * UserInterface/Views/CodeMirrorRegexMode.js: * UserInterface/Views/ContentBrowserTabContentView.js: * UserInterface/Views/DataGrid.js: * UserInterface/Views/DataGridNode.js: * UserInterface/Views/FindBanner.js: * UserInterface/Views/GroupNavigationItem.js: * UserInterface/Views/HierarchicalPathNavigationItem.js: * UserInterface/Views/NetworkTableContentView.js: * UserInterface/Views/NetworkTimelineView.js: * UserInterface/Views/ObjectTreePropertyTreeElement.js: * UserInterface/Views/ObjectTreeView.js: * UserInterface/Views/RecordingContentView.js: * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js: * UserInterface/Views/ResourceCookiesContentView.js: * UserInterface/Views/ResourceDetailsSection.js: * UserInterface/Views/ResourceHeadersContentView.js: * UserInterface/Views/ResourceTimelineDataGridNode.js: * UserInterface/Views/SettingEditor.js: * UserInterface/Views/Sidebar.js: * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: * UserInterface/Views/Table.js: * UserInterface/Views/TextEditor.js: * UserInterface/Views/TimelineDataGridNode.js: * UserInterface/Views/TreeElement.js: * UserInterface/Views/TreeOutline.js: * UserInterface/Views/WebSocketDataGridNode.js: * UserInterface/Workers/Formatter/EsprimaFormatter.js: * UserInterface/Workers/Formatter/FormatterWorker.js: 2017-10-13 Nikita Vasilyev Web Inspector: Styles Redesign: hook up autocompletion to property names and values https://bugs.webkit.org/show_bug.cgi?id=177313 Reviewed by Joseph Pecoraro. - Arrow Right accept the current completion item and places the text caret after it. - Arrow Left hides the completion popover. - Arrow Up selects the previous completion item. - Arrow Down selects the next completion item. - Enter and Tab accept the current completion item and navigate to the next focusable item. - Escape hides the completion popover, if there is one. * UserInterface/Views/CompletionSuggestionsView.js: (WI.CompletionSuggestionsView): (WI.CompletionSuggestionsView.prototype._mouseDown): Add a preventBlur option so clicking on an completion item doesn't change the focus and doesn't cause "blur" event on the target text field. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .completion-hint): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached): Call detached on every SpreadsheetTextField to hide CompletionSuggestionsView once SpreadsheetCSSStyleDeclarationEditor is removed from the DOM. (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty): Remove index argument since it is no longer used. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.detached): (WI.SpreadsheetStyleProperty.prototype._remove): (WI.SpreadsheetStyleProperty.prototype._update): (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider): (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider): Add an extra parameter to SpreadsheetTextField to pass a completion data provider. * UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField): (WI.SpreadsheetTextField.prototype.get suggestionHint): (WI.SpreadsheetTextField.prototype.set suggestionHint): (WI.SpreadsheetTextField.prototype.startEditing): (WI.SpreadsheetTextField.prototype.stopEditing): (WI.SpreadsheetTextField.prototype.detached): (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion): (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion): (WI.SpreadsheetTextField.prototype._getPrefix): (WI.SpreadsheetTextField.prototype._handleBlur): (WI.SpreadsheetTextField.prototype._handleKeyDown): (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView): (WI.SpreadsheetTextField.prototype._handleInput): (WI.SpreadsheetTextField.prototype._updateCompletions): (WI.SpreadsheetTextField.prototype._getCaretRect): (WI.SpreadsheetTextField.prototype._getCompletionPrefix): (WI.SpreadsheetTextField.prototype._applyCompletionHint): (WI.SpreadsheetTextField.prototype._hideCompletions): Provide text completion based on the existing CompletionSuggestionsView when completionProvider is passed to SpreadsheetTextField. 2017-10-12 Joseph Pecoraro Web Inspector: Switch Clear navigation item back to the Trash icon (Console, Timelines, Network) https://bugs.webkit.org/show_bug.cgi?id=178244 Reviewed by Brian Burg. * UserInterface/Images/NavigationItemClear.svg: Removed. * UserInterface/Images/gtk/NavigationItemClear.svg: Removed. * UserInterface/Views/LogContentView.js: (WI.LogContentView): * UserInterface/Views/NetworkGridContentView.js: (WI.NetworkGridContentView): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): * UserInterface/Views/TimelineRecordingContentView.js: (WI.TimelineRecordingContentView): Many users found the new Clear icon confusing. Revert to the Trash icon. 2017-10-11 Ross Kirsling Web Inspector: Make 3D objects selectable in Layers visualization https://bugs.webkit.org/show_bug.cgi?id=178136 Reviewed by Devin Rousso. * UserInterface/Views/Layers3DContentView.js: (WI.Layers3DContentView): (WI.Layers3DContentView.prototype.initialLayout): (WI.Layers3DContentView.prototype._canvasMouseDown): (WI.Layers3DContentView.prototype._updateLayerGroupSelection): Implement selection of 3D layer objects. (WI.Layers3DContentView.prototype._addLayerGroup): Renamed from _addLayer. (WI.Layers3DContentView.prototype._updateLayerGroupPosition): (WI.Layers3DContentView.prototype._createLayerMesh): Refactor -- one group per layer (visible plane and composited outline), not groups by shape. (WI.Layers3DContentView.prototype.layout): (WI.Layers3DContentView.prototype._updateLayers): (WI.Layers3DContentView.prototype._clearLayers): Deleted. Don't destroy all 3D objects on every LayerTreeDidChange; make use of layerTreeMutations. (Not only a performance improvement, but also necessary to properly preserve highlighting.) (WI.Layers3DContentView.prototype.selectLayerById): Allow selection to be updated from the outside. * UserInterface/Views/LayerDetailsSidebarPanel.js: (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId): (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid): (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged): Allow selection to be updated from the outside. (WI.LayerDetailsSidebarPanel.prototype.inspect): (WI.LayerDetailsSidebarPanel.prototype._updateLayers): Renamed from _updateDisplayWithLayers. (WI.LayerDetailsSidebarPanel.prototype._updateDataGrid): (WI.LayerDetailsSidebarPanel.prototype._updateBottomBar): (WI.LayerDetailsSidebarPanel.prototype._contentForPopover): (WI.LayerDetailsSidebarPanel.prototype._dataGridNodeForLayer): Deleted. Cleanup. * UserInterface/Views/LayersTabContentView.js: (WI.LayersTabContentView): (WI.LayersTabContentView.prototype._detailsSidebarSelectedLayerChanged): (WI.LayersTabContentView.prototype._contentViewSelectedLayerChanged): Orchestrate communication of selection state between visualization and sidebar. 2017-10-11 Joseph Pecoraro Web Inspector: Avoid "100.00ms" vs "100.0ms" jitter in TimelineRuler labels https://bugs.webkit.org/show_bug.cgi?id=178143 Reviewed by Brian Burg. * UserInterface/Base/Utilities.js: Allow a small slop factor that wouldn't have changed the display value's significant figures anyways. This addresses cases where 100.0000000000001 were being treated slightly differently from 100.0. 2017-10-11 Joseph Pecoraro Web Inspector: Network Tab - Show initially loaded resources even if network info not logged https://bugs.webkit.org/show_bug.cgi?id=178098 Reviewed by Devin Rousso. * UserInterface/Models/Resource.js: (WI.Resource.prototype.hasResponse): Resources loaded by Page.getFrameTree have a response but no status code data. So include finished resources as having a resource. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype.closed): (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded): (WI.NetworkTableContentView.prototype._mainFrameDidChange): Listen for the first main frame change to perform an initial population. (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable): This path is not currently taken when table is null, but change the code so that if it is reached without the table it would behave gracefully. * UserInterface/Views/ResourceHeadersContentView.js: (WI.ResourceHeadersContentView.prototype._refreshSummarySection): On first open none of the resources have a statusCode. Show an emDash. 2017-10-10 Brian Burg Web Inspector: Quick Open: source mapped files are not shown as search results https://bugs.webkit.org/show_bug.cgi?id=178151 Reviewed by Joseph Pecoraro. * UserInterface/Views/OpenResourceDialog.js: (WI.OpenResourceDialog.prototype._addResource): Also consider matching the query string against SourceMapResources attached to a resource's source maps. 2017-10-10 Joseph Pecoraro Web Inspector: Network Tab - Set column initial widths to try allow waterfall column to expand more by default https://bugs.webkit.org/show_bug.cgi?id=178142 Reviewed by Brian Burg. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.initialLayout): Provide initial widths for many columns where the max could fit but we'd prefer a smaller than max initial width in wide cases. * UserInterface/Views/Table.js: (WI.Table.prototype._resizeColumnsAndFiller): When auto sizing all columns use the preferred initial widths. * UserInterface/Views/TableColumn.js: (WI.TableColumn.prototype.get preferredInitialWidth): Save the initial width. 2017-10-10 Ross Kirsling Web Inspector: Views should explicitly remove event listeners from managers/Frame https://bugs.webkit.org/show_bug.cgi?id=175951 Reviewed by Brian Burg. * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js: (WI.ApplicationCacheDetailsSidebarPanel.prototype.closed): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WI.DOMNodeDetailsSidebarPanel.prototype.closed): * UserInterface/Views/DebuggerDashboardView.js: (WI.DebuggerDashboardView.prototype.closed): * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype.closed): * UserInterface/Views/NetworkGridContentView.js: (WI.NetworkGridContentView.prototype.closed): * UserInterface/Views/ProbeDetailsSidebarPanel.js: (WI.ProbeDetailsSidebarPanel.prototype.closed): * UserInterface/Views/QuickConsole.js: (WI.QuickConsole.prototype.closed): * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WI.ScopeChainDetailsSidebarPanel.prototype.closed): * UserInterface/Views/TimelineOverview.js: (WI.TimelineOverview.prototype.closed): 2017-10-09 Joseph Pecoraro Web Inspector: Network Tab - Include remote address in the Headers view https://bugs.webkit.org/show_bug.cgi?id=178094 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/ResourceHeadersContentView.js: (WI.ResourceHeadersContentView.prototype._refreshSummarySection): (WI.ResourceHeadersContentView.prototype._resourceMetricsDidChange): 2017-10-09 Joseph Pecoraro Unreviewed, minified WebInspector opens blank. * UserInterface/Views/ResourceHeadersContentView.js: (WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection): Regression introduced in r223006. The minified build has a SyntaxError causing WebInspector top open blank. Add the missing semicolon. 2017-10-09 Joseph Pecoraro Web Inspector: Network Tab - Filter resources based on URL / Text Content https://bugs.webkit.org/show_bug.cgi?id=178071 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: New strings. * UserInterface/Views/FilterBar.css: (.filter-bar.active > input[type="search"]::-webkit-search-decoration): (.filter-bar.indicating-progress > input[type="search"]::-webkit-search-decoration): New icon for progress / active states. * UserInterface/Views/FilterBar.js: (WI.FilterBar.prototype.get inputField): (WI.FilterBar.prototype.get placeholder): (WI.FilterBar.prototype.set placeholder): (WI.FilterBar.prototype.get incremental): (WI.FilterBar.prototype.set incremental): (WI.FilterBar.prototype.get indicatingProgress): (WI.FilterBar.prototype.set indicatingProgress): (WI.FilterBar.prototype.get indicatingActive): (WI.FilterBar.prototype.set indicatingActive): (WI.FilterBar.prototype._handleFilterInputEvent): When incremental is set to false on the FilterBar still dispatch an event when the textfield clears. * UserInterface/Images/FilterFieldActiveGlyph.svg: Added. * UserInterface/Images/gtk/FilterFieldActiveGlyph.svg: Added. New blue icon for active state. * UserInterface/Controllers/FrameResourceManager.js: (WI.FrameResourceManager.prototype.resourceForIdentifier): Accessor for arbitrary resource. * UserInterface/Views/NetworkTableContentView.css: (.content-view.network .navigation-bar .filter-bar): (.content-view.network .warning-banner): (body[dir=ltr] .content-view.network .warning-banner): (body[dir=rtl] .content-view.network .warning-banner): (.content-view.network .warning-banner > a): Warning banner when the filter produces no results. This matches the warning in the Debugger tab when breakpoints are disabled. * UserInterface/Views/ScopeBar.js: (WI.ScopeBar.prototype.resetToDefault): Provide a way to easily reset a scope bar to the default item. * UserInterface/Views/RadioButtonNavigationItem.css: (.navigation-bar .item.radio.button.text-only:active): * UserInterface/Views/ScopeBar.css: (.scope-bar > li:active): Cleanup some styles that should be using a variable. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype.get filterNavigationItems): (WI.NetworkTableContentView.prototype.layout): (WI.NetworkTableContentView.prototype._processPendingEntries): (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFinishedResource): (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFailedResource): (WI.NetworkTableContentView.prototype._updateTextFilterActiveIndicator): (WI.NetworkTableContentView.prototype._updateEmptyFilterResultsWarning): (WI.NetworkTableContentView.prototype._showEmptyFilterResultsWarning): (WI.NetworkTableContentView.prototype._hideEmptyFilterResultsWarning): (WI.NetworkTableContentView.prototype._positionEmptyFilterMessage): (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish): (WI.NetworkTableContentView.prototype._resourceLoadingDidFail): (WI.NetworkTableContentView.prototype._networkTimelineRecordAdded): (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable): (WI.NetworkTableContentView.prototype._hasTypeFilter): (WI.NetworkTableContentView.prototype._hasTextFilter): (WI.NetworkTableContentView.prototype._hasActiveFilter): (WI.NetworkTableContentView.prototype._passTypeFilter): (WI.NetworkTableContentView.prototype._passTextFilter): (WI.NetworkTableContentView.prototype._passFilter): (WI.NetworkTableContentView.prototype._updateFilteredEntries): (WI.NetworkTableContentView.prototype._resetFilters): (WI.NetworkTableContentView.prototype._textFilterDidChange): (WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth): There are now two filters. - FilterBar - Filters URL and Full Text Content - ScopeBar - Filters Resource Type The text content filter is asynchronous. We reuse the existing Search functionality when filtering on text. We need to defer text content filtering until the resource finishes loading. 2017-10-09 Joseph Pecoraro Web Inspector: Network Tab: Row wrapping (waterfall displaying behind next row's name) https://bugs.webkit.org/show_bug.cgi?id=178015 Reviewed by Brian Burg. * UserInterface/Views/Table.css: (.table > .header): (.table > .data-container > .data-list > li): Disallow wrapping. 2017-10-09 Joseph Pecoraro Web Inspector: Network Tab - Cookies Detail View https://bugs.webkit.org/show_bug.cgi?id=177988 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Test.html: New strings and resources. * UserInterface/Models/Cookie.js: Added. (WI.Cookie): (WI.Cookie.parseCookieRequestHeader): (WI.Cookie.parseSetCookieResponseHeader): Encapsulation for Cookie attributes. * UserInterface/Models/Resource.js: (WI.Resource.prototype.get requestCookies): (WI.Resource.prototype.get responseCookies): (WI.Resource.prototype.updateForRedirectResponse): (WI.Resource.prototype.updateForResponse): (WI.Resource.prototype.updateWithMetrics): New computed accessors for requestCookies and responseCookies. * UserInterface/Views/NetworkResourceDetailView.js: (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem): Show the new Cookie View. * UserInterface/Views/NetworkTableContentView.css: (.content-view.network .network-table .icon): (.network-table li:not(.filler) .cell.name): (.network-table .cache-type): (.network-table .error): (body[dir=ltr] .network-table .cell.name > .status): (body[dir=rtl] .network-table .cell.name > .status): (.network-table .cell.name > .status .indeterminate-progress-spinner): (.showing-detail .network-table .cell:not(.name)): (.showing-detail .network-table .resizer:not(:first-of-type)): (.network-table :not(.header) .cell:first-of-type): Rework these styles to be specific to the .network-table. * UserInterface/Views/Table.css: (.table :not(.header) .cell:first-of-type): Deleted. Move this to the network table styles, it shouldn't apply to all tables. * UserInterface/Views/ResourceCookiesContentView.css: (.resource-cookies > section > .details.has-table): (.resource-cookies .table): (.resource-cookies .table > .header): Styles for Cookies view and table. * UserInterface/Views/ResourceCookiesContentView.js: Added. (WI.ResourceCookiesContentView): (WI.ResourceCookiesContentView.prototype.tableNumberOfRows): (WI.ResourceCookiesContentView.prototype.tableSortChanged): (WI.ResourceCookiesContentView.prototype.tablePopulateCell): (WI.ResourceCookiesContentView.prototype.initialLayout): (WI.ResourceCookiesContentView.prototype._incompleteSectionWithMessage): (WI.ResourceCookiesContentView.prototype._incompleteSectionWithLoadingIndicator): (WI.ResourceCookiesContentView.prototype._dataSourceForTable): (WI.ResourceCookiesContentView.prototype._generateSortComparator): (WI.ResourceCookiesContentView.prototype._refreshRequestCookiesSection): (WI.ResourceCookiesContentView.prototype._refreshResponseCookiesSection): (WI.ResourceCookiesContentView.prototype._sizeForTable): (WI.ResourceCookiesContentView.prototype._resourceRequestHeadersDidChange): (WI.ResourceCookiesContentView.prototype._resourceResponseReceived): Tables for Request and Response cookies. They are simliar with slightly different columns. Handle simple display and sorting for the tables. * UserInterface/Views/ResourceHeadersContentView.js: (WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection): Break out Set-Cookie headers as multiple headers. THey should never be combined. * UserInterface/Views/Table.js: (WI.Table.prototype.showColumn): (WI.Table.prototype.hideColumn): (WI.Table.prototype._handleHeaderContextMenu): * UserInterface/Views/TableColumn.js: (WI.TableColumn.prototype.get hideable): (WI.TableColumn.prototype.set hidden): (WI.TableColumn): (WI.TableColumn.prototype.setHidden): Deleted. Make it so some columns can not be hidden. For example the "value" column in the Cookie tables. 2017-10-09 Joseph Pecoraro Web Inspector: Network Tab - Search Headers Detail View https://bugs.webkit.org/show_bug.cgi?id=177981 Reviewed by Brian Burg. * UserInterface/Base/Main.js: * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype.performSearch): Rename "Dom" to "DOM" in utility function. * UserInterface/Views/ResourceHeadersContentView.css: (.resource-headers.showing-find-banner .search-highlight): Search highlight styles. * UserInterface/Views/ResourceHeadersContentView.js: (WI.ResourceHeadersContentView.prototype.get supportsSearch): (WI.ResourceHeadersContentView.prototype.get numberOfSearchResults): (WI.ResourceHeadersContentView.prototype.get hasPerformedSearch): (WI.ResourceHeadersContentView.prototype.set automaticallyRevealFirstSearchResult): (WI.ResourceHeadersContentView.prototype.performSearch): (WI.ResourceHeadersContentView.prototype.searchCleared): (WI.ResourceHeadersContentView.prototype.revealPreviousSearchResult): (WI.ResourceHeadersContentView.prototype.revealNextSearchResult): (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs): (WI.ResourceHeadersContentView.prototype._revealSearchResult): Implement ContentView search behavior. 2017-10-08 Devin Rousso Web Inspector: add autocompletion for min/max within a CSS calc https://bugs.webkit.org/show_bug.cgi?id=178068 Reviewed by Joseph Pecoraro. * UserInterface/Models/CSSKeywordCompletions.js: (WI.CSSKeywordCompletions.forFunction): 2017-10-06 Matt Baker Web Inspector: Add Canvas tab and CanvasOverviewContentView https://bugs.webkit.org/show_bug.cgi?id=177604 Reviewed by Devin Rousso. This patch adds experimental feature support for the Canvas tab. Initially the tab provides only an overview of the canvases in the page, and will exist side-by-side with the existing experimental Canvas UI. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WI.contentLoaded): * UserInterface/Base/Setting.js: * UserInterface/Images/Canvas.svg: Added. * UserInterface/Images/CanvasOverview.svg: Added. * UserInterface/Main.html: Add new art and canvas UI classes. * UserInterface/Models/Canvas.js: (WI.Canvas.requestNode): (WI.Canvas.prototype.requestContent): (WI.Canvas.prototype.requestCSSCanvasClientNodes): (WI.Canvas.prototype.requestSize.calculateSize.getAttributeValue): (WI.Canvas.prototype.requestSize.calculateSize): (WI.Canvas.prototype.requestSize.getPropertyValue): (WI.Canvas.prototype.requestSize): Use promises to retrieve canvas data asynchronously. * UserInterface/Models/CollectionTypes.js: Added. (WI.CanvasCollection): New location for concrete collection types. Having a class to type check makes using a collection as a represented object a bit simpler. * UserInterface/Views/CanvasContentView.css: (.content-view.canvas:not(.tab)): (.content-view.canvas:not(.tab) > .preview): (.content-view.canvas:not(.tab) > .preview > img): (.content-view.canvas:not(.tab) > :matches(header, footer)): (.content-view.canvas): Deleted. (.content-view.canvas > .preview): Deleted. (.content-view.canvas > .preview > img): Deleted. During the transition to the new Canvas tab, CanvasContentView needs to support being shown as a full-size content view, and as an item in a CollectionContentView. Hide header and footer elements by default. * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView): (WI.CanvasContentView.prototype.refresh): (WI.CanvasContentView.prototype.initialLayout): (WI.CanvasContentView.prototype.layout): (WI.CanvasContentView.prototype.shown): (WI.CanvasContentView.prototype.attached): (WI.CanvasContentView.prototype.detached): (WI.CanvasContentView.prototype._showError): (WI.CanvasContentView.prototype._refreshPixelSize): (WI.CanvasContentView.prototype._showGridButtonClicked): (WI.CanvasContentView.prototype._updateImageGrid): (WI.CanvasContentView.prototype._updateMemoryCost): (WI.CanvasContentView.prototype._updatePixelSize): (WI.CanvasContentView.prototype._updateRecordNavigationItem): (WI.CanvasContentView.prototype.hidden): Deleted. (WI.CanvasContentView.prototype.closed): Deleted. (WI.CanvasContentView.prototype._showPreview): Deleted. Added new UI for display in the Canvas overview. These elements are always created, but only appear when the canvas is viewed as a "card". Canvas previews are no longer shown as soon as they are available from the backend. Instead, once the canvas content is ready a layout is scheduled. This guarantees that refreshing all canvases at once causes no flicker, and introduces no perceptible delay. Finally, the "Cancel recording" tooltip has been renamed "Stop recording", to match the behavior of the command. * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WI.CanvasDetailsSidebarPanel.prototype._refreshSourceSection.this._canvas.requestNode.): Deleted. Canvas.prototype.requestNode now returns a promise. * UserInterface/Views/CanvasOverviewContentView.css: Added. (.content-view.canvas-overview): (.content-view.canvas-overview .content-view.canvas): (.content-view.canvas-overview .content-view.canvas.selected:not(.is-recording)): (.content-view.canvas-overview .content-view.canvas > :matches(header, footer)): (.content-view.canvas-overview .content-view.canvas > header): (.content-view.canvas-overview .content-view.canvas.is-recording > header): (.content-view.canvas-overview .content-view.canvas > header > .titles,): (.content-view.canvas-overview .content-view.canvas > header > .titles > .title): (.content-view.canvas-overview .content-view.canvas > header > .titles > .subtitle,): (.content-view.canvas-overview .content-view.canvas > header .subtitle::before): (.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .title): (.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .subtitle): (.content-view.canvas-overview .content-view.canvas.is-recording > header > .navigation-bar > .item): (.content-view.canvas-overview .content-view.canvas > header > .navigation-bar): (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording) > header > .navigation-bar): (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop.disabled): (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop): (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop:not(.disabled):hover): (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop:not(.disabled):active): (.content-view.canvas-overview .content-view.canvas > .preview): (.content-view.canvas-overview .content-view.canvas > .preview > img): (.content-view.canvas-overview .content-view.canvas > .preview > .message-text-view): (.content-view.canvas-overview .content-view.canvas > footer): (.content-view.canvas-overview .content-view.canvas > footer .memory-cost): Add header, navigation bar, and footer styles to CanvasContentView when it is being shown as an item in a CollectionContentView. * UserInterface/Views/CanvasOverviewContentView.js: Added. (WI.CanvasOverviewContentView): (WI.CanvasOverviewContentView.prototype.get navigationItems): (WI.CanvasOverviewContentView.prototype.get selectionPathComponents): (WI.CanvasOverviewContentView.prototype.hidden): (WI.CanvasOverviewContentView.prototype.contentViewAdded): (WI.CanvasOverviewContentView.prototype.contentViewRemoved): (WI.CanvasOverviewContentView.prototype.attached): (WI.CanvasOverviewContentView.prototype.detached): (WI.CanvasOverviewContentView.prototype._refreshPreviews): (WI.CanvasOverviewContentView.prototype._selectedPathComponentChanged): (WI.CanvasOverviewContentView.prototype._showGridButtonClicked): (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange.createCanvasPathComponent): (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange): (WI.CanvasOverviewContentView.prototype._updateNavigationItems): (WI.CanvasOverviewContentView.prototype._updateShowImageGrid): (WI.CanvasOverviewContentView.prototype._contentViewMouseEnter): (WI.CanvasOverviewContentView.prototype._contentViewMouseLeave): The overview extends CollectionContentView, adding buttons for global canvas actions (refresh all and show/hide grid for all), and maintains a non-visible outline of CanvasTreeElements to facilitate display of the hierarchical path in the navigation bar. * UserInterface/Views/CanvasTabContentView.css: Added. (.content-view.tab.canvas .navigation-bar > .item > .hierarchical-path-component > .icon): (.content-view.tab.canvas .navigation-bar > .item > .canvas-overview > .icon): (.content-view.tab.canvas .navigation-bar > .item .canvas .icon): * UserInterface/Views/CanvasTabContentView.js: Added. (WI.CanvasTabContentView): (WI.CanvasTabContentView.tabInfo): (WI.CanvasTabContentView.isTabAllowed): (WI.CanvasTabContentView.prototype.get type): (WI.CanvasTabContentView.prototype.get supportsSplitContentBrowser): (WI.CanvasTabContentView.prototype.canShowRepresentedObject): (WI.CanvasTabContentView.prototype.shown): (WI.CanvasTabContentView.prototype.treeElementForRepresentedObject): (WI.CanvasTabContentView.prototype.restoreFromCookie): (WI.CanvasTabContentView.prototype.saveStateToCookie): (WI.CanvasTabContentView.prototype.attached): (WI.CanvasTabContentView.prototype.detached): (WI.CanvasTabContentView.prototype._canvasAdded): (WI.CanvasTabContentView.prototype._canvasRemoved): (WI.CanvasTabContentView.prototype._overviewPathComponentClicked): (WI.CanvasTabContentView.prototype._mainResourceDidChange): * UserInterface/Views/CollectionContentView.js: (WI.CollectionContentView): (WI.CollectionContentView.prototype.setSelectedItem): (WI.CollectionContentView.prototype.addContentViewForItem): (WI.CollectionContentView.prototype.removeContentViewForItem): (WI.CollectionContentView.prototype.initialLayout): (WI.CollectionContentView.prototype._showContentPlaceholder): (WI.CollectionContentView.prototype._hideContentPlaceholder): Placeholder content should be created lazily, and shown after a slight delay to give represented objects a chance to load. Make sure to call the shown or hidden method after adding or removing a content view. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): * UserInterface/Views/Variables.css: (:root): (body.window-inactive *): * UserInterface/Views/View.js: (WI.View.fromElement): 2017-10-06 Joseph Pecoraro Web Inspector: Network Tab - Headers Detail View https://bugs.webkit.org/show_bug.cgi?id=177896 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New resources and strings. * UserInterface/Base/URLUtilities.js: (parseURL): (WI.h2Authority): (WI.h2Path): Utility methods to get the :authority and :path pseudo-headers from a URL. This required adding user info (user:pass@) support to URL parsing. * UserInterface/Views/NetworkTabContentView.js: (WI.NetworkTabContentView): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.get navigationItems): (WI.NetworkTableContentView.prototype.get filterNavigationItems): Move the NetworkTab's filter controls to the left. Since these are not dynamic just vend them from the TableContentView and place them in the navigation bar. * UserInterface/Models/Resource.js: (WI.Resource.prototype.updateWithMetrics): New event whenever metrics change. This is the first event that will allow a client to react to a resource.protocol change. * UserInterface/Views/NetworkResourceDetailView.css: (.content-view.resource-details): Base styles for the sub detail views. * UserInterface/Views/NetworkResourceDetailView.js: (WI.NetworkResourceDetailView): (WI.NetworkResourceDetailView.prototype.headersContentViewGoToRequestData): (WI.NetworkResourceDetailView.prototype.initialLayout): (WI.NetworkResourceDetailView.prototype._showPreferredContentView): (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem): Create a Header view and provide a way to switch to a particular view. This wil be useful to jump from the Header's Request Data directly to the Preview's Request ContentView. * UserInterface/Views/ResourceDetailsSection.css: (.resource-details > section): (.resource-details > section > .title): (.resource-details > section > .details): (.resource-details > section > .details > p): (.resource-details > section.incomplete > .details): * UserInterface/Views/ResourceDetailsSection.js: (WI.ResourceDetailsSection): (WI.ResourceDetailsSection.prototype.get element): (WI.ResourceDetailsSection.prototype.get titleElement): (WI.ResourceDetailsSection.prototype.get detailsElement): (WI.ResourceDetailsSection.prototype.toggleIncomplete): (WI.ResourceDetailsSection.prototype.toggleError): Simple sections with a title and details div with a border. It may be common to have an incomplete load / error so this provides some APIs and styles for sections marked incomplete or with errors. * UserInterface/Views/ResourceHeadersContentView.css: (.resource-headers > section > .details): (.resource-headers > section.headers > .details): (.resource-headers > section.error > .details): (.resource-headers > section.error .key): Style the left border different colors for different sections or cases. (.resource-headers .details): (.resource-headers .details .pair): (.resource-headers .details .key): (.resource-headers .value): (.resource-headers .header > .key): (.resource-headers .h1-status > .key): (.resource-headers .h2-pseudo-header > .key): Wrapped text for key/value pairs and different colors for different sections or cases. (.resource-headers .go-to-arrow): Go-to arrow styles for a request data section. * UserInterface/Views/ResourceHeadersContentView.js: Added. (WI.ResourceHeadersContentView): (WI.ResourceHeadersContentView.prototype.initialLayout): (WI.ResourceHeadersContentView.prototype.layout): (WI.ResourceHeadersContentView.prototype._incompleteSectionWithMessage): (WI.ResourceHeadersContentView.prototype._incompleteSectionWithLoadingIndicator): (WI.ResourceHeadersContentView.prototype._appendKeyValuePair): (WI.ResourceHeadersContentView.prototype._responseSourceDisplayString): (WI.ResourceHeadersContentView.prototype._refreshSummarySection): (WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection): (WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection): (WI.ResourceHeadersContentView.prototype._refreshQueryStringSection): (WI.ResourceHeadersContentView.prototype._refreshRequestDataSection): (WI.ResourceHeadersContentView.prototype._resourceMetricsDidChange): (WI.ResourceHeadersContentView.prototype._resourceRequestHeadersDidChange): (WI.ResourceHeadersContentView.prototype._resourceResponseReceived): (WI.ResourceHeadersContentView.prototype._goToRequestDataClicked): Summary, Request, Response, Query String, and Request Data sections. The sections refresh as data becomes available. * UserInterface/Views/Table.css: (.table): These variables are already defined globally. * UserInterface/Views/Variables.css: (:root): New variables for the colors we use. They closely match, and are sometimes identical to ones used in Timelines / Memory views. 2017-10-06 Joseph Pecoraro Web Inspector: Network Tab - Make selection in the table more reliable (mousedown instead of click) https://bugs.webkit.org/show_bug.cgi?id=177990 Reviewed by Brian Burg. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.tableCellClicked): Deleted. * UserInterface/Views/Table.js: (WI.Table.prototype._handleMouseDown): (WI.Table.prototype._handleClick): Deleted. Switch to mousedown. 2017-10-06 Joseph Pecoraro Web Inspector: Improve setting the default / initial sort of a Table https://bugs.webkit.org/show_bug.cgi?id=177989 Reviewed by Brian Burg. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.initialLayout): Set the default / initial sort. * UserInterface/Views/Table.js: (WI.Table): (WI.Table.prototype.set sortOrder): (WI.Table.prototype.set sortColumnIdentifier): During setup we should always update header views. 2017-10-05 Nikita Vasilyev Web Inspector: Styles Redesign: Add support for keyboard navigation (Tab, Shift-Tab, Enter, Esc) https://bugs.webkit.org/show_bug.cgi?id=177711 Reviewed by Joseph Pecoraro. Enter, Tab, Shift-Tab should commit changes. Escape should discard changes. Tab and Enter should navigate forward (focus on the next field). Shift-Tab should navigate backward (focus on the previous field). Esc should not change the focus. When navigating forward from: - Selector: Focus on the first property name. If it doesn’t exist, create a blank property. - Property name: - If property name is blank, discard the property and focus on the next editable field (property name or selector of the next rule). - If property is not blank, focus on the value. - Property value: - If the last value in the rule, create a blank property and focus on its name. - If not the last value in the rule, focus on the next editable field (property name or selector of the next rule). When navigating backward from: - Selector: create a blank property on the previous editable rule and focus on its name. - Property name: - Focus on the rule's selector. - Property value: - Focus on the property name. * UserInterface/Base/Utilities.js: (Event.prototype.stop): * UserInterface/Main.html: Add new files. Keep one class per file. * UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype.remove): (WI.CSSProperty.prototype.set name): (WI.CSSProperty.prototype.set rawValue): (WI.CSSProperty.prototype.get editable): (WI.CSSProperty.prototype._updateStyleText): (WI.CSSProperty.prototype._updateOwnerStyleText): Update indices and ranges of properties following the edited one to prevent data corruption. * UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration.prototype.get selectorEditable): (WI.CSSStyleDeclaration.prototype.set text): (WI.CSSStyleDeclaration.prototype.newBlankProperty): (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter): (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex): Implement adding new blank properties. * UserInterface/Models/TextRange.js: (WI.TextRange.prototype.cloneAndModify): Add an assert to catch negative number errors. (WI.TextRange.prototype.collapseToEnd): Add a utility function akin Selection.prototype.collapseToEnd. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WI.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey): (WI.CSSStyleDeclarationTextEditor.prototype._handleTabKey): (WI.CSSStyleDeclarationTextEditor.prototype._formattedContent): Move PrefixWhitespace from a view to a model (WI.CSSStyleDeclaration.PrefixWhitespace), since it's already used in the model. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor :matches(.name, .value).editing): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get _propertiesToRender): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._isFocused): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged): Give SpreadsheetCSSStyleDeclarationEditor a delegate so that it can move focus to a CSS selector, or previous and next CSS rules. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get propertiesEditor): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get editable): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorStartEditingRuleSelector): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationEditorStartEditingAdjacentRule): Give SpreadsheetCSSStyleDeclarationSection a delegate so that it can move focus to previous and next CSS rules. * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingNextRule): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingPreviousRule): (WI.SpreadsheetRulesStyleDetailsPanel): Implement focusing on the next and previous CSS rules. * UserInterface/Views/SpreadsheetSelectorField.js: Added. (WI.SpreadsheetSelectorField): (WI.SpreadsheetSelectorField.prototype.get editing): (WI.SpreadsheetSelectorField.prototype.startEditing): (WI.SpreadsheetSelectorField.prototype.stopEditing): (WI.SpreadsheetSelectorField.prototype._selectText): (WI.SpreadsheetSelectorField.prototype._handleClick): (WI.SpreadsheetSelectorField.prototype._handleFocus): (WI.SpreadsheetSelectorField.prototype._handleBlur): (WI.SpreadsheetSelectorField.prototype._handleKeyDown): Move SpreadsheetSelectorField into its own file. * UserInterface/Views/SpreadsheetStyleProperty.js: Added. (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.get element): (WI.SpreadsheetStyleProperty.prototype.get nameTextField): (WI.SpreadsheetStyleProperty.prototype.get valueTextField): (WI.SpreadsheetStyleProperty.prototype._remove): (WI.SpreadsheetStyleProperty.prototype._update): (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidChange): (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit): (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur): (WI.SpreadsheetStyleProperty.prototype._handleNameChange): (WI.SpreadsheetStyleProperty.prototype._handleValueChange): Move SpreadsheetStyleProperty into its own file. * UserInterface/Views/SpreadsheetTextField.js: Added. (WI.SpreadsheetTextField): (WI.SpreadsheetTextField.prototype.get element): (WI.SpreadsheetTextField.prototype.get editing): (WI.SpreadsheetTextField.prototype.get value): (WI.SpreadsheetTextField.prototype.set value): (WI.SpreadsheetTextField.prototype.startEditing): (WI.SpreadsheetTextField.prototype.stopEditing): (WI.SpreadsheetTextField.prototype._selectText): (WI.SpreadsheetTextField.prototype._discardChange): (WI.SpreadsheetTextField.prototype._handleFocus): (WI.SpreadsheetTextField.prototype._handleBlur): (WI.SpreadsheetTextField.prototype._handleKeyDown): (WI.SpreadsheetTextField.prototype._handleInput): Introduce SpreadsheetTextField that is used for editing CSS property names and values. 2017-10-05 Joseph Pecoraro REGRESSION(r222868): Web Inspector: Timeline ScopeBar Navigation Bar items too large https://bugs.webkit.org/show_bug.cgi?id=177979 Reviewed by Matt Baker. * UserInterface/Views/ButtonNavigationItem.css: (.navigation-bar .item.button.text-only): Make the height of text-only items the size of the text, not 100%. 2017-10-04 Joseph Pecoraro Web Inspector: When scrolled Network Table reduces the number of rows it may appear as blank https://bugs.webkit.org/show_bug.cgi?id=177914 Reviewed by Matt Baker. * UserInterface/Views/Table.js: (WI.Table.prototype._updateVisibleRows): (WI.Table.prototype._updateFillerRowWithNewHeight): Reduce the scrollTop when the table was scrolled and was then reloaded with a smaller number of rows. This can happen in two ways. Either the number of rows was reduced so much that we enter non-scrollable mode with a non-zero filler row. This can always reset the scrollTop to 0. Or when a large number of rows is reduced to a smaller number than our current scrollTop but still more than fit on one screen. In that case we can reduce the scrollTop to whatever would scroll the table to its max position. 2017-10-04 Matt Baker Web Inspector: Improve CanvasManager recording events https://bugs.webkit.org/show_bug.cgi?id=177762 Reviewed by Devin Rousso. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.startRecording): (WI.CanvasManager.prototype.stopRecording): (WI.CanvasManager.prototype.recordingFinished): Replace the RecordingFinished event with a pair of events. RecordingStarted is sent when CanvasAgent.startRecording succeeds. RecordingStopped is sent when a recordingFinished event is received from the backend, or when a call to CanvasAgent.stopRecording fails. * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView.prototype.initialLayout): (WI.CanvasContentView.prototype._toggleRecording): (WI.CanvasContentView.prototype._recordingStarted): (WI.CanvasContentView.prototype._recordingFinished): Deleted. Update recording status when CanvasManager fires recording events, instead of immediately after clicking the record button. 2017-10-04 Joseph Pecoraro Web Inspector: Detail Views for resources in Network Tab https://bugs.webkit.org/show_bug.cgi?id=177553 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New strings and resources. * UserInterface/Base/Main.js: (WI._focusedContentBrowser): Detect nested content browsers instead of only top level tab content browsers. * UserInterface/Base/Setting.js: Add a new global setting for which Network Detail view is preferred. * UserInterface/Views/ContentBrowser.css: (.content-browser > .navigation-bar .item): (.content-browser > .navigation-bar > .item): Deleted. Generalize a navigation item style so it works on items nested inside a group. * UserInterface/Views/ContentBrowser.js: (WI.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): (WI.ContentBrowser.prototype._updateContentViewNavigationItems): (WI.ContentBrowser.prototype._removeAllNavigationItems): Give ContentBrowser a way to group all ContentView specific navigation items inside a GroupNavigationItem. This lets the client decide what to do with those navigation items, instead of default behavior in the navigation bar. * UserInterface/Views/ContentViewContainer.js: (WI.ContentViewContainer.prototype.showContentView): Avoid a flash when showContentView is called with the current content view. * UserInterface/Views/FlexibleSpaceNavigationItem.css: (:matches(.navigation-bar, .toolbar) .item.flexible-space.align-start > .item): (:matches(.navigation-bar, .toolbar) .item.flexible-space.align-end > .item): When containing a navigation item decide where you want the items to align to. * UserInterface/Views/FlexibleSpaceNavigationItem.js: (WI.FlexibleSpaceNavigationItem): (WI.FlexibleSpaceNavigationItem.prototype.updateLayout): Provide an option to embed a NavigationItem within a FlexibleSpace. Its behavior right now is rather simple. If the embedded Item fits in the current available space it is shown. If it doesn't fit, it is hidden and we have just a flexible space. This is used in the network detail view's navigation bar to keep the main navigation items centered while allowing for buttons to show up on the side without affecting the centering. * UserInterface/Views/NavigationBar.js: (WI.NavigationBar): (WI.NavigationBar.prototype._mouseDown): (WI.NavigationBar.prototype._mouseUp): Simplify event registration. This would also help avoid cases where we might have registered multiple mousedown handlers. * UserInterface/Views/GroupNavigationItem.js: (WI.GroupNavigationItem): (WI.GroupNavigationItem.prototype.get navigationItems): (WI.GroupNavigationItem.prototype.set navigationItems): (WI.GroupNavigationItem.prototype.get width): (WI.GroupNavigationItem.prototype.get minimumWidth): (WI.GroupNavigationItem.prototype._updateItems): * UserInterface/Views/HierarchicalPathNavigationItem.js: (WI.HierarchicalPathNavigationItem): (WI.HierarchicalPathNavigationItem.prototype.set components): (WI.HierarchicalPathNavigationItem.prototype.updateLayout): (WI.HierarchicalPathNavigationItem.prototype._updateComponentsIfNeeded): Defer DOM modifications until layout for NavigationItems container classes that change items/components dynamically. This reduces UI flashing in the bar when items/components change by coalescing all DOM updates at the same time; when the NavigationBar does its next layout. * UserInterface/Views/NetworkResourceDetailView.css: (.network-resource-detail): (.network-resource-detail .navigation-bar): (.network-resource-detail .item.close > .glyph): (.network-resource-detail .item.close > .glyph:hover): (.network-resource-detail .item.close > .glyph:active): (.network .network-resource-detail .navigation-bar .item.radio.button.text-only): (.network .network-resource-detail .navigation-bar .item.radio.button.text-only.selected): (.network-resource-detail > .content-browser): Styles for the detail view's navigation bar. * UserInterface/Views/NetworkResourceDetailView.js: Added. (WI.NetworkResourceDetailView): (WI.NetworkResourceDetailView.prototype.get resource): (WI.NetworkResourceDetailView.prototype.shown): (WI.NetworkResourceDetailView.prototype.hidden): (WI.NetworkResourceDetailView.prototype.dispose): (WI.NetworkResourceDetailView.prototype.initialLayout): (WI.NetworkResourceDetailView.prototype._showPreferredContentView): (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem): (WI.NetworkResourceDetailView.prototype._navigationItemSelected): (WI.NetworkResourceDetailView.prototype._handleCloseButton): ContentBrowser with customized navigation bar. This container has a fixed list of ContentViews all relating to the Resource. The detail view has a single delegate method for its close button. Since it maintains a ContentBrowser it needs to expose shown/hidden/dispose logic to ensure proper ContentView lifecycle events. * UserInterface/Views/NetworkTableContentView.css: (.showing-detail .table .cell:not(.name)): (.showing-detail .table .resizer:not(:first-of-type)): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype.shown): (WI.NetworkTableContentView.prototype.hidden): (WI.NetworkTableContentView.prototype.closed): (WI.NetworkTableContentView.prototype.reset): (WI.NetworkTableContentView.prototype.networkResourceDetailViewClose): (WI.NetworkTableContentView.prototype.tableSortChanged): (WI.NetworkTableContentView.prototype.tableCellClicked): (WI.NetworkTableContentView.prototype.tableSelectedRowChanged): (WI.NetworkTableContentView.prototype.layout): (WI.NetworkTableContentView.prototype._hideResourceDetailView): (WI.NetworkTableContentView.prototype._showResourceDetailView): (WI.NetworkTableContentView.prototype._positionDetailView): (WI.NetworkTableContentView.prototype._updateFilteredEntries): (WI.NetworkTableContentView.prototype._typeFilterScopeBarSelectionChanged): (WI.NetworkTableContentView.prototype._restoreSelectedRow): (WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth): Behavior for selecting a row and showing / hiding the detail view. The detail view is positioned beside the Network Table's "name" column and resizes when that column resizes. * UserInterface/Views/Resizer.css: (.resizer): * UserInterface/Views/Table.css: (.table > .resizers): * UserInterface/Views/Table.js: (WI.Table): (WI.Table.prototype.get scrollContainer): (WI.Table.prototype._positionResizerElements): To let clients customize the table a bit, put resizers into their own container and expose the scroll container. * UserInterface/Views/Variables.css: (:root): Add a new button hover color, slightly lighter than the existing button active color. 2017-10-04 Joseph Pecoraro Web Inspector: Fix Beacon and Ping folderization issues https://bugs.webkit.org/show_bug.cgi?id=177885 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.shortDisplayNameForResourceType): Use common capitalized UIString "Ping". It gets lowercased later. * UserInterface/Models/ResourceCollection.js: Add missing verifier. 2017-10-04 Matt Baker Web Inspector: Remove unused `representedObject` parameter from GeneralTreeElementPathComponent constructor https://bugs.webkit.org/show_bug.cgi?id=177561 Reviewed by Joseph Pecoraro. * UserInterface/Views/GeneralTreeElementPathComponent.js: (WI.GeneralTreeElementPathComponent): (WI.GeneralTreeElementPathComponent.prototype.get generalTreeElement): (WI.GeneralTreeElementPathComponent.prototype.get previousSibling): (WI.GeneralTreeElementPathComponent.prototype.get nextSibling): 2017-10-04 Joseph Pecoraro Web Inspector: After enabling the new Network Tab in experimental settings, the network tab disappears https://bugs.webkit.org/show_bug.cgi?id=177774 Reviewed by Devin Rousso. * UserInterface/Views/SettingsTabContentView.js: When enabling the new network tab, ensure it gets added to the list of open tabs. Place it where the old network tab was so the UI is as consistent as possible. 2017-10-03 Ross Kirsling Web Inspector: Layers tab sidebar's DOM highlight should be by row hover, not row selection https://bugs.webkit.org/show_bug.cgi?id=177690 Reviewed by Devin Rousso. * UserInterface/Views/LayerDetailsSidebarPanel.js: (WI.LayerDetailsSidebarPanel): (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid): (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged): (WI.LayerDetailsSidebarPanel.prototype._dataGridMouseMove): (WI.LayerDetailsSidebarPanel.prototype._dataGridMouseLeave): (WI.LayerDetailsSidebarPanel.prototype._hideDOMNodeHighlight): (WI.LayerDetailsSidebarPanel.prototype._dataGridFocused): Deleted. (WI.LayerDetailsSidebarPanel.prototype._dataGridBlurred): Deleted. (WI.LayerDetailsSidebarPanel.prototype._highlightSelectedNode): Deleted. 2017-10-03 Nikita Vasilyev Web Inspector: Styles Redesign: support editing of rule selectors https://bugs.webkit.org/show_bug.cgi?id=177012 Reviewed by Matt Baker. Clicking or focusing (by tabbing from another field) on a CSS selector should select the text and make the selector field editable. Keyboard behavior while editing: - Enter should commit changes. - Escape should discard changes. - Tab should commit changes and navigate to the first property name. - Shift-Tab should commit changes and navigate to the last rule's property value, if there's one. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetStyleProperty.prototype._update): Add tabIndex so the keyboard navigation (Tab & Shift-Tab) to and from selectors works as expected. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: (.spreadsheet-css-declaration .selector:focus,): (.spreadsheet-css-declaration .selector.spreadsheet-selector-field): (.spreadsheet-css-declaration .selector.spreadsheet-selector-field.editing): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get selectorEditable): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout): Split layout into _renderOrigin and _renderSelector, so selector field can be updated separately from everything else. (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorFocused): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidDiscard): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._discardSelectorChange): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderOrigin): (WI.SpreadsheetSelectorField): (WI.SpreadsheetSelectorField.prototype.get editing): (WI.SpreadsheetSelectorField.prototype.startEditing): (WI.SpreadsheetSelectorField.prototype.stopEditing): (WI.SpreadsheetSelectorField.prototype._handleClick): (WI.SpreadsheetSelectorField.prototype._handleFocus): (WI.SpreadsheetSelectorField.prototype._handleBlur): (WI.SpreadsheetSelectorField.prototype._handleKeyDown): 2017-10-03 Matt Baker Web Inspector: Add View layout tests, make views more testable https://bugs.webkit.org/show_bug.cgi?id=161274 Reviewed by Devin Rousso. This patch adds support for View testing. Since view layouts are scheduled using requestAnimationFrame, FrontendTestHarness now provides a timer-based polyfill, to allow nonintrusive testing of the frontend View hierarchy. * UserInterface/Test.html: Make WI.View available to tests. * UserInterface/Test/FrontendTestHarness.js: (FrontendTestHarness.prototype.redirectRequestAnimationFrame): * UserInterface/Views/View.js: (WI.View.rootView): (WI.View.prototype.replaceSubview): (WI.View.prototype._didMoveToWindow): (WI.View._cancelScheduledLayoutForView): Fixed issues caught while writing tests for the expected View behavior. 2017-10-02 Joseph Pecoraro Web Inspector: Escape more characters in posix string conversion https://bugs.webkit.org/show_bug.cgi?id=177761 Reviewed by Brian Burg. * UserInterface/Models/Resource.js: (WI.Resource.prototype.generateCURLCommand.escapeStringPosix): Escape '!' to '\041' in posix strings ($'...') since '!' may have special behavior at times. 2017-10-02 Ross Kirsling Web Inspector: Selecting child layers with keyboard causes Compositing Reason popover to become misaligned https://bugs.webkit.org/show_bug.cgi?id=150551 Reviewed by Matt Baker. `content` setter should only be used when NOT repositioning the popover. `presentNewContentWithFrame` exists to update content and position at once. * UserInterface/Views/LayerDetailsSidebarPanel.js: (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): (WI.LayerDetailsSidebarPanel.prototype._presentPopover): Fix new sidebar. * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WI.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode): Fix legacy sidebar. 2017-10-02 Ross Kirsling Web Inspector: Ensure popovers are not malformed on window resize. https://bugs.webkit.org/show_bug.cgi?id=177771 Reviewed by Joseph Pecoraro. * UserInterface/Views/Popover.js: Ensure stale `arrow-*` CSS classes are removed on update, even if our content didn't change. 2017-10-02 Joseph Pecoraro Web Inspector: Include Beacon and Ping requests in Network tab https://bugs.webkit.org/show_bug.cgi?id=177641 Reviewed by Chris Dumez. * Localizations/en.lproj/localizedStrings.js: New strings for Beacon/Ping. * UserInterface/Images/Beacon.svg: Added. * UserInterface/Views/ResourceIcons.css: (.resource-icon.resource-type-ping .icon,): (body:not(.mac-platform, .windows-platform) .resource-icon.resource-type-ping .icon,): (body:not(.mac-platform, .windows-platform) .large .resource-icon.resource-type-ping .icon,): New icon for Beacon/Ping. They share an icon since they are similiar in concept: a request that is sent and the page doesn't expect a response. * UserInterface/Controllers/FrameResourceManager.js: (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget): When a sub-resource and a main-resource have the same URL we were not distinguishing them. Use the resource type to distinguish them better. * UserInterface/Models/SourceCode.js: (WI.SourceCode.prototype._processContent): Safer handling if the body was base64 encoded but an empty string. * UserInterface/Models/Resource.js: (WI.Resource.displayNameForType): * UserInterface/Models/ResourceCollection.js: (WI.ResourceCollection.verifierForType): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.shortDisplayNameForResourceType): * UserInterface/Views/ResourceClusterContentView.js: (WI.ResourceClusterContentView.prototype.get responseContentView): New resource types. * UserInterface/Views/ResourceContentView.js: (WI.ResourceContentView.prototype.showMessage): * UserInterface/Views/TextResourceContentView.js: (WI.TextResourceContentView.prototype._contentDidPopulate): Nicer display for empty content, which may be common for these requests. 2017-09-29 Nikita Vasilyev Web Inspector: Styles Redesign: support undo/redo of manual edits https://bugs.webkit.org/show_bug.cgi?id=177314 Reviewed by Joseph Pecoraro. Make sure Command-Z and Command-Shift-Z undo changes in the styles sidebar when not focused on a contentEditable field. * UserInterface/Views/EditingSupport.js: (WI.isEventTargetAnEditableField): Make sure WI._undoKeyboardShortcut doesn't call WI.undo() when editing inside of a contentEditable element. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor): Call style setter to setup event listeners during instantiation. (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set style): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged): Update style declaration section when it isn't focused. This is the same logic as in the old styles sidebar (CSSStyleDeclarationTextEditor style setter). 2017-09-29 Joseph Pecoraro Web Inspector: Open Resource Dialog icons are blurry (24x24 instead of 32x32) https://bugs.webkit.org/show_bug.cgi?id=177631 Reviewed by Matt Baker. * UserInterface/Views/OpenResourceDialog.css: (.open-resource-dialog > .tree-outline.large .item): (.open-resource-dialog > .tree-outline.large .item .icon): (.open-resource-dialog .tree-outline.large .item .titles): Make the rows large enough to fit the full 32x32 icon instead of a blurry 24x24. 2017-09-29 Joseph Pecoraro Web Inspector: Uncaught exception with populate find keyboard shortcut https://bugs.webkit.org/show_bug.cgi?id=177672 Reviewed by Matt Baker. * UserInterface/Base/Main.js: The focusedContentView can be null so bail if that is the case. 2017-09-28 Devin Rousso WebInspector: Uncaught Exception: TypeError: this._delegate.completionControllerCSSFunctionValuesNeeded is not a function. https://bugs.webkit.org/show_bug.cgi?id=177619 Reviewed by Joseph Pecoraro. * UserInterface/Controllers/CodeMirrorCompletionController.js: (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions): Remove accidental `typeof` keyword. 2017-09-28 Joseph Pecoraro Web Inspector: Remove Error icon in error message for resources it looks poor https://bugs.webkit.org/show_bug.cgi?id=177613 Reviewed by Matt Baker. * UserInterface/Views/Main.css: (.message-text-view.error::before): Deleted. 2017-09-28 Tim Horton Remove constant() in favor of env() https://bugs.webkit.org/show_bug.cgi?id=177581 Reviewed by Dean Jackson. * UserInterface/Models/CSSCompletions.js: * UserInterface/Models/CSSKeywordCompletions.js: (WI.CSSKeywordCompletions.forProperty): (WI.CSSKeywordCompletions.forFunction): 2017-09-27 Joseph Pecoraro Uncaught Exception: Attempted to assign to readonly property (at ContentView.js:​206:​34)​ https://bugs.webkit.org/show_bug.cgi?id=177587 Reviewed by Matt Baker. We allow a representedObject to be a string. In strict mode attempting to set a property on a string results in a TypeError. So we should be careful not to do this in the rare cases where our representedObject is the a string. * UserInterface/Views/ContentView.js: (WI.ContentView.contentViewForRepresentedObject): (WI.ContentView.closedContentViewForRepresentedObject): Avoid setting a property on strings. ContentViews backed by a String aren't typically shared anyways, so the property case would not be useful. If a client really wants to share they could use `new String(...)` as the representedObject. 2017-09-27 Matt Baker Web Inspector: Missing checks in DebuggerSidebarPanel for DOM debugging support https://bugs.webkit.org/show_bug.cgi?id=177574 Reviewed by Joseph Pecoraro. Check before using class members that are conditionally constructed based on DOM debugging support. * UserInterface/Views/DebuggerSidebarPanel.js: (WI.DebuggerSidebarPanel.prototype.closed): (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie): 2017-09-27 Matt Baker Web Inspector: Create ResourceCollectionContentView and make CollectionContentView easier to extend https://bugs.webkit.org/show_bug.cgi?id=177419 Reviewed by Devin Rousso. CollectionContentView should be generic, work with any represented object Collection, and not perform any type checking. It should just map items to ContentViews using the provided ContentView constructor. The behavior when clicking a ContentView in the collection has been extended. If selection is enabled, clicking a ContentView will cause a "selected" class to be applied to its element, and a SupplementalRepresentedObjectsDidChange event is dispatched. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New file, move CollectionContentView above subclasses. * UserInterface/Models/ResourceCollection.js: (WI.ResourceCollection.prototype.get resourceType): Make resource type publicly available. * UserInterface/Views/CollectionContentView.js: Move type checking of the collection out of the base class and assert that ContentViews are created when invoking `contentViewConstructor`. (WI.CollectionContentView): (WI.CollectionContentView.titleForCollection): (WI.CollectionContentView.prototype.get supplementalRepresentedObjects): (WI.CollectionContentView.prototype.get selectionEnabled): (WI.CollectionContentView.prototype.set selectionEnabled): (WI.CollectionContentView.prototype.addContentViewForItem): (WI.CollectionContentView.prototype.removeContentViewForItem): (WI.CollectionContentView.prototype.contentViewAdded): (WI.CollectionContentView.prototype.contentViewRemoved): (WI.CollectionContentView.prototype.initialLayout): (WI.CollectionContentView.prototype.attached): (WI.CollectionContentView.prototype.detached): (WI.CollectionContentView.prototype._handleItemAdded): (WI.CollectionContentView.prototype._handleItemRemoved): (WI.CollectionContentView.prototype._selectItem): (WI.CollectionContentView.prototype._addContentViewForItem): Deleted. (WI.CollectionContentView.prototype._removeContentViewForItem): Deleted. * UserInterface/Views/ContentView.js: (WI.ContentView.createFromRepresentedObject): Create a ResourceCollectionContentView. In the future, additional Collection types can be mapped to their associated CollectionContentView. * UserInterface/Views/ResourceCollectionContentView.js: Added. New class for resource-specific logic previously in CollectionContentView. (WI.ResourceCollectionContentView): (WI.ResourceCollectionContentView.prototype.contentViewAdded): (WI.ResourceCollectionContentView.prototype._handleContentError): Remove ContentView without removing the resource from its collection. 2017-09-27 Ross Kirsling Web Inspector: Fix Layers tab sidebar popover. https://bugs.webkit.org/show_bug.cgi?id=177477 Reviewed by Matt Baker. * UserInterface/Views/LayerDetailsSidebarPanel.js: (WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Added. (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid): (WI.LayerDetailsSidebarPanel.prototype._sortDataGrid): (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged): (WI.LayerDetailsSidebarPanel.prototype._dataGridFocused): (WI.LayerDetailsSidebarPanel.prototype._dataGridBlurred): (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Refactored. (WI.LayerDetailsSidebarPanel.prototype._presentPopover): (WI.LayerDetailsSidebarPanel.prototype._dataGridClicked): Deleted -- not actually desired behavior. (WI.LayerDetailsSidebarPanel.prototype._updatePopoverForSelectedNode): Deleted -- code simplification. (WI.LayerDetailsSidebarPanel.prototype._hidePopover): Deleted -- no longer needed. 2017-09-27 Fujii Hironori [GTK] Web Inspector: Add Canvas2D.svg and Canvas3D.svg https://bugs.webkit.org/show_bug.cgi?id=175364 Reviewed by Carlos Garcia Campos. Add more free icons. * UserInterface/Images/gtk/Canvas2D.svg: Copied from Source/WebInspectorUI/UserInterface/Images/gtk/Canvas.svg. * UserInterface/Images/gtk/Canvas3D.svg: Added. 2017-09-26 Nikita Vasilyev Web Inspector: Styles Redesign: Style unused, overridden, and invalid properties differently https://bugs.webkit.org/show_bug.cgi?id=177461 Reviewed by Matt Baker. Style properties the same way as in the current styles sidebar with two minor changes: - Commented out properties are never strikethrough. - Non-inherited properties of inherited rules are no longer strikethrough (but still semi-transparent). * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .property:matches(.invalid, .other-vendor, .overridden):not(.disabled)): Use the same styles as in the old sidebar, with exception of `-webkit-text-stroke-width: 0.000000000000001px` hack, which was replaced by -webkit-text-decoration-color. (.spreadsheet-style-declaration-editor .property.invalid:not(.disabled)): (.spreadsheet-style-declaration-editor .property.not-inherited): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype._update): 2017-09-26 Joseph Pecoraro Web Inspector: Improve Table scrolling performance https://bugs.webkit.org/show_bug.cgi?id=177468 Reviewed by Brian Burg. This reduces work during scrolling updates in two ways. 1. Avoid recalculating the width/height of the Table on scroll. - We only need to recalculate sizes if the view changes size. 2. Avoid resetting sizes on all cells if the sizes did not change. - Enumerating and setting style.width values was showing up in profiles. * UserInterface/Views/Table.js: (WI.Table): New member variables for a cached width/height of the scrollable region. _cachedWidth is the same as _cachedScrollableHeight but they could be different so I just kept them separate for now. Also switch to getBoundingClientRect which gets us a better value then offsetWidth/offsetHeight. (WI.Table.prototype.resize): Clear cached size and relayout. (WI.Table.prototype.layout): If we did not resize, layout without recalculating sizes. (WI.Table.prototype.resizerDragging): (WI.Table.prototype._getOrCreateRow): When column widths change increment the width generation. This will let us quickly check if a row's cells are appropriately sized or not. (WI.Table.prototype._resizeColumnsAndFiller): Cache width values after recalculating. Provide a fast path if values have not changed. (WI.Table.prototype._updateVisibleRows): (WI.Table.prototype._updateFillerRowWithNewHeight): Factor out updating the filler row into a function. (WI.Table.prototype._applyColumnWidths): Always update the width generation of a row after setting its cell widths. (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded): Fast path only updates row cell widths if they need to change. 2017-09-25 Devin Rousso Web Inspector: move Console.addInspectedNode to DOM.setInspectedNode https://bugs.webkit.org/show_bug.cgi?id=176827 Reviewed by Joseph Pecoraro. * UserInterface/Controllers/DOMTreeManager.js: (WI.DOMTreeManager): (WI.DOMTreeManager.prototype.setInspectedNode): * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView.prototype._selectedNodeDidChange): 2017-09-25 Joseph Pecoraro Web Inspector: Add loading indicator next to resources in the Network Tab https://bugs.webkit.org/show_bug.cgi?id=177469 Reviewed by Matt Baker. * UserInterface/Models/Resource.js: (WI.Resource.prototype.isLoading): Provide a useful accessor to check if the Resource is considered loading or not. * UserInterface/Views/NetworkGridContentView.js: (WI.NetworkGridContentView.prototype._networkTimelineRecordAdded): * UserInterface/Views/ResourceTimelineDataGridNode.js: (WI.ResourceTimelineDataGridNode.prototype._updateStatus): * UserInterface/Views/ResourceTreeElement.js: (WI.ResourceTreeElement.prototype._updateStatus): Switch existing code to use the new isLoading() function and make the similiar code more consistent. * UserInterface/Views/NetworkTableContentView.css: (body[dir=ltr] .content-view.network .table .cell.name > .status): (body[dir=rtl] .content-view.network .table .cell.name > .status): (.content-view.network .table .cell.name > .status .indeterminate-progress-spinner): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype._populateNameCell): Add a loading indicator to the Name column in the Network tab. It is sized the same as the loading indicator in the Resource tab. 2017-09-25 Ross Kirsling Web Inspector: Elements tab's Layers sidebar should disappear when Layers tab is present. https://bugs.webkit.org/show_bug.cgi?id=177476 Reviewed by Devin Rousso. * UserInterface/Views/ElementsTabContentView.js: (WI.ElementsTabContentView): 2017-09-25 Devin Rousso Web Inspector: Add autocompletion suggestions for CSS attr based on the selected element's attributes https://bugs.webkit.org/show_bug.cgi?id=177346 Reviewed by Joseph Pecoraro. * UserInterface/Controllers/CodeMirrorCompletionController.js: (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions): Provide a way for delegates to add completion items for CSS functions based on the name of the function. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WI.CSSStyleDeclarationTextEditor.prototype.completionControllerCSSFunctionValuesNeeded): If the function name is "attr", also return a list of the names of all the selected node's attributes. 2017-09-25 Joseph Pecoraro Unreviewed follow-up to r222470. * UserInterface/Main.html: Remove reference to css file that doesn't exist yet. 2017-09-22 Joseph Pecoraro Web Inspector: Include a table in New Network Tab https://bugs.webkit.org/show_bug.cgi?id=177206 Reviewed by Matt Baker and Brian Burg. This includes an initial implementation of the NetworkTableContentView, and a generic Table / TableColumn implementation ported from DataGrid. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: New strings and files. * UserInterface/Views/NetworkGridContentView.css: (.content-view:matches(.network, .network-grid) > .data-grid .cache-type): (.cache-type): Deleted. * UserInterface/Views/ResourceDetailsSidebarPanel.css: (.sidebar > .panel.resource-details .cache-type): Make the .cache-type selector more specific for the legacy cases. * UserInterface/Views/NetworkTabContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css. (.content-view.network > .content-browser): * UserInterface/Views/NetworkTabContentView.js: (WI.NetworkTabContentView.prototype.shown): (WI.NetworkTabContentView.prototype.hidden): (WI.NetworkTabContentView.prototype.closed): NetworkTabContentView has a ContentBrowser so it should be passing ContentBrowser lifecycle events (shown, hidden, closed) through to the sub-content browser. * UserInterface/Views/TableColumn.js: Added. (WI.TableColumn.prototype.get identifier): (WI.TableColumn.prototype.get name): (WI.TableColumn.prototype.get width): (WI.TableColumn.prototype.get minWidth): (WI.TableColumn.prototype.get maxWidth): (WI.TableColumn.prototype.get hidden): (WI.TableColumn.prototype.get defaultHidden): (WI.TableColumn.prototype.get sortable): (WI.TableColumn.prototype.get align): (WI.TableColumn.prototype.get locked): (WI.TableColumn.prototype.get flexible): (WI.TableColumn.prototype.setWidth): (WI.TableColumn.prototype.setHidden): Model object for a column. Values are getter only. Columns may express size constraints (min width / max width) that are respected as much as possible. When a column is resized it dispatches an event. * UserInterface/Views/Table.js: Added. (WI.Table): (WI.Table.prototype.get element): (WI.Table.prototype.get identifier): (WI.Table.prototype.get dataSource): (WI.Table.prototype.get delegate): (WI.Table.prototype.get rowHeight): (WI.Table.prototype.get selectedRow): (WI.Table.prototype.get sortOrder): (WI.Table.prototype.set sortOrder): (WI.Table.prototype.get sortColumnIdentifier): (WI.Table.prototype.set sortColumnIdentifier): (WI.Table.prototype.resize): (WI.Table.prototype.reloadData): (WI.Table.prototype.reloadDataAddedToEndOnly): (WI.Table.prototype.reloadRow): (WI.Table.prototype.reloadCell): (WI.Table.prototype.selectRow): (WI.Table.prototype.clearSelectedRow): (WI.Table.prototype.columnWithIdentifier): (WI.Table.prototype.addColumn): (WI.Table.prototype.showColumn): (WI.Table.prototype.hideColumn): (WI.Table.prototype.restoreScrollPosition): (WI.Table.prototype.initialLayout): (WI.Table.prototype.layout): (WI.Table.prototype.resizerDragStarted): (WI.Table.prototype.resizerDragging.growableSize): (WI.Table.prototype.resizerDragging.shrinkableSize): (WI.Table.prototype.resizerDragging.canGrow): (WI.Table.prototype.resizerDragging.canShrink): (WI.Table.prototype.resizerDragging.columnToResize): (WI.Table.prototype.resizerDragging): (WI.Table.prototype.resizerDragEnded): (WI.Table.prototype._needsLayout): (WI.Table.prototype._createHeaderCell): (WI.Table.prototype._createFillerCell): (WI.Table.prototype._createCell): (WI.Table.prototype._getOrCreateRow): (WI.Table.prototype._populatedCellForColumnAndRow): (WI.Table.prototype._populateRow): (WI.Table.prototype._resizeColumnsAndFiller.distributeRemainingPixels): (WI.Table.prototype._resizeColumnsAndFiller.bestFit): (WI.Table.prototype._resizeColumnsAndFiller): (WI.Table.prototype._updateVisibleRows): (WI.Table.prototype._applyColumnWidths): (WI.Table.prototype._positionResizerElements): (WI.Table.prototype._isRowVisible): (WI.Table.prototype._indexToInsertColumn): (WI.Table.prototype._handleScroll): (WI.Table.prototype._handleKeyDown): (WI.Table.prototype._handleClick): (WI.Table.prototype._handleContextMenu): (WI.Table.prototype._handleHeaderCellClicked): (WI.Table.prototype._handleHeaderContextMenu): Table is mostly a re-implementation of DataGrid. Much of its functionality was a direct copy that was then modified and simplified for a smaller and simpler feature set. Table behaves more like Cocoa's NSTableView. A datasource supplies the number of rows, which Table uses to resize appropriately. A delegate is then called to populate cells in a row when they become visible. Table does minimal caching, and in the event of data source changes (resorting, adding rows, modifying rows, etc) the visible rows are simply recreated from scratch. Clients should therefore make generating a cell's contents as simple and performant as possible. Unlike DataGrid, rows are just an
  • with a bunch of cells. Since the number of rows are limited to (roughly) those that are visible, most operations, like resizing, creates / modifies each of the visible cells. Finally, Table's resizing operations behave more like flexible content than DataGrid's neighbor only approach. This makes resizing the table generally easier to do, but may need refinement to decide which columns we would prefer to distribute columns during resizing. * UserInterface/Views/Table.css: Added. (.table): (.table > .header): (.table > .header > .sortable:active): (.table > .header > :matches(.sort-ascending, .sort-descending)): (.table > .header > :matches(.sort-ascending, .sort-descending)::after): (body[dir=ltr] .table > .header > :matches(.sort-ascending, .sort-descending)): (body[dir=rtl] .table > .header > :matches(.sort-ascending, .sort-descending)): (body[dir=ltr] .table > .header > :matches(.sort-ascending, .sort-descending)::after): (body[dir=rtl] .table > .header > :matches(.sort-ascending, .sort-descending)::after): (.table > .header > .sort-ascending::after): (.table > .header > .sort-descending::after): (.table > .data-container): (.table > .data-container.not-scrollable): (.table > .data-container > .data-list): (.table > .data-container > .data-list.odd-first-zebra-stripe): (.table > .data-container > .data-list > li): (.table > .data-container > .data-list > li.selected): (.table:focus > .data-container > .data-list li.selected): (.table .cell): (body[dir=ltr] .table .cell:not(:last-child)): (body[dir=rtl] .table .cell:not(:last-child)): (body[dir=ltr] .table .cell:first-child): (body[dir=rtl] .table .cell:first-child): (.table :not(.header) .cell:first-of-type): (.table .cell.align-right): (.table .cell.align-left): (.table .cell.align-center): Styles mostly taken from DataGrid with a few minor tweaks. * UserInterface/Views/NetworkTableContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css. (.content-view.network .table .icon): (body[dir=ltr] .content-view.network .table .icon): (body[dir=rtl] .content-view.network .table .icon): (.content-view.network .table li:not(.filler) .cell.name): (.content-view.network .table .cache-type): (.content-view.network .table .error): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.shortDisplayNameForResourceType): (WI.NetworkTableContentView.prototype.get navigationItems): (WI.NetworkTableContentView.prototype.shown): (WI.NetworkTableContentView.prototype.closed): (WI.NetworkTableContentView.prototype.reset): (WI.NetworkTableContentView.prototype.tableNumberOfRows): (WI.NetworkTableContentView.prototype.tableSortChanged): (WI.NetworkTableContentView.prototype.tableCellClicked): (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked): (WI.NetworkTableContentView.prototype.tableSelectedRowChanged): (WI.NetworkTableContentView.prototype.tablePopulateCell): (WI.NetworkTableContentView.prototype._populateNameCell): (WI.NetworkTableContentView.prototype._populateTransferSizeCell): (WI.NetworkTableContentView.prototype._generateSortComparator): (WI.NetworkTableContentView.prototype.initialLayout): (WI.NetworkTableContentView.prototype.layout): (WI.NetworkTableContentView.prototype._processPendingEntries): (WI.NetworkTableContentView.prototype._rowIndexForResource): (WI.NetworkTableContentView.prototype._updateEntryForResource): (WI.NetworkTableContentView.prototype._mainResourceDidChange): (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish): (WI.NetworkTableContentView.prototype._resourceLoadingDidFail): (WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange): (WI.NetworkTableContentView.prototype._networkTimelineRecordAdded): (WI.NetworkTableContentView.prototype._isDefaultSort): (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable): (WI.NetworkTableContentView.prototype._displayType): (WI.NetworkTableContentView.prototype._entryForResource): (WI.NetworkTableContentView.prototype._passFilter): (WI.NetworkTableContentView.prototype._updateSortAndFilteredEntries): (WI.NetworkTableContentView.prototype._updateFilteredEntries): (WI.NetworkTableContentView.prototype._generateTypeFilter): (WI.NetworkTableContentView.prototype._areFilterListsIdentical): (WI.NetworkTableContentView.prototype._typeFilterScopeBarSelectionChanged): (WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth): The NetworkTableContentView has a Table and it is the table's data source and delegate. It contains a complete list of entries, and a filtered list of entries, which is the backing list of rows for the table. As entries are created, updated, or filters modified, this generally modifies entries, sorts, filters, and reloads the table. As much as possible it batches operations in the usual layout loop. 2017-09-24 Joseph Pecoraro Web Inspector: Reduce work during resizing https://bugs.webkit.org/show_bug.cgi?id=177402 Reviewed by Matt Baker. * UserInterface/Views/ConsolePrompt.js: (WI.ConsolePrompt.prototype.layout): In the most common case there is no text so avoid doing work in CodeMirror. 2017-09-22 Matt Baker Web Inspector: Remove SidebarPanel show/hide and added/removed https://bugs.webkit.org/show_bug.cgi?id=177387 Reviewed by Devin Rousso. * UserInterface/Views/DebuggerTabContentView.js: (WI.DebuggerTabContentView.prototype.showDetailsSidebarPanels): * UserInterface/Views/SearchSidebarPanel.js: (WI.SearchSidebarPanel.prototype.focusSearchField): * UserInterface/Views/Sidebar.js: (WI.Sidebar.prototype.insertSidebarPanel): (WI.Sidebar.prototype.removeSidebarPanel): * UserInterface/Views/SidebarPanel.js: (WI.SidebarPanel.prototype.show): Deleted. (WI.SidebarPanel.prototype.hide): Deleted. (WI.SidebarPanel.prototype.added): Deleted. (WI.SidebarPanel.prototype.removed): Deleted. 2017-09-22 Matt Baker Web Inspector: View should automatically layout when it becomes attached to the DOM https://bugs.webkit.org/show_bug.cgi?id=177189 Reviewed by Devin Rousso. This guarantees that a layout is always scheduled as soon as a view is attached to the DOM. Now that nearly all views are created lazily, it is safe to make this change even without having a visibility concept in the View class that would prevent layouts for background views. * UserInterface/Views/View.js: (WI.View): Remove `this._needsLayoutWhenAttachedToRoot` flag, which is now implicit. This was set if a layout was requested before the view had been attached to the DOM. (WI.View.prototype.get element): (WI.View.prototype.get layoutPending): (WI.View.prototype.get parentView): (WI.View.prototype.get subviews): (WI.View.prototype.get isAttached): (WI.View.prototype.insertSubviewBefore): (WI.View.prototype.removeSubview): (WI.View.prototype.removeAllSubviews): (WI.View.prototype.attached): (WI.View.prototype.detached): Hooks for subclasses to define behavior added or removed from the DOM. (WI.View.prototype._didMoveToParent): (WI.View.prototype._didMoveToWindow): (WI.View._scheduleLayoutForView): (WI.View.prototype.didMoveToWindow): Deleted. (WI.View.prototype.didMoveToParent): Deleted. These were only used by View, and have been made private. 2017-09-22 Nikita Vasilyev Web Inspector: Styles Redesign: support toggling properties https://bugs.webkit.org/show_bug.cgi?id=176643 Reviewed by Joseph Pecoraro. Add a primitive UI to make CSS property names and values editable. Autocomplete, syntax highlighting, and proper keyboard navigation will be added later. Display !important when it's specified. Before this patch !important wasn't shown in the redesigned styles sidebar. * UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype.update): (WI.CSSProperty.prototype.get name): (WI.CSSProperty.prototype.set name): (WI.CSSProperty.prototype.get value): (WI.CSSProperty.prototype.get rawValue): (WI.CSSProperty.prototype.set rawValue): CSSProperty.prototype.value returns the same value as before. !important remains stripped. CSSProperty.prototype.rawValue returns a raw value from the payload. It may include !important. (WI.CSSProperty.prototype._updateStyle): (WI.CSSProperty.prototype._updateOwnerStyleText): (WI.CSSProperty): * UserInterface/Models/DOMNodeStyles.js: (WI.DOMNodeStyles.prototype._parseStylePropertyPayload): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor :matches(.name, .value):focus): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetStyleProperty.prototype._update): (WI.SpreadsheetStyleProperty.prototype._handleNameChange): (WI.SpreadsheetStyleProperty.prototype._handleValueChange): (WI.SpreadsheetStyleProperty): 2017-09-22 Matt Baker Web Inspector: NavigationBar should coalesce consecutive dividers when items are hidden https://bugs.webkit.org/show_bug.cgi?id=177379 Reviewed by Joseph Pecoraro. * UserInterface/Views/NavigationBar.js: (WI.NavigationBar.prototype.layout): 2017-09-22 Tim Horton Add env() as an alias of constant() https://bugs.webkit.org/show_bug.cgi?id=177371 Reviewed by Simon Fraser. * UserInterface/Models/CSSKeywordCompletions.js: (WI.CSSKeywordCompletions.forProperty): (WI.CSSKeywordCompletions.forFunction): Add autocomplete support for env(). 2017-09-21 Joseph Pecoraro Web Inspector: Add autocompletion suggestions for CSS functions (constant(), linear-gradient(), etc) https://bugs.webkit.org/show_bug.cgi?id=177264 Reviewed by Matt Baker. * UserInterface/Controllers/CodeMirrorCompletionController.js: (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions): Detect when we are inside of functions and provide completion suggestions for the relevant function. * UserInterface/Models/CSSCompletions.js: Syntax highlight "constant()" like we do for "var()". * UserInterface/Models/CSSKeywordCompletions.js: (WI.CSSKeywordCompletions.forProperty): Always suggest "constant()" everywhere, like we do for "var()". (WI.CSSKeywordCompletions.forFunction): Provide suggestions for some CSS functions. 2017-09-21 Joseph Pecoraro Web Inspector: Remove support for CSS Regions https://bugs.webkit.org/show_bug.cgi?id=177287 Reviewed by Matt Baker. * UserInterface/Protocol/CSSObserver.js: (WI.CSSObserver.prototype.namedFlowCreated): (WI.CSSObserver.prototype.namedFlowRemoved): (WI.CSSObserver.prototype.regionLayoutUpdated): (WI.CSSObserver.prototype.regionOversetChanged): (WI.CSSObserver.prototype.registeredNamedFlowContentElement): (WI.CSSObserver.prototype.unregisteredNamedFlowContentElement): Leave observer functions in for older backends that will send these messages, but we just ignore them. * UserInterface/Base/Main.js: * UserInterface/Controllers/DOMTreeManager.js: (WI.DOMTreeManager): (WI.DOMTreeManager.prototype._unbind): (WI.DOMTreeManager._flowPayloadHashKey): Deleted. (WI.DOMTreeManager.prototype._createContentFlowFromPayload): Deleted. (WI.DOMTreeManager.prototype._updateContentFlowFromPayload): Deleted. (WI.DOMTreeManager.prototype.getNamedFlowCollection.onNamedFlowCollectionAvailable): Deleted. (WI.DOMTreeManager.prototype.getNamedFlowCollection): Deleted. (WI.DOMTreeManager.prototype.namedFlowCreated): Deleted. (WI.DOMTreeManager.prototype.namedFlowRemoved): Deleted. (WI.DOMTreeManager.prototype._sendNamedFlowUpdateEvents): Deleted. (WI.DOMTreeManager.prototype.regionOversetChanged): Deleted. (WI.DOMTreeManager.prototype.registeredNamedFlowContentElement): Deleted. (WI.DOMTreeManager.prototype._removeContentNodeFromFlowIfNeeded): Deleted. (WI.DOMTreeManager.prototype.unregisteredNamedFlowContentElement): Deleted. (WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes.nodeRequested): Deleted. (WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes): Deleted. (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.regionNodesAvailable): Deleted. (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.remoteObjectPropertiesAvailable): Deleted. (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getComputedProperty): Deleted. (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getContentFlowName): Deleted. (WI.DOMTreeManager.prototype.getNodeContentFlowInfo): Deleted. * UserInterface/Images/ContentFlow.svg: Removed. * UserInterface/Images/gtk/ContentFlow.svg: Removed. * UserInterface/Main.html: * UserInterface/Models/Collection.js: * UserInterface/Models/ContentFlow.js: Removed. * UserInterface/Models/DOMTree.js: (WI.DOMTree): (WI.DOMTree.prototype.get frame): (WI.DOMTree.prototype._framePageExecutionContextChanged): (WI.DOMTree.prototype.get contentFlowCollection): Deleted. (WI.DOMTree.prototype.requestContentFlowList): Deleted. (WI.DOMTree.prototype._isContentFlowInCurrentDocument): Deleted. (WI.DOMTree.prototype._contentFlowListWasUpdated): Deleted. (WI.DOMTree.prototype._contentFlowWasAdded): Deleted. (WI.DOMTree.prototype._contentFlowWasRemoved): Deleted. * UserInterface/Test.html: * UserInterface/Views/CollectionContentView.js: (WI.CollectionContentView): * UserInterface/Views/ComputedStyleDetailsPanel.css: (.details-section > .content > .group > .row.simple.content-flow-link > .value > span > .icon): Deleted. * UserInterface/Views/ComputedStyleDetailsPanel.js: (WI.ComputedStyleDetailsPanel.prototype.refresh): (WI.ComputedStyleDetailsPanel.prototype.initialLayout): (WI.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged): (WI.ComputedStyleDetailsPanel): (WI.ComputedStyleDetailsPanel.prototype.get regionFlow): Deleted. (WI.ComputedStyleDetailsPanel.prototype.set regionFlow): Deleted. (WI.ComputedStyleDetailsPanel.prototype.get contentFlow): Deleted. (WI.ComputedStyleDetailsPanel.prototype.set contentFlow): Deleted. (WI.ComputedStyleDetailsPanel.prototype.get containerRegions): Deleted. (WI.ComputedStyleDetailsPanel.prototype.set containerRegions): Deleted. (WI.ComputedStyleDetailsPanel.prototype.sizeDidChange): Deleted. (WI.ComputedStyleDetailsPanel.prototype._updateFlowNamesSectionVisibility): Deleted. (WI.ComputedStyleDetailsPanel.prototype._resetFlowDetails): Deleted. (WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails.contentFlowInfoReady): Deleted. (WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails): Deleted. (WI.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked): Deleted. (WI.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked): Deleted. * UserInterface/Views/ContentFlowDOMTreeContentView.js: Removed. * UserInterface/Views/ContentFlowIcon.css: Removed. * UserInterface/Views/ContentFlowTreeElement.js: Removed. * UserInterface/Views/ContentView.js: (WI.ContentView.createFromRepresentedObject): (WI.ContentView.isViewable): * UserInterface/Views/FrameTreeElement.js: (WI.FrameTreeElement.prototype.onpopulate): (WI.FrameTreeElement.prototype.onexpand): (WI.FrameTreeElement.prototype._childContentFlowWasAdded): Deleted. (WI.FrameTreeElement.prototype._childContentFlowWasRemoved): Deleted. (WI.FrameTreeElement.prototype._rootDOMNodeInvalidated): Deleted. * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange): * UserInterface/Views/ResourcesTabContentView.js: (WI.ResourcesTabContentView): (WI.ResourcesTabContentView.prototype.canShowRepresentedObject): 2017-09-21 Ross Kirsling Web Inspector: Add details sidebar to Layers tab. https://bugs.webkit.org/show_bug.cgi?id=177115 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Views/LayerDetailsSidebarPanel.css: Added. * UserInterface/Views/LayerDetailsSidebarPanel.js: Added. New files and strings for sidebar. * UserInterface/Base/Utilities.js: Add global identifier for "×" character. * UserInterface/Models/Layer.js: Added. Add a model class for layers so that we can instanceof-check them. * UserInterface/Controllers/LayerTreeManager.js: (WI.LayerTreeManager.prototype.layersForNode): Utilize model class WI.Layer. * UserInterface/Views/Layers3DContentView.js: (WI.Layers3DContentView): (WI.Layers3DContentView.prototype.get supplementalRepresentedObjects): (WI.Layers3DContentView.prototype.layout): (WI.Layers3DContentView.prototype._addLayer): Pass layer data to sidebar and utilize model class WI.Layer. * UserInterface/Views/LayersTabContentView.js: (WI.LayersTabContentView): Attach details sidebar. 2017-09-21 Brian Burg Web Inspector: keyboard shortcut for "Reload page from origin" doesn't match Safari, and doesn't work https://bugs.webkit.org/show_bug.cgi?id=177010 Reviewed by Joseph Pecoraro. I seem to have broken reload from origin via Web Inspector in a previous patch, because the parameter is 'ignoreCache' instead of 'shouldIgnoreCache'. * Localizations/en.lproj/localizedStrings.js: Modernize tooltip text. * UserInterface/Base/Main.js: (WI.contentLoaded): Disambiguate two locals with the same name. Modernize the tooltip. Make the shortcut Cmd-Opt-R to match Safari. Fix wrong parameter usage. * UserInterface/Test/FrontendTestHarness.js: (FrontendTestHarness.prototype.reloadPage): Fix wrong parameter. 2017-09-19 Joseph Pecoraro Web Inspector: Adopt named groups in complex regexes https://bugs.webkit.org/show_bug.cgi?id=177117 Reviewed by Matt Baker. * UserInterface/Base/URLUtilities.js: (parseSecurityOrigin): (parseDataURL): (parseURL): * UserInterface/Models/Color.js: (WI.Color.fromString): 2017-09-19 Joseph Pecoraro REGRESSION(r214494): Web Inspector: Ignore cache button does not work in Network tab https://bugs.webkit.org/show_bug.cgi?id=177114 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WI.loaded): We need to register the settings change handler regardless of what the initial value of the setting is. 2017-09-18 Matt Baker Web Inspector: RemoteObject.resolveNode should return a Promise https://bugs.webkit.org/show_bug.cgi?id=177042 Reviewed by Joseph Pecoraro. Update RemoteObject.resolveNode to return a promise instead of taking a callback. If the promise is fulfilled, `remoteObject` will be non-null. * UserInterface/Controllers/DOMTreeManager.js: (WI.DOMTreeManager.prototype.inspectNodeObject.nodeAvailable): (WI.DOMTreeManager.prototype.inspectNodeObject): (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.domNodeResolved): Deleted. * UserInterface/Models/DOMNode.js: (WI.DOMNode.prototype.toggleClass.WI.RemoteObject.resolveNode.then): (WI.DOMNode.prototype.toggleClass): (WI.DOMNode.prototype.scrollIntoView.WI.RemoteObject.resolveNode.then): (WI.DOMNode.prototype.scrollIntoView): (WI.DOMNode.prototype.toggleClass.resolvedNode.inspectedPage_node_toggleClass): Deleted. (WI.DOMNode.prototype.toggleClass.resolvedNode): Deleted. (WI.DOMNode.prototype.scrollIntoView.resolvedNode.inspectedPage_node_scrollIntoView): Deleted. (WI.DOMNode.prototype.scrollIntoView.resolvedNode): Deleted. * UserInterface/Protocol/RemoteObject.js: (WI.RemoteObject.resolveNode): * UserInterface/Views/BoxModelDetailsSectionRow.js: (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.WI.RemoteObject.resolveNode.then): (WI.BoxModelDetailsSectionRow.prototype._applyUserInput): (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode.toggleInlineStyleProperty): Deleted. (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode.didToggle): Deleted. (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode): Deleted. * UserInterface/Views/CanvasDetailsSidebarPanel.js: * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForDOMNode): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved.inspectedPage_node_collectPrototypes): Deleted. (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved): Deleted. (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady): Deleted. * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype._createTooltipForNode.WI.RemoteObject.resolveNode.then): (WI.DOMTreeElement.prototype._createTooltipForNode): (WI.DOMTreeElement.prototype._createTooltipForNode.resolvedNode.dimensions): Deleted. (WI.DOMTreeElement.prototype._createTooltipForNode.resolvedNode): Deleted. * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline.prototype._hideElement.injectStyleAndToggleClass): (WI.DOMTreeOutline.prototype._hideElement): (WI.DOMTreeOutline): (WI.DOMTreeOutline.prototype._hideElement.resolvedNode.injectStyleAndToggleClass): Deleted. (WI.DOMTreeOutline.prototype._hideElement.resolvedNode): Deleted. 2017-09-18 Brian Burg Web Inspector: introduce an AppController class and shared instance of it https://bugs.webkit.org/show_bug.cgi?id=177024 Reviewed by Matt Baker. WebInspectorUI currently has an app controller singleton that's distributed among many properties on the WI object, which also serves as a namespace for classes, enums, and other frontend objects. The singleton should be a proper class so that we can think more easily about what state is global. In the process of moving pieces of Main.js into AppController, I intend to move most UI related code into a view controller class for the top level view. AppController really shouldn't be doing anything to the view hierarchy or DOM. It is yet to be determined how responsibility for global DOM events, such as those for keyboard shortcuts, will be handled. This larger refactoring project will let us more easily do things like connect to multiple debuggables in the same Inspector instance, and switch between views of different debuggable targets. Even if this never comes to pass, the code will be a lot easier to reason about and maintain in the future. For the first patch, introduce {AppController, TestAppController} <: AppControllerBase. Shared code goes in the base class. In the Main.html and Test.html files, first construct the AppController and then call .initialize() to avoid cyclic dependencies on the global singleton WI.sharedApp. * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/Test/Test.js: (WI.loaded): * UserInterface/Base/Main.js: (WI.loaded): Move some shared code out of here into AppControllerBase.constructor. Eventually WI.loaded should not exist, and its code will move elsewhere. (WI.contentLoaded): Adopt global reference. * UserInterface/Controllers/AppControllerBase.js: Copied from Source/WebInspectorUI/UserInterface/Protocol/MainTarget.js. (WI.AppControllerBase): (WI.AppControllerBase.prototype.get hasExtraDomains): (WI.AppControllerBase.prototype.get debuggableType): (WI.AppControllerBase.prototype.initialize): * UserInterface/Controllers/AppController.js: New. (WI.AppController): (WI.AppController.prototype.get hasExtraDomains): (WI.AppController.prototype.get debuggableType): (WI.AppController.prototype.activateExtraDomains): * UserInterface/Test/TestAppController.js: New. (WI.TestAppController): (WI.TestAppController.prototype.get hasExtraDomains): (WI.TestAppController.prototype.get debuggableType): * UserInterface/Controllers/TimelineManager.js: (WI.TimelineManager.defaultTimelineTypes): (WI.TimelineManager.availableTimelineTypes): (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted): (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped): (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted): * UserInterface/Models/TimelineRecording.js: (WI.TimelineRecording.sourceCodeTimelinesSupported): * UserInterface/Protocol/InspectorObserver.js: (WI.InspectorObserver.prototype.inspect): (WI.InspectorObserver.prototype.activateExtraDomains): (WI.InspectorObserver): * UserInterface/Protocol/MainTarget.js: (WI.MainTarget): (WI.MainTarget.prototype.get displayName): * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel): (WI.ResourceSidebarPanel.prototype.initialLayout): (WI.ResourceSidebarPanel.prototype._addScript): (WI.ResourceSidebarPanel.prototype._extraDomainsActivated): * UserInterface/Views/Toolbar.js: Use WI.sharedApp.{debuggableType, hasExtraDomains}. 2017-09-18 Matt Baker Web Inspector: console.assert messages shouldn't end in an exclamation point https://bugs.webkit.org/show_bug.cgi?id=177054 Reviewed by Joseph Pecoraro. * UserInterface/Base/EventListener.js: * UserInterface/Base/EventListenerSet.js: (WI.EventListenerSet.prototype.register): Drive-by: make assertions the same in both. * UserInterface/Views/LayoutTimelineView.js: (WI.LayoutTimelineView.prototype._processPendingRecords): * UserInterface/Views/Resizer.js: (WI.Resizer.prototype._currentPosition): 2017-09-18 Devin Rousso Web Inspector: REGRESSION(r221901): Single frame recordings don't reset the recording navigation item https://bugs.webkit.org/show_bug.cgi?id=176893 Reviewed by Matt Baker. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.recordingFinished): Set the `_recordingCanvas` to null whenever a recording has finished and been sent to the frontend. It is also necessary to do this inside `stopRecording`, as it is possible for the user to start and stop a recording before any actions are recorded, meaning that no recording would be sent to the frontend and this function will never get called. 2017-09-17 Nikita Vasilyev Web Inspector: Styles Redesign: support toggling properties https://bugs.webkit.org/show_bug.cgi?id=176643 Reviewed by Matt Baker. Add checkboxes to toggle (comment/uncomment) CSS properties. * UserInterface/Base/Utilities.js: (String.prototype.get lineCount): (String.prototype.get lastLine): Add string methods that are used by WI.CSSProperty.prototype._updateOwnerStyleText. * UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype.commentOut): (WI.CSSProperty.prototype.set text): (WI.CSSProperty.prototype.get editable): (WI.CSSProperty.prototype._updateOwnerStyleText): Add methods necessary for property toggling. * UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration): (WI.CSSStyleDeclaration.prototype.get allVisibleProperties): Add a getter that is used by SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesToRender. (WI.CSSStyleDeclaration.prototype.get visibleProperties): * UserInterface/Models/TextRange.js: (WI.TextRange.prototype.clone): (WI.TextRange.prototype.cloneAndModify): (WI.TextRange.prototype.relativeTo): Add methods that are used by WI.CSSProperty.prototype._updateOwnerStyleText. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor): (.spreadsheet-style-declaration-editor .property-toggle): (.spreadsheet-css-declaration:matches(:hover, :focus) .property-toggle,): (.spreadsheet-style-declaration-editor .property.disabled,): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set style): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get _propertiesToRender): (WI.SpreadsheetCSSStyleDeclarationEditor): (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.get element): (WI.SpreadsheetStyleProperty.prototype._update): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh): (WI.SpreadsheetRulesStyleDetailsPanel): * UserInterface/Views/SyntaxHighlightingDefaultTheme.css: (.cm-s-default .cm-comment,): * UserInterface/Views/Variables.css: (:root): Make comment color a CSS variable. 2017-09-15 Devin Rousso Web Inspector: REGRESSION(r222057): recording state doesn't update when changing actions https://bugs.webkit.org/show_bug.cgi?id=176988 Reviewed by Matt Baker. Replace `updateActionIndex` with `updateAction`, where the currently selected RecordingAction is passed to the DetailsSidebarPanel. Also remove the call to `this._recording.actions` in order to ensure that all logic performed by both DetailsSidebarPanel is synchronous. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/RecordingTabContentView.js: (WI.RecordingTabContentView.prototype._updateActionIndex): * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView.prototype.async._generateContentCanvas2D): (WI.RecordingContentView.prototype.async._generateContentCanvasWebGL): * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: (WI.RecordingStateDetailsSidebarPanel): (WI.RecordingStateDetailsSidebarPanel.prototype.set recording): (WI.RecordingStateDetailsSidebarPanel.prototype.updateAction): (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): (WI.RecordingStateDetailsSidebarPanel.prototype.updateActionIndex): Deleted. * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: (WI.RecordingTraceDetailsSidebarPanel): (WI.RecordingTraceDetailsSidebarPanel.prototype.set recording): (WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction): (WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex): Deleted. 2017-09-15 Matt Baker Web Inspector: Canvas: recording parameters that include colors should show an InlineSwatch (2D canvas) https://bugs.webkit.org/show_bug.cgi?id=176822 Reviewed by Devin Rousso. Show inline swatches in the canvas recording action and state sidebars. * UserInterface/Models/Color.js: Added helpers for dealing with CMYK and normalized RGB. The latter is for RGB components scaled to the range [0, 1]. Also improved handling for 8-bit channel values. (WI.Color.rgb2hsv): (WI.Color.cmyk2rgb): (WI.Color.normalized2rgb): (WI.Color._eightBitChannel): (WI.Color.prototype._toRGBString): (WI.Color.prototype._toRGBAString): (WI.Color.prototype._componentToHexValue): (WI.Color.prototype._rgbToHSL): (WI.Color.prototype._componentToNumber): Deleted. Replaced by _eightBitChannel. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction): (WI.RecordingAction.prototype.getColorParameters): Get a subset of parameters that describe a color. This can be an array containing one value (e.g. fillStyle), or multiple values, as is the case with non-standard API functions that describe color using multiple parameters (e.g. setFillColor). * UserInterface/Views/InlineSwatch.css: (.inline-swatch:not(.read-only):hover > span): (.inline-swatch:hover > span): Deleted. * UserInterface/Views/InlineSwatch.js: (WI.InlineSwatch): Read-only colors shouldn't show a context menu or hover effects. * UserInterface/Views/RecordingActionTreeElement.css: (.tree-outline:matches(:focus, .force-focus) .item.action > .titles .parameters > .inline-swatch): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._generateDOM.createParameterElement): (WI.RecordingActionTreeElement._generateDOM): (WI.RecordingActionTreeElement._createSwatchForColorParameters): * UserInterface/Views/RecordingStateDetailsSidebarPanel.css: (.sidebar > .panel.details.recording-state > .content > .data-grid .inline-swatch): * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D.isColorProperty): (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D.createInlineSwatch): (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): (WI.RecordingStateDetailsSidebarPanel): 2017-09-14 Joseph Pecoraro Unreviewed rollout r222036. The LayoutTests added with this change is flaky. This left in the Test.js, Test.html, InspectorBackend changes needed by later patches. They are independent of the flakey test. Reverted changeset Web Inspector: Timeline should show when events preventDefault() was called on an event or not https://bugs.webkit.org/show_bug.cgi?id=176824 http://trac.webkit.org/changeset/222036 2017-09-14 Devin Rousso Web Inspector: make recording swizzle async https://bugs.webkit.org/show_bug.cgi?id=176936 Reviewed by Joseph Pecoraro. Move all swizzle functions, and all logic that depends on swizzled values, to async functions so that await can be used to pause execution while objects load. This was necessary primarily for swizzling Image values, as the Image is not able to be used (such as for creating a CanvasPattern) until its "load" event has fired. Any callers of a Recording's actions getter must now adapt to working with a promise that will resolve once all swizzling has finished across all actions within that recording. * .eslintrc: * UserInterface/Models/Recording.js: (WI.Recording): (WI.Recording.prototype.async swizzle): (WI.Recording.prototype.swizzle): Deleted. Drive-by: currently, no data is added to the JSON for WebGL objects, so don't try to swizzle them and return the placeholder value (0) instead. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction): (WI.RecordingAction.prototype.swizzle): (WI.RecordingAction.prototype.toJSON): (WI.RecordingAction.prototype.async _swizzle.swizzleParameter): (WI.RecordingAction.prototype.async _swizzle.async swizzleCallFrame): (WI.RecordingAction.prototype.async _swizzle): * UserInterface/Models/RecordingInitialStateAction.js: (WI.RecordingInitialStateAction): * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView.prototype.updateActionIndex): (WI.RecordingContentView.prototype.async _generateContentCanvas2D): (WI.RecordingContentView.prototype.async _generateContentCanvasWebGL): (WI.RecordingContentView.prototype._updateCanvasPath): (WI.RecordingContentView.prototype._generateContentCanvas2D): Deleted. (WI.RecordingContentView.prototype._generateContentCanvasWebGL): Deleted. * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel.prototype.set recording): (WI.RecordingNavigationSidebarPanel.prototype.updateActionIndex): * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: (WI.RecordingStateDetailsSidebarPanel): (WI.RecordingStateDetailsSidebarPanel.prototype.updateActionIndex): (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): * UserInterface/Views/RecordingTabContentView.js: (WI.RecordingTabContentView.prototype.showRepresentedObject): * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: (WI.RecordingTraceDetailsSidebarPanel): (WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex): 2017-09-14 Matt Baker Web Inspector: Color created from an RGB/HSL triplet returns bad component arrays https://bugs.webkit.org/show_bug.cgi?id=176811 Reviewed by Joseph Pecoraro. A Color constructed from a format and RGB/HSL triplet should set its alpha component to 1 instead of leaving it undefined. Color properties and member functions expect the components array to have a length of four. * UserInterface/Models/Color.js: (WI.Color): 2017-09-14 Joseph Pecoraro Layout test inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html is flaky. https://bugs.webkit.org/show_bug.cgi?id=176952 Reviewed by Matt Baker. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackend.Agent.prototype.dispatchEvent): Include the event name since that may be useful in understanding what happened. * UserInterface/Test.html: * UserInterface/Test/Test.js: (WI.loaded): Register a MemoryObserver and include potentially necessary Model objects for the Memory domain. 2017-09-14 Joseph Pecoraro Web Inspector: Timeline should show when events preventDefault() was called on an event or not https://bugs.webkit.org/show_bug.cgi?id=176824 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: New string. * UserInterface/Controllers/TimelineManager.js: (WI.TimelineManager.prototype._processRecord): Include the whole data object as extra details. * UserInterface/Models/ScriptTimelineRecord.js: (WI.ScriptTimelineRecord): (WI.ScriptTimelineRecord.prototype.get extraDetails): Wholesale copy of the extra data instead of just a single property. * UserInterface/Views/ScriptDetailsTimelineView.js: (WI.ScriptDetailsTimelineView): Give the name column more initial space, there is still extra space after this adjustment but name is comfortably larger (and the most likely to be expanded). * UserInterface/Views/ScriptTimelineDataGridNode.js: (WI.ScriptTimelineDataGridNode.prototype.get subtitle): Include "default prevented" as the event's subtitle if it was prevented. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackend.Agent.prototype.dispatchEvent): (InspectorBackend.Agent): * UserInterface/Test.html: * UserInterface/Test/Test.js: (WI.loaded): Add the ScriptProfilerObserver to tests since it is on by default for Timelines. 2017-09-14 Ryan Haddad Unreviewed, rolling out r222015. The LayoutTests added with this change are flaky. Reverted changeset: "Web Inspector: Timeline should show when events preventDefault() was called on an event or not" https://bugs.webkit.org/show_bug.cgi?id=176824 http://trac.webkit.org/changeset/222015 2017-09-14 Joseph Pecoraro Web Inspector: Timeline should show when events preventDefault() was called on an event or not https://bugs.webkit.org/show_bug.cgi?id=176824 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: New string. * UserInterface/Controllers/TimelineManager.js: (WI.TimelineManager.prototype._processRecord): Include the whole data object as extra details. * UserInterface/Models/ScriptTimelineRecord.js: (WI.ScriptTimelineRecord): (WI.ScriptTimelineRecord.prototype.get extraDetails): Wholesale copy of the extra data instead of just a single property. * UserInterface/Views/ScriptDetailsTimelineView.js: (WI.ScriptDetailsTimelineView): Give the name column more initial space, there is still extra space after this adjustment but name is comfortably larger (and the most likely to be expanded). * UserInterface/Views/ScriptTimelineDataGridNode.js: (WI.ScriptTimelineDataGridNode.prototype.get subtitle): Include "default prevented" as the event's subtitle if it was prevented. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackend.Agent.prototype.dispatchEvent): (InspectorBackend.Agent): * UserInterface/Test.html: * UserInterface/Test/Test.js: (WI.loaded): Add the ScriptProfilerObserver to tests since it is on by default for Timelines. 2017-09-13 Devin Rousso Web Inspector: allow recordings to be saved via ⌘-S in the Recording tab https://bugs.webkit.org/show_bug.cgi?id=175284 Reviewed by Matt Baker. * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView.prototype.get supportsSave): (WI.RecordingContentView.prototype.get saveData): * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel.prototype._exportNavigationItemClicked): Use the current content view's saveData when exporting. 2017-09-13 Devin Rousso Web Inspector: Event Listeners section does not update when listeners are added/removed https://bugs.webkit.org/show_bug.cgi?id=170570 Reviewed by Joseph Pecoraro. * UserInterface/Protocol/DOMObserver.js: (WI.DOMObserver.prototype.didAddEventListener): (WI.DOMObserver.prototype.willRemoveEventListener): * UserInterface/Controllers/DOMTreeManager.js: (WI.DOMTreeManager.prototype.didAddEventListener): (WI.DOMTreeManager.prototype.willRemoveEventListener): * UserInterface/Models/DOMNode.js: Add "EventListenersChanged" event. Fired when an event listener is added or removed. * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners): (WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners): (WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged): Refresh the event listeners section whenever a node's event listeners change. 2017-09-13 Joseph Pecoraro Web Inspector: Sort by size issues with Cookies and ApplicationCache DataGrids https://bugs.webkit.org/show_bug.cgi?id=176879 Reviewed by Matt Baker. * UserInterface/Views/ApplicationCacheFrameContentView.js: (WI.ApplicationCacheFrameContentView.prototype._sortDataGrid): (WI.ApplicationCacheFrameContentView.prototype._populateDataGrid): This uses very dumb DataGridNodes with a pure data object. In that object `size` is a bytes string not a number. Include the number size in this data object that can be used during sorting. * UserInterface/Views/CookieStorageContentView.js: (WI.CookieStorageContentView.prototype._rebuildTable): Simplify creation. Also don't reset sort options. Note that here the DataGridNodes have access to the Cookie object and can already sort size using the cookie's size (a number) and not the data's size (string). * UserInterface/Views/DataGrid.js: (WI.DataGrid.prototype.sortNodes): (WI.DataGrid.prototype._sortNodesCallback): If sortNodes was called twice, it would defer the sort and actually do the sort with the first comparator and not the latest, preferred comparator. Make it use the latest comparator. 2017-09-13 Nikita Vasilyev Web Inspector: Styles Redesign: display @media section headers https://bugs.webkit.org/show_bug.cgi?id=176289 Reviewed by Devin Rousso. Prepend CSS media query selectors to every matching rule. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: (.spreadsheet-css-declaration .media-label): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader): Don't localize "@media" since it's CSS code. Don't display "all" or "screen" media query selectors. One of the goals of the Styles sidebar redesign is to fit more data. 2017-09-13 Nikita Vasilyev Web Inspector: Frontend should be made to expect and handle disabled properties https://bugs.webkit.org/show_bug.cgi?id=166787 Reviewed by Joseph Pecoraro. This change introduces WI.CSSStyleDeclaration.prototype.allProperties getter, that includes both enabled and disabled (commented out) CSS properties. The existing WI.CSSStyleDeclaration.prototype.properties getter only includes enabled CSS properties, same as before the backend change. There is no behaviour change in the current styles sidebar. The new redesigned styles sidebar will use disabled properties and display them as commented out. * UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype.get attached): Rename `enabled` to `attached`, as it didn't correspond to `_enabled` property. Attached means that the property is enabled and has a ownerStyle with a set index (unless it's a computed style, where index is not applicable). (WI.CSSProperty.prototype.get enabled): * UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration.prototype.get allProperties): Add allProperties getter that will be used in the new styles sidebar. * UserInterface/Models/DOMNodeStyles.js: (WI.DOMNodeStyles.prototype._markOverriddenProperties): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WI.CSSStyleDeclarationTextEditor.prototype.highlightProperty.propertiesMatch): Rename "enabled" to "attached" without any behavior change. 2017-09-13 Joseph Pecoraro Web Inspector: Escape in global search field should clear it https://bugs.webkit.org/show_bug.cgi?id=176764 Reviewed by Timothy Hatcher. * UserInterface/Views/QuickConsole.js: (WI.QuickConsole.prototype._toggleOrFocus): Don't implicitly prevent default. So if we didn't cause an action we can let the default system action happen. * UserInterface/Views/SearchBar.js: (WI.SearchBar): Remove unused keyboard shortcuts. 2017-09-12 Joseph Pecoraro Web Inspector: Add Experimental setting for new Network tab https://bugs.webkit.org/show_bug.cgi?id=176750 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Base/Main.js: (WI.contentLoaded): New files and strings. * UserInterface/Base/Setting.js: New experimental setting. * UserInterface/Views/LegacyNetworkTabContentView.js: (WI.LegacyNetworkTabContentView.isTabAllowed): Legacy tab availability depends on the setting. * UserInterface/Views/NetworkTabContentView.js: (WI.NetworkTabContentView): (WI.NetworkTabContentView.isTabAllowed): (WI.NetworkTabContentView.prototype.get contentBrowser): (WI.NetworkTabContentView.prototype.get type): (WI.NetworkTabContentView.prototype.canShowRepresentedObject): (WI.NetworkTabContentView.prototype.get supportsSplitContentBrowser): Modern network tab. Only difference right now is it allows the split console. * UserInterface/Views/NetworkTableContentView.js: Added. (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype.get selectionPathComponents): (WI.NetworkTableContentView.prototype.get navigationItems): (WI.NetworkTableContentView.prototype.shown): (WI.NetworkTableContentView.prototype.hidden): (WI.NetworkTableContentView.prototype.closed): (WI.NetworkTableContentView.prototype.reset): (WI.NetworkTableContentView.prototype.layout): (WI.NetworkTableContentView.prototype.handleClearShortcut): (WI.NetworkTableContentView.prototype._resourceCachingDisabledSettingChanged): (WI.NetworkTableContentView.prototype._toggleDisableResourceCache): Add a stubbed out ContentView. This will be implemented next. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): Add an experimental setting to toggle the new network tab. Only show the experimental settings that relate to the debuggable target. For JSContext targets, none of the settings are applicable, so don't even show the experimental section. * UserInterface/Views/TabBrowser.js: (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject): Treat all network tabs the same. 2017-09-11 Matt Baker Web Inspector: Canvas: improve recording controls and state management https://bugs.webkit.org/show_bug.cgi?id=176762 Reviewed by Devin Rousso. CanvasManager should be responsible for starting/stopping recordings and tracking state. Fixing this layering issue lets CanvasContentView better manage its recording UI. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager): (WI.CanvasManager.prototype.get recordingCanvas): (WI.CanvasManager.prototype.startRecording): (WI.CanvasManager.prototype.stopRecording): * UserInterface/Models/Canvas.js: (WI.Canvas.prototype.get isRecording): (WI.Canvas.prototype.toggleRecording): Deleted. * UserInterface/Views/CanvasContentView.css: (.navigation-bar > .item.canvas-record.disabled): * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView.prototype.shown): (WI.CanvasContentView.prototype._toggleRecording): (WI.CanvasContentView.prototype._recordingFinished): (WI.CanvasContentView.prototype._updateRecordNavigationItem): 2017-09-11 Joseph Pecoraro Web Inspector: Cleanup and test MIMETypeUtilities https://bugs.webkit.org/show_bug.cgi?id=176731 Reviewed by Matt Baker. * UserInterface/Base/FileUtilities.js: (WI.saveDataToFile): * UserInterface/Models/SourceMapResource.js: (WI.SourceMapResource): Update callers to handle new return values. * UserInterface/Base/MIMETypeUtilities.js: (WI.fileExtensionForURL): Return null in error cases. Only provide the content after the last period. (WI.fileExtensionForMIMEType): Handle generic "+json" and "+xml" cases. * UserInterface/Test.html: Include MIMETypeUtilities for testing. 2017-09-11 Joseph Pecoraro Web Inspector: Rename NetworkTab / NetworkSidebar to LegacyNetwork* https://bugs.webkit.org/show_bug.cgi?id=176739 Reviewed by Matt Baker. * UserInterface/Main.html: * UserInterface/Views/LegacyNetworkSidebarPanel.css: Renamed from Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.css. * UserInterface/Views/LegacyNetworkSidebarPanel.js: Renamed from Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js. * UserInterface/Views/LegacyNetworkTabContentView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js. Rename resources. * UserInterface/Base/Main.js: (WI.contentLoaded): * UserInterface/Views/NetworkGridContentView.js: (WI.NetworkGridContentView): (WI.NetworkGridContentView.prototype._networkTimelineRecordAdded): * UserInterface/Views/TabBrowser.js: (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject): Update names at callsites. 2017-09-11 Joseph Pecoraro Web Inspector: Remove unused parameter to UIString https://bugs.webkit.org/show_bug.cgi?id=176738 Reviewed by Matt Baker. * UserInterface/Base/LoadLocalizedStrings.js: (WI.UIString): Remove unused parameter. We moved to String.format for this behavior a while ago. 2017-09-11 Joseph Pecoraro Web Inspector: Do not allow the split console in the Settings tab https://bugs.webkit.org/show_bug.cgi?id=176726 Reviewed by Matt Baker. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype.get supportsSplitContentBrowser): 2017-09-11 Joseph Pecoraro Web Inspector: Include a DebugContentView for debugging https://bugs.webkit.org/show_bug.cgi?id=176733 Reviewed by Matt Baker. Provide a DebugContentView which can be used to debug lifecycle events of a ContentView (shown, hidden, closed), and displays a provided string. It can be created like so: `new WI.DebugContentView("Name")` * UserInterface/Debug/DebugContentView.css: Added. (.content-view.debug): * UserInterface/Debug/DebugContentView.js: Added. (WI.DebugContentView): (WI.DebugContentView.prototype.shown): (WI.DebugContentView.prototype.hidden): (WI.DebugContentView.prototype.closed): Log events for debugging. * UserInterface/Main.html: Include new Debug resources. 2017-09-11 Joseph Pecoraro Web Inspector: Make Dashboard Timeline icon and Timeline tab icon more similar https://bugs.webkit.org/show_bug.cgi?id=176582 Reviewed by Timothy Hatcher. * UserInterface/Images/Time.svg: Change the clock hands to match the time of Timelines.svg. 2017-09-10 Matt Baker Web Inspector: change style of RecordingNavigationSidebarPanel https://bugs.webkit.org/show_bug.cgi?id=175451 Reviewed by Devin Rousso. This patch adds UI polish to the Canvas recording navigation sidebar: - New icons for Canvas2D operations - Removed extraneous colors: zebra striping, frame element background color - Visual action color changed to match details sidebar "changed" color - Make tree item indent a convenient multiple of the base indent - Move RecordingActionTreeElement styles to a separate file * UserInterface/Images/Clip.svg: Added. * UserInterface/Images/Composite.svg: Added. * UserInterface/Images/Fill.svg: Added. * UserInterface/Images/LineStyle.svg: Added. * UserInterface/Images/Palette.svg: Added. * UserInterface/Images/PathArc.svg: Added. * UserInterface/Images/PathCurve.svg: Added. * UserInterface/Images/PathEllipse.svg: Added. * UserInterface/Images/PathLineTo.svg: Added. * UserInterface/Images/PathMoveTo.svg: Added. * UserInterface/Images/PathRect.svg: Added. * UserInterface/Images/Pixels.svg: Added. * UserInterface/Images/PointInPath.svg: Added. * UserInterface/Images/PointInStroke.svg: Added. * UserInterface/Images/Shadow.svg: Added. * UserInterface/Images/Stroke.svg: Added. * UserInterface/Images/Text.svg: Added. * UserInterface/Images/Transform.svg: Added. New icons for Canvas2D operations. * UserInterface/Main.html: New file. * UserInterface/Views/GeneralTreeElement.js: (WI.GeneralTreeElement.prototype.customTitleTooltip): (WI.GeneralTreeElement.prototype._updateTitleTooltip): Allow derived classes to supply a custom tooltip, when simply getting the title element text is insufficient. * UserInterface/Views/RecordingActionTreeElement.css: Added. (.item.action.initial-state > .icon): (.tree-outline:not(:focus, .force-focus) .item.action:not(.initial-state, .parent, .invalid) > .icon): (.item.action:not(.initial-state)::before): (body[dir=ltr] .item.action::before): (body[dir=rtl] .item.action::before): (.tree-outline:matches(:focus, .force-focus) .item.action.selected:not(.initial-state, .invalid) > .icon): (body:not(.window-inactive, .window-docked-inactive) :matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,): (.tree-outline[data-indent="1"] .item.action::before,): (.tree-outline[data-indent="3"] .item.action::before): (.tree-outline[data-indent="4"] .item.action::before): (.tree-outline[data-indent="5"] .item.action::before): (.tree-outline[data-indent="6"] .item.action::before): (.tree-outline[data-indent="7"] .item.action::before): (body[dir=ltr] .tree-outline:not(.hide-disclosure-buttons) .item.action:not(.initial-state, .parent) > .icon): (body[dir=rtl] .tree-outline:not(.hide-disclosure-buttons) .item.action:not(.initial-state, .parent) > .icon): (.item.action.visual:not(.selected, .invalid)): (.item.action.attribute > .titles .parameters::before): (.item.action:not(.attribute) > .titles .parameters::before): (.item.action:not(.attribute) > .titles .parameters::after): (.item.action > .titles .parameter:not(:last-child)::after): (.item.action:not(.selected) > .titles .parameter.swizzled): (.item.action.composite > .icon): (.item.action.fill > .icon): (.item.action.image > .icon): (.item.action.line-style > .icon): (.item.action.shadow > .icon): (.item.action.stroke > .icon): (.item.action.style > .icon): (.item.action.text > .icon): (.item.action.transform > .icon): (.item.action.arc > .icon): (.item.action.clip > .icon): (.item.action.curve > .icon): (.item.action.ellipse > .icon): (.item.action.line-to > .icon): (.item.action.move-to > .icon): (.item.action.point-in-path > .icon): (.item.action.point-in-stroke > .icon): (.item.action.rect > .icon): (.item.action.restore > .icon): (.item.action.save > .icon): (.item.action.invalid > .icon): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement): (WI.RecordingActionTreeElement._generateDOM.createParameterElement): (WI.RecordingActionTreeElement._generateDOM): (WI.RecordingActionTreeElement._getClassNames): Broke out into its own helper, to simplify _generateDOM which had too many responsibilities. (WI.RecordingActionTreeElement._classNameForAction.classNameForActionName): (WI.RecordingActionTreeElement._classNameForAction): Get an icon for the action "type". Actions are grouped by similar operations. For example, lineCap, lineDash, lineJoin, lineWidth, and miterLimit are assigned the icon LineStyle.svg. (WI.RecordingActionTreeElement.prototype.customTitleTooltip): * UserInterface/Views/RecordingNavigationSidebarPanel.css: (.sidebar > .panel.navigation.recording > .content > .tree-outline .item.folder-icon > .icon): (.sidebar > .panel.navigation.recording > .content > .tree-outline:not(:empty)): Deleted. (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action, .selected).expanded): Deleted. (.sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): Deleted. (body[dir=ltr] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): Deleted. (body[dir=rtl] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): Deleted. (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="2"] .item.action:not(.initial-state)::before): Deleted. (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="3"] .item.action:not(.initial-state)::before): Deleted. (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="4"] .item.action:not(.initial-state)::before): Deleted. (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="5"] .item.action:not(.initial-state)::before): Deleted. (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="6"] .item.action:not(.initial-state)::before): Deleted. (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="7"] .item.action:not(.initial-state)::before): Deleted. (.sidebar > .panel.navigation.recording > .content .action > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content .action.function > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content .action.attribute.getter > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content .tree-outline:matches(:focus, .force-focus) .action.attribute.getter.selected > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content .action.attribute.boolean > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content .action.attribute.number > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content .action.attribute.object > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content .action.attribute.string > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action) > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content .action:matches(.invalid, .missing) > .icon): Deleted. (body[dir=ltr] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon): Deleted. (body[dir=rtl] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon): Deleted. (.sidebar > .panel.navigation.recording > .content .action.visual:not(.selected, .invalid)): Deleted. (.sidebar > .panel.navigation.recording > .content .action:not(.selected, .initial-state) > .titles .parameter.swizzled): Deleted. (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles :matches(.name, .parameter.invalid)): Deleted. * UserInterface/Views/RecordingNavigationSidebarPanel.js: 2017-09-08 Joseph Pecoraro Uncaught Exception: TypeError: this._heapSnapshot.addEventListener is not a function. https://bugs.webkit.org/show_bug.cgi?id=176633 Reviewed by Michael Saboff. * UserInterface/Proxies/HeapSnapshotDiffProxy.js: (WI.HeapSnapshotDiffProxy): This class has listeners of another object's events. It should extend WI.Object. 2017-09-08 Devin Rousso Web Inspector: Canvas: changes to currentX/currentY aren't highlighted in the details sidebar https://bugs.webkit.org/show_bug.cgi?id=176569 Reviewed by Matt Baker. * UserInterface/Models/RecordingAction.js: Add entries to WI.RecordingAction._stateModifiers for each path function. 2017-09-07 Joseph Pecoraro Augmented Inspector: Provide a way to inspect a DOM Node (DOM.inspect) https://bugs.webkit.org/show_bug.cgi?id=176563 Reviewed by Matt Baker. * UserInterface/Base/Main.js: (WI.contentLoaded): Always create the element search toolbar icon. Only show it if the DOM domain is available. With augmented agents the DOM domain may be activated later. * UserInterface/Protocol/DOMObserver.js: (WI.DOMObserver.prototype.inspect): Select the node in the DOM tree outline. 2017-09-07 Devin Rousso Web Inspector: Canvas RecordingAction tree outline virtualization is broken https://bugs.webkit.org/show_bug.cgi?id=176547 Reviewed by Joseph Pecoraro. * UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype.updateVirtualizedElements.walk): (WI.TreeOutline.prototype.updateVirtualizedElements): Pass the current `count` to each recursive call of `walk` so that the cumulative index of a TreeElement in any given sub-tree is correct. Drive-by: if there is a focused TreeElement when scrolling, only change the current `scrollTop` if it is not already visible. Also rewrote some loops for clarity. 2017-09-07 Devin Rousso Unreviewed, change my copyright email. * Scripts/copy-user-interface-resources.pl: * UserInterface/Controllers/CodeMirrorSpringEditingController.js: * UserInterface/Images/AnimationPlayStatePaused.svg: * UserInterface/Images/AnimationPlayStateRunning.svg: * UserInterface/Images/CSSVariable.svg: * UserInterface/Images/ListStylePositionInside.svg: * UserInterface/Images/ListStylePositionOutside.svg: * UserInterface/Images/StyleRule.svg: * UserInterface/Images/StyleRulePseudoElement.svg: * UserInterface/Models/Collection.js: * UserInterface/Models/ResourceCollection.js: * UserInterface/Views/CollectionContentView.css: * UserInterface/Views/CollectionContentView.js: * UserInterface/Views/ContextMenuUtilities.js: * UserInterface/Views/GeneralTabBarItem.js: * UserInterface/Views/GradientEditor.css: * UserInterface/Views/GradientEditor.js: * UserInterface/Views/InlineSwatch.css: * UserInterface/Views/InlineSwatch.js: * UserInterface/Views/PinnedTabBarItem.js: * UserInterface/Views/SettingsTabContentView.css: * UserInterface/Views/SettingsTabContentView.js: * UserInterface/Views/SpringEditor.css: * UserInterface/Views/SpringEditor.js: * UserInterface/Views/StyleRuleIcons.css: * UserInterface/Views/TabBarItem.js: * UserInterface/Views/TitleView.css: * UserInterface/Views/TitleView.js: * UserInterface/Views/VisualStyleBackgroundPicker.css: * UserInterface/Views/VisualStyleBackgroundPicker.js: * UserInterface/Views/VisualStyleBasicInput.js: 2017-09-06 Matt Baker Web Inspector: Relax the maximum sidebar width https://bugs.webkit.org/show_bug.cgi?id=175808 Reviewed by Devin Rousso. This patch introduces a constant, `minimumContentBrowserWidth`, which constrains the maximum width of either sidebar: maxSidebarWidth = window.innerWidth - minimumContentBrowserWidth - otherSidebarWidth A value of 100px for `minimumContentBrowserWidth` leaves enough space for three NavigationItems at their minimum width (32px), with a few pixels left over for good measure. For most tabs this will ensure that the buttons for showing the sidebars will be visible, along with an addition button. * UserInterface/Base/Main.js: * UserInterface/Views/Sidebar.js: (WI.Sidebar.prototype.get maximumWidth): 2017-09-06 Devin Rousso Web Inspector: Support overloaded CanvasRenderingContext2D actions with identical parameter counts https://bugs.webkit.org/show_bug.cgi?id=176178 Reviewed by Matt Baker. * UserInterface/Models/Recording.js: (WI.Recording.displayNameForSwizzleType): (WI.Recording.prototype.swizzle): Replace WI.Recording.Swizzle with an object of swizzle type keys to int values. This object matches the values in WebCore::RecordingSwizzleTypes.h. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction): (WI.RecordingAction.fromPayload): (WI.RecordingAction.prototype.get swizzleTypes): (WI.RecordingAction.prototype.swizzle): (WI.RecordingAction.prototype.toJSON): (WI.RecordingAction.prototype.parameterSwizzleTypeForTypeAtIndex): Deleted. Replace WI.RecordingAction._parameterSwizzleTypeForTypeAtIndex with an array of parameter types sent in the payload. This gives more control over the swizzling to the JSON, but also simplifies the way we regenerate the data in the frontend. * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._generateDOM): * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView.prototype._generateContentCanvas2D): (WI.RecordingContentView.prototype._applyAction): * UserInterface/Views/RecordingNavigationSidebarPanel.css: (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles :matches(.name, .parameter.invalid)): (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles .name,): Deleted. 2017-09-06 Joseph Pecoraro Web Inspector: ⌘E and ⌘G do not work in main content area when quick console drawer is open https://bugs.webkit.org/show_bug.cgi?id=176433 Reviewed by Brian Burg. Make the ⌘E and ⌘G keyboard shortcuts behave more like the global ⌘K clear shortcut. Instead of keeping them inside of FindBanner, and enabling/disabling them when they make sense to apply, we make a single global instance of the keyboard shortcut and apply it to whatever content view / content browser is active. This avoids conflicts in situations where there are two ContentViews that are visible and each can handle the keyboard shortcut. * UserInterface/Base/Main.js: (WI.contentLoaded): New keyboard shortcuts. (WI._populateFind): (WI._findNext): (WI._findPrevious): Perform the shortcut on the active content view or content browser. * UserInterface/Views/ContentBrowser.js: (WI.ContentBrowser.prototype.shown): (WI.ContentBrowser.prototype.hidden): (WI.ContentBrowser.prototype.handlePopulateFindShortcut): (WI.ContentBrowser.prototype.handleFindNextShortcut): (WI.ContentBrowser.prototype.handleFindPreviousShortcut): (WI.ContentBrowser.prototype.findBannerSearchQueryForSelection): Deleted. * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype.handlePopulateFindShortcut): (WI.LogContentView.prototype.handleFindNextShortcut): (WI.LogContentView.prototype.handleFindPreviousShortcut): ContentBrowser and LogContentView (the only content view with a custom find banner) now each handle the global keyboard shortcut handlers to do the right thing for their respective cases. * UserInterface/Views/FindBanner.js: (WI.FindBanner.prototype.enableKeyboardShortcuts): Deleted. (WI.FindBanner.prototype.disableKeyboardShortcuts): Deleted. (WI.FindBanner.prototype._populateSearchQueryFromSelection): Deleted. Move keyboard shortcut handling up to Main.js to be global. * UserInterface/Views/ContentView.js: (WI.ContentView.prototype.searchQueryWithSelection): Default implementation should grab the selected text from the selection. Previously shortcut selections only worked for selections in text editors. 2017-09-05 Nikita Vasilyev Web Inspector: Styles Redesign: display "Inherited From" section headers https://bugs.webkit.org/show_bug.cgi?id=176033 Reviewed by Devin Rousso. Compared to the old styles sidebar, the new "Inherited From" sections are more compact. One of the goals of the styles redesign is to make it fit more data vertically. The contrast is inceased. The text is darker while the background stayed the same. * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css: (.spreadsheet-style-panel .section-inherited): (.spreadsheet-style-panel .section-inherited .node-link): (.spreadsheet-style-panel .section-inherited .node-link:hover): * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh): Don't show two identical "Inherited From" sections. 2017-09-05 Nikita Vasilyev Web Inspector: Layout flashing for internal View.prototype.layout https://bugs.webkit.org/show_bug.cgi?id=176389 Reviewed by Matt Baker. Add a checkbox to Settings (Debug panel) to draw an orange outline around an element every time View.prototype.layout is called. This is similar to paint flashing, except this is only for View.prototype.layout. * UserInterface/Base/Setting.js: * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createDebugSettingsView): * UserInterface/Views/View.js: (WI.View.prototype._layoutSubtree): (WI.View.prototype._drawLayoutFlashingOutline): 2017-09-04 Nikita Vasilyev Web Inspector: Styles Redesign: hook up real data to spreadsheet style editor https://bugs.webkit.org/show_bug.cgi?id=175343 Reviewed by Devin Rousso. Replace static HTML added in with actual data. Addressed in this patch: - CSS rules can be copied. - Source links work as expected. - Nonmatching selectors are grayed out. Known limitations: - Neither CSS selectors nor CSS properties are editable. - "Inherited from" and media query section headers are missing. - No syntax highlighting of complex CSS values, e.g. hsl(0, 0%, 70%). * UserInterface/Main.html: * UserInterface/Models/CSSStyleDeclaration.js: * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WI.CSSStyleDeclarationTextEditor): * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WI.CSSStyleDetailsSidebarPanel): * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.js: Removed. Rename RulesStyleSpreadsheetDetailsPanel to SpreadsheetRulesStyleDetailsPanel. All files related to the spreadsheet editor start with "Spreadsheet" now. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: Added. (.spreadsheet-style-declaration-editor): (.spreadsheet-style-declaration-editor .name): (.spreadsheet-style-declaration-editor .value): (.spreadsheet-style-declaration-editor.no-properties): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: Added. (WI.SpreadsheetCSSStyleDeclarationEditor): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get delegate): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set delegate): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get style): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set style): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get _propertiesToRender): Similar condition is commonly used in CSSStyleDeclarationTextEditor. Abstact it out to its own method. (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._renderProperty): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: Copied from Source/WebInspectorUI/UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.css. (.spreadsheet-css-declaration): (.spreadsheet-css-declaration .origin): (.spreadsheet-css-declaration.locked .origin::after): (.spreadsheet-css-declaration .origin .go-to-link): (.spreadsheet-css-declaration .origin .go-to-link:hover): (.spreadsheet-css-declaration .styles-source): (.spreadsheet-css-declaration .selector.style-attribute): (.spreadsheet-css-declaration .selector > span): (.spreadsheet-css-declaration .selector > .matched): (.spreadsheet-css-declaration .properties): (.spreadsheet-css-declaration.locked): (.spreadsheet-css-declaration .locked-icon): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: Added. (WI.SpreadsheetCSSStyleDeclarationSection): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get element): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get style): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorFocused): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get locked): (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get selectorEditable): * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css: Renamed from Source/WebInspectorUI/UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.css. * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: Added. (WI.SpreadsheetRulesStyleDetailsPanel): (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh): * UserInterface/Views/StyleDetailsPanel.js: (WI.StyleDetailsPanel.prototype.filterDidChange): * UserInterface/Views/View.js: (WI.View.prototype.removeAllSubviews): Add a method to remove all subviews more efficiently. 2017-08-29 Matt Baker Web Inspector: Critical content browser toolbar buttons are hidden at narrow widths https://bugs.webkit.org/show_bug.cgi?id=175999 Reviewed by Devin Rousso. This patch adds a VisibilityPriority concept to NavigationItems. If a NavigationBar cannot fit all of its items in the available space, items are hidden to make room, starting with the lowest priority item. Consecutive dividers are then collapsed, as well as leading and trailing dividers. * UserInterface/Main.html: New file. * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView): * UserInterface/Views/ConsoleDrawer.js: (WI.ConsoleDrawer): * UserInterface/Views/ContentBrowser.js: (WI.ContentBrowser): * UserInterface/Views/ContentBrowserTabContentView.js: (WI.ContentBrowserTabContentView): * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView): Set `High` and `Low` priorities, and group the back/forward buttons. * UserInterface/Views/GroupNavigationItem.js: Added. (WI.GroupNavigationItem): (WI.GroupNavigationItem.prototype.get navigationItems): (WI.GroupNavigationItem.prototype.get minimumWidth): (WI.GroupNavigationItem.prototype.updateLayout): (WI.GroupNavigationItem.prototype.didAttach): (WI.GroupNavigationItem.prototype.didDetach): NavigationItem groups. Grouped items are shown/hidden together. * UserInterface/Views/HierarchicalPathNavigationItem.js: (WI.HierarchicalPathNavigationItem.prototype.updateLayout): * UserInterface/Views/ImageResourceContentView.js: (WI.ImageResourceContentView): * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js: (WI.IndexedDatabaseObjectStoreContentView): * UserInterface/Views/LogContentView.js: (WI.LogContentView): Set `High` and `Low` priorities. * UserInterface/Views/NavigationBar.css: (.navigation-bar .item.force-hidden): New hidden class, which must be tracked separately from ".hidden". The former is an implementation detail of NavigationBar, while the latter is set by the client. * UserInterface/Views/NavigationBar.js: (WI.NavigationBar.prototype.insertNavigationItem): (WI.NavigationBar.prototype.removeNavigationItem): (WI.NavigationBar.prototype.findNavigationItem.matchingSelfOrChild): (WI.NavigationBar.prototype.findNavigationItem): (WI.NavigationBar.prototype.layout.forceItemHidden): (WI.NavigationBar.prototype.layout.isDivider): (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth): (WI.NavigationBar.prototype.layout): (WI.NavigationBar.prototype._calculateMinimumWidth): (WI.NavigationBar.prototype.get _visibleNavigationItems): (WI.NavigationBar): * UserInterface/Views/NavigationItem.js: Add support for visibility priority, an integer value that determines the order in which items are hidden when the NavigationBar becomes too narrow to fit all of items child items. NavigationIte3m defines constants for Low, Normal (the default), and High priority. (WI.NavigationItem): (WI.NavigationItem.prototype.get minimumWidth): (WI.NavigationItem.prototype.get width): (WI.NavigationItem.prototype.get visibilityPriority): (WI.NavigationItem.prototype.set visibilityPriority): (WI.NavigationItem.prototype.updateLayout): (WI.NavigationItem.prototype.didAttach): (WI.NavigationItem.prototype.didDetach): Encapsulate the setting of the parent NavigationBar. Needed so that GroupNavigationItem can forward this action to its children. * UserInterface/Views/NetworkGridContentView.js: (WI.NetworkGridContentView): * UserInterface/Views/RadioButtonNavigationItem.js: (WI.RadioButtonNavigationItem.prototype.updateLayout): * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): * UserInterface/Views/ScriptContentView.js: (WI.ScriptContentView): * UserInterface/Views/TextContentView.js: (WI.TextContentView): * UserInterface/Views/TextResourceContentView.js: (WI.TextResourceContentView): * UserInterface/Views/TimelineRecordingContentView.js: (WI.TimelineRecordingContentView): * UserInterface/Views/TimelineTabContentView.js: (WI.TimelineTabContentView): Set `High` and `Low` priorities, and group Timeline view mode buttons. 2017-08-29 Joseph Pecoraro REGRESSION(r220235): Web Inspector: Global search should not happen incrementally https://bugs.webkit.org/show_bug.cgi?id=176063 Reviewed by Devin Rousso. * UserInterface/Base/Main.js: (WI.contentLoaded): * UserInterface/Views/SearchBar.js: (WI.SearchBar): (WI.SearchBar.prototype._handleKeydownEvent): Remove delegate and simplify setting incremental. 2017-08-29 Nikita Vasilyev Web Inspector: Convert all methods in Utilities.js to ECMAScript 2015 shorthand syntax https://bugs.webkit.org/show_bug.cgi?id=176067 Reviewed by Joseph Pecoraro. * UserInterface/Base/Utilities.js: (get return): (addStringToken): (prettyFunctionName): (warn): (error): (isEmptyObject): (isEnterKey): (resolveDotsInPath): (parseMIMEType): (simpleGlobStringToRegExp): (defaultComparator): (get Object): (appendWebInspectorSourceURL): (appendWebInspectorConsoleEvaluationSourceURL): (isWebInspectorInternalScript): (isWebInspectorConsoleEvaluationScript): (isWebKitInjectedScript): (isWebKitInternalScript): (isFunctionStringNativeCode): (isTextLikelyMinified): (doubleQuotedString): (insertionIndexForObjectInListSortedByFunction): (insertObjectIntoSortedArray): (decodeBase64ToBlob): 2017-08-29 Nikita Vasilyev Web Inspector: Optimize View.prototype.removeSubview https://bugs.webkit.org/show_bug.cgi?id=176041 Reviewed by Matt Baker. Look up a subview in an array only once, not twice. * UserInterface/Base/Utilities.js: (Array.prototype.removeAll): (Array.prototype.remove): Split Array.propotype.remove(value, onlyFirst) into Array.propotype.removeAll(value) and Array.propotype.remove(value). * UserInterface/Controllers/DebuggerManager.js: (WI.DebuggerManager.prototype._debuggerBreakpointOptions): * UserInterface/Views/ContentViewContainer.js: (WI.ContentViewContainer.prototype._clearTombstonesForContentView): (WI.ContentViewContainer.prototype._disassociateFromContentView): * UserInterface/Views/View.js: (WI.View.prototype.removeSubview): 2017-08-28 Joseph Pecoraro Web Inspector: Remove some unused DataGrid code https://bugs.webkit.org/show_bug.cgi?id=176029 Reviewed by Matt Baker. * UserInterface/Views/DataGrid.js: (WI.DataGrid.prototype.get copyTextDelimiter): (WI.DataGrid.prototype.set copyTextDelimiter): (WI.DataGrid.prototype.resizerDragging): (WI.DataGrid.prototype.columnWidthsMap): Deleted. (WI.DataGrid.prototype.applyColumnWidthsMap): Deleted. (WI.DataGrid.prototype.get resizeMethod): Deleted. (WI.DataGrid.prototype.set resizeMethod): Deleted. 2017-08-27 Devin Rousso Web Inspector: Record actions performed on WebGLRenderingContext https://bugs.webkit.org/show_bug.cgi?id=174483 Reviewed by Matt Baker. * UserInterface/Models/Recording.js: (WI.Recording): (WI.Recording.fromPayload): (WI.Recording.prototype.swizzle): Add swizzle types for WebGL parameters. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction): (WI.RecordingAction.fromPayload): (WI.RecordingAction.prototype.get snapshot): (WI.RecordingAction.prototype.swizzle): (WI.RecordingAction.prototype.toJSON): Include an optional fourth parameter `snapshot` that will be sent for visual actions when recording WebGL canvas contexts. * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): (WI.RecordingContentView.prototype.get navigationItems): (WI.RecordingContentView.prototype.updateActionIndex): (WI.RecordingContentView.prototype.shown): (WI.RecordingContentView.prototype._generateContentCanvasWebGL): * UserInterface/Views/RecordingContentView.css: (.content-view:not(.tab).recording :matches(img, canvas)): (.content-view:not(.tab).recording canvas): Deleted. Instead of regenerating the canvas context in the WebInspector frontend, just display the snapshot image for the last visual action. * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._generateDOM): 2017-08-24 Devin Rousso Web Inspector: add filter for draw actions in Recordings https://bugs.webkit.org/show_bug.cgi?id=175448 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel.prototype.initialLayout): (WI.RecordingNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): Add button to filter visual actions. Drive-by fix: ensure that frame folders are still visible when filtering. * UserInterface/Images/Paint.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/PaintFlashing.svg. * UserInterface/Images/gtk/Paint.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/PaintFlashing.svg. * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView): Rename PaintFlashing.svg to Paint.svg. 2017-08-24 Ross Kirsling Web Inspector: Create experimental Layers tab https://bugs.webkit.org/show_bug.cgi?id=175728 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: * UserInterface/Base/Setting.js: * UserInterface/Images/Layers.svg: Added. * UserInterface/Main.html: * UserInterface/Views/Layers3DContentView.js: Added. * UserInterface/Views/LayersTabContentView.js: Added. * UserInterface/Views/SettingsTabContentView.js: 2017-08-24 Devin Rousso Web Inspector: Table grid shouldn't show behind empty state https://bugs.webkit.org/show_bug.cgi?id=175943 Reviewed by Brian Burg. * UserInterface/Views/RecordingNavigationSidebarPanel.css: (.sidebar > .panel.navigation.recording > .content > .tree-outline): (.sidebar > .panel.navigation.recording > .content > .tree-outline:not(:empty)): Only apply the background when the TreeOutline has children. 2017-08-23 Nikita Vasilyev Web Inspector: Make lock icon crispier https://bugs.webkit.org/show_bug.cgi?id=175868 Reviewed by Matt Baker. * UserInterface/Images/Locked.svg: 2017-08-22 Devin Rousso Web Inspector: provide way for ShaderPrograms to be enabled/disabled https://bugs.webkit.org/show_bug.cgi?id=175400 Reviewed by Matt Baker. Adds a status element to ShaderProgramTreeElement that, when clicked, will toggle the disabled state of the corresponding ShaderProgram. Disabled shader programs will not draw anything to the context. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Models/ShaderProgram.js: (WI.ShaderProgram): (WI.ShaderProgram.prototype.get disabled): (WI.ShaderProgram.prototype.toggleDisabled): * UserInterface/Views/ShaderProgramTreeElement.js: (WI.ShaderProgramTreeElement): (WI.ShaderProgramTreeElement.prototype.selectOnMouseDown): (WI.ShaderProgramTreeElement.prototype._disabledImageElementClicked): * UserInterface/Views/ShaderProgramTreeElement.css: Added. (.item.shader-program .status > img): (.item.shader-program:not(:hover, .selected, .disabled) .status > img): (.tree-outline:matches(:focus, .force-focus) .item.shader-program.selected .status > img): (.item.shader-program.disabled > *): 2017-08-21 Devin Rousso Web Inspector: Can't copy text from "View variable value" popover in Styles sidebar https://bugs.webkit.org/show_bug.cgi?id=175758 Reviewed by Matt Baker. * UserInterface/Views/InlineSwatch.js: (WI.InlineSwatch.prototype._swatchElementClicked): Change CodeMirror readOnly from "nocursor" to true. The former prevents the editor from being focused during selection, therefore preventing the content from being copied. 2017-08-17 Matt Baker Web Inspector: create better icon for Canvas Path navigation item https://bugs.webkit.org/show_bug.cgi?id=175274 Reviewed by Joseph Pecoraro. * UserInterface/Images/Path.svg: Added. * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): 2017-08-17 Nikita Vasilyev Web Inspector: Styles: replace "Enter Class Name" with "Add New Class" https://bugs.webkit.org/show_bug.cgi?id=175686 Reviewed by Matt Baker. "Enter Class Name" isn't very descriptive. It doesn't suggest what's going to happen after you enter a class name. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WI.CSSStyleDetailsSidebarPanel.prototype.initialLayout): 2017-08-17 Ross Kirsling Web Inspector: Ensure three.js gets minified properly for production builds. https://bugs.webkit.org/show_bug.cgi?id=175452 Reviewed by Brian Burg. * Scripts/copy-user-interface-resources.pl: 2017-08-14 Simon Fraser Remove Proximity Events and related code https://bugs.webkit.org/show_bug.cgi?id=175545 Reviewed by Daniel Bates. No platform enables Proximity Events, so remove code inside ENABLE(PROXIMITY_EVENTS) and other related code. * UserInterface/Models/ScriptTimelineRecord.js: (WI.ScriptTimelineRecord.EventType.displayName): 2017-08-14 Matt Baker Web Inspector: Remove text-shadow and gradient backgrounds https://bugs.webkit.org/show_bug.cgi?id=175430 Reviewed by Brian Burg. Inspector should more closely match flat system look. Remove text-shadow embossing and replace linear gradients in popover backgrounds and selected tree item background color. * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group > label): * UserInterface/Views/CompletionSuggestionsView.css: (.completion-suggestions-container:not(:active) > .item.selected,): * UserInterface/Views/DebuggerDashboardView.css: (.toolbar .dashboard.debugger): * UserInterface/Views/HierarchicalPathComponent.css: (.hierarchical-path-component > .title): * UserInterface/Views/Main.css: (.bouncy-highlight): * UserInterface/Views/NavigationSidebarPanel.css: (.sidebar > .panel.navigation > .content .empty-content-placeholder > .message): * UserInterface/Views/Popover.js: (WI.Popover.prototype._drawBackground): * UserInterface/Views/RecordingTraceDetailsSidebarPanel.css: (.sidebar > .details.recording-trace > .content > .no-trace-data > .message): * UserInterface/Views/RulesStyleDetailsPanel.css: (.sidebar > .panel.details.css-style .rules .label): (.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results > .no-filter-results-message): (@media (-webkit-min-device-pixel-ratio: 2)): Deleted. (.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules .label.filter-matching-label,): Deleted. * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.css: (.style-spreadsheet .inherited): * UserInterface/Views/TimelineDataGrid.css: (.tree-outline.timeline-data-grid .item:hover): * UserInterface/Views/TimelineDataGrid.js: (WI.TimelineDataGrid.prototype._createPopoverContent): * UserInterface/Views/Variables.css: (:root): 2017-08-11 Nikita Vasilyev Web Inspector: Clicking on suggestion hint should apply it, not dismiss https://bugs.webkit.org/show_bug.cgi?id=175409 Reviewed by Matt Baker. Make clicking on the suggestion hint apply the completion, and place the text caret after it. * UserInterface/Controllers/CodeMirrorCompletionController.js: (WI.CodeMirrorCompletionController.prototype._createCompletionHintMarker): 2017-08-11 Nikita Vasilyev Web Inspector: Styles: Update the filter icon to match Xcode https://bugs.webkit.org/show_bug.cgi?id=175458 Reviewed by Matt Baker. * UserInterface/Images/FilterFieldGlyph.svg: Half-pixel transform is necessary for a cleaner rasterisation. * UserInterface/Views/FilterBar.css: (.filter-bar > input[type="search"]::-webkit-search-decoration): (.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter): ::-webkit-search-decoration is a flexbox item. Remove `vertical-align: bottom`, since it didn't do anything for it. * UserInterface/Views/DOMNodeDetailsSidebarPanel.css: * UserInterface/Views/FilterBar.js: (WI.FilterBar): * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WI.CSSStyleDetailsSidebarPanel.prototype.initialLayout): * UserInterface/Views/DebuggerSidebarPanel.js: * UserInterface/Views/LogContentView.js: (WI.LogContentView): * UserInterface/Views/NetworkSidebarPanel.js: (WI.NetworkSidebarPanel): * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel): * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel): * UserInterface/Views/SearchSidebarPanel.js: (WI.SearchSidebarPanel): * UserInterface/Views/StorageSidebarPanel.js: (WI.StorageSidebarPanel): * UserInterface/Views/TimelineRecordingContentView.js: (WI.TimelineRecordingContentView): * Localizations/en.lproj/localizedStrings.js: Replace placeholder text for all filter fields with "Filter". 2017-08-10 Ross Kirsling Web Inspector: Add three.js in preparation for layer visualization. https://bugs.webkit.org/show_bug.cgi?id=174798 Reviewed by Brian Burg. * UserInterface/External/three.js/LICENSE: Added. * UserInterface/External/three.js/OrbitControls.js: Added. * UserInterface/External/three.js/three.js: Added. 2017-08-09 Nikita Vasilyev Web Inspector: Styles: Add pre-populated data to spreadsheet-style view https://bugs.webkit.org/show_bug.cgi?id=174838 Reviewed by Matt Baker. This patch adds static content to the experimental RulesStyleSpreadsheetDetailsPanel. The static content will be replaced with actual data in the follow up patches. * UserInterface/Main.html: * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.css: Added. (.style-spreadsheet .style-rule): (.style-spreadsheet .selector-line): (.style-spreadsheet .selector): (.style-spreadsheet :matches(.selector .matched, .selector:focus)): (.style-spreadsheet .name): (.style-spreadsheet .value): (.style-spreadsheet :matches(.selector, .name, .value)): (.style-spreadsheet :matches(.selector, .name, .value):focus): (.style-spreadsheet .selector-inline): (.style-spreadsheet .property): (.style-spreadsheet .property-disabled,): (.style-spreadsheet .property-disabled :matches(.name, .value)): (.style-spreadsheet .styles-source): (.style-spreadsheet :matches(a, .node-link)): (.style-spreadsheet :matches(a, .node-link):hover): (.style-spreadsheet .inherited): (.style-spreadsheet .declarations): (.style-spreadsheet input[type="checkbox"]): (.style-spreadsheet input[type="checkbox"]:not(:checked)): (.style-spreadsheet .declarations:hover input[type="checkbox"]): * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.js: 2017-08-08 Devin Rousso Web Inspector: Canvas: support editing WebGL shaders https://bugs.webkit.org/show_bug.cgi?id=124211 Reviewed by Matt Baker. * UserInterface/Models/ShaderProgram.js: (WI.ShaderProgram.prototype.updateVertexShader): (WI.ShaderProgram.prototype.updateFragmentShader): (WI.ShaderProgram.prototype._updateShader): * UserInterface/Views/ShaderProgramContentView.js: (WI.ShaderProgramContentView): (WI.ShaderProgramContentView.prototype._contentDidChange): 2017-08-07 Devin Rousso Web Inspector: Preview Canvas path when viewing a recording https://bugs.webkit.org/show_bug.cgi?id=174967 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Setting.js: * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): (WI.RecordingContentView.supportsCanvasPathDebugging): (WI.RecordingContentView.prototype.get navigationItems): (WI.RecordingContentView.prototype.shown): (WI.RecordingContentView.prototype._generateContentCanvas2D): (WI.RecordingContentView.prototype._actionModifiesPath): (WI.RecordingContentView.prototype._updateCanvasPath): (WI.RecordingContentView.prototype._showPathButtonClicked): Show each segment of the current path as an overlay when the setting is enabled. Drive-by: fix forgotten function rename. * UserInterface/Views/RecordingContentView.css: (.content-view:not(.tab).recording canvas.path): * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): Show the currentX/currentY in the current state. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction.isFunctionForType): (WI.RecordingAction.prototype.swizzle): Use Sets for better performance. 2017-08-04 Devin Rousso Web Inspector: add source view for WebGL shader programs https://bugs.webkit.org/show_bug.cgi?id=138593 Reviewed by Matt Baker. Shader programs are now listed in the Resources sidebar as items within the owner Canvas context. When selected, the shown content view has two editors, one for the Vertex shader and one for the Fragment shader. These editors use CodeMirror's "clike" mode for GLSL syntax. * Localizations/en.lproj/localizedStrings.js: * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj: * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters: * UserInterface/Main.html: * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager): (WI.CanvasManager.prototype.canvasRemoved): (WI.CanvasManager.prototype.programCreated): (WI.CanvasManager.prototype.programDeleted): (WI.CanvasManager.prototype._mainResourceDidChange): * UserInterface/Models/Collection.js: * UserInterface/Models/Canvas.js: (WI.Canvas.prototype.get shaderProgramCollection) * UserInterface/Models/ShaderProgram.js: (WI.ShaderProgram.prototype.requestVertexShaderSource): (WI.ShaderProgram.prototype.requestFragmentShaderSource): (WI.ShaderProgram.prototype._requestShaderSource): * UserInterface/Views/CanvasTreeElement.js: (WI.CanvasTreeElement): (WI.CanvasTreeElement.prototype.onattach): (WI.CanvasTreeElement.prototype.ondetach): (WI.CanvasTreeElement.prototype.onpopulate): (WI.CanvasTreeElement.prototype._shaderProgramAdded): (WI.CanvasTreeElement.prototype._shaderProgramRemoved): * UserInterface/Views/ShaderProgramTreeElement.js: Added. (WI.ShaderProgramTreeElement): * UserInterface/Views/ShaderProgramContentView.js: Added. (WI.ShaderProgramContentView): (WI.ShaderProgramContentView.prototype.shown): (WI.ShaderProgramContentView.prototype.hidden): (WI.ShaderProgramContentView.prototype.closed): (WI.ShaderProgramContentView.prototype.get supportsSave): (WI.ShaderProgramContentView.prototype.get saveData): (WI.ShaderProgramContentView.prototype.get supportsSearch): (WI.ShaderProgramContentView.prototype.get numberOfSearchResults): (WI.ShaderProgramContentView.prototype.get hasPerformedSearch): (WI.ShaderProgramContentView.prototype.set automaticallyRevealFirstSearchResult): (WI.ShaderProgramContentView.prototype.performSearch): (WI.ShaderProgramContentView.prototype.searchCleared): (WI.ShaderProgramContentView.prototype.searchQueryWithSelection): (WI.ShaderProgramContentView.prototype.revealPreviousSearchResult): (WI.ShaderProgramContentView.prototype.revealNextSearchResult): (WI.ShaderProgramContentView.prototype.revealPosition): (WI.ShaderProgramContentView.prototype._editorFocused): (WI.ShaderProgramContentView.prototype._numberOfSearchResultsDidChange): * UserInterface/Views/ShaderProgramContentView.css: Added. (.content-view.shader-program > .text-editor.shader): (body[dir=ltr] .content-view.shader-program > .text-editor.shader.vertex,): (body[dir=ltr] .content-view.shader-program > .text-editor.shader.fragment,): (body[dir=ltr] .content-view.shader-program > .text-editor.shader + .text-editor.shader): (body[dir=rtl] .content-view.shader-program > .text-editor.shader + .text-editor.shader): (.content-view.shader-program > .text-editor.shader > .type-title): (.content-view.shader-program > .text-editor.shader > .CodeMirror): * UserInterface/Images/DocumentGL.png: Added. * UserInterface/Images/DocumentGL@2x.png: Added. * UserInterface/Views/ResourceIcons.css: (.shader-program .icon): * UserInterface/Base/Main.js: * UserInterface/Views/ContentView.js: (WI.ContentView.createFromRepresentedObject): (WI.ContentView.isViewable): * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match): (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange): * UserInterface/Views/ResourcesTabContentView.js: (WI.ResourcesTabContentView.prototype.canShowRepresentedObject): Plumbing for displaying ShaderProgram content. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor): (WebInspector.TextEditor.prototype._editorFocused): * Scripts/update-codemirror-resources.rb: * UserInterface/External/CodeMirror/clike.js: Added. Add C-like mode for highlighting GLSL. 2017-08-03 Joseph Pecoraro JSContext Inspector: Scripts sometimes do not show in resources tab https://bugs.webkit.org/show_bug.cgi?id=175153 Reviewed by Matt Baker. * UserInterface/Views/ResourceSidebarPanel.js: (WI.ResourceSidebarPanel.prototype.initialLayout): When the ResourceSidebar is lazily created, be sure to add any scripts to the sidebar that are not backed by Resources. (WI.ResourceSidebarPanel.prototype._scriptWasAdded): (WI.ResourceSidebarPanel.prototype._addScript): Extract so it can be used outside of an event handler. 2017-08-03 Devin Rousso Web Inspector: add button to open Inspector^2 https://bugs.webkit.org/show_bug.cgi?id=175108 Reviewed by Brian Burg. * UserInterface/Debug/Bootstrap.js: (updateDebugUI): (WI.runBootstrapOperations): * UserInterface/Views/ButtonToolbarItem.js: (WI.ButtonToolbarItem): (WI.ButtonToolbarItem.prototype.get label): Deleted. (WI.ButtonToolbarItem.prototype.set label): Deleted. * UserInterface/Views/ButtonToolbarItem.css: (.toolbar .item.button): (.toolbar .item.button:not(.disabled):active): (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)): (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)): (.toolbar .item.button > .glyph): (.toolbar .item.button:not(.disabled):active > .glyph): Deleted. (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph): Deleted. (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph): Deleted. (.toolbar .item.button > .label): Deleted. * UserInterface/Views/ActivateButtonToolbarItem.js: (WI.ActivateButtonToolbarItem): (WI.ActivateButtonToolbarItem.prototype.get label): Deleted. (WI.ActivateButtonToolbarItem.prototype.set label): Deleted. * UserInterface/Base/Main.js: (WI.contentLoaded): Remove unused `label` parameter from Toolbar objects. 2017-08-03 Matt Baker Web Inspector: Instrument WebGLProgram created/deleted https://bugs.webkit.org/show_bug.cgi?id=175059 Reviewed by Devin Rousso. This patch adds frontend support for shader program instrumentation. The frontend creates a ShaderProgram model object for each WebGLProgram. Since only canvases with a WebGL context have programs, the Canvas model object does not contain any logic specific to programs. CanvasManager dispatches program added/removed events, and the parent Canvas can be accessed from ShaderProgram but not the other way around. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager): (WI.CanvasManager.prototype.get shaderPrograms): (WI.CanvasManager.prototype.canvasRemoved): (WI.CanvasManager.prototype.programCreated): (WI.CanvasManager.prototype.programDeleted): (WI.CanvasManager.prototype._mainResourceDidChange): (WI.CanvasManager.prototype._dispatchShaderProgramRemoved): * UserInterface/Main.html: * UserInterface/Models/Canvas.js: (WI.Canvas.prototype.nextShaderProgramDisplayNumber): (WI.Canvas): * UserInterface/Models/ShaderProgram.js: Added. (WI.ShaderProgram): (WI.ShaderProgram.prototype.get identifier): (WI.ShaderProgram.prototype.get canvas): (WI.ShaderProgram.prototype.get displayName): * UserInterface/Protocol/CanvasObserver.js: (WI.CanvasObserver.prototype.programCreated): (WI.CanvasObserver.prototype.programDeleted): (WI.CanvasObserver): * UserInterface/Test.html: 2017-08-03 Joseph Pecoraro JSContext Inspector: Recording tab should not be available in New Tab picker https://bugs.webkit.org/show_bug.cgi?id=175155 Reviewed by Brian Burg. * UserInterface/Views/RecordingTabContentView.js: (WI.RecordingTabContentView.isTabAllowed): Only allow the Recording Tab if we have a CanvasAgent. 2017-08-02 Devin Rousso Web Inspector: add stack trace information for each RecordingAction https://bugs.webkit.org/show_bug.cgi?id=174663 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Models/Recording.js: (WI.Recording.prototype.swizzle): Add Array type for swizzling array values. * UserInterface/Models/RecordingAction.js: (WI.RecordingAction): (WI.RecordingAction.fromPayload): (WI.RecordingAction.prototype.get trace): (WI.RecordingAction.prototype.swizzle): (WI.RecordingAction.prototype.toJSON): * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: Added. (WI.RecordingTraceDetailsSidebarPanel): (WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass): (WI.RecordingTraceDetailsSidebarPanel.prototype.inspect): (WI.RecordingTraceDetailsSidebarPanel.prototype.set recording): (WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex): * UserInterface/Views/RecordingTraceDetailsSidebarPanel.css: Added. (.sidebar > .panel.details.recording-trace > .content > .call-frame): (.sidebar > .details.recording-trace > .content > .no-trace-data): (.sidebar > .details.recording-trace > .content > .no-trace-data > .message): * UserInterface/Views/RecordingTabContentView.js: (WI.RecordingTabContentView): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement.prototype.populateContextMenu): * UserInterface/Views/CallFrameView.css: (.call-frame): (body[dir=ltr] .call-frame .icon): (body[dir=rtl] .call-frame .icon): Apply the same trailing margin for CallFrameView icons as TreeElement. 2017-08-02 Devin Rousso Web Inspector: add TreeElement virtualization for the Recording tab https://bugs.webkit.org/show_bug.cgi?id=174968 Reviewed by Joseph Pecoraro. * UserInterface/Views/RecordingNavigationSidebarPanel.js: (WI.RecordingNavigationSidebarPanel): * UserInterface/Views/TreeOutline.js: (WI.TreeOutline): (WI.TreeOutline.prototype.get virtualized): (WI.TreeOutline.prototype.registerScrollVirtualizer): (WI.TreeOutline.prototype.updateVirtualizedElements.walk): (WI.TreeOutline.prototype.updateVirtualizedElements): Add spacer elements before and after the TreeOutline element that will size to ensure that the TreeOutline node still takes up the same amount of space after some of the TreeElements are removed. Whenever the scroll of the container view changes, recalculate the visible area and add/remove TreeElements based on whether they would be in that. This is only possible if every TreeElement has the same vertical height, which is given when setting up the scroll listener on the container view. * UserInterface/Views/TreeElement.js: (WI.TreeElement.prototype.set hidden): (WI.TreeElement.prototype._attach): (WI.TreeElement.prototype.collapse): (WI.TreeElement.prototype.expand): (WI.TreeElement.prototype.reveal): If the TreeOutline is being virtualized, don't add each TreeElement's node to the DOM. They will be added at the end of the frame (via setTimeout) if they are within the visible + padding area of the TreeOutline. 2017-08-01 Devin Rousso Web Inspector: simplify WebInspector with WI https://bugs.webkit.org/show_bug.cgi?id=175058 Reviewed by Joseph Pecoraro. * .eslintrc: * Tools/PrettyPrinting/FormatterDebug.js: * Tools/PrettyPrinting/index.html: * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/Base/*.js: * UserInterface/Controllers/*.js: * UserInterface/Debug/*.js: * UserInterface/Models/*.js: * UserInterface/Protocol/*.js: * UserInterface/Proxies/*.js: * UserInterface/Test/*.js: * UserInterface/Views/*.js: 2017-08-01 Devin Rousso Web Inspector: create Recording tab for displaying recordings https://bugs.webkit.org/show_bug.cgi?id=174484 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.recordingFinished): * UserInterface/Models/Canvas.js: (WebInspector.Canvas.prototype.toggleRecording): * UserInterface/Models/Recording.js: (WebInspector.Recording): (WebInspector.Recording.synthesizeError): (WebInspector.Recording.prototype.get actions): (WebInspector.Recording.prototype.get source): (WebInspector.Recording.prototype.set source): (WebInspector.Recording.prototype.swizzle): * UserInterface/Models/RecordingAction.js: (WebInspector.RecordingAction): (WebInspector.RecordingAction.isFunctionForType): (WebInspector.RecordingAction.get name): (WebInspector.RecordingAction.get parameters): (WebInspector.RecordingAction.prototype.get valid): (WebInspector.RecordingAction.prototype.set valid): (WebInspector.RecordingAction.get isFunction): (WebInspector.RecordingAction.get isGetter): (WebInspector.RecordingAction.get isVisual): (WebInspector.RecordingAction.get stateModifiers): (WebInspector.RecordingAction.prototype.swizzle): (WebInspector.RecordingAction.prototype.parameterSwizzleTypeForTypeAtIndex): * UserInterface/Models/RecordingInitialStateAction.js: Added. (WebInspector.RecordingInitialStateAction): * UserInterface/Views/RecordingTabContentView.js: Added. (WebInspector.RecordingTabContentView): (WebInspector.RecordingTabContentView.tabInfo): (WebInspector.RecordingTabContentView.prototype.get type): (WebInspector.RecordingTabContentView.prototype.canShowRepresentedObject): (WebInspector.RecordingTabContentView.prototype.showRepresentedObject): (WebInspector.RecordingTabContentView.prototype.restoreStateFromCookie): (WebInspector.RecordingTabContentView.prototype.saveStateToCookie): (WebInspector.RecordingTabContentView.prototype.closed): (WebInspector.RecordingTabContentView.prototype._updateActionIndex): (WebInspector.RecordingTabContentView.prototype._scrubberNavigationItemValueChanged): (WebInspector.RecordingTabContentView.prototype._navigationSidebarImport): (WebInspector.RecordingTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged): * UserInterface/Views/RecordingContentView.js: Added. (WebInspector.RecordingContentView): (WebInspector.RecordingContentView.prototype.get navigationItems): (WebInspector.RecordingContentView.prototype.updateActionIndex): (WebInspector.RecordingContentView.prototype.shown): (WebInspector.RecordingContentView.prototype.get supplementalRepresentedObjects): (WebInspector.RecordingContentView.prototype._generateContentCanvas2D): (WebInspector.RecordingContentView.prototype._applyAction): (WebInspector.RecordingContentView.prototype._updateImageGrid): (WebInspector.RecordingContentView.prototype._showGridButtonClicked): * UserInterface/Views/RecordingContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/CanvasContentView.css. (.content-view:not(.tab).recording): (.content-view:not(.tab).recording > .preview-container): (.content-view:not(.tab).recording canvas): * UserInterface/Views/RecordingNavigationSidebarPanel.js: Added. (WebInspector.RecordingNavigationSidebarPanel): (WebInspector.RecordingNavigationSidebarPanel.disallowInstanceForClass): (WebInspector.RecordingNavigationSidebarPanel.prototype.set recording): (WebInspector.RecordingNavigationSidebarPanel.prototype.updateActionIndex): (WebInspector.RecordingNavigationSidebarPanel.prototype.initialLayout): (WebInspector.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked): (WebInspector.RecordingNavigationSidebarPanel.prototype._exportNavigationItemClicked): * UserInterface/Views/RecordingNavigationSidebarPanel.css: Added. (.sidebar > .panel.navigation.recording > :matches(.content, .empty-content-placeholder)): (.sidebar > .panel.navigation.recording > .content > .tree-outline): (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action, .selected).expanded): (.sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): (body[dir=ltr] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): (body[dir=rtl] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="2"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="3"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="4"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="5"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="6"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="7"] .item.action:not(.initial-state)::before): (.sidebar > .panel.navigation.recording > .content .action > .icon): (.sidebar > .panel.navigation.recording > .content .action.function > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.getter > .icon): (.sidebar > .panel.navigation.recording > .content .tree-outline:matches(:focus, .force-focus) .action.attribute.getter.selected > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.boolean > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.number > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.object > .icon): (.sidebar > .panel.navigation.recording > .content .action.attribute.string > .icon): (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action) > .icon): (.sidebar > .panel.navigation.recording > .content .action:matches(.invalid, .missing) > .icon): (body[dir=ltr] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon): (body[dir=rtl] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon): (.sidebar > .panel.navigation.recording > .content .action.visual:not(.selected, .invalid)): (.sidebar > .panel.navigation.recording > .content .action:not(.selected, .initial-state) > .titles .parameter.swizzled): (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles .name,): * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: Added. (WebInspector.RecordingStateDetailsSidebarPanel): (WebInspector.RecordingStateDetailsSidebarPanel.disallowInstanceForClass): (WebInspector.RecordingStateDetailsSidebarPanel.prototype.inspect): (WebInspector.RecordingStateDetailsSidebarPanel.prototype.set recording): (WebInspector.RecordingStateDetailsSidebarPanel.prototype.updateActionIndex): (WebInspector.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): * UserInterface/Views/RecordingStateDetailsSidebarPanel.css: Added. (.sidebar > .panel.details.recording-state > .content > .data-grid): (.sidebar > .panel.details.recording-state > .content > .data-grid tr.modified): (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected).non-standard): (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected) .unavailable): * UserInterface/Views/RecordingActionTreeElement.js: Added. (WebInspector.RecordingActionTreeElement): (WebInspector.RecordingActionTreeElement._generateDOM): (WebInspector.RecordingActionTreeElement.prototype.get index): (WebInspector.RecordingActionTreeElement.get filterableData): (WebInspector.RecordingActionTreeElement.prototype.get filterableData): (WebInspector.RecordingActionTreeElement.prototype.onattach): (WebInspector.RecordingActionTreeElement.prototype.populateContextMenu): * UserInterface/Base/Main.js: (WebInspector.contentLoaded): (WebInspector.instanceForClass): * UserInterface/Base/FileUtilites.js: Added. (WebInspector.saveDataToFile): Moved from UserInterface/Base/Main.js (WebInspector.loadDataFromFile): * UserInterface/Views/ButtonNavigationItem.js: (WebInspector.ButtonNavigationItem.prototype._mouseClicked): Send the native event as part of the data. * UserInterface/Views/CanvasContentView.js: (WebInspector.CanvasContentView): (WebInspector.CanvasContentView.prototype.get navigationItems): (WebInspector.CanvasContentView.prototype.initialLayout): (WebInspector.CanvasContentView.prototype.closed): (WebInspector.CanvasContentView.prototype._toggleRecording): (WebInspector.CanvasContentView.prototype._recordingFinished): * UserInterface/Views/CanvasContentView.css: (.content-view.canvas): * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel.prototype.inspect): * UserInterface/Views/ContentBrowser.js: (WebInspector.ContentBrowser): (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): * UserInterface/Views/ContentBrowserTabContentView.js: (WebInspector.ContentBrowserTabContentView): * UserInterface/Views/ContentView.js: (WebInspector.ContentView.createFromRepresentedObject): (WebInspector.ContentView.isViewable): * UserInterface/Views/ScrubberNavigationItem.js: Added. (WebInspector.ScrubberNavigationItem): (WebInspector.ScrubberNavigationItem.prototype.get value): (WebInspector.ScrubberNavigationItem.prototype.set value): (WebInspector.ScrubberNavigationItem.prototype.get min): (WebInspector.ScrubberNavigationItem.prototype.set min): (WebInspector.ScrubberNavigationItem.prototype.get max): (WebInspector.ScrubberNavigationItem.prototype.set max): (WebInspector.ScrubberNavigationItem.prototype.set disabled): (WebInspector.ScrubberNavigationItem.prototype.get additionalClassNames): (WebInspector.ScrubberNavigationItem.prototype._sliderChanged): * UserInterface/Views/ScrubberNavigationItem.css: Added. (.navigation-bar .item.scrubber): (.navigation-bar .item.scrubber > input): (.navigation-bar .item.scrubber > input[disabled]): Allow the flexible space to be replaced with a navigation item at construction. * UserInterface/Views/DataGridNode.js: (WebInspector.DataGridNode): (WebInspector.DataGridNode.prototype.get element): Allow a list of CSS classes to be added to the node's element. * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.initialLayout): (WebInspector.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange): (WebInspector.SettingsTabContentView.prototype._createExperimentalSettingsView): (WebInspector.SettingsTabContentView.prototype._createDebugSettingsView): Move experimental settings to their own panel. * UserInterface/Views/TabContentView.js: (WebInspector.TabContentView.prototype.get navigationSidebarPanel): Save the NavigationSidebarPanel after it's constructed. * UserInterface/Base/Utilities.js: (Number.countDigits): * UserInterface/Images/Recording.svg: Added. * UserInterface/Images/RenderingFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/TimelineRecordRenderingFrame.svg. * UserInterface/Images/gtk/RenderingFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/TimelineRecordRenderingFrame.svg. * UserInterface/Views/TimelineIcons.css: (.rendering-frame-record .icon): * UserInterface/Views/DOMTreeOutline.css: (@keyframes node-state-changed): * UserInterface/Views/Main.css: (:matches(img, canvas).show-grid): (img.show-grid): Deleted. * UserInterface/Views/NavigationBar.css: (.navigation-bar): * UserInterface/Views/NetworkSidebarPanel.css: (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .tree-outline): * UserInterface/Views/TimelineTabContentView.css: (.timeline.tab.content-view .navigation-bar > .item.radio): * UserInterface/Views/TimelineView.css: (.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .tree-outline): * UserInterface/Views/Variables.css: (:root): Create CSS variables for the DOM modification flash color and the color striping. 2017-07-28 Devin Rousso Web Inspector: Cleanup unused/invalid parameters for TreeElements https://bugs.webkit.org/show_bug.cgi?id=173987 Reviewed by Brian Burg. * UserInterface/Views/TreeElement.js: * UserInterface/Views/GeneralTreeElement.js: * UserInterface/Views/ApplicationCacheFrameTreeElement.js: * UserInterface/Views/BreakpointTreeElement.js: * UserInterface/Views/CSSStyleSheetTreeElement.js: * UserInterface/Views/CallFrameTreeElement.js: * UserInterface/Views/ContentFlowTreeElement.js: * UserInterface/Views/DOMNodeTreeElement.js: * UserInterface/Views/DatabaseTableTreeElement.js: * UserInterface/Views/DatabaseTreeElement.js: * UserInterface/Views/FolderTreeElement.js: * UserInterface/Views/FolderizedTreeElement.js: * UserInterface/Views/FrameTreeElement.js: * UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js: * UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js: * UserInterface/Views/IndexedDatabaseTreeElement.js: * UserInterface/Views/IssueTreeElement.js: * UserInterface/Views/ObjectTreeBaseTreeElement.js: * UserInterface/Views/ProfileNodeTreeElement.js: * UserInterface/Views/ResourceTreeElement.js: * UserInterface/Views/ScriptTreeElement.js: * UserInterface/Views/SearchResultTreeElement.js: * UserInterface/Views/SourceCodeTreeElement.js: * UserInterface/Views/SourceMapResourceTreeElement.js: * UserInterface/Views/StorageTreeElement.js: * UserInterface/Views/TimelineRecordTreeElement.js: * UserInterface/Views/TypeTreeElement.js: 2017-07-26 Devin Rousso Uncaught Exception: undefined is not an object (evaluating 'this._memoryRow.value = Number.bytesToString(this._canvas.memoryCost)') https://bugs.webkit.org/show_bug.cgi?id=174823 Reviewed by Joseph Pecoraro. * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection): (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow): Early return if the view has not called initialLayout, as the rows might not have been constructed yet. * UserInterface/Views/View.js: (WebInspector.View.prototype.get didInitialLayout): Added. 2017-07-26 Devin Rousso Web Inspector: create protocol for recording Canvas contexts https://bugs.webkit.org/show_bug.cgi?id=174481 Reviewed by Joseph Pecoraro. Create model objects that effectively mirror the protocol objects sent for Canvas recordings. * .eslintrc: * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.recordingFinished): * UserInterface/Protocol/CanvasObserver.js: (WebInspector.CanvasObserver.prototype.recordingFinished): * UserInterface/Models/Recording.js: Added. (WebInspector.Recording): (WebInspector.Recording.fromPayload): (WebInspector.Recording.prototype.get type): (WebInspector.Recording.prototype.get initialState): (WebInspector.Recording.prototype.get frames): (WebInspector.Recording.prototype.get data): (WebInspector.Recording.prototype.toJSON): * UserInterface/Models/RecordingAction.js: Added. (WebInspector.RecordingAction): (WebInspector.RecordingAction.fromPayload): (WebInspector.RecordingAction.prototype.get name): (WebInspector.RecordingAction.prototype.get parameters): (WebInspector.RecordingAction.prototype.toJSON): * UserInterface/Models/RecordingFrame.js: Added. (WebInspector.RecordingFrame): (WebInspector.RecordingFrame.fromPayload): (WebInspector.RecordingFrame.prototype.get actions): (WebInspector.RecordingFrame.prototype.get incomplete): (WebInspector.RecordingFrame.prototype.toJSON): 2017-07-26 Brian Burg Remove WEB_TIMING feature flag https://bugs.webkit.org/show_bug.cgi?id=174795 Reviewed by Alex Christensen. Remove fallback for ports that lack WEB_TIMING. * UserInterface/Base/Utilities.js: (timestamp): Deleted. * UserInterface/Protocol/Connection.js: (InspectorBackend.Connection.prototype._dispatchResponse): (InspectorBackend.Connection.prototype._dispatchEvent): (InspectorBackend.Connection.prototype._sendCommandToBackendWithCallback): (InspectorBackend.Connection.prototype._sendCommandToBackendExpectingPromise): * UserInterface/Protocol/MessageDispatcher.js: (WebInspector.dispatchNextQueuedMessageFromBackend): 2017-07-25 Joseph Pecoraro Web Inspector: Don't output "No message" for multi-value logs like console.log(x, y) https://bugs.webkit.org/show_bug.cgi?id=174842 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: Removed "No message". * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments): Track whether or not outputting the next parameter will need a divider in front of it or not. 2017-07-25 Joseph Pecoraro Web Inspector: Fix warnings about console.assert lines without semicolons https://bugs.webkit.org/show_bug.cgi?id=174840 Reviewed by Brian Burg. * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.set selectedSettingsView): (WebInspector.SettingsTabContentView.prototype.setSettingsViewVisible): Add semicolon to assert lines so they can be stripped in optimized builds. 2017-07-25 Joseph Pecoraro Web Inspector: Inline multiple console log values if they are simple https://bugs.webkit.org/show_bug.cgi?id=174746 Reviewed by Matt Baker. * UserInterface/Models/IssueMessage.js: * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.type): Deleted. Remove this as it isn't as useful as directly checking the type. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._appendExtraParameters): (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments): (WebInspector.ConsoleMessageView.prototype._hasSimpleDisplay): (WebInspector.ConsoleMessageView.prototype._isStackTrace): For leading primitive/simple values, display them inline on the console message. * UserInterface/Views/FormattedValue.js: (WebInspector.FormattedValue.hasSimpleDisplay): Provide a helper to determine if a formatted value will be simple. 2017-07-25 Nikita Vasilyev Web Inspector: Styles: Add a switch for Spreadsheet model style editor to experimental settings https://bugs.webkit.org/show_bug.cgi?id=174741 Reviewed by Brian Burg. Show a blank panel when Spreadsheet Style Editor is enabled. * UserInterface/Base/Setting.js: * UserInterface/Main.html: * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: (WebInspector.CSSStyleDetailsSidebarPanel): (WebInspector.CSSStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.js: Added. (WebInspector.RulesStyleSpreadsheetDetailsPanel): (WebInspector.RulesStyleSpreadsheetDetailsPanel.prototype.filterDidChange): (WebInspector.RulesStyleSpreadsheetDetailsPanel.prototype.scrollToSectionAndHighlightProperty): * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings > .settings-view > .container.hidden): (.content-view.settings > .settings-view > .container-centered): (.content-view.settings > .settings-view > .container button): * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype._createDebugSettingsView): * UserInterface/Views/SettingsView.js: (WebInspector.SettingsView.prototype.addCenteredContainer): (WebInspector.SettingsView): Show "Reload Web Inspector" button when Spreadsheet Style Editor setting is modified. 2017-07-25 Devin Rousso Web Inspector: add context menu item for taking a screenshot of a node https://bugs.webkit.org/show_bug.cgi?id=174754 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/ContextMenuUtilities.js: (WebInspector.appendContextMenuItemsForDOMNode): Add "Capture Element Screenshot " context menu item that opens a save dialog with a picture of the node. * UserInterface/Base/Main.js: (WebInspector.saveDataToFile): Allow the saveData to specify whether the contained content is base64Encoded, instead of having to go through a Blob to save base64 data. * UserInterface/Base/Utilities.js: Add Number.pad to add leading zeros up to a certain width. Drive-by: fix failing test for Number.constrain. * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode.prototype.scrollIntoView.resolvedNode.scrollIntoView): Added. (WebInspector.DOMNode.prototype.scrollIntoView.resolvedNode): Added. (WebInspector.DOMNode.prototype.scrollIntoView): Added. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): (WebInspector.DOMTreeElement.prototype._scrollIntoView.resolvedNode.scrollIntoView): Deleted. (WebInspector.DOMTreeElement.prototype._scrollIntoView.resolvedNode): Deleted. (WebInspector.DOMTreeElement.prototype._scrollIntoView): Deleted. * UserInterface/Views/DOMTreeOutline.js: (WebInspector.DOMTreeOutline.prototype.populateContextMenu): Drive-by: move "Scroll Into View" context menu command to WebInspector.appendContextMenuItemsForDOMNode so that it can be triggered from more places than just the DOM tree. 2017-07-24 Nikita Vasilyev Web Inspector: Settings: Some controls overlay settings header https://bugs.webkit.org/show_bug.cgi?id=174804 Reviewed by Matt Baker. * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings .navigation-bar): 2017-07-24 Matt Baker Web Inspector: should only show Canvases in resource type filter if debug setting enabled https://bugs.webkit.org/show_bug.cgi?id=174765 Reviewed by Devin Rousso. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): 2017-07-21 Joseph Pecoraro Web Inspector: inspect(aFunction) should jump to function definition https://bugs.webkit.org/show_bug.cgi?id=149344 Reviewed by Matt Baker. * UserInterface/Protocol/InspectorObserver.js: (WebInspector.InspectorObserver.prototype.inspect): If we receive a function remote object jump to its location if available. 2017-07-21 Joseph Pecoraro Web Inspector: Avoid subclassing WebInspector.Object if we do not need to https://bugs.webkit.org/show_bug.cgi?id=174703 Reviewed by Brian Burg. * UserInterface/Models/LogObject.js: (WebInspector.LogObject): (WebInspector.LogObject.prototype.get startDate): Deleted. Remove unused startDate property as well. * UserInterface/Base/YieldableTask.js: * UserInterface/Debug/ProtocolTrace.js: * UserInterface/Models/AnalyzerMessage.js: * UserInterface/Models/ApplicationCacheFrame.js: * UserInterface/Models/ApplicationCacheManifest.js: * UserInterface/Models/BackForwardEntry.js: * UserInterface/Models/Branch.js: * UserInterface/Models/BreakpointAction.js: * UserInterface/Models/CSSMedia.js: * UserInterface/Models/CSSSelector.js: * UserInterface/Models/CallFrame.js: * UserInterface/Models/CallingContextTree.js: * UserInterface/Models/CallingContextTreeNode.js: * UserInterface/Models/CollectionEntry.js: * UserInterface/Models/CollectionEntryPreview.js: * UserInterface/Models/ConsoleMessage.js: * UserInterface/Models/DOMSearchMatchObject.js: * UserInterface/Models/DatabaseObject.js: * UserInterface/Models/DatabaseTableObject.js: * UserInterface/Models/DebuggerDashboard.js: * UserInterface/Models/DebuggerData.js: * UserInterface/Models/ExecutionContext.js: * UserInterface/Models/ExecutionContextList.js: * UserInterface/Models/GarbageCollection.js: * UserInterface/Models/HeapSnapshotRootPath.js: * UserInterface/Models/IndexedDatabase.js: * UserInterface/Models/IndexedDatabaseObjectStore.js: * UserInterface/Models/IndexedDatabaseObjectStoreIndex.js: * UserInterface/Models/Instrument.js: * UserInterface/Models/KeyboardShortcut.js: * UserInterface/Models/LineWidget.js: * UserInterface/Models/MemoryCategory.js: * UserInterface/Models/MemoryPressureEvent.js: * UserInterface/Models/ObjectPreview.js: * UserInterface/Models/Probe.js: * UserInterface/Models/ProbeSetDataFrame.js: * UserInterface/Models/Profile.js: * UserInterface/Models/ProfileNode.js: * UserInterface/Models/ProfileNodeCall.js: * UserInterface/Models/PropertyDescriptor.js: * UserInterface/Models/PropertyPath.js: * UserInterface/Models/PropertyPreview.js: * UserInterface/Models/ResourceQueryMatch.js: * UserInterface/Models/ResourceQueryResult.js: * UserInterface/Models/ResourceTimingData.js: * UserInterface/Models/Revision.js: * UserInterface/Models/ScopeChainNode.js: * UserInterface/Models/ScriptSyntaxTree.js: * UserInterface/Models/SourceCodePosition.js: * UserInterface/Models/SourceCodeSearchMatchObject.js: * UserInterface/Models/SourceMap.js: * UserInterface/Models/StackTrace.js: * UserInterface/Models/StructureDescription.js: * UserInterface/Models/TextMarker.js: * UserInterface/Models/TextRange.js: * UserInterface/Models/TimelineRange.js: * UserInterface/Models/TypeDescription.js: * UserInterface/Models/TypeSet.js: * UserInterface/Protocol/ProtocolTracer.js: * UserInterface/Proxies/FormatterWorkerProxy.js: * UserInterface/Proxies/HeapSnapshotDiffProxy.js: * UserInterface/Proxies/HeapSnapshotWorkerProxy.js: * UserInterface/Test/TestSuite.js: 2017-07-19 Chris Dumez Drop SQLException type https://bugs.webkit.org/show_bug.cgi?id=174665 Reviewed by Sam Weinig. Use SQLError instead of SQLException, this is what the script should really use here since it is checking the code of an SQLError. * .eslintrc: * UserInterface/Models/DatabaseObject.js: (WebInspector.DatabaseObject.prototype.executeSQL.queryCallback): (WebInspector.DatabaseObject.prototype.executeSQL): (WebInspector.DatabaseObject): 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_RANGE_LOOP_ANALYSIS https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Tim Horton. * Configurations/Base.xcconfig: 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_OBJC_LITERAL_CONVERSION https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Sam Weinig. * Configurations/Base.xcconfig: 2017-07-18 Brian Burg Web Inspector: adjust wording of "clear when page {navigates -> loads}" https://bugs.webkit.org/show_bug.cgi?id=174589 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype._createGeneralSettingsView): 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_NON_LITERAL_NULL_CONVERSION https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Dan Bernstein. * Configurations/Base.xcconfig: 2017-07-18 Andy Estes [Xcode] Enable CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING https://bugs.webkit.org/show_bug.cgi?id=174631 Reviewed by Darin Adler. * Configurations/Base.xcconfig: 2017-07-13 Joseph Pecoraro Web Inspector: Remove unused and untested Page domain commands https://bugs.webkit.org/show_bug.cgi?id=174429 Reviewed by Timothy Hatcher. * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: * Versions/Inspector-iOS-10.0.json: * Versions/Inspector-iOS-10.3.json: * Versions/Inspector-iOS-11.0.json: * Versions/Inspector-iOS-7.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: * Versions/Inspector-iOS-9.3.json: 2017-07-11 Joseph Pecoraro Web Inspector: Correct a typo in the .eslintrc https://bugs.webkit.org/show_bug.cgi?id=174389 Reviewed by Matt Baker. * .eslintrc: 2017-07-11 Joseph Pecoraro Web Inspector: Node Sidebar - Improve wording for Potential Custom Element lacking a Custom definition https://bugs.webkit.org/show_bug.cgi?id=174346 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementState): The text "Waiting to be upgraded" is poor. Any non-standard element with dashes in the name is considered custom, but does not need to be upgraded. Lets use different wording to indicate that it is detected as custom, and lacks a specific Custom Element definition. 2017-07-10 Devin Rousso Web Inspector: Highlight matching CSS canvas clients when hovering contexts in the Resources tab https://bugs.webkit.org/show_bug.cgi?id=174279 Reviewed by Matt Baker. * UserInterface/Controllers/DOMTreeManager.js: (WebInspector.DOMTreeManager.prototype.highlightDOMNodeList): (WebInspector.DOMTreeManager.prototype.highlightSelector): * UserInterface/Views/CanvasTreeElement.js: (WebInspector.CanvasTreeElement.prototype._handleMouseOver): 2017-07-03 Brian Burg Web Replay: remove some unused code https://bugs.webkit.org/show_bug.cgi?id=173903 Rubber-stamped by Joseph Pecoraro. * .eslintrc: * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Controllers/DashboardManager.js: (WebInspector.DashboardManager): * UserInterface/Controllers/ReplayManager.js: Removed. * UserInterface/Images/ReplayPauseButton.svg: Removed. * UserInterface/Images/ReplayPlayButton.svg: Removed. * UserInterface/Images/ReplayRecordingButton.svg: Removed. * UserInterface/Images/gtk/ReplayPauseButton.svg: Removed. * UserInterface/Images/gtk/ReplayPlayButton.svg: Removed. * UserInterface/Images/gtk/ReplayRecordingButton.svg: Removed. * UserInterface/Main.html: * UserInterface/Models/ReplayDashboard.js: Removed. * UserInterface/Models/ReplaySession.js: Removed. * UserInterface/Models/ReplaySessionSegment.js: Removed. * UserInterface/Protocol/ReplayObserver.js: Removed. * UserInterface/Test.html: * UserInterface/Test/Test.js: (WebInspector.loaded): * UserInterface/Views/DashboardView.js: (WebInspector.DashboardView.create): * UserInterface/Views/ReplayDashboardView.css: Removed. * UserInterface/Views/ReplayDashboardView.js: Removed. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._debuggerPaused): (WebInspector.TimelineRecordingContentView.prototype._debuggerResumed): 2017-07-07 Devin Rousso Web Inspector: Resources are sometimes missing from the tree outline right before folderizing https://bugs.webkit.org/show_bug.cgi?id=174277 Reviewed by Joseph Pecoraro. * UserInterface/Views/TreeElement.js: (WebInspector.TreeElement.prototype.expand): 2017-07-07 Devin Rousso Web Inspector: REGRESSION(r217258): WebSocket resource tree elements don't show the connection status https://bugs.webkit.org/show_bug.cgi?id=174274 Reviewed by Brian Burg. * UserInterface/Views/FrameTreeElement.js: (WebInspector.FrameTreeElement): * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.prototype.populateContextMenu): * UserInterface/Views/WebSocketResourceTreeElement.js: (WebInspector.WebSocketResourceTreeElement.prototype.populateContextMenu): Move "Log WebSocket" context menu item to WebSocketResourceTreeElement. 2017-07-07 Devin Rousso Web Inspector: Show all elements currently using a given CSS Canvas https://bugs.webkit.org/show_bug.cgi?id=173965 Reviewed by Joseph Pecoraro. * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.cssCanvasClientNodesChanged): * UserInterface/Models/Canvas.js: (WebInspector.Canvas.prototype.requestCSSCanvasClientNodes): (WebInspector.Canvas.prototype.cssCanvasClientNodesChanged): * UserInterface/Protocol/CanvasObserver.js: (WebInspector.CanvasObserver.prototype.cssCanvasClientNodesChanged): * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel): (WebInspector.CanvasDetailsSidebarPanel.prototype.set canvas): (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout): (WebInspector.CanvasDetailsSidebarPanel.prototype.layout): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection): (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow): Add CSS section for CSS canvases. Currently displays a list of node links, each of which is using the selected canvas via -webkit-canvas. * UserInterface/Main.html: * UserInterface/Views/CanvasDetailsSidebarPanel.css: Added. (.sidebar > .panel.details.canvas .details-section > .content .row.simple > .value > .node-link): * UserInterface/Controllers/DOMTreeManager.js: (WebInspector.DOMTreeManager.prototype.ensureDocument): * UserInterface/Models/Canvas.js: (WebInspector.Canvas.prototype.requestNode): * UserInterface/Views/SearchSidebarPanel.js: (WebInspector.SearchSidebarPanel.prototype.performSearch): Add convenience function that will call DOMAgent.getDocument with an empty function. Should be used when it is necessary that the document has been sent to the frontend, but the document node itself is not needed. 2017-07-07 Joseph Pecoraro Web Inspector: Clean up some unnecessary constructors https://bugs.webkit.org/show_bug.cgi?id=174236 Reviewed by Brian Burg. * UserInterface/Controllers/CodeMirrorBezierEditingController.js: * UserInterface/Controllers/CodeMirrorColorEditingController.js: * UserInterface/Controllers/CodeMirrorGradientEditingController.js: * UserInterface/Views/DividerNavigationItem.js: * UserInterface/Views/FlexibleSpaceNavigationItem.js: * UserInterface/Views/IdleTreeElement.js: 2017-07-06 Devin Rousso Web Inspector: Highlight matching canvas element when hovering contexts in the Resources tab https://bugs.webkit.org/show_bug.cgi?id=174209 Reviewed by Joseph Pecoraro. * UserInterface/Views/CanvasTreeElement.js: (WebInspector.CanvasTreeElement.prototype.onattach): (WebInspector.CanvasTreeElement.prototype._handleMouseOver): (WebInspector.CanvasTreeElement.prototype._handleMouseOut): 2017-07-06 Joseph Pecoraro Web Inspector: Add another Protocol Version https://bugs.webkit.org/show_bug.cgi?id=174193 Reviewed by Brian Burg. * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js: Added. * Versions/Inspector-iOS-11.0.json: Added. 2017-07-05 Devin Rousso Web Inspector: Group Inspector Style Sheets as part of the Stylesheets folder https://bugs.webkit.org/show_bug.cgi?id=173435 Reviewed by Joseph Pecoraro. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match): Add special case for CSSStyleSheetTreeElement. 2017-07-05 Devin Rousso Web Inspector: Split Canvas.svg into icons for 2D and 3D https://bugs.webkit.org/show_bug.cgi?id=174057 Reviewed by Matt Baker. * UserInterface/Images/Canvas2D.svg: Added. * UserInterface/Images/Canvas3D.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/Canvas.svg. * UserInterface/Views/ResourceIcons.css: (.canvas.canvas-2d .icon): (.canvas:matches(.webgl, .webgl2, .webgpu) .icon): (.canvas .icon): Deleted. 2017-07-05 Devin Rousso Web Inspector: Allow users to log any tracked canvas context https://bugs.webkit.org/show_bug.cgi?id=173397 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.resolveCanvasContext): * UserInterface/Views/CanvasTreeElement.js: (WebInspector.CanvasTreeElement.prototype.populateContextMenu): 2017-07-03 Devin Rousso Web Inspector: Support listing WebGL2 and WebGPU contexts https://bugs.webkit.org/show_bug.cgi?id=173396 Reviewed by Joseph Pecoraro. * UserInterface/Models/Canvas.js: (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.displayNameForContextType): 2017-07-01 Dan Bernstein [macOS] Remove code only needed when building for OS X Yosemite https://bugs.webkit.org/show_bug.cgi?id=174067 Reviewed by Tim Horton. * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: 2017-06-30 Joseph Pecoraro Web Inspector: Type token background color in debugger looks poor https://bugs.webkit.org/show_bug.cgi?id=174063 Reviewed by Devin Rousso. * UserInterface/Views/TextEditor.css: CodeMirror widgets do not get range styles like our (.execution-range-highlight). Make a best effort to carry over the styles to widgets. It isn't perfect, but it covers all common situations unless a selection ends inside the widget. The ultimate solution would be to get the expected range styles. 2017-06-30 Joseph Pecoraro Web Inspector: Initial search is sometimes performed twice, produces duplicate results https://bugs.webkit.org/show_bug.cgi?id=174047 Reviewed by Devin Rousso. * UserInterface/Views/SearchTabContentView.js: (WebInspector.SearchTabContentView.prototype.performSearch): The initial layout of the tab content view was setting state to force a search which may happen after a delay, however the global search field was causing its own search to happen. We can clear the flag when a search is being performed to prevent duplicating the search. 2017-06-30 Devin Rousso Web Inspector: Add small delay before showing the progress spinner when loading resources https://bugs.webkit.org/show_bug.cgi?id=173437 Reviewed by Joseph Pecoraro. * UserInterface/Views/ResourceContentView.js: (WebInspector.ResourceContentView): (WebInspector.ResourceContentView.prototype.removeLoadingIndicator): Added. (WebInspector.ResourceContentView.prototype._contentError): (WebInspector.ResourceContentView.prototype._hasContent): Delay the creation of the spinner for 100ms. If the content is available before then, just clear the timeout and the spinner will never be created/shown. We measured an average of 35ms to load and display images with slow cases being around 55ms. 100ms was chosen for the timeout to give some room to allow for abnormally slow loading while not being too long as to be outright noticable. * UserInterface/Views/FontResourceContentView.js: (WebInspector.FontResourceContentView.prototype.contentAvailable): * UserInterface/Views/ImageResourceContentView.js: (WebInspector.ImageResourceContentView.prototype.contentAvailable): * UserInterface/Views/TextResourceContentView.js: (WebInspector.TextResourceContentView.prototype._contentWillPopulate): Calls the new protected function removeLoadingIndicator to ensure that the spinner (and any other element) is removed. This is necessary because TextResourceContentView effectively has two phases of loading its content: getting the content and formatting it for display. The first follows the same path as the other ResourceContentView subclasses, the second waits for the ContentWillPopulate event on SourceCodeTextEditor before it actually adds the content as a subview. In this case, the spinner should only be removed right before the content is actually added, not once it's ready. 2017-06-30 Commit Queue Unreviewed, rolling out r218983. https://bugs.webkit.org/show_bug.cgi?id=174042 Broke Debugger Call Stack TreeOutline (Requested by drousso on #webkit). Reverted changeset: "Web Inspector: Remove unnecessary hasChildren from TreeOutline" https://bugs.webkit.org/show_bug.cgi?id=173986 http://trac.webkit.org/changeset/218983 2017-06-30 Devin Rousso Web Inspector: Default string comparisons to treat numeric characters as numbers https://bugs.webkit.org/show_bug.cgi?id=173984 Reviewed by Joseph Pecoraro. * UserInterface/Base/Utilities.js: (String.prototype.extendedLocaleCompare): * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames.compare): * UserInterface/Controllers/ResourceQueryController.js: (WebInspector.ResourceQueryController.prototype.executeQuery): * UserInterface/Views/ApplicationCacheFrameContentView.js: (WebInspector.ApplicationCacheFrameContentView.prototype._sortDataGrid.localeCompare): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties): * UserInterface/Views/CookieStorageContentView.js: (WebInspector.CookieStorageContentView.prototype._sortDataGrid.localeCompare): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAttributes): (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode): * UserInterface/Views/DOMStorageContentView.js: (WebInspector.DOMStorageContentView.prototype._sortDataGrid.comparator): * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements): * UserInterface/Views/FolderizedTreeElement.js: (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle): * UserInterface/Views/HeapSnapshotDataGridTree.js: (WebInspector.HeapSnapshotDataGridTree.buildSortComparator): * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView.prototype.dataGridSortComparator): * UserInterface/Views/NewTabContentView.js: (WebInspector.NewTabContentView.prototype._updateShownTabs): * UserInterface/Views/OverviewTimelineView.js: (WebInspector.OverviewTimelineView.prototype._compareDataGridNodesByStartTime): * UserInterface/Views/ProbeDetailsSidebarPanel.js: (WebInspector.ProbeDetailsSidebarPanel.prototype.inspect): * UserInterface/Views/QuickConsole.js: (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents): * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid.comparator): * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype._compareTreeElements): * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.compareResourceTreeElements): (WebInspector.ResourceTreeElement.compareFolderAndResourceTreeElements): * UserInterface/Views/ScriptDetailsTimelineView.js: (WebInspector.ScriptDetailsTimelineView.prototype.dataGridSortComparator): * UserInterface/Views/StorageSidebarPanel.js: (WebInspector.StorageSidebarPanel.prototype._compareTreeElements): * UserInterface/Views/TimelineDataGrid.js: (WebInspector.TimelineDataGrid.prototype._sortComparator): 2017-06-29 Devin Rousso Web Inspector: Provide a way for creating a new tab but not making it immediately selected https://bugs.webkit.org/show_bug.cgi?id=173983 Reviewed by Joseph Pecoraro. * UserInterface/Views/TabBar.js: (WebInspector.TabBar): (WebInspector.TabBar.prototype.addTabBarItem): (WebInspector.TabBar.prototype.insertTabBarItem): (WebInspector.TabBar.prototype.removeTabBarItem): (WebInspector.TabBar.prototype._handleClick): (WebInspector.TabBar.prototype._handleNewTabClick): * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser.prototype.addTabForContentView): (WebInspector.TabBrowser.prototype.showTabForContentView): (WebInspector.TabBrowser.prototype.closeTabForContentView): * UserInterface/Base/Main.js: (WebInspector.contentLoaded): (WebInspector._openDefaultTab): (WebInspector._tryToRestorePendingTabs): (WebInspector.showNewTabTab): (WebInspector.createNewTabWithType): Add `options` dictionaries instead of optional parameters. (WebInspector.tabContentViewClassForRepresentedObject): Drive-by fix: remove incorrect placement of WebInspector.Collection check. This function determines TabContentView classes, not ContentView. 2017-06-29 Devin Rousso Web Inspector: Remove unnecessary hasChildren from TreeOutline https://bugs.webkit.org/show_bug.cgi?id=173986 Reviewed by Joseph Pecoraro. * UserInterface/Views/TreeOutline.js: (WebInspector.TreeOutline): (WebInspector.TreeOutline.prototype.appendChild): (WebInspector.TreeOutline.prototype.insertChild): (WebInspector.TreeOutline.prototype.removeChildAtIndex): (WebInspector.TreeOutline.prototype.removeChild): (WebInspector.TreeOutline.prototype.get selectedTreeElementIndex): * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie): * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.get value): 2017-06-29 Devin Rousso Web Inspector: Cleanup unused/invalid parameters for SidebarPanels https://bugs.webkit.org/show_bug.cgi?id=173985 Reviewed by Joseph Pecoraro. * UserInterface/Views/SidebarPanel.js: * UserInterface/Views/NavigationSidebarPanel.js: * UserInterface/Views/NavigationSidebarPanel.css: (.sidebar > .panel.navigation > .overflow-shadow.top): Deleted. * UserInterface/Views/DetailsSidebarPanel.js: * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js: * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: * UserInterface/Views/DOMDetailsSidebarPanel.js: * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: * UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js: * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: * UserInterface/Views/ProbeDetailsSidebarPanel.js: * UserInterface/Views/ResourceDetailsSidebarPanel.js: * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: * UserInterface/Views/StorageSidebarPanel.js: 2017-06-29 Devin Rousso Web Inspector: Create a single -webkit-canvas for use inside popovers https://bugs.webkit.org/show_bug.cgi?id=173820 Reviewed by Matt Baker. * UserInterface/Views/Popover.css: (.popover): * UserInterface/Views/Popover.js: (WebInspector.Popover): (WebInspector.Popover.prototype._drawBackground): 2017-06-28 Devin Rousso Web Inspector: Instrument active pixel memory used by canvases https://bugs.webkit.org/show_bug.cgi?id=173087 Reviewed by Joseph Pecoraro. * .eslintrc: * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.canvasMemoryChanged): * UserInterface/Models/Canvas.js: (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.prototype.get memoryCost): (WebInspector.Canvas.prototype.set memoryCost): * UserInterface/Protocol/CanvasObserver.js: (WebInspector.CanvasObserver.prototype.canvasMemoryChanged): * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection): (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow): (WebInspector.CanvasDetailsSidebarPanel.prototype._canvasMemoryChanged): * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Utilities.js: (Number.bytesToString.value): Add support for gigabyte numbers. 2017-06-27 Joseph Pecoraro Web Inspector: Remove unused Inspector domain events https://bugs.webkit.org/show_bug.cgi?id=173905 Reviewed by Matt Baker. * UserInterface/Protocol/InspectorObserver.js: (WebInspector.InspectorObserver.prototype.detached): Deleted. * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: * Versions/Inspector-iOS-10.0.json: * Versions/Inspector-iOS-10.3.json: * Versions/Inspector-iOS-7.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: * Versions/Inspector-iOS-9.3.json: Remove from legacy backends as well since they did not send it. 2017-06-27 Matt Baker Web Inspector: no discoverable way to dismiss the split console https://bugs.webkit.org/show_bug.cgi?id=167034 Reviewed by Devin Rousso. This patch adds an Xcode-style toggle button to the left of the split console navigation bar. Additionally, the split console code has been broken out into it's own class to reduce the clutter in Main.js/css, and simplify future console maintenance. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WebInspector.loaded): Replace the "split" ContentBrowser with a new ConsoleDrawer class, which encapsulates the drawer height setting and resize behavior. (WebInspector.contentLoaded): The console drawer manages its own height. * UserInterface/Images/HideConsoleDrawer.svg: Added. * UserInterface/Images/ShowConsoleDrawer.svg: Added. Console drawer toggle button images. Styled after corresponding Xcode button. * UserInterface/Main.html: * UserInterface/Views/ConsoleDrawer.css: Added. Moved old #split-content-browser styles over from Main.css. (.console-drawer): (.console-drawer > .navigation-bar): (.console-drawer > .navigation-bar > .item.button:not(.clear-log)): Make button spacing less cramped. (.console-drawer > .navigation-bar > .item:not(.flexible-space)): (.console-drawer > .navigation-bar > :matches(.item.button, .log-scope-bar)): (.console-drawer > .navigation-bar > .item > .glyph,): * UserInterface/Views/ConsoleDrawer.js: Added. New class responsible for console drawer expand / collapse and resizer dragging, which was previously part of Main.js. The console drawer toolbar now has a toggle button, debugging controls, and a call frames path item. The "Show Console Tab" button has been removed. (WebInspector.ConsoleDrawer): (WebInspector.ConsoleDrawer.prototype.get collapsed): (WebInspector.ConsoleDrawer.prototype.set collapsed): (WebInspector.ConsoleDrawer.prototype.get height): (WebInspector.ConsoleDrawer.prototype.shown): (WebInspector.ConsoleDrawer.prototype.layout): (WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown.dockedResizerDrag): (WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown.dockedResizerDragEnd): (WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown): (WebInspector.ConsoleDrawer.prototype._restoreDrawerHeight): (WebInspector.ConsoleDrawer.prototype._updateDrawerHeight): (WebInspector.ConsoleDrawer.prototype._selectedTabContentViewDidChange): When switching to a tab that doesn't support showing the console drawer, hide it without altering the collapsed state. * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView.prototype.get navigationItems): * UserInterface/Views/Main.css: Renamed #split-content-browser to #console-drawer, and moved related styles to ConsoleDrawer.css. (#split-content-browser): Deleted. (#split-content-browser > .navigation-bar): Deleted. (#split-content-browser > .navigation-bar :matches(.find-banner, .find-banner + .divider)): Deleted. (#split-content-browser > .navigation-bar .item): Deleted. (#split-content-browser > .navigation-bar .item:not(.flexible-space)): Deleted. (#split-content-browser .hierarchical-path-component.log-icon .icon): Deleted. (#split-content-browser .hierarchical-path-component.log-icon .title): Deleted. (#split-content-browser .hierarchical-path-component.log-icon select): Deleted. (#split-content-browser > .navigation-bar > :matches(.hierarchical-path, .log-scope-bar)): Deleted. (#split-content-browser > .navigation-bar > .log-scope-bar > li): Deleted. * UserInterface/Views/QuickConsole.js: (WebInspector.QuickConsole): (WebInspector.QuickConsole.prototype._toggleOrFocus): (WebInspector.QuickConsole.prototype._updateStyles): Update top border style in response to change in selected TabBrowser tab or the console drawer collapsed state. (WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged): Deleted. (WebInspector.QuickConsole.prototype.set keyboardShortcutDisabled): Deleted. 2017-06-24 Joseph Pecoraro Remove Reflect.enumerate https://bugs.webkit.org/show_bug.cgi?id=173806 Reviewed by Yusuke Suzuki. * UserInterface/Models/NativeFunctionParameters.js: 2017-06-23 Joseph Pecoraro Web Inspector: Script Timeline bubbles sometimes appear to miss large events https://bugs.webkit.org/show_bug.cgi?id=173746 Reviewed by Brian Burg. * UserInterface/Models/Timeline.js: (WebInspector.Timeline.prototype.addRecord): (WebInspector.Timeline.prototype._tryInsertInSortedOrder): The list of records is assumed to be sorted by the code that draws bubbles however the order in which we receive them may not be sorted. Make a quick effort to sort recent records so that as we are drawing the timeline it is more accurate. 2017-06-23 Brian Burg Web Inspector: RTL: flip all go-to-arrow instances https://bugs.webkit.org/show_bug.cgi?id=173794 Reviewed by Joseph Pecoraro. Move the flipping transform so it applies to all go-to arrows. * UserInterface/Views/DataGrid.css: (body[dir=rtl] .data-grid td .go-to-arrow): * UserInterface/Views/Main.css: (body[dir=rtl] .go-to-arrow): 2017-06-22 Joseph Pecoraro Web Inspector: Pausing with a deep call stack can be very slow, avoid eagerly generating object previews https://bugs.webkit.org/show_bug.cgi?id=173698 Reviewed by Matt Baker. Introduce RemoteObject.prototype.updatePreview which can be used to update the preview of a RemoteObject with a current view for the object. Currently we only use this to fetch the preview that we did not have for the `thisObject` in the scope chain sidebar. However this could be used generically to update a RemoteObject's preview (ObjectPreview) at any time. * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.prototype.canLoadPreview): (WebInspector.RemoteObject.prototype.updatePreview): Allow a RemoteObject to update its preview property. Since this only makes sense on certain Object values include a helper to know when it is appropriate to fetch a preview. * UserInterface/Views/ObjectTreePropertyTreeElement.js: (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle): (WebInspector.ObjectTreePropertyTreeElement.prototype._loadPreviewLazilyIfNeeded): If the object being shown in the sidebar does not have a preview but can load a preview then attempt to load it lazily. This is the case for the `thisObject` which is injected into an ObjectTree in the scope chain sidebar. 2017-06-22 Fujii Hironori [GTK] Web Inspector: Add icon for Canvas.svg https://bugs.webkit.org/show_bug.cgi?id=173580 Reviewed by Carlos Garcia Campos. * UserInterface/Images/gtk/Canvas.svg: Added. 2017-06-21 Fujii Hironori [GTK] Web Inspector: Add NavigationItemCheckers.svg https://bugs.webkit.org/show_bug.cgi?id=173692 Reviewed by Carlos Garcia Campos. * UserInterface/Images/gtk/NavigationItemCheckers.svg: Added. 2017-06-20 Devin Rousso Web Inspector: change the selected ScopeBarItem on mousedown instead of click https://bugs.webkit.org/show_bug.cgi?id=173586 Reviewed by Matt Baker. Both the Tab bar and Sidebar navigation bar switch the active item on "mousedown" instead of on "click". ScopeBarItem should follow this pattern, as it is faster and keeps consistency. * UserInterface/Views/MultipleScopeBarItem.js: (WebInspector.MultipleScopeBarItem): (WebInspector.MultipleScopeBarItem.prototype._handleMouseDown): (WebInspector.MultipleScopeBarItem.prototype._clicked): Deleted. * UserInterface/Views/ScopeBarItem.js: (WebInspector.ScopeBarItem): (WebInspector.ScopeBarItem.prototype._handleMouseDown): (WebInspector.ScopeBarItem.prototype._clicked): Deleted. 2017-06-20 Devin Rousso Web Inspector: Send context attributes for tracked canvases https://bugs.webkit.org/show_bug.cgi?id=173327 Reviewed by Joseph Pecoraro. * UserInterface/Models/Canvas.js: (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.prototype.get contextAttributes): * UserInterface/Views/CanvasDetailsSidebarPanel.js: (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout): (WebInspector.CanvasDetailsSidebarPanel.prototype.layout): (WebInspector.CanvasDetailsSidebarPanel.prototype.sizeDidChange): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection): * UserInterface/Views/DataGridNode.js: (WebInspector.DataGridNode.prototype.createCellContent): Instead of checking if the value of the cell is falsy, check that the key exists in the data. This allows values like `false` to be displayed. 2017-06-19 Devin Rousso Web Inspector: create canvas content view and details sidebar panel https://bugs.webkit.org/show_bug.cgi?id=138941 Reviewed by Joseph Pecoraro. * UserInterface/Models/Canvas.js: (WebInspector.Canvas): (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.prototype.get displayName): (WebInspector.Canvas.requestNode): Added. (WebInspector.Canvas.prototype.requestContent): Added. (WebInspector.Canvas.prototype.saveIdentityToCookie): * UserInterface/Controllers/CanvasManager.js: (WebInspector.CanvasManager.prototype.canvasAdded): (WebInspector.CanvasManager.prototype.canvasRemoved): * UserInterface/Models/Collection.js: * UserInterface/Models/Frame.js: (WebInspector.Frame): (WebInspector.Frame.prototype.get canvasCollection): (WebInspector.Frame.prototype.commitProvisionalLoad): Create a Collection for Canvas in each Frame, and modify it when canvas events are fired. * UserInterface/Views/CanvasContentView.css: Added. (.content-view.canvas > .preview): (.content-view.canvas > .preview > img): * UserInterface/Views/CanvasContentView.js: Added. (WebInspector.CanvasContentView): (WebInspector.CanvasContentView.prototype.get navigationItems): (WebInspector.CanvasContentView.prototype.shown): (WebInspector.CanvasContentView.prototype.hidden): (WebInspector.CanvasContentView.prototype._showPreview): (WebInspector.CanvasContentView.prototype._updateImageGrid): (WebInspector.CanvasContentView.prototype._showGridButtonClicked): * UserInterface/Views/CanvasDetailsSidebarPanel.js: Added. (WebInspector.CanvasDetailsSidebarPanel): (WebInspector.CanvasDetailsSidebarPanel.prototype.inspect): (WebInspector.CanvasDetailsSidebarPanel.prototype.get canvas): (WebInspector.CanvasDetailsSidebarPanel.prototype.set canvas): (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout): (WebInspector.CanvasDetailsSidebarPanel.prototype.layout): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection.this._canvas.requestNode.): (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection): * UserInterface/Views/CanvasTreeElement.js: Added. (WebInspector.CanvasTreeElement): * UserInterface/Views/FrameTreeElement.js: (WebInspector.FrameTreeElement.prototype.onattach): (WebInspector.FrameTreeElement.prototype.ondetach): (WebInspector.FrameTreeElement.prototype.onpopulate): (WebInspector.FrameTreeElement.prototype._canvasWasAdded): (WebInspector.FrameTreeElement.prototype._canvasWasRemoved): (WebInspector.FrameTreeElement): * UserInterface/Base/Main.js: * UserInterface/Views/ContentView.js: (WebInspector.ContentView.createFromRepresentedObject): (WebInspector.ContentView.isViewable): * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): (WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match): (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange): * UserInterface/Views/ResourcesTabContentView.js: (WebInspector.ResourcesTabContentView): (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject): Show Canvas objects and tie them to the correct ContentView and TreeElement subclasses. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Images/Canvas.svg: Added. * UserInterface/Views/ResourceIcons.css: (.canvas .icon): Added new files/rules/strings related to Canvas UI. * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings .navigation-bar): * UserInterface/Base/Setting.js: * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.initialLayout): (WebInspector.SettingsTabContentView.prototype._createGeneralSettingsView): (WebInspector.SettingsTabContentView.prototype._createDebugSettingsView): Add an experimental settings toggle in the Debug view for showing canvas contexts. * UserInterface/Views/FolderizedTreeElement.js: (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle): Drive-by fix: ensure that sorting also includes numbers, so that 1 < 2 < 10. * UserInterface/Views/ImageResourceContentView.js: (WebInspector.ImageResourceContentView.prototype.shown): (WebInspector.ImageResourceContentView.prototype.hidden): (WebInspector.ImageResourceContentView.prototype._updateImageGrid): (WebInspector.ImageResourceContentView.prototype._showGridButtonClicked): (WebInspector.ImageResourceContentView): Drive-by fix: change the activated state of the Show Grid navigation item if it changes in another view. 2017-06-19 Devin Rousso Web Inspector: Unify contextmenu items for all node links/previews https://bugs.webkit.org/show_bug.cgi?id=173187 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/ContextMenuUtilities.js: (WebInspector.appendContextMenuItemsForDOMNode.didGetFunctionDetails): Added. (WebInspector.appendContextMenuItemsForDOMNode.didGetProperty): Added. (WebInspector.appendContextMenuItemsForDOMNode.didResolveNode): Added. (WebInspector.appendContextMenuItemsForDOMNode): Added. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._populateTagContextMenu): (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): (WebInspector.DOMTreeElement.prototype._showCustomElementDefinition): Deleted. * UserInterface/Views/DOMTreeOutline.js: (WebInspector.DOMTreeOutline.prototype.populateContextMenu): (WebInspector.DOMTreeOutline.prototype._populateContextMenu.revealElement): Deleted. (WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement): Deleted. (WebInspector.DOMTreeOutline.prototype._populateContextMenu): Deleted. * UserInterface/Views/RulesStyleDetailsPanel.js: (WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel): Unify common DOM node context menu actions into a single helper function. * UserInterface/Base/DOMUtilities.js: (WebInspector.linkifyNodeReference): (WebInspector.linkifyNodeReferenceElement): Rework parameters to use options dictionary. 2017-06-16 Matt Baker Web Inspector: Instrument 2D/WebGL canvas contexts in the backend https://bugs.webkit.org/show_bug.cgi?id=172623 Reviewed by Devin Rousso and Joseph Pecoraro. * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Controllers/CanvasManager.js: Added. New frontend manager for the Canvas domain. (WebInspector.CanvasManager): (WebInspector.CanvasManager.prototype.get canvases): (WebInspector.CanvasManager.prototype.canvasAdded): (WebInspector.CanvasManager.prototype.canvasRemoved): (WebInspector.CanvasManager.prototype._mainResourceDidChange): * UserInterface/Main.html: New files. * UserInterface/Models/Canvas.js: Added. (WebInspector.Canvas): (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.displayNameForContextType): Get displayable text "2D" or "WebGL" based on context type. (WebInspector.Canvas.resetUniqueDisplayNameNumbers): Called by CanvasManager when canvases are cleared. (WebInspector.Canvas.prototype.get identifier): (WebInspector.Canvas.prototype.get contextType): (WebInspector.Canvas.prototype.get frame): (WebInspector.Canvas.prototype.get cssCanvasName): For CSS canvases, the identifier passed to getCSSCanvasContext. (WebInspector.Canvas.prototype.get displayName): Get displayable canvas name. The name depends on how the canvas was created, and the information available: - getCSSCanvasContext: "CSS Canvas " - getContext: "Canvas #" - Otherwise: "Canvas 1", "Canvas 2", ... (WebInspector.Canvas.saveIdentityToCookie): * UserInterface/Protocol/CanvasObserver.js: Added. (WebInspector.CanvasObserver.prototype.canvasAdded): (WebInspector.CanvasObserver.prototype.canvasRemoved): (WebInspector.CanvasObserver): * UserInterface/Test.html: * UserInterface/Test/Test.js: (WebInspector.loaded): 2017-06-16 Matt Lewis Unreviewed, rolling out r218376. The patch cause multiple Layout Test Crashes. Reverted changeset: "Web Inspector: Instrument 2D/WebGL canvas contexts in the backend" https://bugs.webkit.org/show_bug.cgi?id=172623 http://trac.webkit.org/changeset/218376 2017-06-15 Matt Baker Web Inspector: Instrument 2D/WebGL canvas contexts in the backend https://bugs.webkit.org/show_bug.cgi?id=172623 Reviewed by Devin Rousso. * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Controllers/CanvasManager.js: Added. New frontend manager for the Canvas domain. (WebInspector.CanvasManager): (WebInspector.CanvasManager.prototype.get canvases): (WebInspector.CanvasManager.prototype.canvasAdded): (WebInspector.CanvasManager.prototype.canvasRemoved): (WebInspector.CanvasManager.prototype._mainResourceDidChange): * UserInterface/Main.html: New files. * UserInterface/Models/Canvas.js: Added. (WebInspector.Canvas): (WebInspector.Canvas.fromPayload): (WebInspector.Canvas.displayNameForContextType): Get displayable text "2D" or "WebGL" based on context type. (WebInspector.Canvas.resetUniqueDisplayNameNumbers): Called by CanvasManager when canvases are cleared. (WebInspector.Canvas.prototype.get identifier): (WebInspector.Canvas.prototype.get contextType): (WebInspector.Canvas.prototype.get frame): (WebInspector.Canvas.prototype.get cssCanvasName): For CSS canvases, the identifier passed to getCSSCanvasContext. (WebInspector.Canvas.prototype.get displayName): Get displayable canvas name. The name depends on how the canvas was created, and the information available: - getCSSCanvasContext: "CSS Canvas " - getContext: "Canvas #" - Otherwise: "Canvas 1", "Canvas 2", ... (WebInspector.Canvas.saveIdentityToCookie): * UserInterface/Protocol/CanvasObserver.js: Added. (WebInspector.CanvasObserver.prototype.canvasAdded): (WebInspector.CanvasObserver.prototype.canvasRemoved): (WebInspector.CanvasObserver): * UserInterface/Test.html: * UserInterface/Test/Test.js: (WebInspector.loaded): 2017-06-15 Joseph Pecoraro Web Inspector: Search highlight doesn't show up in resources when paused https://bugs.webkit.org/show_bug.cgi?id=173438 Reviewed by Matt Baker. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine): Previously we were bailing if executionLineNumber was NaN, which means that when we were paused we were incorrectly disabling highlights in any resource that does not have the active callframe. Relax this and make it match the intended behavior of only disabling highlights if the highlight line matches the execution line. 2017-06-15 Joseph Pecoraro Uncaught Exception: TypeError: null is not an object (evaluating 'this.contentBrowser.contentViewForRepresentedObject') https://bugs.webkit.org/show_bug.cgi?id=173425 Reviewed by Devin Rousso. * UserInterface/Views/ContentBrowserTabContentView.js: (WebInspector.ContentBrowserTabContentView.prototype.shown): Reorder slightly so the NavigationSidebar has its ContentBrowser set before anyone tries to restore views in the sidebar. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView): Try to select a script/resource content view instead of nothing. (WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie): When a resource is selected, save it using the normal path. * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel.prototype.canShowDifferentContentView): Remove a reference to an unused / stale member variable. 2017-06-14 Nikita Vasilyev Web Inspector: Pretty print / type info / code coverage buttons disappear after switching tabs https://bugs.webkit.org/show_bug.cgi?id=162515 Reviewed by Joseph Pecoraro. Each ContentView owns a list of NavigationItems. When the ContentView moves across Tabs (ContentBrowsers) it removes its NavigationItems from the old Tab's NavigationBar and adds them to the new Tab's NavigationBar. When switching back to the original tab the ContentView is restored, but its NavigationItems are not carried back. * UserInterface/Views/ContentBrowser.js: (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): Add a forceUpdate parameter that is needed when navigationItems are unchanged but navigationBar is different. (WebInspector.ContentBrowser.prototype._removeAllNavigationItems): Remove navigation items even when their navigationBar is no longer a current navigationBar, e.g. a navigationBar of the previous tab. (WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange): * UserInterface/Views/ContentViewContainer.js: (WebInspector.ContentViewContainer.prototype._takeOwnershipOfContentView): 2017-06-14 Devin Rousso Web Inspector: REGRESSION: SVG files and favicon don't display properly https://bugs.webkit.org/show_bug.cgi?id=173389 Reviewed by Joseph Pecoraro. * UserInterface/Views/ImageResourceContentView.css: (.content-view.resource.image img): Don't set a `min-width` as it has odd interactions with flexbox. 2017-06-13 Nikita Vasilyev Web Inspector: Console: Message icons overlay source location https://bugs.webkit.org/show_bug.cgi?id=173291 Reviewed by Matt Baker. * UserInterface/Views/ConsoleMessageView.css: (.console-message-location.call-frame): This should be a safe change since a method name and a source link already have max-width set to 20vw and 30vw respectively. 2017-06-13 Nikita Vasilyev Web Inspector: Don't use -webkit-user-modify CSS property https://bugs.webkit.org/show_bug.cgi?id=173232 Reviewed by Devin Rousso. Replace -webkit-user-modify CSS property with contentEditable HTML attribute. * UserInterface/Views/Editing.css: (.editing): * UserInterface/Views/EditingSupport.js: (cleanUpAfterEditing): * UserInterface/Views/VisualStyleSelectorTreeItem.css: (.item.visual-style-selector-item:not(.dom-element-icon).editable > .titles > .title): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype.ondeselect): (WebInspector.VisualStyleSelectorTreeItem.prototype._handleMainTitleMouseDown): (WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector): 2017-06-13 Sam Weinig Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec. https://bugs.webkit.org/show_bug.cgi?id=80733 Reviewed by Chris Dumez. * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js: (HeapSnapshot.prototype._isNodeGlobalObject): 2017-06-12 Devin Rousso Web Inspector: Add grid to images to clarify transparency and image size https://bugs.webkit.org/show_bug.cgi?id=173184 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Setting.js: Add setting for controlling the image grid. * UserInterface/Images/NavigationItemCheckers.svg: Added. * UserInterface/Views/ImageResourceContentView.css: (.content-view.resource.image): (.content-view.resource.image img): Replace the border spacing around the image with padding on the container. This is required because a border will extend the area that is effected by `background-image`, meaning that the checkerboard would appear in that area as well, giving misleading information as to the size of the image. * UserInterface/Views/ImageResourceContentView.js: (WebInspector.ImageResourceContentView): (WebInspector.ImageResourceContentView.prototype.get navigationItems): Added. (WebInspector.ImageResourceContentView.prototype.contentAvailable): (WebInspector.ImageResourceContentView.prototype.shown): Added. (WebInspector.ImageResourceContentView.prototype._toggleImageGrid): Added. (WebInspector.ImageResourceContentView.prototype._showGridButtonClicked): Added. (WebInspector.ImageResourceContentView.prototype.get imageElement): Deleted. Apply the CSS class for showing the grid when the added navigation item is activated. * UserInterface/Views/Main.css: (img.show-grid): Generates a checkerboard pattern via `background-image` using the following process: - four `linear-gradients` are drawn, one in each corner - each draws one half of a 20x20 square, specified by `background-size` - they are then repositioned using `background-position` so that the two halfs align +------+ \--2 |1 /\ 2| |\ | | / \ | => | \| |/ \| => 4--\ |\ /| => 1--/ | \ / | => | /| |4 \/ 3| |/ | +------+ /--3 2017-06-10 Dan Bernstein Reverted r218056 because it made the IDE reindex constantly. * Configurations/DebugRelease.xcconfig: 2017-06-10 Dan Bernstein [Xcode] With Xcode 9 developer beta, everything rebuilds when switching between command-line and IDE https://bugs.webkit.org/show_bug.cgi?id=173223 Reviewed by Sam Weinig. The rebuilds were happening due to a difference in the compiler options that the IDE and xcodebuild were specifying. Only the IDE was passing the -index-store-path option. To make xcodebuild pass that option, too, set CLANG_INDEX_STORE_ENABLE to YES if it is unset, and specify an appropriate path in CLANG_INDEX_STORE_PATH. * Configurations/DebugRelease.xcconfig: 2017-06-10 Devin Rousso Web Inspector: REGRESSION(r217749): Event listeners are removed even if they haven't been added https://bugs.webkit.org/show_bug.cgi?id=173185 Reviewed by Joseph Pecoraro. * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel): (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): (WebInspector.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners): Maintain a member variable flag such that event listeners are only removed if it is true. It is only set to true once the event listeners are added. 2017-06-09 Devin Rousso Web Inspector: REGRESSION(r217258): Misspelled variable names https://bugs.webkit.org/show_bug.cgi?id=173189 Reviewed by Joseph Pecoraro. * UserInterface/Base/Main.js: (WebInspector.tabContentViewClassForRepresentedObject): * UserInterface/Views/ResourceIcons.css: (.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): (.large .resource-icon.resource-type-stylesheet .icon): Deleted. 2017-06-09 Joseph Pecoraro Web Inspector: Web inspector does not show non-shadow children of an element with a shadow root (e.g.
  • . * UserInterface/Views/SearchResultTreeElement.js: (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Flip the leading and trailing context in RTL so that the highlight is not overflowed to the left when too much context is included on the right side. Less context must be used in RTL because we must not overflow to the right, as it may hide the result. And, we don't know the exact starting character either as it may be overflowed to the right as the user resizes the expanded sidebar larger or smaller. So show less context to be conservative about never overflowing the highlighted result string. * UserInterface/Views/SearchSidebarPanel.css: (.sidebar > .panel.navigation.search .item.source-code-match .title): When in RTL, show source code matches as LTR with text-align to right. 2017-04-03 Devin Rousso Web Inspector: clicking on the body of a CSS rule after editing the selector causes the section to disappear https://bugs.webkit.org/show_bug.cgi?id=169803 Reviewed by Timothy Hatcher. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype._handleKeyDown): (WebInspector.CSSStyleDeclarationSection.prototype._handleBlur): Keep the section marked as `_editorActive` if the action taken would still place focus within the section (selector or properties). Doing so will prevent it from being removed. 2017-04-03 Brian Burg Web Inspector: RTL: hierarchical path component labels should guess directionality based on content https://bugs.webkit.org/show_bug.cgi?id=170298 Reviewed by Timothy Hatcher. * UserInterface/Views/HierarchicalPathComponent.js: (WebInspector.HierarchicalPathComponent): Use dir="auto" since this will properly set 'unicode-bidi:isolate' for form elements too. This is applied to the title label and to the from showing. 2017-03-09 Matt Baker Web Inspector: Add XHR breakpoints UI https://bugs.webkit.org/show_bug.cgi?id=168763 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: New UI strings. * UserInterface/Controllers/DOMDebuggerManager.js: Plumbing for XHR breakpoints. Like DOM breakpoints, they are tracked per-page. Unlike DOM breakpoints, they have no separate "resolved" state, and are simply added/removed as the main frame changes. (WebInspector.DOMDebuggerManager): (WebInspector.DOMDebuggerManager.prototype.get allRequestsBreakpoint): (WebInspector.DOMDebuggerManager.prototype.get xhrBreakpoints): (WebInspector.DOMDebuggerManager.prototype.isBreakpointRemovable): (WebInspector.DOMDebuggerManager.prototype.removeDOMBreakpoint): (WebInspector.DOMDebuggerManager.prototype.addXHRBreakpoint): (WebInspector.DOMDebuggerManager.prototype.removeXHRBreakpoint): (WebInspector.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints): (WebInspector.DOMDebuggerManager.prototype._detachXHRBreakpoint): (WebInspector.DOMDebuggerManager.prototype._updateXHRBreakpoint.breakpointUpdated): (WebInspector.DOMDebuggerManager.prototype._updateXHRBreakpoint): (WebInspector.DOMDebuggerManager.prototype._resolveXHRBreakpoint): (WebInspector.DOMDebuggerManager.prototype._saveXHRBreakpoints): (WebInspector.DOMDebuggerManager.prototype._domBreakpointDisabledStateDidChange): (WebInspector.DOMDebuggerManager.prototype._xhrBreakpointDisabledStateDidChange): (WebInspector.DOMDebuggerManager.prototype._mainResourceDidChange): (WebInspector.DOMDebuggerManager.prototype._saveBreakpoints): Deleted. Renamed `saveDOMBreakpoints`. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._pauseReasonFromPayload): Plumbing for XHR breakpoint pause reason. * UserInterface/Controllers/XHRBreakpointTreeController.js: Added. Creates the "All Requests" breakpoint, handles DOMDebuggerManager messages, and updates an associated tree outline as XHR breakpoints are added and removed. (WebInspector.XHRBreakpointTreeController): (WebInspector.XHRBreakpointTreeController.prototype.revealAndSelect): (WebInspector.XHRBreakpointTreeController.prototype.disconnect): (WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointAdded): (WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointRemoved): (WebInspector.XHRBreakpointTreeController.prototype._mainResourceDidChange): (WebInspector.XHRBreakpointTreeController.prototype._reset): * UserInterface/Main.html: New files. * UserInterface/Models/XHRBreakpoint.js: Added. New model class. XHR breakpoints have an associated URL, which is matched against the request URL when deciding whether to break. An empty URL matches all XMLHttpRequests. (WebInspector.XHRBreakpoint): (WebInspector.XHRBreakpoint.prototype.get documentURL): (WebInspector.XHRBreakpoint.prototype.get url): (WebInspector.XHRBreakpoint.prototype.get disabled): (WebInspector.XHRBreakpoint.prototype.set disabled): (WebInspector.XHRBreakpoint.prototype.get serializableInfo): (WebInspector.XHRBreakpoint.prototype.saveIdentityToCookie): * UserInterface/Test.html: New files. * UserInterface/Views/ContentView.js: (WebInspector.ContentView.createFromRepresentedObject): Plumbing for new represented object type, to prevent runtime assertion. * UserInterface/Views/DOMBreakpointTreeElement.js: (WebInspector.DOMBreakpointTreeElement): Reuse BreakpointTreeElement styles. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): (WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie): (WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie): (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection): (WebInspector.DebuggerSidebarPanel.prototype._addXHRBreakpointButtonClicked): (WebInspector.DebuggerSidebarPanel.prototype.willDismissPopover): * UserInterface/Views/InputPopover.css: Added. (.popover .input-popover-content): (.popover .input-popover-content > .editor): (.popover .input-popover-content > .editor > .CodeMirror): (.popover .input-popover-content > .editor > .CodeMirror-scroll): * UserInterface/Views/InputPopover.js: Added. New general purpose popover class. Style and structure lifted from the Popover implementation used by the Probe Expressions UI. A follow-up has been filed to switch that UI over to this new class: https://bugs.webkit.org/show_bug.cgi?id=169428. (WebInspector.InputPopover): (WebInspector.InputPopover.prototype.get value): (WebInspector.InputPopover.prototype.get result): (WebInspector.InputPopover.prototype.show): (WebInspector.InputPopover.prototype._presentOverTargetElement): * UserInterface/Views/XHRBreakpointTreeElement.js: Added. Tree element class for XHR breakpoints. Behaves identically to script and DOM breakpoint tree elements. (WebInspector.XHRBreakpointTreeElement): Reuse BreakpointTreeElement styles. (WebInspector.XHRBreakpointTreeElement.prototype.onattach): (WebInspector.XHRBreakpointTreeElement.prototype.ondetach): (WebInspector.XHRBreakpointTreeElement.prototype.ondelete): (WebInspector.XHRBreakpointTreeElement.prototype.onenter): (WebInspector.XHRBreakpointTreeElement.prototype.onspace): (WebInspector.XHRBreakpointTreeElement.prototype.populateContextMenu): (WebInspector.XHRBreakpointTreeElement.prototype._statusImageElementClicked): (WebInspector.XHRBreakpointTreeElement.prototype._statusImageElementFocused): (WebInspector.XHRBreakpointTreeElement.prototype._statusImageElementMouseDown): (WebInspector.XHRBreakpointTreeElement.prototype._toggleBreakpoint): (WebInspector.XHRBreakpointTreeElement.prototype._updateStatus): 2017-03-09 Matt Baker REGRESSION (r196271): Web Inspector: DOM element loses focus/active selection after committing an inline attribute editor in DOMTreeOutline https://bugs.webkit.org/show_bug.cgi?id=168119 Reviewed by Brian Burg. Fix a regression caused by http://trac.webkit.org/changeset/196271, which updated WebInspector.isEventTargetAnEditableField to detect the editing scenarios used by DOMTreeElement and DataGrid. This subtly changed the behavior of WebInspector._focusChanged, which expected all editable fields to be backed by a CodeMirror instance. * UserInterface/Base/Main.js: 2017-03-09 Joseph Pecoraro Web Inspector: Show HTTP protocol version and other Network Load Metrics (IP Address, Priority, Connection ID) https://bugs.webkit.org/show_bug.cgi?id=29687 Reviewed by Matt Baker and Brian Burg. These columns are available in the Network DataGrids, but are initially hidden. They can be shown by right clicking on the table header and showing these columns. We are going to rework the default list of visible columns later. * Localizations/en.lproj/localizedStrings.js: New localized strings for data grid headers and Low/Medium/High. * UserInterface/Controllers/FrameResourceManager.js: (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): * UserInterface/Protocol/NetworkObserver.js: (WebInspector.NetworkObserver.prototype.loadingFinished): Pass metrics on to the Resource. * UserInterface/Models/Resource.js: (WebInspector.Resource): (WebInspector.Resource.displayNameForType): (WebInspector.Resource.responseSourceFromPayload): (WebInspector.Resource.networkPriorityFromPayload): (WebInspector.Resource.connectionIdentifierFromPayload): (WebInspector.Resource.prototype.get protocol): (WebInspector.Resource.prototype.get priority): (WebInspector.Resource.prototype.get remoteAddress): (WebInspector.Resource.prototype.get connectionIdentifier): (WebInspector.Resource.prototype.updateWithMetrics): Include metrics accessors and default values. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView): Add metrics columns if the backend may be sending them. * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype.get data): (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): (WebInspector.ResourceTimelineDataGridNode.prototype._displayNameForPriority): (WebInspector.ResourceTimelineDataGridNode.prototype._cachedCellContent): Display strings for new columns. * UserInterface/Views/TimelineDataGridNode.js: * UserInterface/Views/TimelineRecordBar.js: (WebInspector.TimelineRecordBar.prototype.refresh): Avoid assertions if Graph column is unavailable. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid): (WebInspector.DataGrid.prototype.createSettings): (WebInspector.DataGrid.prototype.setColumnVisible): Better support for restoring user preference of initially hidden columns which the user may have shown. * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel): (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Show the Protocol and Priority in the Resources sidebar. 2017-03-09 Nikita Vasilyev Web Inspector: Show individual messages in the content pane for a WebSocket https://bugs.webkit.org/show_bug.cgi?id=169011 Reviewed by Joseph Pecoraro. When selecting a Web Socket in Network panel or Resources, display a table of all messages that have been sent and received. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Controllers/FrameResourceManager.js: (WebInspector.FrameResourceManager.prototype.webSocketWillSendHandshakeRequest): Add a walltime parameter. (WebInspector.FrameResourceManager.prototype._webSocketFrameReceivedOrSent): Fix a bug: masked messages are outgoing, not incoming. * UserInterface/Images/ArrowUp.svg: Added. * UserInterface/Images/gtk/ArrowUp.svg: Added. Add an icon for outgoing messages. * UserInterface/Main.html: * UserInterface/Models/WebSocketResource.js: (WebInspector.WebSocketResource): (WebInspector.WebSocketResource.prototype.get walltime): (WebInspector.WebSocketResource.prototype.addFrame): (WebInspector.WebSocketResource.prototype._walltimeForWebSocketTimestamp): * UserInterface/Protocol/NetworkObserver.js: (WebInspector.NetworkObserver.prototype.webSocketWillSendHandshakeRequest): (WebInspector.NetworkObserver.prototype.webSocketFrameSent): (WebInspector.NetworkObserver.prototype.webSocketFrameError): (WebInspector.NetworkObserver): * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged): * UserInterface/Views/ResourceClusterContentView.js: (WebInspector.ResourceClusterContentView.prototype.get responseContentView): * UserInterface/Views/WebSocketContentView.css: Added. (.web-socket.content-view > .data-grid): (.web-socket.content-view > .data-grid table.data): (.web-socket.content-view > .data-grid td.data-column,): (body[dir=ltr] .web-socket.content-view > .data-grid .data-column > div): (body[dir=rtl] .web-socket.content-view > .data-grid .data-column > div): (.web-socket.content-view .icon): (body[dir=ltr] .web-socket.content-view .icon): (body[dir=rtl] .web-socket.content-view .icon): (.web-socket.content-view .outgoing .icon): (.web-socket.content-view .data-grid.variable-height-rows table.data tr:nth-child(odd)): (.web-socket.content-view .data-grid table.data tr.revealed): (.web-socket.content-view .data-grid.variable-height-rows table.data tr.outgoing): (.web-socket.content-view .data-grid.variable-height-rows table.data tr.non-text-frame): * UserInterface/Views/WebSocketContentView.js: Added. (WebInspector.WebSocketContentView): Only show Time column when walltime is available. (WebInspector.WebSocketContentView.textForOpcode): (WebInspector.WebSocketContentView.prototype.shown): (WebInspector.WebSocketContentView.prototype.hidden): (WebInspector.WebSocketContentView.prototype.addFrame): (WebInspector.WebSocketContentView.prototype._updateFrames): Only render frames that haven't been rendered yet. (WebInspector.WebSocketContentView.prototype._addRow): (WebInspector.WebSocketContentView.prototype._timeStringFromTimestamp): 2017-03-09 Matt Baker Web Inspector: DOMTreeManager dispatches DocumentUpdated twice when the document is cleared https://bugs.webkit.org/show_bug.cgi?id=168984 Reviewed by Timothy Hatcher. * UserInterface/Controllers/DOMTreeManager.js: (WebInspector.DOMTreeManager.prototype._setDocument): Compare old and new document values before dispatching message. 2017-03-09 Devin Rousso Web Inspector: Add settings for controlling Styles sidebar intelligence https://bugs.webkit.org/show_bug.cgi?id=169181 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Setting.js: Add three new settings: - stylesShowInlineWarnings - stylesInsertNewline - stylesSelectOnFirstClick * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor): (WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown): (WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp): (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update): (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings > .separator): Added. (.content-view.settings > .setting-container): (.content-view.settings > .setting-container.combined): * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.layout.createContainer): (WebInspector.SettingsTabContentView.prototype.layout.createSeparator): Added. (WebInspector.SettingsTabContentView.prototype.layout): 2017-03-08 Matt Baker Web Inspector: Add DOM breakpoints UI for node/subtree modification events https://bugs.webkit.org/show_bug.cgi?id=168101 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: New UI strings. * UserInterface/Base/Main.js: (WebInspector.loaded): Add new manager. * UserInterface/Controllers/DOMBreakpointTreeController.js: Added. Handles messages from DOMDebuggerManager, and updates an associated tree outline as DOM breakpoints are added and removed. (WebInspector.DOMBreakpointTreeController): (WebInspector.DOMBreakpointTreeController.appendBreakpointContextMenuItems): (WebInspector.DOMBreakpointTreeController.prototype.disconnect): (WebInspector.DOMBreakpointTreeController.prototype._addBreakpointTreeElement): (WebInspector.DOMBreakpointTreeController.prototype._removeBreakpointTreeElement): (WebInspector.DOMBreakpointTreeController.prototype._domBreakpointAdded): (WebInspector.DOMBreakpointTreeController.prototype._domBreakpointRemoved): (WebInspector.DOMBreakpointTreeController.prototype._domBreakpointResolvedStateDidChange): (WebInspector.DOMBreakpointTreeController.prototype._mainResourceDidChange): * UserInterface/Controllers/DOMDebuggerManager.js: Added. New frontend manager for the DOMDebugger domain. A DOM breakpoint is described by a location (URL and node path) and type. The manager keeps all known DOM breakpoints in memory, and considers a breakpoint to be "resolved" once its location is pushed to the frontend. Breakpoints located within a child frame are still associated with the main frame. Whenever a the main resource of a child frame changes, all unresolved breakpoints associated with the main frame are speculatively resolved. (WebInspector.DOMDebuggerManager): (WebInspector.DOMDebuggerManager.prototype.get supported): (WebInspector.DOMDebuggerManager.prototype.get domBreakpoints): (WebInspector.DOMDebuggerManager.prototype.domBreakpointsForNode): (WebInspector.DOMDebuggerManager.prototype.addDOMBreakpoint): (WebInspector.DOMDebuggerManager.prototype.removeDOMBreakpoint): (WebInspector.DOMDebuggerManager.prototype._detachDOMBreakpoint): (WebInspector.DOMDebuggerManager.prototype._detachBreakpointsForFrame): (WebInspector.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints): (WebInspector.DOMDebuggerManager.prototype._resolveDOMBreakpoint): (WebInspector.DOMDebuggerManager.prototype._updateDOMBreakpoint): (WebInspector.DOMDebuggerManager.prototype._saveBreakpoints): (WebInspector.DOMDebuggerManager.prototype._domBreakpointDisabledStateDidChange): (WebInspector.DOMDebuggerManager.prototype._childFrameWasRemoved): (WebInspector.DOMDebuggerManager.prototype._mainFrameDidChange): (WebInspector.DOMDebuggerManager.prototype._mainResourceDidChange): (WebInspector.DOMDebuggerManager.prototype._nodeInserted): (WebInspector.DOMDebuggerManager.prototype._nodeRemoved): * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._pauseReasonFromPayload): Plumbing for DOM breakpoint pause reason. * UserInterface/Images/DOMBreakpoint.svg: Added. New art. Visually very similar to a script breakpoint, with some tweaks to make it suitable for display in the DOM tree gutter. * UserInterface/Main.html: New files. * UserInterface/Models/DOMBreakpoint.js: Added. New model class. DOM breakpoints are either associated with a DOM node when created, or constructed from a cookie and resolved in the future. (WebInspector.DOMBreakpoint): (WebInspector.DOMBreakpoint.prototype.get type): (WebInspector.DOMBreakpoint.prototype.get url): (WebInspector.DOMBreakpoint.prototype.get path): (WebInspector.DOMBreakpoint.prototype.get disabled): (WebInspector.DOMBreakpoint.prototype.set disabled): (WebInspector.DOMBreakpoint.prototype.get domNodeIdentifier): (WebInspector.DOMBreakpoint.prototype.set domNodeIdentifier): (WebInspector.DOMBreakpoint.prototype.get serializableInfo): (WebInspector.DOMBreakpoint.prototype.saveIdentityToCookie): * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: The DOMDebugger should not be enabled for legacy backends, since legacy backend support was never tested and may have issues. * UserInterface/Test.html: New files. * UserInterface/Test/Test.js: (WebInspector.loaded): Add new manager. * UserInterface/Views/ContentView.js: (WebInspector.ContentView.createFromRepresentedObject): (WebInspector.ContentView.resolvedRepresentedObjectForRepresentedObject): Plumbing for additional represented object types. DOMNode is included because the Debugger sidebar panel shows DOM breakpoint tree elements as children of a DOM node tree element. * UserInterface/Views/DOMBreakpointTreeElement.css: Added. (.item.dom-breakpoint .icon): (.item.dom-breakpoint.breakpoint-paused-icon .icon): (.item.dom-breakpoint .status img): (.item.dom-breakpoint .status > img.disabled): Styles for "Pause Reason" and "DOM Breakpoints" sections. * UserInterface/Views/DOMBreakpointTreeElement.js: Added. Tree element class for DOM breakpoints. Includes a breakpoint status element and context menu for delete/disable actions, similar to script breakpoint tree elements. (WebInspector.DOMBreakpointTreeElement): (WebInspector.DOMBreakpointTreeElement.displayNameForType): (WebInspector.DOMBreakpointTreeElement.prototype.onattach): (WebInspector.DOMBreakpointTreeElement.prototype.ondetach): (WebInspector.DOMBreakpointTreeElement.prototype.ondelete): (WebInspector.DOMBreakpointTreeElement.prototype.onenter): (WebInspector.DOMBreakpointTreeElement.prototype.onspace): (WebInspector.DOMBreakpointTreeElement.prototype.populateContextMenu): (WebInspector.DOMBreakpointTreeElement.prototype._statusImageElementClicked): (WebInspector.DOMBreakpointTreeElement.prototype._statusImageElementFocused): (WebInspector.DOMBreakpointTreeElement.prototype._statusImageElementMouseDown): (WebInspector.DOMBreakpointTreeElement.prototype._toggleBreakpoint): (WebInspector.DOMBreakpointTreeElement.prototype._updateStatus): * UserInterface/Views/DOMNodeTreeElement.js: Added. Tree element class for DOM nodes, which serves as a parent for DOM breakpoint tree elements. Includes context menu for bulk delete/disable of all child breakpoints. (WebInspector.DOMNodeTreeElement): (WebInspector.DOMNodeTreeElement.prototype.ondelete): (WebInspector.DOMNodeTreeElement.prototype.populateContextMenu): * UserInterface/Views/DOMTreeContentView.css: Styles for DOM breakpoint gutter and breakpoint indicators, including "left pointing" breakpoints for RTL mode. (.content-view.dom-tree.show-gutter .tree-outline.dom): (body[dir=ltr] .content-view.dom-tree.show-gutter .tree-outline.dom): (body[dir=rtl] .content-view.dom-tree.show-gutter .tree-outline.dom): (.content-view.dom-tree .tree-outline.dom li .status-image): (body[dir=ltr] .content-view.dom-tree .tree-outline.dom li .status-image): (body[dir=rtl] .content-view.dom-tree .tree-outline.dom li .status-image): (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint): (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li.selected .status-image.breakpoint): (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled): (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint): (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint.disabled): * UserInterface/Views/DOMTreeContentView.js: Add support for DOM breakpoint gutter and breakpoint indicators. Breakpoint indicator elements are part of the DOM tree element, and are updated whenever there a breakpoint's disabled or resolved state changes. (WebInspector.DOMTreeContentView): (WebInspector.DOMTreeContentView.prototype.get breakpointGutterEnabled): (WebInspector.DOMTreeContentView.prototype.set breakpointGutterEnabled): (WebInspector.DOMTreeContentView.prototype.shown): (WebInspector.DOMTreeContentView.prototype.closed): (WebInspector.DOMTreeContentView.prototype._domTreeElementAdded): (WebInspector.DOMTreeContentView.prototype._domBreakpointAddedOrRemoved): (WebInspector.DOMTreeContentView.prototype._domBreakpointDisabledStateDidChange): (WebInspector.DOMTreeContentView.prototype._domBreakpointResolvedStateDidChange): (WebInspector.DOMTreeContentView.prototype._updateBreakpointStatus): (WebInspector.DOMTreeContentView.prototype._restoreBreakpointsAfterUpdate): (WebInspector.DOMTreeContentView.prototype._breakpointsEnabledDidChange): * UserInterface/Views/DOMTreeElement.js: Add support for breakpoint status element and content menu. (WebInspector.DOMTreeElement): (WebInspector.DOMTreeElement.prototype.get breakpointStatus): (WebInspector.DOMTreeElement.prototype.set breakpointStatus): (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): (WebInspector.DOMTreeElement.prototype.updateTitle): (WebInspector.DOMTreeElement.prototype._updateBreakpointStatus): (WebInspector.DOMTreeElement.prototype._statusImageContextmenu): * UserInterface/Views/DebuggerSidebarPanel.css: (.sidebar > .panel.navigation.debugger .details-section.dom-breakpoints .item.dom-node .titles): (.sidebar > .panel.navigation.debugger .details-section.dom-breakpoints .item.dom-node .icon): Styles for DOM node tree elements. * UserInterface/Views/DebuggerSidebarPanel.js: Add new DOM Breakpoints section, and support for the "DOM" pause reason. (WebInspector.DebuggerSidebarPanel): (WebInspector.DebuggerSidebarPanel.prototype.closed): (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection): (WebInspector.DebuggerSidebarPanel.prototype._domBreakpointAddedOrRemoved): * UserInterface/Views/FrameDOMTreeContentView.js: (WebInspector.FrameDOMTreeContentView.prototype._rootDOMNodeAvailable): Restore DOM breakpoints once the root node is available. * UserInterface/Views/Variables.css: (:root): Fill and stroke colors for resolved, unresolved, and disabled breakpoints. * Versions/Inspector-iOS-10.0.json: * Versions/Inspector-iOS-10.3.json: * Versions/Inspector-iOS-7.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: * Versions/Inspector-iOS-9.3.json: 2017-03-08 Devin Rousso Web Inspector: RTL: table header columns and cells don't line up, dragging seems backwards https://bugs.webkit.org/show_bug.cgi?id=168289 Reviewed by Brian Burg. Changed the algorithm used to position columns when in RTL to use right offsets instead of left offsets. This also applies to the resizer elements between columns. * UserInterface/Views/DataGrid.css: (.data-grid): (.data-grid th): (body[dir=ltr] .data-grid :matches(th, td):not(:last-child)): (body[dir=rtl] .data-grid :matches(th, td):not(:last-child)): (.data-grid th:matches(.sort-ascending, .sort-descending)): (body[dir=ltr] .data-grid:matches(:focus, .force-focus) tr.selected td:not(:last-child)): (body[dir=rtl] .data-grid:matches(:focus, .force-focus) tr.selected td:not(:last-child)): (.data-grid .right div): (body[dir=ltr] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child): (body[dir=rtl] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child): (.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child::after): (body[dir=ltr] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child::after): (body[dir=rtl] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child::after): (.data-grid th.sort-ascending > div:first-child::after): (.data-grid th.sort-descending > div:first-child::after): (.data-grid tr.parent td.disclosure::before): (body[dir=ltr] .data-grid tr.parent td.disclosure::before): (body[dir=rtl] .data-grid tr.parent td.disclosure::before): (.data-grid td .icon): (body[dir=ltr] .data-grid td .icon): (body[dir=rtl] .data-grid td .icon): (.data-grid td .go-to-arrow): (body[dir=ltr] .data-grid td .go-to-arrow): (body[dir=rtl] .data-grid td .go-to-arrow): (.data-grid .resizer): (body[dir=ltr] .data-grid .resizer): (body[dir=rtl] .data-grid .resizer): (.data-grid table:matches(.header, .data)): (body[dir=ltr] .data-grid table:matches(.header, .data)): (body[dir=rtl] .data-grid table:matches(.header, .data)): (body[dir=ltr] .data-grid :matches(th, td):first-child): (body[dir=rtl] .data-grid :matches(th, td):first-child): (@media (-webkit-min-device-pixel-ratio: 2)): (.data-grid :matches(th, td):not(:last-child)): Deleted. (.data-grid:matches(:focus, .force-focus) tr.selected td:not(:last-child)): Deleted. (.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child): Deleted. (.data-grid table.header, .data-grid table.data): Deleted. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid.prototype._positionResizerElements): (WebInspector.DataGrid.prototype._positionHeaderViews): (WebInspector.DataGrid.prototype.resizerDragging): 2017-03-08 Joseph Pecoraro Web Inspector: Should be able to see where Resources came from (Memory Cache, Disk Cache) https://bugs.webkit.org/show_bug.cgi?id=164892 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: New localized strings for memory/disk cache information. * UserInterface/Controllers/FrameResourceManager.js: (WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache): Make this legacy path more explicit. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Make this memory cache path more explicit. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Pass the resource's response source onward. * UserInterface/Models/Resource.js: (WebInspector.Resource): (WebInspector.Resource.responseSourceFromPayload): (WebInspector.Resource.prototype.get responseSource): (WebInspector.Resource.prototype.hasResponse): (WebInspector.Resource.prototype.updateForResponse): (WebInspector.Resource.prototype.markAsCached): (WebInspector.Resource.prototype.legacyMarkServedFromMemoryCache): (WebInspector.Resource.prototype.legacyMarkServedFromDiskCache): Include a WebInspector.ResponseSource enum. Update a Resource's responseSource state where appropriate. * UserInterface/Protocol/NetworkObserver.js: (WebInspector.NetworkObserver.prototype.requestServedFromCache): Mark legacy path. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView): Tweak default column sizes to make Cached and graph columns a little larger. * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): (WebInspector.ResourceTimelineDataGridNode.prototype._cachedCellContent): Update "Cached" column data with more information if available. * UserInterface/Views/NetworkGridContentView.css: (.content-view.network-grid > .data-grid .cache-type): (.content-view.network-grid > .data-grid:matches(:focus, .force-focus) tr.selected .cache-type): Style the cache type a secondary color. 2017-03-08 Devin Rousso Web Inspector: add a "create breakpoint" context menu item for linkified source locations https://bugs.webkit.org/show_bug.cgi?id=47442 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WebInspector.isShowingResourcesTab): Added. (WebInspector.linkifyElement): Now calls WebInspector.appendContextMenuItemsForSourceCode on "contextmenu" events for the created element. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.breakpointForSourceCodeLocation): Returns the first breakpoint (since there should only be one) that matches the given location. * UserInterface/Views/ContextMenuUtilities.js: (WebInspector.appendContextMenuItemsForSourceCode): Rework parameters to also accept a WebInspector.SourceCodeLocation, thereby allowing the setting of breakpoints so long as the associated WebInspector.SourceCode is a script. * UserInterface/Views/Main.css: (.resource-link, .go-to-link): Prevent link from being selected. 2017-03-08 Devin Rousso Web Inspector: RTL: Switching back to System Direction doesn't change the dock side https://bugs.webkit.org/show_bug.cgi?id=169323 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WebInspector.setLayoutDirection): Change the dock side based on the resolved layout direction, not the current setting value. 2017-03-08 Matt Baker REGRESSION (r212998): Web Inspector: DetailsSections with options have broken layout https://bugs.webkit.org/show_bug.cgi?id=169350 Reviewed by Brian Burg. * UserInterface/Views/DetailsSection.css: (.details-section): Fix negative margin. (body[dir=ltr] .details-section > .header > :matches(label, .node-link, .go-to-arrow),): (body[dir=ltr] .details-section > .header::before,): (body[dir=ltr] .details-section > .header > :matches(label, .node-link, .go-to-arrow, .options > .navigation-bar),): Deleted. It looks like :matches doesn't accept compound selectors in its selector list. 2017-03-07 Joseph Pecoraro Web Inspector: DOM Tree broken if an element has a "debounce" attribute https://bugs.webkit.org/show_bug.cgi?id=169336 Reviewed by Brian Burg. * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode): (WebInspector.DOMNode.prototype.getAttribute): (WebInspector.DOMNode.prototype.removeAttribute.mycallback): (WebInspector.DOMNode.prototype.removeAttribute): Convert the attributes map to an actual Map to avoid name collisions with Object.prototype properties. 2017-03-07 Chris Dumez Drop non-standard MessageEvent.webkitInitMessageEvent() https://bugs.webkit.org/show_bug.cgi?id=169295 Reviewed by Joseph Pecoraro. Drop MessageEvent.webkitInitMessageEvent and update parameters for various init*Event() operations to match the current implementation. * UserInterface/Models/NativeFunctionParameters.js: 2017-03-04 Nikita Vasilyev Web Inspector: Show Web Socket connections in Network tab https://bugs.webkit.org/show_bug.cgi?id=167520 Reviewed by Joseph Pecoraro. Show Web Socket connections in Network and Resources tabs. Display HTTP headers of Web Socket handshake request in the details sidebar. * UserInterface/Controllers/FrameResourceManager.js: (WebInspector.FrameResourceManager.prototype.initialize): (WebInspector.FrameResourceManager.prototype.webSocketCreated): (WebInspector.FrameResourceManager.prototype.webSocketWillSendHandshakeRequest): webSocketWillSendHandshakeRequest doesn't receive a request URL as one of its parameters. Store URLs received from webSocketCreated method in _webSocketIdentifierToURL map. (WebInspector.FrameResourceManager.prototype.webSocketHandshakeResponseReceived): (WebInspector.FrameResourceManager.prototype.webSocketFrameReceived): (WebInspector.FrameResourceManager.prototype.webSocketFrameSent): (WebInspector.FrameResourceManager.prototype.webSocketClosed): Mark resource as finished when Web Socket handshake is complete or Web Socket is closed. This may change in the future. (WebInspector.FrameResourceManager.prototype._webSocketFrameReceivedOrSent): * UserInterface/Main.html: * UserInterface/Models/WebSocketResource.js: Added. (WebInspector.WebSocketResource): (WebInspector.WebSocketResource.prototype.set readyState): (WebInspector.WebSocketResource.prototype.get readyState): (WebInspector.WebSocketResource.prototype.get frames): (WebInspector.WebSocketResource.prototype.addFrame): Introduce WebSocketResource model to store WebSocket frames (incoming and outgoing messages) and readyState. * UserInterface/Protocol/NetworkObserver.js: (WebInspector.NetworkObserver.prototype.webSocketCreated): (WebInspector.NetworkObserver.prototype.webSocketWillSendHandshakeRequest): (WebInspector.NetworkObserver.prototype.webSocketHandshakeResponseReceived): (WebInspector.NetworkObserver.prototype.webSocketClosed): (WebInspector.NetworkObserver.prototype.webSocketFrameReceived): (WebInspector.NetworkObserver.prototype.webSocketFrameError): (WebInspector.NetworkObserver.prototype.webSocketFrameSent): (WebInspector.NetworkObserver): Add corresponding methods for the newly added FrameResourceManager methods. * UserInterface/Test.html: * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged): Don't show the go to arrow for WebSocket items since WebSocketContentView isn't implemented yet. * UserInterface/Views/ResourceClusterContentView.js: (WebInspector.ResourceClusterContentView.prototype.get responseContentView): Don't show any content views for WebSocket items. * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.prototype.ondblclick): Don't open WebSocket URL in a new browser tab. 2017-03-02 Matt Baker Web Inspector: Should be able to push nodes in an iframe subtree to the frontend https://bugs.webkit.org/show_bug.cgi?id=169086 Reviewed by Joseph Pecoraro. * UserInterface/Views/DOMTreeContentView.js: (WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Use the URL of the main frame instead of the content frame URL. 2017-03-01 Devin Rousso Web Inspector: Annotators should not be enabled if the TextEditor is not visible https://bugs.webkit.org/show_bug.cgi?id=169059 Reviewed by Joseph Pecoraro. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._addResource): (WebInspector.DebuggerSidebarPanel.prototype._addScript): Only call `showDefaultContentViewForTreeElement` if the panel has been added to a sidebar. It is not valid to simply check whether the panel is visible, as the sidebar can be collapsed. In that case, we still want to display the content view, so we instead check that the panel has been added to a sidebar, meaning that it is ready to be displayed in the current tab. 2017-02-28 Devin Rousso Web Inspector: RTL: expose the Layout Direction setting in Production builds, keep using LTR by default https://bugs.webkit.org/show_bug.cgi?id=168999 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.layout): Remove the WebInspector.isDebugUIEnabled() check around the Layout Direction setting. 2017-02-28 Devin Rousso Web Inspector: It is possible to get the New Tab button in addition to the seven expected tabs https://bugs.webkit.org/show_bug.cgi?id=168976 Reviewed by Brian Burg. * UserInterface/Views/TabBar.css: (.tab-bar.collapsed:not(.hide-titles) > .item:not(.pinned):hover > .icon): (.tab-bar.collapsed:not(.hide-titles) > .item:hover > .close): (.tab-bar.collapsed:not(.hide-titles) > .item:not(.pinned, .default-tab):hover > .icon): Deleted. (.tab-bar.collapsed:not(.hide-titles) > .item:not(.default-tab):hover > .close): Deleted. 2017-02-28 Devin Rousso Web Inspector: CSS variable uses that are unresolved should have an error or warning icon https://bugs.webkit.org/show_bug.cgi?id=168352 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update): Insert a warning icon if the variable is not found in the computed style. 2017-02-25 Devin Rousso Web Inspector: RTL: add support for Color Picker https://bugs.webkit.org/show_bug.cgi?id=168853 Reviewed by Brian Burg. * UserInterface/Views/ColorPicker.css: (.color-picker): (body[dir=ltr] .color-picker > .brightness): (body[dir=rtl] .color-picker > .brightness): (body[dir=ltr] .color-picker > .opacity): (body[dir=rtl] .color-picker > .opacity): (.color-picker > .brightness): Deleted. (.color-picker > .opacity): Deleted. * UserInterface/Views/ColorWheel.js: (WebInspector.ColorWheel.prototype.set dimension): Set the CSS width and height style of the container element to ensure that the element only takes up the space it needs. * UserInterface/Views/Slider.css: (.slider): * UserInterface/Views/Variables.css: (:root): Add `--slider-height` CSS variable for convenience. 2017-02-25 Devin Rousso Web Inspector: RTL: add support for Bezier/Spring editor https://bugs.webkit.org/show_bug.cgi?id=168854 Reviewed by Brian Burg. * UserInterface/Views/BezierEditor.css: (.bezier-editor): (body[dir=ltr] .bezier-editor): (body[dir=rtl] .bezier-editor): (.bezier-editor > .bezier-preview-timing): (body[dir=ltr] .bezier-editor > .bezier-preview-timing): (body[dir=rtl] .bezier-editor > .bezier-preview-timing): (@keyframes bezierPreview): (body[dir=rtl] .bezier-editor > .bezier-container): (.bezier-editor > .number-input-container > input): (body[dir=ltr] .bezier-editor > .number-input-container > input): (body[dir=rtl] .bezier-editor > .number-input-container > input): * UserInterface/Views/SpringEditor.css: (.spring-editor > .spring-timing): (.spring-editor > .spring-timing::before): (.spring-editor > .spring-timing::after): (body[dir=ltr] .spring-editor > .spring-timing::before, body[dir=rtl] .spring-editor > .spring-timing::after): (body[dir=ltr] .spring-editor > .spring-timing::after, body[dir=rtl] .spring-editor > .spring-timing::before): (.spring-editor > .number-input-container > .number-input-row > input): * UserInterface/Views/SpringEditor.js: (WebInspector.SpringEditor.prototype._updatePreviewAnimation): 2017-02-25 Devin Rousso Web Inspector: RTL: Elements tab Styles sidebar label/arrows need adjustment https://bugs.webkit.org/show_bug.cgi?id=168746 Reviewed by Brian Burg. * UserInterface/Views/ScopeRadioButtonNavigationItem.css: (.scope-radio-button-navigation-item): (.scope-radio-button-navigation-item > .scope-radio-button-item-select): (body[dir=ltr] .scope-radio-button-navigation-item > .scope-radio-button-item-select): (body[dir=rtl] .scope-radio-button-navigation-item > .scope-radio-button-item-select): (.scope-radio-button-navigation-item > .scope-radio-button-item-select:focus): (.scope-radio-button-navigation-item > .arrows): (body[dir=ltr] .scope-radio-button-navigation-item > .arrows): (body[dir=rtl] .scope-radio-button-navigation-item > .arrows): 2017-02-25 Devin Rousso Web Inspector: copying a search result out of Search Tab navigation sidebar does nothing https://bugs.webkit.org/show_bug.cgi?id=167074 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WebInspector._copy): * UserInterface/Views/SearchTabContentView.js: (WebInspector.SearchTabContentView.prototype.handleCopyEvent): Provide the container TabContentView with the opportunity to intercept the copy event. * UserInterface/Models/SourceCodeTextRange.js: (WebInspector.SourceCodeTextRange.prototype.get synthesizedTextValue): * UserInterface/Views/SearchResultTreeElement.js: (WebInspector.SearchResultTreeElement.prototype.get synthesizedTextValue): Generate a string with the format `${url}:${lineNumber}:${resultLine}`. 2017-02-25 Devin Rousso Web Inspector: RTL: Styles - Rules sidebar icons are misaligned https://bugs.webkit.org/show_bug.cgi?id=168807 Reviewed by Brian Burg. * UserInterface/Views/CSSStyleDeclarationSection.css: (.style-declaration-section > .header): (body[dir=ltr] .style-declaration-section > .header): (body[dir=rtl] .style-declaration-section > .header): (.style-declaration-section.locked > .header > .locked-icon): (body[dir=ltr] .style-declaration-section.locked > .header > .locked-icon): (body[dir=rtl] .style-declaration-section.locked > .header > .locked-icon): (.style-declaration-section > .header > .icon): (body[dir=ltr] .style-declaration-section > .header > .icon): (body[dir=rtl] .style-declaration-section > .header > .icon): (.style-declaration-section > .header > textarea): (body[dir=ltr] .style-declaration-section > .header > textarea): (body[dir=rtl] .style-declaration-section > .header > textarea): (.style-declaration-section.invalid-selector > .header > .icon): * UserInterface/Views/CSSStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content): (.sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule): (body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule): (body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule): (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle): (body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle): (body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle): (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): (body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): (body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): * UserInterface/Views/Variables.css: (:root): 2017-02-25 Devin Rousso Web Inspector: RTL: disclosure triangles in details section headers should be flipped and aligned right https://bugs.webkit.org/show_bug.cgi?id=168283 Reviewed by Brian Burg. * UserInterface/Views/DetailsSection.css: (.details-section): (.details-section > .header): (body[dir=ltr] .details-section > .header): (body[dir=rtl] .details-section > .header): (.details-section > .header > .options > .navigation-bar): (body[dir=ltr] .details-section > .header > :matches(label, .node-link, .go-to-arrow, .options > .navigation-bar), body[dir=rtl] .details-section > .header::before): (body[dir=ltr] .details-section > .header::before, body[dir=rtl] .details-section > .header > :matches(label, .node-link, .go-to-arrow, .options > .navigation-bar)): (.details-section > .header::before): (body[dir=rtl] .details-section > .header::before): (.details-section > .header > label): (.details-section > .header > label > input[type="checkbox"]): (body[dir=ltr] .details-section > .header > label > input[type="checkbox"]): (body[dir=rtl] .details-section > .header > label > input[type="checkbox"]): (.details-section > .header .go-to-arrow): (body[dir=ltr] .details-section > .header .go-to-arrow): (body[dir=rtl] .details-section > .header .go-to-arrow): (.details-section > .content > .group > .row.simple > .label): (body[dir=ltr] .details-section > .content > .group > .row.simple > .label): (body[dir=rtl] .details-section > .content > .group > .row.simple > .label): (.details-section > .content > .group > .row.simple > .value): (body[dir=ltr] .details-section > .content > .group > .row.simple > .value): (body[dir=rtl] .details-section > .content > .group > .row.simple > .value): (.details-section > .content > .group > .row.simple > .value .go-to-arrow): (body[dir=ltr] .details-section > .content > .group > .row.simple > .value .go-to-arrow): (body[dir=rtl] .details-section > .content > .group > .row.simple > .value .go-to-arrow): (.details-section > .header > :matches(.node-link, .go-to-arrow)): Deleted. 2017-02-24 Devin Rousso Web Inspector: RTL: add support for Error page https://bugs.webkit.org/show_bug.cgi?id=168855 Reviewed by Brian Burg. * UserInterface/Debug/UncaughtExceptionReporter.css: (.uncaught-exception-sheet): (body[dir=ltr] .uncaught-exception-sheet): (body[dir=rtl] .uncaught-exception-sheet): (.uncaught-exception-sheet h1 > img): (body[dir=ltr] .uncaught-exception-sheet h1 > img): (body[dir=rtl] .uncaught-exception-sheet h1 > img): (.uncaught-exception-sheet h2 > img): (body[dir=ltr] .uncaught-exception-sheet h2 > img): (body[dir=rtl] .uncaught-exception-sheet h2 > img): (.uncaught-exception-sheet dd): (body[dir=ltr] .uncaught-exception-sheet dd): (body[dir=rtl] .uncaught-exception-sheet dd): (.uncaught-exception-sheet ul): (body[dir=ltr] .uncaught-exception-sheet ul): (body[dir=rtl] .uncaught-exception-sheet ul): 2017-02-24 Devin Rousso Web Inspector: Uncaught Exception: Unknown angle units "undefined" https://bugs.webkit.org/show_bug.cgi?id=168851 Reviewed by Brian Burg. * UserInterface/Views/GradientEditor.js: (WebInspector.GradientEditor.prototype._gradientTypeChanged): 2017-02-24 Jon Lee Alias "system-ui" for the System font name https://bugs.webkit.org/show_bug.cgi?id=151493 Reviewed by Tim Horton and Joseph Pecoraro. * UserInterface/Models/CSSKeywordCompletions.js: Ditto. 2017-02-23 Devin Rousso Web Inspector: RTL: DOM Tree spacing is wrong https://bugs.webkit.org/show_bug.cgi?id=168744 Reviewed by Brian Burg. * UserInterface/Base/Utilities.js: (Element.prototype.totalOffsetRight): * UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom): (.tree-outline.dom ol): (body[dir=ltr] .tree-outline.dom ol): (body[dir=rtl] .tree-outline.dom ol): (.tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded): (body[dir=ltr] .tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded): (body[dir=rtl] .tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded): (.tree-outline.dom li.selected + ol.children.expanded): (.tree-outline.dom li): (body[dir=ltr] .tree-outline.dom li): (body[dir=rtl] .tree-outline.dom li): (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before): (body[dir=rtl] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before): (body[dir=ltr] .tree-outline.dom.single-node li): (body[dir=rtl] .tree-outline.dom.single-node li): (.tree-outline.dom li.parent): (body[dir=ltr] .tree-outline.dom li.parent): (body[dir=rtl] .tree-outline.dom li.parent): (body[dir=ltr] .tree-outline.dom li .html-tag.close): (body[dir=rtl] .tree-outline.dom li .html-tag.close): (.tree-outline.dom li.parent::before): (body[dir=rtl] .tree-outline.dom li.parent::before): (body[dir=ltr] .tree-outline.dom li.parent::before): (.tree-outline.dom li.parent.shadow::after): (body[dir=ltr] .tree-outline.dom li.parent.shadow::after): (body[dir=rtl] .tree-outline.dom li.parent.shadow::after): (.tree-outline.dom.single-node li): Deleted. (.tree-outline.dom li .html-tag.close): Deleted. * UserInterface/Views/TreeElement.js: (WebInspector.TreeElement.prototype.isEventWithinDisclosureTriangle): Calculate the position of the ::before triangle based on the layout direction. 2017-02-23 Devin Rousso Web Inspector: RTL: navigation sidebar section disclosure triangles and tree element icons should be aligned right https://bugs.webkit.org/show_bug.cgi?id=168284 Reviewed by Brian Burg. * UserInterface/Views/TreeOutline.css: (.tree-outline,): (.tree-outline.large .item): (body[dir=ltr] .tree-outline .item :matches(.disclosure-button, .icon)): (body[dir=rtl] .tree-outline .item :matches(.disclosure-button, .icon)): (body[dir=ltr] .tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon): (body[dir=rtl] .tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon): (.tree-outline .item .disclosure-button): (body[dir=rtl] .tree-outline .item .disclosure-button): (.tree-outline .item .icon): (body[dir=ltr] .tree-outline .item .icon): (body[dir=rtl] .tree-outline .item .icon): (.tree-outline.large .item .icon): (.tree-outline .item .status): (body[dir=ltr] .tree-outline .item .status): (body[dir=rtl] .tree-outline .item .status): (.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon): Deleted. * UserInterface/Views/TreeOutline.js: (WebInspector.TreeOutline._generateStyleRulesIfNeeded): 2017-02-22 Devin Rousso Web Inspector: RTL: Sidebar borders are on the wrong side https://bugs.webkit.org/show_bug.cgi?id=168743 Reviewed by Matt Baker. * UserInterface/Views/Sidebar.css: (body[dir=ltr] .sidebar.right > .resizer, body[dir=rtl] .sidebar.left > .resizer): (body[dir=ltr] .sidebar.left > .resizer, body[dir=rtl] .sidebar.right > .resizer): (body[dir=ltr] .sidebar.left, body[dir=rtl] .sidebar.right): (body[dir=ltr] .sidebar.right, body[dir=rtl] .sidebar.left): (.sidebar.right > .resizer): Deleted. (.sidebar.left > .resizer): Deleted. (.sidebar.left): Deleted. (.sidebar.right): Deleted. * UserInterface/Views/Sidebar.js: (WebInspector.Sidebar.prototype.resizerDragging): Reverse the change if the direction is RTL. 2017-02-22 Brian Burg Web Inspector: RTL: Settings tab labels need adjustment https://bugs.webkit.org/show_bug.cgi?id=168497 Reviewed by Matt Baker. Flip margins. Use 'text-align: end' instead of manually choosing right and left based on body[dir]. * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings > .setting-container > .setting-name): (body[dir=ltr] .content-view.settings > .setting-container > .setting-name): (body[dir=rtl] .content-view.settings > .setting-container > .setting-name): (.content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]): (body[dir=ltr] .content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]): (body[dir=rtl] .content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]): (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]): (body[dir=ltr] .content-view.settings > .setting-container > .setting-value-controller input[type="number"]): (body[dir=rtl] .content-view.settings > .setting-container > .setting-value-controller input[type="number"]): 2017-02-21 Devin Rousso Web Inspector: Prefer Resources tab over Network tab when showing files https://bugs.webkit.org/show_bug.cgi?id=168021 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WebInspector.handlePossibleLinkClick): (WebInspector.openURL): Add `options` parameter to provide greater customization. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject): Add logic for `ignoreNetworkTab` option that will ignore instances of NetworkTabContentView. * UserInterface/Controllers/BreakpointPopoverController.js: (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems): * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.showMainResourceForFrame): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.tokenTrackingControllerHighlightedRangeWasClicked.showRangeInSourceCode): * UserInterface/Views/ComputedStyleDetailsPanel.js: (WebInspector.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorShowProperty): * UserInterface/Views/ContextMenuUtilities.js: (WebInspector.appendContextMenuItemsForSourceCode): * UserInterface/Views/DOMTreeContentView.js: (WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._populateTagContextMenu): (WebInspector.DOMTreeElement.prototype._showCustomElementDefinition): * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange): * UserInterface/Views/NetworkTimelineView.js: (WebInspector.NetworkTimelineView.prototype.showContentViewForTreeElement): * UserInterface/Views/ObjectTreeBaseTreeElement.js: (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject): * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange): * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked): * UserInterface/Views/SearchSidebarPanel.js: (WebInspector.SearchSidebarPanel.prototype._treeSelectionDidChange): (WebInspector.SearchSidebarPanel.prototype._treeElementDoubleClick): * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked): * UserInterface/Views/TimelineDataGrid.js: (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype.populateContextMenu): Change arguments of functions to change content views to ignore the Network tab. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView.prototype.hasRepresentedObject): * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel.prototype.hasRepresentedObject): * UserInterface/Views/NetworkTabContentView.js: (WebInspector.NetworkTabContentView.prototype.canShowRepresentedObject): Ensure that the Network tab can only display resources that it has entries for in its view. 2017-02-21 Brian Burg Web Inspector: RTL: console scope bar's unread message indicator is misaligned https://bugs.webkit.org/show_bug.cgi?id=168625 Reviewed by Matt Baker. * UserInterface/Views/LogContentView.css: (.log-scope-bar > li.unread::before): (body[dir=ltr] .log-scope-bar > li.unread::before): (body[dir=rtl] .log-scope-bar > li.unread::before): 2017-02-20 Joseph Pecoraro Web Inspector: Tooltip for "Show console tab" should read "Show Console tab" https://bugs.webkit.org/show_bug.cgi?id=168630 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView): 2017-02-20 Brian Burg Web Inspector: RTL: back/forward navigation buttons should not be flipped https://bugs.webkit.org/show_bug.cgi?id=168275 Reviewed by Matt Baker. The leading button is always "back" and the trailing button is always "forward", but in RTL the icons are swapped so that it still looks like '< >' from left-to-right. Rename the two arrows in the SVG to "left" and "right" arrows, and use them appropriately in ContentBrowser for back-forward icons based on the layout direction. * UserInterface/Images/BackForwardArrows.svg: * UserInterface/Views/ContentBrowser.js: (WebInspector.ContentBrowser): * UserInterface/Views/FindBanner.css: (.find-banner > button.segmented.left > .glyph): (.find-banner > button.segmented.left:active:not(:disabled) > .glyph): (.find-banner > button.segmented.right > .glyph): (.find-banner > button.segmented.right:active:not(:disabled) > .glyph): 2017-02-20 Brian Burg Web Inspector: RTL: hierarchical path components need spacing and icon adjustments https://bugs.webkit.org/show_bug.cgi?id=168581 Reviewed by Matt Baker. Flip a bunch of padding, margin, and offsets. Flip the chevron using a CSS transform. * UserInterface/Views/HierarchicalPathComponent.css: (.hierarchical-path-component): (.hierarchical-path-component > .icon): (.hierarchical-path-component > :matches(.icon, .selector-arrows)): (body[dir=ltr] .hierarchical-path-component > :matches(.icon, .selector-arrows)): (body[dir=rtl] .hierarchical-path-component > :matches(.icon, .selector-arrows)): (.hierarchical-path-component > .selector-arrows): (.hierarchical-path-component > select): (body[dir=ltr] .hierarchical-path-component > select): (body[dir=rtl] .hierarchical-path-component > select): (.hierarchical-path-component > .separator): (body[dir=ltr] .hierarchical-path-component > .separator): (body[dir=rtl] .hierarchical-path-component > .separator): (.hierarchical-path-component.text-only): (body[dir=ltr] .hierarchical-path-component.text-only): (body[dir=rtl] .hierarchical-path-component.text-only): (body[dir=ltr] .hierarchical-path-component.text-only > select): (body[dir=rtl] .hierarchical-path-component.text-only > select): 2017-02-20 Brian Burg Web Inspector: RTL: adjust positioning of scope bar items with multiple values https://bugs.webkit.org/show_bug.cgi?id=168575 Reviewed by Matt Baker. Mirror the leading margin as necessary. Adjust the for each unit type that will change the units of the gradient. 2017-02-07 Matt Baker Web Inspector: DOMTreeOutline becomes collapsed after switching back to Elements tab https://bugs.webkit.org/show_bug.cgi?id=167924 Reviewed by Brian Burg. * UserInterface/Views/DOMTreeOutline.js: (WebInspector.DOMTreeOutline.prototype.update): Drive-by fix: move variable initialization below the early return. * UserInterface/Views/ElementsTabContentView.js: (WebInspector.ElementsTabContentView.prototype.shown): Deleted. Calling this._showDOMTreeContentView isn't necessary. The base class implementation will call `shown` on the content view. 2017-02-06 Fujii Hironori Web Inspector: sibling elements's disclosure triangles aren't vertically aligned in DOM tree outline in certain ports https://bugs.webkit.org/show_bug.cgi?id=167568 Reviewed by Brian Burg. The triangle has 13px height and has float:left. If the line-height is smaller than 13px, the sibling element's triangles aren't vertically aligned. * UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom li.parent): Set line-height 13px explicitly. 2017-02-03 Matt Baker Web Inspector: Add stroke-linecap property values to CSS autocompletion https://bugs.webkit.org/show_bug.cgi?id=167778 Reviewed by Joseph Pecoraro. * UserInterface/Models/CSSKeywordCompletions.js: Add autocompletion values for fill-rule and stroke-linecap. 2017-02-02 Devin Rousso Web Inspector: can't jump from Search Tab result to see resource in other tabs (Resource, Debugger, Network) https://bugs.webkit.org/show_bug.cgi?id=167072 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WebInspector.tabContentViewForRepresentedObject): (WebInspector.showRepresentedObject): (WebInspector.showMainFrameDOMTree): (WebInspector.showSourceCodeForFrame): (WebInspector.showSourceCode): (WebInspector.showSourceCodeLocation): (WebInspector.showOriginalUnformattedSourceCodeLocation): (WebInspector.showOriginalOrFormattedSourceCodeLocation): (WebInspector.showOriginalOrFormattedSourceCodeTextRange): (WebInspector.showResourceRequest): Rework parameters to add optional `options` dictionary that can be used to indicate additional functionality. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject): Ignore instances of SearchTabContentView as it can display content views for all types of searchable data. Determined by a newly added optional `options` parameter. * UserInterface/Base/Utilities.js: (Object.shallowMerge): Merges the keys of two objects into a new one. * UserInterface/Views/ComputedStyleDetailsPanel.js: (WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked): (WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked): * UserInterface/Views/SearchSidebarPanel.js: (WebInspector.SearchSidebarPanel.prototype.performSearch.createTreeElementForMatchObject): (WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback): (WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback): (WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback): (WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts): (WebInspector.SearchSidebarPanel.prototype.performSearch.domSearchResults): (WebInspector.SearchSidebarPanel.prototype.performSearch.domCallback): (WebInspector.SearchSidebarPanel.prototype.performSearch): (WebInspector.SearchSidebarPanel.prototype._treeElementDoubleClick): * UserInterface/Views/TreeElement.js: (WebInspector.TreeElement.treeElementDoubleClicked): Add an event dispatch whenever a TreeElement is double clicked via the `dblclick` event. 2017-02-01 Yusuke Suzuki Web Inspector: Upgrade Esprima to the latest one to support dynamic import https://bugs.webkit.org/show_bug.cgi?id=167698 Reviewed by Joseph Pecoraro. * UserInterface/External/Esprima/esprima.js: Update to Esprima@5307e30 (4.0.0-dev). * UserInterface/Models/ScriptSyntaxTree.js: (WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers): (WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration): (WebInspector.ScriptSyntaxTree.prototype._recurse): (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree): (WebInspector.ScriptSyntaxTree): * UserInterface/Workers/Formatter/ESTreeWalker.js: (ESTreeWalker.prototype._walkChildren): (ESTreeWalker): Add new nodes, SpreadProperty, RestProperty, and Import. SpreadProperty and RestProperty are the part of ES2018 rest and spread properties. https://github.com/sebmarkbage/ecmascript-rest-spread Import is dynamic import node. The syntax is similar to Super. https://github.com/tc39/proposal-dynamic-import * UserInterface/Workers/Formatter/EsprimaFormatter.js: (EsprimaFormatter.prototype._handleTokenAtNode): 2017-02-01 Joseph Pecoraro Web Inspector: Remove keyboard shortcut to close tab - does not match expectations https://bugs.webkit.org/show_bug.cgi?id=167672 Reviewed by Timothy Hatcher. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser): 2017-01-31 Devin Rousso Web Inspector: Tooltip text should not end in a period https://bugs.webkit.org/show_bug.cgi?id=167130 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/BezierEditor.js: (WebInspector.BezierEditor): * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback): * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): * UserInterface/Views/GeneralTabBarItem.js: (WebInspector.GeneralTabBarItem): * UserInterface/Views/HeapSnapshotContentView.js: (WebInspector.HeapSnapshotInstancesContentView): (WebInspector.HeapSnapshotObjectGraphContentView): * UserInterface/Views/InlineSwatch.js: (WebInspector.InlineSwatch): * UserInterface/Views/ObjectTreePropertyTreeElement.js: (WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries): (WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties): * UserInterface/Views/ObjectTreeView.js: (WebInspector.ObjectTreeView.prototype._updateEntries): (WebInspector.ObjectTreeView.prototype._updateProperties): * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar): * UserInterface/Views/SpringEditor.js: (WebInspector.SpringEditor): * UserInterface/Views/TypeTreeElement.js: (WebInspector.TypeTreeElement.prototype.onpopulate): * UserInterface/Views/TypeTreeView.js: (WebInspector.TypeTreeView.prototype._populate): * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: (WebInspector.VisualStyleCommaSeparatedKeywordEditor): * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype._generateSection.createOptionsElement): * UserInterface/Views/VisualStylePropertyEditorLink.js: (WebInspector.VisualStylePropertyEditorLink.prototype.set linked): * UserInterface/Views/VisualStylePropertyNameInput.js: (WebInspector.VisualStylePropertyNameInput): * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype._updateCheckboxTitle): (WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon): 2017-01-31 Devin Rousso Web Inspector: add CSS color keyword entries for all grey/gray variations https://bugs.webkit.org/show_bug.cgi?id=167668 Reviewed by Matt Baker. * UserInterface/Models/Color.js: (WebInspector.Color.Keywords): 2017-01-31 Devin Rousso Web Inspector: Network tab: provide a way to preserve log on navigation https://bugs.webkit.org/show_bug.cgi?id=166908 Reviewed by Matt Baker. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Setting.js: (WebInspector.settings): Add clearNetworkOnNavigate global setting. * UserInterface/Views/NetworkGridContentView.css: (.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content): (.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content .timeline-record-bar > .segment): * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): (WebInspector.NetworkGridContentView.prototype._mainResourceDidChange): * UserInterface/Views/NetworkSidebarPanel.css: (.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > :not(.status)): (.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > .icon): * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel): (WebInspector.NetworkSidebarPanel.prototype._mainResourceDidChange): Add styling to preserved network records. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager.prototype._mainResourceDidChange): Only reset the persistent network timeline if the clearNetworkOnNavigate setting is true. * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.initialLayout): (WebInspector.SettingsTabContentView): Add checkbox and spacers for new setting. 2017-01-31 Devin Rousso Web Inspector: User Settings: Secondary-clicking the New Tab and Settings tabs should not produce a context menu https://bugs.webkit.org/show_bug.cgi?id=167651 Reviewed by Joseph Pecoraro. * UserInterface/Views/PinnedTabBarItem.js: (WebInspector.PinnedTabBarItem): (WebInspector.PinnedTabBarItem.prototype._handleContextMenuEvent): Always preventDefault() to ensure that the system context menu is never shown. * UserInterface/Views/TabBar.js: (WebInspector.TabBar): (WebInspector.TabBar.prototype.get newTabTabBarItem): (WebInspector.TabBar.prototype._handleNewTabContextMenu): Deleted. Move the event dispatch to WebInspector.PinnedTabBarItem to give all instances a contextmenu event handler. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser): 2017-01-31 Joseph Pecoraro Web Inspector: Address some ESLint warnings https://bugs.webkit.org/show_bug.cgi?id=167634 Reviewed by Brian Burg. * UserInterface/Base/DOMUtilities.js: (WebInspector.linkifyNodeReference): (isSimiliarNode): (WebInspector.xpathIndex): These empty statements were supposed to be returns! * UserInterface/Base/Main.js: * UserInterface/Models/CSSProperty.js: (WebInspector.CSSProperty.prototype.get relatedLonghandProperties): * UserInterface/Models/DOMNode.js: * UserInterface/Protocol/Connection.js: (InspectorBackend.Connection): (InspectorBackend.MainConnection): (InspectorBackend.WorkerConnection): * UserInterface/Protocol/MainTarget.js: (WebInspector.MainTarget): * UserInterface/Protocol/WorkerTarget.js: (WebInspector.WorkerTarget): * UserInterface/Test/Test.js: * UserInterface/Views/CSSStyleDeclarationTextEditor.js: * UserInterface/Views/ConsoleSession.js: (WebInspector.ConsoleSession): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback): (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility): * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel): * UserInterface/Views/ScriptContentView.js: (WebInspector.ScriptContentView.prototype._toggleTypeAnnotations): * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype._createControlFlowScrollEventHandler): * UserInterface/Views/TextResourceContentView.js: (WebInspector.TextResourceContentView.prototype._toggleTypeAnnotations): * UserInterface/Workers/Formatter/EsprimaFormatter.js: (EsprimaFormatter.prototype._handleTokenAtNode): Address pedantic warnings for consistent style. 2017-01-30 Devin Rousso Web Inspector: "bouncy highlight" element in TextEditor/DOMTreeOutline should update or dismiss when user scrolls https://bugs.webkit.org/show_bug.cgi?id=167146 Reviewed by Timothy Hatcher. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype._revealSearchResult.scrollHandler): (WebInspector.TextEditor.prototype._revealSearchResult.animationEnded): (WebInspector.TextEditor.prototype._revealSearchResult): 2017-01-30 Joseph Pecoraro Implement PerformanceObserver https://bugs.webkit.org/show_bug.cgi?id=167546 Reviewed by Ryosuke Niwa. * UserInterface/Models/NativeFunctionParameters.js: Improve API view display of built-in performance methods. 2017-01-30 Matt Baker Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops) https://bugs.webkit.org/show_bug.cgi?id=165633 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: Text for "Truncated" marker tree element. * UserInterface/Models/StackTrace.js: (WebInspector.StackTrace): (WebInspector.StackTrace.fromPayload): (WebInspector.StackTrace.prototype.get truncated): Plumbing for new Console.StackTrace property `truncated`. * UserInterface/Views/ThreadTreeElement.css: (.tree-outline > .item.thread + ol > .item.truncated-call-frames): (.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon): Styles for "Truncated" marker tree element. * UserInterface/Views/ThreadTreeElement.js: (WebInspector.ThreadTreeElement.prototype.refresh): Append "Truncated" marker tree element if necessary. * Versions/Inspector-iOS-10.3.json: 2017-01-30 Ryan Haddad Unreviewed, rolling out r211345. The LayoutTest for this change is failing an assertion. Reverted changeset: "Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops)" https://bugs.webkit.org/show_bug.cgi?id=165633 http://trac.webkit.org/changeset/211345 2017-01-28 Matt Baker Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops) https://bugs.webkit.org/show_bug.cgi?id=165633 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: Text for "Truncated" marker tree element. * UserInterface/Models/StackTrace.js: (WebInspector.StackTrace): (WebInspector.StackTrace.fromPayload): (WebInspector.StackTrace.prototype.get truncated): Plumbing for new Console.StackTrace property `truncated`. * UserInterface/Views/ThreadTreeElement.css: (.tree-outline > .item.thread + ol > .item.truncated-call-frames): (.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon): Styles for "Truncated" marker tree element. * UserInterface/Views/ThreadTreeElement.js: (WebInspector.ThreadTreeElement.prototype.refresh): Append "Truncated" marker tree element if necessary. * Versions/Inspector-iOS-10.3.json: 2017-01-27 Devin Rousso Web Inspector: gradient editor should provide horizontal slider for 'angle' value where applicable https://bugs.webkit.org/show_bug.cgi?id=166937 Reviewed by Joseph Pecoraro. * UserInterface/Views/GradientEditor.css: (.gradient-editor): (.gradient-editor > .gradient-angle): (.gradient-editor > .gradient-angle > input[type="range"]): (.gradient-editor > .gradient-angle > input[type="number"]): (.gradient-editor > .gradient-angle > input::-webkit-inner-spin-button): (.gradient-editor > .gradient-angle > input): Deleted. * UserInterface/Views/GradientEditor.js: (WebInspector.GradientEditor): (WebInspector.GradientEditor.prototype.set gradient): (WebInspector.GradientEditor.prototype.gradientSliderStopWasSelected): (WebInspector.GradientEditor.prototype._gradientTypeChanged): (WebInspector.GradientEditor.prototype._angleChanged): (WebInspector.GradientEditor.prototype.dragToAdjustControllerWasAdjustedByAmount): Deleted. (WebInspector.GradientEditor.prototype._angleInputValueDidChange): Deleted. Remove the DragToAdjustController and replace with an . 2017-01-23 Joseph Pecoraro Web Inspector: Provide a way to trigger a Garbage Collection https://bugs.webkit.org/show_bug.cgi?id=167345 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: New "Garbage collect" tooltip. * Versions/Inspector-iOS-10.3.json: * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: Update 10.3 so it generates its list of supported domains for workers. Note that the Heap domain is not be available in this backend but it is now. * UserInterface/Protocol/Connection.js: (InspectorBackend.WorkerConnection): * UserInterface/Protocol/HeapObserver.js: (WebInspector.HeapObserver.prototype.garbageCollected): * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass): (InspectorBackendClass.prototype.get workerSupportedDomains): (InspectorBackendClass.prototype.workerSupportedDomain): * UserInterface/Images/NavigationItemClear.svg: Added. * UserInterface/Images/NavigationItemGarbageCollect.svg: Added. New image for Garbage Collection. Better image for clearing. * UserInterface/Images/gtk/NavigationItemClear.svg: Added. Copy the Trash icon for Clear for gtk. * UserInterface/Protocol/Target.js: (WebInspector.Target.prototype.get HeapAgent): * UserInterface/Protocol/WorkerTarget.js: (WebInspector.WorkerTarget): Include Heap agent for Workers. * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView): (WebInspector.LogContentView.prototype.get navigationItems): (WebInspector.LogContentView.prototype._garbageCollect): Add garbage collect button which triggers gc on all capable targets. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView): Update the Clear icon to an improved icon. * UserInterface/Controllers/HeapManager.js: (WebInspector.HeapManager.prototype.garbageCollected): Timelines only shows Main Target events, do not show GC events for Workers. 2017-01-23 Devin Rousso Web Inspector: long press on New Tab Tab Item should show context menu with recently closed tabs that are still closed https://bugs.webkit.org/show_bug.cgi?id=166901 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/TabBar.js: (WebInspector.TabBar.Event): (WebInspector.TabBar.prototype._handleNewTabContextMenu): Add listener dispatch for contextmenu event on New Tab tab item. (WebInspector.TabBar.prototype.get newTabTabBarItem): Deleted. Unused. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser): (WebInspector.TabBrowser.prototype._tabBarItemAdded): (WebInspector.TabBrowser.prototype._tabBarItemRemoved): (WebInspector.TabBrowser.prototype._handleNewTabContextMenu): Added. Create an array that keeps track of tabs as they are closed, and populate the contextmenu of the New Tab tab item with entries for each of these tabs. 2017-01-23 Devin Rousso Web Inspector: tree elements with depth > 1 should have context menu "expand all"/"collapse all" commands https://bugs.webkit.org/show_bug.cgi?id=135590 Reviewed by Timothy Hatcher. Rework the context menu event handlers for all TreeOutline and TreeElement instances such that the TreeOutline handles the event listener and creates the context menu object and the TreeElement populates the list with items. This is necessary due to the way in which children are laid out, as there is padding on either side of the element that would not trigger a context menu event. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/BreakpointTreeElement.js: (WebInspector.BreakpointTreeElement.prototype.ondetach): (WebInspector.BreakpointTreeElement.prototype.populateContextMenu): (WebInspector.BreakpointTreeElement.prototype.oncontextmenu): Deleted. * UserInterface/Views/ContextMenuUtilities.js: (WebInspector.appendContextMenuItemsForSourceCode): * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): * UserInterface/Views/DOMTreeOutline.js: (WebInspector.DOMTreeOutline): (WebInspector.DOMTreeOutline.prototype.populateContextMenu): (WebInspector.DOMTreeOutline.prototype._onmousedown): (WebInspector.DOMTreeOutline.prototype._onmousemove): (WebInspector.DOMTreeOutline.prototype._ondragstart): (WebInspector.DOMTreeOutline.prototype._ondragover): (WebInspector.DOMTreeOutline.prototype._ondrop): (WebInspector.DOMTreeOutline.prototype._treeElementFromEvent): Deleted. (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired): Deleted. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement): * UserInterface/Views/FrameTreeElement.js: (WebInspector.FrameTreeElement.prototype.onattach): * UserInterface/Views/GeneralTreeElement.js: (WebInspector.GeneralTreeElement.prototype.onattach): (WebInspector.GeneralTreeElement.prototype.ondetach): Deleted. * UserInterface/Views/ObjectTreeBaseTreeElement.js: (WebInspector.ObjectTreeBaseTreeElement.prototype.populateContextMenu): (WebInspector.ObjectTreeBaseTreeElement.prototype._logSymbolProperty): (WebInspector.ObjectTreeBaseTreeElement.prototype._logValue): (WebInspector.ObjectTreeBaseTreeElement.prototype.oncontextmenu): Deleted. (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler): Deleted. * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.prototype.populateContextMenu): (WebInspector.ResourceTreeElement.prototype.onattach): Deleted. (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent): Deleted. * UserInterface/Views/ThreadTreeElement.js: (WebInspector.ThreadTreeElement.prototype.populateContextMenu): (WebInspector.ThreadTreeElement.prototype.oncontextmenu): Deleted. * UserInterface/Views/TreeElement.js: (WebInspector.TreeElement.prototype.populateContextMenu): (WebInspector.TreeElement): * UserInterface/Views/TreeOutline.js: (WebInspector.TreeOutline): (WebInspector.TreeOutline.prototype.treeElementFromEvent): (WebInspector.TreeOutline.prototype.populateContextMenu): (WebInspector.TreeOutline._generateStyleRulesIfNeeded): * UserInterface/Views/VisualStyleSelectorTreeItem.js: (WebInspector.VisualStyleSelectorTreeItem.prototype.onattach): (WebInspector.VisualStyleSelectorTreeItem.prototype.populateContextMenu): (WebInspector.VisualStyleSelectorTreeItem.prototype._highlightNodesWithSelector): (WebInspector.VisualStyleSelectorTreeItem.prototype._hideDOMNodeHighlight): (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent): Deleted. * UserInterface/Views/WorkerTreeElement.js: (WebInspector.WorkerTreeElement.prototype.populateContextMenu): (WebInspector.WorkerTreeElement.prototype.onattach): (WebInspector.WorkerTreeElement.prototype._handleContextMenuEvent): Deleted. * UserInterface/Views/DataGrid.js: (WebInspector.DataGrid.prototype._contextMenuInDataTable): Add "Expand All"/"Collapse All" context menu items. 2017-01-23 Devin Rousso Web Inspector: color picker should feature an editable CSS value https://bugs.webkit.org/show_bug.cgi?id=124356 Reviewed by Timothy Hatcher. * UserInterface/Views/ColorPicker.css: (.color-picker): (.color-picker.hide-inputs): (.color-picker > .color-inputs): (.color-picker > .color-inputs > div): (.color-picker > .color-inputs > div[hidden]): (.color-picker > .color-inputs input): * UserInterface/Views/ColorPicker.js: (WebInspector.ColorPicker.createColorInput): (WebInspector.ColorPicker): (WebInspector.ColorPicker.prototype.set color): (WebInspector.ColorPicker.prototype.set enableColorComponentInputs): (WebInspector.ColorPicker.prototype._updateColor): (WebInspector.ColorPicker.prototype._handleFormatChange): (WebInspector.ColorPicker.prototype._showColorComponentInputs.updateColorInput): (WebInspector.ColorPicker.prototype._showColorComponentInputs): (WebInspector.ColorPicker.prototype._handleColorInputInput): Add an input element (with a label for the component name and its units) for each component as part of the current color format (e.g. R, G, B, A). If any of these inputs are changed then the color is also changed and the "ColorChanged" event is fired. * UserInterface/Controllers/CodeMirrorColorEditingController.js: (WebInspector.CodeMirrorColorEditingController.prototype.popoverWillPresent): * UserInterface/Views/InlineSwatch.js: (WebInspector.InlineSwatch.prototype._swatchElementClicked): Add FormatChanged event that fires whenever a new color is set with a different format or the color value is set for the first time (there is no old format to compare to). This is needed because if the format becomes RGB, RGBA, HSL, or HSLA from something not in that list then the size of the containing popover needs to change since the newly added color inputs will be displayed. * UserInterface/Views/GradientEditor.js: (WebInspector.GradientEditor): Prevent the color inputs from displaying at all, since there aren't individual swatches for each color in a gradient. 2017-01-20 Devin Rousso Web Inspector: Search Tab should display search results immediately when closing and reopening Inspector https://bugs.webkit.org/show_bug.cgi?id=167073 Reviewed by Timothy Hatcher. * UserInterface/Views/SearchSidebarPanel.js: (WebInspector.SearchSidebarPanel.prototype.focusSearchField): Add parameter that will trigger a search with the current input value when true. * UserInterface/Views/SearchTabContentView.js: (WebInspector.SearchTabContentView): (WebInspector.SearchTabContentView.prototype.focusSearchField): (WebInspector.SearchTabContentView.prototype.initialLayout): 2017-01-19 Devin Rousso Web Inspector: Network Tab's "Clear Network Items" button should have keyboard shortcuts https://bugs.webkit.org/show_bug.cgi?id=166943 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WebInspector.contentLoaded): (WebInspector._clear): Move clear keyboard shortcut to main object and call _handleClearShortcut on the visible content view if able. * UserInterface/Controllers/JavaScriptLogViewController.js: (WebInspector.JavaScriptLogViewController): (WebInspector.JavaScriptLogViewController.prototype.requestClearMessages): (WebInspector.JavaScriptLogViewController.prototype._handleClearShortcut): Deleted. * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView): (WebInspector.LogContentView.prototype.handleClearShortcut): Move logic for requesting to clear messages from the LogManager to a better named function. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): (WebInspector.NetworkGridContentView.prototype.handleClearShortcut): 2017-01-19 Devin Rousso Web Inspector: Dashboard's log/error/warning help tag says "click to show the Console" even when clicking does nothing https://bugs.webkit.org/show_bug.cgi?id=167102 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WebInspector.showConsoleTab): Don't revert to the All scopes if the requested scope is already selected. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/DefaultDashboardView.js: (WebInspector.DefaultDashboardView): (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem): (WebInspector.DefaultDashboardView.prototype._setItemEnabled): Only apply a title to the element when it is enabled. 2017-01-18 Devin Rousso Web Inspector: split console should be allowed for Network and Timeline tabs when Inspector is not docked https://bugs.webkit.org/show_bug.cgi?id=167075 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WebInspector.dockedConfigurationSupportsSplitContentBrowser): Helper function to determine if the current docked state supports having the content view and split console at the same time. Currently set to be true if not docked bottom. * UserInterface/Views/ClusterContentView.js: (WebInspector.ClusterContentView.prototype.get supportsSplitContentBrowser): * UserInterface/Views/ContentView.js: (WebInspector.ContentView.prototype.get supportsSplitContentBrowser): * UserInterface/Views/NetworkTabContentView.js: (WebInspector.NetworkTabContentView.prototype.get supportsSplitContentBrowser): * UserInterface/Views/TimelineTabContentView.js: (WebInspector.TimelineTabContentView.prototype.get supportsSplitContentBrowser): Deleted. Update supportsSplitContentBrowser functions to only be true/false based on the return value of WebInspector.dockedConfigurationSupportsSplitContentBrowser. 2017-01-18 Joseph Pecoraro Web Inspector: console.table only works for the first 5 properties https://bugs.webkit.org/show_bug.cgi?id=167175 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._formatParameterAsTable): Allow a max of 15 columns instead of 10. 2017-01-16 Devin Rousso Web Inspector: add "Persist Logs on Navigation" to settings screen https://bugs.webkit.org/show_bug.cgi?id=166992 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Setting.js: * UserInterface/Controllers/LogManager.js: (WebInspector.LogManager): (WebInspector.LogManager.prototype._delayedMessagesCleared): * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView.prototype._sessionStarted): (WebInspector.LogContentView.prototype._handleContextMenuEvent): (WebInspector.LogContentView.prototype._toggleClearLogOnNavigateSetting): Move setting and UI toggle for "Keep Log on Navigation" to the global settings dictionary and content view. * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.initialLayout): (WebInspector.SettingsTabContentView): Add checkbox for new setting and spacer between text settings and log settings. 2017-01-16 Devin Rousso Web Inspector: add UI Zoom level to Settings screen https://bugs.webkit.org/show_bug.cgi?id=166991 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WebInspector.loaded): (WebInspector._dockedResizerMouseDown): (WebInspector._increaseZoom): (WebInspector._decreaseZoom): (WebInspector._resetZoom): (WebInspector.getZoomFactor): Renamed from _zoomFactor. (WebInspector.setZoomFactor): Renamed from _setZoomFactor. * UserInterface/Base/Setting.js: (WebInspector.settings): Moved zoomFactor setting to global dictionary. * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]): * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.initialLayout): Add UI input for changing zoomFactor. 2017-01-14 Devin Rousso Web Inspector: Cmd-, should open Settings tab https://bugs.webkit.org/show_bug.cgi?id=167028 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): (WebInspector._showSettingsTab): Added. 2017-01-13 Devin Rousso Web Inspector: Settings tab is restored when reopening inspector https://bugs.webkit.org/show_bug.cgi?id=167025 Reviewed by Matt Baker. * UserInterface/Base/Main.js: (WebInspector._tabBrowserSelectedTabContentViewDidChange): Only save the selectedTabIndex if the current tab should be saved and reloaded upon opening the WebInspector window. 2017-01-13 Nikita Vasilyev Web Inspector: Resources disappear from the network tab when iframe gets removed from DOM https://bugs.webkit.org/show_bug.cgi?id=166776 Reviewed by Matt Baker. * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel): Don't remove resource tree elements from Network tab when iframe gets detached from the DOM. 2017-01-13 Nikita Vasilyev Web Inspector: the 'lock' icon for non-editable rules in the Style Rules sidebar lacks a tooltip https://bugs.webkit.org/show_bug.cgi?id=166909 Reviewed by Matt Baker. Convert the lock icon from a pseudo-element to an 'img' element and add a title attribute. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CSSStyleDeclarationSection.css: (.style-declaration-section.locked > .header > .locked-icon): (.style-declaration-section.locked > .header::before): Deleted. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection): 2017-01-12 Nikita Vasilyev REGRESSION (r209711): Web Inspector: in Elements Tab, selecting a deeply nested DOM element causes navigation bar buttons to be pushed off the leading edge https://bugs.webkit.org/show_bug.cgi?id=166898 Reviewed by Timothy Hatcher. * UserInterface/Views/HierarchicalPathComponent.js: (WebInspector.HierarchicalPathComponent.prototype.set selectorArrows): The following operations do NOT produce the same result: classList.toogle(aString, undefined) classList.toogle(aString, false) The former is an equivalent of classList.toogle(aString), e.g. it set a class if it wasn't set before. 2017-01-12 Devin Rousso Web Inspector: cubic-bezier editor behaves poorly for invalid inputs in component fields https://bugs.webkit.org/show_bug.cgi?id=166928 Reviewed by Brian Burg. * UserInterface/Views/BezierEditor.css: (.bezier-editor): (.bezier-editor > .number-input-container > input): * UserInterface/Views/BezierEditor.js: (WebInspector.BezierEditor.createBezierInput): (WebInspector.BezierEditor): Add type, step, min, and max to the bezier component inputs to better control user input. 2017-01-11 Joseph Pecoraro Web Inspector: Add another Protocol Version https://bugs.webkit.org/show_bug.cgi?id=166953 Reviewed by Timothy Hatcher. * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: Added. * Versions/Inspector-iOS-10.3.json: Added. 2017-01-11 Devin Rousso Web Inspector: spring function editor has unusual layout, should have left-aligned labels and slider tracks https://bugs.webkit.org/show_bug.cgi?id=166933 Reviewed by Brian Burg. * UserInterface/Views/Main.css: (input[type=range]::-webkit-slider-thumb): (input[type=range]::-webkit-slider-runnable-track): (input[type=range]::-webkit-slider-runnable-track::before): Deleted. Fix slider styles. * UserInterface/Views/SpringEditor.css: (.spring-editor): (.spring-editor > .spring-preview): (.spring-editor > .spring-timing): (.spring-editor > .number-input-container > .number-input-row > .number-input-row-title): (.spring-editor > .number-input-container > .number-input-row > input): (.spring-editor > .number-input-container > .number-input-row > input::-webkit-inner-spin-button): (.spring-editor > .number-input-container > .number-input-row > input[type="range"]): Decrease spacing and left-align text. * UserInterface/Views/SpringEditor.js: (WebInspector.SpringEditor.prototype._handleNumberInputKeydown): (WebInspector.SpringEditor.prototype._changeSpringForInput): Only update editor values when the new value of any input has changed. This allows users to enter decimal values ("." was being stripped by `parseFloat`). 2017-01-11 Devin Rousso Web Inspector: color, gradient, cubic-bezier, spring editors should be dismissable using ESC https://bugs.webkit.org/show_bug.cgi?id=166934 Reviewed by Brian Burg. * UserInterface/Views/Popover.js: (WebInspector.Popover): (WebInspector.Popover.prototype.dismiss): (WebInspector.Popover.prototype.handleEvent): (WebInspector.Popover.prototype._addListenersIfNeeded): Adds a keydown listener while visible for the Escape key that dismisses the popover. * UserInterface/Views/QuickConsole.js: (WebInspector.QuickConsole.prototype.set keyboardShortcutDisabled): Expose the ability to disable the global keyboard shortcut. This allows the Popover to have its own Escape keyboard shortcut to take precedence. 2017-01-11 Devin Rousso Web Inspector: fix UIString for Print Styles button https://bugs.webkit.org/show_bug.cgi?id=166892 Reviewed by Brian Burg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/DOMTreeContentView.js: (WebInspector.DOMTreeContentView): Changed UIString to better match documentation. 2017-01-09 Commit Queue Unreviewed, rolling out r210260. https://bugs.webkit.org/show_bug.cgi?id=166860 new colorpicker UI doesn't seem to work in trunk, investigating offline (Requested by brrian on #webkit). Reverted changeset: "Web Inspector: color picker should feature an editable CSS value" https://bugs.webkit.org/show_bug.cgi?id=124356 http://trac.webkit.org/changeset/210260 2017-01-06 Commit Queue Unreviewed, rolling out r210110. https://bugs.webkit.org/show_bug.cgi?id=166783 Introduced a regression commenting out individual properties (Requested by JoePeck on #webkit). Reverted changeset: "Web Inspector: Styles sidebar: Uncommenting CSS rules of pseudo-elements doesn't work" https://bugs.webkit.org/show_bug.cgi?id=165831 http://trac.webkit.org/changeset/210110 2017-01-05 Joseph Pecoraro Web Inspector: Remove unused delegate from VisualStyleSelectorSection https://bugs.webkit.org/show_bug.cgi?id=166744 Reviewed by Alex Christensen. * UserInterface/Views/VisualStyleDetailsPanel.js: (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout): * UserInterface/Views/VisualStyleSelectorSection.js: (WebInspector.VisualStyleSelectorSection): 2017-01-04 Brian Burg Web Inspector: Test.html should support globals reportInternalError, reportUnhandledRejection, reportUncaughtException https://bugs.webkit.org/show_bug.cgi?id=161358 Reviewed by Joseph Pecoraro. We have a hodgepodge of redundant code that reports uncaught exceptions in the inspector page. There is better handling of uncaught exceptions in the inspected page, such as including stack traces. This patch consolidates a lot of this code and makes it possible to report unhandled promise rejections, top-level uncaught exceptions, and exceptions caught in a try-catch block. The formatting and sanitization code for all of these things is shared and consistent. Finally, some tests have been added to catch regressions in unhandled rejection/uncaught exception reporting. * UserInterface/Test/FrontendTestHarness.js: (FrontendTestHarness): Explicitly set initial flag state here so it's easy to find all flags. (FrontendTestHarness.prototype.redirectConsoleToTestOutput): Extract this code to sanitize stack frames and put it in TestHarness. It is used by other methods that need to print stack frames. (FrontendTestHarness.prototype.reportUnhandledRejection): (FrontendTestHarness.prototype.reportUncaughtException): Added. Sanitize stack trace data so it is deterministic. Log the message to the original window.console but don't exit early. Sometimes the test page is not fully loaded if we throw an exception quite early in the test() method, and there's no harm in not early returning. If we do early return in this case, then a test that uses reportUncaughtException on purpose may not complete because the call to completeTest() would be skipped by returning early. (FrontendTestHarness.prototype.reportUncaughtExceptionFromEvent): Renamed from reportUncaughtException since the signature of that method suggests it should have a single exception argument rather than lots of data arguments. * UserInterface/Test/Test.js: Add globals. * UserInterface/Test/TestHarness.js: (TestHarness): Document class flags. (TestHarness.sanitizeURL): (TestHarness.sanitizeStackFrame): (TestHarness.prototype.sanitizeStack): Extract this code from other parts of the test harness. Make sanitizeStack an instance method so that there is only one place that needs to check the 'suppressStackTraces' flag. * UserInterface/Test/TestSuite.js: (TestSuite.prototype.logThrownObject): (TestSuite): (AsyncTestSuite.prototype.runTestCases): (AsyncTestSuite): (SyncTestSuite.prototype.runTestCases): (SyncTestSuite): (TestSuite.messageFromThrownObject): Deleted. Inline some helpers with only one use-site and consolidate redundant code for adding an exception and message to the test results. 2017-01-04 Nikita Vasilyev Web Inspector: application cache details not shown in Storage Tab https://bugs.webkit.org/show_bug.cgi?id=166699 Reviewed by Brian Burg. Fix a ternary operator precedence. The following expression throws an exception: true || false ? i.dont.exist : false * UserInterface/Views/ApplicationCacheFrameTreeElement.js: (WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles): 2017-01-03 Brian Burg Web Inspector: WrappedPromise constructor should behave like the Promise constructor https://bugs.webkit.org/show_bug.cgi?id=166523 Reviewed by Joseph Pecoraro. * UserInterface/Models/WrappedPromise.js: (WebInspector.WrappedPromise): - Return the result of 'work' from the inner promise so WrappedPromise.promise can be chained. - Provide shim resolve, reject callbacks as parameters. (WebInspector.WrappedPromise.prototype.get settled): Added. Tells whether we already resolved or rejected the promise. (WebInspector.WrappedPromise.prototype.resolve): (WebInspector.WrappedPromise.prototype.reject): Throw an error if already settled and update the flag. 2017-01-03 Devin Rousso Web Inspector: color picker should feature an editable CSS value https://bugs.webkit.org/show_bug.cgi?id=124356 Reviewed by Brian Burg. * UserInterface/Views/ColorPicker.css: (.color-picker): (.color-picker > .color-inputs): (.color-picker > .color-inputs > div): (.color-picker > .color-inputs > div[hidden]): (.color-picker > .color-inputs input): * UserInterface/Views/ColorPicker.js: (WebInspector.ColorPicker.createColorInput): (WebInspector.ColorPicker): (WebInspector.ColorPicker.prototype.set color): (WebInspector.ColorPicker.prototype.sliderValueDidChange): (WebInspector.ColorPicker.prototype._updateColor): (WebInspector.ColorPicker.prototype._showColorComponentInputs.updateColorInput): (WebInspector.ColorPicker.prototype._showColorComponentInputs): (WebInspector.ColorPicker.prototype._handleColorInputInput): Add an input element (with a label for the component name and its units) for each component as part of the current color format (e.g. R, G, B, A). If any of these inputs are changed then the color is also changed and the "ColorChanged" event is fired. 2017-01-03 Joseph Pecoraro Web Inspector: "Invalid Characters" setting does the opposite of the checkbox https://bugs.webkit.org/show_bug.cgi?id=166664 Reviewed by Brian Burg. * UserInterface/Views/CodeMirrorOverrides.css: (.CodeMirror .cm-invalidchar): (.show-invalid-characters .CodeMirror .cm-invalidchar): Hide invalid characters by default, and show them with the show class. 2017-01-03 Joseph Pecoraro Web Inspector: Fix Content Flow Container Regions Computed Style section https://bugs.webkit.org/show_bug.cgi?id=166294 Reviewed by Brian Burg. * UserInterface/Controllers/DOMTreeManager.js: (WebInspector.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes): (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.domNodeResolved): (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.remoteObjectPropertiesAvailable): (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo): (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.backendFunction.getComputedProperty): Deleted. (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.backendFunction.getContentFlowName): Deleted. Update this to use Array.from() to convert the NodeList to an Array, and then use the already available RemoteObject's size property instead of getting the "length" property from the Array. 2017-01-03 Brian Burg Web Inspector: opening Test.html in a normal browser window doesn't log errors to console https://bugs.webkit.org/show_bug.cgi?id=166570 Reviewed by Joseph Pecoraro. Early syntax errors in the test harness should be logged to the page console since they are easier to debug in a normal browser using Web Inspector. But, the checks to revert to normal console don't work. * UserInterface/Test/FrontendTestHarness.js: (FrontendTestHarness.prototype.reportUncaughtException): Add a helper to encapsulate the meaning of checking this._shouldResendResults. This flag is always true until the test page injects its initializers into the inspector page, which will never happen when we view Test.html outside of the test harness. 2016-12-22 Commit Queue Unreviewed, rolling out r210069. https://bugs.webkit.org/show_bug.cgi?id=166439 This patch makes all properties in Computed Styles strike- through when switching from the Rules panel. (Requested by NVI on #webkit). Reverted changeset: "Web Inspector: Uncommenting CSS properties doesn't work for inline styles" https://bugs.webkit.org/show_bug.cgi?id=166297 http://trac.webkit.org/changeset/210069 2016-12-22 Nikita Vasilyev Web Inspector: Styles sidebar: Uncommenting CSS rules of pseudo-elements doesn't work https://bugs.webkit.org/show_bug.cgi?id=165831 Reviewed by Matt Baker. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype.uncommentAllProperties): Call _resetContent() when toggling all properties to ensure properties have text markers. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): (WebInspector.CSSStyleDeclarationTextEditor.prototype._uncommentProperty): Added. This method is the opposite of _commentProperty. Introduce it to minimize code duplication. 2016-12-21 Nikita Vasilyev Web Inspector: Uncommenting CSS properties doesn't work for inline styles https://bugs.webkit.org/show_bug.cgi?id=166297 Reviewed by Brian Burg. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: Update checkboxes for inline styles, too. 2016-12-20 Matt Baker Web Inspector: Window resize causes TimelineOverview graph elements to be repositioned https://bugs.webkit.org/show_bug.cgi?id=160207 Reviewed by Brian Burg. TimelineRuler does not always update its divider positions when the start time changes while the end time remains the same. The check that determines whether the first or last divider positions have changed before doing a layout uses the ruler end time instead of calculating the last divider's position, and would falsely determine no change was needed. * UserInterface/Views/TimelineRuler.js: (WebInspector.TimelineRuler.prototype.set startTime): (WebInspector.TimelineRuler.prototype.set secondsPerPixel): Clear cached divider data on zoom or scroll, forcing dividers to be recalculated. (WebInspector.TimelineRuler.prototype.layout): Calculate accurate divider count and last divider time. 2016-12-20 Wenson Hsieh Update keyword completions in the inspector for the new scroll snapping CSS properties https://bugs.webkit.org/show_bug.cgi?id=166235 Reviewed by Joseph Pecoraro. The CSS keyword completions for the scroll snapping properties need to be updated for the latest version of the spec. * UserInterface/Models/CSSKeywordCompletions.js: 2016-12-20 Joseph Pecoraro Web Inspector: Console could be made useful for very simple await expressions https://bugs.webkit.org/show_bug.cgi?id=165681 Reviewed by Brian Burg. Normally await expressions are only allowed inside of async functions. They make dealing with async operations easy, but can't be used directly in Web Inspector's console without making your own async function wrapper. This change allows simple await expressions to be run in the console. The supported syntaxes are (simple expression with optional assignment): await x = await let x = await Web Inspector's console will automatically wrap this in an async function and report the resulting value or exception. For instance in the last example above: let x; (async function() { try { x = await ; console.info("%o", x); } catch (e) { console.error(e); } })(); undefined This way users can get the convenience of await in the Console. This also gives users a nice way of extracting a value out of a Promise without writing their own handlers. * UserInterface/Controllers/RuntimeManager.js: (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow): (WebInspector.RuntimeManager.prototype._tryApplyAwaitConvenience): Wrap simple await expressions into a function that will log the result. 2016-12-20 Joseph Pecoraro Web Inspector: Update CodeMirror to support async/await keyword and other ES2017 features https://bugs.webkit.org/show_bug.cgi?id=165677 Rubber-stamped by Brian Burg. Update CodeMirror from version 5.5.1 to 5.21.1. Highlights include: - Syntax highlighting for ES2017 features (async/await) - Syntax highlighting improvements for some ES6 features (new.target) - Syntax highlighting for CSS4 #rrggbbaa and #rgba colors As well as a number of smaller bug fixes. Had to add a few semicolons to codemirror.js so that our minifier didn't choke in a few places due to ASI behavior. * Scripts/update-codemirror-resources.rb: * UserInterface/External/CodeMirror/LICENSE: * UserInterface/External/CodeMirror/clojure.js: * UserInterface/External/CodeMirror/closebrackets.js: * UserInterface/External/CodeMirror/codemirror.css: * UserInterface/External/CodeMirror/codemirror.js: * UserInterface/External/CodeMirror/coffeescript.js: * UserInterface/External/CodeMirror/comment.js: * UserInterface/External/CodeMirror/css.js: * UserInterface/External/CodeMirror/htmlmixed.js: * UserInterface/External/CodeMirror/javascript.js: * UserInterface/External/CodeMirror/livescript.js: * UserInterface/External/CodeMirror/matchbrackets.js: * UserInterface/External/CodeMirror/overlay.js: * UserInterface/External/CodeMirror/placeholder.js: * UserInterface/External/CodeMirror/runmode.js: * UserInterface/External/CodeMirror/sql.js: * UserInterface/External/CodeMirror/sublime.js: * UserInterface/External/CodeMirror/xml.js: 2016-12-19 Joseph Pecoraro Web Inspector: Address some assertions and uncaught exceptions seen using Inspector https://bugs.webkit.org/show_bug.cgi?id=166048 Reviewed by Matt Baker. * UserInterface/Controllers/CodeMirrorEditingController.js: (WebInspector.CodeMirrorEditingController.prototype.presentHoverMenu): (WebInspector.CodeMirrorEditingController.prototype.dismissHoverMenu): classList throws an exception when given an empty string. Avoid those cases. * UserInterface/Controllers/CodeMirrorTokenTrackingController.js: (WebInspector.CodeMirrorTokenTrackingController.prototype._startTracking): (WebInspector.CodeMirrorTokenTrackingController.prototype._stopTracking): Seen this assert frequently for a while, existing code handles it gracefully. * UserInterface/Workers/Formatter/EsprimaFormatter.js: (EsprimaFormatter.prototype._handleTokenAtNode): We correctly handle these tokens but they were not in the list of expected tokens. 2016-12-16 Joseph Pecoraro JSContext Inspector: Avoid some possible exceptions inspecting a JSContext https://bugs.webkit.org/show_bug.cgi?id=165986 Reviewed by Matt Baker. * UserInterface/Base/Main.js: There will not be a main frame if we are debugging a JSContext. In those cases do not change the title. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): There may not be a parent folder in JavaScript inspection. In that case ScriptTreeElements are added to the Top Level, not folders. 2016-12-16 Matt Baker Web Inspector: REGRESSION (r209882): Opening find banner in editor causes UI to hang https://bugs.webkit.org/show_bug.cgi?id=165967 Reviewed by Timothy Hatcher. * UserInterface/Views/ContentBrowser.js: (WebInspector.ContentBrowser.prototype._findBannerDidShow): Showing the find banner should cause search results to be refreshed only if it contains query text. 2016-12-16 Matt Baker Web Inspector: Modernize find banner UI https://bugs.webkit.org/show_bug.cgi?id=165939 Reviewed by Timothy Hatcher. The find banner should have a modern appearance, matching Xcode. * UserInterface/Views/FindBanner.css: (.find-banner > input[type="search"]): (.find-banner > button): Use standard border colors. (.find-banner > button:disabled > .glyph): Disabled previous / next glyphs should be lighter. (.find-banner > button:active:not(:disabled)): Update depressed button style: flat colors, no text color change. (.find-banner > button.segmented): (.find-banner > button.segmented.left): (.find-banner > button:not(:active).segmented.right:before): (.find-banner > button.segmented.left:active + button.segmented.right,): (.find-banner > button.segmented.left:active + button.segmented.right:before): (.find-banner > button.segmented.right): (.find-banner.console-find-banner > input[type="search"]): (.find-banner.console-find-banner > :matches(input[type="search"], button)): (.find-banner > button:disabled): Deleted. (.find-banner > button.segmented:active): Deleted. Overlapping button borders are no longer an issue. * UserInterface/Views/FindBanner.js: (WebInspector.FindBanner): Insert previous / next buttons after the input field in the DOM. (WebInspector.FindBanner.prototype.get delegate): (WebInspector.FindBanner.prototype.set delegate): (WebInspector.FindBanner.prototype.get inputField): (WebInspector.FindBanner.prototype.get searchQuery): (WebInspector.FindBanner.prototype.set searchQuery): (WebInspector.FindBanner.prototype.get numberOfResults): Inline simple getters and setters. * UserInterface/Views/Variables.css: (:root): Add button colors. 2016-12-15 Matt Baker Web Inspector: console search bar jumps, behaves poorly at narrow widths https://bugs.webkit.org/show_bug.cgi?id=164047 Reviewed by Timothy Hatcher. At narrow widths the find banner behaves poorly in the split console toolbar. It should work like the main content browser, appearing below the toolbar when Command-F is pressed and either the split console or quick console prompt has the focus. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): Enable split content browser find banner. * UserInterface/Views/ContentBrowser.js: (WebInspector.ContentBrowser.prototype.showFindBanner): Check for custom find banner support at runtime. (WebInspector.ContentBrowser.prototype._findBannerDidShow): (WebInspector.ContentBrowser.prototype._findBannerDidHide): Refresh search results when banner is shown/hidden, instead of relying on toggling the "showing-find-banner" class name for everything. (WebInspector.ContentBrowser.prototype.handleFindEvent): Deleted. Renamed `showFindBanner`. * UserInterface/Views/ContentView.js: (WebInspector.ContentView.prototype.get supportsCustomFindBanner): (WebInspector.ContentView.prototype.showCustomFindBanner): Custom find banner support (used by LogContentView). * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView): (WebInspector.LogContentView.prototype.get supportsSearch): (WebInspector.LogContentView.prototype.get numberOfSearchResults): (WebInspector.LogContentView.prototype.get hasPerformedSearch): Cleanup. (WebInspector.LogContentView.prototype.get supportsCustomFindBanner): Use toolbar item find banner when showing Console tab. (WebInspector.LogContentView.prototype.findBannerRevealPreviousResult): (WebInspector.LogContentView.prototype.findBannerRevealNextResult): (WebInspector.LogContentView.prototype._isMessageVisible): (WebInspector.LogContentView.prototype._visibleMessageElements): (WebInspector.LogContentView.prototype._logCleared): (WebInspector.LogContentView.prototype._filterMessageElements): (WebInspector.LogContentView.prototype.findBannerPerformSearch): (WebInspector.LogContentView.prototype.findBannerSearchCleared): (WebInspector.LogContentView.prototype.performSearch): Support both the standard and custom (toolbar item) find banners. (WebInspector.LogContentView.prototype.searchCleared): Refresh search results. (WebInspector.LogContentView.prototype._highlightRanges): Correct spelling: _selectedSearchMathIsValid -> _selectedSearchMatchIsValid. (WebInspector.LogContentView.prototype.get searchInProgress): Deleted. Override ContentView.prototype.hasPerformedSearch instead. (WebInspector.LogContentView.prototype.handleFindEvent): Deleted. Replaced by `showCustomFindBanner`. (WebInspector.LogContentView.prototype.highlightPreviousSearchMatch): Deleted. Absorbed by findBannerRevealPreviousResult. (WebInspector.LogContentView.prototype.highlightNextSearchMatch): Deleted. Absorbed by findBannerRevealNextResult. (WebInspector.LogContentView.prototype._performSearch): Deleted. Override ContentView.prototype.performSearch instead. * UserInterface/Views/Main.css: (#split-content-browser > .navigation-bar :matches(.find-banner, .find-banner + .divider)): Hide the toolbar banner and divider. 2016-12-14 Ryosuke Niwa Web Inspector: Jumping to the definition of a custom elements is broken https://bugs.webkit.org/show_bug.cgi?id=165890 Reviewed by Joseph Pecoraro. Fix the regression from https://trac.webkit.org/changeset/208304. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._showCustomElementDefinition): Use the main target since a custom element definition can never come from a worker. 2016-12-14 Matt Baker Web Inspector: Zooming in on the Timeline should always zoom right where the cursor is https://bugs.webkit.org/show_bug.cgi?id=151118 Reviewed by Timothy Hatcher. Use correct left edge for timeline overview graph elements. * UserInterface/Views/TimelineOverview.js: (WebInspector.TimelineOverview.prototype._handleWheelEvent): (WebInspector.TimelineOverview._handleGestureStart): (WebInspector.TimelineOverview.prototype._handleGestureChange): 2016-12-12 Nikita Vasilyev [GTK] Web Inspector: Add NavigationItemCodeCoverage.svg icon https://bugs.webkit.org/show_bug.cgi?id=165698 Reviewed by Joseph Pecoraro. * UserInterface/Images/gtk/NavigationItemCodeCoverage.svg: Added. Match in style the existing NavigationItemTypes.svg icon. 2016-12-12 Matt Baker Web Inspector: Cleanup HierarchicalPathComponent https://bugs.webkit.org/show_bug.cgi?id=165745 Reviewed by Brian Burg. Prefer toggle for style class names, remove single use CSS class name constants, and back all properties by the model not the DOM. * UserInterface/Views/HierarchicalPathComponent.js: (WebInspector.HierarchicalPathComponent): (WebInspector.HierarchicalPathComponent.prototype.get element): (WebInspector.HierarchicalPathComponent.prototype.get representedObject): (WebInspector.HierarchicalPathComponent.prototype.get minimumWidth): (WebInspector.HierarchicalPathComponent.prototype.get forcedWidth): (WebInspector.HierarchicalPathComponent.prototype.set forcedWidth): (WebInspector.HierarchicalPathComponent.prototype.get hidden): (WebInspector.HierarchicalPathComponent.prototype.set hidden): (WebInspector.HierarchicalPathComponent.prototype.get collapsed): (WebInspector.HierarchicalPathComponent.prototype.set collapsed): (WebInspector.HierarchicalPathComponent.prototype.get selectorArrows): (WebInspector.HierarchicalPathComponent.prototype.set selectorArrows): (WebInspector.HierarchicalPathComponent.prototype.get previousSibling): (WebInspector.HierarchicalPathComponent.prototype.set previousSibling): (WebInspector.HierarchicalPathComponent.prototype.get nextSibling): (WebInspector.HierarchicalPathComponent.prototype.set nextSibling): (WebInspector.HierarchicalPathComponent.prototype._updateElementTitleAndText): (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption): (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement): 2016-12-12 Matt Baker Web Inspector: Allow keyboard navigation in Heap Snapshot data grids https://bugs.webkit.org/show_bug.cgi?id=165752 Reviewed by Brian Burg. * UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom:focus li.selected > span::after): Use new color variable. * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js: (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get selectable): Deleted. Should be selectable. * UserInterface/Views/HeapSnapshotInstancesContentView.css: (.heap-snapshot > .data-grid:focus tr.selected > td .sub-retained): (.heap-snapshot > .data-grid:focus tr.selected .object-id,): (.heap-snapshot > .data-grid:focus tr.selected .formatted-string,): (.heap-snapshot > .data-grid:focus tr.selected td .location): Selected row text should just be white, except for values that are usually gray (object ID, object size, and sub-retained size values). These should be styled like the "= $0" marker in the DOM tree outline. (.heap-snapshot > .data-grid:matches(:focus, .force-focus) tr.selected td .location): Deleted. Removed forced-focus reference. Only used by TreeOutlineDataGridSynchronizer. * UserInterface/Views/Variables.css: (:root): Added --selected-secondary-text-color. 2016-12-12 Matt Baker Web Inspector: Breakpoint Log action should support template literals https://bugs.webkit.org/show_bug.cgi?id=165116 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: New string "${expr} = expression" for breakpoint popover. * UserInterface/Controllers/BreakpointLogMessageLexer.js: Added. To support template literal placeholders in message text, it is necessary to distinguish plain text parts of the message from placeholders, since plain text must be escaped. (WebInspector.BreakpointLogMessageLexer): (WebInspector.BreakpointLogMessageLexer.prototype.tokenize): (WebInspector.BreakpointLogMessageLexer.prototype.reset): (WebInspector.BreakpointLogMessageLexer.prototype._finishPlainText): (WebInspector.BreakpointLogMessageLexer.prototype._finishExpression): (WebInspector.BreakpointLogMessageLexer.prototype._appendToken): (WebInspector.BreakpointLogMessageLexer.prototype._consume): (WebInspector.BreakpointLogMessageLexer.prototype._peek): (WebInspector.BreakpointLogMessageLexer.prototype._expression): (WebInspector.BreakpointLogMessageLexer.prototype._plainText): (WebInspector.BreakpointLogMessageLexer.prototype._possiblePlaceholder): (WebInspector.BreakpointLogMessageLexer.prototype._regExpOrStringLiteral): * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._debuggerBreakpointOptions): Build breakpoint "options" object for DebuggerAgent. If a Log action contains template literal placeholders it is changed to an Evaluate action, which calls console.log with a template literal. (WebInspector.DebuggerManager.prototype._setBreakpoint): Use converted breakpoint options. * UserInterface/Main.html: * UserInterface/Test.html: New file. * UserInterface/Views/BreakpointActionView.css: (.breakpoint-action-block-body > .description): Styles for breakpoint Log action hint text. * UserInterface/Views/BreakpointActionView.js: (WebInspector.BreakpointActionView.prototype._updateBody): Add Log action hint text element. 2016-12-11 Matt Baker Web Inspector: ThreadTreeElement should have a "Resume" status button when paused https://bugs.webkit.org/show_bug.cgi?id=165581 Reviewed by Joseph Pecoraro. * UserInterface/Images/Resume.svg: Fill/stroke should be unspecified so that both can be styled in CSS. * UserInterface/Views/DebuggerDashboardView.css: (.dashboard.debugger .navigation-bar .item.debugger-dashboard-pause.activated): * UserInterface/Views/DebuggerSidebarPanel.css: (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume): (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume.activated): Recreate original style which relied on 'fill="none"' being specified in the SVG. * UserInterface/Views/ThreadTreeElement.css: (.tree-outline > .item.thread .icon): (.tree-outline > .item.thread .status-button.resume): (.tree-outline > .item.thread .status-button.resume:active): (.tree-outline:matches(:focus, .force-focus) > .item.thread.selected .status-button.resume): (.tree-outline > .item.thread.selected .status-button.resume,): (.details-section.call-stack .thread .icon): Deleted. Status button styles. Colors match those of the goto-arrow button. * UserInterface/Views/ThreadTreeElement.js: (WebInspector.ThreadTreeElement.prototype.refresh): Update status icon. (WebInspector.ThreadTreeElement.prototype.oncontextmenu): (WebInspector.ThreadTreeElement.prototype._updateStatus): Add/remove status button based on paused state. Stop propagation of "mousedown" events on the status button, to prevent button press from selecting the tree element. (WebInspector.ThreadTreeElement): 2016-12-11 Joseph Pecoraro Web Inspector: Move MainTarget and WorkerTarget to their own files https://bugs.webkit.org/show_bug.cgi?id=165701 Reviewed by Brian Burg. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.scriptDidParse): * UserInterface/Main.html: * UserInterface/Protocol/MainTarget.js: Added. (WebInspector.MainTarget): (WebInspector.MainTarget.prototype.get displayName): (WebInspector.MainTarget.prototype.get mainResource): * UserInterface/Protocol/Target.js: (WebInspector.Target): (WebInspector.MainTarget): Deleted. (WebInspector.MainTarget.prototype.get displayName): Deleted. (WebInspector.MainTarget.prototype.get mainResource): Deleted. (WebInspector.MainTarget.prototype.initialize): Deleted. (WebInspector.WorkerTarget): Deleted. (WebInspector.WorkerTarget.prototype.get displayName): Deleted. (WebInspector.WorkerTarget.prototype.initialize): Deleted. * UserInterface/Protocol/WorkerTarget.js: Added. (WebInspector.WorkerTarget): (WebInspector.WorkerTarget.prototype.get displayName): * UserInterface/Test.html: 2016-12-09 Joseph Pecoraro Web Inspector: Frontend should not be resetting TypeProfiler state when switching between ContentViews https://bugs.webkit.org/show_bug.cgi?id=165648 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WebInspector.loaded): Update all backends when the state changes. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState): (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled): Moved this code to when the global Setting (which affects all editors) changes. 2016-12-09 Joseph Pecoraro Web Inspector: Some resources fetched via Fetch API do not have data https://bugs.webkit.org/show_bug.cgi?id=165230 Reviewed by Alex Christensen. * Localizations/en.lproj/localizedStrings.js: New "Fetch" and "Fetches" localized strings. * UserInterface/Models/Resource.js: (WebInspector.Resource.displayNameForType): * UserInterface/Models/ResourceCollection.js: (WebInspector.ResourceCollection.verifierForType): * UserInterface/Views/CollectionContentView.js: (WebInspector.CollectionContentView): * UserInterface/Views/ResourceClusterContentView.js: (WebInspector.ResourceClusterContentView.prototype.get responseContentView): * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.compareResourceTreeElements): New ResourceType.Fetch. Behave like XHR in most places. 2016-12-08 Joseph Pecoraro Web Inspector: Unable to delete breakpoint from worker script https://bugs.webkit.org/show_bug.cgi?id=165578 Reviewed by Matt Baker. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._removeBreakpoint): Match setting breakpoints. If this is a "URL breakpoint", affect all targets. If this is a "Script breakpoint", affect just the single target containing that Script. 2016-12-07 Devin Rousso REGRESSION(r203912): Web Inspector: Navigation sidebar widths are not saved https://bugs.webkit.org/show_bug.cgi?id=165496 Reviewed by Matt Baker. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser): (WebInspector.TabBrowser.prototype._sidebarWidthDidChange): (WebInspector.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView): (WebInspector.TabBrowser.prototype._sidebarWidthDidChange): Renamed from _detailsSidebarWidthDidChange. Add event listener for when the navigation sidebar's width is changed. * UserInterface/Views/TabContentView.js: (WebInspector.TabContentView): (WebInspector.TabContentView.prototype.get navigationSidebarPanel): (WebInspector.TabContentView.prototype.get navigationSidebarCollapsedSetting): (WebInspector.TabContentView.prototype.get navigationSidebarWidthSetting): (WebInspector.TabContentView.prototype.get detailsSidebarPanels): (WebInspector.TabContentView.prototype.get detailsSidebarCollapsedSetting): (WebInspector.TabContentView.prototype.get detailsSidebarSelectedPanelSetting): (WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting): Add WebInspector.Setting object for the navigation sidebar's width. 2016-12-07 Nikita Vasilyev Web Inspector: Control Flow Profiler's event handlers aren't getting removed when ContentView closes https://bugs.webkit.org/show_bug.cgi?id=165556 Reviewed by Joseph Pecoraro. * UserInterface/Views/ScriptContentView.js: (WebInspector.ScriptContentView.prototype.closed): * UserInterface/Views/TextResourceContentView.js: (WebInspector.TextResourceContentView.prototype.closed): 2016-12-07 Joseph Pecoraro Web Inspector: Add ability to distinguish if a Script was parsed as a module https://bugs.webkit.org/show_bug.cgi?id=164900 Reviewed by Timothy Hatcher. * UserInterface/Models/Script.js: (WebInspector.Script.prototype.get sourceType): New property of Scripts. SourceType is either Program or Module. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.scriptDidParse): * UserInterface/Protocol/DebuggerObserver.js: (WebInspector.DebuggerObserver.prototype.scriptParsed): Convert incoming module boolean into SourceType when creating new Scripts. * UserInterface/Models/ScriptSyntaxTree.js: (WebInspector.ScriptSyntaxTree): (WebInspector.ScriptSyntaxTree.prototype._recurse): (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree): Update the generic AST for new module specific Esprima types. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.textEditorScriptSourceType): * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype._startWorkerPrettyPrint): For pretty printing correctly state if this is a module or not for Esprima. 2016-12-07 Joseph Pecoraro Web Inspector: Update Esprima to support new features / syntax (**, async/await, trailing comma) https://bugs.webkit.org/show_bug.cgi?id=164830 Reviewed by Timothy Hatcher. * UserInterface/External/Esprima/LICENSE: * UserInterface/External/Esprima/esprima.js: Updated to Esprima@7219731 (4.0.0-dev). * UserInterface/Models/ScriptSyntaxTree.js: (WebInspector.ScriptSyntaxTree.prototype._recurse): (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree): * UserInterface/Workers/Formatter/ESTreeWalker.js: (ESTreeWalker.prototype._walkChildren): Add new nodes (AwaitExpression). Add new states (async boolean property on Functions). Remove stale properties (defaults is no longer needed, as parameters with default values are now AssignmentPatterns). Update MetaProperty where meta/property are now Identifiers not strings. * UserInterface/Workers/Formatter/EsprimaFormatter.js: (EsprimaFormatter.prototype._handleTokenAtNode): Handle pretty printing of new nodes and identifiers. * Controllers/FrameResourceManager.js Address a console.assert warning for stripping assertions in Production. 2016-12-07 Joseph Pecoraro Web Inspector: Remove unused and mostly untested Page domain commands and events https://bugs.webkit.org/show_bug.cgi?id=165507 Reviewed by Brian Burg. * UserInterface/Protocol/PageObserver.js: (WebInspector.PageObserver.prototype.javascriptDialogOpening): (WebInspector.PageObserver.prototype.javascriptDialogClosed): (WebInspector.PageObserver.prototype.scriptsEnabled): Keep stub in case legacy backends dispatch the event to the frontend. * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: * Versions/Inspector-iOS-10.0.json: * Versions/Inspector-iOS-7.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: * Versions/Inspector-iOS-9.3.json: Remove handleJavaScriptDialog command from legacy backends because it doesn't appear as if the iOS backend handled it at all. 2016-12-06 Alexey Proskuryakov Correct SDKROOT values in xcconfig files https://bugs.webkit.org/show_bug.cgi?id=165487 rdar://problem/29539209 Reviewed by Dan Bernstein. Fix suggested by Dan Bernstein. * Configurations/DebugRelease.xcconfig: 2016-12-05 Matt Baker Web Inspector: Object.shallowEqual([{}], [{}]) should return true https://bugs.webkit.org/show_bug.cgi?id=165397 Reviewed by Brian Burg. * UserInterface/Base/Utilities.js: (value): Array.shallowEqual should compare array items using strict equivalence, and on failure defer to Object.shallowEqual. 2016-12-05 Joseph Pecoraro Web Inspector: Remove legacy styles https://bugs.webkit.org/show_bug.cgi?id=165389 Reviewed by Matt Baker. Remove styles for platforms we don't build on anymore (Mavericks and Mountain Lion). There are also no "unknown-mac" styles to upgrade to a named platform. * UserInterface/Base/Platform.js: Add sierra and remove older unsupported platforms. * UserInterface/Views/Main.css: (body): (body:not(.mavericks)): Deleted. * UserInterface/Views/TabBar.css: (body.mavericks .tab-bar > .item:not(.disabled).selected): Deleted. * UserInterface/Views/Toolbar.css: (body .toolbar): (body.window-inactive .toolbar): (body.mac-platform:not(.docked) .toolbar): (body.mac-platform:not(.docked)): (body:not(.mavericks) .toolbar,): Deleted. (body.window-inactive:not(.mavericks) .toolbar): Deleted. (body.mac-platform:not(.docked, .mavericks) .toolbar): Deleted. (body.mac-platform:not(.docked, .mavericks)): Deleted. Remove mavericks specific styles. 2016-12-02 Andy Estes [Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting https://bugs.webkit.org/show_bug.cgi?id=164492 Reviewed by Dan Bernstein. * Configurations/WebInspectorUIFramework.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to com.apple.$(PRODUCT_NAME:rfc1034identifier). * Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}. 2016-12-02 Nikita Vasilyev REGRESSION (r192344): Web Inspector: Turning off Code Coverage or Type Profiler logs an error https://bugs.webkit.org/show_bug.cgi?id=164804 Reviewed by Matt Baker. BasicBlockAnnotator and TypeTokenAnnotator were instanciated for a resource in an inactive Debugger tab. * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement): Don't show any content view if we are not in a selected tab. 2016-12-01 Matt Baker Web Inspector: Show async stack traces for workers https://bugs.webkit.org/show_bug.cgi?id=165235 Reviewed by Joseph Pecoraro. * UserInterface/Views/CallFrameTreeElement.css: (.tree-outline > .children > .item.call-frame.async-boundary): (.tree-outline:not(.single-thread) > .children > .item.call-frame.async-boundary): (.tree-outline .item.call-frame.async-boundary::before): (.tree-outline.single-thread .item.call-frame.async-boundary::before): (.tree-outline .item.call-frame.async-boundary): Deleted. Style changes for single/multiple-thread call stacks. Padding changes to account for Thread tree element. Make selectors more specific where needed. * UserInterface/Views/DebuggerSidebarPanel.css: (.sidebar > .panel.navigation.debugger .tree-outline.single-thread > .item.thread): (.sidebar > .panel.navigation.debugger .tree-outline.single-thread): Style changes for single/multiple-thread call stacks. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): Use a single tree outline for showing a single thread or multiple threads. For single-threaded, hide Thread tree element and un-indent children. (WebInspector.DebuggerSidebarPanel.prototype._targetAdded): (WebInspector.DebuggerSidebarPanel.prototype._targetRemoved): (WebInspector.DebuggerSidebarPanel.prototype._updateCallStackTreeOutline): Update tree style and whether Thread tree element is selectable. (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange): Remove support for second tree outline. (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks): Deleted. (WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement): Deleted. (WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks): Deleted. (WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks): Deleted. No longer needed after unifying tree outlines. * UserInterface/Views/ThreadTreeElement.js: (WebInspector.ThreadTreeElement.prototype.refresh): Append call frames from the async stack trace. 2016-11-30 Joseph Pecoraro Web Inspector: Clicking on link in Web Inspector can cause UIProcess to crash https://bugs.webkit.org/show_bug.cgi?id=165157 Reviewed by Brian Burg. By correctly disallowing slashes in the scheme Web Inspector resolves the correct absolute URL and doesn't end up trying to navigate to an incorrect file URL. * UserInterface/Base/URLUtilities.js: (parseURL): Disallow "/" characters in the scheme portion. (/http://example.com) Allow path to be optional before a fragment portion. (http://example.com#frag) 2016-11-29 Joseph Pecoraro Web Inspector: Improve name sorting in HeapSnapshot data grids https://bugs.webkit.org/show_bug.cgi?id=165170 Reviewed by Matt Baker. When sorting the Name column, group named properties and unnamed properties and sort them each individually: - Sort named properties by their property name (property names will be unique if they exist) - Sort unnamed properties by their class name (guaranteed) - Sort any tied class names by their object id This makes using the Object Graph with Name sort easier to follow. In the ascending sort you see all the named properties first, followed by the unnamed (internal) properties. * UserInterface/Views/HeapSnapshotContentView.js: (WebInspector.HeapSnapshotObjectGraphContentView): Since this data grid column now sorts on more than just the "Class Name" rename it to "Name". * UserInterface/Views/HeapSnapshotDataGridTree.js: (WebInspector.HeapSnapshotDataGridTree.buildSortComparator): Make the sort of the `className` column more general to handle sorting by property names, class names, and object identifiers. * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js: (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get propertyName): (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent): Provide a lazy `propertyName` accessor where we compute it once and stash it on the DataGridNode to avoid extra work when resorting. (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate.propertyName): (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate): In the initial populated sort, provide the necessary property name property the sort comparator expects. 2016-11-29 Matt Baker Web Inspector: Breakpoints button enabled state is too subtle https://bugs.webkit.org/show_bug.cgi?id=165153 Reviewed by Joseph Pecoraro. * UserInterface/Images/Breakpoints.svg: Change to path so stroke and fill can be styled. * UserInterface/Views/DebuggerSidebarPanel.css: (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints): (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints.activated): Fill and stroke styles for the active and inactive breakpoint button. 2016-11-28 Matt Baker Web Inspector: Debugger should have an option for showing asynchronous call stacks https://bugs.webkit.org/show_bug.cgi?id=163230 Reviewed by Joseph Pecoraro. * Localizations/en.lproj/localizedStrings.js: New string for generic async call stack boundary label: "(async)". * UserInterface/Controllers/DebuggerManager.js: Create async stack depth setting and set default depth. (WebInspector.DebuggerManager.prototype.get asyncStackTraceDepth): (WebInspector.DebuggerManager.prototype.set asyncStackTraceDepth): Make async stack depth setting accessible to the frontend. (WebInspector.DebuggerManager.prototype.initializeTarget): Set async stack depth value on the target. (WebInspector.DebuggerManager.prototype.debuggerDidPause): Plumbing for the async stack trace payload. * UserInterface/Models/ConsoleMessage.js: (WebInspector.ConsoleMessage): Updated for new StackTrace.fromPayload use. * UserInterface/Models/DebuggerData.js: (WebInspector.DebuggerData): (WebInspector.DebuggerData.prototype.get asyncStackTrace): (WebInspector.DebuggerData.prototype.updateForPause): (WebInspector.DebuggerData.prototype.updateForResume): More plumbing. * UserInterface/Models/StackTrace.js: Update frontend model for use as new protocol object Console.StackTrace, which was previously an alias for a simple array of Console.CallFrames. (WebInspector.StackTrace): (WebInspector.StackTrace.fromPayload): (WebInspector.StackTrace.fromString): (WebInspector.StackTrace.prototype.get topCallFrameIsBoundary): (WebInspector.StackTrace.prototype.get parentStackTrace): * UserInterface/Protocol/DebuggerObserver.js: (WebInspector.DebuggerObserver.prototype.paused): More plumbing. * UserInterface/Views/CallFrameTreeElement.css: (.tree-outline .item.call-frame.async-boundary): Use default cursor since boundary element is not selectable. (.tree-outline .item.call-frame.async-boundary .icon): (.tree-outline .item.call-frame.async-boundary::before,): (.tree-outline .item.call-frame.async-boundary::after): (.tree-outline .item.call-frame.async-boundary::before): Dimmed text and divider line styles for boundary element. * UserInterface/Views/CallFrameTreeElement.js: (WebInspector.CallFrameTreeElement): Add a flag denoting whether the call frame is an async call trace boundary, and set styles accordingly. * UserInterface/Views/DebuggerSidebarPanel.js: Set async stack trace depth, if supported. (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks): Add call frames for async stack traces to the call stack TreeOutline. (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange): Ensure that async call frames cannot become the active call frame. * UserInterface/Views/Variables.css: (:root): Add --text-color-gray-medium, for dimmed text in async boundary element. 2016-11-18 Matt Baker Web Inspector: TimelineDataGridNode assertions when refreshing page https://bugs.webkit.org/show_bug.cgi?id=162642 Reviewed by Timothy Hatcher. This patch fixes a number of deficiencies in the Network tab that caused TimelineDataGridNode graphs to refresh before the tab became visible. * UserInterface/Views/ElementsTabContentView.js: (WebInspector.ElementsTabContentView): (WebInspector.ElementsTabContentView.prototype.shown): Drive-by fix: defer showing the DOM content view until the tab is shown. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView): Drive-by event listener cleanup. (WebInspector.NetworkGridContentView.prototype.get startTime): (WebInspector.NetworkGridContentView.prototype.get endTime): Back endTime with a variable, instead of using the ruler value which isn't valid before the tab is shown for the first time. (WebInspector.NetworkGridContentView.prototype.shown): Force the grid to update its layout, and that of the Timeline column ruler. During layout the ruler's secondsPerPixel value is used, which isn't valid until the ruler does an initial layout. (WebInspector.NetworkGridContentView.prototype.reset): Clear pending records. This was causing duplicates to appear when the inspected page was refreshed multiple times prior to showing the Network tab for the first time. (WebInspector.NetworkGridContentView.prototype.layout): Should more closely match behavior in NetworkTimelineView.prototype.layout. Graph end time padding is added if no longer updating the current time. (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded): Track endTime of the last record added, so that the graph end time can be padded once the current time is no longer being updated. (WebInspector.NetworkGridContentView.prototype._update): (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime): Graph end time padding shouldn't be applied here, since this isn't called if the inspected page finishes loading before the view is shown. (WebInspector.NetworkGridContentView.prototype._clearNetworkItems): Deleted. Replaced by an arrow function. * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset): Don't show the content view if the tab is hidden. 2016-11-17 Devin Rousso Web Inspector: Shift clicking on named color value only shows its hex form https://bugs.webkit.org/show_bug.cgi?id=162758 Reviewed by Timothy Hatcher. * UserInterface/Models/Color.js: (WebInspector.Color.prototype.nextFormat): Reworked the logic for the formatting order to be the following: - Long HEX and Long HEXAlpha - RGB and RGBA - HSL and HSLA - Keyword (if applicable) - Short HEX (if applicable) - Short HEXAlpha (if applicable) It will only show formats with alpha values if the color value has an alpha that is not 1. If the alpha is not 1, it will not show formats with non-alpha values. The changes to this function have no effect on the context menu items of InlineSwatch elements. The purpose of each of those items is to allow the user to change the format to a specified type, whereas WebInspector.Color.prototype.nextFormat is used to cycle through all of the relevant formats. (WebInspector.Color.prototype._toRGBString): (WebInspector.Color.prototype._toRGBAString): (WebInspector.Color.prototype._toHSLString): (WebInspector.Color.prototype._toHSLAString): Unrelated fix of extra decimals when converting from HEX to RGB and HSL. * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor._inlineSwatchValueChanged): Removed assertion for `_hasActiveInlineSwatchEditor` since the value may change from switching the format of a color swatch (Shift-Click). 2016-11-16 Joseph Pecoraro Web Inspector: Background tabs are often updating non-stop because they think they are visible https://bugs.webkit.org/show_bug.cgi?id=164841 Reviewed by Matt Baker. * UserInterface/Views/NetworkGridContentView.js: (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded): * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._update): Don't constantly update when this tab is not in the foreground. 2016-11-15 Joseph Pecoraro Web Inspector: SourceCodeTextEditor should display execution lines for background threads https://bugs.webkit.org/show_bug.cgi?id=164679 Reviewed by Timothy Hatcher. There may be multiple threads paused in the same content view. With this change we should a thread indicator for each primary line a thread is paused on. It uses the same inline line indicator that inline errors/warnings (issues) use. When there is a single thread (just the Page) we don't show thread indicators. But as soon as there are multiple threads we start managing and showing them. The line indicator contains the name of the thread on the side. Note that SourceCodeTextEditor maintains the thread indicators, but it still always handles the ActiveCallFrame as it used to, pushing values down into TextEditor. The ActiveCallFrame styles override the thread line indicators (albeit with the same styles). The reason these are still separate is that TextEditor has some special styles regarding its gutter for the active execution line. Eventually we may want to find a way to push this up into SourceCodeTextEditor. * Localizations/en.lproj/localizedStrings.js: New string "%d Threads" when multiple threads are on the same line. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel): (WebInspector.ScopeChainDetailsSidebarPanel.prototype._activeCallFrameDidChange): Update Watch Expressions when the active call frame changes. * UserInterface/Views/SourceCodeTextEditor.css: (.source-code.text-editor > .CodeMirror .line-indicator-widget): (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline): (.source-code.text-editor > .CodeMirror .line-indicator-widget > .arrow): (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .arrow): (.source-code.text-editor > .CodeMirror .line-indicator-widget > .icon): (.source-code.text-editor > .CodeMirror .line-indicator-widget > .text): (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .text): Share line indicator widget styles between issue widgets and thread widgets. (.source-code.text-editor > .CodeMirror .thread-indicator): (.source-code.text-editor > .CodeMirror .thread-widget): (.source-code.text-editor > .CodeMirror .thread-widget.inline): (.source-code.text-editor > .CodeMirror .thread-widget.inline > .arrow): Colors for the thread-widget line-indicators. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor): (WebInspector.SourceCodeTextEditor.prototype.close): New event listeners handling for Target added / removed events. (WebInspector.SourceCodeTextEditor.prototype._targetAdded): (WebInspector.SourceCodeTextEditor.prototype._targetRemoved): Update thread indicators as needed. (WebInspector.SourceCodeTextEditor.prototype._looselyMatchesSourceCodeLocation): More generic match based just on the URLs. Even if the exact script comes from a different target, if they share the same URL that is fine. (WebInspector.SourceCodeTextEditor.prototype._callFramesDidChange): (WebInspector.SourceCodeTextEditor.prototype._addThreadIndicatorForTarget): (WebInspector.SourceCodeTextEditor.prototype._removeThreadIndicatorForTarget): (WebInspector.SourceCodeTextEditor.prototype._threadIndicatorWidgetForLine): (WebInspector.SourceCodeTextEditor.prototype._updateThreadIndicatorWidget): (WebInspector.SourceCodeTextEditor.prototype._handleThreadIndicatorWidgetClick): Manage thread line indicator widgets. There are 3 maps we maintain. 1. line -> [threads] List of threads paused on a line, needed for the UI text. 2. line -> widget Gets the widget on a line so we can modify and eventually remove it. 3. target -> line If a target is removed, we need to know what line it had an indicator on. (WebInspector.SourceCodeTextEditor.prototype._isWidgetToggleable): Generalize for all of our different line indicator widgets. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting): (WebInspector.SourceCodeTextEditor.prototype._reinsertAllThreadIndicators): When first populated, or reformatted, clear and reinsert all widgets. (WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues): (WebInspector.SourceCodeTextEditor.prototype._logCleared): (WebInspector.SourceCodeTextEditor.prototype._clearIssueWidgets): Renamed. Rename _clearWidgets to _clearIssueWidgets. 2016-11-15 Joseph Pecoraro Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command https://bugs.webkit.org/show_bug.cgi?id=164793 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: Tooltips for new button. * UserInterface/Base/Main.js: (WebInspector.loaded): New global setting. * UserInterface/Views/DOMTreeContentView.js: (WebInspector.DOMTreeContentView): (WebInspector.DOMTreeContentView.prototype.get navigationItems): (WebInspector.DOMTreeContentView.prototype._showPrintStylesSettingChanged): (WebInspector.DOMTreeContentView.prototype._togglePrintStylesSetting): New navigation bar button to toggle print styles. * UserInterface/Controllers/CSSStyleManager.js: (WebInspector.CSSStyleManager.prototype.mediaTypeChanged): After toggling styles we will need to refresh styles, so provide a meaningful way to trigger refreshing styles from the frontend. * UserInterface/Images/Printer.svg: Added. * UserInterface/Images/gtk/Printer.svg: Added. New Printer icon for enabling / disabling print styles. * UserInterface/Images/gtk/Crosshair.svg: * UserInterface/Images/gtk/LayerBorders.svg: * UserInterface/Images/gtk/NavigationItemCurleyBraces.svg: * UserInterface/Images/gtk/NavigationItemTypes.svg: * UserInterface/Images/gtk/PaintFlashing.svg: * UserInterface/Images/gtk/ShadowDOM.svg: * UserInterface/Images/gtk/ToggleLeftSidebar.svg: * UserInterface/Images/gtk/ToggleRightSidebar.svg: * UserInterface/Images/gtk/UpDownArrows.svg: Fix a number of existing GTK images to have activated styles. 2016-11-15 Nikita Vasilyev REGRESSION (r208248): Web Inspector: Pressing Left Arrow breaks autocomplete https://bugs.webkit.org/show_bug.cgi?id=164391 Reviewed by Matt Baker. Unroll r208248. * UserInterface/Controllers/CodeMirrorCompletionController.js: (WebInspector.CodeMirrorCompletionController): (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions): (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange): (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions): (WebInspector.CodeMirrorCompletionController.prototype.close): (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion): (WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker): (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update): (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint): (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update): (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint): (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory): (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker): (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update): (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint): (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition): (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions): 2016-11-15 Joseph Pecoraro Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command https://bugs.webkit.org/show_bug.cgi?id=164793 Reviewed by Matt Baker. * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: * Versions/Inspector-iOS-10.0.json: * Versions/Inspector-iOS-7.0.json: * Versions/Inspector-iOS-8.0.json: * Versions/Inspector-iOS-9.0.json: * Versions/Inspector-iOS-9.3.json: 2016-11-15 Joseph Pecoraro Web Inspector: URL Breakpoints that resolve in multiple workers should only appear in the UI once https://bugs.webkit.org/show_bug.cgi?id=164334 Reviewed by Matt Baker. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint): Don't add a duplicate BreakpointTreeElements for the same Breakpoint. 2016-11-14 Joseph Pecoraro Web Inspector: Worker debugging should pause all targets and view call frames in all targets https://bugs.webkit.org/show_bug.cgi?id=164305 Reviewed by Timothy Hatcher. This implements a policy where, when one Target ("Thread") pauses the frontend triggers a pause in all other Targets. The intended user experience is "all threads pause" whenever the frontend shows the debugger paused UI. DebuggerManager has a few straight forward changes: - The paused state reflects if any target is paused. - The Paused Event is fired when going from !paused -> paused. This means when the first target pauses. - The Resumed Event is fired when going from paused -> !paused. This means only after all targets have resumed. - The CallFrameDidChange Event now includes the Target that updated. When a Target first pauses the frontend then immediately pauses all other Targets. This puts them into a "pausing" state (we display as Idle) and they will pause as soon as they start executing JavaScript. When a Target steps the "paused" state isn't changing. So this is just a CallFramesDidChange update. When clicking Resume we resume all targets. This is will be the normal, expected way users resume execution. Note that one of the threads may then hit a breakpoint and re-pause all threads. Sometimes when multiple threads are paused you may want to run an individual thread to completion but keep other threads paused. There is a context menu on the ThreadTreeElement to resume just that single thread. It will continue and pause for its next run loop. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Images/Thread.svg: Added. * UserInterface/Images/gtk/Thread.svg: Added. * UserInterface/Main.html: New strings and files. * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Test/Test.js: (WebInspector.loaded): Place the TargetManager first since other managers may want to listen for TargetAdded / TargetRemoved events. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.get paused): This is now a computed state. (WebInspector.DebuggerManager.prototype.pause): (WebInspector.DebuggerManager.prototype.resume): Affect all targets. (WebInspector.DebuggerManager.prototype.stepOver): (WebInspector.DebuggerManager.prototype.stepInto): (WebInspector.DebuggerManager.prototype.stepOut): (WebInspector.DebuggerManager.prototype.reset): Update to use the paused computed property. (WebInspector.DebuggerManager.prototype.continueUntilNextRunLoop): Issue the new Debugger.continueUntilNextRunLoop command on a given target. (WebInspector.DebuggerManager.prototype.initializeTarget): When a new Target is created and we were already paused, then start that Worker in a paused state. (WebInspector.DebuggerManager.prototype.debuggerDidPause): Recover from bad cases where the backend informs the frontend about internal JavaScript that it shouldn't know about. Legacy backend do this but also there are corner cases we need to handle. Dispatch events appropriately now that multiple targets may be paused. (WebInspector.DebuggerManager.prototype._didResumeInternal): Dispatch events appropriately now that multiple targets may be paused. (WebInspector.DebuggerManager.prototype._targetRemoved): Remove debugger data for targets that go away to avoid leaks. * UserInterface/Models/DebuggerData.js: (WebInspector.DebuggerData): (WebInspector.DebuggerData.prototype.get paused): (WebInspector.DebuggerData.prototype.get pausing): Move some more per-Target state into DebuggerData. (WebInspector.DebuggerData.prototype.pauseIfNeeded): (WebInspector.DebuggerData.prototype.resumeIfNeeded): (WebInspector.DebuggerData.prototype.continueUntilNextRunLoop): These should only be called by DebuggerManager. They correctly update the state of the DebuggerData for this Target, and also issue the underlying command to the target. (WebInspector.DebuggerData.prototype.updateForPause): (WebInspector.DebuggerData.prototype.updateForResume): Handle a special case where continueUntilNextRunLoop triggers an invisible "pause" on the backend that we should mirror. * UserInterface/Protocol/Target.js: (WebInspector.MainTarget): (WebInspector.MainTarget.prototype.get displayName): (WebInspector.MainTarget.prototype.initialize): Better display names. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause): (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume): (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks): (WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement): (WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks): (WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks): (WebInspector.DebuggerSidebarPanel.prototype._findThreadTreeElementForTarget): (WebInspector.DebuggerSidebarPanel.prototype._targetAdded): (WebInspector.DebuggerSidebarPanel.prototype._targetRemoved): (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange): (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange): The DebuggerSidebar still has a single "Call Stacks" section, but maintains two TreeOutlines and only shows one at a time. The Single Thread view shows a flat list of the call frames for the Main Target when it is the only target. The Multiple Threads view shows a list of Threads and their call frames. We always keep both up to date, because we may need to swap between them purely as Targets are added / removed. There is a bit of extra logic to ensure we select elements properly based only on the visible tree outline. * UserInterface/Views/LogContentView.js: (WebInspector.LogContentView.prototype.didAppendConsoleMessageView): When evaluating in a particular target, "runAfterPendingDispatches" must wait for all other commands in that particular target to have completed. So use the target specific version. * UserInterface/Views/NavigationSidebarPanel.js: (WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject): Gracefully handle a few more TreeElements without a represented object. * UserInterface/Views/IdleTreeElement.css: Added. (.details-section.call-stack .idle .icon): * UserInterface/Views/IdleTreeElement.js: Added. (WebInspector.IdleTreeElement): Very basic tree element to encapsulate an Idle call frame with an empty represented object. * UserInterface/Views/ThreadTreeElement.css: Added. (.details-section.call-stack .thread .icon): * UserInterface/Views/ThreadTreeElement.js: Added. (WebInspector.ThreadTreeElement): (WebInspector.ThreadTreeElement.prototype.get target): (WebInspector.ThreadTreeElement.prototype.refresh): (WebInspector.ThreadTreeElement.prototype.onattach): (WebInspector.ThreadTreeElement.prototype.oncontextmenu): ThreadTreeElement has no represented object, but makes it easy to refresh a list of CallFrameTreeElements for a given target. 2016-11-14 Timothy Hatcher Web Inspector: Disable Warning Filter in Debugger Tab By Default https://bugs.webkit.org/show_bug.cgi?id=164723 rdar://problem/29251780 Reviewed by Joseph Pecoraro. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): Made "debugger-show-resources-with-issues-only" false by default. 2016-11-14 Nikita Vasilyev Web Inspector: Settings tab should look more like a native macOS view https://bugs.webkit.org/show_bug.cgi?id=164708 Reviewed by Timothy Hatcher. * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings): (.content-view.settings > .header): (.content-view.settings > .setting-container): Match macOS Sierra default font size for settings view. (.content-view.settings > .setting-container > .setting-name): (.content-view.settings > .setting-container > .setting-value-controller): (.content-view.settings > .setting-container > .setting-value-controller input): (.content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]): Make checkbox larger. (.content-view.settings > .setting-container > .setting-value-controller select): (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]): Decrease the width of the number fields to make them just wide enough to fit 2 digit numbers. 2016-11-12 Joseph Pecoraro Web Inspector: Type Profiler and Code Coverage Profiler should work in Workers https://bugs.webkit.org/show_bug.cgi?id=164682 Reviewed by Darin Adler. * UserInterface/Controllers/BasicBlockAnnotator.js: * UserInterface/Models/ScriptSyntaxTree.js: (WebInspector.ScriptSyntaxTree.prototype.updateTypes): Use the target associated with the Script. * UserInterface/Protocol/Target.js: (WebInspector.WorkerTarget.prototype.initialize): When initializing a Worker Target, match the existing state of the Page for these profilers. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation): (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover): Use the correct target for this Script / Resource. (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState): (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled): Enable / disable for all targets when toggling profilers. 2016-11-11 Anthony Ricaud Web Inspector: Whitespace in Editor should be less visible than regular content https://bugs.webkit.org/show_bug.cgi?id=164660 Reviewed by Matt Baker. * UserInterface/Views/CodeMirrorOverrides.css: (.show-whitespace-characters .CodeMirror .cm-whitespace::before): 2016-11-11 Nikita Vasilyev Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off https://bugs.webkit.org/show_bug.cgi?id=163407 Reviewed by Timothy Hatcher. Turning Type Profiler off by clicking [T] icon now disables its backend by calling RuntimeAgent.disableTypeProfiler(). * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState): 2016-11-11 Nikita Vasilyev Web Inspector: Settings tab: make the header smaller to fit more content https://bugs.webkit.org/show_bug.cgi?id=164613 Reviewed by Timothy Hatcher. * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings > .header): Use hv units for margin. 1vh = 1% of viewport height. When Web Inspector window is taller, the margin is larger. (.content-view.settings > .setting-container): Convert padding to margin to make spacing between the header and the first section better. 2016-11-10 Nikita Vasilyev Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off https://bugs.webkit.org/show_bug.cgi?id=163407 Reviewed by Joseph Pecoraro. Turning Code Coverage off by clicking [C] icon now disables its backend by calling RuntimeAgent.disableControlFlowProfiler(). * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled): 2016-11-10 Aaron Chu Web Inspector: AXI: clarify button roles (e.g. toggle or popup button) https://bugs.webkit.org/show_bug.cgi?id=130726 Reviewed by Brian Burg. Updated Inspector to show the button type using the new mapping information. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback): (WebInspector.DOMNode.prototype.accessibilityProperties): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback): (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility): 2016-11-09 Joseph Pecoraro Web Inspector: DebuggerManager.Event.Resumed introduces test flakiness https://bugs.webkit.org/show_bug.cgi?id=161951 Reviewed by Brian Burg. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.debuggerDidResume): Now, Debugger.resumed events really mean the debugger resumed, so act immediately instead of guessing. We must still guess in legacy backends. * UserInterface/Test/Test.js: When the inspector frontend encounters an issue, log it. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause): (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange): Always enable the step out button. I don't think it makes sense to disable it sometimes, and if there are issues with this we should solve the issues instead of hiding them. 2016-11-09 Joseph Pecoraro Web Inspector: Associate Worker Resources with the Worker and not the Page https://bugs.webkit.org/show_bug.cgi?id=164342 Reviewed by Timothy Hatcher. A Target may have its own list of Resource. For example, Workers may request any resources via XHR/Fetch. So we associate a ResourceCollection with a Target, and ensure we show them in Web Inspector as you would expect. At this point, Target starts acting like Frame. Target has a resourceCollection and extraScriptsCollection just like Frame. Target has events for ResourceAdded just like Frame. Even though Resource loads are happening in Workers, the Network data still comes from the Page's Network agent. The added "targetId" data with the Resource will let us associate a Resoure with a Target. When opening inspector after a page has loaded, the frontend loads Resources via the Page.getResourceTree path. In this case, the frontend may be informed of Resources for a Target that it does not know about yet. In these cases, it sets them aside as Orphaned resources for a target. Later, when that Target is created, it will adopt its Orphaned resources. Places that used to listen to just Frame.Event.ResourceWasAdded should now also listen for Target.Event.ResourceAdded to ensure it sees the resources associated with non-page targets. * UserInterface/Protocol/Target.js: (WebInspector.Target): (WebInspector.Target.prototype.get identifier): (WebInspector.Target.prototype.get resourceCollection): (WebInspector.Target.prototype.get extraScriptCollection): (WebInspector.Target.prototype.addResource): (WebInspector.Target.prototype.adoptResource): (WebInspector.Target.prototype.addScript): Give Target resource collections. (WebInspector.MainTarget): (WebInspector.MainTarget.prototype.get mainResource): Pass through to the FrameResourceManager for the MainTarget. (WebInspector.WorkerTarget): (WebInspector.WorkerTarget.prototype.initialize): Adopt orphaned resources on creation. * UserInterface/Models/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.get target): (WebInspector.Resource.prototype.get type): Resource now has a Target. During creation, if there is a targetId then we must produce a Target or null (orphaned). (WebInspector.Resource.prototype.associateWithScript): When associating a Resource with a Script, we can use this opportunity to convert from an XML / Other type to Script. * UserInterface/Models/Script.js: (WebInspector.Script.prototype._resolveResource): When associating Scripts with a resource we must associate resources from within the proper Target. If it is the Main target we still use the FrameResourceManager which keep searches across all Frames. * UserInterface/Protocol/NetworkObserver.js: (WebInspector.NetworkObserver.prototype.requestWillBeSent): * UserInterface/Controllers/FrameResourceManager.js: (WebInspector.FrameResourceManager.prototype.initialize): (WebInspector.FrameResourceManager.prototype.frameDidNavigate): (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): (WebInspector.FrameResourceManager.prototype.adoptOrphanedResourcesForTarget): (WebInspector.FrameResourceManager.prototype._addNewResourceToFrameOrTarget): (WebInspector.FrameResourceManager.prototype._addResourceToTarget): (WebInspector.FrameResourceManager.prototype._createResource): (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): (WebInspector.FrameResourceManager.prototype._addOrphanedResource): (WebInspector.FrameResourceManager.prototype._mainFrameDidChange): (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Deleted. When creating Resources from Network events we may now have a targetId. Once created a Resource must be associated with a Frame, Target, or orphaned. * UserInterface/Main.html: * UserInterface/Views/TargetTreeElement.js: Removed. * UserInterface/Views/WorkerTreeElement.js: Added. (WebInspector.WorkerTreeElement): (WebInspector.WorkerTreeElement.prototype.get target): (WebInspector.WorkerTreeElement.prototype.onexpand): (WebInspector.WorkerTreeElement.prototype.oncollapse): (WebInspector.WorkerTreeElement.prototype.onpopulate): (WebInspector.WorkerTreeElement.prototype.updateSourceMapResources): (WebInspector.WorkerTreeElement.prototype.onattach): (WebInspector.WorkerTreeElement.prototype.compareChildTreeElements): (WebInspector.WorkerTreeElement.prototype._handleContextMenuEvent): (WebInspector.WorkerTreeElement.prototype._scriptAdded): (WebInspector.WorkerTreeElement.prototype._resourceAdded): Convert TargetTreeElement to WorkerTreeElement as that is clearer. Behave like FrameTreeElement and populate resources on creation, handle SourceMapResource, etc. * UserInterface/Views/FolderizedTreeElement.js: (WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings): (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle): (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject): If the display name for a folder is `null` then there is no folder, and place such child tree elements at the top level. This will be the case for a Worker's Script's, which we choose not to folderize. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.scriptDidParse): * UserInterface/Controllers/TargetManager.js: (WebInspector.TargetManager.prototype.targetForIdentifier): * UserInterface/Models/DefaultDashboard.js: (WebInspector.DefaultDashboard): * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager): * UserInterface/Controllers/WorkerManager.js: (WebInspector.WorkerManager.prototype.workerCreated): * UserInterface/Views/OpenResourceDialog.js: (WebInspector.OpenResourceDialog.prototype.didDismissDialog): (WebInspector.OpenResourceDialog.prototype.didPresentDialog): (WebInspector.OpenResourceDialog.prototype._addScriptsForTarget): Deleted. (WebInspector.OpenResourceDialog.prototype._addResourcesForTarget): Added. Ensure those that listen for Frame.Event.ResourceWasAdded now also listen for Target.Event.ResourceAdded. * UserInterface/Views/ContextMenuUtilities.js: (WebInspector.appendContextMenuItemsForSourceCode): (WebInspector.appendContextMenuItemsForResource): Deleted. * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems): * UserInterface/Views/ResourceTreeElement.js: (WebInspector.ResourceTreeElement.prototype._updateTitles): (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent): Generalize ContextMenu helper to SourceCode so it can be used on a Script or Resource. * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WebInspector.ResourceDetailsSidebarPanel.prototype.inspect): When looking at a WorkerTarget's mainResource (Script) show the Resource Details sidebar for its Resource. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared): (WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource): (WebInspector.ResourceSidebarPanel.prototype._targetRemoved): (WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget): Deleted. Simplify ResourceSidebarPanel to only handle adding WorkerTreeElements, which will do the rest of the work for their Resources/Scripts. * UserInterface/Views/SourceCodeTreeElement.js: (WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange): When we were changing the type of a resource, it would remove and re-insert. This would collapse the parent if it was the only child in removal, and not expand the parent when re-inserting. This ensures we re-expand. 2016-11-09 Nikita Vasilyev Web Inspector: Settings tab sections overlap each other in docked Inspector window https://bugs.webkit.org/show_bug.cgi?id=164564 Reviewed by Joseph Pecoraro. * UserInterface/Views/SettingsTabContentView.css: (.content-view.settings): Make settings sections non-shrinkable and make the content view vertically scrollable. (.content-view.settings > .setting-container): Set vertical padding that looks good for non-shrinkable sections. 2016-11-09 Nikita Vasilyev Web Inspector: Settings tab: Checkbox labels should be clickable https://bugs.webkit.org/show_bug.cgi?id=164470 Reviewed by Matt Baker. * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView.prototype.initialLayout): Add a label element to make checkboxes clickable. 2016-11-09 Devin Rousso Web Inspector: Allow FolderTreeElement to display content when selected https://bugs.webkit.org/show_bug.cgi?id=164407 Reviewed by Timothy Hatcher. * UserInterface/Main.html: Add CollectionContentView and TitleView. * UserInterface/Base/Main.js: * UserInterface/Views/ContentView.js: (WebInspector.ContentView.createFromRepresentedObject): (WebInspector.ContentView.isViewable): Add support for Collection as the representedObject of a content view. * UserInterface/Views/CollectionContentView.css: Added. (.content-view.collection): (.content-view.collection > .content-view): * UserInterface/Views/CollectionContentView.js: Added. (WebInspector.CollectionContentView): (WebInspector.CollectionContentView.prototype.initialLayout): (WebInspector.CollectionContentView.prototype._addContentViewForItem): (WebInspector.CollectionContentView.prototype._removeContentViewForItem): (WebInspector.CollectionContentView.prototype._handleItemAdded): (WebInspector.CollectionContentView.prototype._handleItemRemoved): (WebInspector.CollectionContentView.prototype._handleContentError): Takes in a Collection when constructed, and attempts to display a sub-ContentView for each item in the collection if the type of the collection is viewable en masse. Currently, this is only supported for WebInspector.Resource.Type.Image collections. * UserInterface/Views/ResourceContentView.js: (WebInspector.ResourceContentView.prototype._contentError): Dispatch an event whenever the content fails to load. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange): * UserInterface/Views/ResourcesTabContentView.js: (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject): Allow FolderTreeElements to be selected. * UserInterface/Views/TitleView.css: Added. (.title-view): * UserInterface/Views/TitleView.js: Added. (WebInspector.TitleView): Basic view that displays the given text in the center of the viewable area. 2016-11-03 Nikita Vasilyev Web Inspector: Stack overflow when searching a timeline recording for JS function names https://bugs.webkit.org/show_bug.cgi?id=161784 Reviewed by Timothy Hatcher. _populate method of ProfileNodeDataGridNode and ProfileDataGridNode traverses all children of a given node. makeVisible function of DataGrid#_applyFiltersToNode traverses all its parents to expand them. This creates an infinite recursion. Remove "populate" event before appending child nodes to prevent it. * UserInterface/Views/ProfileDataGridNode.js: (WebInspector.ProfileDataGridNode.prototype._populate): (WebInspector.ProfileDataGridNode): * UserInterface/Views/ProfileNodeDataGridNode.js: (WebInspector.ProfileNodeDataGridNode.prototype._populate): (WebInspector.ProfileNodeDataGridNode): 2016-11-03 Devin Rousso Web Inspector: Modify FolderTreeElement to have a Collection as a its represented object https://bugs.webkit.org/show_bug.cgi?id=164349 Reviewed by Matt Baker. * UserInterface/Views/FolderTreeElement.js: (WebInspector.FolderTreeElement): Now accepts a representedObject parameter, which must be a WebInspector.Collection. * UserInterface/Views/FolderizedTreeElement.js: (WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings): (WebInspector.FolderizedTreeElement.prototype.updateParentStatus): (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject): (WebInspector.FolderizedTreeElement.prototype._settingsForRepresentedObject): (WebInspector.FolderizedTreeElement.prototype._shouldGroupIntoFolders): (WebInspector.FolderizedTreeElement): Rework the logic for creating WebInspector.FolderTreeElement so that items for the representedObject parameter may be passed in via registerFolderizeSettings. * UserInterface/Views/FrameTreeElement.js: (WebInspector.FrameTreeElement): (WebInspector.FrameTreeElement.): Deleted. (WebInspector.FrameTreeElement.makeChildCountCallback): Deleted. Rework logic for calling registerFolderizeSettings to support the representedObject parameter. Also changed calls to WebInspector.Frame to support the WebInspector.Collection class. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared): Create WebInspector.Collection instances of Script model objects for additional folders created by the Resources sidebar: - Anonymous Scripts - Extension Scripts - Extra Scripts 2016-11-02 Joseph Pecoraro Web Inspector: Include DebuggerAgent in Workers - see, pause, and step through scripts https://bugs.webkit.org/show_bug.cgi?id=164136 Reviewed by Brian Burg. By implementing DebuggerAgent, Workers will inform the frontend about Scripts that evaluate in the Worker's VM and the Worker VM can pause and send the pausing CallFrames to the frontend. This means that WebInspector.Script and WebInspector.CallFrame will need to be made target aware. This also means that each Target will have its own set of debugger data, such as the list of scripts and pause data like the pause reason / call frames. Previously all this data was managed by DebuggerManager. With this change we split that data out of DebuggerManager to be per-target DebuggerData. DebuggerManager keeps `activeCallFrame` but the list of scripts and pause data have moved into `DebuggerData` which is per-target, accessed through DebuggerManager's new dataForTarget(target) method. Finally we make a few changes to the UserInterface to make Workers and their scripts, appear grouped together. The Resources sidebar previously had a single top level item for the Main Frame, which has all its resources as its children (potentially grouped into folders). With this change, each Worker gets its own top level item as well, and the Worker's subresources (imported scripts) become its children. We also now associate a single mainResource with Targets. In the case of Workers, we assume and assert that this is a Script. If this were to ever change we would need to adjust the assumptions. * UserInterface/Main.html: * UserInterface/Test.html: New files. * UserInterface/Base/Main.js: * UserInterface/Test/Test.js: Add WebInspector.assumingMainTarget to fill in all the places where we assume the main target right now, but would need to handle non-main targets as other agents are implemented in workers. For example profile data that assumes the main target right now could be worker targets when we implement ScriptProfiler / Heap agents. * UserInterface/Protocol/Connection.js: (InspectorBackend.WorkerConnection): * UserInterface/Protocol/Target.js: (WebInspector.Target): (WebInspector.Target.prototype.get DebuggerAgent): (WebInspector.Target.prototype.get mainResource): (WebInspector.Target.prototype.set mainResource): (WebInspector.WorkerTarget.prototype.initialize): (WebInspector.WorkerTarget): Include DebuggerAgent in Targets. Include a mainResource for Worker Targets. * UserInterface/Protocol/DebuggerObserver.js: (WebInspector.DebuggerObserver.prototype.scriptParsed): (WebInspector.DebuggerObserver.prototype.breakpointResolved): (WebInspector.DebuggerObserver.prototype.paused): (WebInspector.DebuggerObserver.prototype.resumed): Pass the target on to managers when necessary. * UserInterface/Models/DebuggerData.js: Added. (WebInspector.DebuggerData): (WebInspector.DebuggerData.prototype.get target): (WebInspector.DebuggerData.prototype.get callFrames): (WebInspector.DebuggerData.prototype.get pauseReason): (WebInspector.DebuggerData.prototype.get pauseData): (WebInspector.DebuggerData.prototype.get scripts): (WebInspector.DebuggerData.prototype.scriptForIdentifier): (WebInspector.DebuggerData.prototype.scriptsForURL): (WebInspector.DebuggerData.prototype.reset): (WebInspector.DebuggerData.prototype.addScript): (WebInspector.DebuggerData.prototype.pause): (WebInspector.DebuggerData.prototype.unpause): Extract per-target data from DebuggerManager. This includes the list of scripts evaluated in a Target, and any pause data for this target such as the pause reason and call frames. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.dataForTarget): (WebInspector.DebuggerManager.prototype.get pauseReason): Deleted. (WebInspector.DebuggerManager.prototype.get pauseData): Deleted. (WebInspector.DebuggerManager.prototype.get callFrames): Deleted. (WebInspector.DebuggerManager.prototype.reset): New way to access per-target debugger data. (WebInspector.DebuggerManager.prototype.initializeTarget): When a new Target is created, synchronize frontend state with the target. Things like the list of breakpoints and global breakpoint states. (WebInspector.DebuggerManager.prototype.scriptForIdentifier): (WebInspector.DebuggerManager.prototype.scriptsForURL): Convenience accessors for scripts must now provide a Target. (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts): This is a convenience accessors for a list of all scripts across all targets so this handles getting the list across all targets. (WebInspector.DebuggerManager.prototype.pause): (WebInspector.DebuggerManager.prototype.resume): (WebInspector.DebuggerManager.prototype.stepOver): (WebInspector.DebuggerManager.prototype.stepInto): (WebInspector.DebuggerManager.prototype.stepOut): (WebInspector.DebuggerManager.prototype.continueToLocation): Stepping commands affect the current target with the active call frame. Eventually we will change Pause and Resume behavior to affect all targets. (WebInspector.DebuggerManager.prototype.addBreakpoint): (WebInspector.DebuggerManager.prototype.breakpointResolved): (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint): (WebInspector.DebuggerManager.prototype._setBreakpoint): (WebInspector.DebuggerManager.prototype._removeBreakpoint): Breakpoints should be set on all targets, but we need a way to set them on a specific target, when initializing an individual target when we want to inform that single target of all of the breakpoints. (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange): (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState): Changing global breakpoint state should inform all targets. (WebInspector.DebuggerManager.prototype.scriptDidParse): Associate Scripts with a Target. Identify the main resource of a Worker Target and set it as soon as we can. (WebInspector.DebuggerManager.prototype.debuggerDidPause): (WebInspector.DebuggerManager.prototype.debuggerDidResume): (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload): (WebInspector.DebuggerManager.prototype._scopeChainFromPayload): (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): (WebInspector.DebuggerManager.prototype._mainResourceDidChange): (WebInspector.DebuggerManager.prototype._didResumeInternal): Pausing and resuming now happens per-target, so associate created model objects (CallFrame, ScopeChain objects) and any other necessary data with the target. * UserInterface/Models/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get target): (WebInspector.Breakpoint.prototype.get info): * UserInterface/Models/CallFrame.js: (WebInspector.CallFrame): (WebInspector.CallFrame.prototype.get target): (WebInspector.CallFrame.fromDebuggerPayload): (WebInspector.CallFrame.fromPayload): * UserInterface/Models/ConsoleMessage.js: (WebInspector.ConsoleMessage): * UserInterface/Models/Script.js: (WebInspector.Script): (WebInspector.Script.prototype.get target): (WebInspector.Script.prototype.isMainResource): (WebInspector.Script.prototype.requestContentFromBackend): (WebInspector.Script.prototype._resolveResource): * UserInterface/Models/StackTrace.js: (WebInspector.StackTrace.fromPayload): (WebInspector.StackTrace.fromString): * UserInterface/Models/ProbeManager.js: (WebInspector.ProbeManager.prototype.didSampleProbe): * UserInterface/Models/Probe.js: (WebInspector.ProbeSample): * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._appendLocationLink): (WebInspector.ConsoleMessageView.prototype._formatParameterAsString): Associate model objects with a specific target where necessary. * UserInterface/Views/ObjectTreeBaseTreeElement.js: (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject): * UserInterface/Controllers/RuntimeManager.js: (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow): * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation): Use target specific DebuggerAgent where necessary. * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager.prototype._callFramesFromPayload): * UserInterface/Models/ScriptTimelineRecord.js: (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload): * UserInterface/Views/EventListenerSectionGroup.js: (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): (WebInspector.EventListenerSectionGroup): * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js: (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.): (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode): (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview): (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview): (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow): * UserInterface/Views/ProfileDataGridNode.js: (WebInspector.ProfileDataGridNode.prototype.iconClassName): (WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn): (WebInspector.ProfileDataGridNode.prototype._displayContent): Use assumed main target and audit these when the Worker gets more Agents. * UserInterface/Controllers/FrameResourceManager.js: (WebInspector.FrameResourceManager.prototype._initiatorSourceCodeLocationFromPayload): This will always be the main target because only the main target has access to the DOM. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.get target): (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch): (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu): (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate): (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression): (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails): (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction): Update target specific actions to use the proper target's agents. * UserInterface/Views/TargetTreeElement.js: Added. (WebInspector.TargetTreeElement): (WebInspector.TargetTreeElement.prototype.get target): (WebInspector.TargetTreeElement.prototype.onexpand): (WebInspector.TargetTreeElement.prototype.oncollapse): Add a new tree element for a Target. We currently assume that the main resource for a Target will be a Script right now, as is the case for Web Workers. This simply remembers its expanded or collapsed state and has a better icon. * UserInterface/Views/ResourceIcons.css: (body:matches(.mac-platform, .windows-platform) .script.worker-icon .icon): (body:matches(.mac-platform, .windows-platform) .large .script.worker-icon .icon): * UserInterface/Images/WorkerScript.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument.png. * UserInterface/Images/WorkerScript@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument@2x.png. * UserInterface/Images/WorkerScriptLarge.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge.png. * UserInterface/Images/WorkerScriptLarge@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge@2x.png. Improve icon for a Worker's main resource script. * UserInterface/Views/ResourceSidebarPanel.js: (WebInspector.ResourceSidebarPanel): (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared): (WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget): (WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource): (WebInspector.ResourceSidebarPanel.prototype._targetRemoved): * UserInterface/Views/SearchSidebarPanel.js: (WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts): (WebInspector.SearchSidebarPanel.prototype._searchTreeElementForScript): * UserInterface/Views/OpenResourceDialog.js: (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline.createTreeElement): (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline): (WebInspector.OpenResourceDialog.prototype.didDismissDialog): (WebInspector.OpenResourceDialog.prototype.didPresentDialog): (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame): (WebInspector.OpenResourceDialog.prototype._addScriptsForTarget): (WebInspector.OpenResourceDialog.prototype._scriptAdded): (WebInspector.OpenResourceDialog): * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToTreeOutline): (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange): (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange): (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection): Include scripts from non-main targets in sidebars. 2016-11-01 Devin Rousso Web Inspector: Creating a new pseudo-selector in the Styles sidebar doesn't work on first attempt https://bugs.webkit.org/show_bug.cgi?id=164092 Reviewed by Timothy Hatcher. * UserInterface/Views/CSSStyleDeclarationSection.css: (.style-declaration-section:not(.invalid-selector).rule-disabled > .header > .icon): (.style-declaration-section.invalid-selector > .header > .icon): (.style-declaration-section.invalid-selector > .header > .selector,): (.style-declaration-section.rule-disabled > .header > .icon): Deleted. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection): (WebInspector.CSSStyleDeclarationSection.prototype.refresh): (WebInspector.CSSStyleDeclarationSection.prototype._handleIconElementClicked): (WebInspector.CSSStyleDeclarationSection.prototype._updateSelectorIcon): Added. Re-add logic removed by https://webkit.org/b/159734 for handling invalid selectors. Instead of just refreshing the section whenever the represented CSSRule changes selectors, we only need to refresh if the selector no longer applies to the current element. (WebInspector.CSSStyleDeclarationSection.prototype._handleMouseMove): Added. Fix another issue discovered while adding the invalid selector warnings, where the title attribute of each individual selector was no longer visible. To fix this, whenever the user moves their mouse over the selector input, the position is compared to each selector to find the first one that matches, whose title is then applied to the input element. 2016-11-01 Joseph Pecoraro Web Inspector: Improve debugger highlight in some exception cases https://bugs.webkit.org/show_bug.cgi?id=164300 Reviewed by Matt Baker. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange): When walking up AST nodes and reach a throw statement, use that. 2016-11-01 Joseph Pecoraro Web Inspector: Cleanup stale code in NetworkSidebarPanel https://bugs.webkit.org/show_bug.cgi?id=164295 Reviewed by Matt Baker. * UserInterface/Views/NetworkSidebarPanel.js: (WebInspector.NetworkSidebarPanel.prototype.closed): Deleted. This doesn't appear to be needed since NetworkSidebarPanel never registered any event listeners. 2016-11-01 Devin Rousso REGRESSION (r191419): Web Inspector: Autocomplete is broken https://bugs.webkit.org/show_bug.cgi?id=150493 Reviewed by Timothy Hatcher. Fixed CodeMirror.undo() logic rolled out by r191539 Added calls to CodeMirror.changeGeneration(true) which tells the history stack to "close" the current event, preventing it from being consolidated with new changes. If the user typed fast enough, non-completion changes (like adding ":" in CSS) would get merged with completion changes, causing calls to CodeMirror.undo() to undo those changes as well. To prevent this, a boolean variable is set to true whenever a completion "activity" is in progress, defined by a sequence of completion related events. When this "activity" first starts, call CodeMirror.changeGeneration(true) to freeze the current history. See original bug for more information . * UserInterface/Controllers/CodeMirrorCompletionController.js: (WebInspector.CodeMirrorCompletionController): (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions): (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange): (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions): (WebInspector.CodeMirrorCompletionController.prototype.close): (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion): (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update): (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint): (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update): (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint): (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update): (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint): (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition): (WebInspector.CodeMirrorCompletionController.prototype._handleBeforeChange): (WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker): Deleted. (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory): Deleted. (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker): Deleted. 2016-11-01 Devin Rousso Web Inspector: Replace sublists inside DOM-related model objects with WI.Collection https://bugs.webkit.org/show_bug.cgi?id=164098 Reviewed by Timothy Hatcher. * UserInterface/Models/DOMTree.js: * UserInterface/Models/Frame.js: Add support for WebInspector.Collection. * UserInterface/Models/Script.js: (WebInspector.Script): * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._addResourcesRecursivelyForFrame): * UserInterface/Views/FrameTreeElement.js: (WebInspector.FrameTreeElement): (WebInspector.FrameTreeElement.prototype.onpopulate): * UserInterface/Views/OpenResourceDialog.js: (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame): Use new functions defined by changing to WebInspector.Collection. 2016-11-01 Devin Rousso Web Inspector: Fix double remove of ResourceCollection if type changes https://bugs.webkit.org/show_bug.cgi?id=164268 Reviewed by Joseph Pecoraro. * UserInterface/Models/ResourceCollection.js: (WebInspector.ResourceCollection.prototype._resourceTypeDidChange): Change logic so that a non-typed collection will not try to remove a resource that has changed types from the sub-collection of its old type, since the sub-collection itself will handle the removal inside its own event listener for the type change. 2016-11-01 Ryosuke Niwa Web Inspector: Add the support for custom elements https://bugs.webkit.org/show_bug.cgi?id=164266 Reviewed by Joseph Pecoraro. Show the custom element state in DOM node's details pane: - "Element" for all builtin elements. - "Element (Custom)" for any upgraded custom elements. - "Element (Waiting to be upgraded)" for any element waiting to be upgraded. - "Element (Failed to upgrade)" for any custom element that failed during construction or an upgrade. And add "Jump to Definition" to the context menu of an node to find the custom element's definition. * Localizations/en.lproj/localizedStrings.js: Added localized strings. * UserInterface/Controllers/DOMTreeManager.js: (WebInspector.DOMTreeManager.prototype._customElementStateChanged): Added. Update the state and fire WebInspector.DOMTreeManager.Event.CustomElementStateChanged to update the node's details pane. * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode): Set the custom element state or default to "builtin". Use null when the node is not an element. (WebInspector.DOMNode.prototype.isCustomElement): Added. Returns true if this is a successfully constructed or upgraded custom element. (WebInspector.DOMNode.prototype.customElementState): Added. (WebInspector.DOMNode.CustomElementState): Added. * UserInterface/Protocol/DOMObserver.js: (WebInspector.DOMObserver.prototype.customElementStateChanged): Added. * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.prototype.getProperty): Added. Retrieves the property of a given name from the remote backend. * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel): Call _customElementStateChanged when the custom element state changes by listening to WebInspector.DOMTreeManager.Event.CustomElementStateChanged. (WebInspector.DOMNodeDetailsSidebarPanel.prototype.layout): (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshIdentity): Extracted from layout. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementStateChanged): Added. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName): Include the custom element state when it's not a builtin element (_customElementState returns null in that case). (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementState): Get the localized string for each custom element state. * UserInterface/Views/DOMTreeElement.js: (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): Add "Jump to Definition" item in the context menu of an element when it's a successfully constructed or upgraded custom element. 2016-10-31 Joseph Pecoraro Web Inspector: Shadow DOM scoped styles are missing https://bugs.webkit.org/show_bug.cgi?id=164247 Reviewed by Antti Koivisto. * UserInterface/Models/DOMNodeStyles.js: (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Fix incorrect WrapperPromise usage. 2016-10-31 Devin Rousso Web Inspector: Arrows for Styles scope bar item are misaligned https://bugs.webkit.org/show_bug.cgi?id=164159 Reviewed by Timothy Hatcher. * UserInterface/Views/ScopeRadioButtonNavigationItem.css: (.scope-radio-button-navigation-item > .scope-radio-button-item-select:focus): (.scope-radio-button-navigation-item > .arrows): 2016-10-31 Devin Rousso Web Inspector: Entering ":n" in Open Resource Dialog, where n > number of lines, should jump to the last line https://bugs.webkit.org/show_bug.cgi?id=160840 Reviewed by Timothy Hatcher. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype.revealPosition): Since it is possible for the given position to be outside the bounds of the CodeMirror instance, wait to get the line handler for the highlight animation until we have constrained the position value. 2016-10-28 Devin Rousso Web Inspector: Preferences for Text Editor behavior https://bugs.webkit.org/show_bug.cgi?id=149120 Reviewed by Timothy Hatcher. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WebInspector.loaded): (WebInspector.contentLoaded): (WebInspector.contentLoaded.setTabSize): (WebInspector.contentLoaded.setInvalidCharacterClassName): (WebInspector.contentLoaded.setWhitespaceCharacterClassName): (WebInspector._tryToRestorePendingTabs): (WebInspector.indentString): (WebInspector._updateNewTabButtonState): Deleted. (WebInspector._newTabItemClicked): Deleted. Removed calls to the New Tab tab bar item on the Tab Bar instance. Added listener to the indentUnit setting to change the tab-size value on . Created helper function to generate the indentString value from settings. * UserInterface/Base/Test.js: (WebInspector.indentString): Assume indent string is " " for tests. * UserInterface/Base/Setting.js: Added global WebInspector.settings dictionary for holding settings with UI editors. * UserInterface/Main.html: Added GeneralTabBarItem, PinnedTabBarItem, and SettingsTabContentView. * UserInterface/Models/CSSStyleDeclaration.js: (WebInspector.CSSStyleDeclaration.prototype.generateCSSRuleString): * UserInterface/Views/CSSStyleDeclarationTextEditor.js: (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContentFromEditor): (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update): * UserInterface/Views/VisualStylePropertyEditor.js: (WebInspector.VisualStylePropertyEditor.generateFormattedTextForNewProperty): * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails): Now uses WebInspector.indentUnit for indentation values * UserInterface/Views/CodeMirrorAdditions.js: Added "showWhitespaceCharacter" option to CodeMirror. When enabled, it adds an overlay to the editor that will use pseudo-elements to display whitespace characters (unicode 00B7). * UserInterface/Views/CodeMirrorOverrides.css: (.CodeMirror .cm-tab): (.show-whitespace-characters .CodeMirror .cm-tab::before): (.show-whitespace-characters .CodeMirror .cm-whitespace::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-1::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-2::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-3::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-4::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-5::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-6::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-7::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-8::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-9::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-10::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-11::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-12::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-13::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-14::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-15::before): (.show-whitespace-characters .CodeMirror .cm-whitespace-16::before): (.show-invalid-characters .CodeMirror .cm-invalidchar): (.CodeMirror .cm-invalidchar): Deleted. Use unicode character 00B7 (middle dot) to display a space. Also uses a grey border for visualizing tab characters. * UserInterface/Views/ApplicationCacheFrameContentView.js: * UserInterface/Views/CSSStyleDeclarationTextEditor.js: * UserInterface/Views/ClusterContentView.js: * UserInterface/Views/DOMTreeContentView.js: * UserInterface/Views/DatabaseContentView.js: * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js: * UserInterface/Views/NetworkGridContentView.js: * UserInterface/Views/ResourceContentView.js: * UserInterface/Views/ScriptContentView.js: * UserInterface/Views/TabContentView.js: * UserInterface/Views/TimelineRecordingContentView.js: Add calls to super.shown(), super.hidden(), and super.closed(). * UserInterface/Views/ConsoleTabContentView.js: * UserInterface/Views/DebuggerTabContentView.js: * UserInterface/Views/ElementsTabContentView.js: * UserInterface/Views/NetworkTabContentView.js: * UserInterface/Views/NewTabContentView.js: * UserInterface/Views/ResourcesTabContentView.js: * UserInterface/Views/SearchTabContentView.js: * UserInterface/Views/StorageTabContentView.js: * UserInterface/Views/TimelineTabContentView.js: Now uses WebInspector.GeneralTabBarItem. * UserInterface/Views/GeneralTabBarItem.js: Added. (WebInspector.GeneralTabBarItem): (WebInspector.GeneralTabBarItem.prototype.set title): (WebInspector.GeneralTabBarItem.prototype._handleContextMenuEvent): Split from TabBarItem.js to make pinned tab bar items more distinct. * UserInterface/Views/Main.css: (body): Removed tab-size. * UserInterface/Views/PinnedTabBarItem.js: Added. (WebInspector.PinnedTabBarItem): Split from TabBarItem.js to make pinned tab bar items more distinct. * UserInterface/Views/SettingsTabContentView.css: Added. (.content-view.settings): (.content-view.settings > .header): (.content-view.settings > .setting-container): (.content-view.settings > .setting-container > .setting-name): (.content-view.settings > .setting-container > .setting-value-controller): (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]): * UserInterface/Views/SettingsTabContentView.js: (WebInspector.SettingsTabContentView): (WebInspector.SettingsTabContentView.tabInfo): (WebInspector.SettingsTabContentView.isEphemeral): (WebInspector.SettingsTabContentView.shouldSaveTab): (WebInspector.SettingsTabContentView.prototype.initialLayout): (WebInspector.SettingsTabContentView.isTabAllowed): Deleted. (WebInspector.SettingsTabContentView.prototype.get type): Deleted. Added logic to display an appropriate editor for each item in WebInspector.settings. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.close): Add call to super.close(). * UserInterface/Views/TabBar.css: (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover): (.tab-bar > .item:not(.pinned) > .flex-space:last-child): (.tab-bar > .item.pinned > .icon): (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon): (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,): Deleted. (.tab-bar > .item > .flex-space:last-child): Deleted. (.tab-bar > .item.new-tab-button > .icon): Deleted. (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon,): Deleted. Removed rules specifically targeting `.new-tab-button`. * UserInterface/Views/TabBar.js: (WebInspector.TabBar): (WebInspector.TabBar.prototype.get newTabTabBarItem): (WebInspector.TabBar.prototype.updateNewTabTabBarItemState): (WebInspector.TabBar.prototype.insertTabBarItem): (WebInspector.TabBar.prototype.removeTabBarItem.animateTabs): (WebInspector.TabBar.prototype.removeTabBarItem): (WebInspector.TabBar.prototype.selectPreviousTab): (WebInspector.TabBar.prototype.selectNextTab): (WebInspector.TabBar.prototype.set selectedTabBarItem): (WebInspector.TabBar.prototype.hasNormalTab): (WebInspector.TabBar.prototype.layout): (WebInspector.TabBar.prototype._hasMoreThanOneNormalTab): (WebInspector.TabBar.prototype._handleMouseDown): (WebInspector.TabBar.prototype._handleMouseMoved): (WebInspector.TabBar.prototype._handleMouseLeave): (WebInspector.TabBar.prototype._handleNewTabClick): (WebInspector.TabBar.prototype._handleNewTabMouseEnter): (WebInspector.TabBar.prototype.get newTabItem): Deleted. (WebInspector.TabBar.prototype.set newTabItem): Deleted. Replaced the newTabItem setter by adding a saved pinned tab bar item (instead of relying upon a different object to give it the pinned tab bar item) that changes modes depending on whether a new tab is able to be created. * UserInterface/Views/TabBarItem.js: (WebInspector.TabBarItem): (WebInspector.TabBarItem.prototype.get element): (WebInspector.TabBarItem.prototype.get representedObject): (WebInspector.TabBarItem.prototype.set representedObject): (WebInspector.TabBarItem.prototype.get parentTabBar): (WebInspector.TabBarItem.prototype.set parentTabBar): (WebInspector.TabBarItem.prototype.get image): (WebInspector.TabBarItem.prototype.set image): (WebInspector.TabBarItem.prototype.get title): (WebInspector.TabBarItem.prototype.set title): (WebInspector.TabBarItem.prototype.get pinned): Deleted. (WebInspector.TabBarItem.prototype._handleContextMenuEvent): Deleted. Split into GeneralTabBarItem and PinnedTabBarItem to simplify the logic of the DOM and allow for easier checking of whether a tab bar item is pinned or not. * UserInterface/Views/TabBrowser.js: (WebInspector.TabBrowser): (WebInspector.TabBrowser.prototype.addTabForContentView): (WebInspector.TabBrowser.prototype.closeTabForContentView): (WebInspector.TabBrowser.prototype._tabBarItemSelected): (WebInspector.TabBrowser.prototype._tabBarItemRemoved): Replaced references to newTabItem with a set number (since each TabBar has a specific number of pinned tabs). * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor): (WebInspector.TextEditor.prototype.close):. Remove settings update event listeners to allow garbage collection. (WebInspector.TextEditor.prototype._startWorkerPrettyPrint): (WebInspector.TextEditor.prototype._startCodeMirrorPrettyPrint): Now uses the settings values in WebInspector.setting for settings on the CodeMirror instance. Also updates the CodeMirror instance if any setting changes. 2016-10-28 Joseph Pecoraro Web Inspector: Include parameter strings for native CustomElementRegistry methods in the console https://bugs.webkit.org/show_bug.cgi?id=164147 Reviewed by Brian Burg. * UserInterface/Models/NativeFunctionParameters.js: 2016-10-28 Matt Baker Unreviewed, worker document images added * UserInterface/Images/WorkerDocument.png: Added. * UserInterface/Images/WorkerDocument@2x.png: Added. * UserInterface/Images/WorkerDocumentLarge.png: Added. * UserInterface/Images/WorkerDocumentLarge@2x.png: Added. 2016-10-27 Devin Rousso Web Inspector: Create general model object Collection class https://bugs.webkit.org/show_bug.cgi?id=163995 Reviewed by Joseph Pecoraro. * UserInterface/Models/Collection.js: Added. (WebInspector.Collection): (WebInspector.Collection.prototype.get items): (WebInspector.Collection.prototype.get typeVerifier): (WebInspector.Collection.prototype.add): (WebInspector.Collection.prototype.remove): (WebInspector.Collection.prototype.clear): (WebInspector.Collection.prototype.toArray): (WebInspector.Collection.prototype.toJSON): (WebInspector.Collection.prototype.itemAdded): (WebInspector.Collection.prototype.itemRemoved): (WebInspector.Collection.prototype.itemsCleared): Class that holds multiple model objects. It can be limited to a specific type by supplying a "typeVerifier", which is a function that accepts a single argument (the model object) and returns true/false depending on if that argument matches the "type" of the collection. * UserInterface/Main.html: * UserInterface/Test.html: * UserInterface/Models/Frame.js: * UserInterface/Views/CookieStorageContentView.js: * UserInterface/Views/DebuggerSidebarPanel.js: * UserInterface/Views/FrameTreeElement.js: * UserInterface/Views/OpenResourceDialog.js: Add support for WebInspector.Collection. * UserInterface/Models/ResourceCollection.js: (WebInspector.ResourceCollection): (WebInspector.ResourceCollection.verifierForType): (WebInspector.ResourceCollection.prototype.resourceCollectionForType): (WebInspector.ResourceCollection.prototype.clear): (WebInspector.ResourceCollection.prototype.itemAdded): (WebInspector.ResourceCollection.prototype.itemRemoved): (WebInspector.ResourceCollection.prototype.itemsCleared): (WebInspector.ResourceCollection.prototype._associateWithResource): (WebInspector.ResourceCollection.prototype._disassociateWithResource): (WebInspector.ResourceCollection.prototype._resourceURLDidChange): (WebInspector.ResourceCollection.prototype._resourceTypeDidChange): (WebInspector.ResourceCollection.prototype.get resources): Deleted. (WebInspector.ResourceCollection.prototype.resourcesWithType): Deleted. (WebInspector.ResourceCollection.prototype.addResource): Deleted. (WebInspector.ResourceCollection.prototype.removeResource): Deleted. (WebInspector.ResourceCollection.prototype.removeAllResources): Deleted. Now a subclass of WebInspector.Collection. Retrieving WebInspector.Resource objects by type and URL is still supported, but requesting by type now returns another instance of WebInspector.ResourceCollection that is configured to only accept the requested type. 2016-10-27 Joseph Pecoraro Web Inspector: Include ConsoleAgent in Workers - real console.log support https://bugs.webkit.org/show_bug.cgi?id=163844 Reviewed by Brian Burg. * UserInterface/Protocol/Target.js: (WebInspector.Target.prototype.get ConsoleAgent): (WebInspector.Target.prototype._initializeNonMainTarget): * UserInterface/Protocol/Connection.js: (InspectorBackend.WorkerConnection): Add ConsoleAgent. * UserInterface/Controllers/LogManager.js: (WebInspector.LogManager.prototype.messageWasAdded): (WebInspector.LogManager.prototype.requestClearMessages): Handle ConsoleAgent calls with multiple targets. * UserInterface/Protocol/ConsoleObserver.js: (WebInspector.ConsoleObserver.prototype.messageAdded): Dispatch with the target in case we create Model objects. * UserInterface/Controllers/WorkerManager.js: (WebInspector.WorkerManager.prototype.workerCreated): The frontend must now call "initialized" on Workers after sending our setup messages (enable, set breakpoints, etc). * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject.prototype.get target): Expose an accessor for tests. * UserInterface/Protocol/LoggingProtocolTracer.js: (WebInspector.LoggingProtocolTracer.prototype._processEntry): Actually output the Exception, useful when debugging failures in tests. 2016-10-27 Joseph Pecoraro Web Inspector: Include RuntimeAgent in Workers - evaluate in Worker context https://bugs.webkit.org/show_bug.cgi?id=163835 Reviewed by Brian Burg. This introduces the idea that the frontend may communication with multiple backend "Targets" which each have their own set of Agents. - WebInspector.Target - has its own list of Agents - has a InspectorBackend.Connection to communicate with the backend - WebInspector.mainTarget - always exists and represents the thing we are debugging (Page or JSContext) - WebInspector.targets / WebInspector.targetManager - management of all Targets - create new Targets for Workers This also slowly introduces the concept that Model objects may be tied to a specific Target: - WebInspector.RemoteObject - in order to evaluate JS and interact with this object we must know the target (Page or Worker) - when fetching PropertyDescriptors and other RemoteObjects we must continue to pass on the target Finally this makes the QuickConsole list Worker execution contexts in the context picker so that users can choose a Worker context and evaluate JavaScript in that context using the console. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Main.html: * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Test.html: * UserInterface/Test/Test.js: (WebInspector.loaded): New files, strings, and managers. New global WebInspector.mainTarget. New convenience WebInspector.targets. * UserInterface/Protocol/Target.js: Added. (WebInspector.Target): (WebInspector.Target.prototype.get RuntimeAgent): (WebInspector.Target.prototype.get name): (WebInspector.Target.prototype.get type): (WebInspector.Target.prototype.get connection): (WebInspector.Target.prototype.get executionContext): (WebInspector.Target.prototype.get displayName): (WebInspector.Target.prototype._intializeMainTarget): (WebInspector.Target.prototype._initializeNonMainTarget): Target has some basic properties. * UserInterface/Controllers/TargetManager.js: (WebInspector.TargetManager): (WebInspector.TargetManager.prototype.get targets): (WebInspector.TargetManager.prototype.addTarget): (WebInspector.TargetManager.prototype.removeTarget): Holds the list of Targets and events when created / removed. Each target with a RuntimeAgent has an ExecutionContext. * UserInterface/Controllers/WorkerManager.js: (WebInspector.WorkerManager): (WebInspector.WorkerManager.prototype.workerCreated): (WebInspector.WorkerManager.prototype.workerTerminated): (WebInspector.WorkerManager.prototype.dispatchMessageFromWorker): Create / remove / dispatch on a Worker Target. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass): (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype.dispatch): (InspectorBackendClass.prototype.runAfterPendingDispatches): (InspectorBackendClass.prototype._agentForDomain): Keep the original implementations and just dispatch to the main connection. (InspectorBackend.Agent): (InspectorBackend.Agent.prototype.get connection): (InspectorBackend.Agent.prototype.set connection): (InspectorBackend.Agent.prototype.get dispatcher): We will share Agent implementations but just give new "copies" a different connection and dispatcher. (InspectorBackend.Command): (InspectorBackend.Command.create): (InspectorBackend.Command.prototype.invoke): (InspectorBackend.Command.prototype.supports): We continue to have a single Command instance on the Agent. However instead of using the hardcoded Agent on the Instance when evaluated as a function it uses the `this` object which should be an agent. This way: target1.RuntimeAgent.evaluate - `this` is target1 and we use the connection for that target target2.RuntimeAgent.evaluate - `this` is target2 and we use the connection for that target Unfortunately this breaks `RuntimeAgent.evaluate.invoke`. Currently this is solved by providing an extra parameter. In the case where we need to invoke on a particular agent we must provide the agent. target.RuntimeAgent.evaluate.invoke({options}, target.RuntimeAgent) This is unfortunate but only needed in a handful of places right now. (InspectorBackendClass.prototype._sendCommandToBackendWithCallback): Deleted. (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise): Deleted. (InspectorBackendClass.prototype._sendMessageToBackend): Deleted. (InspectorBackendClass.prototype._dispatchResponse): Deleted. (InspectorBackendClass.prototype._dispatchResponseToCallback): Deleted. (InspectorBackendClass.prototype._dispatchResponseToPromise): Deleted. (InspectorBackendClass.prototype._dispatchEvent): Deleted. (InspectorBackendClass.prototype._flushPendingScripts): Deleted. (InspectorBackend.Agent.prototype.get currentDispatchState): Deleted. (InspectorBackend.Command.prototype.deliverFailure): Deleted. * UserInterface/Protocol/Connection.js: Added. (InspectorBackend.Connection): (InspectorBackend.Connection.prototype.get target): (InspectorBackend.Connection.prototype.set target): (InspectorBackend.Connection.prototype.dispatch): (InspectorBackend.Connection.prototype.runAfterPendingDispatches): (InspectorBackend.Connection.prototype.sendMessageToBackend): (InspectorBackend.Connection.prototype._dispatchResponse): (InspectorBackend.Connection.prototype._dispatchResponseToCallback): (InspectorBackend.Connection.prototype._dispatchResponseToPromise): (InspectorBackend.Connection.prototype._dispatchEvent): (InspectorBackend.Connection.prototype._sendCommandToBackendWithCallback): (InspectorBackend.Connection.prototype._sendCommandToBackendExpectingPromise): (InspectorBackend.Connection.prototype._sendMessageToBackend): (InspectorBackend.Connection.prototype._flushPendingScripts): This extracts the Connection details into its own class. Although we make it appear as though a Target has a list of Agents, we actually have the Connection hold the list of Agents. Instead of cloning the entire Agent we just create a new object extended from the original Agent instance. This allows us to keep the same interface but just change the connection / dispatcher properties within the Agent. (InspectorBackend.MainConnection): (InspectorBackend.MainConnection.prototype.sendMessageToBackend): (InspectorBackend.WorkerConnection): (InspectorBackend.WorkerConnection.sendMessageToBackend): Two different kinds of connections. One for the Main connection and one for Workers. Currently the list of agents we expose on a Worker Target/Connection is hardcoded. * UserInterface/Models/ExecutionContext.js: (WebInspector.ExecutionContext): (WebInspector.ExecutionContext.prototype.get target): We may now have ExecutionContexts that mean a Page, Frames, and Workers. To do this we include the (target, executionContextId) tuple in this object. With this we have everything we need to evaluate JavaScript. * UserInterface/Controllers/RuntimeManager.js: (WebInspector.RuntimeManager): (WebInspector.RuntimeManager.prototype.get activeExecutionContext): (WebInspector.RuntimeManager.prototype.set activeExecutionContext): (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier): Deleted. (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier): Deleted. Update from contextId to a full ExecutionContext object. (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow.evalCallback): (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow): (WebInspector.RuntimeManager.prototype.saveResult): (WebInspector.RuntimeManager.prototype.getPropertiesForRemoteObject): (WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared): * UserInterface/Controllers/FrameResourceManager.js: (WebInspector.FrameResourceManager.prototype.executionContextCreated): * UserInterface/Controllers/JavaScriptLogViewController.js: (WebInspector.JavaScriptLogViewController.prototype.consolePromptShouldCommitText): * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: Anywhere that wants to use the "activeExecutionContext" must use the specific RuntimeAgent tied to that ExecutionContext's Target. * UserInterface/Models/PropertyDescriptor.js: (WebInspector.PropertyDescriptor.fromPayload): * UserInterface/Protocol/RemoteObject.js: (WebInspector.RemoteObject): (WebInspector.RemoteObject.createFakeRemoteObject): (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.fromPayload): (WebInspector.RemoteObject.prototype.getDisplayablePropertyDescriptors): (WebInspector.RemoteObject.prototype.deprecatedGetDisplayableProperties): (WebInspector.RemoteObject.prototype.setPropertyValue): (WebInspector.RemoteObject.prototype.getCollectionEntries): (WebInspector.RemoteObject.prototype.releaseWeakCollectionEntries): (WebInspector.RemoteObject.prototype.callFunction): (WebInspector.RemoteObject.prototype.callFunctionJSON): (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor.wrappedCallback): (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor): (WebInspector.RemoteObject.prototype.release): (WebInspector.RemoteObject.prototype._getPropertyDescriptors): (WebInspector.RemoteObject.prototype._getPropertyDescriptorsResolver): (WebInspector.RemoteObject.prototype._deprecatedGetProperties): RemoteObject and related Model Objects now must be tied to a specific Target, because we need to know which Target it belongs to in order to interact with it further. * UserInterface/Views/QuickConsole.js: (WebInspector.QuickConsole): (WebInspector.QuickConsole.prototype.get selectedExecutionContext): (WebInspector.QuickConsole.prototype.set selectedExecutionContext): (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay): (WebInspector.QuickConsole.prototype._rebuildExecutionContextPathComponents): (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged): (WebInspector.QuickConsole.prototype._frameExecutionContextsCleared): (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent): (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame): (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents): (WebInspector.QuickConsole.prototype._insertOtherExecutionContextPathComponent): (WebInspector.QuickConsole.prototype._removeOtherExecutionContextPathComponent): (WebInspector.QuickConsole.prototype._insertExecutionContextPathComponentForFrame): (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame): (WebInspector.QuickConsole.prototype._targetAdded): (WebInspector.QuickConsole.prototype._targetRemoved): (WebInspector.QuickConsole.prototype._pathComponentSelected): (WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier): Deleted. (WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier): Deleted. (WebInspector.QuickConsole.prototype._defaultExecutionContextChanged): Deleted. Update the code from executionContextId to ExecutionContext objects. Update the picker with ExecutionContextPathComponent for Workers (new Targets). Generalize and cleanup the code to make it easier to follow. 2016-10-27 Joseph Pecoraro Web Inspector: Introduce Page WorkerAgent and Worker InspectorController https://bugs.webkit.org/show_bug.cgi?id=163817 Reviewed by Brian Burg. * UserInterface/Main.html: * UserInterface/Test.html: New files. * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Test/Test.js: (WebInspector.loaded): New Observers and Managers. * UserInterface/Protocol/WorkerObserver.js: Added. (WebInspector.WorkerObserver.prototype.workerCreated): (WebInspector.WorkerObserver.prototype.workerTerminated): (WebInspector.WorkerObserver.prototype.dispatchMessageFromWorker): (WebInspector.WorkerObserver): * UserInterface/Controllers/WorkerManager.js: Added. (WebInspector.WorkerManager): (WebInspector.WorkerManager.prototype.workerCreated): (WebInspector.WorkerManager.prototype.workerTerminated): (WebInspector.WorkerManager.prototype.dispatchMessageFromWorker): To be implemented with the first Worker agent implementation when there is actually something we can do with the Worker. 2016-10-25 Joseph Pecoraro Web Inspector: Cmd-+ doesn't "zoom in" to increase text size in the Web Inspector https://bugs.webkit.org/show_bug.cgi?id=163961 Reviewed by Brian Burg. * UserInterface/Base/Main.js: (WebInspector.contentLoaded): Add a duplicate set of keyboard shortcuts for the Shift variants. 2016-10-25 Joseph Pecoraro Web Inspector: Remove dead code in FrameTreeElement https://bugs.webkit.org/show_bug.cgi?id=163914 Reviewed by Brian Burg. * UserInterface/Views/FrameTreeElement.js: 2016-10-24 Devin Rousso Web Inspector: Scope chain shouldn't show empty Closure sections https://bugs.webkit.org/show_bug.cgi?id=152348 Reviewed by Joseph Pecoraro. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): * UserInterface/Models/ScopeChainNode.js: (WebInspector.ScopeChainNode): (WebInspector.ScopeChainNode.prototype.get empty): Added support for new empty property. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection): Only create and display a DetailsSection if the scope is not empty (via empty). 2016-10-24 Devin Rousso Web Inspector: Improve Quick Open sorting algorithm https://bugs.webkit.org/show_bug.cgi?id=163705 Reviewed by Joseph Pecoraro. * UserInterface/Models/ResourceQueryResult.js: (WebInspector.ResourceQueryResult.prototype._calculateRank.getMultiplier): (WebInspector.ResourceQueryResult.prototype._calculateRank): Added logic to multiply the ranking increment/decrement based on whether the current match is part of a sequence, whether that sequence began with a special character, and the length of the current sequence. 2016-10-19 Dean Jackson Support CSS Shapes Level 1 without a prefix https://bugs.webkit.org/show_bug.cgi?id=163709 Reviewed by Myles Maxfield. Replace -webkit-shape-outside with shape-outside. * UserInterface/Models/CSSKeywordCompletions.js: 2016-10-19 Aaron Chu Web Inspector: AXI: expose computed tree node and heading level https://bugs.webkit.org/show_bug.cgi?id=130825 Reviewed by Joseph Pecoraro. Updating the Web Accessibility Inspector to display Heading Level and Hierarchical Level. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/DOMNode.js: (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback): (WebInspector.DOMNode.prototype.accessibilityProperties): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WebInspector.DOMNodeDetailsSidebarPanel): (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback): (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility): 2016-10-18 Joseph Pecoraro Web Inspector: Styles Sidebar highlights "translate" but not "translateX" https://bugs.webkit.org/show_bug.cgi?id=163613 Reviewed by Timothy Hatcher. * UserInterface/Models/CSSCompletions.js: (WebInspector.CSSCompletions.requestCSSCompletions): The hash table objects we pass to CodeMirror expects keys to be lowercased. 2016-10-18 Joseph Pecoraro Web Inspector: CSS Autocompletion sometimes adds extra unexpected characters https://bugs.webkit.org/show_bug.cgi?id=163612 Reviewed by Timothy Hatcher. * UserInterface/Controllers/CodeMirrorCompletionController.js: (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions): Better handle completions in cases where we are in the middle of a property to avoid orphaned characters, or at the end of a function name to avoid creating duplicate parenthesis. 2016-10-18 Joseph Pecoraro REGRESSION(r201171): Web Inspector: Timeline Recording playhead should always start immediately, not wait until first event https://bugs.webkit.org/show_bug.cgi?id=163583 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineRecordingContentView.js: (WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime): Revert logic change introduced by r201171 with no explanation. Whenever we get a start time we should use it, regardless of of what the current time is, precisely because the backend is informing us of the start time to use. 2016-10-17 Joseph Pecoraro Web Inspector: Add toggles for debugger pauses at console.assert failures https://bugs.webkit.org/show_bug.cgi?id=139542 Reviewed by Timothy Hatcher. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.prototype.get assertionsBreakpoint): (WebInspector.DebuggerManager.prototype.isBreakpointRemovable): (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange): New breakpoint and toggling behavior. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel): (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement): (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint): (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements): New breakpoint tree element behavior. (WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie): (WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie): Sidebar restoration if it was selected. * UserInterface/Images/Assertion.svg: Added. * UserInterface/Images/gtk/Assertion.svg: Added. * UserInterface/Views/BreakpointTreeElement.css: (.breakpoint-assertion-icon .icon): New sidebar icon for the global breakpoint. 2016-10-15 Joseph Pecoraro Web Inspector: Cleanup parts of DebuggerManager https://bugs.webkit.org/show_bug.cgi?id=163400 Reviewed by Timothy Hatcher. * UserInterface/Controllers/DebuggerManager.js: (WebInspector.DebuggerManager.restoreBreakpointsSoon): (WebInspector.DebuggerManager.prototype.get paused): (WebInspector.DebuggerManager.prototype.get pauseReason): (WebInspector.DebuggerManager.prototype.get pauseData): (WebInspector.DebuggerManager.prototype.get callFrames): (WebInspector.DebuggerManager.prototype.get activeCallFrame): (WebInspector.DebuggerManager.prototype.set activeCallFrame): Put simple accessors at the top. (WebInspector.DebuggerManager.prototype.get allExceptionsBreakpoint): (WebInspector.DebuggerManager.prototype.get allUncaughtExceptionsBreakpoint): (WebInspector.DebuggerManager.prototype.get breakpoints): (WebInspector.DebuggerManager.prototype.breakpointForIdentifier): (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode): (WebInspector.DebuggerManager.prototype.isBreakpointRemovable): (WebInspector.DebuggerManager.prototype.isBreakpointEditable): (WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily): Group public breakpoint state and access methods. (WebInspector.DebuggerManager.prototype.scriptForIdentifier): (WebInspector.DebuggerManager.prototype.scriptsForURL): (WebInspector.DebuggerManager.prototype.get searchableScripts): (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts): Group public script access methods. (WebInspector.DebuggerManager.prototype.pause): (WebInspector.DebuggerManager.prototype.resume): (WebInspector.DebuggerManager.prototype.stepOver): (WebInspector.DebuggerManager.prototype.stepInto): (WebInspector.DebuggerManager.prototype.stepOut): (WebInspector.DebuggerManager.prototype.continueToLocation): (WebInspector.DebuggerManager.prototype.addBreakpoint): (WebInspector.DebuggerManager.prototype.removeBreakpoint): Group and modernize public methods that perform actions. (WebInspector.DebuggerManager.prototype.nextBreakpointActionIdentifier): Misc. methods. (WebInspector.DebuggerManager.prototype.breakpointResolved): (WebInspector.DebuggerManager.prototype.reset): (WebInspector.DebuggerManager.prototype.playBreakpointActionSound): (WebInspector.DebuggerManager.prototype.scriptDidParse): (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint): (WebInspector.DebuggerManager.prototype._setBreakpoint): (WebInspector.DebuggerManager.prototype._breakpointEditablePropertyDidChange): (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState): (WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode): Minor cleanup in protected and private methods. * UserInterface/Models/BreakpointAction.js: (WebInspector.BreakpointAction): Getting the next identifier is an action so it should be a function call. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded): Remove unused parameter. 2016-10-14 Joseph Pecoraro Web Inspector: Dragging to delete a Breakpoint should never trigger a ContentView change https://bugs.webkit.org/show_bug.cgi?id=163403 Reviewed by Timothy Hatcher. * UserInterface/Views/BreakpointTreeElement.js: (WebInspector.BreakpointTreeElement.prototype.ondelete): Signal when a breakpoint tree element will be going away because it was deleted via the keyboard operation within the TreeOutline. This is a dirty way to do the signal but we remove BreakpointTreeElements asynchronously when the Breakpoint actually gets removed from the backend. * UserInterface/Views/DebuggerSidebarPanel.js: (WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement): Deselect a BreakpointTreeElement if it was deleted in a way other then the delete keyboard shortcut. This ensures another TreeElement selection doesn't force ContentView changes. 2016-10-14 Joseph Pecoraro Web Inspector: Improve debugger highlight when inside of getter/setter calls https://bugs.webkit.org/show_bug.cgi?id=163428 Reviewed by Timothy Hatcher. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange): When in the middle of a member expression at a '.' or '[' get the best member expression range. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight): Include the character at the current position. This is useful since AST Nodes don't give us token info but we would like to know if we are at particular tokens. 2016-10-14 Joseph Pecoraro Web Inspector: Unused Breakpoint getter/setter for "id" - should be "identifier" https://bugs.webkit.org/show_bug.cgi?id=163395 Reviewed by Timothy Hatcher. * UserInterface/Models/Breakpoint.js: (WebInspector.Breakpoint.prototype.get identifier): Renamed. (WebInspector.Breakpoint.prototype.set identifier): Renamed. The only user is DebuggerManager which sets and gets. Previously it was unexpectedly setting a direct property on the Breakpoint instead of using these methods to set the member variable. 2016-10-14 Joseph Pecoraro Web Inspector: Remove uses of delete in SourceCodeTextEditor https://bugs.webkit.org/show_bug.cgi?id=163379 Reviewed by Timothy Hatcher. Remove uses of delete and better group member variables. One of the deletes was deleting an incorrect property. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor): (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded): (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved): (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression): (WebInspector.SourceCodeTextEditor.prototype._dismissEditingController): (WebInspector.SourceCodeTextEditor.prototype.editingControllerDidFinishEditing): 2016-10-14 Joseph Pecoraro Uncaught Exception: TypeError: this.positionToOffset is not a function - seen hovering expressions with Type Profiler enabled https://bugs.webkit.org/show_bug.cgi?id=163405 Reviewed by Matt Baker. * UserInterface/Views/SourceCodeTextEditor.js: Use correct method name, the old one must have gone away. 2016-10-12 Joseph Pecoraro Web Inspector: Improve support for logging Proxy objects in console https://bugs.webkit.org/show_bug.cgi?id=163323 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.js: (WebInspector.ConsoleMessageView.prototype._formatParameter): Treat a Proxy like any other object. 2016-10-12 Joseph Pecoraro Emit DebugHooks uniformly with pause locations instead of having separate pause locations and op_debug emits https://bugs.webkit.org/show_bug.cgi?id=162809 Reviewed by Geoffrey Garen. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange): When pausing on the variable assignment inside for..of and for..in don't just highlight "var foo" but include the right hand side "var foo in ..." or "var foo of ...". 2016-10-12 Joseph Pecoraro Web Inspector: Whole program sometimes highlighted instead of just first statement https://bugs.webkit.org/show_bug.cgi?id=163300 Reviewed by Timothy Hatcher. * UserInterface/Views/SourceCodeTextEditor.js: (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange): Avoid highlighting the entire program by skipping a Program type Node. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype.setExecutionLineAndColumn): Avoid unnecessary work before content has loaded. (WebInspector.TextEditor.prototype.currentPositionToOriginalOffset): Avoid unnecessary indirection to get the CodeMirror editor. 2016-10-11 Joseph Pecoraro Web Inspector: Remove line highlight on primary execution line while stepping because it is distracting https://bugs.webkit.org/show_bug.cgi?id=163294 Reviewed by Timothy Hatcher. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype._updateExecutionLine): When setting the primary execution line, remove default line highlights. 2016-10-10 Matt Baker Web Inspector: Revealed line not highlighted in TextEditor while debugger paused https://bugs.webkit.org/show_bug.cgi?id=163197 Reviewed by Timothy Hatcher. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine): Avoid highlighting the execution line while debugging, but allow other lines to be highlighted. 2016-10-06 Devin Rousso Inspector exception in `parseTextForRule()` when pasting into CSS rule selector https://bugs.webkit.org/show_bug.cgi?id=162792 Reviewed by Matt Baker. * UserInterface/Views/CSSStyleDeclarationSection.js: (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule): Changed regular expression for matching CSS rules to allow newlines in pasted text. 2016-10-02 Devin Rousso Web Inspector: Clicking twice on the color swatch square should hide the color picker https://bugs.webkit.org/show_bug.cgi?id=162759 Reviewed by Matt Baker. * UserInterface/Views/InlineSwatch.js: (WebInspector.InlineSwatch): (WebInspector.InlineSwatch.prototype.didDismissPopover): (WebInspector.InlineSwatch.prototype._swatchElementClicked): Remove the "click" event listener when a popover is presented to prevent improper interaction. Add the event listener back when the popover is dismissed. 2016-10-02 Matt Baker Web Inspector: Exception thrown when hovering network waterfall graphs during reload https://bugs.webkit.org/show_bug.cgi?id=162850 Reviewed by Brian Burg. * UserInterface/Views/ResourceTimelineDataGridNode.js: (WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar): Check that the node's data grid reference is valid before use. (WebInspector.ResourceTimelineDataGridNode): 2016-10-01 Joseph Pecoraro Web Inspector: Selection does not show up over execution highlight ranges https://bugs.webkit.org/show_bug.cgi?id=162844 Reviewed by Matt Baker. * Scripts/update-codemirror-resources.rb: * UserInterface/External/CodeMirror/mark-selection.js: Added. * UserInterface/Main.html: New add-on that makes selection a text marker so it can be styled at the same level as other text markers. * UserInterface/Views/TextEditor.css: (.text-editor > .CodeMirror .execution-range-highlight:not(.CodeMirror-selectedtext)): Don't use execution-range-highlight styles if the text is selected. * UserInterface/Views/TextEditor.js: (WebInspector.TextEditor): Enable the text selection as text markers addon. 2016-09-30 Joseph Pecoraro Web Inspector: Make debugger stepping highlights work in inline