Skip to content

Commit bf13edf

Browse files
committed
Merge branch 'master' into release
2 parents 1679a88 + 2694715 commit bf13edf

File tree

119 files changed

+6135
-1838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+6135
-1838
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ script:
2222
- gulp build
2323
- gulp dist
2424
- gulp presubmit
25+
# Unit tests with Travis' default chromium
2526
- gulp test
27+
# Integration tests with all saucelabs browsers
2628
- gulp test --saucelabs --integration
29+
# All unit tests with an old chrome (best we can do right now to pass tests
30+
# and not start relying on new features).
31+
- gulp test --saucelabs --oldchrome

3p/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ Review the [ads/README](../ads/README.md) for further details on ad integration.
6060
- JavaScript can not be involved with the initiation of font loading.
6161
- Font loading gets controlled (but not initiated) by [`<amp-font>`](https://github.com/ampproject/amphtml/issues/648).
6262
- AMP by default does not allow inclusion of external stylesheets, but it is happy to whitelist URL prefixes of font providers for font inclusion via link tags. These link tags and their fonts must be served via HTTPS.
63-
- If a font provider does referrer based "security" it needs to whitelist the AMP proxy origins before being included in the link tag whitelist.
63+
- If a font provider does referrer based "security" it needs to whitelist the AMP proxy origins before being included in the link tag whitelist. AMP proxy sends the appropriate referrer header such as "https://cdn.ampproject.org".

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ Jake Moening
77
Jordan Adler
88
Kent Brewster
99
Malte Ubl
10+
Niall Kennedy
1011
Taylor Savage

DEVELOPING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,13 @@ In particular, we try to maintain "it might not be perfect but isn't broken"-sup
126126

127127
We also recommend scanning the [spec](spec/). The non-element part should help understand some of the design aspects.
128128

129+
## AMP Dev Channel (Experimental)
130+
131+
AMP Dev Channel is a way to opt a browser into using a newer version of the AMP JS libraries.
132+
133+
This release may be less stable and it may contain features not available to all users. Opt into this option if you'd like to help test new versions of AMP, report bugs or build documents that require a new feature that is not yet available to everyone.
134+
135+
To opt your browser into the AMP Dev Channel, go to [the AMP experiments page](https://cdn.ampproject.org/experiments.html) and activate the "AMP Dev Channel" experiment.
136+
137+
129138
## [Code of conduct](CODE_OF_CONDUCT.md)

ads/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ We will provide the following information to the ad:
3434
In browsers that support `location.ancestorOrigins` you can trust that the `origin` of the
3535
location is actually correct (So rogue pages cannot claim they represent an origin they do not actually represent).
3636
- `window.context.canonicalUrl` contains the canonical URL of the primary document as defined by its `link rel=canonical` tag.
37+
- `window.context.pageViewId` contains a relatively low entropy id that is the same for all ads shown on a page.
3738
- [ad viewability](#ad-viewability)
3839
- `window.context.noContentAvailable` is a function that the ad system can call if the ad slot was not filled. The container page will then react by showing placeholder content (not by collapsing the ad slot; sizing rules apply).
3940

build-system/tasks/presubmit-checks.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ var forbiddenTerms = {
6868
'src/cookies.js',
6969
'src/experiments.js',
7070
'test/functional/test-cookies.js',
71+
'tools/experiments/experiments.js',
7172
]
7273
},
7374
'setCookie\\W': {
@@ -76,6 +77,7 @@ var forbiddenTerms = {
7677
'src/cookies.js',
7778
'src/experiments.js',
7879
'test/functional/test-cookies.js',
80+
'tools/experiments/experiments.js',
7981
]
8082
},
8183
'eval\\(': '',
@@ -184,6 +186,7 @@ var forbiddenTermsSrcInclusive = {
184186
'\\.getBBox(?!_)': bannedTermsHelpString,
185187
'\\.webkitConvertPointFromNodeToPage(?!_)': bannedTermsHelpString,
186188
'\\.webkitConvertPointFromPageToNode(?!_)': bannedTermsHelpString,
189+
'\\.changeHeight(?!_)': bannedTermsHelpString,
187190
};
188191

189192
// Terms that must appear in a source file.

build-system/tasks/test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ function getConfig() {
4242
if (!process.env.SAUCE_ACCESS_KEY) {
4343
throw new Error('Missing SAUCE_ACCESS_KEY Env variable');
4444
}
45-
return extend(obj, karmaConfig.saucelabs);
45+
const c = extend(obj, karmaConfig.saucelabs);
46+
if (argv.oldchrome) {
47+
c.browsers = ['SL_Chrome_37']
48+
}
4649
}
4750

4851
return extend(obj, karmaConfig.default);
@@ -89,6 +92,7 @@ gulp.task('test', 'Runs tests in chrome', ['build'], function(done) {
8992
'saucelabs': ' Runs test on saucelabs (requires setup)',
9093
'safari': ' Runs tests in Safari',
9194
'firefox': ' Runs tests in Firefox',
92-
'integration': 'Run only integration tests.'
95+
'integration': 'Run only integration tests.',
96+
'oldchrome': 'Runs test with an old chrome. Saucelabs only.',
9397
}
9498
});

builtins/amp-ad.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ export function installAd(win) {
139139
* @override
140140
*/
141141
isReadyToBuild() {
142-
return this.element.firstChild != null;
142+
// TODO(dvoytenko, #1014): Review and try a more immediate approach.
143+
// Wait until DOMReady.
144+
return false;
143145
}
144146

145147
/** @override */

builtins/amp-pixel.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import {BaseElement} from '../src/base-element';
1818
import {Layout} from '../src/layout';
19-
import {UrlReplacements} from '../src/url-replacements';
19+
import {urlReplacementsFor} from '../src/url-replacements';
2020
import {assert} from '../src/asserts';
2121
import {registerElement} from '../src/custom-element';
2222

@@ -27,10 +27,6 @@ import {registerElement} from '../src/custom-element';
2727
* @return {undefined}
2828
*/
2929
export function installPixel(win) {
30-
31-
/** @const {!UrlReplacements} */
32-
const urlReplacements = new UrlReplacements(win);
33-
3430
class AmpPixel extends BaseElement {
3531
/** @override */
3632
isLayoutSupported(layout) {
@@ -49,7 +45,7 @@ export function installPixel(win) {
4945
/** @override */
5046
layoutCallback() {
5147
let src = this.element.getAttribute('src');
52-
src = urlReplacements.expand(this.assertSource(src));
48+
src = urlReplacementsFor(this.getWin()).expand(this.assertSource(src));
5349
const image = new Image();
5450
image.src = src;
5551
image.width = 1;

css/amp.css

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,16 +267,18 @@ i-amp-scroll-container {
267267

268268

269269
/**
270-
* `-amp-overflow` is a support for "overflow" element. This is
271-
* an element shown when more content is available. Typically tapping on this
272-
* element shows the full content.
270+
* "overflow" element is an element shown when more content is available but
271+
* not currently visible. Typically tapping on this element shows the full
272+
* content.
273273
*/
274-
.-amp-overflow {
275-
z-index: 1;
274+
.-amp-element > [overflow] {
275+
cursor: pointer;
276+
z-index: 2;
277+
visibility: hidden;
276278
}
277279

278-
.-amp-overflow.amp-hidden {
279-
visibility: hidden;
280+
.-amp-element > [overflow].amp-visible {
281+
visibility: visible;
280282
}
281283

282284

0 commit comments

Comments
 (0)