Title: [268548] trunk/Source/WebCore
Revision
268548
Author
[email protected]
Date
2020-10-15 12:55:00 -0700 (Thu, 15 Oct 2020)

Log Message

[WinCairo][GraphicsLayerTextureMapper] css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-remove.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=217746

Reviewed by Don Olmstead.

If replica layers is removed, replicaLayer() and can be null in
commitLayerChanges(). Null checking is needed.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges): Added null checking for maskLayer() and replicaLayer().

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (268547 => 268548)


--- trunk/Source/WebCore/ChangeLog	2020-10-15 19:49:00 UTC (rev 268547)
+++ trunk/Source/WebCore/ChangeLog	2020-10-15 19:55:00 UTC (rev 268548)
@@ -1,3 +1,16 @@
+2020-10-15  Fujii Hironori  <[email protected]>
+
+        [WinCairo][GraphicsLayerTextureMapper] css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-remove.html is crashing
+        https://bugs.webkit.org/show_bug.cgi?id=217746
+
+        Reviewed by Don Olmstead.
+
+        If replica layers is removed, replicaLayer() and can be null in
+        commitLayerChanges(). Null checking is needed.
+
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+        (WebCore::GraphicsLayerTextureMapper::commitLayerChanges): Added null checking for maskLayer() and replicaLayer().
+
 2020-10-15  Antoine Quint  <[email protected]>
 
         Updating an individual transform CSS property has no visual change when composited

Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (268547 => 268548)


--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp	2020-10-15 19:49:00 UTC (rev 268547)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp	2020-10-15 19:55:00 UTC (rev 268548)
@@ -410,11 +410,15 @@
         m_layer.setChildren(rawChildren);
     }
 
-    if (m_changeMask & MaskLayerChange)
-        m_layer.setMaskLayer(&downcast<GraphicsLayerTextureMapper>(maskLayer())->layer());
+    if (m_changeMask & MaskLayerChange) {
+        auto* layer = downcast<GraphicsLayerTextureMapper>(maskLayer());
+        m_layer.setMaskLayer(layer ? &layer->layer() : nullptr);
+    }
 
-    if (m_changeMask & ReplicaLayerChange)
-        m_layer.setReplicaLayer(&downcast<GraphicsLayerTextureMapper>(replicaLayer())->layer());
+    if (m_changeMask & ReplicaLayerChange) {
+        auto* layer = downcast<GraphicsLayerTextureMapper>(replicaLayer());
+        m_layer.setReplicaLayer(layer ? &layer->layer() : nullptr);
+    }
 
     if (m_changeMask & BackdropLayerChange) {
         if (needsBackdrop()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to