Index: third_party/WebKit/Source/web/mac/WebSubstringUtil.mm |
diff --git a/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm b/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm |
index 350e9cb072ff92136e107450e6ab66a12decc15d..ab00dbecdf277007340030e0528374a2f53111dd 100644 |
--- a/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm |
+++ b/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm |
@@ -113,7 +113,13 @@ WebPoint getBaselinePoint(FrameView* frameView, const EphemeralRange& range, NSA |
{ |
// Compute bottom left corner and convert to AppKit coordinates. |
// TODO(yosin) We shold avoid to create |Range| object. See crbug.com/529985. |
- IntRect stringRect = enclosingIntRect(createRange(range)->boundingRect()); |
+ float scale = frameView->frame().pageZoomFactor() * frameView->frame().textZoomFactor(); |
yosin_UTC9
2016/01/26 03:44:17
Which coordinate space do you want to get?
See htt
Shu Chen
2016/01/26 13:06:43
Done. Will the new change work?
|
+ FloatRect rect = createRange(range)->boundingRect(); |
+ rect.setX(rect.x() * scale); |
+ rect.setY(rect.y() * scale); |
+ rect.setWidth(rect.width() * scale); |
+ rect.setHeight(rect.height() * scale); |
+ IntRect stringRect = enclosingIntRect(rect); |
IntPoint stringPoint = stringRect.minXMaxYCorner(); |
stringPoint.setY(frameView->height() - stringPoint.y()); |