OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 , m_bitfields(node) | 213 , m_bitfields(node) |
214 { | 214 { |
215 #ifndef NDEBUG | 215 #ifndef NDEBUG |
216 renderObjectCounter.increment(); | 216 renderObjectCounter.increment(); |
217 #endif | 217 #endif |
218 ASSERT(node); | 218 ASSERT(node); |
219 } | 219 } |
220 | 220 |
221 RenderObject::~RenderObject() | 221 RenderObject::~RenderObject() |
222 { | 222 { |
223 ASSERT(!node() || documentBeingDestroyed() || !frame()->view() || frame()->v
iew()->layoutRoot() != this); | |
224 #ifndef NDEBUG | 223 #ifndef NDEBUG |
225 ASSERT(!m_hasAXObject); | 224 ASSERT(!m_hasAXObject); |
226 renderObjectCounter.decrement(); | 225 renderObjectCounter.decrement(); |
227 #endif | 226 #endif |
228 } | 227 } |
229 | 228 |
230 RenderTheme* RenderObject::theme() const | 229 RenderTheme* RenderObject::theme() const |
231 { | 230 { |
232 ASSERT(document()->page()); | 231 ASSERT(document()->page()); |
233 | 232 |
(...skipping 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2262 } | 2261 } |
2263 | 2262 |
2264 bool RenderObject::isSelectionBorder() const | 2263 bool RenderObject::isSelectionBorder() const |
2265 { | 2264 { |
2266 SelectionState st = selectionState(); | 2265 SelectionState st = selectionState(); |
2267 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth; | 2266 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth; |
2268 } | 2267 } |
2269 | 2268 |
2270 inline void RenderObject::clearLayoutRootIfNeeded() const | 2269 inline void RenderObject::clearLayoutRootIfNeeded() const |
2271 { | 2270 { |
2272 if (node() && !documentBeingDestroyed() && frame()) { | 2271 if (!documentBeingDestroyed() && frame()) { |
2273 if (FrameView* view = frame()->view()) { | 2272 if (FrameView* view = frame()->view()) { |
2274 if (view->layoutRoot() == this) { | 2273 if (view->layoutRoot() == this) { |
2275 ASSERT_NOT_REACHED(); | 2274 ASSERT_NOT_REACHED(); |
2276 // This indicates a failure to layout the child, which is why | 2275 // This indicates a failure to layout the child, which is why |
2277 // the layout root is still set to |this|. Make sure to clear it | 2276 // the layout root is still set to |this|. Make sure to clear it |
2278 // since we are getting destroyed. | 2277 // since we are getting destroyed. |
2279 view->clearLayoutRoot(); | 2278 view->clearLayoutRoot(); |
2280 } | 2279 } |
2281 } | 2280 } |
2282 } | 2281 } |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2949 { | 2948 { |
2950 if (object1) { | 2949 if (object1) { |
2951 const WebCore::RenderObject* root = object1; | 2950 const WebCore::RenderObject* root = object1; |
2952 while (root->parent()) | 2951 while (root->parent()) |
2953 root = root->parent(); | 2952 root = root->parent(); |
2954 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2953 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
2955 } | 2954 } |
2956 } | 2955 } |
2957 | 2956 |
2958 #endif | 2957 #endif |
OLD | NEW |