summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.h')
-rw-r--r--chromium/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.h b/chromium/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.h
index 1ab02eec472..165da53bd67 100644
--- a/chromium/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.h
+++ b/chromium/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.h
@@ -10,6 +10,7 @@
#include "third_party/blink/renderer/core/layout/geometry/logical_size.h"
#include "third_party/blink/renderer/core/layout/geometry/physical_size.h"
#include "third_party/blink/renderer/core/layout/min_max_sizes.h"
+#include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"
namespace blink {
@@ -65,6 +66,20 @@ CORE_EXPORT void AdjustOffsetForSplitInline(
const NGBoxFragmentBuilder* container_builder,
LogicalOffset& offset);
+// Figure out if the child has any out-of-flow positioned descendants, in which
+// case we'll need to propagate this to the fragment builder.
+inline bool NeedsOOFPositionedInfoPropagation(const NGPhysicalFragment& child) {
+ if (child.HasOutOfFlowPositionedDescendants())
+ return true;
+
+ const auto* box_fragment = DynamicTo<NGPhysicalBoxFragment>(&child);
+ if (!box_fragment)
+ return false;
+
+ return box_fragment->HasMulticolsWithPendingOOFs() ||
+ box_fragment->HasOutOfFlowPositionedFragmentainerDescendants();
+}
+
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_ABSOLUTE_UTILS_H_