Bug 174529

Summary: [WebIDL] Replace some custom bindings code in JSCSSStyleDeclarationCustom.cpp with named getters/setters
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews114 for mac-elcapitan
none
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
none
Archive of layout-test-results from ews100 for mac-elcapitan
none
Archive of layout-test-results from ews121 for ios-simulator-wk2
none
Patch
none
Patch
none
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
none
Archive of layout-test-results from ews122 for ios-simulator-wk2
none
Archive of layout-test-results from ews115 for mac-elcapitan
none
Patch cdumez: review+, cdumez: commit-queue-

Sam Weinig
Reported 2017-07-14 14:13:51 PDT
[WebIDL] Replace some custom bindings code in JSCSSStyleDeclarationCustom.cpp with named getters/setters
Attachments
Patch (40.70 KB, patch)
2017-07-14 14:40 PDT, Sam Weinig
no flags
Patch (40.48 KB, patch)
2017-07-14 14:45 PDT, Sam Weinig
no flags
Patch (40.49 KB, patch)
2017-07-14 15:53 PDT, Sam Weinig
no flags
Patch (100.92 KB, patch)
2017-07-14 16:55 PDT, Sam Weinig
no flags
Archive of layout-test-results from ews114 for mac-elcapitan (2.07 MB, application/zip)
2017-07-14 18:11 PDT, Build Bot
no flags
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (1.28 MB, application/zip)
2017-07-14 18:14 PDT, Build Bot
no flags
Archive of layout-test-results from ews100 for mac-elcapitan (1.25 MB, application/zip)
2017-07-14 18:24 PDT, Build Bot
no flags
Archive of layout-test-results from ews121 for ios-simulator-wk2 (982.33 KB, application/zip)
2017-07-14 18:47 PDT, Build Bot
no flags
Patch (107.84 KB, patch)
2017-07-15 10:22 PDT, Sam Weinig
no flags
Patch (107.50 KB, patch)
2017-07-15 10:35 PDT, Sam Weinig
no flags
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (1.53 MB, application/zip)
2017-07-15 11:31 PDT, Build Bot
no flags
Archive of layout-test-results from ews122 for ios-simulator-wk2 (977.91 KB, application/zip)
2017-07-15 11:54 PDT, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (1.78 MB, application/zip)
2017-07-15 12:02 PDT, Build Bot
no flags
Patch (108.76 KB, patch)
2017-07-15 13:25 PDT, Sam Weinig
cdumez: review+
cdumez: commit-queue-
Sam Weinig
Comment 1 2017-07-14 14:40:36 PDT Comment hidden (obsolete)
Sam Weinig
Comment 2 2017-07-14 14:45:51 PDT Comment hidden (obsolete)
Sam Weinig
Comment 3 2017-07-14 15:53:28 PDT Comment hidden (obsolete)
Sam Weinig
Comment 4 2017-07-14 16:55:10 PDT Comment hidden (obsolete)
Build Bot
Comment 5 2017-07-14 18:11:01 PDT Comment hidden (obsolete)
Build Bot
Comment 6 2017-07-14 18:11:02 PDT Comment hidden (obsolete)
Build Bot
Comment 7 2017-07-14 18:14:49 PDT Comment hidden (obsolete)
Build Bot
Comment 8 2017-07-14 18:14:50 PDT Comment hidden (obsolete)
Build Bot
Comment 9 2017-07-14 18:24:57 PDT Comment hidden (obsolete)
Build Bot
Comment 10 2017-07-14 18:24:58 PDT Comment hidden (obsolete)
Build Bot
Comment 11 2017-07-14 18:47:21 PDT Comment hidden (obsolete)
Build Bot
Comment 12 2017-07-14 18:47:22 PDT Comment hidden (obsolete)
Sam Weinig
Comment 13 2017-07-15 10:22:59 PDT Comment hidden (obsolete)
Sam Weinig
Comment 14 2017-07-15 10:35:18 PDT Comment hidden (obsolete)
Build Bot
Comment 15 2017-07-15 11:31:29 PDT Comment hidden (obsolete)
Build Bot
Comment 16 2017-07-15 11:31:31 PDT Comment hidden (obsolete)
Build Bot
Comment 17 2017-07-15 11:54:51 PDT Comment hidden (obsolete)
Build Bot
Comment 18 2017-07-15 11:54:53 PDT Comment hidden (obsolete)
Build Bot
Comment 19 2017-07-15 12:02:46 PDT Comment hidden (obsolete)
Build Bot
Comment 20 2017-07-15 12:02:48 PDT Comment hidden (obsolete)
Sam Weinig
Comment 21 2017-07-15 13:25:57 PDT
Chris Dumez
Comment 22 2017-07-17 14:41:00 PDT
Comment on attachment 315566 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=315566&action=review > Source/WebCore/css/CSSStyleDeclaration.idl:47 > + // these should be normal attributes, but there are too many combinations with Where is this is the spec? I could not find those normal attributes at: https://drafts.csswg.org/cssom/#the-cssstyledeclaration-interface Is our behavior really standard? Do other browsers really behave the same way as us?
Sam Weinig
Comment 23 2017-07-17 18:26:26 PDT
(In reply to Chris Dumez from comment #22) > Comment on attachment 315566 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=315566&action=review > > > Source/WebCore/css/CSSStyleDeclaration.idl:47 > > + // these should be normal attributes, but there are too many combinations with > > Where is this is the spec? I could not find those normal attributes at: > https://drafts.csswg.org/cssom/#the-cssstyledeclaration-interface > > Is our behavior really standard? Do other browsers really behave the same > way as us? That spec has crazy formatting for me :(. The property bits are defined in: https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-camel-cased-attribute https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-webkit-cased-attribute https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-dashed-attribute Note the text like: "For each CSS property property that is a supported CSS property, the following partial interface applies where camel-cased attribute is obtained by running the CSS property to IDL attribute algorithm for property."
Sam Weinig
Comment 24 2017-07-17 18:28:01 PDT
(In reply to Sam Weinig from comment #23) > (In reply to Chris Dumez from comment #22) > > Is our behavior really standard? Do other browsers really behave the same > > way as us? Not sure what the compat story is here. I tried to minimize behavior change as much as possible here. Matching other browsers and the spec can come next.
Chris Dumez
Comment 25 2017-07-17 19:46:37 PDT
Comment on attachment 315566 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=315566&action=review r=me with comments. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:906 > + push(@$outputArray, $indent . "bool propertySupported = true;\n") if $namedSetterOperation->extendedAttributes->{PutOnlyForSupportedProperties}; nit: Variable name should have "is" prefix. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:965 > + if ($namedSetterOperation->extendedAttributes->{PutOnlyForSupportedProperties}) { Isn't this confusingly named? What the code seems to do is call JSObject::put() if the property is NOT supported. The name seems to indicate the opposite. > Source/WebCore/css/CSSStyleDeclaration.h:74 > + // Bindings support Missing period at the end. > Source/WebCore/css/CSSStyleDeclaration.idl:49 > + // recosider this decision. Typo.
Sam Weinig
Comment 26 2017-07-18 11:45:05 PDT
(In reply to Chris Dumez from comment #25) > Comment on attachment 315566 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=315566&action=review > > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:965 > > + if ($namedSetterOperation->extendedAttributes->{PutOnlyForSupportedProperties}) { > > Isn't this confusingly named? What the code seems to do is call > JSObject::put() if the property is NOT supported. The name seems to indicate > the opposite. Yeah, I guess. I was thinking of Put as meaning the custom setter, but that is not at all clear from the name. Renamed it to [CallNamedSetterOnlyForSupportedProperties].
Sam Weinig
Comment 27 2017-07-18 13:12:17 PDT
Note You need to log in before you can comment on or make changes to this bug.