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 4018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4029 ASSERT(length && currentChild->isText()); | 4029 ASSERT(length && currentChild->isText()); |
4030 | 4030 |
4031 RenderObject* firstLetterContainer = currentChild->parent(); | 4031 RenderObject* firstLetterContainer = currentChild->parent(); |
4032 RenderStyle* pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetter Container); | 4032 RenderStyle* pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetter Container); |
4033 RenderObject* firstLetter = 0; | 4033 RenderObject* firstLetter = 0; |
4034 if (pseudoStyle->display() == INLINE) | 4034 if (pseudoStyle->display() == INLINE) |
4035 firstLetter = RenderInline::createAnonymous(&document()); | 4035 firstLetter = RenderInline::createAnonymous(&document()); |
4036 else | 4036 else |
4037 firstLetter = RenderBlockFlow::createAnonymous(&document()); | 4037 firstLetter = RenderBlockFlow::createAnonymous(&document()); |
4038 firstLetter->setStyle(pseudoStyle); | 4038 firstLetter->setStyle(pseudoStyle); |
4039 | |
4040 // FIXME: The first letter code should not modify the tree outside of recalc | |
4041 // style. crbug.com/370458 | |
leviw_travelin_and_unemployed
2014/05/06 18:41:29
I'd vote for a slightly broader comment to the eff
dsinclair
2014/05/07 16:24:40
Done.
| |
4042 DeprecatedDisableModifyRenderTreeStructureAsserts disabler; | |
4043 | |
4039 firstLetterContainer->addChild(firstLetter, currentChild); | 4044 firstLetterContainer->addChild(firstLetter, currentChild); |
4040 | |
4041 RenderText* textObj = toRenderText(currentChild); | 4045 RenderText* textObj = toRenderText(currentChild); |
4042 | 4046 |
4043 // The original string is going to be either a generated content string or a DOM node's | 4047 // The original string is going to be either a generated content string or a DOM node's |
4044 // string. We want the original string before it got transformed in case fi rst-letter has | 4048 // string. We want the original string before it got transformed in case fi rst-letter has |
4045 // no text-transform or a different text-transform applied to it. | 4049 // no text-transform or a different text-transform applied to it. |
4046 String oldText = textObj->originalText(); | 4050 String oldText = textObj->originalText(); |
4047 ASSERT(oldText.impl()); | 4051 ASSERT(oldText.impl()); |
4048 | 4052 |
4049 // Construct a text fragment for the text after the first letter. | 4053 // Construct a text fragment for the text after the first letter. |
4050 // This text fragment might be empty. | 4054 // This text fragment might be empty. |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4976 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const | 4980 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const |
4977 { | 4981 { |
4978 showRenderObject(); | 4982 showRenderObject(); |
4979 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) | 4983 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) |
4980 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); | 4984 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); |
4981 } | 4985 } |
4982 | 4986 |
4983 #endif | 4987 #endif |
4984 | 4988 |
4985 } // namespace WebCore | 4989 } // namespace WebCore |
OLD | NEW |