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

Unified Diff: Source/WebCore/rendering/RenderBlock.cpp

Issue 9933006: Merge 111912 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/multicol/span/update-after-content-before-child-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderBlock.cpp
===================================================================
--- Source/WebCore/rendering/RenderBlock.cpp (revision 112626)
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
@@ -867,12 +867,19 @@
// Someone may have put a <p> inside a <q>, causing a split. When this happens, the :after content
// has to move into the inline continuation. Call updateBeforeAfterContent to ensure that our :after
// content gets properly destroyed.
+ bool isFirstChild = (beforeChild == firstChild());
bool isLastChild = (beforeChild == lastChild());
if (document()->usesBeforeAfterRules())
children()->updateBeforeAfterContent(this, AFTER);
- if (isLastChild && beforeChild != lastChild())
- beforeChild = 0; // We destroyed the last child, so now we need to update our insertion
- // point to be 0. It's just a straight append now.
+ if (isLastChild && beforeChild != lastChild()) {
+ // We destroyed the last child, so now we need to update our insertion
+ // point to be 0. It's just a straight append now.
+ beforeChild = 0;
+ } else if (isFirstChild && beforeChild != firstChild()) {
+ // If beforeChild was the last anonymous block that collapsed,
+ // then we need to update its value.
+ beforeChild = firstChild();
+ }
splitFlow(beforeChild, newBox, newChild, oldContinuation);
return;
« no previous file with comments | « LayoutTests/fast/multicol/span/update-after-content-before-child-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698