summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authordglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 20:32:36 +0000
committerdglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 20:32:36 +0000
commit0837612214bc38ec9c0f2b484143d7e17fb4c86d (patch)
tree5f9b80301d256d65f7610837226ab0f95848f6fe /webkit
parent92edc4764d2f311440929ad4dca91f87be3b2f11 (diff)
downloadchromium_src-0837612214bc38ec9c0f2b484143d7e17fb4c86d.zip
chromium_src-0837612214bc38ec9c0f2b484143d7e17fb4c86d.tar.gz
chromium_src-0837612214bc38ec9c0f2b484143d7e17fb4c86d.tar.bz2
Re-applying r9486 module accidental local changes.
This was http://codereview.chromium.org/20200, but then I accidentally started making more edits to v8_custom.cpp. TBR=darin Review URL: http://codereview.chromium.org/20228 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/build/V8Bindings/SConscript4
-rw-r--r--webkit/build/V8Bindings/V8Bindings.vcproj8
-rw-r--r--webkit/port/bindings/v8/v8_custom.cpp110
-rw-r--r--webkit/webkit.xcodeproj/project.pbxproj9
4 files changed, 19 insertions, 112 deletions
diff --git a/webkit/build/V8Bindings/SConscript b/webkit/build/V8Bindings/SConscript
index f93f483..4c368ca 100644
--- a/webkit/build/V8Bindings/SConscript
+++ b/webkit/build/V8Bindings/SConscript
@@ -349,7 +349,9 @@ inputs = [
'$PORT_DIR/bindings/v8/extensions/GCController.cpp',
'$PORT_DIR/bindings/v8/extensions/Interval.cpp',
'$PORT_DIR/bindings/v8/extensions/Playback.cpp',
-
+
+ '$WEBCORE_DIR/bindings/v8/custom/V8HTMLInputElementCustom.cpp',
+ '$WEBCORE_DIR/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp',
'$WEBCORE_DIR/bindings/v8/custom/V8SVGElementInstanceCustom.cpp',
'$WEBCORE_DIR/bindings/v8/custom/V8SVGLengthCustom.cpp',
'$WEBCORE_DIR/bindings/v8/custom/V8SVGMatrixCustom.cpp',
diff --git a/webkit/build/V8Bindings/V8Bindings.vcproj b/webkit/build/V8Bindings/V8Bindings.vcproj
index c361d64..d390b16 100644
--- a/webkit/build/V8Bindings/V8Bindings.vcproj
+++ b/webkit/build/V8Bindings/V8Bindings.vcproj
@@ -136,6 +136,14 @@
>
</File>
<File
+ RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8HTMLInputElementCustom.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8HTMLOptionsCollectionCustom.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8SVGElementInstanceCustom.cpp"
>
</File>
diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp
index 914ebaf..d238471 100644
--- a/webkit/port/bindings/v8/v8_custom.cpp
+++ b/webkit/port/bindings/v8/v8_custom.cpp
@@ -3230,116 +3230,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);
diff --git a/webkit/webkit.xcodeproj/project.pbxproj b/webkit/webkit.xcodeproj/project.pbxproj
index e011588..a9f857e 100644
--- a/webkit/webkit.xcodeproj/project.pbxproj
+++ b/webkit/webkit.xcodeproj/project.pbxproj
@@ -51,6 +51,8 @@
41DE748C0F3CDBCB0049BC24 /* V8SVGElementInstanceCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41DE74890F3CDBCB0049BC24 /* V8SVGElementInstanceCustom.cpp */; };
41DE748D0F3CDBCB0049BC24 /* V8SVGLengthCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41DE748A0F3CDBCB0049BC24 /* V8SVGLengthCustom.cpp */; };
41DE748E0F3CDBCB0049BC24 /* V8SVGMatrixCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41DE748B0F3CDBCB0049BC24 /* V8SVGMatrixCustom.cpp */; };
+ 41DE7B6C0F40EA5F0049BC24 /* V8HTMLOptionsCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41DE7B6B0F40EA5F0049BC24 /* V8HTMLOptionsCollectionCustom.cpp */; };
+ 41DE7B6F0F40EA7C0049BC24 /* V8HTMLInputElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41DE7B6E0F40EA7C0049BC24 /* V8HTMLInputElementCustom.cpp */; };
41DEA0680F27C0F900E40D43 /* BackForwardListChromium.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41DEA0670F27C0F900E40D43 /* BackForwardListChromium.cpp */; };
453FFDF935221CD484A3AFED /* Interval.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35DEC96C125DC674B5C9FA27 /* Interval.cpp */; };
489B04B64226A8BC625C0DDB /* RenderLineBoxList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03F1A9ED31C43E9C91A48AE0 /* RenderLineBoxList.cpp */; };
@@ -100,7 +102,6 @@
89F4A0D50F200D5B000A326A /* V8CanvasPixelArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89F4A0D30F200D59000A326A /* V8CanvasPixelArray.cpp */; };
89F4A2090F2106EF000A326A /* V8CanvasPixelArrayCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89F4A1FC0F2101F8000A326A /* V8CanvasPixelArrayCustom.cpp */; };
8EFD7D527676BF3B3C92361E /* ThreadTimers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6A9898388068C93C5A7C011C /* ThreadTimers.cpp */; };
- 926BA16FA5646FDB1353DBD1 /* MainThreadChromium.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7FF1567A8464BD6DC36B47CD /* MainThreadChromium.cpp */; };
934CC0040EBFE0E000A658F2 /* chromium_bridge_impl.cc in Sources */ = {isa = PBXBuildFile; fileRef = 934CC0030EBFE0E000A658F2 /* chromium_bridge_impl.cc */; };
938180500EF3394A00993F02 /* back_forward_list_client_impl.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9381804E0EF3394A00993F02 /* back_forward_list_client_impl.cc */; };
938444080F16B0570075F4C5 /* AccessibilityImageMapLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DB7F1E80E9BAE2900C66CE0 /* AccessibilityImageMapLink.cpp */; };
@@ -1567,6 +1568,8 @@
41DE74890F3CDBCB0049BC24 /* V8SVGElementInstanceCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = V8SVGElementInstanceCustom.cpp; sourceTree = "<group>"; };
41DE748A0F3CDBCB0049BC24 /* V8SVGLengthCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = V8SVGLengthCustom.cpp; sourceTree = "<group>"; };
41DE748B0F3CDBCB0049BC24 /* V8SVGMatrixCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = V8SVGMatrixCustom.cpp; sourceTree = "<group>"; };
+ 41DE7B6B0F40EA5F0049BC24 /* V8HTMLOptionsCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = V8HTMLOptionsCollectionCustom.cpp; sourceTree = "<group>"; };
+ 41DE7B6E0F40EA7C0049BC24 /* V8HTMLInputElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = V8HTMLInputElementCustom.cpp; sourceTree = "<group>"; };
41DEA0670F27C0F900E40D43 /* BackForwardListChromium.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardListChromium.cpp; sourceTree = "<group>"; };
41F1D4620EF70D1600DA8753 /* FontFastPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFastPath.cpp; sourceTree = "<group>"; };
4C04BF9CDE7B0B591087B440 /* RenderObjectChildList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderObjectChildList.h; sourceTree = "<group>"; };
@@ -4513,6 +4516,8 @@
children = (
41DE74870F3CDBCB0049BC24 /* V8CustomBinding.h */,
41DE74880F3CDBCB0049BC24 /* V8CustomEventListener.h */,
+ 41DE7B6E0F40EA7C0049BC24 /* V8HTMLInputElementCustom.cpp */,
+ 41DE7B6B0F40EA5F0049BC24 /* V8HTMLOptionsCollectionCustom.cpp */,
41DE74890F3CDBCB0049BC24 /* V8SVGElementInstanceCustom.cpp */,
41DE748A0F3CDBCB0049BC24 /* V8SVGLengthCustom.cpp */,
41DE748B0F3CDBCB0049BC24 /* V8SVGMatrixCustom.cpp */,
@@ -8360,6 +8365,7 @@
938447E20F16B06E0075F4C5 /* V8HTMLIFrameElement.cpp in Sources */,
938447E30F16B06E0075F4C5 /* V8HTMLImageElement.cpp in Sources */,
938447E40F16B06E0075F4C5 /* V8HTMLInputElement.cpp in Sources */,
+ 41DE7B6F0F40EA7C0049BC24 /* V8HTMLInputElementCustom.cpp in Sources */,
938447E50F16B06E0075F4C5 /* V8HTMLIsIndexElement.cpp in Sources */,
938447E60F16B06E0075F4C5 /* V8HTMLLabelElement.cpp in Sources */,
938447E70F16B06E0075F4C5 /* V8HTMLLegendElement.cpp in Sources */,
@@ -8376,6 +8382,7 @@
938447F20F16B06E0075F4C5 /* V8HTMLOptGroupElement.cpp in Sources */,
938447F30F16B06E0075F4C5 /* V8HTMLOptionElement.cpp in Sources */,
938447F40F16B06E0075F4C5 /* V8HTMLOptionsCollection.cpp in Sources */,
+ 41DE7B6C0F40EA5F0049BC24 /* V8HTMLOptionsCollectionCustom.cpp in Sources */,
938447F50F16B06E0075F4C5 /* V8HTMLParagraphElement.cpp in Sources */,
938447F60F16B06E0075F4C5 /* V8HTMLParamElement.cpp in Sources */,
938447F70F16B06E0075F4C5 /* V8HTMLPreElement.cpp in Sources */,