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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 InspectorInstrumentation::pseudoElementDestroyed(this); | 106 InspectorInstrumentation::pseudoElementDestroyed(this); |
107 | 107 |
108 ASSERT(!nextSibling()); | 108 ASSERT(!nextSibling()); |
109 ASSERT(!previousSibling()); | 109 ASSERT(!previousSibling()); |
110 | 110 |
111 detach(); | 111 detach(); |
112 RefPtrWillBeRawPtr<Element> parent = parentOrShadowHostElement(); | 112 RefPtrWillBeRawPtr<Element> parent = parentOrShadowHostElement(); |
113 document().adoptIfNeeded(*this); | 113 document().adoptIfNeeded(*this); |
114 setParentOrShadowHostNode(0); | 114 setParentOrShadowHostNode(0); |
115 removedFrom(parent.get()); | 115 removedFrom(parent.get(), nullptr); |
116 } | 116 } |
117 | 117 |
118 void PseudoElement::attach(const AttachContext& context) | 118 void PseudoElement::attach(const AttachContext& context) |
119 { | 119 { |
120 ASSERT(!layoutObject()); | 120 ASSERT(!layoutObject()); |
121 | 121 |
122 Element::attach(context); | 122 Element::attach(context); |
123 | 123 |
124 LayoutObject* layoutObject = this->layoutObject(); | 124 LayoutObject* layoutObject = this->layoutObject(); |
125 if (!layoutObject) | 125 if (!layoutObject) |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // us and our parent so make sure we skip over them. | 188 // us and our parent so make sure we skip over them. |
189 LayoutObject* ancestor = layoutObject()->parent(); | 189 LayoutObject* ancestor = layoutObject()->parent(); |
190 while (ancestor->isAnonymous() || (ancestor->node() && ancestor->node()->isP
seudoElement())) { | 190 while (ancestor->isAnonymous() || (ancestor->node() && ancestor->node()->isP
seudoElement())) { |
191 ASSERT(ancestor->parent()); | 191 ASSERT(ancestor->parent()); |
192 ancestor = ancestor->parent(); | 192 ancestor = ancestor->parent(); |
193 } | 193 } |
194 return ancestor->node(); | 194 return ancestor->node(); |
195 } | 195 } |
196 | 196 |
197 } // namespace | 197 } // namespace |
OLD | NEW |