WebKit Bugzilla
Attachment 372180 Details for
Bug 198880
: [LFC] Fix available width for shrink-to-fit (for out-of-flow non-replaced box)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198880-20190615002754.patch (text/plain), 3.08 KB, created by
zalan
on 2019-06-15 00:27:57 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-15 00:27:57 PDT
Size:
3.08 KB
patch
obsolete
>Subversion Revision: 246456 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b1333e26f6b7e30eed8e33e307580ebbd798e9d4..5379bfa3b2ea2503e35953aa8c19fb000e6db0b9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Fix available width for shrink-to-fit (for out-of-flow non-replaced box) >+ https://bugs.webkit.org/show_bug.cgi?id=198880 >+ <rdar://problem/51773118> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch fixes the cases when the available width for the out-of-flow positioned box is not the same as the containing block's (padding)width. >+ >+ * layout/FormattingContextGeometry.cpp: >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry): >+ > 2019-06-15 Zalan Bujtas <zalan@apple.com> > > [LFC] Fix over-constrained logic for out-of-flow non-replaced horizontal geometry. >diff --git a/Source/WebCore/layout/FormattingContextGeometry.cpp b/Source/WebCore/layout/FormattingContextGeometry.cpp >index 1edbc01dbf8f9705533fc80eacadeceea6eaddb4..18ea86f94d6cc9c2a2a7d065d1995051d506912d 100644 >--- a/Source/WebCore/layout/FormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/FormattingContextGeometry.cpp >@@ -484,7 +484,10 @@ HorizontalGeometry FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGe > > if (!left && !width && right) { > // #1 >- width = shrinkToFitWidth(layoutState, layoutBox, usedValues); >+ // Calculate the available width by solving for 'width' after setting 'left' (in case 1) to 0 >+ left = LayoutUnit { 0 }; >+ auto availableWidth = containingBlockWidth - (*left + usedHorizontalMargin.start + borderLeft + paddingLeft + paddingRight + borderRight + usedHorizontalMargin.end + *right); >+ width = shrinkToFitWidth(layoutState, layoutBox, UsedHorizontalValues { availableWidth, usedValues.width, usedValues.margin }); > left = containingBlockWidth - (usedHorizontalMargin.start + borderLeft + paddingLeft + *width + paddingRight + borderRight + usedHorizontalMargin.end + *right); > } else if (!left && !right && width) { > // #2 >@@ -498,7 +501,10 @@ HorizontalGeometry FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGe > } > } else if (!width && !right && left) { > // #3 >- width = shrinkToFitWidth(layoutState, layoutBox, usedValues); >+ // Calculate the available width by solving for 'width' after setting 'right' (in case 3) to 0 >+ right = LayoutUnit { 0 }; >+ auto availableWidth = containingBlockWidth - (*left + usedHorizontalMargin.start + borderLeft + paddingLeft + paddingRight + borderRight + usedHorizontalMargin.end + *right); >+ width = shrinkToFitWidth(layoutState, layoutBox, UsedHorizontalValues { availableWidth, usedValues.width, usedValues.margin }); > right = containingBlockWidth - (*left + usedHorizontalMargin.start + borderLeft + paddingLeft + *width + paddingRight + borderRight + usedHorizontalMargin.end); > } else if (!left && width && right) { > // #4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198880
: 372180