From e501d4a3c7fd809ed71aabd3dc124e3a9ebb9900 Mon Sep 17 00:00:00 2001 From: Klaus Weidner Date: Thu, 12 Mar 2020 01:24:48 +0000 Subject: [PATCH] Add "contain: paint" to XR DOM Overlay UA style As suggested in https://github.com/immersive-web/dom-overlays/issues/20#issuecomment-596816355 This ensures that top layer elements act as a containing block for "position: fixed" descendants. Bug: 1060731 Change-Id: Id5bedac6ecde75a11d83442c025c0bd1da4e1cc2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2098178 Reviewed-by: Chris Harrelson Commit-Queue: Klaus Weidner Cr-Commit-Position: refs/heads/master@{#749458} --- third_party/blink/renderer/core/css/webxr_overlay.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/third_party/blink/renderer/core/css/webxr_overlay.css b/third_party/blink/renderer/core/css/webxr_overlay.css index 64b33b11020c8b..d4f65fb76e1c6c 100644 --- a/third_party/blink/renderer/core/css/webxr_overlay.css +++ b/third_party/blink/renderer/core/css/webxr_overlay.css @@ -2,6 +2,9 @@ /* force a transparent background */ background: rgba(0,0,0,0) !important; + /* act as containing block for descendants */ + contain: paint !important; + /* the following styling is identical to :fullscreen */ position: fixed !important; top: 0 !important;