Changeset 238349 in webkit
- Timestamp:
- Nov 17, 2018 8:11:24 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r238345 r238349 1 2018-11-17 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules. 4 https://bugs.webkit.org/show_bug.cgi?id=191801 5 6 Reviewed by Antti Koivisto. 7 8 * fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt: Added. 9 * fast/inline/simple-inline-with-out-of-flow-descendant2.html: Added. 10 1 11 2018-11-17 Jonathan Hammer <jonathan@e3software.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r238345 r238349 1 2018-11-17 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules. 4 https://bugs.webkit.org/show_bug.cgi?id=191801 5 6 Reviewed by Antti Koivisto. 7 8 before<span style="position: relative">positioned</span>after 9 In the example above the <positioned> inline box has both the BreakAtStart and the BreakAtEnd rules. 10 While walking through the inline tree, we add BreakAtStart first and when we figure it's the last child too, 11 we add BreakAtEnd as well. BreakAtEnd should not clear the BreakAtStart rule. 12 13 Test: fast/inline/simple-inline-with-out-of-flow-descendant2.html 14 15 * layout/inlineformatting/InlineFormattingContext.cpp: 16 (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const): 17 * layout/inlineformatting/InlineFormattingState.cpp: 18 (WebCore::Layout::InlineFormattingState::addDetachingRule): 19 * layout/inlineformatting/InlineFormattingState.h: 20 (WebCore::Layout::InlineFormattingState::addDetachingRule): Deleted. 21 1 22 2018-11-17 Jonathan Hammer <jonathan@e3software.com> 2 23 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
r238279 r238349 176 176 177 177 // #1 178 if ( !detachingRules) {178 if (detachingRules.isEmpty()) { 179 179 uncommittedLength += currentLength(); 180 180 firstUncommittedInlineItem = !firstUncommittedInlineItem ? &inlineItem : firstUncommittedInlineItem; … … 195 195 196 196 // #2 197 if ( *detachingRules == InlineFormattingState::DetachingRule::BreakAtStart) {197 if (detachingRules == InlineFormattingState::DetachingRule::BreakAtStart) { 198 198 commit(); 199 199 firstUncommittedInlineItem = &inlineItem; … … 203 203 204 204 // #3 205 if ( *detachingRules == InlineFormattingState::DetachingRule::BreakAtEnd) {205 if (detachingRules == InlineFormattingState::DetachingRule::BreakAtEnd) { 206 206 ASSERT(firstUncommittedInlineItem); 207 207 uncommittedLength += currentLength(); … … 456 456 // Skip formatting root subtree. They are not part of this inline formatting context. 457 457 inlineRunProvider.append(root); 458 inlineFormattingState. addDetachingRule(root, { InlineFormattingState::DetachingRule::BreakAtStart, InlineFormattingState::DetachingRule::BreakAtEnd });458 inlineFormattingState.setDetachingRules(root, { InlineFormattingState::DetachingRule::BreakAtStart, InlineFormattingState::DetachingRule::BreakAtEnd }); 459 459 return; 460 460 } -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp
r238173 r238349 51 51 } 52 52 53 std::optional<InlineFormattingState::DetachingRules> InlineFormattingState::detachingRules(const Box& layoutBox) const 53 void InlineFormattingState::addDetachingRule(const Box& layoutBox, DetachingRule detachingRule) 54 { 55 m_detachingRules.add(&layoutBox, DetachingRule { }).iterator->value.add(detachingRule); 56 } 57 58 OptionSet<InlineFormattingState::DetachingRule> InlineFormattingState::detachingRules(const Box& layoutBox) const 54 59 { 55 60 auto detachingRules = m_detachingRules.get(&layoutBox); -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.h
r238173 r238349 71 71 BreakAtEnd = 1 << 1 72 72 }; 73 using DetachingRules = OptionSet<DetachingRule>; 74 std::optional<DetachingRules> detachingRules(const Box& layoutBox) const; 75 void addDetachingRule(const Box& layoutBox, DetachingRules detachingRules) { m_detachingRules.set(&layoutBox, detachingRules); } 73 void addDetachingRule(const Box& layoutBox, DetachingRule); 74 75 OptionSet<DetachingRule> detachingRules(const Box& layoutBox) const; 76 void setDetachingRules(const Box& layoutBox, OptionSet<DetachingRule> detachingRules) { m_detachingRules.set(&layoutBox, detachingRules); } 76 77 77 78 // Temp … … 80 81 81 82 private: 82 using DetachingRulesForInlineItems = HashMap<const Box*, DetachingRules>;83 using DetachingRulesForInlineItems = HashMap<const Box*, OptionSet<DetachingRule>>; 83 84 84 85 InlineContent m_inlineContent; -
trunk/Tools/ChangeLog
r238348 r238349 1 2018-11-17 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules. 4 https://bugs.webkit.org/show_bug.cgi?id=191801 5 6 Reviewed by Antti Koivisto. 7 8 * LayoutReloaded/misc/LFC-passing-tests.txt: 9 1 10 2018-11-17 Jer Noble <jer.noble@apple.com> 2 11 -
trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt
r238279 r238349 72 72 fast/inline/simple-inline-inflow-positioned.html 73 73 fast/inline/simple-inline-with-out-of-flow-descendant.html 74 fast/inline/simple-inline-with-out-of-flow-descendant2.html 74 75 fast/block/basic/height-percentage-simple.html 75 76 fast/block/basic/child-block-level-box-with-height-percent.html
Note: See TracChangeset
for help on using the changeset viewer.