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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 // dirty the adjacent lines that might be affected | 356 // dirty the adjacent lines that might be affected |
357 // NOTE: we dirty the previous line because RootInlineBox objects cache | 357 // NOTE: we dirty the previous line because RootInlineBox objects cache |
358 // the address of the first object on the next line after a BR, which we
may be | 358 // the address of the first object on the next line after a BR, which we
may be |
359 // invalidating here. For more info, see how RenderBlock::layoutInlineC
hildren | 359 // invalidating here. For more info, see how RenderBlock::layoutInlineC
hildren |
360 // calls setLineBreakInfo with the result of findNextLineBreak. findNex
tLineBreak, | 360 // calls setLineBreakInfo with the result of findNextLineBreak. findNex
tLineBreak, |
361 // despite the name, actually returns the first RenderObject after the B
R. | 361 // despite the name, actually returns the first RenderObject after the B
R. |
362 // <rdar://problem/3849947> "Typing after pasting line does not appear u
ntil after window resize." | 362 // <rdar://problem/3849947> "Typing after pasting line does not appear u
ntil after window resize." |
363 adjacentBox = box->prevRootBox(); | 363 adjacentBox = box->prevRootBox(); |
364 if (adjacentBox) | 364 if (adjacentBox) |
365 adjacentBox->markDirty(); | 365 adjacentBox->markDirty(); |
366 if (child->isBR() || (curr && curr->isBR())) { | 366 adjacentBox = box->nextRootBox(); |
367 adjacentBox = box->nextRootBox(); | 367 if (adjacentBox && (adjacentBox->lineBreakObj() == child || child->isBR(
) || (curr && curr->isBR()))) |
368 if (adjacentBox) | 368 adjacentBox->markDirty(); |
369 adjacentBox->markDirty(); | |
370 } | |
371 } | 369 } |
372 } | 370 } |
373 | 371 |
374 #ifndef NDEBUG | 372 #ifndef NDEBUG |
375 | 373 |
376 void RenderLineBoxList::checkConsistency() const | 374 void RenderLineBoxList::checkConsistency() const |
377 { | 375 { |
378 #ifdef CHECK_CONSISTENCY | 376 #ifdef CHECK_CONSISTENCY |
379 const InlineFlowBox* prev = 0; | 377 const InlineFlowBox* prev = 0; |
380 for (const InlineFlowBox* child = m_firstLineBox; child != 0; child = child-
>nextLineBox()) { | 378 for (const InlineFlowBox* child = m_firstLineBox; child != 0; child = child-
>nextLineBox()) { |
381 ASSERT(child->prevLineBox() == prev); | 379 ASSERT(child->prevLineBox() == prev); |
382 prev = child; | 380 prev = child; |
383 } | 381 } |
384 ASSERT(prev == m_lastLineBox); | 382 ASSERT(prev == m_lastLineBox); |
385 #endif | 383 #endif |
386 } | 384 } |
387 | 385 |
388 #endif | 386 #endif |
389 | 387 |
390 } | 388 } |
OLD | NEW |