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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 2685653003: Reland "Box shadow should be recorded as main thread scrolling reasons for non-root layers." (Closed)
Patch Set: Created 3 years, 10 months 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/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index c3f9368ccc8c86a72f400ecd57acbec015062842..070d2f0aa2645564cd65a28cd0ab7a1a6692cb66 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -41,6 +41,7 @@
#include "core/style/ShadowList.h"
#include "platform/LengthFunctions.h"
#include "platform/geometry/TransformState.h"
+#include "platform/scroll/MainThreadScrollingReason.h"
#include "wtf/PtrUtil.h"
namespace blink {
@@ -111,7 +112,8 @@
layer()->getScrollableArea()->usesCompositedScrolling();
}
-BackgroundPaintLocation LayoutBoxModelObject::backgroundPaintLocation() const {
+BackgroundPaintLocation LayoutBoxModelObject::backgroundPaintLocation(
+ uint32_t* reasons) const {
bool hasCustomScrollbars = false;
// TODO(flackr): Detect opaque custom scrollbars which would cover up a
// border-box background.
@@ -132,8 +134,11 @@
// TODO(flackr): Remove this when box shadows are still painted correctly when
// painting into the composited scrolling contents layer.
// https://crbug.com/646464
- if (style()->boxShadow())
+ if (style()->boxShadow()) {
+ if (reasons)
+ *reasons |= MainThreadScrollingReason::kHasBoxShadowFromNonRootLayer;
return BackgroundPaintInGraphicsLayer;
+ }
// Assume optimistically that the background can be painted in the scrolling
// contents until we find otherwise.
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698