diff options
Diffstat (limited to 'chrome/views/view.cc')
| -rw-r--r-- | chrome/views/view.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/views/view.cc b/chrome/views/view.cc index 59e5b73..8d1926f 100644 --- a/chrome/views/view.cc +++ b/chrome/views/view.cc @@ -1268,13 +1268,12 @@ void View::ConvertPointToView(const View* src, } // static -void View::ConvertPointToWidget(View* src, gfx::Point* p) { +void View::ConvertPointToWidget(const View* src, gfx::Point* p) { DCHECK(src); DCHECK(p); - View *v; gfx::Point offset; - for (v = src; v; v = v->GetParent()) { + for (const View* v = src; v; v = v->GetParent()) { offset.set_x(offset.x() + v->GetX(APPLY_MIRRORING_TRANSFORMATION)); offset.set_y(offset.y() + v->y()); } @@ -1282,14 +1281,14 @@ void View::ConvertPointToWidget(View* src, gfx::Point* p) { } // static -void View::ConvertPointFromWidget(View *source, gfx::Point* p) { +void View::ConvertPointFromWidget(const View* dest, gfx::Point* p) { gfx::Point t; - ConvertPointToWidget(source, &t); + ConvertPointToWidget(dest, &t); p->SetPoint(p->x() - t.x(), p->y() - t.y()); } // static -void View::ConvertPointToScreen(View* src, gfx::Point* p) { +void View::ConvertPointToScreen(const View* src, gfx::Point* p) { DCHECK(src); DCHECK(p); |
