Changeset 253013 in webkit


Ignore:
Timestamp:
Dec 2, 2019 3:03:15 PM (4 years ago)
Author:
Alan Bujtas
Message:

[LFC] Fix ASSERT while running fast/block/block-parent-with-zero-width-child.html
https://bugs.webkit.org/show_bug.cgi?id=204768

Reviewed by Antti Koivisto.

  1. FormattingState::displayInlineContent() returns nullptr in case of empty inline content.
  2. Typo in InlineItemRun::moveHorizontally
  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r253006 r253013  
     12019-12-02  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC] Fix ASSERT while running fast/block/block-parent-with-zero-width-child.html
     4        https://bugs.webkit.org/show_bug.cgi?id=204768
     5
     6        Reviewed by Antti Koivisto.
     7
     8        1. FormattingState::displayInlineContent() returns nullptr in case of empty inline content.
     9        2. Typo in InlineItemRun::moveHorizontally
     10
     11        * layout/blockformatting/BlockMarginCollapse.cpp:
     12        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
     13        * layout/inlineformatting/InlineLineBuilder.h:
     14        (WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally):
     15
    1162019-12-02  Yusuke Suzuki  <ysuzuki@apple.com>
    217
  • trunk/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp

    r252979 r253013  
    396396            auto isConsideredEmpty = [&] {
    397397                auto& formattingState = downcast<InlineFormattingState>(layoutState.establishedFormattingState(layoutContainer));
    398                 for (auto& lineBox : formattingState.displayInlineContent()->lineBoxes) {
    399                     if (!lineBox.isConsideredEmpty())
    400                         return false;
     398                if (auto* inlineContent = formattingState.displayInlineContent()) {
     399                    for (auto& lineBox : inlineContent->lineBoxes) {
     400                        if (!lineBox.isConsideredEmpty())
     401                            return false;
     402                    }
    401403                }
    402404                // Any float box in this formatting context prevents collapsing through.
  • trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.h

    r253004 r253013  
    173173        bool isCollapsed() const { return m_isCollapsed; }
    174174
    175         void moveHorizontally(LayoutUnit offset) { m_logicalWidth += offset; }
     175        void moveHorizontally(LayoutUnit offset) { m_logicalLeft += offset; }
    176176
    177177        void removeTrailingLetterSpacing();
Note: See TracChangeset for help on using the changeset viewer.