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 4001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4012 ASSERT(length && currentChild->isText()); | 4012 ASSERT(length && currentChild->isText()); |
4013 | 4013 |
4014 RenderObject* firstLetterContainer = currentChild->parent(); | 4014 RenderObject* firstLetterContainer = currentChild->parent(); |
4015 RenderStyle* pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetter
Container); | 4015 RenderStyle* pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetter
Container); |
4016 RenderObject* firstLetter = 0; | 4016 RenderObject* firstLetter = 0; |
4017 if (pseudoStyle->display() == INLINE) | 4017 if (pseudoStyle->display() == INLINE) |
4018 firstLetter = RenderInline::createAnonymous(&document()); | 4018 firstLetter = RenderInline::createAnonymous(&document()); |
4019 else | 4019 else |
4020 firstLetter = RenderBlockFlow::createAnonymous(&document()); | 4020 firstLetter = RenderBlockFlow::createAnonymous(&document()); |
4021 firstLetter->setStyle(pseudoStyle); | 4021 firstLetter->setStyle(pseudoStyle); |
| 4022 |
| 4023 // FIXME: The first letter code should not modify the render tree during |
| 4024 // layout. crbug.com/370458 |
| 4025 DeprecatedDisableModifyRenderTreeStructureAsserts disabler; |
| 4026 |
4022 firstLetterContainer->addChild(firstLetter, currentChild); | 4027 firstLetterContainer->addChild(firstLetter, currentChild); |
4023 | |
4024 RenderText* textObj = toRenderText(currentChild); | 4028 RenderText* textObj = toRenderText(currentChild); |
4025 | 4029 |
4026 // The original string is going to be either a generated content string or a
DOM node's | 4030 // The original string is going to be either a generated content string or a
DOM node's |
4027 // string. We want the original string before it got transformed in case fi
rst-letter has | 4031 // string. We want the original string before it got transformed in case fi
rst-letter has |
4028 // no text-transform or a different text-transform applied to it. | 4032 // no text-transform or a different text-transform applied to it. |
4029 String oldText = textObj->originalText(); | 4033 String oldText = textObj->originalText(); |
4030 ASSERT(oldText.impl()); | 4034 ASSERT(oldText.impl()); |
4031 | 4035 |
4032 // Construct a text fragment for the text after the first letter. | 4036 // Construct a text fragment for the text after the first letter. |
4033 // This text fragment might be empty. | 4037 // This text fragment might be empty. |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4959 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 4963 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
4960 { | 4964 { |
4961 showRenderObject(); | 4965 showRenderObject(); |
4962 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 4966 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
4963 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 4967 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
4964 } | 4968 } |
4965 | 4969 |
4966 #endif | 4970 #endif |
4967 | 4971 |
4968 } // namespace WebCore | 4972 } // namespace WebCore |
OLD | NEW |