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

Unified Diff: ui/views/view.cc

Issue 2595163002: Add origin() method on View and use it to simplify some callers. (Closed)
Patch Set: Created 4 years 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 92223157d4c8671aaa2c55aab4c006d1ee25b265..f34be88ea2f2f7c972dc42f3d4ff584ee5e5c996 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -786,7 +786,7 @@ void View::Paint(const ui::PaintContext& parent_context) {
if (!layer()) {
// If the View has a layer() then it is a paint root. Otherwise, we need to
// add the offset from the parent into the total offset from the paint root.
- DCHECK(parent() || bounds().origin() == gfx::Point());
+ DCHECK(parent() || origin() == gfx::Point());
offset_to_parent = GetMirroredPosition().OffsetFromOrigin();
}
ui::PaintContext context(parent_context, offset_to_parent);

Powered by Google App Engine
This is Rietveld 408576698