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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 parent->treeScope().adoptIfNeeded(*this); | 90 parent->treeScope().adoptIfNeeded(*this); |
91 setParentOrShadowHostNode(parent); | 91 setParentOrShadowHostNode(parent); |
92 setHasCustomStyleCallbacks(); | 92 setHasCustomStyleCallbacks(); |
93 if ((pseudoId == PseudoIdBefore || pseudoId == PseudoIdAfter) && | 93 if ((pseudoId == PseudoIdBefore || pseudoId == PseudoIdAfter) && |
94 parent->hasTagName(HTMLNames::inputTag)) | 94 parent->hasTagName(HTMLNames::inputTag)) |
95 UseCounter::count(parent->document(), | 95 UseCounter::count(parent->document(), |
96 UseCounter::PseudoBeforeAfterForInputElement); | 96 UseCounter::PseudoBeforeAfterForInputElement); |
97 } | 97 } |
98 | 98 |
99 PassRefPtr<ComputedStyle> PseudoElement::customStyleForLayoutObject() { | 99 PassRefPtr<ComputedStyle> PseudoElement::customStyleForLayoutObject() { |
100 return parentOrShadowHostElement()->layoutObject()->getCachedPseudoStyle( | 100 return parentOrShadowHostElement()->pseudoStyle( |
101 m_pseudoId); | 101 PseudoStyleRequest(m_pseudoId)); |
102 } | 102 } |
103 | 103 |
104 void PseudoElement::dispose() { | 104 void PseudoElement::dispose() { |
105 DCHECK(parentOrShadowHostElement()); | 105 DCHECK(parentOrShadowHostElement()); |
106 | 106 |
107 probe::pseudoElementDestroyed(this); | 107 probe::pseudoElementDestroyed(this); |
108 | 108 |
109 DCHECK(!nextSibling()); | 109 DCHECK(!nextSibling()); |
110 DCHECK(!previousSibling()); | 110 DCHECK(!previousSibling()); |
111 | 111 |
(...skipping 77 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 |