From 9cbb145a9156ea8eaf25a07c7cc8280c98a732db Mon Sep 17 00:00:00 2001 From: Rune Lillesveen Date: Tue, 8 Jun 2021 04:19:20 -0700 Subject: [PATCH] Do not propagate body styles when html root or body is contained Per resolution in [1]. Added behind a flag since this is a web facing change which needs an intent to ship. [1] https://github.com/w3c/csswg-drafts/issues/5913 Bug: 1215265 Change-Id: I50f142245cdb55b422f8a6f3d9690444bf3648aa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2897247 Reviewed-by: Anders Hartvoll Ruud Commit-Queue: Rune Lillesveen Cr-Commit-Position: refs/heads/master@{#890175} --- .../background-color-body-propagation-008.html | 10 ++++++++++ .../overflow-body-propagation-011-ref.html | 4 ++++ .../overflow-body-propagation-011.html | 14 ++++++++++++++ ...irection-propagation-body-contain-root-ref.html | 4 ++++ .../direction-propagation-body-contain-root.html | 13 +++++++++++++ .../wm-propagation-body-contain-root-ref.html | 4 ++++ .../wm-propagation-body-contain-root.html | 10 ++++++++++ 7 files changed, 59 insertions(+) create mode 100644 css/css-backgrounds/background-color-body-propagation-008.html create mode 100644 css/css-overflow/overflow-body-propagation-011-ref.html create mode 100644 css/css-overflow/overflow-body-propagation-011.html create mode 100644 css/css-writing-modes/direction-propagation-body-contain-root-ref.html create mode 100644 css/css-writing-modes/direction-propagation-body-contain-root.html create mode 100644 css/css-writing-modes/wm-propagation-body-contain-root-ref.html create mode 100644 css/css-writing-modes/wm-propagation-body-contain-root.html diff --git a/css/css-backgrounds/background-color-body-propagation-008.html b/css/css-backgrounds/background-color-body-propagation-008.html new file mode 100644 index 00000000000000..7e53211fe57005 --- /dev/null +++ b/css/css-backgrounds/background-color-body-propagation-008.html @@ -0,0 +1,10 @@ + + +CSS Backgrounds and Borders Test: Do not propagate body background when html root is contained + + + + diff --git a/css/css-overflow/overflow-body-propagation-011-ref.html b/css/css-overflow/overflow-body-propagation-011-ref.html new file mode 100644 index 00000000000000..0d440ef20afa3d --- /dev/null +++ b/css/css-overflow/overflow-body-propagation-011-ref.html @@ -0,0 +1,4 @@ + + +CSS Test Reference +
PASS if BODY has scrollbars, but not viewport.
diff --git a/css/css-overflow/overflow-body-propagation-011.html b/css/css-overflow/overflow-body-propagation-011.html new file mode 100644 index 00000000000000..c8672c2af2e44e --- /dev/null +++ b/css/css-overflow/overflow-body-propagation-011.html @@ -0,0 +1,14 @@ + + +CSS Test: HTML root containment stops overflow propagation from BODY + + + +PASS if BODY has scrollbars, but not viewport. diff --git a/css/css-writing-modes/direction-propagation-body-contain-root-ref.html b/css/css-writing-modes/direction-propagation-body-contain-root-ref.html new file mode 100644 index 00000000000000..4371a0d8762809 --- /dev/null +++ b/css/css-writing-modes/direction-propagation-body-contain-root-ref.html @@ -0,0 +1,4 @@ + + +CSS Test Reference +This text should be left aligned. diff --git a/css/css-writing-modes/direction-propagation-body-contain-root.html b/css/css-writing-modes/direction-propagation-body-contain-root.html new file mode 100644 index 00000000000000..2e4325d5002e8d --- /dev/null +++ b/css/css-writing-modes/direction-propagation-body-contain-root.html @@ -0,0 +1,13 @@ + + +CSS Writing Modes Test: Do not propagate direction from body when html root is contained + + + + + diff --git a/css/css-writing-modes/wm-propagation-body-contain-root-ref.html b/css/css-writing-modes/wm-propagation-body-contain-root-ref.html new file mode 100644 index 00000000000000..150eba8bc932df --- /dev/null +++ b/css/css-writing-modes/wm-propagation-body-contain-root-ref.html @@ -0,0 +1,4 @@ + + +CSS Test Reference +
This text should run vertically on the left side diff --git a/css/css-writing-modes/wm-propagation-body-contain-root.html b/css/css-writing-modes/wm-propagation-body-contain-root.html new file mode 100644 index 00000000000000..af743ef017ac7f --- /dev/null +++ b/css/css-writing-modes/wm-propagation-body-contain-root.html @@ -0,0 +1,10 @@ + + +CSS Writing Modes Test: Do not propagate writing-mode from body when html root is contained + + + +This text should run vertically on the left side