| Summary: | Web Inspector: `console.screenshot` has extra transparent pixels at bottom of screenshot on platforms with viewports that are obscured by browser chrome | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Patrick Angle <pangle> | ||||||||||
| Component: | Web Inspector | Assignee: | Patrick Angle <pangle> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | hi, inspector-bugzilla-changes, webkit-bug-importer | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Patrick Angle
2022-03-17 17:04:08 PDT
Created attachment 455046 [details]
Screenshot of Issue
Created attachment 455049 [details]
Patch v1.0
Created attachment 455050 [details]
Screenshot of Patch v1.0
Comment on attachment 455049 [details] Patch v1.0 View in context: https://bugs.webkit.org/attachment.cgi?id=455049&action=review r=me, lol oops great catch Any way to test this? > Source/WebCore/page/PageConsoleClient.cpp:414 > + IntRect imageRect(IntPoint::zero(), m_page.mainFrame().view()->unobscuredContentRect().size()); Do we care about the `location()` of the `unobscuredContentRect()`? Should we maybe just use that as the `imageRect` instead of only taking it's `size()` with `IntPoint::zero()` as the `location`? Comment on attachment 455049 [details] Patch v1.0 View in context: https://bugs.webkit.org/attachment.cgi?id=455049&action=review >> Source/WebCore/page/PageConsoleClient.cpp:414 >> + IntRect imageRect(IntPoint::zero(), m_page.mainFrame().view()->unobscuredContentRect().size()); > > Do we care about the `location()` of the `unobscuredContentRect()`? Should we maybe just use that as the `imageRect` instead of only taking it's `size()` with `IntPoint::zero()` as the `location`? The implementation of `unobscuredContentRect()` sets the `location()` to the current scroll position, which we don't want... although I guess we could stop passing `SnapshotFlags::InViewCoordinates` into `snapshotFrameRect` below and that would work (I think). Created attachment 455128 [details]
Patch v1.1
Committed r291519 (248625@main): <https://commits.webkit.org/248625@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455128 [details]. |