[LayoutReloaded] Should never need to go beyond the root container when asking for...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2018 04:13:26 +0000 (04:13 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2018 04:13:26 +0000 (04:13 +0000)
commit171bfe45524e536d2f0fe117c66967625a224f28
tree0a9363dddc47b9be920ea1807968250e0004645b
parent2df7f58142612e17e3a8e00cb87205b8b38a35de
[LayoutReloaded] Should never need to go beyond the root container when asking for the containing block.
https://bugs.webkit.org/show_bug.cgi?id=183691

Reviewed by Antti Koivisto.

While laying out the boxes in a block formatting context, if we happen to need
to get to the containing block of a box to compute geometry, it should always be a
descendant of the root container (or the root container itself).
Nothing outside of the formatting context should be able to impact the boxes inside.

* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
(BlockFormattingContext.prototype._toAbsolutePosition):
(BlockFormattingContext):
* LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
(BlockMarginCollapse._isMarginTopCollapsedWithParent):
(BlockMarginCollapse._isMarginBottomCollapsedWithParent):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.isRootBox):
(Layout.Box.prototype.isRootElement): Deleted.
* LayoutReloaded/Utils.js:
(Utils.isDescendantOf):
(Utils.mapStaticToAbsolute): Deleted.
* LayoutReloaded/misc/headers/Box.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js
Tools/LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js
Tools/LayoutReloaded/LayoutTree/Box.js
Tools/LayoutReloaded/Utils.js
Tools/LayoutReloaded/misc/headers/Box.h