Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: Source/WebCore/rendering/RenderLineBoxList.cpp

Issue 6591048: Merge 79689 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/text/word-break-next-linebox-not-dirty-crash-main-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/text/word-break-next-linebox-not-dirty-crash-main-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698