File tree Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Original file line number Diff line number Diff line change 30
30
this . _prepIs ( ) ;
31
31
// factory
32
32
this . _prepConstructor ( ) ;
33
- // template
34
- this . _prepTemplate ( ) ;
35
33
// styles
36
34
this . _prepStyles ( ) ;
37
35
} ,
38
36
39
37
_finishRegisterFeatures : function ( ) {
38
+ // template
39
+ this . _prepTemplate ( ) ;
40
+ // style shimming
40
41
this . _prepShimStyles ( ) ;
41
42
// template markup
42
43
this . _prepAnnotations ( ) ;
Original file line number Diff line number Diff line change 36
36
} ,
37
37
38
38
_prepStyles : function ( ) {
39
- if ( this . _encapsulateStyle === undefined ) {
40
- this . _encapsulateStyle = ! nativeShadow &&
41
- Boolean ( this . _template ) ;
42
- }
43
- if ( this . _template ) {
44
- this . _styles = this . _collectStyles ( ) ;
45
- // under shady dom we always output a shimmed style (which may be
46
- // empty) so that other dynamic stylesheets can always be placed
47
- // after the element's main stylesheet.
48
- // This helps ensure element styles are always in registration order.
49
- if ( this . _styles . length && ! nativeShadow ) {
50
- this . _scopeStyle = styleUtil . applyStylePlaceHolder ( this . is ) ;
51
- }
39
+ // under shady dom we always output a shimmed style (which may be
40
+ // empty) so that other dynamic stylesheets can always be placed
41
+ // after the element's main stylesheet.
42
+ // This helps ensure element styles are always in registration order.
43
+ if ( ! nativeShadow ) {
44
+ this . _scopeStyle = styleUtil . applyStylePlaceHolder ( this . is ) ;
52
45
}
53
46
} ,
54
47
55
48
_prepShimStyles : function ( ) {
56
49
if ( this . _template ) {
50
+ if ( this . _encapsulateStyle === undefined ) {
51
+ this . _encapsulateStyle = ! nativeShadow ;
52
+ }
53
+ this . _styles = this . _collectStyles ( ) ;
57
54
// calculate shimmed styles (we must always do this as it
58
55
// stores shimmed style data in the css rules for later use)
59
56
var cssText = styleTransformer . elementStyles ( this ) ;
You can’t perform that action at this time.
0 commit comments