Chromium Code Reviews| Index: Source/core/layout/LayoutBlock.cpp |
| diff --git a/Source/core/layout/LayoutBlock.cpp b/Source/core/layout/LayoutBlock.cpp |
| index f9a4e434cf19610c9211a54a49f60fc627167371..5ae6c0fc4d71b03e631f5569c9ac13e760173691 100644 |
| --- a/Source/core/layout/LayoutBlock.cpp |
| +++ b/Source/core/layout/LayoutBlock.cpp |
| @@ -88,7 +88,18 @@ struct SameSizeAsLayoutBlock : public LayoutBox { |
| static_assert(sizeof(LayoutBlock) == sizeof(SameSizeAsLayoutBlock), "LayoutBlock should stay small"); |
| +// This map keeps track of the positioned objects associated with a containing block. |
| +// |
| +// This map is populated during layout. It is kept across layouts to handle sub-tree |
| +// layouts. The map could be invalidated during style change but keeping track of |
|
mstensho (USE GERRIT)
2015/08/31 19:28:52
You mean "handle that we skip unchanged subtrees d
Julien - ping for review
2015/08/31 21:55:29
Me gusta! Changed for your less hand-wavy explanat
|
| +// containing blocks at that time is complicated (we are in the middle of |
| +// recomputing the style so we can't rely on any of its information), which is why |
| +// it's easier to just update it for every layout. |
| static TrackedDescendantsMap* gPositionedDescendantsMap = nullptr; |
| + |
| +// This map keeps track of the descendants whose 'height' is percentage associated |
| +// with a containing block. Like |gPositionedDescendantsMap|, it is also recomputed |
| +// for every layout (see the comment above about why). |
| static TrackedDescendantsMap* gPercentHeightDescendantsMap = nullptr; |
| static TrackedContainerMap* gPositionedContainerMap = nullptr; |