Changeset 238420 in webkit
- Timestamp:
- Nov 21, 2018 9:36:32 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r238419 r238420 1 2018-11-21 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Use contains and containsAll in InlineFormattingContext::splitInlineRunIfNeeded consistently 4 https://bugs.webkit.org/show_bug.cgi?id=191890 5 6 Rearrange the comment numbers to match the logic below. 7 8 Reviewed by Antti Koivisto. 9 10 * layout/inlineformatting/InlineFormattingContext.cpp: 11 (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const): 12 1 13 2018-11-20 Dean Jackson <dino@apple.com> 2 14 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
r238415 r238420 180 180 }; 181 181 182 // 1. Inline element does not require run breaking -> add current inline element to uncommitted. Jump to the next element.182 // 1. Break before/after -> requires dedicated run -> commit what we've got so far and also commit the current inline element as a separate inline run. 183 183 // 2. Break at the beginning of the inline element -> commit what we've got so far. Current element becomes the first uncommitted. 184 184 // 3. Break at the end of the inline element -> commit what we've got so far including the current element. 185 // 4. Break before/after -> requires dedicated run -> commit what we've got so far and also commit the current inline element as a separate inline run.185 // 4. Inline element does not require run breaking -> add current inline element to uncommitted. Jump to the next element. 186 186 auto detachingRules = inlineItem.detachingRules(); 187 187 188 // # 4188 // #1 189 189 if (detachingRules.containsAll({ InlineItem::DetachingRule::BreakAtStart, InlineItem::DetachingRule::BreakAtEnd })) { 190 190 commit(); … … 195 195 196 196 // #2 197 if (detachingRules == InlineItem::DetachingRule::BreakAtStart)197 if (detachingRules.contains(InlineItem::DetachingRule::BreakAtStart)) 198 198 commit(); 199 199 200 200 // Add current inline item to uncommitted. 201 // #3 and #4 201 202 if (!uncommitted) 202 203 uncommitted = Uncommitted { &inlineItem, &inlineItem, 0 }; … … 205 206 206 207 // #3 207 if (detachingRules == InlineItem::DetachingRule::BreakAtEnd)208 if (detachingRules.contains(InlineItem::DetachingRule::BreakAtEnd)) 208 209 commit(); 209 210 }
Note: See TracChangeset
for help on using the changeset viewer.