Title: [198963] trunk
- Revision
- 198963
- Author
- [email protected]
- Date
- 2016-04-01 17:19:32 -0700 (Fri, 01 Apr 2016)
Log Message
Backdrop Filter should repaint when changed via script
https://bugs.webkit.org/show_bug.cgi?id=149319
rdar://problem/22749892
Reviewed by Tim Horton.
Source/WebCore:
When backdrop filters change, we need to trigger a recomposite, just as we do
for filters. It's ok to re-use ContextSensitivePropertyFilter because
adjustStyleDifference() does the right thing.
Test: css3/filters/backdrop/dynamic-backdrop-filter-change.html
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayerRepaint):
LayoutTests:
* css3/filters/backdrop/dynamic-backdrop-filter-change-expected.html: Added.
* css3/filters/backdrop/dynamic-backdrop-filter-change.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (198962 => 198963)
--- trunk/LayoutTests/ChangeLog 2016-04-02 00:09:07 UTC (rev 198962)
+++ trunk/LayoutTests/ChangeLog 2016-04-02 00:19:32 UTC (rev 198963)
@@ -1,3 +1,14 @@
+2016-04-01 Simon Fraser <[email protected]>
+
+ Backdrop Filter should repaint when changed via script
+ https://bugs.webkit.org/show_bug.cgi?id=149319
+ rdar://problem/22749892
+
+ Reviewed by Tim Horton.
+
+ * css3/filters/backdrop/dynamic-backdrop-filter-change-expected.html: Added.
+ * css3/filters/backdrop/dynamic-backdrop-filter-change.html: Added.
+
2016-03-31 Zalan Bujtas <[email protected]>
putImageData leaves visible artifacts on retina display
Added: trunk/LayoutTests/css3/filters/backdrop/dynamic-backdrop-filter-change-expected.html (0 => 198963)
--- trunk/LayoutTests/css3/filters/backdrop/dynamic-backdrop-filter-change-expected.html (rev 0)
+++ trunk/LayoutTests/css3/filters/backdrop/dynamic-backdrop-filter-change-expected.html 2016-04-02 00:19:32 UTC (rev 198963)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .background {
+ height: 100px;
+ width: 100px;
+ padding: 50px;
+ background-image: repeating-linear-gradient(black 0px, black 25px, white 25px, white 50px);
+ border: 1px solid black;
+ }
+
+ #box {
+ height: 100px;
+ width: 100px;
+ -webkit-backdrop-filter: blur(20px);
+ }
+ </style>
+</head>
+<body>
+<div class="background">
+ <div id="box">
+ </div>
+</div>
+</body>
+</html>
Added: trunk/LayoutTests/css3/filters/backdrop/dynamic-backdrop-filter-change.html (0 => 198963)
--- trunk/LayoutTests/css3/filters/backdrop/dynamic-backdrop-filter-change.html (rev 0)
+++ trunk/LayoutTests/css3/filters/backdrop/dynamic-backdrop-filter-change.html 2016-04-02 00:19:32 UTC (rev 198963)
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .background {
+ height: 100px;
+ width: 100px;
+ padding: 50px;
+ background-image: repeating-linear-gradient(black 0px, black 25px, white 25px, white 50px);
+ border: 1px solid black;
+ }
+
+ #box {
+ height: 100px;
+ width: 100px;
+ -webkit-backdrop-filter: blur(0px);
+ }
+
+ #box.changed {
+ -webkit-backdrop-filter: blur(20px);
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.notifyDone();
+
+ window.addEventListener('load', function() {
+ window.setTimeout(function() {
+ document.getElementById('box').classList.add('changed');
+ }, 0);
+ }, false);
+ </script>
+</head>
+<body>
+<div class="background">
+ <div id="box">
+ </div>
+</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (198962 => 198963)
--- trunk/Source/WebCore/ChangeLog 2016-04-02 00:09:07 UTC (rev 198962)
+++ trunk/Source/WebCore/ChangeLog 2016-04-02 00:19:32 UTC (rev 198963)
@@ -1,3 +1,20 @@
+2016-04-01 Simon Fraser <[email protected]>
+
+ Backdrop Filter should repaint when changed via script
+ https://bugs.webkit.org/show_bug.cgi?id=149319
+ rdar://problem/22749892
+
+ Reviewed by Tim Horton.
+
+ When backdrop filters change, we need to trigger a recomposite, just as we do
+ for filters. It's ok to re-use ContextSensitivePropertyFilter because
+ adjustStyleDifference() does the right thing.
+
+ Test: css3/filters/backdrop/dynamic-backdrop-filter-change.html
+
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::changeRequiresLayerRepaint):
+
2016-03-31 Zalan Bujtas <[email protected]>
putImageData leaves visible artifacts on retina display
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (198962 => 198963)
--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2016-04-02 00:09:07 UTC (rev 198962)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2016-04-02 00:19:32 UTC (rev 198963)
@@ -789,6 +789,13 @@
// Don't return; keep looking for another change.
}
+#if ENABLE(FILTERS_LEVEL_2)
+ if (rareNonInheritedData->m_backdropFilter != other.rareNonInheritedData->m_backdropFilter) {
+ changedContextSensitiveProperties |= ContextSensitivePropertyFilter;
+ // Don't return; keep looking for another change.
+ }
+#endif
+
if (rareNonInheritedData->m_mask != other.rareNonInheritedData->m_mask
|| rareNonInheritedData->m_maskBoxImage != other.rareNonInheritedData->m_maskBoxImage)
return true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes