Implement the layout algorithm described in the implementation note of the exclusions spec: http://dev.w3.org/csswg/css3-exclusions/#exclusions-implementation-note
This should be the master bug of the layout implementation:
- Do a totally normal layout that doesn't take into account any wrap properties
- Second step runs only if there were exclusions detected in the first step
1. Create a list of exclusions in the current wrapping context
2. Sort the list of exclusions using the exclusion order described at http://dev.w3.org/csswg/css3-exclusions/#exclusions-order
3. Take the exclusions in reverse (ie. starting from the exclusion that is not affected by anything else). For each exclusion do the following steps:
3.1. Do the layout of the exclusion, keeping the exclusion position and size unmodified.
3.2. After the layout of the exclusion is finished, add its shape-outside to the wrapping context.
3.3. Take the following exclusion
4. Finish the layout of the block without changing the layout of the descendant exclusions.
1. Floats will be affected by exclusions as if they were a big character. That means, the layout will try to position floats without overlapping them with exclusions.
2. Inline-blocks will also be treated as a big character.
3. Elements with "wrap-through: none" will define their own wrapping context, so they will not be affected by the parent's wrapping context and will run their own layout passes.