Diff
Modified: trunk/LayoutTests/ChangeLog (201348 => 201349)
--- trunk/LayoutTests/ChangeLog 2016-05-24 21:01:10 UTC (rev 201348)
+++ trunk/LayoutTests/ChangeLog 2016-05-24 21:02:13 UTC (rev 201349)
@@ -1,3 +1,20 @@
+2016-05-24 Antoine Quint <grao...@apple.com>
+
+ Elements with backdrop-filter cannot be clipped with clip-path or mask
+ https://bugs.webkit.org/show_bug.cgi?id=142662
+ <rdar://problem/20150192>
+
+ Reviewed by Dean Jackson.
+
+ New test that checks that applying a backdrop-filter and a clip-path on a single
+ element has the same effect as applying a clip-path on a parent of a child with
+ a backdrop-filter.
+
+ * css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt: Added.
+ * css3/filters/backdrop/backdrop-filter-with-clip-path.html: Added.
+ * platform/ios-simulator/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html: Added.
+ * platform/mac/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.png: Added.
+
2016-05-24 Adam Bergkvist <adam.bergkv...@ericsson.com>
WebRTC: Update failing RTCPeerConnection and RTCRtpSender tests
Added: trunk/LayoutTests/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt (0 => 201349)
--- trunk/LayoutTests/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt 2016-05-24 21:02:13 UTC (rev 201349)
@@ -0,0 +1,30 @@
+CONSOLE MESSAGE: line 4: Viewport argument value "200px" for key "width" was truncated to its numeric prefix.
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x8
+ RenderBlock {HTML} at (0,0) size 800x8
+ RenderBody {BODY} at (8,8) size 784x0
+layer at (8,8) size 200x200 scrollHeight 342
+ RenderBlock (positioned) {DIV} at (8,8) size 200x200
+ RenderText {#text} at (0,0) size 198x342
+ text run at (0,0) width 182: "Lorem ipsum dolor sit amet,"
+ text run at (0,18) width 172: "consectetur adipiscing elit."
+ text run at (0,36) width 175: "Vestibulum a nunc ultrices,"
+ text run at (0,54) width 176: "faucibus ligula ac, euismod"
+ text run at (0,72) width 160: "elit. Ut in vehicula enim."
+ text run at (0,90) width 174: "Suspendisse sodales auctor"
+ text run at (0,108) width 180: "nunc, sit amet vehicula velit"
+ text run at (0,126) width 173: "cursus vulputate. Nunc sed"
+ text run at (0,144) width 172: "ipsum vitae massa dapibus"
+ text run at (0,162) width 161: "sodales sit amet quis dui."
+ text run at (0,180) width 165: "Aenean sit amet interdum"
+ text run at (0,198) width 172: "arcu, et facilisis diam. Ut a"
+ text run at (0,216) width 180: "lacus eleifend, feugiat tellus"
+ text run at (0,234) width 167: "vel, molestie lorem. Nulla"
+ text run at (0,252) width 161: "pulvinar dapibus semper."
+ text run at (0,270) width 172: "Quisque mollis, neque non"
+ text run at (0,288) width 198: "luctus aliquam, ex risus lacinia"
+ text run at (0,306) width 192: "augue, vel eleifend augue erat"
+ text run at (0,324) width 62: "eget ante."
+layer at (50,50) size 100x100
+ RenderBlock (positioned) {DIV} at (50,50) size 100x100 [bgcolor=#FF00007F]
Added: trunk/LayoutTests/css3/filters/backdrop/backdrop-filter-with-clip-path.html (0 => 201349)
--- trunk/LayoutTests/css3/filters/backdrop/backdrop-filter-with-clip-path.html (rev 0)
+++ trunk/LayoutTests/css3/filters/backdrop/backdrop-filter-with-clip-path.html 2016-05-24 21:02:13 UTC (rev 201349)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=200px">
+<title>This tests that backdrop filter with clip-path works properly.</title>
+<style>
+#text {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ overflow: hidden;
+}
+#blur {
+ position: absolute;
+ left: 50px;
+ top: 50px;
+ width: 100px;
+ height: 100px;
+
+ background-color: rgba(255, 0, 0, 0.5);
+ -webkit-backdrop-filter: blur(2px);
+ -webkit-clip-path: inset(10px);
+}
+</style>
+</head>
+<body>
+<div id="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum a nunc ultrices, faucibus ligula ac, euismod elit. Ut in vehicula enim. Suspendisse sodales auctor nunc, sit amet vehicula velit cursus vulputate. Nunc sed ipsum vitae massa dapibus sodales sit amet quis dui. Aenean sit amet interdum arcu, et facilisis diam. Ut a lacus eleifend, feugiat tellus vel, molestie lorem. Nulla pulvinar dapibus semper. Quisque mollis, neque non luctus aliquam, ex risus lacinia augue, vel eleifend augue erat eget ante.
+</div>
+<div id="blur"></div>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/platform/ios-simulator/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html (0 => 201349)
--- trunk/LayoutTests/platform/ios-simulator/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html 2016-05-24 21:02:13 UTC (rev 201349)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=200px">
+<title>This tests that backdrop filter with clip-path works properly.</title>
+<style>
+#text {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ overflow: hidden;
+}
+#blur {
+ position: absolute;
+ left: 60px;
+ top: 60px;
+ width: 80px;
+ height: 80px;
+
+ background-color: rgba(255, 0, 0, 0.5);
+ -webkit-backdrop-filter: blur(2px);
+}
+</style>
+</head>
+<body>
+<div id="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum a nunc ultrices, faucibus ligula ac, euismod elit. Ut in vehicula enim. Suspendisse sodales auctor nunc, sit amet vehicula velit cursus vulputate. Nunc sed ipsum vitae massa dapibus sodales sit amet quis dui. Aenean sit amet interdum arcu, et facilisis diam. Ut a lacus eleifend, feugiat tellus vel, molestie lorem. Nulla pulvinar dapibus semper. Quisque mollis, neque non luctus aliquam, ex risus lacinia augue, vel eleifend augue erat eget ante.
+</div>
+<div id="blur"></div>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/platform/mac/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.png
___________________________________________________________________
Added: svn:mime-type
Modified: trunk/Source/WebCore/ChangeLog (201348 => 201349)
--- trunk/Source/WebCore/ChangeLog 2016-05-24 21:01:10 UTC (rev 201348)
+++ trunk/Source/WebCore/ChangeLog 2016-05-24 21:02:13 UTC (rev 201349)
@@ -1,3 +1,25 @@
+2016-05-24 Antoine Quint <grao...@apple.com>
+
+ Elements with backdrop-filter cannot be clipped with clip-path or mask
+ https://bugs.webkit.org/show_bug.cgi?id=142662
+ <rdar://problem/20150192>
+
+ Reviewed by Dean Jackson.
+
+ We used to only apply the mask to the layer contents but did not account
+ for the fact that a layer backdrop may exist. We now correctly mask the
+ backdrop layer as well as the layer contents.
+
+ Test: css3/filters/backdrop/backdrop-filter-with-clip-path.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::updateShape):
+ Ensure clones of a layer use the same shape path.
+
+ (WebCore::GraphicsLayerCA::updateMaskLayer):
+ If we have a backdrop layer, ensure that we apply a clone of the mask layer applied to
+ the layer contents.
+
2016-05-24 Zalan Bujtas <za...@apple.com>
fast/table/neighboring-cells-when-collapsed-border-changes.html is flaky.
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (201348 => 201349)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2016-05-24 21:01:10 UTC (rev 201348)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2016-05-24 21:02:13 UTC (rev 201349)
@@ -1979,6 +1979,11 @@
void GraphicsLayerCA::updateShape()
{
m_layer->setShapePath(m_shapeLayerPath);
+
+ if (LayerMap* layerCloneMap = primaryLayerClones()) {
+ for (auto& layer : layerCloneMap->values())
+ layer->setShapePath(m_shapeLayerPath);
+ }
}
void GraphicsLayerCA::updateWindRule()
@@ -2455,6 +2460,15 @@
PlatformCALayer* maskCALayer = m_maskLayer ? downcast<GraphicsLayerCA>(*m_maskLayer).primaryLayer() : nullptr;
m_layer->setMask(maskCALayer);
+ if (m_backdropLayer) {
+ if (m_maskLayer) {
+ ReplicaState replicaState(ReplicaState::ChildBranch);
+ RefPtr<PlatformCALayer> maskClone = downcast<GraphicsLayerCA>(*m_maskLayer).fetchCloneLayers(this, replicaState, IntermediateCloneLevel);
+ m_backdropLayer->setMask(maskClone.get());
+ } else
+ m_backdropLayer->setMask(nullptr);
+ }
+
LayerMap* maskLayerCloneMap = m_maskLayer ? downcast<GraphicsLayerCA>(*m_maskLayer).primaryLayerClones() : nullptr;
if (LayerMap* layerCloneMap = m_layerClones.get()) {
Modified: trunk/Source/WebKit2/ChangeLog (201348 => 201349)
--- trunk/Source/WebKit2/ChangeLog 2016-05-24 21:01:10 UTC (rev 201348)
+++ trunk/Source/WebKit2/ChangeLog 2016-05-24 21:02:13 UTC (rev 201349)
@@ -1,3 +1,16 @@
+2016-05-24 Antoine Quint <grao...@apple.com>
+
+ Elements with backdrop-filter cannot be clipped with clip-path or mask
+ https://bugs.webkit.org/show_bug.cgi?id=142662
+ <rdar://problem/20150192>
+
+ Reviewed by Dean Jackson.
+
+ Ensure layer clones are set up with the same shape path as their original layer.
+
+ * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+ (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
+
2016-05-24 Chelsea Pugh <cp...@apple.com>
[iOS] Allow clients to override the type of an input field
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp (201348 => 201349)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp 2016-05-24 21:01:10 UTC (rev 201348)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp 2016-05-24 21:02:13 UTC (rev 201349)
@@ -133,6 +133,7 @@
clone.setBackgroundColor(backgroundColor());
clone.setContentsScale(contentsScale());
clone.setCornerRadius(cornerRadius());
+ clone.setShapePath(shapePath());
if (m_properties.shapeRoundedRect)
clone.setShapeRoundedRect(*m_properties.shapeRoundedRect);