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

Unified Diff: tools/dom/scripts/systemhtml.py

Issue 1876363006: Fix a few strong mode errors in dart:html (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Reverted the move of fullscreenEnabled, causes duplicate definitions in dart2js Created 4 years, 8 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:
View side-by-side diff with in-line comments
Download patch
Index: tools/dom/scripts/systemhtml.py
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index efceff66ac78b2067fdbd8f14cbe5329cbd014fd..2e0066a17aabb6f95fbff22d138964fe34c5d9c8 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -908,6 +908,15 @@ class Dart2JSBackend(HtmlDartGenerator):
self._AddAttributeUsingProperties(attribute, html_name, read_only)
return
+ # If the attribute is shadowed incompatibly in a subclass then we also
+ # can't just generate it as a field. In particular, this happens with
+ # DomMatrixReadOnly and its subclass DomMatrix. Force the superclass
+ # to generate getters. Hardcoding the known problem classes for now.
+ # TODO(alanknight): Fix this more generally.
+ if (self._interface.id == 'DOMMatrixReadOnly' or self._interface.id == 'DOMPointReadOnly'):
+ self._AddAttributeUsingProperties(attribute, html_name, read_only)
+ return
+
# If the type has a conversion we need a getter or setter to contain the
# conversion code.
if (self._OutputConversion(attribute.type.id, attribute.id) or
« no previous file with comments | « tools/dom/scripts/htmleventgenerator.py ('k') | tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698