[webkit-changes] [WebKit/WebKit] 62b32c: Adopt more smart pointers in WidthIterator's Advan...

Chris Dumez noreply at github.com
Tue Oct 31 08:06:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 62b32c741b5a41decc45e9454ca68ab8999751b0
      https://github.com/WebKit/WebKit/commit/62b32c741b5a41decc45e9454ca68ab8999751b0
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-10-31 (Tue, 31 Oct 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/GlyphBuffer.h
    M Source/WebCore/platform/graphics/WidthIterator.cpp

  Log Message:
  -----------
  Adopt more smart pointers in WidthIterator's AdvanceInternalState & SmallCapsState
https://bugs.webkit.org/show_bug.cgi?id=263933

Reviewed by Ryosuke Niwa.

AdvanceInternalState & SmallCapsState are stack objects so we can use RefPtrs to Font
objects without risk of introducing reference cycles.

* Source/WebCore/platform/graphics/GlyphBuffer.h:
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::AdvanceInternalState::AdvanceInternalState):
(WebCore::AdvanceInternalState::updateFont):
(WebCore::WidthIterator::commitCurrentFontRange):
(WebCore::fontForRange):
(WebCore::WidthIterator::startNewFontRangeIfNeeded):
(WebCore::resetFontRangeIfNeeded):
(WebCore::WidthIterator::advanceInternal):

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




More information about the webkit-changes mailing list