Skip to content

Commit

Permalink
Merge branch 'master' into component-intro-tables
Browse files Browse the repository at this point in the history
* master: (62 commits)
  📦 Update dependency fetch-mock to v8.3.2 (ampproject#26491)
  Revert 'Move mutator implementations out to a standalone service' (ampproject#26479)
  Fix syntax error (ampproject#26481)
  Add pespective back. (ampproject#26486)
  More user friendly errors in layout.js (ampproject#26448)
  ✨ Start logging AMP URL on SwG Pages (ampproject#26480)
  Fix border around desktop amp-story-pages. (ampproject#26449)
  Fix Story tests. (ampproject#26464)
  ✨ Performance Measurement Chrome Extension (ampproject#26333)
  amp-consent restrict iframe fullScreen if no focus  (ampproject#26461)
  Add performance benchmark task (ampproject#26026)
  ♻️ amp-script: emit warning if zero height and width. (ampproject#26444)
  ✨ Launch minimal-wrapper native CEv1 (ampproject#26360)
  ♻️ Lint: include externs (round 2) (ampproject#26446)
  amp-script: Create 'fill content' container for responsive/fluid (ampproject#26400)
  amp-consent remove cmp iframe focus (ampproject#26437)
  Disable macro-after-long-task in inabox. (ampproject#26459)
  Launch layoutbox-invalidate-on-scroll (ampproject#26430)
  Add amp-ad support for ByPlay (ampproject#25663)
  🏗 Add specific RTV opt-in to experiments.html (ampproject#26434)
  ...
  • Loading branch information
robinvanopstal committed Jan 27, 2020
2 parents 8693a33 + 6f14520 commit eb0cd44
Show file tree
Hide file tree
Showing 153 changed files with 6,039 additions and 3,127 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ out/**
test/coverage/**

# Code directories
**/*.extern.js
build-system/tasks/visual-diff/snippets/*.js
build-system/babel-plugins/**/fixtures/**/*.js
build-system/server/app-index/test/*.js
Expand Down
14 changes: 14 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@
"process": false,
"require": false
}
},
{
"files": ["**/*.extern.js"],
"rules": {
"no-var": 0,
"no-undef": 0,
"no-unused-vars": 0,
"prefer-const": 0,
"require-jsdoc": 0,
"jsdoc/check-tag-names": 0,
"local/closure-type-primitives": 0,
"local/no-duplicate-name-typedef": 0,
"google-camelcase/google-camelcase": 0
}
}
]
}
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/release-tracking-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ Note: remove the backticks (``) from the link.
- [ ] Release <RELEASE_NUMBER> promoted to Stable channel (<CL submit time>)

<!--
If this release will become the next LTS release, add/update the checkboxes above as needed e.g.
On the second Monday of each month, the current stable version will be promoted to the LTS release channel. In other words:
- If this release is promoted to stable on the first Tuesday of a given month, it needs to be promoted to LTS on the second Monday of the same month.
- If this release is promoted to stable on the second, third, fourth, or fifth Monday of a given month, it is not an LTS release candidate (but will be included in a later LTS release).
Based on the above, if this release must be promoted to LTS, copy-paste the following checkbox into the list above.
- [x] Release <RELEASE_NUMBER> will be the next LTS
- [ ] Release <RELEASE_NUMBER> promoted to LTS (<CL submit time>)
If you perform cherry picks, add/update the checkboxes above as needed e.g.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ firebase
firebase.json
.firebase/
src/purifier/dist
build-system/tasks/performance/cache
build-system/tasks/performance/results.json
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
".eslintrc": "json",
".prettierrc": "json",
".renovaterc.json": "json",

// Enable YAML auto-formatting for these files.
".codecov.yml": "yaml",
".lando.yml": "yaml",
".lgtm.yml": "yaml",
Expand All @@ -17,7 +19,7 @@

// Auto-fix JS files with ESLint using amphtml's custom settings. Needs
// https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {"source.fixAll.eslint": true},
"[js]": {"editor.formatOnSave": false},

// Auto-fix non-JS files with Prettier using amphtml's custom settings. Needs
Expand Down
2 changes: 2 additions & 0 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ import {blade} from '../ads/blade';
import {brainy} from '../ads/brainy';
import {bringhub} from '../ads/bringhub';
import {broadstreetads} from '../ads/broadstreetads';
import {byplay} from '../ads/byplay';
import {caajainfeed} from '../ads/caajainfeed';
import {capirs} from '../ads/capirs';
import {caprofitx} from '../ads/caprofitx';
Expand Down Expand Up @@ -396,6 +397,7 @@ register('bodymovinanimation', bodymovinanimation);
register('brainy', brainy);
register('bringhub', bringhub);
register('broadstreetads', broadstreetads);
register('byplay', byplay);
register('caajainfeed', caajainfeed);
register('capirs', capirs);
register('caprofitx', caprofitx);
Expand Down
2 changes: 2 additions & 0 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ const adConfig = jsonConfiguration({
prefetch: 'https://cdn.broadstreetads.com/init-2.min.js',
},

'byplay': {},

'caajainfeed': {
prefetch: ['https://cdn.amanad.adtdp.com/sdk/ajaamp.js'],
preconnect: ['https://ad.amanad.adtdp.com'],
Expand Down
132 changes: 72 additions & 60 deletions ads/ads.extern.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
// HACK. Define application types used in default AMP externs
// that are not in the 3p code.
/** @constructor */
function BaseElement$$module$src$base_element() {};
function BaseElement$$module$src$base_element() {}
/** @constructor */
function AmpAdXOriginIframeHandler$$module$extensions$amp_ad$0_1$amp_ad_xorigin_iframe_handler() {};
function AmpAdXOriginIframeHandler$$module$extensions$amp_ad$0_1$amp_ad_xorigin_iframe_handler() {}
/** @constructor */
function AmpAd3PImpl$$module$extensions$amp_ad$0_1$amp_ad_3p_impl() {};
function AmpAd3PImpl$$module$extensions$amp_ad$0_1$amp_ad_3p_impl() {}
/** @constructor */
function AmpA4A$$module$extensions$amp_a4a$0_1$amp_a4a() {};
function AmpA4A$$module$extensions$amp_a4a$0_1$amp_a4a() {}
/** @constructor */
function AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui() {};
function AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui() {}

// Long list of, uhm, stuff the ads code needs to compile.
// All unquoted external properties need to be added here.
Expand All @@ -54,93 +54,101 @@ data.embedtype;
data.src;

//twitter.js
data.tweetid
data.tweetid;

//mathml.js
data.formula
var mathjax
mathjax.Hub
mathjax.Hub.Config
mathjax.Hub.Queue
window.MathJax
data.formula;
var mathjax;
mathjax.Hub;
mathjax.Hub.Config;
mathjax.Hub.Queue;
window.MathJax;

//3d-gltf/index.js
var THREE;

THREE.LoaderUtils
THREE.LoaderUtils.extractUrlBase
THREE.LoaderUtils;
THREE.LoaderUtils.extractUrlBase;

THREE.WebGLRenderer = class {
/** @param {!JsonObject} opts */
constructor(opts) {
/** @type {?Element} */ this.domElement = null;}};
THREE.WebGLRenderer.prototype.setSize
THREE.WebGLRenderer.prototype.setPixelRatio
THREE.WebGLRenderer.prototype.setClearColor
THREE.WebGLRenderer.prototype.render
/** @type {?Element} */ this.domElement = null;
}
};
THREE.WebGLRenderer.prototype.setSize;
THREE.WebGLRenderer.prototype.setPixelRatio;
THREE.WebGLRenderer.prototype.setClearColor;
THREE.WebGLRenderer.prototype.render;
/** @type {boolean} */
THREE.WebGLRenderer.prototype.gammaOutput
THREE.WebGLRenderer.prototype.gammaOutput;
/** @type {number} */
THREE.WebGLRenderer.prototype.gammaFactor
THREE.WebGLRenderer.prototype.gammaFactor;

THREE.Light = class extends THREE.Object3D {};
THREE.DirectionalLight = class extends THREE.Light {};
THREE.AmbientLight = class extends THREE.Light {};

THREE.Box3 = class {};
THREE.Box3.prototype.getSize
THREE.Box3.prototype.getCenter
THREE.Box3.prototype.setFromObject
THREE.Box3.prototype.min
THREE.Box3.prototype.max
THREE.Box3.prototype.getSize;
THREE.Box3.prototype.getCenter;
THREE.Box3.prototype.setFromObject;
THREE.Box3.prototype.min;
THREE.Box3.prototype.max;

THREE.Vector3 = class {
/** @param {number=} opt_x
* @param {number=} opt_y
* @param {number=} opt_z */
constructor(opt_x, opt_y, opt_z) {}
};
THREE.Vector3.prototype.lerpVectors
THREE.Vector3.prototype.copy
THREE.Vector3.prototype.clone
THREE.Vector3.prototype.subVectors
THREE.Vector3.prototype.multiplyScalar
THREE.Vector3.prototype.setFromMatrixColumn
THREE.Vector3.prototype.add
THREE.Vector3.prototype.set
THREE.Vector3.prototype.applyQuaternion
THREE.Vector3.prototype.setFromSpherical
THREE.Vector3.prototype.distanceToSquared
THREE.Vector3.prototype.length
THREE.Vector3.prototype.fromArray
THREE.Vector3.prototype.lerpVectors;
THREE.Vector3.prototype.copy;
THREE.Vector3.prototype.clone;
THREE.Vector3.prototype.subVectors;
THREE.Vector3.prototype.multiplyScalar;
THREE.Vector3.prototype.setFromMatrixColumn;
THREE.Vector3.prototype.add;
THREE.Vector3.prototype.set;
THREE.Vector3.prototype.applyQuaternion;
THREE.Vector3.prototype.setFromSpherical;
THREE.Vector3.prototype.distanceToSquared;
THREE.Vector3.prototype.length;
THREE.Vector3.prototype.fromArray;

THREE.Euler = class {
constructor() {
this.x = 0;
this.y = 0;
this.z = 0;}};
this.z = 0;
}
};

THREE.Euler.prototype.set;

THREE.Object3D = class {
constructor() {
this.position = new THREE.Vector3();
this.rotation = new THREE.Euler();
this.children = [];}};
this.children = [];
}
};

THREE.Object3D.prototype.applyMatrix
THREE.Object3D.prototype.add
THREE.Object3D.prototype.updateMatrixWorld
THREE.Object3D.prototype.lookAt
THREE.Object3D.prototype.clone
THREE.Object3D.prototype.applyMatrix;
THREE.Object3D.prototype.add;
THREE.Object3D.prototype.updateMatrixWorld;
THREE.Object3D.prototype.lookAt;
THREE.Object3D.prototype.clone;

THREE.OrbitControls = class {
/** @param {THREE.Camera} camera
* @param {Element} domElement */
constructor(camera, domElement) {
this.target = new THREE.Vector3(); }};
THREE.OrbitControls.prototype.update
THREE.OrbitControls.prototype.addEventListener
this.target = new THREE.Vector3();
}
};
THREE.OrbitControls.prototype.update;
THREE.OrbitControls.prototype.addEventListener;

THREE.Scene = class extends THREE.Object3D {};
THREE.Group = class extends THREE.Object3D {};
Expand All @@ -152,16 +160,20 @@ THREE.Camera = class extends THREE.Object3D {
this.far = 0;
this.near = 0;
this.aspect = 0;
this.zoom = 0;}};
THREE.Camera.prototype.updateProjectionMatrix
THREE.Camera.prototype.setFromUnitVectors
this.zoom = 0;
}
};
THREE.Camera.prototype.updateProjectionMatrix;
THREE.Camera.prototype.setFromUnitVectors;

THREE.PerspectiveCamera = class extends THREE.Camera {};

THREE.GLTFLoader = class {
constructor() {
this.crossOrigin = false;}};
THREE.GLTFLoader.prototype.load
this.crossOrigin = false;
}
};
THREE.GLTFLoader.prototype.load;

// Under ads/google folder

Expand Down Expand Up @@ -198,7 +210,7 @@ data.overrideHeight;
data.height;
data.multiSizeValidation;
data.categoryExclusions;
data.categoryExclusions.length;;
data.categoryExclusions.length;
data.cookieOptions;
data.tagForChildDirectedTreatment;
data.targeting;
Expand All @@ -218,7 +230,7 @@ google.ima.AdsLoader;
google.ima.AdsLoader.getSettings;
google.ima.AdsLoader.requestAds;
google.ima.AdsManagerLoadedEvent;
google.ima.AdsManagerLoadedEvent.Type
google.ima.AdsManagerLoadedEvent.Type;
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED;
google.ima.AdsManagerLoadedEvent.getAdsManager;
google.ima.AdErrorEvent;
Expand Down Expand Up @@ -419,7 +431,7 @@ data.parameters;
data.queue;

// imedia.js
data.positions
data.positions;

// imonomy.js
data.pid;
Expand Down Expand Up @@ -508,7 +520,7 @@ Guoshi.queryAd.amp;
Guoshi.queryAd.amp.setup;

// openadstream.js
data.adhost
data.adhost;
data.sitepage;
data.pos;
data.query;
Expand Down Expand Up @@ -612,8 +624,8 @@ data.z;
data.tf;

// swoop.js
var Swoop
Swoop.announcePlace
var Swoop;
Swoop.announcePlace;

// taboola.js
data.referrer;
Expand Down
28 changes: 28 additions & 0 deletions ads/byplay.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {loadScript, validateData} from '../3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function byplay(global, data) {
validateData(data, ['vastUrl']);

global.BYPLAY_VAST_URL = data['vastUrl'];

loadScript(global, 'https://cdn.byplay.net/amp-byplay-v2.js');
}
Loading

0 comments on commit eb0cd44

Please sign in to comment.