Changeset 275529 in webkit


Ignore:
Timestamp:
Apr 6, 2021 10:18:52 AM (3 years ago)
Author:
Patrick Angle
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r275528 r275529  
     12021-04-06  Patrick Angle  <pangle@apple.com>
     2
     3        Web Inspector: Grid overlay areas appear offset from their actual areas when the grid container has a border set
     4        https://bugs.webkit.org/show_bug.cgi?id=224201
     5
     6        Reviewed by BJ Burg.
     7
     8        As of r274096, it is no longer correct to subtract the first track's position for either axis from the edge
     9        lines of areas. This change resolves that, bringing this math in line with how other grid lines are laid out.
     10
     11        * inspector/InspectorOverlay.cpp:
     12        (WebCore::InspectorOverlay::buildGridOverlay):
     13
    1142021-04-06  Alicia Boya García  <aboya@igalia.com>
    215
  • trunk/Source/WebCore/inspector/InspectorOverlay.cpp

    r275519 r275529  
    19351935
    19361936            // Named grid areas will always be rectangular per the CSS Grid specification.
    1937             auto columnStartLine = columnLineAt(columnPositions[area.columns.startLine()] - columnPositions[0]);
     1937            auto columnStartLine = columnLineAt(columnPositions[area.columns.startLine()]);
    19381938            auto columnEndLine = columnLineAt(columnPositions[area.columns.endLine() - 1] + columnWidths[area.columns.endLine() - 1]);
    1939             auto rowStartLine = rowLineAt(rowPositions[area.rows.startLine()] - rowPositions[0]);
    1940             auto rowEndLine = rowLineAt(rowPositions[area.rows.endLine() - 1] + rowHeights[area.rows.endLine() - 1] - rowPositions[0]);
     1939            auto rowStartLine = rowLineAt(rowPositions[area.rows.startLine()]);
     1940            auto rowEndLine = rowLineAt(rowPositions[area.rows.endLine() - 1] + rowHeights[area.rows.endLine() - 1]);
    19411941
    19421942            Optional<FloatPoint> topLeft = columnStartLine.intersectionWith(rowStartLine);
Note: See TracChangeset for help on using the changeset viewer.