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

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

Issue 7537012: Merge 91781 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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/editing/execCommand/crash-line-break-after-outdent-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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 box = textBox->root(); 347 box = textBox->root();
348 } else if (curr->isRenderInline()) { 348 } else if (curr->isRenderInline()) {
349 InlineBox* lastSiblingBox = toRenderInline(curr)->lastLineBoxIncludi ngCulling(); 349 InlineBox* lastSiblingBox = toRenderInline(curr)->lastLineBoxIncludi ngCulling();
350 if (lastSiblingBox) 350 if (lastSiblingBox)
351 box = lastSiblingBox->root(); 351 box = lastSiblingBox->root();
352 } 352 }
353 353
354 if (box) 354 if (box)
355 break; 355 break;
356 } 356 }
357 if (!box) 357 if (!box) {
358 if (inlineContainer && !inlineContainer->alwaysCreateLineBoxes()) {
359 // https://bugs.webkit.org/show_bug.cgi?id=60778
360 // We may have just removed a <br> with no line box that was our fir st child. In this case
361 // we won't find a previous sibling, but firstBox can be pointing to a following sibling.
362 // This isn't good enough, since we won't locate the root line box t hat encloses the removed
363 // <br>. We have to just over-invalidate a bit and go up to our pare nt.
364 if (!inlineContainer->parent()->selfNeedsLayout()) {
365 inlineContainer->parent()->dirtyLinesFromChangedChild(inlineCont ainer);
366 inlineContainer->setNeedsLayout(true); // Mark the container as needing layout to avoid dirtying the same lines again across multiple destroy() calls of the same subtree.
367 }
368 return;
369 }
358 box = firstBox->root(); 370 box = firstBox->root();
371 }
359 372
360 // If we found a line box, then dirty it. 373 // If we found a line box, then dirty it.
361 if (box) { 374 if (box) {
362 RootInlineBox* adjacentBox; 375 RootInlineBox* adjacentBox;
363 box->markDirty(); 376 box->markDirty();
364 377
365 // dirty the adjacent lines that might be affected 378 // dirty the adjacent lines that might be affected
366 // NOTE: we dirty the previous line because RootInlineBox objects cache 379 // NOTE: we dirty the previous line because RootInlineBox objects cache
367 // the address of the first object on the next line after a BR, which we may be 380 // the address of the first object on the next line after a BR, which we may be
368 // invalidating here. For more info, see how RenderBlock::layoutInlineC hildren 381 // invalidating here. For more info, see how RenderBlock::layoutInlineC hildren
(...skipping 19 matching lines...) Expand all
388 ASSERT(child->prevLineBox() == prev); 401 ASSERT(child->prevLineBox() == prev);
389 prev = child; 402 prev = child;
390 } 403 }
391 ASSERT(prev == m_lastLineBox); 404 ASSERT(prev == m_lastLineBox);
392 #endif 405 #endif
393 } 406 }
394 407
395 #endif 408 #endif
396 409
397 } 410 }
OLDNEW
« no previous file with comments | « LayoutTests/editing/execCommand/crash-line-break-after-outdent-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698