We propagate the background of body and html elements to the viewport even if they are display:none. See https://drafts.csswg.org/css-backgrounds/#special-backgrounds
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fc9423c44b942212578f34811aea56a6644efb2a commit fc9423c44b942212578f34811aea56a6644efb2a Author: Rune Lillesveen <futhark@chromium.org> Date: Tue Oct 16 15:26:17 2018 Don't propagate root/body background to viewport for display:none. According to the specification, we should not paint backgrounds for html or body on the viewport if they are display:none [1]. [1] https://drafts.csswg.org/css-backgrounds/#special-backgrounds Bug: 895757 Change-Id: Ia975022e3bfa849298667f72908a64c0d5331872 Reviewed-on: https://chromium-review.googlesource.com/c/1283134 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#599990} [add] https://crrev.com/fc9423c44b942212578f34811aea56a6644efb2a/third_party/WebKit/LayoutTests/external/wpt/css/css-backgrounds/background-color-body-propagation-004.html [add] https://crrev.com/fc9423c44b942212578f34811aea56a6644efb2a/third_party/WebKit/LayoutTests/external/wpt/css/css-backgrounds/background-color-body-propagation-005.html [add] https://crrev.com/fc9423c44b942212578f34811aea56a6644efb2a/third_party/WebKit/LayoutTests/external/wpt/css/css-backgrounds/background-color-body-propagation-006.html [add] https://crrev.com/fc9423c44b942212578f34811aea56a6644efb2a/third_party/WebKit/LayoutTests/external/wpt/css/css-backgrounds/background-color-root-propagation-001.html [add] https://crrev.com/fc9423c44b942212578f34811aea56a6644efb2a/third_party/WebKit/LayoutTests/external/wpt/css/css-backgrounds/background-color-root-propagation-002.html [delete] https://crrev.com/90690a548132c99aa327119dce3eaf5dd4f696e9/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-1-expected.png [delete] https://crrev.com/90690a548132c99aa327119dce3eaf5dd4f696e9/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-1-expected.txt [delete] https://crrev.com/90690a548132c99aa327119dce3eaf5dd4f696e9/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-1.html [delete] https://crrev.com/90690a548132c99aa327119dce3eaf5dd4f696e9/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-2-expected.html [delete] https://crrev.com/90690a548132c99aa327119dce3eaf5dd4f696e9/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-2-expected.txt [delete] https://crrev.com/90690a548132c99aa327119dce3eaf5dd4f696e9/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-2.html [modify] https://crrev.com/fc9423c44b942212578f34811aea56a6644efb2a/third_party/blink/renderer/core/dom/document.cc [modify] https://crrev.com/fc9423c44b942212578f34811aea56a6644efb2a/third_party/blink/renderer/core/dom/document.h
Comment 1 by futhark@chromium.org
, Oct 16