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

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

Issue 9014025: Merge 101584 - Crash from first letter text fragments having flows split (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 8 years, 12 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/css/first-letter-inline-flow-split-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 103959)
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
@@ -5618,6 +5618,26 @@
}
next = next->nextSibling();
}
+ if (!remainingText && firstLetterContainer->isAnonymousBlock()) {
+ // The remaining text fragment could have been wrapped in a different anonymous block since creation
+ RenderObject* nextChild;
+ next = firstLetterContainer->nextSibling();
+ while (next && !remainingText) {
+ if (next->isAnonymousBlock()) {
+ nextChild = next->firstChild();
+ while (nextChild) {
+ if (nextChild->isText() && toRenderText(nextChild)->isTextFragment()
+ && (toRenderTextFragment(nextChild)->firstLetter() == firstLetter)) {
+ remainingText = toRenderTextFragment(nextChild);
+ break;
+ }
+ nextChild = nextChild->nextSibling();
+ }
+ } else
+ break;
+ next = next->nextSibling();
+ }
+ }
if (remainingText) {
ASSERT(remainingText->isAnonymous() || remainingText->node()->renderer() == remainingText);
// Replace the old renderer with the new one.
« no previous file with comments | « LayoutTests/fast/css/first-letter-inline-flow-split-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698