-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web Inspector: CSS Grid Page Overlay support for masonry layout #20934
Web Inspector: CSS Grid Page Overlay support for masonry layout #20934
Conversation
EWS run on previous version of this PR (hash 46abb52) |
// But we can borrow the concept to draw the two lines at the start and end of the masonry axis. | ||
if (renderGrid.areMasonryRows()) { | ||
auto firstRowPosition = rowPositions[0]; | ||
auto lastRowPosition = masonryContentSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the first row/column position always be 0? Or should lastRowPosition
actually equal firstRowPosition + masonryContentSize
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! π
No, the first row (or column) position isn't always zero because it includes the border, padding and offsets for the grid container itself:
WebKit/Source/WebCore/rendering/RenderGrid.cpp
Line 1492 in f6ce8ab
positions[0] = borderAndPadding + offset.positionOffset; |
Fixed in the latest patch.
(the gap between the last item and the bottom line is the default margin for a <p>
from the browser styles)
46abb52
to
ce94356
Compare
EWS run on current version of this PR (hash ce94356) |
EWS run on current version of this PR (hash ce94356) |
https://bugs.webkit.org/show_bug.cgi?id=265381 rdar://118833618 Reviewed by Patrick Angle. There are no actual rows or columns in the masonry axis of a masonry layout. But we can borrow the concept to draw the two lines at the start and end of the masonry axis. There are rows or columns in the grid axis of a masonry layout, just like in a regular grid layout. Their lines will wrap the masonry layout in the other direction. * Source/WebCore/inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::buildGridOverlay): Canonical link: https://commits.webkit.org/271332@main
ce94356
to
9a3f6dd
Compare
Committed 271332@main (9a3f6dd): https://commits.webkit.org/271332@main Reviewed commits have been landed. Closing PR #20934 and removing active labels. |
9a3f6dd
ce94356