Title: [168440] trunk/Source/WebCore
- Revision
- 168440
- Author
- simon.fra...@apple.com
- Date
- 2014-05-07 14:49:10 -0700 (Wed, 07 May 2014)
Log Message
[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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (168439 => 168440)
--- trunk/Source/WebCore/ChangeLog 2014-05-07 21:19:03 UTC (rev 168439)
+++ trunk/Source/WebCore/ChangeLog 2014-05-07 21:49:10 UTC (rev 168440)
@@ -1,3 +1,25 @@
+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-07 Jeremy Jones <jere...@apple.com>
HTMLMediaElement should exitFullscreen when view is removed from the window.
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (168439 => 168440)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2014-05-07 21:19:03 UTC (rev 168439)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2014-05-07 21:49:10 UTC (rev 168440)
@@ -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: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h (168439 => 168440)
--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h 2014-05-07 21:19:03 UTC (rev 168439)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h 2014-05-07 21:49:10 UTC (rev 168440)
@@ -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: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm (168439 => 168440)
--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm 2014-05-07 21:19:03 UTC (rev 168439)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm 2014-05-07 21:49:10 UTC (rev 168440)
@@ -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: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (168439 => 168440)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2014-05-07 21:19:03 UTC (rev 168439)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2014-05-07 21:49:10 UTC (rev 168440)
@@ -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