OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 bool JSNodeListOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handl
e, void*, SlotVisitor& visitor) | 39 bool JSNodeListOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handl
e, void*, SlotVisitor& visitor) |
40 { | 40 { |
41 JSNodeList* jsNodeList = jsCast<JSNodeList*>(handle.get().asCell()); | 41 JSNodeList* jsNodeList = jsCast<JSNodeList*>(handle.get().asCell()); |
42 if (!jsNodeList->hasCustomProperties()) | 42 if (!jsNodeList->hasCustomProperties()) |
43 return false; | 43 return false; |
44 if (!jsNodeList->impl()->isDynamicNodeList()) | 44 if (!jsNodeList->impl()->isDynamicNodeList()) |
45 return false; | 45 return false; |
46 return visitor.containsOpaqueRoot(root(static_cast<DynamicNodeList*>(jsNodeL
ist->impl())->node())); | 46 return visitor.containsOpaqueRoot(root(static_cast<DynamicNodeList*>(jsNodeL
ist->impl())->ownerNode())); |
47 } | 47 } |
48 | 48 |
49 bool JSNodeList::canGetItemsForName(ExecState*, NodeList* impl, PropertyName pro
pertyName) | 49 bool JSNodeList::canGetItemsForName(ExecState*, NodeList* impl, PropertyName pro
pertyName) |
50 { | 50 { |
51 return impl->itemWithName(propertyNameToAtomicString(propertyName)); | 51 return impl->itemWithName(propertyNameToAtomicString(propertyName)); |
52 } | 52 } |
53 | 53 |
54 JSValue JSNodeList::nameGetter(ExecState* exec, JSValue slotBase, PropertyName p
ropertyName) | 54 JSValue JSNodeList::nameGetter(ExecState* exec, JSValue slotBase, PropertyName p
ropertyName) |
55 { | 55 { |
56 JSNodeList* thisObj = jsCast<JSNodeList*>(asObject(slotBase)); | 56 JSNodeList* thisObj = jsCast<JSNodeList*>(asObject(slotBase)); |
57 return toJS(exec, thisObj->globalObject(), thisObj->impl()->itemWithName(pro
pertyNameToAtomicString(propertyName))); | 57 return toJS(exec, thisObj->globalObject(), thisObj->impl()->itemWithName(pro
pertyNameToAtomicString(propertyName))); |
58 } | 58 } |
59 | 59 |
60 } // namespace WebCore | 60 } // namespace WebCore |
OLD | NEW |