Bug 71908 - CSS Exclusions: implement the layout algorithm
: CSS Exclusions: implement the layout algorithm
Status: NEW
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Nobody
http://dev.w3.org/csswg/css3-exclusio...
: InRadar
Depends on:
Blocks: 57311
  Show dependency treegraph
 
Reported: 2011-11-09 06:59 PST by Alexandru Chiculita
Modified: 2013-05-29 10:31 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Chiculita 2011-11-09 06:59:48 PST
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:

First pass:
- Do a totally normal layout that doesn't take into account any wrap properties

Second step:
- 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.

Notes:
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.
Comment 1 Radar WebKit Bug Importer 2011-11-09 09:25:48 PST
<rdar://problem/10419708>