DescriptionAdd the support of "clear" CSS property to NG block layout algorithm.
This patch adds the support of "clear" CSS property for floating and non-floating elements.
Please note that this doesn't currently support some edge cases, e.g. margin collapsing
should not occur if "clear" is applied to non-floating blocks.
List of changes:
- Add last left/right float exclusions to NGPhysicalConstraintSpace. They are used to enforce the top edge alignment
rule for floats and for the support of CSS "clear" property.
- Add a new version of NGExclusion that encapsulates the exclusion type and rectangle in logical coordindates that represents that exclusion.
- Added some helper read-only getters to NGBlockLayoutAlgorithm: CurrentChildStyle(), ConstraintSpace() etc.
- Added AdjustToCSSClear that has the main logic that calculates the right content's offset based on CSS "clear" value.
BUG=635619
TEST=NGBlockLayoutAlgorithmTest::PositionFragmentsWithClear,
virtual/layout_ng/fast/block/float/max-width-clear-float-with-overflow-hidden.html
Committed: https://crrev.com/d9c529de305db6eb0dde1052a39c9dd4b06f9bc9
Cr-Commit-Position: refs/heads/master@{#432958}
Patch Set 1 #
Total comments: 8
Patch Set 2 : do not use auto*, fix the clearance logic for floating elements #
Total comments: 1
Patch Set 3 : added "owned" comment to last_(left|right)_float_exclusion_, added TODO about moving AdjustToCleara… #Messages
Total messages: 31 (22 generated)
|