OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 if (result.IsEmpty()) | 80 if (result.IsEmpty()) |
81 return v8Null(args.GetIsolate()); | 81 return v8Null(args.GetIsolate()); |
82 | 82 |
83 return result; | 83 return result; |
84 } | 84 } |
85 | 85 |
86 v8::Handle<v8::Value> V8HTMLOptionsCollection::removeMethodCustom(const v8::Argu
ments& args) | 86 v8::Handle<v8::Value> V8HTMLOptionsCollection::removeMethodCustom(const v8::Argu
ments& args) |
87 { | 87 { |
88 HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder()
); | 88 HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder()
); |
89 HTMLSelectElement* base = toHTMLSelectElement(imp->ownerNode()); | 89 Handle<HTMLSelectElement> base = toHTMLSelectElement(imp->ownerNode()); |
90 return removeElement(base, args); | 90 return removeElement(base.raw(), args); |
91 } | 91 } |
92 | 92 |
93 v8::Handle<v8::Value> V8HTMLOptionsCollection::addMethodCustom(const v8::Argumen
ts& args) | 93 v8::Handle<v8::Value> V8HTMLOptionsCollection::addMethodCustom(const v8::Argumen
ts& args) |
94 { | 94 { |
95 if (!V8HTMLOptionElement::HasInstance(args[0], args.GetIsolate(), worldType(
args.GetIsolate()))) | 95 if (!V8HTMLOptionElement::HasInstance(args[0], args.GetIsolate(), worldType(
args.GetIsolate()))) |
96 return setDOMException(TYPE_MISMATCH_ERR, args.GetIsolate()); | 96 return setDOMException(TYPE_MISMATCH_ERR, args.GetIsolate()); |
97 HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder()
); | 97 HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder()
); |
98 HTMLOptionElement* option = V8HTMLOptionElement::toNative(v8::Handle<v8::Obj
ect>(v8::Handle<v8::Object>::Cast(args[0]))); | 98 HTMLOptionElement* option = V8HTMLOptionElement::toNative(v8::Handle<v8::Obj
ect>(v8::Handle<v8::Object>::Cast(args[0]))); |
99 | 99 |
100 ExceptionCode ec = 0; | 100 ExceptionCode ec = 0; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 if (!result) | 144 if (!result) |
145 return v8Undefined(); | 145 return v8Undefined(); |
146 | 146 |
147 return toV8Fast(result.release(), info, collection); | 147 return toV8Fast(result.release(), info, collection); |
148 } | 148 } |
149 | 149 |
150 v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertySetter(uint32_t in
dex, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 150 v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertySetter(uint32_t in
dex, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
151 { | 151 { |
152 HandleScope handleScope; | 152 HandleScope handleScope; |
153 HTMLOptionsCollection* collection = V8HTMLOptionsCollection::toNative(info.H
older()); | 153 HTMLOptionsCollection* collection = V8HTMLOptionsCollection::toNative(info.H
older()); |
154 HTMLSelectElement* base = toHTMLSelectElement(collection->ownerNode()); | 154 Handle<HTMLSelectElement> base = toHTMLSelectElement(collection->ownerNode()
); |
155 return toOptionsCollectionSetter(index, value, base, info.GetIsolate()); | 155 return toOptionsCollectionSetter(index, value, base.raw(), info.GetIsolate()
); |
156 } | 156 } |
157 | 157 |
158 } // namespace WebCore | 158 } // namespace WebCore |
OLD | NEW |