| 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 5440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5451 !parentBlock->isBlockFlow()) | 5451 !parentBlock->isBlockFlow()) |
| 5452 break; | 5452 break; |
| 5453 firstLetterBlock = parentBlock; | 5453 firstLetterBlock = parentBlock; |
| 5454 } | 5454 } |
| 5455 | 5455 |
| 5456 if (!hasPseudoStyle) | 5456 if (!hasPseudoStyle) |
| 5457 return; | 5457 return; |
| 5458 | 5458 |
| 5459 // Drill into inlines looking for our first text child. | 5459 // Drill into inlines looking for our first text child. |
| 5460 RenderObject* currChild = firstLetterBlock->firstChild(); | 5460 RenderObject* currChild = firstLetterBlock->firstChild(); |
| 5461 while (currChild && ((!currChild->isReplaced() && !currChild->isRenderButton
() && !currChild->isMenuList()) || currChild->isFloatingOrPositioned()) && !curr
Child->isText()) { | 5461 while (currChild) { |
| 5462 if (currChild->isFloatingOrPositioned()) { | 5462 if (currChild->isText()) |
| 5463 break; |
| 5464 if (currChild->isListMarker()) |
| 5465 currChild = currChild->nextSibling(); |
| 5466 else if (currChild->isFloatingOrPositioned()) { |
| 5463 if (currChild->style()->styleType() == FIRST_LETTER) { | 5467 if (currChild->style()->styleType() == FIRST_LETTER) { |
| 5464 currChild = currChild->firstChild(); | 5468 currChild = currChild->firstChild(); |
| 5465 break; | 5469 break; |
| 5466 } | 5470 } |
| 5467 currChild = currChild->nextSibling(); | 5471 currChild = currChild->nextSibling(); |
| 5468 } else | 5472 } else if (currChild->isReplaced() || currChild->isRenderButton() || cur
rChild->isMenuList()) |
| 5473 break; |
| 5474 else |
| 5469 currChild = currChild->firstChild(); | 5475 currChild = currChild->firstChild(); |
| 5470 } | 5476 } |
| 5471 | 5477 |
| 5472 // Get list markers out of the way. | |
| 5473 while (currChild && currChild->isListMarker()) | |
| 5474 currChild = currChild->nextSibling(); | |
| 5475 | |
| 5476 if (!currChild) | 5478 if (!currChild) |
| 5477 return; | 5479 return; |
| 5478 | 5480 |
| 5479 // If the child already has style, then it has already been created, so we j
ust want | 5481 // If the child already has style, then it has already been created, so we j
ust want |
| 5480 // to update it. | 5482 // to update it. |
| 5481 if (currChild->parent()->style()->styleType() == FIRST_LETTER) { | 5483 if (currChild->parent()->style()->styleType() == FIRST_LETTER) { |
| 5482 RenderObject* firstLetter = currChild->parent(); | 5484 RenderObject* firstLetter = currChild->parent(); |
| 5483 RenderObject* firstLetterContainer = firstLetter->parent(); | 5485 RenderObject* firstLetterContainer = firstLetter->parent(); |
| 5484 RenderStyle* pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLe
tterContainer); | 5486 RenderStyle* pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLe
tterContainer); |
| 5485 | 5487 |
| (...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6603 } | 6605 } |
| 6604 | 6606 |
| 6605 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 6607 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
| 6606 { | 6608 { |
| 6607 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); | 6609 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); |
| 6608 } | 6610 } |
| 6609 | 6611 |
| 6610 #endif | 6612 #endif |
| 6611 | 6613 |
| 6612 } // namespace WebCore | 6614 } // namespace WebCore |
| OLD | NEW |