Changeset 181090 in webkit


Ignore:
Timestamp:
Mar 5, 2015 11:51:05 AM (9 years ago)
Author:
mmaxfield@apple.com
Message:

Mechanical text-related cleanup
https://bugs.webkit.org/show_bug.cgi?id=142326

Reviewed by Andreas Kling.

Use nullptr instead of 0.
Use references instead of pointers.

No new tests because there is no behavior change.

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::adjustSelectionRectForComplexText):
(WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
(WebCore::FontCascade::floatWidthForComplexText):
(WebCore::FontCascade::offsetForPositionForComplexText):

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::TextLayout::TextLayout):
(WebCore::ComplexTextController::ComplexTextController):

  • platform/graphics/mac/ComplexTextController.h:
  • rendering/InlineIterator.h:

(WebCore::InlineIterator::InlineIterator):
(WebCore::InlineIterator::clear):
(WebCore::bidiNextShared):
(WebCore::bidiNextSkippingEmptyInlines):
(WebCore::bidiNextIncludingEmptyInlines):
(WebCore::InlineWalker::InlineWalker):
(WebCore::InlineIterator::increment):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::setLogicalWidthForTextRun):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):

  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::measureHyphenWidth):
(WebCore::textWidth):
(WebCore::tryHyphenating):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181087 r181090  
     12015-03-05  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Mechanical text-related cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=142326
     5
     6        Reviewed by Andreas Kling.
     7
     8        Use nullptr instead of 0.
     9        Use references instead of pointers.
     10
     11        No new tests because there is no behavior change.
     12
     13        * platform/graphics/cocoa/FontCascadeCocoa.mm:
     14        (WebCore::FontCascade::adjustSelectionRectForComplexText):
     15        (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
     16        (WebCore::FontCascade::floatWidthForComplexText):
     17        (WebCore::FontCascade::offsetForPositionForComplexText):
     18        * platform/graphics/mac/ComplexTextController.cpp:
     19        (WebCore::TextLayout::TextLayout):
     20        (WebCore::ComplexTextController::ComplexTextController):
     21        * platform/graphics/mac/ComplexTextController.h:
     22        * rendering/InlineIterator.h:
     23        (WebCore::InlineIterator::InlineIterator):
     24        (WebCore::InlineIterator::clear):
     25        (WebCore::bidiNextShared):
     26        (WebCore::bidiNextSkippingEmptyInlines):
     27        (WebCore::bidiNextIncludingEmptyInlines):
     28        (WebCore::InlineWalker::InlineWalker):
     29        (WebCore::InlineIterator::increment):
     30        * rendering/RenderBlockLineLayout.cpp:
     31        (WebCore::setLogicalWidthForTextRun):
     32        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
     33        * rendering/line/BreakingContextInlineHeaders.h:
     34        (WebCore::measureHyphenWidth):
     35        (WebCore::textWidth):
     36        (WebCore::tryHyphenating):
     37        (WebCore::BreakingContext::handleText):
     38        (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
     39
    1402015-03-05  Brent Fulgham  <bfulgham@apple.com>
    241
  • trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm

    r179451 r181090  
    590590void FontCascade::adjustSelectionRectForComplexText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
    591591{
    592     ComplexTextController controller(this, run);
     592    ComplexTextController controller(*this, run);
    593593    controller.advance(from);
    594594    float beforeWidth = controller.runWidthSoFar();
     
    607607    float initialAdvance;
    608608
    609     ComplexTextController controller(this, run, false, 0, forTextEmphasis);
     609    ComplexTextController controller(*this, run, false, 0, forTextEmphasis);
    610610    controller.advance(from);
    611611    float beforeWidth = controller.runWidthSoFar();
     
    657657float FontCascade::floatWidthForComplexText(const TextRun& run, HashSet<const Font*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
    658658{
    659     ComplexTextController controller(this, run, true, fallbackFonts);
     659    ComplexTextController controller(*this, run, true, fallbackFonts);
    660660    if (glyphOverflow) {
    661661        glyphOverflow->top = std::max<int>(glyphOverflow->top, ceilf(-controller.minGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().ascent()));
     
    669669int FontCascade::offsetForPositionForComplexText(const TextRun& run, float x, bool includePartialGlyphs) const
    670670{
    671     ComplexTextController controller(this, run);
     671    ComplexTextController controller(*this, run);
    672672    return controller.offsetForPosition(x, includePartialGlyphs);
    673673}
  • trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp

    r180779 r181090  
    5454        : m_font(font)
    5555        , m_run(constructTextRun(text, font, xPos))
    56         , m_controller(std::make_unique<ComplexTextController>(&m_font, m_run, true))
     56        , m_controller(std::make_unique<ComplexTextController>(m_font, m_run, true))
    5757    {
    5858    }
     
    117117}
    118118
    119 ComplexTextController::ComplexTextController(const FontCascade* font, const TextRun& run, bool mayUseNaturalWritingDirection, HashSet<const Font*>* fallbackFonts, bool forTextEmphasis)
    120     : m_font(*font)
     119ComplexTextController::ComplexTextController(const FontCascade& font, const TextRun& run, bool mayUseNaturalWritingDirection, HashSet<const Font*>* fallbackFonts, bool forTextEmphasis)
     120    : m_font(font)
    121121    , m_run(run)
    122122    , m_isLTROnly(true)
  • trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.h

    r178940 r181090  
    5151class ComplexTextController {
    5252public:
    53     ComplexTextController(const FontCascade*, const TextRun&, bool mayUseNaturalWritingDirection = false, HashSet<const Font*>* fallbackFonts = 0, bool forTextEmphasis = false);
     53    ComplexTextController(const FontCascade&, const TextRun&, bool mayUseNaturalWritingDirection = false, HashSet<const Font*>* fallbackFonts = 0, bool forTextEmphasis = false);
    5454
    5555    // Advance and emit glyphs up to the specified character.
  • trunk/Source/WebCore/rendering/InlineIterator.h

    r174714 r181090  
    3838public:
    3939    InlineIterator()
    40         : m_root(0)
    41         , m_renderer(0)
     40        : m_root(nullptr)
     41        , m_renderer(nullptr)
    4242        , m_nextBreakablePosition(-1)
    4343        , m_pos(0)
     
    5555    }
    5656
    57     void clear() { moveTo(0, 0); }
     57    void clear() { moveTo(nullptr, 0); }
    5858
    5959    void moveToStartOf(RenderObject* object)
     
    8080
    8181    void fastIncrementInTextNode();
    82     void increment(InlineBidiResolver* = 0);
     82    void increment(InlineBidiResolver* = nullptr);
    8383    void fastDecrement();
    8484    bool atEnd() const;
     
    213213// a bidi resolver as it enters/exits inlines (so it can push/pop embedding levels).
    214214template <class Observer>
    215 static inline RenderObject* bidiNextShared(RenderElement& root, RenderObject* current, Observer* observer = 0, EmptyInlineBehavior emptyInlineBehavior = SkipEmptyInlines, bool* endOfInlinePtr = 0)
     215static inline RenderObject* bidiNextShared(RenderElement& root, RenderObject* current, Observer* observer = nullptr, EmptyInlineBehavior emptyInlineBehavior = SkipEmptyInlines, bool* endOfInlinePtr = nullptr)
    216216{
    217217    RenderObject* next = nullptr;
     
    279279static inline RenderObject* bidiNextSkippingEmptyInlines(RenderElement& root, RenderObject* current)
    280280{
    281     InlineBidiResolver* observer = 0;
     281    InlineBidiResolver* observer = nullptr;
    282282    return bidiNextSkippingEmptyInlines(root, current, observer);
    283283}
    284284
    285 static inline RenderObject* bidiNextIncludingEmptyInlines(RenderElement& root, RenderObject* current, bool* endOfInlinePtr = 0)
    286 {
    287     InlineBidiResolver* observer = 0; // Callers who include empty inlines, never use an observer.
     285static inline RenderObject* bidiNextIncludingEmptyInlines(RenderElement& root, RenderObject* current, bool* endOfInlinePtr = nullptr)
     286{
     287    InlineBidiResolver* observer = nullptr; // Callers who include empty inlines, never use an observer.
    288288    return bidiNextShared(root, current, observer, IncludeEmptyInlines, endOfInlinePtr);
    289289}
     
    354354    InlineWalker(RenderElement& root)
    355355        : m_root(root)
    356         , m_current(0)
     356        , m_current(nullptr)
    357357        , m_atEndOfInline(false)
    358358    {
     
    388388            return;
    389389    }
    390     // bidiNext can return 0, so use moveTo instead of moveToStartOf
     390    // bidiNext can return nullptr, so use moveTo instead of moveToStartOf
    391391    moveTo(bidiNextSkippingEmptyInlines(*m_root, m_renderer, resolver), 0);
    392392}
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r180278 r181090  
    456456}
    457457
    458 static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* run, RenderText* renderer, float xPos, const LineInfo& lineInfo,
     458static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* run, RenderText& renderer, float xPos, const LineInfo& lineInfo,
    459459    GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache, WordMeasurements& wordMeasurements)
    460460{
     
    462462    GlyphOverflow glyphOverflow;
    463463
    464     const FontCascade& font = lineStyle(*renderer->parent(), lineInfo).fontCascade();
     464    const FontCascade& font = lineStyle(*renderer.parent(), lineInfo).fontCascade();
    465465    // Always compute glyph overflow if the block's line-box-contain value is "glyphs".
    466466    if (lineBox->fitsToGlyphs()) {
     
    484484
    485485    bool kerningIsEnabled = font.typesettingFeatures() & Kerning;
    486     bool canUseSimpleFontCodePath = renderer->canUseSimpleFontCodePath();
     486    bool canUseSimpleFontCodePath = renderer.canUseSimpleFontCodePath();
    487487   
    488488    // Since we don't cache glyph overflows, we need to re-measure the run if
     
    495495            if (wordMeasurement.width <= 0 || wordMeasurement.startOffset == wordMeasurement.endOffset)
    496496                continue;
    497             if (wordMeasurement.renderer != renderer || wordMeasurement.startOffset != lastEndOffset || wordMeasurement.endOffset > run->m_stop)
     497            if (wordMeasurement.renderer != &renderer || wordMeasurement.startOffset != lastEndOffset || wordMeasurement.endOffset > run->m_stop)
    498498                continue;
    499499
     
    502502                int wordLength = lastEndOffset - wordMeasurement.startOffset;
    503503                GlyphOverflow overflow;
    504                 measuredWidth += renderer->width(wordMeasurement.startOffset, wordLength, xPos + measuredWidth, lineInfo.isFirstLine(),
     504                measuredWidth += renderer.width(wordMeasurement.startOffset, wordLength, xPos + measuredWidth, lineInfo.isFirstLine(),
    505505                    &wordMeasurement.fallbackFonts, &overflow);
    506                 UChar c = renderer->characterAt(wordMeasurement.startOffset);
     506                UChar c = renderer.characterAt(wordMeasurement.startOffset);
    507507                if (i > 0 && wordLength == 1 && (c == ' ' || c == '\t'))
    508                     measuredWidth += renderer->style().fontCascade().wordSpacing();
     508                    measuredWidth += renderer.style().fontCascade().wordSpacing();
    509509            } else
    510510                measuredWidth += wordMeasurement.width;
     
    523523
    524524    if (!measuredWidth)
    525         measuredWidth = renderer->width(run->m_start, run->m_stop - run->m_start, xPos, lineInfo.isFirstLine(), &fallbackFonts, &glyphOverflow);
     525        measuredWidth = renderer.width(run->m_start, run->m_stop - run->m_start, xPos, lineInfo.isFirstLine(), &fallbackFonts, &glyphOverflow);
    526526
    527527    run->box()->setLogicalWidth(measuredWidth + hyphenWidth);
     
    535535
    536536    // Include text decoration visual overflow as part of the glyph overflow.
    537     if (renderer->style().textDecorationsInEffect() != TextDecorationNone)
     537    if (renderer.style().textDecorationsInEffect() != TextDecorationNone)
    538538        glyphOverflow.extendTo(visualOverflowForDecorations(run->box()->lineStyle(), downcast<InlineTextBox>(run->box())));
    539539
     
    748748            }
    749749
    750             setLogicalWidthForTextRun(lineBox, run, &renderText, totalLogicalWidth, lineInfo, textBoxDataMap, verticalPositionCache, wordMeasurements);
     750            setLogicalWidthForTextRun(lineBox, run, renderText, totalLogicalWidth, lineInfo, textBoxDataMap, verticalPositionCache, wordMeasurements);
    751751        } else {
    752752            bool encounteredJustifiedRuby = false;
  • trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h

    r181013 r181090  
    558558}
    559559
    560 inline float measureHyphenWidth(RenderText* renderer, const FontCascade& font, HashSet<const Font*>* fallbackFonts = 0)
    561 {
    562     const RenderStyle& style = renderer->style();
    563     return font.width(RenderBlock::constructTextRun(renderer, font, style.hyphenString().string(), style), fallbackFonts);
    564 }
    565 
    566 ALWAYS_INLINE float textWidth(RenderText* text, unsigned from, unsigned len, const FontCascade& font, float xPos, bool isFixedPitch, bool collapseWhiteSpace, HashSet<const Font*>& fallbackFonts, TextLayout* layout = 0)
    567 {
    568     const RenderStyle& style = text->style();
     560inline float measureHyphenWidth(RenderText& renderer, const FontCascade& font, HashSet<const Font*>* fallbackFonts = 0)
     561{
     562    const RenderStyle& style = renderer.style();
     563    return font.width(RenderBlock::constructTextRun(&renderer, font, style.hyphenString().string(), style), fallbackFonts);
     564}
     565
     566ALWAYS_INLINE float textWidth(RenderText& text, unsigned from, unsigned len, const FontCascade& font, float xPos, bool isFixedPitch, bool collapseWhiteSpace, HashSet<const Font*>& fallbackFonts, TextLayout* layout = nullptr)
     567{
     568    const RenderStyle& style = text.style();
    569569
    570570    GlyphOverflow glyphOverflow;
    571     if (isFixedPitch || (!from && len == text->textLength()) || style.hasTextCombine())
    572         return text->width(from, len, font, xPos, &fallbackFonts, &glyphOverflow);
     571    if (isFixedPitch || (!from && len == text.textLength()) || style.hasTextCombine())
     572        return text.width(from, len, font, xPos, &fallbackFonts, &glyphOverflow);
    573573
    574574    if (layout)
    575575        return FontCascade::width(*layout, from, len, &fallbackFonts);
    576576
    577     TextRun run = RenderBlock::constructTextRun(text, font, text, from, len, style);
    578     run.setCharactersLength(text->textLength() - from);
     577    TextRun run = RenderBlock::constructTextRun(&text, font, &text, from, len, style);
     578    run.setCharactersLength(text.textLength() - from);
    579579    ASSERT(run.charactersLength() >= run.length());
    580580
    581     run.setCharacterScanForCodePath(!text->canUseSimpleFontCodePath());
     581    run.setCharacterScanForCodePath(!text.canUseSimpleFontCodePath());
    582582    run.setTabSize(!collapseWhiteSpace, style.tabSize());
    583583    run.setXPos(xPos);
     
    593593}
    594594
    595 inline void tryHyphenating(RenderText* text, const FontCascade& font, const AtomicString& localeIdentifier, unsigned consecutiveHyphenatedLines, int consecutiveHyphenatedLinesLimit, int minimumPrefixLimit, int minimumSuffixLimit, unsigned lastSpace, unsigned pos, float xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated)
     595inline void tryHyphenating(RenderText& text, const FontCascade& font, const AtomicString& localeIdentifier, unsigned consecutiveHyphenatedLines, int consecutiveHyphenatedLinesLimit, int minimumPrefixLimit, int minimumSuffixLimit, unsigned lastSpace, unsigned pos, float xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated)
    596596{
    597597    // Map 'hyphenate-limit-{before,after}: auto;' to 2.
     
    623623        return;
    624624
    625     const RenderStyle& style = text->style();
    626     TextRun run = RenderBlock::constructTextRun(text, font, text, lastSpace, pos - lastSpace, style);
    627     run.setCharactersLength(text->textLength() - lastSpace);
     625    const RenderStyle& style = text.style();
     626    TextRun run = RenderBlock::constructTextRun(&text, font, &text, lastSpace, pos - lastSpace, style);
     627    run.setCharactersLength(text.textLength() - lastSpace);
    628628    ASSERT(run.charactersLength() >= run.length());
    629629
     
    635635        return;
    636636
    637     prefixLength = lastHyphenLocation(StringView(text->text()).substring(lastSpace, pos - lastSpace), std::min(prefixLength, pos - lastSpace - minimumSuffixLength) + 1, localeIdentifier);
     637    prefixLength = lastHyphenLocation(StringView(text.text()).substring(lastSpace, pos - lastSpace), std::min(prefixLength, pos - lastSpace - minimumSuffixLength) + 1, localeIdentifier);
    638638    if (!prefixLength || prefixLength < minimumPrefixLength)
    639639        return;
     
    642642    // space, it should not count towards hyphenate-limit-before.
    643643    if (prefixLength == minimumPrefixLength) {
    644         UChar characterAtLastSpace = text->characterAt(lastSpace);
     644        UChar characterAtLastSpace = text.characterAt(lastSpace);
    645645        if (characterAtLastSpace == ' ' || characterAtLastSpace == '\n' || characterAtLastSpace == '\t' || characterAtLastSpace == noBreakSpace)
    646646            return;
     
    657657#endif
    658658
    659     lineBreak.moveTo(text, lastSpace + prefixLength, nextBreakable);
     659    lineBreak.moveTo(&text, lastSpace + prefixLength, nextBreakable);
    660660    hyphenated = true;
    661661}
     
    743743
    744744        if (c == softHyphen && m_autoWrap && !hyphenWidth && style.hyphens() != HyphensNone) {
    745             hyphenWidth = measureHyphenWidth(&renderText, font, &fallbackFonts);
     745            hyphenWidth = measureHyphenWidth(renderText, font, &fallbackFonts);
    746746            m_width.addUncommittedWidth(hyphenWidth);
    747747        }
     
    754754            wrapW += charWidth;
    755755            bool midWordBreakIsBeforeSurrogatePair = U16_IS_LEAD(c) && m_current.offset() + 1 < renderText.textLength() && U16_IS_TRAIL(renderText[m_current.offset() + 1]);
    756             charWidth = textWidth(&renderText, m_current.offset(), midWordBreakIsBeforeSurrogatePair ? 2 : 1, font, m_width.committedWidth() + wrapW, isFixedPitch, m_collapseWhiteSpace, fallbackFonts, textLayout);
     756            charWidth = textWidth(renderText, m_current.offset(), midWordBreakIsBeforeSurrogatePair ? 2 : 1, font, m_width.committedWidth() + wrapW, isFixedPitch, m_collapseWhiteSpace, fallbackFonts, textLayout);
    757757            midWordBreak = m_width.committedWidth() + wrapW + charWidth > m_width.availableWidth();
    758758        }
     
    791791            float additionalTempWidth;
    792792            if (wordTrailingSpaceWidth && c == ' ')
    793                 additionalTempWidth = textWidth(&renderText, lastSpace, m_current.offset() + 1 - lastSpace, font, m_width.currentWidth(), isFixedPitch, m_collapseWhiteSpace, wordMeasurement.fallbackFonts, textLayout) - wordTrailingSpaceWidth;
     793                additionalTempWidth = textWidth(renderText, lastSpace, m_current.offset() + 1 - lastSpace, font, m_width.currentWidth(), isFixedPitch, m_collapseWhiteSpace, wordMeasurement.fallbackFonts, textLayout) - wordTrailingSpaceWidth;
    794794            else
    795                 additionalTempWidth = textWidth(&renderText, lastSpace, m_current.offset() - lastSpace, font, m_width.currentWidth(), isFixedPitch, m_collapseWhiteSpace, wordMeasurement.fallbackFonts, textLayout);
     795                additionalTempWidth = textWidth(renderText, lastSpace, m_current.offset() - lastSpace, font, m_width.currentWidth(), isFixedPitch, m_collapseWhiteSpace, wordMeasurement.fallbackFonts, textLayout);
    796796
    797797            if (wordMeasurement.fallbackFonts.isEmpty() && !fallbackFonts.isEmpty())
     
    821821                bool lineWasTooWide = false;
    822822                if (m_width.fitsOnLine() && m_currentCharacterIsWS && m_currentStyle->breakOnlyAfterWhiteSpace() && !midWordBreak) {
    823                     float charWidth = textWidth(&renderText, m_current.offset(), 1, font, m_width.currentWidth(), isFixedPitch, m_collapseWhiteSpace, wordMeasurement.fallbackFonts, textLayout) + (applyWordSpacing ? wordSpacing : 0);
     823                    float charWidth = textWidth(renderText, m_current.offset(), 1, font, m_width.currentWidth(), isFixedPitch, m_collapseWhiteSpace, wordMeasurement.fallbackFonts, textLayout) + (applyWordSpacing ? wordSpacing : 0);
    824824                    // Check if line is too big even without the extra space
    825825                    // at the end of the line. If it is not, do nothing.
     
    838838                    if (canHyphenate && !m_width.fitsOnLine()) {
    839839                        m_lineBreakHistory.push([&](InlineIterator& modifyMe) {
    840                             tryHyphenating(&renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, modifyMe, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated);
     840                            tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, modifyMe, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated);
    841841                        });
    842842                        if (m_lineBreaker.m_hyphenated) {
     
    971971
    972972    // IMPORTANT: current.m_pos is > length here!
    973     float additionalTempWidth = m_ignoringSpaces ? 0 : textWidth(&renderText, lastSpace, m_current.offset() - lastSpace, font, m_width.currentWidth(), isFixedPitch, m_collapseWhiteSpace, wordMeasurement.fallbackFonts, textLayout);
     973    float additionalTempWidth = m_ignoringSpaces ? 0 : textWidth(renderText, lastSpace, m_current.offset() - lastSpace, font, m_width.currentWidth(), isFixedPitch, m_collapseWhiteSpace, wordMeasurement.fallbackFonts, textLayout);
    974974    wordMeasurement.startOffset = lastSpace;
    975975    wordMeasurement.endOffset = m_current.offset();
     
    992992        if (canHyphenate) {
    993993            m_lineBreakHistory.push([&](InlineIterator& modifyMe) {
    994                 tryHyphenating(&renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, modifyMe, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated);
     994                tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, modifyMe, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated);
    995995            });
    996996        }
     
    11871187        if (candidate.renderer() != lineBreak.renderer())
    11881188            return best;
    1189         float width = textWidth(&renderText, candidate.offset(), renderText.textLength() - candidate.offset(), font, 0, font.isFixedPitch(), m_collapseWhiteSpace, dummyFonts);
     1189        float width = textWidth(renderText, candidate.offset(), renderText.textLength() - candidate.offset(), font, 0, font.isFixedPitch(), m_collapseWhiteSpace, dummyFonts);
    11901190        if (width > m_width.availableWidth())
    11911191            return best;
Note: See TracChangeset for help on using the changeset viewer.