Created attachment 370170 [details] test page to reproduce the issue Open the attached .html file and go to console, the discrepancy is logged. When using intersection observe on an inline element, the bounding client rect reported by intersection observer is different from calling element.getBoundingClientRect(). Open the same file using FireFox can confirm the bug.
<rdar://problem/50910959>
Created attachment 370337 [details] Patch
Comment on attachment 370337 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=370337&action=review > Source/WebCore/ChangeLog:9 > + Make target rect computation for inline elements equivalent to the logic used > + when computing bounding client rects. Can the code be shared?
Created attachment 370396 [details] Patch
(In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 370337 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=370337&action=review > > > Source/WebCore/ChangeLog:9 > > + Make target rect computation for inline elements equivalent to the logic used > > + when computing bounding client rects. > > Can the code be shared? Done.
Comment on attachment 370396 [details] Patch Attachment 370396 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/12257543 Number of test failures exceeded the failure limit.
Created attachment 370402 [details] Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 370396 [details] Patch Attachment 370396 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/12257641 Number of test failures exceeded the failure limit.
Created attachment 370403 [details] Archive of layout-test-results from ews107 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 370396 [details] Patch Attachment 370396 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/12257608 Number of test failures exceeded the failure limit.
Created attachment 370405 [details] Archive of layout-test-results from ews113 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 370396 [details] Patch Attachment 370396 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/12257703 Number of test failures exceeded the failure limit.
Created attachment 370411 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.14.5
Comment on attachment 370396 [details] Patch Attachment 370396 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/12257735 New failing tests: fast/events/constructors/track-event-constructor.html fast/multicol/fix-inherit-when-container-is-replaced.html jquery/offset.html accessibility/aria-hidden-hides-all-elements.html http/tests/security/contentSecurityPolicy/track-redirect-allowed.html http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track.html fast/forms/input-user-modify.html fast/css/display-contents-to-none.html fast/css/empty-display-none-invalidation.html fast/forms/access-key.html fast/dom/HTMLSelectElement/listbox-items-client-rects.html imported/blink/fast/css/first-letter-associated-text-node-crash.html http/tests/security/contentSecurityPolicy/track-redirect-allowed2.html http/tests/security/contentSecurityPolicy/media-src-track-block.html http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html http/tests/security/contentSecurityPolicy/track-redirect-blocked.html
Created attachment 370413 [details] Archive of layout-test-results from ews215 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews215 Port: win-future Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Created attachment 370420 [details] Patch for landing
(In reply to Ali Juma from comment #16) > Created attachment 370420 [details] > Patch for landing To maintain the existing behavior of getBoundingClientRect (and fix the crashes from the last patch), made the new boundingAbsoluteRectWithoutLayout method return an optional pair of RenderObject* and FloatRect, so that getBoundingClientRect can still early-return when the set of absolute quads is empty, and can use the right renderer's style when converting from absolute space to client space.
Comment on attachment 370420 [details] Patch for landing Clearing flags on attachment: 370420 Committed r245642: <https://trac.webkit.org/changeset/245642>
All reviewed patches have been landed. Closing bug.