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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc

Issue 2636353002: [LayoutNG] Remove the state machine from ng_out_of_flow_layout_part. (Closed)
Patch Set: rebase. Created 3 years, 11 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/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,

Powered by Google App Engine
This is Rietveld 408576698