Chromium Code Reviews

Unified Diff: Source/core/editing/Caret.cpp

Issue 1198433002: *** NOT FOR LANDING *** mapLocalToContainer and offsetFromContainer cleanup. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: There's also work that LayoutBoxModelObject::offsetFromContainer could do instead of LayoutObject. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Caret.cpp
diff --git a/Source/core/editing/Caret.cpp b/Source/core/editing/Caret.cpp
index 8b840276788d8792302f7f8522e67053c4336fa9..2ac419d21a0ab71a2331fbc91c6f032a825c90ba 100644
--- a/Source/core/editing/Caret.cpp
+++ b/Source/core/editing/Caret.cpp
@@ -152,7 +152,8 @@ static void mapCaretRectToCaretPainter(LayoutObject* caretLayoutObject, LayoutBl
unrooted = true;
break;
}
- caretRect.move(caretLayoutObject->offsetFromContainer(containerObject, caretRect.location()));
+ caretRect.move(caretLayoutObject->offsetFromContainer(containerObject));
+ caretRect.move(caretLayoutObject->columnOffset(caretRect.location())); // TODO(mstensho): do we need this? And what about the FIXME further above that suggests that we use mapLocalToContainer() instead?
caretLayoutObject = containerObject;
}
« no previous file with comments | « no previous file | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine