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

Unified Diff: third_party/WebKit/Source/web/mac/WebSubstringUtil.mm

Issue 1616813002: Consider Zoom factor when getting bounding rect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..674e71488479330ed40b30c8a54f4980001edc0a 100644
--- a/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm
+++ b/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm
@@ -113,7 +113,7 @@ 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());
+ IntRect stringRect = frameView->contentsToRootFrame(createRange(range)->boundingBox());
keishi 2016/01/29 05:49:14 According to the comment boundingRect considers cs
Shu Chen 2016/01/29 05:57:59 If using boundingRect, the result is wrong for zoo
yosin_UTC9 2016/01/29 06:30:52 Add CSS property "-webkit-transform", e.g. -webkit
IntPoint stringPoint = stringRect.minXMaxYCorner();
stringPoint.setY(frameView->height() - stringPoint.y());
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698