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 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2272 } | 2272 } |
2273 | 2273 |
2274 bool LayoutObject::isSelectionBorder() const | 2274 bool LayoutObject::isSelectionBorder() const |
2275 { | 2275 { |
2276 SelectionState st = selectionState(); | 2276 SelectionState st = selectionState(); |
2277 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth; | 2277 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth; |
2278 } | 2278 } |
2279 | 2279 |
2280 inline void LayoutObject::clearLayoutRootIfNeeded() const | 2280 inline void LayoutObject::clearLayoutRootIfNeeded() const |
2281 { | 2281 { |
2282 if (frame()) { | 2282 if (FrameView* view = frameView()) { |
2283 if (FrameView* view = frame()->view()) { | 2283 if (!documentBeingDestroyed()) |
2284 if (view->layoutRoot() == this) { | 2284 view->clearLayoutSubtreeRoot(*this); |
2285 if (!documentBeingDestroyed()) | |
2286 ASSERT_NOT_REACHED(); | |
2287 // This indicates a failure to layout the child, which is why | |
2288 // the layout root is still set to |this|. Make sure to clear it | |
2289 // since we are getting destroyed. | |
2290 view->clearLayoutSubtreeRoot(); | |
2291 } | |
2292 } | |
2293 } | 2285 } |
2294 } | 2286 } |
2295 | 2287 |
2296 void LayoutObject::willBeDestroyed() | 2288 void LayoutObject::willBeDestroyed() |
2297 { | 2289 { |
2298 // Destroy any leftover anonymous children. | 2290 // Destroy any leftover anonymous children. |
2299 LayoutObjectChildList* children = virtualChildren(); | 2291 LayoutObjectChildList* children = virtualChildren(); |
2300 if (children) | 2292 if (children) |
2301 children->destroyLeftoverChildren(); | 2293 children->destroyLeftoverChildren(); |
2302 | 2294 |
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3189 { | 3181 { |
3190 if (object1) { | 3182 if (object1) { |
3191 const blink::LayoutObject* root = object1; | 3183 const blink::LayoutObject* root = object1; |
3192 while (root->parent()) | 3184 while (root->parent()) |
3193 root = root->parent(); | 3185 root = root->parent(); |
3194 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3186 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3195 } | 3187 } |
3196 } | 3188 } |
3197 | 3189 |
3198 #endif | 3190 #endif |
OLD | NEW |