Changeset 256499 in webkit


Ignore:
Timestamp:
Feb 12, 2020 6:47:01 PM (4 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Remove LineLayoutContext::m_partialTrailingTextItem
https://bugs.webkit.org/show_bug.cgi?id=207670
<rdar://problem/59405854>

Reviewed by Antti Koivisto.

LineBuilder::Run does not hold a reference to these InlineItems anymore.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::commitPartialContent):

  • layout/inlineformatting/LineLayoutContext.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r256497 r256499  
     12020-02-12  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Remove LineLayoutContext::m_partialTrailingTextItem
     4        https://bugs.webkit.org/show_bug.cgi?id=207670
     5        <rdar://problem/59405854>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        LineBuilder::Run does not hold a reference to these InlineItems anymore.
     10
     11        * layout/inlineformatting/LineLayoutContext.cpp:
     12        (WebCore::Layout::LineLayoutContext::layoutLine):
     13        (WebCore::Layout::LineLayoutContext::commitPartialContent):
     14        * layout/inlineformatting/LineLayoutContext.h:
     15
    1162020-02-12  Pavel Feldman  <pavel.feldman@gmail.com>
    217
  • trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.cpp

    r256490 r256499  
    255255LineLayoutContext::LineContent LineLayoutContext::layoutLine(LineBuilder& line, const InlineItemRange layoutRange, Optional<unsigned> partialLeadingContentLength)
    256256{
    257     auto reset = [&] {
    258         ASSERT(m_floats.isEmpty());
    259         m_partialTrailingTextItem = { };
    260         m_partialLeadingTextItem = { };
    261     };
    262     reset();
     257    ASSERT(m_floats.isEmpty());
     258    m_partialLeadingTextItem = { };
    263259    auto lineBreaker = LineBreaker { };
    264260    auto currentItemIndex = layoutRange.start;
     
    464460            if (auto partialRun = partialTrailingContent.partialRun) {
    465461                auto& trailingInlineTextItem = downcast<InlineTextItem>(runs[partialTrailingContent.trailingRunIndex].inlineItem);
    466                 // FIXME: LineBuilder should not hold on to the InlineItem.
    467                 ASSERT(!m_partialTrailingTextItem);
    468                 m_partialTrailingTextItem = trailingInlineTextItem.left(partialRun->length);
    469                 line.appendPartialTrailingTextItem(*m_partialTrailingTextItem, partialRun->logicalWidth, partialRun->needsHyphen);
     462                auto partialTrailingTextItem = trailingInlineTextItem.left(partialRun->length);
     463                line.appendPartialTrailingTextItem(partialTrailingTextItem, partialRun->logicalWidth, partialRun->needsHyphen);
    470464                return;
    471465            }
  • trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.h

    r256490 r256499  
    8383    FloatList m_floats;
    8484    Optional<InlineTextItem> m_partialLeadingTextItem;
    85     Optional<InlineTextItem> m_partialTrailingTextItem;
    8685    unsigned m_successiveHyphenatedLineCount { 0 };
    8786};
Note: See TracChangeset for help on using the changeset viewer.