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

Side by Side Diff: Source/platform/Widget.cpp

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ~Scrollbar assert Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 15 matching lines...) Expand all
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "platform/Widget.h" 28 #include "platform/Widget.h"
29 29
30 30
31 #include "wtf/Assertions.h" 31 #include "wtf/Assertions.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 Widget::Widget() 35 Widget::Widget()
36 : m_parent(0) 36 : m_parent(nullptr)
37 , m_selfVisible(false) 37 , m_selfVisible(false)
38 , m_parentVisible(false) 38 , m_parentVisible(false)
39 { 39 {
40 } 40 }
41 41
42 Widget::~Widget() 42 Widget::~Widget()
43 { 43 {
44 #if !ENABLE(OILPAN)
44 ASSERT(!parent()); 45 ASSERT(!parent());
46 #endif
47 }
48
49 void Widget::trace(Visitor* visitor)
50 {
51 visitor->trace(m_parent);
45 } 52 }
46 53
47 void Widget::setParent(Widget* widget) 54 void Widget::setParent(Widget* widget)
48 { 55 {
49 ASSERT(!widget || !m_parent); 56 ASSERT(!widget || !m_parent);
50 if (!widget || !widget->isVisible()) 57 if (!widget || !widget->isVisible())
51 setParentVisible(false); 58 setParentVisible(false);
52 m_parent = widget; 59 m_parent = widget;
53 if (widget && widget->isVisible()) 60 if (widget && widget->isVisible())
54 setParentVisible(true); 61 setParentVisible(true);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 { 167 {
161 return point; 168 return point;
162 } 169 }
163 170
164 IntPoint Widget::convertSelfToChild(const Widget*, const IntPoint& point) const 171 IntPoint Widget::convertSelfToChild(const Widget*, const IntPoint& point) const
165 { 172 {
166 return point; 173 return point;
167 } 174 }
168 175
169 } // namespace blink 176 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698