This is a edge case, covered by the following test: http://w3c-test.org/cssom-view/cssom-getBoundingClientRect-002.html https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect "Let list be the result of invoking getClientRects() on the same element this method was invoked on. If the list is empty return a DOMRect object whose x, y, width and height members are zero." https://drafts.csswg.org/cssom-view/#dom-element-getclientrects "If the element on which it was invoked does not have an associated layout box return an empty sequence and stop this algorithm."
I suspect the issue is rather that we return a ClientRect instead of a DOMRect. So does Chrome it seems. Firefox seems to behave as per spec though.
Created attachment 308332 [details] WIP Patch
Attachment 308332 [details] did not pass style-queue: ERROR: Source/WebCore/dom/Element.cpp:1149: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
@Frédéric Wang: In the future, it would be nicer to land baselines with FAIL lines rather than skipping the tests.
Created attachment 308338 [details] Patch
Created attachment 308341 [details] Patch
Created attachment 308343 [details] Patch
(In reply to Chris Dumez from comment #4) > @Frédéric Wang: In the future, it would be nicer to land baselines with FAIL > lines rather than skipping the tests. Thanks for the information, I'll do that in the future.
Created attachment 308344 [details] Patch
Created attachment 308346 [details] Patch
Comment on attachment 308346 [details] Patch Attachment 308346 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3617158 New failing tests: media/track/track-cue-overlap-snap-to-lines-not-set.html
Created attachment 308353 [details] Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 308346 [details] Patch Attachment 308346 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3617230 New failing tests: media/track/track-cue-overlap-snap-to-lines-not-set.html
Created attachment 308356 [details] Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 308346 [details] Patch Attachment 308346 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3617248 New failing tests: media/track/track-cue-overlap-snap-to-lines-not-set.html
Created attachment 308359 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 308346 [details] Patch Attachment 308346 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3617247 New failing tests: media/track/track-cue-overlap-snap-to-lines-not-set.html fast/dom/collection-iterators.html fast/visual-viewport/zoomed-fixed.html fast/visual-viewport/zoomed-fixed-header-and-footer.html
Created attachment 308362 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Created attachment 308393 [details] Patch
Created attachment 308405 [details] Patch
Comment on attachment 308405 [details] Patch Attachment 308405 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3620755 New failing tests: fast/visual-viewport/zoomed-fixed.html
Created attachment 308419 [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.11.6
Created attachment 308422 [details] Patch
Comment on attachment 308422 [details] Patch Clearing flags on attachment: 308422 Committed r215892: <http://trac.webkit.org/changeset/215892>
All reviewed patches have been landed. Closing bug.