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

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

Issue 2845613002: Fix the bug that sticky element may not be correctly invalidated due to non-promotion (Closed)
Patch Set: Address comments Created 3 years, 7 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 43d57ebe4b042d11783e96ac70281c34fc84ca55..0b1eb9b433b016759207fda0de01c27e897a68e2 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
@@ -272,9 +272,16 @@ void CompositingRequirementsUpdater::UpdateRecursive(
false) &
kCompositingReasonOverflowScrollingTouch);
+ const bool moves_with_respect_to_compositing_ancestor =
+ layer->SticksToScroller();
flackr 2017/05/18 18:13:14 Sorry, can you put both parts of the expression to
yigu 2017/05/18 19:26:43 Done.
// TODO(chrishtr): use |hasCompositedScrollingAncestor| instead.
const bool ignore_lcd_text =
- current_recursion_data.has_composited_scrolling_ancestor_;
+ current_recursion_data.has_composited_scrolling_ancestor_ ||
+ // TODO(yigu): We should check if we have already lost lcd text. This
+ // would require tracking if we think the current compositing ancestor
+ // layer meets the requirements (i.e. opaque, integer transform, etc).
flackr 2017/05/18 18:13:14 From your discussions with Chris, we also have to
yigu 2017/05/18 19:26:43 Done.
+ (moves_with_respect_to_compositing_ancestor &&
+ !current_recursion_data.compositing_ancestor_->IsRootLayer());
direct_reasons |=
compositing_reason_finder_.DirectReasons(layer, ignore_lcd_text);

Powered by Google App Engine
This is Rietveld 408576698