Changeset 246459 in webkit
- Timestamp:
- Jun 15, 2019, 7:06:57 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/FormattingContextGeometry.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246458 r246459 1 2019-06-15 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Fix over-constrained logic for out-of-flow non-replaced horizontal geometry. 4 https://bugs.webkit.org/show_bug.cgi?id=198879 5 <rdar://problem/51772995> 6 7 Reviewed by Antti Koivisto. 8 9 The over-constrained logic applies to the case when all the horizontal properties are set. 10 11 * layout/FormattingContextGeometry.cpp: 12 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry): 13 1 14 2019-06-15 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/Source/WebCore/layout/FormattingContextGeometry.cpp
r246458 r246459 467 467 usedHorizontalMargin.end = *computedHorizontalMargin.end; 468 468 usedHorizontalMargin.start = containingBlockWidth - (*left + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end + *right); 469 // Overconstrained? Ignore right (left).470 if (usedHorizontalMargin.start < 0) {471 if (isLeftToRightDirection)472 usedHorizontalMargin.start = containingBlockWidth - (*left + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end);473 else474 usedHorizontalMargin.start = containingBlockWidth - (borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end + *right);475 }476 469 } else if (!computedHorizontalMargin.end) { 477 470 usedHorizontalMargin.start = *computedHorizontalMargin.start; 478 471 usedHorizontalMargin.end = containingBlockWidth - (*left + usedHorizontalMargin.start + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + *right); 472 } else { 473 usedHorizontalMargin = { *computedHorizontalMargin.start, *computedHorizontalMargin.end }; 479 474 // Overconstrained? Ignore right (left). 480 if (usedHorizontalMargin.end < 0) { 481 if (isLeftToRightDirection) 482 usedHorizontalMargin.end = containingBlockWidth - (*left + usedHorizontalMargin.start + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight); 483 else 484 usedHorizontalMargin.end = containingBlockWidth - (usedHorizontalMargin.start + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + *right); 485 } 486 } else 487 usedHorizontalMargin = { *computedHorizontalMargin.start, *computedHorizontalMargin.end }; 475 if (isLeftToRightDirection) 476 right = containingBlockWidth - (usedHorizontalMargin.start + *left + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end); 477 else 478 left = containingBlockWidth - (usedHorizontalMargin.start + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end + *right); 479 } 488 480 } else { 489 481 // Otherwise, set 'auto' values for 'margin-left' and 'margin-right' to 0, and pick the one of the following six rules that applies.
Note:
See TracChangeset
for help on using the changeset viewer.