Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 1405993008: compositor-worker: plumb element id and mutable properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix rebase error. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index bebfb48c6582535451f55253e6d2b50d3257c9bd..93573620b9393dabb2c883e5cd19512b8c49dc6f 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -75,6 +75,7 @@
#include "platform/scroll/ScrollAnimatorBase.h"
#include "platform/scroll/ScrollbarTheme.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebCompositorMutableProperties.h"
namespace blink {
@@ -1381,11 +1382,17 @@ bool PaintLayerScrollableArea::usesCompositedScrolling() const
static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode mode, const PaintLayer* layer)
{
+ if (!layer->scrollsOverflow())
+ return false;
+
+ Node* node = layer->enclosingNode();
+ if (node && node->isElementNode() && (toElement(node)->compositorMutableProperties() & (WebCompositorMutablePropertyScrollTop | WebCompositorMutablePropertyScrollLeft)))
+ return true;
+
if (mode == PaintLayerScrollableArea::ConsiderLCDText && !layer->compositor()->preferCompositingToLCDTextEnabled())
return false;
- return layer->scrollsOverflow()
- && !layer->hasDescendantWithClipPath()
+ return !layer->hasDescendantWithClipPath()
&& !layer->hasAncestorWithClipPath()
&& !layer->layoutObject()->style()->hasBorderRadius();
}

Powered by Google App Engine
This is Rietveld 408576698