DescriptionCombine 2 exclusions in Layout Opportunity Tree if they shadow each other
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
TESTS=TwoRightExclusionsShadowEachOther,
TwoLeftExclusionsShadowEachOther
Review-Url: https://codereview.chromium.org/2733133002
Cr-Commit-Position: refs/heads/master@{#455444}
Committed: https://chromium.googlesource.com/chromium/src/+/5ccd9ec6998eee48bc73e7d8a992c4cccdb31899
Patch Set 1 #
Total comments: 1
Patch Set 2 : add NGExclusion::MaybeCombineWith #
Total comments: 1
Patch Set 3 : fix comments #Patch Set 4 : git rebase-update #Patch Set 5 : delete unreachable return statement #Depends on Patchset: Messages
Total messages: 31 (21 generated)
|