OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void PseudoElement::attach(const AttachContext& context) | 84 void PseudoElement::attach(const AttachContext& context) |
85 { | 85 { |
86 ASSERT(!renderer()); | 86 ASSERT(!renderer()); |
87 | 87 |
88 Element::attach(context); | 88 Element::attach(context); |
89 | 89 |
90 RenderObject* renderer = this->renderer(); | 90 RenderObject* renderer = this->renderer(); |
91 if (!renderer) | 91 if (!renderer) |
92 return; | 92 return; |
93 RenderStyle* style = renderer->style(); | 93 RenderStyle* style = renderer->style(); |
94 if (style->hasFlowFrom()) | |
95 return; | |
96 if (style->styleType() != BEFORE && style->styleType() != AFTER) | 94 if (style->styleType() != BEFORE && style->styleType() != AFTER) |
97 return; | 95 return; |
98 ASSERT(style->contentData()); | 96 ASSERT(style->contentData()); |
99 | 97 |
100 for (const ContentData* content = style->contentData(); content; content = c
ontent->next()) { | 98 for (const ContentData* content = style->contentData(); content; content = c
ontent->next()) { |
101 RenderObject* child = content->createRenderer(document(), style); | 99 RenderObject* child = content->createRenderer(document(), style); |
102 if (renderer->isChildAllowed(child, style)) { | 100 if (renderer->isChildAllowed(child, style)) { |
103 renderer->addChild(child); | 101 renderer->addChild(child); |
104 if (child->isQuote()) | 102 if (child->isQuote()) |
105 toRenderQuote(child)->attachQuote(); | 103 toRenderQuote(child)->attachQuote(); |
(...skipping 22 matching lines...) Expand all Loading... |
128 | 126 |
129 // The style for the RenderTextFragment for first letter is managed by a
n enclosing block, not by us. | 127 // The style for the RenderTextFragment for first letter is managed by a
n enclosing block, not by us. |
130 if (child->style()->styleType() == FIRST_LETTER) | 128 if (child->style()->styleType() == FIRST_LETTER) |
131 continue; | 129 continue; |
132 | 130 |
133 child->setPseudoStyle(renderer->style()); | 131 child->setPseudoStyle(renderer->style()); |
134 } | 132 } |
135 } | 133 } |
136 | 134 |
137 } // namespace | 135 } // namespace |
OLD | NEW |