Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d451c7bd69057a86cd6e4bd733ac94fc215ed915
      
https://github.com/WebKit/WebKit/commit/d451c7bd69057a86cd6e4bd733ac94fc215ed915
  Author: Antti Koivisto <an...@apple.com>
  Date:   2024-12-04 (Wed, 04 Dec 2024)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/Headers.cmake
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/layout/integration/LayoutIntegrationBoxGeometryUpdater.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
    M Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h
    M Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h
    M Source/WebCore/layout/integration/inline/InlineIteratorSVGTextBox.cpp
    M Source/WebCore/layout/integration/inline/InlineIteratorSVGTextBox.h
    M 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
    M Source/WebCore/rendering/svg/RenderSVGText.cpp
    M Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
    M Source/WebCore/rendering/svg/SVGInlineTextBox.h
    M Source/WebCore/rendering/svg/SVGTextBoxPainter.cpp
    M Source/WebCore/rendering/svg/SVGTextBoxPainter.h

  Log Message:
  -----------
  [IFC][SVG text] Layout and paint using IFC
https://bugs.webkit.org/show_bug.cgi?id=284031
rdar://140907758

Reviewed by Alan Baradlay.

Also add a setting. It is not enabled yet.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/integration/LayoutIntegrationBoxGeometryUpdater.cpp:
(WebCore::LayoutIntegration::BoxGeometryUpdater::formattingContextConstraints):

No horizontal constraint, everything is on a single line.

* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForLineLayout):
* Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h:
(WebCore::InlineIterator::BoxLegacyPath::svgTextFragments const):
(WebCore::InlineIterator::BoxLegacyPath::svgInlineTextBox const):
* Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h:
(WebCore::InlineIterator::BoxModernPath::traverseNextBoxOnLineSkippingChildren):
(WebCore::InlineIterator::BoxModernPath::svgTextFragments const):
(WebCore::InlineIterator::BoxModernPath::boxIndex const):
(WebCore::InlineIterator::BoxModernPath::isWithinInlineBox):

Root inline boxes have the block box as a layout box. Only bail after testing.

* Source/WebCore/layout/integration/inline/InlineIteratorSVGTextBox.cpp:
(WebCore::InlineIterator::SVGTextBox::calculateBoundariesIncludingSVGTransform 
const):

Copy from the legacy inline box.

(WebCore::InlineIterator::SVGTextBox::textFragments const):
(WebCore::InlineIterator::svgTextBoxFor):
* Source/WebCore/layout/integration/inline/InlineIteratorSVGTextBox.h:

Save SVG text fragments per-box to a vector in InlineContent.

* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::applySVGTextFragments):

Apply the computed fragments to InlineContent.

* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::computePerCharacterLayoutInformation):

Apply the fragments and compute box position and size after layout.

(WebCore::RenderSVGText::paintInlineChildren):

Paint IFC boxes with the painter.

* Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::setTextFragments):
* Source/WebCore/rendering/svg/SVGInlineTextBox.h:
* Source/WebCore/rendering/svg/SVGTextBoxPainter.cpp:
(WebCore::ModernSVGTextBoxPainter::ModernSVGTextBoxPainter):
* Source/WebCore/rendering/svg/SVGTextBoxPainter.h:

Canonical link: https://commits.webkit.org/287350@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to