⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 238449 in webkit


Ignore:
Timestamp:
Nov 22, 2018, 10:56:28 AM (8 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Merge addNonBreakableStart/NonBreakableEnd calls.
https://bugs.webkit.org/show_bug.cgi?id=191903

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r238448 r238449  
     12018-11-22  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Merge addNonBreakableStart/NonBreakableEnd calls.
     4        https://bugs.webkit.org/show_bug.cgi?id=191903
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * layout/inlineformatting/InlineFormattingContext.cpp:
     9        (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
     10
    1112018-11-22  Zalan Bujtas  <zalan@apple.com>
    212
  • trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp

    r238448 r238449  
    500500        ASSERT(firstDescendantInlineBox);
    501501        firstDescendantInlineBox->addDetachingRule(InlineItem::DetachingRule::BreakAtStart);
     502        auto startOffset = border.horizontal.left + horizontalMargins.left;
    502503        if (padding)
    503             firstDescendantInlineBox->addNonBreakableStart(padding->horizontal.left);
    504         firstDescendantInlineBox->addNonBreakableStart(border.horizontal.left);
    505         firstDescendantInlineBox->addNonBreakableStart(horizontalMargins.left);
     504            startOffset += padding->horizontal.left;
     505        firstDescendantInlineBox->addNonBreakableStart(startOffset);
    506506    }
    507507
    508508    if (rootBreaksAtEnd()) {
    509509        lastDescendantInlineBox->addDetachingRule(InlineItem::DetachingRule::BreakAtEnd);
     510        auto endOffset = border.horizontal.right + horizontalMargins.right;
    510511        if (padding)
    511             lastDescendantInlineBox->addNonBreakableEnd(padding->horizontal.right);
    512         lastDescendantInlineBox->addNonBreakableEnd(border.horizontal.right);
    513         lastDescendantInlineBox->addNonBreakableEnd(horizontalMargins.right);
     512            endOffset += padding->horizontal.right;
     513        lastDescendantInlineBox->addNonBreakableEnd(endOffset);
    514514    }
    515515}
Note: See TracChangeset for help on using the changeset viewer.