Changeset 275558 in webkit
- Timestamp:
- Apr 6, 2021 3:09:10 PM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r275557 r275558 1 2021-04-06 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: Grid overlay line numbers should not include implicit tracks in negative line number calculations. 4 https://bugs.webkit.org/show_bug.cgi?id=224200 5 6 Reviewed by BJ Burg. 7 8 Use the `authoredTrackColumnSizes`/`authoredTrackRowSizes` to determine if the line is an explicit grid line or 9 implicit grid line (starting with the patch for bug 224199 those vectors will only contain the explicit lines). 10 Only explicit lines should have a negative number for addressing the line, and those numbers should start with 11 the last explicit line. Because each track is bounded by two lines, there will always be one more explicit line 12 than there is explicit track, including the case where there are no explicit tracks, which will still have a 13 single explicit line numbered `-1`. 14 15 Additionally, line numbers are now separated by an em-space to improve legibility, where previously the bullet 16 looked like a multiplication symbol between two numbers. 17 18 * inspector/InspectorOverlay.cpp: 19 (WebCore::InspectorOverlay::buildGridOverlay): 20 1 21 2021-04-06 Mike Gorse <mgorse@suse.com> 2 22 -
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
r275529 r275558 93 93 static constexpr UChar multiplicationSign = 0x00D7; 94 94 static constexpr UChar thinSpace = 0x2009; 95 static constexpr UChar emSpace = 0x2003; 95 96 96 97 static void truncateWithEllipsis(String& string, size_t length) … … 1807 1808 1808 1809 StringBuilder lineLabel; 1809 if (gridOverlay.config.showLineNumbers) 1810 lineLabel.append(i + 1, thinSpace, bullet, thinSpace, -static_cast<int>(columnPositions.size() - i)); 1810 if (gridOverlay.config.showLineNumbers) { 1811 lineLabel.append(i + 1); 1812 if (i <= authoredTrackColumnSizes.size()) 1813 lineLabel.append(emSpace, -static_cast<int>(authoredTrackColumnSizes.size() - i + 1)); 1814 } 1811 1815 if (gridOverlay.config.showLineNames && columnLineNames.contains(i)) { 1812 1816 for (auto lineName : columnLineNames.get(i)) { … … 1901 1905 1902 1906 StringBuilder lineLabel; 1903 if (gridOverlay.config.showLineNumbers) 1904 lineLabel.append(i + 1, thinSpace, bullet, thinSpace, -static_cast<int>(rowPositions.size() - i)); 1907 if (gridOverlay.config.showLineNumbers) { 1908 lineLabel.append(i + 1); 1909 if (i <= authoredTrackRowSizes.size()) 1910 lineLabel.append(emSpace, -static_cast<int>(authoredTrackRowSizes.size() - i + 1)); 1911 } 1905 1912 if (gridOverlay.config.showLineNames && rowLineNames.contains(i)) { 1906 1913 for (auto lineName : rowLineNames.get(i)) {
Note: See TracChangeset
for help on using the changeset viewer.