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

Side by Side Diff: Source/WebCore/bindings/js/JSNodeListCustom.cpp

Issue 10696159: Merge 121003 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 months 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) 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
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
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/label/labels-owner-node-adopted-expected.txt ('k') | Source/WebCore/dom/ChildNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698