| OLD | NEW |
| 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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights 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 5155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5166 newFirstLetter->setStyle(pseudoStyle); | 5166 newFirstLetter->setStyle(pseudoStyle); |
| 5167 | 5167 |
| 5168 // Move the first letter into the new renderer. | 5168 // Move the first letter into the new renderer. |
| 5169 view()->disableLayoutState(); | 5169 view()->disableLayoutState(); |
| 5170 while (RenderObject* child = firstLetter->firstChild()) { | 5170 while (RenderObject* child = firstLetter->firstChild()) { |
| 5171 if (child->isText()) | 5171 if (child->isText()) |
| 5172 toRenderText(child)->dirtyLineBoxes(true); | 5172 toRenderText(child)->dirtyLineBoxes(true); |
| 5173 firstLetter->removeChild(child); | 5173 firstLetter->removeChild(child); |
| 5174 newFirstLetter->addChild(child, 0); | 5174 newFirstLetter->addChild(child, 0); |
| 5175 } | 5175 } |
| 5176 RenderTextFragment* remainingText = toRenderTextFragment(firstLetter
->nextSibling()); | 5176 |
| 5177 ASSERT(remainingText->node()->renderer() == remainingText); | 5177 RenderTextFragment* remainingText = 0; |
| 5178 // Replace the old renderer with the new one. | 5178 RenderObject* nextSibling = firstLetter->nextSibling(); |
| 5179 remainingText->setFirstLetter(newFirstLetter); | 5179 RenderObject* next = nextSibling; |
| 5180 while (next) { |
| 5181 if (next->isText() && toRenderText(next)->isTextFragment()) { |
| 5182 remainingText = toRenderTextFragment(next); |
| 5183 break; |
| 5184 } |
| 5185 next = next->nextSibling(); |
| 5186 } |
| 5187 if (remainingText) { |
| 5188 ASSERT(remainingText->node()->renderer() == remainingText); |
| 5189 // Replace the old renderer with the new one. |
| 5190 remainingText->setFirstLetter(newFirstLetter); |
| 5191 } |
| 5180 firstLetter->destroy(); | 5192 firstLetter->destroy(); |
| 5181 firstLetter = newFirstLetter; | 5193 firstLetter = newFirstLetter; |
| 5182 firstLetterContainer->addChild(firstLetter, remainingText); | 5194 firstLetterContainer->addChild(firstLetter, nextSibling); |
| 5183 view()->enableLayoutState(); | 5195 view()->enableLayoutState(); |
| 5184 } else | 5196 } else |
| 5185 firstLetter->setStyle(pseudoStyle); | 5197 firstLetter->setStyle(pseudoStyle); |
| 5186 | 5198 |
| 5187 for (RenderObject* genChild = firstLetter->firstChild(); genChild; genCh
ild = genChild->nextSibling()) { | 5199 for (RenderObject* genChild = firstLetter->firstChild(); genChild; genCh
ild = genChild->nextSibling()) { |
| 5188 if (genChild->isText()) | 5200 if (genChild->isText()) |
| 5189 genChild->setStyle(pseudoStyle); | 5201 genChild->setStyle(pseudoStyle); |
| 5190 } | 5202 } |
| 5191 | 5203 |
| 5192 return; | 5204 return; |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6077 else if (isAnonymous()) | 6089 else if (isAnonymous()) |
| 6078 return "RenderBlock (generated)"; | 6090 return "RenderBlock (generated)"; |
| 6079 if (isRelPositioned()) | 6091 if (isRelPositioned()) |
| 6080 return "RenderBlock (relative positioned)"; | 6092 return "RenderBlock (relative positioned)"; |
| 6081 if (isRunIn()) | 6093 if (isRunIn()) |
| 6082 return "RenderBlock (run-in)"; | 6094 return "RenderBlock (run-in)"; |
| 6083 return "RenderBlock"; | 6095 return "RenderBlock"; |
| 6084 } | 6096 } |
| 6085 | 6097 |
| 6086 } // namespace WebCore | 6098 } // namespace WebCore |
| OLD | NEW |