DescriptionCombine 2 exclusions in Layout Opportunity Tree if they shadow each other
Note: The original patch was reviewed and submitted in
https://codereview.chromium.org/2733133002/
The only difference with the original patch is that
NGExclusion::MaybeCombineWith doesn't have NOTREACHED anymore. That's
because some tests and text exclusions don't have exclusion.type set.
We just return false in this case.
This patch introduces the logic that tries to combine 2 exclusions if
possible.
We can combine 2 exclusions if
- they are adjoining to each other and have the same exclusion type
- the new exclusion shadows the old one.
That's because it's not allowed to position anything in the
shadowed area.
Example:
<div id="SS" style="float: left; height: 10px; width: 10px"></div>
<div id="BB" style="float: left; height: 20px; width: 20px"></div>
+----------------+
|SSBB
|**BB
We combine SS and BB exclusions including the shadowed area (**).
BUG=635619, 699703
TESTS=TwoRightExclusionsShadowEachOther,
TwoLeftExclusionsShadowEachOther
Review-Url: https://codereview.chromium.org/2743453002
Cr-Commit-Position: refs/heads/master@{#455876}
Committed: https://chromium.googlesource.com/chromium/src/+/875a510c97b3108d5ca70c7878c9a3a3d3830fd0
Patch Set 1 #Messages
Total messages: 15 (10 generated)
|