RESOLVED FIXED 45165
Expose Flags constructor if FileSystem API is Enabled
https://bugs.webkit.org/show_bug.cgi?id=45165
Summary Expose Flags constructor if FileSystem API is Enabled
Kinuko Yasuda
Reported 2010-09-02 23:24:09 PDT
Expose Flags constructor if FileSystem API is Enabled. http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interface
Attachments
Patch (2.56 KB, patch)
2010-09-03 00:06 PDT, Kinuko Yasuda
no flags
Patch (12.15 KB, patch)
2010-09-09 18:41 PDT, Kinuko Yasuda
no flags
Patch (12.94 KB, patch)
2010-09-09 18:51 PDT, Kinuko Yasuda
no flags
Patch (13.73 KB, patch)
2010-09-09 20:22 PDT, Kinuko Yasuda
no flags
Patch (21.31 KB, patch)
2010-09-09 21:49 PDT, Kinuko Yasuda
no flags
Patch (28.46 KB, patch)
2010-09-09 22:57 PDT, Kinuko Yasuda
dumi: review+
Kinuko Yasuda
Comment 1 2010-09-03 00:06:24 PDT
Dumitru Daniliuc
Comment 2 2010-09-03 03:43:38 PDT
is there a way to reuse fileSystemEnabled()? i know that [EnableAtRuntime] requires a getter with a specific name, but i think in this case it might be better to write some custom code to reuse fileSystemEnabled() (if possible).
Kinuko Yasuda
Comment 3 2010-09-07 00:47:15 PDT
Comment on attachment 66475 [details] Patch Removing this from the review queue for now as we may not need to expose Flags (sent an email about this to public-webapps). (Thanks dumi for your review comment!)
Kinuko Yasuda
Comment 4 2010-09-09 18:41:07 PDT
Created attachment 67133 [details] Patch Reviving this patch.
Kinuko Yasuda
Comment 5 2010-09-09 18:51:44 PDT
Kinuko Yasuda
Comment 6 2010-09-09 20:22:12 PDT
Kinuko Yasuda
Comment 7 2010-09-09 20:26:53 PDT
(In reply to comment #2) > is there a way to reuse fileSystemEnabled()? i know that [EnableAtRuntime] requires a getter with a specific name, but i think in this case it might be better to write some custom code to reuse fileSystemEnabled() (if possible). I added custom getter for V8 (since EnableAtRuntime is valid only in V8). This doesn't stop exposing Flags constructor Window though -- I wasn't able to find a way to hook the custom code from the DOMWindow's prototype template constructor method.
Kinuko Yasuda
Comment 8 2010-09-09 21:49:58 PDT
Created attachment 67150 [details] Patch Modified the code generator to take additional parameter to EnableAtRuntime so that we can reuse fileSystemEnabled().
Kinuko Yasuda
Comment 9 2010-09-09 22:57:49 PDT
Created attachment 67159 [details] Patch Rebased.
Dumitru Daniliuc
Comment 10 2010-09-13 12:45:28 PDT
Comment on attachment 67159 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=67159&action=prettypatch r=me. please address the comment before landing. > WebCore/bindings/scripts/CodeGeneratorV8.pm:3395 > + if (length($signature->extendedAttributes->{"EnabledAtRuntime"}) > 1) { to keep this function consistent with all other helper functions, i think we should change its format to: return "RuntimeEnabledFeatures::" . $codeGenerator->WK_lcfirst($signature->extendedAttributes->{"EnabledAtRuntime"}) . "Enabled" if ($signature->extendedAttributes->{"EnabledAtRuntime"} ne ""); return <the default name>;
Kinuko Yasuda
Comment 11 2010-09-13 14:36:38 PDT
(In reply to comment #10) > (From update of attachment 67159 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=67159&action=prettypatch > > > WebCore/bindings/scripts/CodeGeneratorV8.pm:3395 > > + if (length($signature->extendedAttributes->{"EnabledAtRuntime"}) > 1) { > to keep this function consistent with all other helper functions, i think we should change its format to: > > return "RuntimeEnabledFeatures::" . $codeGenerator->WK_lcfirst($signature->extendedAttributes->{"EnabledAtRuntime"}) . "Enabled" if ($signature->extendedAttributes->{"EnabledAtRuntime"} ne ""); > return <the default name>; As extendedAttributes->{"EnabledAtRuntime"} has value 1 when it's set but has no values, I'm going to make the if expr look like following. (Could you ping me if it doesn't look good.) Thanks, > return ... if ($signature->extendedAttributes->{"EnabledAtRuntime"} && $signature->extendedAttributes->{"EnabledAtRuntime"} != 1);
Kinuko Yasuda
Comment 12 2010-09-13 16:15:11 PDT
Note You need to log in before you can comment on or make changes to this bug.