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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 784453003: Initial scroll-blocks-on compositor integration (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unneeded TODO Created 6 years 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: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 733d523fc6b7770c3fc16527f2b404a9aa31fb97..59752828bf9457603d0f1907dbc997f27e42c613 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -102,6 +102,25 @@ RenderBox::RenderBox(ContainerNode* node)
setIsBox();
}
+LayerType RenderBox::layerTypeRequired() const
+{
+ // hasAutoZIndex only returns true if the element is positioned or a flex-item since
+ // position:static elements that are not flex-items get their z-index coerced to auto.
+ if (isPositioned() || createsGroup() || hasClipPath() || hasTransformRelatedProperty() || hasHiddenBackface() || hasReflection() || style()->specifiesColumns() || !style()->hasAutoZIndex() || style()->shouldCompositeForCurrentAnimations())
skobes 2015/01/07 18:49:24 Could you wrap this line at some reasonable length
Rick Byers 2015/01/08 21:08:11 Done.
+ return NormalLayer;
+ if (style()->hasScrollBlocksOn()) {
+ if (isDocumentElement()) {
Ian Vollick 2015/01/06 04:13:51 Once skobes' root layer scroll refactor is done, t
skobes 2015/01/07 18:49:24 If I'm reading it right, this check is just making
Rick Byers 2015/01/08 21:08:11 Right. I've added a comment to clarify this.
+ ASSERT(style()->scrollBlocksOn() == view()->style()->scrollBlocksOn());
+ return NoLayer;
+ }
+ return NormalLayer;
+ }
+ if (hasOverflowClip())
+ return OverflowClipLayer;
+
+ return NoLayer;
+}
+
void RenderBox::willBeRemovedFromTree()
{
if (m_rareData && m_rareData->m_spannerPlaceholder) {

Powered by Google App Engine
This is Rietveld 408576698