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

Unified Diff: lib/dom/scripts/databasebuilder.py

Issue 10666054: Cleanup the code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/databasebuilder.py
diff --git a/lib/dom/scripts/databasebuilder.py b/lib/dom/scripts/databasebuilder.py
index a1bae366ed98ab8dded0aab3381316d61c7e450a..f3816762ff8b1a660a6e844f003695854509e8a8 100755
--- a/lib/dom/scripts/databasebuilder.py
+++ b/lib/dom/scripts/databasebuilder.py
@@ -9,6 +9,7 @@ import idlparser
import logging
import os
import os.path
+import re
from idlnode import *
@@ -570,14 +571,7 @@ class DatabaseBuilder(object):
type = attr.type.id
if not type.endswith('Constructor'):
continue
- type = type[:-len('Constructor')]
- # TODO: typos in WebKit IDL: HTMLImageElementConstructorConstructor...
- if type in [
- 'HTMLAudioElementConstructor',
- 'HTMLImageElementConstructor',
- 'HTMLOptionElementConstructor' ]:
- type = type[:-len('Constructor')]
-
+ type = re.sub('(Constructor)+$', '', type)
# TODO(antonm): Ideally we'd like to have pristine copy of WebKit IDLs and fetch
# this information directly from it. Unfortunately right now database is massaged
# a lot so it's difficult to maintain necessary information on DOMWindow itself.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698