Skip to content

Commit

Permalink
Implement new effect behavior for the root element.
Browse files Browse the repository at this point in the history
Intent-to-ship approval:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/4DC56FN3paU

Changes are:
1. The background of the root element paints into the property tree
state that includes the local border box effect state of the root
element.
2. If #1 is happening, paint a separate backdrop in the ContentsProperties
state of the LayoutView, to allow effects, clips and transforms of the
root element to apply via PaintChunksToCcLayer.

Bug: 898293,988446,1029170,711955

Change-Id: I751e3f9c23d0b06a31cf1b13c3853180bc7ac7e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1979258
Commit-Queue: Chris Harrelson <[email protected]>
Reviewed-by: Xianzhu Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#733661}
  • Loading branch information
chrishtr authored and chromium-wpt-export-bot committed Jan 21, 2020
1 parent d0b1063 commit 4209d79
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 0 deletions.
7 changes: 7 additions & 0 deletions css/compositing/root-element-background-transparency-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!doctype HTML>
<title>Backround color transparency on the root element blends with a white backdrop</title>
<link rel="author" title="Chris Harrelson" href="mailto:[email protected]">
<link rel="help" href="https://drafts.fxtf.org/compositing/#pagebackdrop">
<html style="background: rgb(150, 150, 150)">
<div id=spacer style="width: 100px; height: 3000px"></div>
</html>
8 changes: 8 additions & 0 deletions css/compositing/root-element-background-transparency.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!doctype HTML>
<title>Backround color transparency on the root element blends with a white backdrop</title>
<link rel="author" title="Chris Harrelson" href="mailto:[email protected]">
<link rel="help" href="https://drafts.fxtf.org/compositing/#pagebackdrop">
<link rel="match" href="root-element-background-transparency-ref.html">
<html style="background: rgba(45, 45, 45, 0.5)">
<div id=spacer style="width: 100px; height: 3000px"></div>
</html>
6 changes: 6 additions & 0 deletions css/compositing/root-element-blend-mode-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!doctype HTML>
<title>Blend-mode on the root stacking context blends with the root element's background.</title>
<html style="background: #000">
<div style="width: 50px; height: 50px; background: #000"></div>
<div id=spacer style="width: 100px; height: 3000px"></div>
</html>
9 changes: 9 additions & 0 deletions css/compositing/root-element-blend-mode.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!doctype HTML>
<title>Blend-mode on the root stacking context blends with the root element's background.</title>
<link rel="author" title="Chris Harrelson" href="mailto:[email protected]">
<link rel="help" href="https://drafts.fxtf.org/compositing/#pagebackdrop">
<link rel="match" href="root-element-blend-mode-ref.html">
<html style="background: #000;">
<div style="width: 50px; height: 50px; background: #E33; mix-blend-mode: multiply"></div>
<div id=spacer style="width: 100px; height: 3000px"></div>
</html>
8 changes: 8 additions & 0 deletions css/compositing/root-element-filter-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!doctype HTML>
<title>A filter on the root element applies to its background</title>
<link rel="author" title="Chris Harrelson" href="mailto:[email protected]">
<link rel="help" href="https://drafts.fxtf.org/compositing/#pagebackdrop">
<html style="background: #FFF">
<div style="width: 50px; height: 50px; background: #1CC"></div>
<div id=spacer style="width: 100px; height: 3000px"></div>
</html>
9 changes: 9 additions & 0 deletions css/compositing/root-element-filter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!doctype HTML>
<title>A filter on the root element applies to its background</title>
<link rel="author" title="Chris Harrelson" href="mailto:[email protected]">
<link rel="help" href="https://drafts.fxtf.org/compositing/#pagebackdrop">
<link rel="match" href="root-element-filter-ref.html">
<html style="filter: invert(1); background: #000">
<div style="width: 50px; height: 50px; background: #E33"></div>
<div id=spacer style="width: 100px; height: 3000px"></div>
</html>
7 changes: 7 additions & 0 deletions css/compositing/root-element-opacity-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!doctype HTML>
<title>Opacity on the root element blends with a white backdrop</title>
<link rel="author" title="Chris Harrelson" href="mailto:[email protected]">
<link rel="help" href="https://drafts.fxtf.org/compositing/#pagebackdrop">
<html style="background: #DDD">
<div id=spacer style="width: 100px; height: 3000px"></div>
</html>
8 changes: 8 additions & 0 deletions css/compositing/root-element-opacity.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!doctype HTML>
<title>Opacity on the root element blends with a white background</title>
<link rel="author" title="Chris Harrelson" href="mailto:[email protected]">
<link rel="help" href="https://drafts.fxtf.org/compositing/#pagebackdrop">
<link rel="match" href="root-element-opacity-ref.html">
<html style="background: #BBB; opacity: 0.5">
<div id=spacer style="width: 100px; height: 3000px"></div>
</html>

0 comments on commit 4209d79

Please sign in to comment.