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, 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 if (firstLetterTextRenderer->style()->styleType() == FIRST_LETTER) { | 135 if (firstLetterTextRenderer->style()->styleType() == FIRST_LETTER) { |
136 firstLetterTextRenderer = firstLetterTextRenderer->slowFirstChil
d(); | 136 firstLetterTextRenderer = firstLetterTextRenderer->slowFirstChil
d(); |
137 break; | 137 break; |
138 } | 138 } |
139 firstLetterTextRenderer = firstLetterTextRenderer->nextSibling(); | 139 firstLetterTextRenderer = firstLetterTextRenderer->nextSibling(); |
140 } else if (firstLetterTextRenderer->isReplaced() || firstLetterTextRende
rer->isLayoutButton() | 140 } else if (firstLetterTextRenderer->isReplaced() || firstLetterTextRende
rer->isLayoutButton() |
141 || firstLetterTextRenderer->isMenuList()) { | 141 || firstLetterTextRenderer->isMenuList()) { |
142 return nullptr; | 142 return nullptr; |
143 } else if (firstLetterTextRenderer->isFlexibleBoxIncludingDeprecated() |
| firstLetterTextRenderer->isLayoutGrid()) { | 143 } else if (firstLetterTextRenderer->isFlexibleBoxIncludingDeprecated() |
| firstLetterTextRenderer->isLayoutGrid()) { |
144 firstLetterTextRenderer = firstLetterTextRenderer->nextSibling(); | 144 firstLetterTextRenderer = firstLetterTextRenderer->nextSibling(); |
145 } else if (firstLetterTextRenderer->style()->hasPseudoStyle(FIRST_LETTER
) | 145 } else if (!firstLetterTextRenderer->isInline() |
| 146 && firstLetterTextRenderer->style()->hasPseudoStyle(FIRST_LETTER) |
146 && canHaveGeneratedChildren(*firstLetterTextRenderer)) { | 147 && canHaveGeneratedChildren(*firstLetterTextRenderer)) { |
147 // There is a renderer further down the tree which has FIRST_LETTER
set. When that node | 148 // There is a renderer further down the tree which has FIRST_LETTER
set. When that node |
148 // is attached we will handle setting up the first letter then. | 149 // is attached we will handle setting up the first letter then. |
149 return nullptr; | 150 return nullptr; |
150 } else { | 151 } else { |
151 firstLetterTextRenderer = firstLetterTextRenderer->slowFirstChild(); | 152 firstLetterTextRenderer = firstLetterTextRenderer->slowFirstChild(); |
152 } | 153 } |
153 } | 154 } |
154 | 155 |
155 // No first letter text to display, we're done. | 156 // No first letter text to display, we're done. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 306 |
306 // We only manage the style for the generated content items. | 307 // We only manage the style for the generated content items. |
307 if (!child->isText() && !child->isQuote() && !child->isImage()) | 308 if (!child->isText() && !child->isQuote() && !child->isImage()) |
308 continue; | 309 continue; |
309 | 310 |
310 child->setPseudoStyle(renderer->mutableStyle()); | 311 child->setPseudoStyle(renderer->mutableStyle()); |
311 } | 312 } |
312 } | 313 } |
313 | 314 |
314 } // namespace blink | 315 } // namespace blink |
OLD | NEW |