summaryrefslogtreecommitdiffstats
path: root/webkit/port
diff options
context:
space:
mode:
authordglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 18:51:52 +0000
committerdglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 18:51:52 +0000
commit399010e721e556e00b4e4150e9becba30fa0a5fd (patch)
treeded2c8cff769d04954e849d9c1100c5ff6aa4404 /webkit/port
parent8d7bdf91a14f3edbbc9872e514da238e615d10b5 (diff)
downloadchromium_src-399010e721e556e00b4e4150e9becba30fa0a5fd.zip
chromium_src-399010e721e556e00b4e4150e9becba30fa0a5fd.tar.gz
chromium_src-399010e721e556e00b4e4150e9becba30fa0a5fd.tar.bz2
Moving/scrubbing of more V8 custom bindings, Chromium side.
R=darin Review URL: http://codereview.chromium.org/20200 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r--webkit/port/bindings/v8/v8_custom.cpp119
1 files changed, 0 insertions, 119 deletions
diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp
index 914ebaf..c3899d8 100644
--- a/webkit/port/bindings/v8/v8_custom.cpp
+++ b/webkit/port/bindings/v8/v8_custom.cpp
@@ -79,10 +79,8 @@
#include "HTMLFrameSetElement.h"
#include "HTMLIFrameElement.h"
#include "HTMLImageElement.h"
-#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HTMLOptionElement.h"
-#include "HTMLOptionsCollection.h"
#include "HTMLSelectElement.h"
#include "History.h"
#include "JSXPathNSResolver.h"
@@ -112,13 +110,6 @@
#include "XPathResult.h"
#include "XSLTProcessor.h"
-#if ENABLE(SVG)
-#include "V8SVGPODTypeWrapper.h"
-#include "SVGElementInstance.h"
-#include "SVGException.h"
-#include "SVGPathSeg.h"
-#endif
-
#include "Navigator.h"
// Horizontal and vertical offset, from the parent content area, around newly
@@ -3230,116 +3221,6 @@ ACCESSOR_GETTER(ElementEventHandler) {
return V8Proxy::EventListenerToV8Object(listener);
}
-
-ACCESSOR_GETTER(HTMLOptionsCollectionLength) {
- INC_STATS("DOM.HTMLOptionsCollection.length._get");
- HTMLOptionsCollection* imp =
- V8Proxy::ToNativeObject<HTMLOptionsCollection>(
- V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
- int v = imp->length();
- return v8::Integer::New(v);
-}
-
-
-ACCESSOR_SETTER(HTMLOptionsCollectionLength) {
- INC_STATS("DOM.HTMLOptionsCollection.length._set");
- HTMLOptionsCollection* imp =
- V8Proxy::ToNativeObject<HTMLOptionsCollection>(
- V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
- double v = value->NumberValue();
- unsigned newLength = 0;
- ExceptionCode ec = 0;
- if (!isnan(v) && !isinf(v)) {
- if (v < 0.0) {
- ec = INDEX_SIZE_ERR;
- } else if (v > static_cast<double>(UINT_MAX)) {
- newLength = UINT_MAX;
- } else {
- newLength = static_cast<unsigned>(v);
- }
- }
- if (!ec) imp->setLength(value->Uint32Value(), ec);
- V8Proxy::SetDOMException(ec);
-}
-
-ACCESSOR_GETTER(HTMLInputElementSelectionStart) {
- INC_STATS("DOM.HTMLInputElement.selectionStart._get");
- v8::Handle<v8::Object> holder = info.Holder();
- HTMLInputElement* imp = V8Proxy::DOMWrapperToNode<HTMLInputElement>(holder);
-
- if (!imp->canHaveSelection()) {
- V8Proxy::ThrowError(V8Proxy::TYPE_ERROR,
- "Accessing selectionStart on an input element that "
- "cannot have a selection.");
- return v8::Undefined();
- }
-
- int v = imp->selectionStart();
- return v8::Integer::New(v);
-}
-
-ACCESSOR_SETTER(HTMLInputElementSelectionStart) {
- INC_STATS("DOM.HTMLInputElement.selectionStart._set");
- v8::Handle<v8::Object> holder = info.Holder();
- HTMLInputElement* imp = V8Proxy::DOMWrapperToNode<HTMLInputElement>(holder);
-
- if (!imp->canHaveSelection()) {
- V8Proxy::ThrowError(V8Proxy::TYPE_ERROR,
- "Accessing selectionStart on an input element that "
- "cannot have a selection.");
- return;
- }
- imp->setSelectionStart(value->Int32Value());
-}
-
-ACCESSOR_GETTER(HTMLInputElementSelectionEnd) {
- INC_STATS("DOM.HTMLInputElement.selectionEnd._get");
- v8::Handle<v8::Object> holder = info.Holder();
- HTMLInputElement* imp = V8Proxy::DOMWrapperToNode<HTMLInputElement>(holder);
-
- if (!imp->canHaveSelection()) {
- V8Proxy::ThrowError(V8Proxy::TYPE_ERROR,
- "Accessing selectionEnd on an input element that "
- "cannot have a selection.");
- return v8::Undefined();
- }
-
- int v = imp->selectionEnd();
- return v8::Integer::New(v);
-}
-
-ACCESSOR_SETTER(HTMLInputElementSelectionEnd) {
- INC_STATS("DOM.HTMLInputElement.selectionEnd._set");
- v8::Handle<v8::Object> holder = info.Holder();
- HTMLInputElement* imp = V8Proxy::DOMWrapperToNode<HTMLInputElement>(holder);
-
- if (!imp->canHaveSelection()) {
- V8Proxy::ThrowError(V8Proxy::TYPE_ERROR,
- "Accessing selectionEnd on an input element that "
- "cannot have a selection.");
- return;
- }
- imp->setSelectionEnd(value->Int32Value());
-}
-
-CALLBACK_FUNC_DECL(HTMLInputElementSetSelectionRange) {
- INC_STATS("DOM.HTMLInputElement.setSelectionRange");
- v8::Handle<v8::Object> holder = args.Holder();
- HTMLInputElement* imp = V8Proxy::DOMWrapperToNode<HTMLInputElement>(holder);
-
- if (!imp->canHaveSelection()) {
- V8Proxy::ThrowError(V8Proxy::TYPE_ERROR,
- "Calling setSelectionRange on an input element that "
- "cannot have a selection.");
- return v8::Undefined();
- }
- int start = args[0]->Int32Value();
- int end = args[1]->Int32Value();
-
- imp->setSelectionRange(start, end);
- return v8::Undefined();
-}
-
// --------------- Security Checks -------------------------
NAMED_ACCESS_CHECK(DOMWindow) {
ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::DOMWINDOW);