[Webkit-unassigned] [Bug 67458] Generate a WebKitCSSMatrix constructor of V8 using the IDL 'Constructor' extended attribute
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 2 11:05:46 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=67458
--- Comment #8 from Kentaro Hara <haraken at google.com> 2011-09-02 11:05:46 PST ---
(In reply to comment #6)
> (From update of attachment 106074 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=106074&action=review
>
> Overall, won't WithUndefinedOrNullCheck attribute do what you are looking for?
>
> In general I am not sure (but I didn't check) that the current implementation correctly processes null, but if your policy regarding null is different,
No.
First of all, as far as I see the current implementation of V8WebKitCSSMatrixConstructor.cpp, the IDL of the WebKitCSSMatrix constructor should be Constructor(optional DOMString string), although there is no spec for the IDL since WebKitCSSMatrix is WebKit-specific.
Given that we assume the IDL, the expected behavior is as follows (The spec is here: http://www.w3.org/TR/WebIDL/#es-DOMString):
- WebKitCSSMatrix() -> a null string is passed to WebKitCSSMatrix::create().
- WebKitCSSMatrix(null) -> a string "null" is passed to WebKitCSSMatrix::create().
- WebKitCSSMatrix(undefined) -> a string "undefined" is passed to WebKitCSSMatrix::create().
On the other hand, WithUndefinedOrNullCheck behaves as follows:
- WebKitCSSMatrix() -> a string "undefined" is passed to WebKitCSSMatrix::create().
- WebKitCSSMatrix(null) -> a null string is passed to WebKitCSSMatrix::create().
- WebKitCSSMatrix(undefined) -> a null string is passed to WebKitCSSMatrix::create().
> I would still suggest adding another policy to V8Parameter instead of brand-new attribute.
I guess that adding another policy would not solve this problem. The essence is that in the current implementation there is no way to create a V8Parameter object that expresses a null String (or AtomicString). This patch enables to create the V8Parameter object that expresses a null String.
> And probably add a test to see what happens with new WebKitCSSMatrix(null)
Added it to custom-constructors.html.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list