Index: Source/WebCore/rendering/RenderObjectChildList.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderObjectChildList.cpp (revision 99025) |
+++ Source/WebCore/rendering/RenderObjectChildList.cpp (working copy) |
@@ -286,9 +286,13 @@ |
if (!(object->isTable() || object->isTableSection() || object->isTableRow())) |
return object; |
+ // If there is a :first-letter style applied on the :before or :after content, |
+ // then we want the parent of the first-letter block |
RenderObject* beforeAfterParent = object; |
- while (beforeAfterParent && !(beforeAfterParent->isText() || beforeAfterParent->isImage())) |
+ while (beforeAfterParent && !(beforeAfterParent->isText() || beforeAfterParent->isImage()) |
+ && (beforeAfterParent->style()->styleType() != FIRST_LETTER)) |
beforeAfterParent = beforeAfterParent->firstChild(); |
+ |
return beforeAfterParent ? beforeAfterParent->parent() : 0; |
} |
@@ -449,14 +453,6 @@ |
ASSERT(genChild->isListMarker() || genChild->style()->styleType() == FIRST_LETTER); |
} |
} |
- |
- // Update style on the remaining text fragment after the first-letter. |
- if (beforeAfterParent->style()->styleType() == FIRST_LETTER) { |
- if (RenderObject* nextSibling = beforeAfterParent->nextSibling()) { |
- if (nextSibling->isText() && nextSibling->style()->styleType() == child->style()->styleType()) |
- nextSibling->setStyle(pseudoElementStyle); |
- } |
- } |
} |
return; // We've updated the generated content. That's all we needed to do. |
} |