@@ -188,6 +188,9 @@ abstract class NgAnnotation {
188
188
}
189
189
190
190
191
+ bool _applyAuthorStylesDeprecationWarningPrinted = false ;
192
+ bool _resetStyleInheritanceDeprecationWarningPrinted = false ;
193
+
191
194
/**
192
195
* Meta-data marker placed on a class which should act as a controller for the
193
196
* component. Angular components are a light-weight version of web-components.
@@ -224,14 +227,34 @@ class NgComponent extends NgAnnotation {
224
227
/**
225
228
* Set the shadow root applyAuthorStyles property. See shadow-DOM
226
229
* documentation for further details.
230
+ *
231
+ * This feature will be removed in Chrome 35.
227
232
*/
228
- final bool applyAuthorStyles;
233
+ @deprecated
234
+ bool get applyAuthorStyles {
235
+ if (! _applyAuthorStylesDeprecationWarningPrinted && _applyAuthorStyles == true ) {
236
+ print ("WARNING applyAuthorStyles is deprecated in component $selector " );
237
+ _applyAuthorStylesDeprecationWarningPrinted = true ;
238
+ }
239
+ return _applyAuthorStyles;
240
+ }
241
+ final bool _applyAuthorStyles;
229
242
230
243
/**
231
244
* Set the shadow root resetStyleInheritance property. See shadow-DOM
232
245
* documentation for further details.
246
+ *
247
+ * This feature will be removed in Chrome 35.
233
248
*/
234
- final bool resetStyleInheritance;
249
+ @deprecated
250
+ bool get resetStyleInheritance {
251
+ if (! _resetStyleInheritanceDeprecationWarningPrinted && _resetStyleInheritance == true ) {
252
+ print ("WARNING resetStyleInheritance is deprecated in component $selector " );
253
+ _resetStyleInheritanceDeprecationWarningPrinted = true ;
254
+ }
255
+ return _resetStyleInheritance;
256
+ }
257
+ final bool _resetStyleInheritance;
235
258
236
259
/**
237
260
* An expression under which the component's controller instance will be
@@ -244,8 +267,8 @@ class NgComponent extends NgAnnotation {
244
267
this .template,
245
268
this .templateUrl,
246
269
cssUrl,
247
- this . applyAuthorStyles,
248
- this . resetStyleInheritance,
270
+ applyAuthorStyles,
271
+ resetStyleInheritance,
249
272
this .publishAs,
250
273
module,
251
274
map,
@@ -254,6 +277,8 @@ class NgComponent extends NgAnnotation {
254
277
exportExpressions,
255
278
exportExpressionAttrs})
256
279
: _cssUrls = cssUrl,
280
+ _applyAuthorStyles = applyAuthorStyles,
281
+ _resetStyleInheritance = resetStyleInheritance,
257
282
super (selector: selector,
258
283
children: NgAnnotation .COMPILE_CHILDREN ,
259
284
visibility: visibility,
0 commit comments