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

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

Issue 2700613002: Reland recording box shadow as main thread scrolling reason with conflict fixed (Closed)
Patch Set: update test from TEST_F to TEST_P 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 fca4c5fd2f9906659b41783f71ba8af406df05a8..2b869f79db28311e900a4ba41ad5071f9a8bebc6 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 @@ bool LayoutBoxModelObject::usesCompositedScrolling() const {
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 @@ BackgroundPaintLocation LayoutBoxModelObject::backgroundPaintLocation() const {
// 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