Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(601)

Unified Diff: third_party/WebKit/Source/core/layout/README.md

Issue 2539713004: Update layout location documentation to reflect renames. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/line/InlineBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/line/InlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698