Title: [246459] trunk/Source/WebCore
- Revision
- 246459
- Author
- [email protected]
- Date
- 2019-06-15 07:06:57 -0700 (Sat, 15 Jun 2019)
Log Message
[LFC] Fix over-constrained logic for out-of-flow non-replaced horizontal geometry.
https://bugs.webkit.org/show_bug.cgi?id=198879
<rdar://problem/51772995>
Reviewed by Antti Koivisto.
The over-constrained logic applies to the case when all the horizontal properties are set.
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (246458 => 246459)
--- trunk/Source/WebCore/ChangeLog 2019-06-15 14:05:44 UTC (rev 246458)
+++ trunk/Source/WebCore/ChangeLog 2019-06-15 14:06:57 UTC (rev 246459)
@@ -1,5 +1,18 @@
2019-06-15 Zalan Bujtas <[email protected]>
+ [LFC] Fix over-constrained logic for out-of-flow non-replaced horizontal geometry.
+ https://bugs.webkit.org/show_bug.cgi?id=198879
+ <rdar://problem/51772995>
+
+ Reviewed by Antti Koivisto.
+
+ The over-constrained logic applies to the case when all the horizontal properties are set.
+
+ * layout/FormattingContextGeometry.cpp:
+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
+
+2019-06-15 Zalan Bujtas <[email protected]>
+
[LFC] Convert both the absolutely and statically positioned out-of-flow block level boxes positions relative to the containing block's padding box
https://bugs.webkit.org/show_bug.cgi?id=198878
<rdar://problem/51772882>
Modified: trunk/Source/WebCore/layout/FormattingContextGeometry.cpp (246458 => 246459)
--- trunk/Source/WebCore/layout/FormattingContextGeometry.cpp 2019-06-15 14:05:44 UTC (rev 246458)
+++ trunk/Source/WebCore/layout/FormattingContextGeometry.cpp 2019-06-15 14:06:57 UTC (rev 246459)
@@ -466,25 +466,17 @@
} else if (!computedHorizontalMargin.start) {
usedHorizontalMargin.end = *computedHorizontalMargin.end;
usedHorizontalMargin.start = containingBlockWidth - (*left + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end + *right);
- // Overconstrained? Ignore right (left).
- if (usedHorizontalMargin.start < 0) {
- if (isLeftToRightDirection)
- usedHorizontalMargin.start = containingBlockWidth - (*left + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end);
- else
- usedHorizontalMargin.start = containingBlockWidth - (borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end + *right);
- }
} else if (!computedHorizontalMargin.end) {
usedHorizontalMargin.start = *computedHorizontalMargin.start;
usedHorizontalMargin.end = containingBlockWidth - (*left + usedHorizontalMargin.start + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + *right);
+ } else {
+ usedHorizontalMargin = { *computedHorizontalMargin.start, *computedHorizontalMargin.end };
// Overconstrained? Ignore right (left).
- if (usedHorizontalMargin.end < 0) {
- if (isLeftToRightDirection)
- usedHorizontalMargin.end = containingBlockWidth - (*left + usedHorizontalMargin.start + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight);
- else
- usedHorizontalMargin.end = containingBlockWidth - (usedHorizontalMargin.start + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + *right);
- }
- } else
- usedHorizontalMargin = { *computedHorizontalMargin.start, *computedHorizontalMargin.end };
+ if (isLeftToRightDirection)
+ right = containingBlockWidth - (usedHorizontalMargin.start + *left + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end);
+ else
+ left = containingBlockWidth - (usedHorizontalMargin.start + borderLeft + paddingLeft + contentWidth() + paddingRight + borderRight + usedHorizontalMargin.end + *right);
+ }
} else {
// Otherwise, set 'auto' values for 'margin-left' and 'margin-right' to 0, and pick the one of the following six rules that applies.
usedHorizontalMargin = { computedHorizontalMargin.start.valueOr(0), computedHorizontalMargin.end.valueOr(0) };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes