Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/geometry/ng_physical_offset.cc |
| diff --git a/third_party/WebKit/Source/core/layout/ng/geometry/ng_physical_offset.cc b/third_party/WebKit/Source/core/layout/ng/geometry/ng_physical_offset.cc |
| index 79c94e7b87670cb5fab76588afdbbd2d9f28f63f..9ede836b6e6ab39414f360c30193b5e8f4308def 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/geometry/ng_physical_offset.cc |
| +++ b/third_party/WebKit/Source/core/layout/ng/geometry/ng_physical_offset.cc |
| @@ -4,10 +4,16 @@ |
| #include "core/layout/ng/geometry/ng_physical_offset.h" |
| +#include "core/layout/ng/geometry/ng_logical_offset.h" |
| #include "wtf/text/WTFString.h" |
| namespace blink { |
| +NGLogicalOffset NGPhysicalOffset::ConvertToLogical(NGWritingMode mode) const { |
| + return mode == kHorizontalTopBottom ? NGLogicalOffset(left, top) |
| + : NGLogicalOffset(top, left); |
|
cbiesinger
2017/04/10 20:55:51
Is that correct? For vertical-rl, I am not sure th
atotic
2017/04/10 22:44:35
I agree.
Computing physical offset of fragment f
|
| +} |
| + |
| NGPhysicalOffset NGPhysicalOffset::operator+( |
| const NGPhysicalOffset& other) const { |
| return NGPhysicalOffset{this->left + other.left, this->top + other.top}; |