OLD | NEW |
(Empty) | |
| 1 # LayoutNG # |
| 2 |
| 3 This directory contains the implementation of Blink's new layout engine |
| 4 "LayoutNG". |
| 5 |
| 6 This README can be viewed in formatted form [here](https://chromium.googlesource
.com/chromium/src/+/master/third_party/WebKit/Source/core/layout/ng/README.md). |
| 7 |
| 8 The original design document can be seen [here](https://docs.google.com/document
/d/1uxbDh4uONFQOiGuiumlJBLGgO4KDWB8ZEkp7Rd47fw4/edit). |
| 9 |
| 10 ## High level overview ## |
| 11 |
| 12 CSS has many different types of layout modes, controlled by the `display` |
| 13 property. (In addition to this specific HTML elements have custom layout modes |
| 14 as well). For each different type of layout, we have a |
| 15 [NGLayoutAlgorithm](ng_layout_algorithm.h). |
| 16 |
| 17 The input to an [NGLayoutAlgorithm](ng_layout_algorithm.h) is the same tuple |
| 18 for every kind of layout: |
| 19 |
| 20 - The [NGBox](ng_box.h) which we are currently performing layout for. The |
| 21 following information is accessed: |
| 22 |
| 23 - The [ComputedStyle](../../style/ComputedStyle.h) for the node which we are |
| 24 currently performing laying for. |
| 25 |
| 26 - The list of children [NGBox](ng_box.h)es to perform layout upon, and their |
| 27 respective style objects. |
| 28 |
| 29 - The [NGConstraintSpace](ng_constraint_space.h) which represents the "space" |
| 30 in which the current layout should produce a |
| 31 [NGPhysicalFragment](ng_physical_fragment.h). |
| 32 |
| 33 - TODO(layout-dev): BreakTokens should go here once implemented. |
| 34 |
| 35 The current layout should not access any information outside this set, this |
| 36 will break invariants in the system. (As a concrete example we intend to cache |
| 37 [NGPhysicalFragment](ng_physical_fragment.h)s based on this set, accessing |
| 38 additional information outside this set will break caching behaviour). |
| 39 |
| 40 ### Box Tree ### |
| 41 |
| 42 TODO(layout-dev): Document with lots of pretty pictures. |
| 43 |
| 44 ### Fragment Tree ### |
| 45 |
| 46 TODO(layout-dev): Document with lots of pretty pictures. |
| 47 |
| 48 ### Constraint Spaces ### |
| 49 |
| 50 TODO(layout-dev): Document with lots of pretty pictures. |
| 51 |
| 52 ## Block Flow Algorithm ## |
| 53 |
| 54 This section contains details specific to the |
| 55 [NGBlockLayoutAlgorithm](ng_block_layout_algorithm.h). |
| 56 |
| 57 ### Collapsing Margins ### |
| 58 |
| 59 TODO(layout-dev): Document with lots of pretty pictures. |
| 60 |
| 61 ### Float Positioning ### |
| 62 |
| 63 TODO(layout-dev): Document with lots of pretty pictures. |
OLD | NEW |