WebKit Bugzilla
Attachment 340825 Details for
Bug 185812
: [LFC] Box::isDescendantOf() should work with out-of-flow elements.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185812-20180520221423.patch (text/plain), 1.65 KB, created by
zalan
on 2018-05-20 22:14:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-05-20 22:14:24 PDT
Size:
1.65 KB
patch
obsolete
>Subversion Revision: 231958 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 9bf9345096d71de059c60de0ab1827c87a58e7df..0315c9f09a5ad3ab4fa65df1c2f09af5bb175f3f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-05-20 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Box::isDescendantOf() should work with out-of-flow elements. >+ https://bugs.webkit.org/show_bug.cgi?id=185812 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use the containing block chain instead of the parent chain to check for isDescendantOf(). >+ (containing block is not always the direct parent) >+ >+ * layout/layouttree/LayoutBox.cpp: >+ (WebCore::Layout::Box::isDescendantOf const): >+ > 2018-05-18 Zalan Bujtas <zalan@apple.com> > > [LFC] Implement height computation for non-replaced floating elements. >diff --git a/Source/WebCore/layout/layouttree/LayoutBox.cpp b/Source/WebCore/layout/layouttree/LayoutBox.cpp >index 44797af8ec71a028e68baee13d31282f54f0f65a..1879199fcbbcdd88e28fe98d3ef776c2093517cf 100644 >--- a/Source/WebCore/layout/layouttree/LayoutBox.cpp >+++ b/Source/WebCore/layout/layouttree/LayoutBox.cpp >@@ -142,10 +142,12 @@ const Container& Box::formattingContextRoot() const > } > > bool Box::isDescendantOf(Container& container) const >-{ >- auto* ancestor = parent(); >- for (; ancestor && ancestor != &container; ancestor = ancestor->parent()) { } >- return ancestor; >+{ >+ for (auto* ancestor = containingBlock(); ancestor; ancestor = ancestor->containingBlock()) { >+ if (ancestor == &container) >+ return true; >+ } >+ return false; > } > > bool Box::isInlineBlockBox() 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 185812
: 340825