WebKit Bugzilla
Attachment 340678 Details for
Bug 185759
: [LFC] Implement width computation for non-replaced floating elements.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185759-20180517214604.patch (text/plain), 3.22 KB, created by
zalan
on 2018-05-17 21:46:04 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-05-17 21:46:04 PDT
Size:
3.22 KB
patch
obsolete
>Subversion Revision: 231912 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index aee4d4f348d6b067799c2d555f31eaab2efada89..cfc7ec5c1924128ae83819ce52ef04942d453601 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-17 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Implement width computation for non-replaced floating elements. >+ https://bugs.webkit.org/show_bug.cgi?id=185759 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * layout/FormattingContext.cpp: >+ (WebCore::Layout::FormattingContext::computeFloatingWidth const): >+ (WebCore::Layout::FormattingContext::computeFloatingNonReplacedWidth const): >+ * layout/FormattingContext.h: >+ > 2018-05-17 Chris Dumez <cdumez@apple.com> > > Cross-Origin-Options: deny/allow-postmessage should prevent getting navigated by cross-origin scripts >diff --git a/Source/WebCore/layout/FormattingContext.cpp b/Source/WebCore/layout/FormattingContext.cpp >index 180c0a66b5a7845cd0eef2985821c2d8d11b0b06..eb088ef8d25310966b3aebb566320848430ec53d 100644 >--- a/Source/WebCore/layout/FormattingContext.cpp >+++ b/Source/WebCore/layout/FormattingContext.cpp >@@ -90,7 +90,7 @@ void FormattingContext::computeOutOfFlowWidth(LayoutContext& layoutContext, cons > void FormattingContext::computeFloatingWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { > if (!layoutBox.replaced()) { >- ASSERT_NOT_IMPLEMENTED_YET(); >+ computeFloatingNonReplacedWidth(layoutContext, layoutBox, displayBox); > return; > } > computeReplacedWidth(layoutContext, layoutBox, displayBox); >@@ -295,6 +295,16 @@ LayoutUnit FormattingContext::contentHeightForFormattingContextRoot(LayoutContex > return bottom - top; > } > >+void FormattingContext::computeFloatingNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const >+{ >+ ASSERT(layoutBox.isFloatingPositioned() && !layoutBox.replaced()); >+ // 10.3.5 Floating, non-replaced elements >+ >+ // If 'width' is computed as 'auto', the used value is the "shrink-to-fit" width. >+ auto width = layoutBox.style().logicalWidth(); >+ displayBox.setWidth(width.isAuto() ? shrinkToFitWidth(layoutContext, layoutBox) : LayoutUnit(width.value())); >+} >+ > void FormattingContext::computeOutOfFlowNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { > ASSERT(layoutBox.isOutOfFlowPositioned() && !layoutBox.replaced()); >diff --git a/Source/WebCore/layout/FormattingContext.h b/Source/WebCore/layout/FormattingContext.h >index 913dec9b6e9d9e52f002d826b1230b2570e031cd..b09e650a9d89e070f24d17fc461fd903a295d329 100644 >--- a/Source/WebCore/layout/FormattingContext.h >+++ b/Source/WebCore/layout/FormattingContext.h >@@ -94,6 +94,8 @@ private: > void computeOutOfFlowNonReplacedWidth(LayoutContext&, const Box&, Display::Box&) const; > void computeOutOfFlowReplacedWidth(LayoutContext&, const Box&, Display::Box&) const; > >+ void computeFloatingNonReplacedWidth(LayoutContext&, const Box&, Display::Box&) const; >+ > LayoutUnit contentHeightForFormattingContextRoot(LayoutContext&, const Box&) const; > LayoutUnit shrinkToFitWidth(LayoutContext&, const Box&) const; >
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 185759
: 340678