Describe the bug
When running tests in Safari on macOS, the screenshots returned by Safari Driver include the macOS window mask and a shadow at the top of the window. The bottom corners are rounded and the top contains several pixels of shadow. These artifacts are part of the macOS window compositor and are not part of the actual browser viewport.
Impact
The extra pixels cause incorrect viewport calculations for full page screenshots. As a result, the viewable area is detected incorrectly and stitching logic fails or produces misaligned images.
Expected
Safari desktop screenshots should represent only the visible browser content without macOS window artifacts.