Ignore:
Timestamp:
May 20, 2022, 7:33:42 PM (3 years ago)
Author:
[email protected]
Message:

Convert ExpansionBehavior to a struct of left/right expansion behaviors
https://bugs.webkit.org/show_bug.cgi?id=240554

Patch by Kiet Ho <Kiet Ho> on 2022-05-20
Reviewed by Myles C. Maxfield.

  • Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:

(TestWebKitAPI::TEST_F):

  • Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:

(WebKit::WebPopupMenu::setUpPlatformData):

No new tests, no functional changes made.

  • Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):

  • Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawText):
(WebCore::CanvasRenderingContext2DBase::measureTextInternal):

  • Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::applyRunExpansion):

  • Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h:
  • Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::fallbackFontsForText):

  • Source/WebCore/platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

  • Source/WebCore/platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::expansionOpportunityCountInternal):

  • Source/WebCore/platform/graphics/TextRun.h:

(WebCore::TextRun::TextRun):

  • Source/WebCore/platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::calculateAdditionalWidth const):

  • Source/WebCore/platform/text/TextFlags.h:

(WebCore::ExpansionBehavior::ExpansionBehavior):
(WebCore::ExpansionBehavior::allowLeftOnly):
(WebCore::ExpansionBehavior::forceLeftOnly):
(WebCore::ExpansionBehavior::allowRightOnly):

  • Source/WebCore/platform/win/PopupMenuWin.cpp:

(WebCore::PopupMenuWin::paint):

  • Source/WebCore/rendering/LegacyEllipsisBox.cpp:

(WebCore::LegacyEllipsisBox::paint):
(WebCore::LegacyEllipsisBox::selectionRect const):
(WebCore::LegacyEllipsisBox::paintSelection):

  • Source/WebCore/rendering/LegacyInlineTextBox.cpp:

(WebCore::LegacyInlineTextBox::expansionBehavior const):

  • Source/WebCore/rendering/LegacyLineLayout.cpp:

(WebCore::expansionBehaviorForInlineTextBox):
(WebCore::applyExpansionBehavior):

  • Source/WebCore/rendering/RenderBlock.h:
  • Source/WebCore/rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths const):

  • Source/WebCore/rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced):

  • Source/WebCore/rendering/RenderListBox.cpp:

(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):

  • Source/WebCore/rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::getAverageCharWidth):

  • Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::constructTextRun const):

  • Source/WebCore/rendering/svg/SVGTextMetrics.cpp:

(WebCore::SVGTextMetrics::constructTextRun):

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r294195 r294607  
    149149    const String str = String(&ch, 1);
    150150    const FontCascade& font = style().fontCascade();
    151     TextRun textRun = constructTextRun(str, style(), AllowRightExpansion);
     151    TextRun textRun = constructTextRun(str, style(), ExpansionBehavior::allowRightOnly());
    152152    return font.width(textRun);
    153153}
Note: See TracChangeset for help on using the changeset viewer.