DescriptionRenderBlock::isSelfCollapsingBlock() should only be used when an object does not require layout.
|isSelfCollapsingBlock| should only be called on an object after it has had layout. In order to enforce this with an ASSERT I had to account for a couple of things I hadn't previously considered:
- In a couple of places we look at the previous child sibling and check whether it's selfCollapsing. When we do that we need to be sure that it's a normal flow block we're looking at.
- Placeholder elements are not laid out until the dimensions of their parent text control are known, so they don't get layout until their parent has had layout - this is unique in the layout tree and unfortunately when we call isSelfCollapsingBlock on them we find that they still need layout. Since placeholder elements only exist when they have content we can enforce the rule that they are never self-collapsing.
- When we are in partial layout and have entered layoutBlockChildren to layout one or more children we should return early when we are done. The current behaviour, which ignores the rest of the children and then adjusts the height of the parent block with the current margin information, is unnecessary and likely to be wrong.
BUG=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165099
Patch Set 1 #Patch Set 2 : Updated #Patch Set 3 : Update #Patch Set 4 : Updated #Patch Set 5 : Updated #Patch Set 6 : Update #
Total comments: 5
Patch Set 7 : Updated #Patch Set 8 : Update #
Total comments: 1
Messages
Total messages: 8 (0 generated)
|