Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Blink IDL Extended Attributes | 1 # Blink IDL Extended Attributes |
| 2 | 2 |
| 3 [TOC] | 3 [TOC] |
| 4 | 4 |
| 5 ## Introduction | 5 ## Introduction |
| 6 | 6 |
| 7 The main interest in extended attributes are their _semantics_: Blink implements many more extended attributes than the Web IDL standard, to specify various beh avior. | 7 The main interest in extended attributes are their _semantics_: Blink implements many more extended attributes than the Web IDL standard, to specify various beh avior. |
| 8 | 8 |
| 9 The authoritative list of allowed extended attributes and values is [bindings/ID LExtendedAttributes.txt](https://code.google.com/p/chromium/codesearch#chromium/ src/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt). This is compl ete but not necessarily precise (there may be unused extended attributes or valu es), since validation is run on build, but coverage isn't checked. | 9 The authoritative list of allowed extended attributes and values is [bindings/ID LExtendedAttributes.txt](https://code.google.com/p/chromium/codesearch#chromium/ src/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt). This is compl ete but not necessarily precise (there may be unused extended attributes or valu es), since validation is run on build, but coverage isn't checked. |
| 10 | 10 |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 852 [ | 852 [ |
| 853 Custom=VisitDOMWrapper, | 853 Custom=VisitDOMWrapper, |
| 854 ] interface XXX { | 854 ] interface XXX { |
| 855 ... | 855 ... |
| 856 }; | 856 }; |
| 857 ``` | 857 ``` |
| 858 | 858 |
| 859 And then in V8XXXCustom.cpp: | 859 And then in V8XXXCustom.cpp: |
| 860 | 860 |
| 861 ```c++ | 861 ```c++ |
| 862 void V8XXX::visitDOMWrapper(DOMDataStore* store, void* object, v8::Persistent<v8 ::Object> wrapper) | 862 void V8XXX::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* scriptWrappab le, v8::Persistent<v8::Object> wrapper) |
| 863 { | 863 { |
| 864 ... | 864 ... |
| 865 } | 865 } |
| 866 ``` | |
| 867 | |
| 868 | |
| 869 #### [Custom=VisitDOMWrapperExtra] _(i)_ | |
|
haraken
2016/08/31 23:14:50
I do want to avoid introducing [Custom=VisitDOMWra
Ken Russell (switch to Gerrit)
2016/09/01 00:08:49
As mentioned in the summary below, these classes a
Kai Ninomiya
2016/09/02 18:29:22
Done.
| |
| 870 | |
| 871 Summary: Allows you to write extra custom code for visitDOMWrapper, without conf licting with the visitDOMWrapper implementation generated by `[SetWrapperReferen ceFrom]`. That implementation will call your visitDOMWrapperExtra implementation . One use (WebGLRenderingContext.idl). | |
| 872 | |
| 873 Usage: | |
| 874 | |
| 875 ```webidl | |
| 876 [ | |
| 877 Custom=VisitDOMWrapperExtra, | |
| 878 ] interface XXX { | |
| 879 ... | |
| 880 }; | |
| 881 ``` | |
| 882 | |
| 883 And then in V8XXXCustom.cpp: | |
| 884 | |
| 885 ```c++ | |
| 886 void V8XXX::visitDOMWrapperExtra(v8::Isolate* isolate, ScriptWrappable* scriptWr appable, v8::Persistent<v8::Object> wrapper) | |
| 887 { | |
| 888 ... | |
| 889 } | |
| 866 ``` | 890 ``` |
| 867 | 891 |
| 868 ### [CustomElementCallbacks] _(m, a)_ | 892 ### [CustomElementCallbacks] _(m, a)_ |
| 869 | 893 |
| 870 Summary: Wraps the method/accessor with a Custom Elements "callback delivery sco pe" which will dispatch Custom Element callbacks (createdCallback, attributeChan gedCallback, etc.) before returning to script. | 894 Summary: Wraps the method/accessor with a Custom Elements "callback delivery sco pe" which will dispatch Custom Element callbacks (createdCallback, attributeChan gedCallback, etc.) before returning to script. |
| 871 | 895 |
| 872 *** note | 896 *** note |
| 873 This attribute is only for Custom Elements V0, | 897 This attribute is only for Custom Elements V0, |
| 874 and is superceded by `[CEReactions]` for V1. | 898 and is superceded by `[CEReactions]` for V1. |
| 875 *** | 899 *** |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1585 Copyright (C) 2009 Apple Inc. All rights reserved. | 1609 Copyright (C) 2009 Apple Inc. All rights reserved. |
| 1586 | 1610 |
| 1587 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | 1611 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
| 1588 | 1612 |
| 1589 1. Redistributions of source code must retain the above copyright notice, this l ist of conditions and the following disclaimer. | 1613 1. Redistributions of source code must retain the above copyright notice, this l ist of conditions and the following disclaimer. |
| 1590 | 1614 |
| 1591 2. Redistributions in binary form must reproduce the above copyright notice, thi s list of conditions and the following disclaimer in the documentation and/or ot her materials provided with the distribution. | 1615 2. Redistributions in binary form must reproduce the above copyright notice, thi s list of conditions and the following disclaimer in the documentation and/or ot her materials provided with the distribution. |
| 1592 | 1616 |
| 1593 THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXP RESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIE S OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, I NCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMI TED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFI TS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHE THER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI BILITY OF SUCH DAMAGE. | 1617 THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXP RESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIE S OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, I NCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMI TED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFI TS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHE THER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI BILITY OF SUCH DAMAGE. |
| 1594 *** | 1618 *** |
| OLD | NEW |