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

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

Issue 2194913002: Ensure that we consistently check contains: paint for fixed position containment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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/LayoutGeometryMap.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp b/third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp
index b35695f738d1bf5d6b939f1d4598c08b7995d2da..e617010454329446e428bbb38d2dae376d97822c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp
@@ -81,7 +81,7 @@ void LayoutGeometryMap::mapToAncestor(TransformState& transformState, const Layo
// If this box has a transform, it acts as a fixed position container
// for fixed descendants, which prevents the propagation of 'fixed'
// unless the layer itself is also fixed position.
- if (i && currentStep.m_flags & HasTransform && !(currentStep.m_flags & IsFixedPosition))
+ if (i && currentStep.m_flags & ContainsFixedPosition && !(currentStep.m_flags & IsFixedPosition))
inFixed = false;
else if (currentStep.m_flags & IsFixedPosition)
inFixed = true;
@@ -120,8 +120,8 @@ void LayoutGeometryMap::dumpSteps() const
m_mapping[i].m_layoutObject->debugName().ascii().data(),
m_mapping[i].m_offset.width().toInt(),
m_mapping[i].m_offset.height().toInt());
- if (m_mapping[i].m_flags & HasTransform)
- fprintf(stderr, " hasTransform");
+ if (m_mapping[i].m_flags & ContainsFixedPosition)
+ fprintf(stderr, " containsFixedPosition");
fprintf(stderr, "\n");
}
}
@@ -175,7 +175,7 @@ static bool canMapBetweenLayoutObjects(const LayoutObject* layoutObject, const L
if (style.position() == FixedPosition || style.isFlippedBlocksWritingMode())
return false;
- if (current->hasTransformRelatedProperty() || current->isLayoutFlowThread() || current->isSVGRoot())
+ if (current->style()->canContainFixedPositionObjects() || current->isLayoutFlowThread() || current->isSVGRoot())
return false;
if (current == ancestor)

Powered by Google App Engine
This is Rietveld 408576698