Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # LayoutNG # | |
| 2 | |
| 3 This directory contains the implementation of blink's new layout engine | |
|
Gleb Lanbin
2016/10/10 23:07:55
use Blink's instead of blink's?
ikilpatrick
2016/10/11 21:26:33
Done.
| |
| 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). | |
|
eae
2016/10/10 23:17:05
I know I suggested it but I'd be very reluctant to
ikilpatrick
2016/10/11 21:26:33
:( Yeah, I like the bug you filed w/ infra. This r
| |
| 7 | |
| 8 The original design document can be seen [here](https://docs.google.com/document /d/1uxbDh4uONFQOiGuiumlJBLGgO4KDWB8ZEkp7Rd47fw4/edit). | |
|
eae
2016/10/10 23:17:05
This URL doesn't work.
ikilpatrick
2016/10/11 21:26:32
did you copy the space in the review tool?
| |
| 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 | |
|
Gleb Lanbin
2016/10/10 23:07:55
should "- the following" start from a new line?
ikilpatrick
2016/10/11 21:26:33
Acknowledged. Changed to sentence.
| |
| 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-ng): 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 ### The Box Tree ### | |
| 41 | |
| 42 TODO(layout-ng): Document with lots of pretty pictures. | |
|
Gleb Lanbin
2016/10/10 23:07:55
TODO should be followed by username, bug ID or ema
ikilpatrick
2016/10/11 21:26:33
Done.
| |
| 43 | |
| 44 ### The Fragment Tree ### | |
| 45 | |
| 46 TODO(layout-ng): Document with lots of pretty pictures. | |
| 47 | |
| 48 ### Contstraint Spaces ### | |
|
Gleb Lanbin
2016/10/10 23:07:55
typo. Contstraint -> Constraint
.nit should we dr
ikilpatrick
2016/10/11 21:26:33
Done.
| |
| 49 | |
| 50 TODO(layout-ng): Document with lots of pretty pictures. | |
| 51 | |
| 52 ## The Block Flow Algorithm ## | |
| 53 | |
| 54 This section contains details specific to the | |
| 55 [NGBlockLayoutAlgorithm](ng_block_layout_algorithm.h). | |
| 56 | |
| 57 ### Margin Collapsing ### | |
|
Gleb Lanbin
2016/10/10 23:07:55
it's named Collapsing Margins in https://www.w3.or
ikilpatrick
2016/10/11 21:26:33
Done.
| |
| 58 | |
| 59 TODO(layout-ng): Document with lots of pretty pictures. | |
| 60 | |
| 61 ### Float Positioning ### | |
| 62 | |
| 63 TODO(layout-ng): Document with lots of pretty pictures. | |
| OLD | NEW |