Index: third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc |
index 35bdbccda698338c5a759763de7fe8acbb66bd5e..f9791360f3cf8ec69649fdf4239de6e8562f5720 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc |
@@ -335,6 +335,17 @@ bool AbsoluteNeedsChildInlineSize(const ComputedStyle& style) { |
return AbsoluteVerticalNeedsEstimate(style); |
} |
+bool IsContainingBlockForAbsoluteChild(const ComputedStyle& container_style, |
+ const ComputedStyle& child_style) { |
+ EPosition position = child_style.position(); |
+ bool contains_fixed = container_style.canContainFixedPositionObjects(); |
+ bool contains_absolute = |
+ container_style.canContainAbsolutePositionObjects() || contains_fixed; |
+ |
+ return (contains_absolute && position == AbsolutePosition) || |
+ (contains_fixed && position == FixedPosition); |
+} |
+ |
NGAbsolutePhysicalPosition ComputePartialAbsoluteWithChildInlineSize( |
const NGConstraintSpace& space, |
const ComputedStyle& style, |