| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 return parentOrShadowHostElement()->renderer()->getCachedPseudoStyle(m_pseud
oId); | 74 return parentOrShadowHostElement()->renderer()->getCachedPseudoStyle(m_pseud
oId); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void PseudoElement::attach(const AttachContext& context) | 77 void PseudoElement::attach(const AttachContext& context) |
| 78 { | 78 { |
| 79 ASSERT(!renderer()); | 79 ASSERT(!renderer()); |
| 80 | 80 |
| 81 Element::attach(context); | 81 Element::attach(context); |
| 82 | 82 |
| 83 RenderObject* renderer = this->renderer(); | 83 RenderObject* renderer = this->renderer(); |
| 84 if (!renderer || !renderer->style()->regionThread().isEmpty()) | 84 if (!renderer) |
| 85 return; | 85 return; |
| 86 | |
| 87 RenderStyle* style = renderer->style(); | 86 RenderStyle* style = renderer->style(); |
| 87 if (!style->regionThread().isEmpty()) |
| 88 return; |
| 89 if (style->styleType() != BEFORE && style->styleType() != AFTER) |
| 90 return; |
| 88 ASSERT(style->contentData()); | 91 ASSERT(style->contentData()); |
| 89 | 92 |
| 90 for (const ContentData* content = style->contentData(); content; content = c
ontent->next()) { | 93 for (const ContentData* content = style->contentData(); content; content = c
ontent->next()) { |
| 91 RenderObject* child = content->createRenderer(document(), style); | 94 RenderObject* child = content->createRenderer(document(), style); |
| 92 if (renderer->isChildAllowed(child, style)) { | 95 if (renderer->isChildAllowed(child, style)) { |
| 93 renderer->addChild(child); | 96 renderer->addChild(child); |
| 94 if (child->isQuote()) | 97 if (child->isQuote()) |
| 95 toRenderQuote(child)->attachQuote(); | 98 toRenderQuote(child)->attachQuote(); |
| 96 } else | 99 } else |
| 97 child->destroy(); | 100 child->destroy(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 118 | 121 |
| 119 // The style for the RenderTextFragment for first letter is managed by a
n enclosing block, not by us. | 122 // The style for the RenderTextFragment for first letter is managed by a
n enclosing block, not by us. |
| 120 if (child->style()->styleType() == FIRST_LETTER) | 123 if (child->style()->styleType() == FIRST_LETTER) |
| 121 continue; | 124 continue; |
| 122 | 125 |
| 123 child->setPseudoStyle(renderer->style()); | 126 child->setPseudoStyle(renderer->style()); |
| 124 } | 127 } |
| 125 } | 128 } |
| 126 | 129 |
| 127 } // namespace | 130 } // namespace |
| OLD | NEW |