| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class LayoutObject; | 38 class LayoutObject; |
| 39 | 39 |
| 40 struct SameSizeAsInlineBox : DisplayItemClient { | 40 struct SameSizeAsInlineBox : DisplayItemClient { |
| 41 virtual ~SameSizeAsInlineBox() {} | 41 virtual ~SameSizeAsInlineBox() {} |
| 42 uint32_t bitfields; | 42 uint32_t bitfields; |
| 43 void* a[4]; | 43 void* a[4]; |
| 44 LayoutPoint b; | 44 LayoutPoint b; |
| 45 LayoutUnit c; | 45 LayoutUnit c; |
| 46 #if ENABLE(ASSERT) | 46 #if DCHECK_IS_ON() |
| 47 bool f; | 47 bool f; |
| 48 #endif | 48 #endif |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 static_assert(sizeof(InlineBox) == sizeof(SameSizeAsInlineBox), | 51 static_assert(sizeof(InlineBox) == sizeof(SameSizeAsInlineBox), |
| 52 "InlineBox should stay small"); | 52 "InlineBox should stay small"); |
| 53 | 53 |
| 54 #if ENABLE(ASSERT) | 54 #if DCHECK_IS_ON() |
| 55 | |
| 56 InlineBox::~InlineBox() { | 55 InlineBox::~InlineBox() { |
| 57 if (!m_hasBadParent && m_parent) | 56 if (!m_hasBadParent && m_parent) |
| 58 m_parent->setHasBadChildList(); | 57 m_parent->setHasBadChildList(); |
| 59 } | 58 } |
| 60 | |
| 61 #endif | 59 #endif |
| 62 | 60 |
| 63 DISABLE_CFI_PERF | 61 DISABLE_CFI_PERF |
| 64 void InlineBox::destroy() { | 62 void InlineBox::destroy() { |
| 65 // We do not need to issue invalidations if the page is being destroyed | 63 // We do not need to issue invalidations if the page is being destroyed |
| 66 // since these objects will never be repainted. | 64 // since these objects will never be repainted. |
| 67 if (!m_lineLayoutItem.documentBeingDestroyed()) { | 65 if (!m_lineLayoutItem.documentBeingDestroyed()) { |
| 68 setLineLayoutItemShouldDoFullPaintInvalidationIfNeeded(); | 66 setLineLayoutItemShouldDoFullPaintInvalidationIfNeeded(); |
| 69 | 67 |
| 70 // TODO(crbug.com/619630): Make this fast. | 68 // TODO(crbug.com/619630): Make this fast. |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 398 } |
| 401 | 399 |
| 402 void showLineTree(const blink::InlineBox* b) { | 400 void showLineTree(const blink::InlineBox* b) { |
| 403 if (b) | 401 if (b) |
| 404 b->showLineTreeForThis(); | 402 b->showLineTreeForThis(); |
| 405 else | 403 else |
| 406 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); | 404 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); |
| 407 } | 405 } |
| 408 | 406 |
| 409 #endif | 407 #endif |
| OLD | NEW |