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

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

Issue 10399133: Merge 116325 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 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/css-generated-content/first-letter-next-sibling-crash-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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 5920 matching lines...) Expand 10 before | Expand all | Expand 10 after
5931 RenderObject* nextSibling = firstLetter->nextSibling(); 5931 RenderObject* nextSibling = firstLetter->nextSibling();
5932 RenderObject* remainingTextObject = toRenderBoxModelObject(firstLetter)- >firstLetterRemainingText(); 5932 RenderObject* remainingTextObject = toRenderBoxModelObject(firstLetter)- >firstLetterRemainingText();
5933 if (remainingTextObject && remainingTextObject->isText() && toRenderText (remainingTextObject)->isTextFragment()) 5933 if (remainingTextObject && remainingTextObject->isText() && toRenderText (remainingTextObject)->isTextFragment())
5934 remainingText = toRenderTextFragment(remainingTextObject); 5934 remainingText = toRenderTextFragment(remainingTextObject);
5935 if (remainingText) { 5935 if (remainingText) {
5936 ASSERT(remainingText->isAnonymous() || remainingText->node()->render er() == remainingText); 5936 ASSERT(remainingText->isAnonymous() || remainingText->node()->render er() == remainingText);
5937 // Replace the old renderer with the new one. 5937 // Replace the old renderer with the new one.
5938 remainingText->setFirstLetter(newFirstLetter); 5938 remainingText->setFirstLetter(newFirstLetter);
5939 toRenderBoxModelObject(newFirstLetter)->setFirstLetterRemainingText( remainingText); 5939 toRenderBoxModelObject(newFirstLetter)->setFirstLetterRemainingText( remainingText);
5940 } 5940 }
5941 // To prevent removal of single anonymous block in RenderBlock::removeCh ild and causing
5942 // |nextSibling| to go stale, we remove the old first letter using remov eChildNode first.
5943 firstLetterContainer->virtualChildren()->removeChildNode(firstLetterCont ainer, firstLetter);
5941 firstLetter->destroy(); 5944 firstLetter->destroy();
5942 firstLetter = newFirstLetter; 5945 firstLetter = newFirstLetter;
5943 firstLetterContainer->addChild(firstLetter, nextSibling); 5946 firstLetterContainer->addChild(firstLetter, nextSibling);
5944 } else 5947 } else
5945 firstLetter->setStyle(pseudoStyle); 5948 firstLetter->setStyle(pseudoStyle);
5946 5949
5947 for (RenderObject* genChild = firstLetter->firstChild(); genChild; genChild = genChild->nextSibling()) { 5950 for (RenderObject* genChild = firstLetter->firstChild(); genChild; genChild = genChild->nextSibling()) {
5948 if (genChild->isText()) 5951 if (genChild->isText())
5949 genChild->setStyle(pseudoStyle); 5952 genChild->setStyle(pseudoStyle);
5950 } 5953 }
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
7290 } 7293 }
7291 7294
7292 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7295 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7293 { 7296 {
7294 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX (), floatingObject->pixelSnappedMaxY()); 7297 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX (), floatingObject->pixelSnappedMaxY());
7295 } 7298 }
7296 7299
7297 #endif 7300 #endif
7298 7301
7299 } // namespace WebCore 7302 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-generated-content/first-letter-next-sibling-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698