| OLD | NEW |
| 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 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "Widget.h" | 27 #include "Widget.h" |
| 28 | 28 |
| 29 #include "IntRect.h" | 29 #include "IntRect.h" |
| 30 #include "ScrollView.h" | 30 #include "ScrollView.h" |
| 31 | 31 |
| 32 #include <wtf/Assertions.h> | 32 #include <wtf/Assertions.h> |
| 33 | 33 |
| 34 namespace WebCore { | 34 namespace WebCore { |
| 35 | 35 |
| 36 void Widget::init(PlatformWidget widget) | 36 void Widget::init() |
| 37 { | 37 { |
| 38 m_parent = 0; | 38 m_parent = 0; |
| 39 m_selfVisible = false; | 39 m_selfVisible = false; |
| 40 m_parentVisible = false; | 40 m_parentVisible = false; |
| 41 m_widget = widget; | |
| 42 if (m_widget) | |
| 43 retainPlatformWidget(); | |
| 44 } | 41 } |
| 45 | 42 |
| 46 void Widget::setParent(ScrollView* view) | 43 void Widget::setParent(ScrollView* view) |
| 47 { | 44 { |
| 48 ASSERT(!view || !m_parent); | 45 ASSERT(!view || !m_parent); |
| 49 if (!view || !view->isVisible()) | 46 if (!view || !view->isVisible()) |
| 50 setParentVisible(false); | 47 setParentVisible(false); |
| 51 m_parent = view; | 48 m_parent = view; |
| 52 if (view && view->isVisible()) | 49 if (view && view->isVisible()) |
| 53 setParentVisible(true); | 50 setParentVisible(true); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 return parentPoint; | 197 return parentPoint; |
| 201 } | 198 } |
| 202 | 199 |
| 203 #if !PLATFORM(EFL) | 200 #if !PLATFORM(EFL) |
| 204 void Widget::frameRectsChanged() | 201 void Widget::frameRectsChanged() |
| 205 { | 202 { |
| 206 } | 203 } |
| 207 #endif | 204 #endif |
| 208 | 205 |
| 209 } // namespace WebCore | 206 } // namespace WebCore |
| OLD | NEW |