Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/CaretBase.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/CaretBase.cpp b/third_party/WebKit/Source/core/editing/CaretBase.cpp |
| index c448ac207b47e6b33ec11a3e729be030a6052e9c..d06023af371e082ad2d3dbd894a681681fe4e2e1 100644 |
| --- a/third_party/WebKit/Source/core/editing/CaretBase.cpp |
| +++ b/third_party/WebKit/Source/core/editing/CaretBase.cpp |
| @@ -82,7 +82,15 @@ static void mapCaretRectToCaretPainter(LayoutItem caretLayoutItem, LayoutBlockIt |
| unrooted = true; |
| break; |
| } |
| - caretRect.move(caretLayoutItem.offsetFromContainer(containerItem, caretRect.location())); |
| + caretRect.move(caretLayoutItem.offsetFromContainer(containerItem)); |
| + |
| + // TODO(mstensho): Fix crbug.com/596070 and get rid of this flowthread/multicol thing |
| + // here. It was added to keep the same behavior as before flowthread-to-visual coordinate |
| + // space conversion was moved out from offsetFromContainer() to mapLocalToAncestor(). |
| + LayoutObject* containerObject = (LayoutObject*)containerItem; |
|
mstensho (USE GERRIT)
2016/03/18 20:51:40
Pretty sure I'm violating the API encapsulation li
leviw_travelin_and_unemployed
2016/03/18 22:27:02
Really you should be adding that method to the API
mstensho (USE GERRIT)
2016/03/18 22:45:23
Done.
|
| + if (containerObject->isLayoutFlowThread()) |
| + caretRect.move(containerObject->columnOffset(caretRect.location())); |
| + |
| caretLayoutItem = containerItem; |
| } |