File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 */
5454 getComputedStyleValue : function ( property ) {
5555 // refresh the style properties for this node
56- this . _updateStyleProperties ( ) ;
56+ if ( ! nativeVariables ) {
57+ this . _computeStyleProperties ( ) ;
58+ }
5759 return ! nativeVariables && this . _styleProperties &&
5860 this . _styleProperties [ property ] ||
5961 getComputedStyle ( this ) . getPropertyValue ( property ) ;
214216 } ,
215217
216218 _computeOwnStyleProperties : function ( ) {
217- if ( this . _ownStylePropertyNames ) {
218- var props = { } ;
219- for ( var i = 0 , n ; i < this . _ownStylePropertyNames . length ; i ++ ) {
220- n = this . _ownStylePropertyNames [ i ] ;
221- props [ n ] = this . _styleProperties [ n ] ;
222- }
223- this . _ownStyleProperties = props ;
219+ var props = { } ;
220+ for ( var i = 0 , n ; i < this . _ownStylePropertyNames . length ; i ++ ) {
221+ n = this . _ownStylePropertyNames [ i ] ;
222+ props [ n ] = this . _styleProperties [ n ] ;
224223 }
224+ this . _ownStyleProperties = props ;
225225 } ,
226226
227227 _scopeCount : 0 ,
Original file line number Diff line number Diff line change 13361336 var e = document . createElement ( 'prop-outer' ) ;
13371337 document . body . appendChild ( e ) ;
13381338 CustomElements . takeRecords ( ) ;
1339- assert . equal ( e . getComputedStyleValue ( '--foo' ) , 'orange' ) ;
1340- assert . equal ( e . $ . inner . getComputedStyleValue ( '--foo' ) , 'orange' ) ;
1339+ assert . equal ( e . getComputedStyleValue ( '--foo' ) . trim ( ) , 'orange' ) ;
1340+ assert . equal ( e . $ . inner . getComputedStyleValue ( '--foo' ) . trim ( ) , 'orange' ) ;
13411341 } )
13421342} ) ;
13431343
You can’t perform that action at this time.
0 commit comments