[webkit-changes] [WebKit/WebKit] 1378f6: Use WeakHashSet<const Font> instead of HashSet<con...

Chris Dumez noreply at github.com
Tue Sep 12 10:19:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1378f6bba1656b4bd49f19ae370e844c0e163935
      https://github.com/WebKit/WebKit/commit/1378f6bba1656b4bd49f19ae370e844c0e163935
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
    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/WidthIterator.cpp
    M Source/WebCore/platform/graphics/WidthIterator.h
    M Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
    M Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.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:
  -----------
  Use WeakHashSet<const Font> instead of HashSet<const Font*> for extra safety
https://bugs.webkit.org/show_bug.cgi?id=261436

Reviewed by Darin Adler.

* Source/WTF/wtf/WeakHashSet.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::collectFallbackFonts):
(WebCore::Layout::LineBoxBuilder::enclosingAscentDescentWithFallbackFonts const):
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::adjustInlineBoxHeightsForLineBoxContainIfApplicable):
(WebCore::Layout::LineBoxBuilder::adjustIdeographicBaselineIfApplicable):
* 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::floatWidthForSimpleText const):
(WebCore::FontCascade::floatWidthForComplexText const):
* Source/WebCore/platform/graphics/FontCascade.h:
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::commitCurrentFontRange):
* Source/WebCore/platform/graphics/WidthIterator.h:
* Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* 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/267905@main




More information about the webkit-changes mailing list