Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(762)

Unified Diff: bindings/v8/V8DOMWrapper.cpp

Issue 160259: - Bind CanvasPixelArray wrappers to the backing store directly without... (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bindings/v8/V8DOMWrapper.cpp
===================================================================
--- bindings/v8/V8DOMWrapper.cpp (revision 46194)
+++ bindings/v8/V8DOMWrapper.cpp (working copy)
@@ -292,7 +292,7 @@
descriptor->InstanceTemplate()->SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(HTMLFormElement), 0, 0, 0, nodeCollectionIndexedPropertyEnumerator<HTMLFormElement>, v8::Integer::New(V8ClassIndex::NODE));
break;
case V8ClassIndex::CANVASPIXELARRAY:
- descriptor->InstanceTemplate()->SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(CanvasPixelArray), USE_INDEXED_PROPERTY_SETTER(CanvasPixelArray));
+ //descriptor->InstanceTemplate()->SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(CanvasPixelArray), USE_INDEXED_PROPERTY_SETTER(CanvasPixelArray));
iposva 2009/07/28 03:41:58 This will be removed before commit, but it helps b
break;
case V8ClassIndex::STYLESHEET: // fall through
case V8ClassIndex::CSSSTYLESHEET: {
@@ -559,6 +559,11 @@
setJSWrapperForActiveDOMObject(impl, result);
else
setJSWrapperForDOMObject(impl, result);
+
+ if (type == V8ClassIndex::CANVASPIXELARRAY) {
+ CanvasPixelArray* pixels = reinterpret_cast<CanvasPixelArray*>(impl);
+ result->SetElementsToPixelData(pixels->data()->data(), pixels->length());
iposva 2009/07/28 03:41:58 I will change the API call in V8 to SetIndexedProp
+ }
// Special case for non-node objects associated with a
// DOMWindow. Both Safari and FF let the JS wrappers for these
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698