Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 327653003: Fix dart2js generated code for deprecated&removed resetStyleInheritance and applyAuthorStyles metho… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ready to review Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | tools/dom/templates/html/impl/impl_ShadowRoot.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 25bc27a488919f9a4013b267fcbd201bfd6465a7..3a1e464a3ce902b7ed2fa402ec09a573789d4a18 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -23346,20 +23346,39 @@ class ShadowRoot extends DocumentFragment native "ShadowRoot" {
static bool get supported =>
JS('bool', '!!(Element.prototype.webkitCreateShadowRoot)');
+ static bool _shadowRootDeprecationReported = false;
+ static void _shadowRootDeprecationReport() {
+ if (!_shadowRootDeprecationReported) {
+ window.console.warn('''
+ShadowRoot.resetStyleInheritance and ShadowRoot.applyAuthorStyles now deprecated in dart:html.
+Please remove them from your code.
+''');
+ _shadowRootDeprecationReported = true;
+ }
+ }
+
@deprecated
- bool get resetStyleInheritance => this._resetStyleInheritance;
+ bool get resetStyleInheritance {
+ _shadowRootDeprecationReport();
+ // Default value from when it was specified.
+ return false;
+ }
@deprecated
void set resetStyleInheritance(bool value) {
- this._resetStyleInheritance = value;
+ _shadowRootDeprecationReport();
}
@deprecated
- bool get applyAuthorStyles => this._applyAuthorStyles;
+ bool get applyAuthorStyles {
+ _shadowRootDeprecationReport();
+ // Default value from when it was specified.
+ return false;
+ }
@deprecated
void set applyAuthorStyles(bool value) {
- this._applyAuthorStyles = value;
+ _shadowRootDeprecationReport();
}
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
« no previous file with comments | « no previous file | tools/dom/templates/html/impl/impl_ShadowRoot.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698