RESOLVED FIXED 91768
Replaceable attributes should also have readonly
https://bugs.webkit.org/show_bug.cgi?id=91768
Summary Replaceable attributes should also have readonly
Erik Arvidsson
Reported 2012-07-19 11:58:53 PDT
DOMWindow.idl (and others) has a bunch of [Replaceable] attributes. These are all marked as readonly [Replaceable] in the specs.
Attachments
Patch (17.43 KB, patch)
2012-07-19 14:40 PDT, Erik Arvidsson
no flags
Patch (17.43 KB, patch)
2012-07-19 15:00 PDT, Erik Arvidsson
no flags
Patch (21.64 KB, patch)
2012-07-19 16:42 PDT, Erik Arvidsson
no flags
Patch for landing (21.39 KB, patch)
2012-10-26 08:12 PDT, Erik Arvidsson
no flags
Erik Arvidsson
Comment 1 2012-07-19 14:40:43 PDT
Adam Barth
Comment 2 2012-07-19 14:53:27 PDT
Comment on attachment 153348 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=153348&action=review Does it ever make sense to have a non-readonly [Replaceable] property? If not, should the code generator error out in that case? > Source/WebCore/ChangeLog:8 > + This udpdates the code generators for JSC and V8 to handle this case correctly. udpdates -> updates
Erik Arvidsson
Comment 3 2012-07-19 14:58:39 PDT
(In reply to comment #2) > (From update of attachment 153348 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=153348&action=review > > Does it ever make sense to have a non-readonly [Replaceable] property? If not, should the code generator error out in that case? Conceptually it could make sense if the ObjC or some other non JS binding want to allow the underlying attribute to be writable.
Erik Arvidsson
Comment 4 2012-07-19 15:00:49 PDT
Adam Barth
Comment 5 2012-07-19 15:06:45 PDT
Comment on attachment 153355 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=153355&action=review r=me assuming this doesn't break ObjC bindings. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1221 > - if ($attribute->type =~ /readonly/) { > + if ($attribute->type =~ /readonly/ && !$attribute->signature->extendedAttributes->{"Replaceable"}) { Should we make a helper function that does this instead of copy/pasting it everywhere? > Source/WebCore/page/DOMWindow.idl:55 > + readonly attribute [Replaceable] Navigator navigator; I'm surprised this doesn't break the ObjC bindings. Does ObjC not have setters for all of these?
Erik Arvidsson
Comment 6 2012-07-19 16:42:58 PDT
Erik Arvidsson
Comment 7 2012-10-26 08:12:12 PDT
Created attachment 170930 [details] Patch for landing
WebKit Review Bot
Comment 8 2012-10-26 09:10:11 PDT
Comment on attachment 170930 [details] Patch for landing Clearing flags on attachment: 170930 Committed r132667: <http://trac.webkit.org/changeset/132667>
WebKit Review Bot
Comment 9 2012-10-26 09:10:15 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.