Changeset 252829 in webkit


Ignore:
Timestamp:
Nov 23, 2019 5:33:49 AM (4 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Remove unnecessary Line::hasContent() calls in LineLayout::placeInlineItem
https://bugs.webkit.org/show_bug.cgi?id=204540
<rdar://problem/57443500>

Reviewed by Antti Koivisto.

LineLayout::placeInlineItem is hot. This shaves off ~3% on line-layout-simple.html

  • layout/inlineformatting/InlineLineLayout.cpp:

(WebCore::Layout::LineLayout::placeInlineItem):

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
(WebCore::FrameViewLayoutContext::layout):

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::attachToRenderElementInternal):

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRendererStyle):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r252828 r252829  
     12019-11-23  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Remove unnecessary Line::hasContent() calls in LineLayout::placeInlineItem
     4        https://bugs.webkit.org/show_bug.cgi?id=204540
     5        <rdar://problem/57443500>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        LineLayout::placeInlineItem is hot. This shaves off ~3% on line-layout-simple.html
     10
     11        * layout/inlineformatting/InlineLineLayout.cpp:
     12        (WebCore::Layout::LineLayout::placeInlineItem):
     13        * page/FrameView.cpp:
     14        (WebCore::FrameView::paintContents):
     15        * page/FrameViewLayoutContext.cpp:
     16        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
     17        (WebCore::FrameViewLayoutContext::layout):
     18        * rendering/updating/RenderTreeBuilder.cpp:
     19        (WebCore::RenderTreeBuilder::attachToRenderElementInternal):
     20        * rendering/updating/RenderTreeUpdater.cpp:
     21        (WebCore::RenderTreeUpdater::updateRendererStyle):
     22
    1232019-11-23  Antti Koivisto  <antti@apple.com>
    224
  • trunk/Source/WebCore/layout/inlineformatting/InlineLineLayout.cpp

    r252696 r252829  
    167167    auto currentLogicalRight = m_line.lineBox().logicalRight();
    168168    auto itemLogicalWidth = inlineItemWidth(formattingContext(), inlineItem, currentLogicalRight);
    169     auto lineIsConsideredEmpty = !m_line.hasContent() && !m_lineHasIntrusiveFloat;
    170169
    171170    // Floats are special, they are intrusive but they don't really participate in the line layout context.
     
    179178                return IsEndOfLine::Yes;
    180179        }
     180        auto lineIsConsideredEmpty = !m_line.hasContent() && !m_lineHasIntrusiveFloat;
    181181        if (LineBreaker().shouldWrapFloatBox(itemLogicalWidth, m_line.availableWidth() + m_line.trailingTrimmableWidth(), lineIsConsideredEmpty))
    182182            return IsEndOfLine::Yes;
Note: See TracChangeset for help on using the changeset viewer.