Index: core/frame/Location.idl |
diff --git a/core/frame/Location.idl b/core/frame/Location.idl |
index e4e9ff0397f890c5c57696ff452b7b07b33685be..d68eaf768acd455a4efb578263586fc6255e71c2 100644 |
--- a/core/frame/Location.idl |
+++ b/core/frame/Location.idl |
@@ -26,8 +26,11 @@ |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
+// https://html.spec.whatwg.org/#the-location-interface |
+ |
[ |
CheckSecurity=Frame, |
+ Unforgeable, |
WillBeGarbageCollected, |
] interface Location { |
// |assign|, |replace|, and *writing* |href| do not require a security |
@@ -35,26 +38,30 @@ |
// property of an *existing* document at a different origin. |
// However, *reading* |href|, or accessing any component, is a security |
// problem, since that allows tracking navigation. |
- [SetterCallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity=Setter, Unforgeable, DartCustom=Setter] attribute DOMString href; |
- |
- [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity, Unforgeable, DartCustom] void assign(DOMString url); |
- [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity, Unforgeable, DartCustom] void replace(DOMString url); |
- [CallWith=ActiveWindow, Unforgeable, DartCustom] void reload(); |
+ [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity] void assign(DOMString url); |
+ [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity] void replace(DOMString url); |
+ [CallWith=ActiveWindow] void reload(); |
- // URI decomposition attributes |
- [SetterCallWith=(ActiveWindow,FirstWindow), RaisesException=Setter, DartCustom=Setter] attribute DOMString protocol; |
- [SetterCallWith=(ActiveWindow,FirstWindow), DartCustom=Setter] attribute DOMString host; |
- [SetterCallWith=(ActiveWindow,FirstWindow), DartCustom=Setter] attribute DOMString hostname; |
- [SetterCallWith=(ActiveWindow,FirstWindow), DartCustom=Setter] attribute DOMString port; |
- [SetterCallWith=(ActiveWindow,FirstWindow), DartCustom=Setter] attribute DOMString pathname; |
- [SetterCallWith=(ActiveWindow,FirstWindow), DartCustom=Setter] attribute DOMString search; |
- [SetterCallWith=(ActiveWindow,FirstWindow), DartCustom=Setter] attribute DOMString hash; |
+ // TODO(philipj): ancestorOrigins should have [SameObject] and be of type |
+ // DOMString[], i.e. it should return the same array every time. |
+ [Measure] readonly attribute DOMStringList ancestorOrigins; |
+ // TODO(philipj): Per spec, Location implements URLUtils. The below is |
+ // mostly like the URLUtils interface, but with some members missing and |
+ // using DOMString instead of USVString. |
+ [SetterCallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity=Setter] attribute DOMString href; |
+ [NotEnumerable, ImplementedAs=href] DOMString toString(); |
readonly attribute DOMString origin; |
- readonly attribute DOMStringList ancestorOrigins; |
+ [SetterCallWith=(ActiveWindow,FirstWindow), RaisesException=Setter] attribute DOMString protocol; |
+ [SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString host; |
+ [SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString hostname; |
+ [SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString port; |
+ [SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString pathname; |
+ [SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString search; |
+ [SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString hash; |
- [NotEnumerable, Unforgeable, ImplementedAs=href] DOMString toString(); |
- [NotEnumerable, Custom, Unforgeable] any valueOf(); |
+ // TODO(philipj): Location does not have a valueOf() override in the spec. |
+ // See the comment in Location.h for the purpose of this. |
+ [NotEnumerable, CallWith=ThisValue] any valueOf(); |
}; |
- |