Skip to content

Commit

Permalink
Merge branch '2.x' into 5262-kschaaf-legacy-undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Jul 18, 2018
2 parents 61d1143 + 654f904 commit b856b89
Show file tree
Hide file tree
Showing 13 changed files with 2,284 additions and 1,935 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ addons:
cache:
directories:
- node_modules
before_install:
- npm i -g [email protected] # Make sure we use the latest version of NPM for correct lock files
before_script:
- npm install -g bower gulp-cli@1
- bower install
Expand Down
4,184 changes: 2,257 additions & 1,927 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"@polymer/gen-closure-declarations": "^0.4.0",
"@polymer/gen-typescript-declarations": "^1.2.0",
"@polymer/gen-typescript-declarations": "^1.3.0",
"@webcomponents/shadycss": "^1.1.0",
"@webcomponents/webcomponentsjs": "^1.1.0",
"babel-preset-minify": "^0.2.0",
Expand Down
3 changes: 2 additions & 1 deletion test/runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@
}
// Both sd and ce are supported, force both polyfills
if (flags.length === 2) {
// Note: Disabled to speed up testing, may be reenabled at a later date when the test timing is less of an issue.
// ce + sd becomes a single test iteration.
flags.push('wc-ce=true&wc-shadydom=true');
// flags.push('wc-ce=true&wc-shadydom=true');
}

// economize testing by testing css shimming
Expand Down
4 changes: 2 additions & 2 deletions test/unit/custom-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@
assertComputed(el, '11px', 'right');
assertComputed(el, '12px', 'top');

// Avoid Edge 16 bug with CSS Custom Properties and Fonts.
if (navigator.userAgent.match('Edge/16') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) {
// Avoid Edge bug with CSS Custom Properties and Fonts.
if (navigator.userAgent.match('Edge') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) {
return;
}

Expand Down
3 changes: 2 additions & 1 deletion test/unit/shady.html
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@
}

function getComposedHTML(node) {
return ShadyDOM.nativeTree.innerHTML(node);
// Ignore shady CSS scoping
return ShadyDOM.nativeTree.innerHTML(node).replace(/ class="[^"]*"/g, '');
}

function getComposedChildAtIndex(node, index) {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/styling-cross-scope-apply.html
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@
});

test('mixins apply to @keyframe rules', function(done) {
if (navigator.userAgent.match('Edge/16') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) {
if (navigator.userAgent.match('Edge') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) {
// skip test due to missing variable support in keyframes
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12084341/
this.skip();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/styling-cross-scope-var.html
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@
});

test('instances of scoped @keyframes', function(done) {
if (navigator.userAgent.match(/Safari\/60(3|4)/) && ShadyCSS.nativeCss && ShadyCSS.nativeShadow) {
if (navigator.userAgent.match(/Safari/) && ShadyCSS.nativeCss && ShadyCSS.nativeShadow) {
// `:nth-of-type` is broken in shadow roots on Safari 10.1
// https://bugs.webkit.org/show_bug.cgi?id=166748
this.skip();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/styling-scoped.html
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@
});

test('keyframes change scope', function(done) {
if (navigator.userAgent.match('Edge/16') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) {
if (navigator.userAgent.match('Edge') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) {
// skip test due to missing variable support in keyframes
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12084341/
this.skip();
Expand Down
6 changes: 6 additions & 0 deletions types/lib/legacy/polymer.dom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ declare namespace Polymer {
*/
readonly activeElement: Node|null|undefined;

/**
* @param node Node for which to create a Polymer.dom helper object.
*/
constructor(node: Node|null);

/**
* Returns an instance of `Polymer.FlattenedNodesObserver` that
* listens for node changes on this element.
Expand Down Expand Up @@ -176,4 +181,5 @@ declare class EventApi {
* Returns the `composedPath` for this event.
*/
readonly path: EventTarget[];
constructor(event: any);
}
1 change: 1 addition & 0 deletions types/lib/utils/debounce.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
declare namespace Polymer {

class Debouncer {
constructor();

/**
* Creates a debouncer if no debouncer is passed as a parameter
Expand Down
7 changes: 7 additions & 0 deletions types/lib/utils/flattened-nodes-observer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ declare namespace Polymer {
*/
class FlattenedNodesObserver {

/**
* @param target Node on which to listen for changes.
* @param callback Function called when there are additions
* or removals from the target's list of flattened nodes.
*/
constructor(target: _Element|null, callback: ((p0: _Element, p1: {target: _Element, addedNodes: _Element[], removedNodes: _Element[]}) => void)|null);

/**
* Returns the list of flattened nodes for the given `node`.
* This list consists of a node's children and, for any children
Expand Down
1 change: 1 addition & 0 deletions types/lib/utils/html-tag.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
declare class LiteralString {
value: string;
constructor(string: any);

/**
* @returns LiteralString string value
Expand Down

0 comments on commit b856b89

Please sign in to comment.