| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "core/html/HTMLOptionElement.h" | 34 #include "core/html/HTMLOptionElement.h" |
| 35 #include "core/html/HTMLOptionsCollection.h" | 35 #include "core/html/HTMLOptionsCollection.h" |
| 36 #include "core/html/HTMLSelectElement.h" | 36 #include "core/html/HTMLSelectElement.h" |
| 37 | 37 |
| 38 #include "V8HTMLOptionElement.h" | 38 #include "V8HTMLOptionElement.h" |
| 39 #include "V8HTMLSelectElement.h" | 39 #include "V8HTMLSelectElement.h" |
| 40 #include "V8Node.h" | 40 #include "V8Node.h" |
| 41 #include "V8NodeList.h" | 41 #include "V8NodeList.h" |
| 42 #include "bindings/v8/V8Binding.h" | 42 #include "bindings/v8/V8Binding.h" |
| 43 #include "bindings/v8/V8Collection.h" | |
| 44 | 43 |
| 45 namespace WebCore { | 44 namespace WebCore { |
| 46 | 45 |
| 47 void V8HTMLSelectElement::removeMethodCustom(const v8::FunctionCallbackInfo<v8::
Value>& args) | 46 void V8HTMLSelectElement::removeMethodCustom(const v8::FunctionCallbackInfo<v8::
Value>& args) |
| 48 { | 47 { |
| 49 HTMLSelectElement* imp = V8HTMLSelectElement::toNative(args.Holder()); | 48 HTMLSelectElement* imp = V8HTMLSelectElement::toNative(args.Holder()); |
| 50 removeElement(imp, args); | 49 removeElement(imp, args); |
| 51 } | 50 } |
| 52 | 51 |
| 53 void removeElement(HTMLSelectElement* imp, const v8::FunctionCallbackInfo<v8::Va
lue>& args) | 52 void removeElement(HTMLSelectElement* imp, const v8::FunctionCallbackInfo<v8::Va
lue>& args) |
| 54 { | 53 { |
| 55 if (V8HTMLOptionElement::HasInstance(args[0], args.GetIsolate(), worldType(a
rgs.GetIsolate()))) { | 54 if (V8HTMLOptionElement::HasInstance(args[0], args.GetIsolate(), worldType(a
rgs.GetIsolate()))) { |
| 56 HTMLOptionElement* element = V8HTMLOptionElement::toNative(v8::Handle<v8
::Object>::Cast(args[0])); | 55 HTMLOptionElement* element = V8HTMLOptionElement::toNative(v8::Handle<v8
::Object>::Cast(args[0])); |
| 57 imp->remove(element->index()); | 56 imp->remove(element->index()); |
| 58 return; | 57 return; |
| 59 } | 58 } |
| 60 | 59 |
| 61 imp->remove(toInt32(args[0])); | 60 imp->remove(toInt32(args[0])); |
| 62 } | 61 } |
| 63 | 62 |
| 64 } // namespace WebCore | 63 } // namespace WebCore |
| OLD | NEW |