| 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
| 5 * All rights reserved. | 5 * All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // have continuations of their own that are anonymous children of our | 69 // have continuations of their own that are anonymous children of our |
| 70 // continuation. | 70 // continuation. |
| 71 LayoutBoxModelObject* continuation = this->Continuation(); | 71 LayoutBoxModelObject* continuation = this->Continuation(); |
| 72 if (continuation) { | 72 if (continuation) { |
| 73 continuation->Destroy(); | 73 continuation->Destroy(); |
| 74 SetContinuation(nullptr); | 74 SetContinuation(nullptr); |
| 75 } | 75 } |
| 76 | 76 |
| 77 if (!DocumentBeingDestroyed()) { | 77 if (!DocumentBeingDestroyed()) { |
| 78 if (FirstLineBox()) { | 78 if (FirstLineBox()) { |
| 79 // We can't wait for LayoutBoxModelObject::destroy to clear the selection, | |
| 80 // because by then we will have nuked the line boxes. | |
| 81 // FIXME: The FrameSelection should be responsible for this when it | |
| 82 // is notified of DOM mutations. | |
| 83 if (IsSelectionBorder()) | |
| 84 View()->ClearSelection(); | |
| 85 | |
| 86 // If line boxes are contained inside a root, that means we're an inline. | 79 // If line boxes are contained inside a root, that means we're an inline. |
| 87 // In that case, we need to remove all the line boxes so that the parent | 80 // In that case, we need to remove all the line boxes so that the parent |
| 88 // lines aren't pointing to deleted children. If the first line box does | 81 // lines aren't pointing to deleted children. If the first line box does |
| 89 // not have a parent that means they are either already disconnected or | 82 // not have a parent that means they are either already disconnected or |
| 90 // root lines that can just be destroyed without disconnecting. | 83 // root lines that can just be destroyed without disconnecting. |
| 91 if (FirstLineBox()->Parent()) { | 84 if (FirstLineBox()->Parent()) { |
| 92 for (InlineFlowBox* box = FirstLineBox(); box; box = box->NextLineBox()) | 85 for (InlineFlowBox* box = FirstLineBox(); box; box = box->NextLineBox()) |
| 93 box->Remove(); | 86 box->Remove(); |
| 94 } | 87 } |
| 95 } else if (Parent()) { | 88 } else if (Parent()) { |
| (...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 paint_invalidator.InvalidateDisplayItemClient(*box, invalidation_reason); | 1542 paint_invalidator.InvalidateDisplayItemClient(*box, invalidation_reason); |
| 1550 } | 1543 } |
| 1551 | 1544 |
| 1552 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1545 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
| 1553 LayoutRect LayoutInline::DebugRect() const { | 1546 LayoutRect LayoutInline::DebugRect() const { |
| 1554 IntRect lines_box = EnclosingIntRect(LinesBoundingBox()); | 1547 IntRect lines_box = EnclosingIntRect(LinesBoundingBox()); |
| 1555 return LayoutRect(IntRect(0, 0, lines_box.Width(), lines_box.Height())); | 1548 return LayoutRect(IntRect(0, 0, lines_box.Width(), lines_box.Height())); |
| 1556 } | 1549 } |
| 1557 | 1550 |
| 1558 } // namespace blink | 1551 } // namespace blink |
| OLD | NEW |