WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-171974-20170511183211.patch (text/plain), 5.30 KB, created by
Frédéric Wang Nélar
on 2017-05-11 09:32:13 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang Nélar
Created:
2017-05-11 09:32:13 PDT
Size:
5.30 KB
patch
obsolete
>Subversion Revision: 216652 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 925180e99d13a1a29a34e06ace3430b7bbb28bf6..27dce769c730e3a3af507a8ac71731b73f29fcfd 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,28 @@ >+2017-05-11 Frederic Wang <fwang@igalia.com> >+ >+ Unify hasTouchScrollableOverflow/needsCompositedScrolling concepts >+ https://bugs.webkit.org/show_bug.cgi?id=171974 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This commit moves the following pattern in a single RenderLayer::useCoordinatedScrolling function: >+ #if PLATFORM(IOS) >+ ...hasTouchScrollableOverflow()... >+ #else >+ ...needsCompositedScrolling()... >+ #endif >+ >+ No new tests, behavior unchanged. >+ >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::useCoordinatedScrolling): Introduce helper function. >+ * rendering/RenderLayer.h: Declare the function. >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling): Use the new function. >+ (WebCore::RenderLayerBacking::updateConfiguration): Ditto. >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::useCoordinatedScrollingForLayer): Ditto. >+ > 2017-05-10 Eric Carlson <eric.carlson@apple.com> > > [MediaStream] CoreAudioCaptureSource claims to never be muted >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index 023825292e3c433bbc6ad9519c3f6ad64b3b7362..8f9c806ba50dd1123f8b6b4d5ff3e911fd48683a 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -2188,6 +2188,15 @@ bool RenderLayer::handleTouchEvent(const PlatformTouchEvent& touchEvent) > #endif > #endif // PLATFORM(IOS) > >+bool RenderLayer::useCoordinatedScrolling() const >+{ >+#if PLATFORM(IOS) >+ return hasTouchScrollableOverflow(); >+#else >+ return needsCompositedScrolling(); >+#endif >+} >+ > #if ENABLE(IOS_TOUCH_EVENTS) > void RenderLayer::registerAsTouchEventListenerForScrolling() > { >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index b9e5e3ee20f1f31dcad2fcc7007e157679cf6f1e..ec5733f868beac26b4ec131c29ac9fbe6102bfee 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -265,6 +265,7 @@ public: > bool hasAcceleratedTouchScrolling() const { return false; } > bool hasTouchScrollableOverflow() const { return false; } > #endif >+ bool useCoordinatedScrolling() const; > > int verticalScrollbarWidth(OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const; > int horizontalScrollbarHeight(OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const; >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index 13c423de4246df7a3acc1fda9550c7c00384a5cc..bc8f9baaa9e2cd2815b38f68f4d9c2f20c15ba48 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -546,17 +546,10 @@ void RenderLayerBacking::updateCustomAppearance(const RenderStyle& style) > m_graphicsLayer->setCustomAppearance(GraphicsLayer::NoCustomAppearance); > } > >-// FIXME: the hasAcceleratedTouchScrolling()/needsCompositedScrolling() concepts need to be merged. > static bool layerOrAncestorIsTransformedOrUsingCompositedScrolling(RenderLayer& layer) > { > for (RenderLayer* curr = &layer; curr; curr = curr->parent()) { >- if (curr->hasTransform() >-#if PLATFORM(IOS) >- || curr->hasTouchScrollableOverflow() >-#else >- || curr->needsCompositedScrolling() >-#endif >- ) >+ if (curr->hasTransform() || curr->useCoordinatedScrolling()) > return true; > } > >@@ -682,12 +675,8 @@ bool RenderLayerBacking::updateConfiguration() > bool needsDescendantsClippingLayer = compositor().clipsCompositingDescendants(m_owningLayer); > > if (!renderer().view().needsLayout()) { >- bool usesCompositedScrolling; >-#if PLATFORM(IOS) >- usesCompositedScrolling = m_owningLayer.hasTouchScrollableOverflow(); >-#else >- usesCompositedScrolling = m_owningLayer.needsCompositedScrolling(); >-#endif >+ bool usesCompositedScrolling = m_owningLayer.useCoordinatedScrolling(); >+ > // Our scrolling layer will clip. > if (usesCompositedScrolling) > needsDescendantsClippingLayer = false; >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index 9d39ca019e0c75d0e3083f89cf1dba91c90fa6e4..69cf1ad814bbe87831901bdda40c6fe88b17ebd7 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -2723,11 +2723,7 @@ static bool useCoordinatedScrollingForLayer(RenderView& view, const RenderLayer& > if (layer.isRootLayer() && view.frameView().frame().isMainFrame()) > return true; > >-#if PLATFORM(IOS) >- return layer.hasTouchScrollableOverflow(); >-#else >- return layer.needsCompositedScrolling(); >-#endif >+ return layer.useCoordinatedScrolling(); > } > > bool RenderLayerCompositor::requiresCompositingForPosition(RenderLayerModelObject& renderer, const RenderLayer& layer, RenderLayer::ViewportConstrainedNotCompositedReason* viewportConstrainedNotCompositedReason) const
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
simon.fraser
:
review+
simon.fraser
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 171974
: 309716 |
309733
|
309734