[LFC][IFC] Make InlineTextItem reusable when 'segment break' behavior changes
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Oct 2019 15:09:21 +0000 (15:09 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Oct 2019 15:09:21 +0000 (15:09 +0000)
commit37eab52cd5a52bc3360096d0fe09ac03af863817
treed4f91ed082be76b800d84ec4d32d1244d68d8079
parent9b4c295b6926fc6453448f8ea4ac038577bf1a7f
[LFC][IFC] Make InlineTextItem reusable when 'segment break' behavior changes
https://bugs.webkit.org/show_bug.cgi?id=203184
<rdar://problem/56438945>

Reviewed by Antti Koivisto.

InlineTextItem::isWhitespace should dynamically check for 'preserve new line' behavior. This way we don't have to rebuild the inline item list
when the related style property value changes.

* layout/inlineformatting/InlineTextItem.cpp:
(WebCore::Layout::isWhitespaceCharacter):
(WebCore::Layout::moveToNextNonWhitespacePosition):
(WebCore::Layout::InlineTextItem::createAndAppendTextItems):
(WebCore::Layout::InlineTextItem::createWhitespaceItem):
(WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
(WebCore::Layout::InlineTextItem::createSegmentBreakItem):
(WebCore::Layout::InlineTextItem::createEmptyItem):
(WebCore::Layout::InlineTextItem::InlineTextItem):
(WebCore::Layout::InlineTextItem::split const):
(WebCore::Layout::InlineTextItem::isWhitespace const):
(WebCore::Layout::isSoftLineBreak): Deleted.
* layout/inlineformatting/InlineTextItem.h:
(WebCore::Layout::InlineTextItem::isSegmentBreak const):
(WebCore::Layout::InlineTextItem::isWhitespace const): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/layout/inlineformatting/InlineTextItem.cpp
Source/WebCore/layout/inlineformatting/InlineTextItem.h