WebKit Bugzilla
Attachment 346409 Details for
Bug 188274
: [LFC][Floating] Use displayBox.rectWithMargin().bottom instead of displayBox.bottom() to where applicable.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188274-20180802130455.patch (text/plain), 2.82 KB, created by
zalan
on 2018-08-02 13:04:55 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-08-02 13:04:55 PDT
Size:
2.82 KB
patch
obsolete
>Subversion Revision: 234510 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index feb595307902621a48cd35c55660f125e2fdf4aa..251cc2a57f55d9208c0cc48c956032af8b743deb 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-08-02 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][Floating] Use displayBox.rectWithMargin().bottom instead of displayBox.bottom() to where applicable. >+ https://bugs.webkit.org/show_bug.cgi?id=188274 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Float placement uses the margin box. >+ >+ * layout/FloatingContext.cpp: >+ (WebCore::Layout::FloatingPair::bottom const): >+ (WebCore::Layout::Iterator::operator++): >+ (WebCore::Layout::Iterator::set): >+ > 2018-08-02 Zalan Bujtas <zalan@apple.com> > > [LFC][Floating] Right aligned float's horizontal candidate position is miscomputed. >diff --git a/Source/WebCore/layout/FloatingContext.cpp b/Source/WebCore/layout/FloatingContext.cpp >index 9ef047b9d661bd892c052f4fc9eb2929e4eddb4c..604bb273ceeec9ac9ed245e4d5c8a31688220999 100644 >--- a/Source/WebCore/layout/FloatingContext.cpp >+++ b/Source/WebCore/layout/FloatingContext.cpp >@@ -297,8 +297,8 @@ LayoutUnit FloatingPair::bottom() const > auto* right = this->right(); > ASSERT(left || right); > >- auto leftBottom = left ? std::optional<LayoutUnit>(left->bottom()) : std::nullopt; >- auto rightBottom = right ? std::optional<LayoutUnit>(right->bottom()) : std::nullopt; >+ auto leftBottom = left ? std::optional<LayoutUnit>(left->rectWithMargin().bottom()) : std::nullopt; >+ auto rightBottom = right ? std::optional<LayoutUnit>(right->rectWithMargin().bottom()) : std::nullopt; > > if (leftBottom && rightBottom) > return std::max(*leftBottom, *rightBottom); >@@ -346,7 +346,7 @@ Iterator& Iterator::operator++() > if (!currentIndex) > return { }; > >- auto currentBottom = m_floats[currentIndex].displayBox().bottom(); >+ auto currentBottom = m_floats[currentIndex].displayBox().rectWithMargin().bottom(); > > std::optional<unsigned> index = currentIndex; > while (true) { >@@ -354,7 +354,7 @@ Iterator& Iterator::operator++() > if (!index) > return { }; > >- if (m_floats[*index].displayBox().bottom() > currentBottom) >+ if (m_floats[*index].displayBox().rectWithMargin().bottom() > currentBottom) > return index; > } > >@@ -418,7 +418,7 @@ void Iterator::set(LayoutUnit verticalPosition) > if (!index) > return { }; > >- auto bottom = m_floats[*index].displayBox().bottom(); >+ auto bottom = m_floats[*index].displayBox().rectWithMargin().bottom(); > // Is this floating intrusive on this position? > if (bottom > verticalPosition) > return index;
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
Flags:
koivisto
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188274
: 346409