haikuwebkit/Source/WebInspectorUI/ChangeLog

1483 lines
81 KiB
Plaintext

2021-08-23 Razvan Caliman <rcaliman@apple.com>
Web Inspector: CSS Changes: changes are not updated live
https://bugs.webkit.org/show_bug.cgi?id=229153
<rdar://problem/81989328>
Reviewed by Devin Rousso.
Dispatch an event whenever the list of modified styles changes.
Re-layout the Changes details sidebar panel in response to this event
to reflect the latest state of the modified styles.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype.addModifiedStyle):
(WI.CSSManager.prototype.removeModifiedStyle):
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
(WI.ChangesDetailsSidebarPanel.prototype.attached):
(WI.ChangesDetailsSidebarPanel.prototype.detached):
2021-08-19 Alex Christensen <achristensen@webkit.org>
Remove more non-inclusive language from Source
https://bugs.webkit.org/show_bug.cgi?id=229230
Reviewed by Myles C. Maxfield.
* UserInterface/External/three.js/three.js:
(return.parseTrackName):
(parseTrackName):
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype._formatWithSubstitutionString.styleFormatter):
(WI.ConsoleMessageView.prototype._formatWithSubstitutionString.isAllowedProperty):
(WI.ConsoleMessageView.prototype._formatWithSubstitutionString.isWhitelistedProperty): Deleted.
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
2021-08-19 Tim Nguyen <ntim@apple.com>
Implement ::backdrop pseudo element
https://bugs.webkit.org/show_bug.cgi?id=227801
Reviewed by Antti Koivisto.
This adds UA styles, RenderTreeBuilder support and WebInspector support for ::backdrop.
Some imported blink tests now start passing, some still need proper top layer support.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.displayNameForPseudoId):
2021-08-17 Devin Rousso <drousso@apple.com>
Web Inspector: match the undocked tab bar style when docked bottom/side
https://bugs.webkit.org/show_bug.cgi?id=212398
Reviewed by Timothy Hatcher.
This will avoid confusion when switching from docked to undocked (and vice versa) as the tab
bar UI will no longer be significantly different.
* UserInterface/Views/TabBar.js:
(WI.TabBar):
(WI.TabBar.prototype.layout):
(WI.TabBar.prototype.layout.measureWidth):
(WI.TabBar.prototype._recordTabBarItemSizesAndPositions):
(WI.TabBar.prototype._applyTabBarItemSizesAndPositions):
(WI.TabBar.prototype._clearTabBarItemSizesAndPositions):
(WI.TabBar.prototype._handleMouseDown):
(WI.TabBar.prototype._handleMouseMoved):
(WI.TabBar.get horizontalPadding): Deleted.
(WI.TabBar.prototype._recordTabBarItemSizesAndPositions.add): Deleted.
* UserInterface/Views/TabBar.css:
(.tab-bar):
(body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar, body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar): Added.
(.tab-bar > .tabs > .item):
(body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item): Added.
(.tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)):
(.tab-bar > .tabs > .item:nth-child(n + 2 of :not(.hidden)), .tab-bar > .tabs:not(.hide-border-start) > .item:nth-child(1 of :not(.hidden)), .tab-bar > .tabs.dragging-tab > .item.selected):
(.tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden))):
(body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body:is(.mac-platform.monterey, .mac-platform.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(.tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover, .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover + .item):
(.tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover):
(body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item, body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item): Added.
(body.window-inactive .tab-bar > .tabs > .item):
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected):
(.tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected):
(body.window-inactive .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body.window-inactive .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body.window-inactive .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar, body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(@media (prefers-color-scheme: dark) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar, body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body.big-sur .tab-bar): Deleted.
(body:not(.docked) .tab-bar): Deleted.
(body.big-sur:not(.docked) .tab-bar): Deleted.
(body:not(.big-sur):not(.docked) .tab-bar): Deleted.
(body.big-sur:not(.docked).window-inactive .tab-bar, body:not(.big-sur):not(.docked).window-inactive .tab-bar): Deleted.
(body.docked.window-inactive .tab-bar): Deleted.
(body.docked.bottom .tab-bar > .border.top): Deleted.
(body.big-sur.docked .tab-bar > .border.bottom): Deleted.
(body.docked .tab-bar .tabs): Deleted.
(body.docked .tab-bar > .tabs > .flexible-space): Deleted.
(body.docked.bottom .tab-bar > .tabs > .flexible-space): Deleted.
(body:not(.docked) .tab-bar > .tabs > .item): Deleted.
(body.big-sur:not(.docked) .tab-bar > .tabs > .item): Deleted.
(body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item): Deleted.
(body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)): Deleted.
(body.docked .tab-bar > .tabs > .item): Deleted.
(body:not(.docked) .tab-bar > .tabs > .item:nth-child(n + 3 of :not(.hidden)), body:not(.docked) .tab-bar > .tabs:not(.hide-border-start) > .item:nth-child(2 of :not(.hidden)), .tab-bar > .tabs.dragging-tab > .item.selected): Deleted.
(body:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden))): Deleted.
(body.docked .tab-bar > .tabs > .item.pinned): Deleted.
(body.big-sur:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body.docked .tab-bar > .tabs > .item:not(.disabled):matches(.selected, :hover)): Deleted.
(body.docked .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body.big-sur:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(body:not(.big-sur):not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(body.docked .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover, body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover + .item): Deleted.
(body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover): Deleted.
(body:not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
(body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item, body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
(body:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body:not(.docked) .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked) .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked) .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Deleted.
(body:not(.docked).window-inactive .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked).window-inactive .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked).window-inactive .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur .tab-bar, body:not(.big-sur) .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.docked .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.docked.bottom .tab-bar > .border.top): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(@media (prefers-color-scheme: dark) body.docked .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(@media (prefers-color-scheme: dark) body.docked .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover > .icon): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar, body:not(.big-sur):not(.docked).window-inactive .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem.get horizontalMargin): Deleted.
- remove the flexible space filler elements (and associated CSS) before and after the tabs
- remove any `.docked` CSS
- remove the (now unnecessary) `:not(.docked)` from all CSS related to the `WI.TabBar`
- replace `.big-sur` with `.mac-platform.big-sur` for clarity
- add `.mac-platform.monterey` alongside any `.mac-platform.big-sur`
* UserInterface/Base/Main.js:
(WI.undockedTitleAreaHeight):
* UserInterface/Views/Main.css:
(body:is(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive #undocked-title-area): Added.
(@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive #undocked-title-area): Added.
(body.big-sur #undocked-title-area): Deleted.
(body:not(.big-sur) #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur) #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur.window-inactive #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body:not(.big-sur).window-inactive #undocked-title-area): Deleted.
* UserInterface/Views/Variables.css:
(body:is(.mac-platform.monterey, .mac-platform.big-sur)): Added.
(body:not(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)): Added.
(body:is(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)): Added.
(@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur)): Added.
(body.big-sur): Deleted.
(body.mac-platform:not(.big-sur):not(.docked)): Deleted.
(body.mac-platform.big-sur:not(.docked)): Deleted.
(@media (prefers-color-scheme: dark) body.big-sur): Deleted.
Add support for macOS Monterey.
2021-08-17 Razvan Caliman <rcaliman@apple.com>
Web Inspector: Do not show contextual documentation popup in the Changes panel
https://bugs.webkit.org/show_bug.cgi?id=229001
<rdar://problem/81792379>
Reviewed by Devin Rousso.
Add config option to WI.SpreadsheetStyleProperty to prevent showing a contextual documentation button.
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
(WI.ChangesDetailsSidebarPanel.prototype._createRuleElement.onEach):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._addContextualDocumentationButton):
2021-08-12 Patrick Angle <pangle@apple.com>
Web Inspector: Adding execution contexts after page load doesn't show a hidden execution selector
https://bugs.webkit.org/show_bug.cgi?id=229053
Reviewed by Devin Rousso.
Add a handler for execution contexts being added to update the display of the execution context list, as when
there is only a single context at page load the dropdown will be hidden and thus needs to be shown when an
execution context is added after page load.
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole):
(WI.QuickConsole.prototype._handleFrameExecutionContextAdded):
2021-08-12 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r271348): Web Inspector: Table headers have vertical scrollbar
https://bugs.webkit.org/show_bug.cgi?id=228671
<rdar://problem/81638278>
Reviewed by Devin Rousso.
* UserInterface/Views/Table.css:
(.table > .header):
Set overflow hidden for the y axis, not just x axis.
2021-08-03 Sonia Singla <soniasingla.1812@gmail.com>
Web Inspector: Add standard logical properties to CSS keyword completion
https://bugs.webkit.org/show_bug.cgi?id=228548
Reviewed by Devin Rousso.
* UserInterface/Models/CSSKeywordCompletions.js:
2021-08-02 Patrick Angle <pangle@apple.com>
Web Inspector: [AppleWin] Speculative internal build fix for copying `InspectorBackendCommands.js`
https://bugs.webkit.org/show_bug.cgi?id=228716
Reviewed by Maciej Stachowiak.
Speculative fix for AppleWin port internal build by using the correct directory for JSC headers. Also update the
logging message to reflect that the file will by copied later in the build.
* WebInspectorUI.vcxproj/WebInspectorUI.make:
* WebInspectorUI.vcxproj/build-webinspectorui.pl:
2021-08-02 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Network: sorting of transfer size for failed requests is causing the ordering to change every layout
https://bugs.webkit.org/show_bug.cgi?id=228712
Reviewed by Devin Rousso.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._generateSortComparator):
Don't change the item order when both values are NaN.
2021-07-26 Qiaosong Zhou <qiaosong_zhou@apple.com>
FormDataEvent added.
https://bugs.webkit.org/show_bug.cgi?id=227718
Reviewed by Chris Dumez.
* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord.EventType.displayName):
2021-07-19 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: REGRESSION(?): alpha slider doesn't match alpha input for `transparent` in color picker
https://bugs.webkit.org/show_bug.cgi?id=227941
<rdar://problem/80557438>
Reviewed by Devin Rousso.
* UserInterface/Views/Slider.js:
(WI.Slider.prototype.set value):
When the initial value was set to 0, `set value` was exiting early when the passed value was 0.
2021-07-19 Patrick Angle <pangle@apple.com>
Web Inspector: Elements: selecting a sibling node in the breadcrumb navigation doesn't do anything
https://bugs.webkit.org/show_bug.cgi?id=227893
Reviewed by Devin Rousso.
The `WI.HierarchicalPathComponent.Event.Clicked` event is only fired when there are no sibling path components
to select, therefor we must also listen for the `WI.HierarchicalPathComponent.Event.SiblingWasSelected` event to
be able to then reveal and highlight the correct DOM node in the tree.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype.get selectionPathComponents):
(WI.DOMTreeContentView.prototype._handlePathComponentSelected):
Drive-by to match our style of `_handle*` event handler naming.
2021-07-19 Patrick Angle <pangle@apple.com>
Web Inspector: Add another Protocol Version (iOS 15.0)
https://bugs.webkit.org/show_bug.cgi?id=228079
Reviewed by Devin Rousso.
* UserInterface/Protocol/Legacy/15.0/InspectorBackendCommands.js: Added.
* Versions/Inspector-iOS-15.0.json: Added.
2021-07-15 Razvan Caliman <rcaliman@apple.com>
Web Inspector: Regression (r278607) Jump to CSS variable declaration from Computed panel not working
https://bugs.webkit.org/show_bug.cgi?id=227811
<rdar://problem/80339360>
Reviewed by Devin Rousso.
When attempting to highlight a hidden unused CSS variable, use the same method to identify a corresponding WI.CSSProperty
as used with other CSS property types. The method checks the canonical property name instead of strict object equality.
When a CSS variable is shown in the Computed panel, its corresponding WI.CSSProperty instance has slightly different
properties than the WI.CSSProperty used in the Styles panel. The instances are generated by different calls to
WI.DOMNodeStyles._parseStylePropertyPayload(), one for the payload of matching styles and another for computed styles.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty.propertiesMatch):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty.hasMatchingLonghandProperty):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
2021-07-14 Devin Rousso <drousso@apple.com>
Implement Array.prototype.findLast and Array.prototype.findLastIndex
https://bugs.webkit.org/show_bug.cgi?id=227939
Reviewed by Yusuke Suzuki.
* UserInterface/Models/NativeFunctionParameters.js:
2021-07-12 Patrick Angle <pangle@apple.com>
Web Inspector: REGRESSION(r279510): Elements: Computed: an (i) button is shown for computed property traces
https://bugs.webkit.org/show_bug.cgi?id=227892
Reviewed by Devin Rousso.
Property traces need to opt out of displaying the (i) button as they do for things like the colon and semicolon.
* UserInterface/Views/ComputedStyleSection.css:
(.computed-style-section .property-trace-item .property .name,):
2021-07-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r279493.
https://bugs.webkit.org/show_bug.cgi?id=227878
Web Inspector: Can't reveal local overrides in the sidebar if
lots of scripts are visible
Reverted changeset:
"Web Inspector: [Regression: r279271] Sources: Breakpoints
section in navigation sidebar disappears when Web Inspector
becomes taller than 650px"
https://bugs.webkit.org/show_bug.cgi?id=227597
https://commits.webkit.org/r279493
2021-07-09 Patrick Angle <pangle@apple.com>
Web Inspector: Perform sidebar panel and navigation bar layout asynchronously during resize
https://bugs.webkit.org/show_bug.cgi?id=227716
Reviewed by Devin Rousso.
Perform layout updates to the navigation bar and selected panel asynchronously so that they can be batched
together, instead of blocking on layout for each resize (of which there will be many during a dragging resize).
* UserInterface/Views/SingleSidebar.js:
(WI.SingleSidebar.prototype._recalculateWidth):
2021-07-06 Patrick Angle <pangle@apple.com>
Web Inspector: Elements Tab Details Sidebar navigation items sometime wrap to a second line
https://bugs.webkit.org/show_bug.cgi?id=227707
Reviewed by Devin Rousso.
When resizing a sidebar, it was possible that the cumulative widths of each navigation item could add up to just
less than the actual amount of space necessary to lay out each item in a single row, leading to wrapping items
to the next line. This resolves that issue by taking the ceiling of each item's width when calculating the
total amount of space needed to display all the items. Additionally, every time a panel is added or removed from
the sidebar, we need to recalculate the width of the sidebar to make sure the new navigation item, or the
removal thereof, is accommodated.
* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar.prototype.layout.calculateVisibleItemWidth):
(WI.NavigationBar.prototype._calculateMinimumWidth):
* UserInterface/Views/SingleSidebar.js:
(WI.SingleSidebar.prototype.didInsertSidebarPanel):
(WI.SingleSidebar.prototype.didRemoveSidebarPanel):
2021-07-02 Harshil Ratnu <hratnu@apple.com>
Web Inspector: add contextual documentation for CSS properties
https://bugs.webkit.org/show_bug.cgi?id=226883
Reviewed by Devin Rousso.
Overview: Add contextual documentation for all supported CSS properties in Styles and Computed panel within Web
Inspector.
Details: Add an info button which appears next to the property field on Hover. Clicking on the info button shows
a popover with the documentation for the property. Tabbing out or clicking anywhere other than the value field
dismisses the popover.
Architecture: Add a ContextualDocumentationButton in SpreadsheetStyleProperty and append that to the end of the
property content. This Button, when clicked, creates an instance of the ContextualDocumentation.js which will
search the ContextualDocumentationDB to find the related property and it's relevant details. Embed these details
in an instance of Popover.js and present next to the associated propertyName.
* Localizations/en.lproj/localizedStrings.js:
* Scripts/copy-user-interface-resources.pl:
Add details for the ContextualDocumentationDatabase from External Folder to build properly.
* UserInterface/Base/Setting.js:
Add setting to show syntax in documentation popover and define default state as false.
* UserInterface/External/ContextualDocumentationDatabase/ContextualDocumentationDatabase.js: Added.
* UserInterface/External/ContextualDocumentationDatabase/LICENSE: Added.
* UserInterface/Images/InfoIcon.svg: Added.
* UserInterface/Main.html:
Add and link new files.
* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .property .go-to-arrow):
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .property:not(:hover) .go-to-arrow):
Remove absolute positioning from go-to-arrow button to align it with rest of the text in line and style it
similar to contextual-documentation-button.
(.sidebar > .panel.details.css-style > .content > .computed .property .go-to-arrow): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .property:not(:hover) .go-to-arrow): Deleted.
Change hover area to include white space on the side of computed variables.
* UserInterface/Views/ComputedStyleSection.css:
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property .go-to-arrow):
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property .go-to-arrow):
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property > .content > .contextual-documentation-button):
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property > .content > .contextual-documentation-button):
Add unifrom styling for go-to-arrow button and contextual-documentation-button for computed properties.
* UserInterface/Views/ContextualDocumentationPopover.css: Added.
(.popover .documentation-popover-content):
(.popover .documentation-popover-content > p):
(.popover .documentation-popover-content > .name-header):
(.popover .documentation-popover-content > .syntax):
(.popover .documentation-popover-content > .syntax > .syntax-title):
(.popover .documentation-popover-content > .reference-link):
* UserInterface/Views/ContextualDocumentationPopover.js: Added.
(WI.ContextualDocumentationPopover):
(WI.ContextualDocumentationPopover.prototype.show):
(WI.ContextualDocumentationPopover.prototype._presentOverTargetElement):
(WI.ContextualDocumentationPopover.prototype._getDocumentationDetails):
(WI.ContextualDocumentationPopover.prototype._createDocumentationElement):
Add new class that extends Popover.js and handles fetching the values from VS Code documentation, puts relevant
information in the popover and presents the popover when the documentation-button is clicked.
* UserInterface/Views/Main.css:
(.contextual-documentation-button):
(.contextual-documentation-button:active):
(@media (prefers-color-scheme: dark) .contextual-documentation-button):
Add general styling for contextualDocumentationButton.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createElementsSettingsView):
Add a new setting in Elements Tab to show syntax.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.willDismissPopover):
Add a method - willDismissPopover to handle changes when the documentation popover is about to dismiss.
(WI.SpreadsheetStyleProperty.prototype.update):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
(WI.SpreadsheetStyleProperty.prototype._addContextualDocumentationButton):
Add a method which gets called for all property fields and also gets called when property name is changed and
updated by clicking out of the property name field or tabbing into the next value field and is responsible for
adding the info button add the end of the property.
(WI.SpreadsheetStyleProperty.prototype._handleContextualDocumentationButtonClicked):
(WI.SpreadsheetStyleProperty.prototype._presentContextualDocumentation):
Add a method which creates an instance of the ContextualDocumentationPopover.js class and shows it.
2021-07-02 Razvan Caliman <rcaliman@apple.com>
Web Inspector: Styles: should autocomplete `var()` and `attr()` values
https://bugs.webkit.org/show_bug.cgi?id=227098
<rdar://problem/79418247>
Reviewed by Devin Rousso.
Add support for completion suggestions in the Styles details sidebar panel
for CSS Variables for use with var() and DOM node attributes for use with attr().
* UserInterface/Models/CSSCompletions.js:
(WI.CSSCompletions.prototype.addValues):
* UserInterface/Models/CSSKeywordCompletions.js:
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles):
(WI.DOMNodeStyles.prototype.get allCSSVariables):
(WI.DOMNodeStyles.prototype._updateStyleCascade):
(WI.DOMNodeStyles.prototype._collectCSSVariables):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.getFunctionValueCompletions):
(WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
2021-07-01 Patrick Angle <pangle@apple.com>
Web Inspector: [Regression: r279271] Sources: Breakpoints section in navigation sidebar disappears when Web Inspector becomes taller than 650px
https://bugs.webkit.org/show_bug.cgi?id=227597
Reviewed by Devin Rousso.
As of r279271, flex base size is no longer clamped by max-height. As a result the non-clamped element
(`resources-container`) was sized to the full height of the container, leaving no space for the other sections
to be shown. Removing the `height: 100%;` declaration resolves this by allowing the flex container to lay out
its children as needed. Because the resources container has no maximum height constraint, it still occupies the
remaining height of the container. Each container will also continue to shrink/grow at their prescribed ratio
just as they did before r279271.
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container, .local-overrides-container)):
2021-06-30 Patrick Angle <pangle@apple.com>
Web Inspector: Styles: Autocomplete should support function completions
https://bugs.webkit.org/show_bug.cgi?id=227097
Reviewed by Devin Rousso.
Covered by new test:
- inspector/unit-tests/css-keyword-completions.html
Add support for completing autocompleting values as part of a CSS function in the Styles sidebar panel.
* UserInterface/Models/CSSKeywordCompletions.js:
(WI.CSSKeywordCompletions.forPartialPropertyName):
(WI.CSSKeywordCompletions.forPartialPropertyValue):
Tokenize the provided partial value text to correct provide completion for functions, like `env(`.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
(WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
Moved logic to `WI.CSSKeywordCompletions`.
2021-06-25 Patrick Angle <pangle@apple.com>
Web Inspector: Sources: Scope Chain sidebar panel is stripping repeating whitespace from strings
https://bugs.webkit.org/show_bug.cgi?id=227234
Reviewed by Devin Rousso.
String and Regular Expression values in Object Trees were having `white-space: nowrap;` applied to them, which
was redundant because `white-space: pre;` was already defined for `.formatted-string` and `.formatted-regexp`,
which makes sure that the text does not wrap unless it contains a newline, and these previews have newlines
replaced with a Unicode symbol to visually represent a newline without breaking to a new line.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree-property :matches(.formatted-string, .formatted-regexp)): Deleted.
2021-06-14 Patrick Angle <pangle@apple.com>
[REGRESSION: r276616] Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._setupCodeMirror.getValue')
https://bugs.webkit.org/show_bug.cgi?id=226995
Reviewed by Devin Rousso.
Audit test groups share a single setup editor for all their test cases, leaving individual test cases without
their own setup editor. In this case, we should not attempt to save the setup script for every test, and instead
allow the instance of `AuditTestGroupContentView` that does have a setup editor to save the script.
* UserInterface/Views/AuditTestContentView.js:
(WI.AuditTestContentView.prototype.saveEditedData):
2021-06-11 Patrick Angle <pangle@apple.com>
Web Inspector: Add instrumentation to node destruction for InspectorDOMAgent
https://bugs.webkit.org/show_bug.cgi?id=226624
Reviewed by Devin Rousso.
Listen for the new `DOM.willDestroyDOMNode` event in order to cleanup and remaining references to that Node.
This work serves as a prelude to <https://webkit.org/b/189687> (Web Inspector: preserve DOM.NodeId if a node is
removed and re-added) to eventually only forget about nodes upon destruction, instead of removal from the DOM
tree.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.willDestroyDOMNode):
* UserInterface/Protocol/DOMObserver.js:
(WI.DOMObserver.prototype.willDestroyDOMNode):
* UserInterface/Views/DOMTreeUpdater.js:
(WI.DOMTreeUpdater.prototype._nodeRemoved):
2021-06-08 Razvan Caliman <rcaliman@apple.com>
Web Inspector: Styles panel slow to render when inspecting node with many inherited CSS variables
https://bugs.webkit.org/show_bug.cgi?id=225972
<rdar://problem/78211185>
Reviewed by Devin Rousso.
Do not show unused inherited CSS variables in the Styles details sidebar.
When aggregating styles for the selected node in `WI.DOMNodeStyles`, collect a list of names of CSS variables used in CSS property values.
In the Styles details sidebar, skip rendering declarations of inherited CSS variables that are not found in this list.
Always show inherited variables that are used, either directly inherited or via reference (variables using other variables in their value).
Always show inherited variables used as values of inheritable properties like color, font-size, etc.
When a CSS rule contains hidden inherited variables, offer a button to request disclosing them for that rule.
Option-click to show unused inherited variables in all matching rules.
Clicking the "Go to variable" button automatically renders all the unused variables in the CSS rule where the target variable is declared.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.findVariableNames):
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles):
(WI.DOMNodeStyles.prototype.get usedCSSVariables):
(WI.DOMNodeStyles.prototype._updateStyleCascade):
(WI.DOMNodeStyles.prototype._collectUsedCSSVariables):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property):
(.spreadsheet-style-declaration-editor > .hidden-variables-button):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.set propertyVisibilityMode):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorSetAllPropertyVisibilityMode):
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionSetAllPropertyVisibilityMode):
2021-06-04 Devin Rousso <drousso@apple.com>
Web Inspector: cannot see experimental settings when inspecting `ServiceWorker`
https://bugs.webkit.org/show_bug.cgi?id=226666
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
There are experimental settings that have nothing to do with preview features or CSS. Don't
limit the Experimental pane to only if those things exist.
2021-06-04 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'InspectorBackend.Enum.Page.ResourceType')
https://bugs.webkit.org/show_bug.cgi?id=226664
Reviewed by Joseph Pecoraro.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.get Enum):
Use the list of all registered domains, not just the active domains, as only commands/events
are able to be filtered by target type.
2021-05-15 Said Abou-Hallawa <said@apple.com>
Implement CanvasRenderingContext2D.createConicGradient
https://bugs.webkit.org/show_bug.cgi?id=225539
Reviewed by Sam Weinig.
* UserInterface/Models/NativeFunctionParameters.js:
* UserInterface/Models/Recording.js:
(WI.Recording.prototype.async swizzle):
* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement._classNameForAction):
2021-05-10 Devin Rousso <drousso@apple.com>
Web Inspector: Network: rename "XHR" to "XHR/Fetch"
https://bugs.webkit.org/show_bug.cgi?id=224900
Reviewed by Timothy Hatcher.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
(WI.NetworkTableContentView.addScopeBarItem): Added.
(WI.NetworkTableContentView.displayNameForResource):
(WI.NetworkTableContentView.shortDisplayNameForResourceType): Deleted.
* Localizations/en.lproj/localizedStrings.js:
2021-05-10 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Layout panel "Grid Overlays" main checkbox has dead space (no interaction) between checkbox and label text
https://bugs.webkit.org/show_bug.cgi?id=225433
<rdar://problem/77590883>
Reviewed by Devin Rousso.
Make the empty space between the checkbox and the label text clickable in:
- Everywhere in Settings tab
- Layout panel, Page Overlay Options
- Grid Overlay header
* UserInterface/Main.html:
* UserInterface/Views/CSSGridSection.css:
(.css-grid-section .node-display-name):
(.css-grid-section .toggle-all):
(.css-grid-section :is(.setting-editor, .node-overlay-list-item-container, .heading) input[type="checkbox"]):
(.css-grid-section .setting-editor > input[type="checkbox"]):
(.css-grid-section .node-display-name,): Deleted.
Make all checkbox labels in the Grid section align vertically.
* UserInterface/Views/CSSGridSection.js:
(WI.CSSGridSection.prototype.initialLayout):
* UserInterface/Views/SettingEditor.css: Copied from Source/WebInspectorUI/UserInterface/Views/CSSGridSection.css.
(.setting-editor input):
(.setting-editor > input[type="checkbox"]):
(.setting-editor > label):
* UserInterface/Views/SettingEditor.js:
(WI.SettingEditor):
* UserInterface/Views/SettingsTabContentView.css:
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor:first-child > *):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="checkbox"]):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor select):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="number"]):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="text"]):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor select): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="number"]): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Deleted.
Rename ".editor" to ".setting-editor" so it matches SettingEditor.css.
2021-05-10 Devin Rousso <drousso@apple.com>
Web Inspector: add support for panning/zooming on images
https://bugs.webkit.org/show_bug.cgi?id=224655
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/GestureController.js: Added.
(WI.GestureController):
(WI.GestureController.prototype.get scale):
(WI.GestureController.prototype.set scale):
(WI.GestureController.prototype.get translate):
(WI.GestureController.prototype.set translate):
(WI.GestureController.prototype.reset):
(WI.GestureController.prototype._startScaleInteraction):
(WI.GestureController.prototype._updateScaleInteraction):
(WI.GestureController.prototype._endScaleInteraction):
(WI.GestureController.prototype._handleWheel):
(WI.GestureController.prototype._handleGestureStart):
(WI.GestureController.prototype._handleGestureChange):
(WI.GestureController.prototype._handleGestureEnd):
(WI.GestureController.prototype._handleMouseDown):
(WI.GestureController.prototype._handleMouseMove):
(WI.GestureController.prototype._handleMouseUp):
Add a general controller class that takes a `target` (and optionally a `container`) and adds
event listeners to handle various gestures:
- scale (both via trackpad and mouse wheel)
- transform (mouse click and drag)
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView):
(WI.ImageResourceContentView.prototype.get navigationItems):
(WI.ImageResourceContentView.prototype.contentAvailable):
(WI.ImageResourceContentView.prototype.gestureControllerDidScale): Added.
(WI.ImageResourceContentView.prototype.gestureControllerDidTranslate): Added.
(WI.ImageResourceContentView.prototype._updateResetGestureButtonNavigationItemLabel): Added.
(WI.ImageResourceContentView.prototype._handleResetGestureButtonNavitationItemClicked): Added.
(WI.ImageResourceContentView.prototype._handleZoomOutGestureButtonNavitationItemClicked): Added.
(WI.ImageResourceContentView.prototype._handleZoomInGestureButtonNavitationItemClicked): Added.
* UserInterface/Views/ImageResourceContentView.css:
(.content-view.resource.image > .img-container):
(.navigation-bar > .item.image-gesture-reset): Added.
Add a `WI.GestureController` and manipulate the `scale` and `transform` of the `<img>`.
Add navigation items that show the current scale (clicking it will reset the gesture), zoom
in, and zoom out.
* UserInterface/Views/LocalResourceOverrideLabelView.css:
(.local-resource-override-label-view):
Add a `z-index` so that zoomed images don't appear on top.
* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView.prototype.get contentViewConstructorOptions):
Don't create the `WI.GestureController` in collection views.
* UserInterface/Main.html:
* UserInterface/Images/ZoomIn.svg: Added.
* UserInterface/Images/ZoomOut.svg: Added.
* Localizations/en.lproj/localizedStrings.js:
2021-05-07 Patrick Angle <pangle@apple.com>
Web Inspector: Breakpoint action add/remove buttons are not vertically aligned with action dropdown
https://bugs.webkit.org/show_bug.cgi?id=225543
Reviewed by Devin Rousso.
Change the breakpoint action add/remove button's `margin-top` to `margin-block-start`, and adjust the value to
properly vertically center the buttons with the action type menu.
* UserInterface/Views/BreakpointActionView.css:
(:matches(.breakpoint-action-append-button, .breakpoint-action-remove-button)):
2021-05-07 Patrick Angle <pangle@apple.com>
Web Inspector: Default source for new test cases is minified
https://bugs.webkit.org/show_bug.cgi?id=225546
Reviewed by Devin Rousso.
Move the placeholder test code to `WI.DefaultAudits` as part of the non-minified sources so that new audit test
cases do not have their default placeholder script minified. This also allows us to remove
`WI.AuditTestCase.stringifyFunction` as it is no longer needed.
* UserInterface/Models/AuditTestCase.js:
(WI.AuditTestCase.stringifyFunction): Deleted.
* UserInterface/NonMinified/DefaultAudits.js:
(WI.DefaultAudits.newAuditPlaceholder):
* UserInterface/Views/CreateAuditPopover.js:
(WI.CreateAuditPopover.prototype.dismiss):
(WI.CreateAuditPopover.prototype.dismiss.const.placeholderTestFunction): Deleted.
2021-05-04 Devin Rousso <drousso@apple.com>
Web Inspector: add assertion for `WI.View` re-entrancy
https://bugs.webkit.org/show_bug.cgi?id=224678
Reviewed by Joseph Pecoraro.
Add `console.assert` (which are removed from production builds) around each critical
`WI.View` subclass member function to prevent reentrancy.
- `initialLayout`
- `sizeDidChange`
- `layout`
- `didLayoutSubtree`
This is important because `WI.View.prototype._layoutSubtree` sets any related state after
calling any of the above (e.g. `_didInitialLayout` after `initialLayout`), meaning that any
checks for the related state (which sometimes control whether the function is called, such
as in the case of `initialLayout`) would think that the function hadn't been called yet. See
r276170 for an example of how this can happen and the potential problems it can cause.
* UserInterface/Views/View.js:
(WI.View.prototype._layoutSubtree):
* UserInterface/Base/Utilities.js:
(WI.setReentrantCheck): Added.
(WI.clearReentrantCheck): Added.
2021-05-04 Razvan Caliman <rcaliman@apple.com>
Web Inspector: Sources: Inconsistent selection in source tree when grouped by path
https://bugs.webkit.org/show_bug.cgi?id=225317
Reviewed by Devin Rousso.
Ensure origin tree elements for different domains in the Sources Tab behave as folder tree elements
in that they can be individually selected without triggering rendering of any resource.
In essence, restore behavior prior to https://trac.webkit.org/changeset/248912/webkit
The only exception is for document resources. Clicking on the origin tree element associated with a document resource,
triggers rendering of the corresponding document.
* UserInterface/Views/OriginTreeElement.js:
(WI.OriginTreeElement):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addResource):
2021-04-28 Razvan Caliman <rcaliman@apple.com>
Web Inspector: CSS Grid - measure usage of grid overlay options
https://bugs.webkit.org/show_bug.cgi?id=225060
<rdar://75843294>
Reviewed by BJ Burg.
Add telemetry instrumentation to track grid overlay configurations and time spent using them.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
* UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js: Added.
(WI.GridOverlayConfigurationDiagnosticEventRecorder):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.get eventSamplingInterval):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.setup):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.teardown):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleGridOverlayShown):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleGridOverlayHidden):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.handleEvent):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._startEventSamplingTimer):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._stopEventSamplingTimer):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._sampleCurrentOverlayConfiguration):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._didObserveUserInteraction):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowFocus):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowBlur):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowKeyDown):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowMouseDown):
* UserInterface/Controllers/OverlayManager.js:
(WI.OverlayManager.prototype.hasVisibleGridOverlays):
* UserInterface/Main.html:
2021-04-27 Patrick Angle <pangle@apple.com>
Web Inspector: Rename "Open in New Tab" context menu item to "Open in New Window"
https://bugs.webkit.org/show_bug.cgi?id=225125
Reviewed by BJ Burg.
Update the context menu item label, as the "Open in..." context menu item opens the target item in a new window,
not a new tab.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForURL):
2021-04-27 Patrick Angle <pangle@apple.com>
Web Inspector: Default Audits script are minified in release builds
https://bugs.webkit.org/show_bug.cgi?id=225009
Reviewed by BJ Burg.
Covered by new test:
- inspector/audit/non-minified-default-audits.html
The default audits have been moved out of `AuditManager.js` and into a special `DefaultAudits.js` in the new
`NonMinified` directory, which contains JavaScript sources that should be included in `Main.js` and
`TestCombined.js`, but should not have whitespace stripped from their contents because the whitespace is
important to the script. For example, the source for the default audits are visible to the user, and therefore
we want to present well-formatted source in those contexts.
* Scripts/combine-resources.pl:
- Added `NonMinified` directory to list of default `inputDirectoryPattern` exceptions for combining resources.
- Added `--skip-concatenate-tag` so that we don't add tags for script we will eventually append to another script.
* Scripts/copy-user-interface-resources.pl:
- Handle `NonMinified` directory for sources that will be appended to Main.js, but should not be minified.
- Handle `NonMinified` directory for sources that will be appended to TestCombined.js.
(combineOrStripResourcesForWebKitAdditions):
- Drive-by fix for typo in combineOrStripResourcesForWebKitAdditions that caused errors to be emitted during builds.
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):
(WI.AuditManager.prototype._addDefaultTests.const.levelPass): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.levelWarn): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.levelFail): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.levelError): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.levelUnsupported): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.dataDOMNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.dataDOMAttributes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.dataErrors): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.dataCustom): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getElementsByComputedRole): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getActiveDescendant): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getChildNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getComputedProperties): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getControlledNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getFlowedNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getMouseEventNode): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getOwnedNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getParentNode): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getSelectedChildNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.hasEventListeners): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.hasEventListenersClick): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getResources): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getResourceContent): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.unsupported): Deleted.
(WI.AuditManager.prototype._addDefaultTests.hasChildWithRole): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testMenuRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testGridRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForAriaLabelledBySpelling): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForMultipleBanners): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForLinkLabels): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testRowGroupRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testTableRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForMultipleLiveRegions): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testListBoxRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testImageLabels): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForAriaHiddenFalse): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testTreeRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testRadioGroupRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testFeedRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testTabListRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testButtonLabels): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testRowRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testListRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testComboBoxRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForMultipleMainContentSections): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testDialogsForLabels): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForInvalidAriaHiddenValue): Deleted.
(WI.AuditManager.prototype._addDefaultTests.removeWhitespace): Deleted.
* UserInterface/Main.html:
* UserInterface/NonMinified/DefaultAudits.js: Added.
(WI.DefaultAudits.levelPass):
(WI.DefaultAudits.levelWarn):
(WI.DefaultAudits.levelFail):
(WI.DefaultAudits.levelError):
(WI.DefaultAudits.levelUnsupported):
(WI.DefaultAudits.dataDOMNodes):
(WI.DefaultAudits.dataDOMAttributes):
(WI.DefaultAudits.dataErrors):
(WI.DefaultAudits.dataCustom):
(WI.DefaultAudits.getElementsByComputedRole):
(WI.DefaultAudits.getActiveDescendant):
(WI.DefaultAudits.getChildNodes):
(WI.DefaultAudits.getComputedProperties):
(WI.DefaultAudits.getControlledNodes):
(WI.DefaultAudits.getFlowedNodes):
(WI.DefaultAudits.getMouseEventNode):
(WI.DefaultAudits.getOwnedNodes):
(WI.DefaultAudits.getParentNode):
(WI.DefaultAudits.getSelectedChildNodes):
(WI.DefaultAudits.hasEventListeners):
(WI.DefaultAudits.hasEventListenersClick):
(WI.DefaultAudits.getResources):
(WI.DefaultAudits.getResourceContent):
(WI.DefaultAudits.unsupported):
(hasChildWithRole):
(WI.DefaultAudits.testMenuRoleForRequiredChildren):
(WI.DefaultAudits.testGridRoleForRequiredChildren):
(WI.DefaultAudits.testForAriaLabelledBySpelling):
(WI.DefaultAudits.testForMultipleBanners):
(WI.DefaultAudits.testForLinkLabels):
(WI.DefaultAudits.testRowGroupRoleForRequiredChildren):
(WI.DefaultAudits.testTableRoleForRequiredChildren):
(WI.DefaultAudits.testForMultipleLiveRegions):
(WI.DefaultAudits.testListBoxRoleForRequiredChildren):
(WI.DefaultAudits.testImageLabels):
(WI.DefaultAudits.testForAriaHiddenFalse):
(WI.DefaultAudits.testTreeRoleForRequiredChildren):
(WI.DefaultAudits.testRadioGroupRoleForRequiredChildren):
(WI.DefaultAudits.testFeedRoleForRequiredChildren):
(WI.DefaultAudits.testTabListRoleForRequiredChildren):
(WI.DefaultAudits.testButtonLabels):
(WI.DefaultAudits.testRowRoleForRequiredChildren):
(WI.DefaultAudits.testListRoleForRequiredChildren):
(WI.DefaultAudits.testComboBoxRoleForRequiredChildren):
(WI.DefaultAudits.testForMultipleMainContentSections):
(WI.DefaultAudits.testDialogsForLabels):
(WI.DefaultAudits.testForInvalidAriaHiddenValue):
* UserInterface/Test.html:
2021-04-27 Don Olmstead <don.olmstead@sony.com>
[CMake] Don't use FORWARDING_HEADERS_DIR for GTK WebKit headers
https://bugs.webkit.org/show_bug.cgi?id=225006
Reviewed by Michael Catanzaro.
Use WebKit2Gtk_FRAMEWORK_HEADERS_DIR and WebKit2Gtk_DERIVED_SOURCES_DIR for WebKit2 GTK
headers instead of FORWARDING_HEADERS_DIR and DERIVED_SOURCES_DIR.
* PlatformGTK.cmake:
2021-04-26 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Audit Tab: Edits are not committed when leaving edit mode unless you first click into another text field
https://bugs.webkit.org/show_bug.cgi?id=224318
<rdar://problem/76382755>
Reviewed by Devin Rousso.
Save test and setup code when pressing "Done" button. Don't rely on the blur event because it doesn't fire on
the focused element when it's removed from the DOM.
* UserInterface/Models/AuditTestBase.js:
(WI.AuditTestBase.prototype.set setup):
* UserInterface/Models/AuditTestCase.js:
(WI.AuditTestCase.prototype.set test):
Allow setting `test` and `setup` after editing is finished.
* UserInterface/Views/AuditTestCaseContentView.js:
(WI.AuditTestCaseContentView.prototype.layout):
(WI.AuditTestCaseContentView.prototype.saveEditedData):
* UserInterface/Views/AuditTestContentView.js:
(WI.AuditTestContentView.prototype.detached):
Saving test on `detached` saves it when selecting a different test in the navigation sidebar.
(WI.AuditTestContentView.prototype.saveEditedData):
(WI.AuditTestContentView.prototype._createSetupEditor):
(WI.AuditTestContentView.prototype._handleEditingChanged):
(WI.AuditTestContentView):
2021-04-26 Devin Rousso <drousso@apple.com>
Web Inspector: Audit: Uncaught Exception: Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key range.
https://bugs.webkit.org/show_bug.cgi?id=224993
Reviewed by BJ Burg.
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype.async processJSON):
(WI.AuditManager.prototype.async addTest):
* UserInterface/Views/AuditNavigationSidebarPanel.js:
(WI.AuditNavigationSidebarPanel.prototype.willDismissPopover):
* UserInterface/Views/AuditTreeElement.js:
(WI.AuditTreeElement.prototype.populateContextMenu):
Make sure to save any newly created audits not already in `WI.objectStores.audits` immediately
so that if the developer tries to delete it before exiting Edit mode (which is normally when
everything is saved) an exception isn't thrown about it not being in `WI.objectStores.audits`.
2021-04-26 Razvan Caliman <rcaliman@apple.com>
Web Inspector: REGRESSION(r270134) Elements Tab: Details Sidebar toggle is unexpectedly disabled after switching from Timelines tab
https://bugs.webkit.org/show_bug.cgi?id=224772
<rdar://73470211>
Reviewed by Devin Rousso.
Ensure the logic for identifying and showing the represented object for the selected `DOMNode`
is not run unless the Elements Tab is visible. This guards agains the partial setting of state
when the Elements Tab is not the default tab while opening Web Inspector.
* UserInterface/Views/ElementsTabContentView.js:
(WI.ElementsTabContentView):
(WI.ElementsTabContentView.prototype.showRepresentedObject):
(WI.ElementsTabContentView.prototype.attached):
(WI.ElementsTabContentView.prototype.detached):
(WI.ElementsTabContentView.prototype._showDOMTreeContentViewIfNeeded):
(WI.ElementsTabContentView.prototype._mainFrameDidChange):
(WI.ElementsTabContentView.prototype._mainResourceDidChange):
2021-04-25 Devin Rousso <drousso@apple.com>
Web Inspector: Audit: REGRESSION(?): creating a new test in Edit mode causes the Results folder to appear
https://bugs.webkit.org/show_bug.cgi?id=224994
Reviewed by Darin Adler.
* UserInterface/Views/AuditNavigationSidebarPanel.js:
(WI.AuditNavigationSidebarPanel.prototype._addTest):
2021-04-22 BJ Burg <bburg@apple.com>
[Cocoa] re-enable test case WKInspectorDelegate.InspectorConfiguration
https://bugs.webkit.org/show_bug.cgi?id=224577
<rdar://70505272>
Reviewed by Devin Rousso.
Adjust the CSP directive list in the <meta> tag to allow for customization
by WebKit ports.
* UserInterface/Main.html:
- Remove `default-src 'self'` so as not to block custom scheme loads.
- Remove `connect-src * ws:` so as not to block custom scheme loads.
- Add `object-src 'none'` as we have no reason to allow <object>, <embed>, or <applet>.
2021-04-20 Razvan Caliman <rcaliman@apple.com>
Web Inspector: Tree Outlines: `ondetach` can be called without `onattach` ever being called
https://bugs.webkit.org/show_bug.cgi?id=224652
<rdar://problem/76746385>
Reviewed by Devin Rousso.
Ensure `TreeElement.ondetach()` cannot be called if the conditions
for previously calling `TreeElement.onattach()` have not been met.
* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype._detach):
2021-04-19 Patrick Angle <pangle@apple.com>
REGRESSION (r268691 && r270134): Web Inspector: Clicking on go-to arrow in Computed panel no longer works
https://bugs.webkit.org/show_bug.cgi?id=224774
Reviewed by Devin Rousso.
The Styles panel will not always be part of the same sidebar as the Computed panel as of r268691, so we should
look for the Styles panel in WI.detailsSidebar, which will report all of the panels it manages across multiple
sidebars. Additionally, as of r270134, there is no longer a private `_visible` property for
`WI.StyleDetailsPanel`, so it can not be used by `WI.SpreadsheetRulesStyleDetailsPanel`. Instead, visibility
should be determined by checking if the panel is attached and not pending layout.
* UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
(WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):
2021-04-19 Devin Rousso <drousso@apple.com>
Web Inspector: Graphics: add support for `steps()`/`spring()` CSS timing functions
https://bugs.webkit.org/show_bug.cgi?id=224654
Reviewed by BJ Burg.
* UserInterface/Models/Geometry.js:
(WI.StepsFunction): Added.
(WI.StepsFunction.fromString): Added.
(WI.StepsFunction.prototype.get type): Added.
(WI.StepsFunction.prototype.get count): Added.
(WI.StepsFunction.prototype.copy): Added.
(WI.StepsFunction.prototype.toString): Added.
Create a model object for `steps()` CSS timing function.
* UserInterface/Models/Animation.js:
(WI.Animation.prototype._updateEffect):
Also support `effect.timingFunction`/`keyframe.easing` being a `steps()`/`spring()` CSS timing function.
* UserInterface/Views/AnimationContentView.js:
(WI.AnimationContentView.prototype._refreshPreview):
Create a UI for `steps()`/`spring()` CSS timing functions.
2021-04-19 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(?): Network: Request (Object Tree) is sometimes empty
https://bugs.webkit.org/show_bug.cgi?id=224768
<rdar://problem/76783636>
Reviewed by BJ Burg.
* UserInterface/Views/LocalJSONContentView.js:
(WI.LocalJSONContentView.prototype.renderRemoteObject):
If the `WI.RemoteObject` is simple enough to be rendered inline, `WI.ObjectTreeView` won't
show a `WI.TreeOutline` by default. We have to tell it to use a `WI.TreeOutline` by passing
`forceExpanding = true` into the constructor.
* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.prototype.showOnlyJSON):
Add some `console.assert` to help prevent this from happening again.
2021-04-19 Kimmo Kinnunen <kkinnunen@apple.com>
Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards
https://bugs.webkit.org/show_bug.cgi?id=221614
<rdar://problem/74396781>
Reviewed by David Kilzer.
Add -Wthread-safety to compile flags.
* Configurations/Base.xcconfig:
2021-04-16 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(?): Graphics: dropping a recording leaves behind a drop zone view
https://bugs.webkit.org/show_bug.cgi?id=224648
Reviewed by BJ Burg.
* UserInterface/Views/GraphicsTabContentView.js:
(WI.GraphicsTabContentView.prototype.initialLayout):
It appears that it's possible for re-entrancy issues in the `WI.View` system since the
`_didInitialLayout` flag isn't set until _after_ `initialLayout` returns, meaning that if
the logic inside `initialLayout` triggers a synchronous `layout` then that second `layout`
won't know that it's already in the middle of an `initialLayout`. In this case, showing the
`WI.GraphicsOverviewContentView` causes the navigation sidebar to be shown, which forces a
synchronous `layout` from handling `WI.Sidebar.Event.WidthDidChange`. For now, there's no
"rush" to show the `WI.GraphicsOverviewContentView` so we delay it by one event loop turn.
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype.dropZoneShouldAppearForDragEvent): Deleted.
(WI.CanvasContentView.prototype.dropZoneHandleDrop): Deleted.
There's no reason to have another `WI.DropZoneView` here since there's already one that
covers the entire tab.
2021-04-16 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: null is not an object (evaluating 'this._listeners.get')
https://bugs.webkit.org/show_bug.cgi?id=224651
Reviewed by BJ Burg.
* UserInterface/Base/Object.js:
(WI.Object.removeEventListener):
Add early-return checks just in case `_listeners` or `listenersForEventType` is falsy. While
ideally it would be the case that these would never be falsy, the logic of Web Inspector is
complex and far reaching, so better safe than sorry.
* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype._detach):
* UserInterface/Views/AuditTreeElement.js:
(WI.AuditTreeElement.prototype.ondetach):
* UserInterface/Views/BootstrapScriptTreeElement.js:
(WI.BootstrapScriptTreeElement.prototype.ondetach):
* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.ondetach):
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.ondetach):
* UserInterface/Views/FrameTreeElement.js:
(WI.FrameTreeElement.prototype.ondetach):
* UserInterface/Views/JavaScriptBreakpointTreeElement.js:
(WI.JavaScriptBreakpointTreeElement.prototype.ondetach):
* UserInterface/Views/LocalResourceOverrideTreeElement.js:
(WI.LocalResourceOverrideTreeElement.prototype.ondetach):
* UserInterface/Views/ShaderProgramTreeElement.js:
(WI.ShaderProgramTreeElement.prototype.ondetach):
* UserInterface/Views/WebSocketResourceTreeElement.js:
(WI.WebSocketResourceTreeElement.prototype.ondetach):
Add FIXME comments warning of this issue so that future changes can take it into account.
<https://webkit.org/b/224652> (Web Inspector: Tree Outlines: `ondetach` can be called without `onattach` ever being called)
2021-04-16 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: don't show the create local override contextmenu if the navigation item is disabled
https://bugs.webkit.org/show_bug.cgi?id=224647
Reviewed by BJ Burg.
* UserInterface/Views/ResourceContentView.js:
(WI.ResourceContentView.prototype._populateCreateLocalResourceOverrideContextMenu):
2021-04-13 BJ Burg <bburg@apple.com>
Web Inspector: add setting to allow inspecting Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=224082
<rdar://75695002>
Reviewed by Devin Rousso.
Instead of telling curious users to set the WebKitDeveloperExtras default,
expose an experimental setting that does the same thing.
* UserInterface/Base/Main.js:
(WI.loaded):
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
2021-04-06 BJ Burg <bburg@apple.com>
Web Inspector: remove duplicate Box Model section from Layout panel in Elements Tab
https://bugs.webkit.org/show_bug.cgi?id=224206
<rdar://problem/76235731>
Reviewed by Devin Rousso.
For now, remove it from Layout panel. It may go back there
when it is able to show used values. It currently only shows computed.
* UserInterface/Views/LayoutDetailsSidebarPanel.js:
(WI.LayoutDetailsSidebarPanel.prototype.initialLayout):
(WI.LayoutDetailsSidebarPanel.prototype.layout):
(WI.LayoutDetailsSidebarPanel.prototype.get minimumWidth): Deleted.
2021-04-06 Razvan Caliman <rcaliman@apple.com>
Web Inspector: Layout sidebar grid overlay color swatch tooltip shouldn't include "switch format" hint
https://bugs.webkit.org/show_bug.cgi?id=223418
<rdar://problem/75825793>
Reviewed by BJ Burg.
* UserInterface/Views/CSSGridSection.js:
(WI.CSSGridSection.prototype.layout):
* UserInterface/Views/InlineSwatch.js:
(WI.InlineSwatch):
(WI.InlineSwatch.prototype.set shiftClickColorEnabled):
(WI.InlineSwatch.prototype._updateSwatch):
(WI.InlineSwatch.prototype._allowChangingColorFormats):
2021-03-31 Patrick Angle <pangle@apple.com>
Web Inspector: Regression (r270134) Timeline recordings 2 and beyond do not show a timescale.
https://bugs.webkit.org/show_bug.cgi?id=222930
Reviewed by Devin Rousso.
When a new `TimelineOverview` is created, it calls `TimelineOverview.prototype._viewModeDidChange` inside the
constructor, which in turn called `updateLayout`. This was problematic in that a `TimelineRuler` would have
`sizeDidChange` invoked before it was attached to the DOM, which meant that there was no width to cache. Because
`sizeDidChange` is only invoked during the first layout and on resize events, the cached width is not updated
when the ruler is attached to the view hierarchy, having already performed an early initial layout.
This patch now checks if the `TimelineOverview` has performed its initial layout before updating the layout
inside `_viewModeDidChange`, which means that the initial layout on the child `TimelineRuler` will be done while
attached, thus producing a valid width value to cache.
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineRuler.prototype._viewModeDidChange):
2021-03-31 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Autocomplete experimental CSS Color values (hwb, lch, lab, color-mix, color-contrast)
https://bugs.webkit.org/show_bug.cgi?id=224010
<rdar://problem/76065217>
Reviewed by BJ Burg.
* UserInterface/Models/CSSKeywordCompletions.js:
2021-03-28 Sam Weinig <weinig@apple.com>
Remove ENABLE_INDEXED_DATABASE & ENABLE_INDEXED_DATABASE_IN_WORKERS, it seems like it is on for all ports
https://bugs.webkit.org/show_bug.cgi?id=223810
Reviewed by Simon Fraser.
* Versions/Inspector-iOS-14.0.json:
* Versions/Inspector-iOS-14.5.json:
Update for removed ENABLE_INDEXED_DATABASE conditional.
2021-03-26 Jessie Berlin <jberlin@webkit.org>
Update the BEFORE/SINCE, SYSTEM_VERSION_PREFIX, and MACOSX_DEPLOYMENT_TARGET flags
https://bugs.webkit.org/show_bug.cgi?id=223779
Reviewed by Tim Horton.
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
2021-03-25 Jessie Berlin <jberlin@webkit.org>
Remove 10.13 DEPLOYMENT_TARGETs and SYSTEM_VERSION_PREFIXs
https://bugs.webkit.org/show_bug.cgi?id=223765
Reviewed by Tim Horton.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
2021-03-25 Razvan Caliman <rcaliman@apple.com>
REGRESSION (r270134) Web Inspector: Audit: Results are stacked on top of each other.
https://bugs.webkit.org/show_bug.cgi?id=223381
<rdar://problem/75528374>
Reviewed by Devin Rousso.
Ensure pre-existing `ContentView`s are removed when navigating back/forward
even when the incoming `ContentView` is already attached.
For example, `AuditTestContentView` instances for individual tests are already attached
when shown as part of a test group `AuditTestGroupContentView`.
Navigating from the group to the individual test view must remove the group view.
* UserInterface/Views/ContentViewContainer.js:
(WI.ContentViewContainer.prototype.showBackForwardEntryForIndex):
2021-03-24 Razvan Caliman <rcaliman@apple.com>
Web Inspector: REGRESSION (r269359): Timelines: TypeError: this.deselect is not a function
https://bugs.webkit.org/show_bug.cgi?id=223698
<rdar://problem/75790983>
Reviewed by BJ Burg.
Ensure individual timeline views can be closed to return to the Timelines overview.
* UserInterface/Views/TimelineTreeElement.js:
(WI.TimelineTreeElement.prototype._showCloseButton):
2021-03-19 BJ Burg <bburg@apple.com>
Uncaught Exception: RangeError: Array size is not a small enough positive integer.
https://bugs.webkit.org/show_bug.cgi?id=223532
<rdar://problem/75635080>
Reviewed by Devin Rousso.
This patch fixes the broken CPU instrument when viewing a JSON timeline recordng.
This exception is thrown when viewing a timeline recording that has been
imported from JSON file. Aside from the exception, the code is functionally
broken in this situation since passing a negative number to Array() doesn't work.
I tested this change manually and selection ranges now behave as expected, and
have not regressed in other instruments / UI.
* UserInterface/Views/CPUTimelineView.js:
Based on my investigation, the visibleEndTime is incorrectly computed when
showing a JSON timeline recording because the currentTime property is always '0'.
If this is the case, then let's assume that the entire range should be displayed.
== Rolled over to ChangeLog-2021-03-18 ==