77 * Code distributed by Google as part of the polymer project is also
88 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
99 */
10- // @version 0.7.19
10+ // @version 0.7.20
1111if ( typeof WeakMap === "undefined" ) {
1212 ( function ( ) {
1313 var defineProperty = Object . defineProperty ;
@@ -306,6 +306,7 @@ window.ShadowDOMPolyfill = {};
306306 } ) ;
307307 } ) ;
308308 }
309+ scope . addForwardingProperties = addForwardingProperties ;
309310 scope . assert = assert ;
310311 scope . constructorTable = constructorTable ;
311312 scope . defineGetter = defineGetter ;
@@ -3295,6 +3296,7 @@ window.ShadowDOMPolyfill = {};
32953296
32963297( function ( scope ) {
32973298 "use strict" ;
3299+ var addForwardingProperties = scope . addForwardingProperties ;
32983300 var mixin = scope . mixin ;
32993301 var registerWrapper = scope . registerWrapper ;
33003302 var setWrapper = scope . setWrapper ;
@@ -3319,6 +3321,10 @@ window.ShadowDOMPolyfill = {};
33193321 unsafeUnwrap ( this ) . texSubImage2D . apply ( unsafeUnwrap ( this ) , arguments ) ;
33203322 }
33213323 } ) ;
3324+ var OriginalWebGLRenderingContextBase = Object . getPrototypeOf ( OriginalWebGLRenderingContext . prototype ) ;
3325+ if ( OriginalWebGLRenderingContextBase !== Object . prototype ) {
3326+ addForwardingProperties ( OriginalWebGLRenderingContextBase , WebGLRenderingContext . prototype ) ;
3327+ }
33223328 var instanceProperties = / W e b K i t / . test ( navigator . userAgent ) ? {
33233329 drawingBufferHeight : null ,
33243330 drawingBufferWidth : null
@@ -3405,7 +3411,10 @@ window.ShadowDOMPolyfill = {};
34053411 var unwrappedActiveElement = unwrap ( this ) . ownerDocument . activeElement ;
34063412 if ( ! unwrappedActiveElement || ! unwrappedActiveElement . nodeType ) return null ;
34073413 var activeElement = wrap ( unwrappedActiveElement ) ;
3408- while ( ! this . contains ( activeElement ) ) {
3414+ if ( activeElement === this . host ) {
3415+ return null ;
3416+ }
3417+ while ( ! this . contains ( activeElement ) && ! this . host . contains ( activeElement ) ) {
34093418 while ( activeElement . parentNode ) {
34103419 activeElement = activeElement . parentNode ;
34113420 }
@@ -4109,7 +4118,6 @@ window.ShadowDOMPolyfill = {};
41094118 if ( ! unwrappedActiveElement || ! unwrappedActiveElement . nodeType ) return null ;
41104119 var activeElement = wrap ( unwrappedActiveElement ) ;
41114120 while ( ! this . contains ( activeElement ) ) {
4112- var lastHost = activeElement ;
41134121 while ( activeElement . parentNode ) {
41144122 activeElement = activeElement . parentNode ;
41154123 }
0 commit comments