Title: [275529] trunk/Source/WebCore
Revision
275529
Author
[email protected]
Date
2021-04-06 10:18:52 -0700 (Tue, 06 Apr 2021)

Log Message

Web Inspector: Grid overlay areas appear offset from their actual areas when the grid container has a border set
https://bugs.webkit.org/show_bug.cgi?id=224201

Reviewed by BJ Burg.

As of r274096, it is no longer correct to subtract the first track's position for either axis from the edge
lines of areas. This change resolves that, bringing this math in line with how other grid lines are laid out.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::buildGridOverlay):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (275528 => 275529)


--- trunk/Source/WebCore/ChangeLog	2021-04-06 17:10:27 UTC (rev 275528)
+++ trunk/Source/WebCore/ChangeLog	2021-04-06 17:18:52 UTC (rev 275529)
@@ -1,3 +1,16 @@
+2021-04-06  Patrick Angle  <[email protected]>
+
+        Web Inspector: Grid overlay areas appear offset from their actual areas when the grid container has a border set
+        https://bugs.webkit.org/show_bug.cgi?id=224201
+
+        Reviewed by BJ Burg.
+
+        As of r274096, it is no longer correct to subtract the first track's position for either axis from the edge
+        lines of areas. This change resolves that, bringing this math in line with how other grid lines are laid out.
+
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::InspectorOverlay::buildGridOverlay):
+
 2021-04-06  Alicia Boya GarcĂ­a  <[email protected]>
 
         [GStreamer] At EOS, change position to match duration, not the other way around.

Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (275528 => 275529)


--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2021-04-06 17:10:27 UTC (rev 275528)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2021-04-06 17:18:52 UTC (rev 275529)
@@ -1934,10 +1934,10 @@
             auto& area = gridArea.value;
 
             // Named grid areas will always be rectangular per the CSS Grid specification.
-            auto columnStartLine = columnLineAt(columnPositions[area.columns.startLine()] - columnPositions[0]);
+            auto columnStartLine = columnLineAt(columnPositions[area.columns.startLine()]);
             auto columnEndLine = columnLineAt(columnPositions[area.columns.endLine() - 1] + columnWidths[area.columns.endLine() - 1]);
-            auto rowStartLine = rowLineAt(rowPositions[area.rows.startLine()] - rowPositions[0]);
-            auto rowEndLine = rowLineAt(rowPositions[area.rows.endLine() - 1] + rowHeights[area.rows.endLine() - 1] - rowPositions[0]);
+            auto rowStartLine = rowLineAt(rowPositions[area.rows.startLine()]);
+            auto rowEndLine = rowLineAt(rowPositions[area.rows.endLine() - 1] + rowHeights[area.rows.endLine() - 1]);
 
             Optional<FloatPoint> topLeft = columnStartLine.intersectionWith(rowStartLine);
             Optional<FloatPoint> topRight = columnEndLine.intersectionWith(rowStartLine);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to