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

Unified Diff: Source/core/layout/LayoutReplaced.cpp

Issue 1303653002: Introduce LayoutObject::createPositionWithAffinity(int offset) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T12:20:28 Created 5 years, 4 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 | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutReplaced.cpp
diff --git a/Source/core/layout/LayoutReplaced.cpp b/Source/core/layout/LayoutReplaced.cpp
index 80096013623213eb402c3d0f3951b4ee69efe83e..34c24b507ddad1aa663d699468afbdbf718a2fa1 100644
--- a/Source/core/layout/LayoutReplaced.cpp
+++ b/Source/core/layout/LayoutReplaced.cpp
@@ -420,15 +420,15 @@ PositionWithAffinity LayoutReplaced::positionForPoint(const LayoutPoint& point)
LayoutUnit lineDirectionPosition = isHorizontalWritingMode() ? point.x() + location().x() : point.y() + location().y();
if (blockDirectionPosition < top)
- return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); // coordinates are above
+ return createPositionWithAffinity(caretMinOffset()); // coordinates are above
if (blockDirectionPosition >= bottom)
- return createPositionWithAffinity(caretMaxOffset(), DOWNSTREAM); // coordinates are below
+ return createPositionWithAffinity(caretMaxOffset()); // coordinates are below
if (node()) {
if (lineDirectionPosition <= logicalLeft() + (logicalWidth() / 2))
- return createPositionWithAffinity(0, DOWNSTREAM);
- return createPositionWithAffinity(1, DOWNSTREAM);
+ return createPositionWithAffinity(0);
+ return createPositionWithAffinity(1);
}
return LayoutBox::positionForPoint(point);
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698