[CompositeAfterPaint] Don't fragment composited scrollers
Fragmenting composited scrollers caused multiple scroll nodes and
layers with the same element id which confused cc.
To prevent fragmentation of composited scrollers, use the same
pre-CAP method for directly composited layers.
This CL is not needed for LayoutNGBlockFragmentation.
Bug: 1226298
Change-Id: Ib3a3c50aacaa6367114e97ecbccfb641f0558261
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3017415
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#900164}
diff --git a/css/css-multicol/multicol-scroll-content-ref.html b/css/css-multicol/multicol-scroll-content-ref.html
new file mode 100644
index 0000000..320e425
--- /dev/null
+++ b/css/css-multicol/multicol-scroll-content-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<div style="overflow: scroll; width: 100px; height: 150px; background: green">
+ <div style="width: 400px; height: 400px"></div>
+</div>
+<div style="overflow: scroll; width: 100px; height: 150px;
+ position: relative; top: -50px; left: 100px; background: green">
+ <div style="width: 400px; height: 400px"></div>
+</div>
diff --git a/css/css-multicol/multicol-scroll-content.html b/css/css-multicol/multicol-scroll-content.html
new file mode 100644
index 0000000..9fdaf1a
--- /dev/null
+++ b/css/css-multicol/multicol-scroll-content.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<title>CSS Test: Multi-column element with scrolled content</title>
+<link rel="help" href="http://www.w3.org/TR/css3-multicol/#columns"/>
+<link rel="match" href="multicol-scroll-content-ref.html"/>
+<div style="columns: 2; width: 200px; height: 100px; column-gap: 0">
+ <div style="overflow: scroll; height: 150px; background: red">
+ <div style="width: 400px; height: 400px; background: green; position: relative"></div>
+ </div>
+</div>
+<div style="columns: 2; width: 200px; height: 100px; column-gap: 0">
+ <div style="height: 100px"></div>
+ <div style="overflow: scroll; height: 150px; background: red">
+ <div style="width: 400px; height: 400px; background: green; position: relative"></div>
+ </div>
+</div>