Skip to content

Commit

Permalink
Revert "Update trust levels for existing actions to spec (ampproject#…
Browse files Browse the repository at this point in the history
…9954)"

This reverts commit 07977bd.
  • Loading branch information
William Chou committed Jun 28, 2017
1 parent 38b8137 commit 2f15fce
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 80 deletions.
2 changes: 1 addition & 1 deletion extensions/amp-carousel/0.1/slidescroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class AmpSlideScroll extends BaseSlides {
if (args) {
this.showSlideWhenReady(args['index']);
}
}, ActionTrust.LOW);
}, ActionTrust.MEDIUM); // TODO(choumx, #9699): LOW.
}

/** @override */
Expand Down
5 changes: 3 additions & 2 deletions extensions/amp-form/0.1/amp-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ export class AmpForm {
this.verifier_ = getFormVerifier(
this.form_, () => this.handleXhrVerify_());

// TODO(choumx, #9699): HIGH.
this.actions_.installActionHandler(
this.form_, this.actionHandler_.bind(this), ActionTrust.HIGH);
this.form_, this.actionHandler_.bind(this), ActionTrust.MEDIUM);
this.installEventHandlers_();

/** @private {?Promise} */
Expand Down Expand Up @@ -348,7 +349,7 @@ export class AmpForm {
event.preventDefault();
}
// Submits caused by user input have high trust.
this.submit_(ActionTrust.HIGH);
this.submit_(ActionTrust.MEDIUM); // TODO(choumx, #9699): HIGH.
}

/**
Expand Down
3 changes: 2 additions & 1 deletion extensions/amp-live-list/0.1/amp-live-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ export class AmpLiveList extends AMP.BaseElement {
this.curNumOfLiveItems_ = this.validateLiveListItems_(
this.itemsSlot_, true);

// TODO(choumx, #9699): LOW.
this.registerAction(
'update', this.updateAction_.bind(this), ActionTrust.LOW);
'update', this.updateAction_.bind(this), ActionTrust.MEDIUM);

if (!this.element.hasAttribute('aria-live')) {
this.element.setAttribute('aria-live', 'polite');
Expand Down
3 changes: 2 additions & 1 deletion extensions/amp-selector/0.1/amp-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,9 @@ export class AmpSelector extends AMP.BaseElement {
targetOption: el.getAttribute('option'),
selectedOptions: selectedValues,
});
// TODO(choumx, #9699): HIGH.
this.action_.trigger(this.element, name, selectEvent,
ActionTrust.HIGH);
ActionTrust.MEDIUM);
}
});
}
Expand Down
Loading

0 comments on commit 2f15fce

Please sign in to comment.