WebKit Bugzilla
Attachment 342019 Details for
Bug 186332
: [LFC] Add missing margins for inflow, non replaced block and replaced inline elements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186332-20180605184559.patch (text/plain), 4.03 KB, created by
zalan
on 2018-06-05 18:46:00 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-06-05 18:46:00 PDT
Size:
4.03 KB
patch
obsolete
>Subversion Revision: 232525 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4e0c983bf6852cd83224bc5b626677f56ab4ed45..7c5a7c056360b0db03e1b1dfea17bfb143bcbae0 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-05 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Add missing margins for inflow, non replaced block and replaced inline elements >+ https://bugs.webkit.org/show_bug.cgi?id=186332 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * layout/FormattingContextGeometry.cpp: >+ (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin): >+ * layout/blockformatting/BlockFormattingContextGeometry.cpp: >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin): >+ > 2018-06-05 Timothy Hatcher <timothy@apple.com> > > Clean up LocalDefaultSystemAppearance and prefers-dark-interface media query >diff --git a/Source/WebCore/layout/FormattingContextGeometry.cpp b/Source/WebCore/layout/FormattingContextGeometry.cpp >index 1a26fef9cf8790561a843d7b1c30b3203d4f6298..4839cda938dbf39595cb8bcd9509f6e8658a42be 100644 >--- a/Source/WebCore/layout/FormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/FormattingContextGeometry.cpp >@@ -542,16 +542,16 @@ FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::inlineR > // If 300px is too wide to fit the device, UAs should use the width of the largest rectangle that has a 2:1 ratio and fits the device instead. > auto& style = layoutBox.style(); > LayoutUnit computedWidthValue; >- LayoutUnit computedMarginLeft; >- LayoutUnit computedMarginRight; >+ LayoutUnit computedMarginLeftValue; >+ LayoutUnit computedMarginRightValue; > > { > auto marginLeft = style.marginLeft(); > auto marginRight = style.marginRight(); > auto containingBlockWidth = layoutContext.displayBoxForLayoutBox(*layoutBox.containingBlock())->width(); > >- computedMarginLeft = marginLeft.isAuto() ? LayoutUnit(0) : valueForLength(marginLeft, containingBlockWidth); >- computedMarginRight = marginRight.isAuto() ? LayoutUnit(0) : valueForLength(marginRight, containingBlockWidth); >+ computedMarginLeftValue = marginLeft.isAuto() ? LayoutUnit(0) : valueForLength(marginLeft, containingBlockWidth); >+ computedMarginRightValue = marginRight.isAuto() ? LayoutUnit(0) : valueForLength(marginRight, containingBlockWidth); > } > > auto width = style.logicalWidth(); >@@ -578,7 +578,7 @@ FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::inlineR > computedWidthValue = 300; > } > >- return WidthAndMargin { computedWidthValue, { } }; >+ return WidthAndMargin { computedWidthValue, { computedMarginLeftValue, computedMarginRightValue } }; > } > > Display::Box::Edges FormattingContext::Geometry::computedBorder(LayoutContext&, const Box& layoutBox) >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >index 552829b664a5f9c75f5553555de85d0e98d71f40..88ee5694ef9e91ad01308a30df86c782826a9520 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >@@ -216,7 +216,7 @@ FormattingContext::Geometry::WidthAndMargin BlockFormattingContext::Geometry::in > if (!isStretchedToViewport(layoutContext, layoutBox)) > return computedWidthAndMarginValue; > auto initialContainingBlockWidth = layoutContext.displayBoxForLayoutBox(initialContainingBlock(layoutBox))->contentBox().width(); >- return FormattingContext::Geometry::WidthAndMargin { std::max(computedWidthAndMarginValue.width, initialContainingBlockWidth), { } }; >+ return FormattingContext::Geometry::WidthAndMargin { std::max(computedWidthAndMarginValue.width, initialContainingBlockWidth), { computedWidthAndMarginValue.margin } }; > } > > LayoutPoint BlockFormattingContext::Geometry::staticPosition(LayoutContext& layoutContext, const Box& layoutBox)
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 186332
: 342019