OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 2725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2736 return; | 2736 return; |
2737 | 2737 |
2738 if (oldId == newId) | 2738 if (oldId == newId) |
2739 return; | 2739 return; |
2740 | 2740 |
2741 updateId(treeScope(), oldId, newId); | 2741 updateId(treeScope(), oldId, newId); |
2742 } | 2742 } |
2743 | 2743 |
2744 inline void Element::updateId(TreeScope& scope, const AtomicString& oldId, const
AtomicString& newId) | 2744 inline void Element::updateId(TreeScope& scope, const AtomicString& oldId, const
AtomicString& newId) |
2745 { | 2745 { |
2746 ASSERT(isInTreeScope()); | 2746 if (!isInTreeScope()) |
| 2747 return; |
| 2748 |
2747 ASSERT(oldId != newId); | 2749 ASSERT(oldId != newId); |
2748 | 2750 |
2749 if (!oldId.isEmpty()) | 2751 if (!oldId.isEmpty()) |
2750 scope.removeElementById(oldId, this); | 2752 scope.removeElementById(oldId, this); |
2751 if (!newId.isEmpty()) | 2753 if (!newId.isEmpty()) |
2752 scope.addElementById(newId, this); | 2754 scope.addElementById(newId, this); |
2753 | 2755 |
2754 if (shouldRegisterAsExtraNamedItem()) | 2756 if (shouldRegisterAsExtraNamedItem()) |
2755 updateExtraNamedItemRegistration(oldId, newId); | 2757 updateExtraNamedItemRegistration(oldId, newId); |
2756 } | 2758 } |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3264 return wrapper; | 3266 return wrapper; |
3265 | 3267 |
3266 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); | 3268 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); |
3267 | 3269 |
3268 wrapper->SetPrototype(binding->prototype()); | 3270 wrapper->SetPrototype(binding->prototype()); |
3269 | 3271 |
3270 return V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType
, wrapper, isolate); | 3272 return V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType
, wrapper, isolate); |
3271 } | 3273 } |
3272 | 3274 |
3273 } // namespace blink | 3275 } // namespace blink |
OLD | NEW |