Chromium Code Reviews| Index: ui/views/view.cc |
| diff --git a/ui/views/view.cc b/ui/views/view.cc |
| index fd1ac7f79ab0fc023a3c2827f1b4eaa880f4fa30..b274473ad1307a6211b6f2b740e39e733469a72c 100644 |
| --- a/ui/views/view.cc |
| +++ b/ui/views/view.cc |
| @@ -623,7 +623,7 @@ void View::ConvertPointToTarget(const View* source, |
| // API defines NULL |source| as returning the point in screen coordinates. |
| if (!source) { |
| *point = point->Subtract( |
| - root->GetWidget()->GetClientAreaBoundsInScreen().origin()); |
| + root->GetWidget()->GetClientAreaBoundsInScreen().DistanceFromOrigin()); |
|
danakj
2012/10/26 23:30:34
We probably want something like GetClientAreaOffse
Peter Kasting
2012/10/26 23:50:16
Yes. I think pretty much any function which has "
|
| } |
| } |
| @@ -673,7 +673,7 @@ void View::ConvertPointFromScreen(const View* dst, gfx::Point* p) { |
| gfx::Rect View::ConvertRectToParent(const gfx::Rect& rect) const { |
| gfx::Rect x_rect = rect; |
| GetTransform().TransformRect(&x_rect); |
| - x_rect.Offset(GetMirroredPosition()); |
| + x_rect.Offset(GetMirroredPosition().DistanceFromOrigin()); |
| return x_rect; |
| } |
| @@ -724,7 +724,7 @@ void View::Paint(gfx::Canvas* canvas) { |
| // Non-empty clip, translate the graphics such that 0,0 corresponds to |
| // where this view is located (related to its parent). |
| - canvas->Translate(GetMirroredPosition()); |
| + canvas->Translate(GetMirroredPosition().DistanceFromOrigin()); |
| canvas->Transform(GetTransform()); |
| PaintCommon(canvas); |
| @@ -1526,7 +1526,7 @@ void View::PaintCommon(gfx::Canvas* canvas) { |
| // request the canvas to be flipped. |
| ScopedCanvas scoped(canvas); |
| if (FlipCanvasOnPaintForRTLUI()) { |
| - canvas->Translate(gfx::Point(width(), 0)); |
| + canvas->Translate(gfx::Vector2d(width(), 0)); |
| canvas->Scale(-1, 1); |
| } |