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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 void PseudoElement::attach(const AttachContext& context) | 86 void PseudoElement::attach(const AttachContext& context) |
87 { | 87 { |
88 ASSERT(!renderer()); | 88 ASSERT(!renderer()); |
89 | 89 |
90 Element::attach(context); | 90 Element::attach(context); |
91 | 91 |
92 RenderObject* renderer = this->renderer(); | 92 RenderObject* renderer = this->renderer(); |
93 if (!renderer) | 93 if (!renderer) |
94 return; | 94 return; |
95 RenderStyle* style = renderer->style(); | 95 RenderStyle* style = renderer->style(); |
96 if (style->hasFlowFrom()) | |
97 return; | |
98 if (style->styleType() != BEFORE && style->styleType() != AFTER) | 96 if (style->styleType() != BEFORE && style->styleType() != AFTER) |
99 return; | 97 return; |
100 ASSERT(style->contentData()); | 98 ASSERT(style->contentData()); |
101 | 99 |
102 for (const ContentData* content = style->contentData(); content; content = c
ontent->next()) { | 100 for (const ContentData* content = style->contentData(); content; content = c
ontent->next()) { |
103 RenderObject* child = content->createRenderer(document(), style); | 101 RenderObject* child = content->createRenderer(document(), style); |
104 if (renderer->isChildAllowed(child, style)) { | 102 if (renderer->isChildAllowed(child, style)) { |
105 renderer->addChild(child); | 103 renderer->addChild(child); |
106 if (child->isQuote()) | 104 if (child->isQuote()) |
107 toRenderQuote(child)->attachQuote(); | 105 toRenderQuote(child)->attachQuote(); |
(...skipping 22 matching lines...) Expand all Loading... |
130 | 128 |
131 // The style for the RenderTextFragment for first letter is managed by a
n enclosing block, not by us. | 129 // The style for the RenderTextFragment for first letter is managed by a
n enclosing block, not by us. |
132 if (child->style()->styleType() == FIRST_LETTER) | 130 if (child->style()->styleType() == FIRST_LETTER) |
133 continue; | 131 continue; |
134 | 132 |
135 child->setPseudoStyle(renderer->style()); | 133 child->setPseudoStyle(renderer->style()); |
136 } | 134 } |
137 } | 135 } |
138 | 136 |
139 } // namespace | 137 } // namespace |
OLD | NEW |