Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/core/dom/PseudoElement.cpp

Issue 1511523002: Align HTMLImageElement relevant mutations to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix removal issue when a text node is between <source> and <img> Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698