Title: [168446] tags/Safari-538.34/Source/WebCore

Diff

Modified: tags/Safari-538.34/Source/WebCore/ChangeLog (168445 => 168446)


--- tags/Safari-538.34/Source/WebCore/ChangeLog	2014-05-07 22:15:08 UTC (rev 168445)
+++ tags/Safari-538.34/Source/WebCore/ChangeLog	2014-05-07 22:15:30 UTC (rev 168446)
@@ -1,3 +1,29 @@
+2014-05-07  Lucas Forschler  <lforsch...@apple.com>
+
+        Merge r168440
+
+    2014-05-07  Simon Fraser  <simon.fra...@apple.com>
+
+            [iOS] Acclerated overflow-scrolling broken in WK1
+            https://bugs.webkit.org/show_bug.cgi?id=132665
+            <rdar://problem/16842909>
+
+            Reviewed by Tim Horton.
+
+            r168301 added a CALayer delegate to disable implicit animations,
+            but for some layers we wrap them in UIViews (which are themselves
+            layer delegates), so bad things happened.
+
+            Fix by falling back to setting the null actions dictionary for
+            layers with custom scrolling behavior.
+
+            * platform/graphics/GraphicsLayer.h:
+            * platform/graphics/ca/mac/PlatformCALayerMac.h:
+            * platform/graphics/ca/mac/PlatformCALayerMac.mm:
+            (PlatformCALayerMac::updateCustomBehavior):
+            * rendering/RenderLayerBacking.cpp:
+            (WebCore::RenderLayerBacking::updateScrollingLayers):
+
 2014-05-06  Dean Jackson  <d...@apple.com>
 
         Clean up the difference between painting focus rings and adding PDF annotations

Modified: tags/Safari-538.34/Source/WebCore/platform/graphics/GraphicsLayer.h (168445 => 168446)


--- tags/Safari-538.34/Source/WebCore/platform/graphics/GraphicsLayer.h	2014-05-07 22:15:08 UTC (rev 168445)
+++ tags/Safari-538.34/Source/WebCore/platform/graphics/GraphicsLayer.h	2014-05-07 22:15:30 UTC (rev 168446)
@@ -446,7 +446,7 @@
     virtual void setCustomAppearance(CustomAppearance customAppearance) { m_customAppearance = customAppearance; }
     CustomAppearance customAppearance() const { return m_customAppearance; }
 
-    enum CustomBehavior { NoCustomBehavior, CustomScrollingBehavior };
+    enum CustomBehavior { NoCustomBehavior, CustomScrollingBehavior, CustomScrolledContentsBehavior };
     virtual void setCustomBehavior(CustomBehavior customBehavior) { m_customBehavior = customBehavior; }
     CustomBehavior customBehavior() const { return m_customBehavior; }
 

Modified: tags/Safari-538.34/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h (168445 => 168446)


--- tags/Safari-538.34/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h	2014-05-07 22:15:08 UTC (rev 168445)
+++ tags/Safari-538.34/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h	2014-05-07 22:15:30 UTC (rev 168446)
@@ -141,7 +141,7 @@
     virtual void updateCustomAppearance(GraphicsLayer::CustomAppearance) override;
 
     virtual GraphicsLayer::CustomBehavior customBehavior() const override { return m_customBehavior; }
-    virtual void updateCustomBehavior(GraphicsLayer::CustomBehavior customBehavior) override { m_customBehavior = customBehavior; }
+    virtual void updateCustomBehavior(GraphicsLayer::CustomBehavior) override;
 
     virtual TiledBacking* tiledBacking() override;
 

Modified: tags/Safari-538.34/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm (168445 => 168446)


--- tags/Safari-538.34/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm	2014-05-07 22:15:08 UTC (rev 168445)
+++ tags/Safari-538.34/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm	2014-05-07 22:15:30 UTC (rev 168446)
@@ -764,6 +764,19 @@
 #endif
 }
 
+void PlatformCALayerMac::updateCustomBehavior(GraphicsLayer::CustomBehavior customBehavior)
+{
+    m_customBehavior = customBehavior;
+
+    // Custom layers can get wrapped in UIViews (which clobbers the layer delegate),
+    // so fall back to the slower way of disabling implicit animations.
+    if (m_customBehavior != GraphicsLayer::NoCustomBehavior) {
+        if ([[m_layer delegate] isKindOfClass:[WebActionDisablingCALayerDelegate class]])
+            [m_layer setDelegate:nil];
+        [m_layer web_disableAllActions];
+    }
+}
+
 TiledBacking* PlatformCALayerMac::tiledBacking()
 {
     if (!usesTiledBackingLayer())

Modified: tags/Safari-538.34/Source/WebCore/rendering/RenderLayerBacking.cpp (168445 => 168446)


--- tags/Safari-538.34/Source/WebCore/rendering/RenderLayerBacking.cpp	2014-05-07 22:15:08 UTC (rev 168445)
+++ tags/Safari-538.34/Source/WebCore/rendering/RenderLayerBacking.cpp	2014-05-07 22:15:30 UTC (rev 168446)
@@ -1427,6 +1427,9 @@
         // Inner layer which renders the content that scrolls.
         m_scrollingContentsLayer = createGraphicsLayer("Scrolled Contents");
         m_scrollingContentsLayer->setDrawsContent(true);
+#if PLATFORM(IOS)
+        m_scrollingContentsLayer->setCustomBehavior(GraphicsLayer::CustomScrolledContentsBehavior);
+#endif
         GraphicsLayerPaintingPhase paintPhase = GraphicsLayerPaintOverflowContents | GraphicsLayerPaintCompositedScroll;
         if (!m_foregroundLayer)
             paintPhase |= GraphicsLayerPaintForeground;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to