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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 if (!layoutObject) | 125 if (!layoutObject) |
126 return; | 126 return; |
127 | 127 |
128 ComputedStyle& style = layoutObject->mutableStyleRef(); | 128 ComputedStyle& style = layoutObject->mutableStyleRef(); |
129 if (style.styleType() != PseudoIdBefore && style.styleType() != PseudoIdAfter) | 129 if (style.styleType() != PseudoIdBefore && style.styleType() != PseudoIdAfter) |
130 return; | 130 return; |
131 DCHECK(style.contentData()); | 131 DCHECK(style.contentData()); |
132 | 132 |
133 for (const ContentData* content = style.contentData(); content; | 133 for (const ContentData* content = style.contentData(); content; |
134 content = content->next()) { | 134 content = content->next()) { |
135 LayoutObject* child = content->createLayoutObject(document(), style); | 135 LayoutObject* child = content->createLayoutObject(*this, style); |
136 if (layoutObject->isChildAllowed(child, style)) { | 136 if (layoutObject->isChildAllowed(child, style)) { |
137 layoutObject->addChild(child); | 137 layoutObject->addChild(child); |
138 if (child->isQuote()) | 138 if (child->isQuote()) |
139 toLayoutQuote(child)->attachQuote(); | 139 toLayoutQuote(child)->attachQuote(); |
140 } else { | 140 } else { |
141 child->destroy(); | 141 child->destroy(); |
142 } | 142 } |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 LayoutObject* ancestor = layoutObject()->parent(); | 189 LayoutObject* ancestor = layoutObject()->parent(); |
190 while (ancestor->isAnonymous() || | 190 while (ancestor->isAnonymous() || |
191 (ancestor->node() && ancestor->node()->isPseudoElement())) { | 191 (ancestor->node() && ancestor->node()->isPseudoElement())) { |
192 DCHECK(ancestor->parent()); | 192 DCHECK(ancestor->parent()); |
193 ancestor = ancestor->parent(); | 193 ancestor = ancestor->parent(); |
194 } | 194 } |
195 return ancestor->node(); | 195 return ancestor->node(); |
196 } | 196 } |
197 | 197 |
198 } // namespace blink | 198 } // namespace blink |
OLD | NEW |