[webkit-changes] [WebKit/WebKit] 767777: [IFC][SVG text] Introduce SVGTextBoxPainter

Antti Koivisto noreply at github.com
Wed Sep 4 05:08:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 767777ed0249090184b0c4c1e80c2bae779627e8
      https://github.com/WebKit/WebKit/commit/767777ed0249090184b0c4c1e80c2bae779627e8
  Author: Antti Koivisto <antti at apple.com>
  Date:   2024-09-04 (Wed, 04 Sep 2024)

  Changed paths:
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/rendering/RenderInline.cpp
    M Source/WebCore/rendering/RenderInline.h
    M Source/WebCore/rendering/TextBoxPainter.cpp
    M Source/WebCore/rendering/TextBoxPainter.h
    M Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
    M Source/WebCore/rendering/svg/SVGInlineTextBox.h
    A Source/WebCore/rendering/svg/SVGTextBoxPainter.cpp
    A Source/WebCore/rendering/svg/SVGTextBoxPainter.h

  Log Message:
  -----------
  [IFC][SVG text] Introduce SVGTextBoxPainter
https://bugs.webkit.org/show_bug.cgi?id=279076
rdar://problem/135209196

Reviewed by Alan Baradlay.

Factor SVG text painting code out from SVGInlineTextBox.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline const):
(WebCore::RenderInline::paintOutline): Deleted.
* Source/WebCore/rendering/RenderInline.h:
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter<TextBoxPath>::selectionStartEnd const):
(WebCore::TextBoxPainter<TextBoxPath>::createMarkedTextFromSelectionInBox):
(WebCore::TextBoxPainter<TextBoxPath>::paintForegroundAndDecorations):
* Source/WebCore/rendering/TextBoxPainter.h:
* Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::SVGInlineTextBox):
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
(WebCore::textShouldBePainted): Deleted.
(WebCore::SVGInlineTextBox::acquirePaintingResource): Deleted.
(WebCore::SVGInlineTextBox::releasePaintingResource): Deleted.
(WebCore::SVGInlineTextBox::acquireLegacyPaintingResource): Deleted.
(WebCore::SVGInlineTextBox::releaseLegacyPaintingResource): Deleted.
(WebCore::positionOffsetForDecoration): Deleted.
(WebCore::thicknessForDecoration): Deleted.
(WebCore::findRendererDefininingTextDecoration): Deleted.
(WebCore::SVGInlineTextBox::paintDecoration): Deleted.
(WebCore::SVGInlineTextBox::paintDecorationWithStyle): Deleted.
(WebCore::SVGInlineTextBox::paintTextWithShadows): Deleted.
(WebCore::SVGInlineTextBox::paintText): Deleted.
* Source/WebCore/rendering/svg/SVGInlineTextBox.h:
* Source/WebCore/rendering/svg/SVGTextBoxPainter.cpp: Copied from Source/WebCore/rendering/svg/SVGInlineTextBox.cpp.
(WebCore::LegacySVGTextBoxPainter::LegacySVGTextBoxPainter):
(WebCore::SVGTextBoxPainter<TextBoxPath>::SVGTextBoxPainter):
(WebCore::SVGTextBoxPainter<TextBoxPath>::textBoxIterator const):
(WebCore::SVGTextBoxPainter<TextBoxPath>::renderer const):
(WebCore::SVGTextBoxPainter<TextBoxPath>::parentRenderer const):
(WebCore::SVGTextBoxPainter<TextBoxPath>::selectionRectForTextFragment const):
(WebCore::textShouldBePainted):
(WebCore::SVGTextBoxPainter<TextBoxPath>::paintSelectionBackground):
(WebCore::SVGTextBoxPainter<TextBoxPath>::paint):
(WebCore::SVGTextBoxPainter<TextBoxPath>::acquirePaintingResource):
(WebCore::SVGTextBoxPainter<TextBoxPath>::releasePaintingResource):
(WebCore::SVGTextBoxPainter<TextBoxPath>::acquireLegacyPaintingResource):
(WebCore::SVGTextBoxPainter<TextBoxPath>::releaseLegacyPaintingResource):
(WebCore::SVGTextBoxPainter<TextBoxPath>::mapStartEndPositionsIntoFragmentCoordinates const):
(WebCore::positionOffsetForDecoration):
(WebCore::thicknessForDecoration):
(WebCore::findRendererDefininingTextDecoration):
(WebCore::SVGTextBoxPainter<TextBoxPath>::paintDecoration):
(WebCore::SVGTextBoxPainter<TextBoxPath>::paintDecorationWithStyle):
(WebCore::SVGTextBoxPainter<TextBoxPath>::paintTextWithShadows):
(WebCore::SVGTextBoxPainter<TextBoxPath>::paintText):
(WebCore::SVGTextBoxPainter<TextBoxPath>::constructTextRun const):
* Source/WebCore/rendering/svg/SVGTextBoxPainter.h: Added.
(WebCore::SVGTextBoxPainter::paintingResourceMode const):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list