Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/README.md |
| diff --git a/third_party/WebKit/Source/core/layout/README.md b/third_party/WebKit/Source/core/layout/README.md |
| index 4cdf2f0b60212fb25e0e5e295d2d77a349df3093..56a1919bf78ce65ed3a64e8d0533723048c3d583 100644 |
| --- a/third_party/WebKit/Source/core/layout/README.md |
| +++ b/third_party/WebKit/Source/core/layout/README.md |
| @@ -212,7 +212,7 @@ making sure to incorporate coverage for all writing modes when appropriate. |
| Values are generally transformed into flipped block-flow coordinates via a set |
| of methods on the involved layout objects. See in particular |
| -`flipForWritingMode()`, `flipForWritingModeForChild()`, and `topLeftLocation()`. |
| +`flipForWritingMode()`, `flipForWritingModeForChild()`. |
| `InlineBox::flipForWritingMode()` variants flip the input value within the |
| inline box's containing block. |
| @@ -225,9 +225,20 @@ the referenced box, offsetting for the specified child box's current x-position |
| and width. This is useful for a common pattern wherein we build up a point |
| location starting with the current location of the (child) box. |
| -`LayoutBox::topLeftLocation()` performs flipping as needed. If the containing |
| -block is not passed to the method, looking it up requires walking up the layout |
| -tree, which can be expensive. |
| +For LayoutBox and LayoutInline classes and subclasses: |
|
Xianzhu
2016/11/29 23:36:29
s/LayoutInline/InlineBox/
wkorman
2016/12/01 18:53:48
Done.
|
| + |
| +`physicalLocation()` returns the physical location of a box or inline in the |
| +containing block. `(0,0)` is the top-left corner of the containing |
| +block. Flipping is performed on the values as needed. If the containing block is |
|
Xianzhu
2016/11/29 23:36:29
The last sentence should apply to LayoutBox only.
wkorman
2016/12/01 18:53:48
Done.
|
| +not passed to the method, looking it up requires walking up the layout tree, |
| +which can be expensive. |
| + |
| +`location()` returns the location of a box or inline in the "physical |
| +coordinates with flipped block-flow direction" coordinate space. `(0,0)` is the |
| +top-left corner of the containing block for `writing-mode` in normal blocks |
| +direction (`horizontal-tb` and `vertical-lr`), and is the top-right corner of |
| +the containing block for `writing-mode` in flipped block-flow direction |
| +(`vertical-rl`). |
| Note there are two primary similar, but slightly different, methods regarding |
| finding the containing block for an element: |