WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
40854
JSC bindings for Image Resizer API
https://bugs.webkit.org/show_bug.cgi?id=40854
Summary
JSC bindings for Image Resizer API
Sterling Swigart
Reported
2010-06-18 13:32:34 PDT
This patch exposes the classes and their callbacks to JSC through Image.webkitGetImage. The API is functionally incomplete, so it only will ever call the error callback or throw exceptions.
Attachments
Patch 2: JSC bindings
(101.62 KB, patch)
2010-06-18 13:53 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(102.69 KB, patch)
2010-06-18 14:05 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(112.32 KB, patch)
2010-06-18 16:00 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(112.32 KB, patch)
2010-06-18 16:05 PDT
,
Sterling Swigart
abarth
: review-
abarth
: commit-queue-
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(95.51 KB, patch)
2010-06-21 18:19 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(95.42 KB, patch)
2010-06-22 10:01 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(95.56 KB, patch)
2010-06-22 10:38 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(94.91 KB, patch)
2010-06-22 14:12 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(95.42 KB, patch)
2010-06-22 18:12 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(94.65 KB, patch)
2010-06-22 19:20 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(94.31 KB, patch)
2010-06-22 19:34 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(94.35 KB, patch)
2010-06-22 19:55 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(94.48 KB, patch)
2010-06-22 21:43 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(94.48 KB, patch)
2010-06-22 21:57 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(235.50 KB, patch)
2010-06-22 22:27 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(286.97 KB, patch)
2010-06-23 10:16 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Patch 2: JSC bindings
(95.00 KB, patch)
2010-06-23 10:36 PDT
,
Sterling Swigart
no flags
Details
Formatted Diff
Diff
Show Obsolete
(16)
View All
Add attachment
proposed patch, testcase, etc.
Sterling Swigart
Comment 1
2010-06-18 13:53:46 PDT
Created
attachment 59151
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 2
2010-06-18 14:05:19 PDT
Created
attachment 59155
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 3
2010-06-18 16:00:22 PDT
Created
attachment 59163
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 4
2010-06-18 16:05:10 PDT
Created
attachment 59165
[details]
Patch 2: JSC bindings
Adam Barth
Comment 5
2010-06-18 16:12:34 PDT
Comment on
attachment 59165
[details]
Patch 2: JSC bindings I'm pretty sure you can create these bindings without any extra code. If you have trouble, you should ask dumi. WebCore/ChangeLog:59 + 2010-06-18 Sterling Swigart <
sswigart@google.com
> You have two ChangeLogs in this patch. WebCore/bindings/js/JSCustomImageResizerErrorCallback.cpp:47 + JSCustomImageResizerErrorCallback::JSCustomImageResizerErrorCallback(JSObject* callback, JSDOMGlobalObject* globalObject) We should be able to auto-generate these callbacks now. There are some examples in the database bindings. WebCore/html/HTMLImageElement.idl:56 + [Custom] void webkitGetImage(in DOMString mimeType, in ImageResizerSuccessCallback successCallback, [Optional] in ImageResizerErrorCallback errorCallback, [Optional] in ResizeOptions options) This shouldn't be custom.
Sterling Swigart
Comment 6
2010-06-21 18:19:13 PDT
Created
attachment 59321
[details]
Patch 2: JSC bindings
Dumitru Daniliuc
Comment 7
2010-06-21 18:39:52 PDT
Comment on
attachment 59321
[details]
Patch 2: JSC bindings some drive-by comments: WebCore/bindings/scripts/CodeGeneratorJS.pm:2182 + push(@implContent, " args.append("); minor: it might be nicer to keep the code shorter by moving this line and the one after the if-block, inside the if-else block: if (...) push(@implContent, " args.append(jsString(exec, ${paramName}));\n"); else ... or maybe even add a separate function for this? getToJSString()? i'll let adam decide what's best. :) WebCore/bindings/scripts/CodeGeneratorJS.pm:2185 + } else { indentation is off by 1 space. do we need to change the V8 code generator too? or toV8() works correctly on Strings?
Adam Barth
Comment 8
2010-06-21 18:45:06 PDT
I'm concerned that the spec for this API hasn't received enough review. For example, it's unclear to to implement resizeOptions in other languages, such as Objective-C. If we want other browsers to adopt this API, we should make sure it follows the regular conventions of other DOM APIs, such as being language neutral.
Sterling Swigart
Comment 9
2010-06-22 10:00:56 PDT
(In reply to
comment #5
)
> (From update of
attachment 59165
[details]
) > I'm pretty sure you can create these bindings without any extra code. If you have trouble, you should ask dumi. >
Done.
> WebCore/ChangeLog:59 > + 2010-06-18 Sterling Swigart <
sswigart@google.com
> > You have two ChangeLogs in this patch. >
Fixed.
> WebCore/bindings/js/JSCustomImageResizerErrorCallback.cpp:47 > + JSCustomImageResizerErrorCallback::JSCustomImageResizerErrorCallback(JSObject* callback, JSDOMGlobalObject* globalObject) > We should be able to auto-generate these callbacks now. There are some examples in the database bindings. >
Done.
> WebCore/html/HTMLImageElement.idl:56 > + [Custom] void webkitGetImage(in DOMString mimeType, in ImageResizerSuccessCallback successCallback, [Optional] in ImageResizerErrorCallback errorCallback, [Optional] in ResizeOptions options) > This shouldn't be custom.
I asked WPL about this, but I am still looking for further feedback on the current state of this patch. @Dumitru: - I consolidated the new CodeGeneratorJS.pm code. - This patch is only for JSC bindings--when the V8 bindings are added, CodeGeneratorV8.pm will be changed to match.
Sterling Swigart
Comment 10
2010-06-22 10:01:19 PDT
Created
attachment 59383
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 11
2010-06-22 10:38:05 PDT
Created
attachment 59387
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 12
2010-06-22 14:12:00 PDT
Created
attachment 59415
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 13
2010-06-22 18:12:58 PDT
Created
attachment 59451
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 14
2010-06-22 19:20:50 PDT
Created
attachment 59463
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 15
2010-06-22 19:34:58 PDT
Created
attachment 59465
[details]
Patch 2: JSC bindings
WebKit Review Bot
Comment 16
2010-06-22 19:41:38 PDT
Attachment 59465
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebCore/bindings/js/JSHTMLImageElementCustom.cpp:92: Tab found; better to use spaces [whitespace/tab] [1] WebCore/bindings/js/JSHTMLImageElementCustom.cpp:93: Tab found; better to use spaces [whitespace/tab] [1] WebCore/bindings/js/JSHTMLImageElementCustom.cpp:94: Tab found; better to use spaces [whitespace/tab] [1] WebCore/bindings/js/JSHTMLImageElementCustom.cpp:101: Tab found; better to use spaces [whitespace/tab] [1] WebCore/bindings/js/JSHTMLImageElementCustom.cpp:102: Tab found; better to use spaces [whitespace/tab] [1] WebCore/bindings/js/JSHTMLImageElementCustom.cpp:103: Tab found; better to use spaces [whitespace/tab] [1] Total errors found: 6 in 45 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sterling Swigart
Comment 17
2010-06-22 19:55:28 PDT
Created
attachment 59467
[details]
Patch 2: JSC bindings
WebKit Review Bot
Comment 18
2010-06-22 20:41:06 PDT
Attachment 59467
[details]
did not build on chromium: Build output:
http://webkit-commit-queue.appspot.com/results/3281627
Sterling Swigart
Comment 19
2010-06-22 21:43:39 PDT
Created
attachment 59474
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 20
2010-06-22 21:57:18 PDT
Created
attachment 59476
[details]
Patch 2: JSC bindings
Sterling Swigart
Comment 21
2010-06-22 22:27:08 PDT
Created
attachment 59478
[details]
Patch 2: JSC bindings
WebKit Review Bot
Comment 22
2010-06-22 23:16:31 PDT
Attachment 59478
[details]
did not build on chromium: Build output:
http://webkit-commit-queue.appspot.com/results/3337572
Sterling Swigart
Comment 23
2010-06-23 10:16:52 PDT
Created
attachment 59527
[details]
Patch 2: JSC bindings
Early Warning System Bot
Comment 24
2010-06-23 10:28:41 PDT
Attachment 59527
[details]
did not build on qt: Build output:
http://webkit-commit-queue.appspot.com/results/3309603
Sterling Swigart
Comment 25
2010-06-23 10:36:24 PDT
Created
attachment 59530
[details]
Patch 2: JSC bindings
WebKit Review Bot
Comment 26
2010-06-23 10:53:46 PDT
Attachment 59527
[details]
did not build on chromium: Build output:
http://webkit-commit-queue.appspot.com/results/3291659
WebKit Review Bot
Comment 27
2010-06-23 12:14:48 PDT
Attachment 59530
[details]
did not build on chromium: Build output:
http://webkit-commit-queue.appspot.com/results/3273615
Dumitru Daniliuc
Comment 28
2010-06-23 17:57:19 PDT
Just wanted to point out that the cr-linux bot (incorrectly) skips at least one step when building WebKit, so it goes red for any patch with IDL changes. If you're concerned about that bot, I'd recommend just patching the changes into a clean Chromium client and building it locally.
Adam Barth
Comment 29
2010-06-23 18:42:01 PDT
(In reply to
comment #28
)
> Just wanted to point out that the cr-linux bot (incorrectly) skips at least one step when building WebKit, so it goes red for any patch with IDL changes. If you're concerned about that bot, I'd recommend just patching the changes into a clean Chromium client and building it locally.
What step is the bot supposed to run? It just calls "build-webkit --chromium"
Sterling Swigart
Comment 30
2010-06-23 18:45:54 PDT
(In reply to
comment #29
)
> (In reply to
comment #28
) > > Just wanted to point out that the cr-linux bot (incorrectly) skips at least one step when building WebKit, so it goes red for any patch with IDL changes. If you're concerned about that bot, I'd recommend just patching the changes into a clean Chromium client and building it locally. > > What step is the bot supposed to run? It just calls "build-webkit --chromium"
In my case, I was developing this API under the ENABLE_IMAGE_RESIZER flag, but someone flipped it from 0 to 1 without me knowing. It shouldn't be building the stuff in the IDLs at all--which is being fixed with 41116.
Dumitru Daniliuc
Comment 31
2010-06-24 16:41:49 PDT
> What step is the bot supposed to run? It just calls "build-webkit --chromium"
It looks like it misses the "gclient sync" step (WebKitTools/Scripts/update-webkit-chromium). So whenever new files are added, the Makefile is not regenerated, which leads to build errors.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug