You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Web Inspector: Add Order Number to display: grid and grid-lanes
https://bugs.webkit.org/show_bug.cgi?id=304287
rdar://problem/166648769
Reviewed by BJ Burg and Devin Rousso.
Add an "Order Numbers" option to CSS Grid overlays in Web Inspector, matching
the existing functionality for Flexbox overlays.
The implementation supports both regular CSS Grid layouts and CSS Masonry layouts.
For regular grids, item bounds are computed from grid area lines. For masonry
layouts, the item's frame rect is used directly since grid areas may not have
definite positions in the masonry axis.
* LayoutTests/inspector/dom/showFlexOverlay-expected.txt:
* LayoutTests/inspector/dom/showFlexOverlay.html:
* LayoutTests/inspector/dom/showGridOverlay-expected.txt:
* LayoutTests/inspector/dom/showGridOverlay.html:
* Source/JavaScriptCore/inspector/protocol/DOM.json:
* Source/WebCore/en.lproj/Localizable.strings:
* Source/WebCore/inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::clearGridOverlayForNode):
(WebCore::InspectorOverlay::clearFlexOverlayForNode):
(WebCore::InspectorOverlay::buildGridOverlay):
(WebCore::InspectorOverlay::buildFlexOverlay):
* Source/WebCore/inspector/InspectorOverlay.h:
* Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::gridOverlayConfigFromInspectorObject):
* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
* Source/WebInspectorUI/UserInterface/Base/Setting.js:
* Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.buildHighlightConfigs):
* Source/WebInspectorUI/UserInterface/Models/DOMNode.js:
(WI.DOMNode.prototype.set layoutFlags):
(WI.DOMNode.prototype.showLayoutOverlay):
(WI.DOMNode.prototype.hideLayoutOverlay):
* Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.js:
(WI.LayoutDetailsSidebarPanel.prototype.initialLayout):
Canonical link: https://commits.webkit.org/304645@main
Copy file name to clipboardExpand all lines: Source/JavaScriptCore/inspector/protocol/DOM.json
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,8 @@
180
180
{ "name": "showLineNumbers", "type": "boolean", "optional": true, "description": "Show labels for grid line numbers. If not specified, the default value is false." },
181
181
{ "name": "showExtendedGridLines", "type": "boolean", "optional": true, "description": "Show grid lines that extend beyond the bounds of the grid. If not specified, the default value is false." },
182
182
{ "name": "showTrackSizes", "type": "boolean", "optional": true, "description": "Show grid track size information. If not specified, the default value is false." },
183
-
{ "name": "showAreaNames", "type": "boolean", "optional": true, "description": "Show labels for grid area names. If not specified, the default value is false." }
183
+
{ "name": "showAreaNames", "type": "boolean", "optional": true, "description": "Show labels for grid area names. If not specified, the default value is false." },
184
+
{ "name": "showOrderNumbers", "type": "boolean", "optional": true, "description": "Show labels for grid item order. If not specified, the default value is false." }
Copy file name to clipboardExpand all lines: Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1232,7 +1232,7 @@ localizedStrings["Option-click to show source"] = "Option-click to show source";
1232
1232
/* Tooltip with instructions on how to show all hidden CSS variables */
1233
1233
localizedStrings["Option-click to show unused CSS variables from all rules @ Styles Sidebar Panel Tooltip"]="Option-click to show unused CSS variables from all rules";
1234
1234
localizedStrings["Options"]="Options";
1235
-
/* Label for option to toggle the order numbers setting for CSS flex overlays */
1235
+
/* Label for option to toggle the order numbers setting for CSS grid and flex overlays */
0 commit comments