mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 04:26:32 +08:00
When DevTools is docked, the document containing DevTools spans the whole content of the browser tab which includes not only DevTools but also the inspected site. This means that using the bounds of the `window` or `document.body` objects as DevTools dimensions could be incorrect. For this reason, this CL implements a service that can be used to obtain the effective dimensions of DevTools regardless of its position (docked or undocked). This is done by accessing the element wrapped by the InspectorView singleton. Bug: 1269206 Change-Id: Ia2a1aeb4a28ce0ff1a4d7579ea2f94bd6fff99bf Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3296082 Commit-Queue: Andres Olivares <andoli@chromium.org> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>