External Libraries: Update the path to `polyfill-library` files in Webpack.

Follow up to [50615].

Props gziolo.
Fixes #52854.
Built from https://develop.svn.wordpress.org/trunk@50617


git-svn-id: http://core.svn.wordpress.org/trunk@50230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2021-03-30 14:49:04 +00:00
parent 1a9eb60625
commit 85c90c4e01
5 changed files with 138 additions and 1 deletions

View File

@ -0,0 +1,101 @@
// DOMRect
(function (global) {
function number(v) {
return v === undefined ? 0 : Number(v);
}
function different(u, v) {
return u !== v && !(isNaN(u) && isNaN(v));
}
function DOMRect(xArg, yArg, wArg, hArg) {
var x, y, width, height, left, right, top, bottom;
x = number(xArg);
y = number(yArg);
width = number(wArg);
height = number(hArg);
Object.defineProperties(this, {
x: {
get: function () { return x; },
set: function (newX) {
if (different(x, newX)) {
x = newX;
left = right = undefined;
}
},
enumerable: true
},
y: {
get: function () { return y; },
set: function (newY) {
if (different(y, newY)) {
y = newY;
top = bottom = undefined;
}
},
enumerable: true
},
width: {
get: function () { return width; },
set: function (newWidth) {
if (different(width, newWidth)) {
width = newWidth;
left = right = undefined;
}
},
enumerable: true
},
height: {
get: function () { return height; },
set: function (newHeight) {
if (different(height, newHeight)) {
height = newHeight;
top = bottom = undefined;
}
},
enumerable: true
},
left: {
get: function () {
if (left === undefined) {
left = x + Math.min(0, width);
}
return left;
},
enumerable: true
},
right: {
get: function () {
if (right === undefined) {
right = x + Math.max(0, width);
}
return right;
},
enumerable: true
},
top: {
get: function () {
if (top === undefined) {
top = y + Math.min(0, height);
}
return top;
},
enumerable: true
},
bottom: {
get: function () {
if (bottom === undefined) {
bottom = y + Math.max(0, height);
}
return bottom;
},
enumerable: true
}
});
}
global.DOMRect = DOMRect;
}(self));

View File

@ -0,0 +1 @@
!function(){function d(e){return void 0===e?0:Number(e)}function g(e,n){return!(e===n||isNaN(e)&&isNaN(n))}self.DOMRect=function(e,n,t,i){var u,r,o,f,c=d(e),a=d(n),m=d(t),b=d(i);Object.defineProperties(this,{x:{get:function(){return c},set:function(e){g(c,e)&&(c=e,u=r=void 0)},enumerable:!0},y:{get:function(){return a},set:function(e){g(a,e)&&(a=e,o=f=void 0)},enumerable:!0},width:{get:function(){return m},set:function(e){g(m,e)&&(m=e,u=r=void 0)},enumerable:!0},height:{get:function(){return b},set:function(e){g(b,e)&&(b=e,o=f=void 0)},enumerable:!0},left:{get:function(){return u=void 0===u?c+Math.min(0,m):u},enumerable:!0},right:{get:function(){return r=void 0===r?c+Math.max(0,m):r},enumerable:!0},top:{get:function(){return o=void 0===o?a+Math.min(0,b):o},enumerable:!0},bottom:{get:function(){return f=void 0===f?a+Math.max(0,b):f},enumerable:!0}})}}();

View File

@ -0,0 +1,34 @@
// Node.prototype.contains
(function() {
function contains(node) {
if (!(0 in arguments)) {
throw new TypeError('1 argument is required');
}
do {
if (this === node) {
return true;
}
// eslint-disable-next-line no-cond-assign
} while (node = node && node.parentNode);
return false;
}
// IE
if ('HTMLElement' in self && 'contains' in HTMLElement.prototype) {
try {
delete HTMLElement.prototype.contains;
// eslint-disable-next-line no-empty
} catch (e) {}
}
if ('Node' in self) {
Node.prototype.contains = contains;
} else {
document.contains = Element.prototype.contains = contains;
}
}());

View File

@ -0,0 +1 @@
!function(){function e(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}if("HTMLElement"in self&&"contains"in HTMLElement.prototype)try{delete HTMLElement.prototype.contains}catch(e){}"Node"in self?Node.prototype.contains=e:document.contains=Element.prototype.contains=e}();

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-50616';
$wp_version = '5.8-alpha-50617';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.