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

Unified Diff: third_party/WebKit/Source/core/editing/CaretBase.cpp

Issue 1820483002: Untangle multicol coordinate space conversion from offsetFromContainer(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review comment. Created 4 years, 9 months 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/LayoutBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cbf557976a0b009a6a7928e2eed1d1cbead4d09a 100644
--- a/third_party/WebKit/Source/core/editing/CaretBase.cpp
+++ b/third_party/WebKit/Source/core/editing/CaretBase.cpp
@@ -82,7 +82,13 @@ 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().
+ caretRect.move(containerItem.columnOffset(caretRect.location()));
+
caretLayoutItem = containerItem;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698