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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp

Issue 2754983002: Composite sticky-positioned elements when they have composited descendants (Closed)
Patch Set: Switch to using backface-visibility over will-change Created 3 years, 9 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/compositing/CompositingRequirementsUpdater.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
index aca28342b55b0d8d63095c2406bf06611a14e85a..ea03f368d524ff13961665f3d404bc172ad41e3a 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
@@ -190,8 +190,12 @@ static CompositingReasons subtreeReasonsForCompositing(
if (layer->layoutObject().hasClipRelatedProperty())
subtreeReasons |= CompositingReasonClipsCompositingDescendants;
- if (layer->layoutObject().style()->position() == EPosition::kFixed)
- subtreeReasons |= CompositingReasonPositionFixedWithCompositedDescendants;
+ // TODO(smcgruer): Use hasStickyConstrainedPosition() from flackr's patch
flackr 2017/04/03 17:27:59 I actually feel like we should call CompositingRea
smcgruer 2017/04/03 19:59:53 That would slightly the existing fixed behavior he
flackr 2017/04/07 18:50:43 fixedToViewport doesn't check for opaqueness, just
flackr 2017/04/09 04:07:02 Sorry, meant to say we call it with ignoreLCDText
smcgruer 2017/04/21 15:17:32 Done.
+ if (layer->layoutObject().style()->position() == EPosition::kFixed ||
+ layer->layoutObject().style()->position() == EPosition::kSticky) {
+ subtreeReasons |=
+ CompositingReasonPositionFixedOrStickyWithCompositedDescendants;
+ }
}
// A layer with preserve-3d or perspective only needs to be composited if

Powered by Google App Engine
This is Rietveld 408576698