OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 #include "core/rendering/HitTestResult.h" | 32 #include "core/rendering/HitTestResult.h" |
33 #include "core/rendering/InlineTextBox.h" | 33 #include "core/rendering/InlineTextBox.h" |
34 #include "core/rendering/PaintInfo.h" | 34 #include "core/rendering/PaintInfo.h" |
35 #include "core/rendering/RenderInline.h" | 35 #include "core/rendering/RenderInline.h" |
36 #include "core/rendering/RenderView.h" | 36 #include "core/rendering/RenderView.h" |
37 #include "core/rendering/RootInlineBox.h" | 37 #include "core/rendering/RootInlineBox.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 #ifndef NDEBUG | 41 #if ENABLE(ASSERT) |
42 RenderLineBoxList::~RenderLineBoxList() | 42 RenderLineBoxList::~RenderLineBoxList() |
43 { | 43 { |
44 ASSERT(!m_firstLineBox); | 44 ASSERT(!m_firstLineBox); |
45 ASSERT(!m_lastLineBox); | 45 ASSERT(!m_lastLineBox); |
46 } | 46 } |
47 #endif | 47 #endif |
48 | 48 |
49 void RenderLineBoxList::appendLineBox(InlineFlowBox* box) | 49 void RenderLineBoxList::appendLineBox(InlineFlowBox* box) |
50 { | 50 { |
51 checkConsistency(); | 51 checkConsistency(); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 if (adjacentBox) | 349 if (adjacentBox) |
350 adjacentBox->markDirty(); | 350 adjacentBox->markDirty(); |
351 adjacentBox = box->nextRootBox(); | 351 adjacentBox = box->nextRootBox(); |
352 // If |child| or any of its immediately previous siblings with culled li
neboxes is the object after a line-break in |box| or the linebox after it | 352 // If |child| or any of its immediately previous siblings with culled li
neboxes is the object after a line-break in |box| or the linebox after it |
353 // then that means |child| actually sits on the linebox after |box| (or
is its line-break object) and so we need to dirty it as well. | 353 // then that means |child| actually sits on the linebox after |box| (or
is its line-break object) and so we need to dirty it as well. |
354 if (adjacentBox && (potentialLineBreakObjects.contains(box->lineBreakObj
()) || potentialLineBreakObjects.contains(adjacentBox->lineBreakObj()) || child-
>isBR() || isIsolated(container->style()->unicodeBidi()))) | 354 if (adjacentBox && (potentialLineBreakObjects.contains(box->lineBreakObj
()) || potentialLineBreakObjects.contains(adjacentBox->lineBreakObj()) || child-
>isBR() || isIsolated(container->style()->unicodeBidi()))) |
355 adjacentBox->markDirty(); | 355 adjacentBox->markDirty(); |
356 } | 356 } |
357 } | 357 } |
358 | 358 |
359 #ifndef NDEBUG | 359 #if ENABLE(ASSERT) |
360 | 360 |
361 void RenderLineBoxList::checkConsistency() const | 361 void RenderLineBoxList::checkConsistency() const |
362 { | 362 { |
363 #ifdef CHECK_CONSISTENCY | 363 #ifdef CHECK_CONSISTENCY |
364 const InlineFlowBox* prev = 0; | 364 const InlineFlowBox* prev = 0; |
365 for (const InlineFlowBox* child = m_firstLineBox; child != 0; child = child-
>nextLineBox()) { | 365 for (const InlineFlowBox* child = m_firstLineBox; child != 0; child = child-
>nextLineBox()) { |
366 ASSERT(child->prevLineBox() == prev); | 366 ASSERT(child->prevLineBox() == prev); |
367 prev = child; | 367 prev = child; |
368 } | 368 } |
369 ASSERT(prev == m_lastLineBox); | 369 ASSERT(prev == m_lastLineBox); |
370 #endif | 370 #endif |
371 } | 371 } |
372 | 372 |
373 #endif | 373 #endif |
374 | 374 |
375 } | 375 } |
OLD | NEW |