diff options
author | dimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-07 21:44:36 +0000 |
---|---|---|
committer | dimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-07 21:44:36 +0000 |
commit | 4bab3b214e92e0884af87c4ae9287da3daff5f3d (patch) | |
tree | a45c0da83e8aa43e94eedf796b923ebbcf3509b9 /webkit/port/bindings/v8 | |
parent | 5bcdb31304d676b38ce605180b7d8816e9a8b745 (diff) | |
download | chromium_src-4bab3b214e92e0884af87c4ae9287da3daff5f3d.zip chromium_src-4bab3b214e92e0884af87c4ae9287da3daff5f3d.tar.gz chromium_src-4bab3b214e92e0884af87c4ae9287da3daff5f3d.tar.bz2 |
WebKit merge 39606:39660
Review URL: http://codereview.chromium.org/17239
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings/v8')
-rw-r--r-- | webkit/port/bindings/v8/v8_custom.cpp | 45 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_custom.h | 3 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_index.cpp | 1 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_index.h | 3 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 6 |
5 files changed, 9 insertions, 49 deletions
diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp index 30dbf2e..5c75ea7 100644 --- a/webkit/port/bindings/v8/v8_custom.cpp +++ b/webkit/port/bindings/v8/v8_custom.cpp @@ -49,7 +49,6 @@ #include "Base64.h" #include "CanvasGradient.h" #include "CanvasPattern.h" -#include "CanvasPixelArray.h" #include "CanvasRenderingContext2D.h" #include "CanvasStyle.h" #include "Clipboard.h" @@ -686,34 +685,6 @@ NAMED_PROPERTY_GETTER(HTMLCollection) { return HTMLCollectionGetNamedItems(imp, key); } -INDEXED_PROPERTY_GETTER(CanvasPixelArray) { - INC_STATS("DOM.CanvasPixelArray.IndexedPropertyGetter"); - CanvasPixelArray* pixelArray = - V8Proxy::ToNativeObject<CanvasPixelArray>(V8ClassIndex::CANVASPIXELARRAY, - info.Holder()); - - // TODO(eroman): This performance will not be good when looping through - // many pixels. See: http://code.google.com/p/chromium/issues/detail?id=3473 - - unsigned char result; - if (!pixelArray->get(index, result)) - return v8::Undefined(); - return v8::Number::New(result); -} - -INDEXED_PROPERTY_SETTER(CanvasPixelArray) { - INC_STATS("DOM.CanvasPixelArray.IndexedPropertySetter"); - CanvasPixelArray* pixelArray = - V8Proxy::ToNativeObject<CanvasPixelArray>(V8ClassIndex::CANVASPIXELARRAY, - info.Holder()); - - double pixelValue = value->NumberValue(); - pixelArray->set(index, pixelValue); - - // TODO(eroman): what to return? - return v8::Undefined(); -} - CALLBACK_FUNC_DECL(HTMLCollectionItem) { INC_STATS("DOM.HTMLCollection.item()"); HTMLCollection* imp = V8Proxy::ToNativeObject<HTMLCollection>( @@ -3290,11 +3261,11 @@ CALLBACK_FUNC_DECL(SVGLengthConvertToSpecifiedUnits) { CALLBACK_FUNC_DECL(SVGMatrixInverse) { INC_STATS("DOM.SVGMatrix.inverse()"); - AffineTransform imp = - *V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<AffineTransform> >( + TransformationMatrix imp = + *V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >( V8ClassIndex::SVGMATRIX, args.Holder()); ExceptionCode ec = 0; - AffineTransform result = imp.inverse(); + TransformationMatrix result = imp.inverse(); if (!imp.isInvertible()) { ec = SVGException::SVG_MATRIX_NOT_INVERTABLE; } @@ -3304,18 +3275,18 @@ CALLBACK_FUNC_DECL(SVGMatrixInverse) { } return V8Proxy::ToV8Object(V8ClassIndex::SVGMATRIX, - new V8SVGStaticPODTypeWrapper<AffineTransform>(result)); + new V8SVGStaticPODTypeWrapper<TransformationMatrix>(result)); } CALLBACK_FUNC_DECL(SVGMatrixRotateFromVector) { INC_STATS("DOM.SVGMatrix.rotateFromVector()"); - AffineTransform imp = - *V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<AffineTransform> >( + TransformationMatrix imp = + *V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >( V8ClassIndex::SVGMATRIX, args.Holder()); ExceptionCode ec = 0; float x = TO_FLOAT(args[0]); float y = TO_FLOAT(args[1]); - AffineTransform result = imp; + TransformationMatrix result = imp; result.rotateFromVector(x, y); if (x == 0.0 || y == 0.0) { ec = SVGException::SVG_INVALID_VALUE_ERR; @@ -3326,7 +3297,7 @@ CALLBACK_FUNC_DECL(SVGMatrixRotateFromVector) { } return V8Proxy::ToV8Object(V8ClassIndex::SVGMATRIX, - new V8SVGStaticPODTypeWrapper<AffineTransform>(result)); + new V8SVGStaticPODTypeWrapper<TransformationMatrix>(result)); } CALLBACK_FUNC_DECL(SVGElementInstanceAddEventListener) { diff --git a/webkit/port/bindings/v8/v8_custom.h b/webkit/port/bindings/v8/v8_custom.h index ce7bd03..a2555bc 100644 --- a/webkit/port/bindings/v8/v8_custom.h +++ b/webkit/port/bindings/v8/v8_custom.h @@ -369,9 +369,6 @@ DECLARE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection) DECLARE_INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection) DECLARE_NAMED_PROPERTY_GETTER(HTMLCollection) -DECLARE_INDEXED_PROPERTY_GETTER(CanvasPixelArray) -DECLARE_INDEXED_PROPERTY_SETTER(CanvasPixelArray) - // MessagePort DECLARE_PROPERTY_ACCESSOR(MessagePortOnmessage) DECLARE_PROPERTY_ACCESSOR(MessagePortOnclose) diff --git a/webkit/port/bindings/v8/v8_index.cpp b/webkit/port/bindings/v8/v8_index.cpp index 8909b76..5da9c23 100644 --- a/webkit/port/bindings/v8/v8_index.cpp +++ b/webkit/port/bindings/v8/v8_index.cpp @@ -38,7 +38,6 @@ #include "V8CanvasRenderingContext2D.h" #include "V8CanvasGradient.h" #include "V8CanvasPattern.h" -#include "V8CanvasPixelArray.h" #include "V8CDATASection.h" #include "V8CharacterData.h" #include "V8Clipboard.h" diff --git a/webkit/port/bindings/v8/v8_index.h b/webkit/port/bindings/v8/v8_index.h index 7122c56..13337d3 100644 --- a/webkit/port/bindings/v8/v8_index.h +++ b/webkit/port/bindings/v8/v8_index.h @@ -234,7 +234,6 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); V(BARINFO, BarInfo) \ V(CANVASGRADIENT, CanvasGradient) \ V(CANVASPATTERN, CanvasPattern) \ - V(CANVASPIXELARRAY, CanvasPixelArray) \ V(CANVASRENDERINGCONTEXT2D, CanvasRenderingContext2D) \ V(CLIPBOARD, Clipboard) \ V(CONSOLE, Console) \ @@ -390,7 +389,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); #define SVG_POD_NATIVE_TYPES(V) \ V(SVGLENGTH, SVGLength) \ V(SVGTRANSFORM, SVGTransform) \ - V(SVGMATRIX, AffineTransform) \ + V(SVGMATRIX, TransformationMatrix) \ V(SVGNUMBER, float) \ V(SVGPOINT, FloatPoint) \ V(SVGRECT, FloatRect) diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index dd46d2b..b040809 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -50,7 +50,6 @@ #include "BarInfo.h" #include "CanvasGradient.h" #include "CanvasPattern.h" -#include "CanvasPixelArray.h" #include "CanvasRenderingContext2D.h" #include "CanvasStyle.h" #include "CharacterData.h" @@ -1658,11 +1657,6 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( NodeCollectionIndexedPropertyEnumerator<HTMLFormElement>, v8::Integer::New(V8ClassIndex::NODE)); break; - case V8ClassIndex::CANVASPIXELARRAY: - desc->InstanceTemplate()->SetIndexedPropertyHandler( - USE_INDEXED_PROPERTY_GETTER(CanvasPixelArray), - USE_INDEXED_PROPERTY_SETTER(CanvasPixelArray)); - break; case V8ClassIndex::STYLESHEET: // fall through case V8ClassIndex::CSSSTYLESHEET: { // We add an extra internal field to hold a reference to |