| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } else { | 140 } else { |
| 141 child->destroy(); | 141 child->destroy(); |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool PseudoElement::layoutObjectIsNeeded(const ComputedStyle& style) { | 146 bool PseudoElement::layoutObjectIsNeeded(const ComputedStyle& style) { |
| 147 return pseudoElementLayoutObjectIsNeeded(&style); | 147 return pseudoElementLayoutObjectIsNeeded(&style); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void PseudoElement::didRecalcStyle(StyleRecalcChange) { | 150 void PseudoElement::didRecalcStyle() { |
| 151 if (!layoutObject()) | 151 if (!layoutObject()) |
| 152 return; | 152 return; |
| 153 | 153 |
| 154 // The layoutObjects inside pseudo elements are anonymous so they don't get | 154 // The layoutObjects inside pseudo elements are anonymous so they don't get |
| 155 // notified of recalcStyle and must have the style propagated downward | 155 // notified of recalcStyle and must have the style propagated downward |
| 156 // manually similar to LayoutObject::propagateStyleToAnonymousChildren. | 156 // manually similar to LayoutObject::propagateStyleToAnonymousChildren. |
| 157 LayoutObject* layoutObject = this->layoutObject(); | 157 LayoutObject* layoutObject = this->layoutObject(); |
| 158 for (LayoutObject* child = layoutObject->nextInPreOrder(layoutObject); child; | 158 for (LayoutObject* child = layoutObject->nextInPreOrder(layoutObject); child; |
| 159 child = child->nextInPreOrder(layoutObject)) { | 159 child = child->nextInPreOrder(layoutObject)) { |
| 160 // We only manage the style for the generated content items. | 160 // We only manage the style for the generated content items. |
| (...skipping 28 matching lines...) Expand all 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 |