Changeset 238422 in webkit
- Timestamp:
- Nov 21, 2018 9:38:08 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r238416 r238422 1 2018-11-21 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Border should be considered as non-breakable space 4 https://bugs.webkit.org/show_bug.cgi?id=191891 5 6 Reviewed by Antti Koivisto. 7 8 * fast/inline/inline-content-with-border-left-right-expected.txt: Added. 9 * fast/inline/inline-content-with-border-left-right.html: Added. 10 1 11 2018-11-21 Alicia Boya García <aboya@igalia.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r238420 r238422 1 2018-11-21 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Border should be considered as non-breakable space 4 https://bugs.webkit.org/show_bug.cgi?id=191891 5 6 Reviewed by Antti Koivisto. 7 8 Like padding, border also forces run breaks and offsets them. 9 10 Test: fast/inline/inline-content-with-border-left-right.html 11 12 * layout/inlineformatting/InlineFormattingContext.cpp: 13 (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const): 14 1 15 2018-11-21 Zalan Bujtas <zalan@apple.com> 2 16 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
r238420 r238422 463 463 // FIXME: Revisit this when we figured out how inline boxes fit the display tree. 464 464 auto padding = Geometry::computedPadding(layoutState(), root); 465 auto border = Geometry::computedBorder(layoutState(), root); 465 466 // Setup breaking boundaries for this subtree. 466 467 auto* lastDescendantInlineBox = inlineFormattingState.lastInlineItem(); … … 470 471 471 472 auto rootBreaksAtStart = [&] { 472 // FIXME: add padding-inline-start, margin-inline-start etc. 473 if (padding && padding->horizontal.left) 474 return true; 475 return root.isPositioned(); 473 if (&root == &(this->root())) 474 return false; 475 return (padding && padding->horizontal.left) || border.horizontal.left || root.isPositioned(); 476 476 }; 477 477 478 478 auto rootBreaksAtEnd = [&] { 479 // FIXME: add padding-inline-end, margin-inline-end etc. 480 if (padding && padding->horizontal.right) 481 return true; 482 return root.isPositioned(); 479 if (&root == &(this->root())) 480 return false; 481 return (padding && padding->horizontal.right) || border.horizontal.right || root.isPositioned(); 483 482 }; 484 483 … … 495 494 ASSERT(firstDescendantInlineBox); 496 495 firstDescendantInlineBox->addDetachingRule(InlineItem::DetachingRule::BreakAtStart); 497 if (padding && padding->horizontal.left)496 if (padding) 498 497 firstDescendantInlineBox->addNonBreakableStart(padding->horizontal.left); 498 firstDescendantInlineBox->addNonBreakableStart(border.horizontal.left); 499 499 } 500 500 501 501 if (rootBreaksAtEnd()) { 502 502 lastDescendantInlineBox->addDetachingRule(InlineItem::DetachingRule::BreakAtEnd); 503 if (padding && padding->horizontal.right)503 if (padding) 504 504 lastDescendantInlineBox->addNonBreakableEnd(padding->horizontal.right); 505 lastDescendantInlineBox->addNonBreakableEnd(border.horizontal.right); 505 506 } 506 507 } -
trunk/Tools/ChangeLog
r238415 r238422 1 2018-11-21 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Border should be considered as non-breakable space 4 https://bugs.webkit.org/show_bug.cgi?id=191891 5 6 Reviewed by Antti Koivisto. 7 8 * LayoutReloaded/misc/LFC-passing-tests.txt: 9 1 10 2018-11-21 Zalan Bujtas <zalan@apple.com> 2 11 -
trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt
r238415 r238422 74 74 fast/inline/simple-inline-with-out-of-flow-descendant2.html 75 75 fast/inline/inline-content-with-padding-left-right.html 76 fast/inline/inline-content-with-border-left-right.html 76 77 fast/block/basic/height-percentage-simple.html 77 78 fast/block/basic/child-block-level-box-with-height-percent.html
Note: See TracChangeset
for help on using the changeset viewer.