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

Unified Diff: ui/views/view.cc

Issue 11418040: gfx::Transform API clean-up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 9d04967fb39d244bbc52da72c080d5efb5dd7e0d..3356002f861a12deec4435e0ad8aea10c580d8e6 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -332,8 +332,10 @@ gfx::Rect View::GetVisibleBounds() const {
while (view != NULL && !vis_bounds.IsEmpty()) {
transform.ConcatTransform(view->GetTransform());
- transform.ConcatTranslate(static_cast<float>(view->GetMirroredX()),
- static_cast<float>(view->y()));
+ gfx::Transform translation;
+ translation.Translate(static_cast<float>(view->GetMirroredX()),
+ static_cast<float>(view->y()));
+ transform.ConcatTransform(translation);
vis_bounds = view->ConvertRectToParent(vis_bounds);
const View* ancestor = view->parent_;
@@ -1798,8 +1800,10 @@ bool View::GetTransformRelativeTo(const View* ancestor,
while (p && p != ancestor) {
transform->ConcatTransform(p->GetTransform());
- transform->ConcatTranslate(static_cast<float>(p->GetMirroredX()),
- static_cast<float>(p->y()));
+ gfx::Transform translation;
+ translation.Translate(static_cast<float>(p->GetMirroredX()),
+ static_cast<float>(p->y()));
+ transform->ConcatTransform(translation);
p = p->parent_;
}

Powered by Google App Engine
This is Rietveld 408576698