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

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: s/WebMutable/WebCompositorMutable/g Created 5 years, 1 month 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 b7ea489f47a8bfc36198b4f6a6227cd1f5bbd721..d75a3b4e4081450721abb8d5771b0a75cf71ddd3 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 {
@@ -1437,11 +1438,17 @@ bool PaintLayerScrollableArea::usesCompositedScrolling() const
static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode mode, const PaintLayer* layer)
{
+ if (!layer->scrollsOverflow())
+ return false;
+
+ Node* node = layer->enclosingElement();
+ if (node && node->isElementNode() && (toElement(node)->mutableProperties() & (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