Revision 7d92dbd58ac296da6fb2e24d9c9758775e873088 authored by Mike West on 06 December 2018, 10:19:53 UTC, committed by Chromium WPT Sync on 06 December 2018, 10:19:53 UTC
This patch adjusts `ScriptURLString` to be a union including `USVString`, not `DOMString`. The advice in [WebIDL][1] isn't exactly clear, but it boils down to @domenic's notes in [heycam/webidl#84][2] and [w3ctag/design-principles#93][3]. Long story short, URLs are `USVString`. This patch adjusts our implementation to match. [1]: https://heycam.github.io/webidl/#idl-USVString [2]: https://github.com/heycam/webidl/issues/84#issuecomment-300857185 [3]: https://github.com/w3ctag/design-principles/issues/93#issuecomment-379816152 Change-Id: I9bf1240b421287d7d9c291b13d887ca981a66231
1 parent 93af5d9
choiceSet.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "choiceSet.json",
"title": "Definitions: Choice.",
"description": "Schemas in #/definitions detect or validate keys/objects used in describing Choice (Sections 3.2.7 and 3.2.8).",
"definitions":
{
"itemsDetected" :
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Definition: items",
"description": "True when the object includes items key and value of items is an array containing at least 1 item, which can be a specificResource, an externalWebResource, a uri, a textualBody or another choice/set (Sections 3.2.7 and 3.2.8).",
"type": "object",
"properties" :
{
"items" :
{
"type" : "array",
"minItems": 1,
"items": {
"oneOf":
[
{ "$ref": "specificResource.json#/definitions/specificeResourceDetected" },
{ "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" },
{ "$ref": "bodyTarget.json#/definitions/textualBodyFound" },
{ "$ref": "id.json#/definitions/stringUri" },
{ "allOf":
[
{ "$ref" : "#/definitions/choiceOrSetTypeDefinition" },
{ "$ref": "#/definitions/itemsDetected" }
]
}
]
}
}
},
"required": [ "items" ]
},
"choiceTypeDefinition":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Definition: Choice type",
"description": "True when object has type key and object's type is 'Choice' (Section 3.2.7)",
"type": "object",
"properties":
{
"type":
{
"type": "string",
"enum": ["Choice"]
}
},
"required": [ "type" ]
},
"choiceOrSetTypeDefinition":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Definition: Choice or Set type",
"description": "True when object has type key and object's type is any of 'Choice' (Section 3.2.7)",
"type": "object",
"properties":
{
"type":
{
"type": "string",
"enum": ["Choice"]
}
},
"required": [ "type" ]
},
"choiceDetected": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Detection: Choice",
"description": "True when object's type is 'Choice' and the object has an items array (Section 3.2.7)",
"type": "object",
"allOf":
[
{ "$ref": "#/definitions/choiceTypeDefinition" },
{ "$ref": "#/definitions/itemsDetected" }
]
},
"choiceOrSetDetected": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Detection: Choice or Set",
"description": "True when object's type is one of Choice and the object has an items array (Section 3.2.7)",
"type": "object",
"allOf":
[
{ "$ref": "#/definitions/choiceOrSetTypeDefinition" },
{ "$ref": "#/definitions/itemsDetected" }
]
},
"choiceSetWithValue" :
{
"allOf":
[
{ "$ref": "#/definitions/choiceOrSetDetected" },
{ "required": [ "value" ] }
]
},
"choiceSetWithSource" :
{
"allOf":
[
{ "$ref": "#/definitions/choiceOrSetDetected" },
{ "required": [ "source" ] }
]
},
"choiceSetWithPurpose" :
{
"allOf":
[
{ "$ref": "#/definitions/choiceOrSetDetected" },
{ "required": [ "purpose" ] }
]
}
}
}
Computing file changes ...