[LFC][IFC] Construct dedicated runs when the inline element requires it (part 2)
[WebKit-https.git] / Source / WebCore / layout / inlineformatting / InlineFormattingState.cpp
index ff010c8..aa43970 100644 (file)
@@ -47,7 +47,16 @@ InlineFormattingState::~InlineFormattingState()
 std::unique_ptr<FormattingContext> InlineFormattingState::formattingContext(const Box& formattingContextRoot)
 {
     ASSERT(formattingContextRoot.establishesInlineFormattingContext());
-    return std::make_unique<InlineFormattingContext>(formattingContextRoot, this);
+    return std::make_unique<InlineFormattingContext>(formattingContextRoot, *this);
+}
+
+std::optional<InlineFormattingState::DetachingRules> InlineFormattingState::detachingRules(const Box& layoutBox) const
+{
+    auto detachingRules = m_detachingRules.get(&layoutBox);
+    if (!detachingRules)
+        return { };
+
+    return detachingRules;
 }
 
 }