Title: [294383] trunk/Source/WebCore
Revision
294383
Author
an...@apple.com
Date
2022-05-17 23:26:53 -0700 (Tue, 17 May 2022)

Log Message

Template TextBoxPainter on line layout path 
https://bugs.webkit.org/show_bug.cgi?id=240416

Reviewed by Alan Bujtas.

Painting currently goes via a line layout path agnostic iterator.
This is inefficient since we always know what sort of layout we are painting.

* Source/WebCore/layout/integration/inline/InlineIteratorBox.cpp:
(WebCore::InlineIterator::Box::visualRect const):
* Source/WebCore/layout/integration/inline/InlineIteratorBox.h:
(WebCore::InlineIterator::Box::containingBlock const):
(WebCore::InlineIterator::Box::visualRect const): Deleted.
* Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h:
(WebCore::InlineIterator::BoxLegacyPath::containingBlock const):
(WebCore::InlineIterator::BoxLegacyPath::direction const):
(WebCore::InlineIterator::BoxLegacyPath::isFirstLine const):
* Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h:
(WebCore::InlineIterator::BoxModernPath::containingBlock const):
(WebCore::InlineIterator::BoxModernPath::direction const):
(WebCore::InlineIterator::BoxModernPath::isFirstLine const):
(WebCore::InlineIterator::BoxModernPath::renderText const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paint):
* Source/WebCore/rendering/GlyphDisplayListCache.h:
(WebCore::GlyphDisplayListCache::singleton):
* Source/WebCore/rendering/InlineBoxPainter.cpp:
(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):
* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::addTextBoxVisualOverflow):
* Source/WebCore/rendering/LegacyInlineTextBox.cpp:
(WebCore::LegacyInlineTextBox::paint):
* Source/WebCore/rendering/LegacyInlineTextBox.h:
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::LegacyTextBoxPainter::LegacyTextBoxPainter):
(WebCore::ModernTextBoxPainter::ModernTextBoxPainter):
(WebCore::TextBoxPainter<TextBoxPath>::TextBoxPainter):
(WebCore::TextBoxPainter<TextBoxPath>::~TextBoxPainter):
(WebCore::TextBoxPainter<TextBoxPath>::makeIterator const):
(WebCore::TextBoxPainter<TextBoxPath>::paint):
(WebCore::TextBoxPainter<TextBoxPath>::createMarkedTextFromSelectionInBox):
(WebCore::TextBoxPainter<TextBoxPath>::paintBackground):
(WebCore::TextBoxPainter<TextBoxPath>::paintForegroundAndDecorations):
(WebCore::TextBoxPainter<TextBoxPath>::paintCompositionBackground):
(WebCore::TextBoxPainter<TextBoxPath>::paintForeground):
(WebCore::TextBoxPainter<TextBoxPath>::createDecorationPainter):
(WebCore::TextBoxPainter<TextBoxPath>::paintBackgroundDecorations):
(WebCore::TextBoxPainter<TextBoxPath>::paintForegroundDecorations):
(WebCore::TextBoxPainter<TextBoxPath>::paintCompositionUnderlines):
(WebCore::TextBoxPainter<TextBoxPath>::textPosition):
(WebCore::TextBoxPainter<TextBoxPath>::paintCompositionUnderline):
(WebCore::TextBoxPainter<TextBoxPath>::paintPlatformDocumentMarkers):
(WebCore::LegacyTextBoxPainter::calculateUnionOfAllDocumentMarkerBounds):
(WebCore::TextBoxPainter<TextBoxPath>::paintPlatformDocumentMarker):
(WebCore::TextBoxPainter<TextBoxPath>::computePaintRect):
(WebCore::calculateDocumentMarkerBounds):
(WebCore::TextBoxPainter<TextBoxPath>::computeHaveSelection const):
(WebCore::TextBoxPainter<TextBoxPath>::fontCascade const):
(WebCore::TextBoxPainter<TextBoxPath>::textOriginFromPaintRect const):
(WebCore::TextBoxPainter<TextBoxPath>::debugTextShadow const):
(WebCore::TextBoxPainter::TextBoxPainter): Deleted.
(WebCore::TextBoxPainter::~TextBoxPainter): Deleted.
(WebCore::TextBoxPainter::paint): Deleted.
(WebCore::TextBoxPainter::createMarkedTextFromSelectionInBox): Deleted.
(WebCore::TextBoxPainter::paintBackground): Deleted.
(WebCore::TextBoxPainter::paintForegroundAndDecorations): Deleted.
(WebCore::TextBoxPainter::paintCompositionBackground): Deleted.
(WebCore::TextBoxPainter::paintForeground): Deleted.
(WebCore::TextBoxPainter::createDecorationPainter): Deleted.
(WebCore::TextBoxPainter::paintBackgroundDecorations): Deleted.
(WebCore::TextBoxPainter::paintForegroundDecorations): Deleted.
(WebCore::TextBoxPainter::paintCompositionUnderlines): Deleted.
(WebCore::textPosition): Deleted.
(WebCore::TextBoxPainter::paintCompositionUnderline): Deleted.
(WebCore::TextBoxPainter::paintPlatformDocumentMarkers): Deleted.
(WebCore::TextBoxPainter::calculateUnionOfAllDocumentMarkerBounds): Deleted.
(WebCore::TextBoxPainter::paintPlatformDocumentMarker): Deleted.
(WebCore::TextBoxPainter::computePaintRect): Deleted.
(WebCore::TextBoxPainter::calculateDocumentMarkerBounds): Deleted.
(WebCore::TextBoxPainter::computeHaveSelection const): Deleted.
(WebCore::TextBoxPainter::fontCascade const): Deleted.
(WebCore::TextBoxPainter::textOriginFromPaintRect const): Deleted.
(WebCore::TextBoxPainter::debugTextShadow const): Deleted.
* Source/WebCore/rendering/TextBoxPainter.h:
(WebCore::TextBoxPainter::textBox const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/layout/integration/inline/InlineIteratorBox.cpp (294382 => 294383)


--- trunk/Source/WebCore/layout/integration/inline/InlineIteratorBox.cpp	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/layout/integration/inline/InlineIteratorBox.cpp	2022-05-18 06:26:53 UTC (rev 294383)
@@ -94,6 +94,13 @@
     );
 }
 
+FloatRect Box::visualRect() const
+{
+    auto rect = visualRectIgnoringBlockDirection();
+    containingBlock().flipForWritingMode(rect);
+    return rect;
+}
+
 RenderObject::HighlightState Box::selectionState() const
 {
     if (isText()) {

Modified: trunk/Source/WebCore/layout/integration/inline/InlineIteratorBox.h (294382 => 294383)


--- trunk/Source/WebCore/layout/integration/inline/InlineIteratorBox.h	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/layout/integration/inline/InlineIteratorBox.h	2022-05-18 06:26:53 UTC (rev 294383)
@@ -60,7 +60,7 @@
     bool isInlineBox() const;
     bool isRootInlineBox() const;
 
-    FloatRect visualRect(float formattingRootSizeInBlockDirection) const;
+    FloatRect visualRect() const;
     FloatRect visualRectIgnoringBlockDirection() const;
 
     float logicalTop() const { return isHorizontal() ? visualRectIgnoringBlockDirection().y() : visualRectIgnoringBlockDirection().x(); }
@@ -85,6 +85,7 @@
     RenderObject::HighlightState selectionState() const;
 
     const RenderObject& renderer() const;
+    const RenderBlockFlow& containingBlock() const;
     const RenderStyle& style() const;
 
     // FIXME: Remove. For intermediate porting steps only.
@@ -100,6 +101,11 @@
 
     LineBoxIterator lineBox() const;
 
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+    const BoxModernPath& modernPath() const;
+#endif
+    const BoxLegacyPath& legacyPath() const;
+
 protected:
     friend class BoxIterator;
     friend class InlineBoxIterator;
@@ -106,12 +112,6 @@
     friend class LeafBoxIterator;
     friend class TextBoxIterator;
 
-    // To help with debugging.
-#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    const BoxModernPath& modernPath() const;
-#endif
-    const BoxLegacyPath& legacyPath() const;
-
     PathVariant m_pathVariant;
 };
 
@@ -184,19 +184,6 @@
     });
 }
 
-inline FloatRect Box::visualRect(float formattingRootSizeInBlockDirection) const
-{
-    auto visualRect = visualRectIgnoringBlockDirection();
-    if (!style().isFlippedBlocksWritingMode())
-        return visualRect;
-
-    if (style().isHorizontalWritingMode())
-        visualRect.setY(formattingRootSizeInBlockDirection - visualRect.maxY());
-    else
-        visualRect.setX(formattingRootSizeInBlockDirection - visualRect.maxX());
-    return visualRect;
-}
-
 inline FloatRect Box::visualRectIgnoringBlockDirection() const
 {
     return WTF::switchOn(m_pathVariant, [](auto& path) {
@@ -246,6 +233,13 @@
     });
 }
 
+inline const RenderBlockFlow& Box::containingBlock() const
+{
+    return WTF::switchOn(m_pathVariant, [](auto& path) -> const RenderBlockFlow& {
+        return path.containingBlock();
+    });
+}
+
 inline const RenderStyle& Box::style() const
 {
     return WTF::switchOn(m_pathVariant, [](auto& path) -> const RenderStyle& {

Modified: trunk/Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h (294382 => 294383)


--- trunk/Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h	2022-05-18 06:26:53 UTC (rev 294383)
@@ -76,6 +76,11 @@
         return m_inlineBox->renderer();
     }
 
+    const RenderBlockFlow& containingBlock() const
+    {
+        return m_inlineBox->root().blockFlow();
+    }
+
     const RenderStyle& style() const
     {
         return m_inlineBox->lineStyle();
@@ -113,6 +118,9 @@
         return { inlineFlowBox()->lastLeafDescendant() };
     }
 
+    TextDirection direction() const { return bidiLevel() % 2 ? TextDirection::RTL : TextDirection::LTR; }
+    bool isFirstLine() const { return !rootInlineBox().prevRootBox(); }
+
     bool operator==(const BoxLegacyPath& other) const { return m_inlineBox == other.m_inlineBox; }
 
     bool atEnd() const { return !m_inlineBox; }

Modified: trunk/Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h (294382 => 294383)


--- trunk/Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h	2022-05-18 06:26:53 UTC (rev 294383)
@@ -103,6 +103,11 @@
         return m_inlineContent->rendererForLayoutBox(box().layoutBox());
     }
 
+    const RenderBlockFlow& containingBlock() const
+    {
+        return m_inlineContent->containingBlock();
+    }
+
     const RenderStyle& style() const
     {
         return box().style();
@@ -207,6 +212,9 @@
         return last;
     }
 
+    TextDirection direction() const { return bidiLevel() % 2 ? TextDirection::RTL : TextDirection::LTR; }
+    bool isFirstLine() const { return !box().lineIndex(); }
+
     bool operator==(const BoxModernPath& other) const { return m_inlineContent == other.m_inlineContent && m_boxIndex == other.m_boxIndex; }
 
     bool atEnd() const { return !m_inlineContent || m_boxIndex == boxes().size(); }
@@ -272,7 +280,6 @@
     const LayoutIntegration::Line& line() const { return m_inlineContent->lineForBox(box()); }
 
     const RenderText& renderText() const { return downcast<RenderText>(renderer()); }
-    TextDirection direction() const { return bidiLevel() % 2 ? TextDirection::RTL : TextDirection::LTR; }
 
     WeakPtr<const LayoutIntegration::InlineContent> m_inlineContent;
     size_t m_boxIndex { 0 };

Modified: trunk/Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp (294382 => 294383)


--- trunk/Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp	2022-05-18 06:26:53 UTC (rev 294383)
@@ -800,7 +800,7 @@
             if (!box.text()->length() || !hasDamage(box))
                 continue;
 
-            TextBoxPainter painter(*m_inlineContent, box, paintInfo, paintOffset);
+            ModernTextBoxPainter painter(*m_inlineContent, box, paintInfo, paintOffset);
             painter.paint();
             continue;
         }

Modified: trunk/Source/WebCore/rendering/GlyphDisplayListCache.h (294382 => 294383)


--- trunk/Source/WebCore/rendering/GlyphDisplayListCache.h	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/rendering/GlyphDisplayListCache.h	2022-05-18 06:26:53 UTC (rev 294383)
@@ -35,6 +35,12 @@
 
 namespace WebCore {
 
+class LegacyInlineTextBox;
+
+namespace InlineDisplay {
+struct Box;
+}
+
 template<typename LayoutRun>
 class GlyphDisplayListCache {
 public:
@@ -42,6 +48,7 @@
 
     static GlyphDisplayListCache& singleton()
     {
+        static_assert(std::is_same_v<LayoutRun, LegacyInlineTextBox> || std::is_same_v<LayoutRun, InlineDisplay::Box>);
         static NeverDestroyed<GlyphDisplayListCache> cache;
         return cache;
     }

Modified: trunk/Source/WebCore/rendering/InlineBoxPainter.cpp (294382 => 294383)


--- trunk/Source/WebCore/rendering/InlineBoxPainter.cpp	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/rendering/InlineBoxPainter.cpp	2022-05-18 06:26:53 UTC (rev 294383)
@@ -141,7 +141,7 @@
         return;
 
     // Move x/y to our coordinates.
-    auto localRect = LayoutRect { m_inlineBox.visualRect(m_inlineBox.lineBox()->containingBlock().logicalHeight()) };
+    auto localRect = LayoutRect { m_inlineBox.visualRect() };
     LayoutPoint adjustedPaintOffset = m_paintOffset + localRect.location();
 
     const NinePieceImage& maskNinePieceImage = renderer().style().maskBoxImage();
@@ -217,7 +217,7 @@
         return;
 
     // Move x/y to our coordinates.
-    auto localRect = LayoutRect { m_inlineBox.visualRect(m_inlineBox.lineBox()->containingBlock().logicalHeight()) };
+    auto localRect = LayoutRect { m_inlineBox.visualRect() };
     LayoutPoint adjustedPaintoffset = m_paintOffset + localRect.location();
     GraphicsContext& context = m_paintInfo.context();
     LayoutRect paintRect = LayoutRect(adjustedPaintoffset, localRect.size());

Modified: trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp (294382 => 294383)


--- trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp	2022-05-18 06:26:53 UTC (rev 294383)
@@ -926,7 +926,7 @@
     
     logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow, logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
 
-    auto documentMarkerBounds = TextBoxPainter::calculateUnionOfAllDocumentMarkerBounds(textBox);
+    auto documentMarkerBounds = LegacyTextBoxPainter::calculateUnionOfAllDocumentMarkerBounds(textBox);
     documentMarkerBounds.move(textBox.logicalLeft(), textBox.logicalTop());
     logicalVisualOverflow = unionRect(logicalVisualOverflow, LayoutRect(documentMarkerBounds));
 

Modified: trunk/Source/WebCore/rendering/LegacyInlineTextBox.cpp (294382 => 294383)


--- trunk/Source/WebCore/rendering/LegacyInlineTextBox.cpp	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/rendering/LegacyInlineTextBox.cpp	2022-05-18 06:26:53 UTC (rev 294383)
@@ -397,7 +397,7 @@
     if (logicalStart >= paintEnd || logicalStart + logicalExtent <= paintStart)
         return;
 
-    TextBoxPainter textBoxPainter(*this, paintInfo, paintOffset);
+    LegacyTextBoxPainter textBoxPainter(*this, paintInfo, paintOffset);
     textBoxPainter.paint();
 }
 

Modified: trunk/Source/WebCore/rendering/LegacyInlineTextBox.h (294382 => 294383)


--- trunk/Source/WebCore/rendering/LegacyInlineTextBox.h	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/rendering/LegacyInlineTextBox.h	2022-05-18 06:26:53 UTC (rev 294383)
@@ -150,7 +150,6 @@
 
 private:
     friend class InlineIterator::BoxLegacyPath;
-    friend class TextBoxPainter;
 
     const RenderCombineText* combinedText() const;
     const FontCascade& lineFont() const;

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (294382 => 294383)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2022-05-18 06:26:53 UTC (rev 294383)
@@ -727,7 +727,12 @@
         for (auto box = inlineBox->firstLeafBox(), end = inlineBox->endLeafBox(); box != end; box.traverseNextOnLine()) {
             if (!box->isText())
                 continue;
-            TextBoxPainter textBoxPainter(downcast<InlineIterator::TextBoxIterator>(box), maskInfo, paintOffset);
+            if (auto* legacyTextBox = downcast<LegacyInlineTextBox>(box->legacyInlineBox())) {
+                LegacyTextBoxPainter textBoxPainter(*legacyTextBox, maskInfo, paintOffset);
+                textBoxPainter.paint();
+                continue;
+            }
+            ModernTextBoxPainter textBoxPainter(box->modernPath().inlineContent(), box->modernPath().box(), maskInfo, paintOffset);
             textBoxPainter.paint();
         }
         return;

Modified: trunk/Source/WebCore/rendering/TextBoxPainter.cpp (294382 => 294383)


--- trunk/Source/WebCore/rendering/TextBoxPainter.cpp	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/rendering/TextBoxPainter.cpp	2022-05-18 06:26:53 UTC (rev 294383)
@@ -45,29 +45,34 @@
 
 namespace WebCore {
 
-TextBoxPainter::TextBoxPainter(const LegacyInlineTextBox& textBox, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
-    : TextBoxPainter(InlineIterator::textBoxFor(&textBox), paintInfo, paintOffset)
+static FloatRect calculateDocumentMarkerBounds(const InlineIterator::TextBoxIterator&, const MarkedText&);
+
+LegacyTextBoxPainter::LegacyTextBoxPainter(const LegacyInlineTextBox& textBox, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
+    : TextBoxPainter(InlineIterator::BoxLegacyPath { &textBox }, paintInfo, paintOffset)
 {
     m_emphasisMarkExistsAndIsAbove = textBox.emphasisMarkExistsAndIsAbove(m_style);
 }
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-TextBoxPainter::TextBoxPainter(const LayoutIntegration::InlineContent& inlineContent, const InlineDisplay::Box& box, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
-    : TextBoxPainter(InlineIterator::textBoxFor(inlineContent, box), paintInfo, paintOffset)
+ModernTextBoxPainter::ModernTextBoxPainter(const LayoutIntegration::InlineContent& inlineContent, const InlineDisplay::Box& box, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
+    : TextBoxPainter(InlineIterator::BoxModernPath { inlineContent, inlineContent.indexForBox(box) }, paintInfo, paintOffset)
 {
 }
 #endif
 
-TextBoxPainter::TextBoxPainter(const InlineIterator::TextBoxIterator& textBox, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
-    : m_textBox(textBox)
-    , m_renderer(m_textBox->renderer())
+template<typename TextBoxPath>
+TextBoxPainter<TextBoxPath>::TextBoxPainter(TextBoxPath&& textBox, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
+    : m_textBox(WTFMove(textBox))
+    , m_renderer(downcast<RenderText>(m_textBox.renderer()))
     , m_document(m_renderer.document())
-    , m_style(m_textBox->style())
-    , m_paintTextRun(m_textBox->createTextRun())
+    , m_style(m_textBox.style())
+    , m_logicalRect(m_textBox.isHorizontal() ? m_textBox.visualRectIgnoringBlockDirection() : m_textBox.visualRectIgnoringBlockDirection().transposedRect())
+    , m_paintTextRun(m_textBox.createTextRun(InlineIterator::CreateTextRunMode::Painting))
     , m_paintInfo(paintInfo)
-    , m_selectableRange(m_textBox->selectableRange())
+    , m_selectableRange(m_textBox.selectableRange())
     , m_paintRect(computePaintRect(paintOffset))
-    , m_isFirstLine(m_textBox->lineBox()->isFirst())
+    , m_isFirstLine(m_textBox.isFirstLine())
+    , m_isCombinedText(is<RenderCombineText>(m_renderer) && downcast<RenderCombineText>(m_renderer).isCombined())
     , m_isPrinting(m_document.printing())
     , m_haveSelection(computeHaveSelection())
     , m_containsComposition(m_renderer.textNode() && m_renderer.frame().editor().compositionNode() == m_renderer.textNode())
@@ -76,12 +81,21 @@
     ASSERT(paintInfo.phase == PaintPhase::Foreground || paintInfo.phase == PaintPhase::Selection || paintInfo.phase == PaintPhase::TextClip || paintInfo.phase == PaintPhase::EventRegion);
 }
 
-TextBoxPainter::~TextBoxPainter()
+template<typename TextBoxPath>
+TextBoxPainter<TextBoxPath>::~TextBoxPainter()
 {
 }
 
-void TextBoxPainter::paint()
+template<typename TextBoxPath>
+InlineIterator::TextBoxIterator TextBoxPainter<TextBoxPath>::makeIterator() const
 {
+    auto pathCopy = m_textBox;
+    return InlineIterator::TextBoxIterator { WTFMove(pathCopy) };
+}
+
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paint()
+{
     if (m_paintInfo.phase == PaintPhase::Selection && !m_haveSelection)
         return;
 
@@ -91,7 +105,7 @@
         return;
     }
 
-    bool shouldRotate = !textBox().isHorizontal() && !textBox().isCombinedText();
+    bool shouldRotate = !textBox().isHorizontal() && !m_isCombinedText;
     if (shouldRotate)
         m_paintInfo.context().concatCTM(rotation(m_paintRect, Clockwise));
 
@@ -115,7 +129,8 @@
         m_paintInfo.context().concatCTM(rotation(m_paintRect, Counterclockwise));
 }
 
-MarkedText TextBoxPainter::createMarkedTextFromSelectionInBox()
+template<typename TextBoxPath>
+MarkedText TextBoxPainter<TextBoxPath>::createMarkedTextFromSelectionInBox()
 {
     auto [selectionStart, selectionEnd] = m_renderer.view().selection().rangeForTextBox(m_renderer, m_selectableRange);
     if (selectionStart < selectionEnd)
@@ -123,7 +138,8 @@
     return { };
 }
 
-void TextBoxPainter::paintBackground()
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintBackground()
 {
     auto shouldPaintCompositionBackground = m_containsComposition && !m_useCustomUnderlines;
 #if ENABLE(TEXT_SELECTION)
@@ -169,7 +185,8 @@
         paintBackground(markedText);
 }
 
-void TextBoxPainter::paintForegroundAndDecorations()
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintForegroundAndDecorations()
 {
     auto shouldPaintSelectionForeground = m_haveSelection && !m_useCustomUnderlines;
     auto hasTextDecoration = !m_style.textDecorationsInEffect().isEmpty();
@@ -231,8 +248,7 @@
     }
 
     if (hasDecoration && m_paintInfo.phase != PaintPhase::Selection) {
-        TextRun textRun = textBox().createTextRun();
-        unsigned length = m_selectableRange.truncation.value_or(textRun.length());
+        unsigned length = m_selectableRange.truncation.value_or(m_paintTextRun.length());
         unsigned selectionStart = 0;
         unsigned selectionEnd = 0;
         if (m_haveSelection)
@@ -287,7 +303,8 @@
     }
 }
 
-void TextBoxPainter::paintCompositionBackground()
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintCompositionBackground()
 {
     auto& editor = m_renderer.frame().editor();
 
@@ -314,12 +331,14 @@
     }
 }
 
-void TextBoxPainter::paintBackground(const StyledMarkedText& markedText)
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintBackground(const StyledMarkedText& markedText)
 {
-    paintBackground(markedText.startOffset, markedText.endOffset, markedText.style.backgroundColor);
+    paintBackground(markedText.startOffset, markedText.endOffset, markedText.style.backgroundColor, BackgroundStyle::Normal);
 }
 
-void TextBoxPainter::paintBackground(unsigned startOffset, unsigned endOffset, const Color& color, BackgroundStyle backgroundStyle)
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintBackground(unsigned startOffset, unsigned endOffset, const Color& color, BackgroundStyle backgroundStyle)
 {
     if (startOffset >= endOffset)
         return;
@@ -330,14 +349,14 @@
 
     // Note that if the text is truncated, we let the thing being painted in the truncation
     // draw its own highlight.
-    auto lineBox = textBox().lineBox();
+    auto lineBox = makeIterator()->lineBox();
     auto selectionBottom = LineSelection::logicalBottom(*lineBox);
     auto selectionTop = LineSelection::logicalTopAdjustedForPrecedingBlock(*lineBox);
     // Use same y positioning and height as for selection, so that when the selection and this subrange are on
     // the same word there are no pieces sticking out.
-    auto deltaY = LayoutUnit { m_style.isFlippedLinesWritingMode() ? selectionBottom - textBox().logicalBottom() : textBox().logicalTop() - selectionTop };
+    auto deltaY = LayoutUnit { m_style.isFlippedLinesWritingMode() ? selectionBottom - m_logicalRect.maxY() : m_logicalRect.y() - selectionTop };
     auto selectionHeight = LayoutUnit { std::max(0.f, selectionBottom - selectionTop) };
-    auto selectionRect = LayoutRect { LayoutUnit(m_paintRect.x()), LayoutUnit(m_paintRect.y() - deltaY), LayoutUnit(textBox().logicalWidth()), selectionHeight };
+    auto selectionRect = LayoutRect { LayoutUnit(m_paintRect.x()), LayoutUnit(m_paintRect.y() - deltaY), LayoutUnit(m_logicalRect.width()), selectionHeight };
     fontCascade().adjustSelectionRectForText(m_paintTextRun, selectionRect, startOffset, endOffset);
 
     // FIXME: Support painting combined text. See <https://bugs.webkit.org/show_bug.cgi?id=180993>.
@@ -352,7 +371,8 @@
     context.fillRect(backgroundRect, color);
 }
 
-void TextBoxPainter::paintForeground(const StyledMarkedText& markedText)
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintForeground(const StyledMarkedText& markedText)
 {
     if (markedText.startOffset >= markedText.endOffset)
         return;
@@ -373,7 +393,7 @@
         if (m_style.hasAppleColorFilter())
             textPainter.setShadowColorFilter(&m_style.appleColorFilter());
     }
-    textPainter.setEmphasisMark(emphasisMark, emphasisMarkOffset, textBox().isCombinedText() ? &downcast<RenderCombineText>(m_renderer) : nullptr);
+    textPainter.setEmphasisMark(emphasisMark, emphasisMarkOffset, m_isCombinedText ? &downcast<RenderCombineText>(m_renderer) : nullptr);
     if (auto* debugShadow = debugTextShadow())
         textPainter.setShadow(debugShadow);
 
@@ -382,11 +402,11 @@
         context.setAlpha(markedText.style.alpha);
     updateGraphicsContext(context, markedText.style.textStyles);
 
-    if (auto* legacyInlineBox = textBox().legacyInlineBox())
-        textPainter.setGlyphDisplayListIfNeeded(*legacyInlineBox, m_paintInfo, m_paintTextRun);
+    if constexpr (std::is_same_v<TextBoxPath, InlineIterator::BoxLegacyPath>)
+        textPainter.setGlyphDisplayListIfNeeded(downcast<LegacyInlineTextBox>(*textBox().legacyInlineBox()), m_paintInfo, m_paintTextRun);
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     else
-        textPainter.setGlyphDisplayListIfNeeded(*textBox().inlineBox(), m_paintInfo, m_paintTextRun);
+        textPainter.setGlyphDisplayListIfNeeded(textBox().box(), m_paintInfo, m_paintTextRun);
 #endif
 
     // TextPainter wants the box rectangle and text origin of the entire line box.
@@ -393,7 +413,8 @@
     textPainter.paintRange(m_paintTextRun, m_paintRect, textOriginFromPaintRect(m_paintRect), markedText.startOffset, markedText.endOffset);
 }
 
-TextDecorationPainter TextBoxPainter::createDecorationPainter(const StyledMarkedText& markedText, const FloatRect& clipOutRect, const FloatRect& snappedSelectionRect)
+template<typename TextBoxPath>
+TextDecorationPainter TextBoxPainter<TextBoxPath>::createDecorationPainter(const StyledMarkedText& markedText, const FloatRect& clipOutRect, const FloatRect& snappedSelectionRect)
 {
     GraphicsContext& context = m_paintInfo.context();
 
@@ -416,7 +437,7 @@
     auto textDecorations = m_style.textDecorationsInEffect();
     textDecorations.add(TextDecorationPainter::textDecorationsInEffectForStyle(markedText.style.textDecorationStyles));
     TextDecorationPainter decorationPainter { context, textDecorations, m_renderer, m_isFirstLine, font, markedText.style.textDecorationStyles };
-    decorationPainter.setTextBox(m_textBox);
+    decorationPainter.setTextBox(makeIterator());
     decorationPainter.setWidth(snappedSelectionRect.width());
     decorationPainter.setIsHorizontal(textBox().isHorizontal());
     if (markedText.style.textShadow) {
@@ -428,31 +449,32 @@
     return decorationPainter;
 }
 
-void TextBoxPainter::paintBackgroundDecorations(TextDecorationPainter& decorationPainter, const StyledMarkedText& markedText, const FloatRect& snappedSelectionRect)
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintBackgroundDecorations(TextDecorationPainter& decorationPainter, const StyledMarkedText& markedText, const FloatRect& snappedSelectionRect)
 {
-    bool isCombinedText = textBox().isCombinedText();
-    if (isCombinedText)
+    if (m_isCombinedText)
         m_paintInfo.context().concatCTM(rotation(m_paintRect, Clockwise));
 
     decorationPainter.paintBackgroundDecorations(m_paintTextRun.subRun(markedText.startOffset, markedText.endOffset - markedText.startOffset), textOriginFromPaintRect(snappedSelectionRect), snappedSelectionRect.location());
 
-    if (isCombinedText)
+    if (m_isCombinedText)
         m_paintInfo.context().concatCTM(rotation(m_paintRect, Counterclockwise));
 }
 
-void TextBoxPainter::paintForegroundDecorations(TextDecorationPainter& decorationPainter, const FloatRect& snappedSelectionRect)
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintForegroundDecorations(TextDecorationPainter& decorationPainter, const FloatRect& snappedSelectionRect)
 {
-    bool isCombinedText = textBox().isCombinedText();
-    if (isCombinedText)
+    if (m_isCombinedText)
         m_paintInfo.context().concatCTM(rotation(m_paintRect, Clockwise));
 
     decorationPainter.paintForegroundDecorations(snappedSelectionRect.location());
 
-    if (isCombinedText)
+    if (m_isCombinedText)
         m_paintInfo.context().concatCTM(rotation(m_paintRect, Counterclockwise));
 }
 
-void TextBoxPainter::paintCompositionUnderlines()
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintCompositionUnderlines()
 {
     for (auto& underline : m_renderer.frame().editor().customCompositionUnderlines()) {
         if (underline.endOffset <= textBox().start()) {
@@ -480,19 +502,21 @@
     start = logicalWidth - width - start;
 }
 
-static float textPosition(const InlineIterator::TextBoxIterator& textBox)
+template<typename TextBoxPath>
+float TextBoxPainter<TextBoxPath>::textPosition()
 {
     // When computing the width of a text run, RenderBlock::computeInlineDirectionPositionsForLine() doesn't include the actual offset
     // from the containing block edge in its measurement. textPosition() should be consistent so the text are rendered in the same width.
-    if (!textBox->logicalLeft())
+    if (!m_logicalRect.x())
         return 0;
-    return textBox->logicalLeft() - textBox->lineBox()->contentLogicalLeft();
+    return m_logicalRect.x() - makeIterator()->lineBox()->contentLogicalLeft();
 }
 
-void TextBoxPainter::paintCompositionUnderline(const CompositionUnderline& underline)
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintCompositionUnderline(const CompositionUnderline& underline)
 {
     float start = 0; // start of line to draw, relative to tx
-    float width = textBox().logicalWidth(); // how much line to draw
+    float width = m_logicalRect.width(); // how much line to draw
     bool useWholeWidth = true;
     unsigned paintStart = textBox().start();
     unsigned paintEnd = textBox().end();
@@ -499,7 +523,7 @@
     if (paintStart <= underline.startOffset) {
         paintStart = underline.startOffset;
         useWholeWidth = false;
-        start = m_renderer.width(textBox().start(), paintStart - textBox().start(), textPosition(m_textBox), m_isFirstLine);
+        start = m_renderer.width(textBox().start(), paintStart - textBox().start(), textPosition(), m_isFirstLine);
     }
     if (paintEnd != underline.endOffset) {
         paintEnd = std::min(paintEnd, (unsigned)underline.endOffset);
@@ -510,8 +534,8 @@
         useWholeWidth = false;
     }
     if (!useWholeWidth) {
-        width = m_renderer.width(paintStart, paintEnd - paintStart, textPosition(m_textBox) + start, m_isFirstLine);
-        mirrorRTLSegment(textBox().logicalWidth(), textBox().direction(), start, width);
+        width = m_renderer.width(paintStart, paintEnd - paintStart, textPosition() + start, m_isFirstLine);
+        mirrorRTLSegment(m_logicalRect.width(), textBox().direction(), start, width);
     }
 
     // Thick marked text underlines are 2px thick as long as there is room for the 2px line under the baseline.
@@ -519,7 +543,7 @@
     // If there's not enough space the underline will touch or overlap characters.
     int lineThickness = 1;
     int baseline = m_style.metricsOfPrimaryFont().ascent();
-    if (underline.thick && textBox().logicalHeight() - baseline >= 2)
+    if (underline.thick && m_logicalRect.height() - baseline >= 2)
         lineThickness = 2;
 
     // We need to have some space between underlines of subsequent clauses, because some input methods do not use different underline styles for those.
@@ -533,10 +557,11 @@
     GraphicsContext& context = m_paintInfo.context();
     context.setStrokeColor(underlineColor);
     context.setStrokeThickness(lineThickness);
-    context.drawLineForText(FloatRect(m_paintRect.x() + start, m_paintRect.y() + textBox().logicalHeight() - lineThickness, width, lineThickness), m_document.printing());
+    context.drawLineForText(FloatRect(m_paintRect.x() + start, m_paintRect.y() + m_logicalRect.height() - lineThickness, width, lineThickness), m_isPrinting);
 }
 
-void TextBoxPainter::paintPlatformDocumentMarkers()
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintPlatformDocumentMarkers()
 {
     auto markedTexts = MarkedText::collectForDocumentMarkers(m_renderer, m_selectableRange, MarkedText::PaintPhase::Decoration);
     for (auto& markedText : MarkedText::subdivide(markedTexts, MarkedText::OverlapStrategy::Frontmost))
@@ -543,7 +568,7 @@
         paintPlatformDocumentMarker(markedText);
 }
 
-FloatRect TextBoxPainter::calculateUnionOfAllDocumentMarkerBounds(const LegacyInlineTextBox& textBox)
+FloatRect LegacyTextBoxPainter::calculateUnionOfAllDocumentMarkerBounds(const LegacyInlineTextBox& textBox)
 {
     // This must match paintPlatformDocumentMarkers().
     FloatRect result;
@@ -553,13 +578,14 @@
     return result;
 }
 
-void TextBoxPainter::paintPlatformDocumentMarker(const MarkedText& markedText)
+template<typename TextBoxPath>
+void TextBoxPainter<TextBoxPath>::paintPlatformDocumentMarker(const MarkedText& markedText)
 {
     // Never print spelling/grammar markers (5327887)
     if (m_document.printing())
         return;
 
-    auto bounds = calculateDocumentMarkerBounds(m_textBox, markedText);
+    auto bounds = calculateDocumentMarkerBounds(makeIterator(), markedText);
 
     auto lineStyleForMarkedTextType = [&]() -> DocumentMarkerLineStyle {
         bool shouldUseDarkAppearance = m_renderer.useDarkAppearance();
@@ -587,12 +613,13 @@
     m_paintInfo.context().drawDotsForDocumentMarker(bounds, lineStyleForMarkedTextType());
 }
 
-FloatRect TextBoxPainter::computePaintRect(const LayoutPoint& paintOffset)
+template<typename TextBoxPath>
+FloatRect TextBoxPainter<TextBoxPath>::computePaintRect(const LayoutPoint& paintOffset)
 {
     FloatPoint localPaintOffset(paintOffset);
 
     if (m_selectableRange.truncation) {
-        if (m_renderer.containingBlock()->style().isLeftToRightDirection() != textBox().isLeftToRightDirection()) {
+        if (m_renderer.containingBlock()->style().direction() != textBox().direction()) {
             // Make the visible fragment of text hug the edge closest to the rest of the run by moving the origin
             // at which we start drawing text.
             // e.g. In the case of LTR text truncated in an RTL Context, the correct behavior is:
@@ -601,21 +628,24 @@
             // farther to the right.
             // NOTE: WebKit's behavior differs from that of IE which appears to just overlay the ellipsis on top of the
             // truncated string i.e.  |Hello|CBA| -> |...lo|CBA|
-            LayoutUnit widthOfVisibleText { m_renderer.width(textBox().start(), *m_selectableRange.truncation, textPosition(m_textBox), m_isFirstLine) };
-            LayoutUnit widthOfHiddenText { textBox().logicalWidth() - widthOfVisibleText };
-            LayoutSize truncationOffset(textBox().isLeftToRightDirection() ? widthOfHiddenText : -widthOfHiddenText, 0_lu);
+            LayoutUnit widthOfVisibleText { m_renderer.width(textBox().start(), *m_selectableRange.truncation, textPosition(), m_isFirstLine) };
+            LayoutUnit widthOfHiddenText { m_logicalRect.width() - widthOfVisibleText };
+            LayoutSize truncationOffset(textBox().direction() == TextDirection::LTR ? widthOfHiddenText : -widthOfHiddenText, 0_lu);
             localPaintOffset.move(textBox().isHorizontal() ? truncationOffset : truncationOffset.transposedSize());
         }
     }
 
-    localPaintOffset.move(0, m_style.isHorizontalWritingMode() ? 0 : -textBox().logicalHeight());
+    localPaintOffset.move(0, m_style.isHorizontalWritingMode() ? 0 : -m_logicalRect.height());
 
-    auto boxOrigin = textBox().visualRect(textBox().lineBox()->containingBlock().logicalHeight()).location();
+    auto visualRect = textBox().visualRectIgnoringBlockDirection();
+    textBox().containingBlock().flipForWritingMode(visualRect);
+
+    auto boxOrigin = visualRect.location();
     boxOrigin.moveBy(localPaintOffset);
-    return { boxOrigin, FloatSize(textBox().logicalWidth(), textBox().logicalHeight()) };
+    return { boxOrigin, FloatSize(m_logicalRect.width(), m_logicalRect.height()) };
 }
 
-FloatRect TextBoxPainter::calculateDocumentMarkerBounds(const InlineIterator::TextBoxIterator& textBox, const MarkedText& markedText)
+FloatRect calculateDocumentMarkerBounds(const InlineIterator::TextBoxIterator& textBox, const MarkedText& markedText)
 {
     auto& font = textBox->fontCascade();
     auto ascent = font.metricsOfPrimaryFont().ascent();
@@ -634,7 +664,8 @@
     return FloatRect(0, y, textBox->logicalWidth(), height);
 }
 
-bool TextBoxPainter::computeHaveSelection() const
+template<typename TextBoxPath>
+bool TextBoxPainter<TextBoxPath>::computeHaveSelection() const
 {
     if (m_isPrinting || m_paintInfo.phase == PaintPhase::TextClip)
         return false;
@@ -642,15 +673,20 @@
     return m_renderer.view().selection().highlightStateForTextBox(m_renderer, m_selectableRange) != RenderObject::HighlightState::None;
 }
 
-const FontCascade& TextBoxPainter::fontCascade() const
+template<typename TextBoxPath>
+const FontCascade& TextBoxPainter<TextBoxPath>::fontCascade() const
 {
-    return m_textBox->fontCascade();
+    if (m_isCombinedText)
+        return downcast<RenderCombineText>(m_renderer).textCombineFont();
+
+    return m_textBox.style().fontCascade();
 }
 
-FloatPoint TextBoxPainter::textOriginFromPaintRect(const FloatRect& paintRect) const
+template<typename TextBoxPath>
+FloatPoint TextBoxPainter<TextBoxPath>::textOriginFromPaintRect(const FloatRect& paintRect) const
 {
     FloatPoint textOrigin { paintRect.x(), paintRect.y() + fontCascade().metricsOfPrimaryFont().ascent() };
-    if (textBox().isCombinedText()) {
+    if (m_isCombinedText) {
         if (auto newOrigin = downcast<RenderCombineText>(m_renderer).computeTextOrigin(paintRect))
             textOrigin = newOrigin.value();
     }
@@ -661,11 +697,12 @@
     return textOrigin;
 }
 
-const ShadowData* TextBoxPainter::debugTextShadow() const
+template<typename TextBoxPath>
+const ShadowData* TextBoxPainter<TextBoxPath>::debugTextShadow() const
 {
     if (!m_renderer.settings().legacyLineLayoutVisualCoverageEnabled())
         return nullptr;
-    if (!textBox().legacyInlineBox())
+    if constexpr (std::is_same_v<TextBoxPath, InlineIterator::BoxModernPath>)
         return nullptr;
 
     static NeverDestroyed<ShadowData> debugTextShadow(LengthPoint(Length(LengthType::Fixed), Length(LengthType::Fixed)), Length(10, LengthType::Fixed), Length(20, LengthType::Fixed), ShadowStyle::Normal, true, SRGBA<uint8_t> { 150, 0, 0, 190 });
@@ -672,4 +709,7 @@
     return &debugTextShadow.get();
 }
 
+template class TextBoxPainter<InlineIterator::BoxModernPath>;
+template class TextBoxPainter<InlineIterator::BoxLegacyPath>;
+
 }

Modified: trunk/Source/WebCore/rendering/TextBoxPainter.h (294382 => 294383)


--- trunk/Source/WebCore/rendering/TextBoxPainter.h	2022-05-18 04:47:20 UTC (rev 294382)
+++ trunk/Source/WebCore/rendering/TextBoxPainter.h	2022-05-18 06:26:53 UTC (rev 294383)
@@ -45,23 +45,18 @@
 struct PaintInfo;
 struct StyledMarkedText;
 
+template<typename TextBoxPath>
 class TextBoxPainter {
 public:
-    TextBoxPainter(const LegacyInlineTextBox&, PaintInfo&, const LayoutPoint& paintOffset);
-#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    TextBoxPainter(const LayoutIntegration::InlineContent&, const InlineDisplay::Box&, PaintInfo&, const LayoutPoint& paintOffset);
-#endif
-    TextBoxPainter(const InlineIterator::TextBoxIterator&, PaintInfo&, const LayoutPoint& paintOffset);
-
+    TextBoxPainter(TextBoxPath&&, PaintInfo&, const LayoutPoint& paintOffset);
     ~TextBoxPainter();
 
     void paint();
 
-    static FloatRect calculateUnionOfAllDocumentMarkerBounds(const LegacyInlineTextBox&);
+protected:
+    auto& textBox() const { return m_textBox; }
+    InlineIterator::TextBoxIterator makeIterator() const;
 
-private:
-    auto& textBox() const { return *m_textBox; }
-
     void paintBackground();
     void paintForegroundAndDecorations();
     void paintCompositionBackground();
@@ -78,8 +73,7 @@
     void paintCompositionUnderline(const CompositionUnderline&);
     void paintPlatformDocumentMarker(const MarkedText&);
 
-    static FloatRect calculateDocumentMarkerBounds(const InlineIterator::TextBoxIterator&, const MarkedText&);
-
+    float textPosition();
     FloatRect computePaintRect(const LayoutPoint& paintOffset);
     bool computeHaveSelection() const;
     MarkedText createMarkedTextFromSelectionInBox();
@@ -88,15 +82,17 @@
 
     const ShadowData* debugTextShadow() const;
 
-    const InlineIterator::TextBoxIterator m_textBox;
+    const TextBoxPath m_textBox;
     const RenderText& m_renderer;
     const Document& m_document;
     const RenderStyle& m_style;
+    const FloatRect m_logicalRect;
     const TextRun m_paintTextRun;
     PaintInfo& m_paintInfo;
     const TextBoxSelectableRange m_selectableRange;
     const FloatRect m_paintRect;
     const bool m_isFirstLine;
+    const bool m_isCombinedText;
     const bool m_isPrinting;
     const bool m_haveSelection;
     const bool m_containsComposition;
@@ -104,4 +100,18 @@
     std::optional<bool> m_emphasisMarkExistsAndIsAbove { };
 };
 
+class LegacyTextBoxPainter : public TextBoxPainter<InlineIterator::BoxLegacyPath> {
+public:
+    LegacyTextBoxPainter(const LegacyInlineTextBox&, PaintInfo&, const LayoutPoint& paintOffset);
+
+    static FloatRect calculateUnionOfAllDocumentMarkerBounds(const LegacyInlineTextBox&);
+};
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+class ModernTextBoxPainter : public TextBoxPainter<InlineIterator::BoxModernPath> {
+public:
+    ModernTextBoxPainter(const LayoutIntegration::InlineContent&, const InlineDisplay::Box&, PaintInfo&, const LayoutPoint& paintOffset);
+};
+#endif
+
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to