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 | |
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')
-rw-r--r-- | webkit/port/DerivedSources.make | 38 | ||||
-rw-r--r-- | webkit/port/bindings/scripts/CodeGeneratorV8.pm | 2 | ||||
-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 |
7 files changed, 27 insertions, 71 deletions
diff --git a/webkit/port/DerivedSources.make b/webkit/port/DerivedSources.make index 598cfcb..cd1845f 100644 --- a/webkit/port/DerivedSources.make +++ b/webkit/port/DerivedSources.make @@ -635,7 +635,6 @@ all : \ V8CSSValueList.h \ V8CanvasGradient.h \ V8CanvasPattern.h \ - V8CanvasPixelArray.h \ V8CanvasRenderingContext2D.h \ V8CharacterData.h \ V8Comment.h \ @@ -932,33 +931,30 @@ all : \ # CSS property names and value keywords -ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG) - -CSSPropertyNames.h : css/CSSPropertyNames.in css/SVGCSSPropertyNames.in - if sort $< $(WebCore)/css/SVGCSSPropertyNames.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi - cat $< $(WebCore)/css/SVGCSSPropertyNames.in > CSSPropertyNames.in - perl "$(WebCore)/css/makeprop.pl" +WEBCORE_CSS_PROPERTY_NAMES := $(WebCore)/css/CSSPropertyNames.in +WEBCORE_CSS_VALUE_KEYWORDS := $(WebCore)/css/CSSValueKeywords.in -CSSValueKeywords.h : css/CSSValueKeywords.in css/SVGCSSValueKeywords.in - # Lower case all the values, as CSS values are case-insensitive - perl -ne 'print lc' $(WebCore)/css/SVGCSSValueKeywords.in > SVGCSSValueKeywords.in - if sort $< SVGCSSValueKeywords.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi - cat $< SVGCSSValueKeywords.in > CSSValueKeywords.in - perl "$(WebCore)/css/makevalues.pl" +ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG) + WEBCORE_CSS_PROPERTY_NAMES := $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/SVGCSSPropertyNames.in + WEBCORE_CSS_VALUE_KEYWORDS := $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css/SVGCSSValueKeywords.in +endif -else +# Chromium does not support this. +#ifeq ($(ENABLE_DASHBOARD_SUPPORT), 1) +# WEBCORE_CSS_PROPERTY_NAMES := $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/DashboardSupportCSSPropertyNames.in +#endif -CSSPropertyNames.h : css/CSSPropertyNames.in css/makeprop.pl - cp $< CSSPropertyNames.in +CSSPropertyNames.h : $(WEBCORE_CSS_PROPERTY_NAMES) css/makeprop.pl + if sort $(WEBCORE_CSS_PROPERTY_NAMES) | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi + cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in perl "$(WebCore)/css/makeprop.pl" -CSSValueKeywords.h : css/CSSValueKeywords.in css/makevalues.pl - cp $< CSSValueKeywords.in +CSSValueKeywords.h : $(WEBCORE_CSS_VALUE_KEYWORDS) css/makevalues.pl + # Lower case all the values, as CSS values are case-insensitive + perl -ne 'print lc' $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in + if sort CSSValueKeywords.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi perl "$(WebCore)/css/makevalues.pl" -endif - - # DOCTYPE strings DocTypeStrings.cpp : html/DocTypeStrings.gperf diff --git a/webkit/port/bindings/scripts/CodeGeneratorV8.pm b/webkit/port/bindings/scripts/CodeGeneratorV8.pm index 0b3b277..779ac9d 100644 --- a/webkit/port/bindings/scripts/CodeGeneratorV8.pm +++ b/webkit/port/bindings/scripts/CodeGeneratorV8.pm @@ -1611,7 +1611,7 @@ sub GetNativeType return "Range::CompareHow" if $type eq "CompareHow"; return "FloatRect" if $type eq "SVGRect"; return "FloatPoint" if $type eq "SVGPoint"; - return "AffineTransform" if $type eq "SVGMatrix"; + return "TransformationMatrix" if $type eq "SVGMatrix"; return "SVGTransform" if $type eq "SVGTransform"; return "SVGLength" if $type eq "SVGLength"; return "double" if $type eq "SVGNumber"; 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 |