[webkit-changes] [WebKit/WebKit] e8181f: Stop using CheckedPtr / CheckedRef with Font

Chris Dumez noreply at github.com
Thu Dec 21 07:05:30 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e8181f514fb98b0be7aa97d49f2af9f80b5fa5dd
      https://github.com/WebKit/WebKit/commit/e8181f514fb98b0be7aa97d49f2af9f80b5fa5dd
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-12-21 (Thu, 21 Dec 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h
    M Source/WebCore/platform/graphics/ComplexTextController.cpp
    M Source/WebCore/platform/graphics/ComplexTextController.h
    M Source/WebCore/platform/graphics/Font.h
    M Source/WebCore/platform/graphics/FontCascade.cpp
    M Source/WebCore/platform/graphics/FontCascade.h
    M Source/WebCore/platform/graphics/FontCascadeFonts.cpp
    M Source/WebCore/platform/graphics/FontCascadeFonts.h
    M Source/WebCore/platform/graphics/GlyphPage.h
    M Source/WebCore/platform/graphics/WidthIterator.cpp
    M Source/WebCore/platform/graphics/WidthIterator.h
    M Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
    M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
    M Source/WebCore/rendering/LegacyInlineFlowBox.h
    M Source/WebCore/rendering/LegacyLineLayout.cpp
    M Source/WebCore/rendering/LegacyRootInlineBox.cpp
    M Source/WebCore/rendering/RenderText.cpp
    M Source/WebCore/rendering/RenderText.h
    M Source/WebCore/rendering/RenderTextInlines.h
    M Source/WebCore/rendering/line/BreakingContext.h
    M Source/WebCore/rendering/line/WordTrailingSpace.h

  Log Message:
  -----------
  Stop using CheckedPtr / CheckedRef with Font
https://bugs.webkit.org/show_bug.cgi?id=266704

Reviewed by Darin Adler.

Stop using CheckedPtr / CheckedRef with Font. Using WeakPtr / WeakRef instead
of generate more actionable crashes.

This tested as performance neutral on Speedometer.

* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::fallbackFontsForRunWithIterator):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h:
* Source/WebCore/platform/graphics/ComplexTextController.cpp:
(WebCore::TextLayout::width):
(WebCore::FontCascade::width):
(WebCore::ComplexTextController::ComplexTextController):
(WebCore::ComplexTextController::advance):
* Source/WebCore/platform/graphics/ComplexTextController.h:
* Source/WebCore/platform/graphics/Font.h:
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::widthOfTextRange const):
(WebCore::FontCascade::width const):
(WebCore::FontCascade::emphasisMarkAscent const):
(WebCore::FontCascade::emphasisMarkDescent const):
(WebCore::FontCascade::drawEmphasisMarks const):
(WebCore::FontCascade::floatWidthForSimpleText const):
(WebCore::FontCascade::floatWidthForComplexText const):
* Source/WebCore/platform/graphics/FontCascade.h:
* Source/WebCore/platform/graphics/FontCascadeFonts.cpp:
* Source/WebCore/platform/graphics/FontCascadeFonts.h:
* Source/WebCore/platform/graphics/GlyphPage.h:
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
* Source/WebCore/platform/graphics/WidthIterator.h:
* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::requiresIdeographicBaseline const):
* Source/WebCore/rendering/LegacyInlineFlowBox.h:
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::ascentAndDescentForBox const):
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache const):
(WebCore::RenderText::widthFromCacheConsideringPossibleTrailingSpace const):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::maxWordFragmentWidth):
(WebCore::RenderText::width const):
* Source/WebCore/rendering/RenderText.h:
* Source/WebCore/rendering/RenderTextInlines.h:
(WebCore::RenderText::measureTextConsideringPossibleTrailingSpace):
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::measureHyphenWidth):
(WebCore::textWidth):
(WebCore::tryHyphenating):
(WebCore::BreakingContext::textWidthConsideringPossibleTrailingSpace):
(WebCore::BreakingContext::computeAdditionalBetweenWordsWidth):
(WebCore::BreakingContext::handleText):
* Source/WebCore/rendering/line/WordTrailingSpace.h:
(WebCore::WordTrailingSpace::width):

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




More information about the webkit-changes mailing list