Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: third_party/WebKit/Source/bindings/IDLExtendedAttributes.md

Issue 2668753006: Special-case LocalDOMWindow for same-origin access in bindings. (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 used for the `Location.href` attribute: cross-origin writes to this attribute 1471 used for the `Location.href` attribute: cross-origin writes to this attribute
1472 are allowed, since it navigates the browsing context, but allowing cross-origin 1472 are allowed, since it navigates the browsing context, but allowing cross-origin
1473 reads would leak cross-origin information. 1473 reads would leak cross-origin information.
1474 1474
1475 ```webidl 1475 ```webidl
1476 [CrossOrigin=(Getter,Setter)] readonly attribute Location location; 1476 [CrossOrigin=(Getter,Setter)] readonly attribute Location location;
1477 ``` 1477 ```
1478 With both `Getter` and `Setter`, allows both cross-origin reads and cross-origin 1478 With both `Getter` and `Setter`, allows both cross-origin reads and cross-origin
1479 writes. This is used for the `Window.location` attribute. 1479 writes. This is used for the `Window.location` attribute.
1480 1480
1481 ### [SameOriginImplementedAs] _(i)
1482
1483 Summary: Used in conjunction with (#_CrossOrigin_i). Allows a different C++
1484 class to be used for a same-origin access.
1485
1486 Usage for interfaces:
1487 ```webidl
1488 [
1489 SameOriginImplementedAs=LocalDOMWindow,
1490 ] interface Window {
1491 ...
1492 };
1493 ```
1494
1481 ### [CustomConstructor] _(i)_ 1495 ### [CustomConstructor] _(i)_
1482 1496
1483 Summary: They allow you to write custom bindings for constructors. 1497 Summary: They allow you to write custom bindings for constructors.
1484 1498
1485 Usage: They can be specified on interfaces. _Strongly discouraged._ As with `[Cu stom]`, it is generally better to modify the code generator. Incompatible with ` [Constructor]` – you cannot mix custom constructors and generated constructors. 1499 Usage: They can be specified on interfaces. _Strongly discouraged._ As with `[Cu stom]`, it is generally better to modify the code generator. Incompatible with ` [Constructor]` – you cannot mix custom constructors and generated constructors.
1486 1500
1487 ```webidl 1501 ```webidl
1488 [ 1502 [
1489 CustomConstructor(float x, float y, optional DOMString str), 1503 CustomConstructor(float x, float y, optional DOMString str),
1490 ] interface XXX { 1504 ] interface XXX {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1672 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1659 1673
1660 1. Redistributions of source code must retain the above copyright notice, this l ist of conditions and the following disclaimer. 1674 1. Redistributions of source code must retain the above copyright notice, this l ist of conditions and the following disclaimer.
1661 1675
1662 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. 1676 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.
1663 1677
1664 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. 1678 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.
1665 *** 1679 ***
1666 1680
1667 [CrossOriginProperties]: https://html.spec.whatwg.org/multipage/browsers.html#cr ossoriginproperties-(-o-) 1681 [CrossOriginProperties]: https://html.spec.whatwg.org/multipage/browsers.html#cr ossoriginproperties-(-o-)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698