[webkit-changes] [WebKit/WebKit] 49ce7d: [IFC][SVG text] Implement fragment-aware selections

Antti Koivisto noreply at github.com
Thu Dec 5 09:14:55 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 49ce7dd518bace2f6535229b4d55cf03ca9880c7
      https://github.com/WebKit/WebKit/commit/49ce7dd518bace2f6535229b4d55cf03ca9880c7
  Author: Antti Koivisto <antti at apple.com>
  Date:   2024-12-05 (Thu, 05 Dec 2024)

  Changed paths:
    M Source/WebCore/layout/integration/inline/InlineIteratorSVGTextBox.cpp
    M Source/WebCore/layout/integration/inline/InlineIteratorSVGTextBox.h
    M Source/WebCore/rendering/CaretRectComputation.cpp
    M Source/WebCore/rendering/RenderLineBreak.cpp
    M Source/WebCore/rendering/RenderText.cpp
    M Source/WebCore/rendering/svg/RenderSVGInlineText.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] Implement fragment-aware selections
https://bugs.webkit.org/show_bug.cgi?id=284102
rdar://140967464

Reviewed by Alan Baradlay.

Use the iterator and generalize SVG selection related functions.

* Source/WebCore/layout/integration/inline/InlineIteratorSVGTextBox.cpp:
(WebCore::InlineIterator::SVGTextBox::localSelectionRect const):
* Source/WebCore/layout/integration/inline/InlineIteratorSVGTextBox.h:
* Source/WebCore/rendering/CaretRectComputation.cpp:
(WebCore::computeCaretRectForSVGInlineText):
* Source/WebCore/rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::collectSelectionGeometries):
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::selectionRectForTextBox):
(WebCore::RenderText::collectSelectionGeometries):
(WebCore::characterRects):
* Source/WebCore/rendering/svg/RenderSVGInlineText.cpp:
(WebCore::offsetForPositionInFragment):
(WebCore::RenderSVGInlineText::positionForPoint):
* Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::SVGInlineTextBox):
(WebCore::SVGInlineTextBox::offsetForPositionInFragment const): Deleted.
(WebCore::SVGInlineTextBox::selectionRectForTextFragment const): Deleted.
(WebCore::SVGInlineTextBox::localSelectionRect const): Deleted.
(WebCore::SVGInlineTextBox::constructTextRun const): Deleted.
* Source/WebCore/rendering/svg/SVGInlineTextBox.h:
* Source/WebCore/rendering/svg/SVGTextBoxPainter.cpp:
(WebCore::selectionRectForTextFragment):
(WebCore::SVGTextBoxPainter<TextBoxPath>::paintSelectionBackground):
(WebCore::mapStartEndPositionsIntoFragmentCoordinates):
(WebCore::SVGTextBoxPainter<TextBoxPath>::paintText):
(WebCore::constructTextRun):
(WebCore::SVGTextBoxPainter<TextBoxPath>::selectionRectForTextFragment const): Deleted.
(WebCore::SVGTextBoxPainter<TextBoxPath>::mapStartEndPositionsIntoFragmentCoordinates const): Deleted.
(WebCore::SVGTextBoxPainter<TextBoxPath>::constructTextRun const): Deleted.

Expose these helper functions.

* Source/WebCore/rendering/svg/SVGTextBoxPainter.h:

Canonical link: https://commits.webkit.org/287407@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