Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator rollup #22687

Merged
merged 5 commits into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions extensions/amp-access/validator-amp-access.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,12 @@ tags: { # amp-access (json)
value: "amp-access"
dispatch_key: NAME_VALUE_DISPATCH
}
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
7 changes: 6 additions & 1 deletion extensions/amp-accordion/validator-amp-accordion.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ tags: { # <amp-accordion>
tag_name: "AMP-ACCORDION"
requires_extension: "amp-accordion"
attrs: { name: "animate" value: "" }
attrs: { name: "disable-session-states" value: "" }
attrs: {
# session-states are always disabled in AMP4EMAIL
disabled_by: "amp4email"
name: "disable-session-states"
value: ""
}
attrs: { name: "expand-single-section" value: "" }
attr_lists: "extended-amp-global"
child_tags: {
Expand Down
5 changes: 1 addition & 4 deletions extensions/amp-ad-exit/validator-amp-ad-exit.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,12 @@ tags: { # amp-ad-exit config JSON
satisfies: "amp-ad-exit configuration JSON"
requires_extension: "amp-ad-exit"
mandatory_parent: "AMP-AD-EXIT"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
spec_url: "https://amp.dev/documentation/components/amp-ad-exit"
}
5 changes: 1 addition & 4 deletions extensions/amp-analytics/validator-amp-analytics.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,13 @@ tags: { # amp-analytics (json)
spec_name: "amp-analytics extension .json script"
requires_extension: "amp-analytics"
mandatory_parent: "AMP-ANALYTICS"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-anim/validator-amp-anim.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ tags: { # <amp-anim>
supported_layouts: RESPONSIVE
}
}
# See the restrictions on mandatory-src-amp4email, as well as the removal of
# `object-fit` and `object-position`.
tags: { # <amp-anim>
html_format: AMP4EMAIL
tag_name: "AMP-ANIM"
spec_name: "AMP-ANIM (AMP4EMAIL)"
requires_extension: "amp-anim"
attrs: { name: "alt" }
attrs: { name: "attribution" }
attrs: { name: "object-fit" }
attrs: { name: "object-position" }
attr_lists: "extended-amp-global"
attr_lists: "mandatory-src-amp4email"
spec_url: "https://amp.dev/documentation/components/amp-anim"
Expand Down
5 changes: 1 addition & 4 deletions extensions/amp-animation/validator-amp-animation.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,13 @@ tags: { # <amp-animation> (json)
mandatory_parent: "AMP-ANIMATION"
requires_extension: "amp-animation"
satisfies: "amp-animation extension .json script"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,13 @@ tags: { # amp-autocomplete JSON
spec_name: "amp-autocomplete JSON"
requires_extension: "amp-autocomplete"
mandatory_parent: "AMP-AUTOCOMPLETE"
attrs: {
name: "nonce"
disabled_by: "transformed"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
7 changes: 2 additions & 5 deletions extensions/amp-bind/validator-amp-bind.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@ tags: { # <amp-state> (json)
spec_name: "amp-bind extension .json script"
requires_extension: "amp-bind"
mandatory_parent: "AMP-STATE"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
max_bytes: 100000
max_bytes_spec_url: "https://amp.dev/documentation/components/amp-bind#state"
Expand Down Expand Up @@ -99,7 +96,6 @@ tags: { # <amp-state>
disallowed_ancestor: "AMP-STATE"
disallowed_ancestor: "TEMPLATE"
attr_lists: "mandatory-id-attr"
attr_lists: "optional-src-amp4email"
child_tags: {
first_child_tag_name_oneof: "SCRIPT"
}
Expand Down Expand Up @@ -140,6 +136,7 @@ tags: { # <amp-state>
tags: { # <amp-bind-macro>
html_format: AMP
html_format: ACTIONS
html_format: AMP4EMAIL
tag_name: "AMP-BIND-MACRO"
requires_extension: "amp-bind"
attrs: {
Expand Down
4 changes: 4 additions & 0 deletions extensions/amp-carousel/validator-amp-carousel.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,23 @@ tags: { # amp-carousel
attr_lists: {
name: "amp-carousel-common"
attrs: {
disabled_by: "amp4email"
name: "arrows"
value: ""
}
attrs: {
disabled_by: "amp4email"
name: "autoplay"
value_regex: "(|[0-9]+)"
}
attrs: { name: "controls" }
attrs: {
disabled_by: "amp4email"
name: "delay"
value_regex: "[0-9]+"
}
attrs: {
disabled_by: "amp4email"
name: "dots"
value: ""
}
Expand Down
5 changes: 1 addition & 4 deletions extensions/amp-consent/validator-amp-consent.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ tags: { # amp-consent (json)
mandatory_parent: "AMP-CONSENT"
unique: true
satisfies: "amp-consent extension .json script"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,13 @@ tags: { # amp-experiment (json)
tag_name: "SCRIPT"
spec_name: "amp-experiment extension .json script"
mandatory_parent: "AMP-EXPERIMENT"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
max_bytes: 15000
max_bytes_spec_url: "https://amp.dev/documentation/components/amp-experiment#configuration"
Expand Down
5 changes: 1 addition & 4 deletions extensions/amp-geo/validator-amp-geo.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,13 @@ tags: { # amp-geo (json)
spec_name: "amp-geo extension .json script"
requires_extension: "amp-geo"
mandatory_parent: "AMP-GEO"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ tags: { # amp-link-rewriter (json)
spec_name: "amp-link-rewriter extension .json script"
requires_extension: "amp-link-rewriter"
mandatory_parent: "AMP-LINK-REWRITER"
attrs: {
name: "nonce"
disabled_by: "transformed"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
2 changes: 0 additions & 2 deletions extensions/amp-list/validator-amp-list.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ tags: { # <amp-list>
# TODO(gregable): Implement validation that requires the template attr value
# to reference the id of an existing template element.
attrs: { name: "template" }
# <amp-bind>
attrs: { name: "[state]" }
attr_lists: "extended-amp-global"
amp_layout: {
supported_layouts: FILL
Expand Down
10 changes: 2 additions & 8 deletions extensions/amp-mustache/validator-amp-mustache.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ tags: {
disallowed_ancestor: "FORM DIV [submitting][template]"
disallowed_ancestor: "FORM DIV [verify-error][template]"
requires_extension: "amp-mustache"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
Expand All @@ -79,6 +75,7 @@ tags: {
value: "amp-mustache"
dispatch_key: NAME_VALUE_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand All @@ -104,10 +101,6 @@ tags: {
# AMP4EMAIL addition.
disallowed_ancestor: "FORM DIV [submitting]"
requires_extension: "amp-mustache"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
Expand All @@ -119,6 +112,7 @@ tags: {
value: "amp-mustache"
dispatch_key: NAME_VALUE_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,14 @@ tags: { # <amp-payment-google-button> (json)
spec_name: "amp-payment-google-button extension .json script"
requires_extension: "amp-payment-google-button"
mandatory_parent: "AMP-PAYMENT-GOOGLE-BUTTON"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "name-attr"
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,14 @@ tags: { # amp-payment-google-inline-async (json)
spec_name: "amp-payment-google-inline-async extension .json script"
requires_extension: "amp-payment-google-inline-async"
mandatory_parent: "AMP-PAYMENT-GOOGLE-INLINE-ASYNC"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "name-attr"
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,14 @@ tags: { # <amp-payment-google-inline> (json)
spec_name: "amp-payment-google-inline extension .json script"
requires_extension: "amp-payment-google-inline"
mandatory_parent: "AMP-PAYMENT-GOOGLE-INLINE"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "name-attr"
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,13 @@ tags: { # amp-story-auto-ads (json config)
spec_name: "amp-story-auto-ads config script"
mandatory_parent: "AMP-STORY-AUTO-ADS"
requires_extension: "amp-story-auto-ads"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ <h1>This is the cover. Open up the sidebar!</h1>
</amp-story-page>
</amp-story>
</body>

5 changes: 1 addition & 4 deletions extensions/amp-story/validator-amp-story.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,13 @@ tags: { # amp-story-consent (json)
mandatory_parent: "AMP-STORY-CONSENT"
unique: true
satisfies: "amp-story-consent extension .json script"
attrs: {
disabled_by: "transformed"
name: "nonce"
}
attrs: {
name: "type"
mandatory: true
value_casei: "application/json"
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attr_lists: "nonce-attr"
cdata: {
blacklisted_cdata_regex: {
regex: "<!--"
Expand Down
Loading