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

Unified Diff: Source/platform/fonts/shaping/HarfBuzzShaper.cpp

Issue 648633003: Unify selection rect snapping logic (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/platform/fonts/Font.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/shaping/HarfBuzzShaper.cpp
diff --git a/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
index e1393ce18e96fbfc7f949e5fd83fb892b388737b..8f0042a357d1087438306c59247fc80b0b2cb437 100644
--- a/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
+++ b/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
@@ -1146,15 +1146,9 @@ FloatRect HarfBuzzShaper::selectionRect(const FloatPoint& point, int height, int
if (!foundToX)
toX = m_run.rtl() ? 0 : m_totalWidth;
- if (fromX < toX) {
- return Font::pixelSnappedSelectionRect(
- point.x() + fromX, point.x() + toX,
- point.y(), height);
- }
-
- return Font::pixelSnappedSelectionRect(
- point.x() + toX, point.x() + fromX,
- point.y(), height);
+ if (fromX < toX)
+ return FloatRect(point.x() + fromX, point.y(), toX - fromX, height);
+ return FloatRect(point.x() + toX, point.y(), fromX - toX, height);
}
} // namespace blink
« no previous file with comments | « Source/platform/fonts/Font.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698