Right now the code uses the bounding client rect. It should use the actual margin-box. Note that tests will need to be added and changed as part of this fix.
Created attachment 231044 [details] test-case
Created attachment 231045 [details] test-case-expected
Note: expectation file lacks the clipping to the background area. The dimensions are correct though.
Created attachment 345053 [details] Patch
Comment on attachment 345053 [details] Patch Attachment 345053 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8543016 New failing tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
Created attachment 345054 [details] Archive of layout-test-results from ews202 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews202 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Created attachment 345154 [details] Patch for landing
Comment on attachment 345154 [details] Patch for landing Clearing flags on attachment: 345154 Committed r233886: <https://trac.webkit.org/changeset/233886>
All reviewed patches have been landed. Closing bug.
<rdar://problem/42289187>