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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "bindings/core/v8/V8HTMLOptionsCollection.h" | 32 #include "bindings/core/v8/V8HTMLOptionsCollection.h" |
33 | 33 |
34 #include "bindings/core/v8/ExceptionState.h" | 34 #include "bindings/core/v8/ExceptionState.h" |
35 #include "bindings/core/v8/V8Binding.h" | 35 #include "bindings/core/v8/V8Binding.h" |
36 #include "bindings/core/v8/V8HTMLOptionElement.h" | 36 #include "bindings/core/v8/V8HTMLOptionElement.h" |
37 #include "bindings/core/v8/V8Node.h" | 37 #include "bindings/core/v8/V8Node.h" |
38 #include "bindings/core/v8/V8NodeList.h" | 38 #include "bindings/core/v8/V8NodeList.h" |
39 #include "core/dom/ExceptionCode.h" | 39 #include "core/dom/ExceptionCode.h" |
40 #include "core/dom/NamedNodesCollection.h" | |
41 #include "core/html/HTMLOptionElement.h" | 40 #include "core/html/HTMLOptionElement.h" |
42 #include "core/html/HTMLOptionsCollection.h" | 41 #include "core/html/HTMLOptionsCollection.h" |
43 #include "core/html/HTMLSelectElement.h" | 42 #include "core/html/HTMLSelectElement.h" |
44 | 43 |
45 namespace blink { | 44 namespace blink { |
46 | 45 |
47 void V8HTMLOptionsCollection::addMethodCustom(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 46 void V8HTMLOptionsCollection::addMethodCustom(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
48 { | 47 { |
49 ExceptionState exceptionState(ExceptionState::ExecutionContext, "add", "HTML
OptionsCollection", info.Holder(), info.GetIsolate()); | 48 ExceptionState exceptionState(ExceptionState::ExecutionContext, "add", "HTML
OptionsCollection", info.Holder(), info.GetIsolate()); |
50 if (!V8HTMLOptionElement::hasInstance(info[0], info.GetIsolate())) { | 49 if (!V8HTMLOptionElement::hasInstance(info[0], info.GetIsolate())) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 newLength = static_cast<unsigned>(v); | 81 newLength = static_cast<unsigned>(v); |
83 } | 82 } |
84 | 83 |
85 if (exceptionState.throwIfNeeded()) | 84 if (exceptionState.throwIfNeeded()) |
86 return; | 85 return; |
87 | 86 |
88 impl->setLength(newLength, exceptionState); | 87 impl->setLength(newLength, exceptionState); |
89 } | 88 } |
90 | 89 |
91 } // namespace blink | 90 } // namespace blink |
OLD | NEW |